client/game/llr.dll/lifted-0002.c (376415B)
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_380061E0(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(0x380061E0u); 17 18 L_380061E0: 19 eax = MEM32(0x3806EC04); /* 0x380061E0: mov eax, dword ptr [0x3806ec04] */ 20 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380061E5: ret */ 21 RECOMP_REGS_OUT(); 22 } 23 24 void sub_380061F0(void) { 25 int _fpu_cmp = 0; 26 uint32_t _cf = 0; 27 int _df = 1; 28 uint32_t _flag_k = FK_NONE; 29 uint32_t _flag_a = 0, _flag_b = 0; 30 uint32_t _itail_tgt = 0; 31 RECOMP_REGS_LOCALS 32 RECOMP_ENTER(0x380061F0u); 33 34 L_380061F0: 35 eax = MEM32(ecx + 0x80); /* 0x380061F0: mov eax, dword ptr [ecx + 0x80] */ 36 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380061F6: ret */ 37 RECOMP_REGS_OUT(); 38 } 39 40 void sub_38006200(void) { 41 int _fpu_cmp = 0; 42 uint32_t _cf = 0; 43 int _df = 1; 44 uint32_t _flag_k = FK_NONE; 45 uint32_t _flag_a = 0, _flag_b = 0; 46 uint32_t _itail_tgt = 0; 47 RECOMP_REGS_LOCALS 48 RECOMP_ENTER(0x38006200u); 49 50 L_38006200: 51 eax = MEM32(ecx + 0x84); /* 0x38006200: mov eax, dword ptr [ecx + 0x84] */ 52 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006206: ret */ 53 RECOMP_REGS_OUT(); 54 } 55 56 void sub_38006210(void) { 57 int _fpu_cmp = 0; 58 uint32_t _cf = 0; 59 int _df = 1; 60 uint32_t _flag_k = FK_NONE; 61 uint32_t _flag_a = 0, _flag_b = 0; 62 uint32_t _itail_tgt = 0; 63 RECOMP_REGS_LOCALS 64 RECOMP_ENTER(0x38006210u); 65 66 L_38006210: 67 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 68 eax = 0; /* 0x38006210: xor eax, eax */ 69 _cf = 0; 70 _flag_k = FK_TEST; 71 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x38006212: ret 8 */ 72 RECOMP_REGS_OUT(); 73 } 74 75 void sub_38006220(void) { 76 int _fpu_cmp = 0; 77 uint32_t _cf = 0; 78 int _df = 1; 79 uint32_t _flag_k = FK_NONE; 80 uint32_t _flag_a = 0, _flag_b = 0; 81 uint32_t _itail_tgt = 0; 82 RECOMP_REGS_LOCALS 83 RECOMP_ENTER(0x38006220u); 84 85 L_38006220: 86 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 87 eax = 0; /* 0x38006220: xor eax, eax */ 88 _cf = 0; 89 _flag_k = FK_TEST; 90 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38006222: ret 4 */ 91 RECOMP_REGS_OUT(); 92 } 93 94 void sub_38006230(void) { 95 int _fpu_cmp = 0; 96 uint32_t _cf = 0; 97 int _df = 1; 98 uint32_t _flag_k = FK_NONE; 99 uint32_t _flag_a = 0, _flag_b = 0; 100 uint32_t _itail_tgt = 0; 101 RECOMP_REGS_LOCALS 102 RECOMP_ENTER(0x38006230u); 103 104 L_38006230: 105 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x38006230: ret 0x18 */ 106 RECOMP_REGS_OUT(); 107 } 108 109 void sub_38006240(void) { 110 int _fpu_cmp = 0; 111 uint32_t _cf = 0; 112 int _df = 1; 113 uint32_t _flag_k = FK_NONE; 114 uint32_t _flag_a = 0, _flag_b = 0; 115 uint32_t _itail_tgt = 0; 116 RECOMP_REGS_LOCALS 117 RECOMP_ENTER(0x38006240u); 118 119 L_38006240: 120 eax = MEM32(ecx + 0x8); /* 0x38006240: mov eax, dword ptr [ecx + 8] */ 121 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006243: ret */ 122 RECOMP_REGS_OUT(); 123 } 124 125 void sub_38006250(void) { 126 int _fpu_cmp = 0; 127 uint32_t _cf = 0; 128 int _df = 1; 129 uint32_t _flag_k = FK_NONE; 130 uint32_t _flag_a = 0, _flag_b = 0; 131 uint32_t _itail_tgt = 0; 132 RECOMP_REGS_LOCALS 133 RECOMP_ENTER(0x38006250u); 134 135 L_38006250: 136 eax = MEM32(ecx + 0xC); /* 0x38006250: mov eax, dword ptr [ecx + 0xc] */ 137 fp_push(*(float*)&MEM32(eax + 0x1C)); /* 0x38006253: fld dword ptr [eax + 0x1c] */ 138 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006256: ret */ 139 RECOMP_REGS_OUT(); 140 } 141 142 void sub_38006260(void) { 143 int _fpu_cmp = 0; 144 uint32_t _cf = 0; 145 int _df = 1; 146 uint32_t _flag_k = FK_NONE; 147 uint32_t _flag_a = 0, _flag_b = 0; 148 uint32_t _itail_tgt = 0; 149 RECOMP_REGS_LOCALS 150 RECOMP_ENTER(0x38006260u); 151 152 L_38006260: 153 eax = MEM32(ecx + 0x10); /* 0x38006260: mov eax, dword ptr [ecx + 0x10] */ 154 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006263: ret */ 155 RECOMP_REGS_OUT(); 156 } 157 158 void sub_38006270(void) { 159 int _fpu_cmp = 0; 160 uint32_t _cf = 0; 161 int _df = 1; 162 uint32_t _flag_k = FK_NONE; 163 uint32_t _flag_a = 0, _flag_b = 0; 164 uint32_t _itail_tgt = 0; 165 RECOMP_REGS_LOCALS 166 RECOMP_ENTER(0x38006270u); 167 168 L_38006270: 169 PUSH32(esp, ebp); /* 0x38006270: push ebp */ 170 ebp = esp; /* 0x38006271: mov ebp, esp */ 171 ecx = MEM32(ebp + 0xC); /* 0x38006273: mov ecx, dword ptr [ebp + 0xc] */ 172 eax = ecx; /* 0x38006276: mov eax, ecx */ 173 if (4u) _cf = (((eax) >> 28) & 1u); /* 0x38006278: shl eax, 4 */ 174 if (4u) { _flag_a = recomp_flags_pack((eax << 4u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 175 eax = eax << 4u; /* 0x38006278: shl eax, 4 */ 176 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 177 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 178 eax = eax + ecx; /* 0x3800627B: add eax, ecx */ 179 _flag_k = FK_ADD; 180 if (5u) _cf = (((eax) >> 27) & 1u); /* 0x3800627D: shl eax, 5 */ 181 if (5u) { _flag_a = recomp_flags_pack((eax << 5u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 182 eax = eax << 5u; /* 0x3800627D: shl eax, 5 */ 183 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 184 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 185 eax = eax - ecx; /* 0x38006280: sub eax, ecx */ 186 _flag_k = FK_CMP; 187 eax = eax + eax * 8; /* 0x38006282: lea eax, [eax + eax*8] */ 188 if (4u) _cf = (((eax) >> 28) & 1u); /* 0x38006285: shl eax, 4 */ 189 if (4u) { _flag_a = recomp_flags_pack((eax << 4u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 190 eax = eax << 4u; /* 0x38006285: shl eax, 4 */ 191 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 192 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 193 eax = eax + ecx; /* 0x38006288: add eax, ecx */ 194 _flag_k = FK_ADD; 195 ecx = MEM32(ebp + 0x8); /* 0x3800628A: mov ecx, dword ptr [ebp + 8] */ 196 ecx = (uint32_t)((int32_t)ecx * (int32_t)0x00010651u); /* 0x3800628D: imul ecx, ecx, 0x10651 */ 197 _flag_a = (uint32_t)((eax ^ ecx)); _flag_b = (uint32_t)((eax ^ ecx)); 198 eax = eax ^ ecx; /* 0x38006293: xor eax, ecx */ 199 _cf = 0; 200 _flag_k = FK_TEST; 201 ebp = POP32_VAL(esp); /* 0x38006295: pop ebp */ 202 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006296: ret */ 203 RECOMP_REGS_OUT(); 204 } 205 206 void sub_380062A0(void) { 207 int _fpu_cmp = 0; 208 uint32_t _cf = 0; 209 int _df = 1; 210 uint32_t _flag_k = FK_NONE; 211 uint32_t _flag_a = 0, _flag_b = 0; 212 uint32_t _itail_tgt = 0; 213 RECOMP_REGS_LOCALS 214 RECOMP_ENTER(0x380062A0u); 215 216 L_380062A0: 217 eax = MEM32(ecx + 0xC); /* 0x380062A0: mov eax, dword ptr [ecx + 0xc] */ 218 fp_push(*(float*)&MEM32(eax + 0x8264)); /* 0x380062A3: fld dword ptr [eax + 0x8264] */ 219 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380062A9: ret */ 220 RECOMP_REGS_OUT(); 221 } 222 223 void sub_380062B0(void) { 224 int _fpu_cmp = 0; 225 uint32_t _cf = 0; 226 int _df = 1; 227 uint32_t _flag_k = FK_NONE; 228 uint32_t _flag_a = 0, _flag_b = 0; 229 uint32_t _itail_tgt = 0; 230 RECOMP_REGS_LOCALS 231 RECOMP_ENTER(0x380062B0u); 232 233 L_380062B0: 234 PUSH32(esp, ebp); /* 0x380062B0: push ebp */ 235 ebp = esp; /* 0x380062B1: mov ebp, esp */ 236 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 237 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 238 esp = esp - 8; /* 0x380062B3: sub esp, 8 */ 239 _flag_k = FK_CMP; 240 eax = MEM32(ecx + 0xC); /* 0x380062B6: mov eax, dword ptr [ecx + 0xc] */ 241 PUSH32(esp, ebx); /* 0x380062B9: push ebx */ 242 PUSH32(esp, esi); /* 0x380062BA: push esi */ 243 esi = MEM32(eax + 0x8258); /* 0x380062BB: mov esi, dword ptr [eax + 0x8258] */ 244 SET_LO8(eax, MEM8(esi + 0x29)); /* 0x380062C1: mov al, byte ptr [esi + 0x29] */ 245 MEM32(ebp + (-0x8)) = ecx; /* 0x380062C4: mov dword ptr [ebp - 8], ecx */ 246 ecx = MEM32(esi + 0x40); /* 0x380062C7: mov ecx, dword ptr [esi + 0x40] */ 247 PUSH32(esp, edi); /* 0x380062CA: push edi */ 248 /* test LO8(eax), LO8(eax) */ /* 0x380062CB: test al, al */ 249 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 250 _cf = 0; 251 _flag_k = FK_NARROW(FK_TEST, 24); 252 eax = MEM32(ebp + 0xC); /* 0x380062CD: mov eax, dword ptr [ebp + 0xc] */ 253 edi = ecx; /* 0x380062D0: mov edi, ecx */ 254 if (TEST_Z(_flag_a, _flag_b)) goto L_38006341; /* 0x380062D2: je 0x38006341 */ 255 L_380062D4: 256 edx = MEM32(ebp + 0x8); /* 0x380062D4: mov edx, dword ptr [ebp + 8] */ 257 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 258 ecx = ecx & edx; /* 0x380062D7: and ecx, edx */ 259 _cf = 0; 260 _flag_k = FK_TEST; 261 MEM32(ebp + 0x8) = ecx; /* 0x380062D9: mov dword ptr [ebp + 8], ecx */ 262 ecx = MEM32(esi + 0x3C); /* 0x380062DC: mov ecx, dword ptr [esi + 0x3c] */ 263 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 264 edi = edi & eax; /* 0x380062DF: and edi, eax */ 265 _cf = 0; 266 _flag_k = FK_TEST; 267 if (((LO8(ecx)) & 31)) _cf = ((((LO8(ecx)) & 31)) <= 32 ? (((eax) >> ((((LO8(ecx)) & 31)) - 1)) & 1u) : (((eax) >> 31) & 1u)); /* 0x380062E1: sar eax, cl */ 268 if (((LO8(ecx)) & 31)) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> ((LO8(ecx)) & 31))), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 269 eax = (uint32_t)((int32_t)eax >> ((LO8(ecx)) & 31)); 270 if (((LO8(ecx)) & 31)) _cf = ((((LO8(ecx)) & 31)) <= 32 ? (((edx) >> ((((LO8(ecx)) & 31)) - 1)) & 1u) : (((edx) >> 31) & 1u)); /* 0x380062E3: sar edx, cl */ 271 if (((LO8(ecx)) & 31)) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> ((LO8(ecx)) & 31))), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 272 edx = (uint32_t)((int32_t)edx >> ((LO8(ecx)) & 31)); 273 eax = (uint32_t)((int32_t)eax * (int32_t)MEM32(esi + 0x48)); /* 0x380062E5: imul eax, dword ptr [esi + 0x48] */ 274 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 275 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 276 eax = eax + edx; /* 0x380062E9: add eax, edx */ 277 _flag_k = FK_ADD; 278 edx = MEM32(esi + 0x50); /* 0x380062EB: mov edx, dword ptr [esi + 0x50] */ 279 ecx = eax * 8; /* 0x380062EE: lea ecx, [eax*8] */ 280 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 281 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 282 ecx = ecx - eax; /* 0x380062F5: sub ecx, eax */ 283 _flag_k = FK_CMP; 284 eax = MEM32(esi + 0x24); /* 0x380062F7: mov eax, dword ptr [esi + 0x24] */ 285 ecx = ecx + ecx * 2; /* 0x380062FA: lea ecx, [ecx + ecx*2] */ 286 ebx = edx + ecx * 4; /* 0x380062FD: lea ebx, [edx + ecx*4] */ 287 MEM32(ebp + 0xC) = ebx; /* 0x38006300: mov dword ptr [ebp + 0xc], ebx */ 288 MEM32(ebx + 0x18) = eax; /* 0x38006303: mov dword ptr [ebx + 0x18], eax */ 289 ecx = MEM32(ebp + 0xC); /* 0x38006306: mov ecx, dword ptr [ebp + 0xc] */ 290 eax = MEM32(ecx + 0x1C); /* 0x38006309: mov eax, dword ptr [ecx + 0x1c] */ 291 /* test eax, eax */ /* 0x3800630C: test eax, eax */ 292 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 293 _cf = 0; 294 _flag_k = FK_TEST; 295 if (TEST_NZ(_flag_a, _flag_b)) goto L_3800632C; /* 0x3800630E: jne 0x3800632c */ 296 L_38006310: 297 RECOMP_ICALL(MEM32(0x3804E228)); /* 0x38006310: call dword ptr [0x3804e228] */ 298 RECOMP_FLAGS_IN(); 299 eax = MEM32(esi + 0xA4); /* 0x38006316: mov eax, dword ptr [esi + 0xa4] */ 300 ecx = esi + 0x9C; /* 0x3800631C: lea ecx, [esi + 0x9c] */ 301 edx = ebp + 0xC; /* 0x38006322: lea edx, [ebp + 0xc] */ 302 PUSH32(esp, edx); /* 0x38006325: push edx */ 303 PUSH32(esp, eax); /* 0x38006326: push eax */ 304 RECOMP_ICALL(0x38009460u); /* 0x38006327: call 0x38009460 */ /* not lifted */ 305 RECOMP_FLAGS_IN(); 306 L_3800632C: 307 ecx = MEM32(esi + 0x38); /* 0x3800632C: mov ecx, dword ptr [esi + 0x38] */ 308 eax = MEM32(ebp + 0x8); /* 0x3800632F: mov eax, dword ptr [ebp + 8] */ 309 edx = MEM32(ebx + 0x1C); /* 0x38006332: mov edx, dword ptr [ebx + 0x1c] */ 310 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 311 ecx = ecx + 1; /* 0x38006335: inc ecx */ 312 _flag_k = FK_INC; 313 ecx = (uint32_t)((int32_t)ecx * (int32_t)edi); /* 0x38006336: imul ecx, edi */ 314 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 315 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 316 ecx = ecx + eax; /* 0x38006339: add ecx, eax */ 317 _flag_k = FK_ADD; 318 SET_LO16(eax, MEM16(edx + ecx * 2)); /* 0x3800633B: mov ax, word ptr [edx + ecx*2] */ 319 goto L_380063B2; /* 0x3800633F: jmp 0x380063b2 */ 320 L_38006341: 321 edx = MEM32(ebp + 0x8); /* 0x38006341: mov edx, dword ptr [ebp + 8] */ 322 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 323 ecx = ecx & edx; /* 0x38006344: and ecx, edx */ 324 _cf = 0; 325 _flag_k = FK_TEST; 326 MEM32(ebp + (-0x4)) = ecx; /* 0x38006346: mov dword ptr [ebp - 4], ecx */ 327 ecx = MEM32(esi + 0x3C); /* 0x38006349: mov ecx, dword ptr [esi + 0x3c] */ 328 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 329 edi = edi & eax; /* 0x3800634C: and edi, eax */ 330 _cf = 0; 331 _flag_k = FK_TEST; 332 if (((LO8(ecx)) & 31)) _cf = ((((LO8(ecx)) & 31)) <= 32 ? (((eax) >> ((((LO8(ecx)) & 31)) - 1)) & 1u) : (((eax) >> 31) & 1u)); /* 0x3800634E: sar eax, cl */ 333 if (((LO8(ecx)) & 31)) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> ((LO8(ecx)) & 31))), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 334 eax = (uint32_t)((int32_t)eax >> ((LO8(ecx)) & 31)); 335 if (((LO8(ecx)) & 31)) _cf = ((((LO8(ecx)) & 31)) <= 32 ? (((edx) >> ((((LO8(ecx)) & 31)) - 1)) & 1u) : (((edx) >> 31) & 1u)); /* 0x38006350: sar edx, cl */ 336 if (((LO8(ecx)) & 31)) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> ((LO8(ecx)) & 31))), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 337 edx = (uint32_t)((int32_t)edx >> ((LO8(ecx)) & 31)); 338 eax = (uint32_t)((int32_t)eax * (int32_t)MEM32(esi + 0x48)); /* 0x38006352: imul eax, dword ptr [esi + 0x48] */ 339 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 340 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 341 eax = eax + edx; /* 0x38006356: add eax, edx */ 342 _flag_k = FK_ADD; 343 edx = MEM32(esi + 0x24); /* 0x38006358: mov edx, dword ptr [esi + 0x24] */ 344 ecx = eax * 8; /* 0x3800635B: lea ecx, [eax*8] */ 345 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 346 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 347 ecx = ecx - eax; /* 0x38006362: sub ecx, eax */ 348 _flag_k = FK_CMP; 349 eax = ecx + ecx * 2; /* 0x38006364: lea eax, [ecx + ecx*2] */ 350 ecx = MEM32(esi + 0x50); /* 0x38006367: mov ecx, dword ptr [esi + 0x50] */ 351 ebx = ecx + eax * 4; /* 0x3800636A: lea ebx, [ecx + eax*4] */ 352 MEM32(ebp + 0x8) = ebx; /* 0x3800636D: mov dword ptr [ebp + 8], ebx */ 353 MEM32(ebx + 0x18) = edx; /* 0x38006370: mov dword ptr [ebx + 0x18], edx */ 354 ecx = MEM32(ebp + 0x8); /* 0x38006373: mov ecx, dword ptr [ebp + 8] */ 355 eax = MEM32(ecx + 0x1C); /* 0x38006376: mov eax, dword ptr [ecx + 0x1c] */ 356 /* test eax, eax */ /* 0x38006379: test eax, eax */ 357 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 358 _cf = 0; 359 _flag_k = FK_TEST; 360 if (TEST_NZ(_flag_a, _flag_b)) goto L_3800639B; /* 0x3800637B: jne 0x3800639b */ 361 L_3800637D: 362 RECOMP_ICALL(MEM32(0x3804E228)); /* 0x3800637D: call dword ptr [0x3804e228] */ 363 RECOMP_FLAGS_IN(); 364 edx = MEM32(esi + 0xA4); /* 0x38006383: mov edx, dword ptr [esi + 0xa4] */ 365 eax = ebp + 0x8; /* 0x38006389: lea eax, [ebp + 8] */ 366 PUSH32(esp, eax); /* 0x3800638C: push eax */ 367 ecx = esi + 0x9C; /* 0x3800638D: lea ecx, [esi + 0x9c] */ 368 PUSH32(esp, 1); /* 0x38006393: push 1 */ 369 PUSH32(esp, edx); /* 0x38006395: push edx */ 370 RECOMP_ICALL(0x38009C60u); /* 0x38006396: call 0x38009c60 */ /* not lifted */ 371 RECOMP_FLAGS_IN(); 372 L_3800639B: 373 eax = MEM32(esi + 0x38); /* 0x3800639B: mov eax, dword ptr [esi + 0x38] */ 374 ecx = MEM32(ebp + (-0x4)); /* 0x3800639E: mov ecx, dword ptr [ebp - 4] */ 375 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 376 eax = eax + 1; /* 0x380063A1: inc eax */ 377 _flag_k = FK_INC; 378 eax = (uint32_t)((int32_t)eax * (int32_t)edi); /* 0x380063A2: imul eax, edi */ 379 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 380 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 381 eax = eax + ecx; /* 0x380063A5: add eax, ecx */ 382 _flag_k = FK_ADD; 383 ecx = MEM32(ebx + 0x1C); /* 0x380063A7: mov ecx, dword ptr [ebx + 0x1c] */ 384 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 385 edx = 0; /* 0x380063AA: xor edx, edx */ 386 _cf = 0; 387 _flag_k = FK_TEST; 388 SET_LO8(edx, MEM8(ecx + eax * 2 + 0x1)); /* 0x380063AC: mov dl, byte ptr [ecx + eax*2 + 1] */ 389 eax = edx; /* 0x380063B0: mov eax, edx */ 390 L_380063B2: 391 ecx = MEM32(ebp + (-0x8)); /* 0x380063B2: mov ecx, dword ptr [ebp - 8] */ 392 edx = MEM32(ecx + 0xC); /* 0x380063B5: mov edx, dword ptr [ecx + 0xc] */ 393 fp_push(*(float*)&MEM32(edx + 0x1C)); /* 0x380063B8: fld dword ptr [edx + 0x1c] */ 394 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFu); 395 eax = eax & 0xFFFFu; /* 0x380063BB: and eax, 0xffff */ 396 _cf = 0; 397 _flag_k = FK_TEST; 398 MEM32(ebp + 0xC) = eax; /* 0x380063C0: mov dword ptr [ebp + 0xc], eax */ 399 _st[0] = _st[0] * (double)(int32_t)MEM32(ebp + 0xC); /* 0x380063C3: fimul dword ptr [ebp + 0xc] */ 400 edi = POP32_VAL(esp); /* 0x380063C6: pop edi */ 401 esi = POP32_VAL(esp); /* 0x380063C7: pop esi */ 402 ebx = POP32_VAL(esp); /* 0x380063C8: pop ebx */ 403 esp = ebp; /* 0x380063C9: mov esp, ebp */ 404 ebp = POP32_VAL(esp); /* 0x380063CB: pop ebp */ 405 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x380063CC: ret 8 */ 406 RECOMP_REGS_OUT(); 407 } 408 409 void sub_380063D0(void) { 410 int _fpu_cmp = 0; 411 uint32_t _cf = 0; 412 int _df = 1; 413 uint32_t _flag_k = FK_NONE; 414 uint32_t _flag_a = 0, _flag_b = 0; 415 uint32_t _itail_tgt = 0; 416 RECOMP_REGS_LOCALS 417 RECOMP_ENTER(0x380063D0u); 418 419 L_380063D0: 420 fp_push(*(float*)&MEM32(ecx + 0x10)); /* 0x380063D0: fld dword ptr [ecx + 0x10] */ 421 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380063D3: ret */ 422 RECOMP_REGS_OUT(); 423 } 424 425 void sub_380063E0(void) { 426 int _fpu_cmp = 0; 427 uint32_t _cf = 0; 428 int _df = 1; 429 uint32_t _flag_k = FK_NONE; 430 uint32_t _flag_a = 0, _flag_b = 0; 431 uint32_t _itail_tgt = 0; 432 RECOMP_REGS_LOCALS 433 RECOMP_ENTER(0x380063E0u); 434 435 L_380063E0: 436 PUSH32(esp, ebp); /* 0x380063E0: push ebp */ 437 ebp = esp; /* 0x380063E1: mov ebp, esp */ 438 eax = MEM32(ebp + 0x8); /* 0x380063E3: mov eax, dword ptr [ebp + 8] */ 439 MEM32(ecx + 0xC) = eax; /* 0x380063E6: mov dword ptr [ecx + 0xc], eax */ 440 ebp = POP32_VAL(esp); /* 0x380063E9: pop ebp */ 441 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x380063EA: ret 4 */ 442 RECOMP_REGS_OUT(); 443 } 444 445 void sub_380063F0(void) { 446 int _fpu_cmp = 0; 447 uint32_t _cf = 0; 448 int _df = 1; 449 uint32_t _flag_k = FK_NONE; 450 uint32_t _flag_a = 0, _flag_b = 0; 451 uint32_t _itail_tgt = 0; 452 RECOMP_REGS_LOCALS 453 RECOMP_ENTER(0x380063F0u); 454 455 L_380063F0: 456 PUSH32(esp, ebp); /* 0x380063F0: push ebp */ 457 ebp = esp; /* 0x380063F1: mov ebp, esp */ 458 eax = MEM32(ebp + 0x8); /* 0x380063F3: mov eax, dword ptr [ebp + 8] */ 459 MEM32(ecx + 0x4) = eax; /* 0x380063F6: mov dword ptr [ecx + 4], eax */ 460 ebp = POP32_VAL(esp); /* 0x380063F9: pop ebp */ 461 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x380063FA: ret 4 */ 462 RECOMP_REGS_OUT(); 463 } 464 465 void sub_38006400(void) { 466 int _fpu_cmp = 0; 467 uint32_t _cf = 0; 468 int _df = 1; 469 uint32_t _flag_k = FK_NONE; 470 uint32_t _flag_a = 0, _flag_b = 0; 471 uint32_t _itail_tgt = 0; 472 RECOMP_REGS_LOCALS 473 RECOMP_ENTER(0x38006400u); 474 475 L_38006400: 476 eax = MEM32(ecx + 0x4); /* 0x38006400: mov eax, dword ptr [ecx + 4] */ 477 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006403: ret */ 478 RECOMP_REGS_OUT(); 479 } 480 481 void sub_38006410(void) { 482 int _fpu_cmp = 0; 483 uint32_t _cf = 0; 484 int _df = 1; 485 uint32_t _flag_k = FK_NONE; 486 uint32_t _flag_a = 0, _flag_b = 0; 487 uint32_t _itail_tgt = 0; 488 RECOMP_REGS_LOCALS 489 RECOMP_ENTER(0x38006410u); 490 491 L_38006410: 492 PUSH32(esp, ebp); /* 0x38006410: push ebp */ 493 ebp = esp; /* 0x38006411: mov ebp, esp */ 494 eax = MEM32(ebp + 0x8); /* 0x38006413: mov eax, dword ptr [ebp + 8] */ 495 MEM32(ecx + 0x10) = eax; /* 0x38006416: mov dword ptr [ecx + 0x10], eax */ 496 ebp = POP32_VAL(esp); /* 0x38006419: pop ebp */ 497 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3800641A: ret 4 */ 498 RECOMP_REGS_OUT(); 499 } 500 501 void sub_38006420(void) { 502 int _fpu_cmp = 0; 503 uint32_t _cf = 0; 504 int _df = 1; 505 uint32_t _flag_k = FK_NONE; 506 uint32_t _flag_a = 0, _flag_b = 0; 507 uint32_t _itail_tgt = 0; 508 RECOMP_REGS_LOCALS 509 RECOMP_ENTER(0x38006420u); 510 511 L_38006420: 512 eax = MEM32(ecx + 0x14); /* 0x38006420: mov eax, dword ptr [ecx + 0x14] */ 513 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006423: ret */ 514 RECOMP_REGS_OUT(); 515 } 516 517 void sub_38006430(void) { 518 int _fpu_cmp = 0; 519 uint32_t _cf = 0; 520 int _df = 1; 521 uint32_t _flag_k = FK_NONE; 522 uint32_t _flag_a = 0, _flag_b = 0; 523 uint32_t _itail_tgt = 0; 524 RECOMP_REGS_LOCALS 525 RECOMP_ENTER(0x38006430u); 526 527 L_38006430: 528 PUSH32(esp, ebp); /* 0x38006430: push ebp */ 529 ebp = esp; /* 0x38006431: mov ebp, esp */ 530 eax = MEM32(ebp + 0x8); /* 0x38006433: mov eax, dword ptr [ebp + 8] */ 531 MEM32(ecx + 0x14) = eax; /* 0x38006436: mov dword ptr [ecx + 0x14], eax */ 532 ebp = POP32_VAL(esp); /* 0x38006439: pop ebp */ 533 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3800643A: ret 4 */ 534 RECOMP_REGS_OUT(); 535 } 536 537 void sub_38006440(void) { 538 int _fpu_cmp = 0; 539 uint32_t _cf = 0; 540 int _df = 1; 541 uint32_t _flag_k = FK_NONE; 542 uint32_t _flag_a = 0, _flag_b = 0; 543 uint32_t _itail_tgt = 0; 544 RECOMP_REGS_LOCALS 545 RECOMP_ENTER(0x38006440u); 546 547 L_38006440: 548 fp_push(*(float*)&MEM32(ecx + 0x20)); /* 0x38006440: fld dword ptr [ecx + 0x20] */ 549 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006443: ret */ 550 RECOMP_REGS_OUT(); 551 } 552 553 void sub_38006450(void) { 554 int _fpu_cmp = 0; 555 uint32_t _cf = 0; 556 int _df = 1; 557 uint32_t _flag_k = FK_NONE; 558 uint32_t _flag_a = 0, _flag_b = 0; 559 uint32_t _itail_tgt = 0; 560 RECOMP_REGS_LOCALS 561 RECOMP_ENTER(0x38006450u); 562 563 L_38006450: 564 edx = MEM32(ecx + 0x28); /* 0x38006450: mov edx, dword ptr [ecx + 0x28] */ 565 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 566 eax = 0; /* 0x38006453: xor eax, eax */ 567 _cf = 0; 568 _flag_k = FK_TEST; 569 /* test edx, edx */ /* 0x38006455: test edx, edx */ 570 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 571 _cf = 0; 572 _flag_k = FK_TEST; 573 SET_LO8(eax, (TEST_NZ(_flag_a, _flag_b)) ? 1 : 0); /* 0x38006457: setne al */ 574 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3800645A: ret */ 575 RECOMP_REGS_OUT(); 576 } 577 578 void sub_38006460(void) { 579 int _fpu_cmp = 0; 580 uint32_t _cf = 0; 581 int _df = 1; 582 uint32_t _flag_k = FK_NONE; 583 uint32_t _flag_a = 0, _flag_b = 0; 584 uint32_t _itail_tgt = 0; 585 RECOMP_REGS_LOCALS 586 RECOMP_ENTER(0x38006460u); 587 588 L_38006460: 589 edx = MEM32(ecx + 0xC4); /* 0x38006460: mov edx, dword ptr [ecx + 0xc4] */ 590 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 591 eax = 0; /* 0x38006466: xor eax, eax */ 592 _cf = 0; 593 _flag_k = FK_TEST; 594 /* test edx, edx */ /* 0x38006468: test edx, edx */ 595 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 596 _cf = 0; 597 _flag_k = FK_TEST; 598 SET_LO8(eax, (TEST_NZ(_flag_a, _flag_b)) ? 1 : 0); /* 0x3800646A: setne al */ 599 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3800646D: ret */ 600 RECOMP_REGS_OUT(); 601 } 602 603 void sub_38006470(void) { 604 int _fpu_cmp = 0; 605 uint32_t _cf = 0; 606 int _df = 1; 607 uint32_t _flag_k = FK_NONE; 608 uint32_t _flag_a = 0, _flag_b = 0; 609 uint32_t _itail_tgt = 0; 610 RECOMP_REGS_LOCALS 611 RECOMP_ENTER(0x38006470u); 612 613 L_38006470: 614 edx = MEM32(ecx + 0xC8); /* 0x38006470: mov edx, dword ptr [ecx + 0xc8] */ 615 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 616 eax = 0; /* 0x38006476: xor eax, eax */ 617 _cf = 0; 618 _flag_k = FK_TEST; 619 /* test edx, edx */ /* 0x38006478: test edx, edx */ 620 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 621 _cf = 0; 622 _flag_k = FK_TEST; 623 SET_LO8(eax, (TEST_NZ(_flag_a, _flag_b)) ? 1 : 0); /* 0x3800647A: setne al */ 624 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3800647D: ret */ 625 RECOMP_REGS_OUT(); 626 } 627 628 void sub_38006480(void) { 629 int _fpu_cmp = 0; 630 uint32_t _cf = 0; 631 int _df = 1; 632 uint32_t _flag_k = FK_NONE; 633 uint32_t _flag_a = 0, _flag_b = 0; 634 uint32_t _itail_tgt = 0; 635 RECOMP_REGS_LOCALS 636 RECOMP_ENTER(0x38006480u); 637 638 L_38006480: 639 eax = MEM32(ecx + 0xD0); /* 0x38006480: mov eax, dword ptr [ecx + 0xd0] */ 640 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006486: ret */ 641 RECOMP_REGS_OUT(); 642 } 643 644 void sub_38006490(void) { 645 int _fpu_cmp = 0; 646 uint32_t _cf = 0; 647 int _df = 1; 648 uint32_t _flag_k = FK_NONE; 649 uint32_t _flag_a = 0, _flag_b = 0; 650 uint32_t _itail_tgt = 0; 651 RECOMP_REGS_LOCALS 652 RECOMP_ENTER(0x38006490u); 653 654 L_38006490: 655 MEM32(ecx + 0xC8) = 0; /* 0x38006490: mov dword ptr [ecx + 0xc8], 0 */ 656 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3800649A: ret */ 657 RECOMP_REGS_OUT(); 658 } 659 660 void sub_380064A0(void) { 661 int _fpu_cmp = 0; 662 uint32_t _cf = 0; 663 int _df = 1; 664 uint32_t _flag_k = FK_NONE; 665 uint32_t _flag_a = 0, _flag_b = 0; 666 uint32_t _itail_tgt = 0; 667 RECOMP_REGS_LOCALS 668 RECOMP_ENTER(0x380064A0u); 669 670 L_380064A0: 671 PUSH32(esp, ebp); /* 0x380064A0: push ebp */ 672 ebp = esp; /* 0x380064A1: mov ebp, esp */ 673 PUSH32(esp, 0xFFFFFFFFu); /* 0x380064A3: push -1 */ 674 PUSH32(esp, 0x3804B9CAu); /* 0x380064A5: push 0x3804b9ca */ 675 eax = MEM32(FS_BASE + (0)); /* 0x380064AA: mov eax, dword ptr fs:[0] */ 676 PUSH32(esp, eax); /* 0x380064B0: push eax */ 677 MEM32(FS_BASE + (0)) = esp; /* 0x380064B1: mov dword ptr fs:[0], esp */ 678 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu); 679 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 680 esp = esp - 0x1Cu; /* 0x380064B8: sub esp, 0x1c */ 681 _flag_k = FK_CMP; 682 eax = MEM32(ebp + 0x8); /* 0x380064BB: mov eax, dword ptr [ebp + 8] */ 683 PUSH32(esp, ebx); /* 0x380064BE: push ebx */ 684 PUSH32(esp, esi); /* 0x380064BF: push esi */ 685 esi = ecx; /* 0x380064C0: mov esi, ecx */ 686 PUSH32(esp, edi); /* 0x380064C2: push edi */ 687 ecx = ebp + (-0x18); /* 0x380064C3: lea ecx, [ebp - 0x18] */ 688 PUSH32(esp, ecx); /* 0x380064C6: push ecx */ 689 ecx = esi; /* 0x380064C7: mov ecx, esi */ 690 MEM32(ebp + (-0x10)) = esi; /* 0x380064C9: mov dword ptr [ebp - 0x10], esi */ 691 MEM32(ebp + (-0x18)) = 0x9C43u; /* 0x380064CC: mov dword ptr [ebp - 0x18], 0x9c43 */ 692 MEM32(ebp + (-0x14)) = eax; /* 0x380064D3: mov dword ptr [ebp - 0x14], eax */ 693 RECOMP_ICALL(0x38017660u); /* 0x380064D6: call 0x38017660 */ /* not lifted */ 694 RECOMP_FLAGS_IN(); 695 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 696 ebx = 0; /* 0x380064DB: xor ebx, ebx */ 697 _cf = 0; 698 _flag_k = FK_TEST; 699 MEM32(ebp + (-0x4)) = ebx; /* 0x380064DD: mov dword ptr [ebp - 4], ebx */ 700 MEM32(esi + 0xB4) = 0x3804EBACu; /* 0x380064E0: mov dword ptr [esi + 0xb4], 0x3804ebac */ 701 eax = MEM32(ebp + 0x14); /* 0x380064EA: mov eax, dword ptr [ebp + 0x14] */ 702 ecx = MEM32(ebp + 0x18); /* 0x380064ED: mov ecx, dword ptr [ebp + 0x18] */ 703 edx = MEM32(ebp + 0x10); /* 0x380064F0: mov edx, dword ptr [ebp + 0x10] */ 704 MEM32(esi + 0xB8) = 0x3804EBA4u; /* 0x380064F3: mov dword ptr [esi + 0xb8], 0x3804eba4 */ 705 MEM32(esi + 0xC0) = eax; /* 0x380064FD: mov dword ptr [esi + 0xc0], eax */ 706 MEM32(esi + 0xD4) = ecx; /* 0x38006503: mov dword ptr [esi + 0xd4], ecx */ 707 eax = ebp + (-0x28); /* 0x38006509: lea eax, [ebp - 0x28] */ 708 PUSH32(esp, eax); /* 0x3800650C: push eax */ 709 ecx = ebp + (-0x18); /* 0x3800650D: lea ecx, [ebp - 0x18] */ 710 MEM32(esi + 0xBC) = edx; /* 0x38006510: mov dword ptr [esi + 0xbc], edx */ 711 edx = MEM32(ebp + 0x1C); /* 0x38006516: mov edx, dword ptr [ebp + 0x1c] */ 712 PUSH32(esp, ecx); /* 0x38006519: push ecx */ 713 ecx = esi + 0xF0; /* 0x3800651A: lea ecx, [esi + 0xf0] */ 714 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x38006520: mov byte ptr [ebp - 4], 1 */ 715 MEM32(esi + 0xD8) = edx; /* 0x38006524: mov dword ptr [esi + 0xd8], edx */ 716 MEM32(esi + 0xDC) = 0x38D1B717u; /* 0x3800652A: mov dword ptr [esi + 0xdc], 0x38d1b717 */ 717 MEM32(esi + 0xE0) = 0x42A00000u; /* 0x38006534: mov dword ptr [esi + 0xe0], 0x42a00000 */ 718 MEM32(esi + 0xE4) = ebx; /* 0x3800653E: mov dword ptr [esi + 0xe4], ebx */ 719 MEM32(esi + 0xE8) = ebx; /* 0x38006544: mov dword ptr [esi + 0xe8], ebx */ 720 MEM32(ebp + (-0x28)) = ebx; /* 0x3800654A: mov dword ptr [ebp - 0x28], ebx */ 721 MEM32(ebp + (-0x24)) = ebx; /* 0x3800654D: mov dword ptr [ebp - 0x24], ebx */ 722 MEM32(ebp + (-0x20)) = ebx; /* 0x38006550: mov dword ptr [ebp - 0x20], ebx */ 723 MEM32(ebp + (-0x18)) = ebx; /* 0x38006553: mov dword ptr [ebp - 0x18], ebx */ 724 MEM32(ebp + (-0x14)) = ebx; /* 0x38006556: mov dword ptr [ebp - 0x14], ebx */ 725 RECOMP_ICALL(MEM32(0x3804E3CC)); /* 0x38006559: call dword ptr [0x3804e3cc] */ 726 RECOMP_FLAGS_IN(); 727 MEM32(esi + 0x110) = ebx; /* 0x3800655F: mov dword ptr [esi + 0x110], ebx */ 728 MEM32(esi + 0x114) = ebx; /* 0x38006565: mov dword ptr [esi + 0x114], ebx */ 729 MEM32(esi + 0x118) = ebx; /* 0x3800656B: mov dword ptr [esi + 0x118], ebx */ 730 MEM32(esi + 0x11C) = ebx; /* 0x38006571: mov dword ptr [esi + 0x11c], ebx */ 731 MEM32(esi + 0x120) = ebx; /* 0x38006577: mov dword ptr [esi + 0x120], ebx */ 732 MEM32(esi + 0x124) = ebx; /* 0x3800657D: mov dword ptr [esi + 0x124], ebx */ 733 MEM32(esi + 0x128) = ebx; /* 0x38006583: mov dword ptr [esi + 0x128], ebx */ 734 MEM32(esi + 0x12C) = ebx; /* 0x38006589: mov dword ptr [esi + 0x12c], ebx */ 735 MEM32(esi + 0x130) = ebx; /* 0x3800658F: mov dword ptr [esi + 0x130], ebx */ 736 MEM32(esi + 0x134) = ebx; /* 0x38006595: mov dword ptr [esi + 0x134], ebx */ 737 MEM32(esi + 0x138) = ebx; /* 0x3800659B: mov dword ptr [esi + 0x138], ebx */ 738 MEM32(esi + 0x13C) = ebx; /* 0x380065A1: mov dword ptr [esi + 0x13c], ebx */ 739 MEM32(esi + 0x140) = ebx; /* 0x380065A7: mov dword ptr [esi + 0x140], ebx */ 740 MEM32(esi + 0x144) = ebx; /* 0x380065AD: mov dword ptr [esi + 0x144], ebx */ 741 MEM32(esi + 0x148) = ebx; /* 0x380065B3: mov dword ptr [esi + 0x148], ebx */ 742 MEM32(esi + 0x14C) = ebx; /* 0x380065B9: mov dword ptr [esi + 0x14c], ebx */ 743 MEM32(esi + 0x150) = 0x3F800000u; /* 0x380065BF: mov dword ptr [esi + 0x150], 0x3f800000 */ 744 MEM32(esi + 0x154) = ebx; /* 0x380065C9: mov dword ptr [esi + 0x154], ebx */ 745 MEM32(esi + 0x158) = ebx; /* 0x380065CF: mov dword ptr [esi + 0x158], ebx */ 746 MEM32(esi + 0x15C) = ebx; /* 0x380065D5: mov dword ptr [esi + 0x15c], ebx */ 747 MEM32(esi + 0x160) = ebx; /* 0x380065DB: mov dword ptr [esi + 0x160], ebx */ 748 MEM32(esi + 0x164) = ebx; /* 0x380065E1: mov dword ptr [esi + 0x164], ebx */ 749 MEM32(esi + 0x168) = ebx; /* 0x380065E7: mov dword ptr [esi + 0x168], ebx */ 750 MEM32(esi + 0x16C) = ebx; /* 0x380065ED: mov dword ptr [esi + 0x16c], ebx */ 751 MEM32(esi + 0x170) = ebx; /* 0x380065F3: mov dword ptr [esi + 0x170], ebx */ 752 MEM32(esi + 0x174) = ebx; /* 0x380065F9: mov dword ptr [esi + 0x174], ebx */ 753 edx = esi + 0x178; /* 0x380065FF: lea edx, [esi + 0x178] */ 754 eax = ebx; /* 0x38006605: mov eax, ebx */ 755 MEM32(edx) = eax; /* 0x38006607: mov dword ptr [edx], eax */ 756 ecx = ebx; /* 0x38006609: mov ecx, ebx */ 757 MEM32(edx + 0x4) = ecx; /* 0x3800660B: mov dword ptr [edx + 4], ecx */ 758 MEM32(edx + 0x8) = eax; /* 0x3800660E: mov dword ptr [edx + 8], eax */ 759 MEM32(esi + 0x184) = ebx; /* 0x38006611: mov dword ptr [esi + 0x184], ebx */ 760 MEM32(esi + 0x188) = ebx; /* 0x38006617: mov dword ptr [esi + 0x188], ebx */ 761 MEM32(esi + 0x18C) = ebx; /* 0x3800661D: mov dword ptr [esi + 0x18c], ebx */ 762 MEM32(ebp + (-0x1C)) = ebx; /* 0x38006623: mov dword ptr [ebp - 0x1c], ebx */ 763 MEM32(ebp + (-0x18)) = ebx; /* 0x38006626: mov dword ptr [ebp - 0x18], ebx */ 764 MEM32(ebp + (-0x14)) = ebx; /* 0x38006629: mov dword ptr [ebp - 0x14], ebx */ 765 MEM32(esi + 0x194) = ebx; /* 0x3800662C: mov dword ptr [esi + 0x194], ebx */ 766 SET_LO8(ecx, MEM8(ebp + 0x23)); /* 0x38006632: mov cl, byte ptr [ebp + 0x23] */ 767 MEM32(esi + 0x198) = ebx; /* 0x38006635: mov dword ptr [esi + 0x198], ebx */ 768 MEM32(esi + 0x1A4) = ebx; /* 0x3800663B: mov dword ptr [esi + 0x1a4], ebx */ 769 MEM32(esi + 0x1A8) = ebx; /* 0x38006641: mov dword ptr [esi + 0x1a8], ebx */ 770 MEM32(esi + 0x1AC) = ebx; /* 0x38006647: mov dword ptr [esi + 0x1ac], ebx */ 771 MEM32(esi + 0x1B0) = ebx; /* 0x3800664D: mov dword ptr [esi + 0x1b0], ebx */ 772 MEM8(esi + 0x1B4) = (uint8_t)(LO8(ecx)); /* 0x38006653: mov byte ptr [esi + 0x1b4], cl */ 773 MEM32(esi + 0x1B8) = ebx; /* 0x38006659: mov dword ptr [esi + 0x1b8], ebx */ 774 MEM32(esi + 0x1BC) = ebx; /* 0x3800665F: mov dword ptr [esi + 0x1bc], ebx */ 775 MEM32(esi + 0x1C0) = ebx; /* 0x38006665: mov dword ptr [esi + 0x1c0], ebx */ 776 ecx = esi; /* 0x3800666B: mov ecx, esi */ 777 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x3800666D: mov byte ptr [ebp - 4], 2 */ 778 MEM32(esi + 0x1C4) = ebx; /* 0x38006671: mov dword ptr [esi + 0x1c4], ebx */ 779 MEM32(esi + 0x1C8) = 0x41A00000u; /* 0x38006677: mov dword ptr [esi + 0x1c8], 0x41a00000 */ 780 MEM8(esi + 0x1D0) = (uint8_t)(LO8(ebx)); /* 0x38006681: mov byte ptr [esi + 0x1d0], bl */ 781 MEM32(esi + 0x1D4) = 0x40800000u; /* 0x38006687: mov dword ptr [esi + 0x1d4], 0x40800000 */ 782 MEM32(esi + 0x1D8) = 0xC0800000u; /* 0x38006691: mov dword ptr [esi + 0x1d8], 0xc0800000 */ 783 MEM32(esi) = 0x3804EB00u; /* 0x3800669B: mov dword ptr [esi], 0x3804eb00 */ 784 MEM32(esi + 0x1C) = 0x3804EAE8u; /* 0x380066A1: mov dword ptr [esi + 0x1c], 0x3804eae8 */ 785 MEM32(esi + 0x20) = 0x3804EAE0u; /* 0x380066A8: mov dword ptr [esi + 0x20], 0x3804eae0 */ 786 MEM32(esi + 0xB4) = 0x3804EAD4u; /* 0x380066AF: mov dword ptr [esi + 0xb4], 0x3804ead4 */ 787 MEM32(esi + 0xB8) = 0x3804EACCu; /* 0x380066B9: mov dword ptr [esi + 0xb8], 0x3804eacc */ 788 RECOMP_ICALL(0x38018380u); /* 0x380066C3: call 0x38018380 */ /* not lifted */ 789 RECOMP_FLAGS_IN(); 790 edi = MEM32(0x3804E49C); /* 0x380066C8: mov edi, dword ptr [0x3804e49c] */ 791 PUSH32(esp, 1); /* 0x380066CE: push 1 */ 792 edx = ebx; /* 0x380066D0: mov edx, ebx */ 793 MEM32(esi + 0x184) = edx; /* 0x380066D2: mov dword ptr [esi + 0x184], edx */ 794 edx = MEM32(ebp + 0xC); /* 0x380066D8: mov edx, dword ptr [ebp + 0xc] */ 795 eax = ebx; /* 0x380066DB: mov eax, ebx */ 796 MEM32(esi + 0x188) = eax; /* 0x380066DD: mov dword ptr [esi + 0x188], eax */ 797 PUSH32(esp, 1); /* 0x380066E3: push 1 */ 798 eax = 0x467E6000u; /* 0x380066E5: mov eax, 0x467e6000 */ 799 ecx = ebx; /* 0x380066EA: mov ecx, ebx */ 800 PUSH32(esp, esi); /* 0x380066EC: push esi */ 801 MEM32(esi + 0x18C) = ecx; /* 0x380066ED: mov dword ptr [esi + 0x18c], ecx */ 802 MEM32(esi + 0x1CC) = 0x3F99999Au; /* 0x380066F3: mov dword ptr [esi + 0x1cc], 0x3f99999a */ 803 MEM32(esi + 0x1A0) = edx; /* 0x380066FD: mov dword ptr [esi + 0x1a0], edx */ 804 MEM32(esi + 0x1DC) = eax; /* 0x38006703: mov dword ptr [esi + 0x1dc], eax */ 805 MEM32(esi + 0x1E0) = eax; /* 0x38006709: mov dword ptr [esi + 0x1e0], eax */ 806 eax = MEM32(0x3804E4A8); /* 0x3800670F: mov eax, dword ptr [0x3804e4a8] */ 807 ecx = MEM32(eax); /* 0x38006714: mov ecx, dword ptr [eax] */ 808 PUSH32(esp, 0x380092D0u); /* 0x38006716: push 0x380092d0 */ 809 PUSH32(esp, 0x3806B82Cu); /* 0x3800671B: push 0x3806b82c */ 810 MEM32(ebp + (-0x1C)) = ebx; /* 0x38006720: mov dword ptr [ebp - 0x1c], ebx */ 811 MEM32(ebp + (-0x18)) = ebx; /* 0x38006723: mov dword ptr [ebp - 0x18], ebx */ 812 MEM32(ebp + (-0x14)) = ebx; /* 0x38006726: mov dword ptr [ebp - 0x14], ebx */ 813 RECOMP_ICALL(edi); /* 0x38006729: call edi */ 814 RECOMP_FLAGS_IN(); 815 ecx = MEM32(0x3804E4A8); /* 0x3800672B: mov ecx, dword ptr [0x3804e4a8] */ 816 ecx = MEM32(ecx); /* 0x38006731: mov ecx, dword ptr [ecx] */ 817 PUSH32(esp, ebx); /* 0x38006733: push ebx */ 818 PUSH32(esp, 1); /* 0x38006734: push 1 */ 819 PUSH32(esp, esi); /* 0x38006736: push esi */ 820 PUSH32(esp, 0x38009320u); /* 0x38006737: push 0x38009320 */ 821 PUSH32(esp, 0x3806B81Cu); /* 0x3800673C: push 0x3806b81c */ 822 RECOMP_ICALL(edi); /* 0x38006741: call edi */ 823 RECOMP_FLAGS_IN(); 824 edx = MEM32(0x3804E4A8); /* 0x38006743: mov edx, dword ptr [0x3804e4a8] */ 825 ecx = MEM32(edx); /* 0x38006749: mov ecx, dword ptr [edx] */ 826 PUSH32(esp, ebx); /* 0x3800674B: push ebx */ 827 PUSH32(esp, 1); /* 0x3800674C: push 1 */ 828 PUSH32(esp, esi); /* 0x3800674E: push esi */ 829 PUSH32(esp, 0x380093A0u); /* 0x3800674F: push 0x380093a0 */ 830 PUSH32(esp, 0x3806B80Cu); /* 0x38006754: push 0x3806b80c */ 831 RECOMP_ICALL(edi); /* 0x38006759: call edi */ 832 RECOMP_FLAGS_IN(); 833 eax = MEM32(0x3804E4A8); /* 0x3800675B: mov eax, dword ptr [0x3804e4a8] */ 834 ecx = MEM32(eax); /* 0x38006760: mov ecx, dword ptr [eax] */ 835 PUSH32(esp, 1); /* 0x38006762: push 1 */ 836 PUSH32(esp, 0x3806B80Cu); /* 0x38006764: push 0x3806b80c */ 837 RECOMP_ICALL(MEM32(0x3804E498)); /* 0x38006769: call dword ptr [0x3804e498] */ 838 RECOMP_FLAGS_IN(); 839 /* test eax, eax */ /* 0x3800676F: test eax, eax */ 840 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 841 _cf = 0; 842 _flag_k = FK_TEST; 843 SET_LO8(ecx, (TEST_NZ(_flag_a, _flag_b)) ? 1 : 0); /* 0x38006771: setne cl */ 844 MEM8(esi + 0x190) = (uint8_t)(LO8(ecx)); /* 0x38006774: mov byte ptr [esi + 0x190], cl */ 845 PUSH32(esp, ebx); /* 0x3800677A: push ebx */ 846 ecx = esi; /* 0x3800677B: mov ecx, esi */ 847 RECOMP_ICALL(0x38019020u); /* 0x3800677D: call 0x38019020 */ /* not lifted */ 848 RECOMP_FLAGS_IN(); 849 ecx = esi; /* 0x38006782: mov ecx, esi */ 850 RECOMP_ICALL(0x380183F0u); /* 0x38006784: call 0x380183f0 */ /* not lifted */ 851 RECOMP_FLAGS_IN(); 852 ecx = esi; /* 0x38006789: mov ecx, esi */ 853 RECOMP_ICALL(0x380183B0u); /* 0x3800678B: call 0x380183b0 */ /* not lifted */ 854 RECOMP_FLAGS_IN(); 855 ecx = esi; /* 0x38006790: mov ecx, esi */ 856 RECOMP_ICALL(0x38018F30u); /* 0x38006792: call 0x38018f30 */ /* not lifted */ 857 RECOMP_FLAGS_IN(); 858 PUSH32(esp, 0x2Cu); /* 0x38006797: push 0x2c */ 859 MEM32(esi + 0xD0) = 0x3F000000u; /* 0x38006799: mov dword ptr [esi + 0xd0], 0x3f000000 */ 860 MEM32(esi + 0xCC) = 0x3FC90FDBu; /* 0x380067A3: mov dword ptr [esi + 0xcc], 0x3fc90fdb */ 861 MEM32(esi + 0xC8) = ebx; /* 0x380067AD: mov dword ptr [esi + 0xc8], ebx */ 862 MEM32(esi + 0xC4) = ebx; /* 0x380067B3: mov dword ptr [esi + 0xc4], ebx */ 863 RECOMP_ICALL(0x3804B676u); /* 0x380067B9: call 0x3804b676 */ /* not lifted */ 864 RECOMP_FLAGS_IN(); 865 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 866 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 867 esp = esp + 4; /* 0x380067BE: add esp, 4 */ 868 _flag_k = FK_ADD; 869 MEM32(ebp + 0x8) = eax; /* 0x380067C1: mov dword ptr [ebp + 8], eax */ 870 /* cmp eax, ebx */ /* 0x380067C4: cmp eax, ebx */ 871 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 872 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 873 _flag_k = FK_CMP; 874 MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x380067C6: mov byte ptr [ebp - 4], 3 */ 875 if (CMP_EQ(_flag_a, _flag_b)) goto L_380067D6; /* 0x380067CA: je 0x380067d6 */ 876 L_380067CC: 877 PUSH32(esp, esi); /* 0x380067CC: push esi */ 878 ecx = eax; /* 0x380067CD: mov ecx, eax */ 879 RECOMP_ICALL(0x3800A870u); /* 0x380067CF: call 0x3800a870 */ /* not lifted */ 880 RECOMP_FLAGS_IN(); 881 goto L_380067D8; /* 0x380067D4: jmp 0x380067d8 */ 882 L_380067D6: 883 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 884 eax = 0; /* 0x380067D6: xor eax, eax */ 885 _cf = 0; 886 _flag_k = FK_TEST; 887 L_380067D8: 888 MEM32(esi + 0xEC) = eax; /* 0x380067D8: mov dword ptr [esi + 0xec], eax */ 889 edx = MEM32(0x3804E4A8); /* 0x380067DE: mov edx, dword ptr [0x3804e4a8] */ 890 ecx = MEM32(edx); /* 0x380067E4: mov ecx, dword ptr [edx] */ 891 PUSH32(esp, 1); /* 0x380067E6: push 1 */ 892 PUSH32(esp, 0x3806B7F8u); /* 0x380067E8: push 0x3806b7f8 */ 893 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x380067ED: mov byte ptr [ebp - 4], 2 */ 894 RECOMP_ICALL(MEM32(0x3804E498)); /* 0x380067F1: call dword ptr [0x3804e498] */ 895 RECOMP_FLAGS_IN(); 896 SET_LO8(edx, MEM8(ebp + 0x20)); /* 0x380067F7: mov dl, byte ptr [ebp + 0x20] */ 897 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 898 ecx = 0; /* 0x380067FA: xor ecx, ecx */ 899 _cf = 0; 900 _flag_k = FK_TEST; 901 /* cmp LO8(edx), LO8(ebx) */ /* 0x380067FC: cmp dl, bl */ 902 _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 903 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 904 _flag_k = FK_NARROW(FK_CMP, 24); 905 SET_LO8(ecx, (CMP_NE(_flag_a, _flag_b)) ? 1 : 0); /* 0x380067FE: setne cl */ 906 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 907 ecx = ecx - 1; /* 0x38006801: dec ecx */ 908 _flag_k = FK_DEC; 909 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 910 ecx = ecx & eax; /* 0x38006802: and ecx, eax */ 911 _cf = 0; 912 _flag_k = FK_TEST; 913 PUSH32(esp, ecx); /* 0x38006804: push ecx */ 914 ecx = esi; /* 0x38006805: mov ecx, esi */ 915 RECOMP_ICALL(0x38008270u); /* 0x38006807: call 0x38008270 */ /* not lifted */ 916 RECOMP_FLAGS_IN(); 917 PUSH32(esp, 4); /* 0x3800680C: push 4 */ 918 RECOMP_ICALL(0x3804B676u); /* 0x3800680E: call 0x3804b676 */ /* not lifted */ 919 RECOMP_FLAGS_IN(); 920 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 921 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 922 esp = esp + 4; /* 0x38006813: add esp, 4 */ 923 _flag_k = FK_ADD; 924 MEM32(ebp + 0x20) = eax; /* 0x38006816: mov dword ptr [ebp + 0x20], eax */ 925 /* cmp eax, ebx */ /* 0x38006819: cmp eax, ebx */ 926 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 927 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 928 _flag_k = FK_CMP; 929 MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x3800681B: mov byte ptr [ebp - 4], 4 */ 930 if (CMP_EQ(_flag_a, _flag_b)) goto L_38006847; /* 0x3800681F: je 0x38006847 */ 931 L_38006821: 932 edx = MEM32(esi + 0xD8); /* 0x38006821: mov edx, dword ptr [esi + 0xd8] */ 933 ecx = MEM32(esi + 0xD4); /* 0x38006827: mov ecx, dword ptr [esi + 0xd4] */ 934 PUSH32(esp, edx); /* 0x3800682D: push edx */ 935 edx = MEM32(esi + 0xC0); /* 0x3800682E: mov edx, dword ptr [esi + 0xc0] */ 936 PUSH32(esp, ecx); /* 0x38006834: push ecx */ 937 ecx = MEM32(esi + 0xBC); /* 0x38006835: mov ecx, dword ptr [esi + 0xbc] */ 938 PUSH32(esp, edx); /* 0x3800683B: push edx */ 939 PUSH32(esp, ecx); /* 0x3800683C: push ecx */ 940 ecx = eax; /* 0x3800683D: mov ecx, eax */ 941 RECOMP_ICALL(MEM32(0x3804E224)); /* 0x3800683F: call dword ptr [0x3804e224] */ 942 RECOMP_FLAGS_IN(); 943 goto L_38006849; /* 0x38006845: jmp 0x38006849 */ 944 L_38006847: 945 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 946 eax = 0; /* 0x38006847: xor eax, eax */ 947 _cf = 0; 948 _flag_k = FK_TEST; 949 L_38006849: 950 ecx = esi; /* 0x38006849: mov ecx, esi */ 951 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x3800684B: mov byte ptr [ebp - 4], 2 */ 952 MEM32(esi + 0x1B0) = eax; /* 0x3800684F: mov dword ptr [esi + 0x1b0], eax */ 953 RECOMP_ICALL(0x38006B20u); /* 0x38006855: call 0x38006b20 */ /* not lifted */ 954 RECOMP_FLAGS_IN(); 955 PUSH32(esp, eax); /* 0x3800685A: push eax */ 956 ecx = esi; /* 0x3800685B: mov ecx, esi */ 957 RECOMP_ICALL(0x380080B0u); /* 0x3800685D: call 0x380080b0 */ /* not lifted */ 958 RECOMP_FLAGS_IN(); 959 edx = MEM32(0x3804E4A8); /* 0x38006862: mov edx, dword ptr [0x3804e4a8] */ 960 ecx = MEM32(edx); /* 0x38006868: mov ecx, dword ptr [edx] */ 961 PUSH32(esp, 1); /* 0x3800686A: push 1 */ 962 PUSH32(esp, 1); /* 0x3800686C: push 1 */ 963 PUSH32(esp, esi); /* 0x3800686E: push esi */ 964 PUSH32(esp, 0x38007040u); /* 0x3800686F: push 0x38007040 */ 965 PUSH32(esp, 0x3806B7E8u); /* 0x38006874: push 0x3806b7e8 */ 966 RECOMP_ICALL(MEM32(0x3804E494)); /* 0x38006879: call dword ptr [0x3804e494] */ 967 RECOMP_FLAGS_IN(); 968 eax = MEM32(0x3804E4A8); /* 0x3800687F: mov eax, dword ptr [0x3804e4a8] */ 969 ecx = MEM32(eax); /* 0x38006884: mov ecx, dword ptr [eax] */ 970 PUSH32(esp, 1); /* 0x38006886: push 1 */ 971 PUSH32(esp, 1); /* 0x38006888: push 1 */ 972 PUSH32(esp, esi); /* 0x3800688A: push esi */ 973 PUSH32(esp, 0x380093C0u); /* 0x3800688B: push 0x380093c0 */ 974 PUSH32(esp, 0x3806B7D4u); /* 0x38006890: push 0x3806b7d4 */ 975 RECOMP_ICALL(edi); /* 0x38006895: call edi */ 976 RECOMP_FLAGS_IN(); 977 ecx = esi; /* 0x38006897: mov ecx, esi */ 978 RECOMP_ICALL(0x380082C0u); /* 0x38006899: call 0x380082c0 */ /* not lifted */ 979 RECOMP_FLAGS_IN(); 980 /* test LO8(eax), LO8(eax) */ /* 0x3800689E: test al, al */ 981 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 982 _cf = 0; 983 _flag_k = FK_NARROW(FK_TEST, 24); 984 if (TEST_Z(_flag_a, _flag_b)) goto L_380068B1; /* 0x380068A0: je 0x380068b1 */ 985 L_380068A2: 986 ecx = MEM32(0x3806EC04); /* 0x380068A2: mov ecx, dword ptr [0x3806ec04] */ 987 /* cmp ecx, ebx */ /* 0x380068A8: cmp ecx, ebx */ 988 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx); 989 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 990 _flag_k = FK_CMP; 991 if (CMP_EQ(_flag_a, _flag_b)) goto L_380068B1; /* 0x380068AA: je 0x380068b1 */ 992 L_380068AC: 993 edx = MEM32(ecx); /* 0x380068AC: mov edx, dword ptr [ecx] */ 994 RECOMP_ICALL(MEM32(edx + 0x10)); /* 0x380068AE: call dword ptr [edx + 0x10] */ 995 RECOMP_FLAGS_IN(); 996 L_380068B1: 997 ecx = MEM32(ebp + (-0xC)); /* 0x380068B1: mov ecx, dword ptr [ebp - 0xc] */ 998 edi = POP32_VAL(esp); /* 0x380068B4: pop edi */ 999 eax = esi; /* 0x380068B5: mov eax, esi */ 1000 esi = POP32_VAL(esp); /* 0x380068B7: pop esi */ 1001 ebx = POP32_VAL(esp); /* 0x380068B8: pop ebx */ 1002 MEM32(FS_BASE + (0)) = ecx; /* 0x380068B9: mov dword ptr fs:[0], ecx */ 1003 esp = ebp; /* 0x380068C0: mov esp, ebp */ 1004 ebp = POP32_VAL(esp); /* 0x380068C2: pop ebp */ 1005 RECOMP_FLAGS_OUT(); esp += 32; { RECOMP_REGS_OUT(); return; } /* 0x380068C3: ret 0x1c */ 1006 RECOMP_REGS_OUT(); 1007 } 1008 1009 void sub_380068D0(void) { 1010 int _fpu_cmp = 0; 1011 uint32_t _cf = 0; 1012 int _df = 1; 1013 uint32_t _flag_k = FK_NONE; 1014 uint32_t _flag_a = 0, _flag_b = 0; 1015 uint32_t _itail_tgt = 0; 1016 RECOMP_REGS_LOCALS 1017 RECOMP_ENTER(0x380068D0u); 1018 1019 L_380068D0: 1020 MEM32(ecx) = 0x3804EBACu; /* 0x380068D0: mov dword ptr [ecx], 0x3804ebac */ 1021 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380068D6: ret */ 1022 RECOMP_REGS_OUT(); 1023 } 1024 1025 void sub_380068E0(void) { 1026 int _fpu_cmp = 0; 1027 uint32_t _cf = 0; 1028 int _df = 1; 1029 uint32_t _flag_k = FK_NONE; 1030 uint32_t _flag_a = 0, _flag_b = 0; 1031 uint32_t _itail_tgt = 0; 1032 RECOMP_REGS_LOCALS 1033 RECOMP_ENTER(0x380068E0u); 1034 1035 L_380068E0: 1036 PUSH32(esp, ebp); /* 0x380068E0: push ebp */ 1037 ebp = esp; /* 0x380068E1: mov ebp, esp */ 1038 /* test MEM8(ebp + 0x8), 1 */ /* 0x380068E3: test byte ptr [ebp + 8], 1 */ 1039 _flag_a = (uint32_t)(MEM8(ebp + 0x8)) << 24; _flag_b = (uint32_t)(1) << 24; 1040 _cf = 0; 1041 _flag_k = FK_NARROW(FK_TEST, 24); 1042 PUSH32(esp, esi); /* 0x380068E7: push esi */ 1043 esi = ecx; /* 0x380068E8: mov esi, ecx */ 1044 MEM32(esi) = 0x3804EBACu; /* 0x380068EA: mov dword ptr [esi], 0x3804ebac */ 1045 if (TEST_Z(_flag_a, _flag_b)) goto L_380068FB; /* 0x380068F0: je 0x380068fb */ 1046 L_380068F2: 1047 PUSH32(esp, esi); /* 0x380068F2: push esi */ 1048 RECOMP_ICALL(0x3804B4F6u); /* 0x380068F3: call 0x3804b4f6 */ /* not lifted */ 1049 RECOMP_FLAGS_IN(); 1050 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1051 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1052 esp = esp + 4; /* 0x380068F8: add esp, 4 */ 1053 _flag_k = FK_ADD; 1054 L_380068FB: 1055 eax = esi; /* 0x380068FB: mov eax, esi */ 1056 esi = POP32_VAL(esp); /* 0x380068FD: pop esi */ 1057 ebp = POP32_VAL(esp); /* 0x380068FE: pop ebp */ 1058 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x380068FF: ret 4 */ 1059 RECOMP_REGS_OUT(); 1060 } 1061 1062 void sub_38006910(void) { 1063 int _fpu_cmp = 0; 1064 uint32_t _cf = 0; 1065 int _df = 1; 1066 uint32_t _flag_k = FK_NONE; 1067 uint32_t _flag_a = 0, _flag_b = 0; 1068 uint32_t _itail_tgt = 0; 1069 RECOMP_REGS_LOCALS 1070 RECOMP_ENTER(0x38006910u); 1071 1072 L_38006910: 1073 PUSH32(esp, ebp); /* 0x38006910: push ebp */ 1074 ebp = esp; /* 0x38006911: mov ebp, esp */ 1075 PUSH32(esp, ebx); /* 0x38006913: push ebx */ 1076 SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x38006914: mov bl, byte ptr [ebp + 8] */ 1077 /* test LO8(ebx), 2 */ /* 0x38006917: test bl, 2 */ 1078 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 1079 _cf = 0; 1080 _flag_k = FK_NARROW(FK_TEST, 24); 1081 PUSH32(esp, esi); /* 0x3800691A: push esi */ 1082 esi = ecx; /* 0x3800691B: mov esi, ecx */ 1083 if (TEST_Z(_flag_a, _flag_b)) goto L_3800694E; /* 0x3800691D: je 0x3800694e */ 1084 L_3800691F: 1085 eax = MEM32(esi + (-0x4)); /* 0x3800691F: mov eax, dword ptr [esi - 4] */ 1086 PUSH32(esp, edi); /* 0x38006922: push edi */ 1087 PUSH32(esp, 0x38006970u); /* 0x38006923: push 0x38006970 */ 1088 edi = esi + (-0x4); /* 0x38006928: lea edi, [esi - 4] */ 1089 PUSH32(esp, eax); /* 0x3800692B: push eax */ 1090 PUSH32(esp, 0x1E4u); /* 0x3800692C: push 0x1e4 */ 1091 PUSH32(esp, esi); /* 0x38006931: push esi */ 1092 RECOMP_ICALL(0x3804B582u); /* 0x38006932: call 0x3804b582 */ /* not lifted */ 1093 RECOMP_FLAGS_IN(); 1094 /* test LO8(ebx), 1 */ /* 0x38006937: test bl, 1 */ 1095 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 1096 _cf = 0; 1097 _flag_k = FK_NARROW(FK_TEST, 24); 1098 if (TEST_Z(_flag_a, _flag_b)) goto L_38006945; /* 0x3800693A: je 0x38006945 */ 1099 L_3800693C: 1100 PUSH32(esp, edi); /* 0x3800693C: push edi */ 1101 RECOMP_ICALL(0x3804B4F6u); /* 0x3800693D: call 0x3804b4f6 */ /* not lifted */ 1102 RECOMP_FLAGS_IN(); 1103 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1104 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1105 esp = esp + 4; /* 0x38006942: add esp, 4 */ 1106 _flag_k = FK_ADD; 1107 L_38006945: 1108 eax = edi; /* 0x38006945: mov eax, edi */ 1109 edi = POP32_VAL(esp); /* 0x38006947: pop edi */ 1110 esi = POP32_VAL(esp); /* 0x38006948: pop esi */ 1111 ebx = POP32_VAL(esp); /* 0x38006949: pop ebx */ 1112 ebp = POP32_VAL(esp); /* 0x3800694A: pop ebp */ 1113 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3800694B: ret 4 */ 1114 L_3800694E: 1115 ecx = esi; /* 0x3800694E: mov ecx, esi */ 1116 RECOMP_ICALL(0x38006970u); /* 0x38006950: call 0x38006970 */ /* not lifted */ 1117 RECOMP_FLAGS_IN(); 1118 /* test LO8(ebx), 1 */ /* 0x38006955: test bl, 1 */ 1119 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 1120 _cf = 0; 1121 _flag_k = FK_NARROW(FK_TEST, 24); 1122 if (TEST_Z(_flag_a, _flag_b)) goto L_38006963; /* 0x38006958: je 0x38006963 */ 1123 L_3800695A: 1124 PUSH32(esp, esi); /* 0x3800695A: push esi */ 1125 RECOMP_ICALL(0x3804B4F6u); /* 0x3800695B: call 0x3804b4f6 */ /* not lifted */ 1126 RECOMP_FLAGS_IN(); 1127 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1128 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1129 esp = esp + 4; /* 0x38006960: add esp, 4 */ 1130 _flag_k = FK_ADD; 1131 L_38006963: 1132 eax = esi; /* 0x38006963: mov eax, esi */ 1133 esi = POP32_VAL(esp); /* 0x38006965: pop esi */ 1134 ebx = POP32_VAL(esp); /* 0x38006966: pop ebx */ 1135 ebp = POP32_VAL(esp); /* 0x38006967: pop ebp */ 1136 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38006968: ret 4 */ 1137 RECOMP_REGS_OUT(); 1138 } 1139 1140 void sub_38006970(void) { 1141 int _fpu_cmp = 0; 1142 uint32_t _cf = 0; 1143 int _df = 1; 1144 uint32_t _flag_k = FK_NONE; 1145 uint32_t _flag_a = 0, _flag_b = 0; 1146 uint32_t _itail_tgt = 0; 1147 RECOMP_REGS_LOCALS 1148 RECOMP_ENTER(0x38006970u); 1149 1150 L_38006970: 1151 PUSH32(esp, ebp); /* 0x38006970: push ebp */ 1152 ebp = esp; /* 0x38006971: mov ebp, esp */ 1153 PUSH32(esp, 0xFFFFFFFFu); /* 0x38006973: push -1 */ 1154 PUSH32(esp, 0x3804BA1Fu); /* 0x38006975: push 0x3804ba1f */ 1155 eax = MEM32(FS_BASE + (0)); /* 0x3800697A: mov eax, dword ptr fs:[0] */ 1156 PUSH32(esp, eax); /* 0x38006980: push eax */ 1157 MEM32(FS_BASE + (0)) = esp; /* 0x38006981: mov dword ptr fs:[0], esp */ 1158 PUSH32(esp, ecx); /* 0x38006988: push ecx */ 1159 PUSH32(esp, ebx); /* 0x38006989: push ebx */ 1160 PUSH32(esp, esi); /* 0x3800698A: push esi */ 1161 esi = ecx; /* 0x3800698B: mov esi, ecx */ 1162 ebx = esi + 0xB4; /* 0x3800698D: lea ebx, [esi + 0xb4] */ 1163 PUSH32(esp, edi); /* 0x38006993: push edi */ 1164 MEM32(ebp + (-0x10)) = esi; /* 0x38006994: mov dword ptr [ebp - 0x10], esi */ 1165 MEM32(esi) = 0x3804EB00u; /* 0x38006997: mov dword ptr [esi], 0x3804eb00 */ 1166 MEM32(esi + 0x1C) = 0x3804EAE8u; /* 0x3800699D: mov dword ptr [esi + 0x1c], 0x3804eae8 */ 1167 MEM32(esi + 0x20) = 0x3804EAE0u; /* 0x380069A4: mov dword ptr [esi + 0x20], 0x3804eae0 */ 1168 MEM32(ebx) = 0x3804EAD4u; /* 0x380069AB: mov dword ptr [ebx], 0x3804ead4 */ 1169 MEM32(esi + 0xB8) = 0x3804EACCu; /* 0x380069B1: mov dword ptr [esi + 0xb8], 0x3804eacc */ 1170 eax = MEM32(0x3804E4A8); /* 0x380069BB: mov eax, dword ptr [0x3804e4a8] */ 1171 ecx = MEM32(eax); /* 0x380069C0: mov ecx, dword ptr [eax] */ 1172 edi = MEM32(0x3804E4A4); /* 0x380069C2: mov edi, dword ptr [0x3804e4a4] */ 1173 PUSH32(esp, 1); /* 0x380069C8: push 1 */ 1174 PUSH32(esp, esi); /* 0x380069CA: push esi */ 1175 PUSH32(esp, 0x380092D0u); /* 0x380069CB: push 0x380092d0 */ 1176 PUSH32(esp, 0x3806B82Cu); /* 0x380069D0: push 0x3806b82c */ 1177 MEM32(ebp + (-0x4)) = 2; /* 0x380069D5: mov dword ptr [ebp - 4], 2 */ 1178 RECOMP_ICALL(edi); /* 0x380069DC: call edi */ 1179 RECOMP_FLAGS_IN(); 1180 ecx = MEM32(0x3804E4A8); /* 0x380069DE: mov ecx, dword ptr [0x3804e4a8] */ 1181 ecx = MEM32(ecx); /* 0x380069E4: mov ecx, dword ptr [ecx] */ 1182 PUSH32(esp, 1); /* 0x380069E6: push 1 */ 1183 PUSH32(esp, esi); /* 0x380069E8: push esi */ 1184 PUSH32(esp, 0x38009320u); /* 0x380069E9: push 0x38009320 */ 1185 PUSH32(esp, 0x3806B81Cu); /* 0x380069EE: push 0x3806b81c */ 1186 RECOMP_ICALL(edi); /* 0x380069F3: call edi */ 1187 RECOMP_FLAGS_IN(); 1188 edx = MEM32(0x3804E4A8); /* 0x380069F5: mov edx, dword ptr [0x3804e4a8] */ 1189 ecx = MEM32(edx); /* 0x380069FB: mov ecx, dword ptr [edx] */ 1190 PUSH32(esp, 1); /* 0x380069FD: push 1 */ 1191 PUSH32(esp, esi); /* 0x380069FF: push esi */ 1192 PUSH32(esp, 0x380093A0u); /* 0x38006A00: push 0x380093a0 */ 1193 PUSH32(esp, 0x3806B80Cu); /* 0x38006A05: push 0x3806b80c */ 1194 RECOMP_ICALL(edi); /* 0x38006A0A: call edi */ 1195 RECOMP_FLAGS_IN(); 1196 eax = MEM32(0x3804E4A8); /* 0x38006A0C: mov eax, dword ptr [0x3804e4a8] */ 1197 ecx = MEM32(eax); /* 0x38006A11: mov ecx, dword ptr [eax] */ 1198 PUSH32(esp, 1); /* 0x38006A13: push 1 */ 1199 PUSH32(esp, esi); /* 0x38006A15: push esi */ 1200 PUSH32(esp, 0x38007040u); /* 0x38006A16: push 0x38007040 */ 1201 PUSH32(esp, 0x3806B7E8u); /* 0x38006A1B: push 0x3806b7e8 */ 1202 RECOMP_ICALL(MEM32(0x3804E4A0)); /* 0x38006A20: call dword ptr [0x3804e4a0] */ 1203 RECOMP_FLAGS_IN(); 1204 ecx = MEM32(0x3804E4A8); /* 0x38006A26: mov ecx, dword ptr [0x3804e4a8] */ 1205 ecx = MEM32(ecx); /* 0x38006A2C: mov ecx, dword ptr [ecx] */ 1206 PUSH32(esp, 1); /* 0x38006A2E: push 1 */ 1207 PUSH32(esp, esi); /* 0x38006A30: push esi */ 1208 PUSH32(esp, 0x380093C0u); /* 0x38006A31: push 0x380093c0 */ 1209 PUSH32(esp, 0x3806B7D4u); /* 0x38006A36: push 0x3806b7d4 */ 1210 RECOMP_ICALL(edi); /* 0x38006A3B: call edi */ 1211 RECOMP_FLAGS_IN(); 1212 ecx = MEM32(0x3806EC04); /* 0x38006A3D: mov ecx, dword ptr [0x3806ec04] */ 1213 edx = MEM32(ecx); /* 0x38006A43: mov edx, dword ptr [ecx] */ 1214 PUSH32(esp, 0); /* 0x38006A45: push 0 */ 1215 RECOMP_ICALL(MEM32(edx + 0x20)); /* 0x38006A47: call dword ptr [edx + 0x20] */ 1216 RECOMP_FLAGS_IN(); 1217 edi = MEM32(esi + 0x1B0); /* 0x38006A4A: mov edi, dword ptr [esi + 0x1b0] */ 1218 /* test edi, edi */ /* 0x38006A50: test edi, edi */ 1219 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 1220 _cf = 0; 1221 _flag_k = FK_TEST; 1222 if (TEST_Z(_flag_a, _flag_b)) goto L_38006A65; /* 0x38006A52: je 0x38006a65 */ 1223 L_38006A54: 1224 ecx = edi; /* 0x38006A54: mov ecx, edi */ 1225 RECOMP_ICALL(MEM32(0x3804E220)); /* 0x38006A56: call dword ptr [0x3804e220] */ 1226 RECOMP_FLAGS_IN(); 1227 PUSH32(esp, edi); /* 0x38006A5C: push edi */ 1228 RECOMP_ICALL(0x3804B4F6u); /* 0x38006A5D: call 0x3804b4f6 */ /* not lifted */ 1229 RECOMP_FLAGS_IN(); 1230 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1231 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1232 esp = esp + 4; /* 0x38006A62: add esp, 4 */ 1233 _flag_k = FK_ADD; 1234 L_38006A65: 1235 edi = MEM32(esi + 0x128); /* 0x38006A65: mov edi, dword ptr [esi + 0x128] */ 1236 /* test edi, edi */ /* 0x38006A6B: test edi, edi */ 1237 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 1238 _cf = 0; 1239 _flag_k = FK_TEST; 1240 MEM32(esi + 0x1B0) = 0; /* 0x38006A6D: mov dword ptr [esi + 0x1b0], 0 */ 1241 if (TEST_Z(_flag_a, _flag_b)) goto L_38006A89; /* 0x38006A77: je 0x38006a89 */ 1242 L_38006A79: 1243 ecx = edi; /* 0x38006A79: mov ecx, edi */ 1244 RECOMP_ICALL(0x3801F780u); /* 0x38006A7B: call 0x3801f780 */ /* not lifted */ 1245 RECOMP_FLAGS_IN(); 1246 PUSH32(esp, edi); /* 0x38006A80: push edi */ 1247 RECOMP_ICALL(0x3804B4F6u); /* 0x38006A81: call 0x3804b4f6 */ /* not lifted */ 1248 RECOMP_FLAGS_IN(); 1249 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1250 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1251 esp = esp + 4; /* 0x38006A86: add esp, 4 */ 1252 _flag_k = FK_ADD; 1253 L_38006A89: 1254 ecx = MEM32(esi + 0xEC); /* 0x38006A89: mov ecx, dword ptr [esi + 0xec] */ 1255 /* test ecx, ecx */ /* 0x38006A8F: test ecx, ecx */ 1256 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 1257 _cf = 0; 1258 _flag_k = FK_TEST; 1259 MEM32(esi + 0x128) = 0; /* 0x38006A91: mov dword ptr [esi + 0x128], 0 */ 1260 if (TEST_Z(_flag_a, _flag_b)) goto L_38006AA4; /* 0x38006A9B: je 0x38006aa4 */ 1261 L_38006A9D: 1262 eax = MEM32(ecx); /* 0x38006A9D: mov eax, dword ptr [ecx] */ 1263 PUSH32(esp, 1); /* 0x38006A9F: push 1 */ 1264 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x38006AA1: call dword ptr [eax + 0x10] */ 1265 RECOMP_FLAGS_IN(); 1266 L_38006AA4: 1267 MEM32(esi + 0xEC) = 0; /* 0x38006AA4: mov dword ptr [esi + 0xec], 0 */ 1268 eax = MEM32(esi + 0x1B8); /* 0x38006AAE: mov eax, dword ptr [esi + 0x1b8] */ 1269 PUSH32(esp, eax); /* 0x38006AB4: push eax */ 1270 MEM32(ebp + (-0x10)) = eax; /* 0x38006AB5: mov dword ptr [ebp - 0x10], eax */ 1271 RECOMP_ICALL(0x3804B4F6u); /* 0x38006AB8: call 0x3804b4f6 */ /* not lifted */ 1272 RECOMP_FLAGS_IN(); 1273 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1274 eax = 0; /* 0x38006ABD: xor eax, eax */ 1275 _cf = 0; 1276 _flag_k = FK_TEST; 1277 MEM32(esi + 0x1B8) = eax; /* 0x38006ABF: mov dword ptr [esi + 0x1b8], eax */ 1278 MEM32(esi + 0x1BC) = eax; /* 0x38006AC5: mov dword ptr [esi + 0x1bc], eax */ 1279 MEM32(esi + 0x1C0) = eax; /* 0x38006ACB: mov dword ptr [esi + 0x1c0], eax */ 1280 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1281 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1282 esp = esp + 4; /* 0x38006AD1: add esp, 4 */ 1283 _flag_k = FK_ADD; 1284 eax = esi; /* 0x38006AD4: mov eax, esi */ 1285 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(eax); 1286 _cf = (eax) != 0; 1287 eax = (uint32_t)(-(int32_t)eax); /* 0x38006AD6: neg eax */ 1288 _flag_k = FK_CMP; 1289 { uint32_t _sa = eax, _sb = eax, _sc = _cf; /* 0x38006AD8: sbb eax, eax */ 1290 eax = _sc ? 0xFFFFFFFFu : 0; 1291 _flag_a = recomp_flags_sbb(_sa, _sb, _sc); _flag_b = 0; 1292 _flag_k = FK_EFLAGS; _cf = _flag_a & 1u; } 1293 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 1294 eax = eax & ebx; /* 0x38006ADA: and eax, ebx */ 1295 _cf = 0; 1296 _flag_k = FK_TEST; 1297 ecx = esi; /* 0x38006ADC: mov ecx, esi */ 1298 MEM32(eax) = 0x3804EBACu; /* 0x38006ADE: mov dword ptr [eax], 0x3804ebac */ 1299 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x38006AE4: mov dword ptr [ebp - 4], 0xffffffff */ 1300 RECOMP_ICALL(0x38017A20u); /* 0x38006AEB: call 0x38017a20 */ /* not lifted */ 1301 RECOMP_FLAGS_IN(); 1302 ecx = MEM32(ebp + (-0xC)); /* 0x38006AF0: mov ecx, dword ptr [ebp - 0xc] */ 1303 edi = POP32_VAL(esp); /* 0x38006AF3: pop edi */ 1304 esi = POP32_VAL(esp); /* 0x38006AF4: pop esi */ 1305 ebx = POP32_VAL(esp); /* 0x38006AF5: pop ebx */ 1306 MEM32(FS_BASE + (0)) = ecx; /* 0x38006AF6: mov dword ptr fs:[0], ecx */ 1307 esp = ebp; /* 0x38006AFD: mov esp, ebp */ 1308 ebp = POP32_VAL(esp); /* 0x38006AFF: pop ebp */ 1309 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006B00: ret */ 1310 RECOMP_REGS_OUT(); 1311 } 1312 1313 void sub_38006B10(void) { 1314 int _fpu_cmp = 0; 1315 uint32_t _cf = 0; 1316 int _df = 1; 1317 uint32_t _flag_k = FK_NONE; 1318 uint32_t _flag_a = 0, _flag_b = 0; 1319 uint32_t _itail_tgt = 0; 1320 RECOMP_REGS_LOCALS 1321 RECOMP_ENTER(0x38006B10u); 1322 1323 L_38006B10: 1324 eax = MEM32(ecx + 0x60); /* 0x38006B10: mov eax, dword ptr [ecx + 0x60] */ 1325 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006B13: ret */ 1326 RECOMP_REGS_OUT(); 1327 } 1328 1329 void sub_38006B20(void) { 1330 int _fpu_cmp = 0; 1331 uint32_t _cf = 0; 1332 int _df = 1; 1333 uint32_t _flag_k = FK_NONE; 1334 uint32_t _flag_a = 0, _flag_b = 0; 1335 uint32_t _itail_tgt = 0; 1336 RECOMP_REGS_LOCALS 1337 RECOMP_ENTER(0x38006B20u); 1338 1339 L_38006B20: 1340 PUSH32(esp, esi); /* 0x38006B20: push esi */ 1341 esi = ecx; /* 0x38006B21: mov esi, ecx */ 1342 RECOMP_ICALL(0x380082B0u); /* 0x38006B23: call 0x380082b0 */ /* not lifted */ 1343 RECOMP_FLAGS_IN(); 1344 /* test LO8(eax), LO8(eax) */ /* 0x38006B28: test al, al */ 1345 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 1346 _cf = 0; 1347 _flag_k = FK_NARROW(FK_TEST, 24); 1348 ecx = esi; /* 0x38006B2A: mov ecx, esi */ 1349 if (TEST_Z(_flag_a, _flag_b)) goto L_38006B61; /* 0x38006B2C: je 0x38006b61 */ 1350 L_38006B2E: 1351 RECOMP_ICALL(0x380082A0u); /* 0x38006B2E: call 0x380082a0 */ /* not lifted */ 1352 RECOMP_FLAGS_IN(); 1353 /* cmp eax, 1 */ /* 0x38006B33: cmp eax, 1 */ 1354 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 1355 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1356 _flag_k = FK_CMP; 1357 ecx = esi; /* 0x38006B36: mov ecx, esi */ 1358 if (CMP_NE(_flag_a, _flag_b)) goto L_38006B41; /* 0x38006B38: jne 0x38006b41 */ 1359 L_38006B3A: 1360 RECOMP_ICALL(0x38006B70u); /* 0x38006B3A: call 0x38006b70 */ /* not lifted */ 1361 RECOMP_FLAGS_IN(); 1362 esi = POP32_VAL(esp); /* 0x38006B3F: pop esi */ 1363 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006B40: ret */ 1364 L_38006B41: 1365 RECOMP_ICALL(0x380082A0u); /* 0x38006B41: call 0x380082a0 */ /* not lifted */ 1366 RECOMP_FLAGS_IN(); 1367 /* cmp eax, 2 */ /* 0x38006B46: cmp eax, 2 */ 1368 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2); 1369 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1370 _flag_k = FK_CMP; 1371 if (CMP_NE(_flag_a, _flag_b)) goto L_38006B56; /* 0x38006B49: jne 0x38006b56 */ 1372 L_38006B4B: 1373 PUSH32(esp, 0); /* 0x38006B4B: push 0 */ 1374 ecx = esi; /* 0x38006B4D: mov ecx, esi */ 1375 RECOMP_ICALL(0x38006C50u); /* 0x38006B4F: call 0x38006c50 */ /* not lifted */ 1376 RECOMP_FLAGS_IN(); 1377 esi = POP32_VAL(esp); /* 0x38006B54: pop esi */ 1378 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006B55: ret */ 1379 L_38006B56: 1380 PUSH32(esp, 1); /* 0x38006B56: push 1 */ 1381 ecx = esi; /* 0x38006B58: mov ecx, esi */ 1382 RECOMP_ICALL(0x38006C50u); /* 0x38006B5A: call 0x38006c50 */ /* not lifted */ 1383 RECOMP_FLAGS_IN(); 1384 esi = POP32_VAL(esp); /* 0x38006B5F: pop esi */ 1385 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006B60: ret */ 1386 L_38006B61: 1387 RECOMP_ICALL(0x38006D40u); /* 0x38006B61: call 0x38006d40 */ /* not lifted */ 1388 RECOMP_FLAGS_IN(); 1389 esi = POP32_VAL(esp); /* 0x38006B66: pop esi */ 1390 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006B67: ret */ 1391 RECOMP_REGS_OUT(); 1392 } 1393 1394 void sub_38006B70(void) { 1395 int _fpu_cmp = 0; 1396 uint32_t _cf = 0; 1397 int _df = 1; 1398 uint32_t _flag_k = FK_NONE; 1399 uint32_t _flag_a = 0, _flag_b = 0; 1400 uint32_t _itail_tgt = 0; 1401 RECOMP_REGS_LOCALS 1402 RECOMP_ENTER(0x38006B70u); 1403 1404 L_38006B70: 1405 PUSH32(esp, ebp); /* 0x38006B70: push ebp */ 1406 ebp = esp; /* 0x38006B71: mov ebp, esp */ 1407 PUSH32(esp, 0xFFFFFFFFu); /* 0x38006B73: push -1 */ 1408 PUSH32(esp, 0x3804BA3Bu); /* 0x38006B75: push 0x3804ba3b */ 1409 eax = MEM32(FS_BASE + (0)); /* 0x38006B7A: mov eax, dword ptr fs:[0] */ 1410 PUSH32(esp, eax); /* 0x38006B80: push eax */ 1411 MEM32(FS_BASE + (0)) = esp; /* 0x38006B81: mov dword ptr fs:[0], esp */ 1412 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1413 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1414 esp = esp - 0x10u; /* 0x38006B88: sub esp, 0x10 */ 1415 _flag_k = FK_CMP; 1416 PUSH32(esp, esi); /* 0x38006B8B: push esi */ 1417 PUSH32(esp, edi); /* 0x38006B8C: push edi */ 1418 PUSH32(esp, 0x1CCu); /* 0x38006B8D: push 0x1cc */ 1419 edi = ecx; /* 0x38006B92: mov edi, ecx */ 1420 RECOMP_ICALL(0x3804B676u); /* 0x38006B94: call 0x3804b676 */ /* not lifted */ 1421 RECOMP_FLAGS_IN(); 1422 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1423 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1424 esp = esp + 4; /* 0x38006B99: add esp, 4 */ 1425 _flag_k = FK_ADD; 1426 MEM32(ebp + (-0x10)) = eax; /* 0x38006B9C: mov dword ptr [ebp - 0x10], eax */ 1427 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1428 esi = 0; /* 0x38006B9F: xor esi, esi */ 1429 _cf = 0; 1430 _flag_k = FK_TEST; 1431 /* cmp eax, esi */ /* 0x38006BA1: cmp eax, esi */ 1432 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 1433 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1434 _flag_k = FK_CMP; 1435 MEM32(ebp + (-0x4)) = esi; /* 0x38006BA3: mov dword ptr [ebp - 4], esi */ 1436 if (CMP_EQ(_flag_a, _flag_b)) goto L_38006BB1; /* 0x38006BA6: je 0x38006bb1 */ 1437 L_38006BA8: 1438 ecx = eax; /* 0x38006BA8: mov ecx, eax */ 1439 RECOMP_ICALL(0x38001B60u); /* 0x38006BAA: call 0x38001b60 */ /* not lifted */ 1440 RECOMP_FLAGS_IN(); 1441 esi = eax; /* 0x38006BAF: mov esi, eax */ 1442 L_38006BB1: 1443 PUSH32(esp, edi); /* 0x38006BB1: push edi */ 1444 ecx = esi; /* 0x38006BB2: mov ecx, esi */ 1445 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x38006BB4: mov dword ptr [ebp - 4], 0xffffffff */ 1446 RECOMP_ICALL(0x380033B0u); /* 0x38006BBB: call 0x380033b0 */ /* not lifted */ 1447 RECOMP_FLAGS_IN(); 1448 PUSH32(esp, 0x41A00000u); /* 0x38006BC0: push 0x41a00000 */ 1449 ecx = esi; /* 0x38006BC5: mov ecx, esi */ 1450 RECOMP_ICALL(MEM32(0x3804E690)); /* 0x38006BC7: call dword ptr [0x3804e690] */ 1451 RECOMP_FLAGS_IN(); 1452 eax = ebp + (-0x1C); /* 0x38006BCD: lea eax, [ebp - 0x1c] */ 1453 PUSH32(esp, eax); /* 0x38006BD0: push eax */ 1454 ecx = esi; /* 0x38006BD1: mov ecx, esi */ 1455 MEM32(ebp + (-0x1C)) = 0; /* 0x38006BD3: mov dword ptr [ebp - 0x1c], 0 */ 1456 MEM32(ebp + (-0x18)) = 0; /* 0x38006BDA: mov dword ptr [ebp - 0x18], 0 */ 1457 MEM32(ebp + (-0x14)) = 0; /* 0x38006BE1: mov dword ptr [ebp - 0x14], 0 */ 1458 RECOMP_ICALL(MEM32(0x3804E694)); /* 0x38006BE8: call dword ptr [0x3804e694] */ 1459 RECOMP_FLAGS_IN(); 1460 PUSH32(esp, 0x44160000u); /* 0x38006BEE: push 0x44160000 */ 1461 ecx = esi; /* 0x38006BF3: mov ecx, esi */ 1462 RECOMP_ICALL(MEM32(0x3804E6FC)); /* 0x38006BF5: call dword ptr [0x3804e6fc] */ 1463 RECOMP_FLAGS_IN(); 1464 PUSH32(esp, 0x41700000u); /* 0x38006BFB: push 0x41700000 */ 1465 ecx = esi; /* 0x38006C00: mov ecx, esi */ 1466 RECOMP_ICALL(MEM32(0x3804E6F8)); /* 0x38006C02: call dword ptr [0x3804e6f8] */ 1467 RECOMP_FLAGS_IN(); 1468 PUSH32(esp, 0x3F333333u); /* 0x38006C08: push 0x3f333333 */ 1469 ecx = esi; /* 0x38006C0D: mov ecx, esi */ 1470 RECOMP_ICALL(MEM32(0x3804E698)); /* 0x38006C0F: call dword ptr [0x3804e698] */ 1471 RECOMP_FLAGS_IN(); 1472 PUSH32(esp, 0x41700000u); /* 0x38006C15: push 0x41700000 */ 1473 ecx = esi; /* 0x38006C1A: mov ecx, esi */ 1474 RECOMP_ICALL(MEM32(0x3804E700)); /* 0x38006C1C: call dword ptr [0x3804e700] */ 1475 RECOMP_FLAGS_IN(); 1476 PUSH32(esp, 1); /* 0x38006C22: push 1 */ 1477 ecx = esi; /* 0x38006C24: mov ecx, esi */ 1478 RECOMP_ICALL(MEM32(0x3804E6C0)); /* 0x38006C26: call dword ptr [0x3804e6c0] */ 1479 RECOMP_FLAGS_IN(); 1480 ecx = esi; /* 0x38006C2C: mov ecx, esi */ 1481 RECOMP_ICALL(MEM32(0x3804E69C)); /* 0x38006C2E: call dword ptr [0x3804e69c] */ 1482 RECOMP_FLAGS_IN(); 1483 ecx = esi; /* 0x38006C34: mov ecx, esi */ 1484 RECOMP_ICALL(MEM32(0x3804E6A0)); /* 0x38006C36: call dword ptr [0x3804e6a0] */ 1485 RECOMP_FLAGS_IN(); 1486 ecx = MEM32(ebp + (-0xC)); /* 0x38006C3C: mov ecx, dword ptr [ebp - 0xc] */ 1487 edi = POP32_VAL(esp); /* 0x38006C3F: pop edi */ 1488 eax = esi; /* 0x38006C40: mov eax, esi */ 1489 esi = POP32_VAL(esp); /* 0x38006C42: pop esi */ 1490 MEM32(FS_BASE + (0)) = ecx; /* 0x38006C43: mov dword ptr fs:[0], ecx */ 1491 esp = ebp; /* 0x38006C4A: mov esp, ebp */ 1492 ebp = POP32_VAL(esp); /* 0x38006C4C: pop ebp */ 1493 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006C4D: ret */ 1494 RECOMP_REGS_OUT(); 1495 } 1496 1497 void sub_38006BE1(void) { 1498 int _fpu_cmp = 0; 1499 uint32_t _cf = 0; 1500 int _df = 1; 1501 uint32_t _flag_k = FK_NONE; 1502 uint32_t _flag_a = 0, _flag_b = 0; 1503 uint32_t _itail_tgt = 0; 1504 RECOMP_REGS_LOCALS 1505 RECOMP_ENTER(0x38006BE1u); 1506 1507 L_38006BE1: 1508 MEM32(ebp + (-0x14)) = 0; /* 0x38006BE1: mov dword ptr [ebp - 0x14], 0 */ 1509 RECOMP_ICALL(MEM32(0x3804E694)); /* 0x38006BE8: call dword ptr [0x3804e694] */ 1510 RECOMP_FLAGS_IN(); 1511 PUSH32(esp, 0x44160000u); /* 0x38006BEE: push 0x44160000 */ 1512 ecx = esi; /* 0x38006BF3: mov ecx, esi */ 1513 RECOMP_ICALL(MEM32(0x3804E6FC)); /* 0x38006BF5: call dword ptr [0x3804e6fc] */ 1514 RECOMP_FLAGS_IN(); 1515 PUSH32(esp, 0x41700000u); /* 0x38006BFB: push 0x41700000 */ 1516 ecx = esi; /* 0x38006C00: mov ecx, esi */ 1517 RECOMP_ICALL(MEM32(0x3804E6F8)); /* 0x38006C02: call dword ptr [0x3804e6f8] */ 1518 RECOMP_FLAGS_IN(); 1519 PUSH32(esp, 0x3F333333u); /* 0x38006C08: push 0x3f333333 */ 1520 ecx = esi; /* 0x38006C0D: mov ecx, esi */ 1521 RECOMP_ICALL(MEM32(0x3804E698)); /* 0x38006C0F: call dword ptr [0x3804e698] */ 1522 RECOMP_FLAGS_IN(); 1523 PUSH32(esp, 0x41700000u); /* 0x38006C15: push 0x41700000 */ 1524 ecx = esi; /* 0x38006C1A: mov ecx, esi */ 1525 RECOMP_ICALL(MEM32(0x3804E700)); /* 0x38006C1C: call dword ptr [0x3804e700] */ 1526 RECOMP_FLAGS_IN(); 1527 PUSH32(esp, 1); /* 0x38006C22: push 1 */ 1528 ecx = esi; /* 0x38006C24: mov ecx, esi */ 1529 RECOMP_ICALL(MEM32(0x3804E6C0)); /* 0x38006C26: call dword ptr [0x3804e6c0] */ 1530 RECOMP_FLAGS_IN(); 1531 ecx = esi; /* 0x38006C2C: mov ecx, esi */ 1532 RECOMP_ICALL(MEM32(0x3804E69C)); /* 0x38006C2E: call dword ptr [0x3804e69c] */ 1533 RECOMP_FLAGS_IN(); 1534 ecx = esi; /* 0x38006C34: mov ecx, esi */ 1535 RECOMP_ICALL(MEM32(0x3804E6A0)); /* 0x38006C36: call dword ptr [0x3804e6a0] */ 1536 RECOMP_FLAGS_IN(); 1537 ecx = MEM32(ebp + (-0xC)); /* 0x38006C3C: mov ecx, dword ptr [ebp - 0xc] */ 1538 edi = POP32_VAL(esp); /* 0x38006C3F: pop edi */ 1539 eax = esi; /* 0x38006C40: mov eax, esi */ 1540 esi = POP32_VAL(esp); /* 0x38006C42: pop esi */ 1541 MEM32(FS_BASE + (0)) = ecx; /* 0x38006C43: mov dword ptr fs:[0], ecx */ 1542 esp = ebp; /* 0x38006C4A: mov esp, ebp */ 1543 ebp = POP32_VAL(esp); /* 0x38006C4C: pop ebp */ 1544 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006C4D: ret */ 1545 RECOMP_REGS_OUT(); 1546 } 1547 1548 void sub_38006C50(void) { 1549 int _fpu_cmp = 0; 1550 uint32_t _cf = 0; 1551 int _df = 1; 1552 uint32_t _flag_k = FK_NONE; 1553 uint32_t _flag_a = 0, _flag_b = 0; 1554 uint32_t _itail_tgt = 0; 1555 RECOMP_REGS_LOCALS 1556 RECOMP_ENTER(0x38006C50u); 1557 1558 L_38006C50: 1559 PUSH32(esp, ebp); /* 0x38006C50: push ebp */ 1560 ebp = esp; /* 0x38006C51: mov ebp, esp */ 1561 PUSH32(esp, 0xFFFFFFFFu); /* 0x38006C53: push -1 */ 1562 PUSH32(esp, 0x3804BA5Bu); /* 0x38006C55: push 0x3804ba5b */ 1563 eax = MEM32(FS_BASE + (0)); /* 0x38006C5A: mov eax, dword ptr fs:[0] */ 1564 PUSH32(esp, eax); /* 0x38006C60: push eax */ 1565 MEM32(FS_BASE + (0)) = esp; /* 0x38006C61: mov dword ptr fs:[0], esp */ 1566 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1567 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1568 esp = esp - 0x10u; /* 0x38006C68: sub esp, 0x10 */ 1569 _flag_k = FK_CMP; 1570 PUSH32(esp, esi); /* 0x38006C6B: push esi */ 1571 PUSH32(esp, edi); /* 0x38006C6C: push edi */ 1572 PUSH32(esp, 0x1F8u); /* 0x38006C6D: push 0x1f8 */ 1573 edi = ecx; /* 0x38006C72: mov edi, ecx */ 1574 RECOMP_ICALL(0x3804B676u); /* 0x38006C74: call 0x3804b676 */ /* not lifted */ 1575 RECOMP_FLAGS_IN(); 1576 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1577 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1578 esp = esp + 4; /* 0x38006C79: add esp, 4 */ 1579 _flag_k = FK_ADD; 1580 MEM32(ebp + (-0x10)) = eax; /* 0x38006C7C: mov dword ptr [ebp - 0x10], eax */ 1581 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1582 esi = 0; /* 0x38006C7F: xor esi, esi */ 1583 _cf = 0; 1584 _flag_k = FK_TEST; 1585 /* cmp eax, esi */ /* 0x38006C81: cmp eax, esi */ 1586 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 1587 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1588 _flag_k = FK_CMP; 1589 MEM32(ebp + (-0x4)) = esi; /* 0x38006C83: mov dword ptr [ebp - 4], esi */ 1590 if (CMP_EQ(_flag_a, _flag_b)) goto L_38006C95; /* 0x38006C86: je 0x38006c95 */ 1591 L_38006C88: 1592 ecx = MEM32(ebp + 0x8); /* 0x38006C88: mov ecx, dword ptr [ebp + 8] */ 1593 PUSH32(esp, ecx); /* 0x38006C8B: push ecx */ 1594 ecx = eax; /* 0x38006C8C: mov ecx, eax */ 1595 RECOMP_ICALL(0x38005060u); /* 0x38006C8E: call 0x38005060 */ /* not lifted */ 1596 RECOMP_FLAGS_IN(); 1597 esi = eax; /* 0x38006C93: mov esi, eax */ 1598 L_38006C95: 1599 PUSH32(esp, edi); /* 0x38006C95: push edi */ 1600 ecx = esi; /* 0x38006C96: mov ecx, esi */ 1601 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x38006C98: mov dword ptr [ebp - 4], 0xffffffff */ 1602 RECOMP_ICALL(0x380033B0u); /* 0x38006C9F: call 0x380033b0 */ /* not lifted */ 1603 RECOMP_FLAGS_IN(); 1604 PUSH32(esp, 0x41A00000u); /* 0x38006CA4: push 0x41a00000 */ 1605 ecx = esi; /* 0x38006CA9: mov ecx, esi */ 1606 RECOMP_ICALL(MEM32(0x3804E690)); /* 0x38006CAB: call dword ptr [0x3804e690] */ 1607 RECOMP_FLAGS_IN(); 1608 edx = ebp + (-0x1C); /* 0x38006CB1: lea edx, [ebp - 0x1c] */ 1609 PUSH32(esp, edx); /* 0x38006CB4: push edx */ 1610 ecx = esi; /* 0x38006CB5: mov ecx, esi */ 1611 MEM32(ebp + (-0x1C)) = 0; /* 0x38006CB7: mov dword ptr [ebp - 0x1c], 0 */ 1612 MEM32(ebp + (-0x18)) = 0; /* 0x38006CBE: mov dword ptr [ebp - 0x18], 0 */ 1613 MEM32(ebp + (-0x14)) = 0; /* 0x38006CC5: mov dword ptr [ebp - 0x14], 0 */ 1614 RECOMP_ICALL(MEM32(0x3804E694)); /* 0x38006CCC: call dword ptr [0x3804e694] */ 1615 RECOMP_FLAGS_IN(); 1616 PUSH32(esp, 0x44160000u); /* 0x38006CD2: push 0x44160000 */ 1617 ecx = esi; /* 0x38006CD7: mov ecx, esi */ 1618 RECOMP_ICALL(MEM32(0x3804E6FC)); /* 0x38006CD9: call dword ptr [0x3804e6fc] */ 1619 RECOMP_FLAGS_IN(); 1620 PUSH32(esp, 0x41700000u); /* 0x38006CDF: push 0x41700000 */ 1621 ecx = esi; /* 0x38006CE4: mov ecx, esi */ 1622 RECOMP_ICALL(MEM32(0x3804E6F8)); /* 0x38006CE6: call dword ptr [0x3804e6f8] */ 1623 RECOMP_FLAGS_IN(); 1624 PUSH32(esp, 0x3F333333u); /* 0x38006CEC: push 0x3f333333 */ 1625 ecx = esi; /* 0x38006CF1: mov ecx, esi */ 1626 RECOMP_ICALL(MEM32(0x3804E698)); /* 0x38006CF3: call dword ptr [0x3804e698] */ 1627 RECOMP_FLAGS_IN(); 1628 PUSH32(esp, 0x41700000u); /* 0x38006CF9: push 0x41700000 */ 1629 ecx = esi; /* 0x38006CFE: mov ecx, esi */ 1630 RECOMP_ICALL(MEM32(0x3804E700)); /* 0x38006D00: call dword ptr [0x3804e700] */ 1631 RECOMP_FLAGS_IN(); 1632 PUSH32(esp, 1); /* 0x38006D06: push 1 */ 1633 ecx = esi; /* 0x38006D08: mov ecx, esi */ 1634 RECOMP_ICALL(MEM32(0x3804E6C0)); /* 0x38006D0A: call dword ptr [0x3804e6c0] */ 1635 RECOMP_FLAGS_IN(); 1636 ecx = esi; /* 0x38006D10: mov ecx, esi */ 1637 RECOMP_ICALL(MEM32(0x3804E69C)); /* 0x38006D12: call dword ptr [0x3804e69c] */ 1638 RECOMP_FLAGS_IN(); 1639 ecx = esi; /* 0x38006D18: mov ecx, esi */ 1640 RECOMP_ICALL(MEM32(0x3804E6A0)); /* 0x38006D1A: call dword ptr [0x3804e6a0] */ 1641 RECOMP_FLAGS_IN(); 1642 ecx = MEM32(ebp + (-0xC)); /* 0x38006D20: mov ecx, dword ptr [ebp - 0xc] */ 1643 edi = POP32_VAL(esp); /* 0x38006D23: pop edi */ 1644 eax = esi; /* 0x38006D24: mov eax, esi */ 1645 esi = POP32_VAL(esp); /* 0x38006D26: pop esi */ 1646 MEM32(FS_BASE + (0)) = ecx; /* 0x38006D27: mov dword ptr fs:[0], ecx */ 1647 esp = ebp; /* 0x38006D2E: mov esp, ebp */ 1648 ebp = POP32_VAL(esp); /* 0x38006D30: pop ebp */ 1649 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38006D31: ret 4 */ 1650 RECOMP_REGS_OUT(); 1651 } 1652 1653 void sub_38006CC5(void) { 1654 int _fpu_cmp = 0; 1655 uint32_t _cf = 0; 1656 int _df = 1; 1657 uint32_t _flag_k = FK_NONE; 1658 uint32_t _flag_a = 0, _flag_b = 0; 1659 uint32_t _itail_tgt = 0; 1660 RECOMP_REGS_LOCALS 1661 RECOMP_ENTER(0x38006CC5u); 1662 1663 L_38006CC5: 1664 MEM32(ebp + (-0x14)) = 0; /* 0x38006CC5: mov dword ptr [ebp - 0x14], 0 */ 1665 RECOMP_ICALL(MEM32(0x3804E694)); /* 0x38006CCC: call dword ptr [0x3804e694] */ 1666 RECOMP_FLAGS_IN(); 1667 PUSH32(esp, 0x44160000u); /* 0x38006CD2: push 0x44160000 */ 1668 ecx = esi; /* 0x38006CD7: mov ecx, esi */ 1669 RECOMP_ICALL(MEM32(0x3804E6FC)); /* 0x38006CD9: call dword ptr [0x3804e6fc] */ 1670 RECOMP_FLAGS_IN(); 1671 PUSH32(esp, 0x41700000u); /* 0x38006CDF: push 0x41700000 */ 1672 ecx = esi; /* 0x38006CE4: mov ecx, esi */ 1673 RECOMP_ICALL(MEM32(0x3804E6F8)); /* 0x38006CE6: call dword ptr [0x3804e6f8] */ 1674 RECOMP_FLAGS_IN(); 1675 PUSH32(esp, 0x3F333333u); /* 0x38006CEC: push 0x3f333333 */ 1676 ecx = esi; /* 0x38006CF1: mov ecx, esi */ 1677 RECOMP_ICALL(MEM32(0x3804E698)); /* 0x38006CF3: call dword ptr [0x3804e698] */ 1678 RECOMP_FLAGS_IN(); 1679 PUSH32(esp, 0x41700000u); /* 0x38006CF9: push 0x41700000 */ 1680 ecx = esi; /* 0x38006CFE: mov ecx, esi */ 1681 RECOMP_ICALL(MEM32(0x3804E700)); /* 0x38006D00: call dword ptr [0x3804e700] */ 1682 RECOMP_FLAGS_IN(); 1683 PUSH32(esp, 1); /* 0x38006D06: push 1 */ 1684 ecx = esi; /* 0x38006D08: mov ecx, esi */ 1685 RECOMP_ICALL(MEM32(0x3804E6C0)); /* 0x38006D0A: call dword ptr [0x3804e6c0] */ 1686 RECOMP_FLAGS_IN(); 1687 ecx = esi; /* 0x38006D10: mov ecx, esi */ 1688 RECOMP_ICALL(MEM32(0x3804E69C)); /* 0x38006D12: call dword ptr [0x3804e69c] */ 1689 RECOMP_FLAGS_IN(); 1690 ecx = esi; /* 0x38006D18: mov ecx, esi */ 1691 RECOMP_ICALL(MEM32(0x3804E6A0)); /* 0x38006D1A: call dword ptr [0x3804e6a0] */ 1692 RECOMP_FLAGS_IN(); 1693 ecx = MEM32(ebp + (-0xC)); /* 0x38006D20: mov ecx, dword ptr [ebp - 0xc] */ 1694 edi = POP32_VAL(esp); /* 0x38006D23: pop edi */ 1695 eax = esi; /* 0x38006D24: mov eax, esi */ 1696 esi = POP32_VAL(esp); /* 0x38006D26: pop esi */ 1697 MEM32(FS_BASE + (0)) = ecx; /* 0x38006D27: mov dword ptr fs:[0], ecx */ 1698 esp = ebp; /* 0x38006D2E: mov esp, ebp */ 1699 ebp = POP32_VAL(esp); /* 0x38006D30: pop ebp */ 1700 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38006D31: ret 4 */ 1701 RECOMP_REGS_OUT(); 1702 } 1703 1704 void sub_38006D40(void) { 1705 int _fpu_cmp = 0; 1706 uint32_t _cf = 0; 1707 int _df = 1; 1708 uint32_t _flag_k = FK_NONE; 1709 uint32_t _flag_a = 0, _flag_b = 0; 1710 uint32_t _itail_tgt = 0; 1711 RECOMP_REGS_LOCALS 1712 RECOMP_ENTER(0x38006D40u); 1713 1714 L_38006D40: 1715 PUSH32(esp, ebp); /* 0x38006D40: push ebp */ 1716 ebp = esp; /* 0x38006D41: mov ebp, esp */ 1717 PUSH32(esp, 0xFFFFFFFFu); /* 0x38006D43: push -1 */ 1718 PUSH32(esp, 0x3804BA7Bu); /* 0x38006D45: push 0x3804ba7b */ 1719 eax = MEM32(FS_BASE + (0)); /* 0x38006D4A: mov eax, dword ptr fs:[0] */ 1720 PUSH32(esp, eax); /* 0x38006D50: push eax */ 1721 MEM32(FS_BASE + (0)) = esp; /* 0x38006D51: mov dword ptr fs:[0], esp */ 1722 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1723 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1724 esp = esp - 0x10u; /* 0x38006D58: sub esp, 0x10 */ 1725 _flag_k = FK_CMP; 1726 PUSH32(esp, esi); /* 0x38006D5B: push esi */ 1727 PUSH32(esp, edi); /* 0x38006D5C: push edi */ 1728 PUSH32(esp, 0x1E0u); /* 0x38006D5D: push 0x1e0 */ 1729 edi = ecx; /* 0x38006D62: mov edi, ecx */ 1730 RECOMP_ICALL(0x3804B676u); /* 0x38006D64: call 0x3804b676 */ /* not lifted */ 1731 RECOMP_FLAGS_IN(); 1732 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1733 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1734 esp = esp + 4; /* 0x38006D69: add esp, 4 */ 1735 _flag_k = FK_ADD; 1736 MEM32(ebp + (-0x10)) = eax; /* 0x38006D6C: mov dword ptr [ebp - 0x10], eax */ 1737 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1738 esi = 0; /* 0x38006D6F: xor esi, esi */ 1739 _cf = 0; 1740 _flag_k = FK_TEST; 1741 /* cmp eax, esi */ /* 0x38006D71: cmp eax, esi */ 1742 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 1743 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1744 _flag_k = FK_CMP; 1745 MEM32(ebp + (-0x4)) = esi; /* 0x38006D73: mov dword ptr [ebp - 4], esi */ 1746 if (CMP_EQ(_flag_a, _flag_b)) goto L_38006D81; /* 0x38006D76: je 0x38006d81 */ 1747 L_38006D78: 1748 ecx = eax; /* 0x38006D78: mov ecx, eax */ 1749 RECOMP_ICALL(0x38004540u); /* 0x38006D7A: call 0x38004540 */ /* not lifted */ 1750 RECOMP_FLAGS_IN(); 1751 esi = eax; /* 0x38006D7F: mov esi, eax */ 1752 L_38006D81: 1753 PUSH32(esp, edi); /* 0x38006D81: push edi */ 1754 ecx = esi; /* 0x38006D82: mov ecx, esi */ 1755 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x38006D84: mov dword ptr [ebp - 4], 0xffffffff */ 1756 RECOMP_ICALL(0x380033B0u); /* 0x38006D8B: call 0x380033b0 */ /* not lifted */ 1757 RECOMP_FLAGS_IN(); 1758 PUSH32(esp, 0x41A00000u); /* 0x38006D90: push 0x41a00000 */ 1759 ecx = esi; /* 0x38006D95: mov ecx, esi */ 1760 RECOMP_ICALL(MEM32(0x3804E690)); /* 0x38006D97: call dword ptr [0x3804e690] */ 1761 RECOMP_FLAGS_IN(); 1762 eax = ebp + (-0x1C); /* 0x38006D9D: lea eax, [ebp - 0x1c] */ 1763 PUSH32(esp, eax); /* 0x38006DA0: push eax */ 1764 ecx = esi; /* 0x38006DA1: mov ecx, esi */ 1765 MEM32(ebp + (-0x1C)) = 0; /* 0x38006DA3: mov dword ptr [ebp - 0x1c], 0 */ 1766 MEM32(ebp + (-0x18)) = 0; /* 0x38006DAA: mov dword ptr [ebp - 0x18], 0 */ 1767 MEM32(ebp + (-0x14)) = 0; /* 0x38006DB1: mov dword ptr [ebp - 0x14], 0 */ 1768 RECOMP_ICALL(MEM32(0x3804E694)); /* 0x38006DB8: call dword ptr [0x3804e694] */ 1769 RECOMP_FLAGS_IN(); 1770 PUSH32(esp, 0x44160000u); /* 0x38006DBE: push 0x44160000 */ 1771 ecx = esi; /* 0x38006DC3: mov ecx, esi */ 1772 RECOMP_ICALL(MEM32(0x3804E6FC)); /* 0x38006DC5: call dword ptr [0x3804e6fc] */ 1773 RECOMP_FLAGS_IN(); 1774 PUSH32(esp, 0x41700000u); /* 0x38006DCB: push 0x41700000 */ 1775 ecx = esi; /* 0x38006DD0: mov ecx, esi */ 1776 RECOMP_ICALL(MEM32(0x3804E6F8)); /* 0x38006DD2: call dword ptr [0x3804e6f8] */ 1777 RECOMP_FLAGS_IN(); 1778 PUSH32(esp, 0x3F333333u); /* 0x38006DD8: push 0x3f333333 */ 1779 ecx = esi; /* 0x38006DDD: mov ecx, esi */ 1780 RECOMP_ICALL(MEM32(0x3804E698)); /* 0x38006DDF: call dword ptr [0x3804e698] */ 1781 RECOMP_FLAGS_IN(); 1782 PUSH32(esp, 0x41700000u); /* 0x38006DE5: push 0x41700000 */ 1783 ecx = esi; /* 0x38006DEA: mov ecx, esi */ 1784 RECOMP_ICALL(MEM32(0x3804E700)); /* 0x38006DEC: call dword ptr [0x3804e700] */ 1785 RECOMP_FLAGS_IN(); 1786 PUSH32(esp, 1); /* 0x38006DF2: push 1 */ 1787 ecx = esi; /* 0x38006DF4: mov ecx, esi */ 1788 RECOMP_ICALL(MEM32(0x3804E6C0)); /* 0x38006DF6: call dword ptr [0x3804e6c0] */ 1789 RECOMP_FLAGS_IN(); 1790 ecx = esi; /* 0x38006DFC: mov ecx, esi */ 1791 RECOMP_ICALL(MEM32(0x3804E69C)); /* 0x38006DFE: call dword ptr [0x3804e69c] */ 1792 RECOMP_FLAGS_IN(); 1793 ecx = esi; /* 0x38006E04: mov ecx, esi */ 1794 RECOMP_ICALL(MEM32(0x3804E6A0)); /* 0x38006E06: call dword ptr [0x3804e6a0] */ 1795 RECOMP_FLAGS_IN(); 1796 ecx = MEM32(ebp + (-0xC)); /* 0x38006E0C: mov ecx, dword ptr [ebp - 0xc] */ 1797 edi = POP32_VAL(esp); /* 0x38006E0F: pop edi */ 1798 eax = esi; /* 0x38006E10: mov eax, esi */ 1799 esi = POP32_VAL(esp); /* 0x38006E12: pop esi */ 1800 MEM32(FS_BASE + (0)) = ecx; /* 0x38006E13: mov dword ptr fs:[0], ecx */ 1801 esp = ebp; /* 0x38006E1A: mov esp, ebp */ 1802 ebp = POP32_VAL(esp); /* 0x38006E1C: pop ebp */ 1803 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006E1D: ret */ 1804 RECOMP_REGS_OUT(); 1805 } 1806 1807 void sub_38006DB1(void) { 1808 int _fpu_cmp = 0; 1809 uint32_t _cf = 0; 1810 int _df = 1; 1811 uint32_t _flag_k = FK_NONE; 1812 uint32_t _flag_a = 0, _flag_b = 0; 1813 uint32_t _itail_tgt = 0; 1814 RECOMP_REGS_LOCALS 1815 RECOMP_ENTER(0x38006DB1u); 1816 1817 L_38006DB1: 1818 MEM32(ebp + (-0x14)) = 0; /* 0x38006DB1: mov dword ptr [ebp - 0x14], 0 */ 1819 RECOMP_ICALL(MEM32(0x3804E694)); /* 0x38006DB8: call dword ptr [0x3804e694] */ 1820 RECOMP_FLAGS_IN(); 1821 PUSH32(esp, 0x44160000u); /* 0x38006DBE: push 0x44160000 */ 1822 ecx = esi; /* 0x38006DC3: mov ecx, esi */ 1823 RECOMP_ICALL(MEM32(0x3804E6FC)); /* 0x38006DC5: call dword ptr [0x3804e6fc] */ 1824 RECOMP_FLAGS_IN(); 1825 PUSH32(esp, 0x41700000u); /* 0x38006DCB: push 0x41700000 */ 1826 ecx = esi; /* 0x38006DD0: mov ecx, esi */ 1827 RECOMP_ICALL(MEM32(0x3804E6F8)); /* 0x38006DD2: call dword ptr [0x3804e6f8] */ 1828 RECOMP_FLAGS_IN(); 1829 PUSH32(esp, 0x3F333333u); /* 0x38006DD8: push 0x3f333333 */ 1830 ecx = esi; /* 0x38006DDD: mov ecx, esi */ 1831 RECOMP_ICALL(MEM32(0x3804E698)); /* 0x38006DDF: call dword ptr [0x3804e698] */ 1832 RECOMP_FLAGS_IN(); 1833 PUSH32(esp, 0x41700000u); /* 0x38006DE5: push 0x41700000 */ 1834 ecx = esi; /* 0x38006DEA: mov ecx, esi */ 1835 RECOMP_ICALL(MEM32(0x3804E700)); /* 0x38006DEC: call dword ptr [0x3804e700] */ 1836 RECOMP_FLAGS_IN(); 1837 PUSH32(esp, 1); /* 0x38006DF2: push 1 */ 1838 ecx = esi; /* 0x38006DF4: mov ecx, esi */ 1839 RECOMP_ICALL(MEM32(0x3804E6C0)); /* 0x38006DF6: call dword ptr [0x3804e6c0] */ 1840 RECOMP_FLAGS_IN(); 1841 ecx = esi; /* 0x38006DFC: mov ecx, esi */ 1842 RECOMP_ICALL(MEM32(0x3804E69C)); /* 0x38006DFE: call dword ptr [0x3804e69c] */ 1843 RECOMP_FLAGS_IN(); 1844 ecx = esi; /* 0x38006E04: mov ecx, esi */ 1845 RECOMP_ICALL(MEM32(0x3804E6A0)); /* 0x38006E06: call dword ptr [0x3804e6a0] */ 1846 RECOMP_FLAGS_IN(); 1847 ecx = MEM32(ebp + (-0xC)); /* 0x38006E0C: mov ecx, dword ptr [ebp - 0xc] */ 1848 edi = POP32_VAL(esp); /* 0x38006E0F: pop edi */ 1849 eax = esi; /* 0x38006E10: mov eax, esi */ 1850 esi = POP32_VAL(esp); /* 0x38006E12: pop esi */ 1851 MEM32(FS_BASE + (0)) = ecx; /* 0x38006E13: mov dword ptr fs:[0], ecx */ 1852 esp = ebp; /* 0x38006E1A: mov esp, ebp */ 1853 ebp = POP32_VAL(esp); /* 0x38006E1C: pop ebp */ 1854 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006E1D: ret */ 1855 RECOMP_REGS_OUT(); 1856 } 1857 1858 void sub_38006E20(void) { 1859 int _fpu_cmp = 0; 1860 uint32_t _cf = 0; 1861 int _df = 1; 1862 uint32_t _flag_k = FK_NONE; 1863 uint32_t _flag_a = 0, _flag_b = 0; 1864 uint32_t _itail_tgt = 0; 1865 RECOMP_REGS_LOCALS 1866 RECOMP_ENTER(0x38006E20u); 1867 1868 L_38006E20: 1869 PUSH32(esp, ebp); /* 0x38006E20: push ebp */ 1870 ebp = esp; /* 0x38006E21: mov ebp, esp */ 1871 PUSH32(esp, 0xFFFFFFFFu); /* 0x38006E23: push -1 */ 1872 PUSH32(esp, 0x3804BA9Bu); /* 0x38006E25: push 0x3804ba9b */ 1873 eax = MEM32(FS_BASE + (0)); /* 0x38006E2A: mov eax, dword ptr fs:[0] */ 1874 PUSH32(esp, eax); /* 0x38006E30: push eax */ 1875 MEM32(FS_BASE + (0)) = esp; /* 0x38006E31: mov dword ptr fs:[0], esp */ 1876 PUSH32(esp, ecx); /* 0x38006E38: push ecx */ 1877 PUSH32(esp, esi); /* 0x38006E39: push esi */ 1878 esi = ecx; /* 0x38006E3A: mov esi, ecx */ 1879 eax = MEM32(esi + 0x128); /* 0x38006E3C: mov eax, dword ptr [esi + 0x128] */ 1880 /* test eax, eax */ /* 0x38006E42: test eax, eax */ 1881 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1882 _cf = 0; 1883 _flag_k = FK_TEST; 1884 if (TEST_NZ(_flag_a, _flag_b)) goto L_38006EBB; /* 0x38006E44: jne 0x38006ebb */ 1885 L_38006E46: 1886 RECOMP_ICALL(0x38018E90u); /* 0x38006E46: call 0x38018e90 */ /* not lifted */ 1887 RECOMP_FLAGS_IN(); 1888 /* test eax, eax */ /* 0x38006E4B: test eax, eax */ 1889 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1890 _cf = 0; 1891 _flag_k = FK_TEST; 1892 if (TEST_Z(_flag_a, _flag_b)) goto L_38006EB9; /* 0x38006E4D: je 0x38006eb9 */ 1893 L_38006E4F: 1894 ecx = esi; /* 0x38006E4F: mov ecx, esi */ 1895 RECOMP_ICALL(0x38018E90u); /* 0x38006E51: call 0x38018e90 */ /* not lifted */ 1896 RECOMP_FLAGS_IN(); 1897 ecx = eax; /* 0x38006E56: mov ecx, eax */ 1898 RECOMP_ICALL(0x38039DC0u); /* 0x38006E58: call 0x38039dc0 */ /* not lifted */ 1899 RECOMP_FLAGS_IN(); 1900 /* test LO8(eax), LO8(eax) */ /* 0x38006E5D: test al, al */ 1901 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 1902 _cf = 0; 1903 _flag_k = FK_NARROW(FK_TEST, 24); 1904 if (TEST_Z(_flag_a, _flag_b)) goto L_38006EB9; /* 0x38006E5F: je 0x38006eb9 */ 1905 L_38006E61: 1906 PUSH32(esp, edi); /* 0x38006E61: push edi */ 1907 PUSH32(esp, 0x10u); /* 0x38006E62: push 0x10 */ 1908 RECOMP_ICALL(0x3804B676u); /* 0x38006E64: call 0x3804b676 */ /* not lifted */ 1909 RECOMP_FLAGS_IN(); 1910 edi = eax; /* 0x38006E69: mov edi, eax */ 1911 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1912 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1913 esp = esp + 4; /* 0x38006E6B: add esp, 4 */ 1914 _flag_k = FK_ADD; 1915 MEM32(ebp + (-0x10)) = edi; /* 0x38006E6E: mov dword ptr [ebp - 0x10], edi */ 1916 /* test edi, edi */ /* 0x38006E71: test edi, edi */ 1917 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 1918 _cf = 0; 1919 _flag_k = FK_TEST; 1920 MEM32(ebp + (-0x4)) = 0; /* 0x38006E73: mov dword ptr [ebp - 4], 0 */ 1921 if (TEST_Z(_flag_a, _flag_b)) goto L_38006EA1; /* 0x38006E7A: je 0x38006ea1 */ 1922 L_38006E7C: 1923 ecx = esi; /* 0x38006E7C: mov ecx, esi */ 1924 RECOMP_ICALL(0x38018E90u); /* 0x38006E7E: call 0x38018e90 */ /* not lifted */ 1925 RECOMP_FLAGS_IN(); 1926 PUSH32(esp, eax); /* 0x38006E83: push eax */ 1927 ecx = edi; /* 0x38006E84: mov ecx, edi */ 1928 RECOMP_ICALL(0x3801F5C0u); /* 0x38006E86: call 0x3801f5c0 */ /* not lifted */ 1929 RECOMP_FLAGS_IN(); 1930 edi = POP32_VAL(esp); /* 0x38006E8B: pop edi */ 1931 MEM32(esi + 0x128) = eax; /* 0x38006E8C: mov dword ptr [esi + 0x128], eax */ 1932 esi = POP32_VAL(esp); /* 0x38006E92: pop esi */ 1933 ecx = MEM32(ebp + (-0xC)); /* 0x38006E93: mov ecx, dword ptr [ebp - 0xc] */ 1934 MEM32(FS_BASE + (0)) = ecx; /* 0x38006E96: mov dword ptr fs:[0], ecx */ 1935 esp = ebp; /* 0x38006E9D: mov esp, ebp */ 1936 ebp = POP32_VAL(esp); /* 0x38006E9F: pop ebp */ 1937 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006EA0: ret */ 1938 L_38006EA1: 1939 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1940 eax = 0; /* 0x38006EA1: xor eax, eax */ 1941 _cf = 0; 1942 _flag_k = FK_TEST; 1943 edi = POP32_VAL(esp); /* 0x38006EA3: pop edi */ 1944 MEM32(esi + 0x128) = eax; /* 0x38006EA4: mov dword ptr [esi + 0x128], eax */ 1945 esi = POP32_VAL(esp); /* 0x38006EAA: pop esi */ 1946 ecx = MEM32(ebp + (-0xC)); /* 0x38006EAB: mov ecx, dword ptr [ebp - 0xc] */ 1947 MEM32(FS_BASE + (0)) = ecx; /* 0x38006EAE: mov dword ptr fs:[0], ecx */ 1948 esp = ebp; /* 0x38006EB5: mov esp, ebp */ 1949 ebp = POP32_VAL(esp); /* 0x38006EB7: pop ebp */ 1950 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006EB8: ret */ 1951 L_38006EB9: 1952 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1953 eax = 0; /* 0x38006EB9: xor eax, eax */ 1954 _cf = 0; 1955 _flag_k = FK_TEST; 1956 L_38006EBB: 1957 ecx = MEM32(ebp + (-0xC)); /* 0x38006EBB: mov ecx, dword ptr [ebp - 0xc] */ 1958 esi = POP32_VAL(esp); /* 0x38006EBE: pop esi */ 1959 MEM32(FS_BASE + (0)) = ecx; /* 0x38006EBF: mov dword ptr fs:[0], ecx */ 1960 esp = ebp; /* 0x38006EC6: mov esp, ebp */ 1961 ebp = POP32_VAL(esp); /* 0x38006EC8: pop ebp */ 1962 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38006EC9: ret */ 1963 RECOMP_REGS_OUT(); 1964 } 1965 1966 void sub_38006ED0(void) { 1967 int _fpu_cmp = 0; 1968 uint32_t _cf = 0; 1969 int _df = 1; 1970 uint32_t _flag_k = FK_NONE; 1971 uint32_t _flag_a = 0, _flag_b = 0; 1972 uint32_t _itail_tgt = 0; 1973 RECOMP_REGS_LOCALS 1974 RECOMP_ENTER(0x38006ED0u); 1975 1976 L_38006ED0: 1977 ecx = MEM32(ecx + 0xE8); /* 0x38006ED0: mov ecx, dword ptr [ecx + 0xe8] */ 1978 L_38006ED6: 1979 eax = MEM32(ecx); /* 0x38006ED6: mov eax, dword ptr [ecx] */ 1980 L_38006ED8: 1981 { _itail_tgt = (uint32_t)(MEM32(eax + 0xC)); goto _ljump; } 1982 { RECOMP_REGS_OUT(); return; } /* end of function */ 1983 _ljump: 1984 switch (_itail_tgt) { 1985 case 0x38006ED0u: goto L_38006ED0; 1986 case 0x38006ED6u: goto L_38006ED6; 1987 case 0x38006ED8u: goto L_38006ED8; 1988 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1989 } 1990 RECOMP_REGS_OUT(); 1991 } 1992 1993 void sub_38006EE0(void) { 1994 int _fpu_cmp = 0; 1995 uint32_t _cf = 0; 1996 int _df = 1; 1997 uint32_t _flag_k = FK_NONE; 1998 uint32_t _flag_a = 0, _flag_b = 0; 1999 uint32_t _itail_tgt = 0; 2000 RECOMP_REGS_LOCALS 2001 RECOMP_ENTER(0x38006EE0u); 2002 2003 L_38006EE0: 2004 PUSH32(esp, ebp); /* 0x38006EE0: push ebp */ 2005 ebp = esp; /* 0x38006EE1: mov ebp, esp */ 2006 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 2007 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2008 esp = esp - 0x10u; /* 0x38006EE3: sub esp, 0x10 */ 2009 _flag_k = FK_CMP; 2010 PUSH32(esp, ebx); /* 0x38006EE6: push ebx */ 2011 ebx = ecx; /* 0x38006EE7: mov ebx, ecx */ 2012 eax = MEM32(ebx + 0x60); /* 0x38006EE9: mov eax, dword ptr [ebx + 0x60] */ 2013 edx = MEM32(ebx + 0x198); /* 0x38006EEC: mov edx, dword ptr [ebx + 0x198] */ 2014 PUSH32(esp, esi); /* 0x38006EF2: push esi */ 2015 MEM32(ebp + (-0x4)) = eax; /* 0x38006EF3: mov dword ptr [ebp - 4], eax */ 2016 eax = MEM32(ebp + 0x8); /* 0x38006EF6: mov eax, dword ptr [ebp + 8] */ 2017 ecx = MEM32(eax + 0x4); /* 0x38006EF9: mov ecx, dword ptr [eax + 4] */ 2018 /* cmp ecx, edx */ /* 0x38006EFC: cmp ecx, edx */ 2019 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 2020 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2021 _flag_k = FK_CMP; 2022 esi = ebx + 0x194; /* 0x38006EFE: lea esi, [ebx + 0x194] */ 2023 PUSH32(esp, edi); /* 0x38006F04: push edi */ 2024 if (CMP_NE(_flag_a, _flag_b)) goto L_38006F11; /* 0x38006F05: jne 0x38006f11 */ 2025 L_38006F07: 2026 edx = MEM32(eax); /* 0x38006F07: mov edx, dword ptr [eax] */ 2027 /* cmp edx, MEM32(esi) */ /* 0x38006F09: cmp edx, dword ptr [esi] */ 2028 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi)); 2029 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2030 _flag_k = FK_CMP; 2031 if (CMP_EQ(_flag_a, _flag_b)) goto L_38007005; /* 0x38006F0B: je 0x38007005 */ 2032 L_38006F11: 2033 /* cmp MEM32(esi), 0 */ /* 0x38006F11: cmp dword ptr [esi], 0 */ 2034 _flag_a = (uint32_t)(MEM32(esi)); _flag_b = (uint32_t)(0); 2035 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2036 _flag_k = FK_CMP; 2037 if (CMP_NE(_flag_a, _flag_b)) goto L_38006F1D; /* 0x38006F14: jne 0x38006f1d */ 2038 L_38006F16: 2039 ecx = MEM32(esi + 0x4); /* 0x38006F16: mov ecx, dword ptr [esi + 4] */ 2040 /* test ecx, ecx */ /* 0x38006F19: test ecx, ecx */ 2041 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 2042 _cf = 0; 2043 _flag_k = FK_TEST; 2044 if (TEST_Z(_flag_a, _flag_b)) goto L_38006F65; /* 0x38006F1B: je 0x38006f65 */ 2045 L_38006F1D: 2046 PUSH32(esp, esi); /* 0x38006F1D: push esi */ 2047 RECOMP_ICALL(0x38017D70u); /* 0x38006F1E: call 0x38017d70 */ /* not lifted */ 2048 RECOMP_FLAGS_IN(); 2049 edi = eax; /* 0x38006F23: mov edi, eax */ 2050 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2051 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2052 esp = esp + 4; /* 0x38006F25: add esp, 4 */ 2053 _flag_k = FK_ADD; 2054 /* test edi, edi */ /* 0x38006F28: test edi, edi */ 2055 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 2056 _cf = 0; 2057 _flag_k = FK_TEST; 2058 if (TEST_Z(_flag_a, _flag_b)) goto L_38006F58; /* 0x38006F2A: je 0x38006f58 */ 2059 L_38006F2C: 2060 ecx = MEM32(ebp + (-0x4)); /* 0x38006F2C: mov ecx, dword ptr [ebp - 4] */ 2061 PUSH32(esp, 0); /* 0x38006F2F: push 0 */ 2062 RECOMP_ICALL(0x38001D70u); /* 0x38006F31: call 0x38001d70 */ /* not lifted */ 2063 RECOMP_FLAGS_IN(); 2064 /* test ebx, ebx */ /* 0x38006F36: test ebx, ebx */ 2065 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 2066 _cf = 0; 2067 _flag_k = FK_TEST; 2068 if (TEST_Z(_flag_a, _flag_b)) goto L_38006F4B; /* 0x38006F38: je 0x38006f4b */ 2069 L_38006F3A: 2070 eax = ebx + 0xB4; /* 0x38006F3A: lea eax, [ebx + 0xb4] */ 2071 PUSH32(esp, eax); /* 0x38006F40: push eax */ 2072 ecx = edi + 0x20; /* 0x38006F41: lea ecx, [edi + 0x20] */ 2073 RECOMP_ICALL(0x38042AA0u); /* 0x38006F44: call 0x38042aa0 */ /* not lifted */ 2074 RECOMP_FLAGS_IN(); 2075 goto L_38006F62; /* 0x38006F49: jmp 0x38006f62 */ 2076 L_38006F4B: 2077 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2078 eax = 0; /* 0x38006F4B: xor eax, eax */ 2079 _cf = 0; 2080 _flag_k = FK_TEST; 2081 PUSH32(esp, eax); /* 0x38006F4D: push eax */ 2082 ecx = edi + 0x20; /* 0x38006F4E: lea ecx, [edi + 0x20] */ 2083 RECOMP_ICALL(0x38042AA0u); /* 0x38006F51: call 0x38042aa0 */ /* not lifted */ 2084 RECOMP_FLAGS_IN(); 2085 goto L_38006F62; /* 0x38006F56: jmp 0x38006f62 */ 2086 L_38006F58: 2087 ecx = MEM32(ebp + (-0x4)); /* 0x38006F58: mov ecx, dword ptr [ebp - 4] */ 2088 PUSH32(esp, 1); /* 0x38006F5B: push 1 */ 2089 RECOMP_ICALL(0x38001D70u); /* 0x38006F5D: call 0x38001d70 */ /* not lifted */ 2090 RECOMP_FLAGS_IN(); 2091 L_38006F62: 2092 eax = MEM32(ebp + 0x8); /* 0x38006F62: mov eax, dword ptr [ebp + 8] */ 2093 L_38006F65: 2094 ecx = MEM32(eax); /* 0x38006F65: mov ecx, dword ptr [eax] */ 2095 MEM32(esi) = ecx; /* 0x38006F67: mov dword ptr [esi], ecx */ 2096 edx = MEM32(eax + 0x4); /* 0x38006F69: mov edx, dword ptr [eax + 4] */ 2097 MEM32(esi + 0x4) = edx; /* 0x38006F6C: mov dword ptr [esi + 4], edx */ 2098 /* cmp MEM32(esi), 0 */ /* 0x38006F6F: cmp dword ptr [esi], 0 */ 2099 _flag_a = (uint32_t)(MEM32(esi)); _flag_b = (uint32_t)(0); 2100 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2101 _flag_k = FK_CMP; 2102 if (CMP_NE(_flag_a, _flag_b)) goto L_38006F7E; /* 0x38006F72: jne 0x38006f7e */ 2103 L_38006F74: 2104 eax = edx; /* 0x38006F74: mov eax, edx */ 2105 /* test eax, eax */ /* 0x38006F76: test eax, eax */ 2106 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2107 _cf = 0; 2108 _flag_k = FK_TEST; 2109 if (TEST_Z(_flag_a, _flag_b)) goto L_38007005; /* 0x38006F78: je 0x38007005 */ 2110 L_38006F7E: 2111 PUSH32(esp, esi); /* 0x38006F7E: push esi */ 2112 RECOMP_ICALL(0x38017D70u); /* 0x38006F7F: call 0x38017d70 */ /* not lifted */ 2113 RECOMP_FLAGS_IN(); 2114 edi = eax; /* 0x38006F84: mov edi, eax */ 2115 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2116 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2117 esp = esp + 4; /* 0x38006F86: add esp, 4 */ 2118 _flag_k = FK_ADD; 2119 /* test edi, edi */ /* 0x38006F89: test edi, edi */ 2120 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 2121 _cf = 0; 2122 _flag_k = FK_TEST; 2123 if (TEST_Z(_flag_a, _flag_b)) goto L_38006FFC; /* 0x38006F8B: je 0x38006ffc */ 2124 L_38006F8D: 2125 ecx = MEM32(0x3806EC04); /* 0x38006F8D: mov ecx, dword ptr [0x3806ec04] */ 2126 eax = MEM32(ecx); /* 0x38006F93: mov eax, dword ptr [ecx] */ 2127 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x38006F95: call dword ptr [eax + 0x10] */ 2128 RECOMP_FLAGS_IN(); 2129 /* cmp edi, eax */ /* 0x38006F98: cmp edi, eax */ 2130 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 2131 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2132 _flag_k = FK_CMP; 2133 if (CMP_EQ(_flag_a, _flag_b)) goto L_38006FFC; /* 0x38006F9A: je 0x38006ffc */ 2134 L_38006F9C: 2135 ecx = MEM32(edi + 0x60); /* 0x38006F9C: mov ecx, dword ptr [edi + 0x60] */ 2136 esi = MEM32(ebp + (-0x4)); /* 0x38006F9F: mov esi, dword ptr [ebp - 4] */ 2137 PUSH32(esp, ecx); /* 0x38006FA2: push ecx */ 2138 ecx = esi; /* 0x38006FA3: mov ecx, esi */ 2139 RECOMP_ICALL(0x38001D30u); /* 0x38006FA5: call 0x38001d30 */ /* not lifted */ 2140 RECOMP_FLAGS_IN(); 2141 /* test ebx, ebx */ /* 0x38006FAA: test ebx, ebx */ 2142 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 2143 _cf = 0; 2144 _flag_k = FK_TEST; 2145 if (TEST_Z(_flag_a, _flag_b)) goto L_38006FB6; /* 0x38006FAC: je 0x38006fb6 */ 2146 L_38006FAE: 2147 eax = ebx + 0xB4; /* 0x38006FAE: lea eax, [ebx + 0xb4] */ 2148 goto L_38006FB8; /* 0x38006FB4: jmp 0x38006fb8 */ 2149 L_38006FB6: 2150 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2151 eax = 0; /* 0x38006FB6: xor eax, eax */ 2152 _cf = 0; 2153 _flag_k = FK_TEST; 2154 L_38006FB8: 2155 PUSH32(esp, eax); /* 0x38006FB8: push eax */ 2156 ecx = edi + 0x20; /* 0x38006FB9: lea ecx, [edi + 0x20] */ 2157 RECOMP_ICALL(0x380428E0u); /* 0x38006FBC: call 0x380428e0 */ /* not lifted */ 2158 RECOMP_FLAGS_IN(); 2159 ecx = ebx; /* 0x38006FC1: mov ecx, ebx */ 2160 RECOMP_ICALL(0x380082B0u); /* 0x38006FC3: call 0x380082b0 */ /* not lifted */ 2161 RECOMP_FLAGS_IN(); 2162 /* test LO8(eax), LO8(eax) */ /* 0x38006FC8: test al, al */ 2163 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2164 _cf = 0; 2165 _flag_k = FK_NARROW(FK_TEST, 24); 2166 if (TEST_Z(_flag_a, _flag_b)) goto L_38007005; /* 0x38006FCA: je 0x38007005 */ 2167 L_38006FCC: 2168 edx = ebp + (-0x10); /* 0x38006FCC: lea edx, [ebp - 0x10] */ 2169 PUSH32(esp, edx); /* 0x38006FCF: push edx */ 2170 ecx = esi; /* 0x38006FD0: mov ecx, esi */ 2171 MEM32(ebp + (-0x10)) = 0; /* 0x38006FD2: mov dword ptr [ebp - 0x10], 0 */ 2172 MEM32(ebp + (-0xC)) = 0x40000000u; /* 0x38006FD9: mov dword ptr [ebp - 0xc], 0x40000000 */ 2173 MEM32(ebp + (-0x8)) = 0; /* 0x38006FE0: mov dword ptr [ebp - 8], 0 */ 2174 RECOMP_ICALL(0x380020B0u); /* 0x38006FE7: call 0x380020b0 */ /* not lifted */ 2175 RECOMP_FLAGS_IN(); 2176 ecx = edi; /* 0x38006FEC: mov ecx, edi */ 2177 RECOMP_ICALL(0x38017EC0u); /* 0x38006FEE: call 0x38017ec0 */ /* not lifted */ 2178 RECOMP_FLAGS_IN(); 2179 edi = POP32_VAL(esp); /* 0x38006FF3: pop edi */ 2180 esi = POP32_VAL(esp); /* 0x38006FF4: pop esi */ 2181 ebx = POP32_VAL(esp); /* 0x38006FF5: pop ebx */ 2182 esp = ebp; /* 0x38006FF6: mov esp, ebp */ 2183 ebp = POP32_VAL(esp); /* 0x38006FF8: pop ebp */ 2184 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38006FF9: ret 4 */ 2185 L_38006FFC: 2186 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2187 eax = 0; /* 0x38006FFC: xor eax, eax */ 2188 _cf = 0; 2189 _flag_k = FK_TEST; 2190 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2191 ecx = 0; /* 0x38006FFE: xor ecx, ecx */ 2192 _cf = 0; 2193 _flag_k = FK_TEST; 2194 MEM32(esi) = eax; /* 0x38007000: mov dword ptr [esi], eax */ 2195 MEM32(esi + 0x4) = ecx; /* 0x38007002: mov dword ptr [esi + 4], ecx */ 2196 L_38007005: 2197 edi = POP32_VAL(esp); /* 0x38007005: pop edi */ 2198 esi = POP32_VAL(esp); /* 0x38007006: pop esi */ 2199 ebx = POP32_VAL(esp); /* 0x38007007: pop ebx */ 2200 esp = ebp; /* 0x38007008: mov esp, ebp */ 2201 ebp = POP32_VAL(esp); /* 0x3800700A: pop ebp */ 2202 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3800700B: ret 4 */ 2203 RECOMP_REGS_OUT(); 2204 } 2205 2206 void sub_38007010(void) { 2207 int _fpu_cmp = 0; 2208 uint32_t _cf = 0; 2209 int _df = 1; 2210 uint32_t _flag_k = FK_NONE; 2211 uint32_t _flag_a = 0, _flag_b = 0; 2212 uint32_t _itail_tgt = 0; 2213 RECOMP_REGS_LOCALS 2214 RECOMP_ENTER(0x38007010u); 2215 2216 L_38007010: 2217 eax = ecx; /* 0x38007010: mov eax, ecx */ 2218 ecx = MEM32(eax + (-0x54)); /* 0x38007012: mov ecx, dword ptr [eax - 0x54] */ 2219 PUSH32(esp, esi); /* 0x38007015: push esi */ 2220 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2221 edx = 0; /* 0x38007016: xor edx, edx */ 2222 _cf = 0; 2223 _flag_k = FK_TEST; 2224 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2225 esi = 0; /* 0x38007018: xor esi, esi */ 2226 _cf = 0; 2227 _flag_k = FK_TEST; 2228 MEM32(eax + 0xE0) = edx; /* 0x3800701A: mov dword ptr [eax + 0xe0], edx */ 2229 PUSH32(esp, 1); /* 0x38007020: push 1 */ 2230 MEM32(eax + 0xE4) = esi; /* 0x38007022: mov dword ptr [eax + 0xe4], esi */ 2231 RECOMP_ICALL(0x38001D70u); /* 0x38007028: call 0x38001d70 */ /* not lifted */ 2232 RECOMP_FLAGS_IN(); 2233 esi = POP32_VAL(esp); /* 0x3800702D: pop esi */ 2234 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3800702E: ret 4 */ 2235 RECOMP_REGS_OUT(); 2236 } 2237 2238 void sub_38007040(void) { 2239 int _fpu_cmp = 0; 2240 uint32_t _cf = 0; 2241 int _df = 1; 2242 uint32_t _flag_k = FK_NONE; 2243 uint32_t _flag_a = 0, _flag_b = 0; 2244 uint32_t _itail_tgt = 0; 2245 RECOMP_REGS_LOCALS 2246 RECOMP_ENTER(0x38007040u); 2247 2248 L_38007040: 2249 PUSH32(esp, ebp); /* 0x38007040: push ebp */ 2250 ebp = esp; /* 0x38007041: mov ebp, esp */ 2251 eax = MEM32(FS_BASE + (0)); /* 0x38007043: mov eax, dword ptr fs:[0] */ 2252 PUSH32(esp, 0xFFFFFFFFu); /* 0x38007049: push -1 */ 2253 PUSH32(esp, 0x3804BABBu); /* 0x3800704B: push 0x3804babb */ 2254 PUSH32(esp, eax); /* 0x38007050: push eax */ 2255 MEM32(FS_BASE + (0)) = esp; /* 0x38007051: mov dword ptr fs:[0], esp */ 2256 PUSH32(esp, ebx); /* 0x38007058: push ebx */ 2257 PUSH32(esp, esi); /* 0x38007059: push esi */ 2258 esi = MEM32(ebp + 0x8); /* 0x3800705A: mov esi, dword ptr [ebp + 8] */ 2259 eax = MEM32(esi + 0x1B0); /* 0x3800705D: mov eax, dword ptr [esi + 0x1b0] */ 2260 PUSH32(esp, edi); /* 0x38007063: push edi */ 2261 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2262 edi = 0; /* 0x38007064: xor edi, edi */ 2263 _cf = 0; 2264 _flag_k = FK_TEST; 2265 /* cmp eax, edi */ /* 0x38007066: cmp eax, edi */ 2266 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 2267 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2268 _flag_k = FK_CMP; 2269 if (CMP_EQ(_flag_a, _flag_b)) goto L_3800716C; /* 0x38007068: je 0x3800716c */ 2270 L_3800706E: 2271 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x3800706E: fld dword ptr [ebp + 0xc] */ 2272 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(esi + 0xDC)); /* 0x38007071: fcomp dword ptr [esi + 0xdc] */ 2273 fp_pop(); 2274 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x38007077: fnstsw ax */ 2275 /* test HI8(eax), 0x40u */ /* 0x38007079: test ah, 0x40 */ 2276 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 2277 _cf = 0; 2278 _flag_k = FK_NARROW(FK_TEST, 24); 2279 if (TEST_NZ(_flag_a, _flag_b)) goto L_3800716C; /* 0x3800707C: jne 0x3800716c */ 2280 L_38007082: 2281 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x38007082: fld dword ptr [ebp + 0xc] */ 2282 eax = MEM32(ebp + 0xC); /* 0x38007085: mov eax, dword ptr [ebp + 0xc] */ 2283 _st[0] *= (double)*(float*)ADDR(0x3804EBB4); /* 0x38007088: fmul dword ptr [0x3804ebb4] */ 2284 MEM32(esi + 0xDC) = eax; /* 0x3800708E: mov dword ptr [esi + 0xdc], eax */ 2285 { float _v = (float)_st[0]; *(float*)ADDR(esi + 0xD8) = _v; } /* 0x38007094: fst dword ptr [esi + 0xd8] */ 2286 fp_push(*(float*)&MEM32(esi + 0xD4)); /* 0x3800709A: fld dword ptr [esi + 0xd4] */ 2287 _st[0] += (double)*(float*)ADDR(0x3804E920); /* 0x380070A0: fadd dword ptr [0x3804e920] */ 2288 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x380070A6: fstp dword ptr [ebp + 0xc] */ 2289 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0xC)); /* 0x380070A9: fcomp dword ptr [ebp + 0xc] */ 2290 fp_pop(); 2291 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x380070AC: fnstsw ax */ 2292 /* test HI8(eax), 1 */ /* 0x380070AE: test ah, 1 */ 2293 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 2294 _cf = 0; 2295 _flag_k = FK_NARROW(FK_TEST, 24); 2296 if (TEST_Z(_flag_a, _flag_b)) goto L_380070BC; /* 0x380070B1: je 0x380070bc */ 2297 L_380070B3: 2298 ecx = MEM32(ebp + 0xC); /* 0x380070B3: mov ecx, dword ptr [ebp + 0xc] */ 2299 MEM32(esi + 0xD8) = ecx; /* 0x380070B6: mov dword ptr [esi + 0xd8], ecx */ 2300 L_380070BC: 2301 PUSH32(esp, 4); /* 0x380070BC: push 4 */ 2302 RECOMP_ICALL(0x3804B676u); /* 0x380070BE: call 0x3804b676 */ /* 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; /* 0x380070C3: add esp, 4 */ 2307 _flag_k = FK_ADD; 2308 MEM32(ebp + 0xC) = eax; /* 0x380070C6: mov dword ptr [ebp + 0xc], eax */ 2309 /* cmp eax, edi */ /* 0x380070C9: cmp eax, edi */ 2310 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 2311 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2312 _flag_k = FK_CMP; 2313 MEM32(ebp + (-0x4)) = edi; /* 0x380070CB: mov dword ptr [ebp - 4], edi */ 2314 if (CMP_EQ(_flag_a, _flag_b)) goto L_380070F6; /* 0x380070CE: je 0x380070f6 */ 2315 L_380070D0: 2316 edx = MEM32(esi + 0xD8); /* 0x380070D0: mov edx, dword ptr [esi + 0xd8] */ 2317 ecx = MEM32(esi + 0xD4); /* 0x380070D6: mov ecx, dword ptr [esi + 0xd4] */ 2318 PUSH32(esp, edx); /* 0x380070DC: push edx */ 2319 edx = MEM32(esi + 0xC0); /* 0x380070DD: mov edx, dword ptr [esi + 0xc0] */ 2320 PUSH32(esp, ecx); /* 0x380070E3: push ecx */ 2321 ecx = MEM32(esi + 0xBC); /* 0x380070E4: mov ecx, dword ptr [esi + 0xbc] */ 2322 PUSH32(esp, edx); /* 0x380070EA: push edx */ 2323 PUSH32(esp, ecx); /* 0x380070EB: push ecx */ 2324 ecx = eax; /* 0x380070EC: mov ecx, eax */ 2325 RECOMP_ICALL(MEM32(0x3804E224)); /* 0x380070EE: call dword ptr [0x3804e224] */ 2326 RECOMP_FLAGS_IN(); 2327 edi = eax; /* 0x380070F4: mov edi, eax */ 2328 L_380070F6: 2329 ecx = MEM32(esi + 0x1B0); /* 0x380070F6: mov ecx, dword ptr [esi + 0x1b0] */ 2330 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x380070FC: mov dword ptr [ebp - 4], 0xffffffff */ 2331 RECOMP_ICALL(MEM32(0x3804E260)); /* 0x38007103: call dword ptr [0x3804e260] */ 2332 RECOMP_FLAGS_IN(); 2333 PUSH32(esp, eax); /* 0x38007109: push eax */ 2334 ecx = edi; /* 0x3800710A: mov ecx, edi */ 2335 RECOMP_ICALL(MEM32(0x3804E274)); /* 0x3800710C: call dword ptr [0x3804e274] */ 2336 RECOMP_FLAGS_IN(); 2337 ecx = MEM32(esi + 0x1B0); /* 0x38007112: mov ecx, dword ptr [esi + 0x1b0] */ 2338 RECOMP_ICALL(MEM32(0x3804E150)); /* 0x38007118: call dword ptr [0x3804e150] */ 2339 RECOMP_FLAGS_IN(); 2340 PUSH32(esp, eax); /* 0x3800711E: push eax */ 2341 ecx = edi; /* 0x3800711F: mov ecx, edi */ 2342 RECOMP_ICALL(MEM32(0x3804E270)); /* 0x38007121: call dword ptr [0x3804e270] */ 2343 RECOMP_FLAGS_IN(); 2344 ebx = MEM32(esi + 0x1B0); /* 0x38007127: mov ebx, dword ptr [esi + 0x1b0] */ 2345 /* test ebx, ebx */ /* 0x3800712D: test ebx, ebx */ 2346 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 2347 _cf = 0; 2348 _flag_k = FK_TEST; 2349 if (TEST_Z(_flag_a, _flag_b)) goto L_38007142; /* 0x3800712F: je 0x38007142 */ 2350 L_38007131: 2351 ecx = ebx; /* 0x38007131: mov ecx, ebx */ 2352 RECOMP_ICALL(MEM32(0x3804E220)); /* 0x38007133: call dword ptr [0x3804e220] */ 2353 RECOMP_FLAGS_IN(); 2354 PUSH32(esp, ebx); /* 0x38007139: push ebx */ 2355 RECOMP_ICALL(0x3804B4F6u); /* 0x3800713A: call 0x3804b4f6 */ /* not lifted */ 2356 RECOMP_FLAGS_IN(); 2357 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2358 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2359 esp = esp + 4; /* 0x3800713F: add esp, 4 */ 2360 _flag_k = FK_ADD; 2361 L_38007142: 2362 ecx = edi; /* 0x38007142: mov ecx, edi */ 2363 MEM32(esi + 0x1B0) = edi; /* 0x38007144: mov dword ptr [esi + 0x1b0], edi */ 2364 RECOMP_ICALL(MEM32(0x3804E214)); /* 0x3800714A: call dword ptr [0x3804e214] */ 2365 RECOMP_FLAGS_IN(); 2366 edx = MEM32(esi + 0xD8); /* 0x38007150: mov edx, dword ptr [esi + 0xd8] */ 2367 eax = MEM32(esi + 0xD4); /* 0x38007156: mov eax, dword ptr [esi + 0xd4] */ 2368 PUSH32(esp, edx); /* 0x3800715C: push edx */ 2369 PUSH32(esp, eax); /* 0x3800715D: push eax */ 2370 RECOMP_ICALL(MEM32(0x3804E218)); /* 0x3800715E: call dword ptr [0x3804e218] */ 2371 RECOMP_FLAGS_IN(); 2372 ecx = eax; /* 0x38007164: mov ecx, eax */ 2373 RECOMP_ICALL(MEM32(0x3804E21C)); /* 0x38007166: call dword ptr [0x3804e21c] */ 2374 RECOMP_FLAGS_IN(); 2375 L_3800716C: 2376 ecx = MEM32(ebp + (-0xC)); /* 0x3800716C: mov ecx, dword ptr [ebp - 0xc] */ 2377 edi = POP32_VAL(esp); /* 0x3800716F: pop edi */ 2378 esi = POP32_VAL(esp); /* 0x38007170: pop esi */ 2379 MEM32(FS_BASE + (0)) = ecx; /* 0x38007171: mov dword ptr fs:[0], ecx */ 2380 ebx = POP32_VAL(esp); /* 0x38007178: pop ebx */ 2381 esp = ebp; /* 0x38007179: mov esp, ebp */ 2382 ebp = POP32_VAL(esp); /* 0x3800717B: pop ebp */ 2383 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3800717C: ret */ 2384 RECOMP_REGS_OUT(); 2385 } 2386 2387 void sub_38007180(void) { 2388 int _fpu_cmp = 0; 2389 uint32_t _cf = 0; 2390 int _df = 1; 2391 uint32_t _flag_k = FK_NONE; 2392 uint32_t _flag_a = 0, _flag_b = 0; 2393 uint32_t _itail_tgt = 0; 2394 RECOMP_REGS_LOCALS 2395 RECOMP_ENTER(0x38007180u); 2396 2397 L_38007180: 2398 PUSH32(esp, ebp); /* 0x38007180: push ebp */ 2399 ebp = esp; /* 0x38007181: mov ebp, esp */ 2400 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u); 2401 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2402 esp = esp - 0x18u; /* 0x38007183: sub esp, 0x18 */ 2403 _flag_k = FK_CMP; 2404 eax = MEM32(0x3806EC04); /* 0x38007186: mov eax, dword ptr [0x3806ec04] */ 2405 PUSH32(esp, ebx); /* 0x3800718B: push ebx */ 2406 PUSH32(esp, esi); /* 0x3800718C: push esi */ 2407 esi = ecx; /* 0x3800718D: mov esi, ecx */ 2408 ecx = MEM32(eax + 0x64); /* 0x3800718F: mov ecx, dword ptr [eax + 0x64] */ 2409 MEM32(ebp + (-0x8)) = ecx; /* 0x38007192: mov dword ptr [ebp - 8], ecx */ 2410 ecx = esi; /* 0x38007195: mov ecx, esi */ 2411 RECOMP_ICALL(0x38006E20u); /* 0x38007197: call 0x38006e20 */ /* not lifted */ 2412 RECOMP_FLAGS_IN(); 2413 MEM32(esi + 0x128) = eax; /* 0x3800719C: mov dword ptr [esi + 0x128], eax */ 2414 ecx = MEM32(0x3806EC04); /* 0x380071A2: mov ecx, dword ptr [0x3806ec04] */ 2415 edx = MEM32(ecx); /* 0x380071A8: mov edx, dword ptr [ecx] */ 2416 RECOMP_ICALL(MEM32(edx + 0x10)); /* 0x380071AA: call dword ptr [edx + 0x10] */ 2417 RECOMP_FLAGS_IN(); 2418 ebx = eax; /* 0x380071AD: mov ebx, eax */ 2419 /* test ebx, ebx */ /* 0x380071AF: test ebx, ebx */ 2420 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 2421 _cf = 0; 2422 _flag_k = FK_TEST; 2423 if (TEST_Z(_flag_a, _flag_b)) goto L_380071C2; /* 0x380071B1: je 0x380071c2 */ 2424 L_380071B3: 2425 ecx = MEM32(esi + 0x128); /* 0x380071B3: mov ecx, dword ptr [esi + 0x128] */ 2426 /* test ecx, ecx */ /* 0x380071B9: test ecx, ecx */ 2427 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 2428 _cf = 0; 2429 _flag_k = FK_TEST; 2430 if (TEST_Z(_flag_a, _flag_b)) goto L_380071C2; /* 0x380071BB: je 0x380071c2 */ 2431 L_380071BD: 2432 RECOMP_ICALL(0x3801F7D0u); /* 0x380071BD: call 0x3801f7d0 */ /* not lifted */ 2433 RECOMP_FLAGS_IN(); 2434 L_380071C2: 2435 PUSH32(esp, edi); /* 0x380071C2: push edi */ 2436 edi = MEM32(esi + 0x60); /* 0x380071C3: mov edi, dword ptr [esi + 0x60] */ 2437 PUSH32(esp, 0); /* 0x380071C6: push 0 */ 2438 ecx = edi; /* 0x380071C8: mov ecx, edi */ 2439 RECOMP_ICALL(0x380041B0u); /* 0x380071CA: call 0x380041b0 */ /* not lifted */ 2440 RECOMP_FLAGS_IN(); 2441 PUSH32(esp, 0x41A00000u); /* 0x380071CF: push 0x41a00000 */ 2442 ecx = edi; /* 0x380071D4: mov ecx, edi */ 2443 MEM8(edi + 0x1C4) = (uint8_t)(0); /* 0x380071D6: mov byte ptr [edi + 0x1c4], 0 */ 2444 RECOMP_ICALL(MEM32(0x3804E690)); /* 0x380071DD: call dword ptr [0x3804e690] */ 2445 RECOMP_FLAGS_IN(); 2446 PUSH32(esp, 0x41000000u); /* 0x380071E3: push 0x41000000 */ 2447 ecx = edi; /* 0x380071E8: mov ecx, edi */ 2448 RECOMP_ICALL(MEM32(0x3804E700)); /* 0x380071EA: call dword ptr [0x3804e700] */ 2449 RECOMP_FLAGS_IN(); 2450 PUSH32(esp, 0x44E10000u); /* 0x380071F0: push 0x44e10000 */ 2451 ecx = edi; /* 0x380071F5: mov ecx, edi */ 2452 RECOMP_ICALL(MEM32(0x3804E6FC)); /* 0x380071F7: call dword ptr [0x3804e6fc] */ 2453 RECOMP_FLAGS_IN(); 2454 /* test ebx, ebx */ /* 0x380071FD: test ebx, ebx */ 2455 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 2456 _cf = 0; 2457 _flag_k = FK_TEST; 2458 MEM32(ebp + (-0x4)) = 0x41800000u; /* 0x380071FF: mov dword ptr [ebp - 4], 0x41800000 */ 2459 if (TEST_Z(_flag_a, _flag_b)) goto L_38007232; /* 0x38007206: je 0x38007232 */ 2460 L_38007208: 2461 eax = MEM32(ebx + 0x60); /* 0x38007208: mov eax, dword ptr [ebx + 0x60] */ 2462 fp_push(*(float*)&MEM32(eax + 0x38)); /* 0x3800720B: fld dword ptr [eax + 0x38] */ 2463 _st[0] *= (double)*(float*)ADDR(0x3804E8D4); /* 0x3800720E: fmul dword ptr [0x3804e8d4] */ 2464 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x38007214: fstp dword ptr [ebp - 0xc] */ 2465 fp_push(*(float*)&MEM32(0x3804EBC4)); /* 0x38007217: fld dword ptr [0x3804ebc4] */ 2466 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + (-0xC))); /* 0x3800721D: fcomp dword ptr [ebp - 0xc] */ 2467 fp_pop(); 2468 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x38007220: fnstsw ax */ 2469 /* test HI8(eax), 1 */ /* 0x38007222: test ah, 1 */ 2470 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 2471 _cf = 0; 2472 _flag_k = FK_NARROW(FK_TEST, 24); 2473 eax = ebp + (-0x4); /* 0x38007225: lea eax, [ebp - 4] */ 2474 if (TEST_NZ(_flag_a, _flag_b)) goto L_3800722D; /* 0x38007228: jne 0x3800722d */ 2475 L_3800722A: 2476 eax = ebp + (-0xC); /* 0x3800722A: lea eax, [ebp - 0xc] */ 2477 L_3800722D: 2478 ecx = MEM32(eax); /* 0x3800722D: mov ecx, dword ptr [eax] */ 2479 MEM32(ebp + (-0x4)) = ecx; /* 0x3800722F: mov dword ptr [ebp - 4], ecx */ 2480 L_38007232: 2481 edx = MEM32(ebp + (-0x4)); /* 0x38007232: mov edx, dword ptr [ebp - 4] */ 2482 PUSH32(esp, edx); /* 0x38007235: push edx */ 2483 ecx = edi; /* 0x38007236: mov ecx, edi */ 2484 RECOMP_ICALL(0x38001DB0u); /* 0x38007238: call 0x38001db0 */ /* not lifted */ 2485 RECOMP_FLAGS_IN(); 2486 ecx = esi; /* 0x3800723D: mov ecx, esi */ 2487 RECOMP_ICALL(0x380082B0u); /* 0x3800723F: call 0x380082b0 */ /* not lifted */ 2488 RECOMP_FLAGS_IN(); 2489 /* test LO8(eax), LO8(eax) */ /* 0x38007244: test al, al */ 2490 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2491 _cf = 0; 2492 _flag_k = FK_NARROW(FK_TEST, 24); 2493 if (TEST_Z(_flag_a, _flag_b)) goto L_38007369; /* 0x38007246: je 0x38007369 */ 2494 L_3800724C: 2495 ecx = esi; /* 0x3800724C: mov ecx, esi */ 2496 RECOMP_ICALL(0x380082A0u); /* 0x3800724E: call 0x380082a0 */ /* not lifted */ 2497 RECOMP_FLAGS_IN(); 2498 /* cmp eax, 1 */ /* 0x38007253: cmp eax, 1 */ 2499 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2500 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2501 _flag_k = FK_CMP; 2502 if (CMP_NE(_flag_a, _flag_b)) goto L_3800725F; /* 0x38007256: jne 0x3800725f */ 2503 L_38007258: 2504 ecx = edi; /* 0x38007258: mov ecx, edi */ 2505 RECOMP_ICALL(0x380022A0u); /* 0x3800725A: call 0x380022a0 */ /* not lifted */ 2506 RECOMP_FLAGS_IN(); 2507 L_3800725F: 2508 SET_LO8(eax, MEM8(edi + 0x1C5)); /* 0x3800725F: mov al, byte ptr [edi + 0x1c5] */ 2509 /* test LO8(eax), LO8(eax) */ /* 0x38007265: test al, al */ 2510 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2511 _cf = 0; 2512 _flag_k = FK_NARROW(FK_TEST, 24); 2513 if (TEST_Z(_flag_a, _flag_b)) goto L_3800728A; /* 0x38007267: je 0x3800728a */ 2514 L_38007269: 2515 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x38007269: fld dword ptr [ebp - 8] */ 2516 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804EBC0)); /* 0x3800726C: fcomp dword ptr [0x3804ebc0] */ 2517 fp_pop(); 2518 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x38007272: fnstsw ax */ 2519 /* test HI8(eax), 1 */ /* 0x38007274: test ah, 1 */ 2520 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 2521 _cf = 0; 2522 _flag_k = FK_NARROW(FK_TEST, 24); 2523 if (TEST_Z(_flag_a, _flag_b)) goto L_38007294; /* 0x38007277: je 0x38007294 */ 2524 L_38007279: 2525 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x38007279: fld dword ptr [ebp - 8] */ 2526 _st[0] += (double)*(float*)ADDR(esi + 0xE4); /* 0x3800727C: fadd dword ptr [esi + 0xe4] */ 2527 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0xE4) = _v; } /* 0x38007282: fstp dword ptr [esi + 0xe4] */ 2528 goto L_38007294; /* 0x38007288: jmp 0x38007294 */ 2529 L_3800728A: 2530 MEM32(esi + 0xE4) = 0; /* 0x3800728A: mov dword ptr [esi + 0xe4], 0 */ 2531 L_38007294: 2532 fp_push(*(float*)&MEM32(esi + 0xE4)); /* 0x38007294: fld dword ptr [esi + 0xe4] */ 2533 _fpu_cmp = FPU_CMP(_st[0], *(double*)ADDR(0x3804EBB8)); /* 0x3800729A: fcomp qword ptr [0x3804ebb8] */ 2534 fp_pop(); 2535 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x380072A0: fnstsw ax */ 2536 /* test HI8(eax), 0x41u */ /* 0x380072A2: test ah, 0x41 */ 2537 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 2538 _cf = 0; 2539 _flag_k = FK_NARROW(FK_TEST, 24); 2540 if (TEST_NZ(_flag_a, _flag_b)) goto L_380072D4; /* 0x380072A5: jne 0x380072d4 */ 2541 L_380072A7: 2542 eax = MEM32(edi); /* 0x380072A7: mov eax, dword ptr [edi] */ 2543 ecx = ebp + (-0x18); /* 0x380072A9: lea ecx, [ebp - 0x18] */ 2544 PUSH32(esp, ecx); /* 0x380072AC: push ecx */ 2545 ecx = edi; /* 0x380072AD: mov ecx, edi */ 2546 MEM32(ebp + (-0x18)) = 0; /* 0x380072AF: mov dword ptr [ebp - 0x18], 0 */ 2547 MEM32(ebp + (-0x14)) = 0; /* 0x380072B6: mov dword ptr [ebp - 0x14], 0 */ 2548 MEM32(ebp + (-0x10)) = 0; /* 0x380072BD: mov dword ptr [ebp - 0x10], 0 */ 2549 RECOMP_ICALL(MEM32(eax + 0x80)); /* 0x380072C4: call dword ptr [eax + 0x80] */ 2550 RECOMP_FLAGS_IN(); 2551 MEM32(esi + 0xE4) = 0; /* 0x380072CA: mov dword ptr [esi + 0xe4], 0 */ 2552 L_380072D4: 2553 /* test ebx, ebx */ /* 0x380072D4: test ebx, ebx */ 2554 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 2555 _cf = 0; 2556 _flag_k = FK_TEST; 2557 if (TEST_Z(_flag_a, _flag_b)) goto L_38007369; /* 0x380072D6: je 0x38007369 */ 2558 L_380072DC: 2559 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x380072DC: fld dword ptr [ebp - 8] */ 2560 _st[0] += (double)*(float*)ADDR(esi + 0x1C8); /* 0x380072DF: fadd dword ptr [esi + 0x1c8] */ 2561 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x1C8) = _v; } /* 0x380072E5: fstp dword ptr [esi + 0x1c8] */ 2562 eax = MEM32(0x3806B6E8); /* 0x380072EB: mov eax, dword ptr [0x3806b6e8] */ 2563 edx = eax; /* 0x380072F0: mov edx, eax */ 2564 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2565 eax = eax - 1; /* 0x380072F2: dec eax */ 2566 _flag_k = FK_DEC; 2567 /* test edx, edx */ /* 0x380072F3: test edx, edx */ 2568 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 2569 _cf = 0; 2570 _flag_k = FK_TEST; 2571 MEM32(0x3806B6E8) = eax; /* 0x380072F5: mov dword ptr [0x3806b6e8], eax */ 2572 if (TEST_NZ(_flag_a, _flag_b)) goto L_38007369; /* 0x380072FA: jne 0x38007369 */ 2573 L_380072FC: 2574 SET_LO8(eax, MEM8(esi + 0x1D0)); /* 0x380072FC: mov al, byte ptr [esi + 0x1d0] */ 2575 /* test LO8(eax), LO8(eax) */ /* 0x38007302: test al, al */ 2576 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2577 _cf = 0; 2578 _flag_k = FK_NARROW(FK_TEST, 24); 2579 if (TEST_NZ(_flag_a, _flag_b)) goto L_3800730D; /* 0x38007304: jne 0x3800730d */ 2580 L_38007306: 2581 ecx = esi; /* 0x38007306: mov ecx, esi */ 2582 RECOMP_ICALL(0x38008D10u); /* 0x38007308: call 0x38008d10 */ /* not lifted */ 2583 RECOMP_FLAGS_IN(); 2584 L_3800730D: 2585 /* cmp MEM32(esi + 0x1C4), 0xFFFFFFFFu */ /* 0x3800730D: cmp dword ptr [esi + 0x1c4], -1 */ 2586 _flag_a = (uint32_t)(MEM32(esi + 0x1C4)); _flag_b = (uint32_t)(0xFFFFFFFFu); 2587 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2588 _flag_k = FK_CMP; 2589 if (CMP_NE(_flag_a, _flag_b)) goto L_3800735F; /* 0x38007314: jne 0x3800735f */ 2590 L_38007316: 2591 fp_push(*(float*)&MEM32(esi + 0x1C8)); /* 0x38007316: fld dword ptr [esi + 0x1c8] */ 2592 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(esi + 0x1CC)); /* 0x3800731C: fcomp dword ptr [esi + 0x1cc] */ 2593 fp_pop(); 2594 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x38007322: fnstsw ax */ 2595 /* test HI8(eax), 0x41u */ /* 0x38007324: test ah, 0x41 */ 2596 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 2597 _cf = 0; 2598 _flag_k = FK_NARROW(FK_TEST, 24); 2599 if (TEST_NZ(_flag_a, _flag_b)) goto L_38007358; /* 0x38007327: jne 0x38007358 */ 2600 L_38007329: 2601 PUSH32(esp, 1); /* 0x38007329: push 1 */ 2602 PUSH32(esp, 0x3F000000u); /* 0x3800732B: push 0x3f000000 */ 2603 ecx = esi; /* 0x38007330: mov ecx, esi */ 2604 RECOMP_ICALL(0x38008C90u); /* 0x38007332: call 0x38008c90 */ /* not lifted */ 2605 RECOMP_FLAGS_IN(); 2606 /* test LO8(eax), LO8(eax) */ /* 0x38007337: test al, al */ 2607 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2608 _cf = 0; 2609 _flag_k = FK_NARROW(FK_TEST, 24); 2610 if (TEST_Z(_flag_a, _flag_b)) goto L_3800734F; /* 0x38007339: je 0x3800734f */ 2611 L_3800733B: 2612 MEM32(esi + 0x1C8) = 0; /* 0x3800733B: mov dword ptr [esi + 0x1c8], 0 */ 2613 MEM32(esi + 0x1CC) = 0x3F99999Au; /* 0x38007345: mov dword ptr [esi + 0x1cc], 0x3f99999a */ 2614 L_3800734F: 2615 MEM8(esi + 0x1D0) = (uint8_t)(0); /* 0x3800734F: mov byte ptr [esi + 0x1d0], 0 */ 2616 goto L_3800735F; /* 0x38007356: jmp 0x3800735f */ 2617 L_38007358: 2618 MEM8(esi + 0x1D0) = (uint8_t)(1); /* 0x38007358: mov byte ptr [esi + 0x1d0], 1 */ 2619 L_3800735F: 2620 MEM32(0x3806B6E8) = 0xAu; /* 0x3800735F: mov dword ptr [0x3806b6e8], 0xa */ 2621 L_38007369: 2622 ecx = MEM32(esi + 0x1B0); /* 0x38007369: mov ecx, dword ptr [esi + 0x1b0] */ 2623 RECOMP_ICALL(MEM32(0x3804E1E4)); /* 0x3800736F: call dword ptr [0x3804e1e4] */ 2624 RECOMP_FLAGS_IN(); 2625 _st[0] = -_st[0]; /* 0x38007375: fchs */ 2626 /* test ebx, ebx */ /* 0x38007377: test ebx, ebx */ 2627 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 2628 _cf = 0; 2629 _flag_k = FK_TEST; 2630 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0xC0) = _v; } /* 0x38007379: fstp dword ptr [esi + 0xc0] */ 2631 edi = POP32_VAL(esp); /* 0x3800737F: pop edi */ 2632 if (TEST_Z(_flag_a, _flag_b)) goto L_38007389; /* 0x38007380: je 0x38007389 */ 2633 L_38007382: 2634 ecx = esi; /* 0x38007382: mov ecx, esi */ 2635 RECOMP_ICALL(0x380084F0u); /* 0x38007384: call 0x380084f0 */ /* not lifted */ 2636 RECOMP_FLAGS_IN(); 2637 L_38007389: 2638 eax = MEM32(esi + 0x104); /* 0x38007389: mov eax, dword ptr [esi + 0x104] */ 2639 ecx = eax; /* 0x3800738F: mov ecx, eax */ 2640 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x2000u); 2641 ecx = ecx & 0x2000u; /* 0x38007391: and ecx, 0x2000 */ 2642 _cf = 0; 2643 _flag_k = FK_TEST; 2644 /* cmp ecx, 0x2000u */ /* 0x38007397: cmp ecx, 0x2000 */ 2645 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x2000u); 2646 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2647 _flag_k = FK_CMP; 2648 if (CMP_NE(_flag_a, _flag_b)) goto L_380073B1; /* 0x3800739D: jne 0x380073b1 */ 2649 L_3800739F: 2650 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFDFFFu); 2651 eax = eax & 0xFFFFDFFFu; /* 0x3800739F: and eax, 0xffffdfff */ 2652 _cf = 0; 2653 _flag_k = FK_TEST; 2654 ecx = esi; /* 0x380073A4: mov ecx, esi */ 2655 MEM32(esi + 0x104) = eax; /* 0x380073A6: mov dword ptr [esi + 0x104], eax */ 2656 RECOMP_ICALL(0x38008930u); /* 0x380073AC: call 0x38008930 */ /* not lifted */ 2657 RECOMP_FLAGS_IN(); 2658 L_380073B1: 2659 edx = MEM32(0x3806EC04); /* 0x380073B1: mov edx, dword ptr [0x3806ec04] */ 2660 ecx = MEM32(edx + 0x80); /* 0x380073B7: mov ecx, dword ptr [edx + 0x80] */ 2661 RECOMP_ICALL(0x38018EB0u); /* 0x380073BD: call 0x38018eb0 */ /* not lifted */ 2662 RECOMP_FLAGS_IN(); 2663 ecx = esi; /* 0x380073C2: mov ecx, esi */ 2664 RECOMP_ICALL(0x38018990u); /* 0x380073C4: call 0x38018990 */ /* not lifted */ 2665 RECOMP_FLAGS_IN(); 2666 SET_LO8(ebx, LO8(eax)); /* 0x380073C9: mov bl, al */ 2667 eax = MEM32(0x3806EC04); /* 0x380073CB: mov eax, dword ptr [0x3806ec04] */ 2668 ecx = MEM32(eax + 0x80); /* 0x380073D0: mov ecx, dword ptr [eax + 0x80] */ 2669 RECOMP_ICALL(0x38018EB0u); /* 0x380073D6: call 0x38018eb0 */ /* not lifted */ 2670 RECOMP_FLAGS_IN(); 2671 esi = POP32_VAL(esp); /* 0x380073DB: pop esi */ 2672 SET_LO8(eax, LO8(ebx)); /* 0x380073DC: mov al, bl */ 2673 ebx = POP32_VAL(esp); /* 0x380073DE: pop ebx */ 2674 esp = ebp; /* 0x380073DF: mov esp, ebp */ 2675 ebp = POP32_VAL(esp); /* 0x380073E1: pop ebp */ 2676 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380073E2: ret */ 2677 RECOMP_REGS_OUT(); 2678 } 2679 2680 void sub_380072B6(void) { 2681 int _fpu_cmp = 0; 2682 uint32_t _cf = 0; 2683 int _df = 1; 2684 uint32_t _flag_k = FK_NONE; 2685 uint32_t _flag_a = 0, _flag_b = 0; 2686 uint32_t _itail_tgt = 0; 2687 RECOMP_REGS_LOCALS 2688 RECOMP_ENTER(0x380072B6u); 2689 2690 L_380072B6: 2691 MEM32(ebp + (-0x14)) = 0; /* 0x380072B6: mov dword ptr [ebp - 0x14], 0 */ 2692 MEM32(ebp + (-0x10)) = 0; /* 0x380072BD: mov dword ptr [ebp - 0x10], 0 */ 2693 RECOMP_ICALL(MEM32(eax + 0x80)); /* 0x380072C4: call dword ptr [eax + 0x80] */ 2694 RECOMP_FLAGS_IN(); 2695 MEM32(esi + 0xE4) = 0; /* 0x380072CA: mov dword ptr [esi + 0xe4], 0 */ 2696 /* test ebx, ebx */ /* 0x380072D4: test ebx, ebx */ 2697 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 2698 _cf = 0; 2699 _flag_k = FK_TEST; 2700 if (TEST_Z(_flag_a, _flag_b)) goto L_38007369; /* 0x380072D6: je 0x38007369 */ 2701 L_380072DC: 2702 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x380072DC: fld dword ptr [ebp - 8] */ 2703 _st[0] += (double)*(float*)ADDR(esi + 0x1C8); /* 0x380072DF: fadd dword ptr [esi + 0x1c8] */ 2704 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x1C8) = _v; } /* 0x380072E5: fstp dword ptr [esi + 0x1c8] */ 2705 eax = MEM32(0x3806B6E8); /* 0x380072EB: mov eax, dword ptr [0x3806b6e8] */ 2706 edx = eax; /* 0x380072F0: mov edx, eax */ 2707 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2708 eax = eax - 1; /* 0x380072F2: dec eax */ 2709 _flag_k = FK_DEC; 2710 /* test edx, edx */ /* 0x380072F3: test edx, edx */ 2711 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 2712 _cf = 0; 2713 _flag_k = FK_TEST; 2714 MEM32(0x3806B6E8) = eax; /* 0x380072F5: mov dword ptr [0x3806b6e8], eax */ 2715 if (TEST_NZ(_flag_a, _flag_b)) goto L_38007369; /* 0x380072FA: jne 0x38007369 */ 2716 L_380072FC: 2717 SET_LO8(eax, MEM8(esi + 0x1D0)); /* 0x380072FC: mov al, byte ptr [esi + 0x1d0] */ 2718 /* test LO8(eax), LO8(eax) */ /* 0x38007302: test al, al */ 2719 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2720 _cf = 0; 2721 _flag_k = FK_NARROW(FK_TEST, 24); 2722 if (TEST_NZ(_flag_a, _flag_b)) goto L_3800730D; /* 0x38007304: jne 0x3800730d */ 2723 L_38007306: 2724 ecx = esi; /* 0x38007306: mov ecx, esi */ 2725 RECOMP_ICALL(0x38008D10u); /* 0x38007308: call 0x38008d10 */ /* not lifted */ 2726 RECOMP_FLAGS_IN(); 2727 L_3800730D: 2728 /* cmp MEM32(esi + 0x1C4), 0xFFFFFFFFu */ /* 0x3800730D: cmp dword ptr [esi + 0x1c4], -1 */ 2729 _flag_a = (uint32_t)(MEM32(esi + 0x1C4)); _flag_b = (uint32_t)(0xFFFFFFFFu); 2730 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2731 _flag_k = FK_CMP; 2732 if (CMP_NE(_flag_a, _flag_b)) goto L_3800735F; /* 0x38007314: jne 0x3800735f */ 2733 L_38007316: 2734 fp_push(*(float*)&MEM32(esi + 0x1C8)); /* 0x38007316: fld dword ptr [esi + 0x1c8] */ 2735 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(esi + 0x1CC)); /* 0x3800731C: fcomp dword ptr [esi + 0x1cc] */ 2736 fp_pop(); 2737 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x38007322: fnstsw ax */ 2738 /* test HI8(eax), 0x41u */ /* 0x38007324: test ah, 0x41 */ 2739 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 2740 _cf = 0; 2741 _flag_k = FK_NARROW(FK_TEST, 24); 2742 if (TEST_NZ(_flag_a, _flag_b)) goto L_38007358; /* 0x38007327: jne 0x38007358 */ 2743 L_38007329: 2744 PUSH32(esp, 1); /* 0x38007329: push 1 */ 2745 PUSH32(esp, 0x3F000000u); /* 0x3800732B: push 0x3f000000 */ 2746 ecx = esi; /* 0x38007330: mov ecx, esi */ 2747 RECOMP_ICALL(0x38008C90u); /* 0x38007332: call 0x38008c90 */ /* not lifted */ 2748 RECOMP_FLAGS_IN(); 2749 /* test LO8(eax), LO8(eax) */ /* 0x38007337: test al, al */ 2750 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2751 _cf = 0; 2752 _flag_k = FK_NARROW(FK_TEST, 24); 2753 if (TEST_Z(_flag_a, _flag_b)) goto L_3800734F; /* 0x38007339: je 0x3800734f */ 2754 L_3800733B: 2755 MEM32(esi + 0x1C8) = 0; /* 0x3800733B: mov dword ptr [esi + 0x1c8], 0 */ 2756 MEM32(esi + 0x1CC) = 0x3F99999Au; /* 0x38007345: mov dword ptr [esi + 0x1cc], 0x3f99999a */ 2757 L_3800734F: 2758 MEM8(esi + 0x1D0) = (uint8_t)(0); /* 0x3800734F: mov byte ptr [esi + 0x1d0], 0 */ 2759 goto L_3800735F; /* 0x38007356: jmp 0x3800735f */ 2760 L_38007358: 2761 MEM8(esi + 0x1D0) = (uint8_t)(1); /* 0x38007358: mov byte ptr [esi + 0x1d0], 1 */ 2762 L_3800735F: 2763 MEM32(0x3806B6E8) = 0xAu; /* 0x3800735F: mov dword ptr [0x3806b6e8], 0xa */ 2764 L_38007369: 2765 ecx = MEM32(esi + 0x1B0); /* 0x38007369: mov ecx, dword ptr [esi + 0x1b0] */ 2766 RECOMP_ICALL(MEM32(0x3804E1E4)); /* 0x3800736F: call dword ptr [0x3804e1e4] */ 2767 RECOMP_FLAGS_IN(); 2768 _st[0] = -_st[0]; /* 0x38007375: fchs */ 2769 /* test ebx, ebx */ /* 0x38007377: test ebx, ebx */ 2770 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 2771 _cf = 0; 2772 _flag_k = FK_TEST; 2773 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0xC0) = _v; } /* 0x38007379: fstp dword ptr [esi + 0xc0] */ 2774 edi = POP32_VAL(esp); /* 0x3800737F: pop edi */ 2775 if (TEST_Z(_flag_a, _flag_b)) goto L_38007389; /* 0x38007380: je 0x38007389 */ 2776 L_38007382: 2777 ecx = esi; /* 0x38007382: mov ecx, esi */ 2778 RECOMP_ICALL(0x380084F0u); /* 0x38007384: call 0x380084f0 */ /* not lifted */ 2779 RECOMP_FLAGS_IN(); 2780 L_38007389: 2781 eax = MEM32(esi + 0x104); /* 0x38007389: mov eax, dword ptr [esi + 0x104] */ 2782 ecx = eax; /* 0x3800738F: mov ecx, eax */ 2783 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x2000u); 2784 ecx = ecx & 0x2000u; /* 0x38007391: and ecx, 0x2000 */ 2785 _cf = 0; 2786 _flag_k = FK_TEST; 2787 /* cmp ecx, 0x2000u */ /* 0x38007397: cmp ecx, 0x2000 */ 2788 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x2000u); 2789 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2790 _flag_k = FK_CMP; 2791 if (CMP_NE(_flag_a, _flag_b)) goto L_380073B1; /* 0x3800739D: jne 0x380073b1 */ 2792 L_3800739F: 2793 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFDFFFu); 2794 eax = eax & 0xFFFFDFFFu; /* 0x3800739F: and eax, 0xffffdfff */ 2795 _cf = 0; 2796 _flag_k = FK_TEST; 2797 ecx = esi; /* 0x380073A4: mov ecx, esi */ 2798 MEM32(esi + 0x104) = eax; /* 0x380073A6: mov dword ptr [esi + 0x104], eax */ 2799 RECOMP_ICALL(0x38008930u); /* 0x380073AC: call 0x38008930 */ /* not lifted */ 2800 RECOMP_FLAGS_IN(); 2801 L_380073B1: 2802 edx = MEM32(0x3806EC04); /* 0x380073B1: mov edx, dword ptr [0x3806ec04] */ 2803 ecx = MEM32(edx + 0x80); /* 0x380073B7: mov ecx, dword ptr [edx + 0x80] */ 2804 RECOMP_ICALL(0x38018EB0u); /* 0x380073BD: call 0x38018eb0 */ /* not lifted */ 2805 RECOMP_FLAGS_IN(); 2806 ecx = esi; /* 0x380073C2: mov ecx, esi */ 2807 RECOMP_ICALL(0x38018990u); /* 0x380073C4: call 0x38018990 */ /* not lifted */ 2808 RECOMP_FLAGS_IN(); 2809 SET_LO8(ebx, LO8(eax)); /* 0x380073C9: mov bl, al */ 2810 eax = MEM32(0x3806EC04); /* 0x380073CB: mov eax, dword ptr [0x3806ec04] */ 2811 ecx = MEM32(eax + 0x80); /* 0x380073D0: mov ecx, dword ptr [eax + 0x80] */ 2812 RECOMP_ICALL(0x38018EB0u); /* 0x380073D6: call 0x38018eb0 */ /* not lifted */ 2813 RECOMP_FLAGS_IN(); 2814 esi = POP32_VAL(esp); /* 0x380073DB: pop esi */ 2815 SET_LO8(eax, LO8(ebx)); /* 0x380073DC: mov al, bl */ 2816 ebx = POP32_VAL(esp); /* 0x380073DE: pop ebx */ 2817 esp = ebp; /* 0x380073DF: mov esp, ebp */ 2818 ebp = POP32_VAL(esp); /* 0x380073E1: pop ebp */ 2819 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380073E2: ret */ 2820 RECOMP_REGS_OUT(); 2821 } 2822 2823 void sub_3800735F(void) { 2824 int _fpu_cmp = 0; 2825 uint32_t _cf = 0; 2826 int _df = 1; 2827 uint32_t _flag_k = FK_NONE; 2828 uint32_t _flag_a = 0, _flag_b = 0; 2829 uint32_t _itail_tgt = 0; 2830 RECOMP_REGS_LOCALS 2831 RECOMP_ENTER(0x3800735Fu); 2832 2833 L_3800735F: 2834 MEM32(0x3806B6E8) = 0xAu; /* 0x3800735F: mov dword ptr [0x3806b6e8], 0xa */ 2835 ecx = MEM32(esi + 0x1B0); /* 0x38007369: mov ecx, dword ptr [esi + 0x1b0] */ 2836 RECOMP_ICALL(MEM32(0x3804E1E4)); /* 0x3800736F: call dword ptr [0x3804e1e4] */ 2837 RECOMP_FLAGS_IN(); 2838 _st[0] = -_st[0]; /* 0x38007375: fchs */ 2839 /* test ebx, ebx */ /* 0x38007377: test ebx, ebx */ 2840 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 2841 _cf = 0; 2842 _flag_k = FK_TEST; 2843 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0xC0) = _v; } /* 0x38007379: fstp dword ptr [esi + 0xc0] */ 2844 edi = POP32_VAL(esp); /* 0x3800737F: pop edi */ 2845 if (TEST_Z(_flag_a, _flag_b)) goto L_38007389; /* 0x38007380: je 0x38007389 */ 2846 L_38007382: 2847 ecx = esi; /* 0x38007382: mov ecx, esi */ 2848 RECOMP_ICALL(0x380084F0u); /* 0x38007384: call 0x380084f0 */ /* not lifted */ 2849 RECOMP_FLAGS_IN(); 2850 L_38007389: 2851 eax = MEM32(esi + 0x104); /* 0x38007389: mov eax, dword ptr [esi + 0x104] */ 2852 ecx = eax; /* 0x3800738F: mov ecx, eax */ 2853 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x2000u); 2854 ecx = ecx & 0x2000u; /* 0x38007391: and ecx, 0x2000 */ 2855 _cf = 0; 2856 _flag_k = FK_TEST; 2857 /* cmp ecx, 0x2000u */ /* 0x38007397: cmp ecx, 0x2000 */ 2858 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x2000u); 2859 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2860 _flag_k = FK_CMP; 2861 if (CMP_NE(_flag_a, _flag_b)) goto L_380073B1; /* 0x3800739D: jne 0x380073b1 */ 2862 L_3800739F: 2863 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFDFFFu); 2864 eax = eax & 0xFFFFDFFFu; /* 0x3800739F: and eax, 0xffffdfff */ 2865 _cf = 0; 2866 _flag_k = FK_TEST; 2867 ecx = esi; /* 0x380073A4: mov ecx, esi */ 2868 MEM32(esi + 0x104) = eax; /* 0x380073A6: mov dword ptr [esi + 0x104], eax */ 2869 RECOMP_ICALL(0x38008930u); /* 0x380073AC: call 0x38008930 */ /* not lifted */ 2870 RECOMP_FLAGS_IN(); 2871 L_380073B1: 2872 edx = MEM32(0x3806EC04); /* 0x380073B1: mov edx, dword ptr [0x3806ec04] */ 2873 ecx = MEM32(edx + 0x80); /* 0x380073B7: mov ecx, dword ptr [edx + 0x80] */ 2874 RECOMP_ICALL(0x38018EB0u); /* 0x380073BD: call 0x38018eb0 */ /* not lifted */ 2875 RECOMP_FLAGS_IN(); 2876 ecx = esi; /* 0x380073C2: mov ecx, esi */ 2877 RECOMP_ICALL(0x38018990u); /* 0x380073C4: call 0x38018990 */ /* not lifted */ 2878 RECOMP_FLAGS_IN(); 2879 SET_LO8(ebx, LO8(eax)); /* 0x380073C9: mov bl, al */ 2880 eax = MEM32(0x3806EC04); /* 0x380073CB: mov eax, dword ptr [0x3806ec04] */ 2881 ecx = MEM32(eax + 0x80); /* 0x380073D0: mov ecx, dword ptr [eax + 0x80] */ 2882 RECOMP_ICALL(0x38018EB0u); /* 0x380073D6: call 0x38018eb0 */ /* not lifted */ 2883 RECOMP_FLAGS_IN(); 2884 esi = POP32_VAL(esp); /* 0x380073DB: pop esi */ 2885 SET_LO8(eax, LO8(ebx)); /* 0x380073DC: mov al, bl */ 2886 ebx = POP32_VAL(esp); /* 0x380073DE: pop ebx */ 2887 esp = ebp; /* 0x380073DF: mov esp, ebp */ 2888 ebp = POP32_VAL(esp); /* 0x380073E1: pop ebp */ 2889 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380073E2: ret */ 2890 RECOMP_REGS_OUT(); 2891 } 2892 2893 void sub_380073F0(void) { 2894 int _fpu_cmp = 0; 2895 uint32_t _cf = 0; 2896 int _df = 1; 2897 uint32_t _flag_k = FK_NONE; 2898 uint32_t _flag_a = 0, _flag_b = 0; 2899 uint32_t _itail_tgt = 0; 2900 RECOMP_REGS_LOCALS 2901 RECOMP_ENTER(0x380073F0u); 2902 2903 L_380073F0: 2904 ecx = MEM32(0x3806EC04); /* 0x380073F0: mov ecx, dword ptr [0x3806ec04] */ 2905 eax = MEM32(ecx); /* 0x380073F6: mov eax, dword ptr [ecx] */ 2906 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x380073F8: call dword ptr [eax + 0x10] */ 2907 RECOMP_FLAGS_IN(); 2908 ecx = MEM32(eax + 0x60); /* 0x380073FB: mov ecx, dword ptr [eax + 0x60] */ 2909 fp_push(*(float*)&MEM32(ecx + 0xD8)); /* 0x380073FE: fld dword ptr [ecx + 0xd8] */ 2910 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38007404: ret */ 2911 RECOMP_REGS_OUT(); 2912 } 2913 2914 void sub_38007410(void) { 2915 int _fpu_cmp = 0; 2916 uint32_t _cf = 0; 2917 int _df = 1; 2918 uint32_t _flag_k = FK_NONE; 2919 uint32_t _flag_a = 0, _flag_b = 0; 2920 uint32_t _itail_tgt = 0; 2921 RECOMP_REGS_LOCALS 2922 RECOMP_ENTER(0x38007410u); 2923 2924 L_38007410: 2925 PUSH32(esp, ebp); /* 0x38007410: push ebp */ 2926 ebp = esp; /* 0x38007411: mov ebp, esp */ 2927 PUSH32(esp, esi); /* 0x38007413: push esi */ 2928 PUSH32(esp, edi); /* 0x38007414: push edi */ 2929 edi = ecx; /* 0x38007415: mov edi, ecx */ 2930 RECOMP_ICALL(0x3801DA30u); /* 0x38007417: call 0x3801da30 */ /* not lifted */ 2931 RECOMP_FLAGS_IN(); 2932 esi = eax; /* 0x3800741C: mov esi, eax */ 2933 /* test esi, esi */ /* 0x3800741E: test esi, esi */ 2934 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 2935 _cf = 0; 2936 _flag_k = FK_TEST; 2937 if (TEST_Z(_flag_a, _flag_b)) goto L_3800743F; /* 0x38007420: je 0x3800743f */ 2938 L_38007422: 2939 ecx = edi; /* 0x38007422: mov ecx, edi */ 2940 RECOMP_ICALL(0x38018EB0u); /* 0x38007424: call 0x38018eb0 */ /* not lifted */ 2941 RECOMP_FLAGS_IN(); 2942 ecx = MEM32(ebp + 0x8); /* 0x38007429: mov ecx, dword ptr [ebp + 8] */ 2943 PUSH32(esp, eax); /* 0x3800742C: push eax */ 2944 eax = MEM32(ebp + 0xC); /* 0x3800742D: mov eax, dword ptr [ebp + 0xc] */ 2945 PUSH32(esp, eax); /* 0x38007430: push eax */ 2946 PUSH32(esp, ecx); /* 0x38007431: push ecx */ 2947 ecx = esi; /* 0x38007432: mov ecx, esi */ 2948 RECOMP_ICALL(0x3802C090u); /* 0x38007434: call 0x3802c090 */ /* not lifted */ 2949 RECOMP_FLAGS_IN(); 2950 edi = POP32_VAL(esp); /* 0x38007439: pop edi */ 2951 esi = POP32_VAL(esp); /* 0x3800743A: pop esi */ 2952 ebp = POP32_VAL(esp); /* 0x3800743B: pop ebp */ 2953 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3800743C: ret 8 */ 2954 L_3800743F: 2955 edi = POP32_VAL(esp); /* 0x3800743F: pop edi */ 2956 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 2957 SET_LO8(eax, 0); /* 0x38007440: xor al, al */ 2958 _cf = 0; 2959 _flag_k = FK_NARROW(FK_TEST, 24); 2960 esi = POP32_VAL(esp); /* 0x38007442: pop esi */ 2961 ebp = POP32_VAL(esp); /* 0x38007443: pop ebp */ 2962 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x38007444: ret 8 */ 2963 RECOMP_REGS_OUT(); 2964 } 2965 2966 void sub_38007450(void) { 2967 int _fpu_cmp = 0; 2968 uint32_t _cf = 0; 2969 int _df = 1; 2970 uint32_t _flag_k = FK_NONE; 2971 uint32_t _flag_a = 0, _flag_b = 0; 2972 uint32_t _itail_tgt = 0; 2973 RECOMP_REGS_LOCALS 2974 RECOMP_ENTER(0x38007450u); 2975 2976 L_38007450: 2977 PUSH32(esp, ebp); /* 0x38007450: push ebp */ 2978 ebp = esp; /* 0x38007451: mov ebp, esp */ 2979 PUSH32(esp, esi); /* 0x38007453: push esi */ 2980 PUSH32(esp, edi); /* 0x38007454: push edi */ 2981 esi = ecx; /* 0x38007455: mov esi, ecx */ 2982 RECOMP_ICALL(0x3801DA30u); /* 0x38007457: call 0x3801da30 */ /* not lifted */ 2983 RECOMP_FLAGS_IN(); 2984 edi = eax; /* 0x3800745C: mov edi, eax */ 2985 /* test edi, edi */ /* 0x3800745E: test edi, edi */ 2986 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 2987 _cf = 0; 2988 _flag_k = FK_TEST; 2989 if (TEST_Z(_flag_a, _flag_b)) goto L_380074AE; /* 0x38007460: je 0x380074ae */ 2990 L_38007462: 2991 ecx = edi; /* 0x38007462: mov ecx, edi */ 2992 RECOMP_ICALL(0x3802D200u); /* 0x38007464: call 0x3802d200 */ /* not lifted */ 2993 RECOMP_FLAGS_IN(); 2994 /* test LO8(eax), LO8(eax) */ /* 0x38007469: test al, al */ 2995 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2996 _cf = 0; 2997 _flag_k = FK_NARROW(FK_TEST, 24); 2998 if (TEST_Z(_flag_a, _flag_b)) goto L_380074AE; /* 0x3800746B: je 0x380074ae */ 2999 L_3800746D: 3000 ecx = esi; /* 0x3800746D: mov ecx, esi */ 3001 RECOMP_ICALL(0x38018ED0u); /* 0x3800746F: call 0x38018ed0 */ /* not lifted */ 3002 RECOMP_FLAGS_IN(); 3003 /* test eax, eax */ /* 0x38007474: test eax, eax */ 3004 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3005 _cf = 0; 3006 _flag_k = FK_TEST; 3007 if (TEST_Z(_flag_a, _flag_b)) goto L_380074A6; /* 0x38007476: je 0x380074a6 */ 3008 L_38007478: 3009 esi = MEM32(eax + 0xC); /* 0x38007478: mov esi, dword ptr [eax + 0xc] */ 3010 eax = MEM32(ebp + 0x8); /* 0x3800747B: mov eax, dword ptr [ebp + 8] */ 3011 PUSH32(esp, esi); /* 0x3800747E: push esi */ 3012 PUSH32(esp, eax); /* 0x3800747F: push eax */ 3013 ecx = edi; /* 0x38007480: mov ecx, edi */ 3014 RECOMP_ICALL(0x3802B820u); /* 0x38007482: call 0x3802b820 */ /* not lifted */ 3015 RECOMP_FLAGS_IN(); 3016 /* test eax, eax */ /* 0x38007487: test eax, eax */ 3017 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3018 _cf = 0; 3019 _flag_k = FK_TEST; 3020 if (TEST_Z(_flag_a, _flag_b)) goto L_380074A6; /* 0x38007489: je 0x380074a6 */ 3021 L_3800748B: 3022 eax = MEM32(eax + 0xC); /* 0x3800748B: mov eax, dword ptr [eax + 0xc] */ 3023 /* cmp eax, esi */ /* 0x3800748E: cmp eax, esi */ 3024 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 3025 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3026 _flag_k = FK_CMP; 3027 if (CMP_EQ(_flag_a, _flag_b)) goto L_380074AE; /* 0x38007490: je 0x380074ae */ 3028 L_38007492: 3029 PUSH32(esp, eax); /* 0x38007492: push eax */ 3030 PUSH32(esp, esi); /* 0x38007493: push esi */ 3031 ecx = edi; /* 0x38007494: mov ecx, edi */ 3032 RECOMP_ICALL(0x3802BFD0u); /* 0x38007496: call 0x3802bfd0 */ /* not lifted */ 3033 RECOMP_FLAGS_IN(); 3034 /* test LO8(eax), LO8(eax) */ /* 0x3800749B: test al, al */ 3035 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3036 _cf = 0; 3037 _flag_k = FK_NARROW(FK_TEST, 24); 3038 edi = POP32_VAL(esp); /* 0x3800749D: pop edi */ 3039 SET_LO8(eax, (TEST_NZ(_flag_a, _flag_b)) ? 1 : 0); /* 0x3800749E: setne al */ 3040 esi = POP32_VAL(esp); /* 0x380074A1: pop esi */ 3041 ebp = POP32_VAL(esp); /* 0x380074A2: pop ebp */ 3042 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x380074A3: ret 4 */ 3043 L_380074A6: 3044 edi = POP32_VAL(esp); /* 0x380074A6: pop edi */ 3045 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 3046 SET_LO8(eax, 0); /* 0x380074A7: xor al, al */ 3047 _cf = 0; 3048 _flag_k = FK_NARROW(FK_TEST, 24); 3049 esi = POP32_VAL(esp); /* 0x380074A9: pop esi */ 3050 ebp = POP32_VAL(esp); /* 0x380074AA: pop ebp */ 3051 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x380074AB: ret 4 */ 3052 L_380074AE: 3053 edi = POP32_VAL(esp); /* 0x380074AE: pop edi */ 3054 SET_LO8(eax, 1); /* 0x380074AF: mov al, 1 */ 3055 esi = POP32_VAL(esp); /* 0x380074B1: pop esi */ 3056 ebp = POP32_VAL(esp); /* 0x380074B2: pop ebp */ 3057 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x380074B3: ret 4 */ 3058 RECOMP_REGS_OUT(); 3059 } 3060 3061 void sub_380074C0(void) { 3062 int _fpu_cmp = 0; 3063 uint32_t _cf = 0; 3064 int _df = 1; 3065 uint32_t _flag_k = FK_NONE; 3066 uint32_t _flag_a = 0, _flag_b = 0; 3067 uint32_t _itail_tgt = 0; 3068 RECOMP_REGS_LOCALS 3069 RECOMP_ENTER(0x380074C0u); 3070 3071 L_380074C0: 3072 PUSH32(esp, ebp); /* 0x380074C0: push ebp */ 3073 ebp = esp; /* 0x380074C1: mov ebp, esp */ 3074 PUSH32(esp, esi); /* 0x380074C3: push esi */ 3075 PUSH32(esp, edi); /* 0x380074C4: push edi */ 3076 esi = ecx; /* 0x380074C5: mov esi, ecx */ 3077 RECOMP_ICALL(0x3801DA30u); /* 0x380074C7: call 0x3801da30 */ /* not lifted */ 3078 RECOMP_FLAGS_IN(); 3079 edi = eax; /* 0x380074CC: mov edi, eax */ 3080 /* test edi, edi */ /* 0x380074CE: test edi, edi */ 3081 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 3082 _cf = 0; 3083 _flag_k = FK_TEST; 3084 if (TEST_Z(_flag_a, _flag_b)) goto L_38007534; /* 0x380074D0: je 0x38007534 */ 3085 L_380074D2: 3086 ecx = edi; /* 0x380074D2: mov ecx, edi */ 3087 RECOMP_ICALL(0x3802D200u); /* 0x380074D4: call 0x3802d200 */ /* not lifted */ 3088 RECOMP_FLAGS_IN(); 3089 /* test LO8(eax), LO8(eax) */ /* 0x380074D9: test al, al */ 3090 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3091 _cf = 0; 3092 _flag_k = FK_NARROW(FK_TEST, 24); 3093 if (TEST_Z(_flag_a, _flag_b)) goto L_38007534; /* 0x380074DB: je 0x38007534 */ 3094 L_380074DD: 3095 ecx = esi; /* 0x380074DD: mov ecx, esi */ 3096 RECOMP_ICALL(0x38018ED0u); /* 0x380074DF: call 0x38018ed0 */ /* not lifted */ 3097 RECOMP_FLAGS_IN(); 3098 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 3099 ecx = ecx | 0xFFFFFFFFu; /* 0x380074E4: or ecx, 0xffffffff */ 3100 _cf = 0; 3101 _flag_k = FK_TEST; 3102 /* test eax, eax */ /* 0x380074E7: test eax, eax */ 3103 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3104 _cf = 0; 3105 _flag_k = FK_TEST; 3106 if (TEST_Z(_flag_a, _flag_b)) goto L_380074EE; /* 0x380074E9: je 0x380074ee */ 3107 L_380074EB: 3108 ecx = MEM32(eax + 0xC); /* 0x380074EB: mov ecx, dword ptr [eax + 0xc] */ 3109 L_380074EE: 3110 eax = MEM32(ebp + 0x8); /* 0x380074EE: mov eax, dword ptr [ebp + 8] */ 3111 PUSH32(esp, ecx); /* 0x380074F1: push ecx */ 3112 PUSH32(esp, eax); /* 0x380074F2: push eax */ 3113 ecx = edi; /* 0x380074F3: mov ecx, edi */ 3114 RECOMP_ICALL(0x3802B820u); /* 0x380074F5: call 0x3802b820 */ /* not lifted */ 3115 RECOMP_FLAGS_IN(); 3116 /* test eax, eax */ /* 0x380074FA: test eax, eax */ 3117 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3118 _cf = 0; 3119 _flag_k = FK_TEST; 3120 if (TEST_Z(_flag_a, _flag_b)) goto L_3800752C; /* 0x380074FC: je 0x3800752c */ 3121 L_380074FE: 3122 esi = MEM32(eax + 0xC); /* 0x380074FE: mov esi, dword ptr [eax + 0xc] */ 3123 ecx = MEM32(ebp + 0xC); /* 0x38007501: mov ecx, dword ptr [ebp + 0xc] */ 3124 PUSH32(esp, esi); /* 0x38007504: push esi */ 3125 PUSH32(esp, ecx); /* 0x38007505: push ecx */ 3126 ecx = edi; /* 0x38007506: mov ecx, edi */ 3127 RECOMP_ICALL(0x3802B820u); /* 0x38007508: call 0x3802b820 */ /* not lifted */ 3128 RECOMP_FLAGS_IN(); 3129 /* test eax, eax */ /* 0x3800750D: test eax, eax */ 3130 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3131 _cf = 0; 3132 _flag_k = FK_TEST; 3133 if (TEST_Z(_flag_a, _flag_b)) goto L_3800752C; /* 0x3800750F: je 0x3800752c */ 3134 L_38007511: 3135 eax = MEM32(eax + 0xC); /* 0x38007511: mov eax, dword ptr [eax + 0xc] */ 3136 /* cmp eax, esi */ /* 0x38007514: cmp eax, esi */ 3137 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 3138 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3139 _flag_k = FK_CMP; 3140 if (CMP_EQ(_flag_a, _flag_b)) goto L_38007534; /* 0x38007516: je 0x38007534 */ 3141 L_38007518: 3142 PUSH32(esp, eax); /* 0x38007518: push eax */ 3143 PUSH32(esp, esi); /* 0x38007519: push esi */ 3144 ecx = edi; /* 0x3800751A: mov ecx, edi */ 3145 RECOMP_ICALL(0x3802BFD0u); /* 0x3800751C: call 0x3802bfd0 */ /* not lifted */ 3146 RECOMP_FLAGS_IN(); 3147 /* test LO8(eax), LO8(eax) */ /* 0x38007521: test al, al */ 3148 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3149 _cf = 0; 3150 _flag_k = FK_NARROW(FK_TEST, 24); 3151 edi = POP32_VAL(esp); /* 0x38007523: pop edi */ 3152 SET_LO8(eax, (TEST_NZ(_flag_a, _flag_b)) ? 1 : 0); /* 0x38007524: setne al */ 3153 esi = POP32_VAL(esp); /* 0x38007527: pop esi */ 3154 ebp = POP32_VAL(esp); /* 0x38007528: pop ebp */ 3155 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x38007529: ret 8 */ 3156 L_3800752C: 3157 edi = POP32_VAL(esp); /* 0x3800752C: pop edi */ 3158 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 3159 SET_LO8(eax, 0); /* 0x3800752D: xor al, al */ 3160 _cf = 0; 3161 _flag_k = FK_NARROW(FK_TEST, 24); 3162 esi = POP32_VAL(esp); /* 0x3800752F: pop esi */ 3163 ebp = POP32_VAL(esp); /* 0x38007530: pop ebp */ 3164 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x38007531: ret 8 */ 3165 L_38007534: 3166 edi = POP32_VAL(esp); /* 0x38007534: pop edi */ 3167 SET_LO8(eax, 1); /* 0x38007535: mov al, 1 */ 3168 esi = POP32_VAL(esp); /* 0x38007537: pop esi */ 3169 ebp = POP32_VAL(esp); /* 0x38007538: pop ebp */ 3170 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x38007539: ret 8 */ 3171 RECOMP_REGS_OUT(); 3172 } 3173 3174 void sub_38007540(void) { 3175 int _fpu_cmp = 0; 3176 uint32_t _cf = 0; 3177 int _df = 1; 3178 uint32_t _flag_k = FK_NONE; 3179 uint32_t _flag_a = 0, _flag_b = 0; 3180 uint32_t _itail_tgt = 0; 3181 RECOMP_REGS_LOCALS 3182 RECOMP_ENTER(0x38007540u); 3183 3184 L_38007540: 3185 PUSH32(esp, ebp); /* 0x38007540: push ebp */ 3186 ebp = esp; /* 0x38007541: mov ebp, esp */ 3187 PUSH32(esp, esi); /* 0x38007543: push esi */ 3188 esi = ecx; /* 0x38007544: mov esi, ecx */ 3189 ecx = MEM32(esi + 0xE8); /* 0x38007546: mov ecx, dword ptr [esi + 0xe8] */ 3190 /* test ecx, ecx */ /* 0x3800754C: test ecx, ecx */ 3191 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 3192 _cf = 0; 3193 _flag_k = FK_TEST; 3194 if (TEST_Z(_flag_a, _flag_b)) goto L_38007565; /* 0x3800754E: je 0x38007565 */ 3195 L_38007550: 3196 eax = MEM32(esi + 0x60); /* 0x38007550: mov eax, dword ptr [esi + 0x60] */ 3197 /* test eax, eax */ /* 0x38007553: test eax, eax */ 3198 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3199 _cf = 0; 3200 _flag_k = FK_TEST; 3201 if (TEST_Z(_flag_a, _flag_b)) goto L_3800755C; /* 0x38007555: je 0x3800755c */ 3202 L_38007557: 3203 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x20u); 3204 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3205 eax = eax + 0x20u; /* 0x38007557: add eax, 0x20 */ 3206 _flag_k = FK_ADD; 3207 goto L_3800755E; /* 0x3800755A: jmp 0x3800755e */ 3208 L_3800755C: 3209 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3210 eax = 0; /* 0x3800755C: xor eax, eax */ 3211 _cf = 0; 3212 _flag_k = FK_TEST; 3213 L_3800755E: 3214 PUSH32(esp, eax); /* 0x3800755E: push eax */ 3215 RECOMP_ICALL(MEM32(0x3804E704)); /* 0x3800755F: call dword ptr [0x3804e704] */ 3216 RECOMP_FLAGS_IN(); 3217 L_38007565: 3218 ecx = MEM32(ebp + 0x8); /* 0x38007565: mov ecx, dword ptr [ebp + 8] */ 3219 /* test ecx, ecx */ /* 0x38007568: test ecx, ecx */ 3220 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 3221 _cf = 0; 3222 _flag_k = FK_TEST; 3223 MEM32(esi + 0xE8) = ecx; /* 0x3800756A: mov dword ptr [esi + 0xe8], ecx */ 3224 if (TEST_Z(_flag_a, _flag_b)) goto L_38007591; /* 0x38007570: je 0x38007591 */ 3225 L_38007572: 3226 esi = MEM32(esi + 0x60); /* 0x38007572: mov esi, dword ptr [esi + 0x60] */ 3227 /* test esi, esi */ /* 0x38007575: test esi, esi */ 3228 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 3229 _cf = 0; 3230 _flag_k = FK_TEST; 3231 if (TEST_Z(_flag_a, _flag_b)) goto L_38007588; /* 0x38007577: je 0x38007588 */ 3232 L_38007579: 3233 eax = esi + 0x20; /* 0x38007579: lea eax, [esi + 0x20] */ 3234 PUSH32(esp, eax); /* 0x3800757C: push eax */ 3235 RECOMP_ICALL(MEM32(0x3804E708)); /* 0x3800757D: call dword ptr [0x3804e708] */ 3236 RECOMP_FLAGS_IN(); 3237 esi = POP32_VAL(esp); /* 0x38007583: pop esi */ 3238 ebp = POP32_VAL(esp); /* 0x38007584: pop ebp */ 3239 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38007585: ret 4 */ 3240 L_38007588: 3241 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3242 eax = 0; /* 0x38007588: xor eax, eax */ 3243 _cf = 0; 3244 _flag_k = FK_TEST; 3245 PUSH32(esp, eax); /* 0x3800758A: push eax */ 3246 RECOMP_ICALL(MEM32(0x3804E708)); /* 0x3800758B: call dword ptr [0x3804e708] */ 3247 RECOMP_FLAGS_IN(); 3248 L_38007591: 3249 esi = POP32_VAL(esp); /* 0x38007591: pop esi */ 3250 ebp = POP32_VAL(esp); /* 0x38007592: pop ebp */ 3251 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38007593: ret 4 */ 3252 RECOMP_REGS_OUT(); 3253 } 3254 3255 void sub_380075A0(void) { 3256 int _fpu_cmp = 0; 3257 uint32_t _cf = 0; 3258 int _df = 1; 3259 uint32_t _flag_k = FK_NONE; 3260 uint32_t _flag_a = 0, _flag_b = 0; 3261 uint32_t _itail_tgt = 0; 3262 RECOMP_REGS_LOCALS 3263 RECOMP_ENTER(0x380075A0u); 3264 3265 L_380075A0: 3266 goto L_380075B0; /* 0x380075A0: jmp 0x380075b0 */ 3267 L_380075B0: 3268 PUSH32(esp, ebp); /* 0x380075B0: push ebp */ 3269 ebp = esp; /* 0x380075B1: mov ebp, esp */ 3270 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 3271 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3272 esp = esp - 0x14u; /* 0x380075B3: sub esp, 0x14 */ 3273 _flag_k = FK_CMP; 3274 fp_push(*(double*)ADDR(0x3804E928)); /* 0x380075B6: fld qword ptr [0x3804e928] */ 3275 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x380075BC: fsin */ 3276 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x380075BE: fld dword ptr [0x3804e8e4] */ 3277 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x380075C4: fst dword ptr [ebp - 4] */ 3278 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x380075C7: fstp dword ptr [ebp - 0x14] */ 3279 eax = MEM32(ebp + (-0x4)); /* 0x380075CA: mov eax, dword ptr [ebp - 4] */ 3280 ecx = MEM32(ebp + (-0x14)); /* 0x380075CD: mov ecx, dword ptr [ebp - 0x14] */ 3281 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x380075D0: fstp dword ptr [ebp - 0x10] */ 3282 edx = MEM32(ebp + (-0x10)); /* 0x380075D3: mov edx, dword ptr [ebp - 0x10] */ 3283 fp_push(*(double*)ADDR(0x3804E928)); /* 0x380075D6: fld qword ptr [0x3804e928] */ 3284 MEM32(0x3806E9C8) = ecx; /* 0x380075DC: mov dword ptr [0x3806e9c8], ecx */ 3285 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x380075E2: fcos */ 3286 MEM32(ebp + (-0xC)) = eax; /* 0x380075E4: mov dword ptr [ebp - 0xc], eax */ 3287 MEM32(0x3806E9CC) = edx; /* 0x380075E7: mov dword ptr [0x3806e9cc], edx */ 3288 MEM32(0x3806E9D0) = eax; /* 0x380075ED: mov dword ptr [0x3806e9d0], eax */ 3289 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x380075F2: fstp dword ptr [ebp - 8] */ 3290 fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x380075F5: fld qword ptr [0x3804ebd8] */ 3291 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x380075FB: fsin */ 3292 ecx = MEM32(ebp + (-0x8)); /* 0x380075FD: mov ecx, dword ptr [ebp - 8] */ 3293 MEM32(0x3806E9D4) = ecx; /* 0x38007600: mov dword ptr [0x3806e9d4], ecx */ 3294 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x38007606: fld dword ptr [0x3804e8e4] */ 3295 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3800760C: fst dword ptr [ebp - 4] */ 3296 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3800760F: fstp dword ptr [ebp - 0x14] */ 3297 edx = MEM32(ebp + (-0x4)); /* 0x38007612: mov edx, dword ptr [ebp - 4] */ 3298 eax = MEM32(ebp + (-0x14)); /* 0x38007615: mov eax, dword ptr [ebp - 0x14] */ 3299 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x38007618: fstp dword ptr [ebp - 0x10] */ 3300 ecx = MEM32(ebp + (-0x10)); /* 0x3800761B: mov ecx, dword ptr [ebp - 0x10] */ 3301 fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x3800761E: fld qword ptr [0x3804ebd8] */ 3302 MEM32(0x3806E9D8) = eax; /* 0x38007624: mov dword ptr [0x3806e9d8], eax */ 3303 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x38007629: fcos */ 3304 MEM32(ebp + (-0xC)) = edx; /* 0x3800762B: mov dword ptr [ebp - 0xc], edx */ 3305 MEM32(0x3806E9DC) = ecx; /* 0x3800762E: mov dword ptr [0x3806e9dc], ecx */ 3306 MEM32(0x3806E9E0) = edx; /* 0x38007634: mov dword ptr [0x3806e9e0], edx */ 3307 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x3800763A: fstp dword ptr [ebp - 8] */ 3308 fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x3800763D: fld qword ptr [0x3804ebd0] */ 3309 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x38007643: fsin */ 3310 eax = MEM32(ebp + (-0x8)); /* 0x38007645: mov eax, dword ptr [ebp - 8] */ 3311 MEM32(0x3806E9E4) = eax; /* 0x38007648: mov dword ptr [0x3806e9e4], eax */ 3312 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x3800764D: fld dword ptr [0x3804e8e4] */ 3313 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x38007653: fst dword ptr [ebp - 4] */ 3314 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x38007656: fstp dword ptr [ebp - 0x14] */ 3315 ecx = MEM32(ebp + (-0x4)); /* 0x38007659: mov ecx, dword ptr [ebp - 4] */ 3316 edx = MEM32(ebp + (-0x14)); /* 0x3800765C: mov edx, dword ptr [ebp - 0x14] */ 3317 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x3800765F: fstp dword ptr [ebp - 0x10] */ 3318 eax = MEM32(ebp + (-0x10)); /* 0x38007662: mov eax, dword ptr [ebp - 0x10] */ 3319 fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x38007665: fld qword ptr [0x3804ebd0] */ 3320 MEM32(ebp + (-0xC)) = ecx; /* 0x3800766B: mov dword ptr [ebp - 0xc], ecx */ 3321 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x3800766E: fcos */ 3322 MEM32(0x3806E9E8) = edx; /* 0x38007670: mov dword ptr [0x3806e9e8], edx */ 3323 MEM32(0x3806E9F0) = ecx; /* 0x38007676: mov dword ptr [0x3806e9f0], ecx */ 3324 MEM32(0x3806E9EC) = eax; /* 0x3800767C: mov dword ptr [0x3806e9ec], eax */ 3325 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x38007681: fstp dword ptr [ebp - 8] */ 3326 fp_push(*(double*)ADDR(0x3804EBC8)); /* 0x38007684: fld qword ptr [0x3804ebc8] */ 3327 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x3800768A: fsin */ 3328 edx = MEM32(ebp + (-0x8)); /* 0x3800768C: mov edx, dword ptr [ebp - 8] */ 3329 MEM32(0x3806E9F4) = edx; /* 0x3800768F: mov dword ptr [0x3806e9f4], edx */ 3330 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x38007695: fld dword ptr [0x3804e8e4] */ 3331 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3800769B: fst dword ptr [ebp - 4] */ 3332 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3800769E: fstp dword ptr [ebp - 0x14] */ 3333 ecx = MEM32(ebp + (-0x14)); /* 0x380076A1: mov ecx, dword ptr [ebp - 0x14] */ 3334 eax = MEM32(ebp + (-0x4)); /* 0x380076A4: mov eax, dword ptr [ebp - 4] */ 3335 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x380076A7: fstp dword ptr [ebp - 0x10] */ 3336 edx = MEM32(ebp + (-0x10)); /* 0x380076AA: mov edx, dword ptr [ebp - 0x10] */ 3337 fp_push(*(double*)ADDR(0x3804EBC8)); /* 0x380076AD: fld qword ptr [0x3804ebc8] */ 3338 MEM32(0x3806E9F8) = ecx; /* 0x380076B3: mov dword ptr [0x3806e9f8], ecx */ 3339 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x380076B9: fcos */ 3340 MEM32(ebp + (-0xC)) = eax; /* 0x380076BB: mov dword ptr [ebp - 0xc], eax */ 3341 MEM32(0x3806E9FC) = edx; /* 0x380076BE: mov dword ptr [0x3806e9fc], edx */ 3342 MEM32(0x3806EA00) = eax; /* 0x380076C4: mov dword ptr [0x3806ea00], eax */ 3343 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x380076C9: fstp dword ptr [ebp - 8] */ 3344 ecx = MEM32(ebp + (-0x8)); /* 0x380076CC: mov ecx, dword ptr [ebp - 8] */ 3345 MEM32(0x3806EA04) = ecx; /* 0x380076CF: mov dword ptr [0x3806ea04], ecx */ 3346 esp = ebp; /* 0x380076D5: mov esp, ebp */ 3347 ebp = POP32_VAL(esp); /* 0x380076D7: pop ebp */ 3348 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380076D8: ret */ 3349 RECOMP_REGS_OUT(); 3350 } 3351 3352 void sub_380075B0(void) { 3353 int _fpu_cmp = 0; 3354 uint32_t _cf = 0; 3355 int _df = 1; 3356 uint32_t _flag_k = FK_NONE; 3357 uint32_t _flag_a = 0, _flag_b = 0; 3358 uint32_t _itail_tgt = 0; 3359 RECOMP_REGS_LOCALS 3360 RECOMP_ENTER(0x380075B0u); 3361 3362 L_380075B0: 3363 PUSH32(esp, ebp); /* 0x380075B0: push ebp */ 3364 ebp = esp; /* 0x380075B1: mov ebp, esp */ 3365 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 3366 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3367 esp = esp - 0x14u; /* 0x380075B3: sub esp, 0x14 */ 3368 _flag_k = FK_CMP; 3369 fp_push(*(double*)ADDR(0x3804E928)); /* 0x380075B6: fld qword ptr [0x3804e928] */ 3370 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x380075BC: fsin */ 3371 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x380075BE: fld dword ptr [0x3804e8e4] */ 3372 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x380075C4: fst dword ptr [ebp - 4] */ 3373 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x380075C7: fstp dword ptr [ebp - 0x14] */ 3374 eax = MEM32(ebp + (-0x4)); /* 0x380075CA: mov eax, dword ptr [ebp - 4] */ 3375 ecx = MEM32(ebp + (-0x14)); /* 0x380075CD: mov ecx, dword ptr [ebp - 0x14] */ 3376 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x380075D0: fstp dword ptr [ebp - 0x10] */ 3377 edx = MEM32(ebp + (-0x10)); /* 0x380075D3: mov edx, dword ptr [ebp - 0x10] */ 3378 fp_push(*(double*)ADDR(0x3804E928)); /* 0x380075D6: fld qword ptr [0x3804e928] */ 3379 MEM32(0x3806E9C8) = ecx; /* 0x380075DC: mov dword ptr [0x3806e9c8], ecx */ 3380 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x380075E2: fcos */ 3381 MEM32(ebp + (-0xC)) = eax; /* 0x380075E4: mov dword ptr [ebp - 0xc], eax */ 3382 MEM32(0x3806E9CC) = edx; /* 0x380075E7: mov dword ptr [0x3806e9cc], edx */ 3383 MEM32(0x3806E9D0) = eax; /* 0x380075ED: mov dword ptr [0x3806e9d0], eax */ 3384 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x380075F2: fstp dword ptr [ebp - 8] */ 3385 fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x380075F5: fld qword ptr [0x3804ebd8] */ 3386 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x380075FB: fsin */ 3387 ecx = MEM32(ebp + (-0x8)); /* 0x380075FD: mov ecx, dword ptr [ebp - 8] */ 3388 MEM32(0x3806E9D4) = ecx; /* 0x38007600: mov dword ptr [0x3806e9d4], ecx */ 3389 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x38007606: fld dword ptr [0x3804e8e4] */ 3390 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3800760C: fst dword ptr [ebp - 4] */ 3391 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3800760F: fstp dword ptr [ebp - 0x14] */ 3392 edx = MEM32(ebp + (-0x4)); /* 0x38007612: mov edx, dword ptr [ebp - 4] */ 3393 eax = MEM32(ebp + (-0x14)); /* 0x38007615: mov eax, dword ptr [ebp - 0x14] */ 3394 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x38007618: fstp dword ptr [ebp - 0x10] */ 3395 ecx = MEM32(ebp + (-0x10)); /* 0x3800761B: mov ecx, dword ptr [ebp - 0x10] */ 3396 fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x3800761E: fld qword ptr [0x3804ebd8] */ 3397 MEM32(0x3806E9D8) = eax; /* 0x38007624: mov dword ptr [0x3806e9d8], eax */ 3398 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x38007629: fcos */ 3399 MEM32(ebp + (-0xC)) = edx; /* 0x3800762B: mov dword ptr [ebp - 0xc], edx */ 3400 MEM32(0x3806E9DC) = ecx; /* 0x3800762E: mov dword ptr [0x3806e9dc], ecx */ 3401 MEM32(0x3806E9E0) = edx; /* 0x38007634: mov dword ptr [0x3806e9e0], edx */ 3402 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x3800763A: fstp dword ptr [ebp - 8] */ 3403 fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x3800763D: fld qword ptr [0x3804ebd0] */ 3404 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x38007643: fsin */ 3405 eax = MEM32(ebp + (-0x8)); /* 0x38007645: mov eax, dword ptr [ebp - 8] */ 3406 MEM32(0x3806E9E4) = eax; /* 0x38007648: mov dword ptr [0x3806e9e4], eax */ 3407 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x3800764D: fld dword ptr [0x3804e8e4] */ 3408 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x38007653: fst dword ptr [ebp - 4] */ 3409 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x38007656: fstp dword ptr [ebp - 0x14] */ 3410 ecx = MEM32(ebp + (-0x4)); /* 0x38007659: mov ecx, dword ptr [ebp - 4] */ 3411 edx = MEM32(ebp + (-0x14)); /* 0x3800765C: mov edx, dword ptr [ebp - 0x14] */ 3412 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x3800765F: fstp dword ptr [ebp - 0x10] */ 3413 eax = MEM32(ebp + (-0x10)); /* 0x38007662: mov eax, dword ptr [ebp - 0x10] */ 3414 fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x38007665: fld qword ptr [0x3804ebd0] */ 3415 MEM32(ebp + (-0xC)) = ecx; /* 0x3800766B: mov dword ptr [ebp - 0xc], ecx */ 3416 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x3800766E: fcos */ 3417 MEM32(0x3806E9E8) = edx; /* 0x38007670: mov dword ptr [0x3806e9e8], edx */ 3418 MEM32(0x3806E9F0) = ecx; /* 0x38007676: mov dword ptr [0x3806e9f0], ecx */ 3419 MEM32(0x3806E9EC) = eax; /* 0x3800767C: mov dword ptr [0x3806e9ec], eax */ 3420 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x38007681: fstp dword ptr [ebp - 8] */ 3421 fp_push(*(double*)ADDR(0x3804EBC8)); /* 0x38007684: fld qword ptr [0x3804ebc8] */ 3422 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x3800768A: fsin */ 3423 edx = MEM32(ebp + (-0x8)); /* 0x3800768C: mov edx, dword ptr [ebp - 8] */ 3424 MEM32(0x3806E9F4) = edx; /* 0x3800768F: mov dword ptr [0x3806e9f4], edx */ 3425 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x38007695: fld dword ptr [0x3804e8e4] */ 3426 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3800769B: fst dword ptr [ebp - 4] */ 3427 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3800769E: fstp dword ptr [ebp - 0x14] */ 3428 ecx = MEM32(ebp + (-0x14)); /* 0x380076A1: mov ecx, dword ptr [ebp - 0x14] */ 3429 eax = MEM32(ebp + (-0x4)); /* 0x380076A4: mov eax, dword ptr [ebp - 4] */ 3430 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x380076A7: fstp dword ptr [ebp - 0x10] */ 3431 edx = MEM32(ebp + (-0x10)); /* 0x380076AA: mov edx, dword ptr [ebp - 0x10] */ 3432 fp_push(*(double*)ADDR(0x3804EBC8)); /* 0x380076AD: fld qword ptr [0x3804ebc8] */ 3433 MEM32(0x3806E9F8) = ecx; /* 0x380076B3: mov dword ptr [0x3806e9f8], ecx */ 3434 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x380076B9: fcos */ 3435 MEM32(ebp + (-0xC)) = eax; /* 0x380076BB: mov dword ptr [ebp - 0xc], eax */ 3436 MEM32(0x3806E9FC) = edx; /* 0x380076BE: mov dword ptr [0x3806e9fc], edx */ 3437 MEM32(0x3806EA00) = eax; /* 0x380076C4: mov dword ptr [0x3806ea00], eax */ 3438 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x380076C9: fstp dword ptr [ebp - 8] */ 3439 ecx = MEM32(ebp + (-0x8)); /* 0x380076CC: mov ecx, dword ptr [ebp - 8] */ 3440 MEM32(0x3806EA04) = ecx; /* 0x380076CF: mov dword ptr [0x3806ea04], ecx */ 3441 esp = ebp; /* 0x380076D5: mov esp, ebp */ 3442 ebp = POP32_VAL(esp); /* 0x380076D7: pop ebp */ 3443 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380076D8: ret */ 3444 RECOMP_REGS_OUT(); 3445 } 3446 3447 void sub_380076E0(void) { 3448 int _fpu_cmp = 0; 3449 uint32_t _cf = 0; 3450 int _df = 1; 3451 uint32_t _flag_k = FK_NONE; 3452 uint32_t _flag_a = 0, _flag_b = 0; 3453 uint32_t _itail_tgt = 0; 3454 RECOMP_REGS_LOCALS 3455 RECOMP_ENTER(0x380076E0u); 3456 3457 L_380076E0: 3458 PUSH32(esp, ebp); /* 0x380076E0: push ebp */ 3459 ebp = esp; /* 0x380076E1: mov ebp, esp */ 3460 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x3Cu); 3461 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3462 esp = esp - 0x3Cu; /* 0x380076E3: sub esp, 0x3c */ 3463 _flag_k = FK_CMP; 3464 PUSH32(esp, ebx); /* 0x380076E6: push ebx */ 3465 PUSH32(esp, esi); /* 0x380076E7: push esi */ 3466 PUSH32(esp, edi); /* 0x380076E8: push edi */ 3467 esi = ecx; /* 0x380076E9: mov esi, ecx */ 3468 RECOMP_ICALL(0x38018E90u); /* 0x380076EB: call 0x38018e90 */ /* not lifted */ 3469 RECOMP_FLAGS_IN(); 3470 fp_push(*(float*)&MEM32(esi + 0xBC)); /* 0x380076F0: fld dword ptr [esi + 0xbc] */ 3471 _st[0] *= (double)*(float*)ADDR(0x3804E8BC); /* 0x380076F6: fmul dword ptr [0x3804e8bc] */ 3472 eax = MEM32(ebp + 0x8); /* 0x380076FC: mov eax, dword ptr [ebp + 8] */ 3473 ecx = MEM32(ebp + 0xC); /* 0x380076FF: mov ecx, dword ptr [ebp + 0xc] */ 3474 MEM32(esi + 0x108) = eax; /* 0x38007702: mov dword ptr [esi + 0x108], eax */ 3475 _st[0] = tan(_st[0]); fp_push(1.0); _fpu_cmp = 1; /* 0x38007708: fptan */ 3476 MEM32(esi + 0x10C) = ecx; /* 0x3800770A: mov dword ptr [esi + 0x10c], ecx */ 3477 MEM32(ebp + (-0x10)) = 0x3F800000u; /* 0x38007710: mov dword ptr [ebp - 0x10], 0x3f800000 */ 3478 ecx = MEM32(ebp + (-0x10)); /* 0x38007717: mov ecx, dword ptr [ebp - 0x10] */ 3479 edi = esi + 0x144; /* 0x3800771A: lea edi, [esi + 0x144] */ 3480 MEM32(ebp + (-0x4)) = ecx; /* 0x38007720: mov dword ptr [ebp - 4], ecx */ 3481 ecx = edi; /* 0x38007723: mov ecx, edi */ 3482 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x38007725: fstp st(0) */ 3483 fp_push(_st[0]); /* 0x38007727: fld st(0) */ 3484 _st[0] *= (double)*(float*)ADDR(ebp + 0x8); /* 0x38007729: fmul dword ptr [ebp + 8] */ 3485 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x18)) = _v; } /* 0x3800772C: fstp dword ptr [ebp - 0x18] */ 3486 edx = MEM32(ebp + (-0x18)); /* 0x3800772F: mov edx, dword ptr [ebp - 0x18] */ 3487 _st[0] /= (double)*(float*)ADDR(esi + 0xC0); /* 0x38007732: fdiv dword ptr [esi + 0xc0] */ 3488 MEM32(ebp + (-0xC)) = edx; /* 0x38007738: mov dword ptr [ebp - 0xc], edx */ 3489 edx = ebp + (-0xC); /* 0x3800773B: lea edx, [ebp - 0xc] */ 3490 PUSH32(esp, edx); /* 0x3800773E: push edx */ 3491 _st[0] *= (double)*(float*)ADDR(ebp + 0xC); /* 0x3800773F: fmul dword ptr [ebp + 0xc] */ 3492 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x38007742: fstp dword ptr [ebp - 0x14] */ 3493 eax = MEM32(ebp + (-0x14)); /* 0x38007745: mov eax, dword ptr [ebp - 0x14] */ 3494 MEM32(ebp + (-0x8)) = eax; /* 0x38007748: mov dword ptr [ebp - 8], eax */ 3495 eax = ebp + (-0x30); /* 0x3800774B: lea eax, [ebp - 0x30] */ 3496 PUSH32(esp, eax); /* 0x3800774E: push eax */ 3497 RECOMP_ICALL(MEM32(0x3804E4FC)); /* 0x3800774F: call dword ptr [0x3804e4fc] */ 3498 RECOMP_FLAGS_IN(); 3499 ecx = MEM32(eax); /* 0x38007755: mov ecx, dword ptr [eax] */ 3500 MEM32(ebp + (-0x18)) = ecx; /* 0x38007757: mov dword ptr [ebp - 0x18], ecx */ 3501 edx = MEM32(eax + 0x4); /* 0x3800775A: mov edx, dword ptr [eax + 4] */ 3502 MEM32(ebp + (-0x14)) = edx; /* 0x3800775D: mov dword ptr [ebp - 0x14], edx */ 3503 eax = MEM32(eax + 0x8); /* 0x38007760: mov eax, dword ptr [eax + 8] */ 3504 ecx = ebp + (-0x18); /* 0x38007763: lea ecx, [ebp - 0x18] */ 3505 PUSH32(esp, ecx); /* 0x38007766: push ecx */ 3506 edx = ebp + (-0x3C); /* 0x38007767: lea edx, [ebp - 0x3c] */ 3507 PUSH32(esp, edx); /* 0x3800776A: push edx */ 3508 ecx = edi; /* 0x3800776B: mov ecx, edi */ 3509 MEM32(ebp + (-0x10)) = eax; /* 0x3800776D: mov dword ptr [ebp - 0x10], eax */ 3510 RECOMP_ICALL(MEM32(0x3804E4FC)); /* 0x38007770: call dword ptr [0x3804e4fc] */ 3511 RECOMP_FLAGS_IN(); 3512 fp_push(*(float*)&MEM32(edi + 0xC)); /* 0x38007776: fld dword ptr [edi + 0xc] */ 3513 ecx = MEM32(eax); /* 0x38007779: mov ecx, dword ptr [eax] */ 3514 _st[0] += _st[0]; /* 0x3800777B: fadd st(0), st(0) */ 3515 MEM32(ebp + (-0x24)) = ecx; /* 0x3800777D: mov dword ptr [ebp - 0x24], ecx */ 3516 edx = MEM32(eax + 0x4); /* 0x38007780: mov edx, dword ptr [eax + 4] */ 3517 MEM32(ebp + (-0x20)) = edx; /* 0x38007783: mov dword ptr [ebp - 0x20], edx */ 3518 eax = MEM32(eax + 0x8); /* 0x38007786: mov eax, dword ptr [eax + 8] */ 3519 PUSH32(esp, ecx); /* 0x38007789: push ecx */ 3520 ecx = ebp + (-0x18); /* 0x3800778A: lea ecx, [ebp - 0x18] */ 3521 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x3800778D: fstp dword ptr [esp] */ 3522 MEM32(ebp + (-0x1C)) = eax; /* 0x38007790: mov dword ptr [ebp - 0x1c], eax */ 3523 RECOMP_ICALL(MEM32(0x3804E4D4)); /* 0x38007793: call dword ptr [0x3804e4d4] */ 3524 RECOMP_FLAGS_IN(); 3525 PUSH32(esp, 0x40000000u); /* 0x38007799: push 0x40000000 */ 3526 ecx = ebp + (-0x24); /* 0x3800779E: lea ecx, [ebp - 0x24] */ 3527 RECOMP_ICALL(MEM32(0x3804E4D4)); /* 0x380077A1: call dword ptr [0x3804e4d4] */ 3528 RECOMP_FLAGS_IN(); 3529 ecx = ebp + (-0x18); /* 0x380077A7: lea ecx, [ebp - 0x18] */ 3530 PUSH32(esp, ecx); /* 0x380077AA: push ecx */ 3531 ecx = ebp + (-0xC); /* 0x380077AB: lea ecx, [ebp - 0xc] */ 3532 RECOMP_ICALL(MEM32(0x3804E4E8)); /* 0x380077AE: call dword ptr [0x3804e4e8] */ 3533 RECOMP_FLAGS_IN(); 3534 edx = ebp + (-0x24); /* 0x380077B4: lea edx, [ebp - 0x24] */ 3535 PUSH32(esp, edx); /* 0x380077B7: push edx */ 3536 ecx = ebp + (-0xC); /* 0x380077B8: lea ecx, [ebp - 0xc] */ 3537 RECOMP_ICALL(MEM32(0x3804E4E8)); /* 0x380077BB: call dword ptr [0x3804e4e8] */ 3538 RECOMP_FLAGS_IN(); 3539 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x380077C1: fld dword ptr [ebp - 8] */ 3540 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804EBE0)); /* 0x380077C4: fcomp dword ptr [0x3804ebe0] */ 3541 fp_pop(); 3542 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x380077CA: fnstsw ax */ 3543 /* test HI8(eax), 1 */ /* 0x380077CC: test ah, 1 */ 3544 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 3545 _cf = 0; 3546 _flag_k = FK_NARROW(FK_TEST, 24); 3547 if (TEST_Z(_flag_a, _flag_b)) goto L_38007823; /* 0x380077CF: je 0x38007823 */ 3548 L_380077D1: 3549 fp_push(*(float*)&MEM32(esi + 0x13C)); /* 0x380077D1: fld dword ptr [esi + 0x13c] */ 3550 eax = MEM32(ebp + (-0xC)); /* 0x380077D7: mov eax, dword ptr [ebp - 0xc] */ 3551 _st[0] /= (double)*(float*)ADDR(ebp + (-0x8)); /* 0x380077DA: fdiv dword ptr [ebp - 8] */ 3552 ecx = MEM32(ebp + (-0x8)); /* 0x380077DD: mov ecx, dword ptr [ebp - 8] */ 3553 edx = MEM32(ebp + (-0x4)); /* 0x380077E0: mov edx, dword ptr [ebp - 4] */ 3554 MEM32(ebp + (-0x18)) = eax; /* 0x380077E3: mov dword ptr [ebp - 0x18], eax */ 3555 MEM32(ebp + (-0x14)) = ecx; /* 0x380077E6: mov dword ptr [ebp - 0x14], ecx */ 3556 MEM32(ebp + (-0x10)) = edx; /* 0x380077E9: mov dword ptr [ebp - 0x10], edx */ 3557 edi = esi + 0x11C; /* 0x380077EC: lea edi, [esi + 0x11c] */ 3558 eax = edi; /* 0x380077F2: mov eax, edi */ 3559 _st[0] = -_st[0]; /* 0x380077F4: fchs */ 3560 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x380077F6: fld dword ptr [ebp - 0xc] */ 3561 _st[0] *= _st[1]; /* 0x380077F9: fmul st(1) */ 3562 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x18)) = _v; } /* 0x380077FB: fstp dword ptr [ebp - 0x18] */ 3563 ecx = MEM32(ebp + (-0x18)); /* 0x380077FE: mov ecx, dword ptr [ebp - 0x18] */ 3564 fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x38007801: fld dword ptr [ebp - 0x14] */ 3565 MEM32(eax) = ecx; /* 0x38007804: mov dword ptr [eax], ecx */ 3566 _st[0] *= _st[1]; /* 0x38007806: fmul st(1) */ 3567 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x38007808: fstp dword ptr [ebp - 0x14] */ 3568 edx = MEM32(ebp + (-0x14)); /* 0x3800780B: mov edx, dword ptr [ebp - 0x14] */ 3569 fp_push(*(float*)&MEM32(ebp + (-0x10))); /* 0x3800780E: fld dword ptr [ebp - 0x10] */ 3570 MEM32(eax + 0x4) = edx; /* 0x38007811: mov dword ptr [eax + 4], edx */ 3571 _st[0] *= _st[1]; /* 0x38007814: fmul st(1) */ 3572 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x38007816: fstp dword ptr [ebp - 0x10] */ 3573 ecx = MEM32(ebp + (-0x10)); /* 0x38007819: mov ecx, dword ptr [ebp - 0x10] */ 3574 MEM32(eax + 0x8) = ecx; /* 0x3800781C: mov dword ptr [eax + 8], ecx */ 3575 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3800781F: fstp st(0) */ 3576 goto L_3800785C; /* 0x38007821: jmp 0x3800785c */ 3577 L_38007823: 3578 ecx = MEM32(esi + 0x1B0); /* 0x38007823: mov ecx, dword ptr [esi + 0x1b0] */ 3579 RECOMP_ICALL(MEM32(0x3804E15C)); /* 0x38007829: call dword ptr [0x3804e15c] */ 3580 RECOMP_FLAGS_IN(); 3581 fp_push(_st[0]); /* 0x3800782F: fld st(0) */ 3582 eax = MEM32(ebp + (-0xC)); /* 0x38007831: mov eax, dword ptr [ebp - 0xc] */ 3583 ecx = MEM32(ebp + (-0x8)); /* 0x38007834: mov ecx, dword ptr [ebp - 8] */ 3584 edi = esi + 0x11C; /* 0x38007837: lea edi, [esi + 0x11c] */ 3585 edx = edi; /* 0x3800783D: mov edx, edi */ 3586 MEM32(edx) = eax; /* 0x3800783F: mov dword ptr [edx], eax */ 3587 eax = MEM32(ebp + (-0x4)); /* 0x38007841: mov eax, dword ptr [ebp - 4] */ 3588 MEM32(edx + 0x4) = ecx; /* 0x38007844: mov dword ptr [edx + 4], ecx */ 3589 MEM32(edx + 0x8) = eax; /* 0x38007847: mov dword ptr [edx + 8], eax */ 3590 _st[0] *= (double)*(float*)ADDR(edi); /* 0x3800784A: fmul dword ptr [edi] */ 3591 { float _v = (float)fp_pop(); *(float*)ADDR(edi) = _v; } /* 0x3800784C: fstp dword ptr [edi] */ 3592 fp_push(_st[0]); /* 0x3800784E: fld st(0) */ 3593 _st[0] *= (double)*(float*)ADDR(edi + 0x4); /* 0x38007850: fmul dword ptr [edi + 4] */ 3594 { float _v = (float)fp_pop(); *(float*)ADDR(edi + 0x4) = _v; } /* 0x38007853: fstp dword ptr [edi + 4] */ 3595 _st[0] *= (double)*(float*)ADDR(edi + 0x8); /* 0x38007856: fmul dword ptr [edi + 8] */ 3596 { float _v = (float)fp_pop(); *(float*)ADDR(edi + 0x8) = _v; } /* 0x38007859: fstp dword ptr [edi + 8] */ 3597 L_3800785C: 3598 PUSH32(esp, edi); /* 0x3800785C: push edi */ 3599 ecx = ebp + (-0x3C); /* 0x3800785D: lea ecx, [ebp - 0x3c] */ 3600 PUSH32(esp, ecx); /* 0x38007860: push ecx */ 3601 ecx = esi; /* 0x38007861: mov ecx, esi */ 3602 RECOMP_ICALL(0x380078F0u); /* 0x38007863: call 0x380078f0 */ /* not lifted */ 3603 RECOMP_FLAGS_IN(); 3604 ecx = MEM32(eax); /* 0x38007868: mov ecx, dword ptr [eax] */ 3605 edx = MEM32(eax + 0x4); /* 0x3800786A: mov edx, dword ptr [eax + 4] */ 3606 ebx = MEM32(eax + 0x8); /* 0x3800786D: mov ebx, dword ptr [eax + 8] */ 3607 MEM32(ebp + (-0x24)) = ecx; /* 0x38007870: mov dword ptr [ebp - 0x24], ecx */ 3608 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x38007873: fld dword ptr [ebp - 0x24] */ 3609 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E0)); /* 0x38007876: fcomp dword ptr [0x3804e8e0] */ 3610 fp_pop(); 3611 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3800787C: fnstsw ax */ 3612 /* test HI8(eax), 0x40u */ /* 0x3800787E: test ah, 0x40 */ 3613 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 3614 _cf = 0; 3615 _flag_k = FK_NARROW(FK_TEST, 24); 3616 if (TEST_NZ(_flag_a, _flag_b)) goto L_380078CF; /* 0x38007881: jne 0x380078cf */ 3617 L_38007883: 3618 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x38007883: fld dword ptr [ebp - 0x24] */ 3619 eax = esi + 0x110; /* 0x38007886: lea eax, [esi + 0x110] */ 3620 MEM32(eax) = ecx; /* 0x3800788C: mov dword ptr [eax], ecx */ 3621 MEM32(eax + 0x4) = edx; /* 0x3800788E: mov dword ptr [eax + 4], edx */ 3622 MEM32(eax + 0x8) = ebx; /* 0x38007891: mov dword ptr [eax + 8], ebx */ 3623 _st[0] -= (double)*(float*)ADDR(esi + 0x138); /* 0x38007894: fsub dword ptr [esi + 0x138] */ 3624 MEM32(ebp + (-0x18)) = ecx; /* 0x3800789A: mov dword ptr [ebp - 0x18], ecx */ 3625 MEM32(ebp + (-0x14)) = edx; /* 0x3800789D: mov dword ptr [ebp - 0x14], edx */ 3626 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x18)) = _v; } /* 0x380078A0: fstp dword ptr [ebp - 0x18] */ 3627 ecx = MEM32(ebp + (-0x18)); /* 0x380078A3: mov ecx, dword ptr [ebp - 0x18] */ 3628 fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x380078A6: fld dword ptr [ebp - 0x14] */ 3629 MEM32(ebp + (-0x10)) = ebx; /* 0x380078A9: mov dword ptr [ebp - 0x10], ebx */ 3630 _st[0] -= (double)*(float*)ADDR(esi + 0x13C); /* 0x380078AC: fsub dword ptr [esi + 0x13c] */ 3631 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x380078B2: fstp dword ptr [ebp - 0x14] */ 3632 edx = MEM32(ebp + (-0x14)); /* 0x380078B5: mov edx, dword ptr [ebp - 0x14] */ 3633 fp_push(*(float*)&MEM32(ebp + (-0x10))); /* 0x380078B8: fld dword ptr [ebp - 0x10] */ 3634 _st[0] -= (double)*(float*)ADDR(esi + 0x140); /* 0x380078BB: fsub dword ptr [esi + 0x140] */ 3635 MEM32(edi) = ecx; /* 0x380078C1: mov dword ptr [edi], ecx */ 3636 MEM32(edi + 0x4) = edx; /* 0x380078C3: mov dword ptr [edi + 4], edx */ 3637 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x380078C6: fstp dword ptr [ebp - 0x10] */ 3638 eax = MEM32(ebp + (-0x10)); /* 0x380078C9: mov eax, dword ptr [ebp - 0x10] */ 3639 MEM32(edi + 0x8) = eax; /* 0x380078CC: mov dword ptr [edi + 8], eax */ 3640 L_380078CF: 3641 ecx = MEM32(esi + 0xEC); /* 0x380078CF: mov ecx, dword ptr [esi + 0xec] */ 3642 /* test ecx, ecx */ /* 0x380078D5: test ecx, ecx */ 3643 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 3644 _cf = 0; 3645 _flag_k = FK_TEST; 3646 edi = POP32_VAL(esp); /* 0x380078D7: pop edi */ 3647 esi = POP32_VAL(esp); /* 0x380078D8: pop esi */ 3648 ebx = POP32_VAL(esp); /* 0x380078D9: pop ebx */ 3649 if (TEST_Z(_flag_a, _flag_b)) goto L_380078E0; /* 0x380078DA: je 0x380078e0 */ 3650 L_380078DC: 3651 edx = MEM32(ecx); /* 0x380078DC: mov edx, dword ptr [ecx] */ 3652 RECOMP_ICALL(MEM32(edx)); /* 0x380078DE: call dword ptr [edx] */ 3653 RECOMP_FLAGS_IN(); 3654 L_380078E0: 3655 esp = ebp; /* 0x380078E0: mov esp, ebp */ 3656 ebp = POP32_VAL(esp); /* 0x380078E2: pop ebp */ 3657 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x380078E3: ret 8 */ 3658 RECOMP_REGS_OUT(); 3659 } 3660 3661 void sub_380078F0(void) { 3662 int _fpu_cmp = 0; 3663 uint32_t _cf = 0; 3664 int _df = 1; 3665 uint32_t _flag_k = FK_NONE; 3666 uint32_t _flag_a = 0, _flag_b = 0; 3667 uint32_t _itail_tgt = 0; 3668 RECOMP_REGS_LOCALS 3669 RECOMP_ENTER(0x380078F0u); 3670 3671 L_380078F0: 3672 PUSH32(esp, ebp); /* 0x380078F0: push ebp */ 3673 ebp = esp; /* 0x380078F1: mov ebp, esp */ 3674 PUSH32(esp, 0xFFFFFFFFu); /* 0x380078F3: push -1 */ 3675 PUSH32(esp, 0x3804BAD8u); /* 0x380078F5: push 0x3804bad8 */ 3676 eax = MEM32(FS_BASE + (0)); /* 0x380078FA: mov eax, dword ptr fs:[0] */ 3677 PUSH32(esp, eax); /* 0x38007900: push eax */ 3678 MEM32(FS_BASE + (0)) = esp; /* 0x38007901: mov dword ptr fs:[0], esp */ 3679 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x40u); 3680 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3681 esp = esp - 0x40u; /* 0x38007908: sub esp, 0x40 */ 3682 _flag_k = FK_CMP; 3683 PUSH32(esp, esi); /* 0x3800790B: push esi */ 3684 PUSH32(esp, edi); /* 0x3800790C: push edi */ 3685 esi = ecx; /* 0x3800790D: mov esi, ecx */ 3686 RECOMP_ICALL(0x38018E70u); /* 0x3800790F: call 0x38018e70 */ /* not lifted */ 3687 RECOMP_FLAGS_IN(); 3688 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x138u); 3689 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3690 esi = esi + 0x138u; /* 0x38007914: add esi, 0x138 */ 3691 _flag_k = FK_ADD; 3692 ecx = esi; /* 0x3800791A: mov ecx, esi */ 3693 edx = MEM32(ecx); /* 0x3800791C: mov edx, dword ptr [ecx] */ 3694 MEM32(ebp + (-0x1C)) = edx; /* 0x3800791E: mov dword ptr [ebp - 0x1c], edx */ 3695 edx = MEM32(ecx + 0x4); /* 0x38007921: mov edx, dword ptr [ecx + 4] */ 3696 ecx = MEM32(ecx + 0x8); /* 0x38007924: mov ecx, dword ptr [ecx + 8] */ 3697 MEM32(ebp + (-0x18)) = edx; /* 0x38007927: mov dword ptr [ebp - 0x18], edx */ 3698 edx = MEM32(ebp + 0xC); /* 0x3800792A: mov edx, dword ptr [ebp + 0xc] */ 3699 MEM32(ebp + (-0x14)) = ecx; /* 0x3800792D: mov dword ptr [ebp - 0x14], ecx */ 3700 ecx = MEM32(edx); /* 0x38007930: mov ecx, dword ptr [edx] */ 3701 MEM32(ebp + (-0x28)) = ecx; /* 0x38007932: mov dword ptr [ebp - 0x28], ecx */ 3702 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x38007935: fld dword ptr [ebp - 0x28] */ 3703 _st[0] *= (double)*(float*)ADDR(0x3804EBE4); /* 0x38007938: fmul dword ptr [0x3804ebe4] */ 3704 ecx = MEM32(edx + 0x4); /* 0x3800793E: mov ecx, dword ptr [edx + 4] */ 3705 edx = MEM32(edx + 0x8); /* 0x38007941: mov edx, dword ptr [edx + 8] */ 3706 MEM32(ebp + (-0x24)) = ecx; /* 0x38007944: mov dword ptr [ebp - 0x24], ecx */ 3707 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x38007947: fld dword ptr [ebp - 0x24] */ 3708 _st[0] *= (double)*(float*)ADDR(0x3804EBE4); /* 0x3800794A: fmul dword ptr [0x3804ebe4] */ 3709 MEM32(ebp + (-0x20)) = edx; /* 0x38007950: mov dword ptr [ebp - 0x20], edx */ 3710 ecx = eax; /* 0x38007953: mov ecx, eax */ 3711 MEM32(ebp + (-0x34)) = 0xBF800000u; /* 0x38007955: mov dword ptr [ebp - 0x34], 0xbf800000 */ 3712 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3800795C: fstp dword ptr [ebp - 0x24] */ 3713 MEM32(ebp + (-0x30)) = 0; /* 0x3800795F: mov dword ptr [ebp - 0x30], 0 */ 3714 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x38007966: fld dword ptr [ebp - 0x20] */ 3715 MEM32(ebp + (-0x2C)) = 0; /* 0x38007969: mov dword ptr [ebp - 0x2c], 0 */ 3716 _st[0] *= (double)*(float*)ADDR(0x3804EBE4); /* 0x38007970: fmul dword ptr [0x3804ebe4] */ 3717 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x38007976: fstp dword ptr [ebp - 0x20] */ 3718 _st[0] += (double)*(float*)ADDR(ebp + (-0x1C)); /* 0x38007979: fadd dword ptr [ebp - 0x1c] */ 3719 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x1C)) = _v; } /* 0x3800797C: fstp dword ptr [ebp - 0x1c] */ 3720 fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x3800797F: fld dword ptr [ebp - 0x18] */ 3721 _st[0] += (double)*(float*)ADDR(ebp + (-0x24)); /* 0x38007982: fadd dword ptr [ebp - 0x24] */ 3722 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x18)) = _v; } /* 0x38007985: fstp dword ptr [ebp - 0x18] */ 3723 fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x38007988: fld dword ptr [ebp - 0x14] */ 3724 _st[0] += (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3800798B: fadd dword ptr [ebp - 0x20] */ 3725 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3800798E: fstp dword ptr [ebp - 0x14] */ 3726 RECOMP_ICALL(0x3802BF20u); /* 0x38007991: call 0x3802bf20 */ /* not lifted */ 3727 RECOMP_FLAGS_IN(); 3728 ecx = MEM32(esi + 0x4); /* 0x38007996: mov ecx, dword ptr [esi + 4] */ 3729 edx = MEM32(esi + 0x8); /* 0x38007999: mov edx, dword ptr [esi + 8] */ 3730 edi = eax; /* 0x3800799C: mov edi, eax */ 3731 eax = MEM32(esi); /* 0x3800799E: mov eax, dword ptr [esi] */ 3732 MEM32(ebp + (-0x48)) = ecx; /* 0x380079A0: mov dword ptr [ebp - 0x48], ecx */ 3733 ecx = MEM32(ebp + (-0x18)); /* 0x380079A3: mov ecx, dword ptr [ebp - 0x18] */ 3734 MEM32(ebp + (-0x4C)) = eax; /* 0x380079A6: mov dword ptr [ebp - 0x4c], eax */ 3735 eax = MEM32(ebp + (-0x1C)); /* 0x380079A9: mov eax, dword ptr [ebp - 0x1c] */ 3736 MEM32(ebp + (-0x44)) = edx; /* 0x380079AC: mov dword ptr [ebp - 0x44], edx */ 3737 edx = MEM32(ebp + (-0x14)); /* 0x380079AF: mov edx, dword ptr [ebp - 0x14] */ 3738 MEM32(ebp + (-0x3C)) = ecx; /* 0x380079B2: mov dword ptr [ebp - 0x3c], ecx */ 3739 ecx = ebp + (-0x10); /* 0x380079B5: lea ecx, [ebp - 0x10] */ 3740 MEM32(ebp + (-0x40)) = eax; /* 0x380079B8: mov dword ptr [ebp - 0x40], eax */ 3741 MEM32(ebp + (-0x38)) = edx; /* 0x380079BB: mov dword ptr [ebp - 0x38], edx */ 3742 RECOMP_ICALL(0x38037EE0u); /* 0x380079BE: call 0x38037ee0 */ /* not lifted */ 3743 RECOMP_FLAGS_IN(); 3744 eax = MEM32(edi); /* 0x380079C3: mov eax, dword ptr [edi] */ 3745 PUSH32(esp, 0); /* 0x380079C5: push 0 */ 3746 PUSH32(esp, 1); /* 0x380079C7: push 1 */ 3747 ecx = ebp + (-0x34); /* 0x380079C9: lea ecx, [ebp - 0x34] */ 3748 PUSH32(esp, ecx); /* 0x380079CC: push ecx */ 3749 edx = ebp + (-0x40); /* 0x380079CD: lea edx, [ebp - 0x40] */ 3750 PUSH32(esp, edx); /* 0x380079D0: push edx */ 3751 ecx = ebp + (-0x4C); /* 0x380079D1: lea ecx, [ebp - 0x4c] */ 3752 PUSH32(esp, ecx); /* 0x380079D4: push ecx */ 3753 ecx = edi; /* 0x380079D5: mov ecx, edi */ 3754 MEM32(ebp + (-0x4)) = 0; /* 0x380079D7: mov dword ptr [ebp - 4], 0 */ 3755 RECOMP_ICALL(MEM32(eax + 0xC)); /* 0x380079DE: call dword ptr [eax + 0xc] */ 3756 RECOMP_FLAGS_IN(); 3757 /* test LO8(eax), LO8(eax) */ /* 0x380079E1: test al, al */ 3758 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3759 _cf = 0; 3760 _flag_k = FK_NARROW(FK_TEST, 24); 3761 if (TEST_Z(_flag_a, _flag_b)) goto L_380079FD; /* 0x380079E3: je 0x380079fd */ 3762 L_380079E5: 3763 esi = MEM32(ebp + 0x8); /* 0x380079E5: mov esi, dword ptr [ebp + 8] */ 3764 eax = MEM32(ebp + (-0x34)); /* 0x380079E8: mov eax, dword ptr [ebp - 0x34] */ 3765 ecx = MEM32(ebp + (-0x30)); /* 0x380079EB: mov ecx, dword ptr [ebp - 0x30] */ 3766 edx = esi; /* 0x380079EE: mov edx, esi */ 3767 MEM32(edx) = eax; /* 0x380079F0: mov dword ptr [edx], eax */ 3768 eax = MEM32(ebp + (-0x2C)); /* 0x380079F2: mov eax, dword ptr [ebp - 0x2c] */ 3769 MEM32(edx + 0x4) = ecx; /* 0x380079F5: mov dword ptr [edx + 4], ecx */ 3770 MEM32(edx + 0x8) = eax; /* 0x380079F8: mov dword ptr [edx + 8], eax */ 3771 goto L_38007A28; /* 0x380079FB: jmp 0x38007a28 */ 3772 L_380079FD: 3773 esi = MEM32(ebp + 0x8); /* 0x380079FD: mov esi, dword ptr [ebp + 8] */ 3774 MEM32(ebp + (-0x28)) = 0xBF800000u; /* 0x38007A00: mov dword ptr [ebp - 0x28], 0xbf800000 */ 3775 edx = MEM32(ebp + (-0x28)); /* 0x38007A07: mov edx, dword ptr [ebp - 0x28] */ 3776 ecx = esi; /* 0x38007A0A: mov ecx, esi */ 3777 MEM32(ecx) = edx; /* 0x38007A0C: mov dword ptr [ecx], edx */ 3778 MEM32(ebp + (-0x24)) = 0xBF800000u; /* 0x38007A0E: mov dword ptr [ebp - 0x24], 0xbf800000 */ 3779 eax = MEM32(ebp + (-0x24)); /* 0x38007A15: mov eax, dword ptr [ebp - 0x24] */ 3780 MEM32(ebp + (-0x20)) = 0xBF800000u; /* 0x38007A18: mov dword ptr [ebp - 0x20], 0xbf800000 */ 3781 edx = MEM32(ebp + (-0x20)); /* 0x38007A1F: mov edx, dword ptr [ebp - 0x20] */ 3782 MEM32(ecx + 0x4) = eax; /* 0x38007A22: mov dword ptr [ecx + 4], eax */ 3783 MEM32(ecx + 0x8) = edx; /* 0x38007A25: mov dword ptr [ecx + 8], edx */ 3784 L_38007A28: 3785 ecx = ebp + (-0x10); /* 0x38007A28: lea ecx, [ebp - 0x10] */ 3786 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x38007A2B: mov dword ptr [ebp - 4], 0xffffffff */ 3787 RECOMP_ICALL(0x38037EF0u); /* 0x38007A32: call 0x38037ef0 */ /* not lifted */ 3788 RECOMP_FLAGS_IN(); 3789 ecx = MEM32(ebp + (-0xC)); /* 0x38007A37: mov ecx, dword ptr [ebp - 0xc] */ 3790 edi = POP32_VAL(esp); /* 0x38007A3A: pop edi */ 3791 eax = esi; /* 0x38007A3B: mov eax, esi */ 3792 esi = POP32_VAL(esp); /* 0x38007A3D: pop esi */ 3793 MEM32(FS_BASE + (0)) = ecx; /* 0x38007A3E: mov dword ptr fs:[0], ecx */ 3794 esp = ebp; /* 0x38007A45: mov esp, ebp */ 3795 ebp = POP32_VAL(esp); /* 0x38007A47: pop ebp */ 3796 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x38007A48: ret 8 */ 3797 RECOMP_REGS_OUT(); 3798 } 3799 3800 void sub_38007A50(void) { 3801 int _fpu_cmp = 0; 3802 uint32_t _cf = 0; 3803 int _df = 1; 3804 uint32_t _flag_k = FK_NONE; 3805 uint32_t _flag_a = 0, _flag_b = 0; 3806 uint32_t _itail_tgt = 0; 3807 RECOMP_REGS_LOCALS 3808 RECOMP_ENTER(0x38007A50u); 3809 3810 L_38007A50: 3811 PUSH32(esp, ebp); /* 0x38007A50: push ebp */ 3812 ebp = esp; /* 0x38007A51: mov ebp, esp */ 3813 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu); 3814 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3815 esp = esp - 0x1Cu; /* 0x38007A53: sub esp, 0x1c */ 3816 _flag_k = FK_CMP; 3817 PUSH32(esp, esi); /* 0x38007A56: push esi */ 3818 esi = ecx; /* 0x38007A57: mov esi, ecx */ 3819 eax = MEM32(esi + 0xF8); /* 0x38007A59: mov eax, dword ptr [esi + 0xf8] */ 3820 /* test eax, eax */ /* 0x38007A5F: test eax, eax */ 3821 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3822 _cf = 0; 3823 _flag_k = FK_TEST; 3824 PUSH32(esp, edi); /* 0x38007A61: push edi */ 3825 edi = esi + (-0xB8); /* 0x38007A62: lea edi, [esi - 0xb8] */ 3826 ecx = edi; /* 0x38007A68: mov ecx, edi */ 3827 if (TEST_Z(_flag_a, _flag_b)) goto L_38007B36; /* 0x38007A6A: je 0x38007b36 */ 3828 L_38007A70: 3829 RECOMP_ICALL(0x38017E90u); /* 0x38007A70: call 0x38017e90 */ /* not lifted */ 3830 RECOMP_FLAGS_IN(); 3831 ecx = MEM32(eax); /* 0x38007A75: mov ecx, dword ptr [eax] */ 3832 edx = MEM32(eax + 0x4); /* 0x38007A77: mov edx, dword ptr [eax + 4] */ 3833 eax = MEM32(eax + 0x8); /* 0x38007A7A: mov eax, dword ptr [eax + 8] */ 3834 MEM32(ebp + (-0xC)) = ecx; /* 0x38007A7D: mov dword ptr [ebp - 0xc], ecx */ 3835 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x38007A80: fld dword ptr [ebp - 0xc] */ 3836 _st[0] += (double)*(float*)ADDR(esi + 0xC0); /* 0x38007A83: fadd dword ptr [esi + 0xc0] */ 3837 MEM32(ebp + (-0x8)) = edx; /* 0x38007A89: mov dword ptr [ebp - 8], edx */ 3838 MEM32(ebp + (-0x4)) = eax; /* 0x38007A8C: mov dword ptr [ebp - 4], eax */ 3839 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x38007A8F: fstp dword ptr [ebp - 0xc] */ 3840 ecx = MEM32(ebp + (-0xC)); /* 0x38007A92: mov ecx, dword ptr [ebp - 0xc] */ 3841 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x38007A95: fld dword ptr [ebp - 8] */ 3842 MEM32(ebp + (-0x18)) = ecx; /* 0x38007A98: mov dword ptr [ebp - 0x18], ecx */ 3843 _st[0] += (double)*(float*)ADDR(esi + 0xC4); /* 0x38007A9B: fadd dword ptr [esi + 0xc4] */ 3844 ecx = ebp + (-0x18); /* 0x38007AA1: lea ecx, [ebp - 0x18] */ 3845 PUSH32(esp, ecx); /* 0x38007AA4: push ecx */ 3846 ecx = MEM32(esi + 0xF8); /* 0x38007AA5: mov ecx, dword ptr [esi + 0xf8] */ 3847 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x38007AAB: fstp dword ptr [ebp - 8] */ 3848 edx = MEM32(ebp + (-0x8)); /* 0x38007AAE: mov edx, dword ptr [ebp - 8] */ 3849 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x38007AB1: fld dword ptr [ebp - 4] */ 3850 MEM32(ebp + (-0x14)) = edx; /* 0x38007AB4: mov dword ptr [ebp - 0x14], edx */ 3851 _st[0] += (double)*(float*)ADDR(esi + 0xC8); /* 0x38007AB7: fadd dword ptr [esi + 0xc8] */ 3852 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x38007ABD: fstp dword ptr [ebp - 4] */ 3853 eax = MEM32(ebp + (-0x4)); /* 0x38007AC0: mov eax, dword ptr [ebp - 4] */ 3854 MEM32(ebp + (-0x10)) = eax; /* 0x38007AC3: mov dword ptr [ebp - 0x10], eax */ 3855 RECOMP_ICALL(MEM32(0x3804E274)); /* 0x38007AC6: call dword ptr [0x3804e274] */ 3856 RECOMP_FLAGS_IN(); 3857 edx = ebp + (-0x1C); /* 0x38007ACC: lea edx, [ebp - 0x1c] */ 3858 PUSH32(esp, edx); /* 0x38007ACF: push edx */ 3859 ecx = edi; /* 0x38007AD0: mov ecx, edi */ 3860 RECOMP_ICALL(0x38017F60u); /* 0x38007AD2: call 0x38017f60 */ /* not lifted */ 3861 RECOMP_FLAGS_IN(); 3862 ecx = MEM32(esi + 0xF8); /* 0x38007AD7: mov ecx, dword ptr [esi + 0xf8] */ 3863 PUSH32(esp, eax); /* 0x38007ADD: push eax */ 3864 RECOMP_ICALL(MEM32(0x3804E270)); /* 0x38007ADE: call dword ptr [0x3804e270] */ 3865 RECOMP_FLAGS_IN(); 3866 ecx = MEM32(esi + 0xF8); /* 0x38007AE4: mov ecx, dword ptr [esi + 0xf8] */ 3867 RECOMP_ICALL(MEM32(0x3804E260)); /* 0x38007AEA: call dword ptr [0x3804e260] */ 3868 RECOMP_FLAGS_IN(); 3869 edx = MEM32(eax); /* 0x38007AF0: mov edx, dword ptr [eax] */ 3870 ecx = esi + 0x80; /* 0x38007AF2: lea ecx, [esi + 0x80] */ 3871 MEM32(ecx) = edx; /* 0x38007AF8: mov dword ptr [ecx], edx */ 3872 edx = MEM32(eax + 0x4); /* 0x38007AFA: mov edx, dword ptr [eax + 4] */ 3873 MEM32(ecx + 0x4) = edx; /* 0x38007AFD: mov dword ptr [ecx + 4], edx */ 3874 eax = MEM32(eax + 0x8); /* 0x38007B00: mov eax, dword ptr [eax + 8] */ 3875 MEM32(ecx + 0x8) = eax; /* 0x38007B03: mov dword ptr [ecx + 8], eax */ 3876 ecx = MEM32(esi + 0xF8); /* 0x38007B06: mov ecx, dword ptr [esi + 0xf8] */ 3877 RECOMP_ICALL(MEM32(0x3804E150)); /* 0x38007B0C: call dword ptr [0x3804e150] */ 3878 RECOMP_FLAGS_IN(); 3879 ecx = MEM32(eax); /* 0x38007B12: mov ecx, dword ptr [eax] */ 3880 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x8Cu); 3881 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3882 esi = esi + 0x8Cu; /* 0x38007B14: add esi, 0x8c */ 3883 _flag_k = FK_ADD; 3884 MEM32(esi) = ecx; /* 0x38007B1A: mov dword ptr [esi], ecx */ 3885 edx = MEM32(eax + 0x4); /* 0x38007B1C: mov edx, dword ptr [eax + 4] */ 3886 MEM32(esi + 0x4) = edx; /* 0x38007B1F: mov dword ptr [esi + 4], edx */ 3887 ecx = MEM32(eax + 0x8); /* 0x38007B22: mov ecx, dword ptr [eax + 8] */ 3888 MEM32(esi + 0x8) = ecx; /* 0x38007B25: mov dword ptr [esi + 8], ecx */ 3889 edx = MEM32(eax + 0xC); /* 0x38007B28: mov edx, dword ptr [eax + 0xc] */ 3890 edi = POP32_VAL(esp); /* 0x38007B2B: pop edi */ 3891 MEM32(esi + 0xC) = edx; /* 0x38007B2C: mov dword ptr [esi + 0xc], edx */ 3892 esi = POP32_VAL(esp); /* 0x38007B2F: pop esi */ 3893 esp = ebp; /* 0x38007B30: mov esp, ebp */ 3894 ebp = POP32_VAL(esp); /* 0x38007B32: pop ebp */ 3895 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38007B33: ret 4 */ 3896 L_38007B36: 3897 RECOMP_ICALL(0x38017E90u); /* 0x38007B36: call 0x38017e90 */ /* not lifted */ 3898 RECOMP_FLAGS_IN(); 3899 edx = MEM32(eax); /* 0x38007B3B: mov edx, dword ptr [eax] */ 3900 ecx = esi + 0x80; /* 0x38007B3D: lea ecx, [esi + 0x80] */ 3901 MEM32(ecx) = edx; /* 0x38007B43: mov dword ptr [ecx], edx */ 3902 edx = MEM32(eax + 0x4); /* 0x38007B45: mov edx, dword ptr [eax + 4] */ 3903 MEM32(ecx + 0x4) = edx; /* 0x38007B48: mov dword ptr [ecx + 4], edx */ 3904 eax = MEM32(eax + 0x8); /* 0x38007B4B: mov eax, dword ptr [eax + 8] */ 3905 MEM32(ecx + 0x8) = eax; /* 0x38007B4E: mov dword ptr [ecx + 8], eax */ 3906 ecx = ebp + (-0x1C); /* 0x38007B51: lea ecx, [ebp - 0x1c] */ 3907 PUSH32(esp, ecx); /* 0x38007B54: push ecx */ 3908 ecx = edi; /* 0x38007B55: mov ecx, edi */ 3909 RECOMP_ICALL(0x38017F60u); /* 0x38007B57: call 0x38017f60 */ /* not lifted */ 3910 RECOMP_FLAGS_IN(); 3911 edx = MEM32(eax); /* 0x38007B5C: mov edx, dword ptr [eax] */ 3912 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x8Cu); 3913 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3914 esi = esi + 0x8Cu; /* 0x38007B5E: add esi, 0x8c */ 3915 _flag_k = FK_ADD; 3916 MEM32(esi) = edx; /* 0x38007B64: mov dword ptr [esi], edx */ 3917 ecx = MEM32(eax + 0x4); /* 0x38007B66: mov ecx, dword ptr [eax + 4] */ 3918 MEM32(esi + 0x4) = ecx; /* 0x38007B69: mov dword ptr [esi + 4], ecx */ 3919 edx = MEM32(eax + 0x8); /* 0x38007B6C: mov edx, dword ptr [eax + 8] */ 3920 MEM32(esi + 0x8) = edx; /* 0x38007B6F: mov dword ptr [esi + 8], edx */ 3921 eax = MEM32(eax + 0xC); /* 0x38007B72: mov eax, dword ptr [eax + 0xc] */ 3922 edi = POP32_VAL(esp); /* 0x38007B75: pop edi */ 3923 MEM32(esi + 0xC) = eax; /* 0x38007B76: mov dword ptr [esi + 0xc], eax */ 3924 esi = POP32_VAL(esp); /* 0x38007B79: pop esi */ 3925 esp = ebp; /* 0x38007B7A: mov esp, ebp */ 3926 ebp = POP32_VAL(esp); /* 0x38007B7C: pop ebp */ 3927 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38007B7D: ret 4 */ 3928 RECOMP_REGS_OUT(); 3929 } 3930 3931 void sub_38007B80(void) { 3932 int _fpu_cmp = 0; 3933 uint32_t _cf = 0; 3934 int _df = 1; 3935 uint32_t _flag_k = FK_NONE; 3936 uint32_t _flag_a = 0, _flag_b = 0; 3937 uint32_t _itail_tgt = 0; 3938 RECOMP_REGS_LOCALS 3939 RECOMP_ENTER(0x38007B80u); 3940 3941 L_38007B80: 3942 eax = ecx + 0x11C; /* 0x38007B80: lea eax, [ecx + 0x11c] */ 3943 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38007B86: ret */ 3944 RECOMP_REGS_OUT(); 3945 } 3946 3947 void sub_38007B90(void) { 3948 int _fpu_cmp = 0; 3949 uint32_t _cf = 0; 3950 int _df = 1; 3951 uint32_t _flag_k = FK_NONE; 3952 uint32_t _flag_a = 0, _flag_b = 0; 3953 uint32_t _itail_tgt = 0; 3954 RECOMP_REGS_LOCALS 3955 RECOMP_ENTER(0x38007B90u); 3956 3957 goto L_38007B90; 3958 L_38003C30: 3959 eax = ecx + 0x13C; /* 0x38003C30: lea eax, [ecx + 0x13c] */ 3960 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38003C36: ret */ 3961 L_38007B90: 3962 ecx = MEM32(ecx + 0x60); /* 0x38007B90: mov ecx, dword ptr [ecx + 0x60] */ 3963 RECOMP_BACKEDGE(); 3964 goto L_38003C30; /* 0x38007B93: jmp 0x38003c30 */ 3965 { RECOMP_REGS_OUT(); return; } /* end of function */ 3966 RECOMP_REGS_OUT(); 3967 } 3968 3969 void sub_38007BA0(void) { 3970 int _fpu_cmp = 0; 3971 uint32_t _cf = 0; 3972 int _df = 1; 3973 uint32_t _flag_k = FK_NONE; 3974 uint32_t _flag_a = 0, _flag_b = 0; 3975 uint32_t _itail_tgt = 0; 3976 RECOMP_REGS_LOCALS 3977 RECOMP_ENTER(0x38007BA0u); 3978 3979 goto L_38007BA0; 3980 L_38003C40: 3981 eax = ecx + 0x148; /* 0x38003C40: lea eax, [ecx + 0x148] */ 3982 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38003C46: ret */ 3983 L_38007BA0: 3984 ecx = MEM32(ecx + 0x60); /* 0x38007BA0: mov ecx, dword ptr [ecx + 0x60] */ 3985 RECOMP_BACKEDGE(); 3986 goto L_38003C40; /* 0x38007BA3: jmp 0x38003c40 */ 3987 { RECOMP_REGS_OUT(); return; } /* end of function */ 3988 RECOMP_REGS_OUT(); 3989 } 3990 3991 void sub_38007BB0(void) { 3992 int _fpu_cmp = 0; 3993 uint32_t _cf = 0; 3994 int _df = 1; 3995 uint32_t _flag_k = FK_NONE; 3996 uint32_t _flag_a = 0, _flag_b = 0; 3997 uint32_t _itail_tgt = 0; 3998 RECOMP_REGS_LOCALS 3999 RECOMP_ENTER(0x38007BB0u); 4000 4001 L_38007BB0: 4002 eax = ecx + 0xF0; /* 0x38007BB0: lea eax, [ecx + 0xf0] */ 4003 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38007BB6: ret */ 4004 RECOMP_REGS_OUT(); 4005 } 4006 4007 void sub_38007BC0(void) { 4008 int _fpu_cmp = 0; 4009 uint32_t _cf = 0; 4010 int _df = 1; 4011 uint32_t _flag_k = FK_NONE; 4012 uint32_t _flag_a = 0, _flag_b = 0; 4013 uint32_t _itail_tgt = 0; 4014 RECOMP_REGS_LOCALS 4015 RECOMP_ENTER(0x38007BC0u); 4016 4017 L_38007BC0: 4018 PUSH32(esp, ebp); /* 0x38007BC0: push ebp */ 4019 ebp = esp; /* 0x38007BC1: mov ebp, esp */ 4020 PUSH32(esp, esi); /* 0x38007BC3: push esi */ 4021 esi = MEM32(ebp + 0x8); /* 0x38007BC4: mov esi, dword ptr [ebp + 8] */ 4022 PUSH32(esp, edi); /* 0x38007BC7: push edi */ 4023 edi = ecx + 0xF0; /* 0x38007BC8: lea edi, [ecx + 0xf0] */ 4024 ecx = 5; /* 0x38007BCE: mov ecx, 5 */ 4025 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x38007BD3: 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; } 4026 edi = POP32_VAL(esp); /* 0x38007BD5: pop edi */ 4027 esi = POP32_VAL(esp); /* 0x38007BD6: pop esi */ 4028 ebp = POP32_VAL(esp); /* 0x38007BD7: pop ebp */ 4029 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38007BD8: ret 4 */ 4030 RECOMP_REGS_OUT(); 4031 } 4032 4033 void sub_38007BE0(void) { 4034 int _fpu_cmp = 0; 4035 uint32_t _cf = 0; 4036 int _df = 1; 4037 uint32_t _flag_k = FK_NONE; 4038 uint32_t _flag_a = 0, _flag_b = 0; 4039 uint32_t _itail_tgt = 0; 4040 RECOMP_REGS_LOCALS 4041 RECOMP_ENTER(0x38007BE0u); 4042 4043 L_38007BE0: 4044 PUSH32(esp, esi); /* 0x38007BE0: push esi */ 4045 esi = ecx; /* 0x38007BE1: mov esi, ecx */ 4046 RECOMP_ICALL(0x38006B10u); /* 0x38007BE3: call 0x38006b10 */ /* not lifted */ 4047 RECOMP_FLAGS_IN(); 4048 ecx = eax; /* 0x38007BE8: mov ecx, eax */ 4049 RECOMP_ICALL(0x38004390u); /* 0x38007BEA: call 0x38004390 */ /* not lifted */ 4050 RECOMP_FLAGS_IN(); 4051 ecx = MEM32(esi + 0x60); /* 0x38007BEF: mov ecx, dword ptr [esi + 0x60] */ 4052 eax = MEM32(ecx); /* 0x38007BF2: mov eax, dword ptr [ecx] */ 4053 PUSH32(esp, 0x42A80000u); /* 0x38007BF4: push 0x42a80000 */ 4054 RECOMP_ICALL(MEM32(eax + 0x28)); /* 0x38007BF9: call dword ptr [eax + 0x28] */ 4055 RECOMP_FLAGS_IN(); 4056 esi = POP32_VAL(esp); /* 0x38007BFC: pop esi */ 4057 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38007BFD: ret */ 4058 RECOMP_REGS_OUT(); 4059 } 4060 4061 void sub_38007C00(void) { 4062 int _fpu_cmp = 0; 4063 uint32_t _cf = 0; 4064 int _df = 1; 4065 uint32_t _flag_k = FK_NONE; 4066 uint32_t _flag_a = 0, _flag_b = 0; 4067 uint32_t _itail_tgt = 0; 4068 RECOMP_REGS_LOCALS 4069 RECOMP_ENTER(0x38007C00u); 4070 4071 L_38007C00: 4072 PUSH32(esp, esi); /* 0x38007C00: push esi */ 4073 esi = ecx; /* 0x38007C01: mov esi, ecx */ 4074 ecx = MEM32(esi + 0x60); /* 0x38007C03: mov ecx, dword ptr [esi + 0x60] */ 4075 eax = MEM32(ecx); /* 0x38007C06: mov eax, dword ptr [ecx] */ 4076 PUSH32(esp, 0); /* 0x38007C08: push 0 */ 4077 RECOMP_ICALL(MEM32(eax + 0x28)); /* 0x38007C0A: call dword ptr [eax + 0x28] */ 4078 RECOMP_FLAGS_IN(); 4079 ecx = MEM32(esi + 0x60); /* 0x38007C0D: mov ecx, dword ptr [esi + 0x60] */ 4080 edx = MEM32(ecx); /* 0x38007C10: mov edx, dword ptr [ecx] */ 4081 RECOMP_ICALL(MEM32(edx + 0x84)); /* 0x38007C12: call dword ptr [edx + 0x84] */ 4082 RECOMP_FLAGS_IN(); 4083 ecx = esi; /* 0x38007C18: mov ecx, esi */ 4084 RECOMP_ICALL(0x38006B10u); /* 0x38007C1A: call 0x38006b10 */ /* not lifted */ 4085 RECOMP_FLAGS_IN(); 4086 ecx = eax; /* 0x38007C1F: mov ecx, eax */ 4087 RECOMP_ICALL(0x38004350u); /* 0x38007C21: call 0x38004350 */ /* not lifted */ 4088 RECOMP_FLAGS_IN(); 4089 /* test LO8(eax), LO8(eax) */ /* 0x38007C26: test al, al */ 4090 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4091 _cf = 0; 4092 _flag_k = FK_NARROW(FK_TEST, 24); 4093 if (TEST_NZ(_flag_a, _flag_b)) goto L_38007C38; /* 0x38007C28: jne 0x38007c38 */ 4094 L_38007C2A: 4095 ecx = esi; /* 0x38007C2A: mov ecx, esi */ 4096 RECOMP_ICALL(0x38006B10u); /* 0x38007C2C: call 0x38006b10 */ /* not lifted */ 4097 RECOMP_FLAGS_IN(); 4098 ecx = eax; /* 0x38007C31: mov ecx, eax */ 4099 RECOMP_ICALL(0x380043A0u); /* 0x38007C33: call 0x380043a0 */ /* not lifted */ 4100 RECOMP_FLAGS_IN(); 4101 L_38007C38: 4102 ecx = MEM32(esi + 0x60); /* 0x38007C38: mov ecx, dword ptr [esi + 0x60] */ 4103 eax = MEM32(ecx); /* 0x38007C3B: mov eax, dword ptr [ecx] */ 4104 PUSH32(esp, 0); /* 0x38007C3D: push 0 */ 4105 RECOMP_ICALL(MEM32(eax + 0x88)); /* 0x38007C3F: call dword ptr [eax + 0x88] */ 4106 RECOMP_FLAGS_IN(); 4107 esi = POP32_VAL(esp); /* 0x38007C45: pop esi */ 4108 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38007C46: ret */ 4109 RECOMP_REGS_OUT(); 4110 } 4111 4112 void sub_38007C50(void) { 4113 int _fpu_cmp = 0; 4114 uint32_t _cf = 0; 4115 int _df = 1; 4116 uint32_t _flag_k = FK_NONE; 4117 uint32_t _flag_a = 0, _flag_b = 0; 4118 uint32_t _itail_tgt = 0; 4119 RECOMP_REGS_LOCALS 4120 RECOMP_ENTER(0x38007C50u); 4121 4122 L_38007C50: 4123 PUSH32(esp, esi); /* 0x38007C50: push esi */ 4124 esi = ecx; /* 0x38007C51: mov esi, ecx */ 4125 RECOMP_ICALL(0x38006B10u); /* 0x38007C53: call 0x38006b10 */ /* not lifted */ 4126 RECOMP_FLAGS_IN(); 4127 ecx = eax; /* 0x38007C58: mov ecx, eax */ 4128 RECOMP_ICALL(0x38004390u); /* 0x38007C5A: call 0x38004390 */ /* not lifted */ 4129 RECOMP_FLAGS_IN(); 4130 ecx = MEM32(esi + 0x60); /* 0x38007C5F: mov ecx, dword ptr [esi + 0x60] */ 4131 eax = MEM32(ecx); /* 0x38007C62: mov eax, dword ptr [ecx] */ 4132 PUSH32(esp, 0xC2A80000u); /* 0x38007C64: push 0xc2a80000 */ 4133 RECOMP_ICALL(MEM32(eax + 0x28)); /* 0x38007C69: call dword ptr [eax + 0x28] */ 4134 RECOMP_FLAGS_IN(); 4135 esi = POP32_VAL(esp); /* 0x38007C6C: pop esi */ 4136 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38007C6D: ret */ 4137 RECOMP_REGS_OUT(); 4138 } 4139 4140 void sub_38007C70(void) { 4141 int _fpu_cmp = 0; 4142 uint32_t _cf = 0; 4143 int _df = 1; 4144 uint32_t _flag_k = FK_NONE; 4145 uint32_t _flag_a = 0, _flag_b = 0; 4146 uint32_t _itail_tgt = 0; 4147 RECOMP_REGS_LOCALS 4148 RECOMP_ENTER(0x38007C70u); 4149 4150 L_38007C70: 4151 PUSH32(esp, esi); /* 0x38007C70: push esi */ 4152 esi = ecx; /* 0x38007C71: mov esi, ecx */ 4153 ecx = MEM32(esi + 0x60); /* 0x38007C73: mov ecx, dword ptr [esi + 0x60] */ 4154 eax = MEM32(ecx); /* 0x38007C76: mov eax, dword ptr [ecx] */ 4155 PUSH32(esp, 0); /* 0x38007C78: push 0 */ 4156 RECOMP_ICALL(MEM32(eax + 0x28)); /* 0x38007C7A: call dword ptr [eax + 0x28] */ 4157 RECOMP_FLAGS_IN(); 4158 ecx = esi; /* 0x38007C7D: mov ecx, esi */ 4159 RECOMP_ICALL(0x38006B10u); /* 0x38007C7F: call 0x38006b10 */ /* not lifted */ 4160 RECOMP_FLAGS_IN(); 4161 edx = MEM32(eax); /* 0x38007C84: mov edx, dword ptr [eax] */ 4162 ecx = eax; /* 0x38007C86: mov ecx, eax */ 4163 RECOMP_ICALL(MEM32(edx + 0x84)); /* 0x38007C88: call dword ptr [edx + 0x84] */ 4164 RECOMP_FLAGS_IN(); 4165 ecx = esi; /* 0x38007C8E: mov ecx, esi */ 4166 RECOMP_ICALL(0x38006B10u); /* 0x38007C90: call 0x38006b10 */ /* not lifted */ 4167 RECOMP_FLAGS_IN(); 4168 ecx = eax; /* 0x38007C95: mov ecx, eax */ 4169 RECOMP_ICALL(0x38004350u); /* 0x38007C97: call 0x38004350 */ /* not lifted */ 4170 RECOMP_FLAGS_IN(); 4171 /* test LO8(eax), LO8(eax) */ /* 0x38007C9C: test al, al */ 4172 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4173 _cf = 0; 4174 _flag_k = FK_NARROW(FK_TEST, 24); 4175 if (TEST_NZ(_flag_a, _flag_b)) goto L_38007CAE; /* 0x38007C9E: jne 0x38007cae */ 4176 L_38007CA0: 4177 ecx = esi; /* 0x38007CA0: mov ecx, esi */ 4178 RECOMP_ICALL(0x38006B10u); /* 0x38007CA2: call 0x38006b10 */ /* not lifted */ 4179 RECOMP_FLAGS_IN(); 4180 ecx = eax; /* 0x38007CA7: mov ecx, eax */ 4181 RECOMP_ICALL(0x380043A0u); /* 0x38007CA9: call 0x380043a0 */ /* not lifted */ 4182 RECOMP_FLAGS_IN(); 4183 L_38007CAE: 4184 ecx = MEM32(esi + 0x60); /* 0x38007CAE: mov ecx, dword ptr [esi + 0x60] */ 4185 eax = MEM32(ecx); /* 0x38007CB1: mov eax, dword ptr [ecx] */ 4186 PUSH32(esp, 0); /* 0x38007CB3: push 0 */ 4187 RECOMP_ICALL(MEM32(eax + 0x88)); /* 0x38007CB5: call dword ptr [eax + 0x88] */ 4188 RECOMP_FLAGS_IN(); 4189 esi = POP32_VAL(esp); /* 0x38007CBB: pop esi */ 4190 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38007CBC: ret */ 4191 RECOMP_REGS_OUT(); 4192 } 4193 4194 void sub_38007CC0(void) { 4195 int _fpu_cmp = 0; 4196 uint32_t _cf = 0; 4197 int _df = 1; 4198 uint32_t _flag_k = FK_NONE; 4199 uint32_t _flag_a = 0, _flag_b = 0; 4200 uint32_t _itail_tgt = 0; 4201 RECOMP_REGS_LOCALS 4202 RECOMP_ENTER(0x38007CC0u); 4203 4204 L_38007CC0: 4205 PUSH32(esp, esi); /* 0x38007CC0: push esi */ 4206 esi = ecx; /* 0x38007CC1: mov esi, ecx */ 4207 RECOMP_ICALL(0x38006B10u); /* 0x38007CC3: call 0x38006b10 */ /* not lifted */ 4208 RECOMP_FLAGS_IN(); 4209 ecx = eax; /* 0x38007CC8: mov ecx, eax */ 4210 RECOMP_ICALL(0x38004390u); /* 0x38007CCA: call 0x38004390 */ /* not lifted */ 4211 RECOMP_FLAGS_IN(); 4212 ecx = MEM32(esi + 0x60); /* 0x38007CCF: mov ecx, dword ptr [esi + 0x60] */ 4213 PUSH32(esp, 0xC2A80000u); /* 0x38007CD2: push 0xc2a80000 */ 4214 RECOMP_ICALL(0x38003C00u); /* 0x38007CD7: call 0x38003c00 */ /* not lifted */ 4215 RECOMP_FLAGS_IN(); 4216 esi = POP32_VAL(esp); /* 0x38007CDC: pop esi */ 4217 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38007CDD: ret */ 4218 RECOMP_REGS_OUT(); 4219 } 4220 4221 void sub_38007CE0(void) { 4222 int _fpu_cmp = 0; 4223 uint32_t _cf = 0; 4224 int _df = 1; 4225 uint32_t _flag_k = FK_NONE; 4226 uint32_t _flag_a = 0, _flag_b = 0; 4227 uint32_t _itail_tgt = 0; 4228 RECOMP_REGS_LOCALS 4229 RECOMP_ENTER(0x38007CE0u); 4230 4231 L_38007CE0: 4232 PUSH32(esp, esi); /* 0x38007CE0: push esi */ 4233 esi = ecx; /* 0x38007CE1: mov esi, ecx */ 4234 RECOMP_ICALL(0x38006B10u); /* 0x38007CE3: call 0x38006b10 */ /* not lifted */ 4235 RECOMP_FLAGS_IN(); 4236 ecx = eax; /* 0x38007CE8: mov ecx, eax */ 4237 RECOMP_ICALL(0x38004390u); /* 0x38007CEA: call 0x38004390 */ /* not lifted */ 4238 RECOMP_FLAGS_IN(); 4239 ecx = MEM32(esi + 0x60); /* 0x38007CEF: mov ecx, dword ptr [esi + 0x60] */ 4240 PUSH32(esp, 0x42A80000u); /* 0x38007CF2: push 0x42a80000 */ 4241 RECOMP_ICALL(0x38003C00u); /* 0x38007CF7: call 0x38003c00 */ /* not lifted */ 4242 RECOMP_FLAGS_IN(); 4243 esi = POP32_VAL(esp); /* 0x38007CFC: pop esi */ 4244 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38007CFD: ret */ 4245 RECOMP_REGS_OUT(); 4246 } 4247 4248 void sub_38007D00(void) { 4249 int _fpu_cmp = 0; 4250 uint32_t _cf = 0; 4251 int _df = 1; 4252 uint32_t _flag_k = FK_NONE; 4253 uint32_t _flag_a = 0, _flag_b = 0; 4254 uint32_t _itail_tgt = 0; 4255 RECOMP_REGS_LOCALS 4256 RECOMP_ENTER(0x38007D00u); 4257 4258 L_38007D00: 4259 PUSH32(esp, esi); /* 0x38007D00: push esi */ 4260 esi = ecx; /* 0x38007D01: mov esi, ecx */ 4261 ecx = MEM32(esi + 0x60); /* 0x38007D03: mov ecx, dword ptr [esi + 0x60] */ 4262 PUSH32(esp, 0); /* 0x38007D06: push 0 */ 4263 RECOMP_ICALL(0x38003C00u); /* 0x38007D08: call 0x38003c00 */ /* not lifted */ 4264 RECOMP_FLAGS_IN(); 4265 ecx = MEM32(esi + 0x60); /* 0x38007D0D: mov ecx, dword ptr [esi + 0x60] */ 4266 eax = MEM32(ecx); /* 0x38007D10: mov eax, dword ptr [ecx] */ 4267 RECOMP_ICALL(MEM32(eax + 0x84)); /* 0x38007D12: call dword ptr [eax + 0x84] */ 4268 RECOMP_FLAGS_IN(); 4269 ecx = esi; /* 0x38007D18: mov ecx, esi */ 4270 RECOMP_ICALL(0x38006B10u); /* 0x38007D1A: call 0x38006b10 */ /* not lifted */ 4271 RECOMP_FLAGS_IN(); 4272 ecx = eax; /* 0x38007D1F: mov ecx, eax */ 4273 RECOMP_ICALL(0x38004350u); /* 0x38007D21: call 0x38004350 */ /* not lifted */ 4274 RECOMP_FLAGS_IN(); 4275 /* test LO8(eax), LO8(eax) */ /* 0x38007D26: test al, al */ 4276 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4277 _cf = 0; 4278 _flag_k = FK_NARROW(FK_TEST, 24); 4279 if (TEST_NZ(_flag_a, _flag_b)) goto L_38007D38; /* 0x38007D28: jne 0x38007d38 */ 4280 L_38007D2A: 4281 ecx = esi; /* 0x38007D2A: mov ecx, esi */ 4282 RECOMP_ICALL(0x38006B10u); /* 0x38007D2C: call 0x38006b10 */ /* not lifted */ 4283 RECOMP_FLAGS_IN(); 4284 ecx = eax; /* 0x38007D31: mov ecx, eax */ 4285 RECOMP_ICALL(0x380043A0u); /* 0x38007D33: call 0x380043a0 */ /* not lifted */ 4286 RECOMP_FLAGS_IN(); 4287 L_38007D38: 4288 ecx = MEM32(esi + 0x60); /* 0x38007D38: mov ecx, dword ptr [esi + 0x60] */ 4289 edx = MEM32(ecx); /* 0x38007D3B: mov edx, dword ptr [ecx] */ 4290 PUSH32(esp, 0); /* 0x38007D3D: push 0 */ 4291 RECOMP_ICALL(MEM32(edx + 0x88)); /* 0x38007D3F: call dword ptr [edx + 0x88] */ 4292 RECOMP_FLAGS_IN(); 4293 esi = POP32_VAL(esp); /* 0x38007D45: pop esi */ 4294 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38007D46: ret */ 4295 RECOMP_REGS_OUT(); 4296 } 4297 4298 void sub_38007D50(void) { 4299 int _fpu_cmp = 0; 4300 uint32_t _cf = 0; 4301 int _df = 1; 4302 uint32_t _flag_k = FK_NONE; 4303 uint32_t _flag_a = 0, _flag_b = 0; 4304 uint32_t _itail_tgt = 0; 4305 RECOMP_REGS_LOCALS 4306 RECOMP_ENTER(0x38007D50u); 4307 4308 L_38007D50: 4309 PUSH32(esp, esi); /* 0x38007D50: push esi */ 4310 esi = ecx; /* 0x38007D51: mov esi, ecx */ 4311 RECOMP_ICALL(0x38006B10u); /* 0x38007D53: call 0x38006b10 */ /* not lifted */ 4312 RECOMP_FLAGS_IN(); 4313 ecx = eax; /* 0x38007D58: mov ecx, eax */ 4314 RECOMP_ICALL(0x38004390u); /* 0x38007D5A: call 0x38004390 */ /* not lifted */ 4315 RECOMP_FLAGS_IN(); 4316 ecx = MEM32(esi + 0x60); /* 0x38007D5F: mov ecx, dword ptr [esi + 0x60] */ 4317 eax = MEM32(ecx); /* 0x38007D62: mov eax, dword ptr [ecx] */ 4318 PUSH32(esp, 0x3F800000u); /* 0x38007D64: push 0x3f800000 */ 4319 RECOMP_ICALL(MEM32(eax + 0x1C)); /* 0x38007D69: call dword ptr [eax + 0x1c] */ 4320 RECOMP_FLAGS_IN(); 4321 esi = POP32_VAL(esp); /* 0x38007D6C: pop esi */ 4322 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38007D6D: ret */ 4323 RECOMP_REGS_OUT(); 4324 } 4325 4326 void sub_38007D70(void) { 4327 int _fpu_cmp = 0; 4328 uint32_t _cf = 0; 4329 int _df = 1; 4330 uint32_t _flag_k = FK_NONE; 4331 uint32_t _flag_a = 0, _flag_b = 0; 4332 uint32_t _itail_tgt = 0; 4333 RECOMP_REGS_LOCALS 4334 RECOMP_ENTER(0x38007D70u); 4335 4336 L_38007D70: 4337 PUSH32(esp, esi); /* 0x38007D70: push esi */ 4338 esi = ecx; /* 0x38007D71: mov esi, ecx */ 4339 ecx = MEM32(esi + 0x60); /* 0x38007D73: mov ecx, dword ptr [esi + 0x60] */ 4340 eax = MEM32(ecx); /* 0x38007D76: mov eax, dword ptr [ecx] */ 4341 PUSH32(esp, 0); /* 0x38007D78: push 0 */ 4342 RECOMP_ICALL(MEM32(eax + 0x1C)); /* 0x38007D7A: call dword ptr [eax + 0x1c] */ 4343 RECOMP_FLAGS_IN(); 4344 ecx = esi; /* 0x38007D7D: mov ecx, esi */ 4345 RECOMP_ICALL(0x38006B10u); /* 0x38007D7F: call 0x38006b10 */ /* not lifted */ 4346 RECOMP_FLAGS_IN(); 4347 ecx = eax; /* 0x38007D84: mov ecx, eax */ 4348 RECOMP_ICALL(0x38004350u); /* 0x38007D86: call 0x38004350 */ /* not lifted */ 4349 RECOMP_FLAGS_IN(); 4350 /* test LO8(eax), LO8(eax) */ /* 0x38007D8B: test al, al */ 4351 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4352 _cf = 0; 4353 _flag_k = FK_NARROW(FK_TEST, 24); 4354 if (TEST_NZ(_flag_a, _flag_b)) goto L_38007D9D; /* 0x38007D8D: jne 0x38007d9d */ 4355 L_38007D8F: 4356 ecx = esi; /* 0x38007D8F: mov ecx, esi */ 4357 RECOMP_ICALL(0x38006B10u); /* 0x38007D91: call 0x38006b10 */ /* not lifted */ 4358 RECOMP_FLAGS_IN(); 4359 ecx = eax; /* 0x38007D96: mov ecx, eax */ 4360 RECOMP_ICALL(0x380043A0u); /* 0x38007D98: call 0x380043a0 */ /* not lifted */ 4361 RECOMP_FLAGS_IN(); 4362 L_38007D9D: 4363 ecx = MEM32(esi + 0x60); /* 0x38007D9D: mov ecx, dword ptr [esi + 0x60] */ 4364 RECOMP_ICALL(MEM32(0x3804E6B0)); /* 0x38007DA0: call dword ptr [0x3804e6b0] */ 4365 RECOMP_FLAGS_IN(); 4366 ecx = MEM32(esi + 0x60); /* 0x38007DA6: mov ecx, dword ptr [esi + 0x60] */ 4367 edx = MEM32(ecx); /* 0x38007DA9: mov edx, dword ptr [ecx] */ 4368 PUSH32(esp, 1); /* 0x38007DAB: push 1 */ 4369 RECOMP_ICALL(MEM32(edx + 0x88)); /* 0x38007DAD: call dword ptr [edx + 0x88] */ 4370 RECOMP_FLAGS_IN(); 4371 esi = POP32_VAL(esp); /* 0x38007DB3: pop esi */ 4372 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38007DB4: ret */ 4373 RECOMP_REGS_OUT(); 4374 } 4375 4376 void sub_38007DC0(void) { 4377 int _fpu_cmp = 0; 4378 uint32_t _cf = 0; 4379 int _df = 1; 4380 uint32_t _flag_k = FK_NONE; 4381 uint32_t _flag_a = 0, _flag_b = 0; 4382 uint32_t _itail_tgt = 0; 4383 RECOMP_REGS_LOCALS 4384 RECOMP_ENTER(0x38007DC0u); 4385 4386 L_38007DC0: 4387 PUSH32(esp, esi); /* 0x38007DC0: push esi */ 4388 esi = ecx; /* 0x38007DC1: mov esi, ecx */ 4389 RECOMP_ICALL(0x38006B10u); /* 0x38007DC3: call 0x38006b10 */ /* not lifted */ 4390 RECOMP_FLAGS_IN(); 4391 ecx = eax; /* 0x38007DC8: mov ecx, eax */ 4392 RECOMP_ICALL(0x38004390u); /* 0x38007DCA: call 0x38004390 */ /* not lifted */ 4393 RECOMP_FLAGS_IN(); 4394 ecx = MEM32(esi + 0x60); /* 0x38007DCF: mov ecx, dword ptr [esi + 0x60] */ 4395 eax = MEM32(ecx); /* 0x38007DD2: mov eax, dword ptr [ecx] */ 4396 PUSH32(esp, 0x3F800000u); /* 0x38007DD4: push 0x3f800000 */ 4397 RECOMP_ICALL(MEM32(eax + 0x20)); /* 0x38007DD9: call dword ptr [eax + 0x20] */ 4398 RECOMP_FLAGS_IN(); 4399 esi = POP32_VAL(esp); /* 0x38007DDC: pop esi */ 4400 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38007DDD: ret */ 4401 RECOMP_REGS_OUT(); 4402 } 4403 4404 void sub_38007DE0(void) { 4405 int _fpu_cmp = 0; 4406 uint32_t _cf = 0; 4407 int _df = 1; 4408 uint32_t _flag_k = FK_NONE; 4409 uint32_t _flag_a = 0, _flag_b = 0; 4410 uint32_t _itail_tgt = 0; 4411 RECOMP_REGS_LOCALS 4412 RECOMP_ENTER(0x38007DE0u); 4413 4414 L_38007DE0: 4415 PUSH32(esp, esi); /* 0x38007DE0: push esi */ 4416 esi = ecx; /* 0x38007DE1: mov esi, ecx */ 4417 ecx = MEM32(esi + 0x60); /* 0x38007DE3: mov ecx, dword ptr [esi + 0x60] */ 4418 eax = MEM32(ecx); /* 0x38007DE6: mov eax, dword ptr [ecx] */ 4419 PUSH32(esp, 0); /* 0x38007DE8: push 0 */ 4420 RECOMP_ICALL(MEM32(eax + 0x20)); /* 0x38007DEA: call dword ptr [eax + 0x20] */ 4421 RECOMP_FLAGS_IN(); 4422 ecx = MEM32(esi + 0x60); /* 0x38007DED: mov ecx, dword ptr [esi + 0x60] */ 4423 RECOMP_ICALL(MEM32(0x3804E6B0)); /* 0x38007DF0: call dword ptr [0x3804e6b0] */ 4424 RECOMP_FLAGS_IN(); 4425 ecx = esi; /* 0x38007DF6: mov ecx, esi */ 4426 RECOMP_ICALL(0x38006B10u); /* 0x38007DF8: call 0x38006b10 */ /* not lifted */ 4427 RECOMP_FLAGS_IN(); 4428 ecx = eax; /* 0x38007DFD: mov ecx, eax */ 4429 RECOMP_ICALL(0x38004350u); /* 0x38007DFF: call 0x38004350 */ /* not lifted */ 4430 RECOMP_FLAGS_IN(); 4431 /* test LO8(eax), LO8(eax) */ /* 0x38007E04: test al, al */ 4432 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4433 _cf = 0; 4434 _flag_k = FK_NARROW(FK_TEST, 24); 4435 if (TEST_NZ(_flag_a, _flag_b)) goto L_38007E16; /* 0x38007E06: jne 0x38007e16 */ 4436 L_38007E08: 4437 ecx = esi; /* 0x38007E08: mov ecx, esi */ 4438 RECOMP_ICALL(0x38006B10u); /* 0x38007E0A: call 0x38006b10 */ /* not lifted */ 4439 RECOMP_FLAGS_IN(); 4440 ecx = eax; /* 0x38007E0F: mov ecx, eax */ 4441 RECOMP_ICALL(0x380043A0u); /* 0x38007E11: call 0x380043a0 */ /* not lifted */ 4442 RECOMP_FLAGS_IN(); 4443 L_38007E16: 4444 ecx = MEM32(esi + 0x60); /* 0x38007E16: mov ecx, dword ptr [esi + 0x60] */ 4445 edx = MEM32(ecx); /* 0x38007E19: mov edx, dword ptr [ecx] */ 4446 PUSH32(esp, 1); /* 0x38007E1B: push 1 */ 4447 RECOMP_ICALL(MEM32(edx + 0x88)); /* 0x38007E1D: call dword ptr [edx + 0x88] */ 4448 RECOMP_FLAGS_IN(); 4449 esi = POP32_VAL(esp); /* 0x38007E23: pop esi */ 4450 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38007E24: ret */ 4451 RECOMP_REGS_OUT(); 4452 } 4453 4454 void sub_38007E30(void) { 4455 int _fpu_cmp = 0; 4456 uint32_t _cf = 0; 4457 int _df = 1; 4458 uint32_t _flag_k = FK_NONE; 4459 uint32_t _flag_a = 0, _flag_b = 0; 4460 uint32_t _itail_tgt = 0; 4461 RECOMP_REGS_LOCALS 4462 RECOMP_ENTER(0x38007E30u); 4463 4464 L_38007E30: 4465 PUSH32(esp, ebp); /* 0x38007E30: push ebp */ 4466 ebp = esp; /* 0x38007E31: mov ebp, esp */ 4467 PUSH32(esp, esi); /* 0x38007E33: push esi */ 4468 esi = ecx; /* 0x38007E34: mov esi, ecx */ 4469 RECOMP_ICALL(0x38006B10u); /* 0x38007E36: call 0x38006b10 */ /* not lifted */ 4470 RECOMP_FLAGS_IN(); 4471 ecx = eax; /* 0x38007E3B: mov ecx, eax */ 4472 RECOMP_ICALL(0x38004390u); /* 0x38007E3D: call 0x38004390 */ /* not lifted */ 4473 RECOMP_FLAGS_IN(); 4474 ecx = esi; /* 0x38007E42: mov ecx, esi */ 4475 RECOMP_ICALL(0x380082C0u); /* 0x38007E44: call 0x380082c0 */ /* not lifted */ 4476 RECOMP_FLAGS_IN(); 4477 /* test LO8(eax), LO8(eax) */ /* 0x38007E49: test al, al */ 4478 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4479 _cf = 0; 4480 _flag_k = FK_NARROW(FK_TEST, 24); 4481 if (TEST_Z(_flag_a, _flag_b)) goto L_38007EC6; /* 0x38007E4B: je 0x38007ec6 */ 4482 L_38007E4D: 4483 fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x38007E4D: fld dword ptr [ebp + 8] */ 4484 _st[0] *= (double)*(float*)ADDR(esi + 0x1D4); /* 0x38007E50: fmul dword ptr [esi + 0x1d4] */ 4485 _st[0] += (double)*(float*)ADDR(esi + 0xC4); /* 0x38007E56: fadd dword ptr [esi + 0xc4] */ 4486 { float _v = (float)_st[0]; *(float*)ADDR(ebp + 0x8) = _v; } /* 0x38007E5C: fst dword ptr [ebp + 8] */ 4487 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0xC4) = _v; } /* 0x38007E5F: fstp dword ptr [esi + 0xc4] */ 4488 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x38007E65: fld dword ptr [ebp + 0xc] */ 4489 _st[0] *= (double)*(float*)ADDR(esi + 0x1D8); /* 0x38007E68: fmul dword ptr [esi + 0x1d8] */ 4490 _st[0] += (double)*(float*)ADDR(esi + 0xC8); /* 0x38007E6E: fadd dword ptr [esi + 0xc8] */ 4491 { float _v = (float)_st[0]; *(float*)ADDR(esi + 0xC8) = _v; } /* 0x38007E74: fst dword ptr [esi + 0xc8] */ 4492 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804EBEC)); /* 0x38007E7A: fcomp dword ptr [0x3804ebec] */ 4493 fp_pop(); 4494 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x38007E80: fnstsw ax */ 4495 /* test HI8(eax), 0x41u */ /* 0x38007E82: test ah, 0x41 */ 4496 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 4497 _cf = 0; 4498 _flag_k = FK_NARROW(FK_TEST, 24); 4499 if (TEST_NZ(_flag_a, _flag_b)) goto L_38007E91; /* 0x38007E85: jne 0x38007e91 */ 4500 L_38007E87: 4501 MEM32(esi + 0xC8) = 0x3FC6D3F2u; /* 0x38007E87: mov dword ptr [esi + 0xc8], 0x3fc6d3f2 */ 4502 L_38007E91: 4503 fp_push(*(float*)&MEM32(esi + 0xC8)); /* 0x38007E91: fld dword ptr [esi + 0xc8] */ 4504 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804EBE8)); /* 0x38007E97: fcomp dword ptr [0x3804ebe8] */ 4505 fp_pop(); 4506 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x38007E9D: fnstsw ax */ 4507 /* test HI8(eax), 1 */ /* 0x38007E9F: test ah, 1 */ 4508 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 4509 _cf = 0; 4510 _flag_k = FK_NARROW(FK_TEST, 24); 4511 if (TEST_Z(_flag_a, _flag_b)) goto L_38007EAE; /* 0x38007EA2: je 0x38007eae */ 4512 L_38007EA4: 4513 MEM32(esi + 0xC8) = 0xBFC6D3F2u; /* 0x38007EA4: mov dword ptr [esi + 0xc8], 0xbfc6d3f2 */ 4514 L_38007EAE: 4515 eax = MEM32(ebp + 0x8); /* 0x38007EAE: mov eax, dword ptr [ebp + 8] */ 4516 ecx = MEM32(esi + 0xC8); /* 0x38007EB1: mov ecx, dword ptr [esi + 0xc8] */ 4517 PUSH32(esp, eax); /* 0x38007EB7: push eax */ 4518 PUSH32(esp, ecx); /* 0x38007EB8: push ecx */ 4519 ecx = MEM32(esi + 0x60); /* 0x38007EB9: mov ecx, dword ptr [esi + 0x60] */ 4520 RECOMP_ICALL(0x38004D00u); /* 0x38007EBC: call 0x38004d00 */ /* not lifted */ 4521 RECOMP_FLAGS_IN(); 4522 esi = POP32_VAL(esp); /* 0x38007EC1: pop esi */ 4523 ebp = POP32_VAL(esp); /* 0x38007EC2: pop ebp */ 4524 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x38007EC3: ret 8 */ 4525 L_38007EC6: 4526 ecx = MEM32(esi + 0x60); /* 0x38007EC6: mov ecx, dword ptr [esi + 0x60] */ 4527 fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x38007EC9: fld dword ptr [ebp + 8] */ 4528 _st[0] *= (double)*(float*)ADDR(esi + 0x1DC); /* 0x38007ECC: fmul dword ptr [esi + 0x1dc] */ 4529 edx = MEM32(ecx); /* 0x38007ED2: mov edx, dword ptr [ecx] */ 4530 PUSH32(esp, ecx); /* 0x38007ED4: push ecx */ 4531 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x38007ED5: fstp dword ptr [esp] */ 4532 RECOMP_ICALL(MEM32(edx + 0x28)); /* 0x38007ED8: call dword ptr [edx + 0x28] */ 4533 RECOMP_FLAGS_IN(); 4534 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x38007EDB: fld dword ptr [ebp + 0xc] */ 4535 PUSH32(esp, ecx); /* 0x38007EDE: push ecx */ 4536 _st[0] *= (double)*(float*)ADDR(esi + 0x1E0); /* 0x38007EDF: fmul dword ptr [esi + 0x1e0] */ 4537 ecx = MEM32(esi + 0x60); /* 0x38007EE5: mov ecx, dword ptr [esi + 0x60] */ 4538 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x38007EE8: fstp dword ptr [esp] */ 4539 RECOMP_ICALL(0x38003C00u); /* 0x38007EEB: call 0x38003c00 */ /* not lifted */ 4540 RECOMP_FLAGS_IN(); 4541 ecx = MEM32(esi + 0x60); /* 0x38007EF0: mov ecx, dword ptr [esi + 0x60] */ 4542 eax = MEM32(ecx); /* 0x38007EF3: mov eax, dword ptr [ecx] */ 4543 RECOMP_ICALL(MEM32(eax + 0x84)); /* 0x38007EF5: call dword ptr [eax + 0x84] */ 4544 RECOMP_FLAGS_IN(); 4545 esi = POP32_VAL(esp); /* 0x38007EFB: pop esi */ 4546 ebp = POP32_VAL(esp); /* 0x38007EFC: pop ebp */ 4547 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x38007EFD: ret 8 */ 4548 RECOMP_REGS_OUT(); 4549 } 4550 4551 void sub_38007F00(void) { 4552 int _fpu_cmp = 0; 4553 uint32_t _cf = 0; 4554 int _df = 1; 4555 uint32_t _flag_k = FK_NONE; 4556 uint32_t _flag_a = 0, _flag_b = 0; 4557 uint32_t _itail_tgt = 0; 4558 RECOMP_REGS_LOCALS 4559 RECOMP_ENTER(0x38007F00u); 4560 4561 L_38007F00: 4562 PUSH32(esp, ebp); /* 0x38007F00: push ebp */ 4563 ebp = esp; /* 0x38007F01: mov ebp, esp */ 4564 PUSH32(esp, esi); /* 0x38007F03: push esi */ 4565 esi = ecx; /* 0x38007F04: mov esi, ecx */ 4566 RECOMP_ICALL(0x38006B10u); /* 0x38007F06: call 0x38006b10 */ /* not lifted */ 4567 RECOMP_FLAGS_IN(); 4568 ecx = eax; /* 0x38007F0B: mov ecx, eax */ 4569 RECOMP_ICALL(0x380043A0u); /* 0x38007F0D: call 0x380043a0 */ /* not lifted */ 4570 RECOMP_FLAGS_IN(); 4571 eax = MEM32(esi + 0xC4); /* 0x38007F12: mov eax, dword ptr [esi + 0xc4] */ 4572 ecx = MEM32(ebp + 0x8); /* 0x38007F18: mov ecx, dword ptr [ebp + 8] */ 4573 MEM32(ecx) = eax; /* 0x38007F1B: mov dword ptr [ecx], eax */ 4574 ecx = esi; /* 0x38007F1D: mov ecx, esi */ 4575 RECOMP_ICALL(0x380082C0u); /* 0x38007F1F: call 0x380082c0 */ /* not lifted */ 4576 RECOMP_FLAGS_IN(); 4577 /* test LO8(eax), LO8(eax) */ /* 0x38007F24: test al, al */ 4578 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4579 _cf = 0; 4580 _flag_k = FK_NARROW(FK_TEST, 24); 4581 if (TEST_Z(_flag_a, _flag_b)) goto L_38007F61; /* 0x38007F26: je 0x38007f61 */ 4582 L_38007F28: 4583 edx = MEM32(esi + 0xC8); /* 0x38007F28: mov edx, dword ptr [esi + 0xc8] */ 4584 eax = MEM32(esi + 0x60); /* 0x38007F2E: mov eax, dword ptr [esi + 0x60] */ 4585 PUSH32(esp, 0); /* 0x38007F31: push 0 */ 4586 PUSH32(esp, edx); /* 0x38007F33: push edx */ 4587 PUSH32(esp, 0); /* 0x38007F34: push 0 */ 4588 PUSH32(esp, 0x3806B630u); /* 0x38007F36: push 0x3806b630 */ 4589 PUSH32(esp, 0x3806B5C0u); /* 0x38007F3B: push 0x3806b5c0 */ 4590 PUSH32(esp, 0); /* 0x38007F40: push 0 */ 4591 PUSH32(esp, eax); /* 0x38007F42: push eax */ 4592 RECOMP_ICALL(0x3804B682u); /* 0x38007F43: call 0x3804b682 */ /* not lifted */ 4593 RECOMP_FLAGS_IN(); 4594 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 4595 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4596 esp = esp + 0x14u; /* 0x38007F48: add esp, 0x14 */ 4597 _flag_k = FK_ADD; 4598 ecx = eax; /* 0x38007F4B: mov ecx, eax */ 4599 RECOMP_ICALL(0x38004D00u); /* 0x38007F4D: call 0x38004d00 */ /* not lifted */ 4600 RECOMP_FLAGS_IN(); 4601 MEM32(esi + 0xC4) = 0; /* 0x38007F52: mov dword ptr [esi + 0xc4], 0 */ 4602 esi = POP32_VAL(esp); /* 0x38007F5C: pop esi */ 4603 ebp = POP32_VAL(esp); /* 0x38007F5D: pop ebp */ 4604 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38007F5E: ret 4 */ 4605 L_38007F61: 4606 ecx = MEM32(esi + 0x60); /* 0x38007F61: mov ecx, dword ptr [esi + 0x60] */ 4607 eax = MEM32(ecx); /* 0x38007F64: mov eax, dword ptr [ecx] */ 4608 PUSH32(esp, 0); /* 0x38007F66: push 0 */ 4609 RECOMP_ICALL(MEM32(eax + 0x28)); /* 0x38007F68: call dword ptr [eax + 0x28] */ 4610 RECOMP_FLAGS_IN(); 4611 ecx = MEM32(esi + 0x60); /* 0x38007F6B: mov ecx, dword ptr [esi + 0x60] */ 4612 PUSH32(esp, 0); /* 0x38007F6E: push 0 */ 4613 RECOMP_ICALL(0x38003C00u); /* 0x38007F70: call 0x38003c00 */ /* not lifted */ 4614 RECOMP_FLAGS_IN(); 4615 ecx = MEM32(esi + 0x60); /* 0x38007F75: mov ecx, dword ptr [esi + 0x60] */ 4616 edx = MEM32(ecx); /* 0x38007F78: mov edx, dword ptr [ecx] */ 4617 RECOMP_ICALL(MEM32(edx + 0x84)); /* 0x38007F7A: call dword ptr [edx + 0x84] */ 4618 RECOMP_FLAGS_IN(); 4619 ecx = MEM32(esi + 0x60); /* 0x38007F80: mov ecx, dword ptr [esi + 0x60] */ 4620 eax = MEM32(ecx); /* 0x38007F83: mov eax, dword ptr [ecx] */ 4621 PUSH32(esp, 0); /* 0x38007F85: push 0 */ 4622 RECOMP_ICALL(MEM32(eax + 0x88)); /* 0x38007F87: call dword ptr [eax + 0x88] */ 4623 RECOMP_FLAGS_IN(); 4624 esi = POP32_VAL(esp); /* 0x38007F8D: pop esi */ 4625 ebp = POP32_VAL(esp); /* 0x38007F8E: pop ebp */ 4626 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38007F8F: ret 4 */ 4627 RECOMP_REGS_OUT(); 4628 } 4629 4630 void sub_38007FA0(void) { 4631 int _fpu_cmp = 0; 4632 uint32_t _cf = 0; 4633 int _df = 1; 4634 uint32_t _flag_k = FK_NONE; 4635 uint32_t _flag_a = 0, _flag_b = 0; 4636 uint32_t _itail_tgt = 0; 4637 RECOMP_REGS_LOCALS 4638 RECOMP_ENTER(0x38007FA0u); 4639 4640 L_38007FA0: 4641 PUSH32(esp, ebp); /* 0x38007FA0: push ebp */ 4642 ebp = esp; /* 0x38007FA1: mov ebp, esp */ 4643 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 4644 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4645 esp = esp - 0xCu; /* 0x38007FA3: sub esp, 0xc */ 4646 _flag_k = FK_CMP; 4647 PUSH32(esp, esi); /* 0x38007FA6: push esi */ 4648 esi = ecx; /* 0x38007FA7: mov esi, ecx */ 4649 RECOMP_ICALL(0x380082C0u); /* 0x38007FA9: call 0x380082c0 */ /* not lifted */ 4650 RECOMP_FLAGS_IN(); 4651 /* test LO8(eax), LO8(eax) */ /* 0x38007FAE: test al, al */ 4652 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4653 _cf = 0; 4654 _flag_k = FK_NARROW(FK_TEST, 24); 4655 if (TEST_NZ(_flag_a, _flag_b)) goto L_3800802B; /* 0x38007FB0: jne 0x3800802b */ 4656 L_38007FB2: 4657 ecx = esi; /* 0x38007FB2: mov ecx, esi */ 4658 RECOMP_ICALL(0x38007B90u); /* 0x38007FB4: call 0x38007b90 */ /* not lifted */ 4659 RECOMP_FLAGS_IN(); 4660 ecx = esi + 0x138; /* 0x38007FB9: lea ecx, [esi + 0x138] */ 4661 edx = MEM32(ecx); /* 0x38007FBF: mov edx, dword ptr [ecx] */ 4662 MEM32(ebp + (-0xC)) = edx; /* 0x38007FC1: mov dword ptr [ebp - 0xc], edx */ 4663 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x38007FC4: fld dword ptr [ebp - 0xc] */ 4664 _st[0] -= (double)*(float*)ADDR(eax); /* 0x38007FC7: fsub dword ptr [eax] */ 4665 edx = MEM32(ecx + 0x4); /* 0x38007FC9: mov edx, dword ptr [ecx + 4] */ 4666 ecx = MEM32(ecx + 0x8); /* 0x38007FCC: mov ecx, dword ptr [ecx + 8] */ 4667 MEM32(ebp + (-0x8)) = edx; /* 0x38007FCF: mov dword ptr [ebp - 8], edx */ 4668 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x38007FD2: fstp dword ptr [ebp - 0xc] */ 4669 MEM32(ebp + (-0x4)) = ecx; /* 0x38007FD5: mov dword ptr [ebp - 4], ecx */ 4670 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x38007FD8: fld dword ptr [ebp - 8] */ 4671 edx = esi + 0x1A4; /* 0x38007FDB: lea edx, [esi + 0x1a4] */ 4672 _st[0] -= (double)*(float*)ADDR(eax + 0x4); /* 0x38007FE1: fsub dword ptr [eax + 4] */ 4673 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x38007FE4: fstp dword ptr [ebp - 8] */ 4674 ecx = MEM32(ebp + (-0x8)); /* 0x38007FE7: mov ecx, dword ptr [ebp - 8] */ 4675 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x38007FEA: fld dword ptr [ebp - 4] */ 4676 _st[0] -= (double)*(float*)ADDR(eax + 0x8); /* 0x38007FED: fsub dword ptr [eax + 8] */ 4677 eax = MEM32(ebp + (-0xC)); /* 0x38007FF0: mov eax, dword ptr [ebp - 0xc] */ 4678 MEM32(edx) = eax; /* 0x38007FF3: mov dword ptr [edx], eax */ 4679 MEM32(edx + 0x4) = ecx; /* 0x38007FF5: mov dword ptr [edx + 4], ecx */ 4680 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x38007FF8: fstp dword ptr [ebp - 4] */ 4681 eax = MEM32(ebp + (-0x4)); /* 0x38007FFB: mov eax, dword ptr [ebp - 4] */ 4682 ecx = esi; /* 0x38007FFE: mov ecx, esi */ 4683 MEM32(edx + 0x8) = eax; /* 0x38008000: mov dword ptr [edx + 8], eax */ 4684 RECOMP_ICALL(0x380081D0u); /* 0x38008003: call 0x380081d0 */ /* not lifted */ 4685 RECOMP_FLAGS_IN(); 4686 ecx = esi; /* 0x38008008: mov ecx, esi */ 4687 RECOMP_ICALL(0x38006D40u); /* 0x3800800A: call 0x38006d40 */ /* not lifted */ 4688 RECOMP_FLAGS_IN(); 4689 PUSH32(esp, eax); /* 0x3800800F: push eax */ 4690 ecx = esi; /* 0x38008010: mov ecx, esi */ 4691 RECOMP_ICALL(0x380080B0u); /* 0x38008012: call 0x380080b0 */ /* not lifted */ 4692 RECOMP_FLAGS_IN(); 4693 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4694 eax = 0; /* 0x38008017: xor eax, eax */ 4695 _cf = 0; 4696 _flag_k = FK_TEST; 4697 MEM32(esi + 0x19C) = eax; /* 0x38008019: mov dword ptr [esi + 0x19c], eax */ 4698 MEM32(esi + 0xC8) = eax; /* 0x3800801F: mov dword ptr [esi + 0xc8], eax */ 4699 MEM32(esi + 0xC4) = eax; /* 0x38008025: mov dword ptr [esi + 0xc4], eax */ 4700 L_3800802B: 4701 esi = POP32_VAL(esp); /* 0x3800802B: pop esi */ 4702 esp = ebp; /* 0x3800802C: mov esp, ebp */ 4703 ebp = POP32_VAL(esp); /* 0x3800802E: pop ebp */ 4704 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3800802F: ret */ 4705 RECOMP_REGS_OUT(); 4706 } 4707 4708 void sub_38008030(void) { 4709 int _fpu_cmp = 0; 4710 uint32_t _cf = 0; 4711 int _df = 1; 4712 uint32_t _flag_k = FK_NONE; 4713 uint32_t _flag_a = 0, _flag_b = 0; 4714 uint32_t _itail_tgt = 0; 4715 RECOMP_REGS_LOCALS 4716 RECOMP_ENTER(0x38008030u); 4717 4718 L_38008030: 4719 PUSH32(esp, esi); /* 0x38008030: push esi */ 4720 esi = ecx; /* 0x38008031: mov esi, ecx */ 4721 RECOMP_ICALL(0x380081D0u); /* 0x38008033: call 0x380081d0 */ /* not lifted */ 4722 RECOMP_FLAGS_IN(); 4723 eax = MEM32(0x3804E4A8); /* 0x38008038: mov eax, dword ptr [0x3804e4a8] */ 4724 ecx = MEM32(eax); /* 0x3800803D: mov ecx, dword ptr [eax] */ 4725 PUSH32(esp, 1); /* 0x3800803F: push 1 */ 4726 PUSH32(esp, 0x3806B7F8u); /* 0x38008041: push 0x3806b7f8 */ 4727 RECOMP_ICALL(MEM32(0x3804E498)); /* 0x38008046: call dword ptr [0x3804e498] */ 4728 RECOMP_FLAGS_IN(); 4729 /* test eax, eax */ /* 0x3800804C: test eax, eax */ 4730 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4731 _cf = 0; 4732 _flag_k = FK_TEST; 4733 if (TEST_NZ(_flag_a, _flag_b)) goto L_38008055; /* 0x3800804E: jne 0x38008055 */ 4734 L_38008050: 4735 eax = 1; /* 0x38008050: mov eax, 1 */ 4736 L_38008055: 4737 PUSH32(esp, eax); /* 0x38008055: push eax */ 4738 ecx = esi; /* 0x38008056: mov ecx, esi */ 4739 RECOMP_ICALL(0x38008270u); /* 0x38008058: call 0x38008270 */ /* not lifted */ 4740 RECOMP_FLAGS_IN(); 4741 edx = MEM32(esi); /* 0x3800805D: mov edx, dword ptr [esi] */ 4742 ecx = esi; /* 0x3800805F: mov ecx, esi */ 4743 RECOMP_ICALL(MEM32(edx + 0x64)); /* 0x38008061: call dword ptr [edx + 0x64] */ 4744 RECOMP_FLAGS_IN(); 4745 PUSH32(esp, eax); /* 0x38008064: push eax */ 4746 ecx = esi; /* 0x38008065: mov ecx, esi */ 4747 RECOMP_ICALL(0x380080B0u); /* 0x38008067: call 0x380080b0 */ /* not lifted */ 4748 RECOMP_FLAGS_IN(); 4749 eax = MEM32(esi + 0x60); /* 0x3800806C: mov eax, dword ptr [esi + 0x60] */ 4750 PUSH32(esp, 0); /* 0x3800806F: push 0 */ 4751 PUSH32(esp, 0x3806B5F8u); /* 0x38008071: push 0x3806b5f8 */ 4752 PUSH32(esp, 0x3806B5C0u); /* 0x38008076: push 0x3806b5c0 */ 4753 PUSH32(esp, 0); /* 0x3800807B: push 0 */ 4754 PUSH32(esp, eax); /* 0x3800807D: push eax */ 4755 RECOMP_ICALL(0x3804B682u); /* 0x3800807E: call 0x3804b682 */ /* not lifted */ 4756 RECOMP_FLAGS_IN(); 4757 edx = MEM32(eax); /* 0x38008083: mov edx, dword ptr [eax] */ 4758 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 4759 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4760 esp = esp + 0x14u; /* 0x38008085: add esp, 0x14 */ 4761 _flag_k = FK_ADD; 4762 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x1A4u); 4763 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4764 esi = esi + 0x1A4u; /* 0x38008088: add esi, 0x1a4 */ 4765 _flag_k = FK_ADD; 4766 PUSH32(esp, esi); /* 0x3800808E: push esi */ 4767 ecx = eax; /* 0x3800808F: mov ecx, eax */ 4768 RECOMP_ICALL(MEM32(edx + 0x80)); /* 0x38008091: call dword ptr [edx + 0x80] */ 4769 RECOMP_FLAGS_IN(); 4770 ecx = MEM32(0x3806EC04); /* 0x38008097: mov ecx, dword ptr [0x3806ec04] */ 4771 eax = MEM32(ecx); /* 0x3800809D: mov eax, dword ptr [ecx] */ 4772 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x3800809F: call dword ptr [eax + 0x10] */ 4773 RECOMP_FLAGS_IN(); 4774 ecx = eax; /* 0x380080A2: mov ecx, eax */ 4775 RECOMP_ICALL(0x3803DED0u); /* 0x380080A4: call 0x3803ded0 */ /* not lifted */ 4776 RECOMP_FLAGS_IN(); 4777 esi = POP32_VAL(esp); /* 0x380080A9: pop esi */ 4778 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380080AA: ret */ 4779 RECOMP_REGS_OUT(); 4780 } 4781 4782 void sub_380080B0(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(0x380080B0u); 4791 4792 L_380080B0: 4793 PUSH32(esp, ebp); /* 0x380080B0: push ebp */ 4794 ebp = esp; /* 0x380080B1: mov ebp, esp */ 4795 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 4796 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4797 esp = esp - 0xCu; /* 0x380080B3: sub esp, 0xc */ 4798 _flag_k = FK_CMP; 4799 PUSH32(esp, esi); /* 0x380080B6: push esi */ 4800 esi = ecx; /* 0x380080B7: mov esi, ecx */ 4801 /* test esi, esi */ /* 0x380080B9: test esi, esi */ 4802 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 4803 _cf = 0; 4804 _flag_k = FK_TEST; 4805 PUSH32(esp, edi); /* 0x380080BB: push edi */ 4806 edi = MEM32(ebp + 0x8); /* 0x380080BC: mov edi, dword ptr [ebp + 8] */ 4807 MEM32(esi + 0x60) = edi; /* 0x380080BF: mov dword ptr [esi + 0x60], edi */ 4808 if (TEST_Z(_flag_a, _flag_b)) goto L_380080CC; /* 0x380080C2: je 0x380080cc */ 4809 L_380080C4: 4810 eax = esi + 0xB8; /* 0x380080C4: lea eax, [esi + 0xb8] */ 4811 goto L_380080CE; /* 0x380080CA: jmp 0x380080ce */ 4812 L_380080CC: 4813 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4814 eax = 0; /* 0x380080CC: xor eax, eax */ 4815 _cf = 0; 4816 _flag_k = FK_TEST; 4817 L_380080CE: 4818 PUSH32(esp, ebx); /* 0x380080CE: push ebx */ 4819 ebx = MEM32(0x3804E708); /* 0x380080CF: mov ebx, dword ptr [0x3804e708] */ 4820 PUSH32(esp, eax); /* 0x380080D5: push eax */ 4821 ecx = edi; /* 0x380080D6: mov ecx, edi */ 4822 RECOMP_ICALL(ebx); /* 0x380080D8: call ebx */ 4823 RECOMP_FLAGS_IN(); 4824 /* test esi, esi */ /* 0x380080DA: test esi, esi */ 4825 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 4826 _cf = 0; 4827 _flag_k = FK_TEST; 4828 if (TEST_Z(_flag_a, _flag_b)) goto L_380080E3; /* 0x380080DC: je 0x380080e3 */ 4829 L_380080DE: 4830 eax = esi + 0x1C; /* 0x380080DE: lea eax, [esi + 0x1c] */ 4831 goto L_380080E5; /* 0x380080E1: jmp 0x380080e5 */ 4832 L_380080E3: 4833 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4834 eax = 0; /* 0x380080E3: xor eax, eax */ 4835 _cf = 0; 4836 _flag_k = FK_TEST; 4837 L_380080E5: 4838 PUSH32(esp, eax); /* 0x380080E5: push eax */ 4839 ecx = edi; /* 0x380080E6: mov ecx, edi */ 4840 RECOMP_ICALL(MEM32(0x3804E68C)); /* 0x380080E8: call dword ptr [0x3804e68c] */ 4841 RECOMP_FLAGS_IN(); 4842 eax = MEM32(edi); /* 0x380080EE: mov eax, dword ptr [edi] */ 4843 ecx = ebp + (-0xC); /* 0x380080F0: lea ecx, [ebp - 0xc] */ 4844 PUSH32(esp, ecx); /* 0x380080F3: push ecx */ 4845 ecx = edi; /* 0x380080F4: mov ecx, edi */ 4846 MEM32(ebp + (-0xC)) = 0; /* 0x380080F6: mov dword ptr [ebp - 0xc], 0 */ 4847 MEM32(ebp + (-0x8)) = 0x40000000u; /* 0x380080FD: mov dword ptr [ebp - 8], 0x40000000 */ 4848 MEM32(ebp + (-0x4)) = 0; /* 0x38008104: mov dword ptr [ebp - 4], 0 */ 4849 RECOMP_ICALL(MEM32(eax + 0x7C)); /* 0x3800810B: call dword ptr [eax + 0x7c] */ 4850 RECOMP_FLAGS_IN(); 4851 eax = MEM32(esi + 0xEC); /* 0x3800810E: mov eax, dword ptr [esi + 0xec] */ 4852 /* test eax, eax */ /* 0x38008114: test eax, eax */ 4853 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4854 _cf = 0; 4855 _flag_k = FK_TEST; 4856 if (TEST_Z(_flag_a, _flag_b)) goto L_3800811D; /* 0x38008116: je 0x3800811d */ 4857 L_38008118: 4858 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x24u); 4859 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4860 eax = eax + 0x24u; /* 0x38008118: add eax, 0x24 */ 4861 _flag_k = FK_ADD; 4862 goto L_3800811F; /* 0x3800811B: jmp 0x3800811f */ 4863 L_3800811D: 4864 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4865 eax = 0; /* 0x3800811D: xor eax, eax */ 4866 _cf = 0; 4867 _flag_k = FK_TEST; 4868 L_3800811F: 4869 PUSH32(esp, eax); /* 0x3800811F: push eax */ 4870 ecx = edi; /* 0x38008120: mov ecx, edi */ 4871 RECOMP_ICALL(ebx); /* 0x38008122: call ebx */ 4872 RECOMP_FLAGS_IN(); 4873 ecx = esi; /* 0x38008124: mov ecx, esi */ 4874 RECOMP_ICALL(0x38018E70u); /* 0x38008126: call 0x38018e70 */ /* not lifted */ 4875 RECOMP_FLAGS_IN(); 4876 /* test eax, eax */ /* 0x3800812B: test eax, eax */ 4877 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4878 _cf = 0; 4879 _flag_k = FK_TEST; 4880 if (TEST_Z(_flag_a, _flag_b)) goto L_3800815D; /* 0x3800812D: je 0x3800815d */ 4881 L_3800812F: 4882 ecx = esi; /* 0x3800812F: mov ecx, esi */ 4883 RECOMP_ICALL(0x38018250u); /* 0x38008131: call 0x38018250 */ /* not lifted */ 4884 RECOMP_FLAGS_IN(); 4885 /* test eax, eax */ /* 0x38008136: test eax, eax */ 4886 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4887 _cf = 0; 4888 _flag_k = FK_TEST; 4889 if (TEST_Z(_flag_a, _flag_b)) goto L_3800815D; /* 0x38008138: je 0x3800815d */ 4890 L_3800813A: 4891 ecx = esi; /* 0x3800813A: mov ecx, esi */ 4892 RECOMP_ICALL(0x38017C60u); /* 0x3800813C: call 0x38017c60 */ /* not lifted */ 4893 RECOMP_FLAGS_IN(); 4894 /* test LO8(eax), LO8(eax) */ /* 0x38008141: test al, al */ 4895 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4896 _cf = 0; 4897 _flag_k = FK_NARROW(FK_TEST, 24); 4898 if (TEST_Z(_flag_a, _flag_b)) goto L_3800815D; /* 0x38008143: je 0x3800815d */ 4899 L_38008145: 4900 ecx = esi; /* 0x38008145: mov ecx, esi */ 4901 RECOMP_ICALL(0x38018250u); /* 0x38008147: call 0x38018250 */ /* not lifted */ 4902 RECOMP_FLAGS_IN(); 4903 edx = MEM32(eax); /* 0x3800814C: mov edx, dword ptr [eax] */ 4904 PUSH32(esp, edi); /* 0x3800814E: push edi */ 4905 ecx = eax; /* 0x3800814F: mov ecx, eax */ 4906 RECOMP_ICALL(MEM32(edx + 0xC)); /* 0x38008151: call dword ptr [edx + 0xc] */ 4907 RECOMP_FLAGS_IN(); 4908 eax = MEM32(esi + 0x78); /* 0x38008154: mov eax, dword ptr [esi + 0x78] */ 4909 MEM32(edi + 0x134) = eax; /* 0x38008157: mov dword ptr [edi + 0x134], eax */ 4910 L_3800815D: 4911 ecx = MEM32(esi + 0xE8); /* 0x3800815D: mov ecx, dword ptr [esi + 0xe8] */ 4912 /* test ecx, ecx */ /* 0x38008163: test ecx, ecx */ 4913 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 4914 _cf = 0; 4915 _flag_k = FK_TEST; 4916 if (TEST_Z(_flag_a, _flag_b)) goto L_3800819A; /* 0x38008165: je 0x3800819a */ 4917 L_38008167: 4918 /* test edi, edi */ /* 0x38008167: test edi, edi */ 4919 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 4920 _cf = 0; 4921 _flag_k = FK_TEST; 4922 if (TEST_Z(_flag_a, _flag_b)) goto L_38008170; /* 0x38008169: je 0x38008170 */ 4923 L_3800816B: 4924 eax = edi + 0x20; /* 0x3800816B: lea eax, [edi + 0x20] */ 4925 goto L_38008172; /* 0x3800816E: jmp 0x38008172 */ 4926 L_38008170: 4927 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4928 eax = 0; /* 0x38008170: xor eax, eax */ 4929 _cf = 0; 4930 _flag_k = FK_TEST; 4931 L_38008172: 4932 PUSH32(esp, eax); /* 0x38008172: push eax */ 4933 RECOMP_ICALL(ebx); /* 0x38008173: call ebx */ 4934 RECOMP_FLAGS_IN(); 4935 ecx = MEM32(esi + 0xE8); /* 0x38008175: mov ecx, dword ptr [esi + 0xe8] */ 4936 PUSH32(esp, 0); /* 0x3800817B: push 0 */ 4937 PUSH32(esp, 0x3806B5D8u); /* 0x3800817D: push 0x3806b5d8 */ 4938 PUSH32(esp, 0x3806B5A0u); /* 0x38008182: push 0x3806b5a0 */ 4939 PUSH32(esp, 0); /* 0x38008187: push 0 */ 4940 PUSH32(esp, ecx); /* 0x38008189: push ecx */ 4941 RECOMP_ICALL(0x3804B682u); /* 0x3800818A: call 0x3804b682 */ /* not lifted */ 4942 RECOMP_FLAGS_IN(); 4943 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 4944 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4945 esp = esp + 0x14u; /* 0x3800818F: add esp, 0x14 */ 4946 _flag_k = FK_ADD; 4947 ecx = eax; /* 0x38008192: mov ecx, eax */ 4948 RECOMP_ICALL(MEM32(0x3804E6A4)); /* 0x38008194: call dword ptr [0x3804e6a4] */ 4949 RECOMP_FLAGS_IN(); 4950 L_3800819A: 4951 ecx = esi; /* 0x3800819A: mov ecx, esi */ 4952 RECOMP_ICALL(0x380082C0u); /* 0x3800819C: call 0x380082c0 */ /* not lifted */ 4953 RECOMP_FLAGS_IN(); 4954 edx = MEM32(esi + 0xC0); /* 0x380081A1: mov edx, dword ptr [esi + 0xc0] */ 4955 ecx = MEM32(esi + 0x1B0); /* 0x380081A7: mov ecx, dword ptr [esi + 0x1b0] */ 4956 ebx = POP32_VAL(esp); /* 0x380081AD: pop ebx */ 4957 PUSH32(esp, edx); /* 0x380081AE: push edx */ 4958 PUSH32(esp, 0x3FC90FDBu); /* 0x380081AF: push 0x3fc90fdb */ 4959 /* test LO8(eax), LO8(eax) */ /* 0x380081B4: test al, al */ 4960 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4961 _cf = 0; 4962 _flag_k = FK_NARROW(FK_TEST, 24); 4963 MEM32(esi + 0xBC) = 0x3FC90FDBu; /* 0x380081B6: mov dword ptr [esi + 0xbc], 0x3fc90fdb */ 4964 RECOMP_ICALL(MEM32(0x3804E154)); /* 0x380081C0: call dword ptr [0x3804e154] */ 4965 RECOMP_FLAGS_IN(); 4966 edi = POP32_VAL(esp); /* 0x380081C6: pop edi */ 4967 esi = POP32_VAL(esp); /* 0x380081C7: pop esi */ 4968 esp = ebp; /* 0x380081C8: mov esp, ebp */ 4969 ebp = POP32_VAL(esp); /* 0x380081CA: pop ebp */ 4970 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x380081CB: ret 4 */ 4971 RECOMP_REGS_OUT(); 4972 } 4973 4974 void sub_380081D0(void) { 4975 int _fpu_cmp = 0; 4976 uint32_t _cf = 0; 4977 int _df = 1; 4978 uint32_t _flag_k = FK_NONE; 4979 uint32_t _flag_a = 0, _flag_b = 0; 4980 uint32_t _itail_tgt = 0; 4981 RECOMP_REGS_LOCALS 4982 RECOMP_ENTER(0x380081D0u); 4983 4984 L_380081D0: 4985 PUSH32(esp, ebp); /* 0x380081D0: push ebp */ 4986 ebp = esp; /* 0x380081D1: mov ebp, esp */ 4987 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4988 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4989 esp = esp - 8; /* 0x380081D3: sub esp, 8 */ 4990 _flag_k = FK_CMP; 4991 PUSH32(esp, ebx); /* 0x380081D6: push ebx */ 4992 PUSH32(esp, esi); /* 0x380081D7: push esi */ 4993 esi = ecx; /* 0x380081D8: mov esi, ecx */ 4994 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4995 ebx = 0; /* 0x380081DA: xor ebx, ebx */ 4996 _cf = 0; 4997 _flag_k = FK_TEST; 4998 /* cmp esi, ebx */ /* 0x380081DC: cmp esi, ebx */ 4999 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 5000 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5001 _flag_k = FK_CMP; 5002 if (CMP_EQ(_flag_a, _flag_b)) goto L_380081E8; /* 0x380081DE: je 0x380081e8 */ 5003 L_380081E0: 5004 eax = esi + 0xB8; /* 0x380081E0: lea eax, [esi + 0xb8] */ 5005 goto L_380081EA; /* 0x380081E6: jmp 0x380081ea */ 5006 L_380081E8: 5007 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5008 eax = 0; /* 0x380081E8: xor eax, eax */ 5009 _cf = 0; 5010 _flag_k = FK_TEST; 5011 L_380081EA: 5012 ecx = MEM32(esi + 0x60); /* 0x380081EA: mov ecx, dword ptr [esi + 0x60] */ 5013 PUSH32(esp, edi); /* 0x380081ED: push edi */ 5014 edi = MEM32(0x3804E704); /* 0x380081EE: mov edi, dword ptr [0x3804e704] */ 5015 PUSH32(esp, eax); /* 0x380081F4: push eax */ 5016 RECOMP_ICALL(edi); /* 0x380081F5: call edi */ 5017 RECOMP_FLAGS_IN(); 5018 ecx = MEM32(esi + 0x60); /* 0x380081F7: mov ecx, dword ptr [esi + 0x60] */ 5019 PUSH32(esp, ebx); /* 0x380081FA: push ebx */ 5020 RECOMP_ICALL(MEM32(0x3804E68C)); /* 0x380081FB: call dword ptr [0x3804e68c] */ 5021 RECOMP_FLAGS_IN(); 5022 eax = MEM32(esi + 0xEC); /* 0x38008201: mov eax, dword ptr [esi + 0xec] */ 5023 /* cmp eax, ebx */ /* 0x38008207: cmp eax, ebx */ 5024 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 5025 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5026 _flag_k = FK_CMP; 5027 if (CMP_EQ(_flag_a, _flag_b)) goto L_38008210; /* 0x38008209: je 0x38008210 */ 5028 L_3800820B: 5029 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x24u); 5030 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5031 eax = eax + 0x24u; /* 0x3800820B: add eax, 0x24 */ 5032 _flag_k = FK_ADD; 5033 goto L_38008212; /* 0x3800820E: jmp 0x38008212 */ 5034 L_38008210: 5035 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5036 eax = 0; /* 0x38008210: xor eax, eax */ 5037 _cf = 0; 5038 _flag_k = FK_TEST; 5039 L_38008212: 5040 ecx = MEM32(esi + 0x60); /* 0x38008212: mov ecx, dword ptr [esi + 0x60] */ 5041 PUSH32(esp, eax); /* 0x38008215: push eax */ 5042 RECOMP_ICALL(edi); /* 0x38008216: call edi */ 5043 RECOMP_FLAGS_IN(); 5044 eax = MEM32(esi + 0x60); /* 0x38008218: mov eax, dword ptr [esi + 0x60] */ 5045 /* cmp eax, ebx */ /* 0x3800821B: cmp eax, ebx */ 5046 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 5047 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5048 _flag_k = FK_CMP; 5049 if (CMP_EQ(_flag_a, _flag_b)) goto L_38008224; /* 0x3800821D: je 0x38008224 */ 5050 L_3800821F: 5051 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x20u); 5052 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5053 eax = eax + 0x20u; /* 0x3800821F: add eax, 0x20 */ 5054 _flag_k = FK_ADD; 5055 goto L_38008226; /* 0x38008222: jmp 0x38008226 */ 5056 L_38008224: 5057 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5058 eax = 0; /* 0x38008224: xor eax, eax */ 5059 _cf = 0; 5060 _flag_k = FK_TEST; 5061 L_38008226: 5062 ecx = MEM32(esi + 0xE8); /* 0x38008226: mov ecx, dword ptr [esi + 0xe8] */ 5063 PUSH32(esp, eax); /* 0x3800822C: push eax */ 5064 RECOMP_ICALL(edi); /* 0x3800822D: call edi */ 5065 RECOMP_FLAGS_IN(); 5066 ecx = esi; /* 0x3800822F: mov ecx, esi */ 5067 RECOMP_ICALL(0x38018250u); /* 0x38008231: call 0x38018250 */ /* not lifted */ 5068 RECOMP_FLAGS_IN(); 5069 ecx = MEM32(esi + 0x60); /* 0x38008236: mov ecx, dword ptr [esi + 0x60] */ 5070 edx = MEM32(eax); /* 0x38008239: mov edx, dword ptr [eax] */ 5071 PUSH32(esp, ecx); /* 0x3800823B: push ecx */ 5072 ecx = eax; /* 0x3800823C: mov ecx, eax */ 5073 RECOMP_ICALL(MEM32(edx + 0x14)); /* 0x3800823E: call dword ptr [edx + 0x14] */ 5074 RECOMP_FLAGS_IN(); 5075 edx = ebp + (-0x8); /* 0x38008241: lea edx, [ebp - 8] */ 5076 PUSH32(esp, edx); /* 0x38008244: push edx */ 5077 ecx = esi; /* 0x38008245: mov ecx, esi */ 5078 MEM32(ebp + (-0x8)) = ebx; /* 0x38008247: mov dword ptr [ebp - 8], ebx */ 5079 MEM32(ebp + (-0x4)) = ebx; /* 0x3800824A: mov dword ptr [ebp - 4], ebx */ 5080 RECOMP_ICALL(0x38006EE0u); /* 0x3800824D: call 0x38006ee0 */ /* not lifted */ 5081 RECOMP_FLAGS_IN(); 5082 ecx = MEM32(esi + 0x60); /* 0x38008252: mov ecx, dword ptr [esi + 0x60] */ 5083 /* cmp ecx, ebx */ /* 0x38008255: cmp ecx, ebx */ 5084 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx); 5085 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5086 _flag_k = FK_CMP; 5087 edi = POP32_VAL(esp); /* 0x38008257: pop edi */ 5088 if (CMP_EQ(_flag_a, _flag_b)) goto L_38008261; /* 0x38008258: je 0x38008261 */ 5089 L_3800825A: 5090 eax = MEM32(ecx); /* 0x3800825A: mov eax, dword ptr [ecx] */ 5091 PUSH32(esp, 1); /* 0x3800825C: push 1 */ 5092 RECOMP_ICALL(MEM32(eax + 0x18)); /* 0x3800825E: call dword ptr [eax + 0x18] */ 5093 RECOMP_FLAGS_IN(); 5094 L_38008261: 5095 MEM32(esi + 0x60) = ebx; /* 0x38008261: mov dword ptr [esi + 0x60], ebx */ 5096 esi = POP32_VAL(esp); /* 0x38008264: pop esi */ 5097 ebx = POP32_VAL(esp); /* 0x38008265: pop ebx */ 5098 esp = ebp; /* 0x38008266: mov esp, ebp */ 5099 ebp = POP32_VAL(esp); /* 0x38008268: pop ebp */ 5100 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38008269: ret */ 5101 RECOMP_REGS_OUT(); 5102 } 5103 5104 void sub_38008270(void) { 5105 int _fpu_cmp = 0; 5106 uint32_t _cf = 0; 5107 int _df = 1; 5108 uint32_t _flag_k = FK_NONE; 5109 uint32_t _flag_a = 0, _flag_b = 0; 5110 uint32_t _itail_tgt = 0; 5111 RECOMP_REGS_LOCALS 5112 RECOMP_ENTER(0x38008270u); 5113 5114 L_38008270: 5115 PUSH32(esp, ebp); /* 0x38008270: push ebp */ 5116 ebp = esp; /* 0x38008271: mov ebp, esp */ 5117 eax = MEM32(ebp + 0x8); /* 0x38008273: mov eax, dword ptr [ebp + 8] */ 5118 PUSH32(esp, 1); /* 0x38008276: push 1 */ 5119 PUSH32(esp, 1); /* 0x38008278: push 1 */ 5120 MEM32(ecx + 0x19C) = eax; /* 0x3800827A: mov dword ptr [ecx + 0x19c], eax */ 5121 PUSH32(esp, eax); /* 0x38008280: push eax */ 5122 eax = MEM32(0x3804E4A8); /* 0x38008281: mov eax, dword ptr [0x3804e4a8] */ 5123 ecx = MEM32(eax); /* 0x38008286: mov ecx, dword ptr [eax] */ 5124 PUSH32(esp, 0x3806B7F8u); /* 0x38008288: push 0x3806b7f8 */ 5125 RECOMP_ICALL(MEM32(0x3804E4AC)); /* 0x3800828D: call dword ptr [0x3804e4ac] */ 5126 RECOMP_FLAGS_IN(); 5127 ebp = POP32_VAL(esp); /* 0x38008293: pop ebp */ 5128 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38008294: ret 4 */ 5129 RECOMP_REGS_OUT(); 5130 } 5131 5132 void sub_380082A0(void) { 5133 int _fpu_cmp = 0; 5134 uint32_t _cf = 0; 5135 int _df = 1; 5136 uint32_t _flag_k = FK_NONE; 5137 uint32_t _flag_a = 0, _flag_b = 0; 5138 uint32_t _itail_tgt = 0; 5139 RECOMP_REGS_LOCALS 5140 RECOMP_ENTER(0x380082A0u); 5141 5142 L_380082A0: 5143 eax = MEM32(ecx + 0x19C); /* 0x380082A0: mov eax, dword ptr [ecx + 0x19c] */ 5144 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380082A6: ret */ 5145 RECOMP_REGS_OUT(); 5146 } 5147 5148 void sub_380082B0(void) { 5149 int _fpu_cmp = 0; 5150 uint32_t _cf = 0; 5151 int _df = 1; 5152 uint32_t _flag_k = FK_NONE; 5153 uint32_t _flag_a = 0, _flag_b = 0; 5154 uint32_t _itail_tgt = 0; 5155 RECOMP_REGS_LOCALS 5156 RECOMP_ENTER(0x380082B0u); 5157 5158 L_380082B0: 5159 edx = MEM32(ecx + 0x19C); /* 0x380082B0: mov edx, dword ptr [ecx + 0x19c] */ 5160 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5161 eax = 0; /* 0x380082B6: xor eax, eax */ 5162 _cf = 0; 5163 _flag_k = FK_TEST; 5164 /* test edx, edx */ /* 0x380082B8: test edx, edx */ 5165 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 5166 _cf = 0; 5167 _flag_k = FK_TEST; 5168 SET_LO8(eax, (TEST_NZ(_flag_a, _flag_b)) ? 1 : 0); /* 0x380082BA: setne al */ 5169 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380082BD: ret */ 5170 RECOMP_REGS_OUT(); 5171 } 5172 5173 void sub_380082C0(void) { 5174 int _fpu_cmp = 0; 5175 uint32_t _cf = 0; 5176 int _df = 1; 5177 uint32_t _flag_k = FK_NONE; 5178 uint32_t _flag_a = 0, _flag_b = 0; 5179 uint32_t _itail_tgt = 0; 5180 RECOMP_REGS_LOCALS 5181 RECOMP_ENTER(0x380082C0u); 5182 5183 L_380082C0: 5184 edx = MEM32(ecx + 0x19C); /* 0x380082C0: mov edx, dword ptr [ecx + 0x19c] */ 5185 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5186 eax = 0; /* 0x380082C6: xor eax, eax */ 5187 _cf = 0; 5188 _flag_k = FK_TEST; 5189 /* test edx, edx */ /* 0x380082C8: test edx, edx */ 5190 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 5191 _cf = 0; 5192 _flag_k = FK_TEST; 5193 SET_LO8(eax, (TEST_Z(_flag_a, _flag_b)) ? 1 : 0); /* 0x380082CA: sete al */ 5194 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380082CD: ret */ 5195 RECOMP_REGS_OUT(); 5196 } 5197 5198 void sub_380082D0(void) { 5199 int _fpu_cmp = 0; 5200 uint32_t _cf = 0; 5201 int _df = 1; 5202 uint32_t _flag_k = FK_NONE; 5203 uint32_t _flag_a = 0, _flag_b = 0; 5204 uint32_t _itail_tgt = 0; 5205 RECOMP_REGS_LOCALS 5206 RECOMP_ENTER(0x380082D0u); 5207 5208 L_380082D0: 5209 PUSH32(esp, esi); /* 0x380082D0: push esi */ 5210 esi = ecx; /* 0x380082D1: mov esi, ecx */ 5211 RECOMP_ICALL(0x380082B0u); /* 0x380082D3: call 0x380082b0 */ /* not lifted */ 5212 RECOMP_FLAGS_IN(); 5213 /* test LO8(eax), LO8(eax) */ /* 0x380082D8: test al, al */ 5214 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5215 _cf = 0; 5216 _flag_k = FK_NARROW(FK_TEST, 24); 5217 ecx = esi; /* 0x380082DA: mov ecx, esi */ 5218 if (TEST_Z(_flag_a, _flag_b)) goto L_380082E5; /* 0x380082DC: je 0x380082e5 */ 5219 L_380082DE: 5220 RECOMP_ICALL(0x38007FA0u); /* 0x380082DE: call 0x38007fa0 */ /* not lifted */ 5221 RECOMP_FLAGS_IN(); 5222 esi = POP32_VAL(esp); /* 0x380082E3: pop esi */ 5223 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380082E4: ret */ 5224 L_380082E5: 5225 RECOMP_ICALL(0x38008030u); /* 0x380082E5: call 0x38008030 */ /* not lifted */ 5226 RECOMP_FLAGS_IN(); 5227 esi = POP32_VAL(esp); /* 0x380082EA: pop esi */ 5228 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380082EB: ret */ 5229 RECOMP_REGS_OUT(); 5230 } 5231 5232 void sub_380082F0(void) { 5233 int _fpu_cmp = 0; 5234 uint32_t _cf = 0; 5235 int _df = 1; 5236 uint32_t _flag_k = FK_NONE; 5237 uint32_t _flag_a = 0, _flag_b = 0; 5238 uint32_t _itail_tgt = 0; 5239 RECOMP_REGS_LOCALS 5240 RECOMP_ENTER(0x380082F0u); 5241 5242 L_380082F0: 5243 PUSH32(esp, ebp); /* 0x380082F0: push ebp */ 5244 ebp = esp; /* 0x380082F1: mov ebp, esp */ 5245 PUSH32(esp, ebx); /* 0x380082F3: push ebx */ 5246 PUSH32(esp, esi); /* 0x380082F4: push esi */ 5247 esi = ecx; /* 0x380082F5: mov esi, ecx */ 5248 ecx = MEM32(0x3806EC04); /* 0x380082F7: mov ecx, dword ptr [0x3806ec04] */ 5249 eax = MEM32(ecx); /* 0x380082FD: mov eax, dword ptr [ecx] */ 5250 PUSH32(esp, edi); /* 0x380082FF: push edi */ 5251 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x38008300: call dword ptr [eax + 0x10] */ 5252 RECOMP_FLAGS_IN(); 5253 ecx = esi; /* 0x38008303: mov ecx, esi */ 5254 ebx = eax; /* 0x38008305: mov ebx, eax */ 5255 RECOMP_ICALL(0x380082C0u); /* 0x38008307: call 0x380082c0 */ /* not lifted */ 5256 RECOMP_FLAGS_IN(); 5257 /* test LO8(eax), LO8(eax) */ /* 0x3800830C: test al, al */ 5258 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5259 _cf = 0; 5260 _flag_k = FK_NARROW(FK_TEST, 24); 5261 edi = MEM32(ebp + 0x8); /* 0x3800830E: mov edi, dword ptr [ebp + 8] */ 5262 if (TEST_Z(_flag_a, _flag_b)) goto L_38008320; /* 0x38008311: je 0x38008320 */ 5263 L_38008313: 5264 /* cmp edi, ebx */ /* 0x38008313: cmp edi, ebx */ 5265 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx); 5266 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5267 _flag_k = FK_CMP; 5268 if (CMP_NE(_flag_a, _flag_b)) goto L_38008320; /* 0x38008315: jne 0x38008320 */ 5269 L_38008317: 5270 edi = POP32_VAL(esp); /* 0x38008317: pop edi */ 5271 esi = POP32_VAL(esp); /* 0x38008318: pop esi */ 5272 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 5273 SET_LO8(eax, 0); /* 0x38008319: xor al, al */ 5274 _cf = 0; 5275 _flag_k = FK_NARROW(FK_TEST, 24); 5276 ebx = POP32_VAL(esp); /* 0x3800831B: pop ebx */ 5277 ebp = POP32_VAL(esp); /* 0x3800831C: pop ebp */ 5278 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3800831D: ret 4 */ 5279 L_38008320: 5280 ecx = edi; /* 0x38008320: mov ecx, edi */ 5281 RECOMP_ICALL(0x3803DF30u); /* 0x38008322: call 0x3803df30 */ /* not lifted */ 5282 RECOMP_FLAGS_IN(); 5283 /* test LO8(eax), LO8(eax) */ /* 0x38008327: test al, al */ 5284 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5285 _cf = 0; 5286 _flag_k = FK_NARROW(FK_TEST, 24); 5287 if (TEST_NZ(_flag_a, _flag_b)) goto L_38008332; /* 0x38008329: jne 0x38008332 */ 5288 L_3800832B: 5289 edi = POP32_VAL(esp); /* 0x3800832B: pop edi */ 5290 esi = POP32_VAL(esp); /* 0x3800832C: pop esi */ 5291 ebx = POP32_VAL(esp); /* 0x3800832D: pop ebx */ 5292 ebp = POP32_VAL(esp); /* 0x3800832E: pop ebp */ 5293 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3800832F: ret 4 */ 5294 L_38008332: 5295 eax = MEM32(esi + 0xEC); /* 0x38008332: mov eax, dword ptr [esi + 0xec] */ 5296 edx = MEM32(edi); /* 0x38008338: mov edx, dword ptr [edi] */ 5297 PUSH32(esp, eax); /* 0x3800833A: push eax */ 5298 ecx = edi; /* 0x3800833B: mov ecx, edi */ 5299 RECOMP_ICALL(MEM32(edx + 0x9C)); /* 0x3800833D: call dword ptr [edx + 0x9c] */ 5300 RECOMP_FLAGS_IN(); 5301 SET_LO8(ebx, LO8(eax)); /* 0x38008343: mov bl, al */ 5302 /* test LO8(ebx), LO8(ebx) */ /* 0x38008345: test bl, bl */ 5303 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 5304 _cf = 0; 5305 _flag_k = FK_NARROW(FK_TEST, 24); 5306 if (TEST_Z(_flag_a, _flag_b)) goto L_3800836A; /* 0x38008347: je 0x3800836a */ 5307 L_38008349: 5308 edx = MEM32(edi); /* 0x38008349: mov edx, dword ptr [edi] */ 5309 PUSH32(esp, esi); /* 0x3800834B: push esi */ 5310 ecx = edi; /* 0x3800834C: mov ecx, edi */ 5311 RECOMP_ICALL(MEM32(edx + 0x8C)); /* 0x3800834E: call dword ptr [edx + 0x8c] */ 5312 RECOMP_FLAGS_IN(); 5313 ecx = esi; /* 0x38008354: mov ecx, esi */ 5314 RECOMP_ICALL(0x38018300u); /* 0x38008356: call 0x38018300 */ /* not lifted */ 5315 RECOMP_FLAGS_IN(); 5316 edi = esi + 0xF0; /* 0x3800835B: lea edi, [esi + 0xf0] */ 5317 ecx = 5; /* 0x38008361: mov ecx, 5 */ 5318 esi = eax; /* 0x38008366: mov esi, eax */ 5319 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x38008368: 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; } 5320 L_3800836A: 5321 edi = POP32_VAL(esp); /* 0x3800836A: pop edi */ 5322 esi = POP32_VAL(esp); /* 0x3800836B: pop esi */ 5323 SET_LO8(eax, LO8(ebx)); /* 0x3800836C: mov al, bl */ 5324 ebx = POP32_VAL(esp); /* 0x3800836E: pop ebx */ 5325 ebp = POP32_VAL(esp); /* 0x3800836F: pop ebp */ 5326 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38008370: ret 4 */ 5327 RECOMP_REGS_OUT(); 5328 } 5329 5330 void sub_38008380(void) { 5331 int _fpu_cmp = 0; 5332 uint32_t _cf = 0; 5333 int _df = 1; 5334 uint32_t _flag_k = FK_NONE; 5335 uint32_t _flag_a = 0, _flag_b = 0; 5336 uint32_t _itail_tgt = 0; 5337 RECOMP_REGS_LOCALS 5338 RECOMP_ENTER(0x38008380u); 5339 5340 L_38008380: 5341 PUSH32(esp, ebp); /* 0x38008380: push ebp */ 5342 ebp = esp; /* 0x38008381: mov ebp, esp */ 5343 PUSH32(esp, 0xFFFFFFFFu); /* 0x38008383: push -1 */ 5344 PUSH32(esp, 0x3804BAF9u); /* 0x38008385: push 0x3804baf9 */ 5345 eax = MEM32(FS_BASE + (0)); /* 0x3800838A: mov eax, dword ptr fs:[0] */ 5346 PUSH32(esp, eax); /* 0x38008390: push eax */ 5347 MEM32(FS_BASE + (0)) = esp; /* 0x38008391: mov dword ptr fs:[0], esp */ 5348 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x40u); 5349 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5350 esp = esp - 0x40u; /* 0x38008398: sub esp, 0x40 */ 5351 _flag_k = FK_CMP; 5352 SET_LO8(ecx, MEM8(0x3806E9C4)); /* 0x3800839B: mov cl, byte ptr [0x3806e9c4] */ 5353 SET_LO8(eax, 1); /* 0x380083A1: mov al, 1 */ 5354 /* test LO8(eax), LO8(ecx) */ /* 0x380083A3: test al, cl */ 5355 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24; 5356 _cf = 0; 5357 _flag_k = FK_NARROW(FK_TEST, 24); 5358 if (TEST_NZ(_flag_a, _flag_b)) goto L_380083DC; /* 0x380083A5: jne 0x380083dc */ 5359 L_380083A7: 5360 SET_LO8(edx, LO8(ecx)); /* 0x380083A7: mov dl, cl */ 5361 _flag_a = (uint32_t)((LO8(edx) | LO8(eax))) << 24; _flag_b = (uint32_t)((LO8(edx) | LO8(eax))) << 24; 5362 SET_LO8(edx, LO8(edx) | LO8(eax)); /* 0x380083A9: or dl, al */ 5363 _cf = 0; 5364 _flag_k = FK_NARROW(FK_TEST, 24); 5365 PUSH32(esp, 0x380084E0u); /* 0x380083AB: push 0x380084e0 */ 5366 MEM8(0x3806E9C4) = (uint8_t)(LO8(edx)); /* 0x380083B0: mov byte ptr [0x3806e9c4], dl */ 5367 MEM32(0x3806E9B8) = 0; /* 0x380083B6: mov dword ptr [0x3806e9b8], 0 */ 5368 MEM32(0x3806E9BC) = 0; /* 0x380083C0: mov dword ptr [0x3806e9bc], 0 */ 5369 MEM32(0x3806E9C0) = 0; /* 0x380083CA: mov dword ptr [0x3806e9c0], 0 */ 5370 RECOMP_ICALL(0x3804B54Cu); /* 0x380083D4: call 0x3804b54c */ /* not lifted */ 5371 RECOMP_FLAGS_IN(); 5372 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5373 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5374 esp = esp + 4; /* 0x380083D9: add esp, 4 */ 5375 _flag_k = FK_ADD; 5376 L_380083DC: 5377 PUSH32(esp, esi); /* 0x380083DC: push esi */ 5378 _flag_a = (uint32_t)(MEM32(0x3806EA0C)); _flag_b = (uint32_t)(1); 5379 MEM32(0x3806EA0C) = MEM32(0x3806EA0C) + 1; /* 0x380083DD: inc dword ptr [0x3806ea0c] */ 5380 _flag_k = FK_INC; 5381 MEM32(ebp + (-0x4C)) = 0x3F800000u; /* 0x380083E3: mov dword ptr [ebp - 0x4c], 0x3f800000 */ 5382 MEM32(ebp + (-0x48)) = 0; /* 0x380083EA: mov dword ptr [ebp - 0x48], 0 */ 5383 MEM32(ebp + (-0x44)) = 0; /* 0x380083F1: mov dword ptr [ebp - 0x44], 0 */ 5384 MEM32(ebp + (-0x40)) = 0; /* 0x380083F8: mov dword ptr [ebp - 0x40], 0 */ 5385 MEM32(ebp + (-0x3C)) = 0; /* 0x380083FF: mov dword ptr [ebp - 0x3c], 0 */ 5386 MEM32(ebp + (-0x38)) = 0x3F800000u; /* 0x38008406: mov dword ptr [ebp - 0x38], 0x3f800000 */ 5387 MEM32(ebp + (-0x34)) = 0; /* 0x3800840D: mov dword ptr [ebp - 0x34], 0 */ 5388 MEM32(ebp + (-0x30)) = 0; /* 0x38008414: mov dword ptr [ebp - 0x30], 0 */ 5389 MEM32(ebp + (-0x2C)) = 0; /* 0x3800841B: mov dword ptr [ebp - 0x2c], 0 */ 5390 MEM32(ebp + (-0x28)) = 0; /* 0x38008422: mov dword ptr [ebp - 0x28], 0 */ 5391 MEM32(ebp + (-0x24)) = 0x3F800000u; /* 0x38008429: mov dword ptr [ebp - 0x24], 0x3f800000 */ 5392 MEM32(ebp + (-0x20)) = 0; /* 0x38008430: mov dword ptr [ebp - 0x20], 0 */ 5393 MEM32(ebp + (-0x1C)) = 0; /* 0x38008437: mov dword ptr [ebp - 0x1c], 0 */ 5394 MEM32(ebp + (-0x18)) = 0; /* 0x3800843E: mov dword ptr [ebp - 0x18], 0 */ 5395 MEM32(ebp + (-0x14)) = 0; /* 0x38008445: mov dword ptr [ebp - 0x14], 0 */ 5396 MEM32(ebp + (-0x10)) = 0x3F800000u; /* 0x3800844C: mov dword ptr [ebp - 0x10], 0x3f800000 */ 5397 ecx = MEM32(0x3806EC04); /* 0x38008453: mov ecx, dword ptr [0x3806ec04] */ 5398 eax = MEM32(ecx); /* 0x38008459: mov eax, dword ptr [ecx] */ 5399 MEM32(ebp + (-0x4)) = 0; /* 0x3800845B: mov dword ptr [ebp - 4], 0 */ 5400 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x38008462: call dword ptr [eax + 0x10] */ 5401 RECOMP_FLAGS_IN(); 5402 ecx = ebp + (-0x4C); /* 0x38008465: lea ecx, [ebp - 0x4c] */ 5403 PUSH32(esp, ecx); /* 0x38008468: push ecx */ 5404 esi = eax; /* 0x38008469: mov esi, eax */ 5405 PUSH32(esp, 0); /* 0x3800846B: push 0 */ 5406 ecx = esi; /* 0x3800846D: mov ecx, esi */ 5407 RECOMP_ICALL(0x3803DBC0u); /* 0x3800846F: call 0x3803dbc0 */ /* not lifted */ 5408 RECOMP_FLAGS_IN(); 5409 ecx = eax; /* 0x38008474: mov ecx, eax */ 5410 RECOMP_ICALL(MEM32(0x3804E158)); /* 0x38008476: call dword ptr [0x3804e158] */ 5411 RECOMP_FLAGS_IN(); 5412 ecx = MEM32(ebp + (-0x14)); /* 0x3800847C: mov ecx, dword ptr [ebp - 0x14] */ 5413 edx = MEM32(ebp + (-0x1C)); /* 0x3800847F: mov edx, dword ptr [ebp - 0x1c] */ 5414 eax = MEM32(ebp + (-0x18)); /* 0x38008482: mov eax, dword ptr [ebp - 0x18] */ 5415 MEM32(0x3806E9C0) = ecx; /* 0x38008485: mov dword ptr [0x3806e9c0], ecx */ 5416 ecx = esi; /* 0x3800848B: mov ecx, esi */ 5417 MEM32(0x3806E9B8) = edx; /* 0x3800848D: mov dword ptr [0x3806e9b8], edx */ 5418 MEM32(0x3806E9BC) = eax; /* 0x38008493: mov dword ptr [0x3806e9bc], eax */ 5419 RECOMP_ICALL(0x3803E550u); /* 0x38008498: call 0x3803e550 */ /* not lifted */ 5420 RECOMP_FLAGS_IN(); 5421 fp_push(*(float*)&MEM32(0x3806E9B8)); /* 0x3800849D: fld dword ptr [0x3806e9b8] */ 5422 ecx = MEM32(ebp + (-0xC)); /* 0x380084A3: mov ecx, dword ptr [ebp - 0xc] */ 5423 _st[0] *= _st[1]; /* 0x380084A6: fmul st(1) */ 5424 eax = 0x3806E9B8u; /* 0x380084A8: mov eax, 0x3806e9b8 */ 5425 esi = POP32_VAL(esp); /* 0x380084AD: pop esi */ 5426 { float _v = (float)fp_pop(); *(float*)ADDR(0x3806E9B8) = _v; } /* 0x380084AE: fstp dword ptr [0x3806e9b8] */ 5427 MEM32(FS_BASE + (0)) = ecx; /* 0x380084B4: mov dword ptr fs:[0], ecx */ 5428 fp_push(*(float*)&MEM32(0x3806E9BC)); /* 0x380084BB: fld dword ptr [0x3806e9bc] */ 5429 _st[0] *= _st[1]; /* 0x380084C1: fmul st(1) */ 5430 { float _v = (float)fp_pop(); *(float*)ADDR(0x3806E9BC) = _v; } /* 0x380084C3: fstp dword ptr [0x3806e9bc] */ 5431 fp_push(*(float*)&MEM32(0x3806E9C0)); /* 0x380084C9: fld dword ptr [0x3806e9c0] */ 5432 _st[0] *= _st[1]; /* 0x380084CF: fmul st(1) */ 5433 { float _v = (float)fp_pop(); *(float*)ADDR(0x3806E9C0) = _v; } /* 0x380084D1: fstp dword ptr [0x3806e9c0] */ 5434 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x380084D7: fstp st(0) */ 5435 esp = ebp; /* 0x380084D9: mov esp, ebp */ 5436 ebp = POP32_VAL(esp); /* 0x380084DB: pop ebp */ 5437 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380084DC: ret */ 5438 RECOMP_REGS_OUT(); 5439 } 5440 5441 void sub_38008445(void) { 5442 int _fpu_cmp = 0; 5443 uint32_t _cf = 0; 5444 int _df = 1; 5445 uint32_t _flag_k = FK_NONE; 5446 uint32_t _flag_a = 0, _flag_b = 0; 5447 uint32_t _itail_tgt = 0; 5448 RECOMP_REGS_LOCALS 5449 RECOMP_ENTER(0x38008445u); 5450 5451 L_38008445: 5452 MEM32(ebp + (-0x14)) = 0; /* 0x38008445: mov dword ptr [ebp - 0x14], 0 */ 5453 MEM32(ebp + (-0x10)) = 0x3F800000u; /* 0x3800844C: mov dword ptr [ebp - 0x10], 0x3f800000 */ 5454 ecx = MEM32(0x3806EC04); /* 0x38008453: mov ecx, dword ptr [0x3806ec04] */ 5455 eax = MEM32(ecx); /* 0x38008459: mov eax, dword ptr [ecx] */ 5456 MEM32(ebp + (-0x4)) = 0; /* 0x3800845B: mov dword ptr [ebp - 4], 0 */ 5457 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x38008462: call dword ptr [eax + 0x10] */ 5458 RECOMP_FLAGS_IN(); 5459 ecx = ebp + (-0x4C); /* 0x38008465: lea ecx, [ebp - 0x4c] */ 5460 PUSH32(esp, ecx); /* 0x38008468: push ecx */ 5461 esi = eax; /* 0x38008469: mov esi, eax */ 5462 PUSH32(esp, 0); /* 0x3800846B: push 0 */ 5463 ecx = esi; /* 0x3800846D: mov ecx, esi */ 5464 RECOMP_ICALL(0x3803DBC0u); /* 0x3800846F: call 0x3803dbc0 */ /* not lifted */ 5465 RECOMP_FLAGS_IN(); 5466 ecx = eax; /* 0x38008474: mov ecx, eax */ 5467 RECOMP_ICALL(MEM32(0x3804E158)); /* 0x38008476: call dword ptr [0x3804e158] */ 5468 RECOMP_FLAGS_IN(); 5469 ecx = MEM32(ebp + (-0x14)); /* 0x3800847C: mov ecx, dword ptr [ebp - 0x14] */ 5470 edx = MEM32(ebp + (-0x1C)); /* 0x3800847F: mov edx, dword ptr [ebp - 0x1c] */ 5471 eax = MEM32(ebp + (-0x18)); /* 0x38008482: mov eax, dword ptr [ebp - 0x18] */ 5472 MEM32(0x3806E9C0) = ecx; /* 0x38008485: mov dword ptr [0x3806e9c0], ecx */ 5473 ecx = esi; /* 0x3800848B: mov ecx, esi */ 5474 MEM32(0x3806E9B8) = edx; /* 0x3800848D: mov dword ptr [0x3806e9b8], edx */ 5475 MEM32(0x3806E9BC) = eax; /* 0x38008493: mov dword ptr [0x3806e9bc], eax */ 5476 RECOMP_ICALL(0x3803E550u); /* 0x38008498: call 0x3803e550 */ /* not lifted */ 5477 RECOMP_FLAGS_IN(); 5478 fp_push(*(float*)&MEM32(0x3806E9B8)); /* 0x3800849D: fld dword ptr [0x3806e9b8] */ 5479 ecx = MEM32(ebp + (-0xC)); /* 0x380084A3: mov ecx, dword ptr [ebp - 0xc] */ 5480 _st[0] *= _st[1]; /* 0x380084A6: fmul st(1) */ 5481 eax = 0x3806E9B8u; /* 0x380084A8: mov eax, 0x3806e9b8 */ 5482 esi = POP32_VAL(esp); /* 0x380084AD: pop esi */ 5483 { float _v = (float)fp_pop(); *(float*)ADDR(0x3806E9B8) = _v; } /* 0x380084AE: fstp dword ptr [0x3806e9b8] */ 5484 MEM32(FS_BASE + (0)) = ecx; /* 0x380084B4: mov dword ptr fs:[0], ecx */ 5485 fp_push(*(float*)&MEM32(0x3806E9BC)); /* 0x380084BB: fld dword ptr [0x3806e9bc] */ 5486 _st[0] *= _st[1]; /* 0x380084C1: fmul st(1) */ 5487 { float _v = (float)fp_pop(); *(float*)ADDR(0x3806E9BC) = _v; } /* 0x380084C3: fstp dword ptr [0x3806e9bc] */ 5488 fp_push(*(float*)&MEM32(0x3806E9C0)); /* 0x380084C9: fld dword ptr [0x3806e9c0] */ 5489 _st[0] *= _st[1]; /* 0x380084CF: fmul st(1) */ 5490 { float _v = (float)fp_pop(); *(float*)ADDR(0x3806E9C0) = _v; } /* 0x380084D1: fstp dword ptr [0x3806e9c0] */ 5491 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x380084D7: fstp st(0) */ 5492 esp = ebp; /* 0x380084D9: mov esp, ebp */ 5493 ebp = POP32_VAL(esp); /* 0x380084DB: pop ebp */ 5494 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380084DC: ret */ 5495 RECOMP_REGS_OUT(); 5496 } 5497 5498 void sub_380084E0(void) { 5499 int _fpu_cmp = 0; 5500 uint32_t _cf = 0; 5501 int _df = 1; 5502 uint32_t _flag_k = FK_NONE; 5503 uint32_t _flag_a = 0, _flag_b = 0; 5504 uint32_t _itail_tgt = 0; 5505 RECOMP_REGS_LOCALS 5506 RECOMP_ENTER(0x380084E0u); 5507 5508 L_380084E0: 5509 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380084E0: ret */ 5510 RECOMP_REGS_OUT(); 5511 } 5512 5513 void sub_380084F0(void) { 5514 int _fpu_cmp = 0; 5515 uint32_t _cf = 0; 5516 int _df = 1; 5517 uint32_t _flag_k = FK_NONE; 5518 uint32_t _flag_a = 0, _flag_b = 0; 5519 uint32_t _itail_tgt = 0; 5520 RECOMP_REGS_LOCALS 5521 RECOMP_ENTER(0x380084F0u); 5522 5523 L_380084F0: 5524 PUSH32(esp, ebp); /* 0x380084F0: push ebp */ 5525 ebp = esp; /* 0x380084F1: mov ebp, esp */ 5526 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x34u); 5527 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5528 esp = esp - 0x34u; /* 0x380084F3: sub esp, 0x34 */ 5529 _flag_k = FK_CMP; 5530 PUSH32(esp, edi); /* 0x380084F6: push edi */ 5531 edi = ecx; /* 0x380084F7: mov edi, ecx */ 5532 ecx = MEM32(0x3806EC04); /* 0x380084F9: mov ecx, dword ptr [0x3806ec04] */ 5533 /* test ecx, ecx */ /* 0x380084FF: test ecx, ecx */ 5534 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 5535 _cf = 0; 5536 _flag_k = FK_TEST; 5537 MEM32(ebp + (-0x10)) = 0; /* 0x38008501: mov dword ptr [ebp - 0x10], 0 */ 5538 MEM32(ebp + (-0xC)) = 0; /* 0x38008508: mov dword ptr [ebp - 0xc], 0 */ 5539 MEM32(ebp + (-0x8)) = 0; /* 0x3800850F: mov dword ptr [ebp - 8], 0 */ 5540 if (TEST_Z(_flag_a, _flag_b)) goto L_38008895; /* 0x38008516: je 0x38008895 */ 5541 L_3800851C: 5542 eax = MEM32(ecx); /* 0x3800851C: mov eax, dword ptr [ecx] */ 5543 PUSH32(esp, ebx); /* 0x3800851E: push ebx */ 5544 PUSH32(esp, esi); /* 0x3800851F: push esi */ 5545 esi = MEM32(edi + 0x60); /* 0x38008520: mov esi, dword ptr [edi + 0x60] */ 5546 MEM32(ebp + (-0x4)) = esi; /* 0x38008523: mov dword ptr [ebp - 4], esi */ 5547 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x38008526: call dword ptr [eax + 0x10] */ 5548 RECOMP_FLAGS_IN(); 5549 ebx = eax; /* 0x38008529: mov ebx, eax */ 5550 /* test ebx, ebx */ /* 0x3800852B: test ebx, ebx */ 5551 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 5552 _cf = 0; 5553 _flag_k = FK_TEST; 5554 if (TEST_Z(_flag_a, _flag_b)) goto L_38008870; /* 0x3800852D: je 0x38008870 */ 5555 L_38008533: 5556 SET_LO8(eax, MEM8(edi + 0x190)); /* 0x38008533: mov al, byte ptr [edi + 0x190] */ 5557 /* test LO8(eax), LO8(eax) */ /* 0x38008539: test al, al */ 5558 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5559 _cf = 0; 5560 _flag_k = FK_NARROW(FK_TEST, 24); 5561 if (TEST_Z(_flag_a, _flag_b)) goto L_38008699; /* 0x3800853B: je 0x38008699 */ 5562 L_38008541: 5563 eax = MEM32(ebx + 0xC8); /* 0x38008541: mov eax, dword ptr [ebx + 0xc8] */ 5564 /* test eax, eax */ /* 0x38008547: test eax, eax */ 5565 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5566 _cf = 0; 5567 _flag_k = FK_TEST; 5568 if (TEST_Z(_flag_a, _flag_b)) goto L_38008870; /* 0x38008549: je 0x38008870 */ 5569 L_3800854F: 5570 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x15Cu); 5571 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5572 esi = esi + 0x15Cu; /* 0x3800854F: add esi, 0x15c */ 5573 _flag_k = FK_ADD; 5574 ecx = esi; /* 0x38008555: mov ecx, esi */ 5575 esi = MEM32(ecx); /* 0x38008557: mov esi, dword ptr [ecx] */ 5576 ebx = MEM32(ecx + 0x4); /* 0x38008559: mov ebx, dword ptr [ecx + 4] */ 5577 edx = MEM32(ecx + 0x8); /* 0x3800855C: mov edx, dword ptr [ecx + 8] */ 5578 ecx = edi; /* 0x3800855F: mov ecx, edi */ 5579 MEM32(ebp + (-0x28)) = esi; /* 0x38008561: mov dword ptr [ebp - 0x28], esi */ 5580 MEM32(ebp + (-0x20)) = edx; /* 0x38008564: mov dword ptr [ebp - 0x20], edx */ 5581 RECOMP_ICALL(0x38008380u); /* 0x38008567: call 0x38008380 */ /* not lifted */ 5582 RECOMP_FLAGS_IN(); 5583 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3800856C: fld dword ptr [ebp - 0x28] */ 5584 edi = MEM32(eax); /* 0x3800856F: mov edi, dword ptr [eax] */ 5585 ecx = MEM32(ebp + (-0x20)); /* 0x38008571: mov ecx, dword ptr [ebp - 0x20] */ 5586 MEM32(ebp + (-0x10)) = edi; /* 0x38008574: mov dword ptr [ebp - 0x10], edi */ 5587 _st[0] -= (double)*(float*)ADDR(ebp + (-0x10)); /* 0x38008577: fsub dword ptr [ebp - 0x10] */ 5588 edx = MEM32(eax + 0x4); /* 0x3800857A: mov edx, dword ptr [eax + 4] */ 5589 MEM32(ebp + (-0x30)) = ebx; /* 0x3800857D: mov dword ptr [ebp - 0x30], ebx */ 5590 fp_push(*(float*)&MEM32(ebp + (-0x30))); /* 0x38008580: fld dword ptr [ebp - 0x30] */ 5591 MEM32(ebp + (-0xC)) = edx; /* 0x38008583: mov dword ptr [ebp - 0xc], edx */ 5592 _st[0] -= (double)*(float*)ADDR(ebp + (-0xC)); /* 0x38008586: fsub dword ptr [ebp - 0xc] */ 5593 eax = MEM32(eax + 0x8); /* 0x38008589: mov eax, dword ptr [eax + 8] */ 5594 MEM32(ebp + (-0x2C)) = ecx; /* 0x3800858C: mov dword ptr [ebp - 0x2c], ecx */ 5595 fp_push(*(float*)&MEM32(ebp + (-0x2C))); /* 0x3800858F: fld dword ptr [ebp - 0x2c] */ 5596 MEM32(ebp + (-0x8)) = eax; /* 0x38008592: mov dword ptr [ebp - 8], eax */ 5597 _st[0] -= (double)*(float*)ADDR(ebp + (-0x8)); /* 0x38008595: fsub dword ptr [ebp - 8] */ 5598 MEM32(ebp + (-0x34)) = esi; /* 0x38008598: mov dword ptr [ebp - 0x34], esi */ 5599 fp_push(_st[0]); /* 0x3800859B: fld st(0) */ 5600 _st[0] *= _st[1]; /* 0x3800859D: fmul st(1) */ 5601 fp_push(_st[2]); /* 0x3800859F: fld st(2) */ 5602 _st[0] *= _st[3]; /* 0x380085A1: fmul st(3) */ 5603 { double _v = fp_pop(); _st[0] += _v; } /* 0x380085A3: faddp st(1) */ 5604 fp_push(_st[3]); /* 0x380085A5: fld st(3) */ 5605 _st[0] *= _st[4]; /* 0x380085A7: fmul st(4) */ 5606 { double _v = fp_pop(); _st[0] += _v; } /* 0x380085A9: faddp st(1) */ 5607 { _st[3] = _st[0]; g_st_i64[3] = g_st_i64[0]; fp_pop(); } /* 0x380085AB: fstp st(3) */ 5608 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x380085AD: fstp st(0) */ 5609 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x380085AF: fstp st(0) */ 5610 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804EC0C)); /* 0x380085B1: fcom dword ptr [0x3804ec0c] */ 5611 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x380085B7: fnstsw ax */ 5612 /* test HI8(eax), 1 */ /* 0x380085B9: test ah, 1 */ 5613 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5614 _cf = 0; 5615 _flag_k = FK_NARROW(FK_TEST, 24); 5616 if (TEST_Z(_flag_a, _flag_b)) goto L_380085D5; /* 0x380085BC: je 0x380085d5 */ 5617 L_380085BE: 5618 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x380085BE: fstp st(0) */ 5619 MEM8(0x3806EA10) = (uint8_t)(0); /* 0x380085C0: mov byte ptr [0x3806ea10], 0 */ 5620 L_380085C7: 5621 MEM32(ebp + (-0x10)) = esi; /* 0x380085C7: mov dword ptr [ebp - 0x10], esi */ 5622 MEM32(ebp + (-0xC)) = ebx; /* 0x380085CA: mov dword ptr [ebp - 0xc], ebx */ 5623 MEM32(ebp + (-0x8)) = ecx; /* 0x380085CD: mov dword ptr [ebp - 8], ecx */ 5624 goto L_38008870; /* 0x380085D0: jmp 0x38008870 */ 5625 L_380085D5: 5626 SET_LO8(eax, MEM8(0x3806EA10)); /* 0x380085D5: mov al, byte ptr [0x3806ea10] */ 5627 /* test LO8(eax), LO8(eax) */ /* 0x380085DA: test al, al */ 5628 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5629 _cf = 0; 5630 _flag_k = FK_NARROW(FK_TEST, 24); 5631 if (TEST_NZ(_flag_a, _flag_b)) goto L_380085F4; /* 0x380085DC: jne 0x380085f4 */ 5632 L_380085DE: 5633 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804EC08)); /* 0x380085DE: fcomp dword ptr [0x3804ec08] */ 5634 fp_pop(); 5635 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x380085E4: fnstsw ax */ 5636 /* test HI8(eax), 0x41u */ /* 0x380085E6: test ah, 0x41 */ 5637 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 5638 _cf = 0; 5639 _flag_k = FK_NARROW(FK_TEST, 24); 5640 RECOMP_BACKEDGE(); 5641 if (TEST_NZ(_flag_a, _flag_b)) goto L_380085C7; /* 0x380085E9: jne 0x380085c7 */ 5642 L_380085EB: 5643 MEM8(0x3806EA10) = (uint8_t)(1); /* 0x380085EB: mov byte ptr [0x3806ea10], 1 */ 5644 goto L_380085FA; /* 0x380085F2: jmp 0x380085fa */ 5645 L_380085F4: 5646 /* cmp LO8(eax), 1 */ /* 0x380085F4: cmp al, 1 */ 5647 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5648 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5649 _flag_k = FK_NARROW(FK_CMP, 24); 5650 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x380085F6: fstp st(0) */ 5651 RECOMP_BACKEDGE(); 5652 if (CMP_NE(_flag_a, _flag_b)) goto L_380085C7; /* 0x380085F8: jne 0x380085c7 */ 5653 L_380085FA: 5654 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x380085FA: fld dword ptr [ebp - 0x28] */ 5655 MEM32(ebp + (-0x30)) = ebx; /* 0x380085FD: mov dword ptr [ebp - 0x30], ebx */ 5656 _st[0] *= (double)*(float*)ADDR(0x3804EC04); /* 0x38008600: fmul dword ptr [0x3804ec04] */ 5657 MEM32(ebp + (-0x2C)) = ecx; /* 0x38008606: mov dword ptr [ebp - 0x2c], ecx */ 5658 fp_push(*(float*)&MEM32(ebp + (-0x30))); /* 0x38008609: fld dword ptr [ebp - 0x30] */ 5659 ecx = MEM32(ebp + (-0x8)); /* 0x3800860C: mov ecx, dword ptr [ebp - 8] */ 5660 _st[0] *= (double)*(float*)ADDR(0x3804EC04); /* 0x3800860F: fmul dword ptr [0x3804ec04] */ 5661 MEM32(ebp + (-0x18)) = edx; /* 0x38008615: mov dword ptr [ebp - 0x18], edx */ 5662 MEM32(ebp + (-0x1C)) = edi; /* 0x38008618: mov dword ptr [ebp - 0x1c], edi */ 5663 MEM32(ebp + (-0x14)) = ecx; /* 0x3800861B: mov dword ptr [ebp - 0x14], ecx */ 5664 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x30)) = _v; } /* 0x3800861E: fstp dword ptr [ebp - 0x30] */ 5665 MEM32(ebp + (-0x34)) = esi; /* 0x38008621: mov dword ptr [ebp - 0x34], esi */ 5666 fp_push(*(float*)&MEM32(ebp + (-0x2C))); /* 0x38008624: fld dword ptr [ebp - 0x2c] */ 5667 _st[0] *= (double)*(float*)ADDR(0x3804EC04); /* 0x38008627: fmul dword ptr [0x3804ec04] */ 5668 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x2C)) = _v; } /* 0x3800862D: fstp dword ptr [ebp - 0x2c] */ 5669 fp_push(*(float*)&MEM32(ebp + (-0x10))); /* 0x38008630: fld dword ptr [ebp - 0x10] */ 5670 _st[0] *= (double)*(float*)ADDR(0x3804EC00); /* 0x38008633: fmul dword ptr [0x3804ec00] */ 5671 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x1C)) = _v; } /* 0x38008639: fstp dword ptr [ebp - 0x1c] */ 5672 edx = MEM32(ebp + (-0x1C)); /* 0x3800863C: mov edx, dword ptr [ebp - 0x1c] */ 5673 fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x3800863F: fld dword ptr [ebp - 0x18] */ 5674 MEM32(ebp + (-0x28)) = edx; /* 0x38008642: mov dword ptr [ebp - 0x28], edx */ 5675 _st[0] *= (double)*(float*)ADDR(0x3804EC00); /* 0x38008645: fmul dword ptr [0x3804ec00] */ 5676 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x18)) = _v; } /* 0x3800864B: fstp dword ptr [ebp - 0x18] */ 5677 eax = MEM32(ebp + (-0x18)); /* 0x3800864E: mov eax, dword ptr [ebp - 0x18] */ 5678 fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x38008651: fld dword ptr [ebp - 0x14] */ 5679 MEM32(ebp + (-0x24)) = eax; /* 0x38008654: mov dword ptr [ebp - 0x24], eax */ 5680 _st[0] *= (double)*(float*)ADDR(0x3804EC00); /* 0x38008657: fmul dword ptr [0x3804ec00] */ 5681 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3800865D: fstp dword ptr [ebp - 0x14] */ 5682 ecx = MEM32(ebp + (-0x14)); /* 0x38008660: mov ecx, dword ptr [ebp - 0x14] */ 5683 fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x38008663: fld dword ptr [ebp - 0x1c] */ 5684 MEM32(ebp + (-0x20)) = ecx; /* 0x38008666: mov dword ptr [ebp - 0x20], ecx */ 5685 _st[0] += _st[1]; /* 0x38008669: fadd st(1) */ 5686 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3800866B: fstp dword ptr [ebp - 0x28] */ 5687 edx = MEM32(ebp + (-0x28)); /* 0x3800866E: mov edx, dword ptr [ebp - 0x28] */ 5688 MEM32(ebp + (-0x10)) = edx; /* 0x38008671: mov dword ptr [ebp - 0x10], edx */ 5689 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x38008674: fstp st(0) */ 5690 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x38008676: fld dword ptr [ebp - 0x24] */ 5691 _st[0] += (double)*(float*)ADDR(ebp + (-0x30)); /* 0x38008679: fadd dword ptr [ebp - 0x30] */ 5692 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3800867C: fstp dword ptr [ebp - 0x24] */ 5693 eax = MEM32(ebp + (-0x24)); /* 0x3800867F: mov eax, dword ptr [ebp - 0x24] */ 5694 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x38008682: fld dword ptr [ebp - 0x20] */ 5695 MEM32(ebp + (-0xC)) = eax; /* 0x38008685: mov dword ptr [ebp - 0xc], eax */ 5696 _st[0] += (double)*(float*)ADDR(ebp + (-0x2C)); /* 0x38008688: fadd dword ptr [ebp - 0x2c] */ 5697 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3800868B: fstp dword ptr [ebp - 0x20] */ 5698 ecx = MEM32(ebp + (-0x20)); /* 0x3800868E: mov ecx, dword ptr [ebp - 0x20] */ 5699 MEM32(ebp + (-0x8)) = ecx; /* 0x38008691: mov dword ptr [ebp - 8], ecx */ 5700 goto L_38008870; /* 0x38008694: jmp 0x38008870 */ 5701 L_38008699: 5702 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x15Cu); 5703 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5704 esi = esi + 0x15Cu; /* 0x38008699: add esi, 0x15c */ 5705 _flag_k = FK_ADD; 5706 edx = esi; /* 0x3800869F: mov edx, esi */ 5707 eax = MEM32(edx); /* 0x380086A1: mov eax, dword ptr [edx] */ 5708 MEM32(ebp + (-0x10)) = eax; /* 0x380086A3: mov dword ptr [ebp - 0x10], eax */ 5709 ecx = MEM32(edx + 0x4); /* 0x380086A6: mov ecx, dword ptr [edx + 4] */ 5710 MEM32(ebp + (-0xC)) = ecx; /* 0x380086A9: mov dword ptr [ebp - 0xc], ecx */ 5711 edx = MEM32(edx + 0x8); /* 0x380086AC: mov edx, dword ptr [edx + 8] */ 5712 ecx = edi; /* 0x380086AF: mov ecx, edi */ 5713 MEM32(ebp + (-0x8)) = edx; /* 0x380086B1: mov dword ptr [ebp - 8], edx */ 5714 RECOMP_ICALL(0x380082C0u); /* 0x380086B4: call 0x380082c0 */ /* not lifted */ 5715 RECOMP_FLAGS_IN(); 5716 /* test LO8(eax), LO8(eax) */ /* 0x380086B9: test al, al */ 5717 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5718 _cf = 0; 5719 _flag_k = FK_NARROW(FK_TEST, 24); 5720 eax = MEM32(ebx + 0xC8); /* 0x380086BB: mov eax, dword ptr [ebx + 0xc8] */ 5721 if (TEST_Z(_flag_a, _flag_b)) goto L_3800879E; /* 0x380086C1: je 0x3800879e */ 5722 L_380086C7: 5723 /* test eax, eax */ /* 0x380086C7: test eax, eax */ 5724 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5725 _cf = 0; 5726 _flag_k = FK_TEST; 5727 if (TEST_Z(_flag_a, _flag_b)) goto L_38008870; /* 0x380086C9: je 0x38008870 */ 5728 L_380086CF: 5729 ebx = MEM32(esi); /* 0x380086CF: mov ebx, dword ptr [esi] */ 5730 eax = MEM32(esi + 0x4); /* 0x380086D1: mov eax, dword ptr [esi + 4] */ 5731 esi = MEM32(esi + 0x8); /* 0x380086D4: mov esi, dword ptr [esi + 8] */ 5732 ecx = edi; /* 0x380086D7: mov ecx, edi */ 5733 MEM32(ebp + (-0x28)) = ebx; /* 0x380086D9: mov dword ptr [ebp - 0x28], ebx */ 5734 MEM32(ebp + (-0x24)) = eax; /* 0x380086DC: mov dword ptr [ebp - 0x24], eax */ 5735 RECOMP_ICALL(0x38008380u); /* 0x380086DF: call 0x38008380 */ /* not lifted */ 5736 RECOMP_FLAGS_IN(); 5737 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x380086E4: fld dword ptr [ebp - 0x28] */ 5738 _st[0] *= (double)*(float*)ADDR(0x3804EBFC); /* 0x380086E7: fmul dword ptr [0x3804ebfc] */ 5739 ecx = eax; /* 0x380086ED: mov ecx, eax */ 5740 edx = MEM32(ecx); /* 0x380086EF: mov edx, dword ptr [ecx] */ 5741 MEM32(ebp + (-0x10)) = edx; /* 0x380086F1: mov dword ptr [ebp - 0x10], edx */ 5742 edx = MEM32(ecx + 0x4); /* 0x380086F4: mov edx, dword ptr [ecx + 4] */ 5743 MEM32(ebp + (-0xC)) = edx; /* 0x380086F7: mov dword ptr [ebp - 0xc], edx */ 5744 edx = MEM32(ebp + (-0x24)); /* 0x380086FA: mov edx, dword ptr [ebp - 0x24] */ 5745 ecx = MEM32(ecx + 0x8); /* 0x380086FD: mov ecx, dword ptr [ecx + 8] */ 5746 MEM32(ebp + (-0x30)) = edx; /* 0x38008700: mov dword ptr [ebp - 0x30], edx */ 5747 fp_push(*(float*)&MEM32(ebp + (-0x30))); /* 0x38008703: fld dword ptr [ebp - 0x30] */ 5748 _st[0] *= (double)*(float*)ADDR(0x3804EBFC); /* 0x38008706: fmul dword ptr [0x3804ebfc] */ 5749 MEM32(ebp + (-0x8)) = ecx; /* 0x3800870C: mov dword ptr [ebp - 8], ecx */ 5750 ecx = MEM32(eax); /* 0x3800870F: mov ecx, dword ptr [eax] */ 5751 edx = MEM32(eax + 0x4); /* 0x38008711: mov edx, dword ptr [eax + 4] */ 5752 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x30)) = _v; } /* 0x38008714: fstp dword ptr [ebp - 0x30] */ 5753 eax = MEM32(eax + 0x8); /* 0x38008717: mov eax, dword ptr [eax + 8] */ 5754 MEM32(ebp + (-0x2C)) = esi; /* 0x3800871A: mov dword ptr [ebp - 0x2c], esi */ 5755 fp_push(*(float*)&MEM32(ebp + (-0x2C))); /* 0x3800871D: fld dword ptr [ebp - 0x2c] */ 5756 _st[0] *= (double)*(float*)ADDR(0x3804EBFC); /* 0x38008720: fmul dword ptr [0x3804ebfc] */ 5757 MEM32(ebp + (-0x1C)) = ecx; /* 0x38008726: mov dword ptr [ebp - 0x1c], ecx */ 5758 MEM32(ebp + (-0x18)) = edx; /* 0x38008729: mov dword ptr [ebp - 0x18], edx */ 5759 MEM32(ebp + (-0x14)) = eax; /* 0x3800872C: mov dword ptr [ebp - 0x14], eax */ 5760 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x2C)) = _v; } /* 0x3800872F: fstp dword ptr [ebp - 0x2c] */ 5761 MEM32(ebp + (-0x34)) = ebx; /* 0x38008732: mov dword ptr [ebp - 0x34], ebx */ 5762 fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x38008735: fld dword ptr [ebp - 0x1c] */ 5763 _st[0] *= (double)*(float*)ADDR(0x3804EBF8); /* 0x38008738: fmul dword ptr [0x3804ebf8] */ 5764 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x1C)) = _v; } /* 0x3800873E: fstp dword ptr [ebp - 0x1c] */ 5765 ecx = MEM32(ebp + (-0x1C)); /* 0x38008741: mov ecx, dword ptr [ebp - 0x1c] */ 5766 fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x38008744: fld dword ptr [ebp - 0x18] */ 5767 MEM32(ebp + (-0x28)) = ecx; /* 0x38008747: mov dword ptr [ebp - 0x28], ecx */ 5768 _st[0] *= (double)*(float*)ADDR(0x3804EBF8); /* 0x3800874A: fmul dword ptr [0x3804ebf8] */ 5769 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x18)) = _v; } /* 0x38008750: fstp dword ptr [ebp - 0x18] */ 5770 edx = MEM32(ebp + (-0x18)); /* 0x38008753: mov edx, dword ptr [ebp - 0x18] */ 5771 fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x38008756: fld dword ptr [ebp - 0x14] */ 5772 MEM32(ebp + (-0x24)) = edx; /* 0x38008759: mov dword ptr [ebp - 0x24], edx */ 5773 _st[0] *= (double)*(float*)ADDR(0x3804EBF8); /* 0x3800875C: fmul dword ptr [0x3804ebf8] */ 5774 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x38008762: fstp dword ptr [ebp - 0x14] */ 5775 eax = MEM32(ebp + (-0x14)); /* 0x38008765: mov eax, dword ptr [ebp - 0x14] */ 5776 fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x38008768: fld dword ptr [ebp - 0x1c] */ 5777 MEM32(ebp + (-0x20)) = eax; /* 0x3800876B: mov dword ptr [ebp - 0x20], eax */ 5778 _st[0] += _st[1]; /* 0x3800876E: fadd st(1) */ 5779 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x38008770: fstp dword ptr [ebp - 0x28] */ 5780 ecx = MEM32(ebp + (-0x28)); /* 0x38008773: mov ecx, dword ptr [ebp - 0x28] */ 5781 MEM32(ebp + (-0x10)) = ecx; /* 0x38008776: mov dword ptr [ebp - 0x10], ecx */ 5782 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x38008779: fstp st(0) */ 5783 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3800877B: fld dword ptr [ebp - 0x24] */ 5784 _st[0] += (double)*(float*)ADDR(ebp + (-0x30)); /* 0x3800877E: fadd dword ptr [ebp - 0x30] */ 5785 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x38008781: fstp dword ptr [ebp - 0x24] */ 5786 edx = MEM32(ebp + (-0x24)); /* 0x38008784: mov edx, dword ptr [ebp - 0x24] */ 5787 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x38008787: fld dword ptr [ebp - 0x20] */ 5788 MEM32(ebp + (-0xC)) = edx; /* 0x3800878A: mov dword ptr [ebp - 0xc], edx */ 5789 _st[0] += (double)*(float*)ADDR(ebp + (-0x2C)); /* 0x3800878D: fadd dword ptr [ebp - 0x2c] */ 5790 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x38008790: fstp dword ptr [ebp - 0x20] */ 5791 eax = MEM32(ebp + (-0x20)); /* 0x38008793: mov eax, dword ptr [ebp - 0x20] */ 5792 MEM32(ebp + (-0x8)) = eax; /* 0x38008796: mov dword ptr [ebp - 8], eax */ 5793 goto L_38008870; /* 0x38008799: jmp 0x38008870 */ 5794 L_3800879E: 5795 /* test eax, eax */ /* 0x3800879E: test eax, eax */ 5796 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5797 _cf = 0; 5798 _flag_k = FK_TEST; 5799 if (TEST_Z(_flag_a, _flag_b)) goto L_38008870; /* 0x380087A0: je 0x38008870 */ 5800 L_380087A6: 5801 ecx = MEM32(esi + 0x4); /* 0x380087A6: mov ecx, dword ptr [esi + 4] */ 5802 ebx = MEM32(esi); /* 0x380087A9: mov ebx, dword ptr [esi] */ 5803 esi = MEM32(esi + 0x8); /* 0x380087AB: mov esi, dword ptr [esi + 8] */ 5804 MEM32(ebp + (-0x24)) = ecx; /* 0x380087AE: mov dword ptr [ebp - 0x24], ecx */ 5805 ecx = edi; /* 0x380087B1: mov ecx, edi */ 5806 MEM32(ebp + (-0x28)) = ebx; /* 0x380087B3: mov dword ptr [ebp - 0x28], ebx */ 5807 RECOMP_ICALL(0x38008380u); /* 0x380087B6: call 0x38008380 */ /* not lifted */ 5808 RECOMP_FLAGS_IN(); 5809 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x380087BB: fld dword ptr [ebp - 0x28] */ 5810 _st[0] *= (double)*(float*)ADDR(0x3804EBF4); /* 0x380087BE: fmul dword ptr [0x3804ebf4] */ 5811 edx = eax; /* 0x380087C4: mov edx, eax */ 5812 eax = MEM32(edx); /* 0x380087C6: mov eax, dword ptr [edx] */ 5813 MEM32(ebp + (-0x10)) = eax; /* 0x380087C8: mov dword ptr [ebp - 0x10], eax */ 5814 eax = MEM32(edx + 0x4); /* 0x380087CB: mov eax, dword ptr [edx + 4] */ 5815 MEM32(ebp + (-0xC)) = eax; /* 0x380087CE: mov dword ptr [ebp - 0xc], eax */ 5816 ecx = MEM32(edx + 0x8); /* 0x380087D1: mov ecx, dword ptr [edx + 8] */ 5817 edx = MEM32(ebp + (-0x24)); /* 0x380087D4: mov edx, dword ptr [ebp - 0x24] */ 5818 MEM32(ebp + (-0x30)) = edx; /* 0x380087D7: mov dword ptr [ebp - 0x30], edx */ 5819 fp_push(*(float*)&MEM32(ebp + (-0x30))); /* 0x380087DA: fld dword ptr [ebp - 0x30] */ 5820 _st[0] *= (double)*(float*)ADDR(0x3804EBF4); /* 0x380087DD: fmul dword ptr [0x3804ebf4] */ 5821 MEM32(ebp + (-0x2C)) = esi; /* 0x380087E3: mov dword ptr [ebp - 0x2c], esi */ 5822 MEM32(ebp + (-0x24)) = eax; /* 0x380087E6: mov dword ptr [ebp - 0x24], eax */ 5823 MEM32(ebp + (-0x8)) = ecx; /* 0x380087E9: mov dword ptr [ebp - 8], ecx */ 5824 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x30)) = _v; } /* 0x380087EC: fstp dword ptr [ebp - 0x30] */ 5825 MEM32(ebp + (-0x8)) = 0; /* 0x380087EF: mov dword ptr [ebp - 8], 0 */ 5826 fp_push(*(float*)&MEM32(ebp + (-0x2C))); /* 0x380087F6: fld dword ptr [ebp - 0x2c] */ 5827 edx = MEM32(ebp + (-0x8)); /* 0x380087F9: mov edx, dword ptr [ebp - 8] */ 5828 _st[0] *= (double)*(float*)ADDR(0x3804EBF4); /* 0x380087FC: fmul dword ptr [0x3804ebf4] */ 5829 MEM32(ebp + (-0x20)) = edx; /* 0x38008802: mov dword ptr [ebp - 0x20], edx */ 5830 MEM32(ebp + (-0x10)) = 0; /* 0x38008805: mov dword ptr [ebp - 0x10], 0 */ 5831 ecx = MEM32(ebp + (-0x10)); /* 0x3800880C: mov ecx, dword ptr [ebp - 0x10] */ 5832 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x2C)) = _v; } /* 0x3800880F: fstp dword ptr [ebp - 0x2c] */ 5833 MEM32(ebp + (-0x28)) = ecx; /* 0x38008812: mov dword ptr [ebp - 0x28], ecx */ 5834 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x38008815: fld dword ptr [ebp - 0x24] */ 5835 MEM32(ebp + (-0x28)) = 0; /* 0x38008818: mov dword ptr [ebp - 0x28], 0 */ 5836 _st[0] *= (double)*(float*)ADDR(0x3804EBF0); /* 0x3800881F: fmul dword ptr [0x3804ebf0] */ 5837 eax = MEM32(ebp + (-0x28)); /* 0x38008825: mov eax, dword ptr [ebp - 0x28] */ 5838 MEM32(ebp + (-0x1C)) = eax; /* 0x38008828: mov dword ptr [ebp - 0x1c], eax */ 5839 MEM32(ebp + (-0x34)) = ebx; /* 0x3800882B: mov dword ptr [ebp - 0x34], ebx */ 5840 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3800882E: fstp dword ptr [ebp - 0x24] */ 5841 ecx = MEM32(ebp + (-0x24)); /* 0x38008831: mov ecx, dword ptr [ebp - 0x24] */ 5842 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x38008834: fld dword ptr [ebp - 0x20] */ 5843 MEM32(ebp + (-0x18)) = ecx; /* 0x38008837: mov dword ptr [ebp - 0x18], ecx */ 5844 _st[0] *= (double)*(float*)ADDR(0x3804EBF0); /* 0x3800883A: fmul dword ptr [0x3804ebf0] */ 5845 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x38008840: fstp dword ptr [ebp - 0x20] */ 5846 edx = MEM32(ebp + (-0x20)); /* 0x38008843: mov edx, dword ptr [ebp - 0x20] */ 5847 MEM32(ebp + (-0x14)) = edx; /* 0x38008846: mov dword ptr [ebp - 0x14], edx */ 5848 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x1C)) = _v; } /* 0x38008849: fstp dword ptr [ebp - 0x1c] */ 5849 eax = MEM32(ebp + (-0x1C)); /* 0x3800884C: mov eax, dword ptr [ebp - 0x1c] */ 5850 fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x3800884F: fld dword ptr [ebp - 0x18] */ 5851 MEM32(ebp + (-0x10)) = eax; /* 0x38008852: mov dword ptr [ebp - 0x10], eax */ 5852 _st[0] += (double)*(float*)ADDR(ebp + (-0x30)); /* 0x38008855: fadd dword ptr [ebp - 0x30] */ 5853 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x18)) = _v; } /* 0x38008858: fstp dword ptr [ebp - 0x18] */ 5854 ecx = MEM32(ebp + (-0x18)); /* 0x3800885B: mov ecx, dword ptr [ebp - 0x18] */ 5855 fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x3800885E: fld dword ptr [ebp - 0x14] */ 5856 MEM32(ebp + (-0xC)) = ecx; /* 0x38008861: mov dword ptr [ebp - 0xc], ecx */ 5857 _st[0] += (double)*(float*)ADDR(ebp + (-0x2C)); /* 0x38008864: fadd dword ptr [ebp - 0x2c] */ 5858 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x38008867: fstp dword ptr [ebp - 0x14] */ 5859 edx = MEM32(ebp + (-0x14)); /* 0x3800886A: mov edx, dword ptr [ebp - 0x14] */ 5860 MEM32(ebp + (-0x8)) = edx; /* 0x3800886D: mov dword ptr [ebp - 8], edx */ 5861 L_38008870: 5862 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x38008870: fld dword ptr [ebp - 0xc] */ 5863 esi = POP32_VAL(esp); /* 0x38008873: pop esi */ 5864 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804EBC0)); /* 0x38008874: fcomp dword ptr [0x3804ebc0] */ 5865 fp_pop(); 5866 ebx = POP32_VAL(esp); /* 0x3800887A: pop ebx */ 5867 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3800887B: fnstsw ax */ 5868 /* test HI8(eax), 1 */ /* 0x3800887D: test ah, 1 */ 5869 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5870 _cf = 0; 5871 _flag_k = FK_NARROW(FK_TEST, 24); 5872 if (TEST_Z(_flag_a, _flag_b)) goto L_38008889; /* 0x38008880: je 0x38008889 */ 5873 L_38008882: 5874 MEM32(ebp + (-0xC)) = 0x3E99999Au; /* 0x38008882: mov dword ptr [ebp - 0xc], 0x3e99999a */ 5875 L_38008889: 5876 ecx = MEM32(ebp + (-0x4)); /* 0x38008889: mov ecx, dword ptr [ebp - 4] */ 5877 eax = MEM32(ecx); /* 0x3800888C: mov eax, dword ptr [ecx] */ 5878 edx = ebp + (-0x10); /* 0x3800888E: lea edx, [ebp - 0x10] */ 5879 PUSH32(esp, edx); /* 0x38008891: push edx */ 5880 RECOMP_ICALL(MEM32(eax + 0x7C)); /* 0x38008892: call dword ptr [eax + 0x7c] */ 5881 RECOMP_FLAGS_IN(); 5882 L_38008895: 5883 edi = POP32_VAL(esp); /* 0x38008895: pop edi */ 5884 esp = ebp; /* 0x38008896: mov esp, ebp */ 5885 ebp = POP32_VAL(esp); /* 0x38008898: pop ebp */ 5886 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38008899: ret */ 5887 RECOMP_REGS_OUT(); 5888 } 5889 5890 void sub_38008870(void) { 5891 int _fpu_cmp = 0; 5892 uint32_t _cf = 0; 5893 int _df = 1; 5894 uint32_t _flag_k = FK_NONE; 5895 uint32_t _flag_a = 0, _flag_b = 0; 5896 uint32_t _itail_tgt = 0; 5897 RECOMP_REGS_LOCALS 5898 RECOMP_ENTER(0x38008870u); 5899 5900 L_38008870: 5901 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x38008870: fld dword ptr [ebp - 0xc] */ 5902 esi = POP32_VAL(esp); /* 0x38008873: pop esi */ 5903 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804EBC0)); /* 0x38008874: fcomp dword ptr [0x3804ebc0] */ 5904 fp_pop(); 5905 ebx = POP32_VAL(esp); /* 0x3800887A: pop ebx */ 5906 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3800887B: fnstsw ax */ 5907 /* test HI8(eax), 1 */ /* 0x3800887D: test ah, 1 */ 5908 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5909 _cf = 0; 5910 _flag_k = FK_NARROW(FK_TEST, 24); 5911 if (TEST_Z(_flag_a, _flag_b)) goto L_38008889; /* 0x38008880: je 0x38008889 */ 5912 L_38008882: 5913 MEM32(ebp + (-0xC)) = 0x3E99999Au; /* 0x38008882: mov dword ptr [ebp - 0xc], 0x3e99999a */ 5914 L_38008889: 5915 ecx = MEM32(ebp + (-0x4)); /* 0x38008889: mov ecx, dword ptr [ebp - 4] */ 5916 eax = MEM32(ecx); /* 0x3800888C: mov eax, dword ptr [ecx] */ 5917 edx = ebp + (-0x10); /* 0x3800888E: lea edx, [ebp - 0x10] */ 5918 PUSH32(esp, edx); /* 0x38008891: push edx */ 5919 RECOMP_ICALL(MEM32(eax + 0x7C)); /* 0x38008892: call dword ptr [eax + 0x7c] */ 5920 RECOMP_FLAGS_IN(); 5921 edi = POP32_VAL(esp); /* 0x38008895: pop edi */ 5922 esp = ebp; /* 0x38008896: mov esp, ebp */ 5923 ebp = POP32_VAL(esp); /* 0x38008898: pop ebp */ 5924 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38008899: ret */ 5925 RECOMP_REGS_OUT(); 5926 } 5927 5928 void sub_380088A0(void) { 5929 int _fpu_cmp = 0; 5930 uint32_t _cf = 0; 5931 int _df = 1; 5932 uint32_t _flag_k = FK_NONE; 5933 uint32_t _flag_a = 0, _flag_b = 0; 5934 uint32_t _itail_tgt = 0; 5935 RECOMP_REGS_LOCALS 5936 RECOMP_ENTER(0x380088A0u); 5937 5938 L_380088A0: 5939 PUSH32(esp, ebp); /* 0x380088A0: push ebp */ 5940 ebp = esp; /* 0x380088A1: mov ebp, esp */ 5941 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 5942 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5943 esp = esp - 0xCu; /* 0x380088A3: sub esp, 0xc */ 5944 _flag_k = FK_CMP; 5945 PUSH32(esp, esi); /* 0x380088A6: push esi */ 5946 PUSH32(esp, edi); /* 0x380088A7: push edi */ 5947 edi = ecx; /* 0x380088A8: mov edi, ecx */ 5948 RECOMP_ICALL(0x380082B0u); /* 0x380088AA: call 0x380082b0 */ /* not lifted */ 5949 RECOMP_FLAGS_IN(); 5950 /* test LO8(eax), LO8(eax) */ /* 0x380088AF: test al, al */ 5951 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5952 _cf = 0; 5953 _flag_k = FK_NARROW(FK_TEST, 24); 5954 if (TEST_Z(_flag_a, _flag_b)) goto L_38008923; /* 0x380088B1: je 0x38008923 */ 5955 L_380088B3: 5956 esi = MEM32(edi + 0x60); /* 0x380088B3: mov esi, dword ptr [edi + 0x60] */ 5957 /* test esi, esi */ /* 0x380088B6: test esi, esi */ 5958 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 5959 _cf = 0; 5960 _flag_k = FK_TEST; 5961 if (TEST_Z(_flag_a, _flag_b)) goto L_38008923; /* 0x380088B8: je 0x38008923 */ 5962 L_380088BA: 5963 ecx = edi; /* 0x380088BA: mov ecx, edi */ 5964 RECOMP_ICALL(0x38008D10u); /* 0x380088BC: call 0x38008d10 */ /* not lifted */ 5965 RECOMP_FLAGS_IN(); 5966 PUSH32(esp, 0); /* 0x380088C1: push 0 */ 5967 PUSH32(esp, 0x3F800000u); /* 0x380088C3: push 0x3f800000 */ 5968 ecx = edi; /* 0x380088C8: mov ecx, edi */ 5969 RECOMP_ICALL(0x38008C90u); /* 0x380088CA: call 0x38008c90 */ /* not lifted */ 5970 RECOMP_FLAGS_IN(); 5971 /* test LO8(eax), LO8(eax) */ /* 0x380088CF: test al, al */ 5972 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5973 _cf = 0; 5974 _flag_k = FK_NARROW(FK_TEST, 24); 5975 if (TEST_Z(_flag_a, _flag_b)) goto L_380088F6; /* 0x380088D1: je 0x380088f6 */ 5976 L_380088D3: 5977 eax = MEM32(esi); /* 0x380088D3: mov eax, dword ptr [esi] */ 5978 ecx = ebp + (-0xC); /* 0x380088D5: lea ecx, [ebp - 0xc] */ 5979 PUSH32(esp, ecx); /* 0x380088D8: push ecx */ 5980 ecx = esi; /* 0x380088D9: mov ecx, esi */ 5981 MEM32(ebp + (-0xC)) = 0; /* 0x380088DB: mov dword ptr [ebp - 0xc], 0 */ 5982 MEM32(ebp + (-0x8)) = 0; /* 0x380088E2: mov dword ptr [ebp - 8], 0 */ 5983 MEM32(ebp + (-0x4)) = 0; /* 0x380088E9: mov dword ptr [ebp - 4], 0 */ 5984 RECOMP_ICALL(MEM32(eax + 0x80)); /* 0x380088F0: call dword ptr [eax + 0x80] */ 5985 RECOMP_FLAGS_IN(); 5986 L_380088F6: 5987 edx = MEM32(esi); /* 0x380088F6: mov edx, dword ptr [esi] */ 5988 eax = ebp + (-0xC); /* 0x380088F8: lea eax, [ebp - 0xc] */ 5989 PUSH32(esp, eax); /* 0x380088FB: push eax */ 5990 ecx = esi; /* 0x380088FC: mov ecx, esi */ 5991 MEM32(ebp + (-0xC)) = 0; /* 0x380088FE: mov dword ptr [ebp - 0xc], 0 */ 5992 MEM32(ebp + (-0x8)) = 0; /* 0x38008905: mov dword ptr [ebp - 8], 0 */ 5993 MEM32(ebp + (-0x4)) = 0; /* 0x3800890C: mov dword ptr [ebp - 4], 0 */ 5994 RECOMP_ICALL(MEM32(edx + 0x80)); /* 0x38008913: call dword ptr [edx + 0x80] */ 5995 RECOMP_FLAGS_IN(); 5996 MEM32(edi + 0xE4) = 0; /* 0x38008919: mov dword ptr [edi + 0xe4], 0 */ 5997 L_38008923: 5998 edi = POP32_VAL(esp); /* 0x38008923: pop edi */ 5999 esi = POP32_VAL(esp); /* 0x38008924: pop esi */ 6000 esp = ebp; /* 0x38008925: mov esp, ebp */ 6001 ebp = POP32_VAL(esp); /* 0x38008927: pop ebp */ 6002 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38008928: ret */ 6003 RECOMP_REGS_OUT(); 6004 } 6005 6006 void sub_38008930(void) { 6007 int _fpu_cmp = 0; 6008 uint32_t _cf = 0; 6009 int _df = 1; 6010 uint32_t _flag_k = FK_NONE; 6011 uint32_t _flag_a = 0, _flag_b = 0; 6012 uint32_t _itail_tgt = 0; 6013 RECOMP_REGS_LOCALS 6014 RECOMP_ENTER(0x38008930u); 6015 6016 L_38008930: 6017 PUSH32(esp, ebp); /* 0x38008930: push ebp */ 6018 ebp = esp; /* 0x38008931: mov ebp, esp */ 6019 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x70u); 6020 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6021 esp = esp - 0x70u; /* 0x38008933: sub esp, 0x70 */ 6022 _flag_k = FK_CMP; 6023 PUSH32(esp, esi); /* 0x38008936: push esi */ 6024 PUSH32(esp, edi); /* 0x38008937: push edi */ 6025 esi = ecx; /* 0x38008938: mov esi, ecx */ 6026 RECOMP_ICALL(0x380082B0u); /* 0x3800893A: call 0x380082b0 */ /* not lifted */ 6027 RECOMP_FLAGS_IN(); 6028 /* test LO8(eax), LO8(eax) */ /* 0x3800893F: test al, al */ 6029 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 6030 _cf = 0; 6031 _flag_k = FK_NARROW(FK_TEST, 24); 6032 if (TEST_Z(_flag_a, _flag_b)) goto L_38008B58; /* 0x38008941: je 0x38008b58 */ 6033 L_38008947: 6034 edi = MEM32(esi + 0x60); /* 0x38008947: mov edi, dword ptr [esi + 0x60] */ 6035 /* test edi, edi */ /* 0x3800894A: test edi, edi */ 6036 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 6037 _cf = 0; 6038 _flag_k = FK_TEST; 6039 if (TEST_Z(_flag_a, _flag_b)) goto L_38008B6E; /* 0x3800894C: je 0x38008b6e */ 6040 L_38008952: 6041 PUSH32(esp, 0); /* 0x38008952: push 0 */ 6042 PUSH32(esp, 0x3806B660u); /* 0x38008954: push 0x3806b660 */ 6043 PUSH32(esp, 0x3806B5C0u); /* 0x38008959: push 0x3806b5c0 */ 6044 PUSH32(esp, 0); /* 0x3800895E: push 0 */ 6045 PUSH32(esp, edi); /* 0x38008960: push edi */ 6046 RECOMP_ICALL(0x3804B682u); /* 0x38008961: call 0x3804b682 */ /* not lifted */ 6047 RECOMP_FLAGS_IN(); 6048 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 6049 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6050 esp = esp + 0x14u; /* 0x38008966: add esp, 0x14 */ 6051 _flag_k = FK_ADD; 6052 /* test eax, eax */ /* 0x38008969: test eax, eax */ 6053 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6054 _cf = 0; 6055 _flag_k = FK_TEST; 6056 if (TEST_Z(_flag_a, _flag_b)) goto L_38008B25; /* 0x3800896B: je 0x38008b25 */ 6057 L_38008971: 6058 ecx = MEM32(0x3806EC04); /* 0x38008971: mov ecx, dword ptr [0x3806ec04] */ 6059 eax = MEM32(ecx); /* 0x38008977: mov eax, dword ptr [ecx] */ 6060 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x38008979: call dword ptr [eax + 0x10] */ 6061 RECOMP_FLAGS_IN(); 6062 ecx = eax; /* 0x3800897C: mov ecx, eax */ 6063 RECOMP_ICALL(0x38017F50u); /* 0x3800897E: call 0x38017f50 */ /* not lifted */ 6064 RECOMP_FLAGS_IN(); 6065 ecx = esi + 0x138; /* 0x38008983: lea ecx, [esi + 0x138] */ 6066 edx = MEM32(ecx); /* 0x38008989: mov edx, dword ptr [ecx] */ 6067 MEM32(ebp + (-0xC)) = edx; /* 0x3800898B: mov dword ptr [ebp - 0xc], edx */ 6068 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x3800898E: fld dword ptr [ebp - 0xc] */ 6069 _st[0] -= (double)*(float*)ADDR(eax); /* 0x38008991: fsub dword ptr [eax] */ 6070 edx = MEM32(ecx + 0x4); /* 0x38008993: mov edx, dword ptr [ecx + 4] */ 6071 ecx = MEM32(ecx + 0x8); /* 0x38008996: mov ecx, dword ptr [ecx + 8] */ 6072 MEM32(ebp + (-0x8)) = edx; /* 0x38008999: mov dword ptr [ebp - 8], edx */ 6073 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x3800899C: fld dword ptr [ebp - 8] */ 6074 _st[0] -= (double)*(float*)ADDR(eax + 0x4); /* 0x3800899F: fsub dword ptr [eax + 4] */ 6075 MEM32(ebp + (-0x4)) = ecx; /* 0x380089A2: mov dword ptr [ebp - 4], ecx */ 6076 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x380089A5: fld dword ptr [ebp - 4] */ 6077 ecx = MEM32(0x3806EC04); /* 0x380089A8: mov ecx, dword ptr [0x3806ec04] */ 6078 _st[0] -= (double)*(float*)ADDR(eax + 0x8); /* 0x380089AE: fsub dword ptr [eax + 8] */ 6079 eax = MEM32(ecx); /* 0x380089B1: mov eax, dword ptr [ecx] */ 6080 edx = ebp + (-0x70); /* 0x380089B3: lea edx, [ebp - 0x70] */ 6081 PUSH32(esp, edx); /* 0x380089B6: push edx */ 6082 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x380089B7: fstp dword ptr [ebp - 4] */ 6083 MEM32(ebp + (-0x24)) = 0; /* 0x380089BA: mov dword ptr [ebp - 0x24], 0 */ 6084 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x380089C1: fstp dword ptr [ebp - 0x20] */ 6085 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x380089C4: fld dword ptr [ebp - 4] */ 6086 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x380089C7: fmul dword ptr [ebp - 4] */ 6087 fp_push(_st[1]); /* 0x380089CA: fld st(1) */ 6088 _st[0] *= _st[2]; /* 0x380089CC: fmul st(2) */ 6089 { double _v = fp_pop(); _st[0] += _v; } /* 0x380089CE: faddp st(1) */ 6090 _st[0] = sqrt(_st[0]); /* 0x380089D0: fsqrt */ 6091 { _st[1] = _st[0]; g_st_i64[1] = g_st_i64[0]; fp_pop(); } /* 0x380089D2: fstp st(1) */ 6092 _st[0] = -_st[0]; /* 0x380089D4: fchs */ 6093 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x1C)) = _v; } /* 0x380089D6: fstp dword ptr [ebp - 0x1c] */ 6094 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x380089D9: call dword ptr [eax + 0x10] */ 6095 RECOMP_FLAGS_IN(); 6096 ecx = eax; /* 0x380089DC: mov ecx, eax */ 6097 RECOMP_ICALL(0x38017FB0u); /* 0x380089DE: call 0x38017fb0 */ /* not lifted */ 6098 RECOMP_FLAGS_IN(); 6099 ecx = MEM32(ebp + (-0x24)); /* 0x380089E3: mov ecx, dword ptr [ebp - 0x24] */ 6100 edx = MEM32(ebp + (-0x20)); /* 0x380089E6: mov edx, dword ptr [ebp - 0x20] */ 6101 MEM32(ebp + (-0x18)) = ecx; /* 0x380089E9: mov dword ptr [ebp - 0x18], ecx */ 6102 ecx = ebp + (-0x18); /* 0x380089EC: lea ecx, [ebp - 0x18] */ 6103 edi = eax; /* 0x380089EF: mov edi, eax */ 6104 eax = MEM32(ebp + (-0x1C)); /* 0x380089F1: mov eax, dword ptr [ebp - 0x1c] */ 6105 MEM32(ebp + (-0x14)) = edx; /* 0x380089F4: mov dword ptr [ebp - 0x14], edx */ 6106 PUSH32(esp, ecx); /* 0x380089F7: push ecx */ 6107 edx = ebp + (-0x54); /* 0x380089F8: lea edx, [ebp - 0x54] */ 6108 PUSH32(esp, edx); /* 0x380089FB: push edx */ 6109 ecx = edi; /* 0x380089FC: mov ecx, edi */ 6110 MEM32(ebp + (-0x10)) = eax; /* 0x380089FE: mov dword ptr [ebp - 0x10], eax */ 6111 RECOMP_ICALL(MEM32(0x3804E4FC)); /* 0x38008A01: call dword ptr [0x3804e4fc] */ 6112 RECOMP_FLAGS_IN(); 6113 ecx = MEM32(eax); /* 0x38008A07: mov ecx, dword ptr [eax] */ 6114 MEM32(ebp + (-0x24)) = ecx; /* 0x38008A09: mov dword ptr [ebp - 0x24], ecx */ 6115 edx = MEM32(eax + 0x4); /* 0x38008A0C: mov edx, dword ptr [eax + 4] */ 6116 MEM32(ebp + (-0x20)) = edx; /* 0x38008A0F: mov dword ptr [ebp - 0x20], edx */ 6117 eax = MEM32(eax + 0x8); /* 0x38008A12: mov eax, dword ptr [eax + 8] */ 6118 ecx = ebp + (-0x24); /* 0x38008A15: lea ecx, [ebp - 0x24] */ 6119 PUSH32(esp, ecx); /* 0x38008A18: push ecx */ 6120 edx = ebp + (-0x60); /* 0x38008A19: lea edx, [ebp - 0x60] */ 6121 PUSH32(esp, edx); /* 0x38008A1C: push edx */ 6122 ecx = edi; /* 0x38008A1D: mov ecx, edi */ 6123 MEM32(ebp + (-0x1C)) = eax; /* 0x38008A1F: mov dword ptr [ebp - 0x1c], eax */ 6124 RECOMP_ICALL(MEM32(0x3804E4FC)); /* 0x38008A22: call dword ptr [0x3804e4fc] */ 6125 RECOMP_FLAGS_IN(); 6126 fp_push(*(float*)&MEM32(edi + 0xC)); /* 0x38008A28: fld dword ptr [edi + 0xc] */ 6127 ecx = MEM32(eax); /* 0x38008A2B: mov ecx, dword ptr [eax] */ 6128 _st[0] += _st[0]; /* 0x38008A2D: fadd st(0), st(0) */ 6129 MEM32(ebp + (-0x3C)) = ecx; /* 0x38008A2F: mov dword ptr [ebp - 0x3c], ecx */ 6130 edx = MEM32(eax + 0x4); /* 0x38008A32: mov edx, dword ptr [eax + 4] */ 6131 MEM32(ebp + (-0x38)) = edx; /* 0x38008A35: mov dword ptr [ebp - 0x38], edx */ 6132 eax = MEM32(eax + 0x8); /* 0x38008A38: mov eax, dword ptr [eax + 8] */ 6133 PUSH32(esp, ecx); /* 0x38008A3B: push ecx */ 6134 ecx = ebp + (-0x24); /* 0x38008A3C: lea ecx, [ebp - 0x24] */ 6135 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x38008A3F: fstp dword ptr [esp] */ 6136 MEM32(ebp + (-0x34)) = eax; /* 0x38008A42: mov dword ptr [ebp - 0x34], eax */ 6137 RECOMP_ICALL(MEM32(0x3804E4D4)); /* 0x38008A45: call dword ptr [0x3804e4d4] */ 6138 RECOMP_FLAGS_IN(); 6139 PUSH32(esp, 0x40000000u); /* 0x38008A4B: push 0x40000000 */ 6140 ecx = ebp + (-0x3C); /* 0x38008A50: lea ecx, [ebp - 0x3c] */ 6141 RECOMP_ICALL(MEM32(0x3804E4D4)); /* 0x38008A53: call dword ptr [0x3804e4d4] */ 6142 RECOMP_FLAGS_IN(); 6143 ecx = ebp + (-0x24); /* 0x38008A59: lea ecx, [ebp - 0x24] */ 6144 PUSH32(esp, ecx); /* 0x38008A5C: push ecx */ 6145 ecx = ebp + (-0x18); /* 0x38008A5D: lea ecx, [ebp - 0x18] */ 6146 RECOMP_ICALL(MEM32(0x3804E4E8)); /* 0x38008A60: call dword ptr [0x3804e4e8] */ 6147 RECOMP_FLAGS_IN(); 6148 edx = ebp + (-0x3C); /* 0x38008A66: lea edx, [ebp - 0x3c] */ 6149 PUSH32(esp, edx); /* 0x38008A69: push edx */ 6150 ecx = ebp + (-0x18); /* 0x38008A6A: lea ecx, [ebp - 0x18] */ 6151 RECOMP_ICALL(MEM32(0x3804E4E8)); /* 0x38008A6D: call dword ptr [0x3804e4e8] */ 6152 RECOMP_FLAGS_IN(); 6153 ecx = MEM32(ebp + (-0x14)); /* 0x38008A73: mov ecx, dword ptr [ebp - 0x14] */ 6154 eax = MEM32(ebp + (-0x18)); /* 0x38008A76: mov eax, dword ptr [ebp - 0x18] */ 6155 edx = MEM32(ebp + (-0x10)); /* 0x38008A79: mov edx, dword ptr [ebp - 0x10] */ 6156 MEM32(ebp + (-0x2C)) = ecx; /* 0x38008A7C: mov dword ptr [ebp - 0x2c], ecx */ 6157 ecx = esi; /* 0x38008A7F: mov ecx, esi */ 6158 MEM32(ebp + (-0x30)) = eax; /* 0x38008A81: mov dword ptr [ebp - 0x30], eax */ 6159 MEM32(ebp + (-0x28)) = edx; /* 0x38008A84: mov dword ptr [ebp - 0x28], edx */ 6160 RECOMP_ICALL(0x38006ED0u); /* 0x38008A87: call 0x38006ed0 */ /* not lifted */ 6161 RECOMP_FLAGS_IN(); 6162 fp_push(*(float*)&MEM32(ebp + (-0x30))); /* 0x38008A8C: fld dword ptr [ebp - 0x30] */ 6163 ecx = MEM32(eax); /* 0x38008A8F: mov ecx, dword ptr [eax] */ 6164 edx = MEM32(eax + 0x4); /* 0x38008A91: mov edx, dword ptr [eax + 4] */ 6165 eax = MEM32(eax + 0x8); /* 0x38008A94: mov eax, dword ptr [eax + 8] */ 6166 MEM32(ebp + (-0xC)) = ecx; /* 0x38008A97: mov dword ptr [ebp - 0xc], ecx */ 6167 _st[0] += (double)*(float*)ADDR(ebp + (-0xC)); /* 0x38008A9A: fadd dword ptr [ebp - 0xc] */ 6168 MEM32(ebp + (-0x8)) = edx; /* 0x38008A9D: mov dword ptr [ebp - 8], edx */ 6169 PUSH32(esp, 1); /* 0x38008AA0: push 1 */ 6170 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x38008AA2: fstp dword ptr [ebp - 0xc] */ 6171 ecx = MEM32(ebp + (-0xC)); /* 0x38008AA5: mov ecx, dword ptr [ebp - 0xc] */ 6172 fp_push(*(float*)&MEM32(ebp + (-0x2C))); /* 0x38008AA8: fld dword ptr [ebp - 0x2c] */ 6173 MEM32(ebp + (-0x4)) = eax; /* 0x38008AAB: mov dword ptr [ebp - 4], eax */ 6174 _st[0] += (double)*(float*)ADDR(ebp + (-0x8)); /* 0x38008AAE: fadd dword ptr [ebp - 8] */ 6175 MEM32(ebp + (-0x48)) = ecx; /* 0x38008AB1: mov dword ptr [ebp - 0x48], ecx */ 6176 ecx = ebp + (-0x48); /* 0x38008AB4: lea ecx, [ebp - 0x48] */ 6177 PUSH32(esp, ecx); /* 0x38008AB7: push ecx */ 6178 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x38008AB8: fstp dword ptr [ebp - 8] */ 6179 edx = MEM32(ebp + (-0x8)); /* 0x38008ABB: mov edx, dword ptr [ebp - 8] */ 6180 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x38008ABE: fld dword ptr [ebp - 0x28] */ 6181 PUSH32(esp, 0); /* 0x38008AC1: push 0 */ 6182 _st[0] += (double)*(float*)ADDR(ebp + (-0x4)); /* 0x38008AC3: fadd dword ptr [ebp - 4] */ 6183 PUSH32(esp, 0x3806B660u); /* 0x38008AC6: push 0x3806b660 */ 6184 PUSH32(esp, 0x3806B5C0u); /* 0x38008ACB: push 0x3806b5c0 */ 6185 PUSH32(esp, 0); /* 0x38008AD0: push 0 */ 6186 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x38008AD2: fstp dword ptr [ebp - 4] */ 6187 eax = MEM32(ebp + (-0x4)); /* 0x38008AD5: mov eax, dword ptr [ebp - 4] */ 6188 MEM32(ebp + (-0x40)) = eax; /* 0x38008AD8: mov dword ptr [ebp - 0x40], eax */ 6189 eax = MEM32(esi + 0x60); /* 0x38008ADB: mov eax, dword ptr [esi + 0x60] */ 6190 PUSH32(esp, eax); /* 0x38008ADE: push eax */ 6191 MEM32(ebp + (-0x44)) = edx; /* 0x38008ADF: mov dword ptr [ebp - 0x44], edx */ 6192 RECOMP_ICALL(0x3804B682u); /* 0x38008AE2: call 0x3804b682 */ /* not lifted */ 6193 RECOMP_FLAGS_IN(); 6194 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 6195 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6196 esp = esp + 0x14u; /* 0x38008AE7: add esp, 0x14 */ 6197 _flag_k = FK_ADD; 6198 ecx = eax; /* 0x38008AEA: mov ecx, eax */ 6199 RECOMP_ICALL(0x38005D70u); /* 0x38008AEC: call 0x38005d70 */ /* not lifted */ 6200 RECOMP_FLAGS_IN(); 6201 eax = MEM32(esi + 0x60); /* 0x38008AF1: mov eax, dword ptr [esi + 0x60] */ 6202 PUSH32(esp, 0); /* 0x38008AF4: push 0 */ 6203 PUSH32(esp, 0x3806B660u); /* 0x38008AF6: push 0x3806b660 */ 6204 PUSH32(esp, 0x3806B5C0u); /* 0x38008AFB: push 0x3806b5c0 */ 6205 PUSH32(esp, 0); /* 0x38008B00: push 0 */ 6206 PUSH32(esp, eax); /* 0x38008B02: push eax */ 6207 RECOMP_ICALL(0x3804B682u); /* 0x38008B03: call 0x3804b682 */ /* not lifted */ 6208 RECOMP_FLAGS_IN(); 6209 edx = MEM32(eax); /* 0x38008B08: mov edx, dword ptr [eax] */ 6210 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 6211 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6212 esp = esp + 0x14u; /* 0x38008B0A: add esp, 0x14 */ 6213 _flag_k = FK_ADD; 6214 ecx = eax; /* 0x38008B0D: mov ecx, eax */ 6215 RECOMP_ICALL(MEM32(edx + 0x8C)); /* 0x38008B0F: call dword ptr [edx + 0x8c] */ 6216 RECOMP_FLAGS_IN(); 6217 edi = POP32_VAL(esp); /* 0x38008B15: pop edi */ 6218 MEM32(esi + 0xE4) = 0; /* 0x38008B16: mov dword ptr [esi + 0xe4], 0 */ 6219 esi = POP32_VAL(esp); /* 0x38008B20: pop esi */ 6220 esp = ebp; /* 0x38008B21: mov esp, ebp */ 6221 ebp = POP32_VAL(esp); /* 0x38008B23: pop ebp */ 6222 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38008B24: ret */ 6223 L_38008B25: 6224 eax = MEM32(edi); /* 0x38008B25: mov eax, dword ptr [edi] */ 6225 ecx = ebp + (-0x48); /* 0x38008B27: lea ecx, [ebp - 0x48] */ 6226 PUSH32(esp, ecx); /* 0x38008B2A: push ecx */ 6227 ecx = edi; /* 0x38008B2B: mov ecx, edi */ 6228 MEM32(ebp + (-0x48)) = 0; /* 0x38008B2D: mov dword ptr [ebp - 0x48], 0 */ 6229 MEM32(ebp + (-0x44)) = 0; /* 0x38008B34: mov dword ptr [ebp - 0x44], 0 */ 6230 MEM32(ebp + (-0x40)) = 0; /* 0x38008B3B: mov dword ptr [ebp - 0x40], 0 */ 6231 RECOMP_ICALL(MEM32(eax + 0x80)); /* 0x38008B42: call dword ptr [eax + 0x80] */ 6232 RECOMP_FLAGS_IN(); 6233 edi = POP32_VAL(esp); /* 0x38008B48: pop edi */ 6234 MEM32(esi + 0xE4) = 0; /* 0x38008B49: mov dword ptr [esi + 0xe4], 0 */ 6235 esi = POP32_VAL(esp); /* 0x38008B53: pop esi */ 6236 esp = ebp; /* 0x38008B54: mov esp, ebp */ 6237 ebp = POP32_VAL(esp); /* 0x38008B56: pop ebp */ 6238 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38008B57: ret */ 6239 L_38008B58: 6240 ecx = MEM32(esi + 0x60); /* 0x38008B58: mov ecx, dword ptr [esi + 0x60] */ 6241 PUSH32(esp, 0); /* 0x38008B5B: push 0 */ 6242 PUSH32(esp, 0); /* 0x38008B5D: push 0 */ 6243 MEM32(esi + 0xC8) = 0; /* 0x38008B5F: mov dword ptr [esi + 0xc8], 0 */ 6244 RECOMP_ICALL(0x38004D00u); /* 0x38008B69: call 0x38004d00 */ /* not lifted */ 6245 RECOMP_FLAGS_IN(); 6246 L_38008B6E: 6247 edi = POP32_VAL(esp); /* 0x38008B6E: pop edi */ 6248 esi = POP32_VAL(esp); /* 0x38008B6F: pop esi */ 6249 esp = ebp; /* 0x38008B70: mov esp, ebp */ 6250 ebp = POP32_VAL(esp); /* 0x38008B72: pop ebp */ 6251 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38008B73: ret */ 6252 RECOMP_REGS_OUT(); 6253 } 6254 6255 void sub_38008B80(void) { 6256 int _fpu_cmp = 0; 6257 uint32_t _cf = 0; 6258 int _df = 1; 6259 uint32_t _flag_k = FK_NONE; 6260 uint32_t _flag_a = 0, _flag_b = 0; 6261 uint32_t _itail_tgt = 0; 6262 RECOMP_REGS_LOCALS 6263 RECOMP_ENTER(0x38008B80u); 6264 6265 L_38008B80: 6266 PUSH32(esp, esi); /* 0x38008B80: push esi */ 6267 PUSH32(esp, 0); /* 0x38008B81: push 0 */ 6268 PUSH32(esp, 0x3806B660u); /* 0x38008B83: push 0x3806b660 */ 6269 esi = ecx; /* 0x38008B88: mov esi, ecx */ 6270 eax = MEM32(esi + 0x60); /* 0x38008B8A: mov eax, dword ptr [esi + 0x60] */ 6271 PUSH32(esp, 0x3806B5C0u); /* 0x38008B8D: push 0x3806b5c0 */ 6272 PUSH32(esp, 0); /* 0x38008B92: push 0 */ 6273 PUSH32(esp, eax); /* 0x38008B94: push eax */ 6274 RECOMP_ICALL(0x3804B682u); /* 0x38008B95: call 0x3804b682 */ /* not lifted */ 6275 RECOMP_FLAGS_IN(); 6276 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 6277 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6278 esp = esp + 0x14u; /* 0x38008B9A: add esp, 0x14 */ 6279 _flag_k = FK_ADD; 6280 /* test eax, eax */ /* 0x38008B9D: test eax, eax */ 6281 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6282 _cf = 0; 6283 _flag_k = FK_TEST; 6284 if (TEST_Z(_flag_a, _flag_b)) goto L_38008BC7; /* 0x38008B9F: je 0x38008bc7 */ 6285 L_38008BA1: 6286 esi = MEM32(esi + 0x60); /* 0x38008BA1: mov esi, dword ptr [esi + 0x60] */ 6287 PUSH32(esp, 0); /* 0x38008BA4: push 0 */ 6288 PUSH32(esp, 0x3806B660u); /* 0x38008BA6: push 0x3806b660 */ 6289 PUSH32(esp, 0x3806B5C0u); /* 0x38008BAB: push 0x3806b5c0 */ 6290 PUSH32(esp, 0); /* 0x38008BB0: push 0 */ 6291 PUSH32(esp, esi); /* 0x38008BB2: push esi */ 6292 RECOMP_ICALL(0x3804B682u); /* 0x38008BB3: call 0x3804b682 */ /* not lifted */ 6293 RECOMP_FLAGS_IN(); 6294 edx = MEM32(eax); /* 0x38008BB8: mov edx, dword ptr [eax] */ 6295 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 6296 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6297 esp = esp + 0x14u; /* 0x38008BBA: add esp, 0x14 */ 6298 _flag_k = FK_ADD; 6299 PUSH32(esp, 0); /* 0x38008BBD: push 0 */ 6300 ecx = eax; /* 0x38008BBF: mov ecx, eax */ 6301 RECOMP_ICALL(MEM32(edx + 0x88)); /* 0x38008BC1: call dword ptr [edx + 0x88] */ 6302 RECOMP_FLAGS_IN(); 6303 L_38008BC7: 6304 esi = POP32_VAL(esp); /* 0x38008BC7: pop esi */ 6305 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38008BC8: ret */ 6306 RECOMP_REGS_OUT(); 6307 } 6308 6309 void sub_38008BD0(void) { 6310 int _fpu_cmp = 0; 6311 uint32_t _cf = 0; 6312 int _df = 1; 6313 uint32_t _flag_k = FK_NONE; 6314 uint32_t _flag_a = 0, _flag_b = 0; 6315 uint32_t _itail_tgt = 0; 6316 RECOMP_REGS_LOCALS 6317 RECOMP_ENTER(0x38008BD0u); 6318 6319 L_38008BD0: 6320 PUSH32(esp, ebp); /* 0x38008BD0: push ebp */ 6321 ebp = esp; /* 0x38008BD1: mov ebp, esp */ 6322 eax = MEM32(ebp + 0x8); /* 0x38008BD3: mov eax, dword ptr [ebp + 8] */ 6323 /* test eax, eax */ /* 0x38008BD6: test eax, eax */ 6324 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6325 _cf = 0; 6326 _flag_k = FK_TEST; 6327 PUSH32(esp, esi); /* 0x38008BD8: push esi */ 6328 esi = ecx; /* 0x38008BD9: mov esi, ecx */ 6329 if (TEST_S(_flag_a, _flag_b)) goto L_38008C22; /* 0x38008BDB: jl 0x38008c22 */ 6330 L_38008BDD: 6331 PUSH32(esp, eax); /* 0x38008BDD: push eax */ 6332 eax = MEM32(esi + 0x78); /* 0x38008BDE: mov eax, dword ptr [esi + 0x78] */ 6333 PUSH32(esp, eax); /* 0x38008BE1: push eax */ 6334 RECOMP_ICALL(0x380295A0u); /* 0x38008BE2: call 0x380295a0 */ /* not lifted */ 6335 RECOMP_FLAGS_IN(); 6336 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6337 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6338 esp = esp + 4; /* 0x38008BE7: add esp, 4 */ 6339 _flag_k = FK_ADD; 6340 ecx = eax; /* 0x38008BEA: mov ecx, eax */ 6341 RECOMP_ICALL(0x3802B990u); /* 0x38008BEC: call 0x3802b990 */ /* not lifted */ 6342 RECOMP_FLAGS_IN(); 6343 ecx = eax; /* 0x38008BF1: mov ecx, eax */ 6344 RECOMP_ICALL(0x3803EC10u); /* 0x38008BF3: call 0x3803ec10 */ /* not lifted */ 6345 RECOMP_FLAGS_IN(); 6346 ecx = MEM32(eax + 0x4); /* 0x38008BF8: mov ecx, dword ptr [eax + 4] */ 6347 edx = MEM32(ebp + 0xC); /* 0x38008BFB: mov edx, dword ptr [ebp + 0xc] */ 6348 eax = MEM32(ecx + edx * 4); /* 0x38008BFE: mov eax, dword ptr [ecx + edx*4] */ 6349 ecx = MEM32(esi + 0x60); /* 0x38008C01: mov ecx, dword ptr [esi + 0x60] */ 6350 PUSH32(esp, eax); /* 0x38008C04: push eax */ 6351 MEM32(esi + 0x1C4) = 0xFFFFFFFFu; /* 0x38008C05: mov dword ptr [esi + 0x1c4], 0xffffffff */ 6352 RECOMP_ICALL(0x380041D0u); /* 0x38008C0F: call 0x380041d0 */ /* not lifted */ 6353 RECOMP_FLAGS_IN(); 6354 eax = MEM32(ebp + 0x18); /* 0x38008C14: mov eax, dword ptr [ebp + 0x18] */ 6355 MEM32(esi + 0x1CC) = eax; /* 0x38008C17: mov dword ptr [esi + 0x1cc], eax */ 6356 esi = POP32_VAL(esp); /* 0x38008C1D: pop esi */ 6357 ebp = POP32_VAL(esp); /* 0x38008C1E: pop ebp */ 6358 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x38008C1F: ret 0x14 */ 6359 L_38008C22: 6360 ecx = MEM32(ebp + 0x14); /* 0x38008C22: mov ecx, dword ptr [ebp + 0x14] */ 6361 edx = MEM32(ebp + 0x18); /* 0x38008C25: mov edx, dword ptr [ebp + 0x18] */ 6362 PUSH32(esp, ecx); /* 0x38008C28: push ecx */ 6363 PUSH32(esp, edx); /* 0x38008C29: push edx */ 6364 ecx = esi; /* 0x38008C2A: mov ecx, esi */ 6365 RECOMP_ICALL(0x38008C90u); /* 0x38008C2C: call 0x38008c90 */ /* not lifted */ 6366 RECOMP_FLAGS_IN(); 6367 esi = POP32_VAL(esp); /* 0x38008C31: pop esi */ 6368 ebp = POP32_VAL(esp); /* 0x38008C32: pop ebp */ 6369 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x38008C33: ret 0x14 */ 6370 RECOMP_REGS_OUT(); 6371 } 6372 6373 void sub_38008C40(void) { 6374 int _fpu_cmp = 0; 6375 uint32_t _cf = 0; 6376 int _df = 1; 6377 uint32_t _flag_k = FK_NONE; 6378 uint32_t _flag_a = 0, _flag_b = 0; 6379 uint32_t _itail_tgt = 0; 6380 RECOMP_REGS_LOCALS 6381 RECOMP_ENTER(0x38008C40u); 6382 6383 L_38008C40: 6384 PUSH32(esp, ebp); /* 0x38008C40: push ebp */ 6385 ebp = esp; /* 0x38008C41: mov ebp, esp */ 6386 eax = MEM32(ebp + 0x8); /* 0x38008C43: mov eax, dword ptr [ebp + 8] */ 6387 PUSH32(esp, esi); /* 0x38008C46: push esi */ 6388 esi = ecx; /* 0x38008C47: mov esi, ecx */ 6389 ecx = MEM32(esi + 0x78); /* 0x38008C49: mov ecx, dword ptr [esi + 0x78] */ 6390 PUSH32(esp, eax); /* 0x38008C4C: push eax */ 6391 PUSH32(esp, ecx); /* 0x38008C4D: push ecx */ 6392 RECOMP_ICALL(0x380295A0u); /* 0x38008C4E: call 0x380295a0 */ /* not lifted */ 6393 RECOMP_FLAGS_IN(); 6394 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6395 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6396 esp = esp + 4; /* 0x38008C53: add esp, 4 */ 6397 _flag_k = FK_ADD; 6398 ecx = eax; /* 0x38008C56: mov ecx, eax */ 6399 RECOMP_ICALL(0x3802B990u); /* 0x38008C58: call 0x3802b990 */ /* not lifted */ 6400 RECOMP_FLAGS_IN(); 6401 ecx = eax; /* 0x38008C5D: mov ecx, eax */ 6402 RECOMP_ICALL(0x3803EC10u); /* 0x38008C5F: call 0x3803ec10 */ /* not lifted */ 6403 RECOMP_FLAGS_IN(); 6404 edx = MEM32(eax + 0x4); /* 0x38008C64: mov edx, dword ptr [eax + 4] */ 6405 eax = MEM32(ebp + 0xC); /* 0x38008C67: mov eax, dword ptr [ebp + 0xc] */ 6406 eax = MEM32(edx + eax * 4); /* 0x38008C6A: mov eax, dword ptr [edx + eax*4] */ 6407 ecx = MEM32(esi + 0x60); /* 0x38008C6D: mov ecx, dword ptr [esi + 0x60] */ 6408 PUSH32(esp, eax); /* 0x38008C70: push eax */ 6409 MEM32(esi + 0x1C4) = 0xFFFFFFFFu; /* 0x38008C71: mov dword ptr [esi + 0x1c4], 0xffffffff */ 6410 RECOMP_ICALL(0x380041D0u); /* 0x38008C7B: call 0x380041d0 */ /* not lifted */ 6411 RECOMP_FLAGS_IN(); 6412 esi = POP32_VAL(esp); /* 0x38008C80: pop esi */ 6413 ebp = POP32_VAL(esp); /* 0x38008C81: pop ebp */ 6414 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x38008C82: ret 0x10 */ 6415 RECOMP_REGS_OUT(); 6416 } 6417 6418 void sub_38008C90(void) { 6419 int _fpu_cmp = 0; 6420 uint32_t _cf = 0; 6421 int _df = 1; 6422 uint32_t _flag_k = FK_NONE; 6423 uint32_t _flag_a = 0, _flag_b = 0; 6424 uint32_t _itail_tgt = 0; 6425 RECOMP_REGS_LOCALS 6426 RECOMP_ENTER(0x38008C90u); 6427 6428 L_38008C90: 6429 PUSH32(esp, ebx); /* 0x38008C90: push ebx */ 6430 PUSH32(esp, esi); /* 0x38008C91: push esi */ 6431 esi = ecx; /* 0x38008C92: mov esi, ecx */ 6432 eax = MEM32(esi + 0x1B8); /* 0x38008C94: mov eax, dword ptr [esi + 0x1b8] */ 6433 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6434 ebx = 0; /* 0x38008C9A: xor ebx, ebx */ 6435 _cf = 0; 6436 _flag_k = FK_TEST; 6437 /* test eax, eax */ /* 0x38008C9C: test eax, eax */ 6438 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6439 _cf = 0; 6440 _flag_k = FK_TEST; 6441 PUSH32(esp, edi); /* 0x38008C9E: push edi */ 6442 if (TEST_Z(_flag_a, _flag_b)) goto L_38008CFF; /* 0x38008C9F: je 0x38008cff */ 6443 L_38008CA1: 6444 ecx = MEM32(esi + 0x1BC); /* 0x38008CA1: mov ecx, dword ptr [esi + 0x1bc] */ 6445 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 6446 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6447 ecx = ecx - eax; /* 0x38008CA7: sub ecx, eax */ 6448 _flag_k = FK_CMP; 6449 eax = 0x2AAAAAABu; /* 0x38008CA9: mov eax, 0x2aaaaaab */ 6450 { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x38008CAE: imul ecx */ 6451 eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r; 6452 _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; } 6453 if (1u) _cf = (((edx) >> 0) & 1u); /* 0x38008CB0: sar edx, 1 */ 6454 if (1u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 1u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6455 edx = (uint32_t)((int32_t)edx >> 1u); 6456 eax = edx; /* 0x38008CB2: mov eax, edx */ 6457 if (31u) _cf = (((eax) >> 30) & 1u); /* 0x38008CB4: shr eax, 0x1f */ 6458 if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6459 eax = eax >> 31u; /* 0x38008CB4: shr eax, 0x1f */ 6460 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 6461 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6462 edx = edx + eax; /* 0x38008CB7: add edx, eax */ 6463 _flag_k = FK_ADD; 6464 if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_38008CFF; /* 0x38008CB9: je 0x38008cff */ 6465 L_38008CBB: 6466 eax = MEM32(esi + 0x1B8); /* 0x38008CBB: mov eax, dword ptr [esi + 0x1b8] */ 6467 ecx = MEM32(eax); /* 0x38008CC1: mov ecx, dword ptr [eax] */ 6468 edi = MEM32(eax + 0x4); /* 0x38008CC3: mov edi, dword ptr [eax + 4] */ 6469 PUSH32(esp, ecx); /* 0x38008CC6: push ecx */ 6470 ecx = MEM32(esi + 0x78); /* 0x38008CC7: mov ecx, dword ptr [esi + 0x78] */ 6471 PUSH32(esp, ecx); /* 0x38008CCA: push ecx */ 6472 RECOMP_ICALL(0x380295A0u); /* 0x38008CCB: call 0x380295a0 */ /* not lifted */ 6473 RECOMP_FLAGS_IN(); 6474 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6475 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6476 esp = esp + 4; /* 0x38008CD0: add esp, 4 */ 6477 _flag_k = FK_ADD; 6478 ecx = eax; /* 0x38008CD3: mov ecx, eax */ 6479 RECOMP_ICALL(0x3802B990u); /* 0x38008CD5: call 0x3802b990 */ /* not lifted */ 6480 RECOMP_FLAGS_IN(); 6481 ecx = MEM32(eax + 0x28); /* 0x38008CDA: mov ecx, dword ptr [eax + 0x28] */ 6482 /* test ecx, ecx */ /* 0x38008CDD: test ecx, ecx */ 6483 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 6484 _cf = 0; 6485 _flag_k = FK_TEST; 6486 if (TEST_Z(_flag_a, _flag_b)) goto L_38008CFF; /* 0x38008CDF: je 0x38008cff */ 6487 L_38008CE1: 6488 ecx = eax; /* 0x38008CE1: mov ecx, eax */ 6489 RECOMP_ICALL(0x3803EC10u); /* 0x38008CE3: call 0x3803ec10 */ /* not lifted */ 6490 RECOMP_FLAGS_IN(); 6491 edx = MEM32(eax + 0x4); /* 0x38008CE8: mov edx, dword ptr [eax + 4] */ 6492 ebx = MEM32(edx + edi * 4); /* 0x38008CEB: mov ebx, dword ptr [edx + edi*4] */ 6493 MEM32(esi + 0x1C4) = 0; /* 0x38008CEE: mov dword ptr [esi + 0x1c4], 0 */ 6494 MEM8(esi + 0x1D0) = (uint8_t)(0); /* 0x38008CF8: mov byte ptr [esi + 0x1d0], 0 */ 6495 L_38008CFF: 6496 ecx = MEM32(esi + 0x60); /* 0x38008CFF: mov ecx, dword ptr [esi + 0x60] */ 6497 PUSH32(esp, ebx); /* 0x38008D02: push ebx */ 6498 RECOMP_ICALL(0x380041D0u); /* 0x38008D03: call 0x380041d0 */ /* not lifted */ 6499 RECOMP_FLAGS_IN(); 6500 edi = POP32_VAL(esp); /* 0x38008D08: pop edi */ 6501 esi = POP32_VAL(esp); /* 0x38008D09: pop esi */ 6502 ebx = POP32_VAL(esp); /* 0x38008D0A: pop ebx */ 6503 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x38008D0B: ret 8 */ 6504 RECOMP_REGS_OUT(); 6505 } 6506 6507 void sub_38008D10(void) { 6508 int _fpu_cmp = 0; 6509 uint32_t _cf = 0; 6510 int _df = 1; 6511 uint32_t _flag_k = FK_NONE; 6512 uint32_t _flag_a = 0, _flag_b = 0; 6513 uint32_t _itail_tgt = 0; 6514 RECOMP_REGS_LOCALS 6515 RECOMP_ENTER(0x38008D10u); 6516 6517 L_38008D10: 6518 PUSH32(esp, ebp); /* 0x38008D10: push ebp */ 6519 ebp = esp; /* 0x38008D11: mov ebp, esp */ 6520 PUSH32(esp, 0xFFFFFFFFu); /* 0x38008D13: push -1 */ 6521 PUSH32(esp, 0x3804BB20u); /* 0x38008D15: push 0x3804bb20 */ 6522 eax = MEM32(FS_BASE + (0)); /* 0x38008D1A: mov eax, dword ptr fs:[0] */ 6523 PUSH32(esp, eax); /* 0x38008D20: push eax */ 6524 MEM32(FS_BASE + (0)) = esp; /* 0x38008D21: mov dword ptr fs:[0], esp */ 6525 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x280u); 6526 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6527 esp = esp - 0x280u; /* 0x38008D28: sub esp, 0x280 */ 6528 _flag_k = FK_CMP; 6529 PUSH32(esp, ebx); /* 0x38008D2E: push ebx */ 6530 PUSH32(esp, esi); /* 0x38008D2F: push esi */ 6531 PUSH32(esp, edi); /* 0x38008D30: push edi */ 6532 eax = ebp + (-0x17); /* 0x38008D31: lea eax, [ebp - 0x17] */ 6533 ebx = ecx; /* 0x38008D34: mov ebx, ecx */ 6534 PUSH32(esp, eax); /* 0x38008D36: push eax */ 6535 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6536 esi = 0; /* 0x38008D37: xor esi, esi */ 6537 _cf = 0; 6538 _flag_k = FK_TEST; 6539 PUSH32(esp, esi); /* 0x38008D39: push esi */ 6540 ecx = ebp + (-0x25); /* 0x38008D3A: lea ecx, [ebp - 0x25] */ 6541 PUSH32(esp, ecx); /* 0x38008D3D: push ecx */ 6542 ecx = ebp + (-0x50); /* 0x38008D3E: lea ecx, [ebp - 0x50] */ 6543 MEM32(ebp + (-0x38)) = ebx; /* 0x38008D41: mov dword ptr [ebp - 0x38], ebx */ 6544 RECOMP_ICALL(0x380135E0u); /* 0x38008D44: call 0x380135e0 */ /* not lifted */ 6545 RECOMP_FLAGS_IN(); 6546 edx = ebp + (-0x16); /* 0x38008D49: lea edx, [ebp - 0x16] */ 6547 PUSH32(esp, edx); /* 0x38008D4C: push edx */ 6548 PUSH32(esp, esi); /* 0x38008D4D: push esi */ 6549 eax = ebp + (-0x15); /* 0x38008D4E: lea eax, [ebp - 0x15] */ 6550 PUSH32(esp, eax); /* 0x38008D51: push eax */ 6551 ecx = ebp + (-0x64); /* 0x38008D52: lea ecx, [ebp - 0x64] */ 6552 MEM32(ebp + (-0x4)) = esi; /* 0x38008D55: mov dword ptr [ebp - 4], esi */ 6553 RECOMP_ICALL(0x380135E0u); /* 0x38008D58: call 0x380135e0 */ /* not lifted */ 6554 RECOMP_FLAGS_IN(); 6555 ecx = ebx + 0x1B4; /* 0x38008D5D: lea ecx, [ebx + 0x1b4] */ 6556 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x38008D63: mov byte ptr [ebp - 4], 1 */ 6557 MEM32(ebp + (-0x30)) = esi; /* 0x38008D67: mov dword ptr [ebp - 0x30], esi */ 6558 MEM32(ebp + (-0x2C)) = esi; /* 0x38008D6A: mov dword ptr [ebp - 0x2c], esi */ 6559 RECOMP_ICALL(0x3802DF80u); /* 0x38008D6D: call 0x3802df80 */ /* not lifted */ 6560 RECOMP_FLAGS_IN(); 6561 /* test eax, eax */ /* 0x38008D72: test eax, eax */ 6562 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6563 _cf = 0; 6564 _flag_k = FK_TEST; 6565 if (TEST_Z(_flag_a, _flag_b)) goto L_38008D87; /* 0x38008D74: je 0x38008d87 */ 6566 L_38008D76: 6567 eax = MEM32(ebx + 0x1B8); /* 0x38008D76: mov eax, dword ptr [ebx + 0x1b8] */ 6568 ecx = MEM32(eax); /* 0x38008D7C: mov ecx, dword ptr [eax] */ 6569 edx = MEM32(eax + 0x4); /* 0x38008D7E: mov edx, dword ptr [eax + 4] */ 6570 MEM32(ebp + (-0x30)) = ecx; /* 0x38008D81: mov dword ptr [ebp - 0x30], ecx */ 6571 MEM32(ebp + (-0x2C)) = edx; /* 0x38008D84: mov dword ptr [ebp - 0x2c], edx */ 6572 L_38008D87: 6573 esi = MEM32(ebx + 0x1B8); /* 0x38008D87: mov esi, dword ptr [ebx + 0x1b8] */ 6574 /* cmp esi, MEM32(ebx + 0x1BC) */ /* 0x38008D8D: cmp esi, dword ptr [ebx + 0x1bc] */ 6575 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(ebx + 0x1BC)); 6576 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6577 _flag_k = FK_CMP; 6578 if (CMP_EQ(_flag_a, _flag_b)) goto L_38008DAF; /* 0x38008D93: je 0x38008daf */ 6579 L_38008D95: 6580 PUSH32(esp, esi); /* 0x38008D95: push esi */ 6581 eax = ebp + (-0x6C); /* 0x38008D96: lea eax, [ebp - 0x6c] */ 6582 PUSH32(esp, eax); /* 0x38008D99: push eax */ 6583 ecx = ebp + (-0x50); /* 0x38008D9A: lea ecx, [ebp - 0x50] */ 6584 RECOMP_ICALL(0x38009620u); /* 0x38008D9D: call 0x38009620 */ /* not lifted */ 6585 RECOMP_FLAGS_IN(); 6586 eax = MEM32(ebx + 0x1BC); /* 0x38008DA2: mov eax, dword ptr [ebx + 0x1bc] */ 6587 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0xCu); 6588 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6589 esi = esi + 0xCu; /* 0x38008DA8: add esi, 0xc */ 6590 _flag_k = FK_ADD; 6591 /* cmp esi, eax */ /* 0x38008DAB: cmp esi, eax */ 6592 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 6593 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6594 _flag_k = FK_CMP; 6595 RECOMP_BACKEDGE(); 6596 if (CMP_NE(_flag_a, _flag_b)) goto L_38008D95; /* 0x38008DAD: jne 0x38008d95 */ 6597 L_38008DAF: 6598 eax = MEM32(ebx + 0x1BC); /* 0x38008DAF: mov eax, dword ptr [ebx + 0x1bc] */ 6599 edx = MEM32(ebx + 0x1B8); /* 0x38008DB5: mov edx, dword ptr [ebx + 0x1b8] */ 6600 ecx = ebx + 0x1B4; /* 0x38008DBB: lea ecx, [ebx + 0x1b4] */ 6601 PUSH32(esp, eax); /* 0x38008DC1: push eax */ 6602 PUSH32(esp, edx); /* 0x38008DC2: push edx */ 6603 RECOMP_ICALL(0x38009410u); /* 0x38008DC3: call 0x38009410 */ /* not lifted */ 6604 RECOMP_FLAGS_IN(); 6605 ecx = ebx; /* 0x38008DC8: mov ecx, ebx */ 6606 RECOMP_ICALL(0x38018E70u); /* 0x38008DCA: call 0x38018e70 */ /* not lifted */ 6607 RECOMP_FLAGS_IN(); 6608 ecx = eax; /* 0x38008DCF: mov ecx, eax */ 6609 RECOMP_ICALL(0x38029DF0u); /* 0x38008DD1: call 0x38029df0 */ /* not lifted */ 6610 RECOMP_FLAGS_IN(); 6611 ecx = MEM32(0x3806EC04); /* 0x38008DD6: mov ecx, dword ptr [0x3806ec04] */ 6612 edx = MEM32(ecx); /* 0x38008DDC: mov edx, dword ptr [ecx] */ 6613 esi = eax; /* 0x38008DDE: mov esi, eax */ 6614 RECOMP_ICALL(MEM32(edx + 0x10)); /* 0x38008DE0: call dword ptr [edx + 0x10] */ 6615 RECOMP_FLAGS_IN(); 6616 PUSH32(esp, 1); /* 0x38008DE3: push 1 */ 6617 ecx = ebp + (-0x28C); /* 0x38008DE5: lea ecx, [ebp - 0x28c] */ 6618 PUSH32(esp, ecx); /* 0x38008DEB: push ecx */ 6619 ecx = eax; /* 0x38008DEC: mov ecx, eax */ 6620 RECOMP_ICALL(0x38018EB0u); /* 0x38008DEE: call 0x38018eb0 */ /* not lifted */ 6621 RECOMP_FLAGS_IN(); 6622 PUSH32(esp, eax); /* 0x38008DF3: push eax */ 6623 ecx = esi; /* 0x38008DF4: mov ecx, esi */ 6624 RECOMP_ICALL(MEM32(0x3804E688)); /* 0x38008DF6: call dword ptr [0x3804e688] */ 6625 RECOMP_FLAGS_IN(); 6626 edx = MEM32(ebx + 0x60); /* 0x38008DFC: mov edx, dword ptr [ebx + 0x60] */ 6627 MEM32(ebp + (-0x3C)) = edx; /* 0x38008DFF: mov dword ptr [ebp - 0x3c], edx */ 6628 edx = ebp + (-0x28C); /* 0x38008E02: lea edx, [ebp - 0x28c] */ 6629 /* cmp edx, eax */ /* 0x38008E08: cmp edx, eax */ 6630 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 6631 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6632 _flag_k = FK_CMP; 6633 ecx = ebp + (-0x28C); /* 0x38008E0A: lea ecx, [ebp - 0x28c] */ 6634 MEM32(ebp + (-0x10)) = eax; /* 0x38008E10: mov dword ptr [ebp - 0x10], eax */ 6635 MEM32(ebp + (-0x14)) = ecx; /* 0x38008E13: mov dword ptr [ebp - 0x14], ecx */ 6636 if (CMP_EQ(_flag_a, _flag_b)) goto L_38008F4C; /* 0x38008E16: je 0x38008f4c */ 6637 L_38008E1C: 6638 eax = MEM32(ecx); /* 0x38008E1C: mov eax, dword ptr [ecx] */ 6639 ecx = MEM32(ebx + 0x78); /* 0x38008E1E: mov ecx, dword ptr [ebx + 0x78] */ 6640 PUSH32(esp, eax); /* 0x38008E21: push eax */ 6641 PUSH32(esp, ecx); /* 0x38008E22: push ecx */ 6642 RECOMP_ICALL(0x380295A0u); /* 0x38008E23: call 0x380295a0 */ /* not lifted */ 6643 RECOMP_FLAGS_IN(); 6644 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6645 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6646 esp = esp + 4; /* 0x38008E28: add esp, 4 */ 6647 _flag_k = FK_ADD; 6648 ecx = eax; /* 0x38008E2B: mov ecx, eax */ 6649 RECOMP_ICALL(0x3802B990u); /* 0x38008E2D: call 0x3802b990 */ /* not lifted */ 6650 RECOMP_FLAGS_IN(); 6651 ecx = MEM32(eax + 0x28); /* 0x38008E32: mov ecx, dword ptr [eax + 0x28] */ 6652 /* test ecx, ecx */ /* 0x38008E35: test ecx, ecx */ 6653 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 6654 _cf = 0; 6655 _flag_k = FK_TEST; 6656 if (TEST_Z(_flag_a, _flag_b)) goto L_38008F38; /* 0x38008E37: je 0x38008f38 */ 6657 L_38008E3D: 6658 ecx = eax; /* 0x38008E3D: mov ecx, eax */ 6659 RECOMP_ICALL(0x3803EC10u); /* 0x38008E3F: call 0x3803ec10 */ /* not lifted */ 6660 RECOMP_FLAGS_IN(); 6661 ecx = MEM32(ebx + 0xE8); /* 0x38008E44: mov ecx, dword ptr [ebx + 0xe8] */ 6662 edx = MEM32(ecx); /* 0x38008E4A: mov edx, dword ptr [ecx] */ 6663 edi = eax; /* 0x38008E4C: mov edi, eax */ 6664 RECOMP_ICALL(MEM32(edx + 0xC)); /* 0x38008E4E: call dword ptr [edx + 0xc] */ 6665 RECOMP_FLAGS_IN(); 6666 edx = MEM32(eax + 0x4); /* 0x38008E51: mov edx, dword ptr [eax + 4] */ 6667 ecx = MEM32(eax); /* 0x38008E54: mov ecx, dword ptr [eax] */ 6668 eax = MEM32(eax + 0x8); /* 0x38008E56: mov eax, dword ptr [eax + 8] */ 6669 MEM32(ebp + (-0x20)) = edx; /* 0x38008E59: mov dword ptr [ebp - 0x20], edx */ 6670 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x38008E5C: fld dword ptr [ebp - 0x20] */ 6671 _st[0] += (double)*(float*)ADDR(0x3804E8CC); /* 0x38008E5F: fadd dword ptr [0x3804e8cc] */ 6672 edx = eax; /* 0x38008E65: mov edx, eax */ 6673 MEM32(ebp + (-0x1C)) = eax; /* 0x38008E67: mov dword ptr [ebp - 0x1c], eax */ 6674 MEM32(ebp + (-0x24)) = ecx; /* 0x38008E6A: mov dword ptr [ebp - 0x24], ecx */ 6675 eax = ecx; /* 0x38008E6D: mov eax, ecx */ 6676 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x38008E6F: fstp dword ptr [ebp - 0x20] */ 6677 MEM32(ebp + (-0x24)) = ecx; /* 0x38008E72: mov dword ptr [ebp - 0x24], ecx */ 6678 ecx = MEM32(ebp + (-0x20)); /* 0x38008E75: mov ecx, dword ptr [ebp - 0x20] */ 6679 MEM32(ebp + (-0x78)) = eax; /* 0x38008E78: mov dword ptr [ebp - 0x78], eax */ 6680 MEM32(ebp + (-0x74)) = ecx; /* 0x38008E7B: mov dword ptr [ebp - 0x74], ecx */ 6681 MEM32(ebp + (-0x70)) = edx; /* 0x38008E7E: mov dword ptr [ebp - 0x70], edx */ 6682 esi = MEM32(edi + 0x4); /* 0x38008E81: mov esi, dword ptr [edi + 4] */ 6683 /* cmp esi, MEM32(edi + 0x8) */ /* 0x38008E84: cmp esi, dword ptr [edi + 8] */ 6684 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8)); 6685 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6686 _flag_k = FK_CMP; 6687 MEM32(ebp + (-0x1C)) = edx; /* 0x38008E87: mov dword ptr [ebp - 0x1c], edx */ 6688 if (CMP_EQ(_flag_a, _flag_b)) goto L_38008F38; /* 0x38008E8A: je 0x38008f38 */ 6689 L_38008E90: 6690 eax = MEM32(esi); /* 0x38008E90: mov eax, dword ptr [esi] */ 6691 edx = MEM32(eax); /* 0x38008E92: mov edx, dword ptr [eax] */ 6692 ecx = ebx; /* 0x38008E94: mov ecx, ebx */ 6693 MEM32(ebp + (-0x34)) = edx; /* 0x38008E96: mov dword ptr [ebp - 0x34], edx */ 6694 RECOMP_ICALL(0x38018E70u); /* 0x38008E99: call 0x38018e70 */ /* not lifted */ 6695 RECOMP_FLAGS_IN(); 6696 ecx = eax; /* 0x38008E9E: mov ecx, eax */ 6697 RECOMP_ICALL(0x3802BF20u); /* 0x38008EA0: call 0x3802bf20 */ /* not lifted */ 6698 RECOMP_FLAGS_IN(); 6699 edx = MEM32(ebp + (-0x3C)); /* 0x38008EA5: mov edx, dword ptr [ebp - 0x3c] */ 6700 PUSH32(esp, eax); /* 0x38008EA8: push eax */ 6701 eax = MEM32(ebp + (-0x34)); /* 0x38008EA9: mov eax, dword ptr [ebp - 0x34] */ 6702 ecx = ebp + (-0x78); /* 0x38008EAC: lea ecx, [ebp - 0x78] */ 6703 PUSH32(esp, ecx); /* 0x38008EAF: push ecx */ 6704 ecx = MEM32(esi); /* 0x38008EB0: mov ecx, dword ptr [esi] */ 6705 PUSH32(esp, 0); /* 0x38008EB2: push 0 */ 6706 PUSH32(esp, edx); /* 0x38008EB4: push edx */ 6707 RECOMP_ICALL(MEM32(eax + 0xC)); /* 0x38008EB5: call dword ptr [eax + 0xc] */ 6708 RECOMP_FLAGS_IN(); 6709 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804EC10)); /* 0x38008EB8: fcom dword ptr [0x3804ec10] */ 6710 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x38008EBE: fnstsw ax */ 6711 /* test HI8(eax), 1 */ /* 0x38008EC0: test ah, 1 */ 6712 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 6713 _cf = 0; 6714 _flag_k = FK_NARROW(FK_TEST, 24); 6715 if (TEST_Z(_flag_a, _flag_b)) goto L_38008F25; /* 0x38008EC3: je 0x38008f25 */ 6716 L_38008EC5: 6717 ecx = MEM32(edi + 0x4); /* 0x38008EC5: mov ecx, dword ptr [edi + 4] */ 6718 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x7C)) = _v; } /* 0x38008EC8: fstp dword ptr [ebp - 0x7c] */ 6719 ebx = MEM32(ebp + (-0x38)); /* 0x38008ECB: mov ebx, dword ptr [ebp - 0x38] */ 6720 eax = esi; /* 0x38008ECE: mov eax, esi */ 6721 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 6722 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6723 eax = eax - ecx; /* 0x38008ED0: sub eax, ecx */ 6724 _flag_k = FK_CMP; 6725 ecx = MEM32(ebp + (-0x14)); /* 0x38008ED2: mov ecx, dword ptr [ebp - 0x14] */ 6726 ecx = MEM32(ecx); /* 0x38008ED5: mov ecx, dword ptr [ecx] */ 6727 if (2u) _cf = (((eax) >> 1) & 1u); /* 0x38008ED7: sar eax, 2 */ 6728 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6729 eax = (uint32_t)((int32_t)eax >> 2u); 6730 edx = ebp + (-0x84); /* 0x38008EDA: lea edx, [ebp - 0x84] */ 6731 MEM32(ebp + (-0x84)) = ecx; /* 0x38008EE0: mov dword ptr [ebp - 0x84], ecx */ 6732 PUSH32(esp, edx); /* 0x38008EE6: push edx */ 6733 ecx = ebx + 0x1B4; /* 0x38008EE7: lea ecx, [ebx + 0x1b4] */ 6734 MEM32(ebp + (-0x80)) = eax; /* 0x38008EED: mov dword ptr [ebp - 0x80], eax */ 6735 eax = MEM32(ecx + 0x8); /* 0x38008EF0: mov eax, dword ptr [ecx + 8] */ 6736 PUSH32(esp, 1); /* 0x38008EF3: push 1 */ 6737 PUSH32(esp, eax); /* 0x38008EF5: push eax */ 6738 RECOMP_ICALL(0x38009930u); /* 0x38008EF6: call 0x38009930 */ /* not lifted */ 6739 RECOMP_FLAGS_IN(); 6740 ecx = MEM32(edi + 0x4); /* 0x38008EFB: mov ecx, dword ptr [edi + 4] */ 6741 eax = esi; /* 0x38008EFE: mov eax, esi */ 6742 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 6743 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6744 eax = eax - ecx; /* 0x38008F00: sub eax, ecx */ 6745 _flag_k = FK_CMP; 6746 ecx = MEM32(ebp + (-0x14)); /* 0x38008F02: mov ecx, dword ptr [ebp - 0x14] */ 6747 edx = MEM32(ecx); /* 0x38008F05: mov edx, dword ptr [ecx] */ 6748 if (2u) _cf = (((eax) >> 1) & 1u); /* 0x38008F07: sar eax, 2 */ 6749 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6750 eax = (uint32_t)((int32_t)eax >> 2u); 6751 MEM32(ebp + (-0x68)) = eax; /* 0x38008F0A: mov dword ptr [ebp - 0x68], eax */ 6752 eax = ebp + (-0x6C); /* 0x38008F0D: lea eax, [ebp - 0x6c] */ 6753 PUSH32(esp, eax); /* 0x38008F10: push eax */ 6754 ecx = ebp + (-0x8C); /* 0x38008F11: lea ecx, [ebp - 0x8c] */ 6755 PUSH32(esp, ecx); /* 0x38008F17: push ecx */ 6756 ecx = ebp + (-0x64); /* 0x38008F18: lea ecx, [ebp - 0x64] */ 6757 MEM32(ebp + (-0x6C)) = edx; /* 0x38008F1B: mov dword ptr [ebp - 0x6c], edx */ 6758 RECOMP_ICALL(0x38009620u); /* 0x38008F1E: call 0x38009620 */ /* not lifted */ 6759 RECOMP_FLAGS_IN(); 6760 goto L_38008F2A; /* 0x38008F23: jmp 0x38008f2a */ 6761 L_38008F25: 6762 ebx = MEM32(ebp + (-0x38)); /* 0x38008F25: mov ebx, dword ptr [ebp - 0x38] */ 6763 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x38008F28: fstp st(0) */ 6764 L_38008F2A: 6765 eax = MEM32(edi + 0x8); /* 0x38008F2A: mov eax, dword ptr [edi + 8] */ 6766 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 6767 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6768 esi = esi + 4; /* 0x38008F2D: add esi, 4 */ 6769 _flag_k = FK_ADD; 6770 /* cmp esi, eax */ /* 0x38008F30: cmp esi, eax */ 6771 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 6772 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6773 _flag_k = FK_CMP; 6774 RECOMP_BACKEDGE(); 6775 if (CMP_NE(_flag_a, _flag_b)) goto L_38008E90; /* 0x38008F32: jne 0x38008e90 */ 6776 L_38008F38: 6777 ecx = MEM32(ebp + (-0x14)); /* 0x38008F38: mov ecx, dword ptr [ebp - 0x14] */ 6778 eax = MEM32(ebp + (-0x10)); /* 0x38008F3B: mov eax, dword ptr [ebp - 0x10] */ 6779 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 6780 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6781 ecx = ecx + 4; /* 0x38008F3E: add ecx, 4 */ 6782 _flag_k = FK_ADD; 6783 /* cmp ecx, eax */ /* 0x38008F41: cmp ecx, eax */ 6784 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 6785 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6786 _flag_k = FK_CMP; 6787 MEM32(ebp + (-0x14)) = ecx; /* 0x38008F43: mov dword ptr [ebp - 0x14], ecx */ 6788 RECOMP_BACKEDGE(); 6789 if (CMP_NE(_flag_a, _flag_b)) goto L_38008E1C; /* 0x38008F46: jne 0x38008e1c */ 6790 L_38008F4C: 6791 edx = MEM32(ebp + (-0x10)); /* 0x38008F4C: mov edx, dword ptr [ebp - 0x10] */ 6792 eax = MEM32(ebx + 0x1BC); /* 0x38008F4F: mov eax, dword ptr [ebx + 0x1bc] */ 6793 ecx = MEM32(ebx + 0x1B8); /* 0x38008F55: mov ecx, dword ptr [ebx + 0x1b8] */ 6794 PUSH32(esp, 0); /* 0x38008F5B: push 0 */ 6795 PUSH32(esp, edx); /* 0x38008F5D: push edx */ 6796 PUSH32(esp, eax); /* 0x38008F5E: push eax */ 6797 PUSH32(esp, ecx); /* 0x38008F5F: push ecx */ 6798 RECOMP_ICALL(0x3800A160u); /* 0x38008F60: call 0x3800a160 */ /* not lifted */ 6799 RECOMP_FLAGS_IN(); 6800 eax = MEM32(ebp + (-0x40)); /* 0x38008F65: mov eax, dword ptr [ebp - 0x40] */ 6801 ecx = MEM32(ebp + (-0x54)); /* 0x38008F68: mov ecx, dword ptr [ebp - 0x54] */ 6802 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 6803 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6804 esp = esp + 0x10u; /* 0x38008F6B: add esp, 0x10 */ 6805 _flag_k = FK_ADD; 6806 /* cmp eax, ecx */ /* 0x38008F6E: cmp eax, ecx */ 6807 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 6808 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6809 _flag_k = FK_CMP; 6810 if (CMP_NE(_flag_a, _flag_b)) goto L_38009012; /* 0x38008F70: jne 0x38009012 */ 6811 L_38008F76: 6812 ecx = ebp + (-0x10); /* 0x38008F76: lea ecx, [ebp - 0x10] */ 6813 PUSH32(esp, ecx); /* 0x38008F79: push ecx */ 6814 ecx = ebp + (-0x64); /* 0x38008F7A: lea ecx, [ebp - 0x64] */ 6815 RECOMP_ICALL(0x380354C0u); /* 0x38008F7D: call 0x380354c0 */ /* not lifted */ 6816 RECOMP_FLAGS_IN(); 6817 edi = MEM32(eax); /* 0x38008F82: mov edi, dword ptr [eax] */ 6818 edx = ebp + (-0x34); /* 0x38008F84: lea edx, [ebp - 0x34] */ 6819 PUSH32(esp, edx); /* 0x38008F87: push edx */ 6820 ecx = ebp + (-0x50); /* 0x38008F88: lea ecx, [ebp - 0x50] */ 6821 RECOMP_ICALL(0x3800A4D0u); /* 0x38008F8B: call 0x3800a4d0 */ /* not lifted */ 6822 RECOMP_FLAGS_IN(); 6823 esi = MEM32(eax); /* 0x38008F90: mov esi, dword ptr [eax] */ 6824 eax = ebp + (-0x3C); /* 0x38008F92: lea eax, [ebp - 0x3c] */ 6825 PUSH32(esp, eax); /* 0x38008F95: push eax */ 6826 ecx = ebp + (-0x50); /* 0x38008F96: lea ecx, [ebp - 0x50] */ 6827 RECOMP_ICALL(0x380354C0u); /* 0x38008F99: call 0x380354c0 */ /* not lifted */ 6828 RECOMP_FLAGS_IN(); 6829 eax = MEM32(eax); /* 0x38008F9E: mov eax, dword ptr [eax] */ 6830 PUSH32(esp, edi); /* 0x38008FA0: push edi */ 6831 PUSH32(esp, esi); /* 0x38008FA1: push esi */ 6832 PUSH32(esp, eax); /* 0x38008FA2: push eax */ 6833 ecx = ebp + (-0x8C); /* 0x38008FA3: lea ecx, [ebp - 0x8c] */ 6834 PUSH32(esp, ecx); /* 0x38008FA9: push ecx */ 6835 RECOMP_ICALL(0x3800A740u); /* 0x38008FAA: call 0x3800a740 */ /* not lifted */ 6836 RECOMP_FLAGS_IN(); 6837 ecx = MEM32(eax); /* 0x38008FAF: mov ecx, dword ptr [eax] */ 6838 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 6839 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6840 esp = esp + 0x10u; /* 0x38008FB1: add esp, 0x10 */ 6841 _flag_k = FK_ADD; 6842 /* cmp ecx, esi */ /* 0x38008FB4: cmp ecx, esi */ 6843 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi); 6844 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6845 _flag_k = FK_CMP; 6846 if (CMP_NE(_flag_a, _flag_b)) goto L_38009012; /* 0x38008FB6: jne 0x38009012 */ 6847 L_38008FB8: 6848 eax = MEM32(ebx + 0x1B8); /* 0x38008FB8: mov eax, dword ptr [ebx + 0x1b8] */ 6849 /* test eax, eax */ /* 0x38008FBE: test eax, eax */ 6850 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6851 _cf = 0; 6852 _flag_k = FK_TEST; 6853 if (TEST_Z(_flag_a, _flag_b)) goto L_3800901C; /* 0x38008FC0: je 0x3800901c */ 6854 L_38008FC2: 6855 ecx = MEM32(ebx + 0x1BC); /* 0x38008FC2: mov ecx, dword ptr [ebx + 0x1bc] */ 6856 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 6857 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6858 ecx = ecx - eax; /* 0x38008FC8: sub ecx, eax */ 6859 _flag_k = FK_CMP; 6860 eax = 0x2AAAAAABu; /* 0x38008FCA: mov eax, 0x2aaaaaab */ 6861 { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x38008FCF: imul ecx */ 6862 eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r; 6863 _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; } 6864 if (1u) _cf = (((edx) >> 0) & 1u); /* 0x38008FD1: sar edx, 1 */ 6865 if (1u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 1u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6866 edx = (uint32_t)((int32_t)edx >> 1u); 6867 eax = edx; /* 0x38008FD3: mov eax, edx */ 6868 if (31u) _cf = (((eax) >> 30) & 1u); /* 0x38008FD5: shr eax, 0x1f */ 6869 if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6870 eax = eax >> 31u; /* 0x38008FD5: shr eax, 0x1f */ 6871 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 6872 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6873 edx = edx + eax; /* 0x38008FD8: add edx, eax */ 6874 _flag_k = FK_ADD; 6875 if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_3800901C; /* 0x38008FDA: je 0x3800901c */ 6876 L_38008FDC: 6877 eax = MEM32(ebx + 0x1B8); /* 0x38008FDC: mov eax, dword ptr [ebx + 0x1b8] */ 6878 ecx = MEM32(ebp + (-0x30)); /* 0x38008FE2: mov ecx, dword ptr [ebp - 0x30] */ 6879 /* cmp MEM32(eax), ecx */ /* 0x38008FE5: cmp dword ptr [eax], ecx */ 6880 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(ecx); 6881 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6882 _flag_k = FK_CMP; 6883 if (CMP_NE(_flag_a, _flag_b)) goto L_38009012; /* 0x38008FE7: jne 0x38009012 */ 6884 L_38008FE9: 6885 edx = MEM32(ebp + (-0x2C)); /* 0x38008FE9: mov edx, dword ptr [ebp - 0x2c] */ 6886 /* cmp MEM32(eax + 0x4), edx */ /* 0x38008FEC: cmp dword ptr [eax + 4], edx */ 6887 _flag_a = (uint32_t)(MEM32(eax + 0x4)); _flag_b = (uint32_t)(edx); 6888 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6889 _flag_k = FK_CMP; 6890 if (CMP_NE(_flag_a, _flag_b)) goto L_38009012; /* 0x38008FEF: jne 0x38009012 */ 6891 L_38008FF1: 6892 /* test eax, eax */ /* 0x38008FF1: test eax, eax */ 6893 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6894 _cf = 0; 6895 _flag_k = FK_TEST; 6896 if (TEST_Z(_flag_a, _flag_b)) goto L_3800901C; /* 0x38008FF3: je 0x3800901c */ 6897 L_38008FF5: 6898 ecx = MEM32(ebx + 0x1BC); /* 0x38008FF5: mov ecx, dword ptr [ebx + 0x1bc] */ 6899 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 6900 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6901 ecx = ecx - eax; /* 0x38008FFB: sub ecx, eax */ 6902 _flag_k = FK_CMP; 6903 eax = 0x2AAAAAABu; /* 0x38008FFD: mov eax, 0x2aaaaaab */ 6904 { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x38009002: imul ecx */ 6905 eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r; 6906 _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; } 6907 if (1u) _cf = (((edx) >> 0) & 1u); /* 0x38009004: sar edx, 1 */ 6908 if (1u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 1u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6909 edx = (uint32_t)((int32_t)edx >> 1u); 6910 eax = edx; /* 0x38009006: mov eax, edx */ 6911 if (31u) _cf = (((eax) >> 30) & 1u); /* 0x38009008: shr eax, 0x1f */ 6912 if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6913 eax = eax >> 31u; /* 0x38009008: shr eax, 0x1f */ 6914 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 6915 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6916 edx = edx + eax; /* 0x3800900B: add edx, eax */ 6917 _flag_k = FK_ADD; 6918 /* cmp edx, 1 */ /* 0x3800900D: cmp edx, 1 */ 6919 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1); 6920 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6921 _flag_k = FK_CMP; 6922 if (CMP_NE(_flag_a, _flag_b)) goto L_3800901C; /* 0x38009010: jne 0x3800901c */ 6923 L_38009012: 6924 MEM32(ebx + 0x1C4) = 0xFFFFFFFFu; /* 0x38009012: mov dword ptr [ebx + 0x1c4], 0xffffffff */ 6925 L_3800901C: 6926 eax = MEM32(ebp + (-0x60)); /* 0x3800901C: mov eax, dword ptr [ebp - 0x60] */ 6927 ecx = MEM32(eax); /* 0x3800901F: mov ecx, dword ptr [eax] */ 6928 PUSH32(esp, eax); /* 0x38009021: push eax */ 6929 PUSH32(esp, ecx); /* 0x38009022: push ecx */ 6930 ecx = ebp + (-0x10); /* 0x38009023: lea ecx, [ebp - 0x10] */ 6931 PUSH32(esp, ecx); /* 0x38009026: push ecx */ 6932 ecx = ebp + (-0x64); /* 0x38009027: lea ecx, [ebp - 0x64] */ 6933 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x3800902A: mov byte ptr [ebp - 4], 0 */ 6934 RECOMP_ICALL(0x38009880u); /* 0x3800902E: call 0x38009880 */ /* not lifted */ 6935 RECOMP_FLAGS_IN(); 6936 edx = MEM32(ebp + (-0x60)); /* 0x38009033: mov edx, dword ptr [ebp - 0x60] */ 6937 PUSH32(esp, edx); /* 0x38009036: push edx */ 6938 RECOMP_ICALL(0x3804B4F6u); /* 0x38009037: call 0x3804b4f6 */ /* not lifted */ 6939 RECOMP_FLAGS_IN(); 6940 eax = MEM32(ebp + (-0x5C)); /* 0x3800903C: mov eax, dword ptr [ebp - 0x5c] */ 6941 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6942 esi = 0; /* 0x3800903F: xor esi, esi */ 6943 _cf = 0; 6944 _flag_k = FK_TEST; 6945 PUSH32(esp, eax); /* 0x38009041: push eax */ 6946 MEM32(ebp + (-0x60)) = esi; /* 0x38009042: mov dword ptr [ebp - 0x60], esi */ 6947 MEM32(ebp + (-0x54)) = esi; /* 0x38009045: mov dword ptr [ebp - 0x54], esi */ 6948 RECOMP_ICALL(0x3804B4F6u); /* 0x38009048: call 0x3804b4f6 */ /* not lifted */ 6949 RECOMP_FLAGS_IN(); 6950 eax = MEM32(ebp + (-0x4C)); /* 0x3800904D: mov eax, dword ptr [ebp - 0x4c] */ 6951 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6952 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6953 esp = esp + 8; /* 0x38009050: add esp, 8 */ 6954 _flag_k = FK_ADD; 6955 MEM32(ebp + (-0x5C)) = esi; /* 0x38009053: mov dword ptr [ebp - 0x5c], esi */ 6956 ecx = MEM32(eax); /* 0x38009056: mov ecx, dword ptr [eax] */ 6957 PUSH32(esp, eax); /* 0x38009058: push eax */ 6958 PUSH32(esp, ecx); /* 0x38009059: push ecx */ 6959 ecx = ebp + (-0x10); /* 0x3800905A: lea ecx, [ebp - 0x10] */ 6960 PUSH32(esp, ecx); /* 0x3800905D: push ecx */ 6961 ecx = ebp + (-0x50); /* 0x3800905E: lea ecx, [ebp - 0x50] */ 6962 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x38009061: mov dword ptr [ebp - 4], 0xffffffff */ 6963 RECOMP_ICALL(0x38009880u); /* 0x38009068: call 0x38009880 */ /* not lifted */ 6964 RECOMP_FLAGS_IN(); 6965 edx = MEM32(ebp + (-0x4C)); /* 0x3800906D: mov edx, dword ptr [ebp - 0x4c] */ 6966 PUSH32(esp, edx); /* 0x38009070: push edx */ 6967 RECOMP_ICALL(0x3804B4F6u); /* 0x38009071: call 0x3804b4f6 */ /* not lifted */ 6968 RECOMP_FLAGS_IN(); 6969 eax = MEM32(ebp + (-0x48)); /* 0x38009076: mov eax, dword ptr [ebp - 0x48] */ 6970 PUSH32(esp, eax); /* 0x38009079: push eax */ 6971 MEM32(ebp + (-0x4C)) = esi; /* 0x3800907A: mov dword ptr [ebp - 0x4c], esi */ 6972 MEM32(ebp + (-0x40)) = esi; /* 0x3800907D: mov dword ptr [ebp - 0x40], esi */ 6973 RECOMP_ICALL(0x3804B4F6u); /* 0x38009080: call 0x3804b4f6 */ /* not lifted */ 6974 RECOMP_FLAGS_IN(); 6975 ecx = MEM32(ebp + (-0xC)); /* 0x38009085: mov ecx, dword ptr [ebp - 0xc] */ 6976 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6977 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6978 esp = esp + 8; /* 0x38009088: add esp, 8 */ 6979 _flag_k = FK_ADD; 6980 edi = POP32_VAL(esp); /* 0x3800908B: pop edi */ 6981 esi = POP32_VAL(esp); /* 0x3800908C: pop esi */ 6982 ebx = POP32_VAL(esp); /* 0x3800908D: pop ebx */ 6983 MEM32(FS_BASE + (0)) = ecx; /* 0x3800908E: mov dword ptr fs:[0], ecx */ 6984 esp = ebp; /* 0x38009095: mov esp, ebp */ 6985 ebp = POP32_VAL(esp); /* 0x38009097: pop ebp */ 6986 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38009098: ret */ 6987 RECOMP_REGS_OUT(); 6988 } 6989 6990 void sub_380090A0(void) { 6991 int _fpu_cmp = 0; 6992 uint32_t _cf = 0; 6993 int _df = 1; 6994 uint32_t _flag_k = FK_NONE; 6995 uint32_t _flag_a = 0, _flag_b = 0; 6996 uint32_t _itail_tgt = 0; 6997 RECOMP_REGS_LOCALS 6998 RECOMP_ENTER(0x380090A0u); 6999 7000 L_380090A0: 7001 PUSH32(esp, ebp); /* 0x380090A0: push ebp */ 7002 ebp = esp; /* 0x380090A1: mov ebp, esp */ 7003 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 7004 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7005 esp = esp - 8; /* 0x380090A3: sub esp, 8 */ 7006 _flag_k = FK_CMP; 7007 PUSH32(esp, ebx); /* 0x380090A6: push ebx */ 7008 PUSH32(esp, esi); /* 0x380090A7: push esi */ 7009 esi = ecx; /* 0x380090A8: mov esi, ecx */ 7010 ecx = MEM32(esi + 0x10); /* 0x380090AA: mov ecx, dword ptr [esi + 0x10] */ 7011 /* test ecx, ecx */ /* 0x380090AD: test ecx, ecx */ 7012 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 7013 _cf = 0; 7014 _flag_k = FK_TEST; 7015 PUSH32(esp, edi); /* 0x380090AF: push edi */ 7016 edi = MEM32(esi + 0x4); /* 0x380090B0: mov edi, dword ptr [esi + 4] */ 7017 eax = MEM32(edi); /* 0x380090B3: mov eax, dword ptr [edi] */ 7018 MEM32(ebp + (-0x4)) = eax; /* 0x380090B5: mov dword ptr [ebp - 4], eax */ 7019 if (TEST_Z(_flag_a, _flag_b)) goto L_38009115; /* 0x380090B8: je 0x38009115 */ 7020 L_380090BA: 7021 ecx = eax; /* 0x380090BA: mov ecx, eax */ 7022 /* cmp eax, ecx */ /* 0x380090BC: cmp eax, ecx */ 7023 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 7024 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7025 _flag_k = FK_CMP; 7026 if (CMP_NE(_flag_a, _flag_b)) goto L_38009115; /* 0x380090BE: jne 0x38009115 */ 7027 L_380090C0: 7028 /* cmp edi, edi */ /* 0x380090C0: cmp edi, edi */ 7029 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 7030 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7031 _flag_k = FK_CMP; 7032 if (CMP_NE(_flag_a, _flag_b)) goto L_38009115; /* 0x380090C2: jne 0x38009115 */ 7033 L_380090C4: 7034 ebx = MEM32(edi + 0x4); /* 0x380090C4: mov ebx, dword ptr [edi + 4] */ 7035 /* cmp ebx, MEM32(esi + 0x8) */ /* 0x380090C7: cmp ebx, dword ptr [esi + 8] */ 7036 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 7037 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7038 _flag_k = FK_CMP; 7039 edi = ebx; /* 0x380090CA: mov edi, ebx */ 7040 if (CMP_EQ(_flag_a, _flag_b)) goto L_380090ED; /* 0x380090CC: je 0x380090ed */ 7041 L_380090CE: 7042 eax = MEM32(edi + 0x8); /* 0x380090CE: mov eax, dword ptr [edi + 8] */ 7043 PUSH32(esp, eax); /* 0x380090D1: push eax */ 7044 ecx = esi; /* 0x380090D2: mov ecx, esi */ 7045 RECOMP_ICALL(0x38009E70u); /* 0x380090D4: call 0x38009e70 */ /* not lifted */ 7046 RECOMP_FLAGS_IN(); 7047 edi = MEM32(edi); /* 0x380090D9: mov edi, dword ptr [edi] */ 7048 PUSH32(esp, ebx); /* 0x380090DB: push ebx */ 7049 RECOMP_ICALL(0x3804B4F6u); /* 0x380090DC: call 0x3804b4f6 */ /* not lifted */ 7050 RECOMP_FLAGS_IN(); 7051 eax = MEM32(esi + 0x8); /* 0x380090E1: mov eax, dword ptr [esi + 8] */ 7052 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7053 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7054 esp = esp + 4; /* 0x380090E4: add esp, 4 */ 7055 _flag_k = FK_ADD; 7056 /* cmp edi, eax */ /* 0x380090E7: cmp edi, eax */ 7057 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 7058 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7059 _flag_k = FK_CMP; 7060 ebx = edi; /* 0x380090E9: mov ebx, edi */ 7061 RECOMP_BACKEDGE(); 7062 if (CMP_NE(_flag_a, _flag_b)) goto L_380090CE; /* 0x380090EB: jne 0x380090ce */ 7063 L_380090ED: 7064 ecx = MEM32(esi + 0x4); /* 0x380090ED: mov ecx, dword ptr [esi + 4] */ 7065 edx = MEM32(esi + 0x8); /* 0x380090F0: mov edx, dword ptr [esi + 8] */ 7066 MEM32(ecx + 0x4) = edx; /* 0x380090F3: mov dword ptr [ecx + 4], edx */ 7067 eax = MEM32(esi + 0x4); /* 0x380090F6: mov eax, dword ptr [esi + 4] */ 7068 MEM32(esi + 0x10) = 0; /* 0x380090F9: mov dword ptr [esi + 0x10], 0 */ 7069 MEM32(eax) = eax; /* 0x38009100: mov dword ptr [eax], eax */ 7070 eax = MEM32(esi + 0x4); /* 0x38009102: mov eax, dword ptr [esi + 4] */ 7071 MEM32(eax + 0x8) = eax; /* 0x38009105: mov dword ptr [eax + 8], eax */ 7072 eax = ebp + (-0x8); /* 0x38009108: lea eax, [ebp - 8] */ 7073 PUSH32(esp, eax); /* 0x3800910B: push eax */ 7074 ecx = esi; /* 0x3800910C: mov ecx, esi */ 7075 RECOMP_ICALL(0x380354C0u); /* 0x3800910E: call 0x380354c0 */ /* not lifted */ 7076 RECOMP_FLAGS_IN(); 7077 goto L_38009136; /* 0x38009113: jmp 0x38009136 */ 7078 L_38009115: 7079 /* cmp eax, edi */ /* 0x38009115: cmp eax, edi */ 7080 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 7081 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7082 _flag_k = FK_CMP; 7083 if (CMP_EQ(_flag_a, _flag_b)) goto L_38009136; /* 0x38009117: je 0x38009136 */ 7084 L_38009119: 7085 ecx = ebp + (-0x4); /* 0x38009119: lea ecx, [ebp - 4] */ 7086 ebx = eax; /* 0x3800911C: mov ebx, eax */ 7087 RECOMP_ICALL(0x38035590u); /* 0x3800911E: call 0x38035590 */ /* not lifted */ 7088 RECOMP_FLAGS_IN(); 7089 PUSH32(esp, ebx); /* 0x38009123: push ebx */ 7090 ecx = ebp + (-0x8); /* 0x38009124: lea ecx, [ebp - 8] */ 7091 PUSH32(esp, ecx); /* 0x38009127: push ecx */ 7092 ecx = esi; /* 0x38009128: mov ecx, esi */ 7093 RECOMP_ICALL(0x3800F9D0u); /* 0x3800912A: call 0x3800f9d0 */ /* not lifted */ 7094 RECOMP_FLAGS_IN(); 7095 eax = MEM32(ebp + (-0x4)); /* 0x3800912F: mov eax, dword ptr [ebp - 4] */ 7096 /* cmp eax, edi */ /* 0x38009132: cmp eax, edi */ 7097 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 7098 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7099 _flag_k = FK_CMP; 7100 RECOMP_BACKEDGE(); 7101 if (CMP_NE(_flag_a, _flag_b)) goto L_38009119; /* 0x38009134: jne 0x38009119 */ 7102 L_38009136: 7103 edx = MEM32(esi + 0x4); /* 0x38009136: mov edx, dword ptr [esi + 4] */ 7104 PUSH32(esp, edx); /* 0x38009139: push edx */ 7105 RECOMP_ICALL(0x3804B4F6u); /* 0x3800913A: call 0x3804b4f6 */ /* not lifted */ 7106 RECOMP_FLAGS_IN(); 7107 eax = MEM32(esi + 0x8); /* 0x3800913F: mov eax, dword ptr [esi + 8] */ 7108 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7109 edi = 0; /* 0x38009142: xor edi, edi */ 7110 _cf = 0; 7111 _flag_k = FK_TEST; 7112 PUSH32(esp, eax); /* 0x38009144: push eax */ 7113 MEM32(esi + 0x4) = edi; /* 0x38009145: mov dword ptr [esi + 4], edi */ 7114 MEM32(esi + 0x10) = edi; /* 0x38009148: mov dword ptr [esi + 0x10], edi */ 7115 RECOMP_ICALL(0x3804B4F6u); /* 0x3800914B: call 0x3804b4f6 */ /* not lifted */ 7116 RECOMP_FLAGS_IN(); 7117 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 7118 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7119 esp = esp + 8; /* 0x38009150: add esp, 8 */ 7120 _flag_k = FK_ADD; 7121 MEM32(esi + 0x8) = edi; /* 0x38009153: mov dword ptr [esi + 8], edi */ 7122 edi = POP32_VAL(esp); /* 0x38009156: pop edi */ 7123 esi = POP32_VAL(esp); /* 0x38009157: pop esi */ 7124 ebx = POP32_VAL(esp); /* 0x38009158: pop ebx */ 7125 esp = ebp; /* 0x38009159: mov esp, ebp */ 7126 ebp = POP32_VAL(esp); /* 0x3800915B: pop ebp */ 7127 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3800915C: ret */ 7128 RECOMP_REGS_OUT(); 7129 } 7130 7131 void sub_38009136(void) { 7132 int _fpu_cmp = 0; 7133 uint32_t _cf = 0; 7134 int _df = 1; 7135 uint32_t _flag_k = FK_NONE; 7136 uint32_t _flag_a = 0, _flag_b = 0; 7137 uint32_t _itail_tgt = 0; 7138 RECOMP_REGS_LOCALS 7139 RECOMP_ENTER(0x38009136u); 7140 7141 L_38009136: 7142 edx = MEM32(esi + 0x4); /* 0x38009136: mov edx, dword ptr [esi + 4] */ 7143 PUSH32(esp, edx); /* 0x38009139: push edx */ 7144 RECOMP_ICALL(0x3804B4F6u); /* 0x3800913A: call 0x3804b4f6 */ /* not lifted */ 7145 RECOMP_FLAGS_IN(); 7146 eax = MEM32(esi + 0x8); /* 0x3800913F: mov eax, dword ptr [esi + 8] */ 7147 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7148 edi = 0; /* 0x38009142: xor edi, edi */ 7149 _cf = 0; 7150 _flag_k = FK_TEST; 7151 PUSH32(esp, eax); /* 0x38009144: push eax */ 7152 MEM32(esi + 0x4) = edi; /* 0x38009145: mov dword ptr [esi + 4], edi */ 7153 MEM32(esi + 0x10) = edi; /* 0x38009148: mov dword ptr [esi + 0x10], edi */ 7154 RECOMP_ICALL(0x3804B4F6u); /* 0x3800914B: call 0x3804b4f6 */ /* not lifted */ 7155 RECOMP_FLAGS_IN(); 7156 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 7157 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7158 esp = esp + 8; /* 0x38009150: add esp, 8 */ 7159 _flag_k = FK_ADD; 7160 MEM32(esi + 0x8) = edi; /* 0x38009153: mov dword ptr [esi + 8], edi */ 7161 edi = POP32_VAL(esp); /* 0x38009156: pop edi */ 7162 esi = POP32_VAL(esp); /* 0x38009157: pop esi */ 7163 ebx = POP32_VAL(esp); /* 0x38009158: pop ebx */ 7164 esp = ebp; /* 0x38009159: mov esp, ebp */ 7165 ebp = POP32_VAL(esp); /* 0x3800915B: pop ebp */ 7166 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3800915C: ret */ 7167 RECOMP_REGS_OUT(); 7168 } 7169 7170 void sub_38009160(void) { 7171 int _fpu_cmp = 0; 7172 uint32_t _cf = 0; 7173 int _df = 1; 7174 uint32_t _flag_k = FK_NONE; 7175 uint32_t _flag_a = 0, _flag_b = 0; 7176 uint32_t _itail_tgt = 0; 7177 RECOMP_REGS_LOCALS 7178 RECOMP_ENTER(0x38009160u); 7179 7180 L_38009160: 7181 PUSH32(esp, esi); /* 0x38009160: push esi */ 7182 esi = ecx; /* 0x38009161: mov esi, ecx */ 7183 ecx = MEM32(esi + 0x60); /* 0x38009163: mov ecx, dword ptr [esi + 0x60] */ 7184 PUSH32(esp, 0); /* 0x38009166: push 0 */ 7185 RECOMP_ICALL(0x380041D0u); /* 0x38009168: call 0x380041d0 */ /* not lifted */ 7186 RECOMP_FLAGS_IN(); 7187 ecx = esi; /* 0x3800916D: mov ecx, esi */ 7188 RECOMP_ICALL(0x380082A0u); /* 0x3800916F: call 0x380082a0 */ /* not lifted */ 7189 RECOMP_FLAGS_IN(); 7190 /* test eax, eax */ /* 0x38009174: test eax, eax */ 7191 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7192 _cf = 0; 7193 _flag_k = FK_TEST; 7194 if (TEST_Z(_flag_a, _flag_b)) goto L_380091B4; /* 0x38009176: je 0x380091b4 */ 7195 L_38009178: 7196 ecx = esi; /* 0x38009178: mov ecx, esi */ 7197 RECOMP_ICALL(0x380082A0u); /* 0x3800917A: call 0x380082a0 */ /* not lifted */ 7198 RECOMP_FLAGS_IN(); 7199 /* cmp eax, 1 */ /* 0x3800917F: cmp eax, 1 */ 7200 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 7201 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7202 _flag_k = FK_CMP; 7203 if (CMP_NE(_flag_a, _flag_b)) goto L_38009188; /* 0x38009182: jne 0x38009188 */ 7204 L_38009184: 7205 PUSH32(esp, 3); /* 0x38009184: push 3 */ 7206 goto L_380091A6; /* 0x38009186: jmp 0x380091a6 */ 7207 L_38009188: 7208 ecx = esi; /* 0x38009188: mov ecx, esi */ 7209 RECOMP_ICALL(0x380082A0u); /* 0x3800918A: call 0x380082a0 */ /* not lifted */ 7210 RECOMP_FLAGS_IN(); 7211 /* cmp eax, 3 */ /* 0x3800918F: cmp eax, 3 */ 7212 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(3); 7213 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7214 _flag_k = FK_CMP; 7215 if (CMP_NE(_flag_a, _flag_b)) goto L_38009198; /* 0x38009192: jne 0x38009198 */ 7216 L_38009194: 7217 PUSH32(esp, 2); /* 0x38009194: push 2 */ 7218 goto L_380091A6; /* 0x38009196: jmp 0x380091a6 */ 7219 L_38009198: 7220 ecx = esi; /* 0x38009198: mov ecx, esi */ 7221 RECOMP_ICALL(0x380082A0u); /* 0x3800919A: call 0x380082a0 */ /* not lifted */ 7222 RECOMP_FLAGS_IN(); 7223 /* cmp eax, 2 */ /* 0x3800919F: cmp eax, 2 */ 7224 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2); 7225 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7226 _flag_k = FK_CMP; 7227 if (CMP_NE(_flag_a, _flag_b)) goto L_380091B4; /* 0x380091A2: jne 0x380091b4 */ 7228 L_380091A4: 7229 PUSH32(esp, 1); /* 0x380091A4: push 1 */ 7230 L_380091A6: 7231 ecx = esi; /* 0x380091A6: mov ecx, esi */ 7232 RECOMP_ICALL(0x38008270u); /* 0x380091A8: call 0x38008270 */ /* not lifted */ 7233 RECOMP_FLAGS_IN(); 7234 ecx = esi; /* 0x380091AD: mov ecx, esi */ 7235 RECOMP_ICALL(0x38008030u); /* 0x380091AF: call 0x38008030 */ /* not lifted */ 7236 RECOMP_FLAGS_IN(); 7237 L_380091B4: 7238 eax = MEM32(esi + 0x1C4); /* 0x380091B4: mov eax, dword ptr [esi + 0x1c4] */ 7239 esi = POP32_VAL(esp); /* 0x380091BA: pop esi */ 7240 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380091BB: ret */ 7241 RECOMP_REGS_OUT(); 7242 } 7243 7244 void sub_380091C0(void) { 7245 int _fpu_cmp = 0; 7246 uint32_t _cf = 0; 7247 int _df = 1; 7248 uint32_t _flag_k = FK_NONE; 7249 uint32_t _flag_a = 0, _flag_b = 0; 7250 uint32_t _itail_tgt = 0; 7251 RECOMP_REGS_LOCALS 7252 RECOMP_ENTER(0x380091C0u); 7253 7254 L_380091C0: 7255 PUSH32(esp, ebp); /* 0x380091C0: push ebp */ 7256 ebp = esp; /* 0x380091C1: mov ebp, esp */ 7257 PUSH32(esp, ecx); /* 0x380091C3: push ecx */ 7258 PUSH32(esp, ebx); /* 0x380091C4: push ebx */ 7259 PUSH32(esp, esi); /* 0x380091C5: push esi */ 7260 esi = ecx; /* 0x380091C6: mov esi, ecx */ 7261 eax = MEM32(esi + 0x1B8); /* 0x380091C8: mov eax, dword ptr [esi + 0x1b8] */ 7262 /* test eax, eax */ /* 0x380091CE: test eax, eax */ 7263 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7264 _cf = 0; 7265 _flag_k = FK_TEST; 7266 PUSH32(esp, edi); /* 0x380091D0: push edi */ 7267 MEM32(ebp + (-0x4)) = 0; /* 0x380091D1: mov dword ptr [ebp - 4], 0 */ 7268 if (TEST_Z(_flag_a, _flag_b)) goto L_38009295; /* 0x380091D8: je 0x38009295 */ 7269 L_380091DE: 7270 ecx = MEM32(esi + 0x1BC); /* 0x380091DE: mov ecx, dword ptr [esi + 0x1bc] */ 7271 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7272 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7273 ecx = ecx - eax; /* 0x380091E4: sub ecx, eax */ 7274 _flag_k = FK_CMP; 7275 eax = 0x2AAAAAABu; /* 0x380091E6: mov eax, 0x2aaaaaab */ 7276 { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x380091EB: imul ecx */ 7277 eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r; 7278 _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; } 7279 if (1u) _cf = (((edx) >> 0) & 1u); /* 0x380091ED: sar edx, 1 */ 7280 if (1u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 1u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7281 edx = (uint32_t)((int32_t)edx >> 1u); 7282 eax = edx; /* 0x380091EF: mov eax, edx */ 7283 if (31u) _cf = (((eax) >> 30) & 1u); /* 0x380091F1: shr eax, 0x1f */ 7284 if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7285 eax = eax >> 31u; /* 0x380091F1: shr eax, 0x1f */ 7286 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 7287 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7288 edx = edx + eax; /* 0x380091F4: add edx, eax */ 7289 _flag_k = FK_ADD; 7290 if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_38009295; /* 0x380091F6: je 0x38009295 */ 7291 L_380091FC: 7292 eax = MEM32(esi + 0x1C4); /* 0x380091FC: mov eax, dword ptr [esi + 0x1c4] */ 7293 /* test eax, eax */ /* 0x38009202: test eax, eax */ 7294 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7295 _cf = 0; 7296 _flag_k = FK_TEST; 7297 if (TEST_Z(_flag_a, _flag_b)) goto L_3800920F; /* 0x38009204: je 0x3800920f */ 7298 L_38009206: 7299 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 7300 eax = eax - 1; /* 0x38009206: dec eax */ 7301 _flag_k = FK_DEC; 7302 MEM32(esi + 0x1C4) = eax; /* 0x38009207: mov dword ptr [esi + 0x1c4], eax */ 7303 goto L_3800923C; /* 0x3800920D: jmp 0x3800923c */ 7304 L_3800920F: 7305 eax = MEM32(esi + 0x1B8); /* 0x3800920F: mov eax, dword ptr [esi + 0x1b8] */ 7306 /* test eax, eax */ /* 0x38009215: test eax, eax */ 7307 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7308 _cf = 0; 7309 _flag_k = FK_TEST; 7310 if (TEST_NZ(_flag_a, _flag_b)) goto L_3800921D; /* 0x38009217: jne 0x3800921d */ 7311 L_38009219: 7312 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7313 edx = 0; /* 0x38009219: xor edx, edx */ 7314 _cf = 0; 7315 _flag_k = FK_TEST; 7316 goto L_38009235; /* 0x3800921B: jmp 0x38009235 */ 7317 L_3800921D: 7318 ecx = MEM32(esi + 0x1BC); /* 0x3800921D: mov ecx, dword ptr [esi + 0x1bc] */ 7319 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7320 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7321 ecx = ecx - eax; /* 0x38009223: sub ecx, eax */ 7322 _flag_k = FK_CMP; 7323 eax = 0x2AAAAAABu; /* 0x38009225: mov eax, 0x2aaaaaab */ 7324 { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x3800922A: imul ecx */ 7325 eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r; 7326 _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; } 7327 if (1u) _cf = (((edx) >> 0) & 1u); /* 0x3800922C: sar edx, 1 */ 7328 if (1u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 1u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7329 edx = (uint32_t)((int32_t)edx >> 1u); 7330 ecx = edx; /* 0x3800922E: mov ecx, edx */ 7331 if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x38009230: shr ecx, 0x1f */ 7332 if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7333 ecx = ecx >> 31u; /* 0x38009230: shr ecx, 0x1f */ 7334 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx); 7335 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7336 edx = edx + ecx; /* 0x38009233: add edx, ecx */ 7337 _flag_k = FK_ADD; 7338 L_38009235: 7339 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1); 7340 edx = edx - 1; /* 0x38009235: dec edx */ 7341 _flag_k = FK_DEC; 7342 MEM32(esi + 0x1C4) = edx; /* 0x38009236: mov dword ptr [esi + 0x1c4], edx */ 7343 L_3800923C: 7344 eax = MEM32(esi + 0x1C4); /* 0x3800923C: mov eax, dword ptr [esi + 0x1c4] */ 7345 ecx = MEM32(esi + 0x78); /* 0x38009242: mov ecx, dword ptr [esi + 0x78] */ 7346 edx = eax + eax * 2; /* 0x38009245: lea edx, [eax + eax*2] */ 7347 eax = MEM32(esi + 0x1B8); /* 0x38009248: mov eax, dword ptr [esi + 0x1b8] */ 7348 edi = MEM32(eax + edx * 4); /* 0x3800924E: mov edi, dword ptr [eax + edx*4] */ 7349 ebx = MEM32(eax + edx * 4 + 0x4); /* 0x38009251: mov ebx, dword ptr [eax + edx*4 + 4] */ 7350 eax = eax + edx * 4; /* 0x38009255: lea eax, [eax + edx*4] */ 7351 PUSH32(esp, ecx); /* 0x38009258: push ecx */ 7352 RECOMP_ICALL(0x380295A0u); /* 0x38009259: call 0x380295a0 */ /* not lifted */ 7353 RECOMP_FLAGS_IN(); 7354 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7355 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7356 esp = esp + 4; /* 0x3800925E: add esp, 4 */ 7357 _flag_k = FK_ADD; 7358 /* test eax, eax */ /* 0x38009261: test eax, eax */ 7359 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7360 _cf = 0; 7361 _flag_k = FK_TEST; 7362 if (TEST_Z(_flag_a, _flag_b)) goto L_38009295; /* 0x38009263: je 0x38009295 */ 7363 L_38009265: 7364 /* cmp edi, 0xFFFFFFFFu */ /* 0x38009265: cmp edi, -1 */ 7365 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFFu); 7366 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7367 _flag_k = FK_CMP; 7368 if (CMP_EQ(_flag_a, _flag_b)) goto L_38009295; /* 0x38009268: je 0x38009295 */ 7369 L_3800926A: 7370 edx = MEM32(esi + 0x78); /* 0x3800926A: mov edx, dword ptr [esi + 0x78] */ 7371 PUSH32(esp, edi); /* 0x3800926D: push edi */ 7372 PUSH32(esp, edx); /* 0x3800926E: push edx */ 7373 RECOMP_ICALL(0x380295A0u); /* 0x3800926F: call 0x380295a0 */ /* not lifted */ 7374 RECOMP_FLAGS_IN(); 7375 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7376 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7377 esp = esp + 4; /* 0x38009274: add esp, 4 */ 7378 _flag_k = FK_ADD; 7379 ecx = eax; /* 0x38009277: mov ecx, eax */ 7380 RECOMP_ICALL(0x3802B990u); /* 0x38009279: call 0x3802b990 */ /* not lifted */ 7381 RECOMP_FLAGS_IN(); 7382 ecx = MEM32(eax + 0x28); /* 0x3800927E: mov ecx, dword ptr [eax + 0x28] */ 7383 /* test ecx, ecx */ /* 0x38009281: test ecx, ecx */ 7384 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 7385 _cf = 0; 7386 _flag_k = FK_TEST; 7387 if (TEST_Z(_flag_a, _flag_b)) goto L_38009295; /* 0x38009283: je 0x38009295 */ 7388 L_38009285: 7389 ecx = eax; /* 0x38009285: mov ecx, eax */ 7390 RECOMP_ICALL(0x3803EC10u); /* 0x38009287: call 0x3803ec10 */ /* not lifted */ 7391 RECOMP_FLAGS_IN(); 7392 eax = MEM32(eax + 0x4); /* 0x3800928C: mov eax, dword ptr [eax + 4] */ 7393 ecx = MEM32(eax + ebx * 4); /* 0x3800928F: mov ecx, dword ptr [eax + ebx*4] */ 7394 MEM32(ebp + (-0x4)) = ecx; /* 0x38009292: mov dword ptr [ebp - 4], ecx */ 7395 L_38009295: 7396 edx = MEM32(ebp + (-0x4)); /* 0x38009295: mov edx, dword ptr [ebp - 4] */ 7397 ecx = MEM32(esi + 0x60); /* 0x38009298: mov ecx, dword ptr [esi + 0x60] */ 7398 PUSH32(esp, edx); /* 0x3800929B: push edx */ 7399 RECOMP_ICALL(0x380041D0u); /* 0x3800929C: call 0x380041d0 */ /* not lifted */ 7400 RECOMP_FLAGS_IN(); 7401 eax = MEM32(esi + 0x1C4); /* 0x380092A1: mov eax, dword ptr [esi + 0x1c4] */ 7402 edi = POP32_VAL(esp); /* 0x380092A7: pop edi */ 7403 esi = POP32_VAL(esp); /* 0x380092A8: pop esi */ 7404 ebx = POP32_VAL(esp); /* 0x380092A9: pop ebx */ 7405 esp = ebp; /* 0x380092AA: mov esp, ebp */ 7406 ebp = POP32_VAL(esp); /* 0x380092AC: pop ebp */ 7407 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380092AD: ret */ 7408 RECOMP_REGS_OUT(); 7409 }