client/game/jjr.dll/lifted-0000.c (218839B)
1 #define RECOMP_GENERATED_CODE 2 #include "recomp_types.h" 3 #include <math.h> 4 #include <stdio.h> 5 #include <stdlib.h> 6 #include <string.h> 7 8 void sub_35001000(void) { 9 int _fpu_cmp = 0; 10 uint32_t _cf = 0; 11 int _df = 1; 12 uint32_t _flag_k = FK_NONE; 13 uint32_t _flag_a = 0, _flag_b = 0; 14 uint32_t _itail_tgt = 0; 15 RECOMP_REGS_LOCALS 16 RECOMP_ENTER(0x35001000u); 17 18 L_35001000: 19 eax = ecx; /* 0x35001000: mov eax, ecx */ 20 MEM32(eax) = 0x350030ECu; /* 0x35001002: mov dword ptr [eax], 0x350030ec */ 21 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001008: ret */ 22 RECOMP_REGS_OUT(); 23 } 24 25 void sub_35001010(void) { 26 int _fpu_cmp = 0; 27 uint32_t _cf = 0; 28 int _df = 1; 29 uint32_t _flag_k = FK_NONE; 30 uint32_t _flag_a = 0, _flag_b = 0; 31 uint32_t _itail_tgt = 0; 32 RECOMP_REGS_LOCALS 33 RECOMP_ENTER(0x35001010u); 34 35 L_35001010: 36 eax = ecx; /* 0x35001010: mov eax, ecx */ 37 MEM32(eax) = 0x350030ECu; /* 0x35001012: mov dword ptr [eax], 0x350030ec */ 38 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35001018: ret 4 */ 39 RECOMP_REGS_OUT(); 40 } 41 42 void sub_35001020(void) { 43 int _fpu_cmp = 0; 44 uint32_t _cf = 0; 45 int _df = 1; 46 uint32_t _flag_k = FK_NONE; 47 uint32_t _flag_a = 0, _flag_b = 0; 48 uint32_t _itail_tgt = 0; 49 RECOMP_REGS_LOCALS 50 RECOMP_ENTER(0x35001020u); 51 52 L_35001020: 53 eax = ecx; /* 0x35001020: mov eax, ecx */ 54 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35001022: ret 4 */ 55 RECOMP_REGS_OUT(); 56 } 57 58 void sub_35001030(void) { 59 int _fpu_cmp = 0; 60 uint32_t _cf = 0; 61 int _df = 1; 62 uint32_t _flag_k = FK_NONE; 63 uint32_t _flag_a = 0, _flag_b = 0; 64 uint32_t _itail_tgt = 0; 65 RECOMP_REGS_LOCALS 66 RECOMP_ENTER(0x35001030u); 67 68 L_35001030: 69 MEM32(ecx) = 0x350030ECu; /* 0x35001030: mov dword ptr [ecx], 0x350030ec */ 70 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001036: ret */ 71 RECOMP_REGS_OUT(); 72 } 73 74 void sub_35001040(void) { 75 int _fpu_cmp = 0; 76 uint32_t _cf = 0; 77 int _df = 1; 78 uint32_t _flag_k = FK_NONE; 79 uint32_t _flag_a = 0, _flag_b = 0; 80 uint32_t _itail_tgt = 0; 81 RECOMP_REGS_LOCALS 82 RECOMP_ENTER(0x35001040u); 83 84 L_35001040: 85 eax = ecx; /* 0x35001040: mov eax, ecx */ 86 MEM32(eax) = 0x35003104u; /* 0x35001042: mov dword ptr [eax], 0x35003104 */ 87 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001048: ret */ 88 RECOMP_REGS_OUT(); 89 } 90 91 void sub_35001050(void) { 92 int _fpu_cmp = 0; 93 uint32_t _cf = 0; 94 int _df = 1; 95 uint32_t _flag_k = FK_NONE; 96 uint32_t _flag_a = 0, _flag_b = 0; 97 uint32_t _itail_tgt = 0; 98 RECOMP_REGS_LOCALS 99 RECOMP_ENTER(0x35001050u); 100 101 goto L_35001050; 102 L_35001030: 103 MEM32(ecx) = 0x350030ECu; /* 0x35001030: mov dword ptr [ecx], 0x350030ec */ 104 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001036: ret */ 105 L_35001050: 106 MEM32(ecx) = 0x35003104u; /* 0x35001050: mov dword ptr [ecx], 0x35003104 */ 107 RECOMP_BACKEDGE(); 108 goto L_35001030; /* 0x35001056: jmp 0x35001030 */ 109 { RECOMP_REGS_OUT(); return; } /* end of function */ 110 RECOMP_REGS_OUT(); 111 } 112 113 void sub_35001060(void) { 114 int _fpu_cmp = 0; 115 uint32_t _cf = 0; 116 int _df = 1; 117 uint32_t _flag_k = FK_NONE; 118 uint32_t _flag_a = 0, _flag_b = 0; 119 uint32_t _itail_tgt = 0; 120 RECOMP_REGS_LOCALS 121 RECOMP_ENTER(0x35001060u); 122 123 L_35001060: 124 eax = ecx; /* 0x35001060: mov eax, ecx */ 125 MEM32(eax) = 0x35003104u; /* 0x35001062: mov dword ptr [eax], 0x35003104 */ 126 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35001068: ret 4 */ 127 RECOMP_REGS_OUT(); 128 } 129 130 void sub_35001070(void) { 131 int _fpu_cmp = 0; 132 uint32_t _cf = 0; 133 int _df = 1; 134 uint32_t _flag_k = FK_NONE; 135 uint32_t _flag_a = 0, _flag_b = 0; 136 uint32_t _itail_tgt = 0; 137 RECOMP_REGS_LOCALS 138 RECOMP_ENTER(0x35001070u); 139 140 L_35001070: 141 PUSH32(esp, ebp); /* 0x35001070: push ebp */ 142 ebp = esp; /* 0x35001071: mov ebp, esp */ 143 PUSH32(esp, ebx); /* 0x35001073: push ebx */ 144 SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x35001074: mov bl, byte ptr [ebp + 8] */ 145 /* test LO8(ebx), 2 */ /* 0x35001077: test bl, 2 */ 146 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 147 _cf = 0; 148 _flag_k = FK_NARROW(FK_TEST, 24); 149 PUSH32(esp, esi); /* 0x3500107A: push esi */ 150 esi = ecx; /* 0x3500107B: mov esi, ecx */ 151 if (TEST_Z(_flag_a, _flag_b)) goto L_350010AB; /* 0x3500107D: je 0x350010ab */ 152 L_3500107F: 153 eax = MEM32(esi + (-0x4)); /* 0x3500107F: mov eax, dword ptr [esi - 4] */ 154 PUSH32(esp, edi); /* 0x35001082: push edi */ 155 PUSH32(esp, 0x35001050u); /* 0x35001083: push 0x35001050 */ 156 edi = esi + (-0x4); /* 0x35001088: lea edi, [esi - 4] */ 157 PUSH32(esp, eax); /* 0x3500108B: push eax */ 158 PUSH32(esp, 4); /* 0x3500108C: push 4 */ 159 PUSH32(esp, esi); /* 0x3500108E: push esi */ 160 RECOMP_ICALL(0x3500219Au); /* 0x3500108F: call 0x3500219a */ /* not lifted */ 161 RECOMP_FLAGS_IN(); 162 /* test LO8(ebx), 1 */ /* 0x35001094: test bl, 1 */ 163 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 164 _cf = 0; 165 _flag_k = FK_NARROW(FK_TEST, 24); 166 if (TEST_Z(_flag_a, _flag_b)) goto L_350010A2; /* 0x35001097: je 0x350010a2 */ 167 L_35001099: 168 PUSH32(esp, edi); /* 0x35001099: push edi */ 169 RECOMP_ICALL(0x35002194u); /* 0x3500109A: call 0x35002194 */ /* not lifted */ 170 RECOMP_FLAGS_IN(); 171 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 172 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 173 esp = esp + 4; /* 0x3500109F: add esp, 4 */ 174 _flag_k = FK_ADD; 175 L_350010A2: 176 eax = edi; /* 0x350010A2: mov eax, edi */ 177 edi = POP32_VAL(esp); /* 0x350010A4: pop edi */ 178 esi = POP32_VAL(esp); /* 0x350010A5: pop esi */ 179 ebx = POP32_VAL(esp); /* 0x350010A6: pop ebx */ 180 ebp = POP32_VAL(esp); /* 0x350010A7: pop ebp */ 181 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x350010A8: ret 4 */ 182 L_350010AB: 183 ecx = esi; /* 0x350010AB: mov ecx, esi */ 184 RECOMP_ICALL(0x35001050u); /* 0x350010AD: call 0x35001050 */ /* not lifted */ 185 RECOMP_FLAGS_IN(); 186 /* test LO8(ebx), 1 */ /* 0x350010B2: test bl, 1 */ 187 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 188 _cf = 0; 189 _flag_k = FK_NARROW(FK_TEST, 24); 190 if (TEST_Z(_flag_a, _flag_b)) goto L_350010C0; /* 0x350010B5: je 0x350010c0 */ 191 L_350010B7: 192 PUSH32(esp, esi); /* 0x350010B7: push esi */ 193 RECOMP_ICALL(0x35002194u); /* 0x350010B8: call 0x35002194 */ /* not lifted */ 194 RECOMP_FLAGS_IN(); 195 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 196 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 197 esp = esp + 4; /* 0x350010BD: add esp, 4 */ 198 _flag_k = FK_ADD; 199 L_350010C0: 200 eax = esi; /* 0x350010C0: mov eax, esi */ 201 esi = POP32_VAL(esp); /* 0x350010C2: pop esi */ 202 ebx = POP32_VAL(esp); /* 0x350010C3: pop ebx */ 203 ebp = POP32_VAL(esp); /* 0x350010C4: pop ebp */ 204 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x350010C5: ret 4 */ 205 RECOMP_REGS_OUT(); 206 } 207 208 void sub_350010D0(void) { 209 int _fpu_cmp = 0; 210 uint32_t _cf = 0; 211 int _df = 1; 212 uint32_t _flag_k = FK_NONE; 213 uint32_t _flag_a = 0, _flag_b = 0; 214 uint32_t _itail_tgt = 0; 215 RECOMP_REGS_LOCALS 216 RECOMP_ENTER(0x350010D0u); 217 218 L_350010D0: 219 RECOMP_ICALL(0x350010E0u); /* 0x350010D0: call 0x350010e0 */ /* not lifted */ 220 RECOMP_FLAGS_IN(); 221 goto L_350010F0; /* 0x350010D5: jmp 0x350010f0 */ 222 L_350010F0: 223 PUSH32(esp, 0x35001100u); /* 0x350010F0: push 0x35001100 */ 224 RECOMP_ICALL(0x350022BAu); /* 0x350010F5: call 0x350022ba */ /* not lifted */ 225 RECOMP_FLAGS_IN(); 226 ecx = POP32_VAL(esp); /* 0x350010FA: pop ecx */ 227 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x350010FB: ret */ 228 RECOMP_REGS_OUT(); 229 } 230 231 void sub_350010E0(void) { 232 int _fpu_cmp = 0; 233 uint32_t _cf = 0; 234 int _df = 1; 235 uint32_t _flag_k = FK_NONE; 236 uint32_t _flag_a = 0, _flag_b = 0; 237 uint32_t _itail_tgt = 0; 238 RECOMP_REGS_LOCALS 239 RECOMP_ENTER(0x350010E0u); 240 241 L_350010E0: 242 ecx = 0x35005171u; /* 0x350010E0: mov ecx, 0x35005171 */ 243 L_350010E5: 244 { _itail_tgt = (uint32_t)(MEM32(0x35003024)); goto _ljump; } 245 { RECOMP_REGS_OUT(); return; } /* end of function */ 246 _ljump: 247 switch (_itail_tgt) { 248 case 0x350010E0u: goto L_350010E0; 249 case 0x350010E5u: goto L_350010E5; 250 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 251 } 252 RECOMP_REGS_OUT(); 253 } 254 255 void sub_350010F0(void) { 256 int _fpu_cmp = 0; 257 uint32_t _cf = 0; 258 int _df = 1; 259 uint32_t _flag_k = FK_NONE; 260 uint32_t _flag_a = 0, _flag_b = 0; 261 uint32_t _itail_tgt = 0; 262 RECOMP_REGS_LOCALS 263 RECOMP_ENTER(0x350010F0u); 264 265 L_350010F0: 266 PUSH32(esp, 0x35001100u); /* 0x350010F0: push 0x35001100 */ 267 RECOMP_ICALL(0x350022BAu); /* 0x350010F5: call 0x350022ba */ /* not lifted */ 268 RECOMP_FLAGS_IN(); 269 ecx = POP32_VAL(esp); /* 0x350010FA: pop ecx */ 270 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x350010FB: ret */ 271 RECOMP_REGS_OUT(); 272 } 273 274 void sub_35001100(void) { 275 int _fpu_cmp = 0; 276 uint32_t _cf = 0; 277 int _df = 1; 278 uint32_t _flag_k = FK_NONE; 279 uint32_t _flag_a = 0, _flag_b = 0; 280 uint32_t _itail_tgt = 0; 281 RECOMP_REGS_LOCALS 282 RECOMP_ENTER(0x35001100u); 283 284 L_35001100: 285 ecx = 0x35005171u; /* 0x35001100: mov ecx, 0x35005171 */ 286 L_35001105: 287 { _itail_tgt = (uint32_t)(MEM32(0x3500304C)); goto _ljump; } 288 { RECOMP_REGS_OUT(); return; } /* end of function */ 289 _ljump: 290 switch (_itail_tgt) { 291 case 0x35001100u: goto L_35001100; 292 case 0x35001105u: goto L_35001105; 293 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 294 } 295 RECOMP_REGS_OUT(); 296 } 297 298 void sub_35001110(void) { 299 int _fpu_cmp = 0; 300 uint32_t _cf = 0; 301 int _df = 1; 302 uint32_t _flag_k = FK_NONE; 303 uint32_t _flag_a = 0, _flag_b = 0; 304 uint32_t _itail_tgt = 0; 305 RECOMP_REGS_LOCALS 306 RECOMP_ENTER(0x35001110u); 307 308 L_35001110: 309 RECOMP_ICALL(0x35001120u); /* 0x35001110: call 0x35001120 */ /* not lifted */ 310 RECOMP_FLAGS_IN(); 311 goto L_35001130; /* 0x35001115: jmp 0x35001130 */ 312 L_35001130: 313 PUSH32(esp, 0x35001140u); /* 0x35001130: push 0x35001140 */ 314 RECOMP_ICALL(0x350022BAu); /* 0x35001135: call 0x350022ba */ /* not lifted */ 315 RECOMP_FLAGS_IN(); 316 ecx = POP32_VAL(esp); /* 0x3500113A: pop ecx */ 317 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3500113B: ret */ 318 RECOMP_REGS_OUT(); 319 } 320 321 void sub_35001120(void) { 322 int _fpu_cmp = 0; 323 uint32_t _cf = 0; 324 int _df = 1; 325 uint32_t _flag_k = FK_NONE; 326 uint32_t _flag_a = 0, _flag_b = 0; 327 uint32_t _itail_tgt = 0; 328 RECOMP_REGS_LOCALS 329 RECOMP_ENTER(0x35001120u); 330 331 L_35001120: 332 ecx = 0x35005170u; /* 0x35001120: mov ecx, 0x35005170 */ 333 L_35001125: 334 { _itail_tgt = (uint32_t)(MEM32(0x35003048)); goto _ljump; } 335 { RECOMP_REGS_OUT(); return; } /* end of function */ 336 _ljump: 337 switch (_itail_tgt) { 338 case 0x35001120u: goto L_35001120; 339 case 0x35001125u: goto L_35001125; 340 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 341 } 342 RECOMP_REGS_OUT(); 343 } 344 345 void sub_35001130(void) { 346 int _fpu_cmp = 0; 347 uint32_t _cf = 0; 348 int _df = 1; 349 uint32_t _flag_k = FK_NONE; 350 uint32_t _flag_a = 0, _flag_b = 0; 351 uint32_t _itail_tgt = 0; 352 RECOMP_REGS_LOCALS 353 RECOMP_ENTER(0x35001130u); 354 355 L_35001130: 356 PUSH32(esp, 0x35001140u); /* 0x35001130: push 0x35001140 */ 357 RECOMP_ICALL(0x350022BAu); /* 0x35001135: call 0x350022ba */ /* not lifted */ 358 RECOMP_FLAGS_IN(); 359 ecx = POP32_VAL(esp); /* 0x3500113A: pop ecx */ 360 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3500113B: ret */ 361 RECOMP_REGS_OUT(); 362 } 363 364 void sub_35001140(void) { 365 int _fpu_cmp = 0; 366 uint32_t _cf = 0; 367 int _df = 1; 368 uint32_t _flag_k = FK_NONE; 369 uint32_t _flag_a = 0, _flag_b = 0; 370 uint32_t _itail_tgt = 0; 371 RECOMP_REGS_LOCALS 372 RECOMP_ENTER(0x35001140u); 373 374 L_35001140: 375 ecx = 0x35005170u; /* 0x35001140: mov ecx, 0x35005170 */ 376 L_35001145: 377 { _itail_tgt = (uint32_t)(MEM32(0x35003044)); goto _ljump; } 378 { RECOMP_REGS_OUT(); return; } /* end of function */ 379 _ljump: 380 switch (_itail_tgt) { 381 case 0x35001140u: goto L_35001140; 382 case 0x35001145u: goto L_35001145; 383 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 384 } 385 RECOMP_REGS_OUT(); 386 } 387 388 void sub_35001150(void) { 389 int _fpu_cmp = 0; 390 uint32_t _cf = 0; 391 int _df = 1; 392 uint32_t _flag_k = FK_NONE; 393 uint32_t _flag_a = 0, _flag_b = 0; 394 uint32_t _itail_tgt = 0; 395 RECOMP_REGS_LOCALS 396 RECOMP_ENTER(0x35001150u); 397 398 L_35001150: 399 eax = ecx + 0x20; /* 0x35001150: lea eax, [ecx + 0x20] */ 400 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001153: ret */ 401 RECOMP_REGS_OUT(); 402 } 403 404 void sub_35001160(void) { 405 int _fpu_cmp = 0; 406 uint32_t _cf = 0; 407 int _df = 1; 408 uint32_t _flag_k = FK_NONE; 409 uint32_t _flag_a = 0, _flag_b = 0; 410 uint32_t _itail_tgt = 0; 411 RECOMP_REGS_LOCALS 412 RECOMP_ENTER(0x35001160u); 413 414 L_35001160: 415 PUSH32(esp, ebp); /* 0x35001160: push ebp */ 416 ebp = esp; /* 0x35001161: mov ebp, esp */ 417 eax = ecx; /* 0x35001163: mov eax, ecx */ 418 ecx = MEM32(ebp + 0x8); /* 0x35001165: mov ecx, dword ptr [ebp + 8] */ 419 PUSH32(esp, esi); /* 0x35001168: push esi */ 420 edx = ecx + 0x4; /* 0x35001169: lea edx, [ecx + 4] */ 421 esi = eax + 0x4; /* 0x3500116C: lea esi, [eax + 4] */ 422 /* cmp esi, edx */ /* 0x3500116F: cmp esi, edx */ 423 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx); 424 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 425 _flag_k = FK_CMP; 426 if (CMP_EQ(_flag_a, _flag_b)) goto L_3500117F; /* 0x35001171: je 0x3500117f */ 427 L_35001173: 428 PUSH32(esp, edi); /* 0x35001173: push edi */ 429 edi = MEM32(edx); /* 0x35001174: mov edi, dword ptr [edx] */ 430 MEM32(esi) = edi; /* 0x35001176: mov dword ptr [esi], edi */ 431 edx = MEM32(edx + 0x4); /* 0x35001178: mov edx, dword ptr [edx + 4] */ 432 MEM32(esi + 0x4) = edx; /* 0x3500117B: mov dword ptr [esi + 4], edx */ 433 edi = POP32_VAL(esp); /* 0x3500117E: pop edi */ 434 L_3500117F: 435 edx = MEM32(0x350030D8); /* 0x3500117F: mov edx, dword ptr [0x350030d8] */ 436 MEM32(eax) = edx; /* 0x35001185: mov dword ptr [eax], edx */ 437 SET_LO8(edx, MEM8(ecx + 0xC)); /* 0x35001187: mov dl, byte ptr [ecx + 0xc] */ 438 MEM8(eax + 0xC) = (uint8_t)(LO8(edx)); /* 0x3500118A: mov byte ptr [eax + 0xc], dl */ 439 edx = MEM32(ecx + 0x10); /* 0x3500118D: mov edx, dword ptr [ecx + 0x10] */ 440 MEM32(eax + 0x10) = edx; /* 0x35001190: mov dword ptr [eax + 0x10], edx */ 441 edx = MEM32(ecx + 0x14); /* 0x35001193: mov edx, dword ptr [ecx + 0x14] */ 442 MEM32(eax + 0x14) = edx; /* 0x35001196: mov dword ptr [eax + 0x14], edx */ 443 edx = MEM32(ecx + 0x18); /* 0x35001199: mov edx, dword ptr [ecx + 0x18] */ 444 MEM32(eax + 0x18) = edx; /* 0x3500119C: mov dword ptr [eax + 0x18], edx */ 445 edx = MEM32(ecx + 0x1C); /* 0x3500119F: mov edx, dword ptr [ecx + 0x1c] */ 446 MEM32(eax + 0x1C) = edx; /* 0x350011A2: mov dword ptr [eax + 0x1c], edx */ 447 edx = MEM32(0x350030DC); /* 0x350011A5: mov edx, dword ptr [0x350030dc] */ 448 MEM32(eax) = edx; /* 0x350011AB: mov dword ptr [eax], edx */ 449 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x20u); 450 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 451 ecx = ecx + 0x20u; /* 0x350011AD: add ecx, 0x20 */ 452 _flag_k = FK_ADD; 453 edx = eax + 0x20; /* 0x350011B0: lea edx, [eax + 0x20] */ 454 /* cmp edx, ecx */ /* 0x350011B3: cmp edx, ecx */ 455 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx); 456 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 457 _flag_k = FK_CMP; 458 if (CMP_EQ(_flag_a, _flag_b)) goto L_350011C1; /* 0x350011B5: je 0x350011c1 */ 459 L_350011B7: 460 esi = MEM32(ecx); /* 0x350011B7: mov esi, dword ptr [ecx] */ 461 MEM32(edx) = esi; /* 0x350011B9: mov dword ptr [edx], esi */ 462 ecx = MEM32(ecx + 0x4); /* 0x350011BB: mov ecx, dword ptr [ecx + 4] */ 463 MEM32(edx + 0x4) = ecx; /* 0x350011BE: mov dword ptr [edx + 4], ecx */ 464 L_350011C1: 465 MEM32(eax) = 0x3500311Cu; /* 0x350011C1: mov dword ptr [eax], 0x3500311c */ 466 esi = POP32_VAL(esp); /* 0x350011C7: pop esi */ 467 ebp = POP32_VAL(esp); /* 0x350011C8: pop ebp */ 468 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x350011C9: ret 4 */ 469 RECOMP_REGS_OUT(); 470 } 471 472 void sub_350011D0(void) { 473 int _fpu_cmp = 0; 474 uint32_t _cf = 0; 475 int _df = 1; 476 uint32_t _flag_k = FK_NONE; 477 uint32_t _flag_a = 0, _flag_b = 0; 478 uint32_t _itail_tgt = 0; 479 RECOMP_REGS_LOCALS 480 RECOMP_ENTER(0x350011D0u); 481 482 L_350011D0: 483 PUSH32(esp, ebp); /* 0x350011D0: push ebp */ 484 ebp = esp; /* 0x350011D1: mov ebp, esp */ 485 eax = ecx; /* 0x350011D3: mov eax, ecx */ 486 ecx = MEM32(ebp + 0x8); /* 0x350011D5: mov ecx, dword ptr [ebp + 8] */ 487 edx = MEM32(ecx + 0x4); /* 0x350011D8: mov edx, dword ptr [ecx + 4] */ 488 MEM32(eax + 0x4) = edx; /* 0x350011DB: mov dword ptr [eax + 4], edx */ 489 edx = MEM32(ecx + 0x8); /* 0x350011DE: mov edx, dword ptr [ecx + 8] */ 490 MEM32(eax + 0x8) = edx; /* 0x350011E1: mov dword ptr [eax + 8], edx */ 491 SET_LO8(edx, MEM8(ecx + 0xC)); /* 0x350011E4: mov dl, byte ptr [ecx + 0xc] */ 492 MEM8(eax + 0xC) = (uint8_t)(LO8(edx)); /* 0x350011E7: mov byte ptr [eax + 0xc], dl */ 493 edx = MEM32(ecx + 0x10); /* 0x350011EA: mov edx, dword ptr [ecx + 0x10] */ 494 MEM32(eax + 0x10) = edx; /* 0x350011ED: mov dword ptr [eax + 0x10], edx */ 495 edx = MEM32(ecx + 0x14); /* 0x350011F0: mov edx, dword ptr [ecx + 0x14] */ 496 MEM32(eax + 0x14) = edx; /* 0x350011F3: mov dword ptr [eax + 0x14], edx */ 497 edx = MEM32(ecx + 0x18); /* 0x350011F6: mov edx, dword ptr [ecx + 0x18] */ 498 MEM32(eax + 0x18) = edx; /* 0x350011F9: mov dword ptr [eax + 0x18], edx */ 499 edx = MEM32(ecx + 0x1C); /* 0x350011FC: mov edx, dword ptr [ecx + 0x1c] */ 500 MEM32(eax + 0x1C) = edx; /* 0x350011FF: mov dword ptr [eax + 0x1c], edx */ 501 edx = MEM32(ecx + 0x20); /* 0x35001202: mov edx, dword ptr [ecx + 0x20] */ 502 MEM32(eax + 0x20) = edx; /* 0x35001205: mov dword ptr [eax + 0x20], edx */ 503 ecx = MEM32(ecx + 0x24); /* 0x35001208: mov ecx, dword ptr [ecx + 0x24] */ 504 MEM32(eax + 0x24) = ecx; /* 0x3500120B: mov dword ptr [eax + 0x24], ecx */ 505 ebp = POP32_VAL(esp); /* 0x3500120E: pop ebp */ 506 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3500120F: ret 4 */ 507 RECOMP_REGS_OUT(); 508 } 509 510 void sub_35001220(void) { 511 int _fpu_cmp = 0; 512 uint32_t _cf = 0; 513 int _df = 1; 514 uint32_t _flag_k = FK_NONE; 515 uint32_t _flag_a = 0, _flag_b = 0; 516 uint32_t _itail_tgt = 0; 517 RECOMP_REGS_LOCALS 518 RECOMP_ENTER(0x35001220u); 519 520 L_35001220: 521 PUSH32(esp, ebp); /* 0x35001220: push ebp */ 522 ebp = esp; /* 0x35001221: mov ebp, esp */ 523 PUSH32(esp, ebx); /* 0x35001223: push ebx */ 524 SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x35001224: mov bl, byte ptr [ebp + 8] */ 525 /* test LO8(ebx), 2 */ /* 0x35001227: test bl, 2 */ 526 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 527 _cf = 0; 528 _flag_k = FK_NARROW(FK_TEST, 24); 529 PUSH32(esp, esi); /* 0x3500122A: push esi */ 530 esi = ecx; /* 0x3500122B: mov esi, ecx */ 531 if (TEST_Z(_flag_a, _flag_b)) goto L_3500125B; /* 0x3500122D: je 0x3500125b */ 532 L_3500122F: 533 eax = MEM32(esi + (-0x4)); /* 0x3500122F: mov eax, dword ptr [esi - 4] */ 534 PUSH32(esp, edi); /* 0x35001232: push edi */ 535 PUSH32(esp, 0x350018F0u); /* 0x35001233: push 0x350018f0 */ 536 edi = esi + (-0x4); /* 0x35001238: lea edi, [esi - 4] */ 537 PUSH32(esp, eax); /* 0x3500123B: push eax */ 538 PUSH32(esp, 0x28u); /* 0x3500123C: push 0x28 */ 539 PUSH32(esp, esi); /* 0x3500123E: push esi */ 540 RECOMP_ICALL(0x3500219Au); /* 0x3500123F: call 0x3500219a */ /* not lifted */ 541 RECOMP_FLAGS_IN(); 542 /* test LO8(ebx), 1 */ /* 0x35001244: test bl, 1 */ 543 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 544 _cf = 0; 545 _flag_k = FK_NARROW(FK_TEST, 24); 546 if (TEST_Z(_flag_a, _flag_b)) goto L_35001252; /* 0x35001247: je 0x35001252 */ 547 L_35001249: 548 PUSH32(esp, edi); /* 0x35001249: push edi */ 549 RECOMP_ICALL(0x35002194u); /* 0x3500124A: call 0x35002194 */ /* not lifted */ 550 RECOMP_FLAGS_IN(); 551 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 552 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 553 esp = esp + 4; /* 0x3500124F: add esp, 4 */ 554 _flag_k = FK_ADD; 555 L_35001252: 556 eax = edi; /* 0x35001252: mov eax, edi */ 557 edi = POP32_VAL(esp); /* 0x35001254: pop edi */ 558 esi = POP32_VAL(esp); /* 0x35001255: pop esi */ 559 ebx = POP32_VAL(esp); /* 0x35001256: pop ebx */ 560 ebp = POP32_VAL(esp); /* 0x35001257: pop ebp */ 561 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35001258: ret 4 */ 562 L_3500125B: 563 ecx = esi; /* 0x3500125B: mov ecx, esi */ 564 RECOMP_ICALL(0x350018F0u); /* 0x3500125D: call 0x350018f0 */ /* not lifted */ 565 RECOMP_FLAGS_IN(); 566 /* test LO8(ebx), 1 */ /* 0x35001262: test bl, 1 */ 567 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 568 _cf = 0; 569 _flag_k = FK_NARROW(FK_TEST, 24); 570 if (TEST_Z(_flag_a, _flag_b)) goto L_35001270; /* 0x35001265: je 0x35001270 */ 571 L_35001267: 572 PUSH32(esp, esi); /* 0x35001267: push esi */ 573 RECOMP_ICALL(0x35002194u); /* 0x35001268: call 0x35002194 */ /* not lifted */ 574 RECOMP_FLAGS_IN(); 575 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 576 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 577 esp = esp + 4; /* 0x3500126D: add esp, 4 */ 578 _flag_k = FK_ADD; 579 L_35001270: 580 eax = esi; /* 0x35001270: mov eax, esi */ 581 esi = POP32_VAL(esp); /* 0x35001272: pop esi */ 582 ebx = POP32_VAL(esp); /* 0x35001273: pop ebx */ 583 ebp = POP32_VAL(esp); /* 0x35001274: pop ebp */ 584 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35001275: ret 4 */ 585 RECOMP_REGS_OUT(); 586 } 587 588 void sub_35001280(void) { 589 int _fpu_cmp = 0; 590 uint32_t _cf = 0; 591 int _df = 1; 592 uint32_t _flag_k = FK_NONE; 593 uint32_t _flag_a = 0, _flag_b = 0; 594 uint32_t _itail_tgt = 0; 595 RECOMP_REGS_LOCALS 596 RECOMP_ENTER(0x35001280u); 597 598 L_35001280: 599 SET_LO8(eax, 1); /* 0x35001280: mov al, 1 */ 600 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001282: ret */ 601 RECOMP_REGS_OUT(); 602 } 603 604 void sub_35001290(void) { 605 int _fpu_cmp = 0; 606 uint32_t _cf = 0; 607 int _df = 1; 608 uint32_t _flag_k = FK_NONE; 609 uint32_t _flag_a = 0, _flag_b = 0; 610 uint32_t _itail_tgt = 0; 611 RECOMP_REGS_LOCALS 612 RECOMP_ENTER(0x35001290u); 613 614 L_35001290: 615 PUSH32(esp, ebp); /* 0x35001290: push ebp */ 616 ebp = esp; /* 0x35001291: mov ebp, esp */ 617 PUSH32(esp, 0xFFFFFFFFu); /* 0x35001293: push -1 */ 618 PUSH32(esp, 0x35002478u); /* 0x35001295: push 0x35002478 */ 619 eax = MEM32(FS_BASE + (0)); /* 0x3500129A: mov eax, dword ptr fs:[0] */ 620 PUSH32(esp, eax); /* 0x350012A0: push eax */ 621 MEM32(FS_BASE + (0)) = esp; /* 0x350012A1: mov dword ptr fs:[0], esp */ 622 PUSH32(esp, ecx); /* 0x350012A8: push ecx */ 623 PUSH32(esp, ebx); /* 0x350012A9: push ebx */ 624 PUSH32(esp, esi); /* 0x350012AA: push esi */ 625 PUSH32(esp, edi); /* 0x350012AB: push edi */ 626 edi = MEM32(ebp + 0x8); /* 0x350012AC: mov edi, dword ptr [ebp + 8] */ 627 esi = ecx; /* 0x350012AF: mov esi, ecx */ 628 eax = edi + 0x4; /* 0x350012B1: lea eax, [edi + 4] */ 629 ecx = esi + 0x4; /* 0x350012B4: lea ecx, [esi + 4] */ 630 /* cmp ecx, eax */ /* 0x350012B7: cmp ecx, eax */ 631 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 632 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 633 _flag_k = FK_CMP; 634 MEM32(ebp + (-0x10)) = esi; /* 0x350012B9: mov dword ptr [ebp - 0x10], esi */ 635 if (CMP_EQ(_flag_a, _flag_b)) goto L_350012C8; /* 0x350012BC: je 0x350012c8 */ 636 L_350012BE: 637 edx = MEM32(eax); /* 0x350012BE: mov edx, dword ptr [eax] */ 638 MEM32(ecx) = edx; /* 0x350012C0: mov dword ptr [ecx], edx */ 639 eax = MEM32(eax + 0x4); /* 0x350012C2: mov eax, dword ptr [eax + 4] */ 640 MEM32(ecx + 0x4) = eax; /* 0x350012C5: mov dword ptr [ecx + 4], eax */ 641 L_350012C8: 642 ecx = MEM32(0x350030D8); /* 0x350012C8: mov ecx, dword ptr [0x350030d8] */ 643 MEM32(esi) = ecx; /* 0x350012CE: mov dword ptr [esi], ecx */ 644 SET_LO8(edx, MEM8(edi + 0xC)); /* 0x350012D0: mov dl, byte ptr [edi + 0xc] */ 645 MEM8(esi + 0xC) = (uint8_t)(LO8(edx)); /* 0x350012D3: mov byte ptr [esi + 0xc], dl */ 646 eax = MEM32(edi + 0x10); /* 0x350012D6: mov eax, dword ptr [edi + 0x10] */ 647 MEM32(esi + 0x10) = eax; /* 0x350012D9: mov dword ptr [esi + 0x10], eax */ 648 ecx = MEM32(edi + 0x14); /* 0x350012DC: mov ecx, dword ptr [edi + 0x14] */ 649 MEM32(esi + 0x14) = ecx; /* 0x350012DF: mov dword ptr [esi + 0x14], ecx */ 650 edx = MEM32(edi + 0x18); /* 0x350012E2: mov edx, dword ptr [edi + 0x18] */ 651 MEM32(esi + 0x18) = edx; /* 0x350012E5: mov dword ptr [esi + 0x18], edx */ 652 eax = MEM32(edi + 0x1C); /* 0x350012E8: mov eax, dword ptr [edi + 0x1c] */ 653 MEM32(esi + 0x1C) = eax; /* 0x350012EB: mov dword ptr [esi + 0x1c], eax */ 654 ecx = MEM32(0x350030DC); /* 0x350012EE: mov ecx, dword ptr [0x350030dc] */ 655 MEM32(esi) = ecx; /* 0x350012F4: mov dword ptr [esi], ecx */ 656 eax = edi + 0x20; /* 0x350012F6: lea eax, [edi + 0x20] */ 657 ecx = esi + 0x20; /* 0x350012F9: lea ecx, [esi + 0x20] */ 658 /* cmp ecx, eax */ /* 0x350012FC: cmp ecx, eax */ 659 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 660 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 661 _flag_k = FK_CMP; 662 if (CMP_EQ(_flag_a, _flag_b)) goto L_3500130A; /* 0x350012FE: je 0x3500130a */ 663 L_35001300: 664 edx = MEM32(eax); /* 0x35001300: mov edx, dword ptr [eax] */ 665 MEM32(ecx) = edx; /* 0x35001302: mov dword ptr [ecx], edx */ 666 eax = MEM32(eax + 0x4); /* 0x35001304: mov eax, dword ptr [eax + 4] */ 667 MEM32(ecx + 0x4) = eax; /* 0x35001307: mov dword ptr [ecx + 4], eax */ 668 L_3500130A: 669 MEM32(esi) = 0x3500311Cu; /* 0x3500130A: mov dword ptr [esi], 0x3500311c */ 670 SET_LO8(ecx, MEM8(edi + 0x28)); /* 0x35001310: mov cl, byte ptr [edi + 0x28] */ 671 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 672 eax = 0; /* 0x35001313: xor eax, eax */ 673 _cf = 0; 674 _flag_k = FK_TEST; 675 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x28u); 676 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 677 edi = edi + 0x28u; /* 0x35001315: add edi, 0x28 */ 678 _flag_k = FK_ADD; 679 ebx = esi + 0x28; /* 0x35001318: lea ebx, [esi + 0x28] */ 680 MEM32(ebx + 0x4) = eax; /* 0x3500131B: mov dword ptr [ebx + 4], eax */ 681 MEM32(ebx + 0x8) = eax; /* 0x3500131E: mov dword ptr [ebx + 8], eax */ 682 MEM32(ebx + 0xC) = eax; /* 0x35001321: mov dword ptr [ebx + 0xc], eax */ 683 MEM8(ebx) = (uint8_t)(LO8(ecx)); /* 0x35001324: mov byte ptr [ebx], cl */ 684 edx = MEM32(0x35003030); /* 0x35001326: mov edx, dword ptr [0x35003030] */ 685 ecx = MEM32(edx); /* 0x3500132C: mov ecx, dword ptr [edx] */ 686 edx = MEM32(edi + 0x8); /* 0x3500132E: mov edx, dword ptr [edi + 8] */ 687 MEM32(ebp + (-0x4)) = eax; /* 0x35001331: mov dword ptr [ebp - 4], eax */ 688 eax = edx; /* 0x35001334: mov eax, edx */ 689 /* cmp ecx, eax */ /* 0x35001336: cmp ecx, eax */ 690 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 691 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 692 _flag_k = FK_CMP; 693 MEM32(ebp + 0x8) = eax; /* 0x35001338: mov dword ptr [ebp + 8], eax */ 694 if (CMP_AE(_flag_a, _flag_b)) goto L_35001342; /* 0x3500133B: jae 0x35001342 */ 695 L_3500133D: 696 MEM32(ebp + 0x8) = ecx; /* 0x3500133D: mov dword ptr [ebp + 8], ecx */ 697 eax = ecx; /* 0x35001340: mov eax, ecx */ 698 L_35001342: 699 /* cmp ebx, edi */ /* 0x35001342: cmp ebx, edi */ 700 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edi); 701 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 702 _flag_k = FK_CMP; 703 if (CMP_NE(_flag_a, _flag_b)) goto L_35001377; /* 0x35001344: jne 0x35001377 */ 704 L_35001346: 705 PUSH32(esp, ecx); /* 0x35001346: push ecx */ 706 PUSH32(esp, eax); /* 0x35001347: push eax */ 707 ecx = ebx; /* 0x35001348: mov ecx, ebx */ 708 RECOMP_ICALL(MEM32(0x35003034)); /* 0x3500134A: call dword ptr [0x35003034] */ 709 RECOMP_FLAGS_IN(); 710 PUSH32(esp, 0); /* 0x35001350: push 0 */ 711 PUSH32(esp, 0); /* 0x35001352: push 0 */ 712 ecx = ebx; /* 0x35001354: mov ecx, ebx */ 713 RECOMP_ICALL(MEM32(0x35003034)); /* 0x35001356: call dword ptr [0x35003034] */ 714 RECOMP_FLAGS_IN(); 715 L_3500135C: 716 edi = POP32_VAL(esp); /* 0x3500135C: pop edi */ 717 MEM32(esi) = 0x35003144u; /* 0x3500135D: mov dword ptr [esi], 0x35003144 */ 718 eax = esi; /* 0x35001363: mov eax, esi */ 719 esi = POP32_VAL(esp); /* 0x35001365: pop esi */ 720 ebx = POP32_VAL(esp); /* 0x35001366: pop ebx */ 721 ecx = MEM32(ebp + (-0xC)); /* 0x35001367: mov ecx, dword ptr [ebp - 0xc] */ 722 MEM32(FS_BASE + (0)) = ecx; /* 0x3500136A: mov dword ptr fs:[0], ecx */ 723 esp = ebp; /* 0x35001371: mov esp, ebp */ 724 ebp = POP32_VAL(esp); /* 0x35001373: pop ebp */ 725 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35001374: ret 4 */ 726 L_35001377: 727 /* test eax, eax */ /* 0x35001377: test eax, eax */ 728 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 729 _cf = 0; 730 _flag_k = FK_TEST; 731 if (TEST_Z(_flag_a, _flag_b)) goto L_350013BC; /* 0x35001379: jbe 0x350013bc */ 732 L_3500137B: 733 /* cmp eax, edx */ /* 0x3500137B: cmp eax, edx */ 734 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 735 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 736 _flag_k = FK_CMP; 737 if (CMP_NE(_flag_a, _flag_b)) goto L_350013BC; /* 0x3500137D: jne 0x350013bc */ 738 L_3500137F: 739 ecx = MEM32(edi + 0x4); /* 0x3500137F: mov ecx, dword ptr [edi + 4] */ 740 /* test ecx, ecx */ /* 0x35001382: test ecx, ecx */ 741 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 742 _cf = 0; 743 _flag_k = FK_TEST; 744 if (TEST_NZ(_flag_a, _flag_b)) goto L_3500138C; /* 0x35001384: jne 0x3500138c */ 745 L_35001386: 746 ecx = MEM32(0x35003038); /* 0x35001386: mov ecx, dword ptr [0x35003038] */ 747 L_3500138C: 748 /* cmp MEM8(ecx + (-0x1)), 0xFEu */ /* 0x3500138C: cmp byte ptr [ecx - 1], 0xfe */ 749 _flag_a = (uint32_t)(MEM8(ecx + (-0x1))) << 24; _flag_b = (uint32_t)(0xFEu) << 24; 750 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 751 _flag_k = FK_NARROW(FK_CMP, 24); 752 if (CMP_AE(_flag_a, _flag_b)) goto L_350013BC; /* 0x35001390: jae 0x350013bc */ 753 L_35001392: 754 PUSH32(esp, 1); /* 0x35001392: push 1 */ 755 ecx = ebx; /* 0x35001394: mov ecx, ebx */ 756 RECOMP_ICALL(MEM32(0x3500303C)); /* 0x35001396: call dword ptr [0x3500303c] */ 757 RECOMP_FLAGS_IN(); 758 eax = MEM32(edi + 0x4); /* 0x3500139C: mov eax, dword ptr [edi + 4] */ 759 /* test eax, eax */ /* 0x3500139F: test eax, eax */ 760 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 761 _cf = 0; 762 _flag_k = FK_TEST; 763 if (TEST_NZ(_flag_a, _flag_b)) goto L_350013A8; /* 0x350013A1: jne 0x350013a8 */ 764 L_350013A3: 765 eax = MEM32(0x35003038); /* 0x350013A3: mov eax, dword ptr [0x35003038] */ 766 L_350013A8: 767 MEM32(ebx + 0x4) = eax; /* 0x350013A8: mov dword ptr [ebx + 4], eax */ 768 ecx = MEM32(edi + 0x8); /* 0x350013AB: mov ecx, dword ptr [edi + 8] */ 769 MEM32(ebx + 0x8) = ecx; /* 0x350013AE: mov dword ptr [ebx + 8], ecx */ 770 edx = MEM32(edi + 0xC); /* 0x350013B1: mov edx, dword ptr [edi + 0xc] */ 771 MEM32(ebx + 0xC) = edx; /* 0x350013B4: mov dword ptr [ebx + 0xc], edx */ 772 _flag_a = (uint32_t)(MEM8(eax + (-0x1))) << 24; _flag_b = (uint32_t)(1) << 24; 773 MEM8(eax + (-0x1)) = (uint8_t)(MEM8(eax + (-0x1)) + 1); /* 0x350013B7: inc byte ptr [eax - 1] */ 774 _flag_k = FK_NARROW(FK_INC, 24); 775 RECOMP_BACKEDGE(); 776 goto L_3500135C; /* 0x350013BA: jmp 0x3500135c */ 777 L_350013BC: 778 PUSH32(esp, 1); /* 0x350013BC: push 1 */ 779 PUSH32(esp, eax); /* 0x350013BE: push eax */ 780 ecx = ebx; /* 0x350013BF: mov ecx, ebx */ 781 RECOMP_ICALL(MEM32(0x35003040)); /* 0x350013C1: call dword ptr [0x35003040] */ 782 RECOMP_FLAGS_IN(); 783 /* test LO8(eax), LO8(eax) */ /* 0x350013C7: test al, al */ 784 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 785 _cf = 0; 786 _flag_k = FK_NARROW(FK_TEST, 24); 787 RECOMP_BACKEDGE(); 788 if (TEST_Z(_flag_a, _flag_b)) goto L_3500135C; /* 0x350013C9: je 0x3500135c */ 789 L_350013CB: 790 esi = MEM32(edi + 0x4); /* 0x350013CB: mov esi, dword ptr [edi + 4] */ 791 /* test esi, esi */ /* 0x350013CE: test esi, esi */ 792 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 793 _cf = 0; 794 _flag_k = FK_TEST; 795 if (TEST_NZ(_flag_a, _flag_b)) goto L_350013D8; /* 0x350013D0: jne 0x350013d8 */ 796 L_350013D2: 797 esi = MEM32(0x35003038); /* 0x350013D2: mov esi, dword ptr [0x35003038] */ 798 L_350013D8: 799 edi = MEM32(ebx + 0x4); /* 0x350013D8: mov edi, dword ptr [ebx + 4] */ 800 ecx = MEM32(ebp + 0x8); /* 0x350013DB: mov ecx, dword ptr [ebp + 8] */ 801 eax = ecx; /* 0x350013DE: mov eax, ecx */ 802 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x350013E0: shr ecx, 2 */ 803 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 804 ecx = ecx >> 2u; /* 0x350013E0: shr ecx, 2 */ 805 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x350013E3: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 806 ecx = eax; /* 0x350013E5: mov ecx, eax */ 807 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 808 ecx = ecx & 3; /* 0x350013E7: and ecx, 3 */ 809 _cf = 0; 810 _flag_k = FK_TEST; 811 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x350013EA: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 812 ecx = MEM32(ebx + 0x4); /* 0x350013EC: mov ecx, dword ptr [ebx + 4] */ 813 MEM32(ebx + 0x8) = eax; /* 0x350013EF: mov dword ptr [ebx + 8], eax */ 814 MEM8(ecx + eax) = (uint8_t)(0); /* 0x350013F2: mov byte ptr [ecx + eax], 0 */ 815 eax = MEM32(ebp + (-0x10)); /* 0x350013F6: mov eax, dword ptr [ebp - 0x10] */ 816 ecx = MEM32(ebp + (-0xC)); /* 0x350013F9: mov ecx, dword ptr [ebp - 0xc] */ 817 edi = POP32_VAL(esp); /* 0x350013FC: pop edi */ 818 esi = POP32_VAL(esp); /* 0x350013FD: pop esi */ 819 MEM32(eax) = 0x35003144u; /* 0x350013FE: mov dword ptr [eax], 0x35003144 */ 820 ebx = POP32_VAL(esp); /* 0x35001404: pop ebx */ 821 MEM32(FS_BASE + (0)) = ecx; /* 0x35001405: mov dword ptr fs:[0], ecx */ 822 esp = ebp; /* 0x3500140C: mov esp, ebp */ 823 ebp = POP32_VAL(esp); /* 0x3500140E: pop ebp */ 824 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3500140F: ret 4 */ 825 RECOMP_REGS_OUT(); 826 } 827 828 void sub_35001420(void) { 829 int _fpu_cmp = 0; 830 uint32_t _cf = 0; 831 int _df = 1; 832 uint32_t _flag_k = FK_NONE; 833 uint32_t _flag_a = 0, _flag_b = 0; 834 uint32_t _itail_tgt = 0; 835 RECOMP_REGS_LOCALS 836 RECOMP_ENTER(0x35001420u); 837 838 L_35001420: 839 PUSH32(esp, ebp); /* 0x35001420: push ebp */ 840 ebp = esp; /* 0x35001421: mov ebp, esp */ 841 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 842 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 843 esp = esp - 8; /* 0x35001423: sub esp, 8 */ 844 _flag_k = FK_CMP; 845 eax = MEM32(ebp + 0x8); /* 0x35001426: mov eax, dword ptr [ebp + 8] */ 846 PUSH32(esp, ebx); /* 0x35001429: push ebx */ 847 PUSH32(esp, esi); /* 0x3500142A: push esi */ 848 esi = ecx; /* 0x3500142B: mov esi, ecx */ 849 ecx = MEM32(eax + 0x4); /* 0x3500142D: mov ecx, dword ptr [eax + 4] */ 850 MEM32(esi + 0x4) = ecx; /* 0x35001430: mov dword ptr [esi + 4], ecx */ 851 edx = MEM32(eax + 0x8); /* 0x35001433: mov edx, dword ptr [eax + 8] */ 852 MEM32(esi + 0x8) = edx; /* 0x35001436: mov dword ptr [esi + 8], edx */ 853 SET_LO8(ecx, MEM8(eax + 0xC)); /* 0x35001439: mov cl, byte ptr [eax + 0xc] */ 854 MEM8(esi + 0xC) = (uint8_t)(LO8(ecx)); /* 0x3500143C: mov byte ptr [esi + 0xc], cl */ 855 edx = MEM32(eax + 0x10); /* 0x3500143F: mov edx, dword ptr [eax + 0x10] */ 856 MEM32(esi + 0x10) = edx; /* 0x35001442: mov dword ptr [esi + 0x10], edx */ 857 ecx = MEM32(eax + 0x14); /* 0x35001445: mov ecx, dword ptr [eax + 0x14] */ 858 MEM32(esi + 0x14) = ecx; /* 0x35001448: mov dword ptr [esi + 0x14], ecx */ 859 edx = MEM32(eax + 0x18); /* 0x3500144B: mov edx, dword ptr [eax + 0x18] */ 860 MEM32(esi + 0x18) = edx; /* 0x3500144E: mov dword ptr [esi + 0x18], edx */ 861 ecx = MEM32(eax + 0x1C); /* 0x35001451: mov ecx, dword ptr [eax + 0x1c] */ 862 MEM32(esi + 0x1C) = ecx; /* 0x35001454: mov dword ptr [esi + 0x1c], ecx */ 863 edx = MEM32(eax + 0x20); /* 0x35001457: mov edx, dword ptr [eax + 0x20] */ 864 MEM32(esi + 0x20) = edx; /* 0x3500145A: mov dword ptr [esi + 0x20], edx */ 865 ecx = MEM32(eax + 0x24); /* 0x3500145D: mov ecx, dword ptr [eax + 0x24] */ 866 MEM32(esi + 0x24) = ecx; /* 0x35001460: mov dword ptr [esi + 0x24], ecx */ 867 edx = MEM32(0x35003030); /* 0x35001463: mov edx, dword ptr [0x35003030] */ 868 ecx = MEM32(edx); /* 0x35001469: mov ecx, dword ptr [edx] */ 869 edx = MEM32(eax + 0x30); /* 0x3500146B: mov edx, dword ptr [eax + 0x30] */ 870 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x28u); 871 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 872 eax = eax + 0x28u; /* 0x3500146E: add eax, 0x28 */ 873 _flag_k = FK_ADD; 874 PUSH32(esp, edi); /* 0x35001471: push edi */ 875 edi = edx; /* 0x35001472: mov edi, edx */ 876 /* cmp ecx, edi */ /* 0x35001474: cmp ecx, edi */ 877 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 878 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 879 _flag_k = FK_CMP; 880 MEM32(ebp + (-0x8)) = esi; /* 0x35001476: mov dword ptr [ebp - 8], esi */ 881 MEM32(ebp + (-0x4)) = eax; /* 0x35001479: mov dword ptr [ebp - 4], eax */ 882 ebx = esi + 0x28; /* 0x3500147C: lea ebx, [esi + 0x28] */ 883 MEM32(ebp + 0x8) = edi; /* 0x3500147F: mov dword ptr [ebp + 8], edi */ 884 if (CMP_AE(_flag_a, _flag_b)) goto L_35001489; /* 0x35001482: jae 0x35001489 */ 885 L_35001484: 886 MEM32(ebp + 0x8) = ecx; /* 0x35001484: mov dword ptr [ebp + 8], ecx */ 887 edi = ecx; /* 0x35001487: mov edi, ecx */ 888 L_35001489: 889 /* cmp ebx, eax */ /* 0x35001489: cmp ebx, eax */ 890 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 891 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 892 _flag_k = FK_CMP; 893 if (CMP_NE(_flag_a, _flag_b)) goto L_35001501; /* 0x3500148B: jne 0x35001501 */ 894 L_3500148D: 895 /* cmp MEM32(ebx + 0x8), edi */ /* 0x3500148D: cmp dword ptr [ebx + 8], edi */ 896 _flag_a = (uint32_t)(MEM32(ebx + 0x8)); _flag_b = (uint32_t)(edi); 897 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 898 _flag_k = FK_CMP; 899 MEM32(ebp + 0x8) = ecx; /* 0x35001490: mov dword ptr [ebp + 8], ecx */ 900 if (CMP_AE(_flag_a, _flag_b)) goto L_3500149B; /* 0x35001493: jae 0x3500149b */ 901 L_35001495: 902 RECOMP_ICALL(MEM32(0x35003008)); /* 0x35001495: call dword ptr [0x35003008] */ 903 RECOMP_FLAGS_IN(); 904 L_3500149B: 905 eax = MEM32(ebx + 0x8); /* 0x3500149B: mov eax, dword ptr [ebx + 8] */ 906 ecx = MEM32(ebp + 0x8); /* 0x3500149E: mov ecx, dword ptr [ebp + 8] */ 907 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 908 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 909 eax = eax - edi; /* 0x350014A1: sub eax, edi */ 910 _flag_k = FK_CMP; 911 /* cmp eax, ecx */ /* 0x350014A3: cmp eax, ecx */ 912 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 913 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 914 _flag_k = FK_CMP; 915 if (CMP_AE(_flag_a, _flag_b)) goto L_350014AA; /* 0x350014A5: jae 0x350014aa */ 916 L_350014A7: 917 MEM32(ebp + 0x8) = eax; /* 0x350014A7: mov dword ptr [ebp + 8], eax */ 918 L_350014AA: 919 eax = MEM32(ebp + 0x8); /* 0x350014AA: mov eax, dword ptr [ebp + 8] */ 920 /* test eax, eax */ /* 0x350014AD: test eax, eax */ 921 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 922 _cf = 0; 923 _flag_k = FK_TEST; 924 if (TEST_Z(_flag_a, _flag_b)) goto L_350014F6; /* 0x350014AF: jbe 0x350014f6 */ 925 L_350014B1: 926 ecx = ebx; /* 0x350014B1: mov ecx, ebx */ 927 RECOMP_ICALL(MEM32(0x35003028)); /* 0x350014B3: call dword ptr [0x35003028] */ 928 RECOMP_FLAGS_IN(); 929 edx = MEM32(ebx + 0x8); /* 0x350014B9: mov edx, dword ptr [ebx + 8] */ 930 ecx = MEM32(ebp + 0x8); /* 0x350014BC: mov ecx, dword ptr [ebp + 8] */ 931 eax = MEM32(ebx + 0x4); /* 0x350014BF: mov eax, dword ptr [ebx + 4] */ 932 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx); 933 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 934 edx = edx - ecx; /* 0x350014C2: sub edx, ecx */ 935 _flag_k = FK_CMP; 936 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 937 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 938 eax = eax + edi; /* 0x350014C4: add eax, edi */ 939 _flag_k = FK_ADD; 940 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edi); 941 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 942 edx = edx - edi; /* 0x350014C6: sub edx, edi */ 943 _flag_k = FK_CMP; 944 PUSH32(esp, edx); /* 0x350014C8: push edx */ 945 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 946 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 947 ecx = ecx + eax; /* 0x350014C9: add ecx, eax */ 948 _flag_k = FK_ADD; 949 PUSH32(esp, ecx); /* 0x350014CB: push ecx */ 950 PUSH32(esp, eax); /* 0x350014CC: push eax */ 951 RECOMP_ICALL(MEM32(0x35003064)); /* 0x350014CD: call dword ptr [0x35003064] */ 952 RECOMP_FLAGS_IN(); 953 edi = MEM32(ebx + 0x8); /* 0x350014D3: mov edi, dword ptr [ebx + 8] */ 954 ecx = MEM32(ebp + 0x8); /* 0x350014D6: mov ecx, dword ptr [ebp + 8] */ 955 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 956 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 957 esp = esp + 0xCu; /* 0x350014D9: add esp, 0xc */ 958 _flag_k = FK_ADD; 959 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx); 960 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 961 edi = edi - ecx; /* 0x350014DC: sub edi, ecx */ 962 _flag_k = FK_CMP; 963 PUSH32(esp, 0); /* 0x350014DE: push 0 */ 964 PUSH32(esp, edi); /* 0x350014E0: push edi */ 965 ecx = ebx; /* 0x350014E1: mov ecx, ebx */ 966 RECOMP_ICALL(MEM32(0x35003040)); /* 0x350014E3: call dword ptr [0x35003040] */ 967 RECOMP_FLAGS_IN(); 968 /* test LO8(eax), LO8(eax) */ /* 0x350014E9: test al, al */ 969 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 970 _cf = 0; 971 _flag_k = FK_NARROW(FK_TEST, 24); 972 if (TEST_Z(_flag_a, _flag_b)) goto L_350014F6; /* 0x350014EB: je 0x350014f6 */ 973 L_350014ED: 974 PUSH32(esp, edi); /* 0x350014ED: push edi */ 975 ecx = ebx; /* 0x350014EE: mov ecx, ebx */ 976 RECOMP_ICALL(MEM32(0x3500302C)); /* 0x350014F0: call dword ptr [0x3500302c] */ 977 RECOMP_FLAGS_IN(); 978 L_350014F6: 979 edi = POP32_VAL(esp); /* 0x350014F6: pop edi */ 980 eax = esi; /* 0x350014F7: mov eax, esi */ 981 esi = POP32_VAL(esp); /* 0x350014F9: pop esi */ 982 ebx = POP32_VAL(esp); /* 0x350014FA: pop ebx */ 983 esp = ebp; /* 0x350014FB: mov esp, ebp */ 984 ebp = POP32_VAL(esp); /* 0x350014FD: pop ebp */ 985 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x350014FE: ret 4 */ 986 L_35001501: 987 /* test edi, edi */ /* 0x35001501: test edi, edi */ 988 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 989 _cf = 0; 990 _flag_k = FK_TEST; 991 if (TEST_Z(_flag_a, _flag_b)) goto L_3500157D; /* 0x35001503: jbe 0x3500157d */ 992 L_35001505: 993 /* cmp edi, edx */ /* 0x35001505: cmp edi, edx */ 994 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx); 995 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 996 _flag_k = FK_CMP; 997 if (CMP_NE(_flag_a, _flag_b)) goto L_3500157D; /* 0x35001507: jne 0x3500157d */ 998 L_35001509: 999 ecx = MEM32(eax + 0x4); /* 0x35001509: mov ecx, dword ptr [eax + 4] */ 1000 /* test ecx, ecx */ /* 0x3500150C: test ecx, ecx */ 1001 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 1002 _cf = 0; 1003 _flag_k = FK_TEST; 1004 if (TEST_NZ(_flag_a, _flag_b)) goto L_35001516; /* 0x3500150E: jne 0x35001516 */ 1005 L_35001510: 1006 ecx = MEM32(0x35003038); /* 0x35001510: mov ecx, dword ptr [0x35003038] */ 1007 L_35001516: 1008 /* cmp MEM8(ecx + (-0x1)), 0xFEu */ /* 0x35001516: cmp byte ptr [ecx - 1], 0xfe */ 1009 _flag_a = (uint32_t)(MEM8(ecx + (-0x1))) << 24; _flag_b = (uint32_t)(0xFEu) << 24; 1010 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1011 _flag_k = FK_NARROW(FK_CMP, 24); 1012 if (CMP_AE(_flag_a, _flag_b)) goto L_3500157D; /* 0x3500151A: jae 0x3500157d */ 1013 L_3500151C: 1014 ecx = MEM32(ebx + 0x4); /* 0x3500151C: mov ecx, dword ptr [ebx + 4] */ 1015 /* test ecx, ecx */ /* 0x3500151F: test ecx, ecx */ 1016 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 1017 _cf = 0; 1018 _flag_k = FK_TEST; 1019 if (TEST_Z(_flag_a, _flag_b)) goto L_35001543; /* 0x35001521: je 0x35001543 */ 1020 L_35001523: 1021 edx = ecx + (-0x1); /* 0x35001523: lea edx, [ecx - 1] */ 1022 SET_LO8(ecx, MEM8(edx)); /* 0x35001526: mov cl, byte ptr [edx] */ 1023 /* test LO8(ecx), LO8(ecx) */ /* 0x35001528: test cl, cl */ 1024 _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24; 1025 _cf = 0; 1026 _flag_k = FK_NARROW(FK_TEST, 24); 1027 if (TEST_Z(_flag_a, _flag_b)) goto L_35001537; /* 0x3500152A: je 0x35001537 */ 1028 L_3500152C: 1029 /* cmp LO8(ecx), 0xFFu */ /* 0x3500152C: cmp cl, 0xff */ 1030 _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 1031 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1032 _flag_k = FK_NARROW(FK_CMP, 24); 1033 if (CMP_EQ(_flag_a, _flag_b)) goto L_35001537; /* 0x3500152F: je 0x35001537 */ 1034 L_35001531: 1035 _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(1) << 24; 1036 SET_LO8(ecx, LO8(ecx) - 1); /* 0x35001531: dec cl */ 1037 _flag_k = FK_NARROW(FK_DEC, 24); 1038 MEM8(edx) = (uint8_t)(LO8(ecx)); /* 0x35001533: mov byte ptr [edx], cl */ 1039 goto L_35001543; /* 0x35001535: jmp 0x35001543 */ 1040 L_35001537: 1041 PUSH32(esp, edx); /* 0x35001537: push edx */ 1042 RECOMP_ICALL(0x35002194u); /* 0x35001538: call 0x35002194 */ /* not lifted */ 1043 RECOMP_FLAGS_IN(); 1044 eax = MEM32(ebp + (-0x4)); /* 0x3500153D: mov eax, dword ptr [ebp - 4] */ 1045 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1046 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1047 esp = esp + 4; /* 0x35001540: add esp, 4 */ 1048 _flag_k = FK_ADD; 1049 L_35001543: 1050 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1051 ecx = 0; /* 0x35001543: xor ecx, ecx */ 1052 _cf = 0; 1053 _flag_k = FK_TEST; 1054 MEM32(ebx + 0x4) = ecx; /* 0x35001545: mov dword ptr [ebx + 4], ecx */ 1055 MEM32(ebx + 0x8) = ecx; /* 0x35001548: mov dword ptr [ebx + 8], ecx */ 1056 MEM32(ebx + 0xC) = ecx; /* 0x3500154B: mov dword ptr [ebx + 0xc], ecx */ 1057 ecx = MEM32(eax + 0x4); /* 0x3500154E: mov ecx, dword ptr [eax + 4] */ 1058 /* test ecx, ecx */ /* 0x35001551: test ecx, ecx */ 1059 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 1060 _cf = 0; 1061 _flag_k = FK_TEST; 1062 if (TEST_NZ(_flag_a, _flag_b)) goto L_3500155B; /* 0x35001553: jne 0x3500155b */ 1063 L_35001555: 1064 ecx = MEM32(0x35003038); /* 0x35001555: mov ecx, dword ptr [0x35003038] */ 1065 L_3500155B: 1066 MEM32(ebx + 0x4) = ecx; /* 0x3500155B: mov dword ptr [ebx + 4], ecx */ 1067 edx = MEM32(eax + 0x8); /* 0x3500155E: mov edx, dword ptr [eax + 8] */ 1068 MEM32(ebx + 0x8) = edx; /* 0x35001561: mov dword ptr [ebx + 8], edx */ 1069 eax = MEM32(eax + 0xC); /* 0x35001564: mov eax, dword ptr [eax + 0xc] */ 1070 MEM32(ebx + 0xC) = eax; /* 0x35001567: mov dword ptr [ebx + 0xc], eax */ 1071 SET_LO8(eax, MEM8(ecx + (-0x1))); /* 0x3500156A: mov al, byte ptr [ecx - 1] */ 1072 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 1073 SET_LO8(eax, LO8(eax) + 1); /* 0x3500156D: inc al */ 1074 _flag_k = FK_NARROW(FK_INC, 24); 1075 edi = POP32_VAL(esp); /* 0x3500156F: pop edi */ 1076 MEM8(ecx + (-0x1)) = (uint8_t)(LO8(eax)); /* 0x35001570: mov byte ptr [ecx - 1], al */ 1077 eax = esi; /* 0x35001573: mov eax, esi */ 1078 esi = POP32_VAL(esp); /* 0x35001575: pop esi */ 1079 ebx = POP32_VAL(esp); /* 0x35001576: pop ebx */ 1080 esp = ebp; /* 0x35001577: mov esp, ebp */ 1081 ebp = POP32_VAL(esp); /* 0x35001579: pop ebp */ 1082 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3500157A: ret 4 */ 1083 L_3500157D: 1084 PUSH32(esp, 1); /* 0x3500157D: push 1 */ 1085 PUSH32(esp, edi); /* 0x3500157F: push edi */ 1086 ecx = ebx; /* 0x35001580: mov ecx, ebx */ 1087 RECOMP_ICALL(MEM32(0x35003040)); /* 0x35001582: call dword ptr [0x35003040] */ 1088 RECOMP_FLAGS_IN(); 1089 /* test LO8(eax), LO8(eax) */ /* 0x35001588: test al, al */ 1090 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 1091 _cf = 0; 1092 _flag_k = FK_NARROW(FK_TEST, 24); 1093 RECOMP_BACKEDGE(); 1094 if (TEST_Z(_flag_a, _flag_b)) goto L_350014F6; /* 0x3500158A: je 0x350014f6 */ 1095 L_35001590: 1096 ecx = MEM32(ebp + (-0x4)); /* 0x35001590: mov ecx, dword ptr [ebp - 4] */ 1097 eax = MEM32(ecx + 0x4); /* 0x35001593: mov eax, dword ptr [ecx + 4] */ 1098 /* test eax, eax */ /* 0x35001596: test eax, eax */ 1099 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1100 _cf = 0; 1101 _flag_k = FK_TEST; 1102 if (TEST_NZ(_flag_a, _flag_b)) goto L_3500159F; /* 0x35001598: jne 0x3500159f */ 1103 L_3500159A: 1104 eax = MEM32(0x35003038); /* 0x3500159A: mov eax, dword ptr [0x35003038] */ 1105 L_3500159F: 1106 ecx = edi; /* 0x3500159F: mov ecx, edi */ 1107 edi = MEM32(ebx + 0x4); /* 0x350015A1: mov edi, dword ptr [ebx + 4] */ 1108 edx = ecx; /* 0x350015A4: mov edx, ecx */ 1109 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x350015A6: shr ecx, 2 */ 1110 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 1111 ecx = ecx >> 2u; /* 0x350015A6: shr ecx, 2 */ 1112 esi = eax; /* 0x350015A9: mov esi, eax */ 1113 eax = MEM32(ebp + 0x8); /* 0x350015AB: mov eax, dword ptr [ebp + 8] */ 1114 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x350015AE: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 1115 ecx = edx; /* 0x350015B0: mov ecx, edx */ 1116 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 1117 ecx = ecx & 3; /* 0x350015B2: and ecx, 3 */ 1118 _cf = 0; 1119 _flag_k = FK_TEST; 1120 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x350015B5: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 1121 PUSH32(esp, eax); /* 0x350015B7: push eax */ 1122 ecx = ebx; /* 0x350015B8: mov ecx, ebx */ 1123 RECOMP_ICALL(MEM32(0x3500302C)); /* 0x350015BA: call dword ptr [0x3500302c] */ 1124 RECOMP_FLAGS_IN(); 1125 eax = MEM32(ebp + (-0x8)); /* 0x350015C0: mov eax, dword ptr [ebp - 8] */ 1126 edi = POP32_VAL(esp); /* 0x350015C3: pop edi */ 1127 esi = POP32_VAL(esp); /* 0x350015C4: pop esi */ 1128 ebx = POP32_VAL(esp); /* 0x350015C5: pop ebx */ 1129 esp = ebp; /* 0x350015C6: mov esp, ebp */ 1130 ebp = POP32_VAL(esp); /* 0x350015C8: pop ebp */ 1131 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x350015C9: ret 4 */ 1132 RECOMP_REGS_OUT(); 1133 } 1134 1135 void sub_350015D0(void) { 1136 int _fpu_cmp = 0; 1137 uint32_t _cf = 0; 1138 int _df = 1; 1139 uint32_t _flag_k = FK_NONE; 1140 uint32_t _flag_a = 0, _flag_b = 0; 1141 uint32_t _itail_tgt = 0; 1142 RECOMP_REGS_LOCALS 1143 RECOMP_ENTER(0x350015D0u); 1144 1145 L_350015D0: 1146 PUSH32(esp, esi); /* 0x350015D0: push esi */ 1147 esi = ecx; /* 0x350015D1: mov esi, ecx */ 1148 eax = MEM32(esi + 0x2C); /* 0x350015D3: mov eax, dword ptr [esi + 0x2c] */ 1149 /* test eax, eax */ /* 0x350015D6: test eax, eax */ 1150 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1151 _cf = 0; 1152 _flag_k = FK_TEST; 1153 if (TEST_Z(_flag_a, _flag_b)) goto L_350015F6; /* 0x350015D8: je 0x350015f6 */ 1154 L_350015DA: 1155 ecx = eax + (-0x1); /* 0x350015DA: lea ecx, [eax - 1] */ 1156 SET_LO8(eax, MEM8(ecx)); /* 0x350015DD: mov al, byte ptr [ecx] */ 1157 /* test LO8(eax), LO8(eax) */ /* 0x350015DF: test al, al */ 1158 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 1159 _cf = 0; 1160 _flag_k = FK_NARROW(FK_TEST, 24); 1161 if (TEST_Z(_flag_a, _flag_b)) goto L_350015ED; /* 0x350015E1: je 0x350015ed */ 1162 L_350015E3: 1163 /* cmp LO8(eax), 0xFFu */ /* 0x350015E3: cmp al, 0xff */ 1164 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 1165 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1166 _flag_k = FK_NARROW(FK_CMP, 24); 1167 if (CMP_EQ(_flag_a, _flag_b)) goto L_350015ED; /* 0x350015E5: je 0x350015ed */ 1168 L_350015E7: 1169 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 1170 SET_LO8(eax, LO8(eax) - 1); /* 0x350015E7: dec al */ 1171 _flag_k = FK_NARROW(FK_DEC, 24); 1172 MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x350015E9: mov byte ptr [ecx], al */ 1173 goto L_350015F6; /* 0x350015EB: jmp 0x350015f6 */ 1174 L_350015ED: 1175 PUSH32(esp, ecx); /* 0x350015ED: push ecx */ 1176 RECOMP_ICALL(0x35002194u); /* 0x350015EE: call 0x35002194 */ /* not lifted */ 1177 RECOMP_FLAGS_IN(); 1178 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1179 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1180 esp = esp + 4; /* 0x350015F3: add esp, 4 */ 1181 _flag_k = FK_ADD; 1182 L_350015F6: 1183 ecx = esi; /* 0x350015F6: mov ecx, esi */ 1184 MEM32(esi + 0x2C) = 0; /* 0x350015F8: mov dword ptr [esi + 0x2c], 0 */ 1185 MEM32(esi + 0x30) = 0; /* 0x350015FF: mov dword ptr [esi + 0x30], 0 */ 1186 MEM32(esi + 0x34) = 0; /* 0x35001606: mov dword ptr [esi + 0x34], 0 */ 1187 RECOMP_ICALL(0x350018F0u); /* 0x3500160D: call 0x350018f0 */ /* not lifted */ 1188 RECOMP_FLAGS_IN(); 1189 esi = POP32_VAL(esp); /* 0x35001612: pop esi */ 1190 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001613: ret */ 1191 RECOMP_REGS_OUT(); 1192 } 1193 1194 void sub_35001620(void) { 1195 int _fpu_cmp = 0; 1196 uint32_t _cf = 0; 1197 int _df = 1; 1198 uint32_t _flag_k = FK_NONE; 1199 uint32_t _flag_a = 0, _flag_b = 0; 1200 uint32_t _itail_tgt = 0; 1201 RECOMP_REGS_LOCALS 1202 RECOMP_ENTER(0x35001620u); 1203 1204 L_35001620: 1205 PUSH32(esp, ebp); /* 0x35001620: push ebp */ 1206 ebp = esp; /* 0x35001621: mov ebp, esp */ 1207 PUSH32(esp, ebx); /* 0x35001623: push ebx */ 1208 SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x35001624: mov bl, byte ptr [ebp + 8] */ 1209 /* test LO8(ebx), 2 */ /* 0x35001627: test bl, 2 */ 1210 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 1211 _cf = 0; 1212 _flag_k = FK_NARROW(FK_TEST, 24); 1213 PUSH32(esp, esi); /* 0x3500162A: push esi */ 1214 esi = ecx; /* 0x3500162B: mov esi, ecx */ 1215 if (TEST_Z(_flag_a, _flag_b)) goto L_3500165B; /* 0x3500162D: je 0x3500165b */ 1216 L_3500162F: 1217 eax = MEM32(esi + (-0x4)); /* 0x3500162F: mov eax, dword ptr [esi - 4] */ 1218 PUSH32(esp, edi); /* 0x35001632: push edi */ 1219 PUSH32(esp, 0x350015D0u); /* 0x35001633: push 0x350015d0 */ 1220 edi = esi + (-0x4); /* 0x35001638: lea edi, [esi - 4] */ 1221 PUSH32(esp, eax); /* 0x3500163B: push eax */ 1222 PUSH32(esp, 0x38u); /* 0x3500163C: push 0x38 */ 1223 PUSH32(esp, esi); /* 0x3500163E: push esi */ 1224 RECOMP_ICALL(0x3500219Au); /* 0x3500163F: call 0x3500219a */ /* not lifted */ 1225 RECOMP_FLAGS_IN(); 1226 /* test LO8(ebx), 1 */ /* 0x35001644: test bl, 1 */ 1227 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 1228 _cf = 0; 1229 _flag_k = FK_NARROW(FK_TEST, 24); 1230 if (TEST_Z(_flag_a, _flag_b)) goto L_35001652; /* 0x35001647: je 0x35001652 */ 1231 L_35001649: 1232 PUSH32(esp, edi); /* 0x35001649: push edi */ 1233 RECOMP_ICALL(0x35002194u); /* 0x3500164A: call 0x35002194 */ /* not lifted */ 1234 RECOMP_FLAGS_IN(); 1235 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1236 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1237 esp = esp + 4; /* 0x3500164F: add esp, 4 */ 1238 _flag_k = FK_ADD; 1239 L_35001652: 1240 eax = edi; /* 0x35001652: mov eax, edi */ 1241 edi = POP32_VAL(esp); /* 0x35001654: pop edi */ 1242 esi = POP32_VAL(esp); /* 0x35001655: pop esi */ 1243 ebx = POP32_VAL(esp); /* 0x35001656: pop ebx */ 1244 ebp = POP32_VAL(esp); /* 0x35001657: pop ebp */ 1245 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35001658: ret 4 */ 1246 L_3500165B: 1247 ecx = esi; /* 0x3500165B: mov ecx, esi */ 1248 RECOMP_ICALL(0x350015D0u); /* 0x3500165D: call 0x350015d0 */ /* not lifted */ 1249 RECOMP_FLAGS_IN(); 1250 /* test LO8(ebx), 1 */ /* 0x35001662: test bl, 1 */ 1251 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 1252 _cf = 0; 1253 _flag_k = FK_NARROW(FK_TEST, 24); 1254 if (TEST_Z(_flag_a, _flag_b)) goto L_35001670; /* 0x35001665: je 0x35001670 */ 1255 L_35001667: 1256 PUSH32(esp, esi); /* 0x35001667: push esi */ 1257 RECOMP_ICALL(0x35002194u); /* 0x35001668: call 0x35002194 */ /* not lifted */ 1258 RECOMP_FLAGS_IN(); 1259 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1260 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1261 esp = esp + 4; /* 0x3500166D: add esp, 4 */ 1262 _flag_k = FK_ADD; 1263 L_35001670: 1264 eax = esi; /* 0x35001670: mov eax, esi */ 1265 esi = POP32_VAL(esp); /* 0x35001672: pop esi */ 1266 ebx = POP32_VAL(esp); /* 0x35001673: pop ebx */ 1267 ebp = POP32_VAL(esp); /* 0x35001674: pop ebp */ 1268 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35001675: ret 4 */ 1269 RECOMP_REGS_OUT(); 1270 } 1271 1272 void sub_35001680(void) { 1273 int _fpu_cmp = 0; 1274 uint32_t _cf = 0; 1275 int _df = 1; 1276 uint32_t _flag_k = FK_NONE; 1277 uint32_t _flag_a = 0, _flag_b = 0; 1278 uint32_t _itail_tgt = 0; 1279 RECOMP_REGS_LOCALS 1280 RECOMP_ENTER(0x35001680u); 1281 1282 L_35001680: 1283 PUSH32(esp, ebp); /* 0x35001680: push ebp */ 1284 ebp = esp; /* 0x35001681: mov ebp, esp */ 1285 eax = MEM32(0x350030C8); /* 0x35001683: mov eax, dword ptr [0x350030c8] */ 1286 ecx = MEM32(eax); /* 0x35001688: mov ecx, dword ptr [eax] */ 1287 PUSH32(esp, esi); /* 0x3500168A: push esi */ 1288 esi = MEM32(ebp + 0x8); /* 0x3500168B: mov esi, dword ptr [ebp + 8] */ 1289 PUSH32(esp, esi); /* 0x3500168E: push esi */ 1290 RECOMP_ICALL(MEM32(0x350030B0)); /* 0x3500168F: call dword ptr [0x350030b0] */ 1291 RECOMP_FLAGS_IN(); 1292 /* test esi, esi */ /* 0x35001695: test esi, esi */ 1293 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 1294 _cf = 0; 1295 _flag_k = FK_TEST; 1296 if (TEST_Z(_flag_a, _flag_b)) goto L_350016A1; /* 0x35001697: je 0x350016a1 */ 1297 L_35001699: 1298 edx = MEM32(esi); /* 0x35001699: mov edx, dword ptr [esi] */ 1299 PUSH32(esp, 1); /* 0x3500169B: push 1 */ 1300 ecx = esi; /* 0x3500169D: mov ecx, esi */ 1301 RECOMP_ICALL(MEM32(edx)); /* 0x3500169F: call dword ptr [edx] */ 1302 RECOMP_FLAGS_IN(); 1303 L_350016A1: 1304 esi = POP32_VAL(esp); /* 0x350016A1: pop esi */ 1305 ebp = POP32_VAL(esp); /* 0x350016A2: pop ebp */ 1306 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x350016A3: ret 4 */ 1307 RECOMP_REGS_OUT(); 1308 } 1309 1310 void sub_350016B0(void) { 1311 int _fpu_cmp = 0; 1312 uint32_t _cf = 0; 1313 int _df = 1; 1314 uint32_t _flag_k = FK_NONE; 1315 uint32_t _flag_a = 0, _flag_b = 0; 1316 uint32_t _itail_tgt = 0; 1317 RECOMP_REGS_LOCALS 1318 RECOMP_ENTER(0x350016B0u); 1319 1320 L_350016B0: 1321 PUSH32(esp, ebp); /* 0x350016B0: push ebp */ 1322 ebp = esp; /* 0x350016B1: mov ebp, esp */ 1323 PUSH32(esp, 0xFFFFFFFFu); /* 0x350016B3: push -1 */ 1324 PUSH32(esp, 0x350024B3u); /* 0x350016B5: push 0x350024b3 */ 1325 eax = MEM32(FS_BASE + (0)); /* 0x350016BA: mov eax, dword ptr fs:[0] */ 1326 PUSH32(esp, eax); /* 0x350016C0: push eax */ 1327 MEM32(FS_BASE + (0)) = esp; /* 0x350016C1: mov dword ptr fs:[0], esp */ 1328 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x28u); 1329 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1330 esp = esp - 0x28u; /* 0x350016C8: sub esp, 0x28 */ 1331 _flag_k = FK_CMP; 1332 eax = MEM32(0x350030C8); /* 0x350016CB: mov eax, dword ptr [0x350030c8] */ 1333 PUSH32(esp, ebx); /* 0x350016D0: push ebx */ 1334 MEM32(ebp + (-0x1C)) = ecx; /* 0x350016D1: mov dword ptr [ebp - 0x1c], ecx */ 1335 ecx = MEM32(eax); /* 0x350016D4: mov ecx, dword ptr [eax] */ 1336 edx = MEM32(ecx); /* 0x350016D6: mov edx, dword ptr [ecx] */ 1337 PUSH32(esp, esi); /* 0x350016D8: push esi */ 1338 eax = ebp + (-0x18); /* 0x350016D9: lea eax, [ebp - 0x18] */ 1339 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1340 ebx = 0; /* 0x350016DC: xor ebx, ebx */ 1341 _cf = 0; 1342 _flag_k = FK_TEST; 1343 PUSH32(esp, eax); /* 0x350016DE: push eax */ 1344 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1345 esi = 0; /* 0x350016DF: xor esi, esi */ 1346 _cf = 0; 1347 _flag_k = FK_TEST; 1348 MEM32(ebp + (-0x10)) = ebx; /* 0x350016E1: mov dword ptr [ebp - 0x10], ebx */ 1349 RECOMP_ICALL(MEM32(edx + 0x24)); /* 0x350016E4: call dword ptr [edx + 0x24] */ 1350 RECOMP_FLAGS_IN(); 1351 ecx = ebp + (-0x24); /* 0x350016E7: lea ecx, [ebp - 0x24] */ 1352 /* cmp ecx, eax */ /* 0x350016EA: cmp ecx, eax */ 1353 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 1354 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1355 _flag_k = FK_CMP; 1356 if (CMP_EQ(_flag_a, _flag_b)) goto L_350016F9; /* 0x350016EC: je 0x350016f9 */ 1357 L_350016EE: 1358 edx = MEM32(eax); /* 0x350016EE: mov edx, dword ptr [eax] */ 1359 MEM32(ebp + (-0x24)) = edx; /* 0x350016F0: mov dword ptr [ebp - 0x24], edx */ 1360 eax = MEM32(eax + 0x4); /* 0x350016F3: mov eax, dword ptr [eax + 4] */ 1361 MEM32(ebp + (-0x20)) = eax; /* 0x350016F6: mov dword ptr [ebp - 0x20], eax */ 1362 L_350016F9: 1363 PUSH32(esp, 0x38u); /* 0x350016F9: push 0x38 */ 1364 RECOMP_ICALL(0x350022E0u); /* 0x350016FB: call 0x350022e0 */ /* not lifted */ 1365 RECOMP_FLAGS_IN(); 1366 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1367 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1368 esp = esp + 4; /* 0x35001700: add esp, 4 */ 1369 _flag_k = FK_ADD; 1370 MEM32(ebp + (-0x14)) = eax; /* 0x35001703: mov dword ptr [ebp - 0x14], eax */ 1371 /* cmp eax, esi */ /* 0x35001706: cmp eax, esi */ 1372 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 1373 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1374 _flag_k = FK_CMP; 1375 MEM32(ebp + (-0x4)) = esi; /* 0x35001708: mov dword ptr [ebp - 4], esi */ 1376 if (CMP_EQ(_flag_a, _flag_b)) goto L_3500177F; /* 0x3500170B: je 0x3500177f */ 1377 L_3500170D: 1378 SET_LO8(ecx, MEM8(ebp + 0xF)); /* 0x3500170D: mov cl, byte ptr [ebp + 0xf] */ 1379 MEM8(ebp + (-0x34)) = (uint8_t)(LO8(ecx)); /* 0x35001710: mov byte ptr [ebp - 0x34], cl */ 1380 PUSH32(esp, edi); /* 0x35001713: push edi */ 1381 MEM32(ebp + (-0x30)) = esi; /* 0x35001714: mov dword ptr [ebp - 0x30], esi */ 1382 MEM32(ebp + (-0x2C)) = esi; /* 0x35001717: mov dword ptr [ebp - 0x2c], esi */ 1383 MEM32(ebp + (-0x28)) = esi; /* 0x3500171A: mov dword ptr [ebp - 0x28], esi */ 1384 esi = MEM32(ebp + 0xC); /* 0x3500171D: mov esi, dword ptr [ebp + 0xc] */ 1385 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 1386 ecx = ecx | 0xFFFFFFFFu; /* 0x35001720: or ecx, 0xffffffff */ 1387 _cf = 0; 1388 _flag_k = FK_TEST; 1389 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1390 eax = 0; /* 0x35001723: xor eax, eax */ 1391 _cf = 0; 1392 _flag_k = FK_TEST; 1393 edi = esi; /* 0x35001725: mov edi, esi */ 1394 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x35001727: repne scasb al, byte ptr es:[edi] */ 1395 ecx = ~ecx; /* 0x35001729: not ecx */ 1396 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 1397 ecx = ecx - 1; /* 0x3500172B: dec ecx */ 1398 _flag_k = FK_DEC; 1399 ebx = ecx; /* 0x3500172C: mov ebx, ecx */ 1400 PUSH32(esp, 1); /* 0x3500172E: push 1 */ 1401 PUSH32(esp, ebx); /* 0x35001730: push ebx */ 1402 ecx = ebp + (-0x34); /* 0x35001731: lea ecx, [ebp - 0x34] */ 1403 RECOMP_ICALL(MEM32(0x35003040)); /* 0x35001734: call dword ptr [0x35003040] */ 1404 RECOMP_FLAGS_IN(); 1405 /* test LO8(eax), LO8(eax) */ /* 0x3500173A: test al, al */ 1406 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 1407 _cf = 0; 1408 _flag_k = FK_NARROW(FK_TEST, 24); 1409 if (TEST_Z(_flag_a, _flag_b)) goto L_3500175B; /* 0x3500173C: je 0x3500175b */ 1410 L_3500173E: 1411 edi = MEM32(ebp + (-0x30)); /* 0x3500173E: mov edi, dword ptr [ebp - 0x30] */ 1412 ecx = ebx; /* 0x35001741: mov ecx, ebx */ 1413 edx = ecx; /* 0x35001743: mov edx, ecx */ 1414 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x35001745: shr ecx, 2 */ 1415 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 1416 ecx = ecx >> 2u; /* 0x35001745: shr ecx, 2 */ 1417 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x35001748: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 1418 ecx = edx; /* 0x3500174A: mov ecx, edx */ 1419 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 1420 ecx = ecx & 3; /* 0x3500174C: and ecx, 3 */ 1421 _cf = 0; 1422 _flag_k = FK_TEST; 1423 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x3500174F: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 1424 eax = MEM32(ebp + (-0x30)); /* 0x35001751: mov eax, dword ptr [ebp - 0x30] */ 1425 MEM32(ebp + (-0x2C)) = ebx; /* 0x35001754: mov dword ptr [ebp - 0x2c], ebx */ 1426 MEM8(ebx + eax) = (uint8_t)(0); /* 0x35001757: mov byte ptr [ebx + eax], 0 */ 1427 L_3500175B: 1428 ebx = 1; /* 0x3500175B: mov ebx, 1 */ 1429 MEM32(ebp + (-0x10)) = ebx; /* 0x35001760: mov dword ptr [ebp - 0x10], ebx */ 1430 edx = MEM32(ebp + 0x8); /* 0x35001763: mov edx, dword ptr [ebp + 8] */ 1431 ecx = ebp + (-0x34); /* 0x35001766: lea ecx, [ebp - 0x34] */ 1432 PUSH32(esp, ecx); /* 0x35001769: push ecx */ 1433 ecx = MEM32(ebp + (-0x14)); /* 0x3500176A: mov ecx, dword ptr [ebp - 0x14] */ 1434 PUSH32(esp, edx); /* 0x3500176D: push edx */ 1435 eax = ebp + (-0x24); /* 0x3500176E: lea eax, [ebp - 0x24] */ 1436 PUSH32(esp, eax); /* 0x35001771: push eax */ 1437 MEM8(ebp + (-0x4)) = (uint8_t)(LO8(ebx)); /* 0x35001772: mov byte ptr [ebp - 4], bl */ 1438 RECOMP_ICALL(0x350019C0u); /* 0x35001775: call 0x350019c0 */ /* not lifted */ 1439 RECOMP_FLAGS_IN(); 1440 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1441 esi = 0; /* 0x3500177A: xor esi, esi */ 1442 _cf = 0; 1443 _flag_k = FK_TEST; 1444 edi = POP32_VAL(esp); /* 0x3500177C: pop edi */ 1445 goto L_35001781; /* 0x3500177D: jmp 0x35001781 */ 1446 L_3500177F: 1447 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1448 eax = 0; /* 0x3500177F: xor eax, eax */ 1449 _cf = 0; 1450 _flag_k = FK_TEST; 1451 L_35001781: 1452 ecx = MEM32(ebp + (-0x1C)); /* 0x35001781: mov ecx, dword ptr [ebp - 0x1c] */ 1453 PUSH32(esp, eax); /* 0x35001784: push eax */ 1454 MEM32(ebp + (-0x4)) = 2; /* 0x35001785: mov dword ptr [ebp - 4], 2 */ 1455 RECOMP_ICALL(0x35001680u); /* 0x3500178C: call 0x35001680 */ /* not lifted */ 1456 RECOMP_FLAGS_IN(); 1457 /* test LO8(ebx), 1 */ /* 0x35001791: test bl, 1 */ 1458 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 1459 _cf = 0; 1460 _flag_k = FK_NARROW(FK_TEST, 24); 1461 if (TEST_Z(_flag_a, _flag_b)) goto L_350017C9; /* 0x35001794: je 0x350017c9 */ 1462 L_35001796: 1463 eax = MEM32(ebp + (-0x30)); /* 0x35001796: mov eax, dword ptr [ebp - 0x30] */ 1464 /* cmp eax, esi */ /* 0x35001799: cmp eax, esi */ 1465 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 1466 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1467 _flag_k = FK_CMP; 1468 if (CMP_EQ(_flag_a, _flag_b)) goto L_350017C9; /* 0x3500179B: je 0x350017c9 */ 1469 L_3500179D: 1470 ecx = eax + (-0x1); /* 0x3500179D: lea ecx, [eax - 1] */ 1471 SET_LO8(eax, MEM8(ecx)); /* 0x350017A0: mov al, byte ptr [ecx] */ 1472 /* test LO8(eax), LO8(eax) */ /* 0x350017A2: test al, al */ 1473 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 1474 _cf = 0; 1475 _flag_k = FK_NARROW(FK_TEST, 24); 1476 if (TEST_Z(_flag_a, _flag_b)) goto L_350017C0; /* 0x350017A4: je 0x350017c0 */ 1477 L_350017A6: 1478 /* cmp LO8(eax), 0xFFu */ /* 0x350017A6: cmp al, 0xff */ 1479 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 1480 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1481 _flag_k = FK_NARROW(FK_CMP, 24); 1482 if (CMP_EQ(_flag_a, _flag_b)) goto L_350017C0; /* 0x350017A8: je 0x350017c0 */ 1483 L_350017AA: 1484 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 1485 SET_LO8(eax, LO8(eax) - 1); /* 0x350017AA: dec al */ 1486 _flag_k = FK_NARROW(FK_DEC, 24); 1487 esi = POP32_VAL(esp); /* 0x350017AC: pop esi */ 1488 MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x350017AD: mov byte ptr [ecx], al */ 1489 ebx = POP32_VAL(esp); /* 0x350017AF: pop ebx */ 1490 ecx = MEM32(ebp + (-0xC)); /* 0x350017B0: mov ecx, dword ptr [ebp - 0xc] */ 1491 MEM32(FS_BASE + (0)) = ecx; /* 0x350017B3: mov dword ptr fs:[0], ecx */ 1492 esp = ebp; /* 0x350017BA: mov esp, ebp */ 1493 ebp = POP32_VAL(esp); /* 0x350017BC: pop ebp */ 1494 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x350017BD: ret 8 */ 1495 L_350017C0: 1496 PUSH32(esp, ecx); /* 0x350017C0: push ecx */ 1497 RECOMP_ICALL(0x35002194u); /* 0x350017C1: call 0x35002194 */ /* not lifted */ 1498 RECOMP_FLAGS_IN(); 1499 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1500 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1501 esp = esp + 4; /* 0x350017C6: add esp, 4 */ 1502 _flag_k = FK_ADD; 1503 L_350017C9: 1504 ecx = MEM32(ebp + (-0xC)); /* 0x350017C9: mov ecx, dword ptr [ebp - 0xc] */ 1505 esi = POP32_VAL(esp); /* 0x350017CC: pop esi */ 1506 ebx = POP32_VAL(esp); /* 0x350017CD: pop ebx */ 1507 MEM32(FS_BASE + (0)) = ecx; /* 0x350017CE: mov dword ptr fs:[0], ecx */ 1508 esp = ebp; /* 0x350017D5: mov esp, ebp */ 1509 ebp = POP32_VAL(esp); /* 0x350017D7: pop ebp */ 1510 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x350017D8: ret 8 */ 1511 RECOMP_REGS_OUT(); 1512 } 1513 1514 void sub_350017E0(void) { 1515 int _fpu_cmp = 0; 1516 uint32_t _cf = 0; 1517 int _df = 1; 1518 uint32_t _flag_k = FK_NONE; 1519 uint32_t _flag_a = 0, _flag_b = 0; 1520 uint32_t _itail_tgt = 0; 1521 RECOMP_REGS_LOCALS 1522 RECOMP_ENTER(0x350017E0u); 1523 1524 L_350017E0: 1525 SET_LO8(eax, 1); /* 0x350017E0: mov al, 1 */ 1526 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x350017E2: ret 8 */ 1527 RECOMP_REGS_OUT(); 1528 } 1529 1530 void sub_350017F0(void) { 1531 int _fpu_cmp = 0; 1532 uint32_t _cf = 0; 1533 int _df = 1; 1534 uint32_t _flag_k = FK_NONE; 1535 uint32_t _flag_a = 0, _flag_b = 0; 1536 uint32_t _itail_tgt = 0; 1537 RECOMP_REGS_LOCALS 1538 RECOMP_ENTER(0x350017F0u); 1539 1540 L_350017F0: 1541 SET_LO8(eax, 1); /* 0x350017F0: mov al, 1 */ 1542 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x350017F2: ret 0x10 */ 1543 RECOMP_REGS_OUT(); 1544 } 1545 1546 void sub_35001800(void) { 1547 int _fpu_cmp = 0; 1548 uint32_t _cf = 0; 1549 int _df = 1; 1550 uint32_t _flag_k = FK_NONE; 1551 uint32_t _flag_a = 0, _flag_b = 0; 1552 uint32_t _itail_tgt = 0; 1553 RECOMP_REGS_LOCALS 1554 RECOMP_ENTER(0x35001800u); 1555 1556 L_35001800: 1557 SET_LO8(eax, 1); /* 0x35001800: mov al, 1 */ 1558 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35001802: ret 4 */ 1559 RECOMP_REGS_OUT(); 1560 } 1561 1562 void sub_35001810(void) { 1563 int _fpu_cmp = 0; 1564 uint32_t _cf = 0; 1565 int _df = 1; 1566 uint32_t _flag_k = FK_NONE; 1567 uint32_t _flag_a = 0, _flag_b = 0; 1568 uint32_t _itail_tgt = 0; 1569 RECOMP_REGS_LOCALS 1570 RECOMP_ENTER(0x35001810u); 1571 1572 L_35001810: 1573 RECOMP_ICALL(0x35001820u); /* 0x35001810: call 0x35001820 */ /* not lifted */ 1574 RECOMP_FLAGS_IN(); 1575 goto L_35001830; /* 0x35001815: jmp 0x35001830 */ 1576 L_35001830: 1577 PUSH32(esp, 0x35001840u); /* 0x35001830: push 0x35001840 */ 1578 RECOMP_ICALL(0x350022BAu); /* 0x35001835: call 0x350022ba */ /* not lifted */ 1579 RECOMP_FLAGS_IN(); 1580 ecx = POP32_VAL(esp); /* 0x3500183A: pop ecx */ 1581 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3500183B: ret */ 1582 RECOMP_REGS_OUT(); 1583 } 1584 1585 void sub_35001820(void) { 1586 int _fpu_cmp = 0; 1587 uint32_t _cf = 0; 1588 int _df = 1; 1589 uint32_t _flag_k = FK_NONE; 1590 uint32_t _flag_a = 0, _flag_b = 0; 1591 uint32_t _itail_tgt = 0; 1592 RECOMP_REGS_LOCALS 1593 RECOMP_ENTER(0x35001820u); 1594 1595 L_35001820: 1596 ecx = 0x35005175u; /* 0x35001820: mov ecx, 0x35005175 */ 1597 L_35001825: 1598 { _itail_tgt = (uint32_t)(MEM32(0x35003024)); goto _ljump; } 1599 { RECOMP_REGS_OUT(); return; } /* end of function */ 1600 _ljump: 1601 switch (_itail_tgt) { 1602 case 0x35001820u: goto L_35001820; 1603 case 0x35001825u: goto L_35001825; 1604 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1605 } 1606 RECOMP_REGS_OUT(); 1607 } 1608 1609 void sub_35001830(void) { 1610 int _fpu_cmp = 0; 1611 uint32_t _cf = 0; 1612 int _df = 1; 1613 uint32_t _flag_k = FK_NONE; 1614 uint32_t _flag_a = 0, _flag_b = 0; 1615 uint32_t _itail_tgt = 0; 1616 RECOMP_REGS_LOCALS 1617 RECOMP_ENTER(0x35001830u); 1618 1619 L_35001830: 1620 PUSH32(esp, 0x35001840u); /* 0x35001830: push 0x35001840 */ 1621 RECOMP_ICALL(0x350022BAu); /* 0x35001835: call 0x350022ba */ /* not lifted */ 1622 RECOMP_FLAGS_IN(); 1623 ecx = POP32_VAL(esp); /* 0x3500183A: pop ecx */ 1624 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3500183B: ret */ 1625 RECOMP_REGS_OUT(); 1626 } 1627 1628 void sub_35001840(void) { 1629 int _fpu_cmp = 0; 1630 uint32_t _cf = 0; 1631 int _df = 1; 1632 uint32_t _flag_k = FK_NONE; 1633 uint32_t _flag_a = 0, _flag_b = 0; 1634 uint32_t _itail_tgt = 0; 1635 RECOMP_REGS_LOCALS 1636 RECOMP_ENTER(0x35001840u); 1637 1638 L_35001840: 1639 ecx = 0x35005175u; /* 0x35001840: mov ecx, 0x35005175 */ 1640 L_35001845: 1641 { _itail_tgt = (uint32_t)(MEM32(0x3500304C)); goto _ljump; } 1642 { RECOMP_REGS_OUT(); return; } /* end of function */ 1643 _ljump: 1644 switch (_itail_tgt) { 1645 case 0x35001840u: goto L_35001840; 1646 case 0x35001845u: goto L_35001845; 1647 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1648 } 1649 RECOMP_REGS_OUT(); 1650 } 1651 1652 void sub_35001850(void) { 1653 int _fpu_cmp = 0; 1654 uint32_t _cf = 0; 1655 int _df = 1; 1656 uint32_t _flag_k = FK_NONE; 1657 uint32_t _flag_a = 0, _flag_b = 0; 1658 uint32_t _itail_tgt = 0; 1659 RECOMP_REGS_LOCALS 1660 RECOMP_ENTER(0x35001850u); 1661 1662 L_35001850: 1663 RECOMP_ICALL(0x35001860u); /* 0x35001850: call 0x35001860 */ /* not lifted */ 1664 RECOMP_FLAGS_IN(); 1665 goto L_35001870; /* 0x35001855: jmp 0x35001870 */ 1666 L_35001870: 1667 PUSH32(esp, 0x35001880u); /* 0x35001870: push 0x35001880 */ 1668 RECOMP_ICALL(0x350022BAu); /* 0x35001875: call 0x350022ba */ /* not lifted */ 1669 RECOMP_FLAGS_IN(); 1670 ecx = POP32_VAL(esp); /* 0x3500187A: pop ecx */ 1671 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3500187B: ret */ 1672 RECOMP_REGS_OUT(); 1673 } 1674 1675 void sub_35001860(void) { 1676 int _fpu_cmp = 0; 1677 uint32_t _cf = 0; 1678 int _df = 1; 1679 uint32_t _flag_k = FK_NONE; 1680 uint32_t _flag_a = 0, _flag_b = 0; 1681 uint32_t _itail_tgt = 0; 1682 RECOMP_REGS_LOCALS 1683 RECOMP_ENTER(0x35001860u); 1684 1685 L_35001860: 1686 ecx = 0x35005174u; /* 0x35001860: mov ecx, 0x35005174 */ 1687 L_35001865: 1688 { _itail_tgt = (uint32_t)(MEM32(0x35003048)); goto _ljump; } 1689 { RECOMP_REGS_OUT(); return; } /* end of function */ 1690 _ljump: 1691 switch (_itail_tgt) { 1692 case 0x35001860u: goto L_35001860; 1693 case 0x35001865u: goto L_35001865; 1694 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1695 } 1696 RECOMP_REGS_OUT(); 1697 } 1698 1699 void sub_35001870(void) { 1700 int _fpu_cmp = 0; 1701 uint32_t _cf = 0; 1702 int _df = 1; 1703 uint32_t _flag_k = FK_NONE; 1704 uint32_t _flag_a = 0, _flag_b = 0; 1705 uint32_t _itail_tgt = 0; 1706 RECOMP_REGS_LOCALS 1707 RECOMP_ENTER(0x35001870u); 1708 1709 L_35001870: 1710 PUSH32(esp, 0x35001880u); /* 0x35001870: push 0x35001880 */ 1711 RECOMP_ICALL(0x350022BAu); /* 0x35001875: call 0x350022ba */ /* not lifted */ 1712 RECOMP_FLAGS_IN(); 1713 ecx = POP32_VAL(esp); /* 0x3500187A: pop ecx */ 1714 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3500187B: ret */ 1715 RECOMP_REGS_OUT(); 1716 } 1717 1718 void sub_35001880(void) { 1719 int _fpu_cmp = 0; 1720 uint32_t _cf = 0; 1721 int _df = 1; 1722 uint32_t _flag_k = FK_NONE; 1723 uint32_t _flag_a = 0, _flag_b = 0; 1724 uint32_t _itail_tgt = 0; 1725 RECOMP_REGS_LOCALS 1726 RECOMP_ENTER(0x35001880u); 1727 1728 L_35001880: 1729 ecx = 0x35005174u; /* 0x35001880: mov ecx, 0x35005174 */ 1730 L_35001885: 1731 { _itail_tgt = (uint32_t)(MEM32(0x35003044)); goto _ljump; } 1732 { RECOMP_REGS_OUT(); return; } /* end of function */ 1733 _ljump: 1734 switch (_itail_tgt) { 1735 case 0x35001880u: goto L_35001880; 1736 case 0x35001885u: goto L_35001885; 1737 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1738 } 1739 RECOMP_REGS_OUT(); 1740 } 1741 1742 void sub_35001890(void) { 1743 int _fpu_cmp = 0; 1744 uint32_t _cf = 0; 1745 int _df = 1; 1746 uint32_t _flag_k = FK_NONE; 1747 uint32_t _flag_a = 0, _flag_b = 0; 1748 uint32_t _itail_tgt = 0; 1749 RECOMP_REGS_LOCALS 1750 RECOMP_ENTER(0x35001890u); 1751 1752 L_35001890: 1753 PUSH32(esp, esi); /* 0x35001890: push esi */ 1754 esi = ecx; /* 0x35001891: mov esi, ecx */ 1755 RECOMP_ICALL(MEM32(0x350030E0)); /* 0x35001893: call dword ptr [0x350030e0] */ 1756 RECOMP_FLAGS_IN(); 1757 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1758 eax = 0; /* 0x35001899: xor eax, eax */ 1759 _cf = 0; 1760 _flag_k = FK_TEST; 1761 MEM32(esi + 0x20) = eax; /* 0x3500189B: mov dword ptr [esi + 0x20], eax */ 1762 MEM32(esi + 0x24) = eax; /* 0x3500189E: mov dword ptr [esi + 0x24], eax */ 1763 MEM8(esi + 0xC) = (uint8_t)(LO8(eax)); /* 0x350018A1: mov byte ptr [esi + 0xc], al */ 1764 MEM32(esi) = 0x3500311Cu; /* 0x350018A4: mov dword ptr [esi], 0x3500311c */ 1765 eax = esi; /* 0x350018AA: mov eax, esi */ 1766 esi = POP32_VAL(esp); /* 0x350018AC: pop esi */ 1767 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x350018AD: ret */ 1768 RECOMP_REGS_OUT(); 1769 } 1770 1771 void sub_350018B0(void) { 1772 int _fpu_cmp = 0; 1773 uint32_t _cf = 0; 1774 int _df = 1; 1775 uint32_t _flag_k = FK_NONE; 1776 uint32_t _flag_a = 0, _flag_b = 0; 1777 uint32_t _itail_tgt = 0; 1778 RECOMP_REGS_LOCALS 1779 RECOMP_ENTER(0x350018B0u); 1780 1781 L_350018B0: 1782 PUSH32(esp, ebp); /* 0x350018B0: push ebp */ 1783 ebp = esp; /* 0x350018B1: mov ebp, esp */ 1784 eax = MEM32(ebp + 0x8); /* 0x350018B3: mov eax, dword ptr [ebp + 8] */ 1785 PUSH32(esp, esi); /* 0x350018B6: push esi */ 1786 esi = ecx; /* 0x350018B7: mov esi, ecx */ 1787 ecx = MEM32(ebp + 0xC); /* 0x350018B9: mov ecx, dword ptr [ebp + 0xc] */ 1788 PUSH32(esp, eax); /* 0x350018BC: push eax */ 1789 PUSH32(esp, ecx); /* 0x350018BD: push ecx */ 1790 ecx = esi; /* 0x350018BE: mov ecx, esi */ 1791 RECOMP_ICALL(MEM32(0x350030B4)); /* 0x350018C0: call dword ptr [0x350030b4] */ 1792 RECOMP_FLAGS_IN(); 1793 ecx = MEM32(ebp + 0x10); /* 0x350018C6: mov ecx, dword ptr [ebp + 0x10] */ 1794 eax = esi + 0x20; /* 0x350018C9: lea eax, [esi + 0x20] */ 1795 /* cmp eax, ecx */ /* 0x350018CC: cmp eax, ecx */ 1796 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 1797 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1798 _flag_k = FK_CMP; 1799 if (CMP_EQ(_flag_a, _flag_b)) goto L_350018DA; /* 0x350018CE: je 0x350018da */ 1800 L_350018D0: 1801 edx = MEM32(ecx); /* 0x350018D0: mov edx, dword ptr [ecx] */ 1802 MEM32(eax) = edx; /* 0x350018D2: mov dword ptr [eax], edx */ 1803 ecx = MEM32(ecx + 0x4); /* 0x350018D4: mov ecx, dword ptr [ecx + 4] */ 1804 MEM32(eax + 0x4) = ecx; /* 0x350018D7: mov dword ptr [eax + 4], ecx */ 1805 L_350018DA: 1806 MEM32(esi) = 0x3500311Cu; /* 0x350018DA: mov dword ptr [esi], 0x3500311c */ 1807 MEM8(esi + 0xC) = (uint8_t)(0); /* 0x350018E0: mov byte ptr [esi + 0xc], 0 */ 1808 eax = esi; /* 0x350018E4: mov eax, esi */ 1809 esi = POP32_VAL(esp); /* 0x350018E6: pop esi */ 1810 ebp = POP32_VAL(esp); /* 0x350018E7: pop ebp */ 1811 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x350018E8: ret 0xc */ 1812 RECOMP_REGS_OUT(); 1813 } 1814 1815 void sub_350018F0(void) { 1816 int _fpu_cmp = 0; 1817 uint32_t _cf = 0; 1818 int _df = 1; 1819 uint32_t _flag_k = FK_NONE; 1820 uint32_t _flag_a = 0, _flag_b = 0; 1821 uint32_t _itail_tgt = 0; 1822 RECOMP_REGS_LOCALS 1823 RECOMP_ENTER(0x350018F0u); 1824 1825 L_350018F0: 1826 MEM32(ecx) = 0x3500311Cu; /* 0x350018F0: mov dword ptr [ecx], 0x3500311c */ 1827 L_350018F6: 1828 { _itail_tgt = (uint32_t)(MEM32(0x350030B8)); goto _ljump; } 1829 { RECOMP_REGS_OUT(); return; } /* end of function */ 1830 _ljump: 1831 switch (_itail_tgt) { 1832 case 0x350018F0u: goto L_350018F0; 1833 case 0x350018F6u: goto L_350018F6; 1834 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1835 } 1836 RECOMP_REGS_OUT(); 1837 } 1838 1839 void sub_35001900(void) { 1840 int _fpu_cmp = 0; 1841 uint32_t _cf = 0; 1842 int _df = 1; 1843 uint32_t _flag_k = FK_NONE; 1844 uint32_t _flag_a = 0, _flag_b = 0; 1845 uint32_t _itail_tgt = 0; 1846 RECOMP_REGS_LOCALS 1847 RECOMP_ENTER(0x35001900u); 1848 1849 L_35001900: 1850 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 1851 SET_LO8(eax, 0); /* 0x35001900: xor al, al */ 1852 _cf = 0; 1853 _flag_k = FK_NARROW(FK_TEST, 24); 1854 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35001902: ret 4 */ 1855 RECOMP_REGS_OUT(); 1856 } 1857 1858 void sub_35001910(void) { 1859 int _fpu_cmp = 0; 1860 uint32_t _cf = 0; 1861 int _df = 1; 1862 uint32_t _flag_k = FK_NONE; 1863 uint32_t _flag_a = 0, _flag_b = 0; 1864 uint32_t _itail_tgt = 0; 1865 RECOMP_REGS_LOCALS 1866 RECOMP_ENTER(0x35001910u); 1867 1868 L_35001910: 1869 RECOMP_ICALL(MEM32(0x350030CC)); /* 0x35001910: call dword ptr [0x350030cc] */ 1870 RECOMP_FLAGS_IN(); 1871 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1872 eax = 0; /* 0x35001916: xor eax, eax */ 1873 _cf = 0; 1874 _flag_k = FK_TEST; 1875 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001918: ret */ 1876 RECOMP_REGS_OUT(); 1877 } 1878 1879 void sub_35001920(void) { 1880 int _fpu_cmp = 0; 1881 uint32_t _cf = 0; 1882 int _df = 1; 1883 uint32_t _flag_k = FK_NONE; 1884 uint32_t _flag_a = 0, _flag_b = 0; 1885 uint32_t _itail_tgt = 0; 1886 RECOMP_REGS_LOCALS 1887 RECOMP_ENTER(0x35001920u); 1888 1889 L_35001920: 1890 PUSH32(esp, ebp); /* 0x35001920: push ebp */ 1891 ebp = esp; /* 0x35001921: mov ebp, esp */ 1892 PUSH32(esp, ebx); /* 0x35001923: push ebx */ 1893 ebx = MEM32(ebp + 0x8); /* 0x35001924: mov ebx, dword ptr [ebp + 8] */ 1894 PUSH32(esp, esi); /* 0x35001927: push esi */ 1895 PUSH32(esp, edi); /* 0x35001928: push edi */ 1896 edi = ecx; /* 0x35001929: mov edi, ecx */ 1897 esi = edi + 0x20; /* 0x3500192B: lea esi, [edi + 0x20] */ 1898 PUSH32(esp, esi); /* 0x3500192E: push esi */ 1899 PUSH32(esp, ebx); /* 0x3500192F: push ebx */ 1900 RECOMP_ICALL(0x350020B0u); /* 0x35001930: call 0x350020b0 */ /* not lifted */ 1901 RECOMP_FLAGS_IN(); 1902 eax = MEM32(esi); /* 0x35001935: mov eax, dword ptr [esi] */ 1903 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 1904 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1905 esp = esp + 8; /* 0x35001937: add esp, 8 */ 1906 _flag_k = FK_ADD; 1907 /* test eax, eax */ /* 0x3500193A: test eax, eax */ 1908 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1909 _cf = 0; 1910 _flag_k = FK_TEST; 1911 if (TEST_NZ(_flag_a, _flag_b)) goto L_35001957; /* 0x3500193C: jne 0x35001957 */ 1912 L_3500193E: 1913 eax = MEM32(esi + 0x4); /* 0x3500193E: mov eax, dword ptr [esi + 4] */ 1914 /* test eax, eax */ /* 0x35001941: test eax, eax */ 1915 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1916 _cf = 0; 1917 _flag_k = FK_TEST; 1918 if (TEST_NZ(_flag_a, _flag_b)) goto L_35001957; /* 0x35001943: jne 0x35001957 */ 1919 L_35001945: 1920 ecx = edi; /* 0x35001945: mov ecx, edi */ 1921 RECOMP_ICALL(MEM32(0x350030D0)); /* 0x35001947: call dword ptr [0x350030d0] */ 1922 RECOMP_FLAGS_IN(); 1923 ecx = MEM32(eax); /* 0x3500194D: mov ecx, dword ptr [eax] */ 1924 MEM32(esi) = ecx; /* 0x3500194F: mov dword ptr [esi], ecx */ 1925 edx = MEM32(eax + 0x4); /* 0x35001951: mov edx, dword ptr [eax + 4] */ 1926 MEM32(esi + 0x4) = edx; /* 0x35001954: mov dword ptr [esi + 4], edx */ 1927 L_35001957: 1928 ecx = ebx; /* 0x35001957: mov ecx, ebx */ 1929 RECOMP_ICALL(MEM32(0x35003090)); /* 0x35001959: call dword ptr [0x35003090] */ 1930 RECOMP_FLAGS_IN(); 1931 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(eax); 1932 _cf = (eax) != 0; 1933 eax = (uint32_t)(-(int32_t)eax); /* 0x3500195F: neg eax */ 1934 _flag_k = FK_CMP; 1935 edi = POP32_VAL(esp); /* 0x35001961: pop edi */ 1936 { uint32_t _sa = eax, _sb = eax, _sc = _cf; /* 0x35001962: sbb eax, eax */ 1937 eax = _sc ? 0xFFFFFFFFu : 0; 1938 _flag_a = recomp_flags_sbb(_sa, _sb, _sc); _flag_b = 0; 1939 _flag_k = FK_EFLAGS; _cf = _flag_a & 1u; } 1940 esi = POP32_VAL(esp); /* 0x35001964: pop esi */ 1941 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 1942 eax = eax + 1; /* 0x35001965: inc eax */ 1943 _flag_k = FK_INC; 1944 ebx = POP32_VAL(esp); /* 0x35001966: pop ebx */ 1945 ebp = POP32_VAL(esp); /* 0x35001967: pop ebp */ 1946 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35001968: ret 4 */ 1947 RECOMP_REGS_OUT(); 1948 } 1949 1950 void sub_35001970(void) { 1951 int _fpu_cmp = 0; 1952 uint32_t _cf = 0; 1953 int _df = 1; 1954 uint32_t _flag_k = FK_NONE; 1955 uint32_t _flag_a = 0, _flag_b = 0; 1956 uint32_t _itail_tgt = 0; 1957 RECOMP_REGS_LOCALS 1958 RECOMP_ENTER(0x35001970u); 1959 1960 L_35001970: 1961 PUSH32(esp, ebp); /* 0x35001970: push ebp */ 1962 ebp = esp; /* 0x35001971: mov ebp, esp */ 1963 eax = MEM32(ebp + 0x8); /* 0x35001973: mov eax, dword ptr [ebp + 8] */ 1964 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x20u); 1965 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1966 ecx = ecx + 0x20u; /* 0x35001976: add ecx, 0x20 */ 1967 _flag_k = FK_ADD; 1968 PUSH32(esp, ecx); /* 0x35001979: push ecx */ 1969 PUSH32(esp, eax); /* 0x3500197A: push eax */ 1970 RECOMP_ICALL(0x35002080u); /* 0x3500197B: call 0x35002080 */ /* not lifted */ 1971 RECOMP_FLAGS_IN(); 1972 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 1973 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1974 esp = esp + 8; /* 0x35001980: add esp, 8 */ 1975 _flag_k = FK_ADD; 1976 ebp = POP32_VAL(esp); /* 0x35001983: pop ebp */ 1977 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35001984: ret 4 */ 1978 RECOMP_REGS_OUT(); 1979 } 1980 1981 void sub_35001990(void) { 1982 int _fpu_cmp = 0; 1983 uint32_t _cf = 0; 1984 int _df = 1; 1985 uint32_t _flag_k = FK_NONE; 1986 uint32_t _flag_a = 0, _flag_b = 0; 1987 uint32_t _itail_tgt = 0; 1988 RECOMP_REGS_LOCALS 1989 RECOMP_ENTER(0x35001990u); 1990 1991 L_35001990: 1992 PUSH32(esp, ebp); /* 0x35001990: push ebp */ 1993 ebp = esp; /* 0x35001991: mov ebp, esp */ 1994 PUSH32(esp, ecx); /* 0x35001993: push ecx */ 1995 PUSH32(esp, esi); /* 0x35001994: push esi */ 1996 esi = ecx; /* 0x35001995: mov esi, ecx */ 1997 RECOMP_ICALL(0x35001890u); /* 0x35001997: call 0x35001890 */ /* not lifted */ 1998 RECOMP_FLAGS_IN(); 1999 SET_LO8(eax, MEM8(ebp + (-0x1))); /* 0x3500199C: mov al, byte ptr [ebp - 1] */ 2000 MEM8(esi + 0x28) = (uint8_t)(LO8(eax)); /* 0x3500199F: mov byte ptr [esi + 0x28], al */ 2001 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2002 eax = 0; /* 0x350019A2: xor eax, eax */ 2003 _cf = 0; 2004 _flag_k = FK_TEST; 2005 MEM32(esi + 0x2C) = eax; /* 0x350019A4: mov dword ptr [esi + 0x2c], eax */ 2006 MEM32(esi + 0x30) = eax; /* 0x350019A7: mov dword ptr [esi + 0x30], eax */ 2007 MEM32(esi + 0x34) = eax; /* 0x350019AA: mov dword ptr [esi + 0x34], eax */ 2008 MEM32(esi) = 0x35003144u; /* 0x350019AD: mov dword ptr [esi], 0x35003144 */ 2009 eax = esi; /* 0x350019B3: mov eax, esi */ 2010 esi = POP32_VAL(esp); /* 0x350019B5: pop esi */ 2011 esp = ebp; /* 0x350019B6: mov esp, ebp */ 2012 ebp = POP32_VAL(esp); /* 0x350019B8: pop ebp */ 2013 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x350019B9: ret */ 2014 RECOMP_REGS_OUT(); 2015 } 2016 2017 void sub_350019C0(void) { 2018 int _fpu_cmp = 0; 2019 uint32_t _cf = 0; 2020 int _df = 1; 2021 uint32_t _flag_k = FK_NONE; 2022 uint32_t _flag_a = 0, _flag_b = 0; 2023 uint32_t _itail_tgt = 0; 2024 RECOMP_REGS_LOCALS 2025 RECOMP_ENTER(0x350019C0u); 2026 2027 L_350019C0: 2028 PUSH32(esp, ebp); /* 0x350019C0: push ebp */ 2029 ebp = esp; /* 0x350019C1: mov ebp, esp */ 2030 PUSH32(esp, 0xFFFFFFFFu); /* 0x350019C3: push -1 */ 2031 PUSH32(esp, 0x350024D1u); /* 0x350019C5: push 0x350024d1 */ 2032 eax = MEM32(FS_BASE + (0)); /* 0x350019CA: mov eax, dword ptr fs:[0] */ 2033 PUSH32(esp, eax); /* 0x350019D0: push eax */ 2034 MEM32(FS_BASE + (0)) = esp; /* 0x350019D1: mov dword ptr fs:[0], esp */ 2035 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 2036 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2037 esp = esp - 0x14u; /* 0x350019D8: sub esp, 0x14 */ 2038 _flag_k = FK_CMP; 2039 SET_LO8(eax, MEM8(ebp + 0xF)); /* 0x350019DB: mov al, byte ptr [ebp + 0xf] */ 2040 PUSH32(esp, ebx); /* 0x350019DE: push ebx */ 2041 PUSH32(esp, esi); /* 0x350019DF: push esi */ 2042 MEM32(ebp + (-0x10)) = ecx; /* 0x350019E0: mov dword ptr [ebp - 0x10], ecx */ 2043 PUSH32(esp, edi); /* 0x350019E3: push edi */ 2044 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 2045 ecx = ecx | 0xFFFFFFFFu; /* 0x350019E4: or ecx, 0xffffffff */ 2046 _cf = 0; 2047 _flag_k = FK_TEST; 2048 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2049 esi = 0; /* 0x350019E7: xor esi, esi */ 2050 _cf = 0; 2051 _flag_k = FK_TEST; 2052 MEM8(ebp + (-0x20)) = (uint8_t)(LO8(eax)); /* 0x350019E9: mov byte ptr [ebp - 0x20], al */ 2053 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2054 eax = 0; /* 0x350019EC: xor eax, eax */ 2055 _cf = 0; 2056 _flag_k = FK_TEST; 2057 edi = 0x35005114u; /* 0x350019EE: mov edi, 0x35005114 */ 2058 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x350019F3: repne scasb al, byte ptr es:[edi] */ 2059 ecx = ~ecx; /* 0x350019F5: not ecx */ 2060 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 2061 ecx = ecx - 1; /* 0x350019F7: dec ecx */ 2062 _flag_k = FK_DEC; 2063 ebx = ecx; /* 0x350019F8: mov ebx, ecx */ 2064 PUSH32(esp, 1); /* 0x350019FA: push 1 */ 2065 PUSH32(esp, ebx); /* 0x350019FC: push ebx */ 2066 ecx = ebp + (-0x20); /* 0x350019FD: lea ecx, [ebp - 0x20] */ 2067 MEM32(ebp + (-0x1C)) = esi; /* 0x35001A00: mov dword ptr [ebp - 0x1c], esi */ 2068 MEM32(ebp + (-0x18)) = esi; /* 0x35001A03: mov dword ptr [ebp - 0x18], esi */ 2069 MEM32(ebp + (-0x14)) = esi; /* 0x35001A06: mov dword ptr [ebp - 0x14], esi */ 2070 RECOMP_ICALL(MEM32(0x35003040)); /* 0x35001A09: call dword ptr [0x35003040] */ 2071 RECOMP_FLAGS_IN(); 2072 /* test LO8(eax), LO8(eax) */ /* 0x35001A0F: test al, al */ 2073 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2074 _cf = 0; 2075 _flag_k = FK_NARROW(FK_TEST, 24); 2076 if (TEST_Z(_flag_a, _flag_b)) goto L_35001A37; /* 0x35001A11: je 0x35001a37 */ 2077 L_35001A13: 2078 edi = MEM32(ebp + (-0x1C)); /* 0x35001A13: mov edi, dword ptr [ebp - 0x1c] */ 2079 ecx = ebx; /* 0x35001A16: mov ecx, ebx */ 2080 edx = ecx; /* 0x35001A18: mov edx, ecx */ 2081 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x35001A1A: shr ecx, 2 */ 2082 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2083 ecx = ecx >> 2u; /* 0x35001A1A: shr ecx, 2 */ 2084 esi = 0x35005114u; /* 0x35001A1D: mov esi, 0x35005114 */ 2085 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x35001A22: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 2086 ecx = edx; /* 0x35001A24: mov ecx, edx */ 2087 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 2088 ecx = ecx & 3; /* 0x35001A26: and ecx, 3 */ 2089 _cf = 0; 2090 _flag_k = FK_TEST; 2091 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x35001A29: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 2092 eax = MEM32(ebp + (-0x1C)); /* 0x35001A2B: mov eax, dword ptr [ebp - 0x1c] */ 2093 MEM32(ebp + (-0x18)) = ebx; /* 0x35001A2E: mov dword ptr [ebp - 0x18], ebx */ 2094 MEM8(ebx + eax) = (uint8_t)(0); /* 0x35001A31: mov byte ptr [ebx + eax], 0 */ 2095 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2096 esi = 0; /* 0x35001A35: xor esi, esi */ 2097 _cf = 0; 2098 _flag_k = FK_TEST; 2099 L_35001A37: 2100 ecx = MEM32(ebp + 0xC); /* 0x35001A37: mov ecx, dword ptr [ebp + 0xc] */ 2101 edx = MEM32(ebp + 0x8); /* 0x35001A3A: mov edx, dword ptr [ebp + 8] */ 2102 edi = MEM32(ebp + (-0x10)); /* 0x35001A3D: mov edi, dword ptr [ebp - 0x10] */ 2103 PUSH32(esp, ecx); /* 0x35001A40: push ecx */ 2104 PUSH32(esp, edx); /* 0x35001A41: push edx */ 2105 eax = ebp + (-0x20); /* 0x35001A42: lea eax, [ebp - 0x20] */ 2106 PUSH32(esp, eax); /* 0x35001A45: push eax */ 2107 ecx = edi; /* 0x35001A46: mov ecx, edi */ 2108 MEM32(ebp + (-0x4)) = esi; /* 0x35001A48: mov dword ptr [ebp - 4], esi */ 2109 RECOMP_ICALL(0x350018B0u); /* 0x35001A4B: call 0x350018b0 */ /* not lifted */ 2110 RECOMP_FLAGS_IN(); 2111 eax = MEM32(ebp + (-0x1C)); /* 0x35001A50: mov eax, dword ptr [ebp - 0x1c] */ 2112 /* cmp eax, esi */ /* 0x35001A53: cmp eax, esi */ 2113 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 2114 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2115 _flag_k = FK_CMP; 2116 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x35001A55: mov byte ptr [ebp - 4], 2 */ 2117 if (CMP_EQ(_flag_a, _flag_b)) goto L_35001A77; /* 0x35001A59: je 0x35001a77 */ 2118 L_35001A5B: 2119 ecx = eax + (-0x1); /* 0x35001A5B: lea ecx, [eax - 1] */ 2120 SET_LO8(eax, MEM8(ecx)); /* 0x35001A5E: mov al, byte ptr [ecx] */ 2121 /* test LO8(eax), LO8(eax) */ /* 0x35001A60: test al, al */ 2122 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2123 _cf = 0; 2124 _flag_k = FK_NARROW(FK_TEST, 24); 2125 if (TEST_Z(_flag_a, _flag_b)) goto L_35001A6E; /* 0x35001A62: je 0x35001a6e */ 2126 L_35001A64: 2127 /* cmp LO8(eax), 0xFFu */ /* 0x35001A64: cmp al, 0xff */ 2128 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 2129 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2130 _flag_k = FK_NARROW(FK_CMP, 24); 2131 if (CMP_EQ(_flag_a, _flag_b)) goto L_35001A6E; /* 0x35001A66: je 0x35001a6e */ 2132 L_35001A68: 2133 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 2134 SET_LO8(eax, LO8(eax) - 1); /* 0x35001A68: dec al */ 2135 _flag_k = FK_NARROW(FK_DEC, 24); 2136 MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x35001A6A: mov byte ptr [ecx], al */ 2137 goto L_35001A77; /* 0x35001A6C: jmp 0x35001a77 */ 2138 L_35001A6E: 2139 PUSH32(esp, ecx); /* 0x35001A6E: push ecx */ 2140 RECOMP_ICALL(0x35002194u); /* 0x35001A6F: call 0x35002194 */ /* not lifted */ 2141 RECOMP_FLAGS_IN(); 2142 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2143 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2144 esp = esp + 4; /* 0x35001A74: add esp, 4 */ 2145 _flag_k = FK_ADD; 2146 L_35001A77: 2147 eax = MEM32(ebp + 0x10); /* 0x35001A77: mov eax, dword ptr [ebp + 0x10] */ 2148 SET_LO8(edx, MEM8(eax)); /* 0x35001A7A: mov dl, byte ptr [eax] */ 2149 ecx = edi + 0x28; /* 0x35001A7C: lea ecx, [edi + 0x28] */ 2150 MEM8(ecx) = (uint8_t)(LO8(edx)); /* 0x35001A7F: mov byte ptr [ecx], dl */ 2151 MEM32(ecx + 0x4) = esi; /* 0x35001A81: mov dword ptr [ecx + 4], esi */ 2152 MEM32(ecx + 0x8) = esi; /* 0x35001A84: mov dword ptr [ecx + 8], esi */ 2153 MEM32(ecx + 0xC) = esi; /* 0x35001A87: mov dword ptr [ecx + 0xc], esi */ 2154 edx = MEM32(0x35003030); /* 0x35001A8A: mov edx, dword ptr [0x35003030] */ 2155 edx = MEM32(edx); /* 0x35001A90: mov edx, dword ptr [edx] */ 2156 PUSH32(esp, edx); /* 0x35001A92: push edx */ 2157 PUSH32(esp, esi); /* 0x35001A93: push esi */ 2158 PUSH32(esp, eax); /* 0x35001A94: push eax */ 2159 MEM32(ebp + (-0x1C)) = esi; /* 0x35001A95: mov dword ptr [ebp - 0x1c], esi */ 2160 MEM32(ebp + (-0x18)) = esi; /* 0x35001A98: mov dword ptr [ebp - 0x18], esi */ 2161 MEM32(ebp + (-0x14)) = esi; /* 0x35001A9B: mov dword ptr [ebp - 0x14], esi */ 2162 RECOMP_ICALL(MEM32(0x3500301C)); /* 0x35001A9E: call dword ptr [0x3500301c] */ 2163 RECOMP_FLAGS_IN(); 2164 ecx = MEM32(ebp + (-0xC)); /* 0x35001AA4: mov ecx, dword ptr [ebp - 0xc] */ 2165 MEM32(edi) = 0x35003144u; /* 0x35001AA7: mov dword ptr [edi], 0x35003144 */ 2166 eax = edi; /* 0x35001AAD: mov eax, edi */ 2167 edi = POP32_VAL(esp); /* 0x35001AAF: pop edi */ 2168 esi = POP32_VAL(esp); /* 0x35001AB0: pop esi */ 2169 ebx = POP32_VAL(esp); /* 0x35001AB1: pop ebx */ 2170 MEM32(FS_BASE + (0)) = ecx; /* 0x35001AB2: mov dword ptr fs:[0], ecx */ 2171 esp = ebp; /* 0x35001AB9: mov esp, ebp */ 2172 ebp = POP32_VAL(esp); /* 0x35001ABB: pop ebp */ 2173 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x35001ABC: ret 0xc */ 2174 RECOMP_REGS_OUT(); 2175 } 2176 2177 void sub_35001AC0(void) { 2178 int _fpu_cmp = 0; 2179 uint32_t _cf = 0; 2180 int _df = 1; 2181 uint32_t _flag_k = FK_NONE; 2182 uint32_t _flag_a = 0, _flag_b = 0; 2183 uint32_t _itail_tgt = 0; 2184 RECOMP_REGS_LOCALS 2185 RECOMP_ENTER(0x35001AC0u); 2186 2187 L_35001AC0: 2188 PUSH32(esp, ebp); /* 0x35001AC0: push ebp */ 2189 ebp = esp; /* 0x35001AC1: mov ebp, esp */ 2190 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u); 2191 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2192 esp = esp - 0x18u; /* 0x35001AC3: sub esp, 0x18 */ 2193 _flag_k = FK_CMP; 2194 PUSH32(esp, ebx); /* 0x35001AC6: push ebx */ 2195 PUSH32(esp, esi); /* 0x35001AC7: push esi */ 2196 PUSH32(esp, edi); /* 0x35001AC8: push edi */ 2197 edi = MEM32(ebp + 0x8); /* 0x35001AC9: mov edi, dword ptr [ebp + 8] */ 2198 esi = ecx; /* 0x35001ACC: mov esi, ecx */ 2199 PUSH32(esp, edi); /* 0x35001ACE: push edi */ 2200 MEM32(ebp + (-0x18)) = esi; /* 0x35001ACF: mov dword ptr [ebp - 0x18], esi */ 2201 RECOMP_ICALL(0x35001920u); /* 0x35001AD2: call 0x35001920 */ /* not lifted */ 2202 RECOMP_FLAGS_IN(); 2203 eax = ebp + (-0x4); /* 0x35001AD7: lea eax, [ebp - 4] */ 2204 PUSH32(esp, eax); /* 0x35001ADA: push eax */ 2205 ecx = edi; /* 0x35001ADB: mov ecx, edi */ 2206 RECOMP_ICALL(MEM32(0x3500309C)); /* 0x35001ADD: call dword ptr [0x3500309c] */ 2207 RECOMP_FLAGS_IN(); 2208 ecx = edi; /* 0x35001AE3: mov ecx, edi */ 2209 RECOMP_ICALL(MEM32(0x35003098)); /* 0x35001AE5: call dword ptr [0x35003098] */ 2210 RECOMP_FLAGS_IN(); 2211 ecx = MEM32(ebp + (-0x4)); /* 0x35001AEB: mov ecx, dword ptr [ebp - 4] */ 2212 /* cmp ecx, eax */ /* 0x35001AEE: cmp ecx, eax */ 2213 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 2214 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2215 _flag_k = FK_CMP; 2216 if (CMP_A(_flag_a, _flag_b)) goto L_35001C34; /* 0x35001AF0: ja 0x35001c34 */ 2217 L_35001AF6: 2218 /* cmp ecx, 0x2710u */ /* 0x35001AF6: cmp ecx, 0x2710 */ 2219 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x2710u); 2220 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2221 _flag_k = FK_CMP; 2222 if (CMP_A(_flag_a, _flag_b)) goto L_35001C34; /* 0x35001AFC: ja 0x35001c34 */ 2223 L_35001B02: 2224 eax = MEM32(esi + 0x34); /* 0x35001B02: mov eax, dword ptr [esi + 0x34] */ 2225 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x28u); 2226 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2227 esi = esi + 0x28u; /* 0x35001B05: add esi, 0x28 */ 2228 _flag_k = FK_ADD; 2229 /* cmp eax, ecx */ /* 0x35001B08: cmp eax, ecx */ 2230 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 2231 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2232 _flag_k = FK_CMP; 2233 if (CMP_AE(_flag_a, _flag_b)) goto L_35001B17; /* 0x35001B0A: jae 0x35001b17 */ 2234 L_35001B0C: 2235 PUSH32(esp, 0); /* 0x35001B0C: push 0 */ 2236 PUSH32(esp, ecx); /* 0x35001B0E: push ecx */ 2237 ecx = esi; /* 0x35001B0F: mov ecx, esi */ 2238 RECOMP_ICALL(MEM32(0x35003040)); /* 0x35001B11: call dword ptr [0x35003040] */ 2239 RECOMP_FLAGS_IN(); 2240 L_35001B17: 2241 ebx = MEM32(edi + 0x10); /* 0x35001B17: mov ebx, dword ptr [edi + 0x10] */ 2242 ecx = edi; /* 0x35001B1A: mov ecx, edi */ 2243 RECOMP_ICALL(MEM32(0x35003094)); /* 0x35001B1C: call dword ptr [0x35003094] */ 2244 RECOMP_FLAGS_IN(); 2245 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 2246 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2247 eax = eax + ebx; /* 0x35001B22: add eax, ebx */ 2248 _flag_k = FK_ADD; 2249 ebx = MEM32(edi + 0x10); /* 0x35001B24: mov ebx, dword ptr [edi + 0x10] */ 2250 ecx = edi; /* 0x35001B27: mov ecx, edi */ 2251 MEM32(ebp + (-0x8)) = eax; /* 0x35001B29: mov dword ptr [ebp - 8], eax */ 2252 RECOMP_ICALL(MEM32(0x35003094)); /* 0x35001B2C: call dword ptr [0x35003094] */ 2253 RECOMP_FLAGS_IN(); 2254 ecx = MEM32(ebp + (-0x4)); /* 0x35001B32: mov ecx, dword ptr [ebp - 4] */ 2255 edi = eax; /* 0x35001B35: mov edi, eax */ 2256 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx); 2257 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2258 edi = edi + ebx; /* 0x35001B37: add edi, ebx */ 2259 _flag_k = FK_ADD; 2260 ebx = MEM32(ebp + (-0x8)); /* 0x35001B39: mov ebx, dword ptr [ebp - 8] */ 2261 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx); 2262 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2263 edi = edi + ecx; /* 0x35001B3C: add edi, ecx */ 2264 _flag_k = FK_ADD; 2265 /* cmp edi, ebx */ /* 0x35001B3E: cmp edi, ebx */ 2266 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx); 2267 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2268 _flag_k = FK_CMP; 2269 if (CMP_B(_flag_a, _flag_b)) goto L_35001C34; /* 0x35001B40: jb 0x35001c34 */ 2270 L_35001B46: 2271 eax = MEM32(esi + 0x4); /* 0x35001B46: mov eax, dword ptr [esi + 4] */ 2272 /* test eax, eax */ /* 0x35001B49: test eax, eax */ 2273 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2274 _cf = 0; 2275 _flag_k = FK_TEST; 2276 if (TEST_Z(_flag_a, _flag_b)) goto L_35001B66; /* 0x35001B4B: je 0x35001b66 */ 2277 L_35001B4D: 2278 SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x35001B4D: mov al, byte ptr [eax - 1] */ 2279 /* test LO8(eax), LO8(eax) */ /* 0x35001B50: test al, al */ 2280 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2281 _cf = 0; 2282 _flag_k = FK_NARROW(FK_TEST, 24); 2283 if (TEST_Z(_flag_a, _flag_b)) goto L_35001B66; /* 0x35001B52: je 0x35001b66 */ 2284 L_35001B54: 2285 /* cmp LO8(eax), 0xFFu */ /* 0x35001B54: cmp al, 0xff */ 2286 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 2287 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2288 _flag_k = FK_NARROW(FK_CMP, 24); 2289 if (CMP_EQ(_flag_a, _flag_b)) goto L_35001B66; /* 0x35001B56: je 0x35001b66 */ 2290 L_35001B58: 2291 ecx = MEM32(esi + 0x8); /* 0x35001B58: mov ecx, dword ptr [esi + 8] */ 2292 PUSH32(esp, 0); /* 0x35001B5B: push 0 */ 2293 PUSH32(esp, ecx); /* 0x35001B5D: push ecx */ 2294 ecx = esi; /* 0x35001B5E: mov ecx, esi */ 2295 RECOMP_ICALL(MEM32(0x35003040)); /* 0x35001B60: call dword ptr [0x35003040] */ 2296 RECOMP_FLAGS_IN(); 2297 L_35001B66: 2298 eax = MEM32(esi + 0x4); /* 0x35001B66: mov eax, dword ptr [esi + 4] */ 2299 /* test eax, eax */ /* 0x35001B69: test eax, eax */ 2300 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2301 _cf = 0; 2302 _flag_k = FK_TEST; 2303 if (TEST_Z(_flag_a, _flag_b)) goto L_35001B71; /* 0x35001B6B: je 0x35001b71 */ 2304 L_35001B6D: 2305 MEM8(eax + (-0x1)) = (uint8_t)(0xFFu); /* 0x35001B6D: mov byte ptr [eax - 1], 0xff */ 2306 L_35001B71: 2307 eax = MEM32(esi + 0x4); /* 0x35001B71: mov eax, dword ptr [esi + 4] */ 2308 /* test eax, eax */ /* 0x35001B74: test eax, eax */ 2309 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2310 _cf = 0; 2311 _flag_k = FK_TEST; 2312 if (TEST_NZ(_flag_a, _flag_b)) goto L_35001B7D; /* 0x35001B76: jne 0x35001b7d */ 2313 L_35001B78: 2314 MEM32(ebp + (-0xC)) = eax; /* 0x35001B78: mov dword ptr [ebp - 0xc], eax */ 2315 goto L_35001B85; /* 0x35001B7B: jmp 0x35001b85 */ 2316 L_35001B7D: 2317 ecx = MEM32(esi + 0x8); /* 0x35001B7D: mov ecx, dword ptr [esi + 8] */ 2318 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 2319 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2320 ecx = ecx + eax; /* 0x35001B80: add ecx, eax */ 2321 _flag_k = FK_ADD; 2322 MEM32(ebp + (-0xC)) = ecx; /* 0x35001B82: mov dword ptr [ebp - 0xc], ecx */ 2323 L_35001B85: 2324 /* test eax, eax */ /* 0x35001B85: test eax, eax */ 2325 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2326 _cf = 0; 2327 _flag_k = FK_TEST; 2328 if (TEST_Z(_flag_a, _flag_b)) goto L_35001BA2; /* 0x35001B87: je 0x35001ba2 */ 2329 L_35001B89: 2330 SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x35001B89: mov al, byte ptr [eax - 1] */ 2331 /* test LO8(eax), LO8(eax) */ /* 0x35001B8C: test al, al */ 2332 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2333 _cf = 0; 2334 _flag_k = FK_NARROW(FK_TEST, 24); 2335 if (TEST_Z(_flag_a, _flag_b)) goto L_35001BA2; /* 0x35001B8E: je 0x35001ba2 */ 2336 L_35001B90: 2337 /* cmp LO8(eax), 0xFFu */ /* 0x35001B90: cmp al, 0xff */ 2338 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 2339 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2340 _flag_k = FK_NARROW(FK_CMP, 24); 2341 if (CMP_EQ(_flag_a, _flag_b)) goto L_35001BA2; /* 0x35001B92: je 0x35001ba2 */ 2342 L_35001B94: 2343 edx = MEM32(esi + 0x8); /* 0x35001B94: mov edx, dword ptr [esi + 8] */ 2344 PUSH32(esp, 0); /* 0x35001B97: push 0 */ 2345 PUSH32(esp, edx); /* 0x35001B99: push edx */ 2346 ecx = esi; /* 0x35001B9A: mov ecx, esi */ 2347 RECOMP_ICALL(MEM32(0x35003040)); /* 0x35001B9C: call dword ptr [0x35003040] */ 2348 RECOMP_FLAGS_IN(); 2349 L_35001BA2: 2350 eax = MEM32(esi + 0x4); /* 0x35001BA2: mov eax, dword ptr [esi + 4] */ 2351 /* test eax, eax */ /* 0x35001BA5: test eax, eax */ 2352 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2353 _cf = 0; 2354 _flag_k = FK_TEST; 2355 if (TEST_Z(_flag_a, _flag_b)) goto L_35001BAD; /* 0x35001BA7: je 0x35001bad */ 2356 L_35001BA9: 2357 MEM8(eax + (-0x1)) = (uint8_t)(0xFFu); /* 0x35001BA9: mov byte ptr [eax - 1], 0xff */ 2358 L_35001BAD: 2359 MEM32(ebp + (-0x10)) = ebx; /* 0x35001BAD: mov dword ptr [ebp - 0x10], ebx */ 2360 ebx = MEM32(esi + 0x4); /* 0x35001BB0: mov ebx, dword ptr [esi + 4] */ 2361 ecx = esi; /* 0x35001BB3: mov ecx, esi */ 2362 MEM32(ebp + (-0x14)) = ebx; /* 0x35001BB5: mov dword ptr [ebp - 0x14], ebx */ 2363 RECOMP_ICALL(MEM32(0x35003028)); /* 0x35001BB8: call dword ptr [0x35003028] */ 2364 RECOMP_FLAGS_IN(); 2365 /* test ebx, ebx */ /* 0x35001BBE: test ebx, ebx */ 2366 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 2367 _cf = 0; 2368 _flag_k = FK_TEST; 2369 if (TEST_Z(_flag_a, _flag_b)) goto L_35001BC5; /* 0x35001BC0: je 0x35001bc5 */ 2370 L_35001BC2: 2371 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x4)); 2372 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2373 ebx = ebx - MEM32(esi + 0x4); /* 0x35001BC2: sub ebx, dword ptr [esi + 4] */ 2374 _flag_k = FK_CMP; 2375 L_35001BC5: 2376 edx = MEM32(ebp + (-0x8)); /* 0x35001BC5: mov edx, dword ptr [ebp - 8] */ 2377 eax = MEM32(ebp + (-0xC)); /* 0x35001BC8: mov eax, dword ptr [ebp - 0xc] */ 2378 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx); 2379 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2380 edi = edi - edx; /* 0x35001BCB: sub edi, edx */ 2381 _flag_k = FK_CMP; 2382 /* test eax, eax */ /* 0x35001BCD: test eax, eax */ 2383 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2384 _cf = 0; 2385 _flag_k = FK_TEST; 2386 if (TEST_Z(_flag_a, _flag_b)) goto L_35001BD4; /* 0x35001BCF: je 0x35001bd4 */ 2387 L_35001BD1: 2388 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ebp + (-0x14))); 2389 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2390 eax = eax - MEM32(ebp + (-0x14)); /* 0x35001BD1: sub eax, dword ptr [ebp - 0x14] */ 2391 _flag_k = FK_CMP; 2392 L_35001BD4: 2393 PUSH32(esp, 0); /* 0x35001BD4: push 0 */ 2394 PUSH32(esp, edi); /* 0x35001BD6: push edi */ 2395 PUSH32(esp, eax); /* 0x35001BD7: push eax */ 2396 PUSH32(esp, ebx); /* 0x35001BD8: push ebx */ 2397 ecx = esi; /* 0x35001BD9: mov ecx, esi */ 2398 RECOMP_ICALL(MEM32(0x35003018)); /* 0x35001BDB: call dword ptr [0x35003018] */ 2399 RECOMP_FLAGS_IN(); 2400 ecx = esi; /* 0x35001BE1: mov ecx, esi */ 2401 RECOMP_ICALL(MEM32(0x35003028)); /* 0x35001BE3: call dword ptr [0x35003028] */ 2402 RECOMP_FLAGS_IN(); 2403 esi = MEM32(esi + 0x4); /* 0x35001BE9: mov esi, dword ptr [esi + 4] */ 2404 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 2405 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2406 esi = esi + ebx; /* 0x35001BEC: add esi, ebx */ 2407 _flag_k = FK_ADD; 2408 /* test edi, edi */ /* 0x35001BEE: test edi, edi */ 2409 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 2410 _cf = 0; 2411 _flag_k = FK_TEST; 2412 if (TEST_Z(_flag_a, _flag_b)) goto L_35001C01; /* 0x35001BF0: jbe 0x35001c01 */ 2413 L_35001BF2: 2414 eax = MEM32(ebp + (-0x10)); /* 0x35001BF2: mov eax, dword ptr [ebp - 0x10] */ 2415 SET_LO8(ecx, MEM8(eax)); /* 0x35001BF5: mov cl, byte ptr [eax] */ 2416 MEM8(esi) = (uint8_t)(LO8(ecx)); /* 0x35001BF7: mov byte ptr [esi], cl */ 2417 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 2418 esi = esi + 1; /* 0x35001BF9: inc esi */ 2419 _flag_k = FK_INC; 2420 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2421 eax = eax + 1; /* 0x35001BFA: inc eax */ 2422 _flag_k = FK_INC; 2423 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1); 2424 edi = edi - 1; /* 0x35001BFB: dec edi */ 2425 _flag_k = FK_DEC; 2426 MEM32(ebp + (-0x10)) = eax; /* 0x35001BFC: mov dword ptr [ebp - 0x10], eax */ 2427 RECOMP_BACKEDGE(); 2428 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_35001BF2; /* 0x35001BFF: jne 0x35001bf2 */ 2429 L_35001C01: 2430 edx = MEM32(ebp + (-0x4)); /* 0x35001C01: mov edx, dword ptr [ebp - 4] */ 2431 esi = MEM32(ebp + 0x8); /* 0x35001C04: mov esi, dword ptr [ebp + 8] */ 2432 PUSH32(esp, 1); /* 0x35001C07: push 1 */ 2433 PUSH32(esp, edx); /* 0x35001C09: push edx */ 2434 ecx = esi; /* 0x35001C0A: mov ecx, esi */ 2435 RECOMP_ICALL(MEM32(0x350030A8)); /* 0x35001C0C: call dword ptr [0x350030a8] */ 2436 RECOMP_FLAGS_IN(); 2437 eax = MEM32(ebp + (-0x18)); /* 0x35001C12: mov eax, dword ptr [ebp - 0x18] */ 2438 /* cmp MEM32(eax + 0x30), 0x100u */ /* 0x35001C15: cmp dword ptr [eax + 0x30], 0x100 */ 2439 _flag_a = (uint32_t)(MEM32(eax + 0x30)); _flag_b = (uint32_t)(0x100u); 2440 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2441 _flag_k = FK_CMP; 2442 if (CMP_A(_flag_a, _flag_b)) goto L_35001C34; /* 0x35001C1C: ja 0x35001c34 */ 2443 L_35001C1E: 2444 ecx = esi; /* 0x35001C1E: mov ecx, esi */ 2445 RECOMP_ICALL(MEM32(0x35003090)); /* 0x35001C20: call dword ptr [0x35003090] */ 2446 RECOMP_FLAGS_IN(); 2447 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(eax); 2448 _cf = (eax) != 0; 2449 eax = (uint32_t)(-(int32_t)eax); /* 0x35001C26: neg eax */ 2450 _flag_k = FK_CMP; 2451 edi = POP32_VAL(esp); /* 0x35001C28: pop edi */ 2452 { uint32_t _sa = eax, _sb = eax, _sc = _cf; /* 0x35001C29: sbb eax, eax */ 2453 eax = _sc ? 0xFFFFFFFFu : 0; 2454 _flag_a = recomp_flags_sbb(_sa, _sb, _sc); _flag_b = 0; 2455 _flag_k = FK_EFLAGS; _cf = _flag_a & 1u; } 2456 esi = POP32_VAL(esp); /* 0x35001C2B: pop esi */ 2457 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2458 eax = eax + 1; /* 0x35001C2C: inc eax */ 2459 _flag_k = FK_INC; 2460 ebx = POP32_VAL(esp); /* 0x35001C2D: pop ebx */ 2461 esp = ebp; /* 0x35001C2E: mov esp, ebp */ 2462 ebp = POP32_VAL(esp); /* 0x35001C30: pop ebp */ 2463 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35001C31: ret 4 */ 2464 L_35001C34: 2465 edi = POP32_VAL(esp); /* 0x35001C34: pop edi */ 2466 esi = POP32_VAL(esp); /* 0x35001C35: pop esi */ 2467 eax = 1; /* 0x35001C36: mov eax, 1 */ 2468 ebx = POP32_VAL(esp); /* 0x35001C3B: pop ebx */ 2469 esp = ebp; /* 0x35001C3C: mov esp, ebp */ 2470 ebp = POP32_VAL(esp); /* 0x35001C3E: pop ebp */ 2471 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35001C3F: ret 4 */ 2472 RECOMP_REGS_OUT(); 2473 } 2474 2475 void sub_35001C50(void) { 2476 int _fpu_cmp = 0; 2477 uint32_t _cf = 0; 2478 int _df = 1; 2479 uint32_t _flag_k = FK_NONE; 2480 uint32_t _flag_a = 0, _flag_b = 0; 2481 uint32_t _itail_tgt = 0; 2482 RECOMP_REGS_LOCALS 2483 RECOMP_ENTER(0x35001C50u); 2484 2485 L_35001C50: 2486 PUSH32(esp, ebp); /* 0x35001C50: push ebp */ 2487 ebp = esp; /* 0x35001C51: mov ebp, esp */ 2488 PUSH32(esp, esi); /* 0x35001C53: push esi */ 2489 PUSH32(esp, edi); /* 0x35001C54: push edi */ 2490 edi = MEM32(ebp + 0x8); /* 0x35001C55: mov edi, dword ptr [ebp + 8] */ 2491 esi = ecx; /* 0x35001C58: mov esi, ecx */ 2492 PUSH32(esp, edi); /* 0x35001C5A: push edi */ 2493 RECOMP_ICALL(0x35001970u); /* 0x35001C5B: call 0x35001970 */ /* not lifted */ 2494 RECOMP_FLAGS_IN(); 2495 eax = MEM32(esi + 0x30); /* 0x35001C60: mov eax, dword ptr [esi + 0x30] */ 2496 PUSH32(esp, eax); /* 0x35001C63: push eax */ 2497 ecx = edi; /* 0x35001C64: mov ecx, edi */ 2498 RECOMP_ICALL(MEM32(0x350030A4)); /* 0x35001C66: call dword ptr [0x350030a4] */ 2499 RECOMP_FLAGS_IN(); 2500 eax = MEM32(esi + 0x30); /* 0x35001C6C: mov eax, dword ptr [esi + 0x30] */ 2501 esi = MEM32(esi + 0x2C); /* 0x35001C6F: mov esi, dword ptr [esi + 0x2c] */ 2502 /* test esi, esi */ /* 0x35001C72: test esi, esi */ 2503 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 2504 _cf = 0; 2505 _flag_k = FK_TEST; 2506 if (TEST_NZ(_flag_a, _flag_b)) goto L_35001C7C; /* 0x35001C74: jne 0x35001c7c */ 2507 L_35001C76: 2508 esi = MEM32(0x35003038); /* 0x35001C76: mov esi, dword ptr [0x35003038] */ 2509 L_35001C7C: 2510 PUSH32(esp, eax); /* 0x35001C7C: push eax */ 2511 PUSH32(esp, esi); /* 0x35001C7D: push esi */ 2512 ecx = edi; /* 0x35001C7E: mov ecx, edi */ 2513 RECOMP_ICALL(MEM32(0x350030A0)); /* 0x35001C80: call dword ptr [0x350030a0] */ 2514 RECOMP_FLAGS_IN(); 2515 edi = POP32_VAL(esp); /* 0x35001C86: pop edi */ 2516 esi = POP32_VAL(esp); /* 0x35001C87: pop esi */ 2517 ebp = POP32_VAL(esp); /* 0x35001C88: pop ebp */ 2518 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35001C89: ret 4 */ 2519 RECOMP_REGS_OUT(); 2520 } 2521 2522 void sub_35001C90(void) { 2523 int _fpu_cmp = 0; 2524 uint32_t _cf = 0; 2525 int _df = 1; 2526 uint32_t _flag_k = FK_NONE; 2527 uint32_t _flag_a = 0, _flag_b = 0; 2528 uint32_t _itail_tgt = 0; 2529 RECOMP_REGS_LOCALS 2530 RECOMP_ENTER(0x35001C90u); 2531 2532 L_35001C90: 2533 RECOMP_ICALL(0x35001CA0u); /* 0x35001C90: call 0x35001ca0 */ /* not lifted */ 2534 RECOMP_FLAGS_IN(); 2535 goto L_35001CB0; /* 0x35001C95: jmp 0x35001cb0 */ 2536 L_35001CB0: 2537 PUSH32(esp, 0x35001CC0u); /* 0x35001CB0: push 0x35001cc0 */ 2538 RECOMP_ICALL(0x350022BAu); /* 0x35001CB5: call 0x350022ba */ /* not lifted */ 2539 RECOMP_FLAGS_IN(); 2540 ecx = POP32_VAL(esp); /* 0x35001CBA: pop ecx */ 2541 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001CBB: ret */ 2542 RECOMP_REGS_OUT(); 2543 } 2544 2545 void sub_35001CA0(void) { 2546 int _fpu_cmp = 0; 2547 uint32_t _cf = 0; 2548 int _df = 1; 2549 uint32_t _flag_k = FK_NONE; 2550 uint32_t _flag_a = 0, _flag_b = 0; 2551 uint32_t _itail_tgt = 0; 2552 RECOMP_REGS_LOCALS 2553 RECOMP_ENTER(0x35001CA0u); 2554 2555 L_35001CA0: 2556 ecx = 0x35005179u; /* 0x35001CA0: mov ecx, 0x35005179 */ 2557 L_35001CA5: 2558 { _itail_tgt = (uint32_t)(MEM32(0x35003024)); goto _ljump; } 2559 { RECOMP_REGS_OUT(); return; } /* end of function */ 2560 _ljump: 2561 switch (_itail_tgt) { 2562 case 0x35001CA0u: goto L_35001CA0; 2563 case 0x35001CA5u: goto L_35001CA5; 2564 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 2565 } 2566 RECOMP_REGS_OUT(); 2567 } 2568 2569 void sub_35001CB0(void) { 2570 int _fpu_cmp = 0; 2571 uint32_t _cf = 0; 2572 int _df = 1; 2573 uint32_t _flag_k = FK_NONE; 2574 uint32_t _flag_a = 0, _flag_b = 0; 2575 uint32_t _itail_tgt = 0; 2576 RECOMP_REGS_LOCALS 2577 RECOMP_ENTER(0x35001CB0u); 2578 2579 L_35001CB0: 2580 PUSH32(esp, 0x35001CC0u); /* 0x35001CB0: push 0x35001cc0 */ 2581 RECOMP_ICALL(0x350022BAu); /* 0x35001CB5: call 0x350022ba */ /* not lifted */ 2582 RECOMP_FLAGS_IN(); 2583 ecx = POP32_VAL(esp); /* 0x35001CBA: pop ecx */ 2584 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001CBB: ret */ 2585 RECOMP_REGS_OUT(); 2586 } 2587 2588 void sub_35001CC0(void) { 2589 int _fpu_cmp = 0; 2590 uint32_t _cf = 0; 2591 int _df = 1; 2592 uint32_t _flag_k = FK_NONE; 2593 uint32_t _flag_a = 0, _flag_b = 0; 2594 uint32_t _itail_tgt = 0; 2595 RECOMP_REGS_LOCALS 2596 RECOMP_ENTER(0x35001CC0u); 2597 2598 L_35001CC0: 2599 ecx = 0x35005179u; /* 0x35001CC0: mov ecx, 0x35005179 */ 2600 L_35001CC5: 2601 { _itail_tgt = (uint32_t)(MEM32(0x3500304C)); goto _ljump; } 2602 { RECOMP_REGS_OUT(); return; } /* end of function */ 2603 _ljump: 2604 switch (_itail_tgt) { 2605 case 0x35001CC0u: goto L_35001CC0; 2606 case 0x35001CC5u: goto L_35001CC5; 2607 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 2608 } 2609 RECOMP_REGS_OUT(); 2610 } 2611 2612 void sub_35001CD0(void) { 2613 int _fpu_cmp = 0; 2614 uint32_t _cf = 0; 2615 int _df = 1; 2616 uint32_t _flag_k = FK_NONE; 2617 uint32_t _flag_a = 0, _flag_b = 0; 2618 uint32_t _itail_tgt = 0; 2619 RECOMP_REGS_LOCALS 2620 RECOMP_ENTER(0x35001CD0u); 2621 2622 L_35001CD0: 2623 RECOMP_ICALL(0x35001CE0u); /* 0x35001CD0: call 0x35001ce0 */ /* not lifted */ 2624 RECOMP_FLAGS_IN(); 2625 goto L_35001CF0; /* 0x35001CD5: jmp 0x35001cf0 */ 2626 L_35001CF0: 2627 PUSH32(esp, 0x35001D00u); /* 0x35001CF0: push 0x35001d00 */ 2628 RECOMP_ICALL(0x350022BAu); /* 0x35001CF5: call 0x350022ba */ /* not lifted */ 2629 RECOMP_FLAGS_IN(); 2630 ecx = POP32_VAL(esp); /* 0x35001CFA: pop ecx */ 2631 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001CFB: ret */ 2632 RECOMP_REGS_OUT(); 2633 } 2634 2635 void sub_35001CE0(void) { 2636 int _fpu_cmp = 0; 2637 uint32_t _cf = 0; 2638 int _df = 1; 2639 uint32_t _flag_k = FK_NONE; 2640 uint32_t _flag_a = 0, _flag_b = 0; 2641 uint32_t _itail_tgt = 0; 2642 RECOMP_REGS_LOCALS 2643 RECOMP_ENTER(0x35001CE0u); 2644 2645 L_35001CE0: 2646 ecx = 0x35005178u; /* 0x35001CE0: mov ecx, 0x35005178 */ 2647 L_35001CE5: 2648 { _itail_tgt = (uint32_t)(MEM32(0x35003048)); goto _ljump; } 2649 { RECOMP_REGS_OUT(); return; } /* end of function */ 2650 _ljump: 2651 switch (_itail_tgt) { 2652 case 0x35001CE0u: goto L_35001CE0; 2653 case 0x35001CE5u: goto L_35001CE5; 2654 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 2655 } 2656 RECOMP_REGS_OUT(); 2657 } 2658 2659 void sub_35001CF0(void) { 2660 int _fpu_cmp = 0; 2661 uint32_t _cf = 0; 2662 int _df = 1; 2663 uint32_t _flag_k = FK_NONE; 2664 uint32_t _flag_a = 0, _flag_b = 0; 2665 uint32_t _itail_tgt = 0; 2666 RECOMP_REGS_LOCALS 2667 RECOMP_ENTER(0x35001CF0u); 2668 2669 L_35001CF0: 2670 PUSH32(esp, 0x35001D00u); /* 0x35001CF0: push 0x35001d00 */ 2671 RECOMP_ICALL(0x350022BAu); /* 0x35001CF5: call 0x350022ba */ /* not lifted */ 2672 RECOMP_FLAGS_IN(); 2673 ecx = POP32_VAL(esp); /* 0x35001CFA: pop ecx */ 2674 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001CFB: ret */ 2675 RECOMP_REGS_OUT(); 2676 } 2677 2678 void sub_35001D00(void) { 2679 int _fpu_cmp = 0; 2680 uint32_t _cf = 0; 2681 int _df = 1; 2682 uint32_t _flag_k = FK_NONE; 2683 uint32_t _flag_a = 0, _flag_b = 0; 2684 uint32_t _itail_tgt = 0; 2685 RECOMP_REGS_LOCALS 2686 RECOMP_ENTER(0x35001D00u); 2687 2688 L_35001D00: 2689 ecx = 0x35005178u; /* 0x35001D00: mov ecx, 0x35005178 */ 2690 L_35001D05: 2691 { _itail_tgt = (uint32_t)(MEM32(0x35003044)); goto _ljump; } 2692 { RECOMP_REGS_OUT(); return; } /* end of function */ 2693 _ljump: 2694 switch (_itail_tgt) { 2695 case 0x35001D00u: goto L_35001D00; 2696 case 0x35001D05u: goto L_35001D05; 2697 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 2698 } 2699 RECOMP_REGS_OUT(); 2700 } 2701 2702 void sub_35001D10(void) { 2703 int _fpu_cmp = 0; 2704 uint32_t _cf = 0; 2705 int _df = 1; 2706 uint32_t _flag_k = FK_NONE; 2707 uint32_t _flag_a = 0, _flag_b = 0; 2708 uint32_t _itail_tgt = 0; 2709 RECOMP_REGS_LOCALS 2710 RECOMP_ENTER(0x35001D10u); 2711 2712 L_35001D10: 2713 PUSH32(esp, ebp); /* 0x35001D10: push ebp */ 2714 ebp = esp; /* 0x35001D11: mov ebp, esp */ 2715 PUSH32(esp, 0xFFFFFFFFu); /* 0x35001D13: push -1 */ 2716 PUSH32(esp, 0x350024EBu); /* 0x35001D15: push 0x350024eb */ 2717 eax = MEM32(FS_BASE + (0)); /* 0x35001D1A: mov eax, dword ptr fs:[0] */ 2718 PUSH32(esp, eax); /* 0x35001D20: push eax */ 2719 MEM32(FS_BASE + (0)) = esp; /* 0x35001D21: mov dword ptr fs:[0], esp */ 2720 PUSH32(esp, ecx); /* 0x35001D28: push ecx */ 2721 PUSH32(esp, 0x28u); /* 0x35001D29: push 0x28 */ 2722 RECOMP_ICALL(0x350022E0u); /* 0x35001D2B: call 0x350022e0 */ /* not lifted */ 2723 RECOMP_FLAGS_IN(); 2724 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2725 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2726 esp = esp + 4; /* 0x35001D30: add esp, 4 */ 2727 _flag_k = FK_ADD; 2728 MEM32(ebp + (-0x10)) = eax; /* 0x35001D33: mov dword ptr [ebp - 0x10], eax */ 2729 /* test eax, eax */ /* 0x35001D36: test eax, eax */ 2730 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2731 _cf = 0; 2732 _flag_k = FK_TEST; 2733 MEM32(ebp + (-0x4)) = 0; /* 0x35001D38: mov dword ptr [ebp - 4], 0 */ 2734 if (TEST_Z(_flag_a, _flag_b)) goto L_35001D56; /* 0x35001D3F: je 0x35001d56 */ 2735 L_35001D41: 2736 ecx = eax; /* 0x35001D41: mov ecx, eax */ 2737 RECOMP_ICALL(0x35001890u); /* 0x35001D43: call 0x35001890 */ /* not lifted */ 2738 RECOMP_FLAGS_IN(); 2739 ecx = MEM32(ebp + (-0xC)); /* 0x35001D48: mov ecx, dword ptr [ebp - 0xc] */ 2740 MEM32(FS_BASE + (0)) = ecx; /* 0x35001D4B: mov dword ptr fs:[0], ecx */ 2741 esp = ebp; /* 0x35001D52: mov esp, ebp */ 2742 ebp = POP32_VAL(esp); /* 0x35001D54: pop ebp */ 2743 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001D55: ret */ 2744 L_35001D56: 2745 ecx = MEM32(ebp + (-0xC)); /* 0x35001D56: mov ecx, dword ptr [ebp - 0xc] */ 2746 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2747 eax = 0; /* 0x35001D59: xor eax, eax */ 2748 _cf = 0; 2749 _flag_k = FK_TEST; 2750 MEM32(FS_BASE + (0)) = ecx; /* 0x35001D5B: mov dword ptr fs:[0], ecx */ 2751 esp = ebp; /* 0x35001D62: mov esp, ebp */ 2752 ebp = POP32_VAL(esp); /* 0x35001D64: pop ebp */ 2753 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001D65: ret */ 2754 RECOMP_REGS_OUT(); 2755 } 2756 2757 void sub_35001D70(void) { 2758 int _fpu_cmp = 0; 2759 uint32_t _cf = 0; 2760 int _df = 1; 2761 uint32_t _flag_k = FK_NONE; 2762 uint32_t _flag_a = 0, _flag_b = 0; 2763 uint32_t _itail_tgt = 0; 2764 RECOMP_REGS_LOCALS 2765 RECOMP_ENTER(0x35001D70u); 2766 2767 L_35001D70: 2768 goto L_35001D80; /* 0x35001D70: jmp 0x35001d80 */ 2769 L_35001D80: 2770 ecx = 0x3500517Bu; /* 0x35001D80: mov ecx, 0x3500517b */ 2771 goto L_35001D90; /* 0x35001D85: jmp 0x35001d90 */ 2772 L_35001D90: 2773 PUSH32(esp, ebp); /* 0x35001D90: push ebp */ 2774 ebp = esp; /* 0x35001D91: mov ebp, esp */ 2775 PUSH32(esp, 0xFFFFFFFFu); /* 0x35001D93: push -1 */ 2776 PUSH32(esp, 0x35002509u); /* 0x35001D95: push 0x35002509 */ 2777 eax = MEM32(FS_BASE + (0)); /* 0x35001D9A: mov eax, dword ptr fs:[0] */ 2778 PUSH32(esp, eax); /* 0x35001DA0: push eax */ 2779 MEM32(FS_BASE + (0)) = esp; /* 0x35001DA1: mov dword ptr fs:[0], esp */ 2780 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u); 2781 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2782 esp = esp - 0x18u; /* 0x35001DA8: sub esp, 0x18 */ 2783 _flag_k = FK_CMP; 2784 SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x35001DAB: mov al, byte ptr [ebp - 0xd] */ 2785 PUSH32(esp, ebx); /* 0x35001DAE: push ebx */ 2786 PUSH32(esp, esi); /* 0x35001DAF: push esi */ 2787 esi = ecx; /* 0x35001DB0: mov esi, ecx */ 2788 PUSH32(esp, edi); /* 0x35001DB2: push edi */ 2789 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 2790 ecx = ecx | 0xFFFFFFFFu; /* 0x35001DB3: or ecx, 0xffffffff */ 2791 _cf = 0; 2792 _flag_k = FK_TEST; 2793 MEM8(ebp + (-0x24)) = (uint8_t)(LO8(eax)); /* 0x35001DB6: mov byte ptr [ebp - 0x24], al */ 2794 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2795 eax = 0; /* 0x35001DB9: xor eax, eax */ 2796 _cf = 0; 2797 _flag_k = FK_TEST; 2798 edi = 0x35005128u; /* 0x35001DBB: mov edi, 0x35005128 */ 2799 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x35001DC0: repne scasb al, byte ptr es:[edi] */ 2800 ecx = ~ecx; /* 0x35001DC2: not ecx */ 2801 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 2802 ecx = ecx - 1; /* 0x35001DC4: dec ecx */ 2803 _flag_k = FK_DEC; 2804 ebx = ecx; /* 0x35001DC5: mov ebx, ecx */ 2805 PUSH32(esp, 1); /* 0x35001DC7: push 1 */ 2806 PUSH32(esp, ebx); /* 0x35001DC9: push ebx */ 2807 ecx = ebp + (-0x24); /* 0x35001DCA: lea ecx, [ebp - 0x24] */ 2808 MEM32(ebp + (-0x14)) = esi; /* 0x35001DCD: mov dword ptr [ebp - 0x14], esi */ 2809 MEM32(ebp + (-0x20)) = eax; /* 0x35001DD0: mov dword ptr [ebp - 0x20], eax */ 2810 MEM32(ebp + (-0x1C)) = eax; /* 0x35001DD3: mov dword ptr [ebp - 0x1c], eax */ 2811 MEM32(ebp + (-0x18)) = eax; /* 0x35001DD6: mov dword ptr [ebp - 0x18], eax */ 2812 RECOMP_ICALL(MEM32(0x35003040)); /* 0x35001DD9: call dword ptr [0x35003040] */ 2813 RECOMP_FLAGS_IN(); 2814 /* test LO8(eax), LO8(eax) */ /* 0x35001DDF: test al, al */ 2815 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2816 _cf = 0; 2817 _flag_k = FK_NARROW(FK_TEST, 24); 2818 if (TEST_Z(_flag_a, _flag_b)) goto L_35001E08; /* 0x35001DE1: je 0x35001e08 */ 2819 L_35001DE3: 2820 edi = MEM32(ebp + (-0x20)); /* 0x35001DE3: mov edi, dword ptr [ebp - 0x20] */ 2821 ecx = ebx; /* 0x35001DE6: mov ecx, ebx */ 2822 edx = ecx; /* 0x35001DE8: mov edx, ecx */ 2823 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x35001DEA: shr ecx, 2 */ 2824 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2825 ecx = ecx >> 2u; /* 0x35001DEA: shr ecx, 2 */ 2826 esi = 0x35005128u; /* 0x35001DED: mov esi, 0x35005128 */ 2827 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x35001DF2: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 2828 ecx = edx; /* 0x35001DF4: mov ecx, edx */ 2829 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 2830 ecx = ecx & 3; /* 0x35001DF6: and ecx, 3 */ 2831 _cf = 0; 2832 _flag_k = FK_TEST; 2833 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x35001DF9: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 2834 eax = MEM32(ebp + (-0x20)); /* 0x35001DFB: mov eax, dword ptr [ebp - 0x20] */ 2835 esi = MEM32(ebp + (-0x14)); /* 0x35001DFE: mov esi, dword ptr [ebp - 0x14] */ 2836 MEM32(ebp + (-0x1C)) = ebx; /* 0x35001E01: mov dword ptr [ebp - 0x1c], ebx */ 2837 MEM8(eax + ebx) = (uint8_t)(0); /* 0x35001E04: mov byte ptr [eax + ebx], 0 */ 2838 L_35001E08: 2839 ecx = ebp + (-0x24); /* 0x35001E08: lea ecx, [ebp - 0x24] */ 2840 PUSH32(esp, 0x35001D10u); /* 0x35001E0B: push 0x35001d10 */ 2841 PUSH32(esp, ecx); /* 0x35001E10: push ecx */ 2842 MEM32(ebp + (-0x4)) = 0; /* 0x35001E11: mov dword ptr [ebp - 4], 0 */ 2843 RECOMP_ICALL(MEM32(0x350030D4)); /* 0x35001E18: call dword ptr [0x350030d4] */ 2844 RECOMP_FLAGS_IN(); 2845 eax = MEM32(ebp + (-0x20)); /* 0x35001E1E: mov eax, dword ptr [ebp - 0x20] */ 2846 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2847 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2848 esp = esp + 8; /* 0x35001E21: add esp, 8 */ 2849 _flag_k = FK_ADD; 2850 /* test eax, eax */ /* 0x35001E24: test eax, eax */ 2851 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2852 _cf = 0; 2853 _flag_k = FK_TEST; 2854 if (TEST_Z(_flag_a, _flag_b)) goto L_35001E55; /* 0x35001E26: je 0x35001e55 */ 2855 L_35001E28: 2856 ecx = eax + (-0x1); /* 0x35001E28: lea ecx, [eax - 1] */ 2857 SET_LO8(eax, MEM8(ecx)); /* 0x35001E2B: mov al, byte ptr [ecx] */ 2858 /* test LO8(eax), LO8(eax) */ /* 0x35001E2D: test al, al */ 2859 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2860 _cf = 0; 2861 _flag_k = FK_NARROW(FK_TEST, 24); 2862 if (TEST_Z(_flag_a, _flag_b)) goto L_35001E4C; /* 0x35001E2F: je 0x35001e4c */ 2863 L_35001E31: 2864 /* cmp LO8(eax), 0xFFu */ /* 0x35001E31: cmp al, 0xff */ 2865 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 2866 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2867 _flag_k = FK_NARROW(FK_CMP, 24); 2868 if (CMP_EQ(_flag_a, _flag_b)) goto L_35001E4C; /* 0x35001E33: je 0x35001e4c */ 2869 L_35001E35: 2870 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 2871 SET_LO8(eax, LO8(eax) - 1); /* 0x35001E35: dec al */ 2872 _flag_k = FK_NARROW(FK_DEC, 24); 2873 edi = POP32_VAL(esp); /* 0x35001E37: pop edi */ 2874 MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x35001E38: mov byte ptr [ecx], al */ 2875 eax = esi; /* 0x35001E3A: mov eax, esi */ 2876 esi = POP32_VAL(esp); /* 0x35001E3C: pop esi */ 2877 ebx = POP32_VAL(esp); /* 0x35001E3D: pop ebx */ 2878 ecx = MEM32(ebp + (-0xC)); /* 0x35001E3E: mov ecx, dword ptr [ebp - 0xc] */ 2879 MEM32(FS_BASE + (0)) = ecx; /* 0x35001E41: mov dword ptr fs:[0], ecx */ 2880 esp = ebp; /* 0x35001E48: mov esp, ebp */ 2881 ebp = POP32_VAL(esp); /* 0x35001E4A: pop ebp */ 2882 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001E4B: ret */ 2883 L_35001E4C: 2884 PUSH32(esp, ecx); /* 0x35001E4C: push ecx */ 2885 RECOMP_ICALL(0x35002194u); /* 0x35001E4D: call 0x35002194 */ /* not lifted */ 2886 RECOMP_FLAGS_IN(); 2887 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2888 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2889 esp = esp + 4; /* 0x35001E52: add esp, 4 */ 2890 _flag_k = FK_ADD; 2891 L_35001E55: 2892 ecx = MEM32(ebp + (-0xC)); /* 0x35001E55: mov ecx, dword ptr [ebp - 0xc] */ 2893 edi = POP32_VAL(esp); /* 0x35001E58: pop edi */ 2894 eax = esi; /* 0x35001E59: mov eax, esi */ 2895 esi = POP32_VAL(esp); /* 0x35001E5B: pop esi */ 2896 ebx = POP32_VAL(esp); /* 0x35001E5C: pop ebx */ 2897 MEM32(FS_BASE + (0)) = ecx; /* 0x35001E5D: mov dword ptr fs:[0], ecx */ 2898 esp = ebp; /* 0x35001E64: mov esp, ebp */ 2899 ebp = POP32_VAL(esp); /* 0x35001E66: pop ebp */ 2900 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001E67: ret */ 2901 RECOMP_REGS_OUT(); 2902 } 2903 2904 void sub_35001D80(void) { 2905 int _fpu_cmp = 0; 2906 uint32_t _cf = 0; 2907 int _df = 1; 2908 uint32_t _flag_k = FK_NONE; 2909 uint32_t _flag_a = 0, _flag_b = 0; 2910 uint32_t _itail_tgt = 0; 2911 RECOMP_REGS_LOCALS 2912 RECOMP_ENTER(0x35001D80u); 2913 2914 L_35001D80: 2915 ecx = 0x3500517Bu; /* 0x35001D80: mov ecx, 0x3500517b */ 2916 goto L_35001D90; /* 0x35001D85: jmp 0x35001d90 */ 2917 L_35001D90: 2918 PUSH32(esp, ebp); /* 0x35001D90: push ebp */ 2919 ebp = esp; /* 0x35001D91: mov ebp, esp */ 2920 PUSH32(esp, 0xFFFFFFFFu); /* 0x35001D93: push -1 */ 2921 PUSH32(esp, 0x35002509u); /* 0x35001D95: push 0x35002509 */ 2922 eax = MEM32(FS_BASE + (0)); /* 0x35001D9A: mov eax, dword ptr fs:[0] */ 2923 PUSH32(esp, eax); /* 0x35001DA0: push eax */ 2924 MEM32(FS_BASE + (0)) = esp; /* 0x35001DA1: mov dword ptr fs:[0], esp */ 2925 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u); 2926 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2927 esp = esp - 0x18u; /* 0x35001DA8: sub esp, 0x18 */ 2928 _flag_k = FK_CMP; 2929 SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x35001DAB: mov al, byte ptr [ebp - 0xd] */ 2930 PUSH32(esp, ebx); /* 0x35001DAE: push ebx */ 2931 PUSH32(esp, esi); /* 0x35001DAF: push esi */ 2932 esi = ecx; /* 0x35001DB0: mov esi, ecx */ 2933 PUSH32(esp, edi); /* 0x35001DB2: push edi */ 2934 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 2935 ecx = ecx | 0xFFFFFFFFu; /* 0x35001DB3: or ecx, 0xffffffff */ 2936 _cf = 0; 2937 _flag_k = FK_TEST; 2938 MEM8(ebp + (-0x24)) = (uint8_t)(LO8(eax)); /* 0x35001DB6: mov byte ptr [ebp - 0x24], al */ 2939 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2940 eax = 0; /* 0x35001DB9: xor eax, eax */ 2941 _cf = 0; 2942 _flag_k = FK_TEST; 2943 edi = 0x35005128u; /* 0x35001DBB: mov edi, 0x35005128 */ 2944 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x35001DC0: repne scasb al, byte ptr es:[edi] */ 2945 ecx = ~ecx; /* 0x35001DC2: not ecx */ 2946 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 2947 ecx = ecx - 1; /* 0x35001DC4: dec ecx */ 2948 _flag_k = FK_DEC; 2949 ebx = ecx; /* 0x35001DC5: mov ebx, ecx */ 2950 PUSH32(esp, 1); /* 0x35001DC7: push 1 */ 2951 PUSH32(esp, ebx); /* 0x35001DC9: push ebx */ 2952 ecx = ebp + (-0x24); /* 0x35001DCA: lea ecx, [ebp - 0x24] */ 2953 MEM32(ebp + (-0x14)) = esi; /* 0x35001DCD: mov dword ptr [ebp - 0x14], esi */ 2954 MEM32(ebp + (-0x20)) = eax; /* 0x35001DD0: mov dword ptr [ebp - 0x20], eax */ 2955 MEM32(ebp + (-0x1C)) = eax; /* 0x35001DD3: mov dword ptr [ebp - 0x1c], eax */ 2956 MEM32(ebp + (-0x18)) = eax; /* 0x35001DD6: mov dword ptr [ebp - 0x18], eax */ 2957 RECOMP_ICALL(MEM32(0x35003040)); /* 0x35001DD9: call dword ptr [0x35003040] */ 2958 RECOMP_FLAGS_IN(); 2959 /* test LO8(eax), LO8(eax) */ /* 0x35001DDF: test al, al */ 2960 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2961 _cf = 0; 2962 _flag_k = FK_NARROW(FK_TEST, 24); 2963 if (TEST_Z(_flag_a, _flag_b)) goto L_35001E08; /* 0x35001DE1: je 0x35001e08 */ 2964 L_35001DE3: 2965 edi = MEM32(ebp + (-0x20)); /* 0x35001DE3: mov edi, dword ptr [ebp - 0x20] */ 2966 ecx = ebx; /* 0x35001DE6: mov ecx, ebx */ 2967 edx = ecx; /* 0x35001DE8: mov edx, ecx */ 2968 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x35001DEA: shr ecx, 2 */ 2969 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2970 ecx = ecx >> 2u; /* 0x35001DEA: shr ecx, 2 */ 2971 esi = 0x35005128u; /* 0x35001DED: mov esi, 0x35005128 */ 2972 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x35001DF2: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 2973 ecx = edx; /* 0x35001DF4: mov ecx, edx */ 2974 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 2975 ecx = ecx & 3; /* 0x35001DF6: and ecx, 3 */ 2976 _cf = 0; 2977 _flag_k = FK_TEST; 2978 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x35001DF9: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 2979 eax = MEM32(ebp + (-0x20)); /* 0x35001DFB: mov eax, dword ptr [ebp - 0x20] */ 2980 esi = MEM32(ebp + (-0x14)); /* 0x35001DFE: mov esi, dword ptr [ebp - 0x14] */ 2981 MEM32(ebp + (-0x1C)) = ebx; /* 0x35001E01: mov dword ptr [ebp - 0x1c], ebx */ 2982 MEM8(eax + ebx) = (uint8_t)(0); /* 0x35001E04: mov byte ptr [eax + ebx], 0 */ 2983 L_35001E08: 2984 ecx = ebp + (-0x24); /* 0x35001E08: lea ecx, [ebp - 0x24] */ 2985 PUSH32(esp, 0x35001D10u); /* 0x35001E0B: push 0x35001d10 */ 2986 PUSH32(esp, ecx); /* 0x35001E10: push ecx */ 2987 MEM32(ebp + (-0x4)) = 0; /* 0x35001E11: mov dword ptr [ebp - 4], 0 */ 2988 RECOMP_ICALL(MEM32(0x350030D4)); /* 0x35001E18: call dword ptr [0x350030d4] */ 2989 RECOMP_FLAGS_IN(); 2990 eax = MEM32(ebp + (-0x20)); /* 0x35001E1E: mov eax, dword ptr [ebp - 0x20] */ 2991 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2992 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2993 esp = esp + 8; /* 0x35001E21: add esp, 8 */ 2994 _flag_k = FK_ADD; 2995 /* test eax, eax */ /* 0x35001E24: test eax, eax */ 2996 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2997 _cf = 0; 2998 _flag_k = FK_TEST; 2999 if (TEST_Z(_flag_a, _flag_b)) goto L_35001E55; /* 0x35001E26: je 0x35001e55 */ 3000 L_35001E28: 3001 ecx = eax + (-0x1); /* 0x35001E28: lea ecx, [eax - 1] */ 3002 SET_LO8(eax, MEM8(ecx)); /* 0x35001E2B: mov al, byte ptr [ecx] */ 3003 /* test LO8(eax), LO8(eax) */ /* 0x35001E2D: test al, al */ 3004 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3005 _cf = 0; 3006 _flag_k = FK_NARROW(FK_TEST, 24); 3007 if (TEST_Z(_flag_a, _flag_b)) goto L_35001E4C; /* 0x35001E2F: je 0x35001e4c */ 3008 L_35001E31: 3009 /* cmp LO8(eax), 0xFFu */ /* 0x35001E31: cmp al, 0xff */ 3010 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 3011 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3012 _flag_k = FK_NARROW(FK_CMP, 24); 3013 if (CMP_EQ(_flag_a, _flag_b)) goto L_35001E4C; /* 0x35001E33: je 0x35001e4c */ 3014 L_35001E35: 3015 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 3016 SET_LO8(eax, LO8(eax) - 1); /* 0x35001E35: dec al */ 3017 _flag_k = FK_NARROW(FK_DEC, 24); 3018 edi = POP32_VAL(esp); /* 0x35001E37: pop edi */ 3019 MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x35001E38: mov byte ptr [ecx], al */ 3020 eax = esi; /* 0x35001E3A: mov eax, esi */ 3021 esi = POP32_VAL(esp); /* 0x35001E3C: pop esi */ 3022 ebx = POP32_VAL(esp); /* 0x35001E3D: pop ebx */ 3023 ecx = MEM32(ebp + (-0xC)); /* 0x35001E3E: mov ecx, dword ptr [ebp - 0xc] */ 3024 MEM32(FS_BASE + (0)) = ecx; /* 0x35001E41: mov dword ptr fs:[0], ecx */ 3025 esp = ebp; /* 0x35001E48: mov esp, ebp */ 3026 ebp = POP32_VAL(esp); /* 0x35001E4A: pop ebp */ 3027 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001E4B: ret */ 3028 L_35001E4C: 3029 PUSH32(esp, ecx); /* 0x35001E4C: push ecx */ 3030 RECOMP_ICALL(0x35002194u); /* 0x35001E4D: call 0x35002194 */ /* not lifted */ 3031 RECOMP_FLAGS_IN(); 3032 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3033 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3034 esp = esp + 4; /* 0x35001E52: add esp, 4 */ 3035 _flag_k = FK_ADD; 3036 L_35001E55: 3037 ecx = MEM32(ebp + (-0xC)); /* 0x35001E55: mov ecx, dword ptr [ebp - 0xc] */ 3038 edi = POP32_VAL(esp); /* 0x35001E58: pop edi */ 3039 eax = esi; /* 0x35001E59: mov eax, esi */ 3040 esi = POP32_VAL(esp); /* 0x35001E5B: pop esi */ 3041 ebx = POP32_VAL(esp); /* 0x35001E5C: pop ebx */ 3042 MEM32(FS_BASE + (0)) = ecx; /* 0x35001E5D: mov dword ptr fs:[0], ecx */ 3043 esp = ebp; /* 0x35001E64: mov esp, ebp */ 3044 ebp = POP32_VAL(esp); /* 0x35001E66: pop ebp */ 3045 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001E67: ret */ 3046 RECOMP_REGS_OUT(); 3047 } 3048 3049 void sub_35001D90(void) { 3050 int _fpu_cmp = 0; 3051 uint32_t _cf = 0; 3052 int _df = 1; 3053 uint32_t _flag_k = FK_NONE; 3054 uint32_t _flag_a = 0, _flag_b = 0; 3055 uint32_t _itail_tgt = 0; 3056 RECOMP_REGS_LOCALS 3057 RECOMP_ENTER(0x35001D90u); 3058 3059 L_35001D90: 3060 PUSH32(esp, ebp); /* 0x35001D90: push ebp */ 3061 ebp = esp; /* 0x35001D91: mov ebp, esp */ 3062 PUSH32(esp, 0xFFFFFFFFu); /* 0x35001D93: push -1 */ 3063 PUSH32(esp, 0x35002509u); /* 0x35001D95: push 0x35002509 */ 3064 eax = MEM32(FS_BASE + (0)); /* 0x35001D9A: mov eax, dword ptr fs:[0] */ 3065 PUSH32(esp, eax); /* 0x35001DA0: push eax */ 3066 MEM32(FS_BASE + (0)) = esp; /* 0x35001DA1: mov dword ptr fs:[0], esp */ 3067 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u); 3068 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3069 esp = esp - 0x18u; /* 0x35001DA8: sub esp, 0x18 */ 3070 _flag_k = FK_CMP; 3071 SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x35001DAB: mov al, byte ptr [ebp - 0xd] */ 3072 PUSH32(esp, ebx); /* 0x35001DAE: push ebx */ 3073 PUSH32(esp, esi); /* 0x35001DAF: push esi */ 3074 esi = ecx; /* 0x35001DB0: mov esi, ecx */ 3075 PUSH32(esp, edi); /* 0x35001DB2: push edi */ 3076 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 3077 ecx = ecx | 0xFFFFFFFFu; /* 0x35001DB3: or ecx, 0xffffffff */ 3078 _cf = 0; 3079 _flag_k = FK_TEST; 3080 MEM8(ebp + (-0x24)) = (uint8_t)(LO8(eax)); /* 0x35001DB6: mov byte ptr [ebp - 0x24], al */ 3081 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3082 eax = 0; /* 0x35001DB9: xor eax, eax */ 3083 _cf = 0; 3084 _flag_k = FK_TEST; 3085 edi = 0x35005128u; /* 0x35001DBB: mov edi, 0x35005128 */ 3086 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x35001DC0: repne scasb al, byte ptr es:[edi] */ 3087 ecx = ~ecx; /* 0x35001DC2: not ecx */ 3088 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 3089 ecx = ecx - 1; /* 0x35001DC4: dec ecx */ 3090 _flag_k = FK_DEC; 3091 ebx = ecx; /* 0x35001DC5: mov ebx, ecx */ 3092 PUSH32(esp, 1); /* 0x35001DC7: push 1 */ 3093 PUSH32(esp, ebx); /* 0x35001DC9: push ebx */ 3094 ecx = ebp + (-0x24); /* 0x35001DCA: lea ecx, [ebp - 0x24] */ 3095 MEM32(ebp + (-0x14)) = esi; /* 0x35001DCD: mov dword ptr [ebp - 0x14], esi */ 3096 MEM32(ebp + (-0x20)) = eax; /* 0x35001DD0: mov dword ptr [ebp - 0x20], eax */ 3097 MEM32(ebp + (-0x1C)) = eax; /* 0x35001DD3: mov dword ptr [ebp - 0x1c], eax */ 3098 MEM32(ebp + (-0x18)) = eax; /* 0x35001DD6: mov dword ptr [ebp - 0x18], eax */ 3099 RECOMP_ICALL(MEM32(0x35003040)); /* 0x35001DD9: call dword ptr [0x35003040] */ 3100 RECOMP_FLAGS_IN(); 3101 /* test LO8(eax), LO8(eax) */ /* 0x35001DDF: test al, al */ 3102 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3103 _cf = 0; 3104 _flag_k = FK_NARROW(FK_TEST, 24); 3105 if (TEST_Z(_flag_a, _flag_b)) goto L_35001E08; /* 0x35001DE1: je 0x35001e08 */ 3106 L_35001DE3: 3107 edi = MEM32(ebp + (-0x20)); /* 0x35001DE3: mov edi, dword ptr [ebp - 0x20] */ 3108 ecx = ebx; /* 0x35001DE6: mov ecx, ebx */ 3109 edx = ecx; /* 0x35001DE8: mov edx, ecx */ 3110 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x35001DEA: shr ecx, 2 */ 3111 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 3112 ecx = ecx >> 2u; /* 0x35001DEA: shr ecx, 2 */ 3113 esi = 0x35005128u; /* 0x35001DED: mov esi, 0x35005128 */ 3114 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x35001DF2: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 3115 ecx = edx; /* 0x35001DF4: mov ecx, edx */ 3116 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 3117 ecx = ecx & 3; /* 0x35001DF6: and ecx, 3 */ 3118 _cf = 0; 3119 _flag_k = FK_TEST; 3120 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x35001DF9: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 3121 eax = MEM32(ebp + (-0x20)); /* 0x35001DFB: mov eax, dword ptr [ebp - 0x20] */ 3122 esi = MEM32(ebp + (-0x14)); /* 0x35001DFE: mov esi, dword ptr [ebp - 0x14] */ 3123 MEM32(ebp + (-0x1C)) = ebx; /* 0x35001E01: mov dword ptr [ebp - 0x1c], ebx */ 3124 MEM8(eax + ebx) = (uint8_t)(0); /* 0x35001E04: mov byte ptr [eax + ebx], 0 */ 3125 L_35001E08: 3126 ecx = ebp + (-0x24); /* 0x35001E08: lea ecx, [ebp - 0x24] */ 3127 PUSH32(esp, 0x35001D10u); /* 0x35001E0B: push 0x35001d10 */ 3128 PUSH32(esp, ecx); /* 0x35001E10: push ecx */ 3129 MEM32(ebp + (-0x4)) = 0; /* 0x35001E11: mov dword ptr [ebp - 4], 0 */ 3130 RECOMP_ICALL(MEM32(0x350030D4)); /* 0x35001E18: call dword ptr [0x350030d4] */ 3131 RECOMP_FLAGS_IN(); 3132 eax = MEM32(ebp + (-0x20)); /* 0x35001E1E: mov eax, dword ptr [ebp - 0x20] */ 3133 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3134 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3135 esp = esp + 8; /* 0x35001E21: add esp, 8 */ 3136 _flag_k = FK_ADD; 3137 /* test eax, eax */ /* 0x35001E24: test eax, eax */ 3138 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3139 _cf = 0; 3140 _flag_k = FK_TEST; 3141 if (TEST_Z(_flag_a, _flag_b)) goto L_35001E55; /* 0x35001E26: je 0x35001e55 */ 3142 L_35001E28: 3143 ecx = eax + (-0x1); /* 0x35001E28: lea ecx, [eax - 1] */ 3144 SET_LO8(eax, MEM8(ecx)); /* 0x35001E2B: mov al, byte ptr [ecx] */ 3145 /* test LO8(eax), LO8(eax) */ /* 0x35001E2D: test al, al */ 3146 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3147 _cf = 0; 3148 _flag_k = FK_NARROW(FK_TEST, 24); 3149 if (TEST_Z(_flag_a, _flag_b)) goto L_35001E4C; /* 0x35001E2F: je 0x35001e4c */ 3150 L_35001E31: 3151 /* cmp LO8(eax), 0xFFu */ /* 0x35001E31: cmp al, 0xff */ 3152 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 3153 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3154 _flag_k = FK_NARROW(FK_CMP, 24); 3155 if (CMP_EQ(_flag_a, _flag_b)) goto L_35001E4C; /* 0x35001E33: je 0x35001e4c */ 3156 L_35001E35: 3157 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 3158 SET_LO8(eax, LO8(eax) - 1); /* 0x35001E35: dec al */ 3159 _flag_k = FK_NARROW(FK_DEC, 24); 3160 edi = POP32_VAL(esp); /* 0x35001E37: pop edi */ 3161 MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x35001E38: mov byte ptr [ecx], al */ 3162 eax = esi; /* 0x35001E3A: mov eax, esi */ 3163 esi = POP32_VAL(esp); /* 0x35001E3C: pop esi */ 3164 ebx = POP32_VAL(esp); /* 0x35001E3D: pop ebx */ 3165 ecx = MEM32(ebp + (-0xC)); /* 0x35001E3E: mov ecx, dword ptr [ebp - 0xc] */ 3166 MEM32(FS_BASE + (0)) = ecx; /* 0x35001E41: mov dword ptr fs:[0], ecx */ 3167 esp = ebp; /* 0x35001E48: mov esp, ebp */ 3168 ebp = POP32_VAL(esp); /* 0x35001E4A: pop ebp */ 3169 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001E4B: ret */ 3170 L_35001E4C: 3171 PUSH32(esp, ecx); /* 0x35001E4C: push ecx */ 3172 RECOMP_ICALL(0x35002194u); /* 0x35001E4D: call 0x35002194 */ /* not lifted */ 3173 RECOMP_FLAGS_IN(); 3174 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3175 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3176 esp = esp + 4; /* 0x35001E52: add esp, 4 */ 3177 _flag_k = FK_ADD; 3178 L_35001E55: 3179 ecx = MEM32(ebp + (-0xC)); /* 0x35001E55: mov ecx, dword ptr [ebp - 0xc] */ 3180 edi = POP32_VAL(esp); /* 0x35001E58: pop edi */ 3181 eax = esi; /* 0x35001E59: mov eax, esi */ 3182 esi = POP32_VAL(esp); /* 0x35001E5B: pop esi */ 3183 ebx = POP32_VAL(esp); /* 0x35001E5C: pop ebx */ 3184 MEM32(FS_BASE + (0)) = ecx; /* 0x35001E5D: mov dword ptr fs:[0], ecx */ 3185 esp = ebp; /* 0x35001E64: mov esp, ebp */ 3186 ebp = POP32_VAL(esp); /* 0x35001E66: pop ebp */ 3187 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001E67: ret */ 3188 RECOMP_REGS_OUT(); 3189 } 3190 3191 void sub_35001E70(void) { 3192 int _fpu_cmp = 0; 3193 uint32_t _cf = 0; 3194 int _df = 1; 3195 uint32_t _flag_k = FK_NONE; 3196 uint32_t _flag_a = 0, _flag_b = 0; 3197 uint32_t _itail_tgt = 0; 3198 RECOMP_REGS_LOCALS 3199 RECOMP_ENTER(0x35001E70u); 3200 3201 L_35001E70: 3202 PUSH32(esp, ebp); /* 0x35001E70: push ebp */ 3203 ebp = esp; /* 0x35001E71: mov ebp, esp */ 3204 PUSH32(esp, 0xFFFFFFFFu); /* 0x35001E73: push -1 */ 3205 PUSH32(esp, 0x3500252Bu); /* 0x35001E75: push 0x3500252b */ 3206 eax = MEM32(FS_BASE + (0)); /* 0x35001E7A: mov eax, dword ptr fs:[0] */ 3207 PUSH32(esp, eax); /* 0x35001E80: push eax */ 3208 MEM32(FS_BASE + (0)) = esp; /* 0x35001E81: mov dword ptr fs:[0], esp */ 3209 PUSH32(esp, ecx); /* 0x35001E88: push ecx */ 3210 PUSH32(esp, 0x38u); /* 0x35001E89: push 0x38 */ 3211 RECOMP_ICALL(0x350022E0u); /* 0x35001E8B: call 0x350022e0 */ /* not lifted */ 3212 RECOMP_FLAGS_IN(); 3213 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3214 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3215 esp = esp + 4; /* 0x35001E90: add esp, 4 */ 3216 _flag_k = FK_ADD; 3217 MEM32(ebp + (-0x10)) = eax; /* 0x35001E93: mov dword ptr [ebp - 0x10], eax */ 3218 /* test eax, eax */ /* 0x35001E96: test eax, eax */ 3219 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3220 _cf = 0; 3221 _flag_k = FK_TEST; 3222 MEM32(ebp + (-0x4)) = 0; /* 0x35001E98: mov dword ptr [ebp - 4], 0 */ 3223 if (TEST_Z(_flag_a, _flag_b)) goto L_35001EB6; /* 0x35001E9F: je 0x35001eb6 */ 3224 L_35001EA1: 3225 ecx = eax; /* 0x35001EA1: mov ecx, eax */ 3226 RECOMP_ICALL(0x35001990u); /* 0x35001EA3: call 0x35001990 */ /* not lifted */ 3227 RECOMP_FLAGS_IN(); 3228 ecx = MEM32(ebp + (-0xC)); /* 0x35001EA8: mov ecx, dword ptr [ebp - 0xc] */ 3229 MEM32(FS_BASE + (0)) = ecx; /* 0x35001EAB: mov dword ptr fs:[0], ecx */ 3230 esp = ebp; /* 0x35001EB2: mov esp, ebp */ 3231 ebp = POP32_VAL(esp); /* 0x35001EB4: pop ebp */ 3232 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001EB5: ret */ 3233 L_35001EB6: 3234 ecx = MEM32(ebp + (-0xC)); /* 0x35001EB6: mov ecx, dword ptr [ebp - 0xc] */ 3235 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3236 eax = 0; /* 0x35001EB9: xor eax, eax */ 3237 _cf = 0; 3238 _flag_k = FK_TEST; 3239 MEM32(FS_BASE + (0)) = ecx; /* 0x35001EBB: mov dword ptr fs:[0], ecx */ 3240 esp = ebp; /* 0x35001EC2: mov esp, ebp */ 3241 ebp = POP32_VAL(esp); /* 0x35001EC4: pop ebp */ 3242 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001EC5: ret */ 3243 RECOMP_REGS_OUT(); 3244 } 3245 3246 void sub_35001ED0(void) { 3247 int _fpu_cmp = 0; 3248 uint32_t _cf = 0; 3249 int _df = 1; 3250 uint32_t _flag_k = FK_NONE; 3251 uint32_t _flag_a = 0, _flag_b = 0; 3252 uint32_t _itail_tgt = 0; 3253 RECOMP_REGS_LOCALS 3254 RECOMP_ENTER(0x35001ED0u); 3255 3256 L_35001ED0: 3257 goto L_35001EE0; /* 0x35001ED0: jmp 0x35001ee0 */ 3258 L_35001EE0: 3259 ecx = 0x3500517Au; /* 0x35001EE0: mov ecx, 0x3500517a */ 3260 goto L_35001EF0; /* 0x35001EE5: jmp 0x35001ef0 */ 3261 L_35001EF0: 3262 PUSH32(esp, ebp); /* 0x35001EF0: push ebp */ 3263 ebp = esp; /* 0x35001EF1: mov ebp, esp */ 3264 PUSH32(esp, 0xFFFFFFFFu); /* 0x35001EF3: push -1 */ 3265 PUSH32(esp, 0x35002549u); /* 0x35001EF5: push 0x35002549 */ 3266 eax = MEM32(FS_BASE + (0)); /* 0x35001EFA: mov eax, dword ptr fs:[0] */ 3267 PUSH32(esp, eax); /* 0x35001F00: push eax */ 3268 MEM32(FS_BASE + (0)) = esp; /* 0x35001F01: mov dword ptr fs:[0], esp */ 3269 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u); 3270 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3271 esp = esp - 0x18u; /* 0x35001F08: sub esp, 0x18 */ 3272 _flag_k = FK_CMP; 3273 SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x35001F0B: mov al, byte ptr [ebp - 0xd] */ 3274 PUSH32(esp, ebx); /* 0x35001F0E: push ebx */ 3275 PUSH32(esp, esi); /* 0x35001F0F: push esi */ 3276 esi = ecx; /* 0x35001F10: mov esi, ecx */ 3277 PUSH32(esp, edi); /* 0x35001F12: push edi */ 3278 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 3279 ecx = ecx | 0xFFFFFFFFu; /* 0x35001F13: or ecx, 0xffffffff */ 3280 _cf = 0; 3281 _flag_k = FK_TEST; 3282 MEM8(ebp + (-0x24)) = (uint8_t)(LO8(eax)); /* 0x35001F16: mov byte ptr [ebp - 0x24], al */ 3283 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3284 eax = 0; /* 0x35001F19: xor eax, eax */ 3285 _cf = 0; 3286 _flag_k = FK_TEST; 3287 edi = 0x35005114u; /* 0x35001F1B: mov edi, 0x35005114 */ 3288 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x35001F20: repne scasb al, byte ptr es:[edi] */ 3289 ecx = ~ecx; /* 0x35001F22: not ecx */ 3290 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 3291 ecx = ecx - 1; /* 0x35001F24: dec ecx */ 3292 _flag_k = FK_DEC; 3293 ebx = ecx; /* 0x35001F25: mov ebx, ecx */ 3294 PUSH32(esp, 1); /* 0x35001F27: push 1 */ 3295 PUSH32(esp, ebx); /* 0x35001F29: push ebx */ 3296 ecx = ebp + (-0x24); /* 0x35001F2A: lea ecx, [ebp - 0x24] */ 3297 MEM32(ebp + (-0x14)) = esi; /* 0x35001F2D: mov dword ptr [ebp - 0x14], esi */ 3298 MEM32(ebp + (-0x20)) = eax; /* 0x35001F30: mov dword ptr [ebp - 0x20], eax */ 3299 MEM32(ebp + (-0x1C)) = eax; /* 0x35001F33: mov dword ptr [ebp - 0x1c], eax */ 3300 MEM32(ebp + (-0x18)) = eax; /* 0x35001F36: mov dword ptr [ebp - 0x18], eax */ 3301 RECOMP_ICALL(MEM32(0x35003040)); /* 0x35001F39: call dword ptr [0x35003040] */ 3302 RECOMP_FLAGS_IN(); 3303 /* test LO8(eax), LO8(eax) */ /* 0x35001F3F: test al, al */ 3304 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3305 _cf = 0; 3306 _flag_k = FK_NARROW(FK_TEST, 24); 3307 if (TEST_Z(_flag_a, _flag_b)) goto L_35001F68; /* 0x35001F41: je 0x35001f68 */ 3308 L_35001F43: 3309 edi = MEM32(ebp + (-0x20)); /* 0x35001F43: mov edi, dword ptr [ebp - 0x20] */ 3310 ecx = ebx; /* 0x35001F46: mov ecx, ebx */ 3311 edx = ecx; /* 0x35001F48: mov edx, ecx */ 3312 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x35001F4A: shr ecx, 2 */ 3313 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 3314 ecx = ecx >> 2u; /* 0x35001F4A: shr ecx, 2 */ 3315 esi = 0x35005114u; /* 0x35001F4D: mov esi, 0x35005114 */ 3316 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x35001F52: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 3317 ecx = edx; /* 0x35001F54: mov ecx, edx */ 3318 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 3319 ecx = ecx & 3; /* 0x35001F56: and ecx, 3 */ 3320 _cf = 0; 3321 _flag_k = FK_TEST; 3322 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x35001F59: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 3323 eax = MEM32(ebp + (-0x20)); /* 0x35001F5B: mov eax, dword ptr [ebp - 0x20] */ 3324 esi = MEM32(ebp + (-0x14)); /* 0x35001F5E: mov esi, dword ptr [ebp - 0x14] */ 3325 MEM32(ebp + (-0x1C)) = ebx; /* 0x35001F61: mov dword ptr [ebp - 0x1c], ebx */ 3326 MEM8(eax + ebx) = (uint8_t)(0); /* 0x35001F64: mov byte ptr [eax + ebx], 0 */ 3327 L_35001F68: 3328 ecx = ebp + (-0x24); /* 0x35001F68: lea ecx, [ebp - 0x24] */ 3329 PUSH32(esp, 0x35001E70u); /* 0x35001F6B: push 0x35001e70 */ 3330 PUSH32(esp, ecx); /* 0x35001F70: push ecx */ 3331 MEM32(ebp + (-0x4)) = 0; /* 0x35001F71: mov dword ptr [ebp - 4], 0 */ 3332 RECOMP_ICALL(MEM32(0x350030D4)); /* 0x35001F78: call dword ptr [0x350030d4] */ 3333 RECOMP_FLAGS_IN(); 3334 eax = MEM32(ebp + (-0x20)); /* 0x35001F7E: mov eax, dword ptr [ebp - 0x20] */ 3335 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3336 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3337 esp = esp + 8; /* 0x35001F81: add esp, 8 */ 3338 _flag_k = FK_ADD; 3339 /* test eax, eax */ /* 0x35001F84: test eax, eax */ 3340 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3341 _cf = 0; 3342 _flag_k = FK_TEST; 3343 if (TEST_Z(_flag_a, _flag_b)) goto L_35001FB5; /* 0x35001F86: je 0x35001fb5 */ 3344 L_35001F88: 3345 ecx = eax + (-0x1); /* 0x35001F88: lea ecx, [eax - 1] */ 3346 SET_LO8(eax, MEM8(ecx)); /* 0x35001F8B: mov al, byte ptr [ecx] */ 3347 /* test LO8(eax), LO8(eax) */ /* 0x35001F8D: test al, al */ 3348 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3349 _cf = 0; 3350 _flag_k = FK_NARROW(FK_TEST, 24); 3351 if (TEST_Z(_flag_a, _flag_b)) goto L_35001FAC; /* 0x35001F8F: je 0x35001fac */ 3352 L_35001F91: 3353 /* cmp LO8(eax), 0xFFu */ /* 0x35001F91: cmp al, 0xff */ 3354 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 3355 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3356 _flag_k = FK_NARROW(FK_CMP, 24); 3357 if (CMP_EQ(_flag_a, _flag_b)) goto L_35001FAC; /* 0x35001F93: je 0x35001fac */ 3358 L_35001F95: 3359 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 3360 SET_LO8(eax, LO8(eax) - 1); /* 0x35001F95: dec al */ 3361 _flag_k = FK_NARROW(FK_DEC, 24); 3362 edi = POP32_VAL(esp); /* 0x35001F97: pop edi */ 3363 MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x35001F98: mov byte ptr [ecx], al */ 3364 eax = esi; /* 0x35001F9A: mov eax, esi */ 3365 esi = POP32_VAL(esp); /* 0x35001F9C: pop esi */ 3366 ebx = POP32_VAL(esp); /* 0x35001F9D: pop ebx */ 3367 ecx = MEM32(ebp + (-0xC)); /* 0x35001F9E: mov ecx, dword ptr [ebp - 0xc] */ 3368 MEM32(FS_BASE + (0)) = ecx; /* 0x35001FA1: mov dword ptr fs:[0], ecx */ 3369 esp = ebp; /* 0x35001FA8: mov esp, ebp */ 3370 ebp = POP32_VAL(esp); /* 0x35001FAA: pop ebp */ 3371 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001FAB: ret */ 3372 L_35001FAC: 3373 PUSH32(esp, ecx); /* 0x35001FAC: push ecx */ 3374 RECOMP_ICALL(0x35002194u); /* 0x35001FAD: call 0x35002194 */ /* not lifted */ 3375 RECOMP_FLAGS_IN(); 3376 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3377 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3378 esp = esp + 4; /* 0x35001FB2: add esp, 4 */ 3379 _flag_k = FK_ADD; 3380 L_35001FB5: 3381 ecx = MEM32(ebp + (-0xC)); /* 0x35001FB5: mov ecx, dword ptr [ebp - 0xc] */ 3382 edi = POP32_VAL(esp); /* 0x35001FB8: pop edi */ 3383 eax = esi; /* 0x35001FB9: mov eax, esi */ 3384 esi = POP32_VAL(esp); /* 0x35001FBB: pop esi */ 3385 ebx = POP32_VAL(esp); /* 0x35001FBC: pop ebx */ 3386 MEM32(FS_BASE + (0)) = ecx; /* 0x35001FBD: mov dword ptr fs:[0], ecx */ 3387 esp = ebp; /* 0x35001FC4: mov esp, ebp */ 3388 ebp = POP32_VAL(esp); /* 0x35001FC6: pop ebp */ 3389 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001FC7: ret */ 3390 RECOMP_REGS_OUT(); 3391 } 3392 3393 void sub_35001EE0(void) { 3394 int _fpu_cmp = 0; 3395 uint32_t _cf = 0; 3396 int _df = 1; 3397 uint32_t _flag_k = FK_NONE; 3398 uint32_t _flag_a = 0, _flag_b = 0; 3399 uint32_t _itail_tgt = 0; 3400 RECOMP_REGS_LOCALS 3401 RECOMP_ENTER(0x35001EE0u); 3402 3403 L_35001EE0: 3404 ecx = 0x3500517Au; /* 0x35001EE0: mov ecx, 0x3500517a */ 3405 goto L_35001EF0; /* 0x35001EE5: jmp 0x35001ef0 */ 3406 L_35001EF0: 3407 PUSH32(esp, ebp); /* 0x35001EF0: push ebp */ 3408 ebp = esp; /* 0x35001EF1: mov ebp, esp */ 3409 PUSH32(esp, 0xFFFFFFFFu); /* 0x35001EF3: push -1 */ 3410 PUSH32(esp, 0x35002549u); /* 0x35001EF5: push 0x35002549 */ 3411 eax = MEM32(FS_BASE + (0)); /* 0x35001EFA: mov eax, dword ptr fs:[0] */ 3412 PUSH32(esp, eax); /* 0x35001F00: push eax */ 3413 MEM32(FS_BASE + (0)) = esp; /* 0x35001F01: mov dword ptr fs:[0], esp */ 3414 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u); 3415 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3416 esp = esp - 0x18u; /* 0x35001F08: sub esp, 0x18 */ 3417 _flag_k = FK_CMP; 3418 SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x35001F0B: mov al, byte ptr [ebp - 0xd] */ 3419 PUSH32(esp, ebx); /* 0x35001F0E: push ebx */ 3420 PUSH32(esp, esi); /* 0x35001F0F: push esi */ 3421 esi = ecx; /* 0x35001F10: mov esi, ecx */ 3422 PUSH32(esp, edi); /* 0x35001F12: push edi */ 3423 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 3424 ecx = ecx | 0xFFFFFFFFu; /* 0x35001F13: or ecx, 0xffffffff */ 3425 _cf = 0; 3426 _flag_k = FK_TEST; 3427 MEM8(ebp + (-0x24)) = (uint8_t)(LO8(eax)); /* 0x35001F16: mov byte ptr [ebp - 0x24], al */ 3428 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3429 eax = 0; /* 0x35001F19: xor eax, eax */ 3430 _cf = 0; 3431 _flag_k = FK_TEST; 3432 edi = 0x35005114u; /* 0x35001F1B: mov edi, 0x35005114 */ 3433 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x35001F20: repne scasb al, byte ptr es:[edi] */ 3434 ecx = ~ecx; /* 0x35001F22: not ecx */ 3435 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 3436 ecx = ecx - 1; /* 0x35001F24: dec ecx */ 3437 _flag_k = FK_DEC; 3438 ebx = ecx; /* 0x35001F25: mov ebx, ecx */ 3439 PUSH32(esp, 1); /* 0x35001F27: push 1 */ 3440 PUSH32(esp, ebx); /* 0x35001F29: push ebx */ 3441 ecx = ebp + (-0x24); /* 0x35001F2A: lea ecx, [ebp - 0x24] */ 3442 MEM32(ebp + (-0x14)) = esi; /* 0x35001F2D: mov dword ptr [ebp - 0x14], esi */ 3443 MEM32(ebp + (-0x20)) = eax; /* 0x35001F30: mov dword ptr [ebp - 0x20], eax */ 3444 MEM32(ebp + (-0x1C)) = eax; /* 0x35001F33: mov dword ptr [ebp - 0x1c], eax */ 3445 MEM32(ebp + (-0x18)) = eax; /* 0x35001F36: mov dword ptr [ebp - 0x18], eax */ 3446 RECOMP_ICALL(MEM32(0x35003040)); /* 0x35001F39: call dword ptr [0x35003040] */ 3447 RECOMP_FLAGS_IN(); 3448 /* test LO8(eax), LO8(eax) */ /* 0x35001F3F: test al, al */ 3449 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3450 _cf = 0; 3451 _flag_k = FK_NARROW(FK_TEST, 24); 3452 if (TEST_Z(_flag_a, _flag_b)) goto L_35001F68; /* 0x35001F41: je 0x35001f68 */ 3453 L_35001F43: 3454 edi = MEM32(ebp + (-0x20)); /* 0x35001F43: mov edi, dword ptr [ebp - 0x20] */ 3455 ecx = ebx; /* 0x35001F46: mov ecx, ebx */ 3456 edx = ecx; /* 0x35001F48: mov edx, ecx */ 3457 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x35001F4A: shr ecx, 2 */ 3458 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 3459 ecx = ecx >> 2u; /* 0x35001F4A: shr ecx, 2 */ 3460 esi = 0x35005114u; /* 0x35001F4D: mov esi, 0x35005114 */ 3461 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x35001F52: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 3462 ecx = edx; /* 0x35001F54: mov ecx, edx */ 3463 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 3464 ecx = ecx & 3; /* 0x35001F56: and ecx, 3 */ 3465 _cf = 0; 3466 _flag_k = FK_TEST; 3467 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x35001F59: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 3468 eax = MEM32(ebp + (-0x20)); /* 0x35001F5B: mov eax, dword ptr [ebp - 0x20] */ 3469 esi = MEM32(ebp + (-0x14)); /* 0x35001F5E: mov esi, dword ptr [ebp - 0x14] */ 3470 MEM32(ebp + (-0x1C)) = ebx; /* 0x35001F61: mov dword ptr [ebp - 0x1c], ebx */ 3471 MEM8(eax + ebx) = (uint8_t)(0); /* 0x35001F64: mov byte ptr [eax + ebx], 0 */ 3472 L_35001F68: 3473 ecx = ebp + (-0x24); /* 0x35001F68: lea ecx, [ebp - 0x24] */ 3474 PUSH32(esp, 0x35001E70u); /* 0x35001F6B: push 0x35001e70 */ 3475 PUSH32(esp, ecx); /* 0x35001F70: push ecx */ 3476 MEM32(ebp + (-0x4)) = 0; /* 0x35001F71: mov dword ptr [ebp - 4], 0 */ 3477 RECOMP_ICALL(MEM32(0x350030D4)); /* 0x35001F78: call dword ptr [0x350030d4] */ 3478 RECOMP_FLAGS_IN(); 3479 eax = MEM32(ebp + (-0x20)); /* 0x35001F7E: mov eax, dword ptr [ebp - 0x20] */ 3480 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3481 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3482 esp = esp + 8; /* 0x35001F81: add esp, 8 */ 3483 _flag_k = FK_ADD; 3484 /* test eax, eax */ /* 0x35001F84: test eax, eax */ 3485 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3486 _cf = 0; 3487 _flag_k = FK_TEST; 3488 if (TEST_Z(_flag_a, _flag_b)) goto L_35001FB5; /* 0x35001F86: je 0x35001fb5 */ 3489 L_35001F88: 3490 ecx = eax + (-0x1); /* 0x35001F88: lea ecx, [eax - 1] */ 3491 SET_LO8(eax, MEM8(ecx)); /* 0x35001F8B: mov al, byte ptr [ecx] */ 3492 /* test LO8(eax), LO8(eax) */ /* 0x35001F8D: test al, al */ 3493 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3494 _cf = 0; 3495 _flag_k = FK_NARROW(FK_TEST, 24); 3496 if (TEST_Z(_flag_a, _flag_b)) goto L_35001FAC; /* 0x35001F8F: je 0x35001fac */ 3497 L_35001F91: 3498 /* cmp LO8(eax), 0xFFu */ /* 0x35001F91: cmp al, 0xff */ 3499 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 3500 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3501 _flag_k = FK_NARROW(FK_CMP, 24); 3502 if (CMP_EQ(_flag_a, _flag_b)) goto L_35001FAC; /* 0x35001F93: je 0x35001fac */ 3503 L_35001F95: 3504 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 3505 SET_LO8(eax, LO8(eax) - 1); /* 0x35001F95: dec al */ 3506 _flag_k = FK_NARROW(FK_DEC, 24); 3507 edi = POP32_VAL(esp); /* 0x35001F97: pop edi */ 3508 MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x35001F98: mov byte ptr [ecx], al */ 3509 eax = esi; /* 0x35001F9A: mov eax, esi */ 3510 esi = POP32_VAL(esp); /* 0x35001F9C: pop esi */ 3511 ebx = POP32_VAL(esp); /* 0x35001F9D: pop ebx */ 3512 ecx = MEM32(ebp + (-0xC)); /* 0x35001F9E: mov ecx, dword ptr [ebp - 0xc] */ 3513 MEM32(FS_BASE + (0)) = ecx; /* 0x35001FA1: mov dword ptr fs:[0], ecx */ 3514 esp = ebp; /* 0x35001FA8: mov esp, ebp */ 3515 ebp = POP32_VAL(esp); /* 0x35001FAA: pop ebp */ 3516 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001FAB: ret */ 3517 L_35001FAC: 3518 PUSH32(esp, ecx); /* 0x35001FAC: push ecx */ 3519 RECOMP_ICALL(0x35002194u); /* 0x35001FAD: call 0x35002194 */ /* not lifted */ 3520 RECOMP_FLAGS_IN(); 3521 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3522 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3523 esp = esp + 4; /* 0x35001FB2: add esp, 4 */ 3524 _flag_k = FK_ADD; 3525 L_35001FB5: 3526 ecx = MEM32(ebp + (-0xC)); /* 0x35001FB5: mov ecx, dword ptr [ebp - 0xc] */ 3527 edi = POP32_VAL(esp); /* 0x35001FB8: pop edi */ 3528 eax = esi; /* 0x35001FB9: mov eax, esi */ 3529 esi = POP32_VAL(esp); /* 0x35001FBB: pop esi */ 3530 ebx = POP32_VAL(esp); /* 0x35001FBC: pop ebx */ 3531 MEM32(FS_BASE + (0)) = ecx; /* 0x35001FBD: mov dword ptr fs:[0], ecx */ 3532 esp = ebp; /* 0x35001FC4: mov esp, ebp */ 3533 ebp = POP32_VAL(esp); /* 0x35001FC6: pop ebp */ 3534 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001FC7: ret */ 3535 RECOMP_REGS_OUT(); 3536 } 3537 3538 void sub_35001EF0(void) { 3539 int _fpu_cmp = 0; 3540 uint32_t _cf = 0; 3541 int _df = 1; 3542 uint32_t _flag_k = FK_NONE; 3543 uint32_t _flag_a = 0, _flag_b = 0; 3544 uint32_t _itail_tgt = 0; 3545 RECOMP_REGS_LOCALS 3546 RECOMP_ENTER(0x35001EF0u); 3547 3548 L_35001EF0: 3549 PUSH32(esp, ebp); /* 0x35001EF0: push ebp */ 3550 ebp = esp; /* 0x35001EF1: mov ebp, esp */ 3551 PUSH32(esp, 0xFFFFFFFFu); /* 0x35001EF3: push -1 */ 3552 PUSH32(esp, 0x35002549u); /* 0x35001EF5: push 0x35002549 */ 3553 eax = MEM32(FS_BASE + (0)); /* 0x35001EFA: mov eax, dword ptr fs:[0] */ 3554 PUSH32(esp, eax); /* 0x35001F00: push eax */ 3555 MEM32(FS_BASE + (0)) = esp; /* 0x35001F01: mov dword ptr fs:[0], esp */ 3556 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u); 3557 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3558 esp = esp - 0x18u; /* 0x35001F08: sub esp, 0x18 */ 3559 _flag_k = FK_CMP; 3560 SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x35001F0B: mov al, byte ptr [ebp - 0xd] */ 3561 PUSH32(esp, ebx); /* 0x35001F0E: push ebx */ 3562 PUSH32(esp, esi); /* 0x35001F0F: push esi */ 3563 esi = ecx; /* 0x35001F10: mov esi, ecx */ 3564 PUSH32(esp, edi); /* 0x35001F12: push edi */ 3565 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 3566 ecx = ecx | 0xFFFFFFFFu; /* 0x35001F13: or ecx, 0xffffffff */ 3567 _cf = 0; 3568 _flag_k = FK_TEST; 3569 MEM8(ebp + (-0x24)) = (uint8_t)(LO8(eax)); /* 0x35001F16: mov byte ptr [ebp - 0x24], al */ 3570 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3571 eax = 0; /* 0x35001F19: xor eax, eax */ 3572 _cf = 0; 3573 _flag_k = FK_TEST; 3574 edi = 0x35005114u; /* 0x35001F1B: mov edi, 0x35005114 */ 3575 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x35001F20: repne scasb al, byte ptr es:[edi] */ 3576 ecx = ~ecx; /* 0x35001F22: not ecx */ 3577 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 3578 ecx = ecx - 1; /* 0x35001F24: dec ecx */ 3579 _flag_k = FK_DEC; 3580 ebx = ecx; /* 0x35001F25: mov ebx, ecx */ 3581 PUSH32(esp, 1); /* 0x35001F27: push 1 */ 3582 PUSH32(esp, ebx); /* 0x35001F29: push ebx */ 3583 ecx = ebp + (-0x24); /* 0x35001F2A: lea ecx, [ebp - 0x24] */ 3584 MEM32(ebp + (-0x14)) = esi; /* 0x35001F2D: mov dword ptr [ebp - 0x14], esi */ 3585 MEM32(ebp + (-0x20)) = eax; /* 0x35001F30: mov dword ptr [ebp - 0x20], eax */ 3586 MEM32(ebp + (-0x1C)) = eax; /* 0x35001F33: mov dword ptr [ebp - 0x1c], eax */ 3587 MEM32(ebp + (-0x18)) = eax; /* 0x35001F36: mov dword ptr [ebp - 0x18], eax */ 3588 RECOMP_ICALL(MEM32(0x35003040)); /* 0x35001F39: call dword ptr [0x35003040] */ 3589 RECOMP_FLAGS_IN(); 3590 /* test LO8(eax), LO8(eax) */ /* 0x35001F3F: test al, al */ 3591 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3592 _cf = 0; 3593 _flag_k = FK_NARROW(FK_TEST, 24); 3594 if (TEST_Z(_flag_a, _flag_b)) goto L_35001F68; /* 0x35001F41: je 0x35001f68 */ 3595 L_35001F43: 3596 edi = MEM32(ebp + (-0x20)); /* 0x35001F43: mov edi, dword ptr [ebp - 0x20] */ 3597 ecx = ebx; /* 0x35001F46: mov ecx, ebx */ 3598 edx = ecx; /* 0x35001F48: mov edx, ecx */ 3599 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x35001F4A: shr ecx, 2 */ 3600 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 3601 ecx = ecx >> 2u; /* 0x35001F4A: shr ecx, 2 */ 3602 esi = 0x35005114u; /* 0x35001F4D: mov esi, 0x35005114 */ 3603 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x35001F52: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 3604 ecx = edx; /* 0x35001F54: mov ecx, edx */ 3605 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 3606 ecx = ecx & 3; /* 0x35001F56: and ecx, 3 */ 3607 _cf = 0; 3608 _flag_k = FK_TEST; 3609 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x35001F59: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 3610 eax = MEM32(ebp + (-0x20)); /* 0x35001F5B: mov eax, dword ptr [ebp - 0x20] */ 3611 esi = MEM32(ebp + (-0x14)); /* 0x35001F5E: mov esi, dword ptr [ebp - 0x14] */ 3612 MEM32(ebp + (-0x1C)) = ebx; /* 0x35001F61: mov dword ptr [ebp - 0x1c], ebx */ 3613 MEM8(eax + ebx) = (uint8_t)(0); /* 0x35001F64: mov byte ptr [eax + ebx], 0 */ 3614 L_35001F68: 3615 ecx = ebp + (-0x24); /* 0x35001F68: lea ecx, [ebp - 0x24] */ 3616 PUSH32(esp, 0x35001E70u); /* 0x35001F6B: push 0x35001e70 */ 3617 PUSH32(esp, ecx); /* 0x35001F70: push ecx */ 3618 MEM32(ebp + (-0x4)) = 0; /* 0x35001F71: mov dword ptr [ebp - 4], 0 */ 3619 RECOMP_ICALL(MEM32(0x350030D4)); /* 0x35001F78: call dword ptr [0x350030d4] */ 3620 RECOMP_FLAGS_IN(); 3621 eax = MEM32(ebp + (-0x20)); /* 0x35001F7E: mov eax, dword ptr [ebp - 0x20] */ 3622 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3623 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3624 esp = esp + 8; /* 0x35001F81: add esp, 8 */ 3625 _flag_k = FK_ADD; 3626 /* test eax, eax */ /* 0x35001F84: test eax, eax */ 3627 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3628 _cf = 0; 3629 _flag_k = FK_TEST; 3630 if (TEST_Z(_flag_a, _flag_b)) goto L_35001FB5; /* 0x35001F86: je 0x35001fb5 */ 3631 L_35001F88: 3632 ecx = eax + (-0x1); /* 0x35001F88: lea ecx, [eax - 1] */ 3633 SET_LO8(eax, MEM8(ecx)); /* 0x35001F8B: mov al, byte ptr [ecx] */ 3634 /* test LO8(eax), LO8(eax) */ /* 0x35001F8D: test al, al */ 3635 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3636 _cf = 0; 3637 _flag_k = FK_NARROW(FK_TEST, 24); 3638 if (TEST_Z(_flag_a, _flag_b)) goto L_35001FAC; /* 0x35001F8F: je 0x35001fac */ 3639 L_35001F91: 3640 /* cmp LO8(eax), 0xFFu */ /* 0x35001F91: cmp al, 0xff */ 3641 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 3642 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3643 _flag_k = FK_NARROW(FK_CMP, 24); 3644 if (CMP_EQ(_flag_a, _flag_b)) goto L_35001FAC; /* 0x35001F93: je 0x35001fac */ 3645 L_35001F95: 3646 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 3647 SET_LO8(eax, LO8(eax) - 1); /* 0x35001F95: dec al */ 3648 _flag_k = FK_NARROW(FK_DEC, 24); 3649 edi = POP32_VAL(esp); /* 0x35001F97: pop edi */ 3650 MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x35001F98: mov byte ptr [ecx], al */ 3651 eax = esi; /* 0x35001F9A: mov eax, esi */ 3652 esi = POP32_VAL(esp); /* 0x35001F9C: pop esi */ 3653 ebx = POP32_VAL(esp); /* 0x35001F9D: pop ebx */ 3654 ecx = MEM32(ebp + (-0xC)); /* 0x35001F9E: mov ecx, dword ptr [ebp - 0xc] */ 3655 MEM32(FS_BASE + (0)) = ecx; /* 0x35001FA1: mov dword ptr fs:[0], ecx */ 3656 esp = ebp; /* 0x35001FA8: mov esp, ebp */ 3657 ebp = POP32_VAL(esp); /* 0x35001FAA: pop ebp */ 3658 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001FAB: ret */ 3659 L_35001FAC: 3660 PUSH32(esp, ecx); /* 0x35001FAC: push ecx */ 3661 RECOMP_ICALL(0x35002194u); /* 0x35001FAD: call 0x35002194 */ /* not lifted */ 3662 RECOMP_FLAGS_IN(); 3663 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3664 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3665 esp = esp + 4; /* 0x35001FB2: add esp, 4 */ 3666 _flag_k = FK_ADD; 3667 L_35001FB5: 3668 ecx = MEM32(ebp + (-0xC)); /* 0x35001FB5: mov ecx, dword ptr [ebp - 0xc] */ 3669 edi = POP32_VAL(esp); /* 0x35001FB8: pop edi */ 3670 eax = esi; /* 0x35001FB9: mov eax, esi */ 3671 esi = POP32_VAL(esp); /* 0x35001FBB: pop esi */ 3672 ebx = POP32_VAL(esp); /* 0x35001FBC: pop ebx */ 3673 MEM32(FS_BASE + (0)) = ecx; /* 0x35001FBD: mov dword ptr fs:[0], ecx */ 3674 esp = ebp; /* 0x35001FC4: mov esp, ebp */ 3675 ebp = POP32_VAL(esp); /* 0x35001FC6: pop ebp */ 3676 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001FC7: ret */ 3677 RECOMP_REGS_OUT(); 3678 } 3679 3680 void sub_35001FD0(void) { 3681 int _fpu_cmp = 0; 3682 uint32_t _cf = 0; 3683 int _df = 1; 3684 uint32_t _flag_k = FK_NONE; 3685 uint32_t _flag_a = 0, _flag_b = 0; 3686 uint32_t _itail_tgt = 0; 3687 RECOMP_REGS_LOCALS 3688 RECOMP_ENTER(0x35001FD0u); 3689 3690 L_35001FD0: 3691 MEM8(0x3500517C) = (uint8_t)(1); /* 0x35001FD0: mov byte ptr [0x3500517c], 1 */ 3692 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35001FD7: ret */ 3693 RECOMP_REGS_OUT(); 3694 } 3695 3696 void sub_35001FE0(void) { 3697 int _fpu_cmp = 0; 3698 uint32_t _cf = 0; 3699 int _df = 1; 3700 uint32_t _flag_k = FK_NONE; 3701 uint32_t _flag_a = 0, _flag_b = 0; 3702 uint32_t _itail_tgt = 0; 3703 RECOMP_REGS_LOCALS 3704 RECOMP_ENTER(0x35001FE0u); 3705 3706 L_35001FE0: 3707 RECOMP_ICALL(0x35001FF0u); /* 0x35001FE0: call 0x35001ff0 */ /* not lifted */ 3708 RECOMP_FLAGS_IN(); 3709 goto L_35002000; /* 0x35001FE5: jmp 0x35002000 */ 3710 L_35002000: 3711 PUSH32(esp, 0x35002010u); /* 0x35002000: push 0x35002010 */ 3712 RECOMP_ICALL(0x350022BAu); /* 0x35002005: call 0x350022ba */ /* not lifted */ 3713 RECOMP_FLAGS_IN(); 3714 ecx = POP32_VAL(esp); /* 0x3500200A: pop ecx */ 3715 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3500200B: ret */ 3716 RECOMP_REGS_OUT(); 3717 } 3718 3719 void sub_35001FF0(void) { 3720 int _fpu_cmp = 0; 3721 uint32_t _cf = 0; 3722 int _df = 1; 3723 uint32_t _flag_k = FK_NONE; 3724 uint32_t _flag_a = 0, _flag_b = 0; 3725 uint32_t _itail_tgt = 0; 3726 RECOMP_REGS_LOCALS 3727 RECOMP_ENTER(0x35001FF0u); 3728 3729 L_35001FF0: 3730 ecx = 0x35005189u; /* 0x35001FF0: mov ecx, 0x35005189 */ 3731 L_35001FF5: 3732 { _itail_tgt = (uint32_t)(MEM32(0x35003024)); goto _ljump; } 3733 { RECOMP_REGS_OUT(); return; } /* end of function */ 3734 _ljump: 3735 switch (_itail_tgt) { 3736 case 0x35001FF0u: goto L_35001FF0; 3737 case 0x35001FF5u: goto L_35001FF5; 3738 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 3739 } 3740 RECOMP_REGS_OUT(); 3741 } 3742 3743 void sub_35002000(void) { 3744 int _fpu_cmp = 0; 3745 uint32_t _cf = 0; 3746 int _df = 1; 3747 uint32_t _flag_k = FK_NONE; 3748 uint32_t _flag_a = 0, _flag_b = 0; 3749 uint32_t _itail_tgt = 0; 3750 RECOMP_REGS_LOCALS 3751 RECOMP_ENTER(0x35002000u); 3752 3753 L_35002000: 3754 PUSH32(esp, 0x35002010u); /* 0x35002000: push 0x35002010 */ 3755 RECOMP_ICALL(0x350022BAu); /* 0x35002005: call 0x350022ba */ /* not lifted */ 3756 RECOMP_FLAGS_IN(); 3757 ecx = POP32_VAL(esp); /* 0x3500200A: pop ecx */ 3758 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3500200B: ret */ 3759 RECOMP_REGS_OUT(); 3760 } 3761 3762 void sub_35002010(void) { 3763 int _fpu_cmp = 0; 3764 uint32_t _cf = 0; 3765 int _df = 1; 3766 uint32_t _flag_k = FK_NONE; 3767 uint32_t _flag_a = 0, _flag_b = 0; 3768 uint32_t _itail_tgt = 0; 3769 RECOMP_REGS_LOCALS 3770 RECOMP_ENTER(0x35002010u); 3771 3772 L_35002010: 3773 ecx = 0x35005189u; /* 0x35002010: mov ecx, 0x35005189 */ 3774 L_35002015: 3775 { _itail_tgt = (uint32_t)(MEM32(0x3500304C)); goto _ljump; } 3776 { RECOMP_REGS_OUT(); return; } /* end of function */ 3777 _ljump: 3778 switch (_itail_tgt) { 3779 case 0x35002010u: goto L_35002010; 3780 case 0x35002015u: goto L_35002015; 3781 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 3782 } 3783 RECOMP_REGS_OUT(); 3784 } 3785 3786 void sub_35002020(void) { 3787 int _fpu_cmp = 0; 3788 uint32_t _cf = 0; 3789 int _df = 1; 3790 uint32_t _flag_k = FK_NONE; 3791 uint32_t _flag_a = 0, _flag_b = 0; 3792 uint32_t _itail_tgt = 0; 3793 RECOMP_REGS_LOCALS 3794 RECOMP_ENTER(0x35002020u); 3795 3796 L_35002020: 3797 RECOMP_ICALL(0x35002030u); /* 0x35002020: call 0x35002030 */ /* not lifted */ 3798 RECOMP_FLAGS_IN(); 3799 goto L_35002040; /* 0x35002025: jmp 0x35002040 */ 3800 L_35002040: 3801 PUSH32(esp, 0x35002050u); /* 0x35002040: push 0x35002050 */ 3802 RECOMP_ICALL(0x350022BAu); /* 0x35002045: call 0x350022ba */ /* not lifted */ 3803 RECOMP_FLAGS_IN(); 3804 ecx = POP32_VAL(esp); /* 0x3500204A: pop ecx */ 3805 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3500204B: ret */ 3806 RECOMP_REGS_OUT(); 3807 } 3808 3809 void sub_35002030(void) { 3810 int _fpu_cmp = 0; 3811 uint32_t _cf = 0; 3812 int _df = 1; 3813 uint32_t _flag_k = FK_NONE; 3814 uint32_t _flag_a = 0, _flag_b = 0; 3815 uint32_t _itail_tgt = 0; 3816 RECOMP_REGS_LOCALS 3817 RECOMP_ENTER(0x35002030u); 3818 3819 L_35002030: 3820 ecx = 0x35005188u; /* 0x35002030: mov ecx, 0x35005188 */ 3821 L_35002035: 3822 { _itail_tgt = (uint32_t)(MEM32(0x35003048)); goto _ljump; } 3823 { RECOMP_REGS_OUT(); return; } /* end of function */ 3824 _ljump: 3825 switch (_itail_tgt) { 3826 case 0x35002030u: goto L_35002030; 3827 case 0x35002035u: goto L_35002035; 3828 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 3829 } 3830 RECOMP_REGS_OUT(); 3831 } 3832 3833 void sub_35002040(void) { 3834 int _fpu_cmp = 0; 3835 uint32_t _cf = 0; 3836 int _df = 1; 3837 uint32_t _flag_k = FK_NONE; 3838 uint32_t _flag_a = 0, _flag_b = 0; 3839 uint32_t _itail_tgt = 0; 3840 RECOMP_REGS_LOCALS 3841 RECOMP_ENTER(0x35002040u); 3842 3843 L_35002040: 3844 PUSH32(esp, 0x35002050u); /* 0x35002040: push 0x35002050 */ 3845 RECOMP_ICALL(0x350022BAu); /* 0x35002045: call 0x350022ba */ /* not lifted */ 3846 RECOMP_FLAGS_IN(); 3847 ecx = POP32_VAL(esp); /* 0x3500204A: pop ecx */ 3848 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3500204B: ret */ 3849 RECOMP_REGS_OUT(); 3850 } 3851 3852 void sub_35002050(void) { 3853 int _fpu_cmp = 0; 3854 uint32_t _cf = 0; 3855 int _df = 1; 3856 uint32_t _flag_k = FK_NONE; 3857 uint32_t _flag_a = 0, _flag_b = 0; 3858 uint32_t _itail_tgt = 0; 3859 RECOMP_REGS_LOCALS 3860 RECOMP_ENTER(0x35002050u); 3861 3862 L_35002050: 3863 ecx = 0x35005188u; /* 0x35002050: mov ecx, 0x35005188 */ 3864 L_35002055: 3865 { _itail_tgt = (uint32_t)(MEM32(0x35003044)); goto _ljump; } 3866 { RECOMP_REGS_OUT(); return; } /* end of function */ 3867 _ljump: 3868 switch (_itail_tgt) { 3869 case 0x35002050u: goto L_35002050; 3870 case 0x35002055u: goto L_35002055; 3871 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 3872 } 3873 RECOMP_REGS_OUT(); 3874 } 3875 3876 void sub_35002060(void) { 3877 int _fpu_cmp = 0; 3878 uint32_t _cf = 0; 3879 int _df = 1; 3880 uint32_t _flag_k = FK_NONE; 3881 uint32_t _flag_a = 0, _flag_b = 0; 3882 uint32_t _itail_tgt = 0; 3883 RECOMP_REGS_LOCALS 3884 RECOMP_ENTER(0x35002060u); 3885 3886 L_35002060: 3887 goto L_35002070; /* 0x35002060: jmp 0x35002070 */ 3888 L_35002070: 3889 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3890 eax = 0; /* 0x35002070: xor eax, eax */ 3891 _cf = 0; 3892 _flag_k = FK_TEST; 3893 MEM32(0x35005180) = eax; /* 0x35002072: mov dword ptr [0x35005180], eax */ 3894 MEM32(0x35005184) = eax; /* 0x35002077: mov dword ptr [0x35005184], eax */ 3895 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3500207C: ret */ 3896 RECOMP_REGS_OUT(); 3897 } 3898 3899 void sub_35002070(void) { 3900 int _fpu_cmp = 0; 3901 uint32_t _cf = 0; 3902 int _df = 1; 3903 uint32_t _flag_k = FK_NONE; 3904 uint32_t _flag_a = 0, _flag_b = 0; 3905 uint32_t _itail_tgt = 0; 3906 RECOMP_REGS_LOCALS 3907 RECOMP_ENTER(0x35002070u); 3908 3909 L_35002070: 3910 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3911 eax = 0; /* 0x35002070: xor eax, eax */ 3912 _cf = 0; 3913 _flag_k = FK_TEST; 3914 MEM32(0x35005180) = eax; /* 0x35002072: mov dword ptr [0x35005180], eax */ 3915 MEM32(0x35005184) = eax; /* 0x35002077: mov dword ptr [0x35005184], eax */ 3916 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3500207C: ret */ 3917 RECOMP_REGS_OUT(); 3918 } 3919 3920 void sub_35002080(void) { 3921 int _fpu_cmp = 0; 3922 uint32_t _cf = 0; 3923 int _df = 1; 3924 uint32_t _flag_k = FK_NONE; 3925 uint32_t _flag_a = 0, _flag_b = 0; 3926 uint32_t _itail_tgt = 0; 3927 RECOMP_REGS_LOCALS 3928 RECOMP_ENTER(0x35002080u); 3929 3930 L_35002080: 3931 PUSH32(esp, ebp); /* 0x35002080: push ebp */ 3932 ebp = esp; /* 0x35002081: mov ebp, esp */ 3933 ecx = MEM32(ebp + 0x8); /* 0x35002083: mov ecx, dword ptr [ebp + 8] */ 3934 PUSH32(esp, esi); /* 0x35002086: push esi */ 3935 esi = MEM32(ebp + 0xC); /* 0x35002087: mov esi, dword ptr [ebp + 0xc] */ 3936 PUSH32(esp, edi); /* 0x3500208A: push edi */ 3937 edi = MEM32(0x350030A4); /* 0x3500208B: mov edi, dword ptr [0x350030a4] */ 3938 eax = MEM32(esi); /* 0x35002091: mov eax, dword ptr [esi] */ 3939 PUSH32(esp, eax); /* 0x35002093: push eax */ 3940 RECOMP_ICALL(edi); /* 0x35002094: call edi */ 3941 RECOMP_FLAGS_IN(); 3942 esi = MEM32(esi + 0x4); /* 0x35002096: mov esi, dword ptr [esi + 4] */ 3943 ecx = eax; /* 0x35002099: mov ecx, eax */ 3944 PUSH32(esp, esi); /* 0x3500209B: push esi */ 3945 RECOMP_ICALL(edi); /* 0x3500209C: call edi */ 3946 RECOMP_FLAGS_IN(); 3947 edi = POP32_VAL(esp); /* 0x3500209E: pop edi */ 3948 esi = POP32_VAL(esp); /* 0x3500209F: pop esi */ 3949 ebp = POP32_VAL(esp); /* 0x350020A0: pop ebp */ 3950 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x350020A1: ret */ 3951 RECOMP_REGS_OUT(); 3952 } 3953 3954 void sub_350020B0(void) { 3955 int _fpu_cmp = 0; 3956 uint32_t _cf = 0; 3957 int _df = 1; 3958 uint32_t _flag_k = FK_NONE; 3959 uint32_t _flag_a = 0, _flag_b = 0; 3960 uint32_t _itail_tgt = 0; 3961 RECOMP_REGS_LOCALS 3962 RECOMP_ENTER(0x350020B0u); 3963 3964 L_350020B0: 3965 PUSH32(esp, ebp); /* 0x350020B0: push ebp */ 3966 ebp = esp; /* 0x350020B1: mov ebp, esp */ 3967 PUSH32(esp, ebx); /* 0x350020B3: push ebx */ 3968 PUSH32(esp, esi); /* 0x350020B4: push esi */ 3969 esi = MEM32(ebp + 0x8); /* 0x350020B5: mov esi, dword ptr [ebp + 8] */ 3970 eax = ebp + 0x8; /* 0x350020B8: lea eax, [ebp + 8] */ 3971 PUSH32(esp, edi); /* 0x350020BB: push edi */ 3972 edi = MEM32(0x3500309C); /* 0x350020BC: mov edi, dword ptr [0x3500309c] */ 3973 PUSH32(esp, eax); /* 0x350020C2: push eax */ 3974 ecx = esi; /* 0x350020C3: mov ecx, esi */ 3975 RECOMP_ICALL(edi); /* 0x350020C5: call edi */ 3976 RECOMP_FLAGS_IN(); 3977 ebx = MEM32(ebp + 0xC); /* 0x350020C7: mov ebx, dword ptr [ebp + 0xc] */ 3978 ecx = ebx + 0x4; /* 0x350020CA: lea ecx, [ebx + 4] */ 3979 PUSH32(esp, ecx); /* 0x350020CD: push ecx */ 3980 ecx = eax; /* 0x350020CE: mov ecx, eax */ 3981 RECOMP_ICALL(edi); /* 0x350020D0: call edi */ 3982 RECOMP_FLAGS_IN(); 3983 edx = MEM32(ebp + 0x8); /* 0x350020D2: mov edx, dword ptr [ebp + 8] */ 3984 eax = esi; /* 0x350020D5: mov eax, esi */ 3985 edi = POP32_VAL(esp); /* 0x350020D7: pop edi */ 3986 MEM32(ebx) = edx; /* 0x350020D8: mov dword ptr [ebx], edx */ 3987 esi = POP32_VAL(esp); /* 0x350020DA: pop esi */ 3988 ebx = POP32_VAL(esp); /* 0x350020DB: pop ebx */ 3989 ebp = POP32_VAL(esp); /* 0x350020DC: pop ebp */ 3990 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x350020DD: ret */ 3991 RECOMP_REGS_OUT(); 3992 } 3993 3994 void sub_350020E0(void) { 3995 int _fpu_cmp = 0; 3996 uint32_t _cf = 0; 3997 int _df = 1; 3998 uint32_t _flag_k = FK_NONE; 3999 uint32_t _flag_a = 0, _flag_b = 0; 4000 uint32_t _itail_tgt = 0; 4001 RECOMP_REGS_LOCALS 4002 RECOMP_ENTER(0x350020E0u); 4003 4004 L_350020E0: 4005 PUSH32(esp, ebp); /* 0x350020E0: push ebp */ 4006 ebp = esp; /* 0x350020E1: mov ebp, esp */ 4007 eax = MEM32(ebp + 0xC); /* 0x350020E3: mov eax, dword ptr [ebp + 0xc] */ 4008 PUSH32(esp, esi); /* 0x350020E6: push esi */ 4009 esi = MEM32(0x35003010); /* 0x350020E7: mov esi, dword ptr [0x35003010] */ 4010 ecx = MEM32(eax + 0x4); /* 0x350020ED: mov ecx, dword ptr [eax + 4] */ 4011 eax = MEM32(eax); /* 0x350020F0: mov eax, dword ptr [eax] */ 4012 PUSH32(esp, ecx); /* 0x350020F2: push ecx */ 4013 PUSH32(esp, 0x35005140u); /* 0x350020F3: push 0x35005140 */ 4014 PUSH32(esp, eax); /* 0x350020F8: push eax */ 4015 eax = MEM32(ebp + 0x8); /* 0x350020F9: mov eax, dword ptr [ebp + 8] */ 4016 PUSH32(esp, 0x35005138u); /* 0x350020FC: push 0x35005138 */ 4017 PUSH32(esp, eax); /* 0x35002101: push eax */ 4018 RECOMP_ICALL(esi); /* 0x35002102: call esi */ 4019 RECOMP_FLAGS_IN(); 4020 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4021 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4022 esp = esp + 8; /* 0x35002104: add esp, 8 */ 4023 _flag_k = FK_ADD; 4024 ecx = eax; /* 0x35002107: mov ecx, eax */ 4025 RECOMP_ICALL(MEM32(0x35003014)); /* 0x35002109: call dword ptr [0x35003014] */ 4026 RECOMP_FLAGS_IN(); 4027 PUSH32(esp, eax); /* 0x3500210F: push eax */ 4028 RECOMP_ICALL(esi); /* 0x35002110: call esi */ 4029 RECOMP_FLAGS_IN(); 4030 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4031 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4032 esp = esp + 8; /* 0x35002112: add esp, 8 */ 4033 _flag_k = FK_ADD; 4034 ecx = eax; /* 0x35002115: mov ecx, eax */ 4035 RECOMP_ICALL(MEM32(0x35003014)); /* 0x35002117: call dword ptr [0x35003014] */ 4036 RECOMP_FLAGS_IN(); 4037 esi = POP32_VAL(esp); /* 0x3500211D: pop esi */ 4038 ebp = POP32_VAL(esp); /* 0x3500211E: pop ebp */ 4039 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3500211F: ret */ 4040 RECOMP_REGS_OUT(); 4041 } 4042 4043 void sub_35002120(void) { 4044 int _fpu_cmp = 0; 4045 uint32_t _cf = 0; 4046 int _df = 1; 4047 uint32_t _flag_k = FK_NONE; 4048 uint32_t _flag_a = 0, _flag_b = 0; 4049 uint32_t _itail_tgt = 0; 4050 RECOMP_REGS_LOCALS 4051 RECOMP_ENTER(0x35002120u); 4052 4053 L_35002120: 4054 PUSH32(esp, ebp); /* 0x35002120: push ebp */ 4055 ebp = esp; /* 0x35002121: mov ebp, esp */ 4056 PUSH32(esp, ecx); /* 0x35002123: push ecx */ 4057 eax = ebp + (-0x4); /* 0x35002124: lea eax, [ebp - 4] */ 4058 PUSH32(esp, esi); /* 0x35002127: push esi */ 4059 esi = MEM32(ebp + 0x8); /* 0x35002128: mov esi, dword ptr [ebp + 8] */ 4060 ecx = ebp + 0x8; /* 0x3500212B: lea ecx, [ebp + 8] */ 4061 PUSH32(esp, eax); /* 0x3500212E: push eax */ 4062 PUSH32(esp, ecx); /* 0x3500212F: push ecx */ 4063 ecx = esi; /* 0x35002130: mov ecx, esi */ 4064 RECOMP_ICALL(MEM32(0x3500300C)); /* 0x35002132: call dword ptr [0x3500300c] */ 4065 RECOMP_FLAGS_IN(); 4066 ecx = eax; /* 0x35002138: mov ecx, eax */ 4067 RECOMP_ICALL(MEM32(0x3500300C)); /* 0x3500213A: call dword ptr [0x3500300c] */ 4068 RECOMP_FLAGS_IN(); 4069 eax = MEM32(ebp + 0xC); /* 0x35002140: mov eax, dword ptr [ebp + 0xc] */ 4070 edx = MEM32(ebp + 0x8); /* 0x35002143: mov edx, dword ptr [ebp + 8] */ 4071 ecx = MEM32(ebp + (-0x4)); /* 0x35002146: mov ecx, dword ptr [ebp - 4] */ 4072 MEM32(eax) = edx; /* 0x35002149: mov dword ptr [eax], edx */ 4073 MEM32(eax + 0x4) = ecx; /* 0x3500214B: mov dword ptr [eax + 4], ecx */ 4074 eax = esi; /* 0x3500214E: mov eax, esi */ 4075 esi = POP32_VAL(esp); /* 0x35002150: pop esi */ 4076 esp = ebp; /* 0x35002151: mov esp, ebp */ 4077 ebp = POP32_VAL(esp); /* 0x35002153: pop ebp */ 4078 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35002154: ret */ 4079 RECOMP_REGS_OUT(); 4080 } 4081 4082 void sub_35002160(void) { 4083 int _fpu_cmp = 0; 4084 uint32_t _cf = 0; 4085 int _df = 1; 4086 uint32_t _flag_k = FK_NONE; 4087 uint32_t _flag_a = 0, _flag_b = 0; 4088 uint32_t _itail_tgt = 0; 4089 RECOMP_REGS_LOCALS 4090 RECOMP_ENTER(0x35002160u); 4091 4092 L_35002160: 4093 { _itail_tgt = (uint32_t)(MEM32(0x350030C4)); goto _ljump; } 4094 { RECOMP_REGS_OUT(); return; } /* end of function */ 4095 _ljump: 4096 switch (_itail_tgt) { 4097 case 0x35002160u: goto L_35002160; 4098 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4099 } 4100 RECOMP_REGS_OUT(); 4101 } 4102 4103 void sub_35002166(void) { 4104 int _fpu_cmp = 0; 4105 uint32_t _cf = 0; 4106 int _df = 1; 4107 uint32_t _flag_k = FK_NONE; 4108 uint32_t _flag_a = 0, _flag_b = 0; 4109 uint32_t _itail_tgt = 0; 4110 RECOMP_REGS_LOCALS 4111 RECOMP_ENTER(0x35002166u); 4112 4113 L_35002166: 4114 { _itail_tgt = (uint32_t)(MEM32(0x350030C0)); goto _ljump; } 4115 { RECOMP_REGS_OUT(); return; } /* end of function */ 4116 _ljump: 4117 switch (_itail_tgt) { 4118 case 0x35002166u: goto L_35002166; 4119 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4120 } 4121 RECOMP_REGS_OUT(); 4122 } 4123 4124 void sub_3500216C(void) { 4125 int _fpu_cmp = 0; 4126 uint32_t _cf = 0; 4127 int _df = 1; 4128 uint32_t _flag_k = FK_NONE; 4129 uint32_t _flag_a = 0, _flag_b = 0; 4130 uint32_t _itail_tgt = 0; 4131 RECOMP_REGS_LOCALS 4132 RECOMP_ENTER(0x3500216Cu); 4133 4134 L_3500216C: 4135 { _itail_tgt = (uint32_t)(MEM32(0x350030BC)); goto _ljump; } 4136 { RECOMP_REGS_OUT(); return; } /* end of function */ 4137 _ljump: 4138 switch (_itail_tgt) { 4139 case 0x3500216Cu: goto L_3500216C; 4140 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4141 } 4142 RECOMP_REGS_OUT(); 4143 } 4144 4145 void sub_35002172(void) { 4146 int _fpu_cmp = 0; 4147 uint32_t _cf = 0; 4148 int _df = 1; 4149 uint32_t _flag_k = FK_NONE; 4150 uint32_t _flag_a = 0, _flag_b = 0; 4151 uint32_t _itail_tgt = 0; 4152 RECOMP_REGS_LOCALS 4153 RECOMP_ENTER(0x35002172u); 4154 4155 L_35002172: 4156 { _itail_tgt = (uint32_t)(MEM32(0x35003058)); goto _ljump; } 4157 { RECOMP_REGS_OUT(); return; } /* end of function */ 4158 _ljump: 4159 switch (_itail_tgt) { 4160 case 0x35002172u: goto L_35002172; 4161 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4162 } 4163 RECOMP_REGS_OUT(); 4164 } 4165 4166 void sub_35002178(void) { 4167 int _fpu_cmp = 0; 4168 uint32_t _cf = 0; 4169 int _df = 1; 4170 uint32_t _flag_k = FK_NONE; 4171 uint32_t _flag_a = 0, _flag_b = 0; 4172 uint32_t _itail_tgt = 0; 4173 RECOMP_REGS_LOCALS 4174 RECOMP_ENTER(0x35002178u); 4175 4176 L_35002178: 4177 PUSH32(esp, esi); /* 0x35002178: push esi */ 4178 esi = ecx; /* 0x35002179: mov esi, ecx */ 4179 RECOMP_ICALL(0x3500242Eu); /* 0x3500217B: call 0x3500242e */ /* not lifted */ 4180 RECOMP_FLAGS_IN(); 4181 /* test MEM8(esp + 0x8), 1 */ /* 0x35002180: test byte ptr [esp + 8], 1 */ 4182 _flag_a = (uint32_t)(MEM8(esp + 0x8)) << 24; _flag_b = (uint32_t)(1) << 24; 4183 _cf = 0; 4184 _flag_k = FK_NARROW(FK_TEST, 24); 4185 if (TEST_Z(_flag_a, _flag_b)) goto L_3500218E; /* 0x35002185: je 0x3500218e */ 4186 L_35002187: 4187 PUSH32(esp, esi); /* 0x35002187: push esi */ 4188 RECOMP_ICALL(0x35002194u); /* 0x35002188: call 0x35002194 */ /* not lifted */ 4189 RECOMP_FLAGS_IN(); 4190 ecx = POP32_VAL(esp); /* 0x3500218D: pop ecx */ 4191 L_3500218E: 4192 eax = esi; /* 0x3500218E: mov eax, esi */ 4193 esi = POP32_VAL(esp); /* 0x35002190: pop esi */ 4194 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x35002191: ret 4 */ 4195 RECOMP_REGS_OUT(); 4196 } 4197 4198 void sub_35002194(void) { 4199 int _fpu_cmp = 0; 4200 uint32_t _cf = 0; 4201 int _df = 1; 4202 uint32_t _flag_k = FK_NONE; 4203 uint32_t _flag_a = 0, _flag_b = 0; 4204 uint32_t _itail_tgt = 0; 4205 RECOMP_REGS_LOCALS 4206 RECOMP_ENTER(0x35002194u); 4207 4208 L_35002194: 4209 { _itail_tgt = (uint32_t)(MEM32(0x3500305C)); goto _ljump; } 4210 { RECOMP_REGS_OUT(); return; } /* end of function */ 4211 _ljump: 4212 switch (_itail_tgt) { 4213 case 0x35002194u: goto L_35002194; 4214 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4215 } 4216 RECOMP_REGS_OUT(); 4217 } 4218 4219 void sub_3500219A(void) { 4220 int _fpu_cmp = 0; 4221 uint32_t _cf = 0; 4222 int _df = 1; 4223 uint32_t _flag_k = FK_NONE; 4224 uint32_t _flag_a = 0, _flag_b = 0; 4225 uint32_t _itail_tgt = 0; 4226 RECOMP_REGS_LOCALS 4227 RECOMP_ENTER(0x3500219Au); 4228 4229 L_3500219A: 4230 PUSH32(esp, ebp); /* 0x3500219A: push ebp */ 4231 ebp = esp; /* 0x3500219B: mov ebp, esp */ 4232 PUSH32(esp, 0xFFFFFFFFu); /* 0x3500219D: push -1 */ 4233 PUSH32(esp, 0x35003170u); /* 0x3500219F: push 0x35003170 */ 4234 PUSH32(esp, 0x35002434u); /* 0x350021A4: push 0x35002434 */ 4235 eax = MEM32(FS_BASE + (0)); /* 0x350021A9: mov eax, dword ptr fs:[0] */ 4236 PUSH32(esp, eax); /* 0x350021AF: push eax */ 4237 MEM32(FS_BASE + (0)) = esp; /* 0x350021B0: mov dword ptr fs:[0], esp */ 4238 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 4239 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4240 esp = esp - 0xCu; /* 0x350021B7: sub esp, 0xc */ 4241 _flag_k = FK_CMP; 4242 PUSH32(esp, ebx); /* 0x350021BA: push ebx */ 4243 PUSH32(esp, esi); /* 0x350021BB: push esi */ 4244 PUSH32(esp, edi); /* 0x350021BC: push edi */ 4245 _flag_a = (uint32_t)(MEM32(ebp + (-0x1C))); _flag_b = (uint32_t)(0); 4246 MEM32(ebp + (-0x1C)) = MEM32(ebp + (-0x1C)) & 0; /* 0x350021BD: and dword ptr [ebp - 0x1c], 0 */ 4247 _cf = 0; 4248 _flag_k = FK_TEST; 4249 esi = MEM32(ebp + 0xC); /* 0x350021C1: mov esi, dword ptr [ebp + 0xc] */ 4250 eax = esi; /* 0x350021C4: mov eax, esi */ 4251 eax = (uint32_t)((int32_t)eax * (int32_t)MEM32(ebp + 0x10)); /* 0x350021C6: imul eax, dword ptr [ebp + 0x10] */ 4252 _flag_a = (uint32_t)(MEM32(ebp + 0x8)); _flag_b = (uint32_t)(eax); 4253 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4254 MEM32(ebp + 0x8) = MEM32(ebp + 0x8) + eax; /* 0x350021CA: add dword ptr [ebp + 8], eax */ 4255 _flag_k = FK_ADD; 4256 _flag_a = (uint32_t)(MEM32(ebp + (-0x4))); _flag_b = (uint32_t)(0); 4257 MEM32(ebp + (-0x4)) = MEM32(ebp + (-0x4)) & 0; /* 0x350021CD: and dword ptr [ebp - 4], 0 */ 4258 _cf = 0; 4259 _flag_k = FK_TEST; 4260 L_350021D1: 4261 _flag_a = (uint32_t)(MEM32(ebp + 0x10)); _flag_b = (uint32_t)(1); 4262 MEM32(ebp + 0x10) = MEM32(ebp + 0x10) - 1; /* 0x350021D1: dec dword ptr [ebp + 0x10] */ 4263 _flag_k = FK_DEC; 4264 if (/* dec result */ CMP_S(_flag_a, _flag_b)) goto L_350021E1; /* 0x350021D4: js 0x350021e1 */ 4265 L_350021D6: 4266 _flag_a = (uint32_t)(MEM32(ebp + 0x8)); _flag_b = (uint32_t)(esi); 4267 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4268 MEM32(ebp + 0x8) = MEM32(ebp + 0x8) - esi; /* 0x350021D6: sub dword ptr [ebp + 8], esi */ 4269 _flag_k = FK_CMP; 4270 ecx = MEM32(ebp + 0x8); /* 0x350021D9: mov ecx, dword ptr [ebp + 8] */ 4271 RECOMP_ICALL(MEM32(ebp + 0x14)); /* 0x350021DC: call dword ptr [ebp + 0x14] */ 4272 RECOMP_FLAGS_IN(); 4273 RECOMP_BACKEDGE(); 4274 goto L_350021D1; /* 0x350021DF: jmp 0x350021d1 */ 4275 L_350021E1: 4276 MEM32(ebp + (-0x1C)) = 1; /* 0x350021E1: mov dword ptr [ebp - 0x1c], 1 */ 4277 _flag_a = (uint32_t)((MEM32(ebp + (-0x4)) | 0xFFFFFFFFu)); _flag_b = (uint32_t)((MEM32(ebp + (-0x4)) | 0xFFFFFFFFu)); 4278 MEM32(ebp + (-0x4)) = MEM32(ebp + (-0x4)) | 0xFFFFFFFFu; /* 0x350021E8: or dword ptr [ebp - 4], 0xffffffff */ 4279 _cf = 0; 4280 _flag_k = FK_TEST; 4281 RECOMP_ICALL(0x35002202u); /* 0x350021EC: call 0x35002202 */ /* not lifted */ 4282 RECOMP_FLAGS_IN(); 4283 ecx = MEM32(ebp + (-0x10)); /* 0x350021F1: mov ecx, dword ptr [ebp - 0x10] */ 4284 MEM32(FS_BASE + (0)) = ecx; /* 0x350021F4: mov dword ptr fs:[0], ecx */ 4285 edi = POP32_VAL(esp); /* 0x350021FB: pop edi */ 4286 esi = POP32_VAL(esp); /* 0x350021FC: pop esi */ 4287 ebx = POP32_VAL(esp); /* 0x350021FD: pop ebx */ 4288 esp = ebp; ebp = POP32_VAL(esp); /* 0x350021FE: leave */ 4289 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x350021FF: ret 0x10 */ 4290 RECOMP_REGS_OUT(); 4291 } 4292 4293 void sub_35002202(void) { 4294 int _fpu_cmp = 0; 4295 uint32_t _cf = 0; 4296 int _df = 1; 4297 uint32_t _flag_k = FK_NONE; 4298 uint32_t _flag_a = 0, _flag_b = 0; 4299 uint32_t _itail_tgt = 0; 4300 RECOMP_REGS_LOCALS 4301 RECOMP_ENTER(0x35002202u); 4302 4303 L_35002202: 4304 /* cmp MEM32(ebp + (-0x1C)), 0 */ /* 0x35002202: cmp dword ptr [ebp - 0x1c], 0 */ 4305 _flag_a = (uint32_t)(MEM32(ebp + (-0x1C))); _flag_b = (uint32_t)(0); 4306 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4307 _flag_k = FK_CMP; 4308 if (CMP_NE(_flag_a, _flag_b)) goto L_35002219; /* 0x35002206: jne 0x35002219 */ 4309 L_35002208: 4310 PUSH32(esp, MEM32(ebp + 0x14)); /* 0x35002208: push dword ptr [ebp + 0x14] */ 4311 PUSH32(esp, MEM32(ebp + 0x10)); /* 0x3500220B: push dword ptr [ebp + 0x10] */ 4312 PUSH32(esp, MEM32(ebp + 0xC)); /* 0x3500220E: push dword ptr [ebp + 0xc] */ 4313 PUSH32(esp, MEM32(ebp + 0x8)); /* 0x35002211: push dword ptr [ebp + 8] */ 4314 RECOMP_ICALL(0x3500221Au); /* 0x35002214: call 0x3500221a */ /* not lifted */ 4315 RECOMP_FLAGS_IN(); 4316 L_35002219: 4317 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35002219: ret */ 4318 RECOMP_REGS_OUT(); 4319 } 4320 4321 void sub_3500221A(void) { 4322 int _fpu_cmp = 0; 4323 uint32_t _cf = 0; 4324 int _df = 1; 4325 uint32_t _flag_k = FK_NONE; 4326 uint32_t _flag_a = 0, _flag_b = 0; 4327 uint32_t _itail_tgt = 0; 4328 RECOMP_REGS_LOCALS 4329 RECOMP_ENTER(0x3500221Au); 4330 4331 L_3500221A: 4332 PUSH32(esp, ebp); /* 0x3500221A: push ebp */ 4333 ebp = esp; /* 0x3500221B: mov ebp, esp */ 4334 PUSH32(esp, 0xFFFFFFFFu); /* 0x3500221D: push -1 */ 4335 PUSH32(esp, 0x35003180u); /* 0x3500221F: push 0x35003180 */ 4336 PUSH32(esp, 0x35002434u); /* 0x35002224: push 0x35002434 */ 4337 eax = MEM32(FS_BASE + (0)); /* 0x35002229: mov eax, dword ptr fs:[0] */ 4338 PUSH32(esp, eax); /* 0x3500222F: push eax */ 4339 MEM32(FS_BASE + (0)) = esp; /* 0x35002230: mov dword ptr fs:[0], esp */ 4340 PUSH32(esp, ecx); /* 0x35002237: push ecx */ 4341 PUSH32(esp, ecx); /* 0x35002238: push ecx */ 4342 PUSH32(esp, ebx); /* 0x35002239: push ebx */ 4343 PUSH32(esp, esi); /* 0x3500223A: push esi */ 4344 PUSH32(esp, edi); /* 0x3500223B: push edi */ 4345 MEM32(ebp + (-0x18)) = esp; /* 0x3500223C: mov dword ptr [ebp - 0x18], esp */ 4346 _flag_a = (uint32_t)(MEM32(ebp + (-0x4))); _flag_b = (uint32_t)(0); 4347 MEM32(ebp + (-0x4)) = MEM32(ebp + (-0x4)) & 0; /* 0x3500223F: and dword ptr [ebp - 4], 0 */ 4348 _cf = 0; 4349 _flag_k = FK_TEST; 4350 L_35002243: 4351 _flag_a = (uint32_t)(MEM32(ebp + 0x10)); _flag_b = (uint32_t)(1); 4352 MEM32(ebp + 0x10) = MEM32(ebp + 0x10) - 1; /* 0x35002243: dec dword ptr [ebp + 0x10] */ 4353 _flag_k = FK_DEC; 4354 if (/* dec result */ CMP_S(_flag_a, _flag_b)) goto L_35002263; /* 0x35002246: js 0x35002263 */ 4355 L_35002248: 4356 ecx = MEM32(ebp + 0x8); /* 0x35002248: mov ecx, dword ptr [ebp + 8] */ 4357 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(ebp + 0xC)); 4358 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4359 ecx = ecx - MEM32(ebp + 0xC); /* 0x3500224B: sub ecx, dword ptr [ebp + 0xc] */ 4360 _flag_k = FK_CMP; 4361 MEM32(ebp + 0x8) = ecx; /* 0x3500224E: mov dword ptr [ebp + 8], ecx */ 4362 RECOMP_ICALL(MEM32(ebp + 0x14)); /* 0x35002251: call dword ptr [ebp + 0x14] */ 4363 RECOMP_FLAGS_IN(); 4364 RECOMP_BACKEDGE(); 4365 goto L_35002243; /* 0x35002254: jmp 0x35002243 */ 4366 L_35002263: 4367 _flag_a = (uint32_t)((MEM32(ebp + (-0x4)) | 0xFFFFFFFFu)); _flag_b = (uint32_t)((MEM32(ebp + (-0x4)) | 0xFFFFFFFFu)); 4368 MEM32(ebp + (-0x4)) = MEM32(ebp + (-0x4)) | 0xFFFFFFFFu; /* 0x35002263: or dword ptr [ebp - 4], 0xffffffff */ 4369 _cf = 0; 4370 _flag_k = FK_TEST; 4371 ecx = MEM32(ebp + (-0x10)); /* 0x35002267: mov ecx, dword ptr [ebp - 0x10] */ 4372 MEM32(FS_BASE + (0)) = ecx; /* 0x3500226A: mov dword ptr fs:[0], ecx */ 4373 edi = POP32_VAL(esp); /* 0x35002271: pop edi */ 4374 esi = POP32_VAL(esp); /* 0x35002272: pop esi */ 4375 ebx = POP32_VAL(esp); /* 0x35002273: pop ebx */ 4376 esp = ebp; ebp = POP32_VAL(esp); /* 0x35002274: leave */ 4377 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x35002275: ret 0x10 */ 4378 RECOMP_REGS_OUT(); 4379 } 4380 4381 void sub_35002256(void) { 4382 int _fpu_cmp = 0; 4383 uint32_t _cf = 0; 4384 int _df = 1; 4385 uint32_t _flag_k = FK_NONE; 4386 uint32_t _flag_a = 0, _flag_b = 0; 4387 uint32_t _itail_tgt = 0; 4388 RECOMP_REGS_LOCALS 4389 RECOMP_ENTER(0x35002256u); 4390 4391 L_35002256: 4392 PUSH32(esp, MEM32(ebp + (-0x14))); /* 0x35002256: push dword ptr [ebp - 0x14] */ 4393 RECOMP_ICALL(0x35002278u); /* 0x35002259: call 0x35002278 */ /* not lifted */ 4394 RECOMP_FLAGS_IN(); 4395 ecx = POP32_VAL(esp); /* 0x3500225E: pop ecx */ 4396 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3500225F: ret */ 4397 RECOMP_REGS_OUT(); 4398 } 4399 4400 void sub_35002260(void) { 4401 int _fpu_cmp = 0; 4402 uint32_t _cf = 0; 4403 int _df = 1; 4404 uint32_t _flag_k = FK_NONE; 4405 uint32_t _flag_a = 0, _flag_b = 0; 4406 uint32_t _itail_tgt = 0; 4407 RECOMP_REGS_LOCALS 4408 RECOMP_ENTER(0x35002260u); 4409 4410 L_35002260: 4411 esp = MEM32(ebp + (-0x18)); /* 0x35002260: mov esp, dword ptr [ebp - 0x18] */ 4412 _flag_a = (uint32_t)((MEM32(ebp + (-0x4)) | 0xFFFFFFFFu)); _flag_b = (uint32_t)((MEM32(ebp + (-0x4)) | 0xFFFFFFFFu)); 4413 MEM32(ebp + (-0x4)) = MEM32(ebp + (-0x4)) | 0xFFFFFFFFu; /* 0x35002263: or dword ptr [ebp - 4], 0xffffffff */ 4414 _cf = 0; 4415 _flag_k = FK_TEST; 4416 ecx = MEM32(ebp + (-0x10)); /* 0x35002267: mov ecx, dword ptr [ebp - 0x10] */ 4417 MEM32(FS_BASE + (0)) = ecx; /* 0x3500226A: mov dword ptr fs:[0], ecx */ 4418 edi = POP32_VAL(esp); /* 0x35002271: pop edi */ 4419 esi = POP32_VAL(esp); /* 0x35002272: pop esi */ 4420 ebx = POP32_VAL(esp); /* 0x35002273: pop ebx */ 4421 esp = ebp; ebp = POP32_VAL(esp); /* 0x35002274: leave */ 4422 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x35002275: ret 0x10 */ 4423 RECOMP_REGS_OUT(); 4424 } 4425 4426 void sub_35002263(void) { 4427 int _fpu_cmp = 0; 4428 uint32_t _cf = 0; 4429 int _df = 1; 4430 uint32_t _flag_k = FK_NONE; 4431 uint32_t _flag_a = 0, _flag_b = 0; 4432 uint32_t _itail_tgt = 0; 4433 RECOMP_REGS_LOCALS 4434 RECOMP_ENTER(0x35002263u); 4435 4436 L_35002263: 4437 _flag_a = (uint32_t)((MEM32(ebp + (-0x4)) | 0xFFFFFFFFu)); _flag_b = (uint32_t)((MEM32(ebp + (-0x4)) | 0xFFFFFFFFu)); 4438 MEM32(ebp + (-0x4)) = MEM32(ebp + (-0x4)) | 0xFFFFFFFFu; /* 0x35002263: or dword ptr [ebp - 4], 0xffffffff */ 4439 _cf = 0; 4440 _flag_k = FK_TEST; 4441 ecx = MEM32(ebp + (-0x10)); /* 0x35002267: mov ecx, dword ptr [ebp - 0x10] */ 4442 MEM32(FS_BASE + (0)) = ecx; /* 0x3500226A: mov dword ptr fs:[0], ecx */ 4443 edi = POP32_VAL(esp); /* 0x35002271: pop edi */ 4444 esi = POP32_VAL(esp); /* 0x35002272: pop esi */ 4445 ebx = POP32_VAL(esp); /* 0x35002273: pop ebx */ 4446 esp = ebp; ebp = POP32_VAL(esp); /* 0x35002274: leave */ 4447 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x35002275: ret 0x10 */ 4448 RECOMP_REGS_OUT(); 4449 } 4450 4451 void sub_35002278(void) { 4452 int _fpu_cmp = 0; 4453 uint32_t _cf = 0; 4454 int _df = 1; 4455 uint32_t _flag_k = FK_NONE; 4456 uint32_t _flag_a = 0, _flag_b = 0; 4457 uint32_t _itail_tgt = 0; 4458 RECOMP_REGS_LOCALS 4459 RECOMP_ENTER(0x35002278u); 4460 4461 L_35002278: 4462 eax = MEM32(esp + 0x4); /* 0x35002278: mov eax, dword ptr [esp + 4] */ 4463 L_3500227C: 4464 eax = MEM32(eax); /* 0x3500227C: mov eax, dword ptr [eax] */ 4465 L_3500227E: 4466 /* cmp MEM32(eax), 0xE06D7363u */ /* 0x3500227E: cmp dword ptr [eax], 0xe06d7363 */ 4467 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0xE06D7363u); 4468 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4469 _flag_k = FK_CMP; 4470 L_35002284: 4471 if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_E, _cf)) goto L_35002289; /* 0x35002284: je 0x35002289 */ 4472 L_35002286: 4473 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4474 eax = 0; /* 0x35002286: xor eax, eax */ 4475 _cf = 0; 4476 _flag_k = FK_TEST; 4477 L_35002288: 4478 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x35002288: ret */ 4479 L_35002289: 4480 goto L_3500243A; /* 0x35002289: jmp 0x3500243a */ 4481 L_3500243A: 4482 { _itail_tgt = (uint32_t)(MEM32(0x35003054)); goto _ljump; } 4483 { RECOMP_REGS_OUT(); return; } /* end of function */ 4484 _ljump: 4485 switch (_itail_tgt) { 4486 case 0x35002278u: goto L_35002278; 4487 case 0x3500227Cu: goto L_3500227C; 4488 case 0x3500227Eu: goto L_3500227E; 4489 case 0x35002284u: goto L_35002284; 4490 case 0x35002286u: goto L_35002286; 4491 case 0x35002288u: goto L_35002288; 4492 case 0x35002289u: goto L_35002289; 4493 case 0x3500243Au: goto L_3500243A; 4494 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4495 } 4496 RECOMP_REGS_OUT(); 4497 } 4498 4499 void sub_3500228E(void) { 4500 int _fpu_cmp = 0; 4501 uint32_t _cf = 0; 4502 int _df = 1; 4503 uint32_t _flag_k = FK_NONE; 4504 uint32_t _flag_a = 0, _flag_b = 0; 4505 uint32_t _itail_tgt = 0; 4506 RECOMP_REGS_LOCALS 4507 RECOMP_ENTER(0x3500228Eu); 4508 4509 L_3500228E: 4510 /* cmp MEM32(0x3500519C), 0xFFFFFFFFu */ /* 0x3500228E: cmp dword ptr [0x3500519c], -1 */ 4511 _flag_a = (uint32_t)(MEM32(0x3500519C)); _flag_b = (uint32_t)(0xFFFFFFFFu); 4512 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4513 _flag_k = FK_CMP; 4514 if (CMP_NE(_flag_a, _flag_b)) goto L_350022A3; /* 0x35002295: jne 0x350022a3 */ 4515 L_35002297: 4516 PUSH32(esp, MEM32(esp + 0x4)); /* 0x35002297: push dword ptr [esp + 4] */ 4517 RECOMP_ICALL(MEM32(0x35003078)); /* 0x3500229B: call dword ptr [0x35003078] */ 4518 RECOMP_FLAGS_IN(); 4519 ecx = POP32_VAL(esp); /* 0x350022A1: pop ecx */ 4520 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x350022A2: ret */ 4521 L_350022A3: 4522 PUSH32(esp, 0x35005198u); /* 0x350022A3: push 0x35005198 */ 4523 PUSH32(esp, 0x3500519Cu); /* 0x350022A8: push 0x3500519c */ 4524 PUSH32(esp, MEM32(esp + 0xC)); /* 0x350022AD: push dword ptr [esp + 0xc] */ 4525 RECOMP_ICALL(0x35002440u); /* 0x350022B1: call 0x35002440 */ /* not lifted */ 4526 RECOMP_FLAGS_IN(); 4527 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 4528 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4529 esp = esp + 0xCu; /* 0x350022B6: add esp, 0xc */ 4530 _flag_k = FK_ADD; 4531 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x350022B9: ret */ 4532 RECOMP_REGS_OUT(); 4533 } 4534 4535 void sub_350022BA(void) { 4536 int _fpu_cmp = 0; 4537 uint32_t _cf = 0; 4538 int _df = 1; 4539 uint32_t _flag_k = FK_NONE; 4540 uint32_t _flag_a = 0, _flag_b = 0; 4541 uint32_t _itail_tgt = 0; 4542 RECOMP_REGS_LOCALS 4543 RECOMP_ENTER(0x350022BAu); 4544 4545 L_350022BA: 4546 PUSH32(esp, MEM32(esp + 0x4)); /* 0x350022BA: push dword ptr [esp + 4] */ 4547 RECOMP_ICALL(0x3500228Eu); /* 0x350022BE: call 0x3500228e */ /* not lifted */ 4548 RECOMP_FLAGS_IN(); 4549 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(eax); 4550 _cf = (eax) != 0; 4551 eax = (uint32_t)(-(int32_t)eax); /* 0x350022C3: neg eax */ 4552 _flag_k = FK_CMP; 4553 { uint32_t _sa = eax, _sb = eax, _sc = _cf; /* 0x350022C5: sbb eax, eax */ 4554 eax = _sc ? 0xFFFFFFFFu : 0; 4555 _flag_a = recomp_flags_sbb(_sa, _sb, _sc); _flag_b = 0; 4556 _flag_k = FK_EFLAGS; _cf = _flag_a & 1u; } 4557 ecx = POP32_VAL(esp); /* 0x350022C7: pop ecx */ 4558 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(eax); 4559 _cf = (eax) != 0; 4560 eax = (uint32_t)(-(int32_t)eax); /* 0x350022C8: neg eax */ 4561 _flag_k = FK_CMP; 4562 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 4563 eax = eax - 1; /* 0x350022CA: dec eax */ 4564 _flag_k = FK_DEC; 4565 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x350022CB: ret */ 4566 RECOMP_REGS_OUT(); 4567 } 4568 4569 void sub_350022CC(void) { 4570 int _fpu_cmp = 0; 4571 uint32_t _cf = 0; 4572 int _df = 1; 4573 uint32_t _flag_k = FK_NONE; 4574 uint32_t _flag_a = 0, _flag_b = 0; 4575 uint32_t _itail_tgt = 0; 4576 RECOMP_REGS_LOCALS 4577 RECOMP_ENTER(0x350022CCu); 4578 4579 L_350022CC: 4580 { _itail_tgt = (uint32_t)(MEM32(0x35003060)); goto _ljump; } 4581 { RECOMP_REGS_OUT(); return; } /* end of function */ 4582 _ljump: 4583 switch (_itail_tgt) { 4584 case 0x350022CCu: goto L_350022CC; 4585 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4586 } 4587 RECOMP_REGS_OUT(); 4588 } 4589 4590 void sub_350022E0(void) { 4591 int _fpu_cmp = 0; 4592 uint32_t _cf = 0; 4593 int _df = 1; 4594 uint32_t _flag_k = FK_NONE; 4595 uint32_t _flag_a = 0, _flag_b = 0; 4596 uint32_t _itail_tgt = 0; 4597 RECOMP_REGS_LOCALS 4598 RECOMP_ENTER(0x350022E0u); 4599 4600 L_350022E0: 4601 { _itail_tgt = (uint32_t)(MEM32(0x35003068)); goto _ljump; } 4602 { RECOMP_REGS_OUT(); return; } /* end of function */ 4603 _ljump: 4604 switch (_itail_tgt) { 4605 case 0x350022E0u: goto L_350022E0; 4606 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4607 } 4608 RECOMP_REGS_OUT(); 4609 } 4610 4611 void sub_350022E6(void) { 4612 int _fpu_cmp = 0; 4613 uint32_t _cf = 0; 4614 int _df = 1; 4615 uint32_t _flag_k = FK_NONE; 4616 uint32_t _flag_a = 0, _flag_b = 0; 4617 uint32_t _itail_tgt = 0; 4618 RECOMP_REGS_LOCALS 4619 RECOMP_ENTER(0x350022E6u); 4620 4621 L_350022E6: 4622 eax = MEM32(esp + 0x8); /* 0x350022E6: mov eax, dword ptr [esp + 8] */ 4623 /* test eax, eax */ /* 0x350022EA: test eax, eax */ 4624 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4625 _cf = 0; 4626 _flag_k = FK_TEST; 4627 if (TEST_NZ(_flag_a, _flag_b)) goto L_350022FC; /* 0x350022EC: jne 0x350022fc */ 4628 L_350022EE: 4629 /* cmp MEM32(0x3500518C), eax */ /* 0x350022EE: cmp dword ptr [0x3500518c], eax */ 4630 _flag_a = (uint32_t)(MEM32(0x3500518C)); _flag_b = (uint32_t)(eax); 4631 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4632 _flag_k = FK_CMP; 4633 if (CMP_LE(_flag_a, _flag_b)) goto L_35002324; /* 0x350022F4: jle 0x35002324 */ 4634 L_350022F6: 4635 _flag_a = (uint32_t)(MEM32(0x3500518C)); _flag_b = (uint32_t)(1); 4636 MEM32(0x3500518C) = MEM32(0x3500518C) - 1; /* 0x350022F6: dec dword ptr [0x3500518c] */ 4637 _flag_k = FK_DEC; 4638 L_350022FC: 4639 ecx = MEM32(0x35003088); /* 0x350022FC: mov ecx, dword ptr [0x35003088] */ 4640 /* cmp eax, 1 */ /* 0x35002302: cmp eax, 1 */ 4641 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 4642 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4643 _flag_k = FK_CMP; 4644 ecx = MEM32(ecx); /* 0x35002305: mov ecx, dword ptr [ecx] */ 4645 MEM32(0x35005190) = ecx; /* 0x35002307: mov dword ptr [0x35005190], ecx */ 4646 if (CMP_NE(_flag_a, _flag_b)) goto L_3500234E; /* 0x3500230D: jne 0x3500234e */ 4647 L_3500230F: 4648 PUSH32(esp, 0x80u); /* 0x3500230F: push 0x80 */ 4649 RECOMP_ICALL(MEM32(0x35003084)); /* 0x35002314: call dword ptr [0x35003084] */ 4650 RECOMP_FLAGS_IN(); 4651 /* test eax, eax */ /* 0x3500231A: test eax, eax */ 4652 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4653 _cf = 0; 4654 _flag_k = FK_TEST; 4655 ecx = POP32_VAL(esp); /* 0x3500231C: pop ecx */ 4656 MEM32(0x3500519C) = eax; /* 0x3500231D: mov dword ptr [0x3500519c], eax */ 4657 if (TEST_NZ(_flag_a, _flag_b)) goto L_35002328; /* 0x35002322: jne 0x35002328 */ 4658 L_35002324: 4659 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4660 eax = 0; /* 0x35002324: xor eax, eax */ 4661 _cf = 0; 4662 _flag_k = FK_TEST; 4663 goto L_3500238E; /* 0x35002326: jmp 0x3500238e */ 4664 L_35002328: 4665 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0); 4666 MEM32(eax) = MEM32(eax) & 0; /* 0x35002328: and dword ptr [eax], 0 */ 4667 _cf = 0; 4668 _flag_k = FK_TEST; 4669 eax = MEM32(0x3500519C); /* 0x3500232B: mov eax, dword ptr [0x3500519c] */ 4670 PUSH32(esp, 0x35005030u); /* 0x35002330: push 0x35005030 */ 4671 PUSH32(esp, 0x35005000u); /* 0x35002335: push 0x35005000 */ 4672 MEM32(0x35005198) = eax; /* 0x3500233A: mov dword ptr [0x35005198], eax */ 4673 RECOMP_ICALL(0x35002446u); /* 0x3500233F: call 0x35002446 */ /* not lifted */ 4674 RECOMP_FLAGS_IN(); 4675 _flag_a = (uint32_t)(MEM32(0x3500518C)); _flag_b = (uint32_t)(1); 4676 MEM32(0x3500518C) = MEM32(0x3500518C) + 1; /* 0x35002344: inc dword ptr [0x3500518c] */ 4677 _flag_k = FK_INC; 4678 ecx = POP32_VAL(esp); /* 0x3500234A: pop ecx */ 4679 ecx = POP32_VAL(esp); /* 0x3500234B: pop ecx */ 4680 goto L_3500238B; /* 0x3500234C: jmp 0x3500238b */ 4681 L_3500234E: 4682 /* test eax, eax */ /* 0x3500234E: test eax, eax */ 4683 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4684 _cf = 0; 4685 _flag_k = FK_TEST; 4686 if (TEST_NZ(_flag_a, _flag_b)) goto L_3500238B; /* 0x35002350: jne 0x3500238b */ 4687 L_35002352: 4688 eax = MEM32(0x3500519C); /* 0x35002352: mov eax, dword ptr [0x3500519c] */ 4689 /* test eax, eax */ /* 0x35002357: test eax, eax */ 4690 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4691 _cf = 0; 4692 _flag_k = FK_TEST; 4693 if (TEST_Z(_flag_a, _flag_b)) goto L_3500238B; /* 0x35002359: je 0x3500238b */ 4694 L_3500235B: 4695 ecx = MEM32(0x35005198); /* 0x3500235B: mov ecx, dword ptr [0x35005198] */ 4696 PUSH32(esp, esi); /* 0x35002361: push esi */ 4697 esi = ecx + (-0x4); /* 0x35002362: lea esi, [ecx - 4] */ 4698 L_35002365: 4699 /* cmp esi, eax */ /* 0x35002365: cmp esi, eax */ 4700 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 4701 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4702 _flag_k = FK_CMP; 4703 if (CMP_B(_flag_a, _flag_b)) goto L_3500237B; /* 0x35002367: jb 0x3500237b */ 4704 L_35002369: 4705 ecx = MEM32(esi); /* 0x35002369: mov ecx, dword ptr [esi] */ 4706 /* test ecx, ecx */ /* 0x3500236B: test ecx, ecx */ 4707 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 4708 _cf = 0; 4709 _flag_k = FK_TEST; 4710 if (TEST_Z(_flag_a, _flag_b)) goto L_35002376; /* 0x3500236D: je 0x35002376 */ 4711 L_3500236F: 4712 RECOMP_ICALL(ecx); /* 0x3500236F: call ecx */ 4713 RECOMP_FLAGS_IN(); 4714 eax = MEM32(0x3500519C); /* 0x35002371: mov eax, dword ptr [0x3500519c] */ 4715 L_35002376: 4716 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 4717 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4718 esi = esi - 4; /* 0x35002376: sub esi, 4 */ 4719 _flag_k = FK_CMP; 4720 RECOMP_BACKEDGE(); 4721 goto L_35002365; /* 0x35002379: jmp 0x35002365 */ 4722 L_3500237B: 4723 PUSH32(esp, eax); /* 0x3500237B: push eax */ 4724 RECOMP_ICALL(MEM32(0x3500307C)); /* 0x3500237C: call dword ptr [0x3500307c] */ 4725 RECOMP_FLAGS_IN(); 4726 _flag_a = (uint32_t)(MEM32(0x3500519C)); _flag_b = (uint32_t)(0); 4727 MEM32(0x3500519C) = MEM32(0x3500519C) & 0; /* 0x35002382: and dword ptr [0x3500519c], 0 */ 4728 _cf = 0; 4729 _flag_k = FK_TEST; 4730 ecx = POP32_VAL(esp); /* 0x35002389: pop ecx */ 4731 esi = POP32_VAL(esp); /* 0x3500238A: pop esi */ 4732 L_3500238B: 4733 PUSH32(esp, 1); /* 0x3500238B: push 1 */ 4734 eax = POP32_VAL(esp); /* 0x3500238D: pop eax */ 4735 L_3500238E: 4736 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x3500238E: ret 0xc */ 4737 RECOMP_REGS_OUT(); 4738 } 4739 4740 void sub_35002391(void) { 4741 int _fpu_cmp = 0; 4742 uint32_t _cf = 0; 4743 int _df = 1; 4744 uint32_t _flag_k = FK_NONE; 4745 uint32_t _flag_a = 0, _flag_b = 0; 4746 uint32_t _itail_tgt = 0; 4747 RECOMP_REGS_LOCALS 4748 RECOMP_ENTER(0x35002391u); 4749 4750 L_35002391: 4751 PUSH32(esp, ebp); /* 0x35002391: push ebp */ 4752 ebp = esp; /* 0x35002392: mov ebp, esp */ 4753 PUSH32(esp, ebx); /* 0x35002394: push ebx */ 4754 ebx = MEM32(ebp + 0x8); /* 0x35002395: mov ebx, dword ptr [ebp + 8] */ 4755 PUSH32(esp, esi); /* 0x35002398: push esi */ 4756 esi = MEM32(ebp + 0xC); /* 0x35002399: mov esi, dword ptr [ebp + 0xc] */ 4757 PUSH32(esp, edi); /* 0x3500239C: push edi */ 4758 edi = MEM32(ebp + 0x10); /* 0x3500239D: mov edi, dword ptr [ebp + 0x10] */ 4759 /* test esi, esi */ /* 0x350023A0: test esi, esi */ 4760 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 4761 _cf = 0; 4762 _flag_k = FK_TEST; 4763 if (TEST_NZ(_flag_a, _flag_b)) goto L_350023AD; /* 0x350023A2: jne 0x350023ad */ 4764 L_350023A4: 4765 /* cmp MEM32(0x3500518C), 0 */ /* 0x350023A4: cmp dword ptr [0x3500518c], 0 */ 4766 _flag_a = (uint32_t)(MEM32(0x3500518C)); _flag_b = (uint32_t)(0); 4767 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4768 _flag_k = FK_CMP; 4769 goto L_350023D3; /* 0x350023AB: jmp 0x350023d3 */ 4770 L_350023AD: 4771 /* cmp esi, 1 */ /* 0x350023AD: cmp esi, 1 */ 4772 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 4773 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4774 _flag_k = FK_CMP; 4775 if (CMP_EQ(_flag_a, _flag_b)) goto L_350023B7; /* 0x350023B0: je 0x350023b7 */ 4776 L_350023B2: 4777 /* cmp esi, 2 */ /* 0x350023B2: cmp esi, 2 */ 4778 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(2); 4779 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4780 _flag_k = FK_CMP; 4781 if (CMP_NE(_flag_a, _flag_b)) goto L_350023D9; /* 0x350023B5: jne 0x350023d9 */ 4782 L_350023B7: 4783 eax = MEM32(0x35005194); /* 0x350023B7: mov eax, dword ptr [0x35005194] */ 4784 /* test eax, eax */ /* 0x350023BC: test eax, eax */ 4785 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4786 _cf = 0; 4787 _flag_k = FK_TEST; 4788 if (TEST_Z(_flag_a, _flag_b)) goto L_350023C9; /* 0x350023BE: je 0x350023c9 */ 4789 L_350023C0: 4790 PUSH32(esp, edi); /* 0x350023C0: push edi */ 4791 PUSH32(esp, esi); /* 0x350023C1: push esi */ 4792 PUSH32(esp, ebx); /* 0x350023C2: push ebx */ 4793 RECOMP_ICALL(eax); /* 0x350023C3: call eax */ 4794 RECOMP_FLAGS_IN(); 4795 /* test eax, eax */ /* 0x350023C5: test eax, eax */ 4796 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4797 _cf = 0; 4798 _flag_k = FK_TEST; 4799 if (TEST_Z(_flag_a, _flag_b)) goto L_350023D5; /* 0x350023C7: je 0x350023d5 */ 4800 L_350023C9: 4801 PUSH32(esp, edi); /* 0x350023C9: push edi */ 4802 PUSH32(esp, esi); /* 0x350023CA: push esi */ 4803 PUSH32(esp, ebx); /* 0x350023CB: push ebx */ 4804 RECOMP_ICALL(0x350022E6u); /* 0x350023CC: call 0x350022e6 */ /* not lifted */ 4805 RECOMP_FLAGS_IN(); 4806 /* test eax, eax */ /* 0x350023D1: test eax, eax */ 4807 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4808 _cf = 0; 4809 _flag_k = FK_TEST; 4810 L_350023D3: 4811 if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_NE, _cf)) goto L_350023D9; /* 0x350023D3: jne 0x350023d9 */ 4812 L_350023D5: 4813 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4814 eax = 0; /* 0x350023D5: xor eax, eax */ 4815 _cf = 0; 4816 _flag_k = FK_TEST; 4817 goto L_35002427; /* 0x350023D7: jmp 0x35002427 */ 4818 L_350023D9: 4819 PUSH32(esp, edi); /* 0x350023D9: push edi */ 4820 PUSH32(esp, esi); /* 0x350023DA: push esi */ 4821 PUSH32(esp, ebx); /* 0x350023DB: push ebx */ 4822 RECOMP_ICALL(0x3500244Cu); /* 0x350023DC: call 0x3500244c */ /* not lifted */ 4823 RECOMP_FLAGS_IN(); 4824 /* cmp esi, 1 */ /* 0x350023E1: cmp esi, 1 */ 4825 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 4826 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4827 _flag_k = FK_CMP; 4828 MEM32(ebp + 0xC) = eax; /* 0x350023E4: mov dword ptr [ebp + 0xc], eax */ 4829 if (CMP_NE(_flag_a, _flag_b)) goto L_350023F5; /* 0x350023E7: jne 0x350023f5 */ 4830 L_350023E9: 4831 /* test eax, eax */ /* 0x350023E9: test eax, eax */ 4832 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4833 _cf = 0; 4834 _flag_k = FK_TEST; 4835 if (TEST_NZ(_flag_a, _flag_b)) goto L_35002424; /* 0x350023EB: jne 0x35002424 */ 4836 L_350023ED: 4837 PUSH32(esp, edi); /* 0x350023ED: push edi */ 4838 PUSH32(esp, eax); /* 0x350023EE: push eax */ 4839 PUSH32(esp, ebx); /* 0x350023EF: push ebx */ 4840 RECOMP_ICALL(0x350022E6u); /* 0x350023F0: call 0x350022e6 */ /* not lifted */ 4841 RECOMP_FLAGS_IN(); 4842 L_350023F5: 4843 /* test esi, esi */ /* 0x350023F5: test esi, esi */ 4844 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 4845 _cf = 0; 4846 _flag_k = FK_TEST; 4847 if (TEST_Z(_flag_a, _flag_b)) goto L_350023FE; /* 0x350023F7: je 0x350023fe */ 4848 L_350023F9: 4849 /* cmp esi, 3 */ /* 0x350023F9: cmp esi, 3 */ 4850 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(3); 4851 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4852 _flag_k = FK_CMP; 4853 if (CMP_NE(_flag_a, _flag_b)) goto L_35002424; /* 0x350023FC: jne 0x35002424 */ 4854 L_350023FE: 4855 PUSH32(esp, edi); /* 0x350023FE: push edi */ 4856 PUSH32(esp, esi); /* 0x350023FF: push esi */ 4857 PUSH32(esp, ebx); /* 0x35002400: push ebx */ 4858 RECOMP_ICALL(0x350022E6u); /* 0x35002401: call 0x350022e6 */ /* not lifted */ 4859 RECOMP_FLAGS_IN(); 4860 /* test eax, eax */ /* 0x35002406: test eax, eax */ 4861 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4862 _cf = 0; 4863 _flag_k = FK_TEST; 4864 if (TEST_NZ(_flag_a, _flag_b)) goto L_3500240D; /* 0x35002408: jne 0x3500240d */ 4865 L_3500240A: 4866 _flag_a = (uint32_t)(MEM32(ebp + 0xC)); _flag_b = (uint32_t)(eax); 4867 MEM32(ebp + 0xC) = MEM32(ebp + 0xC) & eax; /* 0x3500240A: and dword ptr [ebp + 0xc], eax */ 4868 _cf = 0; 4869 _flag_k = FK_TEST; 4870 L_3500240D: 4871 /* cmp MEM32(ebp + 0xC), 0 */ /* 0x3500240D: cmp dword ptr [ebp + 0xc], 0 */ 4872 _flag_a = (uint32_t)(MEM32(ebp + 0xC)); _flag_b = (uint32_t)(0); 4873 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4874 _flag_k = FK_CMP; 4875 if (CMP_EQ(_flag_a, _flag_b)) goto L_35002424; /* 0x35002411: je 0x35002424 */ 4876 L_35002413: 4877 eax = MEM32(0x35005194); /* 0x35002413: mov eax, dword ptr [0x35005194] */ 4878 /* test eax, eax */ /* 0x35002418: test eax, eax */ 4879 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4880 _cf = 0; 4881 _flag_k = FK_TEST; 4882 if (TEST_Z(_flag_a, _flag_b)) goto L_35002424; /* 0x3500241A: je 0x35002424 */ 4883 L_3500241C: 4884 PUSH32(esp, edi); /* 0x3500241C: push edi */ 4885 PUSH32(esp, esi); /* 0x3500241D: push esi */ 4886 PUSH32(esp, ebx); /* 0x3500241E: push ebx */ 4887 RECOMP_ICALL(eax); /* 0x3500241F: call eax */ 4888 RECOMP_FLAGS_IN(); 4889 MEM32(ebp + 0xC) = eax; /* 0x35002421: mov dword ptr [ebp + 0xc], eax */ 4890 L_35002424: 4891 eax = MEM32(ebp + 0xC); /* 0x35002424: mov eax, dword ptr [ebp + 0xc] */ 4892 L_35002427: 4893 edi = POP32_VAL(esp); /* 0x35002427: pop edi */ 4894 esi = POP32_VAL(esp); /* 0x35002428: pop esi */ 4895 ebx = POP32_VAL(esp); /* 0x35002429: pop ebx */ 4896 ebp = POP32_VAL(esp); /* 0x3500242A: pop ebp */ 4897 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x3500242B: ret 0xc */ 4898 RECOMP_REGS_OUT(); 4899 } 4900 4901 void sub_3500242E(void) { 4902 int _fpu_cmp = 0; 4903 uint32_t _cf = 0; 4904 int _df = 1; 4905 uint32_t _flag_k = FK_NONE; 4906 uint32_t _flag_a = 0, _flag_b = 0; 4907 uint32_t _itail_tgt = 0; 4908 RECOMP_REGS_LOCALS 4909 RECOMP_ENTER(0x3500242Eu); 4910 4911 L_3500242E: 4912 { _itail_tgt = (uint32_t)(MEM32(0x3500306C)); goto _ljump; } 4913 { RECOMP_REGS_OUT(); return; } /* end of function */ 4914 _ljump: 4915 switch (_itail_tgt) { 4916 case 0x3500242Eu: goto L_3500242E; 4917 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4918 } 4919 RECOMP_REGS_OUT(); 4920 }