client/game/hhr.dll/lifted-0000.c (479249B)
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_31001000(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(0x31001000u); 17 18 L_31001000: 19 PUSH32(esp, ebp); /* 0x31001000: push ebp */ 20 ebp = esp; /* 0x31001001: mov ebp, esp */ 21 PUSH32(esp, esi); /* 0x31001003: push esi */ 22 esi = MEM32(ebp + 0x8); /* 0x31001004: mov esi, dword ptr [ebp + 8] */ 23 PUSH32(esp, edi); /* 0x31001007: push edi */ 24 eax = ecx; /* 0x31001008: mov eax, ecx */ 25 ecx = 5; /* 0x3100100A: mov ecx, 5 */ 26 edi = eax; /* 0x3100100F: mov edi, eax */ 27 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31001011: 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; } 28 edi = POP32_VAL(esp); /* 0x31001013: pop edi */ 29 esi = POP32_VAL(esp); /* 0x31001014: pop esi */ 30 ebp = POP32_VAL(esp); /* 0x31001015: pop ebp */ 31 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31001016: ret 4 */ 32 RECOMP_REGS_OUT(); 33 } 34 35 void sub_31001020(void) { 36 int _fpu_cmp = 0; 37 uint32_t _cf = 0; 38 int _df = 1; 39 uint32_t _flag_k = FK_NONE; 40 uint32_t _flag_a = 0, _flag_b = 0; 41 uint32_t _itail_tgt = 0; 42 RECOMP_REGS_LOCALS 43 RECOMP_ENTER(0x31001020u); 44 45 L_31001020: 46 eax = ecx + 0x4; /* 0x31001020: lea eax, [ecx + 4] */ 47 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31001023: ret */ 48 RECOMP_REGS_OUT(); 49 } 50 51 void sub_31001030(void) { 52 int _fpu_cmp = 0; 53 uint32_t _cf = 0; 54 int _df = 1; 55 uint32_t _flag_k = FK_NONE; 56 uint32_t _flag_a = 0, _flag_b = 0; 57 uint32_t _itail_tgt = 0; 58 RECOMP_REGS_LOCALS 59 RECOMP_ENTER(0x31001030u); 60 61 L_31001030: 62 PUSH32(esp, ebp); /* 0x31001030: push ebp */ 63 ebp = esp; /* 0x31001031: mov ebp, esp */ 64 eax = ecx; /* 0x31001033: mov eax, ecx */ 65 ecx = MEM32(ebp + 0x8); /* 0x31001035: mov ecx, dword ptr [ebp + 8] */ 66 edx = MEM32(ecx); /* 0x31001038: mov edx, dword ptr [ecx] */ 67 MEM32(eax) = edx; /* 0x3100103A: mov dword ptr [eax], edx */ 68 ebp = POP32_VAL(esp); /* 0x3100103C: pop ebp */ 69 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3100103D: ret 4 */ 70 RECOMP_REGS_OUT(); 71 } 72 73 void sub_31001040(void) { 74 int _fpu_cmp = 0; 75 uint32_t _cf = 0; 76 int _df = 1; 77 uint32_t _flag_k = FK_NONE; 78 uint32_t _flag_a = 0, _flag_b = 0; 79 uint32_t _itail_tgt = 0; 80 RECOMP_REGS_LOCALS 81 RECOMP_ENTER(0x31001040u); 82 83 L_31001040: 84 PUSH32(esp, ebp); /* 0x31001040: push ebp */ 85 ebp = esp; /* 0x31001041: mov ebp, esp */ 86 eax = ecx; /* 0x31001043: mov eax, ecx */ 87 ecx = MEM32(ebp + 0x8); /* 0x31001045: mov ecx, dword ptr [ebp + 8] */ 88 edx = MEM32(ecx); /* 0x31001048: mov edx, dword ptr [ecx] */ 89 MEM32(eax) = edx; /* 0x3100104A: mov dword ptr [eax], edx */ 90 ecx = MEM32(ecx + 0x4); /* 0x3100104C: mov ecx, dword ptr [ecx + 4] */ 91 MEM32(eax + 0x4) = ecx; /* 0x3100104F: mov dword ptr [eax + 4], ecx */ 92 ebp = POP32_VAL(esp); /* 0x31001052: pop ebp */ 93 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31001053: ret 4 */ 94 RECOMP_REGS_OUT(); 95 } 96 97 void sub_31001060(void) { 98 int _fpu_cmp = 0; 99 uint32_t _cf = 0; 100 int _df = 1; 101 uint32_t _flag_k = FK_NONE; 102 uint32_t _flag_a = 0, _flag_b = 0; 103 uint32_t _itail_tgt = 0; 104 RECOMP_REGS_LOCALS 105 RECOMP_ENTER(0x31001060u); 106 107 L_31001060: 108 PUSH32(esp, ebp); /* 0x31001060: push ebp */ 109 ebp = esp; /* 0x31001061: mov ebp, esp */ 110 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x2Cu); 111 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 112 esp = esp - 0x2Cu; /* 0x31001063: sub esp, 0x2c */ 113 _flag_k = FK_CMP; 114 PUSH32(esp, edi); /* 0x31001066: push edi */ 115 PUSH32(esp, 0); /* 0x31001067: push 0 */ 116 RECOMP_ICALL(MEM32(0x310481F4)); /* 0x31001069: call dword ptr [0x310481f4] */ 117 RECOMP_FLAGS_IN(); 118 MEM32(ebp + (-0x4)) = eax; /* 0x3100106F: mov dword ptr [ebp - 4], eax */ 119 eax = ebp + (-0x4); /* 0x31001072: lea eax, [ebp - 4] */ 120 PUSH32(esp, eax); /* 0x31001075: push eax */ 121 RECOMP_ICALL(MEM32(0x310481F0)); /* 0x31001076: call dword ptr [0x310481f0] */ 122 RECOMP_FLAGS_IN(); 123 edx = eax; /* 0x3100107C: mov edx, eax */ 124 PUSH32(esp, edx); /* 0x3100107E: push edx */ 125 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 126 eax = 0; /* 0x3100107F: xor eax, eax */ 127 _cf = 0; 128 _flag_k = FK_TEST; 129 ecx = 0xAu; /* 0x31001081: mov ecx, 0xa */ 130 edi = ebp + (-0x2C); /* 0x31001086: lea edi, [ebp - 0x2c] */ 131 PUSH32(esp, 0x31051180u); /* 0x31001089: push 0x31051180 */ 132 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x3100108E: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; } 133 ecx = ebp + (-0x2C); /* 0x31001090: lea ecx, [ebp - 0x2c] */ 134 PUSH32(esp, 0x28u); /* 0x31001093: push 0x28 */ 135 PUSH32(esp, ecx); /* 0x31001095: push ecx */ 136 RECOMP_ICALL(MEM32(0x310481EC)); /* 0x31001096: call dword ptr [0x310481ec] */ 137 RECOMP_FLAGS_IN(); 138 eax = MEM32(ebp + 0x8); /* 0x3100109C: mov eax, dword ptr [ebp + 8] */ 139 edx = ebp + (-0x2C); /* 0x3100109F: lea edx, [ebp - 0x2c] */ 140 PUSH32(esp, edx); /* 0x310010A2: push edx */ 141 PUSH32(esp, eax); /* 0x310010A3: push eax */ 142 RECOMP_ICALL(MEM32(0x31048098)); /* 0x310010A4: call dword ptr [0x31048098] */ 143 RECOMP_FLAGS_IN(); 144 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x20u); 145 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 146 esp = esp + 0x20u; /* 0x310010AA: add esp, 0x20 */ 147 _flag_k = FK_ADD; 148 edi = POP32_VAL(esp); /* 0x310010AD: pop edi */ 149 esp = ebp; /* 0x310010AE: mov esp, ebp */ 150 ebp = POP32_VAL(esp); /* 0x310010B0: pop ebp */ 151 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310010B1: ret */ 152 RECOMP_REGS_OUT(); 153 } 154 155 void sub_310010C0(void) { 156 int _fpu_cmp = 0; 157 uint32_t _cf = 0; 158 int _df = 1; 159 uint32_t _flag_k = FK_NONE; 160 uint32_t _flag_a = 0, _flag_b = 0; 161 uint32_t _itail_tgt = 0; 162 RECOMP_REGS_LOCALS 163 RECOMP_ENTER(0x310010C0u); 164 165 L_310010C0: 166 RECOMP_ICALL(0x310114B2u); /* 0x310010C0: call 0x310114b2 */ /* not lifted */ 167 RECOMP_FLAGS_IN(); 168 L_310010C5: 169 PUSH32(esp, eax); /* 0x310010C5: push eax */ 170 L_310010C6: 171 RECOMP_ICALL(0x31011463u); /* 0x310010C6: call 0x31011463 */ /* not lifted */ 172 RECOMP_FLAGS_IN(); 173 L_310010CB: 174 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 175 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 176 esp = esp + 4; /* 0x310010CB: add esp, 4 */ 177 _flag_k = FK_ADD; 178 L_310010CE: 179 /* test eax, eax */ /* 0x310010CE: test eax, eax */ 180 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 181 _cf = 0; 182 _flag_k = FK_TEST; 183 L_310010D0: 184 if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_NE, _cf)) goto L_310010D7; /* 0x310010D0: jne 0x310010d7 */ 185 L_310010D2: 186 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 187 eax = eax | 0xFFFFFFFFu; /* 0x310010D2: or eax, 0xffffffff */ 188 _cf = 0; 189 _flag_k = FK_TEST; 190 L_310010D5: 191 goto L_310010E9; /* 0x310010D5: jmp 0x310010e9 */ 192 L_310010D7: 193 RECOMP_ICALL(0x310114B2u); /* 0x310010D7: call 0x310114b2 */ /* not lifted */ 194 RECOMP_FLAGS_IN(); 195 L_310010DC: 196 PUSH32(esp, eax); /* 0x310010DC: push eax */ 197 L_310010DD: 198 RECOMP_ICALL(0x31011463u); /* 0x310010DD: call 0x31011463 */ /* not lifted */ 199 RECOMP_FLAGS_IN(); 200 L_310010E2: 201 SET_LO16(eax, MEM16(eax + 0x7C)); /* 0x310010E2: mov ax, word ptr [eax + 0x7c] */ 202 L_310010E6: 203 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 204 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 205 esp = esp + 4; /* 0x310010E6: add esp, 4 */ 206 _flag_k = FK_ADD; 207 L_310010E9: 208 eax = (int32_t)(int16_t)LO16(eax); /* 0x310010E9: movsx eax, ax */ 209 L_310010EC: 210 /* cmp eax, 0x75u */ /* 0x310010EC: cmp eax, 0x75 */ 211 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x75u); 212 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 213 _flag_k = FK_CMP; 214 L_310010EF: 215 if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_A, _cf)) goto L_31001263; /* 0x310010EF: ja 0x31001263 */ 216 L_310010F5: 217 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 218 ecx = 0; /* 0x310010F5: xor ecx, ecx */ 219 _cf = 0; 220 _flag_k = FK_TEST; 221 L_310010F7: 222 SET_LO8(ecx, MEM8(eax + 0x31001300)); /* 0x310010F7: mov cl, byte ptr [eax + 0x31001300] */ 223 L_310010FD: 224 { _itail_tgt = (uint32_t)(MEM32(ecx * 4 + 0x310012D8)); goto _ljump; } 225 L_31001104: 226 edx = MEM32(0x310481FC); /* 0x31001104: mov edx, dword ptr [0x310481fc] */ 227 L_3100110A: 228 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x40u); 229 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 230 edx = edx + 0x40u; /* 0x3100110A: add edx, 0x40 */ 231 _flag_k = FK_ADD; 232 L_3100110D: 233 PUSH32(esp, 0x31051280u); /* 0x3100110D: push 0x31051280 */ 234 L_31001112: 235 PUSH32(esp, edx); /* 0x31001112: push edx */ 236 L_31001113: 237 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x31001113: call dword ptr [0x310481f8] */ 238 RECOMP_FLAGS_IN(); 239 L_31001119: 240 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 241 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 242 esp = esp + 8; /* 0x31001119: add esp, 8 */ 243 _flag_k = FK_ADD; 244 L_3100111C: 245 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100111C: ret */ 246 L_3100111D: 247 PUSH32(esp, 0x31051270u); /* 0x3100111D: push 0x31051270 */ 248 L_31001122: 249 goto L_31001166; /* 0x31001122: jmp 0x31001166 */ 250 L_31001124: 251 RECOMP_ICALL(0x310114B2u); /* 0x31001124: call 0x310114b2 */ /* not lifted */ 252 RECOMP_FLAGS_IN(); 253 L_31001129: 254 PUSH32(esp, eax); /* 0x31001129: push eax */ 255 L_3100112A: 256 RECOMP_ICALL(0x31011463u); /* 0x3100112A: call 0x31011463 */ /* not lifted */ 257 RECOMP_FLAGS_IN(); 258 L_3100112F: 259 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 260 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 261 esp = esp + 4; /* 0x3100112F: add esp, 4 */ 262 _flag_k = FK_ADD; 263 L_31001132: 264 /* test eax, eax */ /* 0x31001132: test eax, eax */ 265 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 266 _cf = 0; 267 _flag_k = FK_TEST; 268 L_31001134: 269 if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_NE, _cf)) goto L_31001144; /* 0x31001134: jne 0x31001144 */ 270 L_31001136: 271 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 272 eax = eax | 0xFFFFFFFFu; /* 0x31001136: or eax, 0xffffffff */ 273 _cf = 0; 274 _flag_k = FK_TEST; 275 L_31001139: 276 ecx = (int32_t)(int16_t)LO16(eax); /* 0x31001139: movsx ecx, ax */ 277 L_3100113C: 278 PUSH32(esp, ecx); /* 0x3100113C: push ecx */ 279 L_3100113D: 280 PUSH32(esp, 0x31051258u); /* 0x3100113D: push 0x31051258 */ 281 L_31001142: 282 goto L_310011AB; /* 0x31001142: jmp 0x310011ab */ 283 L_31001144: 284 RECOMP_ICALL(0x310114B2u); /* 0x31001144: call 0x310114b2 */ /* not lifted */ 285 RECOMP_FLAGS_IN(); 286 L_31001149: 287 PUSH32(esp, eax); /* 0x31001149: push eax */ 288 L_3100114A: 289 RECOMP_ICALL(0x31011463u); /* 0x3100114A: call 0x31011463 */ /* not lifted */ 290 RECOMP_FLAGS_IN(); 291 L_3100114F: 292 SET_LO16(eax, MEM16(eax + 0x7E)); /* 0x3100114F: mov ax, word ptr [eax + 0x7e] */ 293 L_31001153: 294 ecx = (int32_t)(int16_t)LO16(eax); /* 0x31001153: movsx ecx, ax */ 295 L_31001156: 296 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 297 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 298 esp = esp + 4; /* 0x31001156: add esp, 4 */ 299 _flag_k = FK_ADD; 300 L_31001159: 301 PUSH32(esp, ecx); /* 0x31001159: push ecx */ 302 L_3100115A: 303 PUSH32(esp, 0x31051258u); /* 0x3100115A: push 0x31051258 */ 304 L_3100115F: 305 goto L_310011AB; /* 0x3100115F: jmp 0x310011ab */ 306 L_31001161: 307 PUSH32(esp, 0x31051234u); /* 0x31001161: push 0x31051234 */ 308 L_31001166: 309 eax = MEM32(0x310481FC); /* 0x31001166: mov eax, dword ptr [0x310481fc] */ 310 L_3100116B: 311 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x40u); 312 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 313 eax = eax + 0x40u; /* 0x3100116B: add eax, 0x40 */ 314 _flag_k = FK_ADD; 315 L_3100116E: 316 PUSH32(esp, eax); /* 0x3100116E: push eax */ 317 L_3100116F: 318 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x3100116F: call dword ptr [0x310481f8] */ 319 RECOMP_FLAGS_IN(); 320 L_31001175: 321 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 322 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 323 esp = esp + 8; /* 0x31001175: add esp, 8 */ 324 _flag_k = FK_ADD; 325 L_31001178: 326 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31001178: ret */ 327 L_31001179: 328 RECOMP_ICALL(0x310114B2u); /* 0x31001179: call 0x310114b2 */ /* not lifted */ 329 RECOMP_FLAGS_IN(); 330 L_3100117E: 331 PUSH32(esp, eax); /* 0x3100117E: push eax */ 332 L_3100117F: 333 RECOMP_ICALL(0x31011463u); /* 0x3100117F: call 0x31011463 */ /* not lifted */ 334 RECOMP_FLAGS_IN(); 335 L_31001184: 336 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 337 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 338 esp = esp + 4; /* 0x31001184: add esp, 4 */ 339 _flag_k = FK_ADD; 340 L_31001187: 341 /* test eax, eax */ /* 0x31001187: test eax, eax */ 342 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 343 _cf = 0; 344 _flag_k = FK_TEST; 345 L_31001189: 346 if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_NE, _cf)) goto L_31001190; /* 0x31001189: jne 0x31001190 */ 347 L_3100118B: 348 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 349 eax = eax | 0xFFFFFFFFu; /* 0x3100118B: or eax, 0xffffffff */ 350 _cf = 0; 351 _flag_k = FK_TEST; 352 L_3100118E: 353 goto L_310011A2; /* 0x3100118E: jmp 0x310011a2 */ 354 L_31001190: 355 RECOMP_ICALL(0x310114B2u); /* 0x31001190: call 0x310114b2 */ /* not lifted */ 356 RECOMP_FLAGS_IN(); 357 L_31001195: 358 PUSH32(esp, eax); /* 0x31001195: push eax */ 359 L_31001196: 360 RECOMP_ICALL(0x31011463u); /* 0x31001196: call 0x31011463 */ /* not lifted */ 361 RECOMP_FLAGS_IN(); 362 L_3100119B: 363 SET_LO16(eax, MEM16(eax + 0x7C)); /* 0x3100119B: mov ax, word ptr [eax + 0x7c] */ 364 L_3100119F: 365 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 366 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 367 esp = esp + 4; /* 0x3100119F: add esp, 4 */ 368 _flag_k = FK_ADD; 369 L_310011A2: 370 ecx = (int32_t)(int16_t)LO16(eax); /* 0x310011A2: movsx ecx, ax */ 371 L_310011A5: 372 PUSH32(esp, ecx); /* 0x310011A5: push ecx */ 373 L_310011A6: 374 PUSH32(esp, 0x31051204u); /* 0x310011A6: push 0x31051204 */ 375 L_310011AB: 376 edx = MEM32(0x310481FC); /* 0x310011AB: mov edx, dword ptr [0x310481fc] */ 377 L_310011B1: 378 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x40u); 379 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 380 edx = edx + 0x40u; /* 0x310011B1: add edx, 0x40 */ 381 _flag_k = FK_ADD; 382 L_310011B4: 383 PUSH32(esp, edx); /* 0x310011B4: push edx */ 384 L_310011B5: 385 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x310011B5: call dword ptr [0x310481f8] */ 386 RECOMP_FLAGS_IN(); 387 L_310011BB: 388 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 389 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 390 esp = esp + 0xCu; /* 0x310011BB: add esp, 0xc */ 391 _flag_k = FK_ADD; 392 L_310011BE: 393 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310011BE: ret */ 394 L_310011BF: 395 RECOMP_ICALL(0x310114B2u); /* 0x310011BF: call 0x310114b2 */ /* not lifted */ 396 RECOMP_FLAGS_IN(); 397 L_310011C4: 398 PUSH32(esp, eax); /* 0x310011C4: push eax */ 399 L_310011C5: 400 RECOMP_ICALL(0x31011463u); /* 0x310011C5: call 0x31011463 */ /* not lifted */ 401 RECOMP_FLAGS_IN(); 402 L_310011CA: 403 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 404 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 405 esp = esp + 4; /* 0x310011CA: add esp, 4 */ 406 _flag_k = FK_ADD; 407 L_310011CD: 408 /* test eax, eax */ /* 0x310011CD: test eax, eax */ 409 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 410 _cf = 0; 411 _flag_k = FK_TEST; 412 L_310011CF: 413 if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_NE, _cf)) goto L_310011D6; /* 0x310011CF: jne 0x310011d6 */ 414 L_310011D1: 415 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 416 eax = eax | 0xFFFFFFFFu; /* 0x310011D1: or eax, 0xffffffff */ 417 _cf = 0; 418 _flag_k = FK_TEST; 419 L_310011D4: 420 goto L_310011E8; /* 0x310011D4: jmp 0x310011e8 */ 421 L_310011D6: 422 RECOMP_ICALL(0x310114B2u); /* 0x310011D6: call 0x310114b2 */ /* not lifted */ 423 RECOMP_FLAGS_IN(); 424 L_310011DB: 425 PUSH32(esp, eax); /* 0x310011DB: push eax */ 426 L_310011DC: 427 RECOMP_ICALL(0x31011463u); /* 0x310011DC: call 0x31011463 */ /* not lifted */ 428 RECOMP_FLAGS_IN(); 429 L_310011E1: 430 SET_LO16(eax, MEM16(eax + 0x7E)); /* 0x310011E1: mov ax, word ptr [eax + 0x7e] */ 431 L_310011E5: 432 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 433 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 434 esp = esp + 4; /* 0x310011E5: add esp, 4 */ 435 _flag_k = FK_ADD; 436 L_310011E8: 437 ecx = MEM32(0x310481FC); /* 0x310011E8: mov ecx, dword ptr [0x310481fc] */ 438 L_310011EE: 439 eax = (int32_t)(int16_t)LO16(eax); /* 0x310011EE: movsx eax, ax */ 440 L_310011F1: 441 PUSH32(esp, eax); /* 0x310011F1: push eax */ 442 L_310011F2: 443 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x40u); 444 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 445 ecx = ecx + 0x40u; /* 0x310011F2: add ecx, 0x40 */ 446 _flag_k = FK_ADD; 447 L_310011F5: 448 PUSH32(esp, 0x310511E8u); /* 0x310011F5: push 0x310511e8 */ 449 L_310011FA: 450 PUSH32(esp, ecx); /* 0x310011FA: push ecx */ 451 L_310011FB: 452 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x310011FB: call dword ptr [0x310481f8] */ 453 RECOMP_FLAGS_IN(); 454 L_31001201: 455 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 456 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 457 esp = esp + 0xCu; /* 0x31001201: add esp, 0xc */ 458 _flag_k = FK_ADD; 459 L_31001204: 460 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31001204: ret */ 461 L_31001205: 462 RECOMP_ICALL(0x310114B2u); /* 0x31001205: call 0x310114b2 */ /* not lifted */ 463 RECOMP_FLAGS_IN(); 464 L_3100120A: 465 PUSH32(esp, eax); /* 0x3100120A: push eax */ 466 L_3100120B: 467 RECOMP_ICALL(0x31011463u); /* 0x3100120B: call 0x31011463 */ /* not lifted */ 468 RECOMP_FLAGS_IN(); 469 L_31001210: 470 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 471 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 472 esp = esp + 4; /* 0x31001210: add esp, 4 */ 473 _flag_k = FK_ADD; 474 L_31001213: 475 /* test eax, eax */ /* 0x31001213: test eax, eax */ 476 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 477 _cf = 0; 478 _flag_k = FK_TEST; 479 L_31001215: 480 if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_NE, _cf)) goto L_3100121C; /* 0x31001215: jne 0x3100121c */ 481 L_31001217: 482 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 483 eax = eax | 0xFFFFFFFFu; /* 0x31001217: or eax, 0xffffffff */ 484 _cf = 0; 485 _flag_k = FK_TEST; 486 L_3100121A: 487 goto L_3100122E; /* 0x3100121A: jmp 0x3100122e */ 488 L_3100121C: 489 RECOMP_ICALL(0x310114B2u); /* 0x3100121C: call 0x310114b2 */ /* not lifted */ 490 RECOMP_FLAGS_IN(); 491 L_31001221: 492 PUSH32(esp, eax); /* 0x31001221: push eax */ 493 L_31001222: 494 RECOMP_ICALL(0x31011463u); /* 0x31001222: call 0x31011463 */ /* not lifted */ 495 RECOMP_FLAGS_IN(); 496 L_31001227: 497 SET_LO16(eax, MEM16(eax + 0x7E)); /* 0x31001227: mov ax, word ptr [eax + 0x7e] */ 498 L_3100122B: 499 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 500 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 501 esp = esp + 4; /* 0x3100122B: add esp, 4 */ 502 _flag_k = FK_ADD; 503 L_3100122E: 504 edx = (int32_t)(int16_t)LO16(eax); /* 0x3100122E: movsx edx, ax */ 505 L_31001231: 506 eax = MEM32(0x310481FC); /* 0x31001231: mov eax, dword ptr [0x310481fc] */ 507 L_31001236: 508 PUSH32(esp, edx); /* 0x31001236: push edx */ 509 L_31001237: 510 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x40u); 511 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 512 eax = eax + 0x40u; /* 0x31001237: add eax, 0x40 */ 513 _flag_k = FK_ADD; 514 L_3100123A: 515 PUSH32(esp, 0x310511C4u); /* 0x3100123A: push 0x310511c4 */ 516 L_3100123F: 517 PUSH32(esp, eax); /* 0x3100123F: push eax */ 518 L_31001240: 519 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x31001240: call dword ptr [0x310481f8] */ 520 RECOMP_FLAGS_IN(); 521 L_31001246: 522 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 523 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 524 esp = esp + 0xCu; /* 0x31001246: add esp, 0xc */ 525 _flag_k = FK_ADD; 526 L_31001249: 527 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31001249: ret */ 528 L_3100124A: 529 ecx = MEM32(0x310481FC); /* 0x3100124A: mov ecx, dword ptr [0x310481fc] */ 530 L_31001250: 531 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x40u); 532 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 533 ecx = ecx + 0x40u; /* 0x31001250: add ecx, 0x40 */ 534 _flag_k = FK_ADD; 535 L_31001253: 536 PUSH32(esp, 0x310511ACu); /* 0x31001253: push 0x310511ac */ 537 L_31001258: 538 PUSH32(esp, ecx); /* 0x31001258: push ecx */ 539 L_31001259: 540 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x31001259: call dword ptr [0x310481f8] */ 541 RECOMP_FLAGS_IN(); 542 L_3100125F: 543 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 544 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 545 esp = esp + 8; /* 0x3100125F: add esp, 8 */ 546 _flag_k = FK_ADD; 547 L_31001262: 548 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31001262: ret */ 549 L_31001263: 550 PUSH32(esp, esi); /* 0x31001263: push esi */ 551 L_31001264: 552 RECOMP_ICALL(0x310114B2u); /* 0x31001264: call 0x310114b2 */ /* not lifted */ 553 RECOMP_FLAGS_IN(); 554 L_31001269: 555 PUSH32(esp, eax); /* 0x31001269: push eax */ 556 L_3100126A: 557 RECOMP_ICALL(0x31011463u); /* 0x3100126A: call 0x31011463 */ /* not lifted */ 558 RECOMP_FLAGS_IN(); 559 L_3100126F: 560 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 561 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 562 esp = esp + 4; /* 0x3100126F: add esp, 4 */ 563 _flag_k = FK_ADD; 564 L_31001272: 565 /* test eax, eax */ /* 0x31001272: test eax, eax */ 566 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 567 _cf = 0; 568 _flag_k = FK_TEST; 569 L_31001274: 570 if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_NE, _cf)) goto L_3100127B; /* 0x31001274: jne 0x3100127b */ 571 L_31001276: 572 _flag_a = (uint32_t)((esi | 0xFFFFFFFFu)); _flag_b = (uint32_t)((esi | 0xFFFFFFFFu)); 573 esi = esi | 0xFFFFFFFFu; /* 0x31001276: or esi, 0xffffffff */ 574 _cf = 0; 575 _flag_k = FK_TEST; 576 L_31001279: 577 goto L_3100128D; /* 0x31001279: jmp 0x3100128d */ 578 L_3100127B: 579 RECOMP_ICALL(0x310114B2u); /* 0x3100127B: call 0x310114b2 */ /* not lifted */ 580 RECOMP_FLAGS_IN(); 581 L_31001280: 582 PUSH32(esp, eax); /* 0x31001280: push eax */ 583 L_31001281: 584 RECOMP_ICALL(0x31011463u); /* 0x31001281: call 0x31011463 */ /* not lifted */ 585 RECOMP_FLAGS_IN(); 586 L_31001286: 587 SET_LO16(esi, MEM16(eax + 0x7E)); /* 0x31001286: mov si, word ptr [eax + 0x7e] */ 588 L_3100128A: 589 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 590 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 591 esp = esp + 4; /* 0x3100128A: add esp, 4 */ 592 _flag_k = FK_ADD; 593 L_3100128D: 594 RECOMP_ICALL(0x310114B2u); /* 0x3100128D: call 0x310114b2 */ /* not lifted */ 595 RECOMP_FLAGS_IN(); 596 L_31001292: 597 PUSH32(esp, eax); /* 0x31001292: push eax */ 598 L_31001293: 599 RECOMP_ICALL(0x31011463u); /* 0x31001293: call 0x31011463 */ /* not lifted */ 600 RECOMP_FLAGS_IN(); 601 L_31001298: 602 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 603 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 604 esp = esp + 4; /* 0x31001298: add esp, 4 */ 605 _flag_k = FK_ADD; 606 L_3100129B: 607 /* test eax, eax */ /* 0x3100129B: test eax, eax */ 608 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 609 _cf = 0; 610 _flag_k = FK_TEST; 611 L_3100129D: 612 if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_NE, _cf)) goto L_310012A4; /* 0x3100129D: jne 0x310012a4 */ 613 L_3100129F: 614 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 615 eax = eax | 0xFFFFFFFFu; /* 0x3100129F: or eax, 0xffffffff */ 616 _cf = 0; 617 _flag_k = FK_TEST; 618 L_310012A2: 619 goto L_310012B6; /* 0x310012A2: jmp 0x310012b6 */ 620 L_310012A4: 621 RECOMP_ICALL(0x310114B2u); /* 0x310012A4: call 0x310114b2 */ /* not lifted */ 622 RECOMP_FLAGS_IN(); 623 L_310012A9: 624 PUSH32(esp, eax); /* 0x310012A9: push eax */ 625 L_310012AA: 626 RECOMP_ICALL(0x31011463u); /* 0x310012AA: call 0x31011463 */ /* not lifted */ 627 RECOMP_FLAGS_IN(); 628 L_310012AF: 629 SET_LO16(eax, MEM16(eax + 0x7C)); /* 0x310012AF: mov ax, word ptr [eax + 0x7c] */ 630 L_310012B3: 631 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 632 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 633 esp = esp + 4; /* 0x310012B3: add esp, 4 */ 634 _flag_k = FK_ADD; 635 L_310012B6: 636 ecx = MEM32(0x310481FC); /* 0x310012B6: mov ecx, dword ptr [0x310481fc] */ 637 L_310012BC: 638 edx = (int32_t)(int16_t)LO16(esi); /* 0x310012BC: movsx edx, si */ 639 L_310012BF: 640 PUSH32(esp, edx); /* 0x310012BF: push edx */ 641 L_310012C0: 642 eax = (int32_t)(int16_t)LO16(eax); /* 0x310012C0: movsx eax, ax */ 643 L_310012C3: 644 PUSH32(esp, eax); /* 0x310012C3: push eax */ 645 L_310012C4: 646 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x40u); 647 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 648 ecx = ecx + 0x40u; /* 0x310012C4: add ecx, 0x40 */ 649 _flag_k = FK_ADD; 650 L_310012C7: 651 PUSH32(esp, 0x31051194u); /* 0x310012C7: push 0x31051194 */ 652 L_310012CC: 653 PUSH32(esp, ecx); /* 0x310012CC: push ecx */ 654 L_310012CD: 655 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x310012CD: call dword ptr [0x310481f8] */ 656 RECOMP_FLAGS_IN(); 657 L_310012D3: 658 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 659 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 660 esp = esp + 0x10u; /* 0x310012D3: add esp, 0x10 */ 661 _flag_k = FK_ADD; 662 L_310012D6: 663 esi = POP32_VAL(esp); /* 0x310012D6: pop esi */ 664 L_310012D7: 665 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310012D7: ret */ 666 _ljump: 667 switch (_itail_tgt) { 668 case 0x310010C0u: goto L_310010C0; 669 case 0x310010C5u: goto L_310010C5; 670 case 0x310010C6u: goto L_310010C6; 671 case 0x310010CBu: goto L_310010CB; 672 case 0x310010CEu: goto L_310010CE; 673 case 0x310010D0u: goto L_310010D0; 674 case 0x310010D2u: goto L_310010D2; 675 case 0x310010D5u: goto L_310010D5; 676 case 0x310010D7u: goto L_310010D7; 677 case 0x310010DCu: goto L_310010DC; 678 case 0x310010DDu: goto L_310010DD; 679 case 0x310010E2u: goto L_310010E2; 680 case 0x310010E6u: goto L_310010E6; 681 case 0x310010E9u: goto L_310010E9; 682 case 0x310010ECu: goto L_310010EC; 683 case 0x310010EFu: goto L_310010EF; 684 case 0x310010F5u: goto L_310010F5; 685 case 0x310010F7u: goto L_310010F7; 686 case 0x310010FDu: goto L_310010FD; 687 case 0x31001104u: goto L_31001104; 688 case 0x3100110Au: goto L_3100110A; 689 case 0x3100110Du: goto L_3100110D; 690 case 0x31001112u: goto L_31001112; 691 case 0x31001113u: goto L_31001113; 692 case 0x31001119u: goto L_31001119; 693 case 0x3100111Cu: goto L_3100111C; 694 case 0x3100111Du: goto L_3100111D; 695 case 0x31001122u: goto L_31001122; 696 case 0x31001124u: goto L_31001124; 697 case 0x31001129u: goto L_31001129; 698 case 0x3100112Au: goto L_3100112A; 699 case 0x3100112Fu: goto L_3100112F; 700 case 0x31001132u: goto L_31001132; 701 case 0x31001134u: goto L_31001134; 702 case 0x31001136u: goto L_31001136; 703 case 0x31001139u: goto L_31001139; 704 case 0x3100113Cu: goto L_3100113C; 705 case 0x3100113Du: goto L_3100113D; 706 case 0x31001142u: goto L_31001142; 707 case 0x31001144u: goto L_31001144; 708 case 0x31001149u: goto L_31001149; 709 case 0x3100114Au: goto L_3100114A; 710 case 0x3100114Fu: goto L_3100114F; 711 case 0x31001153u: goto L_31001153; 712 case 0x31001156u: goto L_31001156; 713 case 0x31001159u: goto L_31001159; 714 case 0x3100115Au: goto L_3100115A; 715 case 0x3100115Fu: goto L_3100115F; 716 case 0x31001161u: goto L_31001161; 717 case 0x31001166u: goto L_31001166; 718 case 0x3100116Bu: goto L_3100116B; 719 case 0x3100116Eu: goto L_3100116E; 720 case 0x3100116Fu: goto L_3100116F; 721 case 0x31001175u: goto L_31001175; 722 case 0x31001178u: goto L_31001178; 723 case 0x31001179u: goto L_31001179; 724 case 0x3100117Eu: goto L_3100117E; 725 case 0x3100117Fu: goto L_3100117F; 726 case 0x31001184u: goto L_31001184; 727 case 0x31001187u: goto L_31001187; 728 case 0x31001189u: goto L_31001189; 729 case 0x3100118Bu: goto L_3100118B; 730 case 0x3100118Eu: goto L_3100118E; 731 case 0x31001190u: goto L_31001190; 732 case 0x31001195u: goto L_31001195; 733 case 0x31001196u: goto L_31001196; 734 case 0x3100119Bu: goto L_3100119B; 735 case 0x3100119Fu: goto L_3100119F; 736 case 0x310011A2u: goto L_310011A2; 737 case 0x310011A5u: goto L_310011A5; 738 case 0x310011A6u: goto L_310011A6; 739 case 0x310011ABu: goto L_310011AB; 740 case 0x310011B1u: goto L_310011B1; 741 case 0x310011B4u: goto L_310011B4; 742 case 0x310011B5u: goto L_310011B5; 743 case 0x310011BBu: goto L_310011BB; 744 case 0x310011BEu: goto L_310011BE; 745 case 0x310011BFu: goto L_310011BF; 746 case 0x310011C4u: goto L_310011C4; 747 case 0x310011C5u: goto L_310011C5; 748 case 0x310011CAu: goto L_310011CA; 749 case 0x310011CDu: goto L_310011CD; 750 case 0x310011CFu: goto L_310011CF; 751 case 0x310011D1u: goto L_310011D1; 752 case 0x310011D4u: goto L_310011D4; 753 case 0x310011D6u: goto L_310011D6; 754 case 0x310011DBu: goto L_310011DB; 755 case 0x310011DCu: goto L_310011DC; 756 case 0x310011E1u: goto L_310011E1; 757 case 0x310011E5u: goto L_310011E5; 758 case 0x310011E8u: goto L_310011E8; 759 case 0x310011EEu: goto L_310011EE; 760 case 0x310011F1u: goto L_310011F1; 761 case 0x310011F2u: goto L_310011F2; 762 case 0x310011F5u: goto L_310011F5; 763 case 0x310011FAu: goto L_310011FA; 764 case 0x310011FBu: goto L_310011FB; 765 case 0x31001201u: goto L_31001201; 766 case 0x31001204u: goto L_31001204; 767 case 0x31001205u: goto L_31001205; 768 case 0x3100120Au: goto L_3100120A; 769 case 0x3100120Bu: goto L_3100120B; 770 case 0x31001210u: goto L_31001210; 771 case 0x31001213u: goto L_31001213; 772 case 0x31001215u: goto L_31001215; 773 case 0x31001217u: goto L_31001217; 774 case 0x3100121Au: goto L_3100121A; 775 case 0x3100121Cu: goto L_3100121C; 776 case 0x31001221u: goto L_31001221; 777 case 0x31001222u: goto L_31001222; 778 case 0x31001227u: goto L_31001227; 779 case 0x3100122Bu: goto L_3100122B; 780 case 0x3100122Eu: goto L_3100122E; 781 case 0x31001231u: goto L_31001231; 782 case 0x31001236u: goto L_31001236; 783 case 0x31001237u: goto L_31001237; 784 case 0x3100123Au: goto L_3100123A; 785 case 0x3100123Fu: goto L_3100123F; 786 case 0x31001240u: goto L_31001240; 787 case 0x31001246u: goto L_31001246; 788 case 0x31001249u: goto L_31001249; 789 case 0x3100124Au: goto L_3100124A; 790 case 0x31001250u: goto L_31001250; 791 case 0x31001253u: goto L_31001253; 792 case 0x31001258u: goto L_31001258; 793 case 0x31001259u: goto L_31001259; 794 case 0x3100125Fu: goto L_3100125F; 795 case 0x31001262u: goto L_31001262; 796 case 0x31001263u: goto L_31001263; 797 case 0x31001264u: goto L_31001264; 798 case 0x31001269u: goto L_31001269; 799 case 0x3100126Au: goto L_3100126A; 800 case 0x3100126Fu: goto L_3100126F; 801 case 0x31001272u: goto L_31001272; 802 case 0x31001274u: goto L_31001274; 803 case 0x31001276u: goto L_31001276; 804 case 0x31001279u: goto L_31001279; 805 case 0x3100127Bu: goto L_3100127B; 806 case 0x31001280u: goto L_31001280; 807 case 0x31001281u: goto L_31001281; 808 case 0x31001286u: goto L_31001286; 809 case 0x3100128Au: goto L_3100128A; 810 case 0x3100128Du: goto L_3100128D; 811 case 0x31001292u: goto L_31001292; 812 case 0x31001293u: goto L_31001293; 813 case 0x31001298u: goto L_31001298; 814 case 0x3100129Bu: goto L_3100129B; 815 case 0x3100129Du: goto L_3100129D; 816 case 0x3100129Fu: goto L_3100129F; 817 case 0x310012A2u: goto L_310012A2; 818 case 0x310012A4u: goto L_310012A4; 819 case 0x310012A9u: goto L_310012A9; 820 case 0x310012AAu: goto L_310012AA; 821 case 0x310012AFu: goto L_310012AF; 822 case 0x310012B3u: goto L_310012B3; 823 case 0x310012B6u: goto L_310012B6; 824 case 0x310012BCu: goto L_310012BC; 825 case 0x310012BFu: goto L_310012BF; 826 case 0x310012C0u: goto L_310012C0; 827 case 0x310012C3u: goto L_310012C3; 828 case 0x310012C4u: goto L_310012C4; 829 case 0x310012C7u: goto L_310012C7; 830 case 0x310012CCu: goto L_310012CC; 831 case 0x310012CDu: goto L_310012CD; 832 case 0x310012D3u: goto L_310012D3; 833 case 0x310012D6u: goto L_310012D6; 834 case 0x310012D7u: goto L_310012D7; 835 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 836 } 837 RECOMP_REGS_OUT(); 838 } 839 840 void sub_31001380(void) { 841 int _fpu_cmp = 0; 842 uint32_t _cf = 0; 843 int _df = 1; 844 uint32_t _flag_k = FK_NONE; 845 uint32_t _flag_a = 0, _flag_b = 0; 846 uint32_t _itail_tgt = 0; 847 RECOMP_REGS_LOCALS 848 RECOMP_ENTER(0x31001380u); 849 850 L_31001380: 851 PUSH32(esp, ebp); /* 0x31001380: push ebp */ 852 ebp = esp; /* 0x31001381: mov ebp, esp */ 853 eax = MEM32(ebp + 0x8); /* 0x31001383: mov eax, dword ptr [ebp + 8] */ 854 ecx = MEM32(0x310481FC); /* 0x31001386: mov ecx, dword ptr [0x310481fc] */ 855 PUSH32(esp, eax); /* 0x3100138C: push eax */ 856 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x40u); 857 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 858 ecx = ecx + 0x40u; /* 0x3100138D: add ecx, 0x40 */ 859 _flag_k = FK_ADD; 860 PUSH32(esp, 0x310512A0u); /* 0x31001390: push 0x310512a0 */ 861 PUSH32(esp, ecx); /* 0x31001395: push ecx */ 862 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x31001396: call dword ptr [0x310481f8] */ 863 RECOMP_FLAGS_IN(); 864 RECOMP_ICALL(0x310010C0u); /* 0x3100139C: call 0x310010c0 */ /* not lifted */ 865 RECOMP_FLAGS_IN(); 866 RECOMP_ICALL(0x31014A0Du); /* 0x310013A1: call 0x31014a0d */ /* not lifted */ 867 RECOMP_FLAGS_IN(); 868 PUSH32(esp, 1); /* 0x310013A6: push 1 */ 869 RECOMP_ICALL(0x310146EFu); /* 0x310013A8: call 0x310146ef */ /* not lifted */ 870 RECOMP_FLAGS_IN(); 871 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 872 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 873 esp = esp + 0x10u; /* 0x310013AD: add esp, 0x10 */ 874 _flag_k = FK_ADD; 875 ebp = POP32_VAL(esp); /* 0x310013B0: pop ebp */ 876 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310013B1: ret */ 877 RECOMP_REGS_OUT(); 878 } 879 880 void sub_310013C0(void) { 881 int _fpu_cmp = 0; 882 uint32_t _cf = 0; 883 int _df = 1; 884 uint32_t _flag_k = FK_NONE; 885 uint32_t _flag_a = 0, _flag_b = 0; 886 uint32_t _itail_tgt = 0; 887 RECOMP_REGS_LOCALS 888 RECOMP_ENTER(0x310013C0u); 889 890 L_310013C0: 891 PUSH32(esp, ebp); /* 0x310013C0: push ebp */ 892 ebp = esp; /* 0x310013C1: mov ebp, esp */ 893 SET_LO8(edx, MEM8(ebp + 0xC)); /* 0x310013C3: mov dl, byte ptr [ebp + 0xc] */ 894 eax = ecx; /* 0x310013C6: mov eax, ecx */ 895 ecx = MEM32(ebp + 0x8); /* 0x310013C8: mov ecx, dword ptr [ebp + 8] */ 896 MEM32(eax) = ecx; /* 0x310013CB: mov dword ptr [eax], ecx */ 897 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 898 ecx = 0; /* 0x310013CD: xor ecx, ecx */ 899 _cf = 0; 900 _flag_k = FK_TEST; 901 MEM8(eax + 0x4) = (uint8_t)(LO8(edx)); /* 0x310013CF: mov byte ptr [eax + 4], dl */ 902 MEM32(eax + 0x8) = ecx; /* 0x310013D2: mov dword ptr [eax + 8], ecx */ 903 MEM32(eax + 0xC) = ecx; /* 0x310013D5: mov dword ptr [eax + 0xc], ecx */ 904 MEM32(eax + 0x10) = ecx; /* 0x310013D8: mov dword ptr [eax + 0x10], ecx */ 905 ebp = POP32_VAL(esp); /* 0x310013DB: pop ebp */ 906 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x310013DC: ret 8 */ 907 RECOMP_REGS_OUT(); 908 } 909 910 void sub_310013E0(void) { 911 int _fpu_cmp = 0; 912 uint32_t _cf = 0; 913 int _df = 1; 914 uint32_t _flag_k = FK_NONE; 915 uint32_t _flag_a = 0, _flag_b = 0; 916 uint32_t _itail_tgt = 0; 917 RECOMP_REGS_LOCALS 918 RECOMP_ENTER(0x310013E0u); 919 920 L_310013E0: 921 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310013E0: ret */ 922 RECOMP_REGS_OUT(); 923 } 924 925 void sub_310013F0(void) { 926 int _fpu_cmp = 0; 927 uint32_t _cf = 0; 928 int _df = 1; 929 uint32_t _flag_k = FK_NONE; 930 uint32_t _flag_a = 0, _flag_b = 0; 931 uint32_t _itail_tgt = 0; 932 RECOMP_REGS_LOCALS 933 RECOMP_ENTER(0x310013F0u); 934 935 L_310013F0: 936 PUSH32(esp, ebp); /* 0x310013F0: push ebp */ 937 ebp = esp; /* 0x310013F1: mov ebp, esp */ 938 PUSH32(esp, 0xFFFFFFFFu); /* 0x310013F3: push -1 */ 939 PUSH32(esp, 0x31046BE9u); /* 0x310013F5: push 0x31046be9 */ 940 eax = MEM32(FS_BASE + (0)); /* 0x310013FA: mov eax, dword ptr fs:[0] */ 941 PUSH32(esp, eax); /* 0x31001400: push eax */ 942 MEM32(FS_BASE + (0)) = esp; /* 0x31001401: mov dword ptr fs:[0], esp */ 943 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x4Cu); 944 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 945 esp = esp - 0x4Cu; /* 0x31001408: sub esp, 0x4c */ 946 _flag_k = FK_CMP; 947 PUSH32(esp, ebx); /* 0x3100140B: push ebx */ 948 PUSH32(esp, esi); /* 0x3100140C: push esi */ 949 PUSH32(esp, edi); /* 0x3100140D: push edi */ 950 PUSH32(esp, 8); /* 0x3100140E: push 8 */ 951 eax = ebp + (-0x14); /* 0x31001410: lea eax, [ebp - 0x14] */ 952 esi = ecx; /* 0x31001413: mov esi, ecx */ 953 PUSH32(esp, eax); /* 0x31001415: push eax */ 954 ecx = ebp + (-0x58); /* 0x31001416: lea ecx, [ebp - 0x58] */ 955 RECOMP_ICALL(MEM32(0x31048320)); /* 0x31001419: call dword ptr [0x31048320] */ 956 RECOMP_FLAGS_IN(); 957 ecx = MEM32(ebp + (-0x1C)); /* 0x3100141F: mov ecx, dword ptr [ebp - 0x1c] */ 958 eax = MEM32(esi); /* 0x31001422: mov eax, dword ptr [esi] */ 959 MEM32(ebp + (-0x18)) = ecx; /* 0x31001424: mov dword ptr [ebp - 0x18], ecx */ 960 ecx = MEM32(eax + 0x110); /* 0x31001427: mov ecx, dword ptr [eax + 0x110] */ 961 edx = ebp + (-0x14); /* 0x3100142D: lea edx, [ebp - 0x14] */ 962 PUSH32(esp, edx); /* 0x31001430: push edx */ 963 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 964 edx = 0; /* 0x31001431: xor edx, edx */ 965 _cf = 0; 966 _flag_k = FK_TEST; 967 SET_LO16(edx, MEM16(ecx + 0xA0)); /* 0x31001433: mov dx, word ptr [ecx + 0xa0] */ 968 _flag_a = (uint32_t)(LO16(edx)) << 16; _flag_b = (uint32_t)(1) << 16; 969 SET_LO16(edx, LO16(edx) + 1); /* 0x3100143A: inc dx */ 970 _flag_k = FK_NARROW(FK_INC, 16); 971 MEM32(ebp + (-0x4)) = 0; /* 0x3100143C: mov dword ptr [ebp - 4], 0 */ 972 PUSH32(esp, edx); /* 0x31001443: push edx */ 973 RECOMP_ICALL(0x31018C02u); /* 0x31001444: call 0x31018c02 */ /* not lifted */ 974 RECOMP_FLAGS_IN(); 975 ebx = MEM32(ebp + 0x8); /* 0x31001449: mov ebx, dword ptr [ebp + 8] */ 976 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 977 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 978 esp = esp + 8; /* 0x3100144C: add esp, 8 */ 979 _flag_k = FK_ADD; 980 PUSH32(esp, ebx); /* 0x3100144F: push ebx */ 981 ecx = ebp + (-0x58); /* 0x31001450: lea ecx, [ebp - 0x58] */ 982 edi = (int32_t)(int16_t)LO16(eax); /* 0x31001453: movsx edi, ax */ 983 RECOMP_ICALL(MEM32(0x31048324)); /* 0x31001456: call dword ptr [0x31048324] */ 984 RECOMP_FLAGS_IN(); 985 ecx = MEM32(ebp + 0xC); /* 0x3100145C: mov ecx, dword ptr [ebp + 0xc] */ 986 PUSH32(esp, ecx); /* 0x3100145F: push ecx */ 987 ecx = eax; /* 0x31001460: mov ecx, eax */ 988 RECOMP_ICALL(MEM32(0x31048324)); /* 0x31001462: call dword ptr [0x31048324] */ 989 RECOMP_FLAGS_IN(); 990 edx = MEM32(ebx); /* 0x31001468: mov edx, dword ptr [ebx] */ 991 eax = MEM32(ebp + 0xC); /* 0x3100146A: mov eax, dword ptr [ebp + 0xc] */ 992 MEM32(esi + 0xC) = edx; /* 0x3100146D: mov dword ptr [esi + 0xc], edx */ 993 ecx = MEM32(eax); /* 0x31001470: mov ecx, dword ptr [eax] */ 994 MEM32(esi + 0x10) = ecx; /* 0x31001472: mov dword ptr [esi + 0x10], ecx */ 995 ecx = ebp + (-0x58); /* 0x31001475: lea ecx, [ebp - 0x58] */ 996 MEM32(esi + 0x8) = 1; /* 0x31001478: mov dword ptr [esi + 8], 1 */ 997 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100147F: mov dword ptr [ebp - 4], 0xffffffff */ 998 RECOMP_ICALL(MEM32(0x31048314)); /* 0x31001486: call dword ptr [0x31048314] */ 999 RECOMP_FLAGS_IN(); 1000 ecx = MEM32(ebp + (-0xC)); /* 0x3100148C: mov ecx, dword ptr [ebp - 0xc] */ 1001 eax = edi; /* 0x3100148F: mov eax, edi */ 1002 edi = POP32_VAL(esp); /* 0x31001491: pop edi */ 1003 esi = POP32_VAL(esp); /* 0x31001492: pop esi */ 1004 ebx = POP32_VAL(esp); /* 0x31001493: pop ebx */ 1005 MEM32(FS_BASE + (0)) = ecx; /* 0x31001494: mov dword ptr fs:[0], ecx */ 1006 esp = ebp; /* 0x3100149B: mov esp, ebp */ 1007 ebp = POP32_VAL(esp); /* 0x3100149D: pop ebp */ 1008 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3100149E: ret 8 */ 1009 RECOMP_REGS_OUT(); 1010 } 1011 1012 void sub_310014B0(void) { 1013 int _fpu_cmp = 0; 1014 uint32_t _cf = 0; 1015 int _df = 1; 1016 uint32_t _flag_k = FK_NONE; 1017 uint32_t _flag_a = 0, _flag_b = 0; 1018 uint32_t _itail_tgt = 0; 1019 RECOMP_REGS_LOCALS 1020 RECOMP_ENTER(0x310014B0u); 1021 1022 L_310014B0: 1023 PUSH32(esp, ebp); /* 0x310014B0: push ebp */ 1024 ebp = esp; /* 0x310014B1: mov ebp, esp */ 1025 PUSH32(esp, 0xFFFFFFFFu); /* 0x310014B3: push -1 */ 1026 PUSH32(esp, 0x31046C09u); /* 0x310014B5: push 0x31046c09 */ 1027 eax = MEM32(FS_BASE + (0)); /* 0x310014BA: mov eax, dword ptr fs:[0] */ 1028 PUSH32(esp, eax); /* 0x310014C0: push eax */ 1029 MEM32(FS_BASE + (0)) = esp; /* 0x310014C1: mov dword ptr fs:[0], esp */ 1030 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x4Cu); 1031 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1032 esp = esp - 0x4Cu; /* 0x310014C8: sub esp, 0x4c */ 1033 _flag_k = FK_CMP; 1034 PUSH32(esp, ebx); /* 0x310014CB: push ebx */ 1035 PUSH32(esp, esi); /* 0x310014CC: push esi */ 1036 PUSH32(esp, edi); /* 0x310014CD: push edi */ 1037 PUSH32(esp, 8); /* 0x310014CE: push 8 */ 1038 eax = ebp + (-0x14); /* 0x310014D0: lea eax, [ebp - 0x14] */ 1039 esi = ecx; /* 0x310014D3: mov esi, ecx */ 1040 PUSH32(esp, eax); /* 0x310014D5: push eax */ 1041 ecx = ebp + (-0x58); /* 0x310014D6: lea ecx, [ebp - 0x58] */ 1042 RECOMP_ICALL(MEM32(0x31048320)); /* 0x310014D9: call dword ptr [0x31048320] */ 1043 RECOMP_FLAGS_IN(); 1044 ecx = MEM32(ebp + (-0x1C)); /* 0x310014DF: mov ecx, dword ptr [ebp - 0x1c] */ 1045 eax = MEM32(esi); /* 0x310014E2: mov eax, dword ptr [esi] */ 1046 MEM32(ebp + (-0x18)) = ecx; /* 0x310014E4: mov dword ptr [ebp - 0x18], ecx */ 1047 ecx = MEM32(eax + 0x110); /* 0x310014E7: mov ecx, dword ptr [eax + 0x110] */ 1048 edx = ebp + (-0x14); /* 0x310014ED: lea edx, [ebp - 0x14] */ 1049 PUSH32(esp, edx); /* 0x310014F0: push edx */ 1050 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1051 edx = 0; /* 0x310014F1: xor edx, edx */ 1052 _cf = 0; 1053 _flag_k = FK_TEST; 1054 SET_LO16(edx, MEM16(ecx + 0xA0)); /* 0x310014F3: mov dx, word ptr [ecx + 0xa0] */ 1055 _flag_a = (uint32_t)(LO16(edx)) << 16; _flag_b = (uint32_t)(1) << 16; 1056 SET_LO16(edx, LO16(edx) + 1); /* 0x310014FA: inc dx */ 1057 _flag_k = FK_NARROW(FK_INC, 16); 1058 MEM32(ebp + (-0x4)) = 0; /* 0x310014FC: mov dword ptr [ebp - 4], 0 */ 1059 PUSH32(esp, edx); /* 0x31001503: push edx */ 1060 RECOMP_ICALL(0x31018E24u); /* 0x31001504: call 0x31018e24 */ /* not lifted */ 1061 RECOMP_FLAGS_IN(); 1062 ebx = MEM32(ebp + 0x8); /* 0x31001509: mov ebx, dword ptr [ebp + 8] */ 1063 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 1064 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1065 esp = esp + 8; /* 0x3100150C: add esp, 8 */ 1066 _flag_k = FK_ADD; 1067 PUSH32(esp, ebx); /* 0x3100150F: push ebx */ 1068 ecx = ebp + (-0x58); /* 0x31001510: lea ecx, [ebp - 0x58] */ 1069 edi = (int32_t)(int16_t)LO16(eax); /* 0x31001513: movsx edi, ax */ 1070 RECOMP_ICALL(MEM32(0x31048324)); /* 0x31001516: call dword ptr [0x31048324] */ 1071 RECOMP_FLAGS_IN(); 1072 ecx = MEM32(ebp + 0xC); /* 0x3100151C: mov ecx, dword ptr [ebp + 0xc] */ 1073 PUSH32(esp, ecx); /* 0x3100151F: push ecx */ 1074 ecx = eax; /* 0x31001520: mov ecx, eax */ 1075 RECOMP_ICALL(MEM32(0x31048324)); /* 0x31001522: call dword ptr [0x31048324] */ 1076 RECOMP_FLAGS_IN(); 1077 edx = MEM32(ebx); /* 0x31001528: mov edx, dword ptr [ebx] */ 1078 eax = MEM32(ebp + 0xC); /* 0x3100152A: mov eax, dword ptr [ebp + 0xc] */ 1079 MEM32(esi + 0xC) = edx; /* 0x3100152D: mov dword ptr [esi + 0xc], edx */ 1080 ecx = MEM32(eax); /* 0x31001530: mov ecx, dword ptr [eax] */ 1081 MEM32(esi + 0x10) = ecx; /* 0x31001532: mov dword ptr [esi + 0x10], ecx */ 1082 ecx = ebp + (-0x58); /* 0x31001535: lea ecx, [ebp - 0x58] */ 1083 MEM32(esi + 0x8) = 1; /* 0x31001538: mov dword ptr [esi + 8], 1 */ 1084 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100153F: mov dword ptr [ebp - 4], 0xffffffff */ 1085 RECOMP_ICALL(MEM32(0x31048314)); /* 0x31001546: call dword ptr [0x31048314] */ 1086 RECOMP_FLAGS_IN(); 1087 ecx = MEM32(ebp + (-0xC)); /* 0x3100154C: mov ecx, dword ptr [ebp - 0xc] */ 1088 eax = edi; /* 0x3100154F: mov eax, edi */ 1089 edi = POP32_VAL(esp); /* 0x31001551: pop edi */ 1090 esi = POP32_VAL(esp); /* 0x31001552: pop esi */ 1091 ebx = POP32_VAL(esp); /* 0x31001553: pop ebx */ 1092 MEM32(FS_BASE + (0)) = ecx; /* 0x31001554: mov dword ptr fs:[0], ecx */ 1093 esp = ebp; /* 0x3100155B: mov esp, ebp */ 1094 ebp = POP32_VAL(esp); /* 0x3100155D: pop ebp */ 1095 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3100155E: ret 8 */ 1096 RECOMP_REGS_OUT(); 1097 } 1098 1099 void sub_31001570(void) { 1100 int _fpu_cmp = 0; 1101 uint32_t _cf = 0; 1102 int _df = 1; 1103 uint32_t _flag_k = FK_NONE; 1104 uint32_t _flag_a = 0, _flag_b = 0; 1105 uint32_t _itail_tgt = 0; 1106 RECOMP_REGS_LOCALS 1107 RECOMP_ENTER(0x31001570u); 1108 1109 L_31001570: 1110 PUSH32(esp, ebp); /* 0x31001570: push ebp */ 1111 ebp = esp; /* 0x31001571: mov ebp, esp */ 1112 PUSH32(esp, 0xFFFFFFFFu); /* 0x31001573: push -1 */ 1113 PUSH32(esp, 0x31046C29u); /* 0x31001575: push 0x31046c29 */ 1114 eax = MEM32(FS_BASE + (0)); /* 0x3100157A: mov eax, dword ptr fs:[0] */ 1115 PUSH32(esp, eax); /* 0x31001580: push eax */ 1116 MEM32(FS_BASE + (0)) = esp; /* 0x31001581: mov dword ptr fs:[0], esp */ 1117 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x4Cu); 1118 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1119 esp = esp - 0x4Cu; /* 0x31001588: sub esp, 0x4c */ 1120 _flag_k = FK_CMP; 1121 PUSH32(esp, ebx); /* 0x3100158B: push ebx */ 1122 PUSH32(esp, esi); /* 0x3100158C: push esi */ 1123 PUSH32(esp, edi); /* 0x3100158D: push edi */ 1124 PUSH32(esp, 8); /* 0x3100158E: push 8 */ 1125 eax = ebp + (-0x14); /* 0x31001590: lea eax, [ebp - 0x14] */ 1126 esi = ecx; /* 0x31001593: mov esi, ecx */ 1127 PUSH32(esp, eax); /* 0x31001595: push eax */ 1128 ecx = ebp + (-0x58); /* 0x31001596: lea ecx, [ebp - 0x58] */ 1129 RECOMP_ICALL(MEM32(0x31048320)); /* 0x31001599: call dword ptr [0x31048320] */ 1130 RECOMP_FLAGS_IN(); 1131 ecx = MEM32(ebp + (-0x1C)); /* 0x3100159F: mov ecx, dword ptr [ebp - 0x1c] */ 1132 eax = MEM32(esi); /* 0x310015A2: mov eax, dword ptr [esi] */ 1133 MEM32(ebp + (-0x18)) = ecx; /* 0x310015A4: mov dword ptr [ebp - 0x18], ecx */ 1134 ecx = MEM32(eax + 0x110); /* 0x310015A7: mov ecx, dword ptr [eax + 0x110] */ 1135 edx = ebp + (-0x14); /* 0x310015AD: lea edx, [ebp - 0x14] */ 1136 PUSH32(esp, edx); /* 0x310015B0: push edx */ 1137 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1138 edx = 0; /* 0x310015B1: xor edx, edx */ 1139 _cf = 0; 1140 _flag_k = FK_TEST; 1141 SET_LO16(edx, MEM16(ecx + 0xA0)); /* 0x310015B3: mov dx, word ptr [ecx + 0xa0] */ 1142 _flag_a = (uint32_t)(LO16(edx)) << 16; _flag_b = (uint32_t)(1) << 16; 1143 SET_LO16(edx, LO16(edx) + 1); /* 0x310015BA: inc dx */ 1144 _flag_k = FK_NARROW(FK_INC, 16); 1145 MEM32(ebp + (-0x4)) = 0; /* 0x310015BC: mov dword ptr [ebp - 4], 0 */ 1146 PUSH32(esp, edx); /* 0x310015C3: push edx */ 1147 RECOMP_ICALL(0x310184A0u); /* 0x310015C4: call 0x310184a0 */ /* not lifted */ 1148 RECOMP_FLAGS_IN(); 1149 ebx = MEM32(ebp + 0xC); /* 0x310015C9: mov ebx, dword ptr [ebp + 0xc] */ 1150 edi = (int32_t)(int16_t)LO16(eax); /* 0x310015CC: movsx edi, ax */ 1151 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 1152 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1153 esp = esp + 8; /* 0x310015CF: add esp, 8 */ 1154 _flag_k = FK_ADD; 1155 /* test edi, edi */ /* 0x310015D2: test edi, edi */ 1156 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 1157 _cf = 0; 1158 _flag_k = FK_TEST; 1159 if (TEST_NZ(_flag_a, _flag_b)) goto L_310015F1; /* 0x310015D4: jne 0x310015f1 */ 1160 L_310015D6: 1161 eax = MEM32(ebp + 0x8); /* 0x310015D6: mov eax, dword ptr [ebp + 8] */ 1162 PUSH32(esp, eax); /* 0x310015D9: push eax */ 1163 ecx = ebp + (-0x58); /* 0x310015DA: lea ecx, [ebp - 0x58] */ 1164 RECOMP_ICALL(MEM32(0x31048324)); /* 0x310015DD: call dword ptr [0x31048324] */ 1165 RECOMP_FLAGS_IN(); 1166 PUSH32(esp, ebx); /* 0x310015E3: push ebx */ 1167 ecx = eax; /* 0x310015E4: mov ecx, eax */ 1168 RECOMP_ICALL(MEM32(0x31048324)); /* 0x310015E6: call dword ptr [0x31048324] */ 1169 RECOMP_FLAGS_IN(); 1170 goto L_31001674; /* 0x310015EC: jmp 0x31001674 */ 1171 L_310015F1: 1172 /* cmp edi, 1 */ /* 0x310015F1: cmp edi, 1 */ 1173 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1); 1174 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1175 _flag_k = FK_CMP; 1176 if (CMP_LE(_flag_a, _flag_b)) goto L_31001674; /* 0x310015F4: jle 0x31001674 */ 1177 L_310015F6: 1178 ecx = MEM32(esi + 0x10); /* 0x310015F6: mov ecx, dword ptr [esi + 0x10] */ 1179 edx = MEM32(esi + 0xC); /* 0x310015F9: mov edx, dword ptr [esi + 0xc] */ 1180 eax = MEM32(0x310481FC); /* 0x310015FC: mov eax, dword ptr [0x310481fc] */ 1181 PUSH32(esp, edi); /* 0x31001601: push edi */ 1182 PUSH32(esp, ecx); /* 0x31001602: push ecx */ 1183 PUSH32(esp, edx); /* 0x31001603: push edx */ 1184 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x40u); 1185 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1186 eax = eax + 0x40u; /* 0x31001604: add eax, 0x40 */ 1187 _flag_k = FK_ADD; 1188 PUSH32(esp, 0x31051300u); /* 0x31001607: push 0x31051300 */ 1189 PUSH32(esp, eax); /* 0x3100160C: push eax */ 1190 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x3100160D: call dword ptr [0x310481f8] */ 1191 RECOMP_FLAGS_IN(); 1192 SET_LO8(eax, MEM8(esi + 0x4)); /* 0x31001613: mov al, byte ptr [esi + 4] */ 1193 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 1194 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1195 esp = esp + 0x14u; /* 0x31001616: add esp, 0x14 */ 1196 _flag_k = FK_ADD; 1197 /* test LO8(eax), LO8(eax) */ /* 0x31001619: test al, al */ 1198 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 1199 _cf = 0; 1200 _flag_k = FK_NARROW(FK_TEST, 24); 1201 if (TEST_Z(_flag_a, _flag_b)) goto L_31001674; /* 0x3100161B: je 0x31001674 */ 1202 L_3100161D: 1203 ecx = MEM32(esi + 0xC); /* 0x3100161D: mov ecx, dword ptr [esi + 0xc] */ 1204 edi = MEM32(ebp + 0x8); /* 0x31001620: mov edi, dword ptr [ebp + 8] */ 1205 MEM32(edi) = ecx; /* 0x31001623: mov dword ptr [edi], ecx */ 1206 edx = MEM32(esi + 0x10); /* 0x31001625: mov edx, dword ptr [esi + 0x10] */ 1207 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(2); 1208 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1209 edx = edx + 2; /* 0x31001628: add edx, 2 */ 1210 _flag_k = FK_ADD; 1211 MEM32(ebx) = edx; /* 0x3100162B: mov dword ptr [ebx], edx */ 1212 eax = MEM32(esi + 0x10); /* 0x3100162D: mov eax, dword ptr [esi + 0x10] */ 1213 ecx = MEM32(esi + 0xC); /* 0x31001630: mov ecx, dword ptr [esi + 0xc] */ 1214 edx = MEM32(0x310481FC); /* 0x31001633: mov edx, dword ptr [0x310481fc] */ 1215 PUSH32(esp, eax); /* 0x31001639: push eax */ 1216 PUSH32(esp, ecx); /* 0x3100163A: push ecx */ 1217 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x40u); 1218 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1219 edx = edx + 0x40u; /* 0x3100163B: add edx, 0x40 */ 1220 _flag_k = FK_ADD; 1221 PUSH32(esp, 0x310512CCu); /* 0x3100163E: push 0x310512cc */ 1222 PUSH32(esp, edx); /* 0x31001643: push edx */ 1223 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x31001644: call dword ptr [0x310481f8] */ 1224 RECOMP_FLAGS_IN(); 1225 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1226 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1227 esp = esp + 0x10u; /* 0x3100164A: add esp, 0x10 */ 1228 _flag_k = FK_ADD; 1229 PUSH32(esp, ebx); /* 0x3100164D: push ebx */ 1230 PUSH32(esp, edi); /* 0x3100164E: push edi */ 1231 ecx = esi; /* 0x3100164F: mov ecx, esi */ 1232 RECOMP_ICALL(0x31001770u); /* 0x31001651: call 0x31001770 */ /* not lifted */ 1233 RECOMP_FLAGS_IN(); 1234 edi = eax; /* 0x31001656: mov edi, eax */ 1235 /* test edi, edi */ /* 0x31001658: test edi, edi */ 1236 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 1237 _cf = 0; 1238 _flag_k = FK_TEST; 1239 if (TEST_Z(_flag_a, _flag_b)) goto L_31001674; /* 0x3100165A: je 0x31001674 */ 1240 L_3100165C: 1241 eax = MEM32(0x310481FC); /* 0x3100165C: mov eax, dword ptr [0x310481fc] */ 1242 PUSH32(esp, edi); /* 0x31001661: push edi */ 1243 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x40u); 1244 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1245 eax = eax + 0x40u; /* 0x31001662: add eax, 0x40 */ 1246 _flag_k = FK_ADD; 1247 PUSH32(esp, 0x310512A8u); /* 0x31001665: push 0x310512a8 */ 1248 PUSH32(esp, eax); /* 0x3100166A: push eax */ 1249 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x3100166B: call dword ptr [0x310481f8] */ 1250 RECOMP_FLAGS_IN(); 1251 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 1252 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1253 esp = esp + 0xCu; /* 0x31001671: add esp, 0xc */ 1254 _flag_k = FK_ADD; 1255 L_31001674: 1256 ecx = MEM32(ebp + 0x8); /* 0x31001674: mov ecx, dword ptr [ebp + 8] */ 1257 edx = MEM32(ecx); /* 0x31001677: mov edx, dword ptr [ecx] */ 1258 MEM32(esi + 0xC) = edx; /* 0x31001679: mov dword ptr [esi + 0xc], edx */ 1259 eax = MEM32(ebx); /* 0x3100167C: mov eax, dword ptr [ebx] */ 1260 ecx = ebp + (-0x58); /* 0x3100167E: lea ecx, [ebp - 0x58] */ 1261 MEM32(esi + 0x10) = eax; /* 0x31001681: mov dword ptr [esi + 0x10], eax */ 1262 MEM32(esi + 0x8) = 1; /* 0x31001684: mov dword ptr [esi + 8], 1 */ 1263 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100168B: mov dword ptr [ebp - 4], 0xffffffff */ 1264 RECOMP_ICALL(MEM32(0x31048314)); /* 0x31001692: call dword ptr [0x31048314] */ 1265 RECOMP_FLAGS_IN(); 1266 ecx = MEM32(ebp + (-0xC)); /* 0x31001698: mov ecx, dword ptr [ebp - 0xc] */ 1267 eax = edi; /* 0x3100169B: mov eax, edi */ 1268 edi = POP32_VAL(esp); /* 0x3100169D: pop edi */ 1269 esi = POP32_VAL(esp); /* 0x3100169E: pop esi */ 1270 ebx = POP32_VAL(esp); /* 0x3100169F: pop ebx */ 1271 MEM32(FS_BASE + (0)) = ecx; /* 0x310016A0: mov dword ptr fs:[0], ecx */ 1272 esp = ebp; /* 0x310016A7: mov esp, ebp */ 1273 ebp = POP32_VAL(esp); /* 0x310016A9: pop ebp */ 1274 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x310016AA: ret 8 */ 1275 RECOMP_REGS_OUT(); 1276 } 1277 1278 void sub_31001674(void) { 1279 int _fpu_cmp = 0; 1280 uint32_t _cf = 0; 1281 int _df = 1; 1282 uint32_t _flag_k = FK_NONE; 1283 uint32_t _flag_a = 0, _flag_b = 0; 1284 uint32_t _itail_tgt = 0; 1285 RECOMP_REGS_LOCALS 1286 RECOMP_ENTER(0x31001674u); 1287 1288 L_31001674: 1289 ecx = MEM32(ebp + 0x8); /* 0x31001674: mov ecx, dword ptr [ebp + 8] */ 1290 edx = MEM32(ecx); /* 0x31001677: mov edx, dword ptr [ecx] */ 1291 MEM32(esi + 0xC) = edx; /* 0x31001679: mov dword ptr [esi + 0xc], edx */ 1292 eax = MEM32(ebx); /* 0x3100167C: mov eax, dword ptr [ebx] */ 1293 ecx = ebp + (-0x58); /* 0x3100167E: lea ecx, [ebp - 0x58] */ 1294 MEM32(esi + 0x10) = eax; /* 0x31001681: mov dword ptr [esi + 0x10], eax */ 1295 MEM32(esi + 0x8) = 1; /* 0x31001684: mov dword ptr [esi + 8], 1 */ 1296 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100168B: mov dword ptr [ebp - 4], 0xffffffff */ 1297 RECOMP_ICALL(MEM32(0x31048314)); /* 0x31001692: call dword ptr [0x31048314] */ 1298 RECOMP_FLAGS_IN(); 1299 ecx = MEM32(ebp + (-0xC)); /* 0x31001698: mov ecx, dword ptr [ebp - 0xc] */ 1300 eax = edi; /* 0x3100169B: mov eax, edi */ 1301 edi = POP32_VAL(esp); /* 0x3100169D: pop edi */ 1302 esi = POP32_VAL(esp); /* 0x3100169E: pop esi */ 1303 ebx = POP32_VAL(esp); /* 0x3100169F: pop ebx */ 1304 MEM32(FS_BASE + (0)) = ecx; /* 0x310016A0: mov dword ptr fs:[0], ecx */ 1305 esp = ebp; /* 0x310016A7: mov esp, ebp */ 1306 ebp = POP32_VAL(esp); /* 0x310016A9: pop ebp */ 1307 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x310016AA: ret 8 */ 1308 RECOMP_REGS_OUT(); 1309 } 1310 1311 void sub_310016B0(void) { 1312 int _fpu_cmp = 0; 1313 uint32_t _cf = 0; 1314 int _df = 1; 1315 uint32_t _flag_k = FK_NONE; 1316 uint32_t _flag_a = 0, _flag_b = 0; 1317 uint32_t _itail_tgt = 0; 1318 RECOMP_REGS_LOCALS 1319 RECOMP_ENTER(0x310016B0u); 1320 1321 L_310016B0: 1322 PUSH32(esp, ebp); /* 0x310016B0: push ebp */ 1323 ebp = esp; /* 0x310016B1: mov ebp, esp */ 1324 PUSH32(esp, 0xFFFFFFFFu); /* 0x310016B3: push -1 */ 1325 PUSH32(esp, 0x31046C49u); /* 0x310016B5: push 0x31046c49 */ 1326 eax = MEM32(FS_BASE + (0)); /* 0x310016BA: mov eax, dword ptr fs:[0] */ 1327 PUSH32(esp, eax); /* 0x310016C0: push eax */ 1328 MEM32(FS_BASE + (0)) = esp; /* 0x310016C1: mov dword ptr fs:[0], esp */ 1329 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x4Cu); 1330 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1331 esp = esp - 0x4Cu; /* 0x310016C8: sub esp, 0x4c */ 1332 _flag_k = FK_CMP; 1333 PUSH32(esp, ebx); /* 0x310016CB: push ebx */ 1334 PUSH32(esp, esi); /* 0x310016CC: push esi */ 1335 PUSH32(esp, edi); /* 0x310016CD: push edi */ 1336 PUSH32(esp, 8); /* 0x310016CE: push 8 */ 1337 eax = ebp + (-0x14); /* 0x310016D0: lea eax, [ebp - 0x14] */ 1338 esi = ecx; /* 0x310016D3: mov esi, ecx */ 1339 PUSH32(esp, eax); /* 0x310016D5: push eax */ 1340 ecx = ebp + (-0x58); /* 0x310016D6: lea ecx, [ebp - 0x58] */ 1341 RECOMP_ICALL(MEM32(0x31048320)); /* 0x310016D9: call dword ptr [0x31048320] */ 1342 RECOMP_FLAGS_IN(); 1343 ecx = MEM32(ebp + (-0x1C)); /* 0x310016DF: mov ecx, dword ptr [ebp - 0x1c] */ 1344 eax = MEM32(esi); /* 0x310016E2: mov eax, dword ptr [esi] */ 1345 MEM32(ebp + (-0x18)) = ecx; /* 0x310016E4: mov dword ptr [ebp - 0x18], ecx */ 1346 ecx = MEM32(eax + 0x110); /* 0x310016E7: mov ecx, dword ptr [eax + 0x110] */ 1347 edx = ebp + (-0x14); /* 0x310016ED: lea edx, [ebp - 0x14] */ 1348 PUSH32(esp, edx); /* 0x310016F0: push edx */ 1349 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1350 edx = 0; /* 0x310016F1: xor edx, edx */ 1351 _cf = 0; 1352 _flag_k = FK_TEST; 1353 SET_LO16(edx, MEM16(ecx + 0xA0)); /* 0x310016F3: mov dx, word ptr [ecx + 0xa0] */ 1354 _flag_a = (uint32_t)(LO16(edx)) << 16; _flag_b = (uint32_t)(1) << 16; 1355 SET_LO16(edx, LO16(edx) + 1); /* 0x310016FA: inc dx */ 1356 _flag_k = FK_NARROW(FK_INC, 16); 1357 MEM32(ebp + (-0x4)) = 0; /* 0x310016FC: mov dword ptr [ebp - 4], 0 */ 1358 PUSH32(esp, edx); /* 0x31001703: push edx */ 1359 RECOMP_ICALL(0x31018BE1u); /* 0x31001704: call 0x31018be1 */ /* not lifted */ 1360 RECOMP_FLAGS_IN(); 1361 ebx = MEM32(ebp + 0x8); /* 0x31001709: mov ebx, dword ptr [ebp + 8] */ 1362 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 1363 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1364 esp = esp + 8; /* 0x3100170C: add esp, 8 */ 1365 _flag_k = FK_ADD; 1366 PUSH32(esp, ebx); /* 0x3100170F: push ebx */ 1367 ecx = ebp + (-0x58); /* 0x31001710: lea ecx, [ebp - 0x58] */ 1368 edi = (int32_t)(int16_t)LO16(eax); /* 0x31001713: movsx edi, ax */ 1369 RECOMP_ICALL(MEM32(0x31048324)); /* 0x31001716: call dword ptr [0x31048324] */ 1370 RECOMP_FLAGS_IN(); 1371 ecx = MEM32(ebp + 0xC); /* 0x3100171C: mov ecx, dword ptr [ebp + 0xc] */ 1372 PUSH32(esp, ecx); /* 0x3100171F: push ecx */ 1373 ecx = eax; /* 0x31001720: mov ecx, eax */ 1374 RECOMP_ICALL(MEM32(0x31048324)); /* 0x31001722: call dword ptr [0x31048324] */ 1375 RECOMP_FLAGS_IN(); 1376 edx = MEM32(ebx); /* 0x31001728: mov edx, dword ptr [ebx] */ 1377 eax = MEM32(ebp + 0xC); /* 0x3100172A: mov eax, dword ptr [ebp + 0xc] */ 1378 MEM32(esi + 0xC) = edx; /* 0x3100172D: mov dword ptr [esi + 0xc], edx */ 1379 ecx = MEM32(eax); /* 0x31001730: mov ecx, dword ptr [eax] */ 1380 MEM32(esi + 0x10) = ecx; /* 0x31001732: mov dword ptr [esi + 0x10], ecx */ 1381 ecx = ebp + (-0x58); /* 0x31001735: lea ecx, [ebp - 0x58] */ 1382 MEM32(esi + 0x8) = 1; /* 0x31001738: mov dword ptr [esi + 8], 1 */ 1383 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100173F: mov dword ptr [ebp - 4], 0xffffffff */ 1384 RECOMP_ICALL(MEM32(0x31048314)); /* 0x31001746: call dword ptr [0x31048314] */ 1385 RECOMP_FLAGS_IN(); 1386 ecx = MEM32(ebp + (-0xC)); /* 0x3100174C: mov ecx, dword ptr [ebp - 0xc] */ 1387 eax = edi; /* 0x3100174F: mov eax, edi */ 1388 edi = POP32_VAL(esp); /* 0x31001751: pop edi */ 1389 esi = POP32_VAL(esp); /* 0x31001752: pop esi */ 1390 ebx = POP32_VAL(esp); /* 0x31001753: pop ebx */ 1391 MEM32(FS_BASE + (0)) = ecx; /* 0x31001754: mov dword ptr fs:[0], ecx */ 1392 esp = ebp; /* 0x3100175B: mov esp, ebp */ 1393 ebp = POP32_VAL(esp); /* 0x3100175D: pop ebp */ 1394 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3100175E: ret 8 */ 1395 RECOMP_REGS_OUT(); 1396 } 1397 1398 void sub_31001770(void) { 1399 int _fpu_cmp = 0; 1400 uint32_t _cf = 0; 1401 int _df = 1; 1402 uint32_t _flag_k = FK_NONE; 1403 uint32_t _flag_a = 0, _flag_b = 0; 1404 uint32_t _itail_tgt = 0; 1405 RECOMP_REGS_LOCALS 1406 RECOMP_ENTER(0x31001770u); 1407 1408 L_31001770: 1409 PUSH32(esp, ebp); /* 0x31001770: push ebp */ 1410 ebp = esp; /* 0x31001771: mov ebp, esp */ 1411 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1412 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1413 esp = esp - 0x10u; /* 0x31001773: sub esp, 0x10 */ 1414 _flag_k = FK_CMP; 1415 PUSH32(esp, ebx); /* 0x31001776: push ebx */ 1416 ebx = MEM32(ebp + 0xC); /* 0x31001777: mov ebx, dword ptr [ebp + 0xc] */ 1417 PUSH32(esp, esi); /* 0x3100177A: push esi */ 1418 PUSH32(esp, edi); /* 0x3100177B: push edi */ 1419 edi = MEM32(ebp + 0x8); /* 0x3100177C: mov edi, dword ptr [ebp + 8] */ 1420 eax = MEM32(edi); /* 0x3100177F: mov eax, dword ptr [edi] */ 1421 esi = ecx; /* 0x31001781: mov esi, ecx */ 1422 ecx = MEM32(ebx); /* 0x31001783: mov ecx, dword ptr [ebx] */ 1423 MEM32(ebp + (-0x10)) = eax; /* 0x31001785: mov dword ptr [ebp - 0x10], eax */ 1424 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1425 edx = 0; /* 0x31001788: xor edx, edx */ 1426 _cf = 0; 1427 _flag_k = FK_TEST; 1428 MEM32(ebp + (-0xC)) = ecx; /* 0x3100178A: mov dword ptr [ebp - 0xc], ecx */ 1429 ecx = MEM32(esi); /* 0x3100178D: mov ecx, dword ptr [esi] */ 1430 MEM32(ebp + (-0x8)) = edx; /* 0x3100178F: mov dword ptr [ebp - 8], edx */ 1431 MEM32(ebp + (-0x4)) = edx; /* 0x31001792: mov dword ptr [ebp - 4], edx */ 1432 edx = MEM32(ecx + 0x110); /* 0x31001795: mov edx, dword ptr [ecx + 0x110] */ 1433 eax = ebp + (-0x10); /* 0x3100179B: lea eax, [ebp - 0x10] */ 1434 PUSH32(esp, eax); /* 0x3100179E: push eax */ 1435 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1436 eax = 0; /* 0x3100179F: xor eax, eax */ 1437 _cf = 0; 1438 _flag_k = FK_TEST; 1439 SET_LO16(eax, MEM16(edx + 0xA0)); /* 0x310017A1: mov ax, word ptr [edx + 0xa0] */ 1440 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(1) << 16; 1441 SET_LO16(eax, LO16(eax) + 1); /* 0x310017A8: inc ax */ 1442 _flag_k = FK_NARROW(FK_INC, 16); 1443 PUSH32(esp, eax); /* 0x310017AA: push eax */ 1444 RECOMP_ICALL(0x3101A997u); /* 0x310017AB: call 0x3101a997 */ /* not lifted */ 1445 RECOMP_FLAGS_IN(); 1446 eax = MEM32(esi); /* 0x310017B0: mov eax, dword ptr [esi] */ 1447 ecx = ebp + (-0x8); /* 0x310017B2: lea ecx, [ebp - 8] */ 1448 PUSH32(esp, ecx); /* 0x310017B5: push ecx */ 1449 ecx = MEM32(eax + 0x110); /* 0x310017B6: mov ecx, dword ptr [eax + 0x110] */ 1450 edx = ebp + (-0x10); /* 0x310017BC: lea edx, [ebp - 0x10] */ 1451 PUSH32(esp, edx); /* 0x310017BF: push edx */ 1452 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1453 edx = 0; /* 0x310017C0: xor edx, edx */ 1454 _cf = 0; 1455 _flag_k = FK_TEST; 1456 SET_LO16(edx, MEM16(ecx + 0xA0)); /* 0x310017C2: mov dx, word ptr [ecx + 0xa0] */ 1457 _flag_a = (uint32_t)(LO16(edx)) << 16; _flag_b = (uint32_t)(1) << 16; 1458 SET_LO16(edx, LO16(edx) + 1); /* 0x310017C9: inc dx */ 1459 _flag_k = FK_NARROW(FK_INC, 16); 1460 PUSH32(esp, edx); /* 0x310017CB: push edx */ 1461 RECOMP_ICALL(0x31018414u); /* 0x310017CC: call 0x31018414 */ /* not lifted */ 1462 RECOMP_FLAGS_IN(); 1463 ecx = MEM32(ebp + (-0x8)); /* 0x310017D1: mov ecx, dword ptr [ebp - 8] */ 1464 MEM32(esi + 0xC) = ecx; /* 0x310017D4: mov dword ptr [esi + 0xc], ecx */ 1465 MEM32(edi) = ecx; /* 0x310017D7: mov dword ptr [edi], ecx */ 1466 ecx = MEM32(ebp + (-0x4)); /* 0x310017D9: mov ecx, dword ptr [ebp - 4] */ 1467 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 1468 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1469 esp = esp + 0x14u; /* 0x310017DC: add esp, 0x14 */ 1470 _flag_k = FK_ADD; 1471 MEM32(esi + 0x10) = ecx; /* 0x310017DF: mov dword ptr [esi + 0x10], ecx */ 1472 MEM32(ebx) = ecx; /* 0x310017E2: mov dword ptr [ebx], ecx */ 1473 edi = POP32_VAL(esp); /* 0x310017E4: pop edi */ 1474 MEM32(esi + 0x8) = 1; /* 0x310017E5: mov dword ptr [esi + 8], 1 */ 1475 esi = POP32_VAL(esp); /* 0x310017EC: pop esi */ 1476 eax = (int32_t)(int16_t)LO16(eax); /* 0x310017ED: movsx eax, ax */ 1477 ebx = POP32_VAL(esp); /* 0x310017F0: pop ebx */ 1478 esp = ebp; /* 0x310017F1: mov esp, ebp */ 1479 ebp = POP32_VAL(esp); /* 0x310017F3: pop ebp */ 1480 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x310017F4: ret 8 */ 1481 RECOMP_REGS_OUT(); 1482 } 1483 1484 void sub_31001800(void) { 1485 int _fpu_cmp = 0; 1486 uint32_t _cf = 0; 1487 int _df = 1; 1488 uint32_t _flag_k = FK_NONE; 1489 uint32_t _flag_a = 0, _flag_b = 0; 1490 uint32_t _itail_tgt = 0; 1491 RECOMP_REGS_LOCALS 1492 RECOMP_ENTER(0x31001800u); 1493 1494 L_31001800: 1495 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1496 eax = 0; /* 0x31001800: xor eax, eax */ 1497 _cf = 0; 1498 _flag_k = FK_TEST; 1499 MEM32(ecx + 0xC) = eax; /* 0x31001802: mov dword ptr [ecx + 0xc], eax */ 1500 MEM32(ecx + 0x10) = eax; /* 0x31001805: mov dword ptr [ecx + 0x10], eax */ 1501 eax = MEM32(ecx); /* 0x31001808: mov eax, dword ptr [ecx] */ 1502 MEM32(ecx + 0x8) = 2; /* 0x3100180A: mov dword ptr [ecx + 8], 2 */ 1503 ecx = MEM32(eax + 0x110); /* 0x31001811: mov ecx, dword ptr [eax + 0x110] */ 1504 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1505 edx = 0; /* 0x31001817: xor edx, edx */ 1506 _cf = 0; 1507 _flag_k = FK_TEST; 1508 SET_LO16(edx, MEM16(ecx + 0xA0)); /* 0x31001819: mov dx, word ptr [ecx + 0xa0] */ 1509 PUSH32(esp, edx); /* 0x31001820: push edx */ 1510 RECOMP_ICALL(0x3101B5A4u); /* 0x31001821: call 0x3101b5a4 */ /* not lifted */ 1511 RECOMP_FLAGS_IN(); 1512 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1513 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1514 esp = esp + 4; /* 0x31001826: add esp, 4 */ 1515 _flag_k = FK_ADD; 1516 eax = (int32_t)(int16_t)LO16(eax); /* 0x31001829: movsx eax, ax */ 1517 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100182C: ret */ 1518 RECOMP_REGS_OUT(); 1519 } 1520 1521 void sub_31001830(void) { 1522 int _fpu_cmp = 0; 1523 uint32_t _cf = 0; 1524 int _df = 1; 1525 uint32_t _flag_k = FK_NONE; 1526 uint32_t _flag_a = 0, _flag_b = 0; 1527 uint32_t _itail_tgt = 0; 1528 RECOMP_REGS_LOCALS 1529 RECOMP_ENTER(0x31001830u); 1530 1531 L_31001830: 1532 PUSH32(esp, ebp); /* 0x31001830: push ebp */ 1533 ebp = esp; /* 0x31001831: mov ebp, esp */ 1534 PUSH32(esp, ebx); /* 0x31001833: push ebx */ 1535 ebx = MEM32(ebp + 0xC); /* 0x31001834: mov ebx, dword ptr [ebp + 0xc] */ 1536 PUSH32(esp, esi); /* 0x31001837: push esi */ 1537 esi = ecx; /* 0x31001838: mov esi, ecx */ 1538 ecx = MEM32(esi + 0x8); /* 0x3100183A: mov ecx, dword ptr [esi + 8] */ 1539 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1540 eax = 0; /* 0x3100183D: xor eax, eax */ 1541 _cf = 0; 1542 _flag_k = FK_TEST; 1543 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 1544 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1545 ecx = ecx - eax; /* 0x3100183F: sub ecx, eax */ 1546 _flag_k = FK_CMP; 1547 PUSH32(esp, edi); /* 0x31001841: push edi */ 1548 edi = MEM32(ebp + 0x8); /* 0x31001842: mov edi, dword ptr [ebp + 8] */ 1549 if (/* sub result */ CMP_EQ(_flag_a, _flag_b)) goto L_3100185D; /* 0x31001845: je 0x3100185d */ 1550 L_31001847: 1551 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 1552 ecx = ecx - 1; /* 0x31001847: dec ecx */ 1553 _flag_k = FK_DEC; 1554 if (/* dec result */ CMP_EQ(_flag_a, _flag_b)) goto L_31001866; /* 0x31001848: je 0x31001866 */ 1555 L_3100184A: 1556 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 1557 ecx = ecx - 1; /* 0x3100184A: dec ecx */ 1558 _flag_k = FK_DEC; 1559 if (/* dec result */ CMP_EQ(_flag_a, _flag_b)) goto L_31001852; /* 0x3100184B: je 0x31001852 */ 1560 L_3100184D: 1561 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 1562 eax = eax | 0xFFFFFFFFu; /* 0x3100184D: or eax, 0xffffffff */ 1563 _cf = 0; 1564 _flag_k = FK_TEST; 1565 goto L_31001866; /* 0x31001850: jmp 0x31001866 */ 1566 L_31001852: 1567 PUSH32(esp, ebx); /* 0x31001852: push ebx */ 1568 PUSH32(esp, edi); /* 0x31001853: push edi */ 1569 ecx = esi; /* 0x31001854: mov ecx, esi */ 1570 RECOMP_ICALL(0x31001570u); /* 0x31001856: call 0x31001570 */ /* not lifted */ 1571 RECOMP_FLAGS_IN(); 1572 goto L_31001866; /* 0x3100185B: jmp 0x31001866 */ 1573 L_3100185D: 1574 PUSH32(esp, ebx); /* 0x3100185D: push ebx */ 1575 PUSH32(esp, edi); /* 0x3100185E: push edi */ 1576 ecx = esi; /* 0x3100185F: mov ecx, esi */ 1577 RECOMP_ICALL(0x310013F0u); /* 0x31001861: call 0x310013f0 */ /* not lifted */ 1578 RECOMP_FLAGS_IN(); 1579 L_31001866: 1580 /* test eax, eax */ /* 0x31001866: test eax, eax */ 1581 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1582 _cf = 0; 1583 _flag_k = FK_TEST; 1584 ecx = MEM32(esi + 0xC); /* 0x31001868: mov ecx, dword ptr [esi + 0xc] */ 1585 MEM32(esi + 0x8) = 2; /* 0x3100186B: mov dword ptr [esi + 8], 2 */ 1586 MEM32(edi) = ecx; /* 0x31001872: mov dword ptr [edi], ecx */ 1587 ecx = MEM32(esi + 0x10); /* 0x31001874: mov ecx, dword ptr [esi + 0x10] */ 1588 MEM32(ebx) = ecx; /* 0x31001877: mov dword ptr [ebx], ecx */ 1589 if (TEST_NZ(_flag_a, _flag_b)) goto L_310018B5; /* 0x31001879: jne 0x310018b5 */ 1590 L_3100187B: 1591 edx = MEM32(ebp + 0x14); /* 0x3100187B: mov edx, dword ptr [ebp + 0x14] */ 1592 eax = MEM32(ebp + 0x10); /* 0x3100187E: mov eax, dword ptr [ebp + 0x10] */ 1593 PUSH32(esp, edx); /* 0x31001881: push edx */ 1594 PUSH32(esp, eax); /* 0x31001882: push eax */ 1595 PUSH32(esp, ecx); /* 0x31001883: push ecx */ 1596 ecx = MEM32(edi); /* 0x31001884: mov ecx, dword ptr [edi] */ 1597 PUSH32(esp, ecx); /* 0x31001886: push ecx */ 1598 ecx = MEM32(esi); /* 0x31001887: mov ecx, dword ptr [esi] */ 1599 RECOMP_ICALL(0x31002CE0u); /* 0x31001889: call 0x31002ce0 */ /* not lifted */ 1600 RECOMP_FLAGS_IN(); 1601 esi = eax; /* 0x3100188E: mov esi, eax */ 1602 /* test esi, esi */ /* 0x31001890: test esi, esi */ 1603 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 1604 _cf = 0; 1605 _flag_k = FK_TEST; 1606 if (TEST_Z(_flag_a, _flag_b)) goto L_310018B3; /* 0x31001892: je 0x310018b3 */ 1607 L_31001894: 1608 edx = MEM32(ebx); /* 0x31001894: mov edx, dword ptr [ebx] */ 1609 eax = MEM32(edi); /* 0x31001896: mov eax, dword ptr [edi] */ 1610 ecx = MEM32(0x310481FC); /* 0x31001898: mov ecx, dword ptr [0x310481fc] */ 1611 PUSH32(esp, edx); /* 0x3100189E: push edx */ 1612 PUSH32(esp, eax); /* 0x3100189F: push eax */ 1613 PUSH32(esp, esi); /* 0x310018A0: push esi */ 1614 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x40u); 1615 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1616 ecx = ecx + 0x40u; /* 0x310018A1: add ecx, 0x40 */ 1617 _flag_k = FK_ADD; 1618 PUSH32(esp, 0x31051334u); /* 0x310018A4: push 0x31051334 */ 1619 PUSH32(esp, ecx); /* 0x310018A9: push ecx */ 1620 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x310018AA: call dword ptr [0x310481f8] */ 1621 RECOMP_FLAGS_IN(); 1622 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 1623 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1624 esp = esp + 0x14u; /* 0x310018B0: add esp, 0x14 */ 1625 _flag_k = FK_ADD; 1626 L_310018B3: 1627 eax = esi; /* 0x310018B3: mov eax, esi */ 1628 L_310018B5: 1629 edi = POP32_VAL(esp); /* 0x310018B5: pop edi */ 1630 esi = POP32_VAL(esp); /* 0x310018B6: pop esi */ 1631 ebx = POP32_VAL(esp); /* 0x310018B7: pop ebx */ 1632 ebp = POP32_VAL(esp); /* 0x310018B8: pop ebp */ 1633 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x310018B9: ret 0x10 */ 1634 RECOMP_REGS_OUT(); 1635 } 1636 1637 void sub_310018C0(void) { 1638 int _fpu_cmp = 0; 1639 uint32_t _cf = 0; 1640 int _df = 1; 1641 uint32_t _flag_k = FK_NONE; 1642 uint32_t _flag_a = 0, _flag_b = 0; 1643 uint32_t _itail_tgt = 0; 1644 RECOMP_REGS_LOCALS 1645 RECOMP_ENTER(0x310018C0u); 1646 1647 L_310018C0: 1648 PUSH32(esp, ebp); /* 0x310018C0: push ebp */ 1649 ebp = esp; /* 0x310018C1: mov ebp, esp */ 1650 PUSH32(esp, ebx); /* 0x310018C3: push ebx */ 1651 ebx = MEM32(ebp + 0xC); /* 0x310018C4: mov ebx, dword ptr [ebp + 0xc] */ 1652 PUSH32(esp, esi); /* 0x310018C7: push esi */ 1653 esi = ecx; /* 0x310018C8: mov esi, ecx */ 1654 ecx = MEM32(esi + 0x8); /* 0x310018CA: mov ecx, dword ptr [esi + 8] */ 1655 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1656 eax = 0; /* 0x310018CD: xor eax, eax */ 1657 _cf = 0; 1658 _flag_k = FK_TEST; 1659 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 1660 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1661 ecx = ecx - eax; /* 0x310018CF: sub ecx, eax */ 1662 _flag_k = FK_CMP; 1663 PUSH32(esp, edi); /* 0x310018D1: push edi */ 1664 edi = MEM32(ebp + 0x8); /* 0x310018D2: mov edi, dword ptr [ebp + 8] */ 1665 if (/* sub result */ CMP_EQ(_flag_a, _flag_b)) goto L_310018ED; /* 0x310018D5: je 0x310018ed */ 1666 L_310018D7: 1667 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 1668 ecx = ecx - 1; /* 0x310018D7: dec ecx */ 1669 _flag_k = FK_DEC; 1670 if (/* dec result */ CMP_EQ(_flag_a, _flag_b)) goto L_310018F6; /* 0x310018D8: je 0x310018f6 */ 1671 L_310018DA: 1672 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 1673 ecx = ecx - 1; /* 0x310018DA: dec ecx */ 1674 _flag_k = FK_DEC; 1675 if (/* dec result */ CMP_EQ(_flag_a, _flag_b)) goto L_310018E2; /* 0x310018DB: je 0x310018e2 */ 1676 L_310018DD: 1677 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 1678 eax = eax | 0xFFFFFFFFu; /* 0x310018DD: or eax, 0xffffffff */ 1679 _cf = 0; 1680 _flag_k = FK_TEST; 1681 goto L_310018F6; /* 0x310018E0: jmp 0x310018f6 */ 1682 L_310018E2: 1683 PUSH32(esp, ebx); /* 0x310018E2: push ebx */ 1684 PUSH32(esp, edi); /* 0x310018E3: push edi */ 1685 ecx = esi; /* 0x310018E4: mov ecx, esi */ 1686 RECOMP_ICALL(0x31001570u); /* 0x310018E6: call 0x31001570 */ /* not lifted */ 1687 RECOMP_FLAGS_IN(); 1688 goto L_310018F6; /* 0x310018EB: jmp 0x310018f6 */ 1689 L_310018ED: 1690 PUSH32(esp, ebx); /* 0x310018ED: push ebx */ 1691 PUSH32(esp, edi); /* 0x310018EE: push edi */ 1692 ecx = esi; /* 0x310018EF: mov ecx, esi */ 1693 RECOMP_ICALL(0x310013F0u); /* 0x310018F1: call 0x310013f0 */ /* not lifted */ 1694 RECOMP_FLAGS_IN(); 1695 L_310018F6: 1696 /* test eax, eax */ /* 0x310018F6: test eax, eax */ 1697 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1698 _cf = 0; 1699 _flag_k = FK_TEST; 1700 ecx = MEM32(esi + 0xC); /* 0x310018F8: mov ecx, dword ptr [esi + 0xc] */ 1701 MEM32(esi + 0x8) = 2; /* 0x310018FB: mov dword ptr [esi + 8], 2 */ 1702 MEM32(edi) = ecx; /* 0x31001902: mov dword ptr [edi], ecx */ 1703 ecx = MEM32(esi + 0x10); /* 0x31001904: mov ecx, dword ptr [esi + 0x10] */ 1704 MEM32(ebx) = ecx; /* 0x31001907: mov dword ptr [ebx], ecx */ 1705 if (TEST_NZ(_flag_a, _flag_b)) goto L_31001946; /* 0x31001909: jne 0x31001946 */ 1706 L_3100190B: 1707 edx = MEM32(ebp + 0x14); /* 0x3100190B: mov edx, dword ptr [ebp + 0x14] */ 1708 eax = MEM32(ebp + 0x10); /* 0x3100190E: mov eax, dword ptr [ebp + 0x10] */ 1709 PUSH32(esp, edx); /* 0x31001911: push edx */ 1710 PUSH32(esp, eax); /* 0x31001912: push eax */ 1711 PUSH32(esp, ecx); /* 0x31001913: push ecx */ 1712 ecx = MEM32(edi); /* 0x31001914: mov ecx, dword ptr [edi] */ 1713 PUSH32(esp, ecx); /* 0x31001916: push ecx */ 1714 ecx = MEM32(esi); /* 0x31001917: mov ecx, dword ptr [esi] */ 1715 RECOMP_ICALL(0x31002E40u); /* 0x31001919: call 0x31002e40 */ /* not lifted */ 1716 RECOMP_FLAGS_IN(); 1717 esi = eax; /* 0x3100191E: mov esi, eax */ 1718 /* cmp esi, 1 */ /* 0x31001920: cmp esi, 1 */ 1719 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 1720 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1721 _flag_k = FK_CMP; 1722 if (CMP_LE(_flag_a, _flag_b)) goto L_31001944; /* 0x31001923: jle 0x31001944 */ 1723 L_31001925: 1724 edx = MEM32(ebx); /* 0x31001925: mov edx, dword ptr [ebx] */ 1725 eax = MEM32(edi); /* 0x31001927: mov eax, dword ptr [edi] */ 1726 ecx = MEM32(0x310481FC); /* 0x31001929: mov ecx, dword ptr [0x310481fc] */ 1727 PUSH32(esp, edx); /* 0x3100192F: push edx */ 1728 PUSH32(esp, eax); /* 0x31001930: push eax */ 1729 PUSH32(esp, esi); /* 0x31001931: push esi */ 1730 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x40u); 1731 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1732 ecx = ecx + 0x40u; /* 0x31001932: add ecx, 0x40 */ 1733 _flag_k = FK_ADD; 1734 PUSH32(esp, 0x31051334u); /* 0x31001935: push 0x31051334 */ 1735 PUSH32(esp, ecx); /* 0x3100193A: push ecx */ 1736 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x3100193B: call dword ptr [0x310481f8] */ 1737 RECOMP_FLAGS_IN(); 1738 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 1739 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1740 esp = esp + 0x14u; /* 0x31001941: add esp, 0x14 */ 1741 _flag_k = FK_ADD; 1742 L_31001944: 1743 eax = esi; /* 0x31001944: mov eax, esi */ 1744 L_31001946: 1745 edi = POP32_VAL(esp); /* 0x31001946: pop edi */ 1746 esi = POP32_VAL(esp); /* 0x31001947: pop esi */ 1747 ebx = POP32_VAL(esp); /* 0x31001948: pop ebx */ 1748 ebp = POP32_VAL(esp); /* 0x31001949: pop ebp */ 1749 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3100194A: ret 0x10 */ 1750 RECOMP_REGS_OUT(); 1751 } 1752 1753 void sub_31001950(void) { 1754 int _fpu_cmp = 0; 1755 uint32_t _cf = 0; 1756 int _df = 1; 1757 uint32_t _flag_k = FK_NONE; 1758 uint32_t _flag_a = 0, _flag_b = 0; 1759 uint32_t _itail_tgt = 0; 1760 RECOMP_REGS_LOCALS 1761 RECOMP_ENTER(0x31001950u); 1762 1763 L_31001950: 1764 PUSH32(esp, ebp); /* 0x31001950: push ebp */ 1765 ebp = esp; /* 0x31001951: mov ebp, esp */ 1766 PUSH32(esp, 0xFFFFFFFFu); /* 0x31001953: push -1 */ 1767 PUSH32(esp, 0x31046CA9u); /* 0x31001955: push 0x31046ca9 */ 1768 eax = MEM32(FS_BASE + (0)); /* 0x3100195A: mov eax, dword ptr fs:[0] */ 1769 PUSH32(esp, eax); /* 0x31001960: push eax */ 1770 MEM32(FS_BASE + (0)) = esp; /* 0x31001961: mov dword ptr fs:[0], esp */ 1771 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1772 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1773 esp = esp - 0x10u; /* 0x31001968: sub esp, 0x10 */ 1774 _flag_k = FK_CMP; 1775 eax = MEM32(0x31048118); /* 0x3100196B: mov eax, dword ptr [0x31048118] */ 1776 PUSH32(esp, ebx); /* 0x31001970: push ebx */ 1777 ebx = ecx; /* 0x31001971: mov ebx, ecx */ 1778 PUSH32(esp, esi); /* 0x31001973: push esi */ 1779 esi = ebx + 0x128; /* 0x31001974: lea esi, [ebx + 0x128] */ 1780 PUSH32(esp, edi); /* 0x3100197A: push edi */ 1781 edi = esi + 0x58; /* 0x3100197B: lea edi, [esi + 0x58] */ 1782 ecx = edi; /* 0x3100197E: mov ecx, edi */ 1783 MEM32(ebp + (-0x14)) = ebx; /* 0x31001980: mov dword ptr [ebp - 0x14], ebx */ 1784 MEM32(ebp + (-0x10)) = 0; /* 0x31001983: mov dword ptr [ebp - 0x10], 0 */ 1785 MEM32(ebp + (-0x18)) = esi; /* 0x3100198A: mov dword ptr [ebp - 0x18], esi */ 1786 MEM32(esi) = eax; /* 0x3100198D: mov dword ptr [esi], eax */ 1787 RECOMP_ICALL(MEM32(0x3104811C)); /* 0x3100198F: call dword ptr [0x3104811c] */ 1788 RECOMP_FLAGS_IN(); 1789 ecx = MEM32(0x3104810C); /* 0x31001995: mov ecx, dword ptr [0x3104810c] */ 1790 MEM32(edi) = ecx; /* 0x3100199B: mov dword ptr [edi], ecx */ 1791 MEM32(ebp + (-0x10)) = 1; /* 0x3100199D: mov dword ptr [ebp - 0x10], 1 */ 1792 edx = MEM32(esi); /* 0x310019A4: mov edx, dword ptr [esi] */ 1793 eax = MEM32(edx + 0x4); /* 0x310019A6: mov eax, dword ptr [edx + 4] */ 1794 ecx = MEM32(0x3104812C); /* 0x310019A9: mov ecx, dword ptr [0x3104812c] */ 1795 MEM32(eax + esi) = ecx; /* 0x310019AF: mov dword ptr [eax + esi], ecx */ 1796 edx = MEM32(esi); /* 0x310019B2: mov edx, dword ptr [esi] */ 1797 ecx = MEM32(edx + 0x4); /* 0x310019B4: mov ecx, dword ptr [edx + 4] */ 1798 PUSH32(esp, 0); /* 0x310019B7: push 0 */ 1799 edi = esi + 0x4; /* 0x310019B9: lea edi, [esi + 4] */ 1800 PUSH32(esp, edi); /* 0x310019BC: push edi */ 1801 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi); 1802 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1803 ecx = ecx + esi; /* 0x310019BD: add ecx, esi */ 1804 _flag_k = FK_ADD; 1805 MEM32(ebp + (-0x4)) = 0; /* 0x310019BF: mov dword ptr [ebp - 4], 0 */ 1806 RECOMP_ICALL(MEM32(0x31048128)); /* 0x310019C6: call dword ptr [0x31048128] */ 1807 RECOMP_FLAGS_IN(); 1808 PUSH32(esp, 0); /* 0x310019CC: push 0 */ 1809 ecx = edi; /* 0x310019CE: mov ecx, edi */ 1810 MEM32(ebp + (-0x4)) = 2; /* 0x310019D0: mov dword ptr [ebp - 4], 2 */ 1811 RECOMP_ICALL(MEM32(0x31048124)); /* 0x310019D7: call dword ptr [0x31048124] */ 1812 RECOMP_FLAGS_IN(); 1813 eax = MEM32(esi); /* 0x310019DD: mov eax, dword ptr [esi] */ 1814 ecx = MEM32(eax + 0x4); /* 0x310019DF: mov ecx, dword ptr [eax + 4] */ 1815 edx = MEM32(0x31048120); /* 0x310019E2: mov edx, dword ptr [0x31048120] */ 1816 MEM32(ecx + esi) = edx; /* 0x310019E8: mov dword ptr [ecx + esi], edx */ 1817 PUSH32(esp, 0xA4u); /* 0x310019EB: push 0xa4 */ 1818 MEM32(ebp + (-0x4)) = 3; /* 0x310019F0: mov dword ptr [ebp - 4], 3 */ 1819 MEM32(ebx) = 0x31048360u; /* 0x310019F7: mov dword ptr [ebx], 0x31048360 */ 1820 RECOMP_ICALL(0x310468DAu); /* 0x310019FD: call 0x310468da */ /* not lifted */ 1821 RECOMP_FLAGS_IN(); 1822 edx = eax; /* 0x31001A02: mov edx, eax */ 1823 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1824 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1825 esp = esp + 4; /* 0x31001A04: add esp, 4 */ 1826 _flag_k = FK_ADD; 1827 /* test edx, edx */ /* 0x31001A07: test edx, edx */ 1828 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 1829 _cf = 0; 1830 _flag_k = FK_TEST; 1831 if (TEST_Z(_flag_a, _flag_b)) goto L_31001A3A; /* 0x31001A09: je 0x31001a3a */ 1832 L_31001A0B: 1833 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1834 eax = 0; /* 0x31001A0B: xor eax, eax */ 1835 _cf = 0; 1836 _flag_k = FK_TEST; 1837 ecx = 0x15u; /* 0x31001A0D: mov ecx, 0x15 */ 1838 edi = edx; /* 0x31001A12: mov edi, edx */ 1839 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31001A14: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; } 1840 ecx = edx + 0x54; /* 0x31001A16: lea ecx, [edx + 0x54] */ 1841 MEM32(ecx) = eax; /* 0x31001A19: mov dword ptr [ecx], eax */ 1842 MEM32(ecx + 0x4) = eax; /* 0x31001A1B: mov dword ptr [ecx + 4], eax */ 1843 MEM32(ecx + 0x8) = eax; /* 0x31001A1E: mov dword ptr [ecx + 8], eax */ 1844 ecx = 8; /* 0x31001A21: mov ecx, 8 */ 1845 edi = edx + 0x60; /* 0x31001A26: lea edi, [edx + 0x60] */ 1846 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31001A29: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; } 1847 ecx = 9; /* 0x31001A2B: mov ecx, 9 */ 1848 edi = edx + 0x80; /* 0x31001A30: lea edi, [edx + 0x80] */ 1849 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31001A36: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; } 1850 goto L_31001A3C; /* 0x31001A38: jmp 0x31001a3c */ 1851 L_31001A3A: 1852 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1853 edx = 0; /* 0x31001A3A: xor edx, edx */ 1854 _cf = 0; 1855 _flag_k = FK_TEST; 1856 L_31001A3C: 1857 ecx = ebx; /* 0x31001A3C: mov ecx, ebx */ 1858 MEM32(ebx + 0x110) = edx; /* 0x31001A3E: mov dword ptr [ebx + 0x110], edx */ 1859 MEM32(ebx + 0x114) = 0; /* 0x31001A44: mov dword ptr [ebx + 0x114], 0 */ 1860 RECOMP_ICALL(0x31002070u); /* 0x31001A4E: call 0x31002070 */ /* not lifted */ 1861 RECOMP_FLAGS_IN(); 1862 SET_LO8(eax, MEM8(ebp + 0x8)); /* 0x31001A53: mov al, byte ptr [ebp + 8] */ 1863 /* test LO8(eax), LO8(eax) */ /* 0x31001A56: test al, al */ 1864 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 1865 _cf = 0; 1866 _flag_k = FK_NARROW(FK_TEST, 24); 1867 MEM8(ebx + 0x104) = (uint8_t)(LO8(eax)); /* 0x31001A58: mov byte ptr [ebx + 0x104], al */ 1868 if (TEST_Z(_flag_a, _flag_b)) goto L_31001B20; /* 0x31001A5E: je 0x31001b20 */ 1869 L_31001A64: 1870 eax = MEM32(0x31057D84); /* 0x31001A64: mov eax, dword ptr [0x31057d84] */ 1871 /* test eax, eax */ /* 0x31001A69: test eax, eax */ 1872 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1873 _cf = 0; 1874 _flag_k = FK_TEST; 1875 if (TEST_NZ(_flag_a, _flag_b)) goto L_31001B1A; /* 0x31001A6B: jne 0x31001b1a */ 1876 L_31001A71: 1877 SET_LO8(eax, MEM8(0x31057D30)); /* 0x31001A71: mov al, byte ptr [0x31057d30] */ 1878 /* test LO8(eax), 1 */ /* 0x31001A76: test al, 1 */ 1879 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 1880 _cf = 0; 1881 _flag_k = FK_NARROW(FK_TEST, 24); 1882 edi = MEM32(0x31048290); /* 0x31001A78: mov edi, dword ptr [0x31048290] */ 1883 if (TEST_NZ(_flag_a, _flag_b)) goto L_31001A9F; /* 0x31001A7E: jne 0x31001a9f */ 1884 L_31001A80: 1885 PUSH32(esp, 0); /* 0x31001A80: push 0 */ 1886 _flag_a = (uint32_t)((LO8(eax) | 1)) << 24; _flag_b = (uint32_t)((LO8(eax) | 1)) << 24; 1887 SET_LO8(eax, LO8(eax) | 1); /* 0x31001A82: or al, 1 */ 1888 _cf = 0; 1889 _flag_k = FK_NARROW(FK_TEST, 24); 1890 PUSH32(esp, 0); /* 0x31001A84: push 0 */ 1891 ecx = 0x31057D38u; /* 0x31001A86: mov ecx, 0x31057d38 */ 1892 MEM8(0x31057D30) = (uint8_t)(LO8(eax)); /* 0x31001A8B: mov byte ptr [0x31057d30], al */ 1893 RECOMP_ICALL(edi); /* 0x31001A90: call edi */ 1894 RECOMP_FLAGS_IN(); 1895 PUSH32(esp, 0x31001B40u); /* 0x31001A92: push 0x31001b40 */ 1896 RECOMP_ICALL(0x310468C8u); /* 0x31001A97: call 0x310468c8 */ /* not lifted */ 1897 RECOMP_FLAGS_IN(); 1898 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1899 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1900 esp = esp + 4; /* 0x31001A9C: add esp, 4 */ 1901 _flag_k = FK_ADD; 1902 L_31001A9F: 1903 ecx = 0x31057D38u; /* 0x31001A9F: mov ecx, 0x31057d38 */ 1904 PUSH32(esp, 0); /* 0x31001AA4: push 0 */ 1905 MEM32(ebp + (-0x1C)) = ecx; /* 0x31001AA6: mov dword ptr [ebp - 0x1c], ecx */ 1906 RECOMP_ICALL(MEM32(0x310482A4)); /* 0x31001AA9: call dword ptr [0x310482a4] */ 1907 RECOMP_FLAGS_IN(); 1908 MEM32(ebp + (-0x18)) = eax; /* 0x31001AAF: mov dword ptr [ebp - 0x18], eax */ 1909 eax = MEM32(0x31057D84); /* 0x31001AB2: mov eax, dword ptr [0x31057d84] */ 1910 /* test eax, eax */ /* 0x31001AB7: test eax, eax */ 1911 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1912 _cf = 0; 1913 _flag_k = FK_TEST; 1914 MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x31001AB9: mov byte ptr [ebp - 4], 4 */ 1915 if (TEST_NZ(_flag_a, _flag_b)) goto L_31001B03; /* 0x31001ABD: jne 0x31001b03 */ 1916 L_31001ABF: 1917 PUSH32(esp, 0x48u); /* 0x31001ABF: push 0x48 */ 1918 MEM32(0x31057D84) = 1; /* 0x31001AC1: mov dword ptr [0x31057d84], 1 */ 1919 RECOMP_ICALL(0x310468DAu); /* 0x31001ACB: call 0x310468da */ /* not lifted */ 1920 RECOMP_FLAGS_IN(); 1921 esi = eax; /* 0x31001AD0: mov esi, eax */ 1922 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1923 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1924 esp = esp + 4; /* 0x31001AD2: add esp, 4 */ 1925 _flag_k = FK_ADD; 1926 MEM32(ebp + 0x8) = esi; /* 0x31001AD5: mov dword ptr [ebp + 8], esi */ 1927 /* test esi, esi */ /* 0x31001AD8: test esi, esi */ 1928 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 1929 _cf = 0; 1930 _flag_k = FK_TEST; 1931 MEM8(ebp + (-0x4)) = (uint8_t)(5); /* 0x31001ADA: mov byte ptr [ebp - 4], 5 */ 1932 if (TEST_Z(_flag_a, _flag_b)) goto L_31001AF0; /* 0x31001ADE: je 0x31001af0 */ 1933 L_31001AE0: 1934 PUSH32(esp, 0); /* 0x31001AE0: push 0 */ 1935 PUSH32(esp, 0); /* 0x31001AE2: push 0 */ 1936 ecx = esi; /* 0x31001AE4: mov ecx, esi */ 1937 RECOMP_ICALL(edi); /* 0x31001AE6: call edi */ 1938 RECOMP_FLAGS_IN(); 1939 MEM32(esi) = 0x31048354u; /* 0x31001AE8: mov dword ptr [esi], 0x31048354 */ 1940 goto L_31001AF2; /* 0x31001AEE: jmp 0x31001af2 */ 1941 L_31001AF0: 1942 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1943 esi = 0; /* 0x31001AF0: xor esi, esi */ 1944 _cf = 0; 1945 _flag_k = FK_TEST; 1946 L_31001AF2: 1947 ecx = ebx; /* 0x31001AF2: mov ecx, ebx */ 1948 MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x31001AF4: mov byte ptr [ebp - 4], 4 */ 1949 MEM32(0x31057D24) = esi; /* 0x31001AF8: mov dword ptr [0x31057d24], esi */ 1950 RECOMP_ICALL(0x310021C0u); /* 0x31001AFE: call 0x310021c0 */ /* not lifted */ 1951 RECOMP_FLAGS_IN(); 1952 L_31001B03: 1953 /* cmp MEM32(ebp + (-0x18)), 0xFFFFFFFFu */ /* 0x31001B03: cmp dword ptr [ebp - 0x18], -1 */ 1954 _flag_a = (uint32_t)(MEM32(ebp + (-0x18))); _flag_b = (uint32_t)(0xFFFFFFFFu); 1955 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1956 _flag_k = FK_CMP; 1957 MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x31001B07: mov byte ptr [ebp - 4], 3 */ 1958 if (CMP_EQ(_flag_a, _flag_b)) goto L_31001B20; /* 0x31001B0B: je 0x31001b20 */ 1959 L_31001B0D: 1960 ecx = 0x31057D38u; /* 0x31001B0D: mov ecx, 0x31057d38 */ 1961 RECOMP_ICALL(MEM32(0x31048294)); /* 0x31001B12: call dword ptr [0x31048294] */ 1962 RECOMP_FLAGS_IN(); 1963 goto L_31001B20; /* 0x31001B18: jmp 0x31001b20 */ 1964 L_31001B1A: 1965 _flag_a = (uint32_t)(MEM32(0x31057D84)); _flag_b = (uint32_t)(1); 1966 MEM32(0x31057D84) = MEM32(0x31057D84) + 1; /* 0x31001B1A: inc dword ptr [0x31057d84] */ 1967 _flag_k = FK_INC; 1968 L_31001B20: 1969 ecx = MEM32(ebp + (-0xC)); /* 0x31001B20: mov ecx, dword ptr [ebp - 0xc] */ 1970 edi = POP32_VAL(esp); /* 0x31001B23: pop edi */ 1971 esi = POP32_VAL(esp); /* 0x31001B24: pop esi */ 1972 eax = ebx; /* 0x31001B25: mov eax, ebx */ 1973 ebx = POP32_VAL(esp); /* 0x31001B27: pop ebx */ 1974 MEM32(FS_BASE + (0)) = ecx; /* 0x31001B28: mov dword ptr fs:[0], ecx */ 1975 esp = ebp; /* 0x31001B2F: mov esp, ebp */ 1976 ebp = POP32_VAL(esp); /* 0x31001B31: pop ebp */ 1977 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31001B32: ret 4 */ 1978 RECOMP_REGS_OUT(); 1979 } 1980 1981 void sub_31001B40(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(0x31001B40u); 1990 1991 L_31001B40: 1992 ecx = 0x31057D38u; /* 0x31001B40: mov ecx, 0x31057d38 */ 1993 L_31001B45: 1994 { _itail_tgt = (uint32_t)(MEM32(0x310482A0)); goto _ljump; } 1995 { RECOMP_REGS_OUT(); return; } /* end of function */ 1996 _ljump: 1997 switch (_itail_tgt) { 1998 case 0x31001B40u: goto L_31001B40; 1999 case 0x31001B45u: goto L_31001B45; 2000 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 2001 } 2002 RECOMP_REGS_OUT(); 2003 } 2004 2005 void sub_31001B50(void) { 2006 int _fpu_cmp = 0; 2007 uint32_t _cf = 0; 2008 int _df = 1; 2009 uint32_t _flag_k = FK_NONE; 2010 uint32_t _flag_a = 0, _flag_b = 0; 2011 uint32_t _itail_tgt = 0; 2012 RECOMP_REGS_LOCALS 2013 RECOMP_ENTER(0x31001B50u); 2014 2015 L_31001B50: 2016 PUSH32(esp, ebp); /* 0x31001B50: push ebp */ 2017 ebp = esp; /* 0x31001B51: mov ebp, esp */ 2018 PUSH32(esp, ebx); /* 0x31001B53: push ebx */ 2019 SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x31001B54: mov bl, byte ptr [ebp + 8] */ 2020 /* test LO8(ebx), 2 */ /* 0x31001B57: test bl, 2 */ 2021 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 2022 _cf = 0; 2023 _flag_k = FK_NARROW(FK_TEST, 24); 2024 PUSH32(esp, esi); /* 0x31001B5A: push esi */ 2025 esi = ecx; /* 0x31001B5B: mov esi, ecx */ 2026 if (TEST_Z(_flag_a, _flag_b)) goto L_31001B8E; /* 0x31001B5D: je 0x31001b8e */ 2027 L_31001B5F: 2028 eax = MEM32(esi + (-0x4)); /* 0x31001B5F: mov eax, dword ptr [esi - 4] */ 2029 PUSH32(esp, edi); /* 0x31001B62: push edi */ 2030 PUSH32(esp, 0x31001F10u); /* 0x31001B63: push 0x31001f10 */ 2031 edi = esi + (-0x4); /* 0x31001B68: lea edi, [esi - 4] */ 2032 PUSH32(esp, eax); /* 0x31001B6B: push eax */ 2033 PUSH32(esp, 0x1B4u); /* 0x31001B6C: push 0x1b4 */ 2034 PUSH32(esp, esi); /* 0x31001B71: push esi */ 2035 RECOMP_ICALL(0x310468E0u); /* 0x31001B72: call 0x310468e0 */ /* not lifted */ 2036 RECOMP_FLAGS_IN(); 2037 /* test LO8(ebx), 1 */ /* 0x31001B77: test bl, 1 */ 2038 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 2039 _cf = 0; 2040 _flag_k = FK_NARROW(FK_TEST, 24); 2041 if (TEST_Z(_flag_a, _flag_b)) goto L_31001B85; /* 0x31001B7A: je 0x31001b85 */ 2042 L_31001B7C: 2043 PUSH32(esp, edi); /* 0x31001B7C: push edi */ 2044 RECOMP_ICALL(0x31046858u); /* 0x31001B7D: call 0x31046858 */ /* not lifted */ 2045 RECOMP_FLAGS_IN(); 2046 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2047 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2048 esp = esp + 4; /* 0x31001B82: add esp, 4 */ 2049 _flag_k = FK_ADD; 2050 L_31001B85: 2051 eax = edi; /* 0x31001B85: mov eax, edi */ 2052 edi = POP32_VAL(esp); /* 0x31001B87: pop edi */ 2053 esi = POP32_VAL(esp); /* 0x31001B88: pop esi */ 2054 ebx = POP32_VAL(esp); /* 0x31001B89: pop ebx */ 2055 ebp = POP32_VAL(esp); /* 0x31001B8A: pop ebp */ 2056 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31001B8B: ret 4 */ 2057 L_31001B8E: 2058 ecx = esi; /* 0x31001B8E: mov ecx, esi */ 2059 RECOMP_ICALL(0x31001F10u); /* 0x31001B90: call 0x31001f10 */ /* not lifted */ 2060 RECOMP_FLAGS_IN(); 2061 /* test LO8(ebx), 1 */ /* 0x31001B95: test bl, 1 */ 2062 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 2063 _cf = 0; 2064 _flag_k = FK_NARROW(FK_TEST, 24); 2065 if (TEST_Z(_flag_a, _flag_b)) goto L_31001BA3; /* 0x31001B98: je 0x31001ba3 */ 2066 L_31001B9A: 2067 PUSH32(esp, esi); /* 0x31001B9A: push esi */ 2068 RECOMP_ICALL(0x31046858u); /* 0x31001B9B: call 0x31046858 */ /* not lifted */ 2069 RECOMP_FLAGS_IN(); 2070 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2071 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2072 esp = esp + 4; /* 0x31001BA0: add esp, 4 */ 2073 _flag_k = FK_ADD; 2074 L_31001BA3: 2075 eax = esi; /* 0x31001BA3: mov eax, esi */ 2076 esi = POP32_VAL(esp); /* 0x31001BA5: pop esi */ 2077 ebx = POP32_VAL(esp); /* 0x31001BA6: pop ebx */ 2078 ebp = POP32_VAL(esp); /* 0x31001BA7: pop ebp */ 2079 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31001BA8: ret 4 */ 2080 RECOMP_REGS_OUT(); 2081 } 2082 2083 void sub_31001BB0(void) { 2084 int _fpu_cmp = 0; 2085 uint32_t _cf = 0; 2086 int _df = 1; 2087 uint32_t _flag_k = FK_NONE; 2088 uint32_t _flag_a = 0, _flag_b = 0; 2089 uint32_t _itail_tgt = 0; 2090 RECOMP_REGS_LOCALS 2091 RECOMP_ENTER(0x31001BB0u); 2092 2093 L_31001BB0: 2094 PUSH32(esp, ebp); /* 0x31001BB0: push ebp */ 2095 ebp = esp; /* 0x31001BB1: mov ebp, esp */ 2096 PUSH32(esp, esi); /* 0x31001BB3: push esi */ 2097 esi = ecx; /* 0x31001BB4: mov esi, ecx */ 2098 RECOMP_ICALL(MEM32(0x310482A0)); /* 0x31001BB6: call dword ptr [0x310482a0] */ 2099 RECOMP_FLAGS_IN(); 2100 /* test MEM8(ebp + 0x8), 1 */ /* 0x31001BBC: test byte ptr [ebp + 8], 1 */ 2101 _flag_a = (uint32_t)(MEM8(ebp + 0x8)) << 24; _flag_b = (uint32_t)(1) << 24; 2102 _cf = 0; 2103 _flag_k = FK_NARROW(FK_TEST, 24); 2104 if (TEST_Z(_flag_a, _flag_b)) goto L_31001BCB; /* 0x31001BC0: je 0x31001bcb */ 2105 L_31001BC2: 2106 PUSH32(esp, esi); /* 0x31001BC2: push esi */ 2107 RECOMP_ICALL(0x31046858u); /* 0x31001BC3: call 0x31046858 */ /* not lifted */ 2108 RECOMP_FLAGS_IN(); 2109 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2110 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2111 esp = esp + 4; /* 0x31001BC8: add esp, 4 */ 2112 _flag_k = FK_ADD; 2113 L_31001BCB: 2114 eax = esi; /* 0x31001BCB: mov eax, esi */ 2115 esi = POP32_VAL(esp); /* 0x31001BCD: pop esi */ 2116 ebp = POP32_VAL(esp); /* 0x31001BCE: pop ebp */ 2117 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31001BCF: ret 4 */ 2118 RECOMP_REGS_OUT(); 2119 } 2120 2121 void sub_31001BE0(void) { 2122 int _fpu_cmp = 0; 2123 uint32_t _cf = 0; 2124 int _df = 1; 2125 uint32_t _flag_k = FK_NONE; 2126 uint32_t _flag_a = 0, _flag_b = 0; 2127 uint32_t _itail_tgt = 0; 2128 RECOMP_REGS_LOCALS 2129 RECOMP_ENTER(0x31001BE0u); 2130 2131 L_31001BE0: 2132 PUSH32(esp, ebp); /* 0x31001BE0: push ebp */ 2133 ebp = esp; /* 0x31001BE1: mov ebp, esp */ 2134 PUSH32(esp, 0xFFFFFFFFu); /* 0x31001BE3: push -1 */ 2135 PUSH32(esp, 0x31046CCBu); /* 0x31001BE5: push 0x31046ccb */ 2136 eax = MEM32(FS_BASE + (0)); /* 0x31001BEA: mov eax, dword ptr fs:[0] */ 2137 PUSH32(esp, eax); /* 0x31001BF0: push eax */ 2138 MEM32(FS_BASE + (0)) = esp; /* 0x31001BF1: mov dword ptr fs:[0], esp */ 2139 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x100u); 2140 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2141 esp = esp - 0x100u; /* 0x31001BF8: sub esp, 0x100 */ 2142 _flag_k = FK_CMP; 2143 eax = MEM32(ebp + 0x8); /* 0x31001BFE: mov eax, dword ptr [ebp + 8] */ 2144 PUSH32(esp, ebx); /* 0x31001C01: push ebx */ 2145 PUSH32(esp, esi); /* 0x31001C02: push esi */ 2146 PUSH32(esp, edi); /* 0x31001C03: push edi */ 2147 esi = ecx; /* 0x31001C04: mov esi, ecx */ 2148 PUSH32(esp, 0xFFu); /* 0x31001C06: push 0xff */ 2149 PUSH32(esp, eax); /* 0x31001C0B: push eax */ 2150 edi = esi + 0x4; /* 0x31001C0C: lea edi, [esi + 4] */ 2151 PUSH32(esp, edi); /* 0x31001C0F: push edi */ 2152 RECOMP_ICALL(MEM32(0x31048198)); /* 0x31001C10: call dword ptr [0x31048198] */ 2153 RECOMP_FLAGS_IN(); 2154 ebx = MEM32(0x31048190); /* 0x31001C16: mov ebx, dword ptr [0x31048190] */ 2155 PUSH32(esp, 0x310513B8u); /* 0x31001C1C: push 0x310513b8 */ 2156 PUSH32(esp, edi); /* 0x31001C21: push edi */ 2157 RECOMP_ICALL(ebx); /* 0x31001C22: call ebx */ 2158 RECOMP_FLAGS_IN(); 2159 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 2160 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2161 esp = esp + 0x14u; /* 0x31001C24: add esp, 0x14 */ 2162 _flag_k = FK_ADD; 2163 /* test eax, eax */ /* 0x31001C27: test eax, eax */ 2164 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2165 _cf = 0; 2166 _flag_k = FK_TEST; 2167 if (TEST_NZ(_flag_a, _flag_b)) goto L_31001C3A; /* 0x31001C29: jne 0x31001c3a */ 2168 L_31001C2B: 2169 PUSH32(esp, 0x310513B0u); /* 0x31001C2B: push 0x310513b0 */ 2170 PUSH32(esp, edi); /* 0x31001C30: push edi */ 2171 RECOMP_ICALL(ebx); /* 0x31001C31: call ebx */ 2172 RECOMP_FLAGS_IN(); 2173 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2174 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2175 esp = esp + 8; /* 0x31001C33: add esp, 8 */ 2176 _flag_k = FK_ADD; 2177 /* test eax, eax */ /* 0x31001C36: test eax, eax */ 2178 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2179 _cf = 0; 2180 _flag_k = FK_TEST; 2181 if (TEST_Z(_flag_a, _flag_b)) goto L_31001C3D; /* 0x31001C38: je 0x31001c3d */ 2182 L_31001C3A: 2183 MEM8(eax) = (uint8_t)(0); /* 0x31001C3A: mov byte ptr [eax], 0 */ 2184 L_31001C3D: 2185 SET_LO8(eax, MEM8(esi + 0x118)); /* 0x31001C3D: mov al, byte ptr [esi + 0x118] */ 2186 /* test LO8(eax), LO8(eax) */ /* 0x31001C43: test al, al */ 2187 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2188 _cf = 0; 2189 _flag_k = FK_NARROW(FK_TEST, 24); 2190 if (TEST_Z(_flag_a, _flag_b)) goto L_31001C4E; /* 0x31001C45: je 0x31001c4e */ 2191 L_31001C47: 2192 ecx = esi; /* 0x31001C47: mov ecx, esi */ 2193 RECOMP_ICALL(0x31001CD0u); /* 0x31001C49: call 0x31001cd0 */ /* not lifted */ 2194 RECOMP_FLAGS_IN(); 2195 L_31001C4E: 2196 ebx = MEM32(ebp + 0x10); /* 0x31001C4E: mov ebx, dword ptr [ebp + 0x10] */ 2197 ecx = MEM32(ebp + 0xC); /* 0x31001C51: mov ecx, dword ptr [ebp + 0xc] */ 2198 PUSH32(esp, ebx); /* 0x31001C54: push ebx */ 2199 PUSH32(esp, ecx); /* 0x31001C55: push ecx */ 2200 ecx = esi; /* 0x31001C56: mov ecx, esi */ 2201 RECOMP_ICALL(0x31002200u); /* 0x31001C58: call 0x31002200 */ /* not lifted */ 2202 RECOMP_FLAGS_IN(); 2203 /* test eax, eax */ /* 0x31001C5D: test eax, eax */ 2204 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2205 _cf = 0; 2206 _flag_k = FK_TEST; 2207 if (TEST_S(_flag_a, _flag_b)) goto L_31001CBB; /* 0x31001C5F: jl 0x31001cbb */ 2208 L_31001C61: 2209 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2210 eax = 0; /* 0x31001C61: xor eax, eax */ 2211 _cf = 0; 2212 _flag_k = FK_TEST; 2213 /* cmp LO8(ebx), 1 */ /* 0x31001C63: cmp bl, 1 */ 2214 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 2215 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2216 _flag_k = FK_NARROW(FK_CMP, 24); 2217 MEM8(esi + 0x118) = (uint8_t)(1); /* 0x31001C66: mov byte ptr [esi + 0x118], 1 */ 2218 if (CMP_NE(_flag_a, _flag_b)) goto L_31001C76; /* 0x31001C6D: jne 0x31001c76 */ 2219 L_31001C6F: 2220 SET_LO8(ecx, MEM8(ebp + 0xC)); /* 0x31001C6F: mov cl, byte ptr [ebp + 0xc] */ 2221 /* test LO8(ecx), LO8(ecx) */ /* 0x31001C72: test cl, cl */ 2222 _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24; 2223 _cf = 0; 2224 _flag_k = FK_NARROW(FK_TEST, 24); 2225 if (TEST_Z(_flag_a, _flag_b)) goto L_31001CBB; /* 0x31001C74: je 0x31001cbb */ 2226 L_31001C76: 2227 PUSH32(esp, edi); /* 0x31001C76: push edi */ 2228 edx = ebp + (-0x10C); /* 0x31001C77: lea edx, [ebp - 0x10c] */ 2229 PUSH32(esp, 0x310513A8u); /* 0x31001C7D: push 0x310513a8 */ 2230 PUSH32(esp, edx); /* 0x31001C82: push edx */ 2231 RECOMP_ICALL(MEM32(0x31048208)); /* 0x31001C83: call dword ptr [0x31048208] */ 2232 RECOMP_FLAGS_IN(); 2233 PUSH32(esp, 8); /* 0x31001C89: push 8 */ 2234 RECOMP_ICALL(0x310468DAu); /* 0x31001C8B: call 0x310468da */ /* not lifted */ 2235 RECOMP_FLAGS_IN(); 2236 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 2237 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2238 esp = esp + 0x10u; /* 0x31001C90: add esp, 0x10 */ 2239 _flag_k = FK_ADD; 2240 MEM32(ebp + 0xC) = eax; /* 0x31001C93: mov dword ptr [ebp + 0xc], eax */ 2241 /* test eax, eax */ /* 0x31001C96: test eax, eax */ 2242 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2243 _cf = 0; 2244 _flag_k = FK_TEST; 2245 MEM32(ebp + (-0x4)) = 0; /* 0x31001C98: mov dword ptr [ebp - 4], 0 */ 2246 if (TEST_Z(_flag_a, _flag_b)) goto L_31001CB1; /* 0x31001C9F: je 0x31001cb1 */ 2247 L_31001CA1: 2248 ecx = ebp + (-0x10C); /* 0x31001CA1: lea ecx, [ebp - 0x10c] */ 2249 PUSH32(esp, ecx); /* 0x31001CA7: push ecx */ 2250 ecx = eax; /* 0x31001CA8: mov ecx, eax */ 2251 RECOMP_ICALL(0x310083D0u); /* 0x31001CAA: call 0x310083d0 */ /* not lifted */ 2252 RECOMP_FLAGS_IN(); 2253 goto L_31001CB3; /* 0x31001CAF: jmp 0x31001cb3 */ 2254 L_31001CB1: 2255 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2256 eax = 0; /* 0x31001CB1: xor eax, eax */ 2257 _cf = 0; 2258 _flag_k = FK_TEST; 2259 L_31001CB3: 2260 MEM32(esi + 0x114) = eax; /* 0x31001CB3: mov dword ptr [esi + 0x114], eax */ 2261 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2262 eax = 0; /* 0x31001CB9: xor eax, eax */ 2263 _cf = 0; 2264 _flag_k = FK_TEST; 2265 L_31001CBB: 2266 ecx = MEM32(ebp + (-0xC)); /* 0x31001CBB: mov ecx, dword ptr [ebp - 0xc] */ 2267 edi = POP32_VAL(esp); /* 0x31001CBE: pop edi */ 2268 esi = POP32_VAL(esp); /* 0x31001CBF: pop esi */ 2269 ebx = POP32_VAL(esp); /* 0x31001CC0: pop ebx */ 2270 MEM32(FS_BASE + (0)) = ecx; /* 0x31001CC1: mov dword ptr fs:[0], ecx */ 2271 esp = ebp; /* 0x31001CC8: mov esp, ebp */ 2272 ebp = POP32_VAL(esp); /* 0x31001CCA: pop ebp */ 2273 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31001CCB: ret 0xc */ 2274 RECOMP_REGS_OUT(); 2275 } 2276 2277 void sub_31001CD0(void) { 2278 int _fpu_cmp = 0; 2279 uint32_t _cf = 0; 2280 int _df = 1; 2281 uint32_t _flag_k = FK_NONE; 2282 uint32_t _flag_a = 0, _flag_b = 0; 2283 uint32_t _itail_tgt = 0; 2284 RECOMP_REGS_LOCALS 2285 RECOMP_ENTER(0x31001CD0u); 2286 2287 L_31001CD0: 2288 PUSH32(esp, esi); /* 0x31001CD0: push esi */ 2289 esi = ecx; /* 0x31001CD1: mov esi, ecx */ 2290 PUSH32(esp, edi); /* 0x31001CD3: push edi */ 2291 edi = MEM32(esi + 0x114); /* 0x31001CD4: mov edi, dword ptr [esi + 0x114] */ 2292 /* test edi, edi */ /* 0x31001CDA: test edi, edi */ 2293 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 2294 _cf = 0; 2295 _flag_k = FK_TEST; 2296 if (TEST_Z(_flag_a, _flag_b)) goto L_31001CEE; /* 0x31001CDC: je 0x31001cee */ 2297 L_31001CDE: 2298 ecx = edi; /* 0x31001CDE: mov ecx, edi */ 2299 RECOMP_ICALL(0x31001D10u); /* 0x31001CE0: call 0x31001d10 */ /* not lifted */ 2300 RECOMP_FLAGS_IN(); 2301 PUSH32(esp, edi); /* 0x31001CE5: push edi */ 2302 RECOMP_ICALL(0x31046858u); /* 0x31001CE6: call 0x31046858 */ /* not lifted */ 2303 RECOMP_FLAGS_IN(); 2304 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2305 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2306 esp = esp + 4; /* 0x31001CEB: add esp, 4 */ 2307 _flag_k = FK_ADD; 2308 L_31001CEE: 2309 ecx = esi; /* 0x31001CEE: mov ecx, esi */ 2310 MEM32(esi + 0x114) = 0; /* 0x31001CF0: mov dword ptr [esi + 0x114], 0 */ 2311 RECOMP_ICALL(0x31002740u); /* 0x31001CFA: call 0x31002740 */ /* not lifted */ 2312 RECOMP_FLAGS_IN(); 2313 edi = POP32_VAL(esp); /* 0x31001CFF: pop edi */ 2314 MEM8(esi + 0x118) = (uint8_t)(0); /* 0x31001D00: mov byte ptr [esi + 0x118], 0 */ 2315 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2316 eax = 0; /* 0x31001D07: xor eax, eax */ 2317 _cf = 0; 2318 _flag_k = FK_TEST; 2319 esi = POP32_VAL(esp); /* 0x31001D09: pop esi */ 2320 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31001D0A: ret */ 2321 RECOMP_REGS_OUT(); 2322 } 2323 2324 void sub_31001D10(void) { 2325 int _fpu_cmp = 0; 2326 uint32_t _cf = 0; 2327 int _df = 1; 2328 uint32_t _flag_k = FK_NONE; 2329 uint32_t _flag_a = 0, _flag_b = 0; 2330 uint32_t _itail_tgt = 0; 2331 RECOMP_REGS_LOCALS 2332 RECOMP_ENTER(0x31001D10u); 2333 2334 L_31001D10: 2335 PUSH32(esp, ebp); /* 0x31001D10: push ebp */ 2336 ebp = esp; /* 0x31001D11: mov ebp, esp */ 2337 PUSH32(esp, 0xFFFFFFFFu); /* 0x31001D13: push -1 */ 2338 PUSH32(esp, 0x31046CEBu); /* 0x31001D15: push 0x31046ceb */ 2339 eax = MEM32(FS_BASE + (0)); /* 0x31001D1A: mov eax, dword ptr fs:[0] */ 2340 PUSH32(esp, eax); /* 0x31001D20: push eax */ 2341 MEM32(FS_BASE + (0)) = esp; /* 0x31001D21: mov dword ptr fs:[0], esp */ 2342 PUSH32(esp, ecx); /* 0x31001D28: push ecx */ 2343 PUSH32(esp, esi); /* 0x31001D29: push esi */ 2344 esi = ecx; /* 0x31001D2A: mov esi, ecx */ 2345 MEM32(ebp + (-0x10)) = esi; /* 0x31001D2C: mov dword ptr [ebp - 0x10], esi */ 2346 MEM32(ebp + (-0x4)) = 0; /* 0x31001D2F: mov dword ptr [ebp - 4], 0 */ 2347 RECOMP_ICALL(0x310084A0u); /* 0x31001D36: call 0x310084a0 */ /* not lifted */ 2348 RECOMP_FLAGS_IN(); 2349 ecx = esi + 0x4; /* 0x31001D3B: lea ecx, [esi + 4] */ 2350 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x31001D3E: mov dword ptr [ebp - 4], 0xffffffff */ 2351 RECOMP_ICALL(0x31004760u); /* 0x31001D45: call 0x31004760 */ /* not lifted */ 2352 RECOMP_FLAGS_IN(); 2353 ecx = MEM32(ebp + (-0xC)); /* 0x31001D4A: mov ecx, dword ptr [ebp - 0xc] */ 2354 esi = POP32_VAL(esp); /* 0x31001D4D: pop esi */ 2355 MEM32(FS_BASE + (0)) = ecx; /* 0x31001D4E: mov dword ptr fs:[0], ecx */ 2356 esp = ebp; /* 0x31001D55: mov esp, ebp */ 2357 ebp = POP32_VAL(esp); /* 0x31001D57: pop ebp */ 2358 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31001D58: ret */ 2359 RECOMP_REGS_OUT(); 2360 } 2361 2362 void sub_31001D60(void) { 2363 int _fpu_cmp = 0; 2364 uint32_t _cf = 0; 2365 int _df = 1; 2366 uint32_t _flag_k = FK_NONE; 2367 uint32_t _flag_a = 0, _flag_b = 0; 2368 uint32_t _itail_tgt = 0; 2369 RECOMP_REGS_LOCALS 2370 RECOMP_ENTER(0x31001D60u); 2371 2372 L_31001D60: 2373 PUSH32(esp, ebp); /* 0x31001D60: push ebp */ 2374 ebp = esp; /* 0x31001D61: mov ebp, esp */ 2375 eax = MEM32(ebp + 0x8); /* 0x31001D63: mov eax, dword ptr [ebp + 8] */ 2376 PUSH32(esp, eax); /* 0x31001D66: push eax */ 2377 RECOMP_ICALL(0x31011892u); /* 0x31001D67: call 0x31011892 */ /* not lifted */ 2378 RECOMP_FLAGS_IN(); 2379 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2380 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2381 esp = esp + 4; /* 0x31001D6C: add esp, 4 */ 2382 _flag_k = FK_ADD; 2383 ebp = POP32_VAL(esp); /* 0x31001D6F: pop ebp */ 2384 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31001D70: ret 4 */ 2385 RECOMP_REGS_OUT(); 2386 } 2387 2388 void sub_31001D80(void) { 2389 int _fpu_cmp = 0; 2390 uint32_t _cf = 0; 2391 int _df = 1; 2392 uint32_t _flag_k = FK_NONE; 2393 uint32_t _flag_a = 0, _flag_b = 0; 2394 uint32_t _itail_tgt = 0; 2395 RECOMP_REGS_LOCALS 2396 RECOMP_ENTER(0x31001D80u); 2397 2398 L_31001D80: 2399 PUSH32(esp, ebp); /* 0x31001D80: push ebp */ 2400 ebp = esp; /* 0x31001D81: mov ebp, esp */ 2401 PUSH32(esp, ebx); /* 0x31001D83: push ebx */ 2402 ebx = ecx; /* 0x31001D84: mov ebx, ecx */ 2403 SET_LO8(eax, MEM8(ebx + 0x124)); /* 0x31001D86: mov al, byte ptr [ebx + 0x124] */ 2404 /* test LO8(eax), LO8(eax) */ /* 0x31001D8C: test al, al */ 2405 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2406 _cf = 0; 2407 _flag_k = FK_NARROW(FK_TEST, 24); 2408 PUSH32(esp, edi); /* 0x31001D8E: push edi */ 2409 if (TEST_Z(_flag_a, _flag_b)) goto L_31001D96; /* 0x31001D8F: je 0x31001d96 */ 2410 L_31001D91: 2411 RECOMP_ICALL(0x31001E30u); /* 0x31001D91: call 0x31001e30 */ /* not lifted */ 2412 RECOMP_FLAGS_IN(); 2413 L_31001D96: 2414 edi = ebx + 0x128; /* 0x31001D96: lea edi, [ebx + 0x128] */ 2415 eax = MEM32(edi + 0x54); /* 0x31001D9C: mov eax, dword ptr [edi + 0x54] */ 2416 /* test eax, eax */ /* 0x31001D9F: test eax, eax */ 2417 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2418 _cf = 0; 2419 _flag_k = FK_TEST; 2420 PUSH32(esp, esi); /* 0x31001DA1: push esi */ 2421 esi = edi + 0x4; /* 0x31001DA2: lea esi, [edi + 4] */ 2422 if (TEST_NZ(_flag_a, _flag_b)) goto L_31001DD1; /* 0x31001DA5: jne 0x31001dd1 */ 2423 L_31001DA7: 2424 eax = MEM32(ebp + 0x8); /* 0x31001DA7: mov eax, dword ptr [ebp + 8] */ 2425 PUSH32(esp, 0xAu); /* 0x31001DAA: push 0xa */ 2426 PUSH32(esp, eax); /* 0x31001DAC: push eax */ 2427 RECOMP_ICALL(MEM32(0x31048148)); /* 0x31001DAD: call dword ptr [0x31048148] */ 2428 RECOMP_FLAGS_IN(); 2429 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2430 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2431 esp = esp + 8; /* 0x31001DB3: add esp, 8 */ 2432 _flag_k = FK_ADD; 2433 /* test eax, eax */ /* 0x31001DB6: test eax, eax */ 2434 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2435 _cf = 0; 2436 _flag_k = FK_TEST; 2437 if (TEST_Z(_flag_a, _flag_b)) goto L_31001DD1; /* 0x31001DB8: je 0x31001dd1 */ 2438 L_31001DBA: 2439 PUSH32(esp, 1); /* 0x31001DBA: push 1 */ 2440 PUSH32(esp, eax); /* 0x31001DBC: push eax */ 2441 ecx = esi; /* 0x31001DBD: mov ecx, esi */ 2442 RECOMP_ICALL(MEM32(0x31048144)); /* 0x31001DBF: call dword ptr [0x31048144] */ 2443 RECOMP_FLAGS_IN(); 2444 ecx = esi; /* 0x31001DC5: mov ecx, esi */ 2445 RECOMP_ICALL(MEM32(0x31048140)); /* 0x31001DC7: call dword ptr [0x31048140] */ 2446 RECOMP_FLAGS_IN(); 2447 /* test esi, esi */ /* 0x31001DCD: test esi, esi */ 2448 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 2449 _cf = 0; 2450 _flag_k = FK_TEST; 2451 if (TEST_NZ(_flag_a, _flag_b)) goto L_31001DF3; /* 0x31001DCF: jne 0x31001df3 */ 2452 L_31001DD1: 2453 ecx = MEM32(edi); /* 0x31001DD1: mov ecx, dword ptr [edi] */ 2454 ecx = MEM32(ecx + 0x4); /* 0x31001DD3: mov ecx, dword ptr [ecx + 4] */ 2455 eax = MEM32(ecx + edi + 0x4); /* 0x31001DD6: mov eax, dword ptr [ecx + edi + 4] */ 2456 edx = MEM32(ecx + edi + 0x28); /* 0x31001DDA: mov edx, dword ptr [ecx + edi + 0x28] */ 2457 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 2458 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2459 ecx = ecx + edi; /* 0x31001DDE: add ecx, edi */ 2460 _flag_k = FK_ADD; 2461 _flag_a = (uint32_t)((eax | 2)); _flag_b = (uint32_t)((eax | 2)); 2462 eax = eax | 2; /* 0x31001DE0: or eax, 2 */ 2463 _cf = 0; 2464 _flag_k = FK_TEST; 2465 /* test edx, edx */ /* 0x31001DE3: test edx, edx */ 2466 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 2467 _cf = 0; 2468 _flag_k = FK_TEST; 2469 if (TEST_NZ(_flag_a, _flag_b)) goto L_31001DEA; /* 0x31001DE5: jne 0x31001dea */ 2470 L_31001DE7: 2471 _flag_a = (uint32_t)((eax | 4)); _flag_b = (uint32_t)((eax | 4)); 2472 eax = eax | 4; /* 0x31001DE7: or eax, 4 */ 2473 _cf = 0; 2474 _flag_k = FK_TEST; 2475 L_31001DEA: 2476 PUSH32(esp, 0); /* 0x31001DEA: push 0 */ 2477 PUSH32(esp, eax); /* 0x31001DEC: push eax */ 2478 RECOMP_ICALL(MEM32(0x3104813C)); /* 0x31001DED: call dword ptr [0x3104813c] */ 2479 RECOMP_FLAGS_IN(); 2480 L_31001DF3: 2481 edx = MEM32(edi); /* 0x31001DF3: mov edx, dword ptr [edi] */ 2482 eax = MEM32(edx + 0x4); /* 0x31001DF5: mov eax, dword ptr [edx + 4] */ 2483 ecx = MEM32(eax + ebx + 0x12C); /* 0x31001DF8: mov ecx, dword ptr [eax + ebx + 0x12c] */ 2484 /* test ecx, ecx */ /* 0x31001DFF: test ecx, ecx */ 2485 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 2486 _cf = 0; 2487 _flag_k = FK_TEST; 2488 esi = POP32_VAL(esp); /* 0x31001E01: pop esi */ 2489 if (TEST_NZ(_flag_a, _flag_b)) goto L_31001E27; /* 0x31001E02: jne 0x31001e27 */ 2490 L_31001E04: 2491 PUSH32(esp, 0x310513C0u); /* 0x31001E04: push 0x310513c0 */ 2492 PUSH32(esp, edi); /* 0x31001E09: push edi */ 2493 MEM8(ebx + 0x124) = (uint8_t)(1); /* 0x31001E0A: mov byte ptr [ebx + 0x124], 1 */ 2494 RECOMP_ICALL(MEM32(0x31048098)); /* 0x31001E11: call dword ptr [0x31048098] */ 2495 RECOMP_FLAGS_IN(); 2496 PUSH32(esp, eax); /* 0x31001E17: push eax */ 2497 RECOMP_ICALL(0x31001060u); /* 0x31001E18: call 0x31001060 */ /* not lifted */ 2498 RECOMP_FLAGS_IN(); 2499 PUSH32(esp, eax); /* 0x31001E1D: push eax */ 2500 RECOMP_ICALL(MEM32(0x31048138)); /* 0x31001E1E: call dword ptr [0x31048138] */ 2501 RECOMP_FLAGS_IN(); 2502 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 2503 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2504 esp = esp + 0x10u; /* 0x31001E24: add esp, 0x10 */ 2505 _flag_k = FK_ADD; 2506 L_31001E27: 2507 edi = POP32_VAL(esp); /* 0x31001E27: pop edi */ 2508 ebx = POP32_VAL(esp); /* 0x31001E28: pop ebx */ 2509 ebp = POP32_VAL(esp); /* 0x31001E29: pop ebp */ 2510 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31001E2A: ret 4 */ 2511 RECOMP_REGS_OUT(); 2512 } 2513 2514 void sub_31001E30(void) { 2515 int _fpu_cmp = 0; 2516 uint32_t _cf = 0; 2517 int _df = 1; 2518 uint32_t _flag_k = FK_NONE; 2519 uint32_t _flag_a = 0, _flag_b = 0; 2520 uint32_t _itail_tgt = 0; 2521 RECOMP_REGS_LOCALS 2522 RECOMP_ENTER(0x31001E30u); 2523 2524 L_31001E30: 2525 PUSH32(esp, ebx); /* 0x31001E30: push ebx */ 2526 ebx = ecx; /* 0x31001E31: mov ebx, ecx */ 2527 SET_LO8(eax, MEM8(ebx + 0x124)); /* 0x31001E33: mov al, byte ptr [ebx + 0x124] */ 2528 /* test LO8(eax), LO8(eax) */ /* 0x31001E39: test al, al */ 2529 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2530 _cf = 0; 2531 _flag_k = FK_NARROW(FK_TEST, 24); 2532 if (TEST_Z(_flag_a, _flag_b)) goto L_31001F0B; /* 0x31001E3B: je 0x31001f0b */ 2533 L_31001E41: 2534 PUSH32(esp, esi); /* 0x31001E41: push esi */ 2535 PUSH32(esp, edi); /* 0x31001E42: push edi */ 2536 edi = ebx + 0x128; /* 0x31001E43: lea edi, [ebx + 0x128] */ 2537 PUSH32(esp, 0x310513E0u); /* 0x31001E49: push 0x310513e0 */ 2538 PUSH32(esp, edi); /* 0x31001E4E: push edi */ 2539 RECOMP_ICALL(MEM32(0x31048098)); /* 0x31001E4F: call dword ptr [0x31048098] */ 2540 RECOMP_FLAGS_IN(); 2541 PUSH32(esp, eax); /* 0x31001E55: push eax */ 2542 RECOMP_ICALL(0x31001060u); /* 0x31001E56: call 0x31001060 */ /* not lifted */ 2543 RECOMP_FLAGS_IN(); 2544 PUSH32(esp, eax); /* 0x31001E5B: push eax */ 2545 RECOMP_ICALL(MEM32(0x31048138)); /* 0x31001E5C: call dword ptr [0x31048138] */ 2546 RECOMP_FLAGS_IN(); 2547 eax = MEM32(edi + 0x54); /* 0x31001E62: mov eax, dword ptr [edi + 0x54] */ 2548 esi = edi + 0x4; /* 0x31001E65: lea esi, [edi + 4] */ 2549 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 2550 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2551 esp = esp + 0x10u; /* 0x31001E68: add esp, 0x10 */ 2552 _flag_k = FK_ADD; 2553 /* test eax, eax */ /* 0x31001E6B: test eax, eax */ 2554 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2555 _cf = 0; 2556 _flag_k = FK_TEST; 2557 if (TEST_Z(_flag_a, _flag_b)) goto L_31001EE0; /* 0x31001E6D: je 0x31001ee0 */ 2558 L_31001E6F: 2559 PUSH32(esp, eax); /* 0x31001E6F: push eax */ 2560 RECOMP_ICALL(MEM32(0x310481AC)); /* 0x31001E70: call dword ptr [0x310481ac] */ 2561 RECOMP_FLAGS_IN(); 2562 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2563 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2564 esp = esp + 4; /* 0x31001E76: add esp, 4 */ 2565 _flag_k = FK_ADD; 2566 /* test eax, eax */ /* 0x31001E79: test eax, eax */ 2567 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2568 _cf = 0; 2569 _flag_k = FK_TEST; 2570 if (TEST_NZ(_flag_a, _flag_b)) goto L_31001EE0; /* 0x31001E7B: jne 0x31001ee0 */ 2571 L_31001E7D: 2572 MEM8(esi + 0x48) = (uint8_t)(LO8(eax)); /* 0x31001E7D: mov byte ptr [esi + 0x48], al */ 2573 ecx = esi + 0x8; /* 0x31001E80: lea ecx, [esi + 8] */ 2574 MEM32(esi + 0x10) = ecx; /* 0x31001E83: mov dword ptr [esi + 0x10], ecx */ 2575 eax = esi + 0x4; /* 0x31001E86: lea eax, [esi + 4] */ 2576 edx = esi + 0x14; /* 0x31001E89: lea edx, [esi + 0x14] */ 2577 ecx = esi + 0x24; /* 0x31001E8C: lea ecx, [esi + 0x24] */ 2578 MEM32(esi + 0xC) = eax; /* 0x31001E8F: mov dword ptr [esi + 0xc], eax */ 2579 MEM32(esi + 0x1C) = edx; /* 0x31001E92: mov dword ptr [esi + 0x1c], edx */ 2580 PUSH32(esp, 0); /* 0x31001E95: push 0 */ 2581 eax = esi + 0x18; /* 0x31001E97: lea eax, [esi + 0x18] */ 2582 MEM32(esi + 0x2C) = ecx; /* 0x31001E9A: mov dword ptr [esi + 0x2c], ecx */ 2583 edx = esi + 0x28; /* 0x31001E9D: lea edx, [esi + 0x28] */ 2584 PUSH32(esp, 0); /* 0x31001EA0: push 0 */ 2585 ecx = esi; /* 0x31001EA2: mov ecx, esi */ 2586 MEM32(esi + 0x20) = eax; /* 0x31001EA4: mov dword ptr [esi + 0x20], eax */ 2587 MEM32(esi + 0x30) = edx; /* 0x31001EA7: mov dword ptr [esi + 0x30], edx */ 2588 RECOMP_ICALL(MEM32(0x310480DC)); /* 0x31001EAA: call dword ptr [0x310480dc] */ 2589 RECOMP_FLAGS_IN(); 2590 PUSH32(esp, 0); /* 0x31001EB0: push 0 */ 2591 PUSH32(esp, 0); /* 0x31001EB2: push 0 */ 2592 PUSH32(esp, 0); /* 0x31001EB4: push 0 */ 2593 ecx = esi; /* 0x31001EB6: mov ecx, esi */ 2594 RECOMP_ICALL(MEM32(0x31048134)); /* 0x31001EB8: call dword ptr [0x31048134] */ 2595 RECOMP_FLAGS_IN(); 2596 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2597 eax = 0; /* 0x31001EBE: xor eax, eax */ 2598 _cf = 0; 2599 _flag_k = FK_TEST; 2600 /* cmp esi, eax */ /* 0x31001EC0: cmp esi, eax */ 2601 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 2602 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2603 _flag_k = FK_CMP; 2604 MEM32(esi + 0x50) = eax; /* 0x31001EC2: mov dword ptr [esi + 0x50], eax */ 2605 ecx = MEM32(0x31048130); /* 0x31001EC5: mov ecx, dword ptr [0x31048130] */ 2606 edx = MEM32(ecx); /* 0x31001ECB: mov edx, dword ptr [ecx] */ 2607 MEM32(esi + 0x40) = edx; /* 0x31001ECD: mov dword ptr [esi + 0x40], edx */ 2608 ecx = MEM32(0x31048130); /* 0x31001ED0: mov ecx, dword ptr [0x31048130] */ 2609 edx = MEM32(ecx); /* 0x31001ED6: mov edx, dword ptr [ecx] */ 2610 MEM32(esi + 0x3C) = edx; /* 0x31001ED8: mov dword ptr [esi + 0x3c], edx */ 2611 MEM32(esi + 0x38) = eax; /* 0x31001EDB: mov dword ptr [esi + 0x38], eax */ 2612 if (CMP_NE(_flag_a, _flag_b)) goto L_31001F02; /* 0x31001EDE: jne 0x31001f02 */ 2613 L_31001EE0: 2614 eax = MEM32(edi); /* 0x31001EE0: mov eax, dword ptr [edi] */ 2615 ecx = MEM32(eax + 0x4); /* 0x31001EE2: mov ecx, dword ptr [eax + 4] */ 2616 eax = MEM32(ecx + edi + 0x4); /* 0x31001EE5: mov eax, dword ptr [ecx + edi + 4] */ 2617 edx = MEM32(ecx + edi + 0x28); /* 0x31001EE9: mov edx, dword ptr [ecx + edi + 0x28] */ 2618 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 2619 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2620 ecx = ecx + edi; /* 0x31001EED: add ecx, edi */ 2621 _flag_k = FK_ADD; 2622 _flag_a = (uint32_t)((eax | 2)); _flag_b = (uint32_t)((eax | 2)); 2623 eax = eax | 2; /* 0x31001EEF: or eax, 2 */ 2624 _cf = 0; 2625 _flag_k = FK_TEST; 2626 /* test edx, edx */ /* 0x31001EF2: test edx, edx */ 2627 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 2628 _cf = 0; 2629 _flag_k = FK_TEST; 2630 if (TEST_NZ(_flag_a, _flag_b)) goto L_31001EF9; /* 0x31001EF4: jne 0x31001ef9 */ 2631 L_31001EF6: 2632 _flag_a = (uint32_t)((eax | 4)); _flag_b = (uint32_t)((eax | 4)); 2633 eax = eax | 4; /* 0x31001EF6: or eax, 4 */ 2634 _cf = 0; 2635 _flag_k = FK_TEST; 2636 L_31001EF9: 2637 PUSH32(esp, 0); /* 0x31001EF9: push 0 */ 2638 PUSH32(esp, eax); /* 0x31001EFB: push eax */ 2639 RECOMP_ICALL(MEM32(0x3104813C)); /* 0x31001EFC: call dword ptr [0x3104813c] */ 2640 RECOMP_FLAGS_IN(); 2641 L_31001F02: 2642 edi = POP32_VAL(esp); /* 0x31001F02: pop edi */ 2643 MEM8(ebx + 0x124) = (uint8_t)(0); /* 0x31001F03: mov byte ptr [ebx + 0x124], 0 */ 2644 esi = POP32_VAL(esp); /* 0x31001F0A: pop esi */ 2645 L_31001F0B: 2646 ebx = POP32_VAL(esp); /* 0x31001F0B: pop ebx */ 2647 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31001F0C: ret */ 2648 RECOMP_REGS_OUT(); 2649 } 2650 2651 void sub_31001F10(void) { 2652 int _fpu_cmp = 0; 2653 uint32_t _cf = 0; 2654 int _df = 1; 2655 uint32_t _flag_k = FK_NONE; 2656 uint32_t _flag_a = 0, _flag_b = 0; 2657 uint32_t _itail_tgt = 0; 2658 RECOMP_REGS_LOCALS 2659 RECOMP_ENTER(0x31001F10u); 2660 2661 L_31001F10: 2662 PUSH32(esp, ebp); /* 0x31001F10: push ebp */ 2663 ebp = esp; /* 0x31001F11: mov ebp, esp */ 2664 PUSH32(esp, 0xFFFFFFFFu); /* 0x31001F13: push -1 */ 2665 PUSH32(esp, 0x31046D30u); /* 0x31001F15: push 0x31046d30 */ 2666 eax = MEM32(FS_BASE + (0)); /* 0x31001F1A: mov eax, dword ptr fs:[0] */ 2667 PUSH32(esp, eax); /* 0x31001F20: push eax */ 2668 MEM32(FS_BASE + (0)) = esp; /* 0x31001F21: mov dword ptr fs:[0], esp */ 2669 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 2670 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2671 esp = esp - 0xCu; /* 0x31001F28: sub esp, 0xc */ 2672 _flag_k = FK_CMP; 2673 PUSH32(esp, esi); /* 0x31001F2B: push esi */ 2674 esi = ecx; /* 0x31001F2C: mov esi, ecx */ 2675 PUSH32(esp, edi); /* 0x31001F2E: push edi */ 2676 MEM32(ebp + (-0x10)) = esi; /* 0x31001F2F: mov dword ptr [ebp - 0x10], esi */ 2677 MEM32(esi) = 0x31048360u; /* 0x31001F32: mov dword ptr [esi], 0x31048360 */ 2678 SET_LO8(eax, MEM8(esi + 0x118)); /* 0x31001F38: mov al, byte ptr [esi + 0x118] */ 2679 /* test LO8(eax), LO8(eax) */ /* 0x31001F3E: test al, al */ 2680 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2681 _cf = 0; 2682 _flag_k = FK_NARROW(FK_TEST, 24); 2683 MEM32(ebp + (-0x4)) = 0; /* 0x31001F40: mov dword ptr [ebp - 4], 0 */ 2684 if (TEST_Z(_flag_a, _flag_b)) goto L_31001F4E; /* 0x31001F47: je 0x31001f4e */ 2685 L_31001F49: 2686 RECOMP_ICALL(0x31001CD0u); /* 0x31001F49: call 0x31001cd0 */ /* not lifted */ 2687 RECOMP_FLAGS_IN(); 2688 L_31001F4E: 2689 SET_LO8(eax, MEM8(esi + 0x104)); /* 0x31001F4E: mov al, byte ptr [esi + 0x104] */ 2690 /* test LO8(eax), LO8(eax) */ /* 0x31001F54: test al, al */ 2691 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2692 _cf = 0; 2693 _flag_k = FK_NARROW(FK_TEST, 24); 2694 if (TEST_Z(_flag_a, _flag_b)) goto L_31001F81; /* 0x31001F56: je 0x31001f81 */ 2695 L_31001F58: 2696 _flag_a = (uint32_t)(MEM32(0x31057D84)); _flag_b = (uint32_t)(1); 2697 MEM32(0x31057D84) = MEM32(0x31057D84) - 1; /* 0x31001F58: dec dword ptr [0x31057d84] */ 2698 _flag_k = FK_DEC; 2699 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_31001F81; /* 0x31001F5E: jne 0x31001f81 */ 2700 L_31001F60: 2701 ecx = MEM32(0x31057D24); /* 0x31001F60: mov ecx, dword ptr [0x31057d24] */ 2702 /* test ecx, ecx */ /* 0x31001F66: test ecx, ecx */ 2703 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 2704 _cf = 0; 2705 _flag_k = FK_TEST; 2706 if (TEST_Z(_flag_a, _flag_b)) goto L_31001F70; /* 0x31001F68: je 0x31001f70 */ 2707 L_31001F6A: 2708 eax = MEM32(ecx); /* 0x31001F6A: mov eax, dword ptr [ecx] */ 2709 PUSH32(esp, 1); /* 0x31001F6C: push 1 */ 2710 RECOMP_ICALL(MEM32(eax)); /* 0x31001F6E: call dword ptr [eax] */ 2711 RECOMP_FLAGS_IN(); 2712 L_31001F70: 2713 ecx = esi; /* 0x31001F70: mov ecx, esi */ 2714 MEM32(0x31057D24) = 0; /* 0x31001F72: mov dword ptr [0x31057d24], 0 */ 2715 RECOMP_ICALL(0x31002930u); /* 0x31001F7C: call 0x31002930 */ /* not lifted */ 2716 RECOMP_FLAGS_IN(); 2717 L_31001F81: 2718 eax = MEM32(esi + 0x110); /* 0x31001F81: mov eax, dword ptr [esi + 0x110] */ 2719 PUSH32(esp, eax); /* 0x31001F87: push eax */ 2720 RECOMP_ICALL(0x31046858u); /* 0x31001F88: call 0x31046858 */ /* not lifted */ 2721 RECOMP_FLAGS_IN(); 2722 eax = MEM32(esi + 0x108); /* 0x31001F8D: mov eax, dword ptr [esi + 0x108] */ 2723 PUSH32(esp, eax); /* 0x31001F93: push eax */ 2724 RECOMP_ICALL(0x31046858u); /* 0x31001F94: call 0x31046858 */ /* not lifted */ 2725 RECOMP_FLAGS_IN(); 2726 MEM32(esi + 0x108) = 0; /* 0x31001F99: mov dword ptr [esi + 0x108], 0 */ 2727 edi = esi + 0x180; /* 0x31001FA3: lea edi, [esi + 0x180] */ 2728 eax = edi; /* 0x31001FA9: mov eax, edi */ 2729 ecx = MEM32(eax + (-0x58)); /* 0x31001FAB: mov ecx, dword ptr [eax - 0x58] */ 2730 edx = MEM32(ecx + 0x4); /* 0x31001FAE: mov edx, dword ptr [ecx + 4] */ 2731 ecx = MEM32(0x31048120); /* 0x31001FB1: mov ecx, dword ptr [0x31048120] */ 2732 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2733 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2734 esp = esp + 8; /* 0x31001FB7: add esp, 8 */ 2735 _flag_k = FK_ADD; 2736 MEM32(ebp + (-0x14)) = eax; /* 0x31001FBA: mov dword ptr [ebp - 0x14], eax */ 2737 MEM32(edx + eax + (-0x58)) = ecx; /* 0x31001FBD: mov dword ptr [edx + eax - 0x58], ecx */ 2738 edx = MEM32(0x310480C4); /* 0x31001FC1: mov edx, dword ptr [0x310480c4] */ 2739 esi = eax + (-0x54); /* 0x31001FC7: lea esi, [eax - 0x54] */ 2740 MEM32(ebp + (-0x4)) = 1; /* 0x31001FCA: mov dword ptr [ebp - 4], 1 */ 2741 MEM32(ebp + (-0x18)) = esi; /* 0x31001FD1: mov dword ptr [ebp - 0x18], esi */ 2742 MEM32(esi) = edx; /* 0x31001FD4: mov dword ptr [esi], edx */ 2743 SET_LO8(eax, MEM8(esi + 0x48)); /* 0x31001FD6: mov al, byte ptr [esi + 0x48] */ 2744 /* test LO8(eax), LO8(eax) */ /* 0x31001FD9: test al, al */ 2745 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2746 _cf = 0; 2747 _flag_k = FK_NARROW(FK_TEST, 24); 2748 MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x31001FDB: mov byte ptr [ebp - 4], 3 */ 2749 if (TEST_Z(_flag_a, _flag_b)) goto L_31002001; /* 0x31001FDF: je 0x31002001 */ 2750 L_31001FE1: 2751 eax = MEM32(esi + 0x50); /* 0x31001FE1: mov eax, dword ptr [esi + 0x50] */ 2752 /* test eax, eax */ /* 0x31001FE4: test eax, eax */ 2753 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2754 _cf = 0; 2755 _flag_k = FK_TEST; 2756 if (TEST_Z(_flag_a, _flag_b)) goto L_31002001; /* 0x31001FE6: je 0x31002001 */ 2757 L_31001FE8: 2758 PUSH32(esp, eax); /* 0x31001FE8: push eax */ 2759 RECOMP_ICALL(MEM32(0x310481AC)); /* 0x31001FE9: call dword ptr [0x310481ac] */ 2760 RECOMP_FLAGS_IN(); 2761 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2762 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2763 esp = esp + 4; /* 0x31001FEF: add esp, 4 */ 2764 _flag_k = FK_ADD; 2765 /* test eax, eax */ /* 0x31001FF2: test eax, eax */ 2766 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2767 _cf = 0; 2768 _flag_k = FK_TEST; 2769 if (TEST_NZ(_flag_a, _flag_b)) goto L_31002001; /* 0x31001FF4: jne 0x31002001 */ 2770 L_31001FF6: 2771 PUSH32(esp, 2); /* 0x31001FF6: push 2 */ 2772 PUSH32(esp, eax); /* 0x31001FF8: push eax */ 2773 ecx = esi; /* 0x31001FF9: mov ecx, esi */ 2774 RECOMP_ICALL(MEM32(0x31048144)); /* 0x31001FFB: call dword ptr [0x31048144] */ 2775 RECOMP_FLAGS_IN(); 2776 L_31002001: 2777 ecx = MEM32(esi + 0x44); /* 0x31002001: mov ecx, dword ptr [esi + 0x44] */ 2778 /* test ecx, ecx */ /* 0x31002004: test ecx, ecx */ 2779 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 2780 _cf = 0; 2781 _flag_k = FK_TEST; 2782 MEM32(ebp + (-0x10)) = ecx; /* 0x31002006: mov dword ptr [ebp - 0x10], ecx */ 2783 if (TEST_Z(_flag_a, _flag_b)) goto L_3100201F; /* 0x31002009: je 0x3100201f */ 2784 L_3100200B: 2785 PUSH32(esp, 1); /* 0x3100200B: push 1 */ 2786 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x3100200D: call dword ptr [0x310480d4] */ 2787 RECOMP_FLAGS_IN(); 2788 eax = MEM32(ebp + (-0x10)); /* 0x31002013: mov eax, dword ptr [ebp - 0x10] */ 2789 PUSH32(esp, eax); /* 0x31002016: push eax */ 2790 RECOMP_ICALL(0x31046858u); /* 0x31002017: call 0x31046858 */ /* not lifted */ 2791 RECOMP_FLAGS_IN(); 2792 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2793 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2794 esp = esp + 4; /* 0x3100201C: add esp, 4 */ 2795 _flag_k = FK_ADD; 2796 L_3100201F: 2797 ecx = esi + 0x4C; /* 0x3100201F: lea ecx, [esi + 0x4c] */ 2798 RECOMP_ICALL(MEM32(0x310480CC)); /* 0x31002022: call dword ptr [0x310480cc] */ 2799 RECOMP_FLAGS_IN(); 2800 ecx = MEM32(0x310480D0); /* 0x31002028: mov ecx, dword ptr [0x310480d0] */ 2801 MEM32(esi) = ecx; /* 0x3100202E: mov dword ptr [esi], ecx */ 2802 ecx = esi + 0x34; /* 0x31002030: lea ecx, [esi + 0x34] */ 2803 RECOMP_ICALL(MEM32(0x310480CC)); /* 0x31002033: call dword ptr [0x310480cc] */ 2804 RECOMP_FLAGS_IN(); 2805 edx = MEM32(esi + (-0x4)); /* 0x31002039: mov edx, dword ptr [esi - 4] */ 2806 eax = MEM32(edx + 0x4); /* 0x3100203C: mov eax, dword ptr [edx + 4] */ 2807 ecx = MEM32(0x3104812C); /* 0x3100203F: mov ecx, dword ptr [0x3104812c] */ 2808 MEM32(eax + esi + (-0x4)) = ecx; /* 0x31002045: mov dword ptr [eax + esi - 4], ecx */ 2809 edx = MEM32(0x3104810C); /* 0x31002049: mov edx, dword ptr [0x3104810c] */ 2810 ecx = edi; /* 0x3100204F: mov ecx, edi */ 2811 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x31002051: mov dword ptr [ebp - 4], 0xffffffff */ 2812 MEM32(edi) = edx; /* 0x31002058: mov dword ptr [edi], edx */ 2813 RECOMP_ICALL(MEM32(0x310480E0)); /* 0x3100205A: call dword ptr [0x310480e0] */ 2814 RECOMP_FLAGS_IN(); 2815 ecx = MEM32(ebp + (-0xC)); /* 0x31002060: mov ecx, dword ptr [ebp - 0xc] */ 2816 edi = POP32_VAL(esp); /* 0x31002063: pop edi */ 2817 esi = POP32_VAL(esp); /* 0x31002064: pop esi */ 2818 MEM32(FS_BASE + (0)) = ecx; /* 0x31002065: mov dword ptr fs:[0], ecx */ 2819 esp = ebp; /* 0x3100206C: mov esp, ebp */ 2820 ebp = POP32_VAL(esp); /* 0x3100206E: pop ebp */ 2821 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100206F: ret */ 2822 RECOMP_REGS_OUT(); 2823 } 2824 2825 void sub_31002070(void) { 2826 int _fpu_cmp = 0; 2827 uint32_t _cf = 0; 2828 int _df = 1; 2829 uint32_t _flag_k = FK_NONE; 2830 uint32_t _flag_a = 0, _flag_b = 0; 2831 uint32_t _itail_tgt = 0; 2832 RECOMP_REGS_LOCALS 2833 RECOMP_ENTER(0x31002070u); 2834 2835 L_31002070: 2836 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2837 eax = 0; /* 0x31002070: xor eax, eax */ 2838 _cf = 0; 2839 _flag_k = FK_TEST; 2840 MEM8(ecx + 0x4) = (uint8_t)(LO8(eax)); /* 0x31002072: mov byte ptr [ecx + 4], al */ 2841 MEM8(ecx + 0x104) = (uint8_t)(LO8(eax)); /* 0x31002075: mov byte ptr [ecx + 0x104], al */ 2842 MEM32(ecx + 0x108) = eax; /* 0x3100207B: mov dword ptr [ecx + 0x108], eax */ 2843 MEM32(ecx + 0x10C) = eax; /* 0x31002081: mov dword ptr [ecx + 0x10c], eax */ 2844 MEM8(ecx + 0x118) = (uint8_t)(LO8(eax)); /* 0x31002087: mov byte ptr [ecx + 0x118], al */ 2845 MEM32(ecx + 0x11C) = eax; /* 0x3100208D: mov dword ptr [ecx + 0x11c], eax */ 2846 MEM32(ecx + 0x120) = eax; /* 0x31002093: mov dword ptr [ecx + 0x120], eax */ 2847 MEM8(ecx + 0x124) = (uint8_t)(LO8(eax)); /* 0x31002099: mov byte ptr [ecx + 0x124], al */ 2848 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100209F: ret */ 2849 RECOMP_REGS_OUT(); 2850 } 2851 2852 void sub_310020A0(void) { 2853 int _fpu_cmp = 0; 2854 uint32_t _cf = 0; 2855 int _df = 1; 2856 uint32_t _flag_k = FK_NONE; 2857 uint32_t _flag_a = 0, _flag_b = 0; 2858 uint32_t _itail_tgt = 0; 2859 RECOMP_REGS_LOCALS 2860 RECOMP_ENTER(0x310020A0u); 2861 2862 L_310020A0: 2863 PUSH32(esp, ebp); /* 0x310020A0: push ebp */ 2864 ebp = esp; /* 0x310020A1: mov ebp, esp */ 2865 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x50u); 2866 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2867 esp = esp - 0x50u; /* 0x310020A3: sub esp, 0x50 */ 2868 _flag_k = FK_CMP; 2869 edx = ecx; /* 0x310020A6: mov edx, ecx */ 2870 PUSH32(esp, esi); /* 0x310020A8: push esi */ 2871 PUSH32(esp, edi); /* 0x310020A9: push edi */ 2872 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2873 eax = 0; /* 0x310020AA: xor eax, eax */ 2874 _cf = 0; 2875 _flag_k = FK_TEST; 2876 ecx = 8; /* 0x310020AC: mov ecx, 8 */ 2877 edi = ebp + (-0x2C); /* 0x310020B1: lea edi, [ebp - 0x2c] */ 2878 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x310020B4: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; } 2879 MEM32(ebp + (-0xC)) = eax; /* 0x310020B6: mov dword ptr [ebp - 0xc], eax */ 2880 MEM32(ebp + (-0x8)) = eax; /* 0x310020B9: mov dword ptr [ebp - 8], eax */ 2881 MEM32(ebp + (-0x4)) = eax; /* 0x310020BC: mov dword ptr [ebp - 4], eax */ 2882 ecx = 9; /* 0x310020BF: mov ecx, 9 */ 2883 edi = ebp + (-0x50); /* 0x310020C4: lea edi, [ebp - 0x50] */ 2884 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x310020C7: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; } 2885 ecx = 4; /* 0x310020C9: mov ecx, 4 */ 2886 MEM16(ebp + (-0xA)) = (uint16_t)(LO16(ecx)); /* 0x310020CE: mov word ptr [ebp - 0xa], cx */ 2887 MEM16(ebp + (-0x6)) = (uint16_t)(LO16(ecx)); /* 0x310020D2: mov word ptr [ebp - 6], cx */ 2888 MEM16(ebp + (-0x4)) = (uint16_t)(LO16(ecx)); /* 0x310020D6: mov word ptr [ebp - 4], cx */ 2889 ecx = ebp + (-0xC); /* 0x310020DA: lea ecx, [ebp - 0xc] */ 2890 MEM32(ebp + (-0x20)) = ecx; /* 0x310020DD: mov dword ptr [ebp - 0x20], ecx */ 2891 eax = 1; /* 0x310020E0: mov eax, 1 */ 2892 ecx = 0x1000u; /* 0x310020E5: mov ecx, 0x1000 */ 2893 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2894 esi = 0; /* 0x310020EA: xor esi, esi */ 2895 _cf = 0; 2896 _flag_k = FK_TEST; 2897 MEM16(ebp + (-0x48)) = (uint16_t)(LO16(ecx)); /* 0x310020EC: mov word ptr [ebp - 0x48], cx */ 2898 MEM16(ebp + (-0x42)) = (uint16_t)(LO16(ecx)); /* 0x310020F0: mov word ptr [ebp - 0x42], cx */ 2899 MEM16(ebp + (-0x8)) = (uint16_t)(LO16(eax)); /* 0x310020F4: mov word ptr [ebp - 8], ax */ 2900 MEM16(ebp + (-0x2)) = (uint16_t)(LO16(eax)); /* 0x310020F8: mov word ptr [ebp - 2], ax */ 2901 MEM16(ebp + (-0x44)) = (uint16_t)(LO16(eax)); /* 0x310020FC: mov word ptr [ebp - 0x44], ax */ 2902 ecx = ebp + (-0x50); /* 0x31002100: lea ecx, [ebp - 0x50] */ 2903 _flag_a = (uint32_t)((edi | 0xFFFFFFFFu)); _flag_b = (uint32_t)((edi | 0xFFFFFFFFu)); 2904 edi = edi | 0xFFFFFFFFu; /* 0x31002103: or edi, 0xffffffff */ 2905 _cf = 0; 2906 _flag_k = FK_TEST; 2907 eax = ebp + (-0x2C); /* 0x31002106: lea eax, [ebp - 0x2c] */ 2908 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4); 2909 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2910 edx = edx + 4; /* 0x31002109: add edx, 4 */ 2911 _flag_k = FK_ADD; 2912 PUSH32(esp, ecx); /* 0x3100210C: push ecx */ 2913 MEM16(ebp + (-0xC)) = (uint16_t)(LO16(esi)); /* 0x3100210D: mov word ptr [ebp - 0xc], si */ 2914 MEM16(ebp + (-0x2C)) = (uint16_t)(8); /* 0x31002111: mov word ptr [ebp - 0x2c], 8 */ 2915 MEM16(ebp + (-0x2A)) = (uint16_t)(LO16(esi)); /* 0x31002117: mov word ptr [ebp - 0x2a], si */ 2916 MEM16(ebp + (-0x28)) = (uint16_t)(LO16(esi)); /* 0x3100211B: mov word ptr [ebp - 0x28], si */ 2917 MEM16(ebp + (-0x26)) = (uint16_t)(LO16(esi)); /* 0x3100211F: mov word ptr [ebp - 0x26], si */ 2918 MEM16(ebp + (-0x24)) = (uint16_t)(LO16(esi)); /* 0x31002123: mov word ptr [ebp - 0x24], si */ 2919 MEM16(ebp + (-0x22)) = (uint16_t)(2); /* 0x31002127: mov word ptr [ebp - 0x22], 2 */ 2920 MEM32(ebp + (-0x1C)) = 0x31051130u; /* 0x3100212D: mov dword ptr [ebp - 0x1c], 0x31051130 */ 2921 MEM32(ebp + (-0x18)) = esi; /* 0x31002134: mov dword ptr [ebp - 0x18], esi */ 2922 MEM16(ebp + (-0x4C)) = (uint16_t)(LO16(edi)); /* 0x31002137: mov word ptr [ebp - 0x4c], di */ 2923 MEM16(ebp + (-0x4A)) = (uint16_t)(8); /* 0x3100213B: mov word ptr [ebp - 0x4a], 8 */ 2924 MEM32(ebp + (-0x3C)) = eax; /* 0x31002141: mov dword ptr [ebp - 0x3c], eax */ 2925 MEM32(ebp + (-0x38)) = 0x31051120u; /* 0x31002144: mov dword ptr [ebp - 0x38], 0x31051120 */ 2926 MEM32(ebp + (-0x34)) = 0x31051128u; /* 0x3100214B: mov dword ptr [ebp - 0x34], 0x31051128 */ 2927 MEM16(ebp + (-0x30)) = (uint16_t)(LO16(edi)); /* 0x31002152: mov word ptr [ebp - 0x30], di */ 2928 MEM32(ebp + (-0x50)) = edx; /* 0x31002156: mov dword ptr [ebp - 0x50], edx */ 2929 MEM16(ebp + (-0x46)) = (uint16_t)(6); /* 0x31002159: mov word ptr [ebp - 0x46], 6 */ 2930 MEM16(ebp + (-0x40)) = (uint16_t)(2); /* 0x3100215F: mov word ptr [ebp - 0x40], 2 */ 2931 RECOMP_ICALL(0x3101ED81u); /* 0x31002165: call 0x3101ed81 */ /* not lifted */ 2932 RECOMP_FLAGS_IN(); 2933 edi = (int32_t)(int16_t)LO16(eax); /* 0x3100216A: movsx edi, ax */ 2934 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2935 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2936 esp = esp + 4; /* 0x3100216D: add esp, 4 */ 2937 _flag_k = FK_ADD; 2938 /* cmp edi, esi */ /* 0x31002170: cmp edi, esi */ 2939 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 2940 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2941 _flag_k = FK_CMP; 2942 if (CMP_EQ(_flag_a, _flag_b)) goto L_31002189; /* 0x31002172: je 0x31002189 */ 2943 L_31002174: 2944 PUSH32(esp, 0x31051430u); /* 0x31002174: push 0x31051430 */ 2945 RECOMP_ICALL(0x31001380u); /* 0x31002179: call 0x31001380 */ /* not lifted */ 2946 RECOMP_FLAGS_IN(); 2947 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2948 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2949 esp = esp + 4; /* 0x3100217E: add esp, 4 */ 2950 _flag_k = FK_ADD; 2951 eax = edi; /* 0x31002181: mov eax, edi */ 2952 edi = POP32_VAL(esp); /* 0x31002183: pop edi */ 2953 esi = POP32_VAL(esp); /* 0x31002184: pop esi */ 2954 esp = ebp; /* 0x31002185: mov esp, ebp */ 2955 ebp = POP32_VAL(esp); /* 0x31002187: pop ebp */ 2956 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31002188: ret */ 2957 L_31002189: 2958 edx = ebp + (-0x50); /* 0x31002189: lea edx, [ebp - 0x50] */ 2959 PUSH32(esp, edx); /* 0x3100218C: push edx */ 2960 RECOMP_ICALL(0x3101C6B7u); /* 0x3100218D: call 0x3101c6b7 */ /* not lifted */ 2961 RECOMP_FLAGS_IN(); 2962 edi = (int32_t)(int16_t)LO16(eax); /* 0x31002192: movsx edi, ax */ 2963 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2964 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2965 esp = esp + 4; /* 0x31002195: add esp, 4 */ 2966 _flag_k = FK_ADD; 2967 /* cmp edi, esi */ /* 0x31002198: cmp edi, esi */ 2968 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 2969 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2970 _flag_k = FK_CMP; 2971 if (CMP_EQ(_flag_a, _flag_b)) goto L_310021A9; /* 0x3100219A: je 0x310021a9 */ 2972 L_3100219C: 2973 PUSH32(esp, 0x31051400u); /* 0x3100219C: push 0x31051400 */ 2974 RECOMP_ICALL(0x31001380u); /* 0x310021A1: call 0x31001380 */ /* not lifted */ 2975 RECOMP_FLAGS_IN(); 2976 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2977 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2978 esp = esp + 4; /* 0x310021A6: add esp, 4 */ 2979 _flag_k = FK_ADD; 2980 L_310021A9: 2981 eax = edi; /* 0x310021A9: mov eax, edi */ 2982 edi = POP32_VAL(esp); /* 0x310021AB: pop edi */ 2983 esi = POP32_VAL(esp); /* 0x310021AC: pop esi */ 2984 esp = ebp; /* 0x310021AD: mov esp, ebp */ 2985 ebp = POP32_VAL(esp); /* 0x310021AF: pop ebp */ 2986 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310021B0: ret */ 2987 RECOMP_REGS_OUT(); 2988 } 2989 2990 void sub_310021C0(void) { 2991 int _fpu_cmp = 0; 2992 uint32_t _cf = 0; 2993 int _df = 1; 2994 uint32_t _flag_k = FK_NONE; 2995 uint32_t _flag_a = 0, _flag_b = 0; 2996 uint32_t _itail_tgt = 0; 2997 RECOMP_REGS_LOCALS 2998 RECOMP_ENTER(0x310021C0u); 2999 3000 L_310021C0: 3001 PUSH32(esp, 0); /* 0x310021C0: push 0 */ 3002 PUSH32(esp, 0); /* 0x310021C2: push 0 */ 3003 PUSH32(esp, 0); /* 0x310021C4: push 0 */ 3004 PUSH32(esp, 1); /* 0x310021C6: push 1 */ 3005 PUSH32(esp, 0x3E8u); /* 0x310021C8: push 0x3e8 */ 3006 PUSH32(esp, 4); /* 0x310021CD: push 4 */ 3007 PUSH32(esp, 6); /* 0x310021CF: push 6 */ 3008 PUSH32(esp, 0xBB8u); /* 0x310021D1: push 0xbb8 */ 3009 RECOMP_ICALL(0x3101C74Eu); /* 0x310021D6: call 0x3101c74e */ /* not lifted */ 3010 RECOMP_FLAGS_IN(); 3011 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x20u); 3012 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3013 esp = esp + 0x20u; /* 0x310021DB: add esp, 0x20 */ 3014 _flag_k = FK_ADD; 3015 /* test LO16(eax), LO16(eax) */ /* 0x310021DE: test ax, ax */ 3016 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 3017 _cf = 0; 3018 _flag_k = FK_NARROW(FK_TEST, 16); 3019 if (TEST_Z(_flag_a, _flag_b)) goto L_310021F0; /* 0x310021E1: je 0x310021f0 */ 3020 L_310021E3: 3021 PUSH32(esp, 0x31051450u); /* 0x310021E3: push 0x31051450 */ 3022 RECOMP_ICALL(0x31001380u); /* 0x310021E8: call 0x31001380 */ /* not lifted */ 3023 RECOMP_FLAGS_IN(); 3024 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3025 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3026 esp = esp + 4; /* 0x310021ED: add esp, 4 */ 3027 _flag_k = FK_ADD; 3028 L_310021F0: 3029 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3030 eax = 0; /* 0x310021F0: xor eax, eax */ 3031 _cf = 0; 3032 _flag_k = FK_TEST; 3033 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310021F2: ret */ 3034 RECOMP_REGS_OUT(); 3035 } 3036 3037 void sub_31002200(void) { 3038 int _fpu_cmp = 0; 3039 uint32_t _cf = 0; 3040 int _df = 1; 3041 uint32_t _flag_k = FK_NONE; 3042 uint32_t _flag_a = 0, _flag_b = 0; 3043 uint32_t _itail_tgt = 0; 3044 RECOMP_REGS_LOCALS 3045 RECOMP_ENTER(0x31002200u); 3046 3047 L_31002200: 3048 PUSH32(esp, ebp); /* 0x31002200: push ebp */ 3049 ebp = esp; /* 0x31002201: mov ebp, esp */ 3050 PUSH32(esp, ecx); /* 0x31002203: push ecx */ 3051 PUSH32(esp, ebx); /* 0x31002204: push ebx */ 3052 PUSH32(esp, esi); /* 0x31002205: push esi */ 3053 PUSH32(esp, edi); /* 0x31002206: push edi */ 3054 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3055 ebx = 0; /* 0x31002207: xor ebx, ebx */ 3056 _cf = 0; 3057 _flag_k = FK_TEST; 3058 esi = ecx; /* 0x31002209: mov esi, ecx */ 3059 eax = MEM32(esi + 0x110); /* 0x3100220B: mov eax, dword ptr [esi + 0x110] */ 3060 MEM32(eax) = 0x31051138u; /* 0x31002211: mov dword ptr [eax], 0x31051138 */ 3061 ecx = MEM32(esi + 0x110); /* 0x31002217: mov ecx, dword ptr [esi + 0x110] */ 3062 MEM32(ecx + 0x4) = ebx; /* 0x3100221D: mov dword ptr [ecx + 4], ebx */ 3063 edx = MEM32(esi + 0x110); /* 0x31002220: mov edx, dword ptr [esi + 0x110] */ 3064 eax = 0x3Bu; /* 0x31002226: mov eax, 0x3b */ 3065 MEM16(edx + 0x8) = (uint16_t)(LO16(eax)); /* 0x3100222B: mov word ptr [edx + 8], ax */ 3066 ecx = MEM32(esi + 0x110); /* 0x3100222F: mov ecx, dword ptr [esi + 0x110] */ 3067 MEM16(ecx + 0xA) = (uint16_t)(LO16(ebx)); /* 0x31002235: mov word ptr [ecx + 0xa], bx */ 3068 edx = MEM32(esi + 0x110); /* 0x31002239: mov edx, dword ptr [esi + 0x110] */ 3069 MEM32(edx + 0x1C) = 0x31051140u; /* 0x3100223F: mov dword ptr [edx + 0x1c], 0x31051140 */ 3070 ecx = MEM32(esi + 0x110); /* 0x31002246: mov ecx, dword ptr [esi + 0x110] */ 3071 MEM32(ecx + 0x20) = ebx; /* 0x3100224C: mov dword ptr [ecx + 0x20], ebx */ 3072 edx = MEM32(esi + 0x110); /* 0x3100224F: mov edx, dword ptr [esi + 0x110] */ 3073 MEM16(edx + 0x24) = (uint16_t)(LO16(eax)); /* 0x31002255: mov word ptr [edx + 0x24], ax */ 3074 eax = MEM32(esi + 0x110); /* 0x31002259: mov eax, dword ptr [esi + 0x110] */ 3075 MEM16(eax + 0x26) = (uint16_t)(LO16(ebx)); /* 0x3100225F: mov word ptr [eax + 0x26], bx */ 3076 ecx = MEM32(esi + 0x110); /* 0x31002263: mov ecx, dword ptr [esi + 0x110] */ 3077 MEM32(ecx + 0x38) = 0x3105114Cu; /* 0x31002269: mov dword ptr [ecx + 0x38], 0x3105114c */ 3078 edx = MEM32(esi + 0x110); /* 0x31002270: mov edx, dword ptr [esi + 0x110] */ 3079 MEM32(edx + 0x3C) = ebx; /* 0x31002276: mov dword ptr [edx + 0x3c], ebx */ 3080 eax = MEM32(esi + 0x110); /* 0x31002279: mov eax, dword ptr [esi + 0x110] */ 3081 MEM16(eax + 0x40) = (uint16_t)(0x80u); /* 0x3100227F: mov word ptr [eax + 0x40], 0x80 */ 3082 ecx = MEM32(esi + 0x110); /* 0x31002285: mov ecx, dword ptr [esi + 0x110] */ 3083 MEM16(ecx + 0x42) = (uint16_t)(0x2000u); /* 0x3100228B: mov word ptr [ecx + 0x42], 0x2000 */ 3084 edx = MEM32(esi + 0x110); /* 0x31002291: mov edx, dword ptr [esi + 0x110] */ 3085 MEM16(edx + 0x54) = (uint16_t)(LO16(ebx)); /* 0x31002297: mov word ptr [edx + 0x54], bx */ 3086 ecx = MEM32(esi + 0x110); /* 0x3100229B: mov ecx, dword ptr [esi + 0x110] */ 3087 eax = 4; /* 0x310022A1: mov eax, 4 */ 3088 MEM16(ecx + 0x56) = (uint16_t)(LO16(eax)); /* 0x310022A6: mov word ptr [ecx + 0x56], ax */ 3089 edx = MEM32(esi + 0x110); /* 0x310022AA: mov edx, dword ptr [esi + 0x110] */ 3090 ecx = 1; /* 0x310022B0: mov ecx, 1 */ 3091 MEM16(edx + 0x58) = (uint16_t)(LO16(ecx)); /* 0x310022B5: mov word ptr [edx + 0x58], cx */ 3092 edx = MEM32(esi + 0x110); /* 0x310022B9: mov edx, dword ptr [esi + 0x110] */ 3093 MEM16(edx + 0x5A) = (uint16_t)(LO16(eax)); /* 0x310022BF: mov word ptr [edx + 0x5a], ax */ 3094 edx = MEM32(esi + 0x110); /* 0x310022C3: mov edx, dword ptr [esi + 0x110] */ 3095 MEM16(edx + 0x5C) = (uint16_t)(LO16(eax)); /* 0x310022C9: mov word ptr [edx + 0x5c], ax */ 3096 eax = MEM32(esi + 0x110); /* 0x310022CD: mov eax, dword ptr [esi + 0x110] */ 3097 MEM16(eax + 0x5E) = (uint16_t)(LO16(ecx)); /* 0x310022D3: mov word ptr [eax + 0x5e], cx */ 3098 eax = MEM32(esi + 0x110); /* 0x310022D7: mov eax, dword ptr [esi + 0x110] */ 3099 edx = 8; /* 0x310022DD: mov edx, 8 */ 3100 MEM16(eax + 0x60) = (uint16_t)(LO16(edx)); /* 0x310022E2: mov word ptr [eax + 0x60], dx */ 3101 eax = MEM32(esi + 0x110); /* 0x310022E6: mov eax, dword ptr [esi + 0x110] */ 3102 MEM16(eax + 0x62) = (uint16_t)(LO16(ebx)); /* 0x310022EC: mov word ptr [eax + 0x62], bx */ 3103 eax = MEM32(esi + 0x110); /* 0x310022F0: mov eax, dword ptr [esi + 0x110] */ 3104 MEM16(eax + 0x64) = (uint16_t)(LO16(ebx)); /* 0x310022F6: mov word ptr [eax + 0x64], bx */ 3105 eax = MEM32(esi + 0x110); /* 0x310022FA: mov eax, dword ptr [esi + 0x110] */ 3106 MEM16(eax + 0x66) = (uint16_t)(LO16(ebx)); /* 0x31002300: mov word ptr [eax + 0x66], bx */ 3107 eax = MEM32(esi + 0x110); /* 0x31002304: mov eax, dword ptr [esi + 0x110] */ 3108 MEM16(eax + 0x68) = (uint16_t)(LO16(ebx)); /* 0x3100230A: mov word ptr [eax + 0x68], bx */ 3109 eax = MEM32(esi + 0x110); /* 0x3100230E: mov eax, dword ptr [esi + 0x110] */ 3110 MEM16(eax + 0x6A) = (uint16_t)(2); /* 0x31002314: mov word ptr [eax + 0x6a], 2 */ 3111 eax = MEM32(esi + 0x110); /* 0x3100231A: mov eax, dword ptr [esi + 0x110] */ 3112 edi = eax + 0x54; /* 0x31002320: lea edi, [eax + 0x54] */ 3113 MEM32(eax + 0x6C) = edi; /* 0x31002323: mov dword ptr [eax + 0x6c], edi */ 3114 eax = MEM32(esi + 0x110); /* 0x31002326: mov eax, dword ptr [esi + 0x110] */ 3115 MEM32(eax + 0x70) = 0x31051154u; /* 0x3100232C: mov dword ptr [eax + 0x70], 0x31051154 */ 3116 eax = MEM32(esi + 0x110); /* 0x31002333: mov eax, dword ptr [esi + 0x110] */ 3117 MEM32(eax + 0x74) = ebx; /* 0x31002339: mov dword ptr [eax + 0x74], ebx */ 3118 edi = MEM32(esi + 0x110); /* 0x3100233C: mov edi, dword ptr [esi + 0x110] */ 3119 eax = esi + 0x4; /* 0x31002342: lea eax, [esi + 4] */ 3120 MEM32(edi + 0x80) = eax; /* 0x31002345: mov dword ptr [edi + 0x80], eax */ 3121 eax = MEM32(esi + 0x110); /* 0x3100234B: mov eax, dword ptr [esi + 0x110] */ 3122 _flag_a = (uint32_t)((edi | 0xFFFFFFFFu)); _flag_b = (uint32_t)((edi | 0xFFFFFFFFu)); 3123 edi = edi | 0xFFFFFFFFu; /* 0x31002351: or edi, 0xffffffff */ 3124 _cf = 0; 3125 _flag_k = FK_TEST; 3126 MEM16(eax + 0x84) = (uint16_t)(LO16(edi)); /* 0x31002354: mov word ptr [eax + 0x84], di */ 3127 eax = MEM32(esi + 0x110); /* 0x3100235B: mov eax, dword ptr [esi + 0x110] */ 3128 MEM16(eax + 0x86) = (uint16_t)(LO16(edx)); /* 0x31002361: mov word ptr [eax + 0x86], dx */ 3129 edx = MEM32(esi + 0x110); /* 0x31002368: mov edx, dword ptr [esi + 0x110] */ 3130 eax = 0x1000u; /* 0x3100236E: mov eax, 0x1000 */ 3131 MEM16(edx + 0x88) = (uint16_t)(LO16(eax)); /* 0x31002373: mov word ptr [edx + 0x88], ax */ 3132 edx = MEM32(esi + 0x110); /* 0x3100237A: mov edx, dword ptr [esi + 0x110] */ 3133 MEM16(edx + 0x8C) = (uint16_t)(LO16(ecx)); /* 0x31002380: mov word ptr [edx + 0x8c], cx */ 3134 ecx = MEM32(esi + 0x110); /* 0x31002387: mov ecx, dword ptr [esi + 0x110] */ 3135 MEM16(ecx + 0x8E) = (uint16_t)(LO16(eax)); /* 0x3100238D: mov word ptr [ecx + 0x8e], ax */ 3136 eax = MEM32(esi + 0x110); /* 0x31002394: mov eax, dword ptr [esi + 0x110] */ 3137 edx = eax + 0x60; /* 0x3100239A: lea edx, [eax + 0x60] */ 3138 MEM32(eax + 0x94) = edx; /* 0x3100239D: mov dword ptr [eax + 0x94], edx */ 3139 eax = MEM32(esi + 0x110); /* 0x310023A3: mov eax, dword ptr [esi + 0x110] */ 3140 MEM32(eax + 0x98) = 0x31051138u; /* 0x310023A9: mov dword ptr [eax + 0x98], 0x31051138 */ 3141 ecx = MEM32(esi + 0x110); /* 0x310023B3: mov ecx, dword ptr [esi + 0x110] */ 3142 SET_LO8(eax, MEM8(ebp + 0x8)); /* 0x310023B9: mov al, byte ptr [ebp + 8] */ 3143 MEM32(ecx + 0x9C) = 0x3105114Cu; /* 0x310023BC: mov dword ptr [ecx + 0x9c], 0x3105114c */ 3144 edx = MEM32(esi + 0x110); /* 0x310023C6: mov edx, dword ptr [esi + 0x110] */ 3145 /* cmp LO8(eax), LO8(ebx) */ /* 0x310023CC: cmp al, bl */ 3146 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 3147 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3148 _flag_k = FK_NARROW(FK_CMP, 24); 3149 SET_LO8(eax, MEM8(ebp + 0xC)); /* 0x310023CE: mov al, byte ptr [ebp + 0xc] */ 3150 MEM16(edx + 0xA0) = (uint16_t)(LO16(edi)); /* 0x310023D1: mov word ptr [edx + 0xa0], di */ 3151 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100241E; /* 0x310023D8: je 0x3100241e */ 3152 L_310023DA: 3153 /* cmp LO8(eax), LO8(ebx) */ /* 0x310023DA: cmp al, bl */ 3154 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 3155 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3156 _flag_k = FK_NARROW(FK_CMP, 24); 3157 if (CMP_EQ(_flag_a, _flag_b)) goto L_310023FE; /* 0x310023DC: je 0x310023fe */ 3158 L_310023DE: 3159 eax = MEM32(esi + 0x110); /* 0x310023DE: mov eax, dword ptr [esi + 0x110] */ 3160 MEM16(eax + 0x8A) = (uint16_t)(6); /* 0x310023E4: mov word ptr [eax + 0x8a], 6 */ 3161 ecx = MEM32(esi + 0x110); /* 0x310023ED: mov ecx, dword ptr [esi + 0x110] */ 3162 MEM16(ecx + 0x90) = (uint16_t)(2); /* 0x310023F3: mov word ptr [ecx + 0x90], 2 */ 3163 goto L_31002460; /* 0x310023FC: jmp 0x31002460 */ 3164 L_310023FE: 3165 edx = MEM32(esi + 0x110); /* 0x310023FE: mov edx, dword ptr [esi + 0x110] */ 3166 MEM16(edx + 0x8A) = (uint16_t)(0xEu); /* 0x31002404: mov word ptr [edx + 0x8a], 0xe */ 3167 eax = MEM32(esi + 0x110); /* 0x3100240D: mov eax, dword ptr [esi + 0x110] */ 3168 MEM16(eax + 0x90) = (uint16_t)(0xAu); /* 0x31002413: mov word ptr [eax + 0x90], 0xa */ 3169 goto L_31002460; /* 0x3100241C: jmp 0x31002460 */ 3170 L_3100241E: 3171 /* cmp LO8(eax), LO8(ebx) */ /* 0x3100241E: cmp al, bl */ 3172 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 3173 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3174 _flag_k = FK_NARROW(FK_CMP, 24); 3175 if (CMP_EQ(_flag_a, _flag_b)) goto L_31002442; /* 0x31002420: je 0x31002442 */ 3176 L_31002422: 3177 ecx = MEM32(esi + 0x110); /* 0x31002422: mov ecx, dword ptr [esi + 0x110] */ 3178 MEM16(ecx + 0x8A) = (uint16_t)(6); /* 0x31002428: mov word ptr [ecx + 0x8a], 6 */ 3179 edx = MEM32(esi + 0x110); /* 0x31002431: mov edx, dword ptr [esi + 0x110] */ 3180 MEM16(edx + 0x90) = (uint16_t)(2); /* 0x31002437: mov word ptr [edx + 0x90], 2 */ 3181 goto L_31002460; /* 0x31002440: jmp 0x31002460 */ 3182 L_31002442: 3183 eax = MEM32(esi + 0x110); /* 0x31002442: mov eax, dword ptr [esi + 0x110] */ 3184 MEM16(eax + 0x8A) = (uint16_t)(0xC7u); /* 0x31002448: mov word ptr [eax + 0x8a], 0xc7 */ 3185 ecx = MEM32(esi + 0x110); /* 0x31002451: mov ecx, dword ptr [esi + 0x110] */ 3186 MEM16(ecx + 0x90) = (uint16_t)(0x43u); /* 0x31002457: mov word ptr [ecx + 0x90], 0x43 */ 3187 L_31002460: 3188 edx = MEM32(esi + 0x110); /* 0x31002460: mov edx, dword ptr [esi + 0x110] */ 3189 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x80u); 3190 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3191 edx = edx + 0x80u; /* 0x31002466: add edx, 0x80 */ 3192 _flag_k = FK_ADD; 3193 PUSH32(esp, edx); /* 0x3100246C: push edx */ 3194 RECOMP_ICALL(0x31022101u); /* 0x3100246D: call 0x31022101 */ /* not lifted */ 3195 RECOMP_FLAGS_IN(); 3196 eax = (int32_t)(int16_t)LO16(eax); /* 0x31002472: movsx eax, ax */ 3197 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3198 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3199 esp = esp + 4; /* 0x31002475: add esp, 4 */ 3200 _flag_k = FK_ADD; 3201 /* cmp eax, ebx */ /* 0x31002478: cmp eax, ebx */ 3202 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 3203 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3204 _flag_k = FK_CMP; 3205 if (CMP_EQ(_flag_a, _flag_b)) goto L_310024A8; /* 0x3100247A: je 0x310024a8 */ 3206 L_3100247C: 3207 /* cmp eax, 0xCu */ /* 0x3100247C: cmp eax, 0xc */ 3208 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu); 3209 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3210 _flag_k = FK_CMP; 3211 if (CMP_NE(_flag_a, _flag_b)) goto L_310024A8; /* 0x3100247F: jne 0x310024a8 */ 3212 L_31002481: 3213 /* cmp MEM8(ebp + 0x8), LO8(ebx) */ /* 0x31002481: cmp byte ptr [ebp + 8], bl */ 3214 _flag_a = (uint32_t)(MEM8(ebp + 0x8)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 3215 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3216 _flag_k = FK_NARROW(FK_CMP, 24); 3217 if (CMP_NE(_flag_a, _flag_b)) goto L_310024A8; /* 0x31002484: jne 0x310024a8 */ 3218 L_31002486: 3219 ecx = esi; /* 0x31002486: mov ecx, esi */ 3220 RECOMP_ICALL(0x310020A0u); /* 0x31002488: call 0x310020a0 */ /* not lifted */ 3221 RECOMP_FLAGS_IN(); 3222 /* cmp eax, ebx */ /* 0x3100248D: cmp eax, ebx */ 3223 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 3224 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3225 _flag_k = FK_CMP; 3226 if (CMP_NE(_flag_a, _flag_b)) goto L_310024A8; /* 0x3100248F: jne 0x310024a8 */ 3227 L_31002491: 3228 eax = MEM32(esi + 0x110); /* 0x31002491: mov eax, dword ptr [esi + 0x110] */ 3229 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x80u); 3230 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3231 eax = eax + 0x80u; /* 0x31002497: add eax, 0x80 */ 3232 _flag_k = FK_ADD; 3233 PUSH32(esp, eax); /* 0x3100249C: push eax */ 3234 RECOMP_ICALL(0x31022101u); /* 0x3100249D: call 0x31022101 */ /* not lifted */ 3235 RECOMP_FLAGS_IN(); 3236 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3237 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3238 esp = esp + 4; /* 0x310024A2: add esp, 4 */ 3239 _flag_k = FK_ADD; 3240 eax = (int32_t)(int16_t)LO16(eax); /* 0x310024A5: movsx eax, ax */ 3241 L_310024A8: 3242 /* cmp eax, ebx */ /* 0x310024A8: cmp eax, ebx */ 3243 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 3244 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3245 _flag_k = FK_CMP; 3246 MEM8(ebp + (-0x1)) = (uint8_t)(LO8(ebx)); /* 0x310024AA: mov byte ptr [ebp - 1], bl */ 3247 if (CMP_NE(_flag_a, _flag_b)) goto L_31002722; /* 0x310024AD: jne 0x31002722 */ 3248 L_310024B3: 3249 /* cmp MEM8(ebp + 0x8), LO8(ebx) */ /* 0x310024B3: cmp byte ptr [ebp + 8], bl */ 3250 _flag_a = (uint32_t)(MEM8(ebp + 0x8)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 3251 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3252 _flag_k = FK_NARROW(FK_CMP, 24); 3253 if (CMP_NE(_flag_a, _flag_b)) goto L_3100272E; /* 0x310024B6: jne 0x3100272e */ 3254 L_310024BC: 3255 /* cmp MEM8(ebp + 0xC), 1 */ /* 0x310024BC: cmp byte ptr [ebp + 0xc], 1 */ 3256 _flag_a = (uint32_t)(MEM8(ebp + 0xC)) << 24; _flag_b = (uint32_t)(1) << 24; 3257 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3258 _flag_k = FK_NARROW(FK_CMP, 24); 3259 if (CMP_NE(_flag_a, _flag_b)) goto L_3100272E; /* 0x310024C0: jne 0x3100272e */ 3260 L_310024C6: 3261 ecx = MEM32(esi + 0x110); /* 0x310024C6: mov ecx, dword ptr [esi + 0x110] */ 3262 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3263 edx = 0; /* 0x310024CC: xor edx, edx */ 3264 _cf = 0; 3265 _flag_k = FK_TEST; 3266 SET_LO16(edx, MEM16(ecx + 0xA0)); /* 0x310024CE: mov dx, word ptr [ecx + 0xa0] */ 3267 PUSH32(esp, 3); /* 0x310024D5: push 3 */ 3268 PUSH32(esp, edx); /* 0x310024D7: push edx */ 3269 RECOMP_ICALL(0x31020232u); /* 0x310024D8: call 0x31020232 */ /* not lifted */ 3270 RECOMP_FLAGS_IN(); 3271 edi = MEM32(0x310481F8); /* 0x310024DD: mov edi, dword ptr [0x310481f8] */ 3272 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3273 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3274 esp = esp + 8; /* 0x310024E3: add esp, 8 */ 3275 _flag_k = FK_ADD; 3276 /* cmp eax, ebx */ /* 0x310024E6: cmp eax, ebx */ 3277 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 3278 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3279 _flag_k = FK_CMP; 3280 MEM32(ebp + 0x8) = eax; /* 0x310024E8: mov dword ptr [ebp + 8], eax */ 3281 if (CMP_LE(_flag_a, _flag_b)) goto L_31002591; /* 0x310024EB: jle 0x31002591 */ 3282 L_310024F1: 3283 eax = MEM32(esi + 0x110); /* 0x310024F1: mov eax, dword ptr [esi + 0x110] */ 3284 ecx = MEM32(eax + 0x80); /* 0x310024F7: mov ecx, dword ptr [eax + 0x80] */ 3285 edx = MEM32(0x310481FC); /* 0x310024FD: mov edx, dword ptr [0x310481fc] */ 3286 PUSH32(esp, ecx); /* 0x31002503: push ecx */ 3287 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x40u); 3288 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3289 edx = edx + 0x40u; /* 0x31002504: add edx, 0x40 */ 3290 _flag_k = FK_ADD; 3291 PUSH32(esp, 0x31051538u); /* 0x31002507: push 0x31051538 */ 3292 PUSH32(esp, edx); /* 0x3100250C: push edx */ 3293 RECOMP_ICALL(edi); /* 0x3100250D: call edi */ 3294 RECOMP_FLAGS_IN(); 3295 eax = MEM32(ebp + 0x8); /* 0x3100250F: mov eax, dword ptr [ebp + 8] */ 3296 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 3297 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3298 esp = esp + 0xCu; /* 0x31002512: add esp, 0xc */ 3299 _flag_k = FK_ADD; 3300 /* test LO8(eax), 0x40u */ /* 0x31002515: test al, 0x40 */ 3301 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 3302 _cf = 0; 3303 _flag_k = FK_NARROW(FK_TEST, 24); 3304 if (TEST_Z(_flag_a, _flag_b)) goto L_310025D9; /* 0x31002517: je 0x310025d9 */ 3305 L_3100251D: 3306 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFBFu); 3307 eax = eax & 0xFFFFFFBFu; /* 0x3100251D: and eax, 0xffffffbf */ 3308 _cf = 0; 3309 _flag_k = FK_TEST; 3310 PUSH32(esp, eax); /* 0x31002520: push eax */ 3311 eax = MEM32(esi + 0x110); /* 0x31002521: mov eax, dword ptr [esi + 0x110] */ 3312 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3313 ecx = 0; /* 0x31002527: xor ecx, ecx */ 3314 _cf = 0; 3315 _flag_k = FK_TEST; 3316 SET_LO16(ecx, MEM16(eax + 0xA0)); /* 0x31002529: mov cx, word ptr [eax + 0xa0] */ 3317 PUSH32(esp, ecx); /* 0x31002530: push ecx */ 3318 RECOMP_ICALL(0x31020C38u); /* 0x31002531: call 0x31020c38 */ /* not lifted */ 3319 RECOMP_FLAGS_IN(); 3320 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3321 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3322 esp = esp + 8; /* 0x31002536: add esp, 8 */ 3323 _flag_k = FK_ADD; 3324 /* test LO16(eax), LO16(eax) */ /* 0x31002539: test ax, ax */ 3325 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 3326 _cf = 0; 3327 _flag_k = FK_NARROW(FK_TEST, 16); 3328 if (TEST_Z(_flag_a, _flag_b)) goto L_3100258B; /* 0x3100253C: je 0x3100258b */ 3329 L_3100253E: 3330 RECOMP_ICALL(0x310114B2u); /* 0x3100253E: call 0x310114b2 */ /* not lifted */ 3331 RECOMP_FLAGS_IN(); 3332 PUSH32(esp, eax); /* 0x31002543: push eax */ 3333 RECOMP_ICALL(0x31011463u); /* 0x31002544: call 0x31011463 */ /* not lifted */ 3334 RECOMP_FLAGS_IN(); 3335 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3336 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3337 esp = esp + 4; /* 0x31002549: add esp, 4 */ 3338 _flag_k = FK_ADD; 3339 /* test eax, eax */ /* 0x3100254C: 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_NZ(_flag_a, _flag_b)) goto L_31002555; /* 0x3100254E: jne 0x31002555 */ 3344 L_31002550: 3345 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 3346 eax = eax | 0xFFFFFFFFu; /* 0x31002550: or eax, 0xffffffff */ 3347 _cf = 0; 3348 _flag_k = FK_TEST; 3349 goto L_31002567; /* 0x31002553: jmp 0x31002567 */ 3350 L_31002555: 3351 RECOMP_ICALL(0x310114B2u); /* 0x31002555: call 0x310114b2 */ /* not lifted */ 3352 RECOMP_FLAGS_IN(); 3353 PUSH32(esp, eax); /* 0x3100255A: push eax */ 3354 RECOMP_ICALL(0x31011463u); /* 0x3100255B: call 0x31011463 */ /* not lifted */ 3355 RECOMP_FLAGS_IN(); 3356 SET_LO16(eax, MEM16(eax + 0x78)); /* 0x31002560: mov ax, word ptr [eax + 0x78] */ 3357 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3358 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3359 esp = esp + 4; /* 0x31002564: add esp, 4 */ 3360 _flag_k = FK_ADD; 3361 L_31002567: 3362 edx = MEM32(esi + 0x110); /* 0x31002567: mov edx, dword ptr [esi + 0x110] */ 3363 ecx = MEM32(edx + 0x80); /* 0x3100256D: mov ecx, dword ptr [edx + 0x80] */ 3364 edx = (int32_t)(int16_t)LO16(eax); /* 0x31002573: movsx edx, ax */ 3365 eax = MEM32(0x310481FC); /* 0x31002576: mov eax, dword ptr [0x310481fc] */ 3366 PUSH32(esp, ecx); /* 0x3100257B: push ecx */ 3367 PUSH32(esp, edx); /* 0x3100257C: push edx */ 3368 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x40u); 3369 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3370 eax = eax + 0x40u; /* 0x3100257D: add eax, 0x40 */ 3371 _flag_k = FK_ADD; 3372 PUSH32(esp, 0x31051508u); /* 0x31002580: push 0x31051508 */ 3373 PUSH32(esp, eax); /* 0x31002585: push eax */ 3374 RECOMP_ICALL(edi); /* 0x31002586: call edi */ 3375 RECOMP_FLAGS_IN(); 3376 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 3377 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3378 esp = esp + 0x10u; /* 0x31002588: add esp, 0x10 */ 3379 _flag_k = FK_ADD; 3380 L_3100258B: 3381 MEM8(ebp + (-0x1)) = (uint8_t)(1); /* 0x3100258B: mov byte ptr [ebp - 1], 1 */ 3382 goto L_310025D9; /* 0x3100258F: jmp 0x310025d9 */ 3383 L_31002591: 3384 RECOMP_ICALL(0x310114B2u); /* 0x31002591: call 0x310114b2 */ /* not lifted */ 3385 RECOMP_FLAGS_IN(); 3386 PUSH32(esp, eax); /* 0x31002596: push eax */ 3387 RECOMP_ICALL(0x31011463u); /* 0x31002597: call 0x31011463 */ /* not lifted */ 3388 RECOMP_FLAGS_IN(); 3389 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3390 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3391 esp = esp + 4; /* 0x3100259C: add esp, 4 */ 3392 _flag_k = FK_ADD; 3393 /* test eax, eax */ /* 0x3100259F: test eax, eax */ 3394 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3395 _cf = 0; 3396 _flag_k = FK_TEST; 3397 if (TEST_NZ(_flag_a, _flag_b)) goto L_310025A8; /* 0x310025A1: jne 0x310025a8 */ 3398 L_310025A3: 3399 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 3400 eax = eax | 0xFFFFFFFFu; /* 0x310025A3: or eax, 0xffffffff */ 3401 _cf = 0; 3402 _flag_k = FK_TEST; 3403 goto L_310025BA; /* 0x310025A6: jmp 0x310025ba */ 3404 L_310025A8: 3405 RECOMP_ICALL(0x310114B2u); /* 0x310025A8: call 0x310114b2 */ /* not lifted */ 3406 RECOMP_FLAGS_IN(); 3407 PUSH32(esp, eax); /* 0x310025AD: push eax */ 3408 RECOMP_ICALL(0x31011463u); /* 0x310025AE: call 0x31011463 */ /* not lifted */ 3409 RECOMP_FLAGS_IN(); 3410 SET_LO16(eax, MEM16(eax + 0x78)); /* 0x310025B3: mov ax, word ptr [eax + 0x78] */ 3411 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3412 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3413 esp = esp + 4; /* 0x310025B7: add esp, 4 */ 3414 _flag_k = FK_ADD; 3415 L_310025BA: 3416 edx = MEM32(esi + 0x110); /* 0x310025BA: mov edx, dword ptr [esi + 0x110] */ 3417 ecx = (int32_t)(int16_t)LO16(eax); /* 0x310025C0: movsx ecx, ax */ 3418 eax = MEM32(edx + 0x80); /* 0x310025C3: mov eax, dword ptr [edx + 0x80] */ 3419 PUSH32(esp, ecx); /* 0x310025C9: push ecx */ 3420 PUSH32(esp, eax); /* 0x310025CA: push eax */ 3421 PUSH32(esp, 0x310514D8u); /* 0x310025CB: push 0x310514d8 */ 3422 RECOMP_ICALL(MEM32(0x31048188)); /* 0x310025D0: call dword ptr [0x31048188] */ 3423 RECOMP_FLAGS_IN(); 3424 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 3425 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3426 esp = esp + 0xCu; /* 0x310025D6: add esp, 0xc */ 3427 _flag_k = FK_ADD; 3428 L_310025D9: 3429 ecx = MEM32(esi + 0x110); /* 0x310025D9: mov ecx, dword ptr [esi + 0x110] */ 3430 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3431 edx = 0; /* 0x310025DF: xor edx, edx */ 3432 _cf = 0; 3433 _flag_k = FK_TEST; 3434 SET_LO16(edx, MEM16(ecx + 0xA0)); /* 0x310025E1: mov dx, word ptr [ecx + 0xa0] */ 3435 _flag_a = (uint32_t)(LO16(edx)) << 16; _flag_b = (uint32_t)(1) << 16; 3436 SET_LO16(edx, LO16(edx) + 1); /* 0x310025E8: inc dx */ 3437 _flag_k = FK_NARROW(FK_INC, 16); 3438 PUSH32(esp, 3); /* 0x310025EA: push 3 */ 3439 PUSH32(esp, edx); /* 0x310025EC: push edx */ 3440 RECOMP_ICALL(0x31020232u); /* 0x310025ED: call 0x31020232 */ /* not lifted */ 3441 RECOMP_FLAGS_IN(); 3442 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3443 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3444 esp = esp + 8; /* 0x310025F2: add esp, 8 */ 3445 _flag_k = FK_ADD; 3446 /* cmp eax, ebx */ /* 0x310025F5: cmp eax, ebx */ 3447 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 3448 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3449 _flag_k = FK_CMP; 3450 MEM32(ebp + 0x8) = eax; /* 0x310025F7: mov dword ptr [ebp + 8], eax */ 3451 if (CMP_LE(_flag_a, _flag_b)) goto L_310026A2; /* 0x310025FA: jle 0x310026a2 */ 3452 L_31002600: 3453 eax = MEM32(esi + 0x110); /* 0x31002600: mov eax, dword ptr [esi + 0x110] */ 3454 ecx = MEM32(eax + 0x80); /* 0x31002606: mov ecx, dword ptr [eax + 0x80] */ 3455 edx = MEM32(0x310481FC); /* 0x3100260C: mov edx, dword ptr [0x310481fc] */ 3456 PUSH32(esp, ecx); /* 0x31002612: push ecx */ 3457 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x40u); 3458 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3459 edx = edx + 0x40u; /* 0x31002613: add edx, 0x40 */ 3460 _flag_k = FK_ADD; 3461 PUSH32(esp, 0x310514A8u); /* 0x31002616: push 0x310514a8 */ 3462 PUSH32(esp, edx); /* 0x3100261B: push edx */ 3463 RECOMP_ICALL(edi); /* 0x3100261C: call edi */ 3464 RECOMP_FLAGS_IN(); 3465 eax = MEM32(ebp + 0x8); /* 0x3100261E: mov eax, dword ptr [ebp + 8] */ 3466 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 3467 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3468 esp = esp + 0xCu; /* 0x31002621: add esp, 0xc */ 3469 _flag_k = FK_ADD; 3470 /* test LO8(eax), 0x40u */ /* 0x31002624: test al, 0x40 */ 3471 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 3472 _cf = 0; 3473 _flag_k = FK_NARROW(FK_TEST, 24); 3474 if (TEST_Z(_flag_a, _flag_b)) goto L_310026F0; /* 0x31002626: je 0x310026f0 */ 3475 L_3100262C: 3476 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFBFu); 3477 eax = eax & 0xFFFFFFBFu; /* 0x3100262C: and eax, 0xffffffbf */ 3478 _cf = 0; 3479 _flag_k = FK_TEST; 3480 PUSH32(esp, eax); /* 0x3100262F: push eax */ 3481 eax = MEM32(esi + 0x110); /* 0x31002630: mov eax, dword ptr [esi + 0x110] */ 3482 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3483 ecx = 0; /* 0x31002636: xor ecx, ecx */ 3484 _cf = 0; 3485 _flag_k = FK_TEST; 3486 SET_LO16(ecx, MEM16(eax + 0xA0)); /* 0x31002638: mov cx, word ptr [eax + 0xa0] */ 3487 _flag_a = (uint32_t)(LO16(ecx)) << 16; _flag_b = (uint32_t)(1) << 16; 3488 SET_LO16(ecx, LO16(ecx) + 1); /* 0x3100263F: inc cx */ 3489 _flag_k = FK_NARROW(FK_INC, 16); 3490 PUSH32(esp, ecx); /* 0x31002641: push ecx */ 3491 RECOMP_ICALL(0x31020C38u); /* 0x31002642: call 0x31020c38 */ /* not lifted */ 3492 RECOMP_FLAGS_IN(); 3493 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3494 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3495 esp = esp + 8; /* 0x31002647: add esp, 8 */ 3496 _flag_k = FK_ADD; 3497 /* test LO16(eax), LO16(eax) */ /* 0x3100264A: test ax, ax */ 3498 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 3499 _cf = 0; 3500 _flag_k = FK_NARROW(FK_TEST, 16); 3501 if (TEST_Z(_flag_a, _flag_b)) goto L_310026F5; /* 0x3100264D: je 0x310026f5 */ 3502 L_31002653: 3503 RECOMP_ICALL(0x310114B2u); /* 0x31002653: call 0x310114b2 */ /* not lifted */ 3504 RECOMP_FLAGS_IN(); 3505 PUSH32(esp, eax); /* 0x31002658: push eax */ 3506 RECOMP_ICALL(0x31011463u); /* 0x31002659: call 0x31011463 */ /* not lifted */ 3507 RECOMP_FLAGS_IN(); 3508 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3509 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3510 esp = esp + 4; /* 0x3100265E: add esp, 4 */ 3511 _flag_k = FK_ADD; 3512 /* test eax, eax */ /* 0x31002661: test eax, eax */ 3513 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3514 _cf = 0; 3515 _flag_k = FK_TEST; 3516 if (TEST_NZ(_flag_a, _flag_b)) goto L_3100266A; /* 0x31002663: jne 0x3100266a */ 3517 L_31002665: 3518 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 3519 eax = eax | 0xFFFFFFFFu; /* 0x31002665: or eax, 0xffffffff */ 3520 _cf = 0; 3521 _flag_k = FK_TEST; 3522 goto L_3100267C; /* 0x31002668: jmp 0x3100267c */ 3523 L_3100266A: 3524 RECOMP_ICALL(0x310114B2u); /* 0x3100266A: call 0x310114b2 */ /* not lifted */ 3525 RECOMP_FLAGS_IN(); 3526 PUSH32(esp, eax); /* 0x3100266F: push eax */ 3527 RECOMP_ICALL(0x31011463u); /* 0x31002670: call 0x31011463 */ /* not lifted */ 3528 RECOMP_FLAGS_IN(); 3529 SET_LO16(eax, MEM16(eax + 0x78)); /* 0x31002675: mov ax, word ptr [eax + 0x78] */ 3530 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3531 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3532 esp = esp + 4; /* 0x31002679: add esp, 4 */ 3533 _flag_k = FK_ADD; 3534 L_3100267C: 3535 edx = MEM32(esi + 0x110); /* 0x3100267C: mov edx, dword ptr [esi + 0x110] */ 3536 ecx = MEM32(edx + 0x80); /* 0x31002682: mov ecx, dword ptr [edx + 0x80] */ 3537 edx = (int32_t)(int16_t)LO16(eax); /* 0x31002688: movsx edx, ax */ 3538 eax = MEM32(0x310481FC); /* 0x3100268B: mov eax, dword ptr [0x310481fc] */ 3539 PUSH32(esp, ecx); /* 0x31002690: push ecx */ 3540 PUSH32(esp, edx); /* 0x31002691: push edx */ 3541 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x40u); 3542 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3543 eax = eax + 0x40u; /* 0x31002692: add eax, 0x40 */ 3544 _flag_k = FK_ADD; 3545 PUSH32(esp, 0x31051478u); /* 0x31002695: push 0x31051478 */ 3546 PUSH32(esp, eax); /* 0x3100269A: push eax */ 3547 RECOMP_ICALL(edi); /* 0x3100269B: call edi */ 3548 RECOMP_FLAGS_IN(); 3549 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 3550 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3551 esp = esp + 0x10u; /* 0x3100269D: add esp, 0x10 */ 3552 _flag_k = FK_ADD; 3553 goto L_310026F5; /* 0x310026A0: jmp 0x310026f5 */ 3554 L_310026A2: 3555 RECOMP_ICALL(0x310114B2u); /* 0x310026A2: call 0x310114b2 */ /* not lifted */ 3556 RECOMP_FLAGS_IN(); 3557 PUSH32(esp, eax); /* 0x310026A7: push eax */ 3558 RECOMP_ICALL(0x31011463u); /* 0x310026A8: call 0x31011463 */ /* not lifted */ 3559 RECOMP_FLAGS_IN(); 3560 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3561 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3562 esp = esp + 4; /* 0x310026AD: add esp, 4 */ 3563 _flag_k = FK_ADD; 3564 /* test eax, eax */ /* 0x310026B0: test eax, eax */ 3565 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3566 _cf = 0; 3567 _flag_k = FK_TEST; 3568 if (TEST_NZ(_flag_a, _flag_b)) goto L_310026B9; /* 0x310026B2: jne 0x310026b9 */ 3569 L_310026B4: 3570 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 3571 eax = eax | 0xFFFFFFFFu; /* 0x310026B4: or eax, 0xffffffff */ 3572 _cf = 0; 3573 _flag_k = FK_TEST; 3574 goto L_310026CB; /* 0x310026B7: jmp 0x310026cb */ 3575 L_310026B9: 3576 RECOMP_ICALL(0x310114B2u); /* 0x310026B9: call 0x310114b2 */ /* not lifted */ 3577 RECOMP_FLAGS_IN(); 3578 PUSH32(esp, eax); /* 0x310026BE: push eax */ 3579 RECOMP_ICALL(0x31011463u); /* 0x310026BF: call 0x31011463 */ /* not lifted */ 3580 RECOMP_FLAGS_IN(); 3581 SET_LO16(eax, MEM16(eax + 0x78)); /* 0x310026C4: mov ax, word ptr [eax + 0x78] */ 3582 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3583 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3584 esp = esp + 4; /* 0x310026C8: add esp, 4 */ 3585 _flag_k = FK_ADD; 3586 L_310026CB: 3587 edx = MEM32(esi + 0x110); /* 0x310026CB: mov edx, dword ptr [esi + 0x110] */ 3588 ecx = (int32_t)(int16_t)LO16(eax); /* 0x310026D1: movsx ecx, ax */ 3589 eax = MEM32(edx + 0x80); /* 0x310026D4: mov eax, dword ptr [edx + 0x80] */ 3590 PUSH32(esp, ecx); /* 0x310026DA: push ecx */ 3591 ecx = MEM32(0x310481FC); /* 0x310026DB: mov ecx, dword ptr [0x310481fc] */ 3592 PUSH32(esp, eax); /* 0x310026E1: push eax */ 3593 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x40u); 3594 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3595 ecx = ecx + 0x40u; /* 0x310026E2: add ecx, 0x40 */ 3596 _flag_k = FK_ADD; 3597 PUSH32(esp, 0x310514D8u); /* 0x310026E5: push 0x310514d8 */ 3598 PUSH32(esp, ecx); /* 0x310026EA: push ecx */ 3599 RECOMP_ICALL(edi); /* 0x310026EB: call edi */ 3600 RECOMP_FLAGS_IN(); 3601 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 3602 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3603 esp = esp + 0x10u; /* 0x310026ED: add esp, 0x10 */ 3604 _flag_k = FK_ADD; 3605 L_310026F0: 3606 /* cmp MEM8(ebp + (-0x1)), LO8(ebx) */ /* 0x310026F0: cmp byte ptr [ebp - 1], bl */ 3607 _flag_a = (uint32_t)(MEM8(ebp + (-0x1))) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 3608 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3609 _flag_k = FK_NARROW(FK_CMP, 24); 3610 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100272E; /* 0x310026F3: je 0x3100272e */ 3611 L_310026F5: 3612 edx = MEM32(esi + 0x110); /* 0x310026F5: mov edx, dword ptr [esi + 0x110] */ 3613 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x80u); 3614 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3615 edx = edx + 0x80u; /* 0x310026FB: add edx, 0x80 */ 3616 _flag_k = FK_ADD; 3617 PUSH32(esp, edx); /* 0x31002701: push edx */ 3618 RECOMP_ICALL(0x3101C6B7u); /* 0x31002702: call 0x3101c6b7 */ /* not lifted */ 3619 RECOMP_FLAGS_IN(); 3620 eax = MEM32(esi + 0x110); /* 0x31002707: mov eax, dword ptr [esi + 0x110] */ 3621 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x80u); 3622 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3623 eax = eax + 0x80u; /* 0x3100270D: add eax, 0x80 */ 3624 _flag_k = FK_ADD; 3625 PUSH32(esp, eax); /* 0x31002712: push eax */ 3626 RECOMP_ICALL(0x31022101u); /* 0x31002713: call 0x31022101 */ /* not lifted */ 3627 RECOMP_FLAGS_IN(); 3628 eax = (int32_t)(int16_t)LO16(eax); /* 0x31002718: movsx eax, ax */ 3629 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3630 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3631 esp = esp + 8; /* 0x3100271B: add esp, 8 */ 3632 _flag_k = FK_ADD; 3633 /* cmp eax, ebx */ /* 0x3100271E: cmp eax, ebx */ 3634 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 3635 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3636 _flag_k = FK_CMP; 3637 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100272E; /* 0x31002720: je 0x3100272e */ 3638 L_31002722: 3639 edi = POP32_VAL(esp); /* 0x31002722: pop edi */ 3640 esi = POP32_VAL(esp); /* 0x31002723: pop esi */ 3641 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 3642 eax = eax | 0xFFFFFFFFu; /* 0x31002724: or eax, 0xffffffff */ 3643 _cf = 0; 3644 _flag_k = FK_TEST; 3645 ebx = POP32_VAL(esp); /* 0x31002727: pop ebx */ 3646 esp = ebp; /* 0x31002728: mov esp, ebp */ 3647 ebp = POP32_VAL(esp); /* 0x3100272A: pop ebp */ 3648 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3100272B: ret 8 */ 3649 L_3100272E: 3650 ecx = esi; /* 0x3100272E: mov ecx, esi */ 3651 RECOMP_ICALL(0x31002780u); /* 0x31002730: call 0x31002780 */ /* not lifted */ 3652 RECOMP_FLAGS_IN(); 3653 edi = POP32_VAL(esp); /* 0x31002735: pop edi */ 3654 esi = POP32_VAL(esp); /* 0x31002736: pop esi */ 3655 ebx = POP32_VAL(esp); /* 0x31002737: pop ebx */ 3656 esp = ebp; /* 0x31002738: mov esp, ebp */ 3657 ebp = POP32_VAL(esp); /* 0x3100273A: pop ebp */ 3658 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3100273B: ret 8 */ 3659 RECOMP_REGS_OUT(); 3660 } 3661 3662 void sub_31002740(void) { 3663 int _fpu_cmp = 0; 3664 uint32_t _cf = 0; 3665 int _df = 1; 3666 uint32_t _flag_k = FK_NONE; 3667 uint32_t _flag_a = 0, _flag_b = 0; 3668 uint32_t _itail_tgt = 0; 3669 RECOMP_REGS_LOCALS 3670 RECOMP_ENTER(0x31002740u); 3671 3672 L_31002740: 3673 PUSH32(esp, esi); /* 0x31002740: push esi */ 3674 esi = ecx; /* 0x31002741: mov esi, ecx */ 3675 PUSH32(esp, edi); /* 0x31002743: push edi */ 3676 edi = MEM32(esi + 0x120); /* 0x31002744: mov edi, dword ptr [esi + 0x120] */ 3677 /* test edi, edi */ /* 0x3100274A: test edi, edi */ 3678 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 3679 _cf = 0; 3680 _flag_k = FK_TEST; 3681 if (TEST_LE(_flag_a, _flag_b)) goto L_31002758; /* 0x3100274C: jle 0x31002758 */ 3682 L_3100274E: 3683 ecx = esi; /* 0x3100274E: mov ecx, esi */ 3684 RECOMP_ICALL(0x310029E0u); /* 0x31002750: call 0x310029e0 */ /* not lifted */ 3685 RECOMP_FLAGS_IN(); 3686 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1); 3687 edi = edi - 1; /* 0x31002755: dec edi */ 3688 _flag_k = FK_DEC; 3689 RECOMP_BACKEDGE(); 3690 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_3100274E; /* 0x31002756: jne 0x3100274e */ 3691 L_31002758: 3692 eax = MEM32(esi + 0x110); /* 0x31002758: mov eax, dword ptr [esi + 0x110] */ 3693 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x80u); 3694 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3695 eax = eax + 0x80u; /* 0x3100275E: add eax, 0x80 */ 3696 _flag_k = FK_ADD; 3697 PUSH32(esp, eax); /* 0x31002763: push eax */ 3698 RECOMP_ICALL(0x3101C6B7u); /* 0x31002764: call 0x3101c6b7 */ /* not lifted */ 3699 RECOMP_FLAGS_IN(); 3700 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3701 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3702 esp = esp + 4; /* 0x31002769: add esp, 4 */ 3703 _flag_k = FK_ADD; 3704 edi = POP32_VAL(esp); /* 0x3100276C: pop edi */ 3705 eax = (int32_t)(int16_t)LO16(eax); /* 0x3100276D: movsx eax, ax */ 3706 esi = POP32_VAL(esp); /* 0x31002770: pop esi */ 3707 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31002771: ret */ 3708 RECOMP_REGS_OUT(); 3709 } 3710 3711 void sub_31002780(void) { 3712 int _fpu_cmp = 0; 3713 uint32_t _cf = 0; 3714 int _df = 1; 3715 uint32_t _flag_k = FK_NONE; 3716 uint32_t _flag_a = 0, _flag_b = 0; 3717 uint32_t _itail_tgt = 0; 3718 RECOMP_REGS_LOCALS 3719 RECOMP_ENTER(0x31002780u); 3720 3721 L_31002780: 3722 PUSH32(esp, ebp); /* 0x31002780: push ebp */ 3723 ebp = esp; /* 0x31002781: mov ebp, esp */ 3724 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3725 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3726 esp = esp - 8; /* 0x31002783: sub esp, 8 */ 3727 _flag_k = FK_CMP; 3728 PUSH32(esp, ebx); /* 0x31002786: push ebx */ 3729 PUSH32(esp, esi); /* 0x31002787: push esi */ 3730 esi = ecx; /* 0x31002788: mov esi, ecx */ 3731 eax = MEM32(esi + 0x110); /* 0x3100278A: mov eax, dword ptr [esi + 0x110] */ 3732 SET_LO16(ecx, MEM16(eax + 0x8A)); /* 0x31002790: mov cx, word ptr [eax + 0x8a] */ 3733 SET_LO16(edx, MEM16(eax + 0x90)); /* 0x31002797: mov dx, word ptr [eax + 0x90] */ 3734 SET_LO16(eax, MEM16(eax + 0xA0)); /* 0x3100279E: mov ax, word ptr [eax + 0xa0] */ 3735 PUSH32(esp, edi); /* 0x310027A5: push edi */ 3736 PUSH32(esp, 0); /* 0x310027A6: push 0 */ 3737 PUSH32(esp, 0); /* 0x310027A8: push 0 */ 3738 MEM16(ebp + (-0x4)) = (uint16_t)(LO16(ecx)); /* 0x310027AA: mov word ptr [ebp - 4], cx */ 3739 MEM16(ebp + (-0x8)) = (uint16_t)(LO16(edx)); /* 0x310027AE: mov word ptr [ebp - 8], dx */ 3740 PUSH32(esp, eax); /* 0x310027B2: push eax */ 3741 RECOMP_ICALL(0x31021D02u); /* 0x310027B3: call 0x31021d02 */ /* not lifted */ 3742 RECOMP_FLAGS_IN(); 3743 ecx = MEM32(esi + 0x110); /* 0x310027B8: mov ecx, dword ptr [esi + 0x110] */ 3744 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3745 edx = 0; /* 0x310027BE: xor edx, edx */ 3746 _cf = 0; 3747 _flag_k = FK_TEST; 3748 SET_LO16(edx, MEM16(ecx + 0xA0)); /* 0x310027C0: mov dx, word ptr [ecx + 0xa0] */ 3749 PUSH32(esp, 4); /* 0x310027C7: push 4 */ 3750 PUSH32(esp, 0); /* 0x310027C9: push 0 */ 3751 PUSH32(esp, 0); /* 0x310027CB: push 0 */ 3752 edi = eax; /* 0x310027CD: mov edi, eax */ 3753 PUSH32(esp, edx); /* 0x310027CF: push edx */ 3754 RECOMP_ICALL(0x31022050u); /* 0x310027D0: call 0x31022050 */ /* not lifted */ 3755 RECOMP_FLAGS_IN(); 3756 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu); 3757 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3758 esp = esp + 0x1Cu; /* 0x310027D5: add esp, 0x1c */ 3759 _flag_k = FK_ADD; 3760 /* test edi, edi */ /* 0x310027D8: test edi, edi */ 3761 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 3762 _cf = 0; 3763 _flag_k = FK_TEST; 3764 ebx = eax; /* 0x310027DA: mov ebx, eax */ 3765 if (TEST_Z(_flag_a, _flag_b)) goto L_310027E6; /* 0x310027DC: je 0x310027e6 */ 3766 L_310027DE: 3767 /* test ebx, ebx */ /* 0x310027DE: test ebx, ebx */ 3768 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 3769 _cf = 0; 3770 _flag_k = FK_TEST; 3771 if (TEST_NZ(_flag_a, _flag_b)) goto L_3100291C; /* 0x310027E0: jne 0x3100291c */ 3772 L_310027E6: 3773 eax = MEM32(esi + 0x110); /* 0x310027E6: mov eax, dword ptr [esi + 0x110] */ 3774 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x80u); 3775 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3776 eax = eax + 0x80u; /* 0x310027EC: add eax, 0x80 */ 3777 _flag_k = FK_ADD; 3778 PUSH32(esp, eax); /* 0x310027F1: push eax */ 3779 RECOMP_ICALL(0x3101C6B7u); /* 0x310027F2: call 0x3101c6b7 */ /* not lifted */ 3780 RECOMP_FLAGS_IN(); 3781 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3782 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3783 esp = esp + 4; /* 0x310027F7: add esp, 4 */ 3784 _flag_k = FK_ADD; 3785 /* test LO16(eax), LO16(eax) */ /* 0x310027FA: test ax, ax */ 3786 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 3787 _cf = 0; 3788 _flag_k = FK_NARROW(FK_TEST, 16); 3789 if (TEST_Z(_flag_a, _flag_b)) goto L_3100280C; /* 0x310027FD: je 0x3100280c */ 3790 L_310027FF: 3791 PUSH32(esp, 0x31051644u); /* 0x310027FF: push 0x31051644 */ 3792 RECOMP_ICALL(0x31001380u); /* 0x31002804: call 0x31001380 */ /* not lifted */ 3793 RECOMP_FLAGS_IN(); 3794 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3795 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3796 esp = esp + 4; /* 0x31002809: add esp, 4 */ 3797 _flag_k = FK_ADD; 3798 L_3100280C: 3799 /* test edi, edi */ /* 0x3100280C: test edi, edi */ 3800 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 3801 _cf = 0; 3802 _flag_k = FK_TEST; 3803 if (TEST_NZ(_flag_a, _flag_b)) goto L_31002837; /* 0x3100280E: jne 0x31002837 */ 3804 L_31002810: 3805 ecx = MEM32(esi + 0x110); /* 0x31002810: mov ecx, dword ptr [esi + 0x110] */ 3806 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x80u); 3807 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3808 ecx = ecx + 0x80u; /* 0x31002816: add ecx, 0x80 */ 3809 _flag_k = FK_ADD; 3810 PUSH32(esp, ecx); /* 0x3100281C: push ecx */ 3811 RECOMP_ICALL(0x3101CBE7u); /* 0x3100281D: call 0x3101cbe7 */ /* not lifted */ 3812 RECOMP_FLAGS_IN(); 3813 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3814 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3815 esp = esp + 4; /* 0x31002822: add esp, 4 */ 3816 _flag_k = FK_ADD; 3817 /* test LO16(eax), LO16(eax) */ /* 0x31002825: test ax, ax */ 3818 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 3819 _cf = 0; 3820 _flag_k = FK_NARROW(FK_TEST, 16); 3821 if (TEST_Z(_flag_a, _flag_b)) goto L_31002837; /* 0x31002828: je 0x31002837 */ 3822 L_3100282A: 3823 PUSH32(esp, 0x31051620u); /* 0x3100282A: push 0x31051620 */ 3824 RECOMP_ICALL(0x31001380u); /* 0x3100282F: call 0x31001380 */ /* not lifted */ 3825 RECOMP_FLAGS_IN(); 3826 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3827 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3828 esp = esp + 4; /* 0x31002834: add esp, 4 */ 3829 _flag_k = FK_ADD; 3830 L_31002837: 3831 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3832 eax = 0; /* 0x31002837: xor eax, eax */ 3833 _cf = 0; 3834 _flag_k = FK_TEST; 3835 /* cmp ebx, eax */ /* 0x31002839: cmp ebx, eax */ 3836 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 3837 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3838 _flag_k = FK_CMP; 3839 if (CMP_NE(_flag_a, _flag_b)) goto L_310028F6; /* 0x3100283B: jne 0x310028f6 */ 3840 L_31002841: 3841 edx = MEM32(esi + 0x110); /* 0x31002841: mov edx, dword ptr [esi + 0x110] */ 3842 MEM16(edx + 0x90) = (uint16_t)(LO16(eax)); /* 0x31002847: mov word ptr [edx + 0x90], ax */ 3843 ecx = MEM32(esi + 0x110); /* 0x3100284E: mov ecx, dword ptr [esi + 0x110] */ 3844 MEM16(ecx + 0x8A) = (uint16_t)(LO16(eax)); /* 0x31002854: mov word ptr [ecx + 0x8a], ax */ 3845 edx = MEM32(esi + 0x110); /* 0x3100285B: mov edx, dword ptr [esi + 0x110] */ 3846 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x80u); 3847 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3848 edx = edx + 0x80u; /* 0x31002861: add edx, 0x80 */ 3849 _flag_k = FK_ADD; 3850 PUSH32(esp, edx); /* 0x31002867: push edx */ 3851 RECOMP_ICALL(0x31022101u); /* 0x31002868: call 0x31022101 */ /* not lifted */ 3852 RECOMP_FLAGS_IN(); 3853 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3854 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3855 esp = esp + 4; /* 0x3100286D: add esp, 4 */ 3856 _flag_k = FK_ADD; 3857 /* test LO16(eax), LO16(eax) */ /* 0x31002870: test ax, ax */ 3858 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 3859 _cf = 0; 3860 _flag_k = FK_NARROW(FK_TEST, 16); 3861 if (TEST_Z(_flag_a, _flag_b)) goto L_31002882; /* 0x31002873: je 0x31002882 */ 3862 L_31002875: 3863 PUSH32(esp, 0x310515ECu); /* 0x31002875: push 0x310515ec */ 3864 RECOMP_ICALL(0x31001380u); /* 0x3100287A: call 0x31001380 */ /* not lifted */ 3865 RECOMP_FLAGS_IN(); 3866 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3867 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3868 esp = esp + 4; /* 0x3100287F: add esp, 4 */ 3869 _flag_k = FK_ADD; 3870 L_31002882: 3871 eax = MEM32(esi + 0x110); /* 0x31002882: mov eax, dword ptr [esi + 0x110] */ 3872 PUSH32(esp, 3); /* 0x31002888: push 3 */ 3873 PUSH32(esp, eax); /* 0x3100288A: push eax */ 3874 SET_LO16(eax, MEM16(eax + 0xA0)); /* 0x3100288B: mov ax, word ptr [eax + 0xa0] */ 3875 PUSH32(esp, eax); /* 0x31002892: push eax */ 3876 RECOMP_ICALL(0x31022075u); /* 0x31002893: call 0x31022075 */ /* not lifted */ 3877 RECOMP_FLAGS_IN(); 3878 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 3879 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3880 esp = esp + 0xCu; /* 0x31002898: add esp, 0xc */ 3881 _flag_k = FK_ADD; 3882 /* test LO16(eax), LO16(eax) */ /* 0x3100289B: test ax, ax */ 3883 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 3884 _cf = 0; 3885 _flag_k = FK_NARROW(FK_TEST, 16); 3886 if (TEST_Z(_flag_a, _flag_b)) goto L_310028AD; /* 0x3100289E: je 0x310028ad */ 3887 L_310028A0: 3888 PUSH32(esp, 0x310515D0u); /* 0x310028A0: push 0x310515d0 */ 3889 RECOMP_ICALL(0x31001380u); /* 0x310028A5: call 0x31001380 */ /* not lifted */ 3890 RECOMP_FLAGS_IN(); 3891 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3892 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3893 esp = esp + 4; /* 0x310028AA: add esp, 4 */ 3894 _flag_k = FK_ADD; 3895 L_310028AD: 3896 ecx = MEM32(esi + 0x110); /* 0x310028AD: mov ecx, dword ptr [esi + 0x110] */ 3897 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x80u); 3898 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3899 ecx = ecx + 0x80u; /* 0x310028B3: add ecx, 0x80 */ 3900 _flag_k = FK_ADD; 3901 PUSH32(esp, ecx); /* 0x310028B9: push ecx */ 3902 RECOMP_ICALL(0x3101C6B7u); /* 0x310028BA: call 0x3101c6b7 */ /* not lifted */ 3903 RECOMP_FLAGS_IN(); 3904 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3905 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3906 esp = esp + 4; /* 0x310028BF: add esp, 4 */ 3907 _flag_k = FK_ADD; 3908 /* test LO16(eax), LO16(eax) */ /* 0x310028C2: test ax, ax */ 3909 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 3910 _cf = 0; 3911 _flag_k = FK_NARROW(FK_TEST, 16); 3912 if (TEST_Z(_flag_a, _flag_b)) goto L_310028D4; /* 0x310028C5: je 0x310028d4 */ 3913 L_310028C7: 3914 PUSH32(esp, 0x310515A4u); /* 0x310028C7: push 0x310515a4 */ 3915 RECOMP_ICALL(0x31001380u); /* 0x310028CC: call 0x31001380 */ /* not lifted */ 3916 RECOMP_FLAGS_IN(); 3917 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3918 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3919 esp = esp + 4; /* 0x310028D1: add esp, 4 */ 3920 _flag_k = FK_ADD; 3921 L_310028D4: 3922 edx = MEM32(esi + 0x110); /* 0x310028D4: mov edx, dword ptr [esi + 0x110] */ 3923 SET_LO16(eax, MEM16(ebp + (-0x4))); /* 0x310028DA: mov ax, word ptr [ebp - 4] */ 3924 MEM16(edx + 0x8A) = (uint16_t)(LO16(eax)); /* 0x310028DE: mov word ptr [edx + 0x8a], ax */ 3925 ecx = MEM32(esi + 0x110); /* 0x310028E5: mov ecx, dword ptr [esi + 0x110] */ 3926 SET_LO16(edx, MEM16(ebp + (-0x8))); /* 0x310028EB: mov dx, word ptr [ebp - 8] */ 3927 MEM16(ecx + 0x90) = (uint16_t)(LO16(edx)); /* 0x310028EF: mov word ptr [ecx + 0x90], dx */ 3928 L_310028F6: 3929 eax = MEM32(esi + 0x110); /* 0x310028F6: mov eax, dword ptr [esi + 0x110] */ 3930 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x80u); 3931 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3932 eax = eax + 0x80u; /* 0x310028FC: add eax, 0x80 */ 3933 _flag_k = FK_ADD; 3934 PUSH32(esp, eax); /* 0x31002901: push eax */ 3935 RECOMP_ICALL(0x31022101u); /* 0x31002902: call 0x31022101 */ /* not lifted */ 3936 RECOMP_FLAGS_IN(); 3937 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3938 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3939 esp = esp + 4; /* 0x31002907: add esp, 4 */ 3940 _flag_k = FK_ADD; 3941 /* test LO16(eax), LO16(eax) */ /* 0x3100290A: test ax, ax */ 3942 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 3943 _cf = 0; 3944 _flag_k = FK_NARROW(FK_TEST, 16); 3945 if (TEST_Z(_flag_a, _flag_b)) goto L_3100291C; /* 0x3100290D: je 0x3100291c */ 3946 L_3100290F: 3947 PUSH32(esp, 0x31051568u); /* 0x3100290F: push 0x31051568 */ 3948 RECOMP_ICALL(0x31001380u); /* 0x31002914: call 0x31001380 */ /* not lifted */ 3949 RECOMP_FLAGS_IN(); 3950 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3951 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3952 esp = esp + 4; /* 0x31002919: add esp, 4 */ 3953 _flag_k = FK_ADD; 3954 L_3100291C: 3955 edi = POP32_VAL(esp); /* 0x3100291C: pop edi */ 3956 esi = POP32_VAL(esp); /* 0x3100291D: pop esi */ 3957 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3958 eax = 0; /* 0x3100291E: xor eax, eax */ 3959 _cf = 0; 3960 _flag_k = FK_TEST; 3961 ebx = POP32_VAL(esp); /* 0x31002920: pop ebx */ 3962 esp = ebp; /* 0x31002921: mov esp, ebp */ 3963 ebp = POP32_VAL(esp); /* 0x31002923: pop ebp */ 3964 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31002924: ret */ 3965 RECOMP_REGS_OUT(); 3966 } 3967 3968 void sub_31002930(void) { 3969 int _fpu_cmp = 0; 3970 uint32_t _cf = 0; 3971 int _df = 1; 3972 uint32_t _flag_k = FK_NONE; 3973 uint32_t _flag_a = 0, _flag_b = 0; 3974 uint32_t _itail_tgt = 0; 3975 RECOMP_REGS_LOCALS 3976 RECOMP_ENTER(0x31002930u); 3977 3978 L_31002930: 3979 PUSH32(esp, esi); /* 0x31002930: push esi */ 3980 RECOMP_ICALL(0x31023710u); /* 0x31002931: call 0x31023710 */ /* not lifted */ 3981 RECOMP_FLAGS_IN(); 3982 esi = (int32_t)(int16_t)LO16(eax); /* 0x31002936: movsx esi, ax */ 3983 /* test esi, esi */ /* 0x31002939: test esi, esi */ 3984 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 3985 _cf = 0; 3986 _flag_k = FK_TEST; 3987 if (TEST_Z(_flag_a, _flag_b)) goto L_3100294A; /* 0x3100293B: je 0x3100294a */ 3988 L_3100293D: 3989 PUSH32(esp, 0x3105167Cu); /* 0x3100293D: push 0x3105167c */ 3990 RECOMP_ICALL(0x31001380u); /* 0x31002942: call 0x31001380 */ /* not lifted */ 3991 RECOMP_FLAGS_IN(); 3992 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3993 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3994 esp = esp + 4; /* 0x31002947: add esp, 4 */ 3995 _flag_k = FK_ADD; 3996 L_3100294A: 3997 eax = esi; /* 0x3100294A: mov eax, esi */ 3998 esi = POP32_VAL(esp); /* 0x3100294C: pop esi */ 3999 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100294D: ret */ 4000 RECOMP_REGS_OUT(); 4001 } 4002 4003 void sub_31002950(void) { 4004 int _fpu_cmp = 0; 4005 uint32_t _cf = 0; 4006 int _df = 1; 4007 uint32_t _flag_k = FK_NONE; 4008 uint32_t _flag_a = 0, _flag_b = 0; 4009 uint32_t _itail_tgt = 0; 4010 RECOMP_REGS_LOCALS 4011 RECOMP_ENTER(0x31002950u); 4012 4013 L_31002950: 4014 PUSH32(esp, 0xFFFFFFFFu); /* 0x31002950: push -1 */ 4015 RECOMP_ICALL(0x31012E8Eu); /* 0x31002952: call 0x31012e8e */ /* not lifted */ 4016 RECOMP_FLAGS_IN(); 4017 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4018 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4019 esp = esp + 4; /* 0x31002957: add esp, 4 */ 4020 _flag_k = FK_ADD; 4021 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4022 eax = 0; /* 0x3100295A: xor eax, eax */ 4023 _cf = 0; 4024 _flag_k = FK_TEST; 4025 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100295C: ret */ 4026 RECOMP_REGS_OUT(); 4027 } 4028 4029 void sub_31002960(void) { 4030 int _fpu_cmp = 0; 4031 uint32_t _cf = 0; 4032 int _df = 1; 4033 uint32_t _flag_k = FK_NONE; 4034 uint32_t _flag_a = 0, _flag_b = 0; 4035 uint32_t _itail_tgt = 0; 4036 RECOMP_REGS_LOCALS 4037 RECOMP_ENTER(0x31002960u); 4038 4039 L_31002960: 4040 PUSH32(esp, ebp); /* 0x31002960: push ebp */ 4041 ebp = esp; /* 0x31002961: mov ebp, esp */ 4042 PUSH32(esp, ebx); /* 0x31002963: push ebx */ 4043 PUSH32(esp, esi); /* 0x31002964: push esi */ 4044 PUSH32(esp, edi); /* 0x31002965: push edi */ 4045 esi = ecx; /* 0x31002966: mov esi, ecx */ 4046 ecx = MEM32(0x31057D24); /* 0x31002968: mov ecx, dword ptr [0x31057d24] */ 4047 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4048 ebx = 0; /* 0x3100296E: xor ebx, ebx */ 4049 _cf = 0; 4050 _flag_k = FK_TEST; 4051 PUSH32(esp, ebx); /* 0x31002970: push ebx */ 4052 RECOMP_ICALL(MEM32(0x310482A4)); /* 0x31002971: call dword ptr [0x310482a4] */ 4053 RECOMP_FLAGS_IN(); 4054 edx = MEM32(0x31057D2C); /* 0x31002977: mov edx, dword ptr [0x31057d2c] */ 4055 edi = MEM32(ebp + 0x8); /* 0x3100297D: mov edi, dword ptr [ebp + 8] */ 4056 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1); 4057 edx = edx + 1; /* 0x31002980: inc edx */ 4058 _flag_k = FK_INC; 4059 MEM32(0x31057D2C) = edx; /* 0x31002981: mov dword ptr [0x31057d2c], edx */ 4060 _flag_a = (uint32_t)(MEM32(esi + 0x120)); _flag_b = (uint32_t)(1); 4061 MEM32(esi + 0x120) = MEM32(esi + 0x120) + 1; /* 0x31002987: inc dword ptr [esi + 0x120] */ 4062 _flag_k = FK_INC; 4063 /* cmp edi, MEM32(0x31057D80) */ /* 0x3100298D: cmp edi, dword ptr [0x31057d80] */ 4064 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(0x31057D80)); 4065 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4066 _flag_k = FK_CMP; 4067 if (CMP_LE(_flag_a, _flag_b)) goto L_310029C0; /* 0x31002993: jle 0x310029c0 */ 4068 L_31002995: 4069 eax = edi; /* 0x31002995: mov eax, edi */ 4070 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 4071 eax = eax - 1; /* 0x31002997: dec eax */ 4072 _flag_k = FK_DEC; 4073 if (/* dec result */ CMP_EQ(_flag_a, _flag_b)) goto L_310029A6; /* 0x31002998: je 0x310029a6 */ 4074 L_3100299A: 4075 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 4076 eax = eax - 1; /* 0x3100299A: dec eax */ 4077 _flag_k = FK_DEC; 4078 if (/* dec result */ CMP_EQ(_flag_a, _flag_b)) goto L_310029A2; /* 0x3100299B: je 0x310029a2 */ 4079 L_3100299D: 4080 _flag_a = (uint32_t)((ebx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ebx | 0xFFFFFFFFu)); 4081 ebx = ebx | 0xFFFFFFFFu; /* 0x3100299D: or ebx, 0xffffffff */ 4082 _cf = 0; 4083 _flag_k = FK_TEST; 4084 goto L_310029B2; /* 0x310029A0: jmp 0x310029b2 */ 4085 L_310029A2: 4086 PUSH32(esp, 3); /* 0x310029A2: push 3 */ 4087 goto L_310029A8; /* 0x310029A4: jmp 0x310029a8 */ 4088 L_310029A6: 4089 PUSH32(esp, 0xBu); /* 0x310029A6: push 0xb */ 4090 L_310029A8: 4091 RECOMP_ICALL(0x3101793Bu); /* 0x310029A8: call 0x3101793b */ /* not lifted */ 4092 RECOMP_FLAGS_IN(); 4093 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4094 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4095 esp = esp + 4; /* 0x310029AD: add esp, 4 */ 4096 _flag_k = FK_ADD; 4097 ebx = eax; /* 0x310029B0: mov ebx, eax */ 4098 L_310029B2: 4099 /* cmp edi, MEM32(0x31057D80) */ /* 0x310029B2: cmp edi, dword ptr [0x31057d80] */ 4100 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(0x31057D80)); 4101 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4102 _flag_k = FK_CMP; 4103 if (CMP_LE(_flag_a, _flag_b)) goto L_310029C0; /* 0x310029B8: jle 0x310029c0 */ 4104 L_310029BA: 4105 MEM32(0x31057D80) = edi; /* 0x310029BA: mov dword ptr [0x31057d80], edi */ 4106 L_310029C0: 4107 /* cmp edi, MEM32(esi + 0x11C) */ /* 0x310029C0: cmp edi, dword ptr [esi + 0x11c] */ 4108 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x11C)); 4109 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4110 _flag_k = FK_CMP; 4111 if (CMP_LE(_flag_a, _flag_b)) goto L_310029CE; /* 0x310029C6: jle 0x310029ce */ 4112 L_310029C8: 4113 MEM32(esi + 0x11C) = edi; /* 0x310029C8: mov dword ptr [esi + 0x11c], edi */ 4114 L_310029CE: 4115 edi = POP32_VAL(esp); /* 0x310029CE: pop edi */ 4116 esi = POP32_VAL(esp); /* 0x310029CF: pop esi */ 4117 eax = (int32_t)(int16_t)LO16(ebx); /* 0x310029D0: movsx eax, bx */ 4118 ebx = POP32_VAL(esp); /* 0x310029D3: pop ebx */ 4119 ebp = POP32_VAL(esp); /* 0x310029D4: pop ebp */ 4120 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x310029D5: ret 4 */ 4121 RECOMP_REGS_OUT(); 4122 } 4123 4124 void sub_310029E0(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(0x310029E0u); 4133 4134 L_310029E0: 4135 edx = MEM32(0x31057D2C); /* 0x310029E0: mov edx, dword ptr [0x31057d2c] */ 4136 PUSH32(esp, esi); /* 0x310029E6: push esi */ 4137 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4138 esi = 0; /* 0x310029E7: xor esi, esi */ 4139 _cf = 0; 4140 _flag_k = FK_TEST; 4141 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1); 4142 edx = edx - 1; /* 0x310029E9: dec edx */ 4143 _flag_k = FK_DEC; 4144 MEM32(0x31057D2C) = edx; /* 0x310029EA: mov dword ptr [0x31057d2c], edx */ 4145 _flag_a = (uint32_t)(MEM32(ecx + 0x120)); _flag_b = (uint32_t)(1); 4146 MEM32(ecx + 0x120) = MEM32(ecx + 0x120) - 1; /* 0x310029F0: dec dword ptr [ecx + 0x120] */ 4147 _flag_k = FK_DEC; 4148 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_310029FE; /* 0x310029F6: jne 0x310029fe */ 4149 L_310029F8: 4150 MEM32(ecx + 0x11C) = esi; /* 0x310029F8: mov dword ptr [ecx + 0x11c], esi */ 4151 L_310029FE: 4152 eax = MEM32(0x31057D2C); /* 0x310029FE: mov eax, dword ptr [0x31057d2c] */ 4153 /* test eax, eax */ /* 0x31002A03: test eax, eax */ 4154 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4155 _cf = 0; 4156 _flag_k = FK_TEST; 4157 if (TEST_NZ(_flag_a, _flag_b)) goto L_31002A1D; /* 0x31002A05: jne 0x31002a1d */ 4158 L_31002A07: 4159 PUSH32(esp, 0); /* 0x31002A07: push 0 */ 4160 RECOMP_ICALL(0x3101793Bu); /* 0x31002A09: call 0x3101793b */ /* not lifted */ 4161 RECOMP_FLAGS_IN(); 4162 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4163 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4164 esp = esp + 4; /* 0x31002A0E: add esp, 4 */ 4165 _flag_k = FK_ADD; 4166 MEM32(0x31057D80) = 0; /* 0x31002A11: mov dword ptr [0x31057d80], 0 */ 4167 esi = eax; /* 0x31002A1B: mov esi, eax */ 4168 L_31002A1D: 4169 ecx = MEM32(0x31057D24); /* 0x31002A1D: mov ecx, dword ptr [0x31057d24] */ 4170 RECOMP_ICALL(MEM32(0x31048294)); /* 0x31002A23: call dword ptr [0x31048294] */ 4171 RECOMP_FLAGS_IN(); 4172 eax = (int32_t)(int16_t)LO16(esi); /* 0x31002A29: movsx eax, si */ 4173 esi = POP32_VAL(esp); /* 0x31002A2C: pop esi */ 4174 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31002A2D: ret */ 4175 RECOMP_REGS_OUT(); 4176 } 4177 4178 void sub_31002A30(void) { 4179 int _fpu_cmp = 0; 4180 uint32_t _cf = 0; 4181 int _df = 1; 4182 uint32_t _flag_k = FK_NONE; 4183 uint32_t _flag_a = 0, _flag_b = 0; 4184 uint32_t _itail_tgt = 0; 4185 RECOMP_REGS_LOCALS 4186 RECOMP_ENTER(0x31002A30u); 4187 4188 L_31002A30: 4189 PUSH32(esp, ebp); /* 0x31002A30: push ebp */ 4190 ebp = esp; /* 0x31002A31: mov ebp, esp */ 4191 PUSH32(esp, 0xFFFFFFFFu); /* 0x31002A33: push -1 */ 4192 PUSH32(esp, 0x31046D49u); /* 0x31002A35: push 0x31046d49 */ 4193 eax = MEM32(FS_BASE + (0)); /* 0x31002A3A: mov eax, dword ptr fs:[0] */ 4194 PUSH32(esp, eax); /* 0x31002A40: push eax */ 4195 MEM32(FS_BASE + (0)) = esp; /* 0x31002A41: mov dword ptr fs:[0], esp */ 4196 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x9Cu); 4197 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4198 esp = esp - 0x9Cu; /* 0x31002A48: sub esp, 0x9c */ 4199 _flag_k = FK_CMP; 4200 PUSH32(esp, ebx); /* 0x31002A4E: push ebx */ 4201 PUSH32(esp, esi); /* 0x31002A4F: push esi */ 4202 PUSH32(esp, edi); /* 0x31002A50: push edi */ 4203 edi = MEM32(0x31048320); /* 0x31002A51: mov edi, dword ptr [0x31048320] */ 4204 PUSH32(esp, 8); /* 0x31002A57: push 8 */ 4205 eax = ebp + (-0x18); /* 0x31002A59: lea eax, [ebp - 0x18] */ 4206 esi = ecx; /* 0x31002A5C: mov esi, ecx */ 4207 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4208 ebx = 0; /* 0x31002A5E: xor ebx, ebx */ 4209 _cf = 0; 4210 _flag_k = FK_TEST; 4211 PUSH32(esp, eax); /* 0x31002A60: push eax */ 4212 ecx = ebp + (-0x64); /* 0x31002A61: lea ecx, [ebp - 0x64] */ 4213 MEM32(ebp + (-0x10)) = ebx; /* 0x31002A64: mov dword ptr [ebp - 0x10], ebx */ 4214 RECOMP_ICALL(edi); /* 0x31002A67: call edi */ 4215 RECOMP_FLAGS_IN(); 4216 ecx = MEM32(ebp + 0x8); /* 0x31002A69: mov ecx, dword ptr [ebp + 8] */ 4217 MEM32(ebp + (-0x4)) = ebx; /* 0x31002A6C: mov dword ptr [ebp - 4], ebx */ 4218 ebx = MEM32(0x3104831C); /* 0x31002A6F: mov ebx, dword ptr [0x3104831c] */ 4219 PUSH32(esp, ecx); /* 0x31002A75: push ecx */ 4220 ecx = ebp + (-0x64); /* 0x31002A76: lea ecx, [ebp - 0x64] */ 4221 RECOMP_ICALL(ebx); /* 0x31002A79: call ebx */ 4222 RECOMP_FLAGS_IN(); 4223 edx = MEM32(ebp + 0xC); /* 0x31002A7B: mov edx, dword ptr [ebp + 0xc] */ 4224 PUSH32(esp, edx); /* 0x31002A7E: push edx */ 4225 ecx = eax; /* 0x31002A7F: mov ecx, eax */ 4226 RECOMP_ICALL(ebx); /* 0x31002A81: call ebx */ 4227 RECOMP_FLAGS_IN(); 4228 PUSH32(esp, 8); /* 0x31002A83: push 8 */ 4229 eax = ebp + (-0x20); /* 0x31002A85: lea eax, [ebp - 0x20] */ 4230 PUSH32(esp, eax); /* 0x31002A88: push eax */ 4231 ecx = ebp + (-0xA8); /* 0x31002A89: lea ecx, [ebp - 0xa8] */ 4232 RECOMP_ICALL(edi); /* 0x31002A8F: call edi */ 4233 RECOMP_FLAGS_IN(); 4234 ecx = MEM32(ebp + (-0x28)); /* 0x31002A91: mov ecx, dword ptr [ebp - 0x28] */ 4235 MEM32(ebp + (-0x68)) = ecx; /* 0x31002A94: mov dword ptr [ebp - 0x68], ecx */ 4236 ecx = MEM32(esi + 0x110); /* 0x31002A97: mov ecx, dword ptr [esi + 0x110] */ 4237 edx = ebp + (-0x20); /* 0x31002A9D: lea edx, [ebp - 0x20] */ 4238 PUSH32(esp, edx); /* 0x31002AA0: push edx */ 4239 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4240 edx = 0; /* 0x31002AA1: xor edx, edx */ 4241 _cf = 0; 4242 _flag_k = FK_TEST; 4243 SET_LO16(edx, MEM16(ecx + 0xA0)); /* 0x31002AA3: mov dx, word ptr [ecx + 0xa0] */ 4244 _flag_a = (uint32_t)(LO16(edx)) << 16; _flag_b = (uint32_t)(1) << 16; 4245 SET_LO16(edx, LO16(edx) + 1); /* 0x31002AAA: inc dx */ 4246 _flag_k = FK_NARROW(FK_INC, 16); 4247 eax = ebp + (-0x18); /* 0x31002AAC: lea eax, [ebp - 0x18] */ 4248 PUSH32(esp, eax); /* 0x31002AAF: push eax */ 4249 PUSH32(esp, edx); /* 0x31002AB0: push edx */ 4250 RECOMP_ICALL(0x310182EDu); /* 0x31002AB1: call 0x310182ed */ /* not lifted */ 4251 RECOMP_FLAGS_IN(); 4252 eax = (int32_t)(int16_t)LO16(eax); /* 0x31002AB6: movsx eax, ax */ 4253 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 4254 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4255 esp = esp + 0xCu; /* 0x31002AB9: add esp, 0xc */ 4256 _flag_k = FK_ADD; 4257 _flag_a = (uint32_t)((edi | 0xFFFFFFFFu)); _flag_b = (uint32_t)((edi | 0xFFFFFFFFu)); 4258 edi = edi | 0xFFFFFFFFu; /* 0x31002ABC: or edi, 0xffffffff */ 4259 _cf = 0; 4260 _flag_k = FK_TEST; 4261 /* test eax, eax */ /* 0x31002ABF: test eax, eax */ 4262 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4263 _cf = 0; 4264 _flag_k = FK_TEST; 4265 if (TEST_Z(_flag_a, _flag_b)) goto L_31002ADD; /* 0x31002AC1: je 0x31002add */ 4266 L_31002AC3: 4267 /* cmp eax, 0x2Au */ /* 0x31002AC3: cmp eax, 0x2a */ 4268 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x2Au); 4269 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4270 _flag_k = FK_CMP; 4271 if (CMP_EQ(_flag_a, _flag_b)) goto L_31002ADA; /* 0x31002AC6: je 0x31002ada */ 4272 L_31002AC8: 4273 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4274 ecx = 0; /* 0x31002AC8: xor ecx, ecx */ 4275 _cf = 0; 4276 _flag_k = FK_TEST; 4277 /* cmp eax, 0x65u */ /* 0x31002ACA: cmp eax, 0x65 */ 4278 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x65u); 4279 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4280 _flag_k = FK_CMP; 4281 SET_LO8(ecx, (CMP_EQ(_flag_a, _flag_b)) ? 1 : 0); /* 0x31002ACD: sete cl */ 4282 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4283 ecx = ecx - 1; /* 0x31002AD0: dec ecx */ 4284 _flag_k = FK_DEC; 4285 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xFFFFFFFEu); 4286 ecx = ecx & 0xFFFFFFFEu; /* 0x31002AD1: and ecx, 0xfffffffe */ 4287 _cf = 0; 4288 _flag_k = FK_TEST; 4289 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4290 ecx = ecx + 1; /* 0x31002AD4: inc ecx */ 4291 _flag_k = FK_INC; 4292 MEM32(ebp + (-0x10)) = ecx; /* 0x31002AD5: mov dword ptr [ebp - 0x10], ecx */ 4293 goto L_31002ADD; /* 0x31002AD8: jmp 0x31002add */ 4294 L_31002ADA: 4295 MEM32(ebp + (-0x10)) = edi; /* 0x31002ADA: mov dword ptr [ebp - 0x10], edi */ 4296 L_31002ADD: 4297 esi = MEM32(0x31048314); /* 0x31002ADD: mov esi, dword ptr [0x31048314] */ 4298 ecx = ebp + (-0xA8); /* 0x31002AE3: lea ecx, [ebp - 0xa8] */ 4299 RECOMP_ICALL(esi); /* 0x31002AE9: call esi */ 4300 RECOMP_FLAGS_IN(); 4301 ecx = ebp + (-0x64); /* 0x31002AEB: lea ecx, [ebp - 0x64] */ 4302 MEM32(ebp + (-0x4)) = edi; /* 0x31002AEE: mov dword ptr [ebp - 4], edi */ 4303 RECOMP_ICALL(esi); /* 0x31002AF1: call esi */ 4304 RECOMP_FLAGS_IN(); 4305 ecx = MEM32(ebp + (-0xC)); /* 0x31002AF3: mov ecx, dword ptr [ebp - 0xc] */ 4306 eax = MEM32(ebp + (-0x10)); /* 0x31002AF6: mov eax, dword ptr [ebp - 0x10] */ 4307 edi = POP32_VAL(esp); /* 0x31002AF9: pop edi */ 4308 esi = POP32_VAL(esp); /* 0x31002AFA: pop esi */ 4309 ebx = POP32_VAL(esp); /* 0x31002AFB: pop ebx */ 4310 MEM32(FS_BASE + (0)) = ecx; /* 0x31002AFC: mov dword ptr fs:[0], ecx */ 4311 esp = ebp; /* 0x31002B03: mov esp, ebp */ 4312 ebp = POP32_VAL(esp); /* 0x31002B05: pop ebp */ 4313 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31002B06: ret 8 */ 4314 RECOMP_REGS_OUT(); 4315 } 4316 4317 void sub_31002B10(void) { 4318 int _fpu_cmp = 0; 4319 uint32_t _cf = 0; 4320 int _df = 1; 4321 uint32_t _flag_k = FK_NONE; 4322 uint32_t _flag_a = 0, _flag_b = 0; 4323 uint32_t _itail_tgt = 0; 4324 RECOMP_REGS_LOCALS 4325 RECOMP_ENTER(0x31002B10u); 4326 4327 L_31002B10: 4328 PUSH32(esp, ebp); /* 0x31002B10: push ebp */ 4329 ebp = esp; /* 0x31002B11: mov ebp, esp */ 4330 PUSH32(esp, 0xFFFFFFFFu); /* 0x31002B13: push -1 */ 4331 PUSH32(esp, 0x31046D69u); /* 0x31002B15: push 0x31046d69 */ 4332 eax = MEM32(FS_BASE + (0)); /* 0x31002B1A: mov eax, dword ptr fs:[0] */ 4333 PUSH32(esp, eax); /* 0x31002B20: push eax */ 4334 MEM32(FS_BASE + (0)) = esp; /* 0x31002B21: mov dword ptr fs:[0], esp */ 4335 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x4Cu); 4336 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4337 esp = esp - 0x4Cu; /* 0x31002B28: sub esp, 0x4c */ 4338 _flag_k = FK_CMP; 4339 PUSH32(esp, esi); /* 0x31002B2B: push esi */ 4340 PUSH32(esp, edi); /* 0x31002B2C: push edi */ 4341 PUSH32(esp, 8); /* 0x31002B2D: push 8 */ 4342 eax = ebp + (-0x14); /* 0x31002B2F: lea eax, [ebp - 0x14] */ 4343 esi = ecx; /* 0x31002B32: mov esi, ecx */ 4344 PUSH32(esp, eax); /* 0x31002B34: push eax */ 4345 ecx = ebp + (-0x58); /* 0x31002B35: lea ecx, [ebp - 0x58] */ 4346 RECOMP_ICALL(MEM32(0x31048320)); /* 0x31002B38: call dword ptr [0x31048320] */ 4347 RECOMP_FLAGS_IN(); 4348 ecx = MEM32(ebp + 0x8); /* 0x31002B3E: mov ecx, dword ptr [ebp + 8] */ 4349 edi = MEM32(0x3104831C); /* 0x31002B41: mov edi, dword ptr [0x3104831c] */ 4350 PUSH32(esp, ecx); /* 0x31002B47: push ecx */ 4351 ecx = ebp + (-0x58); /* 0x31002B48: lea ecx, [ebp - 0x58] */ 4352 MEM32(ebp + (-0x4)) = 0; /* 0x31002B4B: mov dword ptr [ebp - 4], 0 */ 4353 RECOMP_ICALL(edi); /* 0x31002B52: call edi */ 4354 RECOMP_FLAGS_IN(); 4355 edx = MEM32(ebp + 0xC); /* 0x31002B54: mov edx, dword ptr [ebp + 0xc] */ 4356 PUSH32(esp, edx); /* 0x31002B57: push edx */ 4357 ecx = eax; /* 0x31002B58: mov ecx, eax */ 4358 RECOMP_ICALL(edi); /* 0x31002B5A: call edi */ 4359 RECOMP_FLAGS_IN(); 4360 ecx = MEM32(esi + 0x110); /* 0x31002B5C: mov ecx, dword ptr [esi + 0x110] */ 4361 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4362 edx = 0; /* 0x31002B62: xor edx, edx */ 4363 _cf = 0; 4364 _flag_k = FK_TEST; 4365 SET_LO16(edx, MEM16(ecx + 0xA0)); /* 0x31002B64: mov dx, word ptr [ecx + 0xa0] */ 4366 _flag_a = (uint32_t)(LO16(edx)) << 16; _flag_b = (uint32_t)(1) << 16; 4367 SET_LO16(edx, LO16(edx) + 1); /* 0x31002B6B: inc dx */ 4368 _flag_k = FK_NARROW(FK_INC, 16); 4369 eax = ebp + (-0x14); /* 0x31002B6D: lea eax, [ebp - 0x14] */ 4370 PUSH32(esp, eax); /* 0x31002B70: push eax */ 4371 PUSH32(esp, edx); /* 0x31002B71: push edx */ 4372 RECOMP_ICALL(0x31023B67u); /* 0x31002B72: call 0x31023b67 */ /* not lifted */ 4373 RECOMP_FLAGS_IN(); 4374 esi = eax; /* 0x31002B77: mov esi, eax */ 4375 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4376 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4377 esp = esp + 8; /* 0x31002B79: add esp, 8 */ 4378 _flag_k = FK_ADD; 4379 /* test esi, esi */ /* 0x31002B7C: test esi, esi */ 4380 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 4381 _cf = 0; 4382 _flag_k = FK_TEST; 4383 if (TEST_NZ(_flag_a, _flag_b)) goto L_31002C1D; /* 0x31002B7E: jne 0x31002c1d */ 4384 L_31002B84: 4385 RECOMP_ICALL(0x310114B2u); /* 0x31002B84: call 0x310114b2 */ /* not lifted */ 4386 RECOMP_FLAGS_IN(); 4387 PUSH32(esp, eax); /* 0x31002B89: push eax */ 4388 RECOMP_ICALL(0x31011463u); /* 0x31002B8A: call 0x31011463 */ /* not lifted */ 4389 RECOMP_FLAGS_IN(); 4390 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4391 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4392 esp = esp + 4; /* 0x31002B8F: add esp, 4 */ 4393 _flag_k = FK_ADD; 4394 /* test eax, eax */ /* 0x31002B92: test eax, eax */ 4395 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4396 _cf = 0; 4397 _flag_k = FK_TEST; 4398 if (TEST_NZ(_flag_a, _flag_b)) goto L_31002B9B; /* 0x31002B94: jne 0x31002b9b */ 4399 L_31002B96: 4400 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 4401 eax = eax | 0xFFFFFFFFu; /* 0x31002B96: or eax, 0xffffffff */ 4402 _cf = 0; 4403 _flag_k = FK_TEST; 4404 goto L_31002BAD; /* 0x31002B99: jmp 0x31002bad */ 4405 L_31002B9B: 4406 RECOMP_ICALL(0x310114B2u); /* 0x31002B9B: call 0x310114b2 */ /* not lifted */ 4407 RECOMP_FLAGS_IN(); 4408 PUSH32(esp, eax); /* 0x31002BA0: push eax */ 4409 RECOMP_ICALL(0x31011463u); /* 0x31002BA1: call 0x31011463 */ /* not lifted */ 4410 RECOMP_FLAGS_IN(); 4411 SET_LO16(eax, MEM16(eax + 0x78)); /* 0x31002BA6: mov ax, word ptr [eax + 0x78] */ 4412 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4413 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4414 esp = esp + 4; /* 0x31002BAA: add esp, 4 */ 4415 _flag_k = FK_ADD; 4416 L_31002BAD: 4417 eax = (int32_t)(int16_t)LO16(eax); /* 0x31002BAD: movsx eax, ax */ 4418 /* test eax, eax */ /* 0x31002BB0: test eax, eax */ 4419 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4420 _cf = 0; 4421 _flag_k = FK_TEST; 4422 if (TEST_Z(_flag_a, _flag_b)) goto L_31002C1D; /* 0x31002BB2: je 0x31002c1d */ 4423 L_31002BB4: 4424 /* cmp eax, 0x2Au */ /* 0x31002BB4: cmp eax, 0x2a */ 4425 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x2Au); 4426 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4427 _flag_k = FK_CMP; 4428 if (CMP_EQ(_flag_a, _flag_b)) goto L_31002C05; /* 0x31002BB7: je 0x31002c05 */ 4429 L_31002BB9: 4430 /* cmp eax, 0x65u */ /* 0x31002BB9: cmp eax, 0x65 */ 4431 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x65u); 4432 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4433 _flag_k = FK_CMP; 4434 if (CMP_EQ(_flag_a, _flag_b)) goto L_31002C1D; /* 0x31002BBC: je 0x31002c1d */ 4435 L_31002BBE: 4436 RECOMP_ICALL(0x310114B2u); /* 0x31002BBE: call 0x310114b2 */ /* not lifted */ 4437 RECOMP_FLAGS_IN(); 4438 PUSH32(esp, eax); /* 0x31002BC3: push eax */ 4439 RECOMP_ICALL(0x31011463u); /* 0x31002BC4: call 0x31011463 */ /* not lifted */ 4440 RECOMP_FLAGS_IN(); 4441 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4442 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4443 esp = esp + 4; /* 0x31002BC9: add esp, 4 */ 4444 _flag_k = FK_ADD; 4445 /* test eax, eax */ /* 0x31002BCC: test eax, eax */ 4446 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4447 _cf = 0; 4448 _flag_k = FK_TEST; 4449 if (TEST_NZ(_flag_a, _flag_b)) goto L_31002BD5; /* 0x31002BCE: jne 0x31002bd5 */ 4450 L_31002BD0: 4451 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 4452 eax = eax | 0xFFFFFFFFu; /* 0x31002BD0: or eax, 0xffffffff */ 4453 _cf = 0; 4454 _flag_k = FK_TEST; 4455 goto L_31002BE7; /* 0x31002BD3: jmp 0x31002be7 */ 4456 L_31002BD5: 4457 RECOMP_ICALL(0x310114B2u); /* 0x31002BD5: call 0x310114b2 */ /* not lifted */ 4458 RECOMP_FLAGS_IN(); 4459 PUSH32(esp, eax); /* 0x31002BDA: push eax */ 4460 RECOMP_ICALL(0x31011463u); /* 0x31002BDB: call 0x31011463 */ /* not lifted */ 4461 RECOMP_FLAGS_IN(); 4462 SET_LO16(eax, MEM16(eax + 0x7C)); /* 0x31002BE0: mov ax, word ptr [eax + 0x7c] */ 4463 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4464 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4465 esp = esp + 4; /* 0x31002BE4: add esp, 4 */ 4466 _flag_k = FK_ADD; 4467 L_31002BE7: 4468 ecx = MEM32(0x310481FC); /* 0x31002BE7: mov ecx, dword ptr [0x310481fc] */ 4469 eax = (int32_t)(int16_t)LO16(eax); /* 0x31002BED: movsx eax, ax */ 4470 PUSH32(esp, eax); /* 0x31002BF0: push eax */ 4471 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x40u); 4472 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4473 ecx = ecx + 0x40u; /* 0x31002BF1: add ecx, 0x40 */ 4474 _flag_k = FK_ADD; 4475 PUSH32(esp, 0x310516C4u); /* 0x31002BF4: push 0x310516c4 */ 4476 PUSH32(esp, ecx); /* 0x31002BF9: push ecx */ 4477 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x31002BFA: call dword ptr [0x310481f8] */ 4478 RECOMP_FLAGS_IN(); 4479 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 4480 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4481 esp = esp + 0xCu; /* 0x31002C00: add esp, 0xc */ 4482 _flag_k = FK_ADD; 4483 goto L_31002C1D; /* 0x31002C03: jmp 0x31002c1d */ 4484 L_31002C05: 4485 edx = MEM32(0x310481FC); /* 0x31002C05: mov edx, dword ptr [0x310481fc] */ 4486 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x40u); 4487 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4488 edx = edx + 0x40u; /* 0x31002C0B: add edx, 0x40 */ 4489 _flag_k = FK_ADD; 4490 PUSH32(esp, 0x3105169Cu); /* 0x31002C0E: push 0x3105169c */ 4491 PUSH32(esp, edx); /* 0x31002C13: push edx */ 4492 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x31002C14: call dword ptr [0x310481f8] */ 4493 RECOMP_FLAGS_IN(); 4494 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4495 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4496 esp = esp + 8; /* 0x31002C1A: add esp, 8 */ 4497 _flag_k = FK_ADD; 4498 L_31002C1D: 4499 ecx = ebp + (-0x58); /* 0x31002C1D: lea ecx, [ebp - 0x58] */ 4500 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x31002C20: mov dword ptr [ebp - 4], 0xffffffff */ 4501 RECOMP_ICALL(MEM32(0x31048314)); /* 0x31002C27: call dword ptr [0x31048314] */ 4502 RECOMP_FLAGS_IN(); 4503 ecx = MEM32(ebp + (-0xC)); /* 0x31002C2D: mov ecx, dword ptr [ebp - 0xc] */ 4504 edi = POP32_VAL(esp); /* 0x31002C30: pop edi */ 4505 eax = esi; /* 0x31002C31: mov eax, esi */ 4506 esi = POP32_VAL(esp); /* 0x31002C33: pop esi */ 4507 MEM32(FS_BASE + (0)) = ecx; /* 0x31002C34: mov dword ptr fs:[0], ecx */ 4508 esp = ebp; /* 0x31002C3B: mov esp, ebp */ 4509 ebp = POP32_VAL(esp); /* 0x31002C3D: pop ebp */ 4510 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31002C3E: ret 8 */ 4511 RECOMP_REGS_OUT(); 4512 } 4513 4514 void sub_31002C50(void) { 4515 int _fpu_cmp = 0; 4516 uint32_t _cf = 0; 4517 int _df = 1; 4518 uint32_t _flag_k = FK_NONE; 4519 uint32_t _flag_a = 0, _flag_b = 0; 4520 uint32_t _itail_tgt = 0; 4521 RECOMP_REGS_LOCALS 4522 RECOMP_ENTER(0x31002C50u); 4523 4524 L_31002C50: 4525 PUSH32(esp, ebp); /* 0x31002C50: push ebp */ 4526 ebp = esp; /* 0x31002C51: mov ebp, esp */ 4527 PUSH32(esp, 0xFFFFFFFFu); /* 0x31002C53: push -1 */ 4528 PUSH32(esp, 0x31046D88u); /* 0x31002C55: push 0x31046d88 */ 4529 eax = MEM32(FS_BASE + (0)); /* 0x31002C5A: mov eax, dword ptr fs:[0] */ 4530 PUSH32(esp, eax); /* 0x31002C60: push eax */ 4531 MEM32(FS_BASE + (0)) = esp; /* 0x31002C61: mov dword ptr fs:[0], esp */ 4532 PUSH32(esp, ecx); /* 0x31002C68: push ecx */ 4533 PUSH32(esp, esi); /* 0x31002C69: push esi */ 4534 PUSH32(esp, edi); /* 0x31002C6A: push edi */ 4535 edi = ecx; /* 0x31002C6B: mov edi, ecx */ 4536 PUSH32(esp, 1); /* 0x31002C6D: push 1 */ 4537 PUSH32(esp, edi); /* 0x31002C6F: push edi */ 4538 ecx = ebp + (-0x10); /* 0x31002C70: lea ecx, [ebp - 0x10] */ 4539 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4540 esi = 0; /* 0x31002C73: xor esi, esi */ 4541 _cf = 0; 4542 _flag_k = FK_TEST; 4543 RECOMP_ICALL(0x31003EA0u); /* 0x31002C75: call 0x31003ea0 */ /* not lifted */ 4544 RECOMP_FLAGS_IN(); 4545 eax = MEM32(ebp + 0xC); /* 0x31002C7A: mov eax, dword ptr [ebp + 0xc] */ 4546 ecx = MEM32(ebp + 0x8); /* 0x31002C7D: mov ecx, dword ptr [ebp + 8] */ 4547 PUSH32(esp, eax); /* 0x31002C80: push eax */ 4548 PUSH32(esp, ecx); /* 0x31002C81: push ecx */ 4549 ecx = edi; /* 0x31002C82: mov ecx, edi */ 4550 MEM32(ebp + (-0x4)) = esi; /* 0x31002C84: mov dword ptr [ebp - 4], esi */ 4551 RECOMP_ICALL(0x31002A30u); /* 0x31002C87: call 0x31002a30 */ /* not lifted */ 4552 RECOMP_FLAGS_IN(); 4553 /* test eax, eax */ /* 0x31002C8C: test eax, eax */ 4554 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4555 _cf = 0; 4556 _flag_k = FK_TEST; 4557 if (TEST_NZ(_flag_a, _flag_b)) goto L_31002CB4; /* 0x31002C8E: jne 0x31002cb4 */ 4558 L_31002C90: 4559 edx = MEM32(edi + 0x110); /* 0x31002C90: mov edx, dword ptr [edi + 0x110] */ 4560 SET_LO16(eax, MEM16(edx + 0xA0)); /* 0x31002C96: mov ax, word ptr [edx + 0xa0] */ 4561 PUSH32(esp, eax); /* 0x31002C9D: push eax */ 4562 RECOMP_ICALL(0x3101B32Bu); /* 0x31002C9E: call 0x3101b32b */ /* not lifted */ 4563 RECOMP_FLAGS_IN(); 4564 esi = eax; /* 0x31002CA3: mov esi, eax */ 4565 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4566 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4567 esp = esp + 4; /* 0x31002CA5: add esp, 4 */ 4568 _flag_k = FK_ADD; 4569 /* cmp esi, 0xCu */ /* 0x31002CA8: cmp esi, 0xc */ 4570 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0xCu); 4571 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4572 _flag_k = FK_CMP; 4573 if (CMP_AE(_flag_a, _flag_b)) goto L_31002CB1; /* 0x31002CAB: jae 0x31002cb1 */ 4574 L_31002CAD: 4575 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4576 esi = 0; /* 0x31002CAD: xor esi, esi */ 4577 _cf = 0; 4578 _flag_k = FK_TEST; 4579 goto L_31002CB4; /* 0x31002CAF: jmp 0x31002cb4 */ 4580 L_31002CB1: 4581 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0xCu); 4582 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4583 esi = esi - 0xCu; /* 0x31002CB1: sub esi, 0xc */ 4584 _flag_k = FK_CMP; 4585 L_31002CB4: 4586 ecx = ebp + (-0x10); /* 0x31002CB4: lea ecx, [ebp - 0x10] */ 4587 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x31002CB7: mov dword ptr [ebp - 4], 0xffffffff */ 4588 RECOMP_ICALL(0x31003EC0u); /* 0x31002CBE: call 0x31003ec0 */ /* not lifted */ 4589 RECOMP_FLAGS_IN(); 4590 ecx = MEM32(ebp + (-0xC)); /* 0x31002CC3: mov ecx, dword ptr [ebp - 0xc] */ 4591 edi = POP32_VAL(esp); /* 0x31002CC6: pop edi */ 4592 eax = esi; /* 0x31002CC7: mov eax, esi */ 4593 esi = POP32_VAL(esp); /* 0x31002CC9: pop esi */ 4594 MEM32(FS_BASE + (0)) = ecx; /* 0x31002CCA: mov dword ptr fs:[0], ecx */ 4595 esp = ebp; /* 0x31002CD1: mov esp, ebp */ 4596 ebp = POP32_VAL(esp); /* 0x31002CD3: pop ebp */ 4597 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31002CD4: ret 8 */ 4598 RECOMP_REGS_OUT(); 4599 } 4600 4601 void sub_31002CE0(void) { 4602 int _fpu_cmp = 0; 4603 uint32_t _cf = 0; 4604 int _df = 1; 4605 uint32_t _flag_k = FK_NONE; 4606 uint32_t _flag_a = 0, _flag_b = 0; 4607 uint32_t _itail_tgt = 0; 4608 RECOMP_REGS_LOCALS 4609 RECOMP_ENTER(0x31002CE0u); 4610 4611 L_31002CE0: 4612 PUSH32(esp, ebp); /* 0x31002CE0: push ebp */ 4613 ebp = esp; /* 0x31002CE1: mov ebp, esp */ 4614 PUSH32(esp, 0xFFFFFFFFu); /* 0x31002CE3: push -1 */ 4615 PUSH32(esp, 0x31046DB1u); /* 0x31002CE5: push 0x31046db1 */ 4616 eax = MEM32(FS_BASE + (0)); /* 0x31002CEA: mov eax, dword ptr fs:[0] */ 4617 PUSH32(esp, eax); /* 0x31002CF0: push eax */ 4618 MEM32(FS_BASE + (0)) = esp; /* 0x31002CF1: mov dword ptr fs:[0], esp */ 4619 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x48u); 4620 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4621 esp = esp - 0x48u; /* 0x31002CF8: sub esp, 0x48 */ 4622 _flag_k = FK_CMP; 4623 PUSH32(esp, ebx); /* 0x31002CFB: push ebx */ 4624 ebx = MEM32(ebp + 0x10); /* 0x31002CFC: mov ebx, dword ptr [ebp + 0x10] */ 4625 PUSH32(esp, esi); /* 0x31002CFF: push esi */ 4626 PUSH32(esp, edi); /* 0x31002D00: push edi */ 4627 esi = ecx; /* 0x31002D01: mov esi, ecx */ 4628 PUSH32(esp, 1); /* 0x31002D03: push 1 */ 4629 PUSH32(esp, esi); /* 0x31002D05: push esi */ 4630 ecx = ebp + (-0x10); /* 0x31002D06: lea ecx, [ebp - 0x10] */ 4631 MEM32(ebx) = 0; /* 0x31002D09: mov dword ptr [ebx], 0 */ 4632 RECOMP_ICALL(0x31003EA0u); /* 0x31002D0F: call 0x31003ea0 */ /* not lifted */ 4633 RECOMP_FLAGS_IN(); 4634 eax = MEM32(ebp + 0xC); /* 0x31002D14: mov eax, dword ptr [ebp + 0xc] */ 4635 ecx = MEM32(ebp + 0x8); /* 0x31002D17: mov ecx, dword ptr [ebp + 8] */ 4636 PUSH32(esp, eax); /* 0x31002D1A: push eax */ 4637 PUSH32(esp, ecx); /* 0x31002D1B: push ecx */ 4638 ecx = esi; /* 0x31002D1C: mov ecx, esi */ 4639 MEM32(ebp + (-0x4)) = 0; /* 0x31002D1E: mov dword ptr [ebp - 4], 0 */ 4640 RECOMP_ICALL(0x31002A30u); /* 0x31002D25: call 0x31002a30 */ /* not lifted */ 4641 RECOMP_FLAGS_IN(); 4642 /* test eax, eax */ /* 0x31002D2A: test eax, eax */ 4643 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4644 _cf = 0; 4645 _flag_k = FK_TEST; 4646 MEM32(ebp + 0x8) = eax; /* 0x31002D2C: mov dword ptr [ebp + 8], eax */ 4647 if (TEST_NZ(_flag_a, _flag_b)) goto L_31002E17; /* 0x31002D2F: jne 0x31002e17 */ 4648 L_31002D35: 4649 edx = MEM32(esi + 0x110); /* 0x31002D35: mov edx, dword ptr [esi + 0x110] */ 4650 SET_LO16(eax, MEM16(edx + 0xA0)); /* 0x31002D3B: mov ax, word ptr [edx + 0xa0] */ 4651 PUSH32(esp, eax); /* 0x31002D42: push eax */ 4652 RECOMP_ICALL(0x3101B32Bu); /* 0x31002D43: call 0x3101b32b */ /* not lifted */ 4653 RECOMP_FLAGS_IN(); 4654 edi = eax; /* 0x31002D48: mov edi, eax */ 4655 eax = MEM32(esi + 0x10C); /* 0x31002D4A: mov eax, dword ptr [esi + 0x10c] */ 4656 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4657 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4658 esp = esp + 4; /* 0x31002D50: add esp, 4 */ 4659 _flag_k = FK_ADD; 4660 /* cmp edi, eax */ /* 0x31002D53: cmp edi, eax */ 4661 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 4662 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4663 _flag_k = FK_CMP; 4664 if (CMP_BE(_flag_a, _flag_b)) goto L_31002D7F; /* 0x31002D55: jbe 0x31002d7f */ 4665 L_31002D57: 4666 eax = MEM32(esi + 0x108); /* 0x31002D57: mov eax, dword ptr [esi + 0x108] */ 4667 /* test eax, eax */ /* 0x31002D5D: test eax, eax */ 4668 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4669 _cf = 0; 4670 _flag_k = FK_TEST; 4671 if (TEST_Z(_flag_a, _flag_b)) goto L_31002D6A; /* 0x31002D5F: je 0x31002d6a */ 4672 L_31002D61: 4673 PUSH32(esp, eax); /* 0x31002D61: push eax */ 4674 RECOMP_ICALL(0x31046858u); /* 0x31002D62: call 0x31046858 */ /* not lifted */ 4675 RECOMP_FLAGS_IN(); 4676 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4677 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4678 esp = esp + 4; /* 0x31002D67: add esp, 4 */ 4679 _flag_k = FK_ADD; 4680 L_31002D6A: 4681 PUSH32(esp, edi); /* 0x31002D6A: push edi */ 4682 MEM32(esi + 0x10C) = edi; /* 0x31002D6B: mov dword ptr [esi + 0x10c], edi */ 4683 RECOMP_ICALL(0x310468DAu); /* 0x31002D71: call 0x310468da */ /* not lifted */ 4684 RECOMP_FLAGS_IN(); 4685 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4686 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4687 esp = esp + 4; /* 0x31002D76: add esp, 4 */ 4688 _flag_k = FK_ADD; 4689 MEM32(esi + 0x108) = eax; /* 0x31002D79: mov dword ptr [esi + 0x108], eax */ 4690 L_31002D7F: 4691 /* test edi, edi */ /* 0x31002D7F: test edi, edi */ 4692 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 4693 _cf = 0; 4694 _flag_k = FK_TEST; 4695 if (TEST_Z(_flag_a, _flag_b)) goto L_31002E17; /* 0x31002D81: je 0x31002e17 */ 4696 L_31002D87: 4697 edx = MEM32(esi + 0x110); /* 0x31002D87: mov edx, dword ptr [esi + 0x110] */ 4698 ecx = MEM32(esi + 0x108); /* 0x31002D8D: mov ecx, dword ptr [esi + 0x108] */ 4699 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4700 eax = 0; /* 0x31002D93: xor eax, eax */ 4701 _cf = 0; 4702 _flag_k = FK_TEST; 4703 SET_LO16(eax, MEM16(edx + 0xA0)); /* 0x31002D95: mov ax, word ptr [edx + 0xa0] */ 4704 PUSH32(esp, edi); /* 0x31002D9C: push edi */ 4705 PUSH32(esp, ecx); /* 0x31002D9D: push ecx */ 4706 PUSH32(esp, eax); /* 0x31002D9E: push eax */ 4707 RECOMP_ICALL(0x3101BC3Bu); /* 0x31002D9F: call 0x3101bc3b */ /* not lifted */ 4708 RECOMP_FLAGS_IN(); 4709 eax = edi + (-0xC); /* 0x31002DA4: lea eax, [edi - 0xc] */ 4710 PUSH32(esp, eax); /* 0x31002DA7: push eax */ 4711 MEM32(ebx) = eax; /* 0x31002DA8: mov dword ptr [ebx], eax */ 4712 RECOMP_ICALL(0x310468DAu); /* 0x31002DAA: call 0x310468da */ /* not lifted */ 4713 RECOMP_FLAGS_IN(); 4714 ebx = MEM32(ebp + 0x14); /* 0x31002DAF: mov ebx, dword ptr [ebp + 0x14] */ 4715 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 4716 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4717 esp = esp + 0x10u; /* 0x31002DB2: add esp, 0x10 */ 4718 _flag_k = FK_ADD; 4719 MEM32(ebx) = eax; /* 0x31002DB5: mov dword ptr [ebx], eax */ 4720 ecx = MEM32(esi + 0x108); /* 0x31002DB7: mov ecx, dword ptr [esi + 0x108] */ 4721 PUSH32(esp, edi); /* 0x31002DBD: push edi */ 4722 PUSH32(esp, ecx); /* 0x31002DBE: push ecx */ 4723 ecx = ebp + (-0x54); /* 0x31002DBF: lea ecx, [ebp - 0x54] */ 4724 RECOMP_ICALL(MEM32(0x31048320)); /* 0x31002DC2: call dword ptr [0x31048320] */ 4725 RECOMP_FLAGS_IN(); 4726 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4727 eax = 0; /* 0x31002DC8: xor eax, eax */ 4728 _cf = 0; 4729 _flag_k = FK_TEST; 4730 PUSH32(esp, 8); /* 0x31002DCA: push 8 */ 4731 ecx = ebp + (-0x54); /* 0x31002DCC: lea ecx, [ebp - 0x54] */ 4732 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x31002DCF: mov byte ptr [ebp - 4], 1 */ 4733 MEM32(ebp + (-0x14)) = eax; /* 0x31002DD3: mov dword ptr [ebp - 0x14], eax */ 4734 MEM32(ebp + 0xC) = eax; /* 0x31002DD6: mov dword ptr [ebp + 0xc], eax */ 4735 RECOMP_ICALL(MEM32(0x31048318)); /* 0x31002DD9: call dword ptr [0x31048318] */ 4736 RECOMP_FLAGS_IN(); 4737 edx = ebp + 0xC; /* 0x31002DDF: lea edx, [ebp + 0xc] */ 4738 PUSH32(esp, edx); /* 0x31002DE2: push edx */ 4739 ecx = ebp + (-0x54); /* 0x31002DE3: lea ecx, [ebp - 0x54] */ 4740 RECOMP_ICALL(MEM32(0x31048324)); /* 0x31002DE6: call dword ptr [0x31048324] */ 4741 RECOMP_FLAGS_IN(); 4742 eax = MEM32(ebp + 0x10); /* 0x31002DEC: mov eax, dword ptr [ebp + 0x10] */ 4743 ecx = MEM32(eax); /* 0x31002DEF: mov ecx, dword ptr [eax] */ 4744 esi = MEM32(esi + 0x108); /* 0x31002DF1: mov esi, dword ptr [esi + 0x108] */ 4745 edi = MEM32(ebx); /* 0x31002DF7: mov edi, dword ptr [ebx] */ 4746 edx = ecx; /* 0x31002DF9: mov edx, ecx */ 4747 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x31002DFB: shr ecx, 2 */ 4748 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 4749 ecx = ecx >> 2u; /* 0x31002DFB: shr ecx, 2 */ 4750 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0xCu); 4751 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4752 esi = esi + 0xCu; /* 0x31002DFE: add esi, 0xc */ 4753 _flag_k = FK_ADD; 4754 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31002E01: 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; } 4755 ecx = edx; /* 0x31002E03: mov ecx, edx */ 4756 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 4757 ecx = ecx & 3; /* 0x31002E05: and ecx, 3 */ 4758 _cf = 0; 4759 _flag_k = FK_TEST; 4760 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x31002E08: 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; } 4761 ecx = ebp + (-0x54); /* 0x31002E0A: lea ecx, [ebp - 0x54] */ 4762 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x31002E0D: mov byte ptr [ebp - 4], 0 */ 4763 RECOMP_ICALL(MEM32(0x31048314)); /* 0x31002E11: call dword ptr [0x31048314] */ 4764 RECOMP_FLAGS_IN(); 4765 L_31002E17: 4766 ecx = ebp + (-0x10); /* 0x31002E17: lea ecx, [ebp - 0x10] */ 4767 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x31002E1A: mov dword ptr [ebp - 4], 0xffffffff */ 4768 RECOMP_ICALL(0x31003EC0u); /* 0x31002E21: call 0x31003ec0 */ /* not lifted */ 4769 RECOMP_FLAGS_IN(); 4770 ecx = MEM32(ebp + (-0xC)); /* 0x31002E26: mov ecx, dword ptr [ebp - 0xc] */ 4771 eax = MEM32(ebp + 0x8); /* 0x31002E29: mov eax, dword ptr [ebp + 8] */ 4772 edi = POP32_VAL(esp); /* 0x31002E2C: pop edi */ 4773 esi = POP32_VAL(esp); /* 0x31002E2D: pop esi */ 4774 ebx = POP32_VAL(esp); /* 0x31002E2E: pop ebx */ 4775 MEM32(FS_BASE + (0)) = ecx; /* 0x31002E2F: mov dword ptr fs:[0], ecx */ 4776 esp = ebp; /* 0x31002E36: mov esp, ebp */ 4777 ebp = POP32_VAL(esp); /* 0x31002E38: pop ebp */ 4778 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x31002E39: ret 0x10 */ 4779 RECOMP_REGS_OUT(); 4780 } 4781 4782 void sub_31002E40(void) { 4783 int _fpu_cmp = 0; 4784 uint32_t _cf = 0; 4785 int _df = 1; 4786 uint32_t _flag_k = FK_NONE; 4787 uint32_t _flag_a = 0, _flag_b = 0; 4788 uint32_t _itail_tgt = 0; 4789 RECOMP_REGS_LOCALS 4790 RECOMP_ENTER(0x31002E40u); 4791 4792 L_31002E40: 4793 PUSH32(esp, ebp); /* 0x31002E40: push ebp */ 4794 ebp = esp; /* 0x31002E41: mov ebp, esp */ 4795 PUSH32(esp, 0xFFFFFFFFu); /* 0x31002E43: push -1 */ 4796 PUSH32(esp, 0x31046DC8u); /* 0x31002E45: push 0x31046dc8 */ 4797 eax = MEM32(FS_BASE + (0)); /* 0x31002E4A: mov eax, dword ptr fs:[0] */ 4798 PUSH32(esp, eax); /* 0x31002E50: push eax */ 4799 MEM32(FS_BASE + (0)) = esp; /* 0x31002E51: mov dword ptr fs:[0], esp */ 4800 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x4Cu); 4801 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4802 esp = esp - 0x4Cu; /* 0x31002E58: sub esp, 0x4c */ 4803 _flag_k = FK_CMP; 4804 PUSH32(esp, ebx); /* 0x31002E5B: push ebx */ 4805 PUSH32(esp, esi); /* 0x31002E5C: push esi */ 4806 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4807 ebx = 0; /* 0x31002E5D: xor ebx, ebx */ 4808 _cf = 0; 4809 _flag_k = FK_TEST; 4810 esi = ecx; /* 0x31002E5F: mov esi, ecx */ 4811 SET_LO8(eax, MEM8(esi + 0x124)); /* 0x31002E61: mov al, byte ptr [esi + 0x124] */ 4812 /* test LO8(eax), LO8(eax) */ /* 0x31002E67: test al, al */ 4813 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4814 _cf = 0; 4815 _flag_k = FK_NARROW(FK_TEST, 24); 4816 PUSH32(esp, edi); /* 0x31002E69: push edi */ 4817 MEM32(ebp + (-0x58)) = ebx; /* 0x31002E6A: mov dword ptr [ebp - 0x58], ebx */ 4818 MEM32(ebp + (-0x54)) = ebx; /* 0x31002E6D: mov dword ptr [ebp - 0x54], ebx */ 4819 MEM32(ebp + (-0x50)) = ebx; /* 0x31002E70: mov dword ptr [ebp - 0x50], ebx */ 4820 MEM32(ebp + (-0x4C)) = ebx; /* 0x31002E73: mov dword ptr [ebp - 0x4c], ebx */ 4821 if (TEST_Z(_flag_a, _flag_b)) goto L_31002E9D; /* 0x31002E76: je 0x31002e9d */ 4822 L_31002E78: 4823 eax = ebp + (-0x20); /* 0x31002E78: lea eax, [ebp - 0x20] */ 4824 PUSH32(esp, eax); /* 0x31002E7B: push eax */ 4825 RECOMP_ICALL(MEM32(0x3104804C)); /* 0x31002E7C: call dword ptr [0x3104804c] */ 4826 RECOMP_FLAGS_IN(); 4827 ecx = ebp + (-0x20); /* 0x31002E82: lea ecx, [ebp - 0x20] */ 4828 PUSH32(esp, ecx); /* 0x31002E85: push ecx */ 4829 ecx = ebp + (-0x30); /* 0x31002E86: lea ecx, [ebp - 0x30] */ 4830 RECOMP_ICALL(MEM32(0x31048298)); /* 0x31002E89: call dword ptr [0x31048298] */ 4831 RECOMP_FLAGS_IN(); 4832 ecx = MEM32(eax); /* 0x31002E8F: mov ecx, dword ptr [eax] */ 4833 MEM32(ebp + (-0x38)) = ecx; /* 0x31002E91: mov dword ptr [ebp - 0x38], ecx */ 4834 eax = MEM32(eax + 0x4); /* 0x31002E94: mov eax, dword ptr [eax + 4] */ 4835 MEM32(ebp + (-0x58)) = ecx; /* 0x31002E97: mov dword ptr [ebp - 0x58], ecx */ 4836 MEM32(ebp + (-0x54)) = eax; /* 0x31002E9A: mov dword ptr [ebp - 0x54], eax */ 4837 L_31002E9D: 4838 edi = MEM32(ebp + 0x10); /* 0x31002E9D: mov edi, dword ptr [ebp + 0x10] */ 4839 PUSH32(esp, 1); /* 0x31002EA0: push 1 */ 4840 PUSH32(esp, esi); /* 0x31002EA2: push esi */ 4841 ecx = ebp + (-0x10); /* 0x31002EA3: lea ecx, [ebp - 0x10] */ 4842 MEM32(edi) = ebx; /* 0x31002EA6: mov dword ptr [edi], ebx */ 4843 RECOMP_ICALL(0x31003EA0u); /* 0x31002EA8: call 0x31003ea0 */ /* not lifted */ 4844 RECOMP_FLAGS_IN(); 4845 edx = MEM32(ebp + 0x8); /* 0x31002EAD: mov edx, dword ptr [ebp + 8] */ 4846 MEM32(ebp + (-0x4)) = ebx; /* 0x31002EB0: mov dword ptr [ebp - 4], ebx */ 4847 ebx = MEM32(ebp + 0xC); /* 0x31002EB3: mov ebx, dword ptr [ebp + 0xc] */ 4848 PUSH32(esp, ebx); /* 0x31002EB6: push ebx */ 4849 PUSH32(esp, edx); /* 0x31002EB7: push edx */ 4850 ecx = esi; /* 0x31002EB8: mov ecx, esi */ 4851 RECOMP_ICALL(0x31002A30u); /* 0x31002EBA: call 0x31002a30 */ /* not lifted */ 4852 RECOMP_FLAGS_IN(); 4853 /* test eax, eax */ /* 0x31002EBF: test eax, eax */ 4854 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4855 _cf = 0; 4856 _flag_k = FK_TEST; 4857 MEM32(ebp + 0xC) = eax; /* 0x31002EC1: mov dword ptr [ebp + 0xc], eax */ 4858 if (TEST_NZ(_flag_a, _flag_b)) goto L_31002F53; /* 0x31002EC4: jne 0x31002f53 */ 4859 L_31002ECA: 4860 eax = MEM32(esi + 0x110); /* 0x31002ECA: mov eax, dword ptr [esi + 0x110] */ 4861 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4862 ecx = 0; /* 0x31002ED0: xor ecx, ecx */ 4863 _cf = 0; 4864 _flag_k = FK_TEST; 4865 SET_LO16(ecx, MEM16(eax + 0xA0)); /* 0x31002ED2: mov cx, word ptr [eax + 0xa0] */ 4866 PUSH32(esp, ecx); /* 0x31002ED9: push ecx */ 4867 RECOMP_ICALL(0x3101B32Bu); /* 0x31002EDA: call 0x3101b32b */ /* not lifted */ 4868 RECOMP_FLAGS_IN(); 4869 ecx = MEM32(esi + 0x10C); /* 0x31002EDF: mov ecx, dword ptr [esi + 0x10c] */ 4870 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4871 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4872 esp = esp + 4; /* 0x31002EE5: add esp, 4 */ 4873 _flag_k = FK_ADD; 4874 /* cmp eax, ecx */ /* 0x31002EE8: cmp eax, ecx */ 4875 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 4876 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4877 _flag_k = FK_CMP; 4878 MEM32(ebp + 0x10) = eax; /* 0x31002EEA: mov dword ptr [ebp + 0x10], eax */ 4879 if (CMP_BE(_flag_a, _flag_b)) goto L_31002F1D; /* 0x31002EED: jbe 0x31002f1d */ 4880 L_31002EEF: 4881 ecx = MEM32(esi + 0x108); /* 0x31002EEF: mov ecx, dword ptr [esi + 0x108] */ 4882 /* test ecx, ecx */ /* 0x31002EF5: test ecx, ecx */ 4883 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 4884 _cf = 0; 4885 _flag_k = FK_TEST; 4886 if (TEST_Z(_flag_a, _flag_b)) goto L_31002F05; /* 0x31002EF7: je 0x31002f05 */ 4887 L_31002EF9: 4888 PUSH32(esp, ecx); /* 0x31002EF9: push ecx */ 4889 RECOMP_ICALL(0x31046858u); /* 0x31002EFA: call 0x31046858 */ /* not lifted */ 4890 RECOMP_FLAGS_IN(); 4891 eax = MEM32(ebp + 0x10); /* 0x31002EFF: mov eax, dword ptr [ebp + 0x10] */ 4892 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4893 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4894 esp = esp + 4; /* 0x31002F02: add esp, 4 */ 4895 _flag_k = FK_ADD; 4896 L_31002F05: 4897 PUSH32(esp, eax); /* 0x31002F05: push eax */ 4898 MEM32(esi + 0x10C) = eax; /* 0x31002F06: mov dword ptr [esi + 0x10c], eax */ 4899 RECOMP_ICALL(0x310468DAu); /* 0x31002F0C: call 0x310468da */ /* not lifted */ 4900 RECOMP_FLAGS_IN(); 4901 MEM32(esi + 0x108) = eax; /* 0x31002F11: mov dword ptr [esi + 0x108], eax */ 4902 eax = MEM32(ebp + 0x10); /* 0x31002F17: mov eax, dword ptr [ebp + 0x10] */ 4903 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4904 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4905 esp = esp + 4; /* 0x31002F1A: add esp, 4 */ 4906 _flag_k = FK_ADD; 4907 L_31002F1D: 4908 edx = MEM32(esi + 0x108); /* 0x31002F1D: mov edx, dword ptr [esi + 0x108] */ 4909 PUSH32(esp, eax); /* 0x31002F23: push eax */ 4910 eax = MEM32(esi + 0x110); /* 0x31002F24: mov eax, dword ptr [esi + 0x110] */ 4911 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4912 ecx = 0; /* 0x31002F2A: xor ecx, ecx */ 4913 _cf = 0; 4914 _flag_k = FK_TEST; 4915 SET_LO16(ecx, MEM16(eax + 0xA0)); /* 0x31002F2C: mov cx, word ptr [eax + 0xa0] */ 4916 PUSH32(esp, edx); /* 0x31002F33: push edx */ 4917 PUSH32(esp, ecx); /* 0x31002F34: push ecx */ 4918 RECOMP_ICALL(0x3101BC3Bu); /* 0x31002F35: call 0x3101bc3b */ /* not lifted */ 4919 RECOMP_FLAGS_IN(); 4920 edx = MEM32(ebp + 0x10); /* 0x31002F3A: mov edx, dword ptr [ebp + 0x10] */ 4921 ecx = MEM32(ebp + 0x14); /* 0x31002F3D: mov ecx, dword ptr [ebp + 0x14] */ 4922 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0xFFFFFFF4u); 4923 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4924 edx = edx + 0xFFFFFFF4u; /* 0x31002F40: add edx, -0xc */ 4925 _flag_k = FK_ADD; 4926 MEM32(edi) = edx; /* 0x31002F43: mov dword ptr [edi], edx */ 4927 eax = MEM32(esi + 0x108); /* 0x31002F45: mov eax, dword ptr [esi + 0x108] */ 4928 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 4929 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4930 esp = esp + 0xCu; /* 0x31002F4B: add esp, 0xc */ 4931 _flag_k = FK_ADD; 4932 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu); 4933 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4934 eax = eax + 0xCu; /* 0x31002F4E: add eax, 0xc */ 4935 _flag_k = FK_ADD; 4936 MEM32(ecx) = eax; /* 0x31002F51: mov dword ptr [ecx], eax */ 4937 L_31002F53: 4938 SET_LO8(eax, MEM8(esi + 0x124)); /* 0x31002F53: mov al, byte ptr [esi + 0x124] */ 4939 /* test LO8(eax), LO8(eax) */ /* 0x31002F59: test al, al */ 4940 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4941 _cf = 0; 4942 _flag_k = FK_NARROW(FK_TEST, 24); 4943 if (TEST_Z(_flag_a, _flag_b)) goto L_31003054; /* 0x31002F5B: je 0x31003054 */ 4944 L_31002F61: 4945 edx = ebp + (-0x28); /* 0x31002F61: lea edx, [ebp - 0x28] */ 4946 PUSH32(esp, edx); /* 0x31002F64: push edx */ 4947 RECOMP_ICALL(MEM32(0x3104804C)); /* 0x31002F65: call dword ptr [0x3104804c] */ 4948 RECOMP_FLAGS_IN(); 4949 eax = ebp + (-0x28); /* 0x31002F6B: lea eax, [ebp - 0x28] */ 4950 PUSH32(esp, eax); /* 0x31002F6E: push eax */ 4951 ecx = ebp + (-0x40); /* 0x31002F6F: lea ecx, [ebp - 0x40] */ 4952 RECOMP_ICALL(MEM32(0x31048298)); /* 0x31002F72: call dword ptr [0x31048298] */ 4953 RECOMP_FLAGS_IN(); 4954 ecx = MEM32(eax); /* 0x31002F78: mov ecx, dword ptr [eax] */ 4955 MEM32(ebp + (-0x18)) = ecx; /* 0x31002F7A: mov dword ptr [ebp - 0x18], ecx */ 4956 edx = MEM32(eax + 0x4); /* 0x31002F7D: mov edx, dword ptr [eax + 4] */ 4957 eax = ebp + (-0x58); /* 0x31002F80: lea eax, [ebp - 0x58] */ 4958 PUSH32(esp, eax); /* 0x31002F83: push eax */ 4959 ecx = ebp + (-0x18); /* 0x31002F84: lea ecx, [ebp - 0x18] */ 4960 MEM32(ebp + (-0x14)) = edx; /* 0x31002F87: mov dword ptr [ebp - 0x14], edx */ 4961 PUSH32(esp, ecx); /* 0x31002F8A: push ecx */ 4962 edx = ebp + (-0x48); /* 0x31002F8B: lea edx, [ebp - 0x48] */ 4963 PUSH32(esp, edx); /* 0x31002F8E: push edx */ 4964 RECOMP_ICALL(MEM32(0x3104828C)); /* 0x31002F8F: call dword ptr [0x3104828c] */ 4965 RECOMP_FLAGS_IN(); 4966 ecx = MEM32(eax); /* 0x31002F95: mov ecx, dword ptr [eax] */ 4967 MEM32(ebp + (-0x50)) = ecx; /* 0x31002F97: mov dword ptr [ebp - 0x50], ecx */ 4968 edx = MEM32(eax + 0x4); /* 0x31002F9A: mov edx, dword ptr [eax + 4] */ 4969 eax = MEM32(0x31048288); /* 0x31002F9D: mov eax, dword ptr [0x31048288] */ 4970 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 4971 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4972 esp = esp + 0xCu; /* 0x31002FA2: add esp, 0xc */ 4973 _flag_k = FK_ADD; 4974 MEM32(ebp + (-0x4C)) = edx; /* 0x31002FA5: mov dword ptr [ebp - 0x4c], edx */ 4975 ecx = MEM32(eax); /* 0x31002FA8: mov ecx, dword ptr [eax] */ 4976 PUSH32(esp, 0x31051714u); /* 0x31002FAA: push 0x31051714 */ 4977 MEM32(ebp + (-0x58)) = ecx; /* 0x31002FAF: mov dword ptr [ebp - 0x58], ecx */ 4978 edx = MEM32(eax + 0x4); /* 0x31002FB2: mov edx, dword ptr [eax + 4] */ 4979 eax = MEM32(edi); /* 0x31002FB5: mov eax, dword ptr [edi] */ 4980 ecx = MEM32(ebp + 0x8); /* 0x31002FB7: mov ecx, dword ptr [ebp + 8] */ 4981 PUSH32(esp, eax); /* 0x31002FBA: push eax */ 4982 PUSH32(esp, 0x3105170Cu); /* 0x31002FBB: push 0x3105170c */ 4983 PUSH32(esp, ebx); /* 0x31002FC0: push ebx */ 4984 PUSH32(esp, 0x31051708u); /* 0x31002FC1: push 0x31051708 */ 4985 PUSH32(esp, ecx); /* 0x31002FC6: push ecx */ 4986 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x128u); 4987 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4988 esi = esi + 0x128u; /* 0x31002FC7: add esi, 0x128 */ 4989 _flag_k = FK_ADD; 4990 PUSH32(esp, 0x31051700u); /* 0x31002FCD: push 0x31051700 */ 4991 PUSH32(esp, esi); /* 0x31002FD2: push esi */ 4992 esi = MEM32(0x31048098); /* 0x31002FD3: mov esi, dword ptr [0x31048098] */ 4993 MEM32(ebp + (-0x54)) = edx; /* 0x31002FD9: mov dword ptr [ebp - 0x54], edx */ 4994 RECOMP_ICALL(esi); /* 0x31002FDC: call esi */ 4995 RECOMP_FLAGS_IN(); 4996 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4997 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4998 esp = esp + 8; /* 0x31002FDE: add esp, 8 */ 4999 _flag_k = FK_ADD; 5000 ecx = eax; /* 0x31002FE1: mov ecx, eax */ 5001 RECOMP_ICALL(MEM32(0x310480C0)); /* 0x31002FE3: call dword ptr [0x310480c0] */ 5002 RECOMP_FLAGS_IN(); 5003 PUSH32(esp, eax); /* 0x31002FE9: push eax */ 5004 RECOMP_ICALL(esi); /* 0x31002FEA: call esi */ 5005 RECOMP_FLAGS_IN(); 5006 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 5007 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5008 esp = esp + 8; /* 0x31002FEC: add esp, 8 */ 5009 _flag_k = FK_ADD; 5010 ecx = eax; /* 0x31002FEF: mov ecx, eax */ 5011 RECOMP_ICALL(MEM32(0x310480C0)); /* 0x31002FF1: call dword ptr [0x310480c0] */ 5012 RECOMP_FLAGS_IN(); 5013 PUSH32(esp, eax); /* 0x31002FF7: push eax */ 5014 RECOMP_ICALL(esi); /* 0x31002FF8: call esi */ 5015 RECOMP_FLAGS_IN(); 5016 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 5017 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5018 esp = esp + 8; /* 0x31002FFA: add esp, 8 */ 5019 _flag_k = FK_ADD; 5020 ecx = eax; /* 0x31002FFD: mov ecx, eax */ 5021 RECOMP_ICALL(MEM32(0x310480C0)); /* 0x31002FFF: call dword ptr [0x310480c0] */ 5022 RECOMP_FLAGS_IN(); 5023 PUSH32(esp, eax); /* 0x31003005: push eax */ 5024 RECOMP_ICALL(esi); /* 0x31003006: call esi */ 5025 RECOMP_FLAGS_IN(); 5026 PUSH32(esp, eax); /* 0x31003008: push eax */ 5027 RECOMP_ICALL(0x31001060u); /* 0x31003009: call 0x31001060 */ /* not lifted */ 5028 RECOMP_FLAGS_IN(); 5029 edx = MEM32(ebp + (-0x4C)); /* 0x3100300E: mov edx, dword ptr [ebp - 0x4c] */ 5030 ecx = eax; /* 0x31003011: mov ecx, eax */ 5031 eax = 0x10624DD3u; /* 0x31003013: mov eax, 0x10624dd3 */ 5032 { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x31003018: imul edx */ 5033 eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r; 5034 _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; } 5035 if (6u) _cf = (((edx) >> 5) & 1u); /* 0x3100301A: sar edx, 6 */ 5036 if (6u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 6u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 5037 edx = (uint32_t)((int32_t)edx >> 6u); 5038 eax = edx; /* 0x3100301D: mov eax, edx */ 5039 if (31u) _cf = (((eax) >> 30) & 1u); /* 0x3100301F: shr eax, 0x1f */ 5040 if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 5041 eax = eax >> 31u; /* 0x3100301F: shr eax, 0x1f */ 5042 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 5043 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5044 edx = edx + eax; /* 0x31003022: add edx, eax */ 5045 _flag_k = FK_ADD; 5046 eax = MEM32(ebp + (-0x50)); /* 0x31003024: mov eax, dword ptr [ebp - 0x50] */ 5047 eax = eax + eax * 4; /* 0x31003027: lea eax, [eax + eax*4] */ 5048 eax = eax + eax * 4; /* 0x3100302A: lea eax, [eax + eax*4] */ 5049 eax = eax + eax * 4; /* 0x3100302D: lea eax, [eax + eax*4] */ 5050 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 5051 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5052 esp = esp + 0xCu; /* 0x31003030: add esp, 0xc */ 5053 _flag_k = FK_ADD; 5054 edx = edx + eax * 8; /* 0x31003033: lea edx, [edx + eax*8] */ 5055 PUSH32(esp, edx); /* 0x31003036: push edx */ 5056 PUSH32(esp, 0x310516F4u); /* 0x31003037: push 0x310516f4 */ 5057 PUSH32(esp, ecx); /* 0x3100303C: push ecx */ 5058 RECOMP_ICALL(esi); /* 0x3100303D: call esi */ 5059 RECOMP_FLAGS_IN(); 5060 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 5061 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5062 esp = esp + 8; /* 0x3100303F: add esp, 8 */ 5063 _flag_k = FK_ADD; 5064 ecx = eax; /* 0x31003042: mov ecx, eax */ 5065 RECOMP_ICALL(MEM32(0x310480C0)); /* 0x31003044: call dword ptr [0x310480c0] */ 5066 RECOMP_FLAGS_IN(); 5067 PUSH32(esp, eax); /* 0x3100304A: push eax */ 5068 RECOMP_ICALL(MEM32(0x31048138)); /* 0x3100304B: call dword ptr [0x31048138] */ 5069 RECOMP_FLAGS_IN(); 5070 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5071 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5072 esp = esp + 4; /* 0x31003051: add esp, 4 */ 5073 _flag_k = FK_ADD; 5074 L_31003054: 5075 ecx = ebp + (-0x10); /* 0x31003054: lea ecx, [ebp - 0x10] */ 5076 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x31003057: mov dword ptr [ebp - 4], 0xffffffff */ 5077 RECOMP_ICALL(0x31003EC0u); /* 0x3100305E: call 0x31003ec0 */ /* not lifted */ 5078 RECOMP_FLAGS_IN(); 5079 ecx = MEM32(ebp + (-0xC)); /* 0x31003063: mov ecx, dword ptr [ebp - 0xc] */ 5080 eax = MEM32(ebp + 0xC); /* 0x31003066: mov eax, dword ptr [ebp + 0xc] */ 5081 edi = POP32_VAL(esp); /* 0x31003069: pop edi */ 5082 esi = POP32_VAL(esp); /* 0x3100306A: pop esi */ 5083 ebx = POP32_VAL(esp); /* 0x3100306B: pop ebx */ 5084 MEM32(FS_BASE + (0)) = ecx; /* 0x3100306C: mov dword ptr fs:[0], ecx */ 5085 esp = ebp; /* 0x31003073: mov esp, ebp */ 5086 ebp = POP32_VAL(esp); /* 0x31003075: pop ebp */ 5087 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x31003076: ret 0x10 */ 5088 RECOMP_REGS_OUT(); 5089 } 5090 5091 void sub_31003080(void) { 5092 int _fpu_cmp = 0; 5093 uint32_t _cf = 0; 5094 int _df = 1; 5095 uint32_t _flag_k = FK_NONE; 5096 uint32_t _flag_a = 0, _flag_b = 0; 5097 uint32_t _itail_tgt = 0; 5098 RECOMP_REGS_LOCALS 5099 RECOMP_ENTER(0x31003080u); 5100 5101 L_31003080: 5102 PUSH32(esp, ebp); /* 0x31003080: push ebp */ 5103 ebp = esp; /* 0x31003081: mov ebp, esp */ 5104 PUSH32(esp, 0xFFFFFFFFu); /* 0x31003083: push -1 */ 5105 PUSH32(esp, 0x31046E2Fu); /* 0x31003085: push 0x31046e2f */ 5106 eax = MEM32(FS_BASE + (0)); /* 0x3100308A: mov eax, dword ptr fs:[0] */ 5107 PUSH32(esp, eax); /* 0x31003090: push eax */ 5108 MEM32(FS_BASE + (0)) = esp; /* 0x31003091: mov dword ptr fs:[0], esp */ 5109 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x48u); 5110 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5111 esp = esp - 0x48u; /* 0x31003098: sub esp, 0x48 */ 5112 _flag_k = FK_CMP; 5113 PUSH32(esp, ebx); /* 0x3100309B: push ebx */ 5114 PUSH32(esp, esi); /* 0x3100309C: push esi */ 5115 esi = ecx; /* 0x3100309D: mov esi, ecx */ 5116 SET_LO8(eax, MEM8(esi + 0x124)); /* 0x3100309F: mov al, byte ptr [esi + 0x124] */ 5117 PUSH32(esp, edi); /* 0x310030A5: push edi */ 5118 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5119 edi = 0; /* 0x310030A6: xor edi, edi */ 5120 _cf = 0; 5121 _flag_k = FK_TEST; 5122 /* test LO8(eax), LO8(eax) */ /* 0x310030A8: test al, al */ 5123 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5124 _cf = 0; 5125 _flag_k = FK_NARROW(FK_TEST, 24); 5126 MEM32(ebp + (-0x34)) = edi; /* 0x310030AA: mov dword ptr [ebp - 0x34], edi */ 5127 MEM32(ebp + (-0x54)) = edi; /* 0x310030AD: mov dword ptr [ebp - 0x54], edi */ 5128 MEM32(ebp + (-0x50)) = edi; /* 0x310030B0: mov dword ptr [ebp - 0x50], edi */ 5129 MEM32(ebp + (-0x4C)) = edi; /* 0x310030B3: mov dword ptr [ebp - 0x4c], edi */ 5130 MEM32(ebp + (-0x48)) = edi; /* 0x310030B6: mov dword ptr [ebp - 0x48], edi */ 5131 if (TEST_Z(_flag_a, _flag_b)) goto L_310030E0; /* 0x310030B9: je 0x310030e0 */ 5132 L_310030BB: 5133 eax = ebp + (-0x30); /* 0x310030BB: lea eax, [ebp - 0x30] */ 5134 PUSH32(esp, eax); /* 0x310030BE: push eax */ 5135 RECOMP_ICALL(MEM32(0x3104804C)); /* 0x310030BF: call dword ptr [0x3104804c] */ 5136 RECOMP_FLAGS_IN(); 5137 ecx = ebp + (-0x30); /* 0x310030C5: lea ecx, [ebp - 0x30] */ 5138 PUSH32(esp, ecx); /* 0x310030C8: push ecx */ 5139 ecx = ebp + (-0x28); /* 0x310030C9: lea ecx, [ebp - 0x28] */ 5140 RECOMP_ICALL(MEM32(0x31048298)); /* 0x310030CC: call dword ptr [0x31048298] */ 5141 RECOMP_FLAGS_IN(); 5142 ecx = MEM32(eax); /* 0x310030D2: mov ecx, dword ptr [eax] */ 5143 MEM32(ebp + (-0x1C)) = ecx; /* 0x310030D4: mov dword ptr [ebp - 0x1c], ecx */ 5144 eax = MEM32(eax + 0x4); /* 0x310030D7: mov eax, dword ptr [eax + 4] */ 5145 MEM32(ebp + (-0x54)) = ecx; /* 0x310030DA: mov dword ptr [ebp - 0x54], ecx */ 5146 MEM32(ebp + (-0x50)) = eax; /* 0x310030DD: mov dword ptr [ebp - 0x50], eax */ 5147 L_310030E0: 5148 ecx = ebp + (-0x14); /* 0x310030E0: lea ecx, [ebp - 0x14] */ 5149 MEM8(ebp + (-0xD)) = (uint8_t)(0); /* 0x310030E3: mov byte ptr [ebp - 0xd], 0 */ 5150 RECOMP_ICALL(0x310045B0u); /* 0x310030E7: call 0x310045b0 */ /* not lifted */ 5151 RECOMP_FLAGS_IN(); 5152 PUSH32(esp, 1); /* 0x310030EC: push 1 */ 5153 PUSH32(esp, esi); /* 0x310030EE: push esi */ 5154 ecx = ebp + (-0x20); /* 0x310030EF: lea ecx, [ebp - 0x20] */ 5155 MEM32(ebp + (-0x4)) = 1; /* 0x310030F2: mov dword ptr [ebp - 4], 1 */ 5156 MEM32(ebp + (-0x24)) = edi; /* 0x310030F9: mov dword ptr [ebp - 0x24], edi */ 5157 RECOMP_ICALL(0x31003EA0u); /* 0x310030FC: call 0x31003ea0 */ /* not lifted */ 5158 RECOMP_FLAGS_IN(); 5159 /* cmp MEM32(esi + 0x114), edi */ /* 0x31003101: cmp dword ptr [esi + 0x114], edi */ 5160 _flag_a = (uint32_t)(MEM32(esi + 0x114)); _flag_b = (uint32_t)(edi); 5161 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5162 _flag_k = FK_CMP; 5163 ebx = MEM32(ebp + 0x10); /* 0x31003107: mov ebx, dword ptr [ebp + 0x10] */ 5164 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x3100310A: mov byte ptr [ebp - 4], 2 */ 5165 if (CMP_EQ(_flag_a, _flag_b)) goto L_31003175; /* 0x3100310E: je 0x31003175 */ 5166 L_31003110: 5167 edi = MEM32(ebp + 0xC); /* 0x31003110: mov edi, dword ptr [ebp + 0xc] */ 5168 PUSH32(esp, ebx); /* 0x31003113: push ebx */ 5169 PUSH32(esp, edi); /* 0x31003114: push edi */ 5170 ecx = esi; /* 0x31003115: mov ecx, esi */ 5171 RECOMP_ICALL(0x31002B10u); /* 0x31003117: call 0x31002b10 */ /* not lifted */ 5172 RECOMP_FLAGS_IN(); 5173 /* test eax, eax */ /* 0x3100311C: test eax, eax */ 5174 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5175 _cf = 0; 5176 _flag_k = FK_TEST; 5177 if (TEST_Z(_flag_a, _flag_b)) goto L_31003178; /* 0x3100311E: je 0x31003178 */ 5178 L_31003120: 5179 ecx = MEM32(esi + 0x114); /* 0x31003120: mov ecx, dword ptr [esi + 0x114] */ 5180 PUSH32(esp, edi); /* 0x31003126: push edi */ 5181 PUSH32(esp, eax); /* 0x31003127: push eax */ 5182 edx = ebp + (-0x18); /* 0x31003128: lea edx, [ebp - 0x18] */ 5183 PUSH32(esp, edx); /* 0x3100312B: push edx */ 5184 RECOMP_ICALL(0x310084C0u); /* 0x3100312C: call 0x310084c0 */ /* not lifted */ 5185 RECOMP_FLAGS_IN(); 5186 PUSH32(esp, eax); /* 0x31003131: push eax */ 5187 ecx = ebp + (-0x14); /* 0x31003132: lea ecx, [ebp - 0x14] */ 5188 MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x31003135: mov byte ptr [ebp - 4], 3 */ 5189 RECOMP_ICALL(0x310046E0u); /* 0x31003139: call 0x310046e0 */ /* not lifted */ 5190 RECOMP_FLAGS_IN(); 5191 ecx = ebp + (-0x18); /* 0x3100313E: lea ecx, [ebp - 0x18] */ 5192 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x31003141: mov byte ptr [ebp - 4], 2 */ 5193 RECOMP_ICALL(0x31004760u); /* 0x31003145: call 0x31004760 */ /* not lifted */ 5194 RECOMP_FLAGS_IN(); 5195 eax = MEM32(ebp + (-0x14)); /* 0x3100314A: mov eax, dword ptr [ebp - 0x14] */ 5196 /* cmp MEM32(eax), 0x40000000u */ /* 0x3100314D: cmp dword ptr [eax], 0x40000000 */ 5197 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x40000000u); 5198 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5199 _flag_k = FK_CMP; 5200 if (CMP_AE(_flag_a, _flag_b)) goto L_31003178; /* 0x31003153: jae 0x31003178 */ 5201 L_31003155: 5202 ecx = MEM32(0x310481FC); /* 0x31003155: mov ecx, dword ptr [0x310481fc] */ 5203 PUSH32(esp, ebx); /* 0x3100315B: push ebx */ 5204 PUSH32(esp, edi); /* 0x3100315C: push edi */ 5205 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x40u); 5206 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5207 ecx = ecx + 0x40u; /* 0x3100315D: add ecx, 0x40 */ 5208 _flag_k = FK_ADD; 5209 PUSH32(esp, 0x3105171Cu); /* 0x31003160: push 0x3105171c */ 5210 PUSH32(esp, ecx); /* 0x31003165: push ecx */ 5211 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x31003166: call dword ptr [0x310481f8] */ 5212 RECOMP_FLAGS_IN(); 5213 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 5214 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5215 esp = esp + 0x10u; /* 0x3100316C: add esp, 0x10 */ 5216 _flag_k = FK_ADD; 5217 MEM8(ebp + (-0xD)) = (uint8_t)(1); /* 0x3100316F: mov byte ptr [ebp - 0xd], 1 */ 5218 goto L_31003178; /* 0x31003173: jmp 0x31003178 */ 5219 L_31003175: 5220 edi = MEM32(ebp + 0xC); /* 0x31003175: mov edi, dword ptr [ebp + 0xc] */ 5221 L_31003178: 5222 eax = MEM32(esi + 0x114); /* 0x31003178: mov eax, dword ptr [esi + 0x114] */ 5223 /* test eax, eax */ /* 0x3100317E: test eax, eax */ 5224 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5225 _cf = 0; 5226 _flag_k = FK_TEST; 5227 if (TEST_Z(_flag_a, _flag_b)) goto L_3100318C; /* 0x31003180: je 0x3100318c */ 5228 L_31003182: 5229 /* cmp MEM8(ebp + (-0xD)), 1 */ /* 0x31003182: cmp byte ptr [ebp - 0xd], 1 */ 5230 _flag_a = (uint32_t)(MEM8(ebp + (-0xD))) << 24; _flag_b = (uint32_t)(1) << 24; 5231 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5232 _flag_k = FK_NARROW(FK_CMP, 24); 5233 if (CMP_NE(_flag_a, _flag_b)) goto L_310032BC; /* 0x31003186: jne 0x310032bc */ 5234 L_3100318C: 5235 PUSH32(esp, ebx); /* 0x3100318C: push ebx */ 5236 PUSH32(esp, edi); /* 0x3100318D: push edi */ 5237 ecx = esi; /* 0x3100318E: mov ecx, esi */ 5238 RECOMP_ICALL(0x31002A30u); /* 0x31003190: call 0x31002a30 */ /* not lifted */ 5239 RECOMP_FLAGS_IN(); 5240 /* test eax, eax */ /* 0x31003195: test eax, eax */ 5241 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5242 _cf = 0; 5243 _flag_k = FK_TEST; 5244 if (TEST_NZ(_flag_a, _flag_b)) goto L_310032BC; /* 0x31003197: jne 0x310032bc */ 5245 L_3100319D: 5246 edx = MEM32(esi + 0x110); /* 0x3100319D: mov edx, dword ptr [esi + 0x110] */ 5247 SET_LO16(eax, MEM16(edx + 0xA0)); /* 0x310031A3: mov ax, word ptr [edx + 0xa0] */ 5248 PUSH32(esp, eax); /* 0x310031AA: push eax */ 5249 RECOMP_ICALL(0x3101B32Bu); /* 0x310031AB: call 0x3101b32b */ /* not lifted */ 5250 RECOMP_FLAGS_IN(); 5251 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5252 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5253 esp = esp + 4; /* 0x310031B0: add esp, 4 */ 5254 _flag_k = FK_ADD; 5255 ecx = ebp + (-0x18); /* 0x310031B3: lea ecx, [ebp - 0x18] */ 5256 ebx = eax; /* 0x310031B6: mov ebx, eax */ 5257 RECOMP_ICALL(0x310045B0u); /* 0x310031B8: call 0x310045b0 */ /* not lifted */ 5258 RECOMP_FLAGS_IN(); 5259 /* cmp ebx, MEM32(esi + 0x10C) */ /* 0x310031BD: cmp ebx, dword ptr [esi + 0x10c] */ 5260 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x10C)); 5261 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5262 _flag_k = FK_CMP; 5263 edi = MEM32(esi + 0x108); /* 0x310031C3: mov edi, dword ptr [esi + 0x108] */ 5264 MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x310031C9: mov byte ptr [ebp - 4], 4 */ 5265 if (CMP_BE(_flag_a, _flag_b)) goto L_31003232; /* 0x310031CD: jbe 0x31003232 */ 5266 L_310031CF: 5267 /* cmp ebx, 0x4000u */ /* 0x310031CF: cmp ebx, 0x4000 */ 5268 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x4000u); 5269 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5270 _flag_k = FK_CMP; 5271 if (CMP_BE(_flag_a, _flag_b)) goto L_3100320E; /* 0x310031D5: jbe 0x3100320e */ 5272 L_310031D7: 5273 PUSH32(esp, ebx); /* 0x310031D7: push ebx */ 5274 ecx = ebp + (-0x24); /* 0x310031D8: lea ecx, [ebp - 0x24] */ 5275 RECOMP_ICALL(0x31004520u); /* 0x310031DB: call 0x31004520 */ /* not lifted */ 5276 RECOMP_FLAGS_IN(); 5277 PUSH32(esp, eax); /* 0x310031E0: push eax */ 5278 ecx = ebp + (-0x18); /* 0x310031E1: lea ecx, [ebp - 0x18] */ 5279 MEM8(ebp + (-0x4)) = (uint8_t)(5); /* 0x310031E4: mov byte ptr [ebp - 4], 5 */ 5280 RECOMP_ICALL(0x310046E0u); /* 0x310031E8: call 0x310046e0 */ /* not lifted */ 5281 RECOMP_FLAGS_IN(); 5282 ecx = ebp + (-0x24); /* 0x310031ED: lea ecx, [ebp - 0x24] */ 5283 MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x310031F0: mov byte ptr [ebp - 4], 4 */ 5284 RECOMP_ICALL(0x31004760u); /* 0x310031F4: call 0x31004760 */ /* not lifted */ 5285 RECOMP_FLAGS_IN(); 5286 eax = MEM32(ebp + (-0x18)); /* 0x310031F9: mov eax, dword ptr [ebp - 0x18] */ 5287 /* cmp MEM32(eax), 0x80000000u */ /* 0x310031FC: cmp dword ptr [eax], 0x80000000 */ 5288 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x80000000u); 5289 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5290 _flag_k = FK_CMP; 5291 if (CMP_AE(_flag_a, _flag_b)) goto L_31003209; /* 0x31003202: jae 0x31003209 */ 5292 L_31003204: 5293 edi = eax + 0x8; /* 0x31003204: lea edi, [eax + 8] */ 5294 goto L_31003232; /* 0x31003207: jmp 0x31003232 */ 5295 L_31003209: 5296 edi = MEM32(eax + 0x8); /* 0x31003209: mov edi, dword ptr [eax + 8] */ 5297 goto L_31003232; /* 0x3100320C: jmp 0x31003232 */ 5298 L_3100320E: 5299 /* test edi, edi */ /* 0x3100320E: test edi, edi */ 5300 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 5301 _cf = 0; 5302 _flag_k = FK_TEST; 5303 if (TEST_Z(_flag_a, _flag_b)) goto L_3100321B; /* 0x31003210: je 0x3100321b */ 5304 L_31003212: 5305 PUSH32(esp, edi); /* 0x31003212: push edi */ 5306 RECOMP_ICALL(0x31046858u); /* 0x31003213: call 0x31046858 */ /* not lifted */ 5307 RECOMP_FLAGS_IN(); 5308 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5309 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5310 esp = esp + 4; /* 0x31003218: add esp, 4 */ 5311 _flag_k = FK_ADD; 5312 L_3100321B: 5313 PUSH32(esp, ebx); /* 0x3100321B: push ebx */ 5314 MEM32(esi + 0x10C) = ebx; /* 0x3100321C: mov dword ptr [esi + 0x10c], ebx */ 5315 RECOMP_ICALL(0x310468DAu); /* 0x31003222: call 0x310468da */ /* not lifted */ 5316 RECOMP_FLAGS_IN(); 5317 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5318 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5319 esp = esp + 4; /* 0x31003227: add esp, 4 */ 5320 _flag_k = FK_ADD; 5321 MEM32(esi + 0x108) = eax; /* 0x3100322A: mov dword ptr [esi + 0x108], eax */ 5322 edi = eax; /* 0x31003230: mov edi, eax */ 5323 L_31003232: 5324 ecx = MEM32(esi + 0x110); /* 0x31003232: mov ecx, dword ptr [esi + 0x110] */ 5325 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5326 edx = 0; /* 0x31003238: xor edx, edx */ 5327 _cf = 0; 5328 _flag_k = FK_TEST; 5329 SET_LO16(edx, MEM16(ecx + 0xA0)); /* 0x3100323A: mov dx, word ptr [ecx + 0xa0] */ 5330 PUSH32(esp, ebx); /* 0x31003241: push ebx */ 5331 PUSH32(esp, edi); /* 0x31003242: push edi */ 5332 PUSH32(esp, edx); /* 0x31003243: push edx */ 5333 RECOMP_ICALL(0x3101BC3Bu); /* 0x31003244: call 0x3101bc3b */ /* not lifted */ 5334 RECOMP_FLAGS_IN(); 5335 eax = MEM32(ebp + (-0x18)); /* 0x31003249: mov eax, dword ptr [ebp - 0x18] */ 5336 ecx = MEM32(eax); /* 0x3100324C: mov ecx, dword ptr [eax] */ 5337 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0xFFFFFFF4u); 5338 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5339 ebx = ebx + 0xFFFFFFF4u; /* 0x3100324E: add ebx, -0xc */ 5340 _flag_k = FK_ADD; 5341 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 5342 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5343 esp = esp + 0xCu; /* 0x31003251: add esp, 0xc */ 5344 _flag_k = FK_ADD; 5345 /* cmp ecx, 0x40000000u */ /* 0x31003254: cmp ecx, 0x40000000 */ 5346 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x40000000u); 5347 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5348 _flag_k = FK_CMP; 5349 MEM32(ebp + (-0x24)) = ebx; /* 0x3100325A: mov dword ptr [ebp - 0x24], ebx */ 5350 if (CMP_AE(_flag_a, _flag_b)) goto L_31003284; /* 0x3100325D: jae 0x31003284 */ 5351 L_3100325F: 5352 PUSH32(esp, 0); /* 0x3100325F: push 0 */ 5353 PUSH32(esp, ebx); /* 0x31003261: push ebx */ 5354 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xCu); 5355 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5356 edi = edi + 0xCu; /* 0x31003262: add edi, 0xc */ 5357 _flag_k = FK_ADD; 5358 PUSH32(esp, edi); /* 0x31003265: push edi */ 5359 ecx = ebp + (-0x2C); /* 0x31003266: lea ecx, [ebp - 0x2c] */ 5360 RECOMP_ICALL(0x310045D0u); /* 0x31003269: call 0x310045d0 */ /* not lifted */ 5361 RECOMP_FLAGS_IN(); 5362 PUSH32(esp, eax); /* 0x3100326E: push eax */ 5363 ecx = ebp + (-0x14); /* 0x3100326F: lea ecx, [ebp - 0x14] */ 5364 MEM8(ebp + (-0x4)) = (uint8_t)(6); /* 0x31003272: mov byte ptr [ebp - 4], 6 */ 5365 RECOMP_ICALL(0x310046E0u); /* 0x31003276: call 0x310046e0 */ /* not lifted */ 5366 RECOMP_FLAGS_IN(); 5367 MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x3100327B: mov byte ptr [ebp - 4], 4 */ 5368 ecx = ebp + (-0x2C); /* 0x3100327F: lea ecx, [ebp - 0x2c] */ 5369 goto L_310032A5; /* 0x31003282: jmp 0x310032a5 */ 5370 L_31003284: 5371 PUSH32(esp, ebx); /* 0x31003284: push ebx */ 5372 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xCu); 5373 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5374 edi = edi + 0xCu; /* 0x31003285: add edi, 0xc */ 5375 _flag_k = FK_ADD; 5376 PUSH32(esp, edi); /* 0x31003288: push edi */ 5377 ecx = ebp + (-0x2C); /* 0x31003289: lea ecx, [ebp - 0x2c] */ 5378 RECOMP_ICALL(0x31004670u); /* 0x3100328C: call 0x31004670 */ /* not lifted */ 5379 RECOMP_FLAGS_IN(); 5380 PUSH32(esp, eax); /* 0x31003291: push eax */ 5381 ecx = ebp + (-0x14); /* 0x31003292: lea ecx, [ebp - 0x14] */ 5382 MEM8(ebp + (-0x4)) = (uint8_t)(7); /* 0x31003295: mov byte ptr [ebp - 4], 7 */ 5383 RECOMP_ICALL(0x310046E0u); /* 0x31003299: call 0x310046e0 */ /* not lifted */ 5384 RECOMP_FLAGS_IN(); 5385 MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x3100329E: mov byte ptr [ebp - 4], 4 */ 5386 ecx = ebp + (-0x2C); /* 0x310032A2: lea ecx, [ebp - 0x2c] */ 5387 L_310032A5: 5388 RECOMP_ICALL(0x31004760u); /* 0x310032A5: call 0x31004760 */ /* not lifted */ 5389 RECOMP_FLAGS_IN(); 5390 ecx = ebp + (-0x18); /* 0x310032AA: lea ecx, [ebp - 0x18] */ 5391 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x310032AD: mov byte ptr [ebp - 4], 2 */ 5392 RECOMP_ICALL(0x31004760u); /* 0x310032B1: call 0x31004760 */ /* not lifted */ 5393 RECOMP_FLAGS_IN(); 5394 ebx = MEM32(ebp + 0x10); /* 0x310032B6: mov ebx, dword ptr [ebp + 0x10] */ 5395 edi = MEM32(ebp + 0xC); /* 0x310032B9: mov edi, dword ptr [ebp + 0xc] */ 5396 L_310032BC: 5397 SET_LO8(eax, MEM8(esi + 0x124)); /* 0x310032BC: mov al, byte ptr [esi + 0x124] */ 5398 /* test LO8(eax), LO8(eax) */ /* 0x310032C2: test al, al */ 5399 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5400 _cf = 0; 5401 _flag_k = FK_NARROW(FK_TEST, 24); 5402 if (TEST_Z(_flag_a, _flag_b)) goto L_310033BB; /* 0x310032C4: je 0x310033bb */ 5403 L_310032CA: 5404 ecx = ebp + (-0x1C); /* 0x310032CA: lea ecx, [ebp - 0x1c] */ 5405 PUSH32(esp, ecx); /* 0x310032CD: push ecx */ 5406 RECOMP_ICALL(MEM32(0x3104804C)); /* 0x310032CE: call dword ptr [0x3104804c] */ 5407 RECOMP_FLAGS_IN(); 5408 edx = ebp + (-0x1C); /* 0x310032D4: lea edx, [ebp - 0x1c] */ 5409 PUSH32(esp, edx); /* 0x310032D7: push edx */ 5410 ecx = ebp + (-0x3C); /* 0x310032D8: lea ecx, [ebp - 0x3c] */ 5411 RECOMP_ICALL(MEM32(0x31048298)); /* 0x310032DB: call dword ptr [0x31048298] */ 5412 RECOMP_FLAGS_IN(); 5413 ecx = MEM32(eax); /* 0x310032E1: mov ecx, dword ptr [eax] */ 5414 MEM32(ebp + (-0x30)) = ecx; /* 0x310032E3: mov dword ptr [ebp - 0x30], ecx */ 5415 edx = MEM32(eax + 0x4); /* 0x310032E6: mov edx, dword ptr [eax + 4] */ 5416 eax = ebp + (-0x54); /* 0x310032E9: lea eax, [ebp - 0x54] */ 5417 PUSH32(esp, eax); /* 0x310032EC: push eax */ 5418 ecx = ebp + (-0x30); /* 0x310032ED: lea ecx, [ebp - 0x30] */ 5419 MEM32(ebp + (-0x2C)) = edx; /* 0x310032F0: mov dword ptr [ebp - 0x2c], edx */ 5420 PUSH32(esp, ecx); /* 0x310032F3: push ecx */ 5421 edx = ebp + (-0x44); /* 0x310032F4: lea edx, [ebp - 0x44] */ 5422 PUSH32(esp, edx); /* 0x310032F7: push edx */ 5423 RECOMP_ICALL(MEM32(0x3104828C)); /* 0x310032F8: call dword ptr [0x3104828c] */ 5424 RECOMP_FLAGS_IN(); 5425 ecx = MEM32(eax); /* 0x310032FE: mov ecx, dword ptr [eax] */ 5426 MEM32(ebp + (-0x4C)) = ecx; /* 0x31003300: mov dword ptr [ebp - 0x4c], ecx */ 5427 edx = MEM32(eax + 0x4); /* 0x31003303: mov edx, dword ptr [eax + 4] */ 5428 eax = MEM32(0x31048288); /* 0x31003306: mov eax, dword ptr [0x31048288] */ 5429 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 5430 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5431 esp = esp + 0xCu; /* 0x3100330B: add esp, 0xc */ 5432 _flag_k = FK_ADD; 5433 MEM32(ebp + (-0x48)) = edx; /* 0x3100330E: mov dword ptr [ebp - 0x48], edx */ 5434 ecx = MEM32(eax); /* 0x31003311: mov ecx, dword ptr [eax] */ 5435 PUSH32(esp, 0x31051714u); /* 0x31003313: push 0x31051714 */ 5436 MEM32(ebp + (-0x54)) = ecx; /* 0x31003318: mov dword ptr [ebp - 0x54], ecx */ 5437 edx = MEM32(eax + 0x4); /* 0x3100331B: mov edx, dword ptr [eax + 4] */ 5438 eax = MEM32(ebp + (-0x24)); /* 0x3100331E: mov eax, dword ptr [ebp - 0x24] */ 5439 PUSH32(esp, eax); /* 0x31003321: push eax */ 5440 PUSH32(esp, 0x3105170Cu); /* 0x31003322: push 0x3105170c */ 5441 PUSH32(esp, ebx); /* 0x31003327: push ebx */ 5442 PUSH32(esp, 0x31051708u); /* 0x31003328: push 0x31051708 */ 5443 PUSH32(esp, edi); /* 0x3100332D: push edi */ 5444 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x128u); 5445 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5446 esi = esi + 0x128u; /* 0x3100332E: add esi, 0x128 */ 5447 _flag_k = FK_ADD; 5448 PUSH32(esp, 0x31051700u); /* 0x31003334: push 0x31051700 */ 5449 PUSH32(esp, esi); /* 0x31003339: push esi */ 5450 esi = MEM32(0x31048098); /* 0x3100333A: mov esi, dword ptr [0x31048098] */ 5451 MEM32(ebp + (-0x50)) = edx; /* 0x31003340: mov dword ptr [ebp - 0x50], edx */ 5452 RECOMP_ICALL(esi); /* 0x31003343: call esi */ 5453 RECOMP_FLAGS_IN(); 5454 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 5455 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5456 esp = esp + 8; /* 0x31003345: add esp, 8 */ 5457 _flag_k = FK_ADD; 5458 ecx = eax; /* 0x31003348: mov ecx, eax */ 5459 RECOMP_ICALL(MEM32(0x310480C0)); /* 0x3100334A: call dword ptr [0x310480c0] */ 5460 RECOMP_FLAGS_IN(); 5461 PUSH32(esp, eax); /* 0x31003350: push eax */ 5462 RECOMP_ICALL(esi); /* 0x31003351: call esi */ 5463 RECOMP_FLAGS_IN(); 5464 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 5465 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5466 esp = esp + 8; /* 0x31003353: add esp, 8 */ 5467 _flag_k = FK_ADD; 5468 ecx = eax; /* 0x31003356: mov ecx, eax */ 5469 RECOMP_ICALL(MEM32(0x310480C0)); /* 0x31003358: call dword ptr [0x310480c0] */ 5470 RECOMP_FLAGS_IN(); 5471 PUSH32(esp, eax); /* 0x3100335E: push eax */ 5472 RECOMP_ICALL(esi); /* 0x3100335F: call esi */ 5473 RECOMP_FLAGS_IN(); 5474 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 5475 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5476 esp = esp + 8; /* 0x31003361: add esp, 8 */ 5477 _flag_k = FK_ADD; 5478 ecx = eax; /* 0x31003364: mov ecx, eax */ 5479 RECOMP_ICALL(MEM32(0x310480C0)); /* 0x31003366: call dword ptr [0x310480c0] */ 5480 RECOMP_FLAGS_IN(); 5481 PUSH32(esp, eax); /* 0x3100336C: push eax */ 5482 RECOMP_ICALL(esi); /* 0x3100336D: call esi */ 5483 RECOMP_FLAGS_IN(); 5484 PUSH32(esp, eax); /* 0x3100336F: push eax */ 5485 RECOMP_ICALL(0x31001060u); /* 0x31003370: call 0x31001060 */ /* not lifted */ 5486 RECOMP_FLAGS_IN(); 5487 edx = MEM32(ebp + (-0x48)); /* 0x31003375: mov edx, dword ptr [ebp - 0x48] */ 5488 ecx = eax; /* 0x31003378: mov ecx, eax */ 5489 eax = 0x10624DD3u; /* 0x3100337A: mov eax, 0x10624dd3 */ 5490 { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x3100337F: imul edx */ 5491 eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r; 5492 _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; } 5493 if (6u) _cf = (((edx) >> 5) & 1u); /* 0x31003381: sar edx, 6 */ 5494 if (6u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 6u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 5495 edx = (uint32_t)((int32_t)edx >> 6u); 5496 eax = edx; /* 0x31003384: mov eax, edx */ 5497 if (31u) _cf = (((eax) >> 30) & 1u); /* 0x31003386: shr eax, 0x1f */ 5498 if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 5499 eax = eax >> 31u; /* 0x31003386: shr eax, 0x1f */ 5500 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 5501 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5502 edx = edx + eax; /* 0x31003389: add edx, eax */ 5503 _flag_k = FK_ADD; 5504 eax = MEM32(ebp + (-0x4C)); /* 0x3100338B: mov eax, dword ptr [ebp - 0x4c] */ 5505 eax = eax + eax * 4; /* 0x3100338E: lea eax, [eax + eax*4] */ 5506 eax = eax + eax * 4; /* 0x31003391: lea eax, [eax + eax*4] */ 5507 eax = eax + eax * 4; /* 0x31003394: lea eax, [eax + eax*4] */ 5508 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 5509 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5510 esp = esp + 0xCu; /* 0x31003397: add esp, 0xc */ 5511 _flag_k = FK_ADD; 5512 edx = edx + eax * 8; /* 0x3100339A: lea edx, [edx + eax*8] */ 5513 PUSH32(esp, edx); /* 0x3100339D: push edx */ 5514 PUSH32(esp, 0x310516F4u); /* 0x3100339E: push 0x310516f4 */ 5515 PUSH32(esp, ecx); /* 0x310033A3: push ecx */ 5516 RECOMP_ICALL(esi); /* 0x310033A4: call esi */ 5517 RECOMP_FLAGS_IN(); 5518 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 5519 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5520 esp = esp + 8; /* 0x310033A6: add esp, 8 */ 5521 _flag_k = FK_ADD; 5522 ecx = eax; /* 0x310033A9: mov ecx, eax */ 5523 RECOMP_ICALL(MEM32(0x310480C0)); /* 0x310033AB: call dword ptr [0x310480c0] */ 5524 RECOMP_FLAGS_IN(); 5525 PUSH32(esp, eax); /* 0x310033B1: push eax */ 5526 RECOMP_ICALL(MEM32(0x31048138)); /* 0x310033B2: call dword ptr [0x31048138] */ 5527 RECOMP_FLAGS_IN(); 5528 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5529 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5530 esp = esp + 4; /* 0x310033B8: add esp, 4 */ 5531 _flag_k = FK_ADD; 5532 L_310033BB: 5533 eax = MEM32(ebp + (-0x14)); /* 0x310033BB: mov eax, dword ptr [ebp - 0x14] */ 5534 MEM32(ebp + 0x10) = eax; /* 0x310033BE: mov dword ptr [ebp + 0x10], eax */ 5535 ebx = MEM32(ebp + 0x10); /* 0x310033C1: mov ebx, dword ptr [ebp + 0x10] */ 5536 _flag_a = __atomic_fetch_add((uint32_t *)ADDR(ebx), 1, __ATOMIC_SEQ_CST); _flag_b = 1; /* 0x310033C4: lock inc dword ptr [ebx] */ 5537 _flag_k = FK_INC; 5538 esi = MEM32(ebp + 0x8); /* 0x310033C7: mov esi, dword ptr [ebp + 8] */ 5539 ecx = MEM32(ebp + (-0x14)); /* 0x310033CA: mov ecx, dword ptr [ebp - 0x14] */ 5540 eax = 1; /* 0x310033CD: mov eax, 1 */ 5541 MEM32(esi) = ecx; /* 0x310033D2: mov dword ptr [esi], ecx */ 5542 MEM32(ebp + (-0x34)) = eax; /* 0x310033D4: mov dword ptr [ebp - 0x34], eax */ 5543 ecx = ebp + (-0x20); /* 0x310033D7: lea ecx, [ebp - 0x20] */ 5544 MEM8(ebp + (-0x4)) = (uint8_t)(LO8(eax)); /* 0x310033DA: mov byte ptr [ebp - 4], al */ 5545 RECOMP_ICALL(0x31003EC0u); /* 0x310033DD: call 0x31003ec0 */ /* not lifted */ 5546 RECOMP_FLAGS_IN(); 5547 ecx = ebp + (-0x14); /* 0x310033E2: lea ecx, [ebp - 0x14] */ 5548 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x310033E5: mov byte ptr [ebp - 4], 0 */ 5549 RECOMP_ICALL(0x31004760u); /* 0x310033E9: call 0x31004760 */ /* not lifted */ 5550 RECOMP_FLAGS_IN(); 5551 ecx = MEM32(ebp + (-0xC)); /* 0x310033EE: mov ecx, dword ptr [ebp - 0xc] */ 5552 edi = POP32_VAL(esp); /* 0x310033F1: pop edi */ 5553 eax = esi; /* 0x310033F2: mov eax, esi */ 5554 esi = POP32_VAL(esp); /* 0x310033F4: pop esi */ 5555 ebx = POP32_VAL(esp); /* 0x310033F5: pop ebx */ 5556 MEM32(FS_BASE + (0)) = ecx; /* 0x310033F6: mov dword ptr fs:[0], ecx */ 5557 esp = ebp; /* 0x310033FD: mov esp, ebp */ 5558 ebp = POP32_VAL(esp); /* 0x310033FF: pop ebp */ 5559 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31003400: ret 0xc */ 5560 RECOMP_REGS_OUT(); 5561 } 5562 5563 void sub_31003410(void) { 5564 int _fpu_cmp = 0; 5565 uint32_t _cf = 0; 5566 int _df = 1; 5567 uint32_t _flag_k = FK_NONE; 5568 uint32_t _flag_a = 0, _flag_b = 0; 5569 uint32_t _itail_tgt = 0; 5570 RECOMP_REGS_LOCALS 5571 RECOMP_ENTER(0x31003410u); 5572 5573 L_31003410: 5574 PUSH32(esp, ebp); /* 0x31003410: push ebp */ 5575 ebp = esp; /* 0x31003411: mov ebp, esp */ 5576 PUSH32(esp, 0xFFFFFFFFu); /* 0x31003413: push -1 */ 5577 PUSH32(esp, 0x31046E72u); /* 0x31003415: push 0x31046e72 */ 5578 eax = MEM32(FS_BASE + (0)); /* 0x3100341A: mov eax, dword ptr fs:[0] */ 5579 PUSH32(esp, eax); /* 0x31003420: push eax */ 5580 MEM32(FS_BASE + (0)) = esp; /* 0x31003421: mov dword ptr fs:[0], esp */ 5581 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xECu); 5582 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5583 esp = esp - 0xECu; /* 0x31003428: sub esp, 0xec */ 5584 _flag_k = FK_CMP; 5585 PUSH32(esp, ebx); /* 0x3100342E: push ebx */ 5586 ebx = MEM32(0x31048320); /* 0x3100342F: mov ebx, dword ptr [0x31048320] */ 5587 PUSH32(esp, esi); /* 0x31003435: push esi */ 5588 PUSH32(esp, edi); /* 0x31003436: push edi */ 5589 PUSH32(esp, 8); /* 0x31003437: push 8 */ 5590 eax = ebp + (-0x70); /* 0x31003439: lea eax, [ebp - 0x70] */ 5591 edi = ecx; /* 0x3100343C: mov edi, ecx */ 5592 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5593 esi = 0; /* 0x3100343E: xor esi, esi */ 5594 _cf = 0; 5595 _flag_k = FK_TEST; 5596 PUSH32(esp, eax); /* 0x31003440: push eax */ 5597 ecx = ebp + (-0xF8); /* 0x31003441: lea ecx, [ebp - 0xf8] */ 5598 MEM32(ebp + (-0x10)) = esi; /* 0x31003447: mov dword ptr [ebp - 0x10], esi */ 5599 RECOMP_ICALL(ebx); /* 0x3100344A: call ebx */ 5600 RECOMP_FLAGS_IN(); 5601 ecx = MEM32(ebp + 0x8); /* 0x3100344C: mov ecx, dword ptr [ebp + 8] */ 5602 MEM32(ebp + (-0x4)) = esi; /* 0x3100344F: mov dword ptr [ebp - 4], esi */ 5603 esi = MEM32(0x3104831C); /* 0x31003452: mov esi, dword ptr [0x3104831c] */ 5604 PUSH32(esp, ecx); /* 0x31003458: push ecx */ 5605 ecx = ebp + (-0xF8); /* 0x31003459: lea ecx, [ebp - 0xf8] */ 5606 RECOMP_ICALL(esi); /* 0x3100345F: call esi */ 5607 RECOMP_FLAGS_IN(); 5608 edx = MEM32(ebp + 0xC); /* 0x31003461: mov edx, dword ptr [ebp + 0xc] */ 5609 PUSH32(esp, edx); /* 0x31003464: push edx */ 5610 ecx = eax; /* 0x31003465: mov ecx, eax */ 5611 RECOMP_ICALL(esi); /* 0x31003467: call esi */ 5612 RECOMP_FLAGS_IN(); 5613 PUSH32(esp, 8); /* 0x31003469: push 8 */ 5614 eax = ebp + (-0x68); /* 0x3100346B: lea eax, [ebp - 0x68] */ 5615 PUSH32(esp, eax); /* 0x3100346E: push eax */ 5616 ecx = ebp + (-0xB4); /* 0x3100346F: lea ecx, [ebp - 0xb4] */ 5617 RECOMP_ICALL(ebx); /* 0x31003475: call ebx */ 5618 RECOMP_FLAGS_IN(); 5619 ecx = MEM32(ebp + (-0x78)); /* 0x31003477: mov ecx, dword ptr [ebp - 0x78] */ 5620 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5621 edx = 0; /* 0x3100347A: xor edx, edx */ 5622 _cf = 0; 5623 _flag_k = FK_TEST; 5624 PUSH32(esp, 2); /* 0x3100347C: push 2 */ 5625 MEM32(ebp + (-0x74)) = ecx; /* 0x3100347E: mov dword ptr [ebp - 0x74], ecx */ 5626 MEM32(ebp + (-0x1C)) = edx; /* 0x31003481: mov dword ptr [ebp - 0x1c], edx */ 5627 PUSH32(esp, edi); /* 0x31003484: push edi */ 5628 ecx = ebp + (-0x14); /* 0x31003485: lea ecx, [ebp - 0x14] */ 5629 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x31003488: mov byte ptr [ebp - 4], 1 */ 5630 MEM32(ebp + (-0x18)) = edx; /* 0x3100348C: mov dword ptr [ebp - 0x18], edx */ 5631 RECOMP_ICALL(0x31003EA0u); /* 0x3100348F: call 0x31003ea0 */ /* not lifted */ 5632 RECOMP_FLAGS_IN(); 5633 edx = MEM32(edi + 0x110); /* 0x31003494: mov edx, dword ptr [edi + 0x110] */ 5634 eax = ebp + (-0x68); /* 0x3100349A: lea eax, [ebp - 0x68] */ 5635 PUSH32(esp, eax); /* 0x3100349D: push eax */ 5636 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5637 eax = 0; /* 0x3100349E: xor eax, eax */ 5638 _cf = 0; 5639 _flag_k = FK_TEST; 5640 SET_LO16(eax, MEM16(edx + 0xA0)); /* 0x310034A0: mov ax, word ptr [edx + 0xa0] */ 5641 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(1) << 16; 5642 SET_LO16(eax, LO16(eax) + 1); /* 0x310034A7: inc ax */ 5643 _flag_k = FK_NARROW(FK_INC, 16); 5644 ecx = ebp + (-0x70); /* 0x310034A9: lea ecx, [ebp - 0x70] */ 5645 PUSH32(esp, ecx); /* 0x310034AC: push ecx */ 5646 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x310034AD: mov byte ptr [ebp - 4], 2 */ 5647 PUSH32(esp, eax); /* 0x310034B1: push eax */ 5648 RECOMP_ICALL(0x310182EDu); /* 0x310034B2: call 0x310182ed */ /* not lifted */ 5649 RECOMP_FLAGS_IN(); 5650 eax = (int32_t)(int16_t)LO16(eax); /* 0x310034B7: movsx eax, ax */ 5651 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 5652 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5653 esp = esp + 0xCu; /* 0x310034BA: add esp, 0xc */ 5654 _flag_k = FK_ADD; 5655 /* test eax, eax */ /* 0x310034BD: test eax, eax */ 5656 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5657 _cf = 0; 5658 _flag_k = FK_TEST; 5659 if (TEST_Z(_flag_a, _flag_b)) goto L_3100355D; /* 0x310034BF: je 0x3100355d */ 5660 L_310034C5: 5661 /* cmp eax, 0x2Au */ /* 0x310034C5: cmp eax, 0x2a */ 5662 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x2Au); 5663 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5664 _flag_k = FK_CMP; 5665 if (CMP_EQ(_flag_a, _flag_b)) goto L_310034CF; /* 0x310034C8: je 0x310034cf */ 5666 L_310034CA: 5667 /* cmp eax, 0x65u */ /* 0x310034CA: cmp eax, 0x65 */ 5668 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x65u); 5669 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5670 _flag_k = FK_CMP; 5671 if (CMP_EQ(_flag_a, _flag_b)) goto L_310034DA; /* 0x310034CD: je 0x310034da */ 5672 L_310034CF: 5673 _flag_a = (uint32_t)((esi | 0xFFFFFFFFu)); _flag_b = (uint32_t)((esi | 0xFFFFFFFFu)); 5674 esi = esi | 0xFFFFFFFFu; /* 0x310034CF: or esi, 0xffffffff */ 5675 _cf = 0; 5676 _flag_k = FK_TEST; 5677 MEM32(ebp + (-0x10)) = esi; /* 0x310034D2: mov dword ptr [ebp - 0x10], esi */ 5678 goto L_310035FB; /* 0x310034D5: jmp 0x310035fb */ 5679 L_310034DA: 5680 ebx = MEM32(ebp + 0x10); /* 0x310034DA: mov ebx, dword ptr [ebp + 0x10] */ 5681 ecx = ebx + 0xC; /* 0x310034DD: lea ecx, [ebx + 0xc] */ 5682 PUSH32(esp, ecx); /* 0x310034E0: push ecx */ 5683 ecx = ebp + (-0x60); /* 0x310034E1: lea ecx, [ebp - 0x60] */ 5684 RECOMP_ICALL(MEM32(0x31048338)); /* 0x310034E4: call dword ptr [0x31048338] */ 5685 RECOMP_FLAGS_IN(); 5686 eax = MEM32(ebp + 0x8); /* 0x310034EA: mov eax, dword ptr [ebp + 8] */ 5687 edx = MEM32(ebp + (-0x24)); /* 0x310034ED: mov edx, dword ptr [ebp - 0x24] */ 5688 PUSH32(esp, eax); /* 0x310034F0: push eax */ 5689 ecx = ebp + (-0x60); /* 0x310034F1: lea ecx, [ebp - 0x60] */ 5690 MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x310034F4: mov byte ptr [ebp - 4], 4 */ 5691 MEM32(ebp + (-0x20)) = edx; /* 0x310034F8: mov dword ptr [ebp - 0x20], edx */ 5692 RECOMP_ICALL(esi); /* 0x310034FB: call esi */ 5693 RECOMP_FLAGS_IN(); 5694 ecx = MEM32(ebp + 0xC); /* 0x310034FD: mov ecx, dword ptr [ebp + 0xc] */ 5695 PUSH32(esp, ecx); /* 0x31003500: push ecx */ 5696 ecx = eax; /* 0x31003501: mov ecx, eax */ 5697 RECOMP_ICALL(esi); /* 0x31003503: call esi */ 5698 RECOMP_FLAGS_IN(); 5699 PUSH32(esp, ebx); /* 0x31003505: push ebx */ 5700 ecx = ebp + (-0x60); /* 0x31003506: lea ecx, [ebp - 0x60] */ 5701 MEM32(ebp + (-0x20)) = 0; /* 0x31003509: mov dword ptr [ebp - 0x20], 0 */ 5702 RECOMP_ICALL(esi); /* 0x31003510: call esi */ 5703 RECOMP_FLAGS_IN(); 5704 edx = MEM32(ebp + 0x14); /* 0x31003512: mov edx, dword ptr [ebp + 0x14] */ 5705 PUSH32(esp, ebx); /* 0x31003515: push ebx */ 5706 PUSH32(esp, edx); /* 0x31003516: push edx */ 5707 ecx = ebp + (-0x60); /* 0x31003517: lea ecx, [ebp - 0x60] */ 5708 RECOMP_ICALL(MEM32(0x3104833C)); /* 0x3100351A: call dword ptr [0x3104833c] */ 5709 RECOMP_FLAGS_IN(); 5710 esi = MEM32(ebp + (-0x50)); /* 0x31003520: mov esi, dword ptr [ebp - 0x50] */ 5711 ecx = ebp + (-0x60); /* 0x31003523: lea ecx, [ebp - 0x60] */ 5712 RECOMP_ICALL(MEM32(0x31048328)); /* 0x31003526: call dword ptr [0x31048328] */ 5713 RECOMP_FLAGS_IN(); 5714 PUSH32(esp, eax); /* 0x3100352C: push eax */ 5715 eax = MEM32(edi + 0x110); /* 0x3100352D: mov eax, dword ptr [edi + 0x110] */ 5716 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5717 ecx = 0; /* 0x31003533: xor ecx, ecx */ 5718 _cf = 0; 5719 _flag_k = FK_TEST; 5720 SET_LO16(ecx, MEM16(eax + 0xA0)); /* 0x31003535: mov cx, word ptr [eax + 0xa0] */ 5721 PUSH32(esp, esi); /* 0x3100353C: push esi */ 5722 PUSH32(esp, ecx); /* 0x3100353D: push ecx */ 5723 RECOMP_ICALL(0x3101B3A1u); /* 0x3100353E: call 0x3101b3a1 */ /* not lifted */ 5724 RECOMP_FLAGS_IN(); 5725 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 5726 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5727 esp = esp + 0xCu; /* 0x31003543: add esp, 0xc */ 5728 _flag_k = FK_ADD; 5729 _flag_a = (uint32_t)((esi | 0xFFFFFFFFu)); _flag_b = (uint32_t)((esi | 0xFFFFFFFFu)); 5730 esi = esi | 0xFFFFFFFFu; /* 0x31003546: or esi, 0xffffffff */ 5731 _cf = 0; 5732 _flag_k = FK_TEST; 5733 /* test LO16(eax), LO16(eax) */ /* 0x31003549: test ax, ax */ 5734 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 5735 _cf = 0; 5736 _flag_k = FK_NARROW(FK_TEST, 16); 5737 if (TEST_Z(_flag_a, _flag_b)) goto L_31003551; /* 0x3100354C: je 0x31003551 */ 5738 L_3100354E: 5739 MEM32(ebp + (-0x10)) = esi; /* 0x3100354E: mov dword ptr [ebp - 0x10], esi */ 5740 L_31003551: 5741 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x31003551: mov byte ptr [ebp - 4], 2 */ 5742 ecx = ebp + (-0x60); /* 0x31003555: lea ecx, [ebp - 0x60] */ 5743 goto L_310035F5; /* 0x31003558: jmp 0x310035f5 */ 5744 L_3100355D: 5745 ebx = MEM32(0x31048324); /* 0x3100355D: mov ebx, dword ptr [0x31048324] */ 5746 edx = ebp + (-0x1C); /* 0x31003563: lea edx, [ebp - 0x1c] */ 5747 PUSH32(esp, edx); /* 0x31003566: push edx */ 5748 ecx = ebp + (-0xB4); /* 0x31003567: lea ecx, [ebp - 0xb4] */ 5749 RECOMP_ICALL(ebx); /* 0x3100356D: call ebx */ 5750 RECOMP_FLAGS_IN(); 5751 ecx = ebp + (-0x18); /* 0x3100356F: lea ecx, [ebp - 0x18] */ 5752 PUSH32(esp, ecx); /* 0x31003572: push ecx */ 5753 ecx = eax; /* 0x31003573: mov ecx, eax */ 5754 RECOMP_ICALL(ebx); /* 0x31003575: call ebx */ 5755 RECOMP_FLAGS_IN(); 5756 ebx = MEM32(ebp + 0x10); /* 0x31003577: mov ebx, dword ptr [ebp + 0x10] */ 5757 edx = ebx + 0xC; /* 0x3100357A: lea edx, [ebx + 0xc] */ 5758 PUSH32(esp, edx); /* 0x3100357D: push edx */ 5759 ecx = ebp + (-0x60); /* 0x3100357E: lea ecx, [ebp - 0x60] */ 5760 RECOMP_ICALL(MEM32(0x31048338)); /* 0x31003581: call dword ptr [0x31048338] */ 5761 RECOMP_FLAGS_IN(); 5762 ecx = MEM32(ebp + 0x8); /* 0x31003587: mov ecx, dword ptr [ebp + 8] */ 5763 eax = MEM32(ebp + (-0x24)); /* 0x3100358A: mov eax, dword ptr [ebp - 0x24] */ 5764 PUSH32(esp, ecx); /* 0x3100358D: push ecx */ 5765 ecx = ebp + (-0x60); /* 0x3100358E: lea ecx, [ebp - 0x60] */ 5766 MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x31003591: mov byte ptr [ebp - 4], 3 */ 5767 MEM32(ebp + (-0x20)) = eax; /* 0x31003595: mov dword ptr [ebp - 0x20], eax */ 5768 RECOMP_ICALL(esi); /* 0x31003598: call esi */ 5769 RECOMP_FLAGS_IN(); 5770 edx = MEM32(ebp + 0xC); /* 0x3100359A: mov edx, dword ptr [ebp + 0xc] */ 5771 PUSH32(esp, edx); /* 0x3100359D: push edx */ 5772 ecx = eax; /* 0x3100359E: mov ecx, eax */ 5773 RECOMP_ICALL(esi); /* 0x310035A0: call esi */ 5774 RECOMP_FLAGS_IN(); 5775 PUSH32(esp, ebx); /* 0x310035A2: push ebx */ 5776 ecx = ebp + (-0x60); /* 0x310035A3: lea ecx, [ebp - 0x60] */ 5777 MEM32(ebp + (-0x20)) = 0; /* 0x310035A6: mov dword ptr [ebp - 0x20], 0 */ 5778 RECOMP_ICALL(esi); /* 0x310035AD: call esi */ 5779 RECOMP_FLAGS_IN(); 5780 eax = MEM32(ebp + 0x14); /* 0x310035AF: mov eax, dword ptr [ebp + 0x14] */ 5781 PUSH32(esp, ebx); /* 0x310035B2: push ebx */ 5782 PUSH32(esp, eax); /* 0x310035B3: push eax */ 5783 ecx = ebp + (-0x60); /* 0x310035B4: lea ecx, [ebp - 0x60] */ 5784 RECOMP_ICALL(MEM32(0x3104833C)); /* 0x310035B7: call dword ptr [0x3104833c] */ 5785 RECOMP_FLAGS_IN(); 5786 esi = MEM32(ebp + (-0x50)); /* 0x310035BD: mov esi, dword ptr [ebp - 0x50] */ 5787 ecx = ebp + (-0x60); /* 0x310035C0: lea ecx, [ebp - 0x60] */ 5788 RECOMP_ICALL(MEM32(0x31048328)); /* 0x310035C3: call dword ptr [0x31048328] */ 5789 RECOMP_FLAGS_IN(); 5790 ecx = MEM32(edi + 0x110); /* 0x310035C9: mov ecx, dword ptr [edi + 0x110] */ 5791 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5792 edx = 0; /* 0x310035CF: xor edx, edx */ 5793 _cf = 0; 5794 _flag_k = FK_TEST; 5795 SET_LO16(edx, MEM16(ecx + 0xA0)); /* 0x310035D1: mov dx, word ptr [ecx + 0xa0] */ 5796 PUSH32(esp, eax); /* 0x310035D8: push eax */ 5797 PUSH32(esp, esi); /* 0x310035D9: push esi */ 5798 PUSH32(esp, edx); /* 0x310035DA: push edx */ 5799 RECOMP_ICALL(0x3101B69Cu); /* 0x310035DB: call 0x3101b69c */ /* not lifted */ 5800 RECOMP_FLAGS_IN(); 5801 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 5802 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5803 esp = esp + 0xCu; /* 0x310035E0: add esp, 0xc */ 5804 _flag_k = FK_ADD; 5805 _flag_a = (uint32_t)((esi | 0xFFFFFFFFu)); _flag_b = (uint32_t)((esi | 0xFFFFFFFFu)); 5806 esi = esi | 0xFFFFFFFFu; /* 0x310035E3: or esi, 0xffffffff */ 5807 _cf = 0; 5808 _flag_k = FK_TEST; 5809 /* test LO16(eax), LO16(eax) */ /* 0x310035E6: test ax, ax */ 5810 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 5811 _cf = 0; 5812 _flag_k = FK_NARROW(FK_TEST, 16); 5813 if (TEST_Z(_flag_a, _flag_b)) goto L_310035EE; /* 0x310035E9: je 0x310035ee */ 5814 L_310035EB: 5815 MEM32(ebp + (-0x10)) = esi; /* 0x310035EB: mov dword ptr [ebp - 0x10], esi */ 5816 L_310035EE: 5817 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x310035EE: mov byte ptr [ebp - 4], 2 */ 5818 ecx = ebp + (-0x60); /* 0x310035F2: lea ecx, [ebp - 0x60] */ 5819 L_310035F5: 5820 RECOMP_ICALL(MEM32(0x31048314)); /* 0x310035F5: call dword ptr [0x31048314] */ 5821 RECOMP_FLAGS_IN(); 5822 L_310035FB: 5823 ecx = ebp + (-0x14); /* 0x310035FB: lea ecx, [ebp - 0x14] */ 5824 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x310035FE: mov byte ptr [ebp - 4], 1 */ 5825 RECOMP_ICALL(0x31003EC0u); /* 0x31003602: call 0x31003ec0 */ /* not lifted */ 5826 RECOMP_FLAGS_IN(); 5827 edi = MEM32(0x31048314); /* 0x31003607: mov edi, dword ptr [0x31048314] */ 5828 ecx = ebp + (-0xB4); /* 0x3100360D: lea ecx, [ebp - 0xb4] */ 5829 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x31003613: mov byte ptr [ebp - 4], 0 */ 5830 RECOMP_ICALL(edi); /* 0x31003617: call edi */ 5831 RECOMP_FLAGS_IN(); 5832 ecx = ebp + (-0xF8); /* 0x31003619: lea ecx, [ebp - 0xf8] */ 5833 MEM32(ebp + (-0x4)) = esi; /* 0x3100361F: mov dword ptr [ebp - 4], esi */ 5834 RECOMP_ICALL(edi); /* 0x31003622: call edi */ 5835 RECOMP_FLAGS_IN(); 5836 ecx = MEM32(ebp + (-0xC)); /* 0x31003624: mov ecx, dword ptr [ebp - 0xc] */ 5837 eax = MEM32(ebp + (-0x10)); /* 0x31003627: mov eax, dword ptr [ebp - 0x10] */ 5838 edi = POP32_VAL(esp); /* 0x3100362A: pop edi */ 5839 esi = POP32_VAL(esp); /* 0x3100362B: pop esi */ 5840 ebx = POP32_VAL(esp); /* 0x3100362C: pop ebx */ 5841 MEM32(FS_BASE + (0)) = ecx; /* 0x3100362D: mov dword ptr fs:[0], ecx */ 5842 esp = ebp; /* 0x31003634: mov esp, ebp */ 5843 ebp = POP32_VAL(esp); /* 0x31003636: pop ebp */ 5844 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x31003637: ret 0x10 */ 5845 RECOMP_REGS_OUT(); 5846 } 5847 5848 void sub_310035F5(void) { 5849 int _fpu_cmp = 0; 5850 uint32_t _cf = 0; 5851 int _df = 1; 5852 uint32_t _flag_k = FK_NONE; 5853 uint32_t _flag_a = 0, _flag_b = 0; 5854 uint32_t _itail_tgt = 0; 5855 RECOMP_REGS_LOCALS 5856 RECOMP_ENTER(0x310035F5u); 5857 5858 L_310035F5: 5859 RECOMP_ICALL(MEM32(0x31048314)); /* 0x310035F5: call dword ptr [0x31048314] */ 5860 RECOMP_FLAGS_IN(); 5861 ecx = ebp + (-0x14); /* 0x310035FB: lea ecx, [ebp - 0x14] */ 5862 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x310035FE: mov byte ptr [ebp - 4], 1 */ 5863 RECOMP_ICALL(0x31003EC0u); /* 0x31003602: call 0x31003ec0 */ /* not lifted */ 5864 RECOMP_FLAGS_IN(); 5865 edi = MEM32(0x31048314); /* 0x31003607: mov edi, dword ptr [0x31048314] */ 5866 ecx = ebp + (-0xB4); /* 0x3100360D: lea ecx, [ebp - 0xb4] */ 5867 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x31003613: mov byte ptr [ebp - 4], 0 */ 5868 RECOMP_ICALL(edi); /* 0x31003617: call edi */ 5869 RECOMP_FLAGS_IN(); 5870 ecx = ebp + (-0xF8); /* 0x31003619: lea ecx, [ebp - 0xf8] */ 5871 MEM32(ebp + (-0x4)) = esi; /* 0x3100361F: mov dword ptr [ebp - 4], esi */ 5872 RECOMP_ICALL(edi); /* 0x31003622: call edi */ 5873 RECOMP_FLAGS_IN(); 5874 ecx = MEM32(ebp + (-0xC)); /* 0x31003624: mov ecx, dword ptr [ebp - 0xc] */ 5875 eax = MEM32(ebp + (-0x10)); /* 0x31003627: mov eax, dword ptr [ebp - 0x10] */ 5876 edi = POP32_VAL(esp); /* 0x3100362A: pop edi */ 5877 esi = POP32_VAL(esp); /* 0x3100362B: pop esi */ 5878 ebx = POP32_VAL(esp); /* 0x3100362C: pop ebx */ 5879 MEM32(FS_BASE + (0)) = ecx; /* 0x3100362D: mov dword ptr fs:[0], ecx */ 5880 esp = ebp; /* 0x31003634: mov esp, ebp */ 5881 ebp = POP32_VAL(esp); /* 0x31003636: pop ebp */ 5882 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x31003637: ret 0x10 */ 5883 RECOMP_REGS_OUT(); 5884 } 5885 5886 void sub_310035FB(void) { 5887 int _fpu_cmp = 0; 5888 uint32_t _cf = 0; 5889 int _df = 1; 5890 uint32_t _flag_k = FK_NONE; 5891 uint32_t _flag_a = 0, _flag_b = 0; 5892 uint32_t _itail_tgt = 0; 5893 RECOMP_REGS_LOCALS 5894 RECOMP_ENTER(0x310035FBu); 5895 5896 L_310035FB: 5897 ecx = ebp + (-0x14); /* 0x310035FB: lea ecx, [ebp - 0x14] */ 5898 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x310035FE: mov byte ptr [ebp - 4], 1 */ 5899 RECOMP_ICALL(0x31003EC0u); /* 0x31003602: call 0x31003ec0 */ /* not lifted */ 5900 RECOMP_FLAGS_IN(); 5901 edi = MEM32(0x31048314); /* 0x31003607: mov edi, dword ptr [0x31048314] */ 5902 ecx = ebp + (-0xB4); /* 0x3100360D: lea ecx, [ebp - 0xb4] */ 5903 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x31003613: mov byte ptr [ebp - 4], 0 */ 5904 RECOMP_ICALL(edi); /* 0x31003617: call edi */ 5905 RECOMP_FLAGS_IN(); 5906 ecx = ebp + (-0xF8); /* 0x31003619: lea ecx, [ebp - 0xf8] */ 5907 MEM32(ebp + (-0x4)) = esi; /* 0x3100361F: mov dword ptr [ebp - 4], esi */ 5908 RECOMP_ICALL(edi); /* 0x31003622: call edi */ 5909 RECOMP_FLAGS_IN(); 5910 ecx = MEM32(ebp + (-0xC)); /* 0x31003624: mov ecx, dword ptr [ebp - 0xc] */ 5911 eax = MEM32(ebp + (-0x10)); /* 0x31003627: mov eax, dword ptr [ebp - 0x10] */ 5912 edi = POP32_VAL(esp); /* 0x3100362A: pop edi */ 5913 esi = POP32_VAL(esp); /* 0x3100362B: pop esi */ 5914 ebx = POP32_VAL(esp); /* 0x3100362C: pop ebx */ 5915 MEM32(FS_BASE + (0)) = ecx; /* 0x3100362D: mov dword ptr fs:[0], ecx */ 5916 esp = ebp; /* 0x31003634: mov esp, ebp */ 5917 ebp = POP32_VAL(esp); /* 0x31003636: pop ebp */ 5918 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x31003637: ret 0x10 */ 5919 RECOMP_REGS_OUT(); 5920 } 5921 5922 void sub_31003640(void) { 5923 int _fpu_cmp = 0; 5924 uint32_t _cf = 0; 5925 int _df = 1; 5926 uint32_t _flag_k = FK_NONE; 5927 uint32_t _flag_a = 0, _flag_b = 0; 5928 uint32_t _itail_tgt = 0; 5929 RECOMP_REGS_LOCALS 5930 RECOMP_ENTER(0x31003640u); 5931 5932 L_31003640: 5933 PUSH32(esp, ebp); /* 0x31003640: push ebp */ 5934 ebp = esp; /* 0x31003641: mov ebp, esp */ 5935 PUSH32(esp, 0xFFFFFFFFu); /* 0x31003643: push -1 */ 5936 PUSH32(esp, 0x31046E9Du); /* 0x31003645: push 0x31046e9d */ 5937 eax = MEM32(FS_BASE + (0)); /* 0x3100364A: mov eax, dword ptr fs:[0] */ 5938 PUSH32(esp, eax); /* 0x31003650: push eax */ 5939 MEM32(FS_BASE + (0)) = esp; /* 0x31003651: mov dword ptr fs:[0], esp */ 5940 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xA8u); 5941 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5942 esp = esp - 0xA8u; /* 0x31003658: sub esp, 0xa8 */ 5943 _flag_k = FK_CMP; 5944 PUSH32(esp, ebx); /* 0x3100365E: push ebx */ 5945 PUSH32(esp, esi); /* 0x3100365F: push esi */ 5946 PUSH32(esp, edi); /* 0x31003660: push edi */ 5947 edi = MEM32(0x31048320); /* 0x31003661: mov edi, dword ptr [0x31048320] */ 5948 PUSH32(esp, 8); /* 0x31003667: push 8 */ 5949 eax = ebp + (-0x2C); /* 0x31003669: lea eax, [ebp - 0x2c] */ 5950 esi = ecx; /* 0x3100366C: mov esi, ecx */ 5951 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5952 ebx = 0; /* 0x3100366E: xor ebx, ebx */ 5953 _cf = 0; 5954 _flag_k = FK_TEST; 5955 PUSH32(esp, eax); /* 0x31003670: push eax */ 5956 ecx = ebp + (-0xB4); /* 0x31003671: lea ecx, [ebp - 0xb4] */ 5957 MEM32(ebp + (-0x10)) = ebx; /* 0x31003677: mov dword ptr [ebp - 0x10], ebx */ 5958 RECOMP_ICALL(edi); /* 0x3100367A: call edi */ 5959 RECOMP_FLAGS_IN(); 5960 ecx = MEM32(ebp + 0x8); /* 0x3100367C: mov ecx, dword ptr [ebp + 8] */ 5961 MEM32(ebp + (-0x4)) = ebx; /* 0x3100367F: mov dword ptr [ebp - 4], ebx */ 5962 ebx = MEM32(0x3104831C); /* 0x31003682: mov ebx, dword ptr [0x3104831c] */ 5963 PUSH32(esp, ecx); /* 0x31003688: push ecx */ 5964 ecx = ebp + (-0xB4); /* 0x31003689: lea ecx, [ebp - 0xb4] */ 5965 RECOMP_ICALL(ebx); /* 0x3100368F: call ebx */ 5966 RECOMP_FLAGS_IN(); 5967 edx = MEM32(ebp + 0xC); /* 0x31003691: mov edx, dword ptr [ebp + 0xc] */ 5968 PUSH32(esp, edx); /* 0x31003694: push edx */ 5969 ecx = eax; /* 0x31003695: mov ecx, eax */ 5970 RECOMP_ICALL(ebx); /* 0x31003697: call ebx */ 5971 RECOMP_FLAGS_IN(); 5972 PUSH32(esp, 8); /* 0x31003699: push 8 */ 5973 eax = ebp + (-0x24); /* 0x3100369B: lea eax, [ebp - 0x24] */ 5974 PUSH32(esp, eax); /* 0x3100369E: push eax */ 5975 ecx = ebp + (-0x70); /* 0x3100369F: lea ecx, [ebp - 0x70] */ 5976 RECOMP_ICALL(edi); /* 0x310036A2: call edi */ 5977 RECOMP_FLAGS_IN(); 5978 ecx = MEM32(ebp + (-0x34)); /* 0x310036A4: mov ecx, dword ptr [ebp - 0x34] */ 5979 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5980 edx = 0; /* 0x310036A7: xor edx, edx */ 5981 _cf = 0; 5982 _flag_k = FK_TEST; 5983 PUSH32(esp, 2); /* 0x310036A9: push 2 */ 5984 MEM32(ebp + (-0x30)) = ecx; /* 0x310036AB: mov dword ptr [ebp - 0x30], ecx */ 5985 MEM32(ebp + (-0x1C)) = edx; /* 0x310036AE: mov dword ptr [ebp - 0x1c], edx */ 5986 SET_LO8(ebx, 1); /* 0x310036B1: mov bl, 1 */ 5987 PUSH32(esp, esi); /* 0x310036B3: push esi */ 5988 ecx = ebp + (-0x14); /* 0x310036B4: lea ecx, [ebp - 0x14] */ 5989 MEM8(ebp + (-0x4)) = (uint8_t)(LO8(ebx)); /* 0x310036B7: mov byte ptr [ebp - 4], bl */ 5990 MEM32(ebp + (-0x18)) = edx; /* 0x310036BA: mov dword ptr [ebp - 0x18], edx */ 5991 RECOMP_ICALL(0x31003EA0u); /* 0x310036BD: call 0x31003ea0 */ /* not lifted */ 5992 RECOMP_FLAGS_IN(); 5993 edx = MEM32(esi + 0x110); /* 0x310036C2: mov edx, dword ptr [esi + 0x110] */ 5994 eax = ebp + (-0x24); /* 0x310036C8: lea eax, [ebp - 0x24] */ 5995 PUSH32(esp, eax); /* 0x310036CB: push eax */ 5996 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5997 eax = 0; /* 0x310036CC: xor eax, eax */ 5998 _cf = 0; 5999 _flag_k = FK_TEST; 6000 SET_LO16(eax, MEM16(edx + 0xA0)); /* 0x310036CE: mov ax, word ptr [edx + 0xa0] */ 6001 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(1) << 16; 6002 SET_LO16(eax, LO16(eax) + 1); /* 0x310036D5: inc ax */ 6003 _flag_k = FK_NARROW(FK_INC, 16); 6004 ecx = ebp + (-0x2C); /* 0x310036D7: lea ecx, [ebp - 0x2c] */ 6005 PUSH32(esp, ecx); /* 0x310036DA: push ecx */ 6006 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x310036DB: mov byte ptr [ebp - 4], 2 */ 6007 PUSH32(esp, eax); /* 0x310036DF: push eax */ 6008 RECOMP_ICALL(0x310182EDu); /* 0x310036E0: call 0x310182ed */ /* not lifted */ 6009 RECOMP_FLAGS_IN(); 6010 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 6011 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6012 esp = esp + 0xCu; /* 0x310036E5: add esp, 0xc */ 6013 _flag_k = FK_ADD; 6014 /* test LO16(eax), LO16(eax) */ /* 0x310036E8: test ax, ax */ 6015 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 6016 _cf = 0; 6017 _flag_k = FK_NARROW(FK_TEST, 16); 6018 if (TEST_NZ(_flag_a, _flag_b)) goto L_31003721; /* 0x310036EB: jne 0x31003721 */ 6019 L_310036ED: 6020 edi = MEM32(0x31048324); /* 0x310036ED: mov edi, dword ptr [0x31048324] */ 6021 ecx = ebp + (-0x1C); /* 0x310036F3: lea ecx, [ebp - 0x1c] */ 6022 PUSH32(esp, ecx); /* 0x310036F6: push ecx */ 6023 ecx = ebp + (-0x70); /* 0x310036F7: lea ecx, [ebp - 0x70] */ 6024 RECOMP_ICALL(edi); /* 0x310036FA: call edi */ 6025 RECOMP_FLAGS_IN(); 6026 edx = ebp + (-0x18); /* 0x310036FC: lea edx, [ebp - 0x18] */ 6027 PUSH32(esp, edx); /* 0x310036FF: push edx */ 6028 ecx = eax; /* 0x31003700: mov ecx, eax */ 6029 RECOMP_ICALL(edi); /* 0x31003702: call edi */ 6030 RECOMP_FLAGS_IN(); 6031 eax = MEM32(esi + 0x110); /* 0x31003704: mov eax, dword ptr [esi + 0x110] */ 6032 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6033 ecx = 0; /* 0x3100370A: xor ecx, ecx */ 6034 _cf = 0; 6035 _flag_k = FK_TEST; 6036 SET_LO16(ecx, MEM16(eax + 0xA0)); /* 0x3100370C: mov cx, word ptr [eax + 0xa0] */ 6037 PUSH32(esp, ecx); /* 0x31003713: push ecx */ 6038 RECOMP_ICALL(0x3101B5A4u); /* 0x31003714: call 0x3101b5a4 */ /* not lifted */ 6039 RECOMP_FLAGS_IN(); 6040 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6041 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6042 esp = esp + 4; /* 0x31003719: add esp, 4 */ 6043 _flag_k = FK_ADD; 6044 /* test LO16(eax), LO16(eax) */ /* 0x3100371C: test ax, ax */ 6045 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 6046 _cf = 0; 6047 _flag_k = FK_NARROW(FK_TEST, 16); 6048 if (TEST_Z(_flag_a, _flag_b)) goto L_31003728; /* 0x3100371F: je 0x31003728 */ 6049 L_31003721: 6050 MEM32(ebp + (-0x10)) = 0xFFFFFFFFu; /* 0x31003721: mov dword ptr [ebp - 0x10], 0xffffffff */ 6051 L_31003728: 6052 ecx = ebp + (-0x14); /* 0x31003728: lea ecx, [ebp - 0x14] */ 6053 MEM8(ebp + (-0x4)) = (uint8_t)(LO8(ebx)); /* 0x3100372B: mov byte ptr [ebp - 4], bl */ 6054 RECOMP_ICALL(0x31003EC0u); /* 0x3100372E: call 0x31003ec0 */ /* not lifted */ 6055 RECOMP_FLAGS_IN(); 6056 esi = MEM32(0x31048314); /* 0x31003733: mov esi, dword ptr [0x31048314] */ 6057 ecx = ebp + (-0x70); /* 0x31003739: lea ecx, [ebp - 0x70] */ 6058 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x3100373C: mov byte ptr [ebp - 4], 0 */ 6059 RECOMP_ICALL(esi); /* 0x31003740: call esi */ 6060 RECOMP_FLAGS_IN(); 6061 ecx = ebp + (-0xB4); /* 0x31003742: lea ecx, [ebp - 0xb4] */ 6062 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x31003748: mov dword ptr [ebp - 4], 0xffffffff */ 6063 RECOMP_ICALL(esi); /* 0x3100374F: call esi */ 6064 RECOMP_FLAGS_IN(); 6065 ecx = MEM32(ebp + (-0xC)); /* 0x31003751: mov ecx, dword ptr [ebp - 0xc] */ 6066 eax = MEM32(ebp + (-0x10)); /* 0x31003754: mov eax, dword ptr [ebp - 0x10] */ 6067 edi = POP32_VAL(esp); /* 0x31003757: pop edi */ 6068 esi = POP32_VAL(esp); /* 0x31003758: pop esi */ 6069 ebx = POP32_VAL(esp); /* 0x31003759: pop ebx */ 6070 MEM32(FS_BASE + (0)) = ecx; /* 0x3100375A: mov dword ptr fs:[0], ecx */ 6071 esp = ebp; /* 0x31003761: mov esp, ebp */ 6072 ebp = POP32_VAL(esp); /* 0x31003763: pop ebp */ 6073 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31003764: ret 8 */ 6074 RECOMP_REGS_OUT(); 6075 } 6076 6077 void sub_31003770(void) { 6078 int _fpu_cmp = 0; 6079 uint32_t _cf = 0; 6080 int _df = 1; 6081 uint32_t _flag_k = FK_NONE; 6082 uint32_t _flag_a = 0, _flag_b = 0; 6083 uint32_t _itail_tgt = 0; 6084 RECOMP_REGS_LOCALS 6085 RECOMP_ENTER(0x31003770u); 6086 6087 L_31003770: 6088 PUSH32(esp, ebp); /* 0x31003770: push ebp */ 6089 ebp = esp; /* 0x31003771: mov ebp, esp */ 6090 PUSH32(esp, 0xFFFFFFFFu); /* 0x31003773: push -1 */ 6091 PUSH32(esp, 0x31046ED4u); /* 0x31003775: push 0x31046ed4 */ 6092 eax = MEM32(FS_BASE + (0)); /* 0x3100377A: mov eax, dword ptr fs:[0] */ 6093 PUSH32(esp, eax); /* 0x31003780: push eax */ 6094 MEM32(FS_BASE + (0)) = esp; /* 0x31003781: mov dword ptr fs:[0], esp */ 6095 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x58u); 6096 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6097 esp = esp - 0x58u; /* 0x31003788: sub esp, 0x58 */ 6098 _flag_k = FK_CMP; 6099 SET_LO8(eax, MEM8(ebp + 0xC)); /* 0x3100378B: mov al, byte ptr [ebp + 0xc] */ 6100 /* test LO8(eax), LO8(eax) */ /* 0x3100378E: test al, al */ 6101 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 6102 _cf = 0; 6103 _flag_k = FK_NARROW(FK_TEST, 24); 6104 PUSH32(esp, ebx); /* 0x31003790: push ebx */ 6105 PUSH32(esp, esi); /* 0x31003791: push esi */ 6106 esi = 0x31057D88u; /* 0x31003792: mov esi, 0x31057d88 */ 6107 PUSH32(esp, edi); /* 0x31003797: push edi */ 6108 edi = ecx; /* 0x31003798: mov edi, ecx */ 6109 ebx = 0x31051928u; /* 0x3100379A: mov ebx, 0x31051928 */ 6110 MEM32(ebp + (-0x18)) = esi; /* 0x3100379F: mov dword ptr [ebp - 0x18], esi */ 6111 MEM32(ebp + (-0x10)) = 0x31051924u; /* 0x310037A2: mov dword ptr [ebp - 0x10], 0x31051924 */ 6112 MEM32(ebp + (-0x14)) = 0x310518D8u; /* 0x310037A9: mov dword ptr [ebp - 0x14], 0x310518d8 */ 6113 if (TEST_Z(_flag_a, _flag_b)) goto L_310037D1; /* 0x310037B0: je 0x310037d1 */ 6114 L_310037B2: 6115 ebx = 0x310518D0u; /* 0x310037B2: mov ebx, 0x310518d0 */ 6116 esi = 0x310518C8u; /* 0x310037B7: mov esi, 0x310518c8 */ 6117 MEM32(ebp + (-0x18)) = 0x310518C0u; /* 0x310037BC: mov dword ptr [ebp - 0x18], 0x310518c0 */ 6118 MEM32(ebp + (-0x10)) = 0x310518BCu; /* 0x310037C3: mov dword ptr [ebp - 0x10], 0x310518bc */ 6119 MEM32(ebp + (-0x14)) = 0x310518B4u; /* 0x310037CA: mov dword ptr [ebp - 0x14], 0x310518b4 */ 6120 L_310037D1: 6121 eax = MEM32(ebp + 0x8); /* 0x310037D1: mov eax, dword ptr [ebp + 8] */ 6122 ecx = MEM32(eax); /* 0x310037D4: mov ecx, dword ptr [eax] */ 6123 edx = MEM32(ecx + 0x4); /* 0x310037D6: mov edx, dword ptr [ecx + 4] */ 6124 ecx = MEM32(eax + edx + 0x10); /* 0x310037D9: mov ecx, dword ptr [eax + edx + 0x10] */ 6125 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 6126 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6127 eax = eax + edx; /* 0x310037DD: add eax, edx */ 6128 _flag_k = FK_ADD; 6129 MEM32(eax + 0x10) = 3; /* 0x310037DF: mov dword ptr [eax + 0x10], 3 */ 6130 eax = MEM32(ebp + 0x10); /* 0x310037E6: mov eax, dword ptr [ebp + 0x10] */ 6131 /* test eax, eax */ /* 0x310037E9: test eax, eax */ 6132 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6133 _cf = 0; 6134 _flag_k = FK_TEST; 6135 MEM32(ebp + (-0x34)) = ecx; /* 0x310037EB: mov dword ptr [ebp - 0x34], ecx */ 6136 if (TEST_NZ(_flag_a, _flag_b)) goto L_31003A8E; /* 0x310037EE: jne 0x31003a8e */ 6137 L_310037F4: 6138 edx = MEM32(edi + 0x1C); /* 0x310037F4: mov edx, dword ptr [edi + 0x1c] */ 6139 PUSH32(esp, edx); /* 0x310037F7: push edx */ 6140 eax = ebp + (-0x28); /* 0x310037F8: lea eax, [ebp - 0x28] */ 6141 PUSH32(esp, eax); /* 0x310037FB: push eax */ 6142 RECOMP_ICALL(0x31004380u); /* 0x310037FC: call 0x31004380 */ /* not lifted */ 6143 RECOMP_FLAGS_IN(); 6144 MEM32(ebp + 0x10) = eax; /* 0x31003801: mov dword ptr [ebp + 0x10], eax */ 6145 ecx = MEM32(edi + 0x14); /* 0x31003804: mov ecx, dword ptr [edi + 0x14] */ 6146 PUSH32(esp, ecx); /* 0x31003807: push ecx */ 6147 edx = ebp + (-0x44); /* 0x31003808: lea edx, [ebp - 0x44] */ 6148 PUSH32(esp, edx); /* 0x3100380B: push edx */ 6149 MEM32(ebp + (-0x4)) = 0; /* 0x3100380C: mov dword ptr [ebp - 4], 0 */ 6150 RECOMP_ICALL(0x31004380u); /* 0x31003813: call 0x31004380 */ /* not lifted */ 6151 RECOMP_FLAGS_IN(); 6152 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 6153 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6154 esp = esp + 0x10u; /* 0x31003818: add esp, 0x10 */ 6155 _flag_k = FK_ADD; 6156 MEM32(ebp + 0xC) = eax; /* 0x3100381B: mov dword ptr [ebp + 0xc], eax */ 6157 eax = MEM32(edi); /* 0x3100381E: mov eax, dword ptr [edi] */ 6158 ecx = MEM32(ebp + (-0x10)); /* 0x31003820: mov ecx, dword ptr [ebp - 0x10] */ 6159 edx = MEM32(ebp + 0x8); /* 0x31003823: mov edx, dword ptr [ebp + 8] */ 6160 PUSH32(esp, eax); /* 0x31003826: push eax */ 6161 PUSH32(esp, 0x31051898u); /* 0x31003827: push 0x31051898 */ 6162 PUSH32(esp, ebx); /* 0x3100382C: push ebx */ 6163 PUSH32(esp, esi); /* 0x3100382D: push esi */ 6164 esi = MEM32(0x31048098); /* 0x3100382E: mov esi, dword ptr [0x31048098] */ 6165 PUSH32(esp, 0x3105186Cu); /* 0x31003834: push 0x3105186c */ 6166 PUSH32(esp, ecx); /* 0x31003839: push ecx */ 6167 PUSH32(esp, edx); /* 0x3100383A: push edx */ 6168 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x3100383B: mov byte ptr [ebp - 4], 1 */ 6169 RECOMP_ICALL(esi); /* 0x3100383F: call esi */ 6170 RECOMP_FLAGS_IN(); 6171 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6172 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6173 esp = esp + 8; /* 0x31003841: add esp, 8 */ 6174 _flag_k = FK_ADD; 6175 PUSH32(esp, eax); /* 0x31003844: push eax */ 6176 RECOMP_ICALL(esi); /* 0x31003845: call esi */ 6177 RECOMP_FLAGS_IN(); 6178 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6179 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6180 esp = esp + 8; /* 0x31003847: add esp, 8 */ 6181 _flag_k = FK_ADD; 6182 PUSH32(esp, eax); /* 0x3100384A: push eax */ 6183 RECOMP_ICALL(esi); /* 0x3100384B: call esi */ 6184 RECOMP_FLAGS_IN(); 6185 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6186 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6187 esp = esp + 8; /* 0x3100384D: add esp, 8 */ 6188 _flag_k = FK_ADD; 6189 PUSH32(esp, eax); /* 0x31003850: push eax */ 6190 RECOMP_ICALL(esi); /* 0x31003851: call esi */ 6191 RECOMP_FLAGS_IN(); 6192 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6193 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6194 esp = esp + 8; /* 0x31003853: add esp, 8 */ 6195 _flag_k = FK_ADD; 6196 PUSH32(esp, eax); /* 0x31003856: push eax */ 6197 RECOMP_ICALL(esi); /* 0x31003857: call esi */ 6198 RECOMP_FLAGS_IN(); 6199 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6200 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6201 esp = esp + 8; /* 0x31003859: add esp, 8 */ 6202 _flag_k = FK_ADD; 6203 ecx = eax; /* 0x3100385C: mov ecx, eax */ 6204 RECOMP_ICALL(MEM32(0x31048094)); /* 0x3100385E: call dword ptr [0x31048094] */ 6205 RECOMP_FLAGS_IN(); 6206 PUSH32(esp, eax); /* 0x31003864: push eax */ 6207 RECOMP_ICALL(MEM32(0x31048138)); /* 0x31003865: call dword ptr [0x31048138] */ 6208 RECOMP_FLAGS_IN(); 6209 ecx = MEM32(edi + 0x4); /* 0x3100386B: mov ecx, dword ptr [edi + 4] */ 6210 edx = MEM32(edi); /* 0x3100386E: mov edx, dword ptr [edi] */ 6211 MEM32(ebp + (-0x30)) = ecx; /* 0x31003870: mov dword ptr [ebp - 0x30], ecx */ 6212 MEM32(ebp + (-0x2C)) = 0; /* 0x31003873: mov dword ptr [ebp - 0x2c], 0 */ 6213 fp_push_i64((int64_t)MEM64(ebp + (-0x30))); /* 0x3100387A: fild qword ptr [ebp - 0x30] */ 6214 MEM32(ebp + (-0x30)) = edx; /* 0x3100387D: mov dword ptr [ebp - 0x30], edx */ 6215 MEM32(ebp + (-0x2C)) = 0; /* 0x31003880: mov dword ptr [ebp - 0x2c], 0 */ 6216 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6217 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6218 esp = esp + 4; /* 0x31003887: add esp, 4 */ 6219 _flag_k = FK_ADD; 6220 _st[0] *= *(double*)ADDR(0x31048370); /* 0x3100388A: fmul qword ptr [0x31048370] */ 6221 PUSH32(esp, 0x3105185Cu); /* 0x31003890: push 0x3105185c */ 6222 fp_push_i64((int64_t)MEM64(ebp + (-0x30))); /* 0x31003895: fild qword ptr [ebp - 0x30] */ 6223 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6224 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6225 esp = esp - 8; /* 0x31003898: sub esp, 8 */ 6226 _flag_k = FK_CMP; 6227 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x3100389B: fdivp st(1) */ 6228 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x3100389D: fstp qword ptr [esp] */ 6229 PUSH32(esp, 0x31051858u); /* 0x310038A0: push 0x31051858 */ 6230 PUSH32(esp, ecx); /* 0x310038A5: push ecx */ 6231 PUSH32(esp, 0x3105183Cu); /* 0x310038A6: push 0x3105183c */ 6232 PUSH32(esp, ebx); /* 0x310038AB: push ebx */ 6233 PUSH32(esp, eax); /* 0x310038AC: push eax */ 6234 RECOMP_ICALL(esi); /* 0x310038AD: call esi */ 6235 RECOMP_FLAGS_IN(); 6236 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6237 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6238 esp = esp + 8; /* 0x310038AF: add esp, 8 */ 6239 _flag_k = FK_ADD; 6240 PUSH32(esp, eax); /* 0x310038B2: push eax */ 6241 RECOMP_ICALL(esi); /* 0x310038B3: call esi */ 6242 RECOMP_FLAGS_IN(); 6243 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6244 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6245 esp = esp + 8; /* 0x310038B5: add esp, 8 */ 6246 _flag_k = FK_ADD; 6247 ecx = eax; /* 0x310038B8: mov ecx, eax */ 6248 RECOMP_ICALL(MEM32(0x31048094)); /* 0x310038BA: call dword ptr [0x31048094] */ 6249 RECOMP_FLAGS_IN(); 6250 PUSH32(esp, eax); /* 0x310038C0: push eax */ 6251 RECOMP_ICALL(esi); /* 0x310038C1: call esi */ 6252 RECOMP_FLAGS_IN(); 6253 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6254 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6255 esp = esp + 8; /* 0x310038C3: add esp, 8 */ 6256 _flag_k = FK_ADD; 6257 ecx = eax; /* 0x310038C6: mov ecx, eax */ 6258 RECOMP_ICALL(MEM32(0x31048100)); /* 0x310038C8: call dword ptr [0x31048100] */ 6259 RECOMP_FLAGS_IN(); 6260 PUSH32(esp, eax); /* 0x310038CE: push eax */ 6261 RECOMP_ICALL(esi); /* 0x310038CF: call esi */ 6262 RECOMP_FLAGS_IN(); 6263 PUSH32(esp, eax); /* 0x310038D1: push eax */ 6264 RECOMP_ICALL(MEM32(0x31048138)); /* 0x310038D2: call dword ptr [0x31048138] */ 6265 RECOMP_FLAGS_IN(); 6266 ecx = MEM32(edi + 0x8); /* 0x310038D8: mov ecx, dword ptr [edi + 8] */ 6267 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 6268 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6269 esp = esp + 0xCu; /* 0x310038DB: add esp, 0xc */ 6270 _flag_k = FK_ADD; 6271 PUSH32(esp, ecx); /* 0x310038DE: push ecx */ 6272 PUSH32(esp, 0x31051820u); /* 0x310038DF: push 0x31051820 */ 6273 PUSH32(esp, ebx); /* 0x310038E4: push ebx */ 6274 PUSH32(esp, eax); /* 0x310038E5: push eax */ 6275 RECOMP_ICALL(esi); /* 0x310038E6: call esi */ 6276 RECOMP_FLAGS_IN(); 6277 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6278 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6279 esp = esp + 8; /* 0x310038E8: add esp, 8 */ 6280 _flag_k = FK_ADD; 6281 PUSH32(esp, eax); /* 0x310038EB: push eax */ 6282 RECOMP_ICALL(esi); /* 0x310038EC: call esi */ 6283 RECOMP_FLAGS_IN(); 6284 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6285 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6286 esp = esp + 8; /* 0x310038EE: add esp, 8 */ 6287 _flag_k = FK_ADD; 6288 ecx = eax; /* 0x310038F1: mov ecx, eax */ 6289 RECOMP_ICALL(MEM32(0x31048094)); /* 0x310038F3: call dword ptr [0x31048094] */ 6290 RECOMP_FLAGS_IN(); 6291 PUSH32(esp, eax); /* 0x310038F9: push eax */ 6292 RECOMP_ICALL(MEM32(0x31048138)); /* 0x310038FA: call dword ptr [0x31048138] */ 6293 RECOMP_FLAGS_IN(); 6294 ecx = MEM32(edi + 0xC); /* 0x31003900: mov ecx, dword ptr [edi + 0xc] */ 6295 edx = MEM32(edi + 0x8); /* 0x31003903: mov edx, dword ptr [edi + 8] */ 6296 MEM32(ebp + (-0x30)) = ecx; /* 0x31003906: mov dword ptr [ebp - 0x30], ecx */ 6297 MEM32(ebp + (-0x2C)) = 0; /* 0x31003909: mov dword ptr [ebp - 0x2c], 0 */ 6298 fp_push_i64((int64_t)MEM64(ebp + (-0x30))); /* 0x31003910: fild qword ptr [ebp - 0x30] */ 6299 MEM32(ebp + (-0x30)) = edx; /* 0x31003913: mov dword ptr [ebp - 0x30], edx */ 6300 MEM32(ebp + (-0x2C)) = 0; /* 0x31003916: mov dword ptr [ebp - 0x2c], 0 */ 6301 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6302 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6303 esp = esp + 4; /* 0x3100391D: add esp, 4 */ 6304 _flag_k = FK_ADD; 6305 _st[0] *= *(double*)ADDR(0x31048370); /* 0x31003920: fmul qword ptr [0x31048370] */ 6306 PUSH32(esp, 0x3105185Cu); /* 0x31003926: push 0x3105185c */ 6307 fp_push_i64((int64_t)MEM64(ebp + (-0x30))); /* 0x3100392B: fild qword ptr [ebp - 0x30] */ 6308 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6309 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6310 esp = esp - 8; /* 0x3100392E: sub esp, 8 */ 6311 _flag_k = FK_CMP; 6312 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x31003931: fdivp st(1) */ 6313 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x31003933: fstp qword ptr [esp] */ 6314 PUSH32(esp, 0x31051858u); /* 0x31003936: push 0x31051858 */ 6315 PUSH32(esp, ecx); /* 0x3100393B: push ecx */ 6316 PUSH32(esp, 0x31051804u); /* 0x3100393C: push 0x31051804 */ 6317 PUSH32(esp, ebx); /* 0x31003941: push ebx */ 6318 PUSH32(esp, eax); /* 0x31003942: push eax */ 6319 RECOMP_ICALL(esi); /* 0x31003943: call esi */ 6320 RECOMP_FLAGS_IN(); 6321 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6322 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6323 esp = esp + 8; /* 0x31003945: add esp, 8 */ 6324 _flag_k = FK_ADD; 6325 PUSH32(esp, eax); /* 0x31003948: push eax */ 6326 RECOMP_ICALL(esi); /* 0x31003949: call esi */ 6327 RECOMP_FLAGS_IN(); 6328 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6329 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6330 esp = esp + 8; /* 0x3100394B: add esp, 8 */ 6331 _flag_k = FK_ADD; 6332 ecx = eax; /* 0x3100394E: mov ecx, eax */ 6333 RECOMP_ICALL(MEM32(0x31048094)); /* 0x31003950: call dword ptr [0x31048094] */ 6334 RECOMP_FLAGS_IN(); 6335 PUSH32(esp, eax); /* 0x31003956: push eax */ 6336 RECOMP_ICALL(esi); /* 0x31003957: call esi */ 6337 RECOMP_FLAGS_IN(); 6338 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6339 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6340 esp = esp + 8; /* 0x31003959: add esp, 8 */ 6341 _flag_k = FK_ADD; 6342 ecx = eax; /* 0x3100395C: mov ecx, eax */ 6343 RECOMP_ICALL(MEM32(0x31048100)); /* 0x3100395E: call dword ptr [0x31048100] */ 6344 RECOMP_FLAGS_IN(); 6345 PUSH32(esp, eax); /* 0x31003964: push eax */ 6346 RECOMP_ICALL(esi); /* 0x31003965: call esi */ 6347 RECOMP_FLAGS_IN(); 6348 PUSH32(esp, eax); /* 0x31003967: push eax */ 6349 RECOMP_ICALL(MEM32(0x31048138)); /* 0x31003968: call dword ptr [0x31048138] */ 6350 RECOMP_FLAGS_IN(); 6351 ecx = MEM32(edi + 0x10); /* 0x3100396E: mov ecx, dword ptr [edi + 0x10] */ 6352 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 6353 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6354 esp = esp + 0xCu; /* 0x31003971: add esp, 0xc */ 6355 _flag_k = FK_ADD; 6356 PUSH32(esp, ecx); /* 0x31003974: push ecx */ 6357 PUSH32(esp, 0x310517E8u); /* 0x31003975: push 0x310517e8 */ 6358 PUSH32(esp, ebx); /* 0x3100397A: push ebx */ 6359 PUSH32(esp, eax); /* 0x3100397B: push eax */ 6360 RECOMP_ICALL(esi); /* 0x3100397C: call esi */ 6361 RECOMP_FLAGS_IN(); 6362 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6363 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6364 esp = esp + 8; /* 0x3100397E: add esp, 8 */ 6365 _flag_k = FK_ADD; 6366 PUSH32(esp, eax); /* 0x31003981: push eax */ 6367 RECOMP_ICALL(esi); /* 0x31003982: call esi */ 6368 RECOMP_FLAGS_IN(); 6369 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6370 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6371 esp = esp + 8; /* 0x31003984: add esp, 8 */ 6372 _flag_k = FK_ADD; 6373 ecx = eax; /* 0x31003987: mov ecx, eax */ 6374 RECOMP_ICALL(MEM32(0x31048094)); /* 0x31003989: call dword ptr [0x31048094] */ 6375 RECOMP_FLAGS_IN(); 6376 PUSH32(esp, eax); /* 0x3100398F: push eax */ 6377 RECOMP_ICALL(MEM32(0x31048138)); /* 0x31003990: call dword ptr [0x31048138] */ 6378 RECOMP_FLAGS_IN(); 6379 edx = MEM32(ebp + 0xC); /* 0x31003996: mov edx, dword ptr [ebp + 0xc] */ 6380 ecx = MEM32(edi + 0x14); /* 0x31003999: mov ecx, dword ptr [edi + 0x14] */ 6381 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6382 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6383 esp = esp + 4; /* 0x3100399C: add esp, 4 */ 6384 _flag_k = FK_ADD; 6385 PUSH32(esp, 0x310517E4u); /* 0x3100399F: push 0x310517e4 */ 6386 PUSH32(esp, edx); /* 0x310039A4: push edx */ 6387 PUSH32(esp, 0x31051858u); /* 0x310039A5: push 0x31051858 */ 6388 PUSH32(esp, ecx); /* 0x310039AA: push ecx */ 6389 PUSH32(esp, 0x310517C8u); /* 0x310039AB: push 0x310517c8 */ 6390 PUSH32(esp, ebx); /* 0x310039B0: push ebx */ 6391 PUSH32(esp, eax); /* 0x310039B1: push eax */ 6392 RECOMP_ICALL(esi); /* 0x310039B2: call esi */ 6393 RECOMP_FLAGS_IN(); 6394 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6395 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6396 esp = esp + 8; /* 0x310039B4: add esp, 8 */ 6397 _flag_k = FK_ADD; 6398 PUSH32(esp, eax); /* 0x310039B7: push eax */ 6399 RECOMP_ICALL(esi); /* 0x310039B8: call esi */ 6400 RECOMP_FLAGS_IN(); 6401 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6402 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6403 esp = esp + 8; /* 0x310039BA: add esp, 8 */ 6404 _flag_k = FK_ADD; 6405 ecx = eax; /* 0x310039BD: mov ecx, eax */ 6406 RECOMP_ICALL(MEM32(0x31048094)); /* 0x310039BF: call dword ptr [0x31048094] */ 6407 RECOMP_FLAGS_IN(); 6408 PUSH32(esp, eax); /* 0x310039C5: push eax */ 6409 RECOMP_ICALL(esi); /* 0x310039C6: call esi */ 6410 RECOMP_FLAGS_IN(); 6411 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6412 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6413 esp = esp + 8; /* 0x310039C8: add esp, 8 */ 6414 _flag_k = FK_ADD; 6415 PUSH32(esp, eax); /* 0x310039CB: push eax */ 6416 RECOMP_ICALL(0x31046864u); /* 0x310039CC: call 0x31046864 */ /* not lifted */ 6417 RECOMP_FLAGS_IN(); 6418 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6419 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6420 esp = esp + 8; /* 0x310039D1: add esp, 8 */ 6421 _flag_k = FK_ADD; 6422 PUSH32(esp, eax); /* 0x310039D4: push eax */ 6423 RECOMP_ICALL(esi); /* 0x310039D5: call esi */ 6424 RECOMP_FLAGS_IN(); 6425 PUSH32(esp, eax); /* 0x310039D7: push eax */ 6426 RECOMP_ICALL(MEM32(0x31048138)); /* 0x310039D8: call dword ptr [0x31048138] */ 6427 RECOMP_FLAGS_IN(); 6428 edx = MEM32(edi + 0x18); /* 0x310039DE: mov edx, dword ptr [edi + 0x18] */ 6429 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 6430 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6431 esp = esp + 0xCu; /* 0x310039E1: add esp, 0xc */ 6432 _flag_k = FK_ADD; 6433 PUSH32(esp, edx); /* 0x310039E4: push edx */ 6434 PUSH32(esp, 0x310517ACu); /* 0x310039E5: push 0x310517ac */ 6435 PUSH32(esp, ebx); /* 0x310039EA: push ebx */ 6436 PUSH32(esp, eax); /* 0x310039EB: push eax */ 6437 RECOMP_ICALL(esi); /* 0x310039EC: call esi */ 6438 RECOMP_FLAGS_IN(); 6439 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6440 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6441 esp = esp + 8; /* 0x310039EE: add esp, 8 */ 6442 _flag_k = FK_ADD; 6443 PUSH32(esp, eax); /* 0x310039F1: push eax */ 6444 RECOMP_ICALL(esi); /* 0x310039F2: call esi */ 6445 RECOMP_FLAGS_IN(); 6446 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6447 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6448 esp = esp + 8; /* 0x310039F4: add esp, 8 */ 6449 _flag_k = FK_ADD; 6450 ecx = eax; /* 0x310039F7: mov ecx, eax */ 6451 RECOMP_ICALL(MEM32(0x31048094)); /* 0x310039F9: call dword ptr [0x31048094] */ 6452 RECOMP_FLAGS_IN(); 6453 PUSH32(esp, eax); /* 0x310039FF: push eax */ 6454 RECOMP_ICALL(MEM32(0x31048138)); /* 0x31003A00: call dword ptr [0x31048138] */ 6455 RECOMP_FLAGS_IN(); 6456 ecx = MEM32(ebp + 0x10); /* 0x31003A06: mov ecx, dword ptr [ebp + 0x10] */ 6457 edx = MEM32(edi + 0x1C); /* 0x31003A09: mov edx, dword ptr [edi + 0x1c] */ 6458 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6459 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6460 esp = esp + 4; /* 0x31003A0C: add esp, 4 */ 6461 _flag_k = FK_ADD; 6462 PUSH32(esp, 0x310517E4u); /* 0x31003A0F: push 0x310517e4 */ 6463 PUSH32(esp, ecx); /* 0x31003A14: push ecx */ 6464 PUSH32(esp, 0x31051858u); /* 0x31003A15: push 0x31051858 */ 6465 PUSH32(esp, edx); /* 0x31003A1A: push edx */ 6466 PUSH32(esp, 0x31051790u); /* 0x31003A1B: push 0x31051790 */ 6467 PUSH32(esp, ebx); /* 0x31003A20: push ebx */ 6468 PUSH32(esp, eax); /* 0x31003A21: push eax */ 6469 RECOMP_ICALL(esi); /* 0x31003A22: call esi */ 6470 RECOMP_FLAGS_IN(); 6471 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6472 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6473 esp = esp + 8; /* 0x31003A24: add esp, 8 */ 6474 _flag_k = FK_ADD; 6475 PUSH32(esp, eax); /* 0x31003A27: push eax */ 6476 RECOMP_ICALL(esi); /* 0x31003A28: call esi */ 6477 RECOMP_FLAGS_IN(); 6478 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6479 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6480 esp = esp + 8; /* 0x31003A2A: add esp, 8 */ 6481 _flag_k = FK_ADD; 6482 ecx = eax; /* 0x31003A2D: mov ecx, eax */ 6483 RECOMP_ICALL(MEM32(0x31048094)); /* 0x31003A2F: call dword ptr [0x31048094] */ 6484 RECOMP_FLAGS_IN(); 6485 PUSH32(esp, eax); /* 0x31003A35: push eax */ 6486 RECOMP_ICALL(esi); /* 0x31003A36: call esi */ 6487 RECOMP_FLAGS_IN(); 6488 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6489 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6490 esp = esp + 8; /* 0x31003A38: add esp, 8 */ 6491 _flag_k = FK_ADD; 6492 PUSH32(esp, eax); /* 0x31003A3B: push eax */ 6493 RECOMP_ICALL(0x31046864u); /* 0x31003A3C: call 0x31046864 */ /* not lifted */ 6494 RECOMP_FLAGS_IN(); 6495 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6496 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6497 esp = esp + 8; /* 0x31003A41: add esp, 8 */ 6498 _flag_k = FK_ADD; 6499 PUSH32(esp, eax); /* 0x31003A44: push eax */ 6500 RECOMP_ICALL(esi); /* 0x31003A45: call esi */ 6501 RECOMP_FLAGS_IN(); 6502 ecx = MEM32(ebp + (-0x14)); /* 0x31003A47: mov ecx, dword ptr [ebp - 0x14] */ 6503 edx = MEM32(ebp + (-0x18)); /* 0x31003A4A: mov edx, dword ptr [ebp - 0x18] */ 6504 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6505 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6506 esp = esp + 8; /* 0x31003A4D: add esp, 8 */ 6507 _flag_k = FK_ADD; 6508 PUSH32(esp, ecx); /* 0x31003A50: push ecx */ 6509 PUSH32(esp, edx); /* 0x31003A51: push edx */ 6510 PUSH32(esp, eax); /* 0x31003A52: push eax */ 6511 RECOMP_ICALL(MEM32(0x31048138)); /* 0x31003A53: call dword ptr [0x31048138] */ 6512 RECOMP_FLAGS_IN(); 6513 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6514 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6515 esp = esp + 4; /* 0x31003A59: add esp, 4 */ 6516 _flag_k = FK_ADD; 6517 PUSH32(esp, eax); /* 0x31003A5C: push eax */ 6518 RECOMP_ICALL(esi); /* 0x31003A5D: call esi */ 6519 RECOMP_FLAGS_IN(); 6520 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6521 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6522 esp = esp + 8; /* 0x31003A5F: add esp, 8 */ 6523 _flag_k = FK_ADD; 6524 PUSH32(esp, eax); /* 0x31003A62: push eax */ 6525 RECOMP_ICALL(esi); /* 0x31003A63: call esi */ 6526 RECOMP_FLAGS_IN(); 6527 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6528 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6529 esp = esp + 8; /* 0x31003A65: add esp, 8 */ 6530 _flag_k = FK_ADD; 6531 PUSH32(esp, 1); /* 0x31003A68: push 1 */ 6532 ecx = ebp + (-0x44); /* 0x31003A6A: lea ecx, [ebp - 0x44] */ 6533 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x31003A6D: mov byte ptr [ebp - 4], 0 */ 6534 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31003A71: call dword ptr [0x310480d4] */ 6535 RECOMP_FLAGS_IN(); 6536 PUSH32(esp, 1); /* 0x31003A77: push 1 */ 6537 ecx = ebp + (-0x28); /* 0x31003A79: lea ecx, [ebp - 0x28] */ 6538 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x31003A7C: mov dword ptr [ebp - 4], 0xffffffff */ 6539 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31003A83: call dword ptr [0x310480d4] */ 6540 RECOMP_FLAGS_IN(); 6541 goto L_31003E2A; /* 0x31003A89: jmp 0x31003e2a */ 6542 L_31003A8E: 6543 fp_push((double)(int32_t)MEM32(ebp + 0x10)); /* 0x31003A8E: fild dword ptr [ebp + 0x10] */ 6544 eax = MEM32(edi + 0x1C); /* 0x31003A91: mov eax, dword ptr [edi + 0x1c] */ 6545 MEM32(ebp + (-0x30)) = eax; /* 0x31003A94: mov dword ptr [ebp - 0x30], eax */ 6546 MEM32(ebp + (-0x2C)) = 0; /* 0x31003A97: mov dword ptr [ebp - 0x2c], 0 */ 6547 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x31003A9E: fstp dword ptr [ebp + 0xc] */ 6548 fp_push_i64((int64_t)MEM64(ebp + (-0x30))); /* 0x31003AA1: fild qword ptr [ebp - 0x30] */ 6549 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x31003AA4: fdiv dword ptr [ebp + 0xc] */ 6550 _st[0] += *(double*)ADDR(0x31048368); /* 0x31003AA7: fadd qword ptr [0x31048368] */ 6551 RECOMP_ICALL(0x310469D4u); /* 0x31003AAD: call 0x310469d4 */ /* not lifted */ 6552 RECOMP_FLAGS_IN(); 6553 PUSH32(esp, eax); /* 0x31003AB2: push eax */ 6554 ecx = ebp + (-0x64); /* 0x31003AB3: lea ecx, [ebp - 0x64] */ 6555 PUSH32(esp, ecx); /* 0x31003AB6: push ecx */ 6556 RECOMP_ICALL(0x31004380u); /* 0x31003AB7: call 0x31004380 */ /* not lifted */ 6557 RECOMP_FLAGS_IN(); 6558 MEM32(ebp + (-0x2C)) = eax; /* 0x31003ABC: mov dword ptr [ebp - 0x2c], eax */ 6559 edx = MEM32(edi + 0x14); /* 0x31003ABF: mov edx, dword ptr [edi + 0x14] */ 6560 MEM32(ebp + (-0x20)) = edx; /* 0x31003AC2: mov dword ptr [ebp - 0x20], edx */ 6561 MEM32(ebp + (-0x1C)) = 0; /* 0x31003AC5: mov dword ptr [ebp - 0x1c], 0 */ 6562 fp_push_i64((int64_t)MEM64(ebp + (-0x20))); /* 0x31003ACC: fild qword ptr [ebp - 0x20] */ 6563 MEM32(ebp + (-0x4)) = 2; /* 0x31003ACF: mov dword ptr [ebp - 4], 2 */ 6564 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x31003AD6: fdiv dword ptr [ebp + 0xc] */ 6565 _st[0] += *(double*)ADDR(0x31048368); /* 0x31003AD9: fadd qword ptr [0x31048368] */ 6566 RECOMP_ICALL(0x310469D4u); /* 0x31003ADF: call 0x310469d4 */ /* not lifted */ 6567 RECOMP_FLAGS_IN(); 6568 PUSH32(esp, eax); /* 0x31003AE4: push eax */ 6569 eax = ebp + (-0x54); /* 0x31003AE5: lea eax, [ebp - 0x54] */ 6570 PUSH32(esp, eax); /* 0x31003AE8: push eax */ 6571 RECOMP_ICALL(0x31004380u); /* 0x31003AE9: call 0x31004380 */ /* not lifted */ 6572 RECOMP_FLAGS_IN(); 6573 MEM32(ebp + (-0x1C)) = eax; /* 0x31003AEE: mov dword ptr [ebp - 0x1c], eax */ 6574 ecx = MEM32(edi); /* 0x31003AF1: mov ecx, dword ptr [edi] */ 6575 MEM32(ebp + (-0x3C)) = ecx; /* 0x31003AF3: mov dword ptr [ebp - 0x3c], ecx */ 6576 MEM32(ebp + (-0x38)) = 0; /* 0x31003AF6: mov dword ptr [ebp - 0x38], 0 */ 6577 fp_push_i64((int64_t)MEM64(ebp + (-0x3C))); /* 0x31003AFD: fild qword ptr [ebp - 0x3c] */ 6578 edx = MEM32(ebp + 0x10); /* 0x31003B00: mov edx, dword ptr [ebp + 0x10] */ 6579 eax = MEM32(ebp + (-0x10)); /* 0x31003B03: mov eax, dword ptr [ebp - 0x10] */ 6580 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x31003B06: fdiv dword ptr [ebp + 0xc] */ 6581 ecx = MEM32(ebp + 0x8); /* 0x31003B09: mov ecx, dword ptr [ebp + 8] */ 6582 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 6583 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6584 esp = esp + 0xCu; /* 0x31003B0C: add esp, 0xc */ 6585 _flag_k = FK_ADD; 6586 MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x31003B0F: mov byte ptr [ebp - 4], 3 */ 6587 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x31003B13: fstp dword ptr [esp] */ 6588 PUSH32(esp, 0x31051898u); /* 0x31003B16: push 0x31051898 */ 6589 PUSH32(esp, ebx); /* 0x31003B1B: push ebx */ 6590 PUSH32(esp, esi); /* 0x31003B1C: push esi */ 6591 esi = MEM32(0x31048098); /* 0x31003B1D: mov esi, dword ptr [0x31048098] */ 6592 PUSH32(esp, 0x31051784u); /* 0x31003B23: push 0x31051784 */ 6593 PUSH32(esp, edx); /* 0x31003B28: push edx */ 6594 PUSH32(esp, 0x31051754u); /* 0x31003B29: push 0x31051754 */ 6595 PUSH32(esp, eax); /* 0x31003B2E: push eax */ 6596 PUSH32(esp, ecx); /* 0x31003B2F: push ecx */ 6597 RECOMP_ICALL(esi); /* 0x31003B30: call esi */ 6598 RECOMP_FLAGS_IN(); 6599 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6600 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6601 esp = esp + 8; /* 0x31003B32: add esp, 8 */ 6602 _flag_k = FK_ADD; 6603 PUSH32(esp, eax); /* 0x31003B35: push eax */ 6604 RECOMP_ICALL(esi); /* 0x31003B36: call esi */ 6605 RECOMP_FLAGS_IN(); 6606 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6607 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6608 esp = esp + 8; /* 0x31003B38: add esp, 8 */ 6609 _flag_k = FK_ADD; 6610 ecx = eax; /* 0x31003B3B: mov ecx, eax */ 6611 RECOMP_ICALL(MEM32(0x3104809C)); /* 0x31003B3D: call dword ptr [0x3104809c] */ 6612 RECOMP_FLAGS_IN(); 6613 PUSH32(esp, eax); /* 0x31003B43: push eax */ 6614 RECOMP_ICALL(esi); /* 0x31003B44: call esi */ 6615 RECOMP_FLAGS_IN(); 6616 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6617 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6618 esp = esp + 8; /* 0x31003B46: add esp, 8 */ 6619 _flag_k = FK_ADD; 6620 PUSH32(esp, eax); /* 0x31003B49: push eax */ 6621 RECOMP_ICALL(esi); /* 0x31003B4A: call esi */ 6622 RECOMP_FLAGS_IN(); 6623 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6624 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6625 esp = esp + 8; /* 0x31003B4C: add esp, 8 */ 6626 _flag_k = FK_ADD; 6627 PUSH32(esp, eax); /* 0x31003B4F: push eax */ 6628 RECOMP_ICALL(esi); /* 0x31003B50: call esi */ 6629 RECOMP_FLAGS_IN(); 6630 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6631 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6632 esp = esp + 8; /* 0x31003B52: add esp, 8 */ 6633 _flag_k = FK_ADD; 6634 PUSH32(esp, eax); /* 0x31003B55: push eax */ 6635 RECOMP_ICALL(esi); /* 0x31003B56: call esi */ 6636 RECOMP_FLAGS_IN(); 6637 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6638 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6639 esp = esp + 8; /* 0x31003B58: add esp, 8 */ 6640 _flag_k = FK_ADD; 6641 ecx = eax; /* 0x31003B5B: mov ecx, eax */ 6642 RECOMP_ICALL(MEM32(0x310480A0)); /* 0x31003B5D: call dword ptr [0x310480a0] */ 6643 RECOMP_FLAGS_IN(); 6644 PUSH32(esp, eax); /* 0x31003B63: push eax */ 6645 RECOMP_ICALL(MEM32(0x31048138)); /* 0x31003B64: call dword ptr [0x31048138] */ 6646 RECOMP_FLAGS_IN(); 6647 ecx = MEM32(edi + 0x4); /* 0x31003B6A: mov ecx, dword ptr [edi + 4] */ 6648 edx = MEM32(edi); /* 0x31003B6D: mov edx, dword ptr [edi] */ 6649 MEM32(ebp + (-0x3C)) = ecx; /* 0x31003B6F: mov dword ptr [ebp - 0x3c], ecx */ 6650 MEM32(ebp + (-0x38)) = 0; /* 0x31003B72: mov dword ptr [ebp - 0x38], 0 */ 6651 fp_push_i64((int64_t)MEM64(ebp + (-0x3C))); /* 0x31003B79: fild qword ptr [ebp - 0x3c] */ 6652 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6653 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6654 esp = esp + 4; /* 0x31003B7C: add esp, 4 */ 6655 _flag_k = FK_ADD; 6656 PUSH32(esp, 0x3105185Cu); /* 0x31003B7F: push 0x3105185c */ 6657 _st[0] *= *(double*)ADDR(0x31048370); /* 0x31003B84: fmul qword ptr [0x31048370] */ 6658 MEM32(ebp + (-0x3C)) = edx; /* 0x31003B8A: mov dword ptr [ebp - 0x3c], edx */ 6659 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6660 edx = 0; /* 0x31003B8D: xor edx, edx */ 6661 _cf = 0; 6662 _flag_k = FK_TEST; 6663 MEM32(ebp + (-0x38)) = edx; /* 0x31003B8F: mov dword ptr [ebp - 0x38], edx */ 6664 fp_push_i64((int64_t)MEM64(ebp + (-0x3C))); /* 0x31003B92: fild qword ptr [ebp - 0x3c] */ 6665 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6666 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6667 esp = esp - 8; /* 0x31003B95: sub esp, 8 */ 6668 _flag_k = FK_CMP; 6669 MEM32(ebp + (-0x3C)) = ecx; /* 0x31003B98: mov dword ptr [ebp - 0x3c], ecx */ 6670 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x31003B9B: fdivp st(1) */ 6671 MEM32(ebp + (-0x38)) = edx; /* 0x31003B9D: mov dword ptr [ebp - 0x38], edx */ 6672 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x31003BA0: fstp qword ptr [esp] */ 6673 fp_push_i64((int64_t)MEM64(ebp + (-0x3C))); /* 0x31003BA3: fild qword ptr [ebp - 0x3c] */ 6674 PUSH32(esp, 0x31051858u); /* 0x31003BA6: push 0x31051858 */ 6675 PUSH32(esp, ecx); /* 0x31003BAB: push ecx */ 6676 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x31003BAC: fdiv dword ptr [ebp + 0xc] */ 6677 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x31003BAF: fstp dword ptr [esp] */ 6678 PUSH32(esp, 0x3105183Cu); /* 0x31003BB2: push 0x3105183c */ 6679 PUSH32(esp, ebx); /* 0x31003BB7: push ebx */ 6680 PUSH32(esp, eax); /* 0x31003BB8: push eax */ 6681 RECOMP_ICALL(esi); /* 0x31003BB9: call esi */ 6682 RECOMP_FLAGS_IN(); 6683 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6684 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6685 esp = esp + 8; /* 0x31003BBB: add esp, 8 */ 6686 _flag_k = FK_ADD; 6687 PUSH32(esp, eax); /* 0x31003BBE: push eax */ 6688 RECOMP_ICALL(esi); /* 0x31003BBF: call esi */ 6689 RECOMP_FLAGS_IN(); 6690 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6691 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6692 esp = esp + 8; /* 0x31003BC1: add esp, 8 */ 6693 _flag_k = FK_ADD; 6694 ecx = eax; /* 0x31003BC4: mov ecx, eax */ 6695 RECOMP_ICALL(MEM32(0x310480A0)); /* 0x31003BC6: call dword ptr [0x310480a0] */ 6696 RECOMP_FLAGS_IN(); 6697 PUSH32(esp, eax); /* 0x31003BCC: push eax */ 6698 RECOMP_ICALL(esi); /* 0x31003BCD: call esi */ 6699 RECOMP_FLAGS_IN(); 6700 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6701 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6702 esp = esp + 8; /* 0x31003BCF: add esp, 8 */ 6703 _flag_k = FK_ADD; 6704 ecx = eax; /* 0x31003BD2: mov ecx, eax */ 6705 RECOMP_ICALL(MEM32(0x31048100)); /* 0x31003BD4: call dword ptr [0x31048100] */ 6706 RECOMP_FLAGS_IN(); 6707 PUSH32(esp, eax); /* 0x31003BDA: push eax */ 6708 RECOMP_ICALL(esi); /* 0x31003BDB: call esi */ 6709 RECOMP_FLAGS_IN(); 6710 PUSH32(esp, eax); /* 0x31003BDD: push eax */ 6711 RECOMP_ICALL(MEM32(0x31048138)); /* 0x31003BDE: call dword ptr [0x31048138] */ 6712 RECOMP_FLAGS_IN(); 6713 ecx = MEM32(edi + 0x8); /* 0x31003BE4: mov ecx, dword ptr [edi + 8] */ 6714 MEM32(ebp + (-0x3C)) = ecx; /* 0x31003BE7: mov dword ptr [ebp - 0x3c], ecx */ 6715 MEM32(ebp + (-0x38)) = 0; /* 0x31003BEA: mov dword ptr [ebp - 0x38], 0 */ 6716 fp_push_i64((int64_t)MEM64(ebp + (-0x3C))); /* 0x31003BF1: fild qword ptr [ebp - 0x3c] */ 6717 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6718 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6719 esp = esp + 8; /* 0x31003BF4: add esp, 8 */ 6720 _flag_k = FK_ADD; 6721 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x31003BF7: fdiv dword ptr [ebp + 0xc] */ 6722 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x31003BFA: fstp dword ptr [esp] */ 6723 PUSH32(esp, 0x31051820u); /* 0x31003BFD: push 0x31051820 */ 6724 PUSH32(esp, ebx); /* 0x31003C02: push ebx */ 6725 PUSH32(esp, eax); /* 0x31003C03: push eax */ 6726 RECOMP_ICALL(esi); /* 0x31003C04: call esi */ 6727 RECOMP_FLAGS_IN(); 6728 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6729 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6730 esp = esp + 8; /* 0x31003C06: add esp, 8 */ 6731 _flag_k = FK_ADD; 6732 PUSH32(esp, eax); /* 0x31003C09: push eax */ 6733 RECOMP_ICALL(esi); /* 0x31003C0A: call esi */ 6734 RECOMP_FLAGS_IN(); 6735 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6736 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6737 esp = esp + 8; /* 0x31003C0C: add esp, 8 */ 6738 _flag_k = FK_ADD; 6739 ecx = eax; /* 0x31003C0F: mov ecx, eax */ 6740 RECOMP_ICALL(MEM32(0x310480A0)); /* 0x31003C11: call dword ptr [0x310480a0] */ 6741 RECOMP_FLAGS_IN(); 6742 PUSH32(esp, eax); /* 0x31003C17: push eax */ 6743 RECOMP_ICALL(MEM32(0x31048138)); /* 0x31003C18: call dword ptr [0x31048138] */ 6744 RECOMP_FLAGS_IN(); 6745 ecx = MEM32(edi + 0xC); /* 0x31003C1E: mov ecx, dword ptr [edi + 0xc] */ 6746 edx = MEM32(edi + 0x8); /* 0x31003C21: mov edx, dword ptr [edi + 8] */ 6747 MEM32(ebp + (-0x3C)) = ecx; /* 0x31003C24: mov dword ptr [ebp - 0x3c], ecx */ 6748 MEM32(ebp + (-0x38)) = 0; /* 0x31003C27: mov dword ptr [ebp - 0x38], 0 */ 6749 fp_push_i64((int64_t)MEM64(ebp + (-0x3C))); /* 0x31003C2E: fild qword ptr [ebp - 0x3c] */ 6750 MEM32(ebp + (-0x3C)) = edx; /* 0x31003C31: mov dword ptr [ebp - 0x3c], edx */ 6751 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6752 edx = 0; /* 0x31003C34: xor edx, edx */ 6753 _cf = 0; 6754 _flag_k = FK_TEST; 6755 _st[0] *= *(double*)ADDR(0x31048370); /* 0x31003C36: fmul qword ptr [0x31048370] */ 6756 MEM32(ebp + (-0x38)) = edx; /* 0x31003C3C: mov dword ptr [ebp - 0x38], edx */ 6757 fp_push_i64((int64_t)MEM64(ebp + (-0x3C))); /* 0x31003C3F: fild qword ptr [ebp - 0x3c] */ 6758 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6759 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6760 esp = esp + 4; /* 0x31003C42: add esp, 4 */ 6761 _flag_k = FK_ADD; 6762 PUSH32(esp, 0x3105185Cu); /* 0x31003C45: push 0x3105185c */ 6763 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6764 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6765 esp = esp - 8; /* 0x31003C4A: sub esp, 8 */ 6766 _flag_k = FK_CMP; 6767 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x31003C4D: fdivp st(1) */ 6768 MEM32(ebp + (-0x3C)) = ecx; /* 0x31003C4F: mov dword ptr [ebp - 0x3c], ecx */ 6769 MEM32(ebp + (-0x38)) = edx; /* 0x31003C52: mov dword ptr [ebp - 0x38], edx */ 6770 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x31003C55: fstp qword ptr [esp] */ 6771 fp_push_i64((int64_t)MEM64(ebp + (-0x3C))); /* 0x31003C58: fild qword ptr [ebp - 0x3c] */ 6772 PUSH32(esp, 0x31051858u); /* 0x31003C5B: push 0x31051858 */ 6773 PUSH32(esp, ecx); /* 0x31003C60: push ecx */ 6774 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x31003C61: fdiv dword ptr [ebp + 0xc] */ 6775 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x31003C64: fstp dword ptr [esp] */ 6776 PUSH32(esp, 0x31051804u); /* 0x31003C67: push 0x31051804 */ 6777 PUSH32(esp, ebx); /* 0x31003C6C: push ebx */ 6778 PUSH32(esp, eax); /* 0x31003C6D: push eax */ 6779 RECOMP_ICALL(esi); /* 0x31003C6E: call esi */ 6780 RECOMP_FLAGS_IN(); 6781 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6782 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6783 esp = esp + 8; /* 0x31003C70: add esp, 8 */ 6784 _flag_k = FK_ADD; 6785 PUSH32(esp, eax); /* 0x31003C73: push eax */ 6786 RECOMP_ICALL(esi); /* 0x31003C74: call esi */ 6787 RECOMP_FLAGS_IN(); 6788 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6789 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6790 esp = esp + 8; /* 0x31003C76: add esp, 8 */ 6791 _flag_k = FK_ADD; 6792 ecx = eax; /* 0x31003C79: mov ecx, eax */ 6793 RECOMP_ICALL(MEM32(0x310480A0)); /* 0x31003C7B: call dword ptr [0x310480a0] */ 6794 RECOMP_FLAGS_IN(); 6795 PUSH32(esp, eax); /* 0x31003C81: push eax */ 6796 RECOMP_ICALL(esi); /* 0x31003C82: call esi */ 6797 RECOMP_FLAGS_IN(); 6798 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6799 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6800 esp = esp + 8; /* 0x31003C84: add esp, 8 */ 6801 _flag_k = FK_ADD; 6802 ecx = eax; /* 0x31003C87: mov ecx, eax */ 6803 RECOMP_ICALL(MEM32(0x31048100)); /* 0x31003C89: call dword ptr [0x31048100] */ 6804 RECOMP_FLAGS_IN(); 6805 PUSH32(esp, eax); /* 0x31003C8F: push eax */ 6806 RECOMP_ICALL(esi); /* 0x31003C90: call esi */ 6807 RECOMP_FLAGS_IN(); 6808 PUSH32(esp, eax); /* 0x31003C92: push eax */ 6809 RECOMP_ICALL(MEM32(0x31048138)); /* 0x31003C93: call dword ptr [0x31048138] */ 6810 RECOMP_FLAGS_IN(); 6811 ecx = MEM32(edi + 0x10); /* 0x31003C99: mov ecx, dword ptr [edi + 0x10] */ 6812 MEM32(ebp + (-0x3C)) = ecx; /* 0x31003C9C: mov dword ptr [ebp - 0x3c], ecx */ 6813 MEM32(ebp + (-0x38)) = 0; /* 0x31003C9F: mov dword ptr [ebp - 0x38], 0 */ 6814 fp_push_i64((int64_t)MEM64(ebp + (-0x3C))); /* 0x31003CA6: fild qword ptr [ebp - 0x3c] */ 6815 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6816 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6817 esp = esp + 8; /* 0x31003CA9: add esp, 8 */ 6818 _flag_k = FK_ADD; 6819 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x31003CAC: fdiv dword ptr [ebp + 0xc] */ 6820 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x31003CAF: fstp dword ptr [esp] */ 6821 PUSH32(esp, 0x310517E8u); /* 0x31003CB2: push 0x310517e8 */ 6822 PUSH32(esp, ebx); /* 0x31003CB7: push ebx */ 6823 PUSH32(esp, eax); /* 0x31003CB8: push eax */ 6824 RECOMP_ICALL(esi); /* 0x31003CB9: call esi */ 6825 RECOMP_FLAGS_IN(); 6826 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6827 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6828 esp = esp + 8; /* 0x31003CBB: add esp, 8 */ 6829 _flag_k = FK_ADD; 6830 PUSH32(esp, eax); /* 0x31003CBE: push eax */ 6831 RECOMP_ICALL(esi); /* 0x31003CBF: call esi */ 6832 RECOMP_FLAGS_IN(); 6833 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6834 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6835 esp = esp + 8; /* 0x31003CC1: add esp, 8 */ 6836 _flag_k = FK_ADD; 6837 ecx = eax; /* 0x31003CC4: mov ecx, eax */ 6838 RECOMP_ICALL(MEM32(0x310480A0)); /* 0x31003CC6: call dword ptr [0x310480a0] */ 6839 RECOMP_FLAGS_IN(); 6840 PUSH32(esp, eax); /* 0x31003CCC: push eax */ 6841 RECOMP_ICALL(MEM32(0x31048138)); /* 0x31003CCD: call dword ptr [0x31048138] */ 6842 RECOMP_FLAGS_IN(); 6843 ecx = MEM32(edi + 0x14); /* 0x31003CD3: mov ecx, dword ptr [edi + 0x14] */ 6844 MEM32(ebp + (-0x3C)) = ecx; /* 0x31003CD6: mov dword ptr [ebp - 0x3c], ecx */ 6845 MEM32(ebp + (-0x38)) = 0; /* 0x31003CD9: mov dword ptr [ebp - 0x38], 0 */ 6846 fp_push_i64((int64_t)MEM64(ebp + (-0x3C))); /* 0x31003CE0: fild qword ptr [ebp - 0x3c] */ 6847 edx = MEM32(ebp + (-0x1C)); /* 0x31003CE3: mov edx, dword ptr [ebp - 0x1c] */ 6848 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6849 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6850 esp = esp + 4; /* 0x31003CE6: add esp, 4 */ 6851 _flag_k = FK_ADD; 6852 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x31003CE9: fdiv dword ptr [ebp + 0xc] */ 6853 PUSH32(esp, 0x310517E4u); /* 0x31003CEC: push 0x310517e4 */ 6854 PUSH32(esp, edx); /* 0x31003CF1: push edx */ 6855 PUSH32(esp, 0x31051858u); /* 0x31003CF2: push 0x31051858 */ 6856 PUSH32(esp, ecx); /* 0x31003CF7: push ecx */ 6857 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x31003CF8: fstp dword ptr [esp] */ 6858 PUSH32(esp, 0x310517C8u); /* 0x31003CFB: push 0x310517c8 */ 6859 PUSH32(esp, ebx); /* 0x31003D00: push ebx */ 6860 PUSH32(esp, eax); /* 0x31003D01: push eax */ 6861 RECOMP_ICALL(esi); /* 0x31003D02: call esi */ 6862 RECOMP_FLAGS_IN(); 6863 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6864 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6865 esp = esp + 8; /* 0x31003D04: add esp, 8 */ 6866 _flag_k = FK_ADD; 6867 PUSH32(esp, eax); /* 0x31003D07: push eax */ 6868 RECOMP_ICALL(esi); /* 0x31003D08: call esi */ 6869 RECOMP_FLAGS_IN(); 6870 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6871 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6872 esp = esp + 8; /* 0x31003D0A: add esp, 8 */ 6873 _flag_k = FK_ADD; 6874 ecx = eax; /* 0x31003D0D: mov ecx, eax */ 6875 RECOMP_ICALL(MEM32(0x310480A0)); /* 0x31003D0F: call dword ptr [0x310480a0] */ 6876 RECOMP_FLAGS_IN(); 6877 PUSH32(esp, eax); /* 0x31003D15: push eax */ 6878 RECOMP_ICALL(esi); /* 0x31003D16: call esi */ 6879 RECOMP_FLAGS_IN(); 6880 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6881 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6882 esp = esp + 8; /* 0x31003D18: add esp, 8 */ 6883 _flag_k = FK_ADD; 6884 PUSH32(esp, eax); /* 0x31003D1B: push eax */ 6885 RECOMP_ICALL(0x31046864u); /* 0x31003D1C: call 0x31046864 */ /* not lifted */ 6886 RECOMP_FLAGS_IN(); 6887 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6888 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6889 esp = esp + 8; /* 0x31003D21: add esp, 8 */ 6890 _flag_k = FK_ADD; 6891 PUSH32(esp, eax); /* 0x31003D24: push eax */ 6892 RECOMP_ICALL(esi); /* 0x31003D25: call esi */ 6893 RECOMP_FLAGS_IN(); 6894 PUSH32(esp, eax); /* 0x31003D27: push eax */ 6895 RECOMP_ICALL(MEM32(0x31048138)); /* 0x31003D28: call dword ptr [0x31048138] */ 6896 RECOMP_FLAGS_IN(); 6897 edx = MEM32(edi + 0x18); /* 0x31003D2E: mov edx, dword ptr [edi + 0x18] */ 6898 MEM32(ebp + (-0x3C)) = edx; /* 0x31003D31: mov dword ptr [ebp - 0x3c], edx */ 6899 MEM32(ebp + (-0x38)) = 0; /* 0x31003D34: mov dword ptr [ebp - 0x38], 0 */ 6900 fp_push_i64((int64_t)MEM64(ebp + (-0x3C))); /* 0x31003D3B: fild qword ptr [ebp - 0x3c] */ 6901 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6902 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6903 esp = esp + 8; /* 0x31003D3E: add esp, 8 */ 6904 _flag_k = FK_ADD; 6905 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x31003D41: fdiv dword ptr [ebp + 0xc] */ 6906 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x31003D44: fstp dword ptr [esp] */ 6907 PUSH32(esp, 0x310517ACu); /* 0x31003D47: push 0x310517ac */ 6908 PUSH32(esp, ebx); /* 0x31003D4C: push ebx */ 6909 PUSH32(esp, eax); /* 0x31003D4D: push eax */ 6910 RECOMP_ICALL(esi); /* 0x31003D4E: call esi */ 6911 RECOMP_FLAGS_IN(); 6912 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6913 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6914 esp = esp + 8; /* 0x31003D50: add esp, 8 */ 6915 _flag_k = FK_ADD; 6916 PUSH32(esp, eax); /* 0x31003D53: push eax */ 6917 RECOMP_ICALL(esi); /* 0x31003D54: call esi */ 6918 RECOMP_FLAGS_IN(); 6919 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6920 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6921 esp = esp + 8; /* 0x31003D56: add esp, 8 */ 6922 _flag_k = FK_ADD; 6923 ecx = eax; /* 0x31003D59: mov ecx, eax */ 6924 RECOMP_ICALL(MEM32(0x310480A0)); /* 0x31003D5B: call dword ptr [0x310480a0] */ 6925 RECOMP_FLAGS_IN(); 6926 PUSH32(esp, eax); /* 0x31003D61: push eax */ 6927 RECOMP_ICALL(MEM32(0x31048138)); /* 0x31003D62: call dword ptr [0x31048138] */ 6928 RECOMP_FLAGS_IN(); 6929 edx = MEM32(edi + 0x1C); /* 0x31003D68: mov edx, dword ptr [edi + 0x1c] */ 6930 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6931 edi = 0; /* 0x31003D6B: xor edi, edi */ 6932 _cf = 0; 6933 _flag_k = FK_TEST; 6934 MEM32(ebp + (-0x3C)) = edx; /* 0x31003D6D: mov dword ptr [ebp - 0x3c], edx */ 6935 MEM32(ebp + (-0x38)) = edi; /* 0x31003D70: mov dword ptr [ebp - 0x38], edi */ 6936 fp_push_i64((int64_t)MEM64(ebp + (-0x3C))); /* 0x31003D73: fild qword ptr [ebp - 0x3c] */ 6937 ecx = MEM32(ebp + (-0x2C)); /* 0x31003D76: mov ecx, dword ptr [ebp - 0x2c] */ 6938 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6939 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6940 esp = esp + 4; /* 0x31003D79: add esp, 4 */ 6941 _flag_k = FK_ADD; 6942 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x31003D7C: fdiv dword ptr [ebp + 0xc] */ 6943 PUSH32(esp, 0x310517E4u); /* 0x31003D7F: push 0x310517e4 */ 6944 PUSH32(esp, ecx); /* 0x31003D84: push ecx */ 6945 PUSH32(esp, 0x31051858u); /* 0x31003D85: push 0x31051858 */ 6946 PUSH32(esp, ecx); /* 0x31003D8A: push ecx */ 6947 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x31003D8B: fstp dword ptr [esp] */ 6948 PUSH32(esp, 0x31051790u); /* 0x31003D8E: push 0x31051790 */ 6949 PUSH32(esp, ebx); /* 0x31003D93: push ebx */ 6950 PUSH32(esp, eax); /* 0x31003D94: push eax */ 6951 RECOMP_ICALL(esi); /* 0x31003D95: call esi */ 6952 RECOMP_FLAGS_IN(); 6953 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6954 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6955 esp = esp + 8; /* 0x31003D97: add esp, 8 */ 6956 _flag_k = FK_ADD; 6957 PUSH32(esp, eax); /* 0x31003D9A: push eax */ 6958 RECOMP_ICALL(esi); /* 0x31003D9B: call esi */ 6959 RECOMP_FLAGS_IN(); 6960 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6961 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6962 esp = esp + 8; /* 0x31003D9D: add esp, 8 */ 6963 _flag_k = FK_ADD; 6964 ecx = eax; /* 0x31003DA0: mov ecx, eax */ 6965 RECOMP_ICALL(MEM32(0x310480A0)); /* 0x31003DA2: call dword ptr [0x310480a0] */ 6966 RECOMP_FLAGS_IN(); 6967 PUSH32(esp, eax); /* 0x31003DA8: push eax */ 6968 RECOMP_ICALL(esi); /* 0x31003DA9: call esi */ 6969 RECOMP_FLAGS_IN(); 6970 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6971 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6972 esp = esp + 8; /* 0x31003DAB: add esp, 8 */ 6973 _flag_k = FK_ADD; 6974 PUSH32(esp, eax); /* 0x31003DAE: push eax */ 6975 RECOMP_ICALL(0x31046864u); /* 0x31003DAF: call 0x31046864 */ /* not lifted */ 6976 RECOMP_FLAGS_IN(); 6977 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6978 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6979 esp = esp + 8; /* 0x31003DB4: add esp, 8 */ 6980 _flag_k = FK_ADD; 6981 PUSH32(esp, eax); /* 0x31003DB7: push eax */ 6982 RECOMP_ICALL(esi); /* 0x31003DB8: call esi */ 6983 RECOMP_FLAGS_IN(); 6984 ecx = MEM32(ebp + (-0x14)); /* 0x31003DBA: mov ecx, dword ptr [ebp - 0x14] */ 6985 edx = MEM32(ebp + (-0x18)); /* 0x31003DBD: mov edx, dword ptr [ebp - 0x18] */ 6986 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6987 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6988 esp = esp + 8; /* 0x31003DC0: add esp, 8 */ 6989 _flag_k = FK_ADD; 6990 PUSH32(esp, ecx); /* 0x31003DC3: push ecx */ 6991 PUSH32(esp, edx); /* 0x31003DC4: push edx */ 6992 PUSH32(esp, eax); /* 0x31003DC5: push eax */ 6993 RECOMP_ICALL(MEM32(0x31048138)); /* 0x31003DC6: call dword ptr [0x31048138] */ 6994 RECOMP_FLAGS_IN(); 6995 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6996 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6997 esp = esp + 4; /* 0x31003DCC: add esp, 4 */ 6998 _flag_k = FK_ADD; 6999 PUSH32(esp, eax); /* 0x31003DCF: push eax */ 7000 RECOMP_ICALL(esi); /* 0x31003DD0: call esi */ 7001 RECOMP_FLAGS_IN(); 7002 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 7003 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7004 esp = esp + 8; /* 0x31003DD2: add esp, 8 */ 7005 _flag_k = FK_ADD; 7006 PUSH32(esp, eax); /* 0x31003DD5: push eax */ 7007 RECOMP_ICALL(esi); /* 0x31003DD6: call esi */ 7008 RECOMP_FLAGS_IN(); 7009 eax = MEM32(ebp + (-0x50)); /* 0x31003DD8: mov eax, dword ptr [ebp - 0x50] */ 7010 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 7011 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7012 esp = esp + 8; /* 0x31003DDB: add esp, 8 */ 7013 _flag_k = FK_ADD; 7014 /* cmp eax, edi */ /* 0x31003DDE: cmp eax, edi */ 7015 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 7016 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7017 _flag_k = FK_CMP; 7018 if (CMP_EQ(_flag_a, _flag_b)) goto L_31003DFE; /* 0x31003DE0: je 0x31003dfe */ 7019 L_31003DE2: 7020 ecx = eax + (-0x1); /* 0x31003DE2: lea ecx, [eax - 1] */ 7021 SET_LO8(eax, MEM8(ecx)); /* 0x31003DE5: mov al, byte ptr [ecx] */ 7022 /* test LO8(eax), LO8(eax) */ /* 0x31003DE7: test al, al */ 7023 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 7024 _cf = 0; 7025 _flag_k = FK_NARROW(FK_TEST, 24); 7026 if (TEST_Z(_flag_a, _flag_b)) goto L_31003DF5; /* 0x31003DE9: je 0x31003df5 */ 7027 L_31003DEB: 7028 /* cmp LO8(eax), 0xFFu */ /* 0x31003DEB: cmp al, 0xff */ 7029 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 7030 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7031 _flag_k = FK_NARROW(FK_CMP, 24); 7032 if (CMP_EQ(_flag_a, _flag_b)) goto L_31003DF5; /* 0x31003DED: je 0x31003df5 */ 7033 L_31003DEF: 7034 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 7035 SET_LO8(eax, LO8(eax) - 1); /* 0x31003DEF: dec al */ 7036 _flag_k = FK_NARROW(FK_DEC, 24); 7037 MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x31003DF1: mov byte ptr [ecx], al */ 7038 goto L_31003DFE; /* 0x31003DF3: jmp 0x31003dfe */ 7039 L_31003DF5: 7040 PUSH32(esp, ecx); /* 0x31003DF5: push ecx */ 7041 RECOMP_ICALL(0x31046858u); /* 0x31003DF6: call 0x31046858 */ /* not lifted */ 7042 RECOMP_FLAGS_IN(); 7043 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7044 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7045 esp = esp + 4; /* 0x31003DFB: add esp, 4 */ 7046 _flag_k = FK_ADD; 7047 L_31003DFE: 7048 eax = MEM32(ebp + (-0x60)); /* 0x31003DFE: mov eax, dword ptr [ebp - 0x60] */ 7049 /* cmp eax, edi */ /* 0x31003E01: cmp eax, edi */ 7050 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 7051 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7052 _flag_k = FK_CMP; 7053 MEM32(ebp + (-0x50)) = edi; /* 0x31003E03: mov dword ptr [ebp - 0x50], edi */ 7054 MEM32(ebp + (-0x4C)) = edi; /* 0x31003E06: mov dword ptr [ebp - 0x4c], edi */ 7055 MEM32(ebp + (-0x48)) = edi; /* 0x31003E09: mov dword ptr [ebp - 0x48], edi */ 7056 if (CMP_EQ(_flag_a, _flag_b)) goto L_31003E2A; /* 0x31003E0C: je 0x31003e2a */ 7057 L_31003E0E: 7058 ecx = eax + (-0x1); /* 0x31003E0E: lea ecx, [eax - 1] */ 7059 SET_LO8(eax, MEM8(ecx)); /* 0x31003E11: mov al, byte ptr [ecx] */ 7060 /* test LO8(eax), LO8(eax) */ /* 0x31003E13: test al, al */ 7061 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 7062 _cf = 0; 7063 _flag_k = FK_NARROW(FK_TEST, 24); 7064 if (TEST_Z(_flag_a, _flag_b)) goto L_31003E21; /* 0x31003E15: je 0x31003e21 */ 7065 L_31003E17: 7066 /* cmp LO8(eax), 0xFFu */ /* 0x31003E17: cmp al, 0xff */ 7067 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 7068 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7069 _flag_k = FK_NARROW(FK_CMP, 24); 7070 if (CMP_EQ(_flag_a, _flag_b)) goto L_31003E21; /* 0x31003E19: je 0x31003e21 */ 7071 L_31003E1B: 7072 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 7073 SET_LO8(eax, LO8(eax) - 1); /* 0x31003E1B: dec al */ 7074 _flag_k = FK_NARROW(FK_DEC, 24); 7075 MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x31003E1D: mov byte ptr [ecx], al */ 7076 goto L_31003E2A; /* 0x31003E1F: jmp 0x31003e2a */ 7077 L_31003E21: 7078 PUSH32(esp, ecx); /* 0x31003E21: push ecx */ 7079 RECOMP_ICALL(0x31046858u); /* 0x31003E22: call 0x31046858 */ /* not lifted */ 7080 RECOMP_FLAGS_IN(); 7081 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7082 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7083 esp = esp + 4; /* 0x31003E27: add esp, 4 */ 7084 _flag_k = FK_ADD; 7085 L_31003E2A: 7086 eax = MEM32(ebp + 0x8); /* 0x31003E2A: mov eax, dword ptr [ebp + 8] */ 7087 ecx = MEM32(eax); /* 0x31003E2D: mov ecx, dword ptr [eax] */ 7088 edx = MEM32(ecx + 0x4); /* 0x31003E2F: mov edx, dword ptr [ecx + 4] */ 7089 ecx = MEM32(ebp + (-0x34)); /* 0x31003E32: mov ecx, dword ptr [ebp - 0x34] */ 7090 edi = POP32_VAL(esp); /* 0x31003E35: pop edi */ 7091 MEM32(edx + eax + 0x10) = ecx; /* 0x31003E36: mov dword ptr [edx + eax + 0x10], ecx */ 7092 ecx = MEM32(ebp + (-0xC)); /* 0x31003E3A: mov ecx, dword ptr [ebp - 0xc] */ 7093 esi = POP32_VAL(esp); /* 0x31003E3D: pop esi */ 7094 ebx = POP32_VAL(esp); /* 0x31003E3E: pop ebx */ 7095 MEM32(FS_BASE + (0)) = ecx; /* 0x31003E3F: mov dword ptr fs:[0], ecx */ 7096 esp = ebp; /* 0x31003E46: mov esp, ebp */ 7097 ebp = POP32_VAL(esp); /* 0x31003E48: pop ebp */ 7098 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31003E49: ret 0xc */ 7099 RECOMP_REGS_OUT(); 7100 } 7101 7102 void sub_31003E2A(void) { 7103 int _fpu_cmp = 0; 7104 uint32_t _cf = 0; 7105 int _df = 1; 7106 uint32_t _flag_k = FK_NONE; 7107 uint32_t _flag_a = 0, _flag_b = 0; 7108 uint32_t _itail_tgt = 0; 7109 RECOMP_REGS_LOCALS 7110 RECOMP_ENTER(0x31003E2Au); 7111 7112 L_31003E2A: 7113 eax = MEM32(ebp + 0x8); /* 0x31003E2A: mov eax, dword ptr [ebp + 8] */ 7114 ecx = MEM32(eax); /* 0x31003E2D: mov ecx, dword ptr [eax] */ 7115 edx = MEM32(ecx + 0x4); /* 0x31003E2F: mov edx, dword ptr [ecx + 4] */ 7116 ecx = MEM32(ebp + (-0x34)); /* 0x31003E32: mov ecx, dword ptr [ebp - 0x34] */ 7117 edi = POP32_VAL(esp); /* 0x31003E35: pop edi */ 7118 MEM32(edx + eax + 0x10) = ecx; /* 0x31003E36: mov dword ptr [edx + eax + 0x10], ecx */ 7119 ecx = MEM32(ebp + (-0xC)); /* 0x31003E3A: mov ecx, dword ptr [ebp - 0xc] */ 7120 esi = POP32_VAL(esp); /* 0x31003E3D: pop esi */ 7121 ebx = POP32_VAL(esp); /* 0x31003E3E: pop ebx */ 7122 MEM32(FS_BASE + (0)) = ecx; /* 0x31003E3F: mov dword ptr fs:[0], ecx */ 7123 esp = ebp; /* 0x31003E46: mov esp, ebp */ 7124 ebp = POP32_VAL(esp); /* 0x31003E48: pop ebp */ 7125 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31003E49: ret 0xc */ 7126 RECOMP_REGS_OUT(); 7127 } 7128 7129 void sub_31003E50(void) { 7130 int _fpu_cmp = 0; 7131 uint32_t _cf = 0; 7132 int _df = 1; 7133 uint32_t _flag_k = FK_NONE; 7134 uint32_t _flag_a = 0, _flag_b = 0; 7135 uint32_t _itail_tgt = 0; 7136 RECOMP_REGS_LOCALS 7137 RECOMP_ENTER(0x31003E50u); 7138 7139 L_31003E50: 7140 PUSH32(esp, ebp); /* 0x31003E50: push ebp */ 7141 ebp = esp; /* 0x31003E51: mov ebp, esp */ 7142 eax = ecx; /* 0x31003E53: mov eax, ecx */ 7143 ecx = MEM32(ebp + 0x8); /* 0x31003E55: mov ecx, dword ptr [ebp + 8] */ 7144 edx = MEM32(ecx); /* 0x31003E58: mov edx, dword ptr [ecx] */ 7145 PUSH32(esp, esi); /* 0x31003E5A: push esi */ 7146 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(edx); 7147 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7148 MEM32(eax) = MEM32(eax) - edx; /* 0x31003E5B: sub dword ptr [eax], edx */ 7149 _flag_k = FK_CMP; 7150 edx = MEM32(ecx + 0x4); /* 0x31003E5D: mov edx, dword ptr [ecx + 4] */ 7151 _flag_a = (uint32_t)(MEM32(eax + 0x4)); _flag_b = (uint32_t)(edx); 7152 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7153 MEM32(eax + 0x4) = MEM32(eax + 0x4) - edx; /* 0x31003E60: sub dword ptr [eax + 4], edx */ 7154 _flag_k = FK_CMP; 7155 edx = MEM32(ecx + 0x8); /* 0x31003E63: mov edx, dword ptr [ecx + 8] */ 7156 _flag_a = (uint32_t)(MEM32(eax + 0x8)); _flag_b = (uint32_t)(edx); 7157 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7158 MEM32(eax + 0x8) = MEM32(eax + 0x8) - edx; /* 0x31003E66: sub dword ptr [eax + 8], edx */ 7159 _flag_k = FK_CMP; 7160 edx = MEM32(ecx + 0xC); /* 0x31003E69: mov edx, dword ptr [ecx + 0xc] */ 7161 _flag_a = (uint32_t)(MEM32(eax + 0xC)); _flag_b = (uint32_t)(edx); 7162 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7163 MEM32(eax + 0xC) = MEM32(eax + 0xC) - edx; /* 0x31003E6C: sub dword ptr [eax + 0xc], edx */ 7164 _flag_k = FK_CMP; 7165 edx = MEM32(ecx + 0x10); /* 0x31003E6F: mov edx, dword ptr [ecx + 0x10] */ 7166 _flag_a = (uint32_t)(MEM32(eax + 0x10)); _flag_b = (uint32_t)(edx); 7167 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7168 MEM32(eax + 0x10) = MEM32(eax + 0x10) - edx; /* 0x31003E72: sub dword ptr [eax + 0x10], edx */ 7169 _flag_k = FK_CMP; 7170 edx = MEM32(ecx + 0x14); /* 0x31003E75: mov edx, dword ptr [ecx + 0x14] */ 7171 _flag_a = (uint32_t)(MEM32(eax + 0x14)); _flag_b = (uint32_t)(edx); 7172 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7173 MEM32(eax + 0x14) = MEM32(eax + 0x14) - edx; /* 0x31003E78: sub dword ptr [eax + 0x14], edx */ 7174 _flag_k = FK_CMP; 7175 edx = MEM32(ecx + 0x18); /* 0x31003E7B: mov edx, dword ptr [ecx + 0x18] */ 7176 esi = MEM32(eax + 0x18); /* 0x31003E7E: mov esi, dword ptr [eax + 0x18] */ 7177 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx); 7178 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7179 esi = esi - edx; /* 0x31003E81: sub esi, edx */ 7180 _flag_k = FK_CMP; 7181 edx = MEM32(eax + 0x1C); /* 0x31003E83: mov edx, dword ptr [eax + 0x1c] */ 7182 MEM32(eax + 0x18) = esi; /* 0x31003E86: mov dword ptr [eax + 0x18], esi */ 7183 ecx = MEM32(ecx + 0x1C); /* 0x31003E89: mov ecx, dword ptr [ecx + 0x1c] */ 7184 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx); 7185 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7186 edx = edx - ecx; /* 0x31003E8C: sub edx, ecx */ 7187 _flag_k = FK_CMP; 7188 MEM32(eax + 0x1C) = edx; /* 0x31003E8E: mov dword ptr [eax + 0x1c], edx */ 7189 esi = POP32_VAL(esp); /* 0x31003E91: pop esi */ 7190 ebp = POP32_VAL(esp); /* 0x31003E92: pop ebp */ 7191 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31003E93: ret 4 */ 7192 RECOMP_REGS_OUT(); 7193 } 7194 7195 void sub_31003EA0(void) { 7196 int _fpu_cmp = 0; 7197 uint32_t _cf = 0; 7198 int _df = 1; 7199 uint32_t _flag_k = FK_NONE; 7200 uint32_t _flag_a = 0, _flag_b = 0; 7201 uint32_t _itail_tgt = 0; 7202 RECOMP_REGS_LOCALS 7203 RECOMP_ENTER(0x31003EA0u); 7204 7205 L_31003EA0: 7206 PUSH32(esp, ebp); /* 0x31003EA0: push ebp */ 7207 ebp = esp; /* 0x31003EA1: mov ebp, esp */ 7208 eax = MEM32(ebp + 0xC); /* 0x31003EA3: mov eax, dword ptr [ebp + 0xc] */ 7209 PUSH32(esp, esi); /* 0x31003EA6: push esi */ 7210 esi = ecx; /* 0x31003EA7: mov esi, ecx */ 7211 ecx = MEM32(ebp + 0x8); /* 0x31003EA9: mov ecx, dword ptr [ebp + 8] */ 7212 PUSH32(esp, eax); /* 0x31003EAC: push eax */ 7213 MEM32(esi) = ecx; /* 0x31003EAD: mov dword ptr [esi], ecx */ 7214 RECOMP_ICALL(0x31002960u); /* 0x31003EAF: call 0x31002960 */ /* not lifted */ 7215 RECOMP_FLAGS_IN(); 7216 eax = esi; /* 0x31003EB4: mov eax, esi */ 7217 esi = POP32_VAL(esp); /* 0x31003EB6: pop esi */ 7218 ebp = POP32_VAL(esp); /* 0x31003EB7: pop ebp */ 7219 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31003EB8: ret 8 */ 7220 RECOMP_REGS_OUT(); 7221 } 7222 7223 void sub_31003EC0(void) { 7224 int _fpu_cmp = 0; 7225 uint32_t _cf = 0; 7226 int _df = 1; 7227 uint32_t _flag_k = FK_NONE; 7228 uint32_t _flag_a = 0, _flag_b = 0; 7229 uint32_t _itail_tgt = 0; 7230 RECOMP_REGS_LOCALS 7231 RECOMP_ENTER(0x31003EC0u); 7232 7233 goto L_31003EC0; 7234 L_310029E0: 7235 edx = MEM32(0x31057D2C); /* 0x310029E0: mov edx, dword ptr [0x31057d2c] */ 7236 PUSH32(esp, esi); /* 0x310029E6: push esi */ 7237 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7238 esi = 0; /* 0x310029E7: xor esi, esi */ 7239 _cf = 0; 7240 _flag_k = FK_TEST; 7241 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1); 7242 edx = edx - 1; /* 0x310029E9: dec edx */ 7243 _flag_k = FK_DEC; 7244 MEM32(0x31057D2C) = edx; /* 0x310029EA: mov dword ptr [0x31057d2c], edx */ 7245 _flag_a = (uint32_t)(MEM32(ecx + 0x120)); _flag_b = (uint32_t)(1); 7246 MEM32(ecx + 0x120) = MEM32(ecx + 0x120) - 1; /* 0x310029F0: dec dword ptr [ecx + 0x120] */ 7247 _flag_k = FK_DEC; 7248 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_310029FE; /* 0x310029F6: jne 0x310029fe */ 7249 L_310029F8: 7250 MEM32(ecx + 0x11C) = esi; /* 0x310029F8: mov dword ptr [ecx + 0x11c], esi */ 7251 L_310029FE: 7252 eax = MEM32(0x31057D2C); /* 0x310029FE: mov eax, dword ptr [0x31057d2c] */ 7253 /* test eax, eax */ /* 0x31002A03: test eax, eax */ 7254 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7255 _cf = 0; 7256 _flag_k = FK_TEST; 7257 if (TEST_NZ(_flag_a, _flag_b)) goto L_31002A1D; /* 0x31002A05: jne 0x31002a1d */ 7258 L_31002A07: 7259 PUSH32(esp, 0); /* 0x31002A07: push 0 */ 7260 RECOMP_ICALL(0x3101793Bu); /* 0x31002A09: call 0x3101793b */ /* not lifted */ 7261 RECOMP_FLAGS_IN(); 7262 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7263 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7264 esp = esp + 4; /* 0x31002A0E: add esp, 4 */ 7265 _flag_k = FK_ADD; 7266 MEM32(0x31057D80) = 0; /* 0x31002A11: mov dword ptr [0x31057d80], 0 */ 7267 esi = eax; /* 0x31002A1B: mov esi, eax */ 7268 L_31002A1D: 7269 ecx = MEM32(0x31057D24); /* 0x31002A1D: mov ecx, dword ptr [0x31057d24] */ 7270 RECOMP_ICALL(MEM32(0x31048294)); /* 0x31002A23: call dword ptr [0x31048294] */ 7271 RECOMP_FLAGS_IN(); 7272 eax = (int32_t)(int16_t)LO16(esi); /* 0x31002A29: movsx eax, si */ 7273 esi = POP32_VAL(esp); /* 0x31002A2C: pop esi */ 7274 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31002A2D: ret */ 7275 L_31003EC0: 7276 ecx = MEM32(ecx); /* 0x31003EC0: mov ecx, dword ptr [ecx] */ 7277 RECOMP_BACKEDGE(); 7278 goto L_310029E0; /* 0x31003EC2: jmp 0x310029e0 */ 7279 { RECOMP_REGS_OUT(); return; } /* end of function */ 7280 RECOMP_REGS_OUT(); 7281 } 7282 7283 void sub_31003ED0(void) { 7284 int _fpu_cmp = 0; 7285 uint32_t _cf = 0; 7286 int _df = 1; 7287 uint32_t _flag_k = FK_NONE; 7288 uint32_t _flag_a = 0, _flag_b = 0; 7289 uint32_t _itail_tgt = 0; 7290 RECOMP_REGS_LOCALS 7291 RECOMP_ENTER(0x31003ED0u); 7292 7293 L_31003ED0: 7294 PUSH32(esp, ebp); /* 0x31003ED0: push ebp */ 7295 ebp = esp; /* 0x31003ED1: mov ebp, esp */ 7296 SET_LO8(eax, MEM8(ebp + 0xC)); /* 0x31003ED3: mov al, byte ptr [ebp + 0xc] */ 7297 /* cmp LO8(eax), 0x64u */ /* 0x31003ED6: cmp al, 0x64 */ 7298 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x64u) << 24; 7299 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7300 _flag_k = FK_NARROW(FK_CMP, 24); 7301 if (CMP_EQ(_flag_a, _flag_b)) goto L_31003F17; /* 0x31003ED8: je 0x31003f17 */ 7302 L_31003EDA: 7303 /* cmp LO8(eax), 0x69u */ /* 0x31003EDA: cmp al, 0x69 */ 7304 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x69u) << 24; 7305 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7306 _flag_k = FK_NARROW(FK_CMP, 24); 7307 if (CMP_EQ(_flag_a, _flag_b)) goto L_31003F0A; /* 0x31003EDC: je 0x31003f0a */ 7308 L_31003EDE: 7309 /* cmp LO8(eax), 0x6Du */ /* 0x31003EDE: cmp al, 0x6d */ 7310 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x6Du) << 24; 7311 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7312 _flag_k = FK_NARROW(FK_CMP, 24); 7313 if (CMP_EQ(_flag_a, _flag_b)) goto L_31003EF6; /* 0x31003EE0: je 0x31003ef6 */ 7314 L_31003EE2: 7315 eax = (int32_t)(int8_t)LO8(eax); /* 0x31003EE2: movsx eax, al */ 7316 PUSH32(esp, eax); /* 0x31003EE5: push eax */ 7317 PUSH32(esp, 0x31051934u); /* 0x31003EE6: push 0x31051934 */ 7318 RECOMP_ICALL(MEM32(0x31048188)); /* 0x31003EEB: call dword ptr [0x31048188] */ 7319 RECOMP_FLAGS_IN(); 7320 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 7321 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7322 esp = esp + 8; /* 0x31003EF1: add esp, 8 */ 7323 _flag_k = FK_ADD; 7324 ebp = POP32_VAL(esp); /* 0x31003EF4: pop ebp */ 7325 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31003EF5: ret */ 7326 L_31003EF6: 7327 ecx = MEM32(ebp + 0x10); /* 0x31003EF6: mov ecx, dword ptr [ebp + 0x10] */ 7328 PUSH32(esp, ecx); /* 0x31003EF9: push ecx */ 7329 PUSH32(esp, 0x3105192Cu); /* 0x31003EFA: push 0x3105192c */ 7330 RECOMP_ICALL(MEM32(0x31048188)); /* 0x31003EFF: call dword ptr [0x31048188] */ 7331 RECOMP_FLAGS_IN(); 7332 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 7333 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7334 esp = esp + 8; /* 0x31003F05: add esp, 8 */ 7335 _flag_k = FK_ADD; 7336 ebp = POP32_VAL(esp); /* 0x31003F08: pop ebp */ 7337 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31003F09: ret */ 7338 L_31003F0A: 7339 PUSH32(esp, 0x69u); /* 0x31003F0A: push 0x69 */ 7340 RECOMP_ICALL(MEM32(0x3104821C)); /* 0x31003F0C: call dword ptr [0x3104821c] */ 7341 RECOMP_FLAGS_IN(); 7342 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7343 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7344 esp = esp + 4; /* 0x31003F12: add esp, 4 */ 7345 _flag_k = FK_ADD; 7346 ebp = POP32_VAL(esp); /* 0x31003F15: pop ebp */ 7347 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31003F16: ret */ 7348 L_31003F17: 7349 PUSH32(esp, 0x64u); /* 0x31003F17: push 0x64 */ 7350 RECOMP_ICALL(MEM32(0x3104821C)); /* 0x31003F19: call dword ptr [0x3104821c] */ 7351 RECOMP_FLAGS_IN(); 7352 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7353 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7354 esp = esp + 4; /* 0x31003F1F: add esp, 4 */ 7355 _flag_k = FK_ADD; 7356 ebp = POP32_VAL(esp); /* 0x31003F22: pop ebp */ 7357 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31003F23: ret */ 7358 RECOMP_REGS_OUT(); 7359 } 7360 7361 void sub_31003F30(void) { 7362 int _fpu_cmp = 0; 7363 uint32_t _cf = 0; 7364 int _df = 1; 7365 uint32_t _flag_k = FK_NONE; 7366 uint32_t _flag_a = 0, _flag_b = 0; 7367 uint32_t _itail_tgt = 0; 7368 RECOMP_REGS_LOCALS 7369 RECOMP_ENTER(0x31003F30u); 7370 7371 L_31003F30: 7372 PUSH32(esp, ebp); /* 0x31003F30: push ebp */ 7373 ebp = esp; /* 0x31003F31: mov ebp, esp */ 7374 PUSH32(esp, ebx); /* 0x31003F33: push ebx */ 7375 PUSH32(esp, esi); /* 0x31003F34: push esi */ 7376 PUSH32(esp, edi); /* 0x31003F35: push edi */ 7377 PUSH32(esp, 0xA4u); /* 0x31003F36: push 0xa4 */ 7378 esi = ecx; /* 0x31003F3B: mov esi, ecx */ 7379 RECOMP_ICALL(0x310468DAu); /* 0x31003F3D: call 0x310468da */ /* not lifted */ 7380 RECOMP_FLAGS_IN(); 7381 edx = eax; /* 0x31003F42: mov edx, eax */ 7382 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7383 ebx = 0; /* 0x31003F44: xor ebx, ebx */ 7384 _cf = 0; 7385 _flag_k = FK_TEST; 7386 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7387 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7388 esp = esp + 4; /* 0x31003F46: add esp, 4 */ 7389 _flag_k = FK_ADD; 7390 /* cmp edx, ebx */ /* 0x31003F49: cmp edx, ebx */ 7391 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ebx); 7392 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7393 _flag_k = FK_CMP; 7394 if (CMP_EQ(_flag_a, _flag_b)) goto L_31003F7C; /* 0x31003F4B: je 0x31003f7c */ 7395 L_31003F4D: 7396 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7397 eax = 0; /* 0x31003F4D: xor eax, eax */ 7398 _cf = 0; 7399 _flag_k = FK_TEST; 7400 ecx = 0x15u; /* 0x31003F4F: mov ecx, 0x15 */ 7401 edi = edx; /* 0x31003F54: mov edi, edx */ 7402 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31003F56: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; } 7403 ecx = edx + 0x54; /* 0x31003F58: lea ecx, [edx + 0x54] */ 7404 MEM32(ecx) = eax; /* 0x31003F5B: mov dword ptr [ecx], eax */ 7405 MEM32(ecx + 0x4) = eax; /* 0x31003F5D: mov dword ptr [ecx + 4], eax */ 7406 MEM32(ecx + 0x8) = eax; /* 0x31003F60: mov dword ptr [ecx + 8], eax */ 7407 ecx = 8; /* 0x31003F63: mov ecx, 8 */ 7408 edi = edx + 0x60; /* 0x31003F68: lea edi, [edx + 0x60] */ 7409 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31003F6B: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; } 7410 ecx = 9; /* 0x31003F6D: mov ecx, 9 */ 7411 edi = edx + 0x80; /* 0x31003F72: lea edi, [edx + 0x80] */ 7412 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31003F78: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; } 7413 goto L_31003F7E; /* 0x31003F7A: jmp 0x31003f7e */ 7414 L_31003F7C: 7415 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7416 edx = 0; /* 0x31003F7C: xor edx, edx */ 7417 _cf = 0; 7418 _flag_k = FK_TEST; 7419 L_31003F7E: 7420 MEM32(esi + 0x4) = edx; /* 0x31003F7E: mov dword ptr [esi + 4], edx */ 7421 edx = MEM32(ebp + 0x8); /* 0x31003F81: mov edx, dword ptr [ebp + 8] */ 7422 PUSH32(esp, edx); /* 0x31003F84: push edx */ 7423 RECOMP_ICALL(MEM32(0x31048150)); /* 0x31003F85: call dword ptr [0x31048150] */ 7424 RECOMP_FLAGS_IN(); 7425 edi = MEM32(0x31048190); /* 0x31003F8B: mov edi, dword ptr [0x31048190] */ 7426 PUSH32(esp, 0x310513B8u); /* 0x31003F91: push 0x310513b8 */ 7427 PUSH32(esp, eax); /* 0x31003F96: push eax */ 7428 MEM32(esi) = eax; /* 0x31003F97: mov dword ptr [esi], eax */ 7429 RECOMP_ICALL(edi); /* 0x31003F99: call edi */ 7430 RECOMP_FLAGS_IN(); 7431 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 7432 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7433 esp = esp + 0xCu; /* 0x31003F9B: add esp, 0xc */ 7434 _flag_k = FK_ADD; 7435 /* cmp eax, ebx */ /* 0x31003F9E: cmp eax, ebx */ 7436 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 7437 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7438 _flag_k = FK_CMP; 7439 if (CMP_NE(_flag_a, _flag_b)) goto L_31003FB3; /* 0x31003FA0: jne 0x31003fb3 */ 7440 L_31003FA2: 7441 eax = MEM32(esi); /* 0x31003FA2: mov eax, dword ptr [esi] */ 7442 PUSH32(esp, 0x310513B0u); /* 0x31003FA4: push 0x310513b0 */ 7443 PUSH32(esp, eax); /* 0x31003FA9: push eax */ 7444 RECOMP_ICALL(edi); /* 0x31003FAA: call edi */ 7445 RECOMP_FLAGS_IN(); 7446 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 7447 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7448 esp = esp + 8; /* 0x31003FAC: add esp, 8 */ 7449 _flag_k = FK_ADD; 7450 /* cmp eax, ebx */ /* 0x31003FAF: cmp eax, ebx */ 7451 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 7452 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7453 _flag_k = FK_CMP; 7454 if (CMP_EQ(_flag_a, _flag_b)) goto L_31003FB5; /* 0x31003FB1: je 0x31003fb5 */ 7455 L_31003FB3: 7456 MEM8(eax) = (uint8_t)(LO8(ebx)); /* 0x31003FB3: mov byte ptr [eax], bl */ 7457 L_31003FB5: 7458 PUSH32(esp, ebx); /* 0x31003FB5: push ebx */ 7459 PUSH32(esp, ebx); /* 0x31003FB6: push ebx */ 7460 PUSH32(esp, ebx); /* 0x31003FB7: push ebx */ 7461 PUSH32(esp, 1); /* 0x31003FB8: push 1 */ 7462 PUSH32(esp, 0x3E8u); /* 0x31003FBA: push 0x3e8 */ 7463 edi = 4; /* 0x31003FBF: mov edi, 4 */ 7464 PUSH32(esp, edi); /* 0x31003FC4: push edi */ 7465 PUSH32(esp, 0x14u); /* 0x31003FC5: push 0x14 */ 7466 PUSH32(esp, 0x2EE0u); /* 0x31003FC7: push 0x2ee0 */ 7467 RECOMP_ICALL(0x3101C74Eu); /* 0x31003FCC: call 0x3101c74e */ /* not lifted */ 7468 RECOMP_FLAGS_IN(); 7469 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x20u); 7470 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7471 esp = esp + 0x20u; /* 0x31003FD1: add esp, 0x20 */ 7472 _flag_k = FK_ADD; 7473 /* test LO16(eax), LO16(eax) */ /* 0x31003FD4: test ax, ax */ 7474 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 7475 _cf = 0; 7476 _flag_k = FK_NARROW(FK_TEST, 16); 7477 if (TEST_Z(_flag_a, _flag_b)) goto L_31003FE6; /* 0x31003FD7: je 0x31003fe6 */ 7478 L_31003FD9: 7479 PUSH32(esp, 0x31051450u); /* 0x31003FD9: push 0x31051450 */ 7480 RECOMP_ICALL(0x31001380u); /* 0x31003FDE: call 0x31001380 */ /* not lifted */ 7481 RECOMP_FLAGS_IN(); 7482 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7483 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7484 esp = esp + 4; /* 0x31003FE3: add esp, 4 */ 7485 _flag_k = FK_ADD; 7486 L_31003FE6: 7487 ecx = MEM32(esi + 0x4); /* 0x31003FE6: mov ecx, dword ptr [esi + 4] */ 7488 MEM32(ecx) = 0x3105115Cu; /* 0x31003FE9: mov dword ptr [ecx], 0x3105115c */ 7489 edx = MEM32(esi + 0x4); /* 0x31003FEF: mov edx, dword ptr [esi + 4] */ 7490 MEM32(edx + 0x4) = ebx; /* 0x31003FF2: mov dword ptr [edx + 4], ebx */ 7491 ecx = MEM32(esi + 0x4); /* 0x31003FF5: mov ecx, dword ptr [esi + 4] */ 7492 eax = 0x3Bu; /* 0x31003FF8: mov eax, 0x3b */ 7493 MEM16(ecx + 0x8) = (uint16_t)(LO16(eax)); /* 0x31003FFD: mov word ptr [ecx + 8], ax */ 7494 edx = MEM32(esi + 0x4); /* 0x31004001: mov edx, dword ptr [esi + 4] */ 7495 MEM16(edx + 0xA) = (uint16_t)(LO16(ebx)); /* 0x31004004: mov word ptr [edx + 0xa], bx */ 7496 ecx = MEM32(esi + 0x4); /* 0x31004008: mov ecx, dword ptr [esi + 4] */ 7497 MEM32(ecx + 0x1C) = 0x31051164u; /* 0x3100400B: mov dword ptr [ecx + 0x1c], 0x31051164 */ 7498 edx = MEM32(esi + 0x4); /* 0x31004012: mov edx, dword ptr [esi + 4] */ 7499 MEM32(edx + 0x20) = ebx; /* 0x31004015: mov dword ptr [edx + 0x20], ebx */ 7500 ecx = MEM32(esi + 0x4); /* 0x31004018: mov ecx, dword ptr [esi + 4] */ 7501 MEM16(ecx + 0x24) = (uint16_t)(LO16(eax)); /* 0x3100401B: mov word ptr [ecx + 0x24], ax */ 7502 edx = MEM32(esi + 0x4); /* 0x3100401F: mov edx, dword ptr [esi + 4] */ 7503 MEM16(edx + 0x26) = (uint16_t)(LO16(ebx)); /* 0x31004022: mov word ptr [edx + 0x26], bx */ 7504 eax = MEM32(esi + 0x4); /* 0x31004026: mov eax, dword ptr [esi + 4] */ 7505 MEM32(eax + 0x38) = 0x31051170u; /* 0x31004029: mov dword ptr [eax + 0x38], 0x31051170 */ 7506 ecx = MEM32(esi + 0x4); /* 0x31004030: mov ecx, dword ptr [esi + 4] */ 7507 MEM32(ecx + 0x3C) = ebx; /* 0x31004033: mov dword ptr [ecx + 0x3c], ebx */ 7508 edx = MEM32(esi + 0x4); /* 0x31004036: mov edx, dword ptr [esi + 4] */ 7509 MEM16(edx + 0x40) = (uint16_t)(0x80u); /* 0x31004039: mov word ptr [edx + 0x40], 0x80 */ 7510 eax = MEM32(esi + 0x4); /* 0x3100403F: mov eax, dword ptr [esi + 4] */ 7511 MEM16(eax + 0x42) = (uint16_t)(0x2000u); /* 0x31004042: mov word ptr [eax + 0x42], 0x2000 */ 7512 ecx = MEM32(esi + 0x4); /* 0x31004048: mov ecx, dword ptr [esi + 4] */ 7513 MEM16(ecx + 0x54) = (uint16_t)(LO16(ebx)); /* 0x3100404B: mov word ptr [ecx + 0x54], bx */ 7514 edx = MEM32(esi + 0x4); /* 0x3100404F: mov edx, dword ptr [esi + 4] */ 7515 MEM16(edx + 0x56) = (uint16_t)(LO16(edi)); /* 0x31004052: mov word ptr [edx + 0x56], di */ 7516 eax = MEM32(esi + 0x4); /* 0x31004056: mov eax, dword ptr [esi + 4] */ 7517 ecx = 1; /* 0x31004059: mov ecx, 1 */ 7518 MEM16(eax + 0x58) = (uint16_t)(LO16(ecx)); /* 0x3100405E: mov word ptr [eax + 0x58], cx */ 7519 edx = MEM32(esi + 0x4); /* 0x31004062: mov edx, dword ptr [esi + 4] */ 7520 MEM16(edx + 0x5A) = (uint16_t)(LO16(edi)); /* 0x31004065: mov word ptr [edx + 0x5a], di */ 7521 eax = MEM32(esi + 0x4); /* 0x31004069: mov eax, dword ptr [esi + 4] */ 7522 MEM16(eax + 0x5C) = (uint16_t)(LO16(edi)); /* 0x3100406C: mov word ptr [eax + 0x5c], di */ 7523 edx = MEM32(esi + 0x4); /* 0x31004070: mov edx, dword ptr [esi + 4] */ 7524 MEM16(edx + 0x5E) = (uint16_t)(LO16(ecx)); /* 0x31004073: mov word ptr [edx + 0x5e], cx */ 7525 eax = MEM32(esi + 0x4); /* 0x31004077: mov eax, dword ptr [esi + 4] */ 7526 edi = 8; /* 0x3100407A: mov edi, 8 */ 7527 MEM16(eax + 0x60) = (uint16_t)(LO16(edi)); /* 0x3100407F: mov word ptr [eax + 0x60], di */ 7528 edx = MEM32(esi + 0x4); /* 0x31004083: mov edx, dword ptr [esi + 4] */ 7529 MEM16(edx + 0x62) = (uint16_t)(LO16(ebx)); /* 0x31004086: mov word ptr [edx + 0x62], bx */ 7530 eax = MEM32(esi + 0x4); /* 0x3100408A: mov eax, dword ptr [esi + 4] */ 7531 MEM16(eax + 0x64) = (uint16_t)(LO16(ebx)); /* 0x3100408D: mov word ptr [eax + 0x64], bx */ 7532 edx = MEM32(esi + 0x4); /* 0x31004091: mov edx, dword ptr [esi + 4] */ 7533 MEM16(edx + 0x66) = (uint16_t)(LO16(ebx)); /* 0x31004094: mov word ptr [edx + 0x66], bx */ 7534 eax = MEM32(esi + 0x4); /* 0x31004098: mov eax, dword ptr [esi + 4] */ 7535 MEM16(eax + 0x68) = (uint16_t)(LO16(ebx)); /* 0x3100409B: mov word ptr [eax + 0x68], bx */ 7536 edx = MEM32(esi + 0x4); /* 0x3100409F: mov edx, dword ptr [esi + 4] */ 7537 MEM16(edx + 0x6A) = (uint16_t)(2); /* 0x310040A2: mov word ptr [edx + 0x6a], 2 */ 7538 eax = MEM32(esi + 0x4); /* 0x310040A8: mov eax, dword ptr [esi + 4] */ 7539 edx = eax + 0x54; /* 0x310040AB: lea edx, [eax + 0x54] */ 7540 MEM32(eax + 0x6C) = edx; /* 0x310040AE: mov dword ptr [eax + 0x6c], edx */ 7541 eax = MEM32(esi + 0x4); /* 0x310040B1: mov eax, dword ptr [esi + 4] */ 7542 MEM32(eax + 0x70) = 0x31051178u; /* 0x310040B4: mov dword ptr [eax + 0x70], 0x31051178 */ 7543 edx = MEM32(esi + 0x4); /* 0x310040BB: mov edx, dword ptr [esi + 4] */ 7544 MEM32(edx + 0x74) = ebx; /* 0x310040BE: mov dword ptr [edx + 0x74], ebx */ 7545 eax = MEM32(esi + 0x4); /* 0x310040C1: mov eax, dword ptr [esi + 4] */ 7546 edx = MEM32(esi); /* 0x310040C4: mov edx, dword ptr [esi] */ 7547 MEM32(eax + 0x80) = edx; /* 0x310040C6: mov dword ptr [eax + 0x80], edx */ 7548 eax = MEM32(esi + 0x4); /* 0x310040CC: mov eax, dword ptr [esi + 4] */ 7549 _flag_a = (uint32_t)((edx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((edx | 0xFFFFFFFFu)); 7550 edx = edx | 0xFFFFFFFFu; /* 0x310040CF: or edx, 0xffffffff */ 7551 _cf = 0; 7552 _flag_k = FK_TEST; 7553 MEM16(eax + 0x84) = (uint16_t)(LO16(edx)); /* 0x310040D2: mov word ptr [eax + 0x84], dx */ 7554 eax = MEM32(esi + 0x4); /* 0x310040D9: mov eax, dword ptr [esi + 4] */ 7555 MEM16(eax + 0x86) = (uint16_t)(LO16(edi)); /* 0x310040DC: mov word ptr [eax + 0x86], di */ 7556 edi = MEM32(esi + 0x4); /* 0x310040E3: mov edi, dword ptr [esi + 4] */ 7557 eax = 0x1000u; /* 0x310040E6: mov eax, 0x1000 */ 7558 MEM16(edi + 0x88) = (uint16_t)(LO16(eax)); /* 0x310040EB: mov word ptr [edi + 0x88], ax */ 7559 edi = MEM32(esi + 0x4); /* 0x310040F2: mov edi, dword ptr [esi + 4] */ 7560 MEM16(edi + 0x8C) = (uint16_t)(LO16(ecx)); /* 0x310040F5: mov word ptr [edi + 0x8c], cx */ 7561 ecx = MEM32(esi + 0x4); /* 0x310040FC: mov ecx, dword ptr [esi + 4] */ 7562 MEM16(ecx + 0x8E) = (uint16_t)(LO16(eax)); /* 0x310040FF: mov word ptr [ecx + 0x8e], ax */ 7563 eax = MEM32(esi + 0x4); /* 0x31004106: mov eax, dword ptr [esi + 4] */ 7564 ecx = eax + 0x60; /* 0x31004109: lea ecx, [eax + 0x60] */ 7565 MEM32(eax + 0x94) = ecx; /* 0x3100410C: mov dword ptr [eax + 0x94], ecx */ 7566 eax = MEM32(esi + 0x4); /* 0x31004112: mov eax, dword ptr [esi + 4] */ 7567 MEM32(eax + 0x98) = 0x3105115Cu; /* 0x31004115: mov dword ptr [eax + 0x98], 0x3105115c */ 7568 ecx = MEM32(esi + 0x4); /* 0x3100411F: mov ecx, dword ptr [esi + 4] */ 7569 MEM32(ecx + 0x9C) = 0x31051170u; /* 0x31004122: mov dword ptr [ecx + 0x9c], 0x31051170 */ 7570 eax = MEM32(esi + 0x4); /* 0x3100412C: mov eax, dword ptr [esi + 4] */ 7571 MEM16(eax + 0xA0) = (uint16_t)(LO16(edx)); /* 0x3100412F: mov word ptr [eax + 0xa0], dx */ 7572 ecx = MEM32(esi + 0x4); /* 0x31004136: mov ecx, dword ptr [esi + 4] */ 7573 MEM16(ecx + 0x8A) = (uint16_t)(6); /* 0x31004139: mov word ptr [ecx + 0x8a], 6 */ 7574 edx = MEM32(esi + 0x4); /* 0x31004142: mov edx, dword ptr [esi + 4] */ 7575 PUSH32(esp, 0x100u); /* 0x31004145: push 0x100 */ 7576 PUSH32(esp, 0x31003ED0u); /* 0x3100414A: push 0x31003ed0 */ 7577 ecx = esi; /* 0x3100414F: mov ecx, esi */ 7578 MEM16(edx + 0x90) = (uint16_t)(2); /* 0x31004151: mov word ptr [edx + 0x90], 2 */ 7579 RECOMP_ICALL(0x31004320u); /* 0x3100415A: call 0x31004320 */ /* not lifted */ 7580 RECOMP_FLAGS_IN(); 7581 edi = POP32_VAL(esp); /* 0x3100415F: pop edi */ 7582 eax = esi; /* 0x31004160: mov eax, esi */ 7583 esi = POP32_VAL(esp); /* 0x31004162: pop esi */ 7584 ebx = POP32_VAL(esp); /* 0x31004163: pop ebx */ 7585 ebp = POP32_VAL(esp); /* 0x31004164: pop ebp */ 7586 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31004165: ret 4 */ 7587 RECOMP_REGS_OUT(); 7588 } 7589 7590 void sub_31004170(void) { 7591 int _fpu_cmp = 0; 7592 uint32_t _cf = 0; 7593 int _df = 1; 7594 uint32_t _flag_k = FK_NONE; 7595 uint32_t _flag_a = 0, _flag_b = 0; 7596 uint32_t _itail_tgt = 0; 7597 RECOMP_REGS_LOCALS 7598 RECOMP_ENTER(0x31004170u); 7599 7600 L_31004170: 7601 RECOMP_ICALL(0x31004180u); /* 0x31004170: call 0x31004180 */ /* not lifted */ 7602 RECOMP_FLAGS_IN(); 7603 goto L_31004190; /* 0x31004175: jmp 0x31004190 */ 7604 L_31004190: 7605 PUSH32(esp, 0x310041A0u); /* 0x31004190: push 0x310041a0 */ 7606 RECOMP_ICALL(0x310468C8u); /* 0x31004195: call 0x310468c8 */ /* not lifted */ 7607 RECOMP_FLAGS_IN(); 7608 ecx = POP32_VAL(esp); /* 0x3100419A: pop ecx */ 7609 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100419B: ret */ 7610 RECOMP_REGS_OUT(); 7611 } 7612 7613 void sub_31004180(void) { 7614 int _fpu_cmp = 0; 7615 uint32_t _cf = 0; 7616 int _df = 1; 7617 uint32_t _flag_k = FK_NONE; 7618 uint32_t _flag_a = 0, _flag_b = 0; 7619 uint32_t _itail_tgt = 0; 7620 RECOMP_REGS_LOCALS 7621 RECOMP_ENTER(0x31004180u); 7622 7623 L_31004180: 7624 ecx = 0x31057D32u; /* 0x31004180: mov ecx, 0x31057d32 */ 7625 L_31004185: 7626 { _itail_tgt = (uint32_t)(MEM32(0x31048108)); goto _ljump; } 7627 { RECOMP_REGS_OUT(); return; } /* end of function */ 7628 _ljump: 7629 switch (_itail_tgt) { 7630 case 0x31004180u: goto L_31004180; 7631 case 0x31004185u: goto L_31004185; 7632 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 7633 } 7634 RECOMP_REGS_OUT(); 7635 } 7636 7637 void sub_31004190(void) { 7638 int _fpu_cmp = 0; 7639 uint32_t _cf = 0; 7640 int _df = 1; 7641 uint32_t _flag_k = FK_NONE; 7642 uint32_t _flag_a = 0, _flag_b = 0; 7643 uint32_t _itail_tgt = 0; 7644 RECOMP_REGS_LOCALS 7645 RECOMP_ENTER(0x31004190u); 7646 7647 L_31004190: 7648 PUSH32(esp, 0x310041A0u); /* 0x31004190: push 0x310041a0 */ 7649 RECOMP_ICALL(0x310468C8u); /* 0x31004195: call 0x310468c8 */ /* not lifted */ 7650 RECOMP_FLAGS_IN(); 7651 ecx = POP32_VAL(esp); /* 0x3100419A: pop ecx */ 7652 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100419B: ret */ 7653 RECOMP_REGS_OUT(); 7654 } 7655 7656 void sub_310041A0(void) { 7657 int _fpu_cmp = 0; 7658 uint32_t _cf = 0; 7659 int _df = 1; 7660 uint32_t _flag_k = FK_NONE; 7661 uint32_t _flag_a = 0, _flag_b = 0; 7662 uint32_t _itail_tgt = 0; 7663 RECOMP_REGS_LOCALS 7664 RECOMP_ENTER(0x310041A0u); 7665 7666 L_310041A0: 7667 ecx = 0x31057D32u; /* 0x310041A0: mov ecx, 0x31057d32 */ 7668 L_310041A5: 7669 { _itail_tgt = (uint32_t)(MEM32(0x3104807C)); goto _ljump; } 7670 { RECOMP_REGS_OUT(); return; } /* end of function */ 7671 _ljump: 7672 switch (_itail_tgt) { 7673 case 0x310041A0u: goto L_310041A0; 7674 case 0x310041A5u: goto L_310041A5; 7675 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 7676 } 7677 RECOMP_REGS_OUT(); 7678 } 7679 7680 void sub_310041B0(void) { 7681 int _fpu_cmp = 0; 7682 uint32_t _cf = 0; 7683 int _df = 1; 7684 uint32_t _flag_k = FK_NONE; 7685 uint32_t _flag_a = 0, _flag_b = 0; 7686 uint32_t _itail_tgt = 0; 7687 RECOMP_REGS_LOCALS 7688 RECOMP_ENTER(0x310041B0u); 7689 7690 L_310041B0: 7691 RECOMP_ICALL(0x310041C0u); /* 0x310041B0: call 0x310041c0 */ /* not lifted */ 7692 RECOMP_FLAGS_IN(); 7693 goto L_310041D0; /* 0x310041B5: jmp 0x310041d0 */ 7694 L_310041D0: 7695 PUSH32(esp, 0x310041E0u); /* 0x310041D0: push 0x310041e0 */ 7696 RECOMP_ICALL(0x310468C8u); /* 0x310041D5: call 0x310468c8 */ /* not lifted */ 7697 RECOMP_FLAGS_IN(); 7698 ecx = POP32_VAL(esp); /* 0x310041DA: pop ecx */ 7699 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310041DB: ret */ 7700 RECOMP_REGS_OUT(); 7701 } 7702 7703 void sub_310041C0(void) { 7704 int _fpu_cmp = 0; 7705 uint32_t _cf = 0; 7706 int _df = 1; 7707 uint32_t _flag_k = FK_NONE; 7708 uint32_t _flag_a = 0, _flag_b = 0; 7709 uint32_t _itail_tgt = 0; 7710 RECOMP_REGS_LOCALS 7711 RECOMP_ENTER(0x310041C0u); 7712 7713 L_310041C0: 7714 ecx = 0x31057D31u; /* 0x310041C0: mov ecx, 0x31057d31 */ 7715 L_310041C5: 7716 { _itail_tgt = (uint32_t)(MEM32(0x31048104)); goto _ljump; } 7717 { RECOMP_REGS_OUT(); return; } /* end of function */ 7718 _ljump: 7719 switch (_itail_tgt) { 7720 case 0x310041C0u: goto L_310041C0; 7721 case 0x310041C5u: goto L_310041C5; 7722 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 7723 } 7724 RECOMP_REGS_OUT(); 7725 } 7726 7727 void sub_310041D0(void) { 7728 int _fpu_cmp = 0; 7729 uint32_t _cf = 0; 7730 int _df = 1; 7731 uint32_t _flag_k = FK_NONE; 7732 uint32_t _flag_a = 0, _flag_b = 0; 7733 uint32_t _itail_tgt = 0; 7734 RECOMP_REGS_LOCALS 7735 RECOMP_ENTER(0x310041D0u); 7736 7737 L_310041D0: 7738 PUSH32(esp, 0x310041E0u); /* 0x310041D0: push 0x310041e0 */ 7739 RECOMP_ICALL(0x310468C8u); /* 0x310041D5: call 0x310468c8 */ /* not lifted */ 7740 RECOMP_FLAGS_IN(); 7741 ecx = POP32_VAL(esp); /* 0x310041DA: pop ecx */ 7742 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310041DB: ret */ 7743 RECOMP_REGS_OUT(); 7744 } 7745 7746 void sub_310041E0(void) { 7747 int _fpu_cmp = 0; 7748 uint32_t _cf = 0; 7749 int _df = 1; 7750 uint32_t _flag_k = FK_NONE; 7751 uint32_t _flag_a = 0, _flag_b = 0; 7752 uint32_t _itail_tgt = 0; 7753 RECOMP_REGS_LOCALS 7754 RECOMP_ENTER(0x310041E0u); 7755 7756 L_310041E0: 7757 ecx = 0x31057D31u; /* 0x310041E0: mov ecx, 0x31057d31 */ 7758 L_310041E5: 7759 { _itail_tgt = (uint32_t)(MEM32(0x31048080)); goto _ljump; } 7760 { RECOMP_REGS_OUT(); return; } /* end of function */ 7761 _ljump: 7762 switch (_itail_tgt) { 7763 case 0x310041E0u: goto L_310041E0; 7764 case 0x310041E5u: goto L_310041E5; 7765 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 7766 } 7767 RECOMP_REGS_OUT(); 7768 } 7769 7770 void sub_310041F0(void) { 7771 int _fpu_cmp = 0; 7772 uint32_t _cf = 0; 7773 int _df = 1; 7774 uint32_t _flag_k = FK_NONE; 7775 uint32_t _flag_a = 0, _flag_b = 0; 7776 uint32_t _itail_tgt = 0; 7777 RECOMP_REGS_LOCALS 7778 RECOMP_ENTER(0x310041F0u); 7779 7780 L_310041F0: 7781 PUSH32(esp, esi); /* 0x310041F0: push esi */ 7782 esi = ecx; /* 0x310041F1: mov esi, ecx */ 7783 RECOMP_ICALL(0x31023710u); /* 0x310041F3: call 0x31023710 */ /* not lifted */ 7784 RECOMP_FLAGS_IN(); 7785 /* test LO16(eax), LO16(eax) */ /* 0x310041F8: test ax, ax */ 7786 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 7787 _cf = 0; 7788 _flag_k = FK_NARROW(FK_TEST, 16); 7789 if (TEST_Z(_flag_a, _flag_b)) goto L_3100420A; /* 0x310041FB: je 0x3100420a */ 7790 L_310041FD: 7791 PUSH32(esp, 0x3105195Cu); /* 0x310041FD: push 0x3105195c */ 7792 RECOMP_ICALL(0x31001380u); /* 0x31004202: call 0x31001380 */ /* not lifted */ 7793 RECOMP_FLAGS_IN(); 7794 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7795 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7796 esp = esp + 4; /* 0x31004207: add esp, 4 */ 7797 _flag_k = FK_ADD; 7798 L_3100420A: 7799 eax = MEM32(esi); /* 0x3100420A: mov eax, dword ptr [esi] */ 7800 /* test eax, eax */ /* 0x3100420C: test eax, eax */ 7801 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7802 _cf = 0; 7803 _flag_k = FK_TEST; 7804 if (TEST_Z(_flag_a, _flag_b)) goto L_31004220; /* 0x3100420E: je 0x31004220 */ 7805 L_31004210: 7806 PUSH32(esp, eax); /* 0x31004210: push eax */ 7807 RECOMP_ICALL(MEM32(0x31048220)); /* 0x31004211: call dword ptr [0x31048220] */ 7808 RECOMP_FLAGS_IN(); 7809 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7810 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7811 esp = esp + 4; /* 0x31004217: add esp, 4 */ 7812 _flag_k = FK_ADD; 7813 MEM32(esi) = 0; /* 0x3100421A: mov dword ptr [esi], 0 */ 7814 L_31004220: 7815 eax = MEM32(esi + 0x4); /* 0x31004220: mov eax, dword ptr [esi + 4] */ 7816 PUSH32(esp, eax); /* 0x31004223: push eax */ 7817 RECOMP_ICALL(0x31046858u); /* 0x31004224: call 0x31046858 */ /* not lifted */ 7818 RECOMP_FLAGS_IN(); 7819 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7820 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7821 esp = esp + 4; /* 0x31004229: add esp, 4 */ 7822 _flag_k = FK_ADD; 7823 esi = POP32_VAL(esp); /* 0x3100422C: pop esi */ 7824 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100422D: ret */ 7825 RECOMP_REGS_OUT(); 7826 } 7827 7828 void sub_31004230(void) { 7829 int _fpu_cmp = 0; 7830 uint32_t _cf = 0; 7831 int _df = 1; 7832 uint32_t _flag_k = FK_NONE; 7833 uint32_t _flag_a = 0, _flag_b = 0; 7834 uint32_t _itail_tgt = 0; 7835 RECOMP_REGS_LOCALS 7836 RECOMP_ENTER(0x31004230u); 7837 7838 L_31004230: 7839 eax = MEM32(ecx + 0x4); /* 0x31004230: mov eax, dword ptr [ecx + 4] */ 7840 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x80u); 7841 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7842 eax = eax + 0x80u; /* 0x31004233: add eax, 0x80 */ 7843 _flag_k = FK_ADD; 7844 PUSH32(esp, eax); /* 0x31004238: push eax */ 7845 RECOMP_ICALL(0x310266C6u); /* 0x31004239: call 0x310266c6 */ /* not lifted */ 7846 RECOMP_FLAGS_IN(); 7847 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7848 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7849 esp = esp + 4; /* 0x3100423E: add esp, 4 */ 7850 _flag_k = FK_ADD; 7851 eax = (int32_t)(int16_t)LO16(eax); /* 0x31004241: movsx eax, ax */ 7852 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31004244: ret */ 7853 RECOMP_REGS_OUT(); 7854 } 7855 7856 void sub_31004250(void) { 7857 int _fpu_cmp = 0; 7858 uint32_t _cf = 0; 7859 int _df = 1; 7860 uint32_t _flag_k = FK_NONE; 7861 uint32_t _flag_a = 0, _flag_b = 0; 7862 uint32_t _itail_tgt = 0; 7863 RECOMP_REGS_LOCALS 7864 RECOMP_ENTER(0x31004250u); 7865 7866 L_31004250: 7867 eax = MEM32(ecx + 0x4); /* 0x31004250: mov eax, dword ptr [ecx + 4] */ 7868 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x80u); 7869 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7870 eax = eax + 0x80u; /* 0x31004253: add eax, 0x80 */ 7871 _flag_k = FK_ADD; 7872 PUSH32(esp, eax); /* 0x31004258: push eax */ 7873 RECOMP_ICALL(0x31027F36u); /* 0x31004259: call 0x31027f36 */ /* not lifted */ 7874 RECOMP_FLAGS_IN(); 7875 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7876 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7877 esp = esp + 4; /* 0x3100425E: add esp, 4 */ 7878 _flag_k = FK_ADD; 7879 eax = (int32_t)(int16_t)LO16(eax); /* 0x31004261: movsx eax, ax */ 7880 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31004264: ret */ 7881 RECOMP_REGS_OUT(); 7882 } 7883 7884 void sub_31004270(void) { 7885 int _fpu_cmp = 0; 7886 uint32_t _cf = 0; 7887 int _df = 1; 7888 uint32_t _flag_k = FK_NONE; 7889 uint32_t _flag_a = 0, _flag_b = 0; 7890 uint32_t _itail_tgt = 0; 7891 RECOMP_REGS_LOCALS 7892 RECOMP_ENTER(0x31004270u); 7893 7894 L_31004270: 7895 PUSH32(esp, ebp); /* 0x31004270: push ebp */ 7896 ebp = esp; /* 0x31004271: mov ebp, esp */ 7897 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 7898 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7899 esp = esp - 8; /* 0x31004273: sub esp, 8 */ 7900 _flag_k = FK_CMP; 7901 PUSH32(esp, esi); /* 0x31004276: push esi */ 7902 esi = ecx; /* 0x31004277: mov esi, ecx */ 7903 eax = MEM32(esi + 0x4); /* 0x31004279: mov eax, dword ptr [esi + 4] */ 7904 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x80u); 7905 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7906 eax = eax + 0x80u; /* 0x3100427C: add eax, 0x80 */ 7907 _flag_k = FK_ADD; 7908 PUSH32(esp, eax); /* 0x31004281: push eax */ 7909 RECOMP_ICALL(0x31022101u); /* 0x31004282: call 0x31022101 */ /* not lifted */ 7910 RECOMP_FLAGS_IN(); 7911 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7912 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7913 esp = esp + 4; /* 0x31004287: add esp, 4 */ 7914 _flag_k = FK_ADD; 7915 /* test LO16(eax), LO16(eax) */ /* 0x3100428A: test ax, ax */ 7916 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(LO16(eax)) << 16; 7917 _cf = 0; 7918 _flag_k = FK_NARROW(FK_TEST, 16); 7919 if (TEST_Z(_flag_a, _flag_b)) goto L_310042C0; /* 0x3100428D: je 0x310042c0 */ 7920 L_3100428F: 7921 ecx = MEM32(esi); /* 0x3100428F: mov ecx, dword ptr [esi] */ 7922 edx = MEM32(0x310481FC); /* 0x31004291: mov edx, dword ptr [0x310481fc] */ 7923 PUSH32(esp, ecx); /* 0x31004297: push ecx */ 7924 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x40u); 7925 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7926 edx = edx + 0x40u; /* 0x31004298: add edx, 0x40 */ 7927 _flag_k = FK_ADD; 7928 PUSH32(esp, 0x3105197Cu); /* 0x3100429B: push 0x3105197c */ 7929 PUSH32(esp, edx); /* 0x310042A0: push edx */ 7930 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x310042A1: call dword ptr [0x310481f8] */ 7931 RECOMP_FLAGS_IN(); 7932 eax = MEM32(esi + 0x4); /* 0x310042A7: mov eax, dword ptr [esi + 4] */ 7933 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x80u); 7934 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7935 eax = eax + 0x80u; /* 0x310042AA: add eax, 0x80 */ 7936 _flag_k = FK_ADD; 7937 PUSH32(esp, eax); /* 0x310042AF: push eax */ 7938 RECOMP_ICALL(0x3101C6B7u); /* 0x310042B0: call 0x3101c6b7 */ /* not lifted */ 7939 RECOMP_FLAGS_IN(); 7940 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 7941 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7942 esp = esp + 0x10u; /* 0x310042B5: add esp, 0x10 */ 7943 _flag_k = FK_ADD; 7944 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 7945 eax = eax | 0xFFFFFFFFu; /* 0x310042B8: or eax, 0xffffffff */ 7946 _cf = 0; 7947 _flag_k = FK_TEST; 7948 esi = POP32_VAL(esp); /* 0x310042BB: pop esi */ 7949 esp = ebp; /* 0x310042BC: mov esp, ebp */ 7950 ebp = POP32_VAL(esp); /* 0x310042BE: pop ebp */ 7951 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310042BF: ret */ 7952 L_310042C0: 7953 edx = MEM32(esi + 0x4); /* 0x310042C0: mov edx, dword ptr [esi + 4] */ 7954 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7955 eax = 0; /* 0x310042C3: xor eax, eax */ 7956 _cf = 0; 7957 _flag_k = FK_TEST; 7958 SET_LO16(eax, MEM16(edx + 0xA0)); /* 0x310042C5: mov ax, word ptr [edx + 0xa0] */ 7959 PUSH32(esp, edi); /* 0x310042CC: push edi */ 7960 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7961 edi = 0; /* 0x310042CD: xor edi, edi */ 7962 _cf = 0; 7963 _flag_k = FK_TEST; 7964 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(1) << 16; 7965 SET_LO16(eax, LO16(eax) + 1); /* 0x310042CF: inc ax */ 7966 _flag_k = FK_NARROW(FK_INC, 16); 7967 ecx = ebp + (-0x8); /* 0x310042D1: lea ecx, [ebp - 8] */ 7968 PUSH32(esp, ecx); /* 0x310042D4: push ecx */ 7969 PUSH32(esp, eax); /* 0x310042D5: push eax */ 7970 RECOMP_ICALL(0x31024200u); /* 0x310042D6: call 0x31024200 */ /* not lifted */ 7971 RECOMP_FLAGS_IN(); 7972 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 7973 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7974 esp = esp + 8; /* 0x310042DB: add esp, 8 */ 7975 _flag_k = FK_ADD; 7976 /* test eax, eax */ /* 0x310042DE: test eax, eax */ 7977 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7978 _cf = 0; 7979 _flag_k = FK_TEST; 7980 if (TEST_Z(_flag_a, _flag_b)) goto L_31004302; /* 0x310042E0: je 0x31004302 */ 7981 L_310042E2: 7982 edx = MEM32(esi + 0x4); /* 0x310042E2: mov edx, dword ptr [esi + 4] */ 7983 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7984 eax = 0; /* 0x310042E5: xor eax, eax */ 7985 _cf = 0; 7986 _flag_k = FK_TEST; 7987 SET_LO16(eax, MEM16(edx + 0xA0)); /* 0x310042E7: mov ax, word ptr [edx + 0xa0] */ 7988 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1); 7989 edi = edi + 1; /* 0x310042EE: inc edi */ 7990 _flag_k = FK_INC; 7991 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(1) << 16; 7992 SET_LO16(eax, LO16(eax) + 1); /* 0x310042EF: inc ax */ 7993 _flag_k = FK_NARROW(FK_INC, 16); 7994 ecx = ebp + (-0x8); /* 0x310042F1: lea ecx, [ebp - 8] */ 7995 PUSH32(esp, ecx); /* 0x310042F4: push ecx */ 7996 PUSH32(esp, eax); /* 0x310042F5: push eax */ 7997 RECOMP_ICALL(0x31023C5Fu); /* 0x310042F6: call 0x31023c5f */ /* not lifted */ 7998 RECOMP_FLAGS_IN(); 7999 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 8000 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8001 esp = esp + 8; /* 0x310042FB: add esp, 8 */ 8002 _flag_k = FK_ADD; 8003 /* test eax, eax */ /* 0x310042FE: test eax, eax */ 8004 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 8005 _cf = 0; 8006 _flag_k = FK_TEST; 8007 RECOMP_BACKEDGE(); 8008 if (TEST_NZ(_flag_a, _flag_b)) goto L_310042E2; /* 0x31004300: jne 0x310042e2 */ 8009 L_31004302: 8010 ecx = MEM32(esi + 0x4); /* 0x31004302: mov ecx, dword ptr [esi + 4] */ 8011 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x80u); 8012 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8013 ecx = ecx + 0x80u; /* 0x31004305: add ecx, 0x80 */ 8014 _flag_k = FK_ADD; 8015 PUSH32(esp, ecx); /* 0x3100430B: push ecx */ 8016 RECOMP_ICALL(0x3101C6B7u); /* 0x3100430C: call 0x3101c6b7 */ /* not lifted */ 8017 RECOMP_FLAGS_IN(); 8018 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8019 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8020 esp = esp + 4; /* 0x31004311: add esp, 4 */ 8021 _flag_k = FK_ADD; 8022 eax = edi; /* 0x31004314: mov eax, edi */ 8023 edi = POP32_VAL(esp); /* 0x31004316: pop edi */ 8024 esi = POP32_VAL(esp); /* 0x31004317: pop esi */ 8025 esp = ebp; /* 0x31004318: mov esp, ebp */ 8026 ebp = POP32_VAL(esp); /* 0x3100431A: pop ebp */ 8027 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100431B: ret */ 8028 RECOMP_REGS_OUT(); 8029 } 8030 8031 void sub_31004320(void) { 8032 int _fpu_cmp = 0; 8033 uint32_t _cf = 0; 8034 int _df = 1; 8035 uint32_t _flag_k = FK_NONE; 8036 uint32_t _flag_a = 0, _flag_b = 0; 8037 uint32_t _itail_tgt = 0; 8038 RECOMP_REGS_LOCALS 8039 RECOMP_ENTER(0x31004320u); 8040 8041 L_31004320: 8042 PUSH32(esp, ebp); /* 0x31004320: push ebp */ 8043 ebp = esp; /* 0x31004321: mov ebp, esp */ 8044 eax = MEM32(ebp + 0xC); /* 0x31004323: mov eax, dword ptr [ebp + 0xc] */ 8045 ecx = MEM32(ebp + 0x8); /* 0x31004326: mov ecx, dword ptr [ebp + 8] */ 8046 PUSH32(esp, eax); /* 0x31004329: push eax */ 8047 PUSH32(esp, ecx); /* 0x3100432A: push ecx */ 8048 RECOMP_ICALL(0x3102AFE9u); /* 0x3100432B: call 0x3102afe9 */ /* not lifted */ 8049 RECOMP_FLAGS_IN(); 8050 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 8051 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8052 esp = esp + 8; /* 0x31004330: add esp, 8 */ 8053 _flag_k = FK_ADD; 8054 ebp = POP32_VAL(esp); /* 0x31004333: pop ebp */ 8055 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31004334: ret 8 */ 8056 RECOMP_REGS_OUT(); 8057 } 8058 8059 void sub_31004340(void) { 8060 int _fpu_cmp = 0; 8061 uint32_t _cf = 0; 8062 int _df = 1; 8063 uint32_t _flag_k = FK_NONE; 8064 uint32_t _flag_a = 0, _flag_b = 0; 8065 uint32_t _itail_tgt = 0; 8066 RECOMP_REGS_LOCALS 8067 RECOMP_ENTER(0x31004340u); 8068 8069 L_31004340: 8070 edx = MEM32(ecx + 0x4); /* 0x31004340: mov edx, dword ptr [ecx + 4] */ 8071 L_31004343: 8072 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 8073 eax = eax | 0xFFFFFFFFu; /* 0x31004343: or eax, 0xffffffff */ 8074 _cf = 0; 8075 _flag_k = FK_TEST; 8076 L_31004346: 8077 /* cmp edx, eax */ /* 0x31004346: cmp edx, eax */ 8078 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 8079 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8080 _flag_k = FK_CMP; 8081 L_31004348: 8082 if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_E, _cf)) goto L_31004355; /* 0x31004348: je 0x31004355 */ 8083 L_3100434A: 8084 MEM32(ecx + 0x4) = eax; /* 0x3100434A: mov dword ptr [ecx + 4], eax */ 8085 L_3100434D: 8086 ecx = MEM32(ecx); /* 0x3100434D: mov ecx, dword ptr [ecx] */ 8087 L_3100434F: 8088 { _itail_tgt = (uint32_t)(MEM32(0x31048294)); goto _ljump; } 8089 L_31004355: 8090 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31004355: ret */ 8091 _ljump: 8092 switch (_itail_tgt) { 8093 case 0x31004340u: goto L_31004340; 8094 case 0x31004343u: goto L_31004343; 8095 case 0x31004346u: goto L_31004346; 8096 case 0x31004348u: goto L_31004348; 8097 case 0x3100434Au: goto L_3100434A; 8098 case 0x3100434Du: goto L_3100434D; 8099 case 0x3100434Fu: goto L_3100434F; 8100 case 0x31004355u: goto L_31004355; 8101 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 8102 } 8103 RECOMP_REGS_OUT(); 8104 } 8105 8106 void sub_31004360(void) { 8107 int _fpu_cmp = 0; 8108 uint32_t _cf = 0; 8109 int _df = 1; 8110 uint32_t _flag_k = FK_NONE; 8111 uint32_t _flag_a = 0, _flag_b = 0; 8112 uint32_t _itail_tgt = 0; 8113 RECOMP_REGS_LOCALS 8114 RECOMP_ENTER(0x31004360u); 8115 8116 L_31004360: 8117 goto L_31004370; /* 0x31004360: jmp 0x31004370 */ 8118 L_31004370: 8119 MEM32(0x31057D20) = 0x31051998u; /* 0x31004370: mov dword ptr [0x31057d20], 0x31051998 */ 8120 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100437A: ret */ 8121 RECOMP_REGS_OUT(); 8122 } 8123 8124 void sub_31004370(void) { 8125 int _fpu_cmp = 0; 8126 uint32_t _cf = 0; 8127 int _df = 1; 8128 uint32_t _flag_k = FK_NONE; 8129 uint32_t _flag_a = 0, _flag_b = 0; 8130 uint32_t _itail_tgt = 0; 8131 RECOMP_REGS_LOCALS 8132 RECOMP_ENTER(0x31004370u); 8133 8134 L_31004370: 8135 MEM32(0x31057D20) = 0x31051998u; /* 0x31004370: mov dword ptr [0x31057d20], 0x31051998 */ 8136 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100437A: ret */ 8137 RECOMP_REGS_OUT(); 8138 } 8139 8140 void sub_31004380(void) { 8141 int _fpu_cmp = 0; 8142 uint32_t _cf = 0; 8143 int _df = 1; 8144 uint32_t _flag_k = FK_NONE; 8145 uint32_t _flag_a = 0, _flag_b = 0; 8146 uint32_t _itail_tgt = 0; 8147 RECOMP_REGS_LOCALS 8148 RECOMP_ENTER(0x31004380u); 8149 8150 L_31004380: 8151 PUSH32(esp, ebp); /* 0x31004380: push ebp */ 8152 ebp = esp; /* 0x31004381: mov ebp, esp */ 8153 PUSH32(esp, 0xFFFFFFFFu); /* 0x31004383: push -1 */ 8154 PUSH32(esp, 0x31046EE9u); /* 0x31004385: push 0x31046ee9 */ 8155 eax = MEM32(FS_BASE + (0)); /* 0x3100438A: mov eax, dword ptr fs:[0] */ 8156 PUSH32(esp, eax); /* 0x31004390: push eax */ 8157 MEM32(FS_BASE + (0)) = esp; /* 0x31004391: mov dword ptr fs:[0], esp */ 8158 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x38u); 8159 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8160 esp = esp - 0x38u; /* 0x31004398: sub esp, 0x38 */ 8161 _flag_k = FK_CMP; 8162 eax = MEM32(ebp + 0xC); /* 0x3100439B: mov eax, dword ptr [ebp + 0xc] */ 8163 PUSH32(esp, esi); /* 0x3100439E: push esi */ 8164 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 8165 esi = 0; /* 0x3100439F: xor esi, esi */ 8166 _cf = 0; 8167 _flag_k = FK_TEST; 8168 /* cmp eax, 0x400u */ /* 0x310043A1: cmp eax, 0x400 */ 8169 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x400u); 8170 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8171 _flag_k = FK_CMP; 8172 MEM32(ebp + (-0x10)) = esi; /* 0x310043A6: mov dword ptr [ebp - 0x10], esi */ 8173 if (CMP_AE(_flag_a, _flag_b)) goto L_310043BF; /* 0x310043A9: jae 0x310043bf */ 8174 L_310043AB: 8175 PUSH32(esp, 0x31057D88u); /* 0x310043AB: push 0x31057d88 */ 8176 PUSH32(esp, eax); /* 0x310043B0: push eax */ 8177 PUSH32(esp, 0x310519DCu); /* 0x310043B1: push 0x310519dc */ 8178 eax = ebp + (-0x44); /* 0x310043B6: lea eax, [ebp - 0x44] */ 8179 PUSH32(esp, eax); /* 0x310043B9: push eax */ 8180 goto L_31004451; /* 0x310043BA: jmp 0x31004451 */ 8181 L_310043BF: 8182 /* cmp eax, 0x2800u */ /* 0x310043BF: cmp eax, 0x2800 */ 8183 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x2800u); 8184 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8185 _flag_k = FK_CMP; 8186 if (CMP_AE(_flag_a, _flag_b)) goto L_310043F4; /* 0x310043C4: jae 0x310043f4 */ 8187 L_310043C6: 8188 MEM32(ebp + (-0x14)) = eax; /* 0x310043C6: mov dword ptr [ebp - 0x14], eax */ 8189 MEM32(ebp + (-0x10)) = esi; /* 0x310043C9: mov dword ptr [ebp - 0x10], esi */ 8190 fp_push_i64((int64_t)MEM64(ebp + (-0x14))); /* 0x310043CC: fild qword ptr [ebp - 0x14] */ 8191 PUSH32(esp, 0x310519D8u); /* 0x310043CF: push 0x310519d8 */ 8192 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 8193 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8194 esp = esp - 8; /* 0x310043D4: sub esp, 8 */ 8195 _flag_k = FK_CMP; 8196 _st[0] *= *(double*)ADDR(0x31048380); /* 0x310043D7: fmul qword ptr [0x31048380] */ 8197 ecx = ebp + (-0x44); /* 0x310043DD: lea ecx, [ebp - 0x44] */ 8198 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x310043E0: fstp qword ptr [esp] */ 8199 PUSH32(esp, 0x310519D0u); /* 0x310043E3: push 0x310519d0 */ 8200 PUSH32(esp, ecx); /* 0x310043E8: push ecx */ 8201 RECOMP_ICALL(MEM32(0x31048208)); /* 0x310043E9: call dword ptr [0x31048208] */ 8202 RECOMP_FLAGS_IN(); 8203 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 8204 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8205 esp = esp + 0x14u; /* 0x310043EF: add esp, 0x14 */ 8206 _flag_k = FK_ADD; 8207 goto L_3100445A; /* 0x310043F2: jmp 0x3100445a */ 8208 L_310043F4: 8209 /* cmp eax, 0x00100000u */ /* 0x310043F4: cmp eax, 0x100000 */ 8210 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x00100000u); 8211 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8212 _flag_k = FK_CMP; 8213 if (CMP_AE(_flag_a, _flag_b)) goto L_3100440F; /* 0x310043F9: jae 0x3100440f */ 8214 L_310043FB: 8215 PUSH32(esp, 0x310519D8u); /* 0x310043FB: push 0x310519d8 */ 8216 if (10u) _cf = (((eax) >> 9) & 1u); /* 0x31004400: shr eax, 0xa */ 8217 if (10u) { _flag_a = recomp_flags_pack((eax >> 10u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 8218 eax = eax >> 10u; /* 0x31004400: shr eax, 0xa */ 8219 PUSH32(esp, eax); /* 0x31004403: push eax */ 8220 PUSH32(esp, 0x310519DCu); /* 0x31004404: push 0x310519dc */ 8221 edx = ebp + (-0x44); /* 0x31004409: lea edx, [ebp - 0x44] */ 8222 PUSH32(esp, edx); /* 0x3100440C: push edx */ 8223 goto L_31004451; /* 0x3100440D: jmp 0x31004451 */ 8224 L_3100440F: 8225 /* cmp eax, 0x00A00000u */ /* 0x3100440F: cmp eax, 0xa00000 */ 8226 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x00A00000u); 8227 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8228 _flag_k = FK_CMP; 8229 PUSH32(esp, 0x310519CCu); /* 0x31004414: push 0x310519cc */ 8230 if (CMP_AE(_flag_a, _flag_b)) goto L_31004444; /* 0x31004419: jae 0x31004444 */ 8231 L_3100441B: 8232 MEM32(ebp + (-0x14)) = eax; /* 0x3100441B: mov dword ptr [ebp - 0x14], eax */ 8233 MEM32(ebp + (-0x10)) = esi; /* 0x3100441E: mov dword ptr [ebp - 0x10], esi */ 8234 fp_push_i64((int64_t)MEM64(ebp + (-0x14))); /* 0x31004421: fild qword ptr [ebp - 0x14] */ 8235 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 8236 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8237 esp = esp - 8; /* 0x31004424: sub esp, 8 */ 8238 _flag_k = FK_CMP; 8239 eax = ebp + (-0x44); /* 0x31004427: lea eax, [ebp - 0x44] */ 8240 _st[0] *= *(double*)ADDR(0x31048378); /* 0x3100442A: fmul qword ptr [0x31048378] */ 8241 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x31004430: fstp qword ptr [esp] */ 8242 PUSH32(esp, 0x310519D0u); /* 0x31004433: push 0x310519d0 */ 8243 PUSH32(esp, eax); /* 0x31004438: push eax */ 8244 RECOMP_ICALL(MEM32(0x31048208)); /* 0x31004439: call dword ptr [0x31048208] */ 8245 RECOMP_FLAGS_IN(); 8246 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 8247 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8248 esp = esp + 0x14u; /* 0x3100443F: add esp, 0x14 */ 8249 _flag_k = FK_ADD; 8250 goto L_3100445A; /* 0x31004442: jmp 0x3100445a */ 8251 L_31004444: 8252 if (20u) _cf = (((eax) >> 19) & 1u); /* 0x31004444: shr eax, 0x14 */ 8253 if (20u) { _flag_a = recomp_flags_pack((eax >> 20u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 8254 eax = eax >> 20u; /* 0x31004444: shr eax, 0x14 */ 8255 PUSH32(esp, eax); /* 0x31004447: push eax */ 8256 PUSH32(esp, 0x310519DCu); /* 0x31004448: push 0x310519dc */ 8257 ecx = ebp + (-0x44); /* 0x3100444D: lea ecx, [ebp - 0x44] */ 8258 PUSH32(esp, ecx); /* 0x31004450: push ecx */ 8259 L_31004451: 8260 RECOMP_ICALL(MEM32(0x31048208)); /* 0x31004451: call dword ptr [0x31048208] */ 8261 RECOMP_FLAGS_IN(); 8262 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 8263 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8264 esp = esp + 0x10u; /* 0x31004457: add esp, 0x10 */ 8265 _flag_k = FK_ADD; 8266 L_3100445A: 8267 SET_LO8(edx, MEM8(ebp + 0xF)); /* 0x3100445A: mov dl, byte ptr [ebp + 0xf] */ 8268 PUSH32(esp, ebx); /* 0x3100445D: push ebx */ 8269 PUSH32(esp, edi); /* 0x3100445E: push edi */ 8270 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 8271 ecx = ecx | 0xFFFFFFFFu; /* 0x3100445F: or ecx, 0xffffffff */ 8272 _cf = 0; 8273 _flag_k = FK_TEST; 8274 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 8275 eax = 0; /* 0x31004462: xor eax, eax */ 8276 _cf = 0; 8277 _flag_k = FK_TEST; 8278 edi = ebp + (-0x44); /* 0x31004464: lea edi, [ebp - 0x44] */ 8279 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; } /* 0x31004467: repne scasb al, byte ptr es:[edi] */ 8280 ecx = ~ecx; /* 0x31004469: not ecx */ 8281 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 8282 ecx = ecx - 1; /* 0x3100446B: dec ecx */ 8283 _flag_k = FK_DEC; 8284 ebx = ecx; /* 0x3100446C: mov ebx, ecx */ 8285 PUSH32(esp, 1); /* 0x3100446E: push 1 */ 8286 PUSH32(esp, ebx); /* 0x31004470: push ebx */ 8287 ecx = ebp + (-0x1C); /* 0x31004471: lea ecx, [ebp - 0x1c] */ 8288 MEM8(ebp + (-0x1C)) = (uint8_t)(LO8(edx)); /* 0x31004474: mov byte ptr [ebp - 0x1c], dl */ 8289 MEM32(ebp + (-0x18)) = esi; /* 0x31004477: mov dword ptr [ebp - 0x18], esi */ 8290 MEM32(ebp + (-0x14)) = esi; /* 0x3100447A: mov dword ptr [ebp - 0x14], esi */ 8291 MEM32(ebp + (-0x10)) = esi; /* 0x3100447D: mov dword ptr [ebp - 0x10], esi */ 8292 RECOMP_ICALL(MEM32(0x31048070)); /* 0x31004480: call dword ptr [0x31048070] */ 8293 RECOMP_FLAGS_IN(); 8294 /* test LO8(eax), LO8(eax) */ /* 0x31004486: test al, al */ 8295 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 8296 _cf = 0; 8297 _flag_k = FK_NARROW(FK_TEST, 24); 8298 if (TEST_Z(_flag_a, _flag_b)) goto L_310044AC; /* 0x31004488: je 0x310044ac */ 8299 L_3100448A: 8300 edi = MEM32(ebp + (-0x18)); /* 0x3100448A: mov edi, dword ptr [ebp - 0x18] */ 8301 ecx = ebx; /* 0x3100448D: mov ecx, ebx */ 8302 eax = ecx; /* 0x3100448F: mov eax, ecx */ 8303 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x31004491: shr ecx, 2 */ 8304 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 8305 ecx = ecx >> 2u; /* 0x31004491: shr ecx, 2 */ 8306 esi = ebp + (-0x44); /* 0x31004494: lea esi, [ebp - 0x44] */ 8307 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31004497: 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; } 8308 ecx = eax; /* 0x31004499: mov ecx, eax */ 8309 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 8310 ecx = ecx & 3; /* 0x3100449B: and ecx, 3 */ 8311 _cf = 0; 8312 _flag_k = FK_TEST; 8313 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x3100449E: 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; } 8314 ecx = MEM32(ebp + (-0x18)); /* 0x310044A0: mov ecx, dword ptr [ebp - 0x18] */ 8315 MEM32(ebp + (-0x14)) = ebx; /* 0x310044A3: mov dword ptr [ebp - 0x14], ebx */ 8316 MEM8(ecx + ebx) = (uint8_t)(0); /* 0x310044A6: mov byte ptr [ecx + ebx], 0 */ 8317 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 8318 esi = 0; /* 0x310044AA: xor esi, esi */ 8319 _cf = 0; 8320 _flag_k = FK_TEST; 8321 L_310044AC: 8322 SET_LO8(edx, MEM8(ebp + (-0x1C))); /* 0x310044AC: mov dl, byte ptr [ebp - 0x1c] */ 8323 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 8324 edi = 0; /* 0x310044AF: xor edi, edi */ 8325 _cf = 0; 8326 _flag_k = FK_TEST; 8327 MEM32(ebp + (-0x4)) = esi; /* 0x310044B1: mov dword ptr [ebp - 4], esi */ 8328 esi = MEM32(ebp + 0x8); /* 0x310044B4: mov esi, dword ptr [ebp + 8] */ 8329 MEM8(esi) = (uint8_t)(LO8(edx)); /* 0x310044B7: mov byte ptr [esi], dl */ 8330 MEM32(esi + 0x4) = edi; /* 0x310044B9: mov dword ptr [esi + 4], edi */ 8331 MEM32(esi + 0x8) = edi; /* 0x310044BC: mov dword ptr [esi + 8], edi */ 8332 MEM32(esi + 0xC) = edi; /* 0x310044BF: mov dword ptr [esi + 0xc], edi */ 8333 eax = MEM32(0x310480F8); /* 0x310044C2: mov eax, dword ptr [0x310480f8] */ 8334 ecx = MEM32(eax); /* 0x310044C7: mov ecx, dword ptr [eax] */ 8335 PUSH32(esp, ecx); /* 0x310044C9: push ecx */ 8336 PUSH32(esp, edi); /* 0x310044CA: push edi */ 8337 edx = ebp + (-0x1C); /* 0x310044CB: lea edx, [ebp - 0x1c] */ 8338 PUSH32(esp, edx); /* 0x310044CE: push edx */ 8339 ecx = esi; /* 0x310044CF: mov ecx, esi */ 8340 RECOMP_ICALL(MEM32(0x310480FC)); /* 0x310044D1: call dword ptr [0x310480fc] */ 8341 RECOMP_FLAGS_IN(); 8342 ecx = MEM32(ebp + (-0x18)); /* 0x310044D7: mov ecx, dword ptr [ebp - 0x18] */ 8343 /* cmp ecx, edi */ /* 0x310044DA: cmp ecx, edi */ 8344 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 8345 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8346 _flag_k = FK_CMP; 8347 edi = POP32_VAL(esp); /* 0x310044DC: pop edi */ 8348 ebx = POP32_VAL(esp); /* 0x310044DD: pop ebx */ 8349 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100450B; /* 0x310044DE: je 0x3100450b */ 8350 L_310044E0: 8351 SET_LO8(eax, MEM8(ecx + (-0x1))); /* 0x310044E0: mov al, byte ptr [ecx - 1] */ 8352 /* test LO8(eax), LO8(eax) */ /* 0x310044E3: test al, al */ 8353 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 8354 _cf = 0; 8355 _flag_k = FK_NARROW(FK_TEST, 24); 8356 if (TEST_Z(_flag_a, _flag_b)) goto L_31004501; /* 0x310044E5: je 0x31004501 */ 8357 L_310044E7: 8358 /* cmp LO8(eax), 0xFFu */ /* 0x310044E7: cmp al, 0xff */ 8359 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 8360 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8361 _flag_k = FK_NARROW(FK_CMP, 24); 8362 if (CMP_EQ(_flag_a, _flag_b)) goto L_31004501; /* 0x310044E9: je 0x31004501 */ 8363 L_310044EB: 8364 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 8365 SET_LO8(eax, LO8(eax) - 1); /* 0x310044EB: dec al */ 8366 _flag_k = FK_NARROW(FK_DEC, 24); 8367 MEM8(ecx + (-0x1)) = (uint8_t)(LO8(eax)); /* 0x310044ED: mov byte ptr [ecx - 1], al */ 8368 eax = esi; /* 0x310044F0: mov eax, esi */ 8369 esi = POP32_VAL(esp); /* 0x310044F2: pop esi */ 8370 ecx = MEM32(ebp + (-0xC)); /* 0x310044F3: mov ecx, dword ptr [ebp - 0xc] */ 8371 MEM32(FS_BASE + (0)) = ecx; /* 0x310044F6: mov dword ptr fs:[0], ecx */ 8372 esp = ebp; /* 0x310044FD: mov esp, ebp */ 8373 ebp = POP32_VAL(esp); /* 0x310044FF: pop ebp */ 8374 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31004500: ret */ 8375 L_31004501: 8376 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 8377 ecx = ecx - 1; /* 0x31004501: dec ecx */ 8378 _flag_k = FK_DEC; 8379 PUSH32(esp, ecx); /* 0x31004502: push ecx */ 8380 RECOMP_ICALL(0x31046858u); /* 0x31004503: call 0x31046858 */ /* not lifted */ 8381 RECOMP_FLAGS_IN(); 8382 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8383 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8384 esp = esp + 4; /* 0x31004508: add esp, 4 */ 8385 _flag_k = FK_ADD; 8386 L_3100450B: 8387 ecx = MEM32(ebp + (-0xC)); /* 0x3100450B: mov ecx, dword ptr [ebp - 0xc] */ 8388 eax = esi; /* 0x3100450E: mov eax, esi */ 8389 esi = POP32_VAL(esp); /* 0x31004510: pop esi */ 8390 MEM32(FS_BASE + (0)) = ecx; /* 0x31004511: mov dword ptr fs:[0], ecx */ 8391 esp = ebp; /* 0x31004518: mov esp, ebp */ 8392 ebp = POP32_VAL(esp); /* 0x3100451A: pop ebp */ 8393 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100451B: ret */ 8394 RECOMP_REGS_OUT(); 8395 } 8396 8397 void sub_31004451(void) { 8398 int _fpu_cmp = 0; 8399 uint32_t _cf = 0; 8400 int _df = 1; 8401 uint32_t _flag_k = FK_NONE; 8402 uint32_t _flag_a = 0, _flag_b = 0; 8403 uint32_t _itail_tgt = 0; 8404 RECOMP_REGS_LOCALS 8405 RECOMP_ENTER(0x31004451u); 8406 8407 L_31004451: 8408 RECOMP_ICALL(MEM32(0x31048208)); /* 0x31004451: call dword ptr [0x31048208] */ 8409 RECOMP_FLAGS_IN(); 8410 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 8411 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8412 esp = esp + 0x10u; /* 0x31004457: add esp, 0x10 */ 8413 _flag_k = FK_ADD; 8414 SET_LO8(edx, MEM8(ebp + 0xF)); /* 0x3100445A: mov dl, byte ptr [ebp + 0xf] */ 8415 PUSH32(esp, ebx); /* 0x3100445D: push ebx */ 8416 PUSH32(esp, edi); /* 0x3100445E: push edi */ 8417 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 8418 ecx = ecx | 0xFFFFFFFFu; /* 0x3100445F: or ecx, 0xffffffff */ 8419 _cf = 0; 8420 _flag_k = FK_TEST; 8421 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 8422 eax = 0; /* 0x31004462: xor eax, eax */ 8423 _cf = 0; 8424 _flag_k = FK_TEST; 8425 edi = ebp + (-0x44); /* 0x31004464: lea edi, [ebp - 0x44] */ 8426 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; } /* 0x31004467: repne scasb al, byte ptr es:[edi] */ 8427 ecx = ~ecx; /* 0x31004469: not ecx */ 8428 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 8429 ecx = ecx - 1; /* 0x3100446B: dec ecx */ 8430 _flag_k = FK_DEC; 8431 ebx = ecx; /* 0x3100446C: mov ebx, ecx */ 8432 PUSH32(esp, 1); /* 0x3100446E: push 1 */ 8433 PUSH32(esp, ebx); /* 0x31004470: push ebx */ 8434 ecx = ebp + (-0x1C); /* 0x31004471: lea ecx, [ebp - 0x1c] */ 8435 MEM8(ebp + (-0x1C)) = (uint8_t)(LO8(edx)); /* 0x31004474: mov byte ptr [ebp - 0x1c], dl */ 8436 MEM32(ebp + (-0x18)) = esi; /* 0x31004477: mov dword ptr [ebp - 0x18], esi */ 8437 MEM32(ebp + (-0x14)) = esi; /* 0x3100447A: mov dword ptr [ebp - 0x14], esi */ 8438 MEM32(ebp + (-0x10)) = esi; /* 0x3100447D: mov dword ptr [ebp - 0x10], esi */ 8439 RECOMP_ICALL(MEM32(0x31048070)); /* 0x31004480: call dword ptr [0x31048070] */ 8440 RECOMP_FLAGS_IN(); 8441 /* test LO8(eax), LO8(eax) */ /* 0x31004486: test al, al */ 8442 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 8443 _cf = 0; 8444 _flag_k = FK_NARROW(FK_TEST, 24); 8445 if (TEST_Z(_flag_a, _flag_b)) goto L_310044AC; /* 0x31004488: je 0x310044ac */ 8446 L_3100448A: 8447 edi = MEM32(ebp + (-0x18)); /* 0x3100448A: mov edi, dword ptr [ebp - 0x18] */ 8448 ecx = ebx; /* 0x3100448D: mov ecx, ebx */ 8449 eax = ecx; /* 0x3100448F: mov eax, ecx */ 8450 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x31004491: shr ecx, 2 */ 8451 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 8452 ecx = ecx >> 2u; /* 0x31004491: shr ecx, 2 */ 8453 esi = ebp + (-0x44); /* 0x31004494: lea esi, [ebp - 0x44] */ 8454 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31004497: 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; } 8455 ecx = eax; /* 0x31004499: mov ecx, eax */ 8456 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 8457 ecx = ecx & 3; /* 0x3100449B: and ecx, 3 */ 8458 _cf = 0; 8459 _flag_k = FK_TEST; 8460 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x3100449E: 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; } 8461 ecx = MEM32(ebp + (-0x18)); /* 0x310044A0: mov ecx, dword ptr [ebp - 0x18] */ 8462 MEM32(ebp + (-0x14)) = ebx; /* 0x310044A3: mov dword ptr [ebp - 0x14], ebx */ 8463 MEM8(ecx + ebx) = (uint8_t)(0); /* 0x310044A6: mov byte ptr [ecx + ebx], 0 */ 8464 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 8465 esi = 0; /* 0x310044AA: xor esi, esi */ 8466 _cf = 0; 8467 _flag_k = FK_TEST; 8468 L_310044AC: 8469 SET_LO8(edx, MEM8(ebp + (-0x1C))); /* 0x310044AC: mov dl, byte ptr [ebp - 0x1c] */ 8470 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 8471 edi = 0; /* 0x310044AF: xor edi, edi */ 8472 _cf = 0; 8473 _flag_k = FK_TEST; 8474 MEM32(ebp + (-0x4)) = esi; /* 0x310044B1: mov dword ptr [ebp - 4], esi */ 8475 esi = MEM32(ebp + 0x8); /* 0x310044B4: mov esi, dword ptr [ebp + 8] */ 8476 MEM8(esi) = (uint8_t)(LO8(edx)); /* 0x310044B7: mov byte ptr [esi], dl */ 8477 MEM32(esi + 0x4) = edi; /* 0x310044B9: mov dword ptr [esi + 4], edi */ 8478 MEM32(esi + 0x8) = edi; /* 0x310044BC: mov dword ptr [esi + 8], edi */ 8479 MEM32(esi + 0xC) = edi; /* 0x310044BF: mov dword ptr [esi + 0xc], edi */ 8480 eax = MEM32(0x310480F8); /* 0x310044C2: mov eax, dword ptr [0x310480f8] */ 8481 ecx = MEM32(eax); /* 0x310044C7: mov ecx, dword ptr [eax] */ 8482 PUSH32(esp, ecx); /* 0x310044C9: push ecx */ 8483 PUSH32(esp, edi); /* 0x310044CA: push edi */ 8484 edx = ebp + (-0x1C); /* 0x310044CB: lea edx, [ebp - 0x1c] */ 8485 PUSH32(esp, edx); /* 0x310044CE: push edx */ 8486 ecx = esi; /* 0x310044CF: mov ecx, esi */ 8487 RECOMP_ICALL(MEM32(0x310480FC)); /* 0x310044D1: call dword ptr [0x310480fc] */ 8488 RECOMP_FLAGS_IN(); 8489 ecx = MEM32(ebp + (-0x18)); /* 0x310044D7: mov ecx, dword ptr [ebp - 0x18] */ 8490 /* cmp ecx, edi */ /* 0x310044DA: cmp ecx, edi */ 8491 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 8492 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8493 _flag_k = FK_CMP; 8494 edi = POP32_VAL(esp); /* 0x310044DC: pop edi */ 8495 ebx = POP32_VAL(esp); /* 0x310044DD: pop ebx */ 8496 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100450B; /* 0x310044DE: je 0x3100450b */ 8497 L_310044E0: 8498 SET_LO8(eax, MEM8(ecx + (-0x1))); /* 0x310044E0: mov al, byte ptr [ecx - 1] */ 8499 /* test LO8(eax), LO8(eax) */ /* 0x310044E3: test al, al */ 8500 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 8501 _cf = 0; 8502 _flag_k = FK_NARROW(FK_TEST, 24); 8503 if (TEST_Z(_flag_a, _flag_b)) goto L_31004501; /* 0x310044E5: je 0x31004501 */ 8504 L_310044E7: 8505 /* cmp LO8(eax), 0xFFu */ /* 0x310044E7: cmp al, 0xff */ 8506 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 8507 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8508 _flag_k = FK_NARROW(FK_CMP, 24); 8509 if (CMP_EQ(_flag_a, _flag_b)) goto L_31004501; /* 0x310044E9: je 0x31004501 */ 8510 L_310044EB: 8511 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 8512 SET_LO8(eax, LO8(eax) - 1); /* 0x310044EB: dec al */ 8513 _flag_k = FK_NARROW(FK_DEC, 24); 8514 MEM8(ecx + (-0x1)) = (uint8_t)(LO8(eax)); /* 0x310044ED: mov byte ptr [ecx - 1], al */ 8515 eax = esi; /* 0x310044F0: mov eax, esi */ 8516 esi = POP32_VAL(esp); /* 0x310044F2: pop esi */ 8517 ecx = MEM32(ebp + (-0xC)); /* 0x310044F3: mov ecx, dword ptr [ebp - 0xc] */ 8518 MEM32(FS_BASE + (0)) = ecx; /* 0x310044F6: mov dword ptr fs:[0], ecx */ 8519 esp = ebp; /* 0x310044FD: mov esp, ebp */ 8520 ebp = POP32_VAL(esp); /* 0x310044FF: pop ebp */ 8521 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31004500: ret */ 8522 L_31004501: 8523 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 8524 ecx = ecx - 1; /* 0x31004501: dec ecx */ 8525 _flag_k = FK_DEC; 8526 PUSH32(esp, ecx); /* 0x31004502: push ecx */ 8527 RECOMP_ICALL(0x31046858u); /* 0x31004503: call 0x31046858 */ /* not lifted */ 8528 RECOMP_FLAGS_IN(); 8529 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8530 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8531 esp = esp + 4; /* 0x31004508: add esp, 4 */ 8532 _flag_k = FK_ADD; 8533 L_3100450B: 8534 ecx = MEM32(ebp + (-0xC)); /* 0x3100450B: mov ecx, dword ptr [ebp - 0xc] */ 8535 eax = esi; /* 0x3100450E: mov eax, esi */ 8536 esi = POP32_VAL(esp); /* 0x31004510: pop esi */ 8537 MEM32(FS_BASE + (0)) = ecx; /* 0x31004511: mov dword ptr fs:[0], ecx */ 8538 esp = ebp; /* 0x31004518: mov esp, ebp */ 8539 ebp = POP32_VAL(esp); /* 0x3100451A: pop ebp */ 8540 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100451B: ret */ 8541 RECOMP_REGS_OUT(); 8542 } 8543 8544 void sub_31004520(void) { 8545 int _fpu_cmp = 0; 8546 uint32_t _cf = 0; 8547 int _df = 1; 8548 uint32_t _flag_k = FK_NONE; 8549 uint32_t _flag_a = 0, _flag_b = 0; 8550 uint32_t _itail_tgt = 0; 8551 RECOMP_REGS_LOCALS 8552 RECOMP_ENTER(0x31004520u); 8553 8554 L_31004520: 8555 PUSH32(esp, ebp); /* 0x31004520: push ebp */ 8556 ebp = esp; /* 0x31004521: mov ebp, esp */ 8557 /* cmp MEM32(0x3104F110), 0x40000001u */ /* 0x31004523: cmp dword ptr [0x3104f110], 0x40000001 */ 8558 _flag_a = (uint32_t)(MEM32(0x3104F110)); _flag_b = (uint32_t)(0x40000001u); 8559 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8560 _flag_k = FK_CMP; 8561 PUSH32(esp, esi); /* 0x3100452D: push esi */ 8562 PUSH32(esp, edi); /* 0x3100452E: push edi */ 8563 edi = MEM32(ebp + 0x8); /* 0x3100452F: mov edi, dword ptr [ebp + 8] */ 8564 esi = ecx; /* 0x31004532: mov esi, ecx */ 8565 if (CMP_NE(_flag_a, _flag_b)) goto L_31004565; /* 0x31004534: jne 0x31004565 */ 8566 L_31004536: 8567 /* cmp edi, 0x2000u */ /* 0x31004536: cmp edi, 0x2000 */ 8568 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x2000u); 8569 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8570 _flag_k = FK_CMP; 8571 if (CMP_A(_flag_a, _flag_b)) goto L_31004565; /* 0x3100453C: ja 0x31004565 */ 8572 L_3100453E: 8573 PUSH32(esp, 0x3104F110u); /* 0x3100453E: push 0x3104f110 */ 8574 MEM32(esi) = 0x3104F110u; /* 0x31004543: mov dword ptr [esi], 0x3104f110 */ 8575 RECOMP_ICALL(0x31004590u); /* 0x31004549: call 0x31004590 */ /* not lifted */ 8576 RECOMP_FLAGS_IN(); 8577 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8578 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8579 esp = esp + 4; /* 0x3100454E: add esp, 4 */ 8580 _flag_k = FK_ADD; 8581 /* cmp eax, 0x40000001u */ /* 0x31004551: cmp eax, 0x40000001 */ 8582 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x40000001u); 8583 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8584 _flag_k = FK_CMP; 8585 if (CMP_EQ(_flag_a, _flag_b)) goto L_31004579; /* 0x31004556: je 0x31004579 */ 8586 L_31004558: 8587 ecx = MEM32(esi); /* 0x31004558: mov ecx, dword ptr [esi] */ 8588 PUSH32(esp, ebx); /* 0x3100455A: push ebx */ 8589 MEM32(ebp + 0x8) = ecx; /* 0x3100455B: mov dword ptr [ebp + 8], ecx */ 8590 ebx = MEM32(ebp + 0x8); /* 0x3100455E: mov ebx, dword ptr [ebp + 8] */ 8591 _flag_a = __atomic_fetch_sub((uint32_t *)ADDR(ebx), 1, __ATOMIC_SEQ_CST); _flag_b = 1; /* 0x31004561: lock dec dword ptr [ebx] */ 8592 _flag_k = FK_DEC; 8593 ebx = POP32_VAL(esp); /* 0x31004564: pop ebx */ 8594 L_31004565: 8595 edx = edi + 0x8; /* 0x31004565: lea edx, [edi + 8] */ 8596 PUSH32(esp, edx); /* 0x31004568: push edx */ 8597 RECOMP_ICALL(0x310468DAu); /* 0x31004569: call 0x310468da */ /* not lifted */ 8598 RECOMP_FLAGS_IN(); 8599 MEM32(esi) = eax; /* 0x3100456E: mov dword ptr [esi], eax */ 8600 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8601 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8602 esp = esp + 4; /* 0x31004570: add esp, 4 */ 8603 _flag_k = FK_ADD; 8604 MEM32(eax) = 0x40000001u; /* 0x31004573: mov dword ptr [eax], 0x40000001 */ 8605 L_31004579: 8606 eax = MEM32(esi); /* 0x31004579: mov eax, dword ptr [esi] */ 8607 MEM32(eax + 0x4) = edi; /* 0x3100457B: mov dword ptr [eax + 4], edi */ 8608 edi = POP32_VAL(esp); /* 0x3100457E: pop edi */ 8609 eax = esi; /* 0x3100457F: mov eax, esi */ 8610 esi = POP32_VAL(esp); /* 0x31004581: pop esi */ 8611 ebp = POP32_VAL(esp); /* 0x31004582: pop ebp */ 8612 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31004583: ret 4 */ 8613 RECOMP_REGS_OUT(); 8614 } 8615 8616 void sub_31004590(void) { 8617 int _fpu_cmp = 0; 8618 uint32_t _cf = 0; 8619 int _df = 1; 8620 uint32_t _flag_k = FK_NONE; 8621 uint32_t _flag_a = 0, _flag_b = 0; 8622 uint32_t _itail_tgt = 0; 8623 RECOMP_REGS_LOCALS 8624 RECOMP_ENTER(0x31004590u); 8625 8626 L_31004590: 8627 PUSH32(esp, ebp); /* 0x31004590: push ebp */ 8628 ebp = esp; /* 0x31004591: mov ebp, esp */ 8629 PUSH32(esp, ebx); /* 0x31004593: push ebx */ 8630 PUSH32(esp, esi); /* 0x31004594: push esi */ 8631 PUSH32(esp, edi); /* 0x31004595: push edi */ 8632 ebx = MEM32(ebp + 0x8); /* 0x31004596: mov ebx, dword ptr [ebp + 8] */ 8633 eax = __atomic_load_n((uint32_t *)ADDR(ebx), __ATOMIC_SEQ_CST); /* 0x31004599: mov eax, dword ptr [ebx] */ 8634 L_3100459B: 8635 edx = eax + 0x1; /* 0x3100459B: lea edx, [eax + 1] */ 8636 _flag_a = eax; _flag_b = eax; 8637 __atomic_compare_exchange_n((uint32_t *)ADDR(ebx), &_flag_b, edx, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); /* 0x3100459E: lock cmpxchg dword ptr [ebx], edx */ 8638 _cf = _flag_a < _flag_b; 8639 eax = _flag_b; 8640 _flag_k = FK_CMP; 8641 RECOMP_BACKEDGE(); 8642 if (CMP_NE(_flag_a, _flag_b)) goto L_3100459B; /* 0x310045A2: jne 0x3100459b */ 8643 L_310045A4: 8644 edi = POP32_VAL(esp); /* 0x310045A4: pop edi */ 8645 esi = POP32_VAL(esp); /* 0x310045A5: pop esi */ 8646 ebx = POP32_VAL(esp); /* 0x310045A6: pop ebx */ 8647 ebp = POP32_VAL(esp); /* 0x310045A7: pop ebp */ 8648 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310045A8: ret */ 8649 RECOMP_REGS_OUT(); 8650 } 8651 8652 void sub_310045B0(void) { 8653 int _fpu_cmp = 0; 8654 uint32_t _cf = 0; 8655 int _df = 1; 8656 uint32_t _flag_k = FK_NONE; 8657 uint32_t _flag_a = 0, _flag_b = 0; 8658 uint32_t _itail_tgt = 0; 8659 RECOMP_REGS_LOCALS 8660 RECOMP_ENTER(0x310045B0u); 8661 8662 L_310045B0: 8663 PUSH32(esp, ebp); /* 0x310045B0: push ebp */ 8664 ebp = esp; /* 0x310045B1: mov ebp, esp */ 8665 PUSH32(esp, ecx); /* 0x310045B3: push ecx */ 8666 eax = ecx; /* 0x310045B4: mov eax, ecx */ 8667 PUSH32(esp, ebx); /* 0x310045B6: push ebx */ 8668 MEM32(eax) = 0x31051118u; /* 0x310045B7: mov dword ptr [eax], 0x31051118 */ 8669 MEM32(ebp + (-0x4)) = 0x31051118u; /* 0x310045BD: mov dword ptr [ebp - 4], 0x31051118 */ 8670 ebx = MEM32(ebp + (-0x4)); /* 0x310045C4: mov ebx, dword ptr [ebp - 4] */ 8671 _flag_a = __atomic_fetch_add((uint32_t *)ADDR(ebx), 1, __ATOMIC_SEQ_CST); _flag_b = 1; /* 0x310045C7: lock inc dword ptr [ebx] */ 8672 _flag_k = FK_INC; 8673 ebx = POP32_VAL(esp); /* 0x310045CA: pop ebx */ 8674 esp = ebp; /* 0x310045CB: mov esp, ebp */ 8675 ebp = POP32_VAL(esp); /* 0x310045CD: pop ebp */ 8676 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310045CE: ret */ 8677 RECOMP_REGS_OUT(); 8678 } 8679 8680 void sub_310045D0(void) { 8681 int _fpu_cmp = 0; 8682 uint32_t _cf = 0; 8683 int _df = 1; 8684 uint32_t _flag_k = FK_NONE; 8685 uint32_t _flag_a = 0, _flag_b = 0; 8686 uint32_t _itail_tgt = 0; 8687 RECOMP_REGS_LOCALS 8688 RECOMP_ENTER(0x310045D0u); 8689 8690 L_310045D0: 8691 PUSH32(esp, ebp); /* 0x310045D0: push ebp */ 8692 ebp = esp; /* 0x310045D1: mov ebp, esp */ 8693 PUSH32(esp, 0xFFFFFFFFu); /* 0x310045D3: push -1 */ 8694 PUSH32(esp, 0x31046F11u); /* 0x310045D5: push 0x31046f11 */ 8695 eax = MEM32(FS_BASE + (0)); /* 0x310045DA: mov eax, dword ptr fs:[0] */ 8696 PUSH32(esp, eax); /* 0x310045E0: push eax */ 8697 MEM32(FS_BASE + (0)) = esp; /* 0x310045E1: mov dword ptr fs:[0], esp */ 8698 PUSH32(esp, ecx); /* 0x310045E8: push ecx */ 8699 PUSH32(esp, ebx); /* 0x310045E9: push ebx */ 8700 SET_LO8(ebx, MEM8(ebp + 0x10)); /* 0x310045EA: mov bl, byte ptr [ebp + 0x10] */ 8701 /* test LO8(ebx), LO8(ebx) */ /* 0x310045ED: test bl, bl */ 8702 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 8703 _cf = 0; 8704 _flag_k = FK_NARROW(FK_TEST, 24); 8705 PUSH32(esp, esi); /* 0x310045EF: push esi */ 8706 esi = ecx; /* 0x310045F0: mov esi, ecx */ 8707 MEM32(ebp + (-0x10)) = esi; /* 0x310045F2: mov dword ptr [ebp - 0x10], esi */ 8708 if (TEST_Z(_flag_a, _flag_b)) goto L_3100460B; /* 0x310045F5: je 0x3100460b */ 8709 L_310045F7: 8710 PUSH32(esp, 0xCu); /* 0x310045F7: push 0xc */ 8711 RECOMP_ICALL(0x310468DAu); /* 0x310045F9: call 0x310468da */ /* not lifted */ 8712 RECOMP_FLAGS_IN(); 8713 MEM32(esi) = eax; /* 0x310045FE: mov dword ptr [esi], eax */ 8714 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8715 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8716 esp = esp + 4; /* 0x31004600: add esp, 4 */ 8717 _flag_k = FK_ADD; 8718 MEM32(eax) = 0x40000001u; /* 0x31004603: mov dword ptr [eax], 0x40000001 */ 8719 goto L_31004622; /* 0x31004609: jmp 0x31004622 */ 8720 L_3100460B: 8721 MEM32(ebp + 0x10) = esi; /* 0x3100460B: mov dword ptr [ebp + 0x10], esi */ 8722 /* test esi, esi */ /* 0x3100460E: test esi, esi */ 8723 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 8724 _cf = 0; 8725 _flag_k = FK_TEST; 8726 MEM32(ebp + (-0x4)) = 0; /* 0x31004610: mov dword ptr [ebp - 4], 0 */ 8727 if (TEST_Z(_flag_a, _flag_b)) goto L_31004622; /* 0x31004617: je 0x31004622 */ 8728 L_31004619: 8729 PUSH32(esp, 4); /* 0x31004619: push 4 */ 8730 ecx = esi; /* 0x3100461B: mov ecx, esi */ 8731 RECOMP_ICALL(0x31004520u); /* 0x3100461D: call 0x31004520 */ /* not lifted */ 8732 RECOMP_FLAGS_IN(); 8733 L_31004622: 8734 eax = MEM32(esi); /* 0x31004622: mov eax, dword ptr [esi] */ 8735 SET_LO8(ecx, LO8(ebx)); /* 0x31004624: mov cl, bl */ 8736 edx = 0xC0000000u; /* 0x31004626: mov edx, 0xc0000000 */ 8737 if (((LO8(ecx)) & 31)) _cf = ((((LO8(ecx)) & 31)) <= 32 ? (((edx) >> (32 - (((LO8(ecx)) & 31)))) & 1u) : 0u); /* 0x3100462B: shl edx, cl */ 8738 if (((LO8(ecx)) & 31)) { _flag_a = recomp_flags_pack((edx << ((LO8(ecx)) & 31)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 8739 edx = edx << ((LO8(ecx)) & 31); /* 0x3100462B: shl edx, cl */ 8740 ecx = MEM32(eax); /* 0x3100462D: mov ecx, dword ptr [eax] */ 8741 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x3FFFFFFFu); 8742 ecx = ecx & 0x3FFFFFFFu; /* 0x3100462F: and ecx, 0x3fffffff */ 8743 _cf = 0; 8744 _flag_k = FK_TEST; 8745 _flag_a = (uint32_t)((edx | ecx)); _flag_b = (uint32_t)((edx | ecx)); 8746 edx = edx | ecx; /* 0x31004635: or edx, ecx */ 8747 _cf = 0; 8748 _flag_k = FK_TEST; 8749 MEM32(eax) = edx; /* 0x31004637: mov dword ptr [eax], edx */ 8750 edx = MEM32(esi); /* 0x31004639: mov edx, dword ptr [esi] */ 8751 eax = MEM32(ebp + 0xC); /* 0x3100463B: mov eax, dword ptr [ebp + 0xc] */ 8752 MEM32(edx + 0x4) = eax; /* 0x3100463E: mov dword ptr [edx + 4], eax */ 8753 ecx = MEM32(esi); /* 0x31004641: mov ecx, dword ptr [esi] */ 8754 edx = MEM32(ebp + 0x8); /* 0x31004643: mov edx, dword ptr [ebp + 8] */ 8755 MEM32(ecx + 0x8) = edx; /* 0x31004646: mov dword ptr [ecx + 8], edx */ 8756 ecx = MEM32(ebp + (-0xC)); /* 0x31004649: mov ecx, dword ptr [ebp - 0xc] */ 8757 eax = esi; /* 0x3100464C: mov eax, esi */ 8758 esi = POP32_VAL(esp); /* 0x3100464E: pop esi */ 8759 ebx = POP32_VAL(esp); /* 0x3100464F: pop ebx */ 8760 MEM32(FS_BASE + (0)) = ecx; /* 0x31004650: mov dword ptr fs:[0], ecx */ 8761 esp = ebp; /* 0x31004657: mov esp, ebp */ 8762 ebp = POP32_VAL(esp); /* 0x31004659: pop ebp */ 8763 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x3100465A: ret 0xc */ 8764 RECOMP_REGS_OUT(); 8765 } 8766 8767 void sub_31004660(void) { 8768 int _fpu_cmp = 0; 8769 uint32_t _cf = 0; 8770 int _df = 1; 8771 uint32_t _flag_k = FK_NONE; 8772 uint32_t _flag_a = 0, _flag_b = 0; 8773 uint32_t _itail_tgt = 0; 8774 RECOMP_REGS_LOCALS 8775 RECOMP_ENTER(0x31004660u); 8776 8777 L_31004660: 8778 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31004660: ret */ 8779 RECOMP_REGS_OUT(); 8780 } 8781 8782 void sub_31004670(void) { 8783 int _fpu_cmp = 0; 8784 uint32_t _cf = 0; 8785 int _df = 1; 8786 uint32_t _flag_k = FK_NONE; 8787 uint32_t _flag_a = 0, _flag_b = 0; 8788 uint32_t _itail_tgt = 0; 8789 RECOMP_REGS_LOCALS 8790 RECOMP_ENTER(0x31004670u); 8791 8792 L_31004670: 8793 PUSH32(esp, ebp); /* 0x31004670: push ebp */ 8794 ebp = esp; /* 0x31004671: mov ebp, esp */ 8795 PUSH32(esp, 0xFFFFFFFFu); /* 0x31004673: push -1 */ 8796 PUSH32(esp, 0x31046F31u); /* 0x31004675: push 0x31046f31 */ 8797 eax = MEM32(FS_BASE + (0)); /* 0x3100467A: mov eax, dword ptr fs:[0] */ 8798 PUSH32(esp, eax); /* 0x31004680: push eax */ 8799 MEM32(FS_BASE + (0)) = esp; /* 0x31004681: mov dword ptr fs:[0], esp */ 8800 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 8801 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8802 esp = esp - 8; /* 0x31004688: sub esp, 8 */ 8803 _flag_k = FK_CMP; 8804 PUSH32(esp, ebx); /* 0x3100468B: push ebx */ 8805 ebx = ecx; /* 0x3100468C: mov ebx, ecx */ 8806 PUSH32(esp, esi); /* 0x3100468E: push esi */ 8807 PUSH32(esp, edi); /* 0x3100468F: push edi */ 8808 MEM32(ebp + (-0x10)) = ebx; /* 0x31004690: mov dword ptr [ebp - 0x10], ebx */ 8809 MEM32(ebp + (-0x14)) = ebx; /* 0x31004693: mov dword ptr [ebp - 0x14], ebx */ 8810 /* test ebx, ebx */ /* 0x31004696: test ebx, ebx */ 8811 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 8812 _cf = 0; 8813 _flag_k = FK_TEST; 8814 esi = MEM32(ebp + 0xC); /* 0x31004698: mov esi, dword ptr [ebp + 0xc] */ 8815 MEM32(ebp + (-0x4)) = 0; /* 0x3100469B: mov dword ptr [ebp - 4], 0 */ 8816 if (TEST_Z(_flag_a, _flag_b)) goto L_310046AA; /* 0x310046A2: je 0x310046aa */ 8817 L_310046A4: 8818 PUSH32(esp, esi); /* 0x310046A4: push esi */ 8819 RECOMP_ICALL(0x31004520u); /* 0x310046A5: call 0x31004520 */ /* not lifted */ 8820 RECOMP_FLAGS_IN(); 8821 L_310046AA: 8822 edi = MEM32(ebx); /* 0x310046AA: mov edi, dword ptr [ebx] */ 8823 ecx = esi; /* 0x310046AC: mov ecx, esi */ 8824 esi = MEM32(ebp + 0x8); /* 0x310046AE: mov esi, dword ptr [ebp + 8] */ 8825 eax = ecx; /* 0x310046B1: mov eax, ecx */ 8826 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x310046B3: shr ecx, 2 */ 8827 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 8828 ecx = ecx >> 2u; /* 0x310046B3: shr ecx, 2 */ 8829 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(8); 8830 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8831 edi = edi + 8; /* 0x310046B6: add edi, 8 */ 8832 _flag_k = FK_ADD; 8833 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x310046B9: 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; } 8834 ecx = eax; /* 0x310046BB: mov ecx, eax */ 8835 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 8836 ecx = ecx & 3; /* 0x310046BD: and ecx, 3 */ 8837 _cf = 0; 8838 _flag_k = FK_TEST; 8839 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x310046C0: 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; } 8840 ecx = MEM32(ebp + (-0xC)); /* 0x310046C2: mov ecx, dword ptr [ebp - 0xc] */ 8841 edi = POP32_VAL(esp); /* 0x310046C5: pop edi */ 8842 esi = POP32_VAL(esp); /* 0x310046C6: pop esi */ 8843 eax = ebx; /* 0x310046C7: mov eax, ebx */ 8844 ebx = POP32_VAL(esp); /* 0x310046C9: pop ebx */ 8845 MEM32(FS_BASE + (0)) = ecx; /* 0x310046CA: mov dword ptr fs:[0], ecx */ 8846 esp = ebp; /* 0x310046D1: mov esp, ebp */ 8847 ebp = POP32_VAL(esp); /* 0x310046D3: pop ebp */ 8848 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x310046D4: ret 8 */ 8849 RECOMP_REGS_OUT(); 8850 } 8851 8852 void sub_310046E0(void) { 8853 int _fpu_cmp = 0; 8854 uint32_t _cf = 0; 8855 int _df = 1; 8856 uint32_t _flag_k = FK_NONE; 8857 uint32_t _flag_a = 0, _flag_b = 0; 8858 uint32_t _itail_tgt = 0; 8859 RECOMP_REGS_LOCALS 8860 RECOMP_ENTER(0x310046E0u); 8861 8862 L_310046E0: 8863 PUSH32(esp, ebp); /* 0x310046E0: push ebp */ 8864 ebp = esp; /* 0x310046E1: mov ebp, esp */ 8865 eax = MEM32(ebp + 0x8); /* 0x310046E3: mov eax, dword ptr [ebp + 8] */ 8866 PUSH32(esp, ebx); /* 0x310046E6: push ebx */ 8867 PUSH32(esp, esi); /* 0x310046E7: push esi */ 8868 esi = ecx; /* 0x310046E8: mov esi, ecx */ 8869 ecx = MEM32(eax); /* 0x310046EA: mov ecx, dword ptr [eax] */ 8870 PUSH32(esp, edi); /* 0x310046EC: push edi */ 8871 MEM32(ebp + 0x8) = ecx; /* 0x310046ED: mov dword ptr [ebp + 8], ecx */ 8872 ebx = MEM32(ebp + 0x8); /* 0x310046F0: mov ebx, dword ptr [ebp + 8] */ 8873 _flag_a = __atomic_fetch_add((uint32_t *)ADDR(ebx), 1, __ATOMIC_SEQ_CST); _flag_b = 1; /* 0x310046F3: lock inc dword ptr [ebx] */ 8874 _flag_k = FK_INC; 8875 edi = MEM32(esi); /* 0x310046F6: mov edi, dword ptr [esi] */ 8876 edx = MEM32(eax); /* 0x310046F8: mov edx, dword ptr [eax] */ 8877 PUSH32(esp, edi); /* 0x310046FA: push edi */ 8878 MEM32(esi) = edx; /* 0x310046FB: mov dword ptr [esi], edx */ 8879 RECOMP_ICALL(0x31004740u); /* 0x310046FD: call 0x31004740 */ /* not lifted */ 8880 RECOMP_FLAGS_IN(); 8881 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x3FFFFFFFu); 8882 eax = eax & 0x3FFFFFFFu; /* 0x31004702: and eax, 0x3fffffff */ 8883 _cf = 0; 8884 _flag_k = FK_TEST; 8885 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8886 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8887 esp = esp + 4; /* 0x31004707: add esp, 4 */ 8888 _flag_k = FK_ADD; 8889 /* cmp eax, 1 */ /* 0x3100470A: cmp eax, 1 */ 8890 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 8891 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8892 _flag_k = FK_CMP; 8893 if (CMP_NE(_flag_a, _flag_b)) goto L_3100472C; /* 0x3100470D: jne 0x3100472c */ 8894 L_3100470F: 8895 /* cmp MEM32(edi), 0x80000000u */ /* 0x3100470F: cmp dword ptr [edi], 0x80000000 */ 8896 _flag_a = (uint32_t)(MEM32(edi)); _flag_b = (uint32_t)(0x80000000u); 8897 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8898 _flag_k = FK_CMP; 8899 if (CMP_NE(_flag_a, _flag_b)) goto L_31004723; /* 0x31004715: jne 0x31004723 */ 8900 L_31004717: 8901 eax = MEM32(edi + 0x8); /* 0x31004717: mov eax, dword ptr [edi + 8] */ 8902 PUSH32(esp, eax); /* 0x3100471A: push eax */ 8903 RECOMP_ICALL(0x31046858u); /* 0x3100471B: call 0x31046858 */ /* not lifted */ 8904 RECOMP_FLAGS_IN(); 8905 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8906 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8907 esp = esp + 4; /* 0x31004720: add esp, 4 */ 8908 _flag_k = FK_ADD; 8909 L_31004723: 8910 PUSH32(esp, edi); /* 0x31004723: push edi */ 8911 RECOMP_ICALL(0x31046858u); /* 0x31004724: call 0x31046858 */ /* not lifted */ 8912 RECOMP_FLAGS_IN(); 8913 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8914 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8915 esp = esp + 4; /* 0x31004729: add esp, 4 */ 8916 _flag_k = FK_ADD; 8917 L_3100472C: 8918 edi = POP32_VAL(esp); /* 0x3100472C: pop edi */ 8919 eax = esi; /* 0x3100472D: mov eax, esi */ 8920 esi = POP32_VAL(esp); /* 0x3100472F: pop esi */ 8921 ebx = POP32_VAL(esp); /* 0x31004730: pop ebx */ 8922 ebp = POP32_VAL(esp); /* 0x31004731: pop ebp */ 8923 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31004732: ret 4 */ 8924 RECOMP_REGS_OUT(); 8925 } 8926 8927 void sub_31004740(void) { 8928 int _fpu_cmp = 0; 8929 uint32_t _cf = 0; 8930 int _df = 1; 8931 uint32_t _flag_k = FK_NONE; 8932 uint32_t _flag_a = 0, _flag_b = 0; 8933 uint32_t _itail_tgt = 0; 8934 RECOMP_REGS_LOCALS 8935 RECOMP_ENTER(0x31004740u); 8936 8937 L_31004740: 8938 PUSH32(esp, ebp); /* 0x31004740: push ebp */ 8939 ebp = esp; /* 0x31004741: mov ebp, esp */ 8940 PUSH32(esp, ebx); /* 0x31004743: push ebx */ 8941 PUSH32(esp, esi); /* 0x31004744: push esi */ 8942 PUSH32(esp, edi); /* 0x31004745: push edi */ 8943 ebx = MEM32(ebp + 0x8); /* 0x31004746: mov ebx, dword ptr [ebp + 8] */ 8944 eax = __atomic_load_n((uint32_t *)ADDR(ebx), __ATOMIC_SEQ_CST); /* 0x31004749: mov eax, dword ptr [ebx] */ 8945 L_3100474B: 8946 edx = eax + (-0x1); /* 0x3100474B: lea edx, [eax - 1] */ 8947 _flag_a = eax; _flag_b = eax; 8948 __atomic_compare_exchange_n((uint32_t *)ADDR(ebx), &_flag_b, edx, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); /* 0x3100474E: lock cmpxchg dword ptr [ebx], edx */ 8949 _cf = _flag_a < _flag_b; 8950 eax = _flag_b; 8951 _flag_k = FK_CMP; 8952 RECOMP_BACKEDGE(); 8953 if (CMP_NE(_flag_a, _flag_b)) goto L_3100474B; /* 0x31004752: jne 0x3100474b */ 8954 L_31004754: 8955 edi = POP32_VAL(esp); /* 0x31004754: pop edi */ 8956 esi = POP32_VAL(esp); /* 0x31004755: pop esi */ 8957 ebx = POP32_VAL(esp); /* 0x31004756: pop ebx */ 8958 ebp = POP32_VAL(esp); /* 0x31004757: pop ebp */ 8959 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31004758: ret */ 8960 RECOMP_REGS_OUT(); 8961 } 8962 8963 void sub_31004760(void) { 8964 int _fpu_cmp = 0; 8965 uint32_t _cf = 0; 8966 int _df = 1; 8967 uint32_t _flag_k = FK_NONE; 8968 uint32_t _flag_a = 0, _flag_b = 0; 8969 uint32_t _itail_tgt = 0; 8970 RECOMP_REGS_LOCALS 8971 RECOMP_ENTER(0x31004760u); 8972 8973 L_31004760: 8974 PUSH32(esp, esi); /* 0x31004760: push esi */ 8975 esi = ecx; /* 0x31004761: mov esi, ecx */ 8976 eax = MEM32(esi); /* 0x31004763: mov eax, dword ptr [esi] */ 8977 PUSH32(esp, eax); /* 0x31004765: push eax */ 8978 RECOMP_ICALL(0x31004740u); /* 0x31004766: call 0x31004740 */ /* not lifted */ 8979 RECOMP_FLAGS_IN(); 8980 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x3FFFFFFFu); 8981 eax = eax & 0x3FFFFFFFu; /* 0x3100476B: and eax, 0x3fffffff */ 8982 _cf = 0; 8983 _flag_k = FK_TEST; 8984 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8985 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8986 esp = esp + 4; /* 0x31004770: add esp, 4 */ 8987 _flag_k = FK_ADD; 8988 /* cmp eax, 1 */ /* 0x31004773: cmp eax, 1 */ 8989 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 8990 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8991 _flag_k = FK_CMP; 8992 if (CMP_NE(_flag_a, _flag_b)) goto L_31004799; /* 0x31004776: jne 0x31004799 */ 8993 L_31004778: 8994 eax = MEM32(esi); /* 0x31004778: mov eax, dword ptr [esi] */ 8995 /* cmp MEM32(eax), 0x80000000u */ /* 0x3100477A: cmp dword ptr [eax], 0x80000000 */ 8996 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x80000000u); 8997 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8998 _flag_k = FK_CMP; 8999 if (CMP_NE(_flag_a, _flag_b)) goto L_3100478E; /* 0x31004780: jne 0x3100478e */ 9000 L_31004782: 9001 ecx = MEM32(eax + 0x8); /* 0x31004782: mov ecx, dword ptr [eax + 8] */ 9002 PUSH32(esp, ecx); /* 0x31004785: push ecx */ 9003 RECOMP_ICALL(0x31046858u); /* 0x31004786: call 0x31046858 */ /* not lifted */ 9004 RECOMP_FLAGS_IN(); 9005 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 9006 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9007 esp = esp + 4; /* 0x3100478B: add esp, 4 */ 9008 _flag_k = FK_ADD; 9009 L_3100478E: 9010 edx = MEM32(esi); /* 0x3100478E: mov edx, dword ptr [esi] */ 9011 PUSH32(esp, edx); /* 0x31004790: push edx */ 9012 RECOMP_ICALL(0x31046858u); /* 0x31004791: call 0x31046858 */ /* not lifted */ 9013 RECOMP_FLAGS_IN(); 9014 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 9015 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9016 esp = esp + 4; /* 0x31004796: add esp, 4 */ 9017 _flag_k = FK_ADD; 9018 L_31004799: 9019 esi = POP32_VAL(esp); /* 0x31004799: pop esi */ 9020 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100479A: ret */ 9021 RECOMP_REGS_OUT(); 9022 } 9023 9024 void sub_310047A0(void) { 9025 int _fpu_cmp = 0; 9026 uint32_t _cf = 0; 9027 int _df = 1; 9028 uint32_t _flag_k = FK_NONE; 9029 uint32_t _flag_a = 0, _flag_b = 0; 9030 uint32_t _itail_tgt = 0; 9031 RECOMP_REGS_LOCALS 9032 RECOMP_ENTER(0x310047A0u); 9033 9034 L_310047A0: 9035 RECOMP_ICALL(0x310047B0u); /* 0x310047A0: call 0x310047b0 */ /* not lifted */ 9036 RECOMP_FLAGS_IN(); 9037 goto L_310047C0; /* 0x310047A5: jmp 0x310047c0 */ 9038 L_310047C0: 9039 PUSH32(esp, 0x310047D0u); /* 0x310047C0: push 0x310047d0 */ 9040 RECOMP_ICALL(0x310468C8u); /* 0x310047C5: call 0x310468c8 */ /* not lifted */ 9041 RECOMP_FLAGS_IN(); 9042 ecx = POP32_VAL(esp); /* 0x310047CA: pop ecx */ 9043 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310047CB: ret */ 9044 RECOMP_REGS_OUT(); 9045 } 9046 9047 void sub_310047B0(void) { 9048 int _fpu_cmp = 0; 9049 uint32_t _cf = 0; 9050 int _df = 1; 9051 uint32_t _flag_k = FK_NONE; 9052 uint32_t _flag_a = 0, _flag_b = 0; 9053 uint32_t _itail_tgt = 0; 9054 RECOMP_REGS_LOCALS 9055 RECOMP_ENTER(0x310047B0u); 9056 9057 L_310047B0: 9058 ecx = 0x31057D91u; /* 0x310047B0: mov ecx, 0x31057d91 */ 9059 L_310047B5: 9060 { _itail_tgt = (uint32_t)(MEM32(0x31048108)); goto _ljump; } 9061 { RECOMP_REGS_OUT(); return; } /* end of function */ 9062 _ljump: 9063 switch (_itail_tgt) { 9064 case 0x310047B0u: goto L_310047B0; 9065 case 0x310047B5u: goto L_310047B5; 9066 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 9067 } 9068 RECOMP_REGS_OUT(); 9069 } 9070 9071 void sub_310047C0(void) { 9072 int _fpu_cmp = 0; 9073 uint32_t _cf = 0; 9074 int _df = 1; 9075 uint32_t _flag_k = FK_NONE; 9076 uint32_t _flag_a = 0, _flag_b = 0; 9077 uint32_t _itail_tgt = 0; 9078 RECOMP_REGS_LOCALS 9079 RECOMP_ENTER(0x310047C0u); 9080 9081 L_310047C0: 9082 PUSH32(esp, 0x310047D0u); /* 0x310047C0: push 0x310047d0 */ 9083 RECOMP_ICALL(0x310468C8u); /* 0x310047C5: call 0x310468c8 */ /* not lifted */ 9084 RECOMP_FLAGS_IN(); 9085 ecx = POP32_VAL(esp); /* 0x310047CA: pop ecx */ 9086 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310047CB: ret */ 9087 RECOMP_REGS_OUT(); 9088 } 9089 9090 void sub_310047D0(void) { 9091 int _fpu_cmp = 0; 9092 uint32_t _cf = 0; 9093 int _df = 1; 9094 uint32_t _flag_k = FK_NONE; 9095 uint32_t _flag_a = 0, _flag_b = 0; 9096 uint32_t _itail_tgt = 0; 9097 RECOMP_REGS_LOCALS 9098 RECOMP_ENTER(0x310047D0u); 9099 9100 L_310047D0: 9101 ecx = 0x31057D91u; /* 0x310047D0: mov ecx, 0x31057d91 */ 9102 L_310047D5: 9103 { _itail_tgt = (uint32_t)(MEM32(0x3104807C)); goto _ljump; } 9104 { RECOMP_REGS_OUT(); return; } /* end of function */ 9105 _ljump: 9106 switch (_itail_tgt) { 9107 case 0x310047D0u: goto L_310047D0; 9108 case 0x310047D5u: goto L_310047D5; 9109 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 9110 } 9111 RECOMP_REGS_OUT(); 9112 } 9113 9114 void sub_310047E0(void) { 9115 int _fpu_cmp = 0; 9116 uint32_t _cf = 0; 9117 int _df = 1; 9118 uint32_t _flag_k = FK_NONE; 9119 uint32_t _flag_a = 0, _flag_b = 0; 9120 uint32_t _itail_tgt = 0; 9121 RECOMP_REGS_LOCALS 9122 RECOMP_ENTER(0x310047E0u); 9123 9124 L_310047E0: 9125 RECOMP_ICALL(0x310047F0u); /* 0x310047E0: call 0x310047f0 */ /* not lifted */ 9126 RECOMP_FLAGS_IN(); 9127 goto L_31004800; /* 0x310047E5: jmp 0x31004800 */ 9128 L_31004800: 9129 PUSH32(esp, 0x31004810u); /* 0x31004800: push 0x31004810 */ 9130 RECOMP_ICALL(0x310468C8u); /* 0x31004805: call 0x310468c8 */ /* not lifted */ 9131 RECOMP_FLAGS_IN(); 9132 ecx = POP32_VAL(esp); /* 0x3100480A: pop ecx */ 9133 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100480B: ret */ 9134 RECOMP_REGS_OUT(); 9135 } 9136 9137 void sub_310047F0(void) { 9138 int _fpu_cmp = 0; 9139 uint32_t _cf = 0; 9140 int _df = 1; 9141 uint32_t _flag_k = FK_NONE; 9142 uint32_t _flag_a = 0, _flag_b = 0; 9143 uint32_t _itail_tgt = 0; 9144 RECOMP_REGS_LOCALS 9145 RECOMP_ENTER(0x310047F0u); 9146 9147 L_310047F0: 9148 ecx = 0x31057D90u; /* 0x310047F0: mov ecx, 0x31057d90 */ 9149 L_310047F5: 9150 { _itail_tgt = (uint32_t)(MEM32(0x31048104)); goto _ljump; } 9151 { RECOMP_REGS_OUT(); return; } /* end of function */ 9152 _ljump: 9153 switch (_itail_tgt) { 9154 case 0x310047F0u: goto L_310047F0; 9155 case 0x310047F5u: goto L_310047F5; 9156 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 9157 } 9158 RECOMP_REGS_OUT(); 9159 } 9160 9161 void sub_31004800(void) { 9162 int _fpu_cmp = 0; 9163 uint32_t _cf = 0; 9164 int _df = 1; 9165 uint32_t _flag_k = FK_NONE; 9166 uint32_t _flag_a = 0, _flag_b = 0; 9167 uint32_t _itail_tgt = 0; 9168 RECOMP_REGS_LOCALS 9169 RECOMP_ENTER(0x31004800u); 9170 9171 L_31004800: 9172 PUSH32(esp, 0x31004810u); /* 0x31004800: push 0x31004810 */ 9173 RECOMP_ICALL(0x310468C8u); /* 0x31004805: call 0x310468c8 */ /* not lifted */ 9174 RECOMP_FLAGS_IN(); 9175 ecx = POP32_VAL(esp); /* 0x3100480A: pop ecx */ 9176 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100480B: ret */ 9177 RECOMP_REGS_OUT(); 9178 } 9179 9180 void sub_31004810(void) { 9181 int _fpu_cmp = 0; 9182 uint32_t _cf = 0; 9183 int _df = 1; 9184 uint32_t _flag_k = FK_NONE; 9185 uint32_t _flag_a = 0, _flag_b = 0; 9186 uint32_t _itail_tgt = 0; 9187 RECOMP_REGS_LOCALS 9188 RECOMP_ENTER(0x31004810u); 9189 9190 L_31004810: 9191 ecx = 0x31057D90u; /* 0x31004810: mov ecx, 0x31057d90 */ 9192 L_31004815: 9193 { _itail_tgt = (uint32_t)(MEM32(0x31048080)); goto _ljump; } 9194 { RECOMP_REGS_OUT(); return; } /* end of function */ 9195 _ljump: 9196 switch (_itail_tgt) { 9197 case 0x31004810u: goto L_31004810; 9198 case 0x31004815u: goto L_31004815; 9199 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 9200 } 9201 RECOMP_REGS_OUT(); 9202 } 9203 9204 void sub_31004820(void) { 9205 int _fpu_cmp = 0; 9206 uint32_t _cf = 0; 9207 int _df = 1; 9208 uint32_t _flag_k = FK_NONE; 9209 uint32_t _flag_a = 0, _flag_b = 0; 9210 uint32_t _itail_tgt = 0; 9211 RECOMP_REGS_LOCALS 9212 RECOMP_ENTER(0x31004820u); 9213 9214 L_31004820: 9215 goto L_31004830; /* 0x31004820: jmp 0x31004830 */ 9216 L_31004830: 9217 MEM32(0x31057D8C) = 0x31051998u; /* 0x31004830: mov dword ptr [0x31057d8c], 0x31051998 */ 9218 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100483A: ret */ 9219 RECOMP_REGS_OUT(); 9220 } 9221 9222 void sub_31004830(void) { 9223 int _fpu_cmp = 0; 9224 uint32_t _cf = 0; 9225 int _df = 1; 9226 uint32_t _flag_k = FK_NONE; 9227 uint32_t _flag_a = 0, _flag_b = 0; 9228 uint32_t _itail_tgt = 0; 9229 RECOMP_REGS_LOCALS 9230 RECOMP_ENTER(0x31004830u); 9231 9232 L_31004830: 9233 MEM32(0x31057D8C) = 0x31051998u; /* 0x31004830: mov dword ptr [0x31057d8c], 0x31051998 */ 9234 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100483A: ret */ 9235 RECOMP_REGS_OUT(); 9236 } 9237 9238 void sub_31004840(void) { 9239 int _fpu_cmp = 0; 9240 uint32_t _cf = 0; 9241 int _df = 1; 9242 uint32_t _flag_k = FK_NONE; 9243 uint32_t _flag_a = 0, _flag_b = 0; 9244 uint32_t _itail_tgt = 0; 9245 RECOMP_REGS_LOCALS 9246 RECOMP_ENTER(0x31004840u); 9247 9248 L_31004840: 9249 goto L_31004850; /* 0x31004840: jmp 0x31004850 */ 9250 L_31004850: 9251 MEM32(0x31057D98) = 0x310519E4u; /* 0x31004850: mov dword ptr [0x31057d98], 0x310519e4 */ 9252 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100485A: ret */ 9253 RECOMP_REGS_OUT(); 9254 } 9255 9256 void sub_31004850(void) { 9257 int _fpu_cmp = 0; 9258 uint32_t _cf = 0; 9259 int _df = 1; 9260 uint32_t _flag_k = FK_NONE; 9261 uint32_t _flag_a = 0, _flag_b = 0; 9262 uint32_t _itail_tgt = 0; 9263 RECOMP_REGS_LOCALS 9264 RECOMP_ENTER(0x31004850u); 9265 9266 L_31004850: 9267 MEM32(0x31057D98) = 0x310519E4u; /* 0x31004850: mov dword ptr [0x31057d98], 0x310519e4 */ 9268 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100485A: ret */ 9269 RECOMP_REGS_OUT(); 9270 } 9271 9272 void sub_31004860(void) { 9273 int _fpu_cmp = 0; 9274 uint32_t _cf = 0; 9275 int _df = 1; 9276 uint32_t _flag_k = FK_NONE; 9277 uint32_t _flag_a = 0, _flag_b = 0; 9278 uint32_t _itail_tgt = 0; 9279 RECOMP_REGS_LOCALS 9280 RECOMP_ENTER(0x31004860u); 9281 9282 L_31004860: 9283 goto L_31004870; /* 0x31004860: jmp 0x31004870 */ 9284 L_31004870: 9285 MEM32(0x31057D94) = 0x31051A20u; /* 0x31004870: mov dword ptr [0x31057d94], 0x31051a20 */ 9286 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100487A: ret */ 9287 RECOMP_REGS_OUT(); 9288 } 9289 9290 void sub_31004870(void) { 9291 int _fpu_cmp = 0; 9292 uint32_t _cf = 0; 9293 int _df = 1; 9294 uint32_t _flag_k = FK_NONE; 9295 uint32_t _flag_a = 0, _flag_b = 0; 9296 uint32_t _itail_tgt = 0; 9297 RECOMP_REGS_LOCALS 9298 RECOMP_ENTER(0x31004870u); 9299 9300 L_31004870: 9301 MEM32(0x31057D94) = 0x31051A20u; /* 0x31004870: mov dword ptr [0x31057d94], 0x31051a20 */ 9302 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100487A: ret */ 9303 RECOMP_REGS_OUT(); 9304 } 9305 9306 void sub_31004880(void) { 9307 int _fpu_cmp = 0; 9308 uint32_t _cf = 0; 9309 int _df = 1; 9310 uint32_t _flag_k = FK_NONE; 9311 uint32_t _flag_a = 0, _flag_b = 0; 9312 uint32_t _itail_tgt = 0; 9313 RECOMP_REGS_LOCALS 9314 RECOMP_ENTER(0x31004880u); 9315 9316 L_31004880: 9317 PUSH32(esp, ebp); /* 0x31004880: push ebp */ 9318 ebp = esp; /* 0x31004881: mov ebp, esp */ 9319 PUSH32(esp, ecx); /* 0x31004883: push ecx */ 9320 PUSH32(esp, esi); /* 0x31004884: push esi */ 9321 esi = ecx; /* 0x31004885: mov esi, ecx */ 9322 eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */ 9323 PUSH32(esp, eax); /* 0x3100488A: push eax */ 9324 MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */ 9325 RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */ 9326 RECOMP_FLAGS_IN(); 9327 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 9328 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9329 esp = esp + 4; /* 0x31004893: add esp, 4 */ 9330 _flag_k = FK_ADD; 9331 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9332 eax = 0; /* 0x31004896: xor eax, eax */ 9333 _cf = 0; 9334 _flag_k = FK_TEST; 9335 MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */ 9336 MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */ 9337 MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */ 9338 esi = POP32_VAL(esp); /* 0x310048A1: pop esi */ 9339 esp = ebp; /* 0x310048A2: mov esp, ebp */ 9340 ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */ 9341 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret */ 9342 RECOMP_REGS_OUT(); 9343 } 9344 9345 void sub_310048B0(void) { 9346 int _fpu_cmp = 0; 9347 uint32_t _cf = 0; 9348 int _df = 1; 9349 uint32_t _flag_k = FK_NONE; 9350 uint32_t _flag_a = 0, _flag_b = 0; 9351 uint32_t _itail_tgt = 0; 9352 RECOMP_REGS_LOCALS 9353 RECOMP_ENTER(0x310048B0u); 9354 9355 L_310048B0: 9356 PUSH32(esp, ebp); /* 0x310048B0: push ebp */ 9357 ebp = esp; /* 0x310048B1: mov ebp, esp */ 9358 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 9359 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9360 esp = esp - 0xCu; /* 0x310048B3: sub esp, 0xc */ 9361 _flag_k = FK_CMP; 9362 PUSH32(esp, ebx); /* 0x310048B6: push ebx */ 9363 ebx = ecx; /* 0x310048B7: mov ebx, ecx */ 9364 eax = MEM32(ebx + 0x8); /* 0x310048B9: mov eax, dword ptr [ebx + 8] */ 9365 ecx = MEM32(ebx + 0xC); /* 0x310048BC: mov ecx, dword ptr [ebx + 0xc] */ 9366 PUSH32(esp, esi); /* 0x310048BF: push esi */ 9367 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 9368 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9369 ecx = ecx - eax; /* 0x310048C0: sub ecx, eax */ 9370 _flag_k = FK_CMP; 9371 PUSH32(esp, edi); /* 0x310048C2: push edi */ 9372 edi = MEM32(ebp + 0xC); /* 0x310048C3: mov edi, dword ptr [ebp + 0xc] */ 9373 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x310048C6: sar ecx, 2 */ 9374 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9375 ecx = (uint32_t)((int32_t)ecx >> 2u); 9376 /* cmp ecx, edi */ /* 0x310048C9: cmp ecx, edi */ 9377 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 9378 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9379 _flag_k = FK_CMP; 9380 MEM32(ebp + (-0x4)) = ebx; /* 0x310048CB: mov dword ptr [ebp - 4], ebx */ 9381 if (CMP_AE(_flag_a, _flag_b)) goto L_310049D5; /* 0x310048CE: jae 0x310049d5 */ 9382 L_310048D4: 9383 edx = MEM32(ebx + 0x4); /* 0x310048D4: mov edx, dword ptr [ebx + 4] */ 9384 /* test edx, edx */ /* 0x310048D7: test edx, edx */ 9385 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 9386 _cf = 0; 9387 _flag_k = FK_TEST; 9388 if (TEST_Z(_flag_a, _flag_b)) goto L_310048E6; /* 0x310048D9: je 0x310048e6 */ 9389 L_310048DB: 9390 ecx = eax; /* 0x310048DB: mov ecx, eax */ 9391 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 9392 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9393 ecx = ecx - edx; /* 0x310048DD: sub ecx, edx */ 9394 _flag_k = FK_CMP; 9395 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x310048DF: sar ecx, 2 */ 9396 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9397 ecx = (uint32_t)((int32_t)ecx >> 2u); 9398 /* cmp edi, ecx */ /* 0x310048E2: cmp edi, ecx */ 9399 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx); 9400 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9401 _flag_k = FK_CMP; 9402 if (CMP_B(_flag_a, _flag_b)) goto L_310048E8; /* 0x310048E4: jb 0x310048e8 */ 9403 L_310048E6: 9404 ecx = edi; /* 0x310048E6: mov ecx, edi */ 9405 L_310048E8: 9406 /* test edx, edx */ /* 0x310048E8: test edx, edx */ 9407 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 9408 _cf = 0; 9409 _flag_k = FK_TEST; 9410 if (TEST_NZ(_flag_a, _flag_b)) goto L_310048F0; /* 0x310048EA: jne 0x310048f0 */ 9411 L_310048EC: 9412 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9413 eax = 0; /* 0x310048EC: xor eax, eax */ 9414 _cf = 0; 9415 _flag_k = FK_TEST; 9416 goto L_310048F5; /* 0x310048EE: jmp 0x310048f5 */ 9417 L_310048F0: 9418 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 9419 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9420 eax = eax - edx; /* 0x310048F0: sub eax, edx */ 9421 _flag_k = FK_CMP; 9422 if (2u) _cf = (((eax) >> 1) & 1u); /* 0x310048F2: sar eax, 2 */ 9423 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9424 eax = (uint32_t)((int32_t)eax >> 2u); 9425 L_310048F5: 9426 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 9427 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9428 eax = eax + ecx; /* 0x310048F5: add eax, ecx */ 9429 _flag_k = FK_ADD; 9430 /* test eax, eax */ /* 0x310048F7: test eax, eax */ 9431 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 9432 _cf = 0; 9433 _flag_k = FK_TEST; 9434 MEM32(ebp + (-0xC)) = eax; /* 0x310048F9: mov dword ptr [ebp - 0xc], eax */ 9435 if (TEST_NS(_flag_a, _flag_b)) goto L_31004900; /* 0x310048FC: jge 0x31004900 */ 9436 L_310048FE: 9437 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9438 eax = 0; /* 0x310048FE: xor eax, eax */ 9439 _cf = 0; 9440 _flag_k = FK_TEST; 9441 L_31004900: 9442 edx = eax * 4; /* 0x31004900: lea edx, [eax*4] */ 9443 PUSH32(esp, edx); /* 0x31004907: push edx */ 9444 RECOMP_ICALL(0x310468DAu); /* 0x31004908: call 0x310468da */ /* not lifted */ 9445 RECOMP_FLAGS_IN(); 9446 MEM32(ebp + (-0x8)) = eax; /* 0x3100490D: mov dword ptr [ebp - 8], eax */ 9447 ecx = eax; /* 0x31004910: mov ecx, eax */ 9448 eax = MEM32(ebx + 0x4); /* 0x31004912: mov eax, dword ptr [ebx + 4] */ 9449 ebx = MEM32(ebp + 0x8); /* 0x31004915: mov ebx, dword ptr [ebp + 8] */ 9450 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 9451 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9452 esp = esp + 4; /* 0x31004918: add esp, 4 */ 9453 _flag_k = FK_ADD; 9454 /* cmp eax, ebx */ /* 0x3100491B: cmp eax, ebx */ 9455 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 9456 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9457 _flag_k = FK_CMP; 9458 if (CMP_EQ(_flag_a, _flag_b)) goto L_31004931; /* 0x3100491D: je 0x31004931 */ 9459 L_3100491F: 9460 /* test ecx, ecx */ /* 0x3100491F: test ecx, ecx */ 9461 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 9462 _cf = 0; 9463 _flag_k = FK_TEST; 9464 if (TEST_Z(_flag_a, _flag_b)) goto L_31004927; /* 0x31004921: je 0x31004927 */ 9465 L_31004923: 9466 edx = MEM32(eax); /* 0x31004923: mov edx, dword ptr [eax] */ 9467 MEM32(ecx) = edx; /* 0x31004925: mov dword ptr [ecx], edx */ 9468 L_31004927: 9469 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 9470 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9471 eax = eax + 4; /* 0x31004927: add eax, 4 */ 9472 _flag_k = FK_ADD; 9473 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 9474 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9475 ecx = ecx + 4; /* 0x3100492A: add ecx, 4 */ 9476 _flag_k = FK_ADD; 9477 /* cmp eax, ebx */ /* 0x3100492D: cmp eax, ebx */ 9478 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 9479 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9480 _flag_k = FK_CMP; 9481 RECOMP_BACKEDGE(); 9482 if (CMP_NE(_flag_a, _flag_b)) goto L_3100491F; /* 0x3100492F: jne 0x3100491f */ 9483 L_31004931: 9484 /* test edi, edi */ /* 0x31004931: test edi, edi */ 9485 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 9486 _cf = 0; 9487 _flag_k = FK_TEST; 9488 eax = ecx; /* 0x31004933: mov eax, ecx */ 9489 if (TEST_Z(_flag_a, _flag_b)) goto L_3100494A; /* 0x31004935: jbe 0x3100494a */ 9490 L_31004937: 9491 edx = edi; /* 0x31004937: mov edx, edi */ 9492 L_31004939: 9493 /* test eax, eax */ /* 0x31004939: test eax, eax */ 9494 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 9495 _cf = 0; 9496 _flag_k = FK_TEST; 9497 if (TEST_Z(_flag_a, _flag_b)) goto L_31004944; /* 0x3100493B: je 0x31004944 */ 9498 L_3100493D: 9499 esi = MEM32(ebp + 0x10); /* 0x3100493D: mov esi, dword ptr [ebp + 0x10] */ 9500 esi = MEM32(esi); /* 0x31004940: mov esi, dword ptr [esi] */ 9501 MEM32(eax) = esi; /* 0x31004942: mov dword ptr [eax], esi */ 9502 L_31004944: 9503 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 9504 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9505 eax = eax + 4; /* 0x31004944: add eax, 4 */ 9506 _flag_k = FK_ADD; 9507 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1); 9508 edx = edx - 1; /* 0x31004947: dec edx */ 9509 _flag_k = FK_DEC; 9510 RECOMP_BACKEDGE(); 9511 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_31004939; /* 0x31004948: jne 0x31004939 */ 9512 L_3100494A: 9513 eax = MEM32(ebp + (-0x4)); /* 0x3100494A: mov eax, dword ptr [ebp - 4] */ 9514 esi = edi * 4; /* 0x3100494D: lea esi, [edi*4] */ 9515 edi = MEM32(eax + 0x8); /* 0x31004954: mov edi, dword ptr [eax + 8] */ 9516 /* cmp ebx, edi */ /* 0x31004957: cmp ebx, edi */ 9517 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edi); 9518 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9519 _flag_k = FK_CMP; 9520 edx = esi + ecx; /* 0x31004959: lea edx, [esi + ecx] */ 9521 if (CMP_EQ(_flag_a, _flag_b)) goto L_31004978; /* 0x3100495C: je 0x31004978 */ 9522 L_3100495E: 9523 eax = edx; /* 0x3100495E: mov eax, edx */ 9524 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 9525 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9526 eax = eax - esi; /* 0x31004960: sub eax, esi */ 9527 _flag_k = FK_CMP; 9528 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 9529 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9530 eax = eax - ecx; /* 0x31004962: sub eax, ecx */ 9531 _flag_k = FK_CMP; 9532 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 9533 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9534 eax = eax + ebx; /* 0x31004964: add eax, ebx */ 9535 _flag_k = FK_ADD; 9536 L_31004966: 9537 /* test edx, edx */ /* 0x31004966: test edx, edx */ 9538 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 9539 _cf = 0; 9540 _flag_k = FK_TEST; 9541 if (TEST_Z(_flag_a, _flag_b)) goto L_3100496E; /* 0x31004968: je 0x3100496e */ 9542 L_3100496A: 9543 ecx = MEM32(eax); /* 0x3100496A: mov ecx, dword ptr [eax] */ 9544 MEM32(edx) = ecx; /* 0x3100496C: mov dword ptr [edx], ecx */ 9545 L_3100496E: 9546 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 9547 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9548 eax = eax + 4; /* 0x3100496E: add eax, 4 */ 9549 _flag_k = FK_ADD; 9550 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4); 9551 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9552 edx = edx + 4; /* 0x31004971: add edx, 4 */ 9553 _flag_k = FK_ADD; 9554 /* cmp eax, edi */ /* 0x31004974: cmp eax, edi */ 9555 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 9556 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9557 _flag_k = FK_CMP; 9558 RECOMP_BACKEDGE(); 9559 if (CMP_NE(_flag_a, _flag_b)) goto L_31004966; /* 0x31004976: jne 0x31004966 */ 9560 L_31004978: 9561 esi = MEM32(ebp + (-0x4)); /* 0x31004978: mov esi, dword ptr [ebp - 4] */ 9562 eax = MEM32(esi + 0x4); /* 0x3100497B: mov eax, dword ptr [esi + 4] */ 9563 PUSH32(esp, eax); /* 0x3100497E: push eax */ 9564 MEM32(ebp + 0x10) = eax; /* 0x3100497F: mov dword ptr [ebp + 0x10], eax */ 9565 RECOMP_ICALL(0x31046858u); /* 0x31004982: call 0x31046858 */ /* not lifted */ 9566 RECOMP_FLAGS_IN(); 9567 edx = MEM32(ebp + (-0x8)); /* 0x31004987: mov edx, dword ptr [ebp - 8] */ 9568 eax = MEM32(ebp + (-0xC)); /* 0x3100498A: mov eax, dword ptr [ebp - 0xc] */ 9569 ecx = edx + eax * 4; /* 0x3100498D: lea ecx, [edx + eax*4] */ 9570 MEM32(esi + 0xC) = ecx; /* 0x31004990: mov dword ptr [esi + 0xc], ecx */ 9571 ecx = MEM32(esi + 0x4); /* 0x31004993: mov ecx, dword ptr [esi + 4] */ 9572 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 9573 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9574 esp = esp + 4; /* 0x31004996: add esp, 4 */ 9575 _flag_k = FK_ADD; 9576 /* test ecx, ecx */ /* 0x31004999: test ecx, ecx */ 9577 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 9578 _cf = 0; 9579 _flag_k = FK_TEST; 9580 if (TEST_NZ(_flag_a, _flag_b)) goto L_310049B6; /* 0x3100499B: jne 0x310049b6 */ 9581 L_3100499D: 9582 ecx = MEM32(ebp + 0xC); /* 0x3100499D: mov ecx, dword ptr [ebp + 0xc] */ 9583 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9584 eax = 0; /* 0x310049A0: xor eax, eax */ 9585 _cf = 0; 9586 _flag_k = FK_TEST; 9587 eax = ecx; /* 0x310049A2: mov eax, ecx */ 9588 eax = edx + eax * 4; /* 0x310049A4: lea eax, [edx + eax*4] */ 9589 edi = POP32_VAL(esp); /* 0x310049A7: pop edi */ 9590 MEM32(esi + 0x8) = eax; /* 0x310049A8: mov dword ptr [esi + 8], eax */ 9591 MEM32(esi + 0x4) = edx; /* 0x310049AB: mov dword ptr [esi + 4], edx */ 9592 esi = POP32_VAL(esp); /* 0x310049AE: pop esi */ 9593 ebx = POP32_VAL(esp); /* 0x310049AF: pop ebx */ 9594 esp = ebp; /* 0x310049B0: mov esp, ebp */ 9595 ebp = POP32_VAL(esp); /* 0x310049B2: pop ebp */ 9596 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x310049B3: ret 0xc */ 9597 L_310049B6: 9598 eax = MEM32(esi + 0x8); /* 0x310049B6: mov eax, dword ptr [esi + 8] */ 9599 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 9600 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9601 eax = eax - ecx; /* 0x310049B9: sub eax, ecx */ 9602 _flag_k = FK_CMP; 9603 ecx = MEM32(ebp + 0xC); /* 0x310049BB: mov ecx, dword ptr [ebp + 0xc] */ 9604 if (2u) _cf = (((eax) >> 1) & 1u); /* 0x310049BE: sar eax, 2 */ 9605 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9606 eax = (uint32_t)((int32_t)eax >> 2u); 9607 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 9608 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9609 eax = eax + ecx; /* 0x310049C1: add eax, ecx */ 9610 _flag_k = FK_ADD; 9611 eax = edx + eax * 4; /* 0x310049C3: lea eax, [edx + eax*4] */ 9612 edi = POP32_VAL(esp); /* 0x310049C6: pop edi */ 9613 MEM32(esi + 0x8) = eax; /* 0x310049C7: mov dword ptr [esi + 8], eax */ 9614 MEM32(esi + 0x4) = edx; /* 0x310049CA: mov dword ptr [esi + 4], edx */ 9615 esi = POP32_VAL(esp); /* 0x310049CD: pop esi */ 9616 ebx = POP32_VAL(esp); /* 0x310049CE: pop ebx */ 9617 esp = ebp; /* 0x310049CF: mov esp, ebp */ 9618 ebp = POP32_VAL(esp); /* 0x310049D1: pop ebp */ 9619 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x310049D2: ret 0xc */ 9620 L_310049D5: 9621 edx = MEM32(ebp + 0x8); /* 0x310049D5: mov edx, dword ptr [ebp + 8] */ 9622 ecx = eax; /* 0x310049D8: mov ecx, eax */ 9623 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 9624 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9625 ecx = ecx - edx; /* 0x310049DA: sub ecx, edx */ 9626 _flag_k = FK_CMP; 9627 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x310049DC: sar ecx, 2 */ 9628 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9629 ecx = (uint32_t)((int32_t)ecx >> 2u); 9630 /* cmp ecx, edi */ /* 0x310049DF: cmp ecx, edi */ 9631 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 9632 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9633 _flag_k = FK_CMP; 9634 if (CMP_AE(_flag_a, _flag_b)) goto L_31004A56; /* 0x310049E1: jae 0x31004a56 */ 9635 L_310049E3: 9636 esi = edi * 4; /* 0x310049E3: lea esi, [edi*4] */ 9637 MEM32(ebp + 0xC) = esi; /* 0x310049EA: mov dword ptr [ebp + 0xc], esi */ 9638 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx); 9639 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9640 esi = esi + edx; /* 0x310049ED: add esi, edx */ 9641 _flag_k = FK_ADD; 9642 /* cmp edx, eax */ /* 0x310049EF: cmp edx, eax */ 9643 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 9644 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9645 _flag_k = FK_CMP; 9646 if (CMP_EQ(_flag_a, _flag_b)) goto L_31004A0F; /* 0x310049F1: je 0x31004a0f */ 9647 L_310049F3: 9648 ebx = MEM32(ebp + 0xC); /* 0x310049F3: mov ebx, dword ptr [ebp + 0xc] */ 9649 ecx = esi; /* 0x310049F6: mov ecx, esi */ 9650 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx); 9651 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9652 ecx = ecx - ebx; /* 0x310049F8: sub ecx, ebx */ 9653 _flag_k = FK_CMP; 9654 L_310049FA: 9655 /* test esi, esi */ /* 0x310049FA: test esi, esi */ 9656 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 9657 _cf = 0; 9658 _flag_k = FK_TEST; 9659 if (TEST_Z(_flag_a, _flag_b)) goto L_31004A02; /* 0x310049FC: je 0x31004a02 */ 9660 L_310049FE: 9661 ebx = MEM32(ecx); /* 0x310049FE: mov ebx, dword ptr [ecx] */ 9662 MEM32(esi) = ebx; /* 0x31004A00: mov dword ptr [esi], ebx */ 9663 L_31004A02: 9664 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 9665 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9666 ecx = ecx + 4; /* 0x31004A02: add ecx, 4 */ 9667 _flag_k = FK_ADD; 9668 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 9669 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9670 esi = esi + 4; /* 0x31004A05: add esi, 4 */ 9671 _flag_k = FK_ADD; 9672 /* cmp ecx, eax */ /* 0x31004A08: cmp ecx, eax */ 9673 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 9674 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9675 _flag_k = FK_CMP; 9676 RECOMP_BACKEDGE(); 9677 if (CMP_NE(_flag_a, _flag_b)) goto L_310049FA; /* 0x31004A0A: jne 0x310049fa */ 9678 L_31004A0C: 9679 ebx = MEM32(ebp + (-0x4)); /* 0x31004A0C: mov ebx, dword ptr [ebp - 4] */ 9680 L_31004A0F: 9681 eax = MEM32(ebx + 0x8); /* 0x31004A0F: mov eax, dword ptr [ebx + 8] */ 9682 esi = MEM32(ebp + 0x10); /* 0x31004A12: mov esi, dword ptr [ebp + 0x10] */ 9683 ecx = eax; /* 0x31004A15: mov ecx, eax */ 9684 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 9685 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9686 ecx = ecx - edx; /* 0x31004A17: sub ecx, edx */ 9687 _flag_k = FK_CMP; 9688 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x31004A19: sar ecx, 2 */ 9689 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9690 ecx = (uint32_t)((int32_t)ecx >> 2u); 9691 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx); 9692 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9693 edi = edi - ecx; /* 0x31004A1C: sub edi, ecx */ 9694 _flag_k = FK_CMP; 9695 if (/* sub result */ CMP_EQ(_flag_a, _flag_b)) goto L_31004A2E; /* 0x31004A1E: je 0x31004a2e */ 9696 L_31004A20: 9697 /* test eax, eax */ /* 0x31004A20: test eax, eax */ 9698 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 9699 _cf = 0; 9700 _flag_k = FK_TEST; 9701 if (TEST_Z(_flag_a, _flag_b)) goto L_31004A28; /* 0x31004A22: je 0x31004a28 */ 9702 L_31004A24: 9703 ecx = MEM32(esi); /* 0x31004A24: mov ecx, dword ptr [esi] */ 9704 MEM32(eax) = ecx; /* 0x31004A26: mov dword ptr [eax], ecx */ 9705 L_31004A28: 9706 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 9707 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9708 eax = eax + 4; /* 0x31004A28: add eax, 4 */ 9709 _flag_k = FK_ADD; 9710 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1); 9711 edi = edi - 1; /* 0x31004A2B: dec edi */ 9712 _flag_k = FK_DEC; 9713 RECOMP_BACKEDGE(); 9714 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_31004A20; /* 0x31004A2C: jne 0x31004a20 */ 9715 L_31004A2E: 9716 ecx = MEM32(ebx + 0x8); /* 0x31004A2E: mov ecx, dword ptr [ebx + 8] */ 9717 /* cmp edx, ecx */ /* 0x31004A31: cmp edx, ecx */ 9718 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx); 9719 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9720 _flag_k = FK_CMP; 9721 eax = edx; /* 0x31004A33: mov eax, edx */ 9722 if (CMP_EQ(_flag_a, _flag_b)) goto L_31004A42; /* 0x31004A35: je 0x31004a42 */ 9723 L_31004A37: 9724 edx = MEM32(esi); /* 0x31004A37: mov edx, dword ptr [esi] */ 9725 MEM32(eax) = edx; /* 0x31004A39: mov dword ptr [eax], edx */ 9726 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 9727 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9728 eax = eax + 4; /* 0x31004A3B: add eax, 4 */ 9729 _flag_k = FK_ADD; 9730 /* cmp eax, ecx */ /* 0x31004A3E: cmp eax, ecx */ 9731 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 9732 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9733 _flag_k = FK_CMP; 9734 RECOMP_BACKEDGE(); 9735 if (CMP_NE(_flag_a, _flag_b)) goto L_31004A37; /* 0x31004A40: jne 0x31004a37 */ 9736 L_31004A42: 9737 ecx = MEM32(ebx + 0x8); /* 0x31004A42: mov ecx, dword ptr [ebx + 8] */ 9738 eax = MEM32(ebp + 0xC); /* 0x31004A45: mov eax, dword ptr [ebp + 0xc] */ 9739 edi = POP32_VAL(esp); /* 0x31004A48: pop edi */ 9740 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 9741 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9742 ecx = ecx + eax; /* 0x31004A49: add ecx, eax */ 9743 _flag_k = FK_ADD; 9744 esi = POP32_VAL(esp); /* 0x31004A4B: pop esi */ 9745 MEM32(ebx + 0x8) = ecx; /* 0x31004A4C: mov dword ptr [ebx + 8], ecx */ 9746 ebx = POP32_VAL(esp); /* 0x31004A4F: pop ebx */ 9747 esp = ebp; /* 0x31004A50: mov esp, ebp */ 9748 ebp = POP32_VAL(esp); /* 0x31004A52: pop ebp */ 9749 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31004A53: ret 0xc */ 9750 L_31004A56: 9751 /* test edi, edi */ /* 0x31004A56: test edi, edi */ 9752 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 9753 _cf = 0; 9754 _flag_k = FK_TEST; 9755 if (TEST_Z(_flag_a, _flag_b)) goto L_31004AB0; /* 0x31004A58: jbe 0x31004ab0 */ 9756 L_31004A5A: 9757 if (2u) _cf = (((edi) >> 30) & 1u); /* 0x31004A5A: shl edi, 2 */ 9758 if (2u) { _flag_a = recomp_flags_pack((edi << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9759 edi = edi << 2u; /* 0x31004A5A: shl edi, 2 */ 9760 ecx = eax; /* 0x31004A5D: mov ecx, eax */ 9761 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 9762 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9763 ecx = ecx - edi; /* 0x31004A5F: sub ecx, edi */ 9764 _flag_k = FK_CMP; 9765 /* cmp ecx, eax */ /* 0x31004A61: cmp ecx, eax */ 9766 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 9767 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9768 _flag_k = FK_CMP; 9769 esi = eax; /* 0x31004A63: mov esi, eax */ 9770 if (CMP_EQ(_flag_a, _flag_b)) goto L_31004A7C; /* 0x31004A65: je 0x31004a7c */ 9771 L_31004A67: 9772 /* test esi, esi */ /* 0x31004A67: test esi, esi */ 9773 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 9774 _cf = 0; 9775 _flag_k = FK_TEST; 9776 if (TEST_Z(_flag_a, _flag_b)) goto L_31004A72; /* 0x31004A69: je 0x31004a72 */ 9777 L_31004A6B: 9778 ebx = MEM32(ecx); /* 0x31004A6B: mov ebx, dword ptr [ecx] */ 9779 MEM32(esi) = ebx; /* 0x31004A6D: mov dword ptr [esi], ebx */ 9780 ebx = MEM32(ebp + (-0x4)); /* 0x31004A6F: mov ebx, dword ptr [ebp - 4] */ 9781 L_31004A72: 9782 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 9783 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9784 ecx = ecx + 4; /* 0x31004A72: add ecx, 4 */ 9785 _flag_k = FK_ADD; 9786 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 9787 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9788 esi = esi + 4; /* 0x31004A75: add esi, 4 */ 9789 _flag_k = FK_ADD; 9790 /* cmp ecx, eax */ /* 0x31004A78: cmp ecx, eax */ 9791 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 9792 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9793 _flag_k = FK_CMP; 9794 RECOMP_BACKEDGE(); 9795 if (CMP_NE(_flag_a, _flag_b)) goto L_31004A67; /* 0x31004A7A: jne 0x31004a67 */ 9796 L_31004A7C: 9797 ecx = MEM32(ebx + 0x8); /* 0x31004A7C: mov ecx, dword ptr [ebx + 8] */ 9798 eax = ecx; /* 0x31004A7F: mov eax, ecx */ 9799 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 9800 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9801 eax = eax - edi; /* 0x31004A81: sub eax, edi */ 9802 _flag_k = FK_CMP; 9803 /* cmp edx, eax */ /* 0x31004A83: cmp edx, eax */ 9804 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 9805 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9806 _flag_k = FK_CMP; 9807 if (CMP_EQ(_flag_a, _flag_b)) goto L_31004A96; /* 0x31004A85: je 0x31004a96 */ 9808 L_31004A87: 9809 esi = MEM32(eax + (-0x4)); /* 0x31004A87: mov esi, dword ptr [eax - 4] */ 9810 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 9811 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9812 eax = eax - 4; /* 0x31004A8A: sub eax, 4 */ 9813 _flag_k = FK_CMP; 9814 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 9815 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9816 ecx = ecx - 4; /* 0x31004A8D: sub ecx, 4 */ 9817 _flag_k = FK_CMP; 9818 /* cmp eax, edx */ /* 0x31004A90: cmp eax, edx */ 9819 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 9820 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9821 _flag_k = FK_CMP; 9822 MEM32(ecx) = esi; /* 0x31004A92: mov dword ptr [ecx], esi */ 9823 RECOMP_BACKEDGE(); 9824 if (CMP_NE(_flag_a, _flag_b)) goto L_31004A87; /* 0x31004A94: jne 0x31004a87 */ 9825 L_31004A96: 9826 ecx = edi + edx; /* 0x31004A96: lea ecx, [edi + edx] */ 9827 /* cmp edx, ecx */ /* 0x31004A99: cmp edx, ecx */ 9828 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx); 9829 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9830 _flag_k = FK_CMP; 9831 eax = edx; /* 0x31004A9B: mov eax, edx */ 9832 if (CMP_EQ(_flag_a, _flag_b)) goto L_31004AAD; /* 0x31004A9D: je 0x31004aad */ 9833 L_31004A9F: 9834 edx = MEM32(ebp + 0x10); /* 0x31004A9F: mov edx, dword ptr [ebp + 0x10] */ 9835 L_31004AA2: 9836 esi = MEM32(edx); /* 0x31004AA2: mov esi, dword ptr [edx] */ 9837 MEM32(eax) = esi; /* 0x31004AA4: mov dword ptr [eax], esi */ 9838 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 9839 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9840 eax = eax + 4; /* 0x31004AA6: add eax, 4 */ 9841 _flag_k = FK_ADD; 9842 /* cmp eax, ecx */ /* 0x31004AA9: cmp eax, ecx */ 9843 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 9844 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9845 _flag_k = FK_CMP; 9846 RECOMP_BACKEDGE(); 9847 if (CMP_NE(_flag_a, _flag_b)) goto L_31004AA2; /* 0x31004AAB: jne 0x31004aa2 */ 9848 L_31004AAD: 9849 _flag_a = (uint32_t)(MEM32(ebx + 0x8)); _flag_b = (uint32_t)(edi); 9850 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9851 MEM32(ebx + 0x8) = MEM32(ebx + 0x8) + edi; /* 0x31004AAD: add dword ptr [ebx + 8], edi */ 9852 _flag_k = FK_ADD; 9853 L_31004AB0: 9854 edi = POP32_VAL(esp); /* 0x31004AB0: pop edi */ 9855 esi = POP32_VAL(esp); /* 0x31004AB1: pop esi */ 9856 ebx = POP32_VAL(esp); /* 0x31004AB2: pop ebx */ 9857 esp = ebp; /* 0x31004AB3: mov esp, ebp */ 9858 ebp = POP32_VAL(esp); /* 0x31004AB5: pop ebp */ 9859 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31004AB6: ret 0xc */ 9860 RECOMP_REGS_OUT(); 9861 } 9862 9863 void sub_31004AC0(void) { 9864 int _fpu_cmp = 0; 9865 uint32_t _cf = 0; 9866 int _df = 1; 9867 uint32_t _flag_k = FK_NONE; 9868 uint32_t _flag_a = 0, _flag_b = 0; 9869 uint32_t _itail_tgt = 0; 9870 RECOMP_REGS_LOCALS 9871 RECOMP_ENTER(0x31004AC0u); 9872 9873 L_31004AC0: 9874 eax = ecx; /* 0x31004AC0: mov eax, ecx */ 9875 MEM32(eax) = 0x3104838Cu; /* 0x31004AC2: mov dword ptr [eax], 0x3104838c */ 9876 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31004AC8: ret 4 */ 9877 RECOMP_REGS_OUT(); 9878 }