-
Notifications
You must be signed in to change notification settings - Fork 6
/
appextraction.c4
219 lines (206 loc) · 7.58 KB
/
appextraction.c4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
// listener's C4 decompiler
void main() {
l_2 = 1;
l_3 = 134;
l_4 = 134;
l_5 = 1;
l_6 = 1;
l_7 = 1;
l_8 = 134;
l_9 = 1;
l_A = 12;
l_B = 12;
l_E = 0.001;
l_11 = -1;
GAMEPLAY::NETWORK_SET_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
if (l_14 == 0) {
sub_419();
sub_40d();
l_14 = 1;
SYSTEM::SETTIMERA(0);
}
while (1) {
SYSTEM::WAIT(0);
if (g_384D._f1 != 9) {
switch (g_384D._f1) {
case 7:
if ((l_14 == 1) && (SYSTEM::TIMERA() > 1500)) {
sub_1ee();
SYSTEM::SETTIMERA(0);
}
break;
case 8:
if (sub_17c(2, g_382D, 0)) {
sub_15d();
g_3837 = 1;
if (g_384D._f1 > 3) {
g_384D._f1 = 7;
}
}
break;
default:
break;
}
if (sub_134()) {
sub_128();
}
} else {
g_384F = 6;
sub_128();
}
if (sub_e5()) {
sub_128();
}
}
}
auto sub_e5() {
if ((((g_384D._f1 == 1) || (g_384D._f1 == 3)) || (g_384D._f1 == 0)) || (g_3815 == 1)) {
g_3840 = 1;
return 1;
} else {
return 0;
}
}
void sub_128() {
SCRIPT::TERMINATE_THIS_THREAD();
}
auto sub_134() {
if ((g_B49 == 1) || (g_384D._f1 < 7)) {
g_3840 = 1;
return 1;
} else {
return 0;
}
}
void sub_15d() {
if (!ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID())) {
AUDIO::PLAY_SOUND_FRONTEND(-1, "Menu_Back", &g_3842, 1);
}
}
auto sub_17c(auto a_0, auto a_1, auto a_2) {
if (CONTROLS::IS_CONTROL_JUST_PRESSED(a_0, a_1) || ((a_2 == 1) && CONTROLS::IS_DISABLED_CONTROL_JUST_PRESSED(a_0, a_1))) {
if (GAMEPLAY::IS_PC_VERSION()) {
if ((GAMEPLAY::UPDATE_ONSCREEN_KEYBOARD() == 0) || (NETWORK::_NETWORK_IS_TEXT_CHAT_ACTIVE() && CONTROLS::_GET_LAST_INPUT_METHOD(2))) {
return 0;
}
}
if (UI::IS_PAUSE_MENU_ACTIVE() || UI::_E18B138FABC53103()) {
return 0;
} else {
return 1;
}
} else {
return 0;
}
}
void sub_1ee() {
sub_1fa();
}
void sub_1fa() {
sub_3aa(g_383A, "SET_DATA_SLOT_EMPTY", 24.0, 0xbf800000, 0xbf800000, 0xbf800000, 0xbf800000);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION(g_383A, "SET_DATA_SLOT");
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(24);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(0);
if (GAMEPLAY::IS_BIT_SET(g_270DEA, 23)) {
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_BOOL(0);
sub_398("CELL_EXTBYOU");
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(g_270DEB);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::FLOOR(g_270EBD));
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(g_270DEC);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::FLOOR(g_270EBD._f1));
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(g_270DED);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::FLOOR(g_270EBD._f2));
sub_398("CELL_BODYG");
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(g_270DEE);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::FLOOR(g_270EC0));
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(g_270DEF);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::FLOOR(g_270EC0._f1));
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(g_270DF0);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::FLOOR(g_270EC0._f2));
} else {
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_BOOL(0);
sub_398("CELL_EXTBYOU");
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(g_270DEE);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::FLOOR(g_270EC0));
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(g_270DEF);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::FLOOR(g_270EC0._f1));
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(g_270DF0);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::FLOOR(g_270EC0._f2));
sub_398("CELL_EXTBTARG");
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(g_270DEB);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::FLOOR(g_270EBD));
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(g_270DEC);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::FLOOR(g_270EBD._f1));
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(g_270DED);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::FLOOR(g_270EBD._f2));
}
GRAPHICS::_POP_SCALEFORM_MOVIE_FUNCTION_VOID();
sub_3aa(g_383A, "DISPLAY_VIEW", 24.0, __678_$BBDA792448DB5A89(1), 0xbf800000, 0xbf800000, 0xbf800000);
}
void sub_398(auto a_0) {
GRAPHICS::_BEGIN_TEXT_COMPONENT(a_0);
GRAPHICS::_END_TEXT_COMPONENT();
}
void sub_3aa(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4, auto a_5, auto a_6) {
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION(a_0, a_1);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::ROUND(a_2));
if (a_3 != -1.0) {
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::ROUND(a_3));
}
if (a_4 != -1.0) {
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::ROUND(a_4));
}
if (a_5 != -1.0) {
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::ROUND(a_5));
}
if (a_6 != -1.0) {
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::ROUND(a_6));
}
GRAPHICS::_POP_SCALEFORM_MOVIE_FUNCTION_VOID();
}
void sub_40d() {
sub_1fa();
}
void sub_419() {
if (g_3841) {
sub_4ab(g_383A, "SET_SOFT_KEYS", 2.0, 0.0, 13.0, -1.0, -1.0, "CELL_201", 0, 0, 0, 0);
sub_4ab(g_383A, "SET_SOFT_KEYS", 3.0, 1.0, 14.0, -1.0, -1.0, "CELL_213", 0, 0, 0, 0);
} else {
sub_4ab(g_383A, "SET_SOFT_KEYS", 2.0, 0.0, 13.0, -1.0, -1.0, 0, 0, 0, 0, 0);
sub_4ab(g_383A, "SET_SOFT_KEYS", 3.0, 1.0, 14.0, -1.0, -1.0, 0, 0, 0, 0, 0);
}
sub_4ab(g_383A, "SET_SOFT_KEYS", 1.0, 0.0, 1.0, -1.0, -1.0, 0, 0, 0, 0, 0);
GAMEPLAY::CLEAR_BIT(&g_8EB, 17);
}
void sub_4ab(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4, auto a_5, auto a_6, auto a_7, auto a_8, auto a_9, auto a_10, auto a_11) {
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION(a_0, a_1);
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::ROUND(a_2));
if (a_3 != -1.0) {
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::ROUND(a_3));
}
if (a_4 != -1.0) {
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::ROUND(a_4));
}
if (a_5 != -1.0) {
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::ROUND(a_5));
}
if (a_6 != -1.0) {
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(SYSTEM::ROUND(a_6));
}
if (!GAMEPLAY::IS_STRING_NULL_OR_EMPTY(a_7)) {
sub_398(a_7);
}
if (!GAMEPLAY::IS_STRING_NULL_OR_EMPTY(a_8)) {
sub_398(a_8);
}
if (!GAMEPLAY::IS_STRING_NULL_OR_EMPTY(a_9)) {
sub_398(a_9);
}
if (!GAMEPLAY::IS_STRING_NULL_OR_EMPTY(a_A)) {
sub_398(a_A);
}
if (!GAMEPLAY::IS_STRING_NULL_OR_EMPTY(a_B)) {
sub_398(a_B);
}
GRAPHICS::_POP_SCALEFORM_MOVIE_FUNCTION_VOID();
}