client/game/ggr.dll/lifted-0003.c (279854B)
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_300077D0(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(0x300077D0u); 17 18 L_300077D0: 19 PUSH32(esp, ebp); /* 0x300077D0: push ebp */ 20 ebp = esp; /* 0x300077D1: mov ebp, esp */ 21 fp_push(*(float*)&MEM32(0x3001E27C)); /* 0x300077D3: fld dword ptr [0x3001e27c] */ 22 _st[0] = -_st[0]; /* 0x300077D9: fchs */ 23 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0x8)); /* 0x300077DB: fcomp dword ptr [ebp + 8] */ 24 fp_pop(); 25 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x300077DE: fnstsw ax */ 26 /* test HI8(eax), 1 */ /* 0x300077E0: test ah, 1 */ 27 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 28 _cf = 0; 29 _flag_k = FK_NARROW(FK_TEST, 24); 30 if (TEST_Z(_flag_a, _flag_b)) goto L_300077FC; /* 0x300077E3: je 0x300077fc */ 31 L_300077E5: 32 fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x300077E5: fld dword ptr [ebp + 8] */ 33 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3001E27C)); /* 0x300077E8: fcomp dword ptr [0x3001e27c] */ 34 fp_pop(); 35 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x300077EE: fnstsw ax */ 36 /* test HI8(eax), 1 */ /* 0x300077F0: test ah, 1 */ 37 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 38 _cf = 0; 39 _flag_k = FK_NARROW(FK_TEST, 24); 40 if (TEST_Z(_flag_a, _flag_b)) goto L_300077FC; /* 0x300077F3: je 0x300077fc */ 41 L_300077F5: 42 eax = 1; /* 0x300077F5: mov eax, 1 */ 43 ebp = POP32_VAL(esp); /* 0x300077FA: pop ebp */ 44 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300077FB: ret */ 45 L_300077FC: 46 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 47 eax = 0; /* 0x300077FC: xor eax, eax */ 48 _cf = 0; 49 _flag_k = FK_TEST; 50 ebp = POP32_VAL(esp); /* 0x300077FE: pop ebp */ 51 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300077FF: ret */ 52 RECOMP_REGS_OUT(); 53 } 54 55 void sub_30007800(void) { 56 int _fpu_cmp = 0; 57 uint32_t _cf = 0; 58 int _df = 1; 59 uint32_t _flag_k = FK_NONE; 60 uint32_t _flag_a = 0, _flag_b = 0; 61 uint32_t _itail_tgt = 0; 62 RECOMP_REGS_LOCALS 63 RECOMP_ENTER(0x30007800u); 64 65 L_30007800: 66 PUSH32(esp, ebp); /* 0x30007800: push ebp */ 67 ebp = esp; /* 0x30007801: mov ebp, esp */ 68 fp_push(*(float*)&MEM32(0x3001E27C)); /* 0x30007803: fld dword ptr [0x3001e27c] */ 69 _st[0] += (double)*(float*)ADDR(ebp + 0xC); /* 0x30007809: fadd dword ptr [ebp + 0xc] */ 70 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0x8)); /* 0x3000780C: fcomp dword ptr [ebp + 8] */ 71 fp_pop(); 72 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3000780F: fnstsw ax */ 73 /* test HI8(eax), 1 */ /* 0x30007811: test ah, 1 */ 74 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 75 _cf = 0; 76 _flag_k = FK_NARROW(FK_TEST, 24); 77 if (TEST_Z(_flag_a, _flag_b)) goto L_3000781D; /* 0x30007814: je 0x3000781d */ 78 L_30007816: 79 eax = 1; /* 0x30007816: mov eax, 1 */ 80 ebp = POP32_VAL(esp); /* 0x3000781B: pop ebp */ 81 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000781C: ret */ 82 L_3000781D: 83 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 84 eax = 0; /* 0x3000781D: xor eax, eax */ 85 _cf = 0; 86 _flag_k = FK_TEST; 87 ebp = POP32_VAL(esp); /* 0x3000781F: pop ebp */ 88 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30007820: ret */ 89 RECOMP_REGS_OUT(); 90 } 91 92 void sub_30007830(void) { 93 int _fpu_cmp = 0; 94 uint32_t _cf = 0; 95 int _df = 1; 96 uint32_t _flag_k = FK_NONE; 97 uint32_t _flag_a = 0, _flag_b = 0; 98 uint32_t _itail_tgt = 0; 99 RECOMP_REGS_LOCALS 100 RECOMP_ENTER(0x30007830u); 101 102 L_30007830: 103 PUSH32(esp, ebp); /* 0x30007830: push ebp */ 104 ebp = esp; /* 0x30007831: mov ebp, esp */ 105 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x30007833: fld dword ptr [ebp + 0xc] */ 106 _st[0] -= (double)*(float*)ADDR(0x3001E27C); /* 0x30007836: fsub dword ptr [0x3001e27c] */ 107 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0x8)); /* 0x3000783C: fcomp dword ptr [ebp + 8] */ 108 fp_pop(); 109 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3000783F: fnstsw ax */ 110 /* test HI8(eax), 0x41u */ /* 0x30007841: test ah, 0x41 */ 111 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 112 _cf = 0; 113 _flag_k = FK_NARROW(FK_TEST, 24); 114 if (TEST_NZ(_flag_a, _flag_b)) goto L_3000784D; /* 0x30007844: jne 0x3000784d */ 115 L_30007846: 116 eax = 1; /* 0x30007846: mov eax, 1 */ 117 ebp = POP32_VAL(esp); /* 0x3000784B: pop ebp */ 118 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000784C: ret */ 119 L_3000784D: 120 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 121 eax = 0; /* 0x3000784D: xor eax, eax */ 122 _cf = 0; 123 _flag_k = FK_TEST; 124 ebp = POP32_VAL(esp); /* 0x3000784F: pop ebp */ 125 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30007850: ret */ 126 RECOMP_REGS_OUT(); 127 } 128 129 void sub_30007860(void) { 130 int _fpu_cmp = 0; 131 uint32_t _cf = 0; 132 int _df = 1; 133 uint32_t _flag_k = FK_NONE; 134 uint32_t _flag_a = 0, _flag_b = 0; 135 uint32_t _itail_tgt = 0; 136 RECOMP_REGS_LOCALS 137 RECOMP_ENTER(0x30007860u); 138 139 L_30007860: 140 PUSH32(esp, ebp); /* 0x30007860: push ebp */ 141 ebp = esp; /* 0x30007861: mov ebp, esp */ 142 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x30007863: fld dword ptr [ebp + 0xc] */ 143 _st[0] -= (double)*(float*)ADDR(0x3001E27C); /* 0x30007866: fsub dword ptr [0x3001e27c] */ 144 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0x8)); /* 0x3000786C: fcomp dword ptr [ebp + 8] */ 145 fp_pop(); 146 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3000786F: fnstsw ax */ 147 /* test HI8(eax), 0x41u */ /* 0x30007871: test ah, 0x41 */ 148 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 149 _cf = 0; 150 _flag_k = FK_NARROW(FK_TEST, 24); 151 if (TEST_Z(_flag_a, _flag_b)) goto L_30007890; /* 0x30007874: je 0x30007890 */ 152 L_30007876: 153 fp_push(*(float*)&MEM32(0x3001E27C)); /* 0x30007876: fld dword ptr [0x3001e27c] */ 154 _st[0] += (double)*(float*)ADDR(ebp + 0xC); /* 0x3000787C: fadd dword ptr [ebp + 0xc] */ 155 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0x8)); /* 0x3000787F: fcomp dword ptr [ebp + 8] */ 156 fp_pop(); 157 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x30007882: fnstsw ax */ 158 /* test HI8(eax), 1 */ /* 0x30007884: test ah, 1 */ 159 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 160 _cf = 0; 161 _flag_k = FK_NARROW(FK_TEST, 24); 162 if (TEST_NZ(_flag_a, _flag_b)) goto L_30007890; /* 0x30007887: jne 0x30007890 */ 163 L_30007889: 164 eax = 1; /* 0x30007889: mov eax, 1 */ 165 ebp = POP32_VAL(esp); /* 0x3000788E: pop ebp */ 166 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000788F: ret */ 167 L_30007890: 168 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 169 eax = 0; /* 0x30007890: xor eax, eax */ 170 _cf = 0; 171 _flag_k = FK_TEST; 172 ebp = POP32_VAL(esp); /* 0x30007892: pop ebp */ 173 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30007893: ret */ 174 RECOMP_REGS_OUT(); 175 } 176 177 void sub_300078A0(void) { 178 int _fpu_cmp = 0; 179 uint32_t _cf = 0; 180 int _df = 1; 181 uint32_t _flag_k = FK_NONE; 182 uint32_t _flag_a = 0, _flag_b = 0; 183 uint32_t _itail_tgt = 0; 184 RECOMP_REGS_LOCALS 185 RECOMP_ENTER(0x300078A0u); 186 187 L_300078A0: 188 PUSH32(esp, ebp); /* 0x300078A0: push ebp */ 189 ebp = esp; /* 0x300078A1: mov ebp, esp */ 190 eax = ecx; /* 0x300078A3: mov eax, ecx */ 191 ecx = MEM32(ebp + 0x8); /* 0x300078A5: mov ecx, dword ptr [ebp + 8] */ 192 SET_LO8(edx, MEM8(ecx)); /* 0x300078A8: mov dl, byte ptr [ecx] */ 193 MEM8(eax) = (uint8_t)(LO8(edx)); /* 0x300078AA: mov byte ptr [eax], dl */ 194 ebp = POP32_VAL(esp); /* 0x300078AC: pop ebp */ 195 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x300078AD: ret 4 */ 196 RECOMP_REGS_OUT(); 197 } 198 199 void sub_300078B0(void) { 200 int _fpu_cmp = 0; 201 uint32_t _cf = 0; 202 int _df = 1; 203 uint32_t _flag_k = FK_NONE; 204 uint32_t _flag_a = 0, _flag_b = 0; 205 uint32_t _itail_tgt = 0; 206 RECOMP_REGS_LOCALS 207 RECOMP_ENTER(0x300078B0u); 208 209 L_300078B0: 210 RECOMP_ICALL(0x300078C0u); /* 0x300078B0: call 0x300078c0 */ /* not lifted */ 211 RECOMP_FLAGS_IN(); 212 goto L_300078D0; /* 0x300078B5: jmp 0x300078d0 */ 213 L_300078D0: 214 PUSH32(esp, 0x300078E0u); /* 0x300078D0: push 0x300078e0 */ 215 RECOMP_ICALL(0x300180ECu); /* 0x300078D5: call 0x300180ec */ /* not lifted */ 216 RECOMP_FLAGS_IN(); 217 ecx = POP32_VAL(esp); /* 0x300078DA: pop ecx */ 218 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300078DB: ret */ 219 RECOMP_REGS_OUT(); 220 } 221 222 void sub_300078C0(void) { 223 int _fpu_cmp = 0; 224 uint32_t _cf = 0; 225 int _df = 1; 226 uint32_t _flag_k = FK_NONE; 227 uint32_t _flag_a = 0, _flag_b = 0; 228 uint32_t _itail_tgt = 0; 229 RECOMP_REGS_LOCALS 230 RECOMP_ENTER(0x300078C0u); 231 232 L_300078C0: 233 ecx = 0x3001E3D5u; /* 0x300078C0: mov ecx, 0x3001e3d5 */ 234 L_300078C5: 235 { _itail_tgt = (uint32_t)(MEM32(0x30019018)); goto _ljump; } 236 { RECOMP_REGS_OUT(); return; } /* end of function */ 237 _ljump: 238 switch (_itail_tgt) { 239 case 0x300078C0u: goto L_300078C0; 240 case 0x300078C5u: goto L_300078C5; 241 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 242 } 243 RECOMP_REGS_OUT(); 244 } 245 246 void sub_300078D0(void) { 247 int _fpu_cmp = 0; 248 uint32_t _cf = 0; 249 int _df = 1; 250 uint32_t _flag_k = FK_NONE; 251 uint32_t _flag_a = 0, _flag_b = 0; 252 uint32_t _itail_tgt = 0; 253 RECOMP_REGS_LOCALS 254 RECOMP_ENTER(0x300078D0u); 255 256 L_300078D0: 257 PUSH32(esp, 0x300078E0u); /* 0x300078D0: push 0x300078e0 */ 258 RECOMP_ICALL(0x300180ECu); /* 0x300078D5: call 0x300180ec */ /* not lifted */ 259 RECOMP_FLAGS_IN(); 260 ecx = POP32_VAL(esp); /* 0x300078DA: pop ecx */ 261 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300078DB: ret */ 262 RECOMP_REGS_OUT(); 263 } 264 265 void sub_300078E0(void) { 266 int _fpu_cmp = 0; 267 uint32_t _cf = 0; 268 int _df = 1; 269 uint32_t _flag_k = FK_NONE; 270 uint32_t _flag_a = 0, _flag_b = 0; 271 uint32_t _itail_tgt = 0; 272 RECOMP_REGS_LOCALS 273 RECOMP_ENTER(0x300078E0u); 274 275 L_300078E0: 276 ecx = 0x3001E3D5u; /* 0x300078E0: mov ecx, 0x3001e3d5 */ 277 L_300078E5: 278 { _itail_tgt = (uint32_t)(MEM32(0x3001901C)); goto _ljump; } 279 { RECOMP_REGS_OUT(); return; } /* end of function */ 280 _ljump: 281 switch (_itail_tgt) { 282 case 0x300078E0u: goto L_300078E0; 283 case 0x300078E5u: goto L_300078E5; 284 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 285 } 286 RECOMP_REGS_OUT(); 287 } 288 289 void sub_300078F0(void) { 290 int _fpu_cmp = 0; 291 uint32_t _cf = 0; 292 int _df = 1; 293 uint32_t _flag_k = FK_NONE; 294 uint32_t _flag_a = 0, _flag_b = 0; 295 uint32_t _itail_tgt = 0; 296 RECOMP_REGS_LOCALS 297 RECOMP_ENTER(0x300078F0u); 298 299 L_300078F0: 300 RECOMP_ICALL(0x30007900u); /* 0x300078F0: call 0x30007900 */ /* not lifted */ 301 RECOMP_FLAGS_IN(); 302 goto L_30007910; /* 0x300078F5: jmp 0x30007910 */ 303 L_30007910: 304 PUSH32(esp, 0x30007920u); /* 0x30007910: push 0x30007920 */ 305 RECOMP_ICALL(0x300180ECu); /* 0x30007915: call 0x300180ec */ /* not lifted */ 306 RECOMP_FLAGS_IN(); 307 ecx = POP32_VAL(esp); /* 0x3000791A: pop ecx */ 308 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000791B: ret */ 309 RECOMP_REGS_OUT(); 310 } 311 312 void sub_30007900(void) { 313 int _fpu_cmp = 0; 314 uint32_t _cf = 0; 315 int _df = 1; 316 uint32_t _flag_k = FK_NONE; 317 uint32_t _flag_a = 0, _flag_b = 0; 318 uint32_t _itail_tgt = 0; 319 RECOMP_REGS_LOCALS 320 RECOMP_ENTER(0x30007900u); 321 322 L_30007900: 323 ecx = 0x3001E3D4u; /* 0x30007900: mov ecx, 0x3001e3d4 */ 324 L_30007905: 325 { _itail_tgt = (uint32_t)(MEM32(0x30019020)); goto _ljump; } 326 { RECOMP_REGS_OUT(); return; } /* end of function */ 327 _ljump: 328 switch (_itail_tgt) { 329 case 0x30007900u: goto L_30007900; 330 case 0x30007905u: goto L_30007905; 331 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 332 } 333 RECOMP_REGS_OUT(); 334 } 335 336 void sub_30007910(void) { 337 int _fpu_cmp = 0; 338 uint32_t _cf = 0; 339 int _df = 1; 340 uint32_t _flag_k = FK_NONE; 341 uint32_t _flag_a = 0, _flag_b = 0; 342 uint32_t _itail_tgt = 0; 343 RECOMP_REGS_LOCALS 344 RECOMP_ENTER(0x30007910u); 345 346 L_30007910: 347 PUSH32(esp, 0x30007920u); /* 0x30007910: push 0x30007920 */ 348 RECOMP_ICALL(0x300180ECu); /* 0x30007915: call 0x300180ec */ /* not lifted */ 349 RECOMP_FLAGS_IN(); 350 ecx = POP32_VAL(esp); /* 0x3000791A: pop ecx */ 351 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000791B: ret */ 352 RECOMP_REGS_OUT(); 353 } 354 355 void sub_30007920(void) { 356 int _fpu_cmp = 0; 357 uint32_t _cf = 0; 358 int _df = 1; 359 uint32_t _flag_k = FK_NONE; 360 uint32_t _flag_a = 0, _flag_b = 0; 361 uint32_t _itail_tgt = 0; 362 RECOMP_REGS_LOCALS 363 RECOMP_ENTER(0x30007920u); 364 365 L_30007920: 366 ecx = 0x3001E3D4u; /* 0x30007920: mov ecx, 0x3001e3d4 */ 367 L_30007925: 368 { _itail_tgt = (uint32_t)(MEM32(0x30019024)); goto _ljump; } 369 { RECOMP_REGS_OUT(); return; } /* end of function */ 370 _ljump: 371 switch (_itail_tgt) { 372 case 0x30007920u: goto L_30007920; 373 case 0x30007925u: goto L_30007925; 374 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 375 } 376 RECOMP_REGS_OUT(); 377 } 378 379 void sub_30007930(void) { 380 int _fpu_cmp = 0; 381 uint32_t _cf = 0; 382 int _df = 1; 383 uint32_t _flag_k = FK_NONE; 384 uint32_t _flag_a = 0, _flag_b = 0; 385 uint32_t _itail_tgt = 0; 386 RECOMP_REGS_LOCALS 387 RECOMP_ENTER(0x30007930u); 388 389 L_30007930: 390 eax = ecx; /* 0x30007930: mov eax, ecx */ 391 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 392 ecx = 0; /* 0x30007932: xor ecx, ecx */ 393 _cf = 0; 394 _flag_k = FK_TEST; 395 MEM32(eax + 0x8) = ecx; /* 0x30007934: mov dword ptr [eax + 8], ecx */ 396 MEM32(eax + 0xC) = ecx; /* 0x30007937: mov dword ptr [eax + 0xc], ecx */ 397 MEM32(eax + 0x10) = ecx; /* 0x3000793A: mov dword ptr [eax + 0x10], ecx */ 398 MEM32(eax) = ecx; /* 0x3000793D: mov dword ptr [eax], ecx */ 399 MEM32(eax + 0x4) = ecx; /* 0x3000793F: mov dword ptr [eax + 4], ecx */ 400 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30007942: ret */ 401 RECOMP_REGS_OUT(); 402 } 403 404 void sub_30007950(void) { 405 int _fpu_cmp = 0; 406 uint32_t _cf = 0; 407 int _df = 1; 408 uint32_t _flag_k = FK_NONE; 409 uint32_t _flag_a = 0, _flag_b = 0; 410 uint32_t _itail_tgt = 0; 411 RECOMP_REGS_LOCALS 412 RECOMP_ENTER(0x30007950u); 413 414 L_30007950: 415 PUSH32(esp, ebp); /* 0x30007950: push ebp */ 416 ebp = esp; /* 0x30007951: mov ebp, esp */ 417 eax = MEM32(FS_BASE + (0)); /* 0x30007953: mov eax, dword ptr fs:[0] */ 418 PUSH32(esp, 0xFFFFFFFFu); /* 0x30007959: push -1 */ 419 PUSH32(esp, 0x300186FBu); /* 0x3000795B: push 0x300186fb */ 420 PUSH32(esp, eax); /* 0x30007960: push eax */ 421 eax = MEM32(ebp + 0x8); /* 0x30007961: mov eax, dword ptr [ebp + 8] */ 422 MEM32(FS_BASE + (0)) = esp; /* 0x30007964: mov dword ptr fs:[0], esp */ 423 PUSH32(esp, ebx); /* 0x3000796B: push ebx */ 424 PUSH32(esp, esi); /* 0x3000796C: push esi */ 425 esi = ecx; /* 0x3000796D: mov esi, ecx */ 426 MEM32(esi + 0x4) = eax; /* 0x3000796F: mov dword ptr [esi + 4], eax */ 427 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 428 ebx = 0; /* 0x30007972: xor ebx, ebx */ 429 _cf = 0; 430 _flag_k = FK_TEST; 431 PUSH32(esp, edi); /* 0x30007974: push edi */ 432 MEM32(esi + 0x8) = ebx; /* 0x30007975: mov dword ptr [esi + 8], ebx */ 433 MEM32(esi + 0xC) = ebx; /* 0x30007978: mov dword ptr [esi + 0xc], ebx */ 434 MEM32(esi + 0x10) = ebx; /* 0x3000797B: mov dword ptr [esi + 0x10], ebx */ 435 edi = MEM32(esi + 0x4); /* 0x3000797E: mov edi, dword ptr [esi + 4] */ 436 ecx = edi + edi * 2; /* 0x30007981: lea ecx, [edi + edi*2] */ 437 if (2u) _cf = (((ecx) >> 30) & 1u); /* 0x30007984: shl ecx, 2 */ 438 if (2u) { _flag_a = recomp_flags_pack((ecx << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 439 ecx = ecx << 2u; /* 0x30007984: shl ecx, 2 */ 440 PUSH32(esp, ecx); /* 0x30007987: push ecx */ 441 RECOMP_ICALL(0x300180A8u); /* 0x30007988: call 0x300180a8 */ /* not lifted */ 442 RECOMP_FLAGS_IN(); 443 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 444 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 445 esp = esp + 4; /* 0x3000798D: add esp, 4 */ 446 _flag_k = FK_ADD; 447 MEM32(ebp + 0x8) = eax; /* 0x30007990: mov dword ptr [ebp + 8], eax */ 448 /* cmp eax, ebx */ /* 0x30007993: cmp eax, ebx */ 449 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 450 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 451 _flag_k = FK_CMP; 452 MEM32(ebp + (-0x4)) = ebx; /* 0x30007995: mov dword ptr [ebp - 4], ebx */ 453 if (CMP_EQ(_flag_a, _flag_b)) goto L_300079B7; /* 0x30007998: je 0x300079b7 */ 454 L_3000799A: 455 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1); 456 edi = edi - 1; /* 0x3000799A: dec edi */ 457 _flag_k = FK_DEC; 458 /* test edi, edi */ /* 0x3000799B: test edi, edi */ 459 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 460 _cf = 0; 461 _flag_k = FK_TEST; 462 ebx = eax; /* 0x3000799D: mov ebx, eax */ 463 if (TEST_S(_flag_a, _flag_b)) goto L_300079B3; /* 0x3000799F: jl 0x300079b3 */ 464 L_300079A1: 465 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1); 466 edi = edi + 1; /* 0x300079A1: inc edi */ 467 _flag_k = FK_INC; 468 L_300079A2: 469 ecx = ebx; /* 0x300079A2: mov ecx, ebx */ 470 RECOMP_ICALL(MEM32(0x300190E4)); /* 0x300079A4: call dword ptr [0x300190e4] */ 471 RECOMP_FLAGS_IN(); 472 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0xCu); 473 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 474 ebx = ebx + 0xCu; /* 0x300079AA: add ebx, 0xc */ 475 _flag_k = FK_ADD; 476 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1); 477 edi = edi - 1; /* 0x300079AD: dec edi */ 478 _flag_k = FK_DEC; 479 RECOMP_BACKEDGE(); 480 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_300079A2; /* 0x300079AE: jne 0x300079a2 */ 481 L_300079B0: 482 eax = MEM32(ebp + 0x8); /* 0x300079B0: mov eax, dword ptr [ebp + 8] */ 483 L_300079B3: 484 MEM32(esi) = eax; /* 0x300079B3: mov dword ptr [esi], eax */ 485 goto L_300079B9; /* 0x300079B5: jmp 0x300079b9 */ 486 L_300079B7: 487 MEM32(esi) = ebx; /* 0x300079B7: mov dword ptr [esi], ebx */ 488 L_300079B9: 489 ecx = MEM32(ebp + (-0xC)); /* 0x300079B9: mov ecx, dword ptr [ebp - 0xc] */ 490 edi = POP32_VAL(esp); /* 0x300079BC: pop edi */ 491 eax = esi; /* 0x300079BD: mov eax, esi */ 492 esi = POP32_VAL(esp); /* 0x300079BF: pop esi */ 493 MEM32(FS_BASE + (0)) = ecx; /* 0x300079C0: mov dword ptr fs:[0], ecx */ 494 ebx = POP32_VAL(esp); /* 0x300079C7: pop ebx */ 495 esp = ebp; /* 0x300079C8: mov esp, ebp */ 496 ebp = POP32_VAL(esp); /* 0x300079CA: pop ebp */ 497 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x300079CB: ret 4 */ 498 RECOMP_REGS_OUT(); 499 } 500 501 void sub_300079D0(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(0x300079D0u); 510 511 L_300079D0: 512 PUSH32(esp, ebp); /* 0x300079D0: push ebp */ 513 ebp = esp; /* 0x300079D1: mov ebp, esp */ 514 eax = MEM32(ebp + 0xC); /* 0x300079D3: mov eax, dword ptr [ebp + 0xc] */ 515 PUSH32(esp, esi); /* 0x300079D6: push esi */ 516 esi = ecx; /* 0x300079D7: mov esi, ecx */ 517 MEM32(esi + 0x4) = eax; /* 0x300079D9: mov dword ptr [esi + 4], eax */ 518 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 519 ecx = 0; /* 0x300079DC: xor ecx, ecx */ 520 _cf = 0; 521 _flag_k = FK_TEST; 522 PUSH32(esp, eax); /* 0x300079DE: push eax */ 523 eax = MEM32(ebp + 0x8); /* 0x300079DF: mov eax, dword ptr [ebp + 8] */ 524 MEM32(esi + 0x8) = ecx; /* 0x300079E2: mov dword ptr [esi + 8], ecx */ 525 MEM32(esi + 0xC) = ecx; /* 0x300079E5: mov dword ptr [esi + 0xc], ecx */ 526 MEM32(esi + 0x10) = ecx; /* 0x300079E8: mov dword ptr [esi + 0x10], ecx */ 527 PUSH32(esp, eax); /* 0x300079EB: push eax */ 528 ecx = esi; /* 0x300079EC: mov ecx, esi */ 529 RECOMP_ICALL(0x30007AD0u); /* 0x300079EE: call 0x30007ad0 */ /* not lifted */ 530 RECOMP_FLAGS_IN(); 531 ecx = esi; /* 0x300079F3: mov ecx, esi */ 532 RECOMP_ICALL(0x30007B70u); /* 0x300079F5: call 0x30007b70 */ /* not lifted */ 533 RECOMP_FLAGS_IN(); 534 eax = esi; /* 0x300079FA: mov eax, esi */ 535 esi = POP32_VAL(esp); /* 0x300079FC: pop esi */ 536 ebp = POP32_VAL(esp); /* 0x300079FD: pop ebp */ 537 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x300079FE: ret 8 */ 538 RECOMP_REGS_OUT(); 539 } 540 541 void sub_30007A10(void) { 542 int _fpu_cmp = 0; 543 uint32_t _cf = 0; 544 int _df = 1; 545 uint32_t _flag_k = FK_NONE; 546 uint32_t _flag_a = 0, _flag_b = 0; 547 uint32_t _itail_tgt = 0; 548 RECOMP_REGS_LOCALS 549 RECOMP_ENTER(0x30007A10u); 550 551 L_30007A10: 552 PUSH32(esp, ebp); /* 0x30007A10: push ebp */ 553 ebp = esp; /* 0x30007A11: mov ebp, esp */ 554 eax = MEM32(ebp + 0xC); /* 0x30007A13: mov eax, dword ptr [ebp + 0xc] */ 555 edx = MEM32(ebp + 0x10); /* 0x30007A16: mov edx, dword ptr [ebp + 0x10] */ 556 PUSH32(esp, esi); /* 0x30007A19: push esi */ 557 esi = ecx; /* 0x30007A1A: mov esi, ecx */ 558 PUSH32(esp, edi); /* 0x30007A1C: push edi */ 559 MEM32(esi + 0x4) = eax; /* 0x30007A1D: mov dword ptr [esi + 4], eax */ 560 edi = MEM32(edx); /* 0x30007A20: mov edi, dword ptr [edx] */ 561 ecx = esi + 0x8; /* 0x30007A22: lea ecx, [esi + 8] */ 562 MEM32(ecx) = edi; /* 0x30007A25: mov dword ptr [ecx], edi */ 563 edi = MEM32(edx + 0x4); /* 0x30007A27: mov edi, dword ptr [edx + 4] */ 564 MEM32(ecx + 0x4) = edi; /* 0x30007A2A: mov dword ptr [ecx + 4], edi */ 565 edx = MEM32(edx + 0x8); /* 0x30007A2D: mov edx, dword ptr [edx + 8] */ 566 PUSH32(esp, eax); /* 0x30007A30: push eax */ 567 eax = MEM32(ebp + 0x8); /* 0x30007A31: mov eax, dword ptr [ebp + 8] */ 568 MEM32(ecx + 0x8) = edx; /* 0x30007A34: mov dword ptr [ecx + 8], edx */ 569 PUSH32(esp, eax); /* 0x30007A37: push eax */ 570 ecx = esi; /* 0x30007A38: mov ecx, esi */ 571 RECOMP_ICALL(0x30007AD0u); /* 0x30007A3A: call 0x30007ad0 */ /* not lifted */ 572 RECOMP_FLAGS_IN(); 573 edi = POP32_VAL(esp); /* 0x30007A3F: pop edi */ 574 eax = esi; /* 0x30007A40: mov eax, esi */ 575 esi = POP32_VAL(esp); /* 0x30007A42: pop esi */ 576 ebp = POP32_VAL(esp); /* 0x30007A43: pop ebp */ 577 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30007A44: ret 0xc */ 578 RECOMP_REGS_OUT(); 579 } 580 581 void sub_30007A50(void) { 582 int _fpu_cmp = 0; 583 uint32_t _cf = 0; 584 int _df = 1; 585 uint32_t _flag_k = FK_NONE; 586 uint32_t _flag_a = 0, _flag_b = 0; 587 uint32_t _itail_tgt = 0; 588 RECOMP_REGS_LOCALS 589 RECOMP_ENTER(0x30007A50u); 590 591 L_30007A50: 592 PUSH32(esp, ebp); /* 0x30007A50: push ebp */ 593 ebp = esp; /* 0x30007A51: mov ebp, esp */ 594 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 595 eax = 0; /* 0x30007A53: xor eax, eax */ 596 _cf = 0; 597 _flag_k = FK_TEST; 598 PUSH32(esp, esi); /* 0x30007A55: push esi */ 599 esi = ecx; /* 0x30007A56: mov esi, ecx */ 600 MEM32(esi) = eax; /* 0x30007A58: mov dword ptr [esi], eax */ 601 MEM32(esi + 0x4) = eax; /* 0x30007A5A: mov dword ptr [esi + 4], eax */ 602 MEM32(esi + 0x8) = eax; /* 0x30007A5D: mov dword ptr [esi + 8], eax */ 603 MEM32(esi + 0xC) = eax; /* 0x30007A60: mov dword ptr [esi + 0xc], eax */ 604 MEM32(esi + 0x10) = eax; /* 0x30007A63: mov dword ptr [esi + 0x10], eax */ 605 eax = MEM32(ebp + 0x8); /* 0x30007A66: mov eax, dword ptr [ebp + 8] */ 606 PUSH32(esp, eax); /* 0x30007A69: push eax */ 607 RECOMP_ICALL(0x300080D0u); /* 0x30007A6A: call 0x300080d0 */ /* not lifted */ 608 RECOMP_FLAGS_IN(); 609 eax = esi; /* 0x30007A6F: mov eax, esi */ 610 esi = POP32_VAL(esp); /* 0x30007A71: pop esi */ 611 ebp = POP32_VAL(esp); /* 0x30007A72: pop ebp */ 612 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30007A73: ret 4 */ 613 RECOMP_REGS_OUT(); 614 } 615 616 void sub_30007A80(void) { 617 int _fpu_cmp = 0; 618 uint32_t _cf = 0; 619 int _df = 1; 620 uint32_t _flag_k = FK_NONE; 621 uint32_t _flag_a = 0, _flag_b = 0; 622 uint32_t _itail_tgt = 0; 623 RECOMP_REGS_LOCALS 624 RECOMP_ENTER(0x30007A80u); 625 626 L_30007A80: 627 PUSH32(esp, ebp); /* 0x30007A80: push ebp */ 628 ebp = esp; /* 0x30007A81: mov ebp, esp */ 629 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 630 eax = 0; /* 0x30007A83: xor eax, eax */ 631 _cf = 0; 632 _flag_k = FK_TEST; 633 PUSH32(esp, esi); /* 0x30007A85: push esi */ 634 esi = ecx; /* 0x30007A86: mov esi, ecx */ 635 MEM32(esi) = eax; /* 0x30007A88: mov dword ptr [esi], eax */ 636 MEM32(esi + 0x4) = eax; /* 0x30007A8A: mov dword ptr [esi + 4], eax */ 637 MEM32(esi + 0x8) = eax; /* 0x30007A8D: mov dword ptr [esi + 8], eax */ 638 MEM32(esi + 0xC) = eax; /* 0x30007A90: mov dword ptr [esi + 0xc], eax */ 639 MEM32(esi + 0x10) = eax; /* 0x30007A93: mov dword ptr [esi + 0x10], eax */ 640 eax = MEM32(ebp + 0x8); /* 0x30007A96: mov eax, dword ptr [ebp + 8] */ 641 PUSH32(esp, eax); /* 0x30007A99: push eax */ 642 RECOMP_ICALL(0x30008B50u); /* 0x30007A9A: call 0x30008b50 */ /* not lifted */ 643 RECOMP_FLAGS_IN(); 644 ecx = esi; /* 0x30007A9F: mov ecx, esi */ 645 RECOMP_ICALL(0x30007B70u); /* 0x30007AA1: call 0x30007b70 */ /* not lifted */ 646 RECOMP_FLAGS_IN(); 647 eax = esi; /* 0x30007AA6: mov eax, esi */ 648 esi = POP32_VAL(esp); /* 0x30007AA8: pop esi */ 649 ebp = POP32_VAL(esp); /* 0x30007AA9: pop ebp */ 650 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30007AAA: ret 4 */ 651 RECOMP_REGS_OUT(); 652 } 653 654 void sub_30007AB0(void) { 655 int _fpu_cmp = 0; 656 uint32_t _cf = 0; 657 int _df = 1; 658 uint32_t _flag_k = FK_NONE; 659 uint32_t _flag_a = 0, _flag_b = 0; 660 uint32_t _itail_tgt = 0; 661 RECOMP_REGS_LOCALS 662 RECOMP_ENTER(0x30007AB0u); 663 664 L_30007AB0: 665 PUSH32(esp, esi); /* 0x30007AB0: push esi */ 666 esi = ecx; /* 0x30007AB1: mov esi, ecx */ 667 eax = MEM32(esi); /* 0x30007AB3: mov eax, dword ptr [esi] */ 668 PUSH32(esp, eax); /* 0x30007AB5: push eax */ 669 RECOMP_ICALL(0x30018080u); /* 0x30007AB6: call 0x30018080 */ /* not lifted */ 670 RECOMP_FLAGS_IN(); 671 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 672 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 673 esp = esp + 4; /* 0x30007ABB: add esp, 4 */ 674 _flag_k = FK_ADD; 675 MEM32(esi) = 0; /* 0x30007ABE: mov dword ptr [esi], 0 */ 676 MEM32(esi + 0x4) = 0; /* 0x30007AC4: mov dword ptr [esi + 4], 0 */ 677 esi = POP32_VAL(esp); /* 0x30007ACB: pop esi */ 678 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30007ACC: ret */ 679 RECOMP_REGS_OUT(); 680 } 681 682 void sub_30007AD0(void) { 683 int _fpu_cmp = 0; 684 uint32_t _cf = 0; 685 int _df = 1; 686 uint32_t _flag_k = FK_NONE; 687 uint32_t _flag_a = 0, _flag_b = 0; 688 uint32_t _itail_tgt = 0; 689 RECOMP_REGS_LOCALS 690 RECOMP_ENTER(0x30007AD0u); 691 692 L_30007AD0: 693 PUSH32(esp, ebp); /* 0x30007AD0: push ebp */ 694 ebp = esp; /* 0x30007AD1: mov ebp, esp */ 695 PUSH32(esp, 0xFFFFFFFFu); /* 0x30007AD3: push -1 */ 696 PUSH32(esp, 0x3001871Bu); /* 0x30007AD5: push 0x3001871b */ 697 eax = MEM32(FS_BASE + (0)); /* 0x30007ADA: mov eax, dword ptr fs:[0] */ 698 PUSH32(esp, eax); /* 0x30007AE0: push eax */ 699 MEM32(FS_BASE + (0)) = esp; /* 0x30007AE1: mov dword ptr fs:[0], esp */ 700 PUSH32(esp, ecx); /* 0x30007AE8: push ecx */ 701 PUSH32(esp, ebx); /* 0x30007AE9: push ebx */ 702 PUSH32(esp, esi); /* 0x30007AEA: push esi */ 703 ebx = ecx; /* 0x30007AEB: mov ebx, ecx */ 704 esi = MEM32(ebx + 0x4); /* 0x30007AED: mov esi, dword ptr [ebx + 4] */ 705 eax = esi + esi * 2; /* 0x30007AF0: lea eax, [esi + esi*2] */ 706 if (2u) _cf = (((eax) >> 30) & 1u); /* 0x30007AF3: shl eax, 2 */ 707 if (2u) { _flag_a = recomp_flags_pack((eax << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 708 eax = eax << 2u; /* 0x30007AF3: shl eax, 2 */ 709 PUSH32(esp, edi); /* 0x30007AF6: push edi */ 710 PUSH32(esp, eax); /* 0x30007AF7: push eax */ 711 RECOMP_ICALL(0x300180A8u); /* 0x30007AF8: call 0x300180a8 */ /* not lifted */ 712 RECOMP_FLAGS_IN(); 713 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 714 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 715 esp = esp + 4; /* 0x30007AFD: add esp, 4 */ 716 _flag_k = FK_ADD; 717 MEM32(ebp + (-0x10)) = eax; /* 0x30007B00: mov dword ptr [ebp - 0x10], eax */ 718 /* test eax, eax */ /* 0x30007B03: test eax, eax */ 719 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 720 _cf = 0; 721 _flag_k = FK_TEST; 722 MEM32(ebp + (-0x4)) = 0; /* 0x30007B05: mov dword ptr [ebp - 4], 0 */ 723 if (TEST_Z(_flag_a, _flag_b)) goto L_30007B29; /* 0x30007B0C: je 0x30007b29 */ 724 L_30007B0E: 725 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 726 esi = esi - 1; /* 0x30007B0E: dec esi */ 727 _flag_k = FK_DEC; 728 /* test esi, esi */ /* 0x30007B0F: test esi, esi */ 729 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 730 _cf = 0; 731 _flag_k = FK_TEST; 732 edi = eax; /* 0x30007B11: mov edi, eax */ 733 if (TEST_S(_flag_a, _flag_b)) goto L_30007B2B; /* 0x30007B13: jl 0x30007b2b */ 734 L_30007B15: 735 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 736 esi = esi + 1; /* 0x30007B15: inc esi */ 737 _flag_k = FK_INC; 738 L_30007B16: 739 ecx = edi; /* 0x30007B16: mov ecx, edi */ 740 RECOMP_ICALL(MEM32(0x300190E4)); /* 0x30007B18: call dword ptr [0x300190e4] */ 741 RECOMP_FLAGS_IN(); 742 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xCu); 743 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 744 edi = edi + 0xCu; /* 0x30007B1E: add edi, 0xc */ 745 _flag_k = FK_ADD; 746 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 747 esi = esi - 1; /* 0x30007B21: dec esi */ 748 _flag_k = FK_DEC; 749 RECOMP_BACKEDGE(); 750 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_30007B16; /* 0x30007B22: jne 0x30007b16 */ 751 L_30007B24: 752 eax = MEM32(ebp + (-0x10)); /* 0x30007B24: mov eax, dword ptr [ebp - 0x10] */ 753 goto L_30007B2B; /* 0x30007B27: jmp 0x30007b2b */ 754 L_30007B29: 755 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 756 eax = 0; /* 0x30007B29: xor eax, eax */ 757 _cf = 0; 758 _flag_k = FK_TEST; 759 L_30007B2B: 760 ecx = MEM32(ebp + 0xC); /* 0x30007B2B: mov ecx, dword ptr [ebp + 0xc] */ 761 /* test ecx, ecx */ /* 0x30007B2E: test ecx, ecx */ 762 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 763 _cf = 0; 764 _flag_k = FK_TEST; 765 MEM32(ebx) = eax; /* 0x30007B30: mov dword ptr [ebx], eax */ 766 if (TEST_LE(_flag_a, _flag_b)) goto L_30007B57; /* 0x30007B32: jle 0x30007b57 */ 767 L_30007B34: 768 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 769 eax = 0; /* 0x30007B34: xor eax, eax */ 770 _cf = 0; 771 _flag_k = FK_TEST; 772 L_30007B36: 773 edi = MEM32(ebx); /* 0x30007B36: mov edi, dword ptr [ebx] */ 774 edx = MEM32(ebp + 0x8); /* 0x30007B38: mov edx, dword ptr [ebp + 8] */ 775 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 776 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 777 edx = edx + eax; /* 0x30007B3B: add edx, eax */ 778 _flag_k = FK_ADD; 779 esi = eax; /* 0x30007B3D: mov esi, eax */ 780 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi); 781 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 782 esi = esi + edi; /* 0x30007B3F: add esi, edi */ 783 _flag_k = FK_ADD; 784 edi = MEM32(edx); /* 0x30007B41: mov edi, dword ptr [edx] */ 785 MEM32(esi) = edi; /* 0x30007B43: mov dword ptr [esi], edi */ 786 edi = MEM32(edx + 0x4); /* 0x30007B45: mov edi, dword ptr [edx + 4] */ 787 MEM32(esi + 0x4) = edi; /* 0x30007B48: mov dword ptr [esi + 4], edi */ 788 edx = MEM32(edx + 0x8); /* 0x30007B4B: mov edx, dword ptr [edx + 8] */ 789 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu); 790 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 791 eax = eax + 0xCu; /* 0x30007B4E: add eax, 0xc */ 792 _flag_k = FK_ADD; 793 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 794 ecx = ecx - 1; /* 0x30007B51: dec ecx */ 795 _flag_k = FK_DEC; 796 MEM32(esi + 0x8) = edx; /* 0x30007B52: mov dword ptr [esi + 8], edx */ 797 RECOMP_BACKEDGE(); 798 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_30007B36; /* 0x30007B55: jne 0x30007b36 */ 799 L_30007B57: 800 ecx = MEM32(ebp + (-0xC)); /* 0x30007B57: mov ecx, dword ptr [ebp - 0xc] */ 801 edi = POP32_VAL(esp); /* 0x30007B5A: pop edi */ 802 esi = POP32_VAL(esp); /* 0x30007B5B: pop esi */ 803 ebx = POP32_VAL(esp); /* 0x30007B5C: pop ebx */ 804 MEM32(FS_BASE + (0)) = ecx; /* 0x30007B5D: mov dword ptr fs:[0], ecx */ 805 esp = ebp; /* 0x30007B64: mov esp, ebp */ 806 ebp = POP32_VAL(esp); /* 0x30007B66: pop ebp */ 807 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x30007B67: ret 8 */ 808 RECOMP_REGS_OUT(); 809 } 810 811 void sub_30007B70(void) { 812 int _fpu_cmp = 0; 813 uint32_t _cf = 0; 814 int _df = 1; 815 uint32_t _flag_k = FK_NONE; 816 uint32_t _flag_a = 0, _flag_b = 0; 817 uint32_t _itail_tgt = 0; 818 RECOMP_REGS_LOCALS 819 RECOMP_ENTER(0x30007B70u); 820 821 L_30007B70: 822 PUSH32(esp, ebp); /* 0x30007B70: push ebp */ 823 ebp = esp; /* 0x30007B71: mov ebp, esp */ 824 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 825 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 826 esp = esp - 0xCu; /* 0x30007B73: sub esp, 0xc */ 827 _flag_k = FK_CMP; 828 PUSH32(esp, esi); /* 0x30007B76: push esi */ 829 PUSH32(esp, 1); /* 0x30007B77: push 1 */ 830 eax = ebp + (-0xC); /* 0x30007B79: lea eax, [ebp - 0xc] */ 831 esi = ecx; /* 0x30007B7C: mov esi, ecx */ 832 PUSH32(esp, eax); /* 0x30007B7E: push eax */ 833 RECOMP_ICALL(0x300085B0u); /* 0x30007B7F: call 0x300085b0 */ /* not lifted */ 834 RECOMP_FLAGS_IN(); 835 ecx = MEM32(eax); /* 0x30007B84: mov ecx, dword ptr [eax] */ 836 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(8); 837 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 838 esi = esi + 8; /* 0x30007B86: add esi, 8 */ 839 _flag_k = FK_ADD; 840 MEM32(esi) = ecx; /* 0x30007B89: mov dword ptr [esi], ecx */ 841 edx = MEM32(eax + 0x4); /* 0x30007B8B: mov edx, dword ptr [eax + 4] */ 842 MEM32(esi + 0x4) = edx; /* 0x30007B8E: mov dword ptr [esi + 4], edx */ 843 eax = MEM32(eax + 0x8); /* 0x30007B91: mov eax, dword ptr [eax + 8] */ 844 MEM32(esi + 0x8) = eax; /* 0x30007B94: mov dword ptr [esi + 8], eax */ 845 esi = POP32_VAL(esp); /* 0x30007B97: pop esi */ 846 esp = ebp; /* 0x30007B98: mov esp, ebp */ 847 ebp = POP32_VAL(esp); /* 0x30007B9A: pop ebp */ 848 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30007B9B: ret */ 849 RECOMP_REGS_OUT(); 850 } 851 852 void sub_30007BA0(void) { 853 int _fpu_cmp = 0; 854 uint32_t _cf = 0; 855 int _df = 1; 856 uint32_t _flag_k = FK_NONE; 857 uint32_t _flag_a = 0, _flag_b = 0; 858 uint32_t _itail_tgt = 0; 859 RECOMP_REGS_LOCALS 860 RECOMP_ENTER(0x30007BA0u); 861 862 L_30007BA0: 863 PUSH32(esp, ebp); /* 0x30007BA0: push ebp */ 864 ebp = esp; /* 0x30007BA1: mov ebp, esp */ 865 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 866 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 867 esp = esp - 0xCu; /* 0x30007BA3: sub esp, 0xc */ 868 _flag_k = FK_CMP; 869 eax = MEM32(ebp + 0x8); /* 0x30007BA6: mov eax, dword ptr [ebp + 8] */ 870 PUSH32(esp, esi); /* 0x30007BA9: push esi */ 871 esi = ecx; /* 0x30007BAA: mov esi, ecx */ 872 ecx = MEM32(esi); /* 0x30007BAC: mov ecx, dword ptr [esi] */ 873 eax = eax + eax * 2; /* 0x30007BAE: lea eax, [eax + eax*2] */ 874 edx = ecx + eax * 4; /* 0x30007BB1: lea edx, [ecx + eax*4] */ 875 eax = MEM32(ebp + 0xC); /* 0x30007BB4: mov eax, dword ptr [ebp + 0xc] */ 876 ecx = MEM32(eax); /* 0x30007BB7: mov ecx, dword ptr [eax] */ 877 MEM32(edx) = ecx; /* 0x30007BB9: mov dword ptr [edx], ecx */ 878 ecx = MEM32(eax + 0x4); /* 0x30007BBB: mov ecx, dword ptr [eax + 4] */ 879 MEM32(edx + 0x4) = ecx; /* 0x30007BBE: mov dword ptr [edx + 4], ecx */ 880 eax = MEM32(eax + 0x8); /* 0x30007BC1: mov eax, dword ptr [eax + 8] */ 881 PUSH32(esp, 1); /* 0x30007BC4: push 1 */ 882 ecx = ebp + (-0xC); /* 0x30007BC6: lea ecx, [ebp - 0xc] */ 883 PUSH32(esp, ecx); /* 0x30007BC9: push ecx */ 884 ecx = esi; /* 0x30007BCA: mov ecx, esi */ 885 MEM32(edx + 0x8) = eax; /* 0x30007BCC: mov dword ptr [edx + 8], eax */ 886 RECOMP_ICALL(0x300085B0u); /* 0x30007BCF: call 0x300085b0 */ /* not lifted */ 887 RECOMP_FLAGS_IN(); 888 edx = MEM32(eax); /* 0x30007BD4: mov edx, dword ptr [eax] */ 889 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(8); 890 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 891 esi = esi + 8; /* 0x30007BD6: add esi, 8 */ 892 _flag_k = FK_ADD; 893 MEM32(esi) = edx; /* 0x30007BD9: mov dword ptr [esi], edx */ 894 ecx = MEM32(eax + 0x4); /* 0x30007BDB: mov ecx, dword ptr [eax + 4] */ 895 MEM32(esi + 0x4) = ecx; /* 0x30007BDE: mov dword ptr [esi + 4], ecx */ 896 edx = MEM32(eax + 0x8); /* 0x30007BE1: mov edx, dword ptr [eax + 8] */ 897 MEM32(esi + 0x8) = edx; /* 0x30007BE4: mov dword ptr [esi + 8], edx */ 898 esi = POP32_VAL(esp); /* 0x30007BE7: pop esi */ 899 esp = ebp; /* 0x30007BE8: mov esp, ebp */ 900 ebp = POP32_VAL(esp); /* 0x30007BEA: pop ebp */ 901 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x30007BEB: ret 8 */ 902 RECOMP_REGS_OUT(); 903 } 904 905 void sub_30007BF0(void) { 906 int _fpu_cmp = 0; 907 uint32_t _cf = 0; 908 int _df = 1; 909 uint32_t _flag_k = FK_NONE; 910 uint32_t _flag_a = 0, _flag_b = 0; 911 uint32_t _itail_tgt = 0; 912 RECOMP_REGS_LOCALS 913 RECOMP_ENTER(0x30007BF0u); 914 915 L_30007BF0: 916 PUSH32(esp, ebp); /* 0x30007BF0: push ebp */ 917 ebp = esp; /* 0x30007BF1: mov ebp, esp */ 918 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x34u); 919 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 920 esp = esp - 0x34u; /* 0x30007BF3: sub esp, 0x34 */ 921 _flag_k = FK_CMP; 922 PUSH32(esp, ebx); /* 0x30007BF6: push ebx */ 923 PUSH32(esp, edi); /* 0x30007BF7: push edi */ 924 edi = ecx; /* 0x30007BF8: mov edi, ecx */ 925 eax = MEM32(edi + 0x4); /* 0x30007BFA: mov eax, dword ptr [edi + 4] */ 926 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 927 ebx = 0; /* 0x30007BFD: xor ebx, ebx */ 928 _cf = 0; 929 _flag_k = FK_TEST; 930 /* cmp eax, ebx */ /* 0x30007BFF: cmp eax, ebx */ 931 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 932 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 933 _flag_k = FK_CMP; 934 MEM32(ebp + (-0x4)) = ebx; /* 0x30007C01: mov dword ptr [ebp - 4], ebx */ 935 if (CMP_LE(_flag_a, _flag_b)) goto L_30007D1E; /* 0x30007C04: jle 0x30007d1e */ 936 L_30007C0A: 937 PUSH32(esp, esi); /* 0x30007C0A: push esi */ 938 L_30007C0B: 939 esi = MEM32(edi); /* 0x30007C0B: mov esi, dword ptr [edi] */ 940 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x30007C0D: fld dword ptr [ebp + 0x18] */ 941 eax = ebx; /* 0x30007C10: mov eax, ebx */ 942 _st[0] *= (double)*(float*)ADDR(eax + esi); /* 0x30007C12: fmul dword ptr [eax + esi] */ 943 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 944 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 945 eax = eax + esi; /* 0x30007C15: add eax, esi */ 946 _flag_k = FK_ADD; 947 esi = ebx; /* 0x30007C17: mov esi, ebx */ 948 { float _v = (float)fp_pop(); *(float*)ADDR(eax) = _v; } /* 0x30007C19: fstp dword ptr [eax] */ 949 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x30007C1B: fld dword ptr [ebp + 0x18] */ 950 _st[0] *= (double)*(float*)ADDR(eax + 0x4); /* 0x30007C1E: fmul dword ptr [eax + 4] */ 951 { float _v = (float)fp_pop(); *(float*)ADDR(eax + 0x4) = _v; } /* 0x30007C21: fstp dword ptr [eax + 4] */ 952 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x30007C24: fld dword ptr [ebp + 0x18] */ 953 _st[0] *= (double)*(float*)ADDR(eax + 0x8); /* 0x30007C27: fmul dword ptr [eax + 8] */ 954 { float _v = (float)fp_pop(); *(float*)ADDR(eax + 0x8) = _v; } /* 0x30007C2A: fstp dword ptr [eax + 8] */ 955 edx = MEM32(edi); /* 0x30007C2D: mov edx, dword ptr [edi] */ 956 eax = MEM32(ebp + 0x8); /* 0x30007C2F: mov eax, dword ptr [ebp + 8] */ 957 ecx = MEM32(eax); /* 0x30007C32: mov ecx, dword ptr [eax] */ 958 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx); 959 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 960 esi = esi + edx; /* 0x30007C34: add esi, edx */ 961 _flag_k = FK_ADD; 962 edx = MEM32(eax + 0x4); /* 0x30007C36: mov edx, dword ptr [eax + 4] */ 963 eax = MEM32(eax + 0x8); /* 0x30007C39: mov eax, dword ptr [eax + 8] */ 964 MEM32(ebp + (-0x28)) = ecx; /* 0x30007C3C: mov dword ptr [ebp - 0x28], ecx */ 965 PUSH32(esp, esi); /* 0x30007C3F: push esi */ 966 ecx = ebp + (-0x28); /* 0x30007C40: lea ecx, [ebp - 0x28] */ 967 MEM32(ebp + (-0x24)) = edx; /* 0x30007C43: mov dword ptr [ebp - 0x24], edx */ 968 MEM32(ebp + (-0x20)) = eax; /* 0x30007C46: mov dword ptr [ebp - 0x20], eax */ 969 RECOMP_ICALL(MEM32(0x300190D8)); /* 0x30007C49: call dword ptr [0x300190d8] */ 970 RECOMP_FLAGS_IN(); 971 ecx = MEM32(eax); /* 0x30007C4F: mov ecx, dword ptr [eax] */ 972 MEM32(ebp + (-0x10)) = ecx; /* 0x30007C51: mov dword ptr [ebp - 0x10], ecx */ 973 edx = MEM32(eax + 0x4); /* 0x30007C54: mov edx, dword ptr [eax + 4] */ 974 ecx = MEM32(ebp + 0x8); /* 0x30007C57: mov ecx, dword ptr [ebp + 8] */ 975 MEM32(ebp + (-0xC)) = edx; /* 0x30007C5A: mov dword ptr [ebp - 0xc], edx */ 976 edx = MEM32(ecx); /* 0x30007C5D: mov edx, dword ptr [ecx] */ 977 eax = MEM32(eax + 0x8); /* 0x30007C5F: mov eax, dword ptr [eax + 8] */ 978 MEM32(ebp + (-0x8)) = eax; /* 0x30007C62: mov dword ptr [ebp - 8], eax */ 979 eax = MEM32(ecx + 0x4); /* 0x30007C65: mov eax, dword ptr [ecx + 4] */ 980 ecx = MEM32(ecx + 0x8); /* 0x30007C68: mov ecx, dword ptr [ecx + 8] */ 981 MEM32(ebp + (-0x34)) = edx; /* 0x30007C6B: mov dword ptr [ebp - 0x34], edx */ 982 edx = ebp + (-0x10); /* 0x30007C6E: lea edx, [ebp - 0x10] */ 983 MEM32(ebp + (-0x2C)) = ecx; /* 0x30007C71: mov dword ptr [ebp - 0x2c], ecx */ 984 PUSH32(esp, edx); /* 0x30007C74: push edx */ 985 ecx = ebp + (-0x34); /* 0x30007C75: lea ecx, [ebp - 0x34] */ 986 MEM32(ebp + (-0x30)) = eax; /* 0x30007C78: mov dword ptr [ebp - 0x30], eax */ 987 RECOMP_ICALL(MEM32(0x300190D8)); /* 0x30007C7B: call dword ptr [0x300190d8] */ 988 RECOMP_FLAGS_IN(); 989 ecx = MEM32(eax); /* 0x30007C81: mov ecx, dword ptr [eax] */ 990 edx = MEM32(eax + 0x4); /* 0x30007C83: mov edx, dword ptr [eax + 4] */ 991 eax = MEM32(eax + 0x8); /* 0x30007C86: mov eax, dword ptr [eax + 8] */ 992 MEM32(ebp + (-0x1C)) = ecx; /* 0x30007C89: mov dword ptr [ebp - 0x1c], ecx */ 993 ecx = MEM32(ebp + 0x8); /* 0x30007C8C: mov ecx, dword ptr [ebp + 8] */ 994 fp_push(*(float*)&MEM32(ecx + 0xC)); /* 0x30007C8F: fld dword ptr [ecx + 0xc] */ 995 MEM32(ebp + (-0x18)) = edx; /* 0x30007C92: mov dword ptr [ebp - 0x18], edx */ 996 _st[0] += _st[0]; /* 0x30007C95: fadd st(0), st(0) */ 997 MEM32(ebp + (-0x14)) = eax; /* 0x30007C97: mov dword ptr [ebp - 0x14], eax */ 998 fp_push(*(float*)&MEM32(ebp + (-0x10))); /* 0x30007C9A: fld dword ptr [ebp - 0x10] */ 999 eax = ebx; /* 0x30007C9D: mov eax, ebx */ 1000 _st[0] *= _st[1]; /* 0x30007C9F: fmul st(1) */ 1001 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x30007CA1: fstp dword ptr [ebp - 0x10] */ 1002 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x30007CA4: fld dword ptr [ebp - 0xc] */ 1003 _st[0] *= _st[1]; /* 0x30007CA7: fmul st(1) */ 1004 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x30007CA9: fstp dword ptr [ebp - 0xc] */ 1005 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x30007CAC: fld dword ptr [ebp - 8] */ 1006 _st[0] *= _st[1]; /* 0x30007CAF: fmul st(1) */ 1007 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x30007CB1: fstp dword ptr [ebp - 8] */ 1008 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30007CB4: fstp st(0) */ 1009 fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x30007CB6: fld dword ptr [ebp - 0x1c] */ 1010 _st[0] += _st[0]; /* 0x30007CB9: fadd st(0), st(0) */ 1011 fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x30007CBB: fld dword ptr [ebp - 0x18] */ 1012 _st[0] += _st[0]; /* 0x30007CBE: fadd st(0), st(0) */ 1013 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x18)) = _v; } /* 0x30007CC0: fstp dword ptr [ebp - 0x18] */ 1014 fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x30007CC3: fld dword ptr [ebp - 0x14] */ 1015 _st[0] += _st[0]; /* 0x30007CC6: fadd st(0), st(0) */ 1016 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x30007CC8: fstp dword ptr [ebp - 0x14] */ 1017 _st[0] += (double)*(float*)ADDR(ebp + (-0x10)); /* 0x30007CCB: fadd dword ptr [ebp - 0x10] */ 1018 _st[0] += (double)*(float*)ADDR(esi); /* 0x30007CCE: fadd dword ptr [esi] */ 1019 { float _v = (float)fp_pop(); *(float*)ADDR(esi) = _v; } /* 0x30007CD0: fstp dword ptr [esi] */ 1020 fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x30007CD2: fld dword ptr [ebp - 0x18] */ 1021 _st[0] += (double)*(float*)ADDR(ebp + (-0xC)); /* 0x30007CD5: fadd dword ptr [ebp - 0xc] */ 1022 _st[0] += (double)*(float*)ADDR(esi + 0x4); /* 0x30007CD8: fadd dword ptr [esi + 4] */ 1023 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x4) = _v; } /* 0x30007CDB: fstp dword ptr [esi + 4] */ 1024 fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x30007CDE: fld dword ptr [ebp - 0x14] */ 1025 _st[0] += (double)*(float*)ADDR(ebp + (-0x8)); /* 0x30007CE1: fadd dword ptr [ebp - 8] */ 1026 _st[0] += (double)*(float*)ADDR(esi + 0x8); /* 0x30007CE4: fadd dword ptr [esi + 8] */ 1027 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x8) = _v; } /* 0x30007CE7: fstp dword ptr [esi + 8] */ 1028 ecx = MEM32(edi); /* 0x30007CEA: mov ecx, dword ptr [edi] */ 1029 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x30007CEC: fld dword ptr [ebp + 0xc] */ 1030 _st[0] += (double)*(float*)ADDR(eax + ecx); /* 0x30007CEF: fadd dword ptr [eax + ecx] */ 1031 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 1032 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1033 eax = eax + ecx; /* 0x30007CF2: add eax, ecx */ 1034 _flag_k = FK_ADD; 1035 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0xCu); 1036 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1037 ebx = ebx + 0xCu; /* 0x30007CF4: add ebx, 0xc */ 1038 _flag_k = FK_ADD; 1039 { float _v = (float)fp_pop(); *(float*)ADDR(eax) = _v; } /* 0x30007CF7: fstp dword ptr [eax] */ 1040 fp_push(*(float*)&MEM32(ebp + 0x10)); /* 0x30007CF9: fld dword ptr [ebp + 0x10] */ 1041 _st[0] += (double)*(float*)ADDR(eax + 0x4); /* 0x30007CFC: fadd dword ptr [eax + 4] */ 1042 { float _v = (float)fp_pop(); *(float*)ADDR(eax + 0x4) = _v; } /* 0x30007CFF: fstp dword ptr [eax + 4] */ 1043 fp_push(*(float*)&MEM32(ebp + 0x14)); /* 0x30007D02: fld dword ptr [ebp + 0x14] */ 1044 _st[0] += (double)*(float*)ADDR(eax + 0x8); /* 0x30007D05: fadd dword ptr [eax + 8] */ 1045 { float _v = (float)fp_pop(); *(float*)ADDR(eax + 0x8) = _v; } /* 0x30007D08: fstp dword ptr [eax + 8] */ 1046 eax = MEM32(ebp + (-0x4)); /* 0x30007D0B: mov eax, dword ptr [ebp - 4] */ 1047 ecx = MEM32(edi + 0x4); /* 0x30007D0E: mov ecx, dword ptr [edi + 4] */ 1048 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 1049 eax = eax + 1; /* 0x30007D11: inc eax */ 1050 _flag_k = FK_INC; 1051 /* cmp eax, ecx */ /* 0x30007D12: cmp eax, ecx */ 1052 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 1053 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1054 _flag_k = FK_CMP; 1055 MEM32(ebp + (-0x4)) = eax; /* 0x30007D14: mov dword ptr [ebp - 4], eax */ 1056 RECOMP_BACKEDGE(); 1057 if (CMP_L(_flag_a, _flag_b)) goto L_30007C0B; /* 0x30007D17: jl 0x30007c0b */ 1058 L_30007D1D: 1059 esi = POP32_VAL(esp); /* 0x30007D1D: pop esi */ 1060 L_30007D1E: 1061 PUSH32(esp, 1); /* 0x30007D1E: push 1 */ 1062 edx = ebp + 0xC; /* 0x30007D20: lea edx, [ebp + 0xc] */ 1063 PUSH32(esp, edx); /* 0x30007D23: push edx */ 1064 ecx = edi; /* 0x30007D24: mov ecx, edi */ 1065 RECOMP_ICALL(0x300085B0u); /* 0x30007D26: call 0x300085b0 */ /* not lifted */ 1066 RECOMP_FLAGS_IN(); 1067 ecx = MEM32(eax); /* 0x30007D2B: mov ecx, dword ptr [eax] */ 1068 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(8); 1069 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1070 edi = edi + 8; /* 0x30007D2D: add edi, 8 */ 1071 _flag_k = FK_ADD; 1072 MEM32(edi) = ecx; /* 0x30007D30: mov dword ptr [edi], ecx */ 1073 edx = MEM32(eax + 0x4); /* 0x30007D32: mov edx, dword ptr [eax + 4] */ 1074 MEM32(edi + 0x4) = edx; /* 0x30007D35: mov dword ptr [edi + 4], edx */ 1075 eax = MEM32(eax + 0x8); /* 0x30007D38: mov eax, dword ptr [eax + 8] */ 1076 MEM32(edi + 0x8) = eax; /* 0x30007D3B: mov dword ptr [edi + 8], eax */ 1077 edi = POP32_VAL(esp); /* 0x30007D3E: pop edi */ 1078 ebx = POP32_VAL(esp); /* 0x30007D3F: pop ebx */ 1079 esp = ebp; /* 0x30007D40: mov esp, ebp */ 1080 ebp = POP32_VAL(esp); /* 0x30007D42: pop ebp */ 1081 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x30007D43: ret 0x14 */ 1082 RECOMP_REGS_OUT(); 1083 } 1084 1085 void sub_30007D50(void) { 1086 int _fpu_cmp = 0; 1087 uint32_t _cf = 0; 1088 int _df = 1; 1089 uint32_t _flag_k = FK_NONE; 1090 uint32_t _flag_a = 0, _flag_b = 0; 1091 uint32_t _itail_tgt = 0; 1092 RECOMP_REGS_LOCALS 1093 RECOMP_ENTER(0x30007D50u); 1094 1095 L_30007D50: 1096 eax = MEM32(ecx + 0x4); /* 0x30007D50: mov eax, dword ptr [ecx + 4] */ 1097 /* test HI8(eax), 4 */ /* 0x30007D53: test ah, 4 */ 1098 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(4) << 24; 1099 _cf = 0; 1100 _flag_k = FK_NARROW(FK_TEST, 24); 1101 if (TEST_NZ(_flag_a, _flag_b)) goto L_30007D60; /* 0x30007D56: jne 0x30007d60 */ 1102 L_30007D58: 1103 _flag_a = (uint32_t)((eax | 0x400u)); _flag_b = (uint32_t)((eax | 0x400u)); 1104 eax = eax | 0x400u; /* 0x30007D58: or eax, 0x400 */ 1105 _cf = 0; 1106 _flag_k = FK_TEST; 1107 MEM32(ecx + 0x4) = eax; /* 0x30007D5D: mov dword ptr [ecx + 4], eax */ 1108 L_30007D60: 1109 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30007D60: ret */ 1110 RECOMP_REGS_OUT(); 1111 } 1112 1113 void sub_30007D70(void) { 1114 int _fpu_cmp = 0; 1115 uint32_t _cf = 0; 1116 int _df = 1; 1117 uint32_t _flag_k = FK_NONE; 1118 uint32_t _flag_a = 0, _flag_b = 0; 1119 uint32_t _itail_tgt = 0; 1120 RECOMP_REGS_LOCALS 1121 RECOMP_ENTER(0x30007D70u); 1122 1123 L_30007D70: 1124 edx = MEM32(ecx + 0x4); /* 0x30007D70: mov edx, dword ptr [ecx + 4] */ 1125 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1126 eax = 0; /* 0x30007D73: xor eax, eax */ 1127 _cf = 0; 1128 _flag_k = FK_TEST; 1129 /* cmp edx, 0x400u */ /* 0x30007D75: cmp edx, 0x400 */ 1130 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x400u); 1131 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1132 _flag_k = FK_CMP; 1133 SET_LO8(eax, (CMP_G(_flag_a, _flag_b)) ? 1 : 0); /* 0x30007D7B: setg al */ 1134 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30007D7E: ret */ 1135 RECOMP_REGS_OUT(); 1136 } 1137 1138 void sub_30007D80(void) { 1139 int _fpu_cmp = 0; 1140 uint32_t _cf = 0; 1141 int _df = 1; 1142 uint32_t _flag_k = FK_NONE; 1143 uint32_t _flag_a = 0, _flag_b = 0; 1144 uint32_t _itail_tgt = 0; 1145 RECOMP_REGS_LOCALS 1146 RECOMP_ENTER(0x30007D80u); 1147 1148 L_30007D80: 1149 PUSH32(esp, ebp); /* 0x30007D80: push ebp */ 1150 ebp = esp; /* 0x30007D81: mov ebp, esp */ 1151 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x60u); 1152 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1153 esp = esp - 0x60u; /* 0x30007D83: sub esp, 0x60 */ 1154 _flag_k = FK_CMP; 1155 eax = MEM32(ebp + 0xC); /* 0x30007D86: mov eax, dword ptr [ebp + 0xc] */ 1156 edx = MEM32(eax); /* 0x30007D89: mov edx, dword ptr [eax] */ 1157 PUSH32(esp, ebx); /* 0x30007D8B: push ebx */ 1158 PUSH32(esp, esi); /* 0x30007D8C: push esi */ 1159 esi = MEM32(ecx); /* 0x30007D8D: mov esi, dword ptr [ecx] */ 1160 MEM32(ebp + (-0xC)) = edx; /* 0x30007D8F: mov dword ptr [ebp - 0xc], edx */ 1161 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x30007D92: fld dword ptr [ebp - 0xc] */ 1162 edx = MEM32(eax + 0x4); /* 0x30007D95: mov edx, dword ptr [eax + 4] */ 1163 eax = MEM32(eax + 0x8); /* 0x30007D98: mov eax, dword ptr [eax + 8] */ 1164 PUSH32(esp, edi); /* 0x30007D9B: push edi */ 1165 edi = MEM32(ebp + 0x8); /* 0x30007D9C: mov edi, dword ptr [ebp + 8] */ 1166 _st[0] -= (double)*(float*)ADDR(edi); /* 0x30007D9F: fsub dword ptr [edi] */ 1167 MEM32(ebp + (-0x8)) = edx; /* 0x30007DA1: mov dword ptr [ebp - 8], edx */ 1168 MEM32(ebp + (-0x4)) = eax; /* 0x30007DA4: mov dword ptr [ebp - 4], eax */ 1169 eax = esi + 0x18; /* 0x30007DA7: lea eax, [esi + 0x18] */ 1170 ecx = MEM32(eax); /* 0x30007DAA: mov ecx, dword ptr [eax] */ 1171 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x30007DAC: fstp dword ptr [ebp - 0xc] */ 1172 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x30007DAF: fld dword ptr [ebp - 8] */ 1173 edx = MEM32(eax + 0x4); /* 0x30007DB2: mov edx, dword ptr [eax + 4] */ 1174 _st[0] -= (double)*(float*)ADDR(edi + 0x4); /* 0x30007DB5: fsub dword ptr [edi + 4] */ 1175 eax = MEM32(eax + 0x8); /* 0x30007DB8: mov eax, dword ptr [eax + 8] */ 1176 ebx = esi + 0xC; /* 0x30007DBB: lea ebx, [esi + 0xc] */ 1177 MEM32(ebp + (-0x30)) = ecx; /* 0x30007DBE: mov dword ptr [ebp - 0x30], ecx */ 1178 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x30007DC1: fstp dword ptr [ebp - 8] */ 1179 PUSH32(esp, ebx); /* 0x30007DC4: push ebx */ 1180 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x30007DC5: fld dword ptr [ebp - 4] */ 1181 ecx = ebp + (-0x30); /* 0x30007DC8: lea ecx, [ebp - 0x30] */ 1182 _st[0] -= (double)*(float*)ADDR(edi + 0x8); /* 0x30007DCB: fsub dword ptr [edi + 8] */ 1183 MEM32(ebp + (-0x2C)) = edx; /* 0x30007DCE: mov dword ptr [ebp - 0x2c], edx */ 1184 MEM32(ebp + (-0x28)) = eax; /* 0x30007DD1: mov dword ptr [ebp - 0x28], eax */ 1185 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x30007DD4: fstp dword ptr [ebp - 4] */ 1186 RECOMP_ICALL(MEM32(0x300190BC)); /* 0x30007DD7: call dword ptr [0x300190bc] */ 1187 RECOMP_FLAGS_IN(); 1188 ecx = MEM32(eax); /* 0x30007DDD: mov ecx, dword ptr [eax] */ 1189 MEM32(ebp + (-0x48)) = ecx; /* 0x30007DDF: mov dword ptr [ebp - 0x48], ecx */ 1190 edx = MEM32(eax + 0x4); /* 0x30007DE2: mov edx, dword ptr [eax + 4] */ 1191 MEM32(ebp + (-0x44)) = edx; /* 0x30007DE5: mov dword ptr [ebp - 0x44], edx */ 1192 eax = MEM32(eax + 0x8); /* 0x30007DE8: mov eax, dword ptr [eax + 8] */ 1193 ecx = ebx; /* 0x30007DEB: mov ecx, ebx */ 1194 edx = MEM32(ecx); /* 0x30007DED: mov edx, dword ptr [ecx] */ 1195 MEM32(ebp + (-0x40)) = eax; /* 0x30007DEF: mov dword ptr [ebp - 0x40], eax */ 1196 eax = MEM32(ecx + 0x4); /* 0x30007DF2: mov eax, dword ptr [ecx + 4] */ 1197 ecx = MEM32(ecx + 0x8); /* 0x30007DF5: mov ecx, dword ptr [ecx + 8] */ 1198 MEM32(ebp + (-0x34)) = ecx; /* 0x30007DF8: mov dword ptr [ebp - 0x34], ecx */ 1199 PUSH32(esp, esi); /* 0x30007DFB: push esi */ 1200 ecx = ebp + (-0x3C); /* 0x30007DFC: lea ecx, [ebp - 0x3c] */ 1201 MEM32(ebp + (-0x3C)) = edx; /* 0x30007DFF: mov dword ptr [ebp - 0x3c], edx */ 1202 MEM32(ebp + (-0x38)) = eax; /* 0x30007E02: mov dword ptr [ebp - 0x38], eax */ 1203 RECOMP_ICALL(MEM32(0x300190BC)); /* 0x30007E05: call dword ptr [0x300190bc] */ 1204 RECOMP_FLAGS_IN(); 1205 edx = MEM32(eax); /* 0x30007E0B: mov edx, dword ptr [eax] */ 1206 ecx = MEM32(eax + 0x4); /* 0x30007E0D: mov ecx, dword ptr [eax + 4] */ 1207 MEM32(ebp + (-0x54)) = edx; /* 0x30007E10: mov dword ptr [ebp - 0x54], edx */ 1208 edx = MEM32(eax + 0x8); /* 0x30007E13: mov edx, dword ptr [eax + 8] */ 1209 eax = ebp + (-0x48); /* 0x30007E16: lea eax, [ebp - 0x48] */ 1210 MEM32(ebp + (-0x50)) = ecx; /* 0x30007E19: mov dword ptr [ebp - 0x50], ecx */ 1211 PUSH32(esp, eax); /* 0x30007E1C: push eax */ 1212 ecx = ebp + (-0x54); /* 0x30007E1D: lea ecx, [ebp - 0x54] */ 1213 MEM32(ebp + (-0x4C)) = edx; /* 0x30007E20: mov dword ptr [ebp - 0x4c], edx */ 1214 RECOMP_ICALL(MEM32(0x300190D8)); /* 0x30007E23: call dword ptr [0x300190d8] */ 1215 RECOMP_FLAGS_IN(); 1216 ecx = MEM32(eax); /* 0x30007E29: mov ecx, dword ptr [eax] */ 1217 edx = MEM32(eax + 0x4); /* 0x30007E2B: mov edx, dword ptr [eax + 4] */ 1218 eax = MEM32(eax + 0x8); /* 0x30007E2E: mov eax, dword ptr [eax + 8] */ 1219 MEM32(ebp + (-0x18)) = ecx; /* 0x30007E31: mov dword ptr [ebp - 0x18], ecx */ 1220 MEM32(ebp + (-0x14)) = edx; /* 0x30007E34: mov dword ptr [ebp - 0x14], edx */ 1221 ecx = esi; /* 0x30007E37: mov ecx, esi */ 1222 edx = MEM32(ecx); /* 0x30007E39: mov edx, dword ptr [ecx] */ 1223 MEM32(ebp + (-0x10)) = eax; /* 0x30007E3B: mov dword ptr [ebp - 0x10], eax */ 1224 eax = MEM32(ecx + 0x4); /* 0x30007E3E: mov eax, dword ptr [ecx + 4] */ 1225 ecx = MEM32(ecx + 0x8); /* 0x30007E41: mov ecx, dword ptr [ecx + 8] */ 1226 MEM32(ebp + (-0x4C)) = ecx; /* 0x30007E44: mov dword ptr [ebp - 0x4c], ecx */ 1227 PUSH32(esp, edi); /* 0x30007E47: push edi */ 1228 ecx = ebp + (-0x54); /* 0x30007E48: lea ecx, [ebp - 0x54] */ 1229 MEM32(ebp + (-0x54)) = edx; /* 0x30007E4B: mov dword ptr [ebp - 0x54], edx */ 1230 MEM32(ebp + (-0x50)) = eax; /* 0x30007E4E: mov dword ptr [ebp - 0x50], eax */ 1231 RECOMP_ICALL(MEM32(0x300190BC)); /* 0x30007E51: call dword ptr [0x300190bc] */ 1232 RECOMP_FLAGS_IN(); 1233 edx = MEM32(eax); /* 0x30007E57: mov edx, dword ptr [eax] */ 1234 ecx = MEM32(eax + 0x4); /* 0x30007E59: mov ecx, dword ptr [eax + 4] */ 1235 MEM32(ebp + (-0x30)) = edx; /* 0x30007E5C: mov dword ptr [ebp - 0x30], edx */ 1236 edx = MEM32(eax + 0x8); /* 0x30007E5F: mov edx, dword ptr [eax + 8] */ 1237 MEM32(ebp + (-0x28)) = edx; /* 0x30007E62: mov dword ptr [ebp - 0x28], edx */ 1238 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x30007E65: fld dword ptr [ebp - 0x28] */ 1239 MEM32(ebp + (-0x2C)) = ecx; /* 0x30007E68: mov dword ptr [ebp - 0x2c], ecx */ 1240 _st[0] *= (double)*(float*)ADDR(ebp + (-0x10)); /* 0x30007E6B: fmul dword ptr [ebp - 0x10] */ 1241 eax = MEM32(ebp + (-0xC)); /* 0x30007E6E: mov eax, dword ptr [ebp - 0xc] */ 1242 fp_push(*(float*)&MEM32(ebp + (-0x2C))); /* 0x30007E71: fld dword ptr [ebp - 0x2c] */ 1243 ecx = MEM32(ebp + (-0x8)); /* 0x30007E74: mov ecx, dword ptr [ebp - 8] */ 1244 _st[0] *= (double)*(float*)ADDR(ebp + (-0x14)); /* 0x30007E77: fmul dword ptr [ebp - 0x14] */ 1245 edx = MEM32(ebp + (-0x4)); /* 0x30007E7A: mov edx, dword ptr [ebp - 4] */ 1246 { double _v = fp_pop(); _st[0] += _v; } /* 0x30007E7D: faddp st(1) */ 1247 fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x30007E7F: fld dword ptr [ebp - 0x18] */ 1248 _st[0] *= (double)*(float*)ADDR(ebp + (-0x30)); /* 0x30007E82: fmul dword ptr [ebp - 0x30] */ 1249 { double _v = fp_pop(); _st[0] += _v; } /* 0x30007E85: faddp st(1) */ 1250 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x30007E87: fld dword ptr [ebp - 4] */ 1251 _st[0] *= (double)*(float*)ADDR(ebp + (-0x10)); /* 0x30007E8A: fmul dword ptr [ebp - 0x10] */ 1252 MEM32(ebp + (-0x10)) = edx; /* 0x30007E8D: mov dword ptr [ebp - 0x10], edx */ 1253 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x30007E90: fld dword ptr [ebp - 8] */ 1254 _st[0] *= (double)*(float*)ADDR(ebp + (-0x14)); /* 0x30007E93: fmul dword ptr [ebp - 0x14] */ 1255 MEM32(ebp + (-0x14)) = ecx; /* 0x30007E96: mov dword ptr [ebp - 0x14], ecx */ 1256 { double _v = fp_pop(); _st[0] += _v; } /* 0x30007E99: faddp st(1) */ 1257 fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x30007E9B: fld dword ptr [ebp - 0x18] */ 1258 MEM32(ebp + (-0x18)) = eax; /* 0x30007E9E: mov dword ptr [ebp - 0x18], eax */ 1259 _st[0] *= (double)*(float*)ADDR(ebp + (-0xC)); /* 0x30007EA1: fmul dword ptr [ebp - 0xc] */ 1260 { double _v = fp_pop(); _st[0] += _v; } /* 0x30007EA4: faddp st(1) */ 1261 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x30007EA6: fdivp st(1) */ 1262 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x30007EA8: fld dword ptr [ebp - 0xc] */ 1263 _st[0] *= _st[1]; /* 0x30007EAB: fmul st(1) */ 1264 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x18)) = _v; } /* 0x30007EAD: fstp dword ptr [ebp - 0x18] */ 1265 eax = MEM32(ebp + (-0x18)); /* 0x30007EB0: mov eax, dword ptr [ebp - 0x18] */ 1266 fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x30007EB3: fld dword ptr [ebp - 0x14] */ 1267 MEM32(ebp + (-0x54)) = eax; /* 0x30007EB6: mov dword ptr [ebp - 0x54], eax */ 1268 eax = MEM32(edi); /* 0x30007EB9: mov eax, dword ptr [edi] */ 1269 _st[0] *= _st[1]; /* 0x30007EBB: fmul st(1) */ 1270 MEM32(ebp + (-0x48)) = eax; /* 0x30007EBD: mov dword ptr [ebp - 0x48], eax */ 1271 eax = ebp + (-0x54); /* 0x30007EC0: lea eax, [ebp - 0x54] */ 1272 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x30007EC3: fstp dword ptr [ebp - 0x14] */ 1273 ecx = MEM32(ebp + (-0x14)); /* 0x30007EC6: mov ecx, dword ptr [ebp - 0x14] */ 1274 fp_push(*(float*)&MEM32(ebp + (-0x10))); /* 0x30007EC9: fld dword ptr [ebp - 0x10] */ 1275 MEM32(ebp + (-0x50)) = ecx; /* 0x30007ECC: mov dword ptr [ebp - 0x50], ecx */ 1276 ecx = MEM32(edi + 0x4); /* 0x30007ECF: mov ecx, dword ptr [edi + 4] */ 1277 _st[0] *= _st[1]; /* 0x30007ED2: fmul st(1) */ 1278 MEM32(ebp + (-0x44)) = ecx; /* 0x30007ED4: mov dword ptr [ebp - 0x44], ecx */ 1279 PUSH32(esp, eax); /* 0x30007ED7: push eax */ 1280 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x30007ED8: fstp dword ptr [ebp - 0x10] */ 1281 edx = MEM32(ebp + (-0x10)); /* 0x30007EDB: mov edx, dword ptr [ebp - 0x10] */ 1282 MEM32(ebp + (-0x4C)) = edx; /* 0x30007EDE: mov dword ptr [ebp - 0x4c], edx */ 1283 edx = MEM32(edi + 0x8); /* 0x30007EE1: mov edx, dword ptr [edi + 8] */ 1284 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30007EE4: fstp st(0) */ 1285 ecx = ebp + (-0x48); /* 0x30007EE6: lea ecx, [ebp - 0x48] */ 1286 MEM32(ebp + (-0x40)) = edx; /* 0x30007EE9: mov dword ptr [ebp - 0x40], edx */ 1287 RECOMP_ICALL(MEM32(0x300190C4)); /* 0x30007EEC: call dword ptr [0x300190c4] */ 1288 RECOMP_FLAGS_IN(); 1289 ecx = eax; /* 0x30007EF2: mov ecx, eax */ 1290 edi = MEM32(ecx); /* 0x30007EF4: mov edi, dword ptr [ecx] */ 1291 edx = MEM32(ecx + 0x4); /* 0x30007EF6: mov edx, dword ptr [ecx + 4] */ 1292 ecx = MEM32(ecx + 0x8); /* 0x30007EF9: mov ecx, dword ptr [ecx + 8] */ 1293 MEM32(ebp + (-0x14)) = edx; /* 0x30007EFC: mov dword ptr [ebp - 0x14], edx */ 1294 edx = MEM32(eax); /* 0x30007EFF: mov edx, dword ptr [eax] */ 1295 MEM32(ebp + (-0x10)) = ecx; /* 0x30007F01: mov dword ptr [ebp - 0x10], ecx */ 1296 ecx = MEM32(eax + 0x4); /* 0x30007F04: mov ecx, dword ptr [eax + 4] */ 1297 MEM32(ebp + (-0x3C)) = edx; /* 0x30007F07: mov dword ptr [ebp - 0x3c], edx */ 1298 edx = MEM32(eax + 0x8); /* 0x30007F0A: mov edx, dword ptr [eax + 8] */ 1299 MEM32(ebp + (-0x38)) = ecx; /* 0x30007F0D: mov dword ptr [ebp - 0x38], ecx */ 1300 PUSH32(esp, esi); /* 0x30007F10: push esi */ 1301 ecx = ebp + (-0x3C); /* 0x30007F11: lea ecx, [ebp - 0x3c] */ 1302 MEM32(ebp + (-0x18)) = edi; /* 0x30007F14: mov dword ptr [ebp - 0x18], edi */ 1303 MEM32(ebp + (-0x34)) = edx; /* 0x30007F17: mov dword ptr [ebp - 0x34], edx */ 1304 RECOMP_ICALL(MEM32(0x300190BC)); /* 0x30007F1A: call dword ptr [0x300190bc] */ 1305 RECOMP_FLAGS_IN(); 1306 ecx = MEM32(eax); /* 0x30007F20: mov ecx, dword ptr [eax] */ 1307 MEM32(ebp + (-0x48)) = ecx; /* 0x30007F22: mov dword ptr [ebp - 0x48], ecx */ 1308 edx = MEM32(eax + 0x4); /* 0x30007F25: mov edx, dword ptr [eax + 4] */ 1309 MEM32(ebp + (-0x44)) = edx; /* 0x30007F28: mov dword ptr [ebp - 0x44], edx */ 1310 eax = MEM32(eax + 0x8); /* 0x30007F2B: mov eax, dword ptr [eax + 8] */ 1311 ecx = ebx; /* 0x30007F2E: mov ecx, ebx */ 1312 edx = MEM32(ecx); /* 0x30007F30: mov edx, dword ptr [ecx] */ 1313 MEM32(ebp + (-0x40)) = eax; /* 0x30007F32: mov dword ptr [ebp - 0x40], eax */ 1314 eax = MEM32(ecx + 0x4); /* 0x30007F35: mov eax, dword ptr [ecx + 4] */ 1315 ecx = MEM32(ecx + 0x8); /* 0x30007F38: mov ecx, dword ptr [ecx + 8] */ 1316 MEM32(ebp + (-0x4C)) = ecx; /* 0x30007F3B: mov dword ptr [ebp - 0x4c], ecx */ 1317 MEM32(ebp + (-0x54)) = edx; /* 0x30007F3E: mov dword ptr [ebp - 0x54], edx */ 1318 MEM32(ebp + (-0x50)) = eax; /* 0x30007F41: mov dword ptr [ebp - 0x50], eax */ 1319 PUSH32(esp, esi); /* 0x30007F44: push esi */ 1320 ecx = ebp + (-0x54); /* 0x30007F45: lea ecx, [ebp - 0x54] */ 1321 RECOMP_ICALL(MEM32(0x300190BC)); /* 0x30007F48: call dword ptr [0x300190bc] */ 1322 RECOMP_FLAGS_IN(); 1323 edx = MEM32(eax); /* 0x30007F4E: mov edx, dword ptr [eax] */ 1324 ecx = MEM32(eax + 0x4); /* 0x30007F50: mov ecx, dword ptr [eax + 4] */ 1325 MEM32(ebp + (-0x30)) = edx; /* 0x30007F53: mov dword ptr [ebp - 0x30], edx */ 1326 edx = MEM32(eax + 0x8); /* 0x30007F56: mov edx, dword ptr [eax + 8] */ 1327 eax = ebp + (-0x48); /* 0x30007F59: lea eax, [ebp - 0x48] */ 1328 MEM32(ebp + (-0x2C)) = ecx; /* 0x30007F5C: mov dword ptr [ebp - 0x2c], ecx */ 1329 PUSH32(esp, eax); /* 0x30007F5F: push eax */ 1330 ecx = ebp + (-0x30); /* 0x30007F60: lea ecx, [ebp - 0x30] */ 1331 MEM32(ebp + (-0x28)) = edx; /* 0x30007F63: mov dword ptr [ebp - 0x28], edx */ 1332 RECOMP_ICALL(MEM32(0x300190D8)); /* 0x30007F66: call dword ptr [0x300190d8] */ 1333 RECOMP_FLAGS_IN(); 1334 ecx = MEM32(eax); /* 0x30007F6C: mov ecx, dword ptr [eax] */ 1335 MEM32(ebp + (-0x24)) = ecx; /* 0x30007F6E: mov dword ptr [ebp - 0x24], ecx */ 1336 edx = MEM32(eax + 0x4); /* 0x30007F71: mov edx, dword ptr [eax + 4] */ 1337 ecx = MEM32(ebp + (-0x14)); /* 0x30007F74: mov ecx, dword ptr [ebp - 0x14] */ 1338 MEM32(ebp + (-0x20)) = edx; /* 0x30007F77: mov dword ptr [ebp - 0x20], edx */ 1339 eax = MEM32(eax + 0x8); /* 0x30007F7A: mov eax, dword ptr [eax + 8] */ 1340 edx = MEM32(ebp + (-0x10)); /* 0x30007F7D: mov edx, dword ptr [ebp - 0x10] */ 1341 MEM32(ebp + (-0x50)) = ecx; /* 0x30007F80: mov dword ptr [ebp - 0x50], ecx */ 1342 PUSH32(esp, ebx); /* 0x30007F83: push ebx */ 1343 ecx = ebp + (-0x54); /* 0x30007F84: lea ecx, [ebp - 0x54] */ 1344 MEM32(ebp + (-0x1C)) = eax; /* 0x30007F87: mov dword ptr [ebp - 0x1c], eax */ 1345 MEM32(ebp + (-0x54)) = edi; /* 0x30007F8A: mov dword ptr [ebp - 0x54], edi */ 1346 MEM32(ebp + (-0x4C)) = edx; /* 0x30007F8D: mov dword ptr [ebp - 0x4c], edx */ 1347 RECOMP_ICALL(MEM32(0x300190BC)); /* 0x30007F90: call dword ptr [0x300190bc] */ 1348 RECOMP_FLAGS_IN(); 1349 ecx = MEM32(eax); /* 0x30007F96: mov ecx, dword ptr [eax] */ 1350 MEM32(ebp + (-0x3C)) = ecx; /* 0x30007F98: mov dword ptr [ebp - 0x3c], ecx */ 1351 edx = MEM32(eax + 0x4); /* 0x30007F9B: mov edx, dword ptr [eax + 4] */ 1352 MEM32(ebp + (-0x38)) = edx; /* 0x30007F9E: mov dword ptr [ebp - 0x38], edx */ 1353 eax = MEM32(eax + 0x8); /* 0x30007FA1: mov eax, dword ptr [eax + 8] */ 1354 edi = esi + 0x18; /* 0x30007FA4: lea edi, [esi + 0x18] */ 1355 ecx = edi; /* 0x30007FA7: mov ecx, edi */ 1356 edx = MEM32(ecx); /* 0x30007FA9: mov edx, dword ptr [ecx] */ 1357 MEM32(ebp + (-0x34)) = eax; /* 0x30007FAB: mov dword ptr [ebp - 0x34], eax */ 1358 eax = MEM32(ecx + 0x4); /* 0x30007FAE: mov eax, dword ptr [ecx + 4] */ 1359 ecx = MEM32(ecx + 0x8); /* 0x30007FB1: mov ecx, dword ptr [ecx + 8] */ 1360 MEM32(ebp + (-0x40)) = ecx; /* 0x30007FB4: mov dword ptr [ebp - 0x40], ecx */ 1361 PUSH32(esp, ebx); /* 0x30007FB7: push ebx */ 1362 ecx = ebp + (-0x48); /* 0x30007FB8: lea ecx, [ebp - 0x48] */ 1363 MEM32(ebp + (-0x48)) = edx; /* 0x30007FBB: mov dword ptr [ebp - 0x48], edx */ 1364 MEM32(ebp + (-0x44)) = eax; /* 0x30007FBE: mov dword ptr [ebp - 0x44], eax */ 1365 RECOMP_ICALL(MEM32(0x300190BC)); /* 0x30007FC1: call dword ptr [0x300190bc] */ 1366 RECOMP_FLAGS_IN(); 1367 edx = MEM32(eax); /* 0x30007FC7: mov edx, dword ptr [eax] */ 1368 ecx = MEM32(eax + 0x4); /* 0x30007FC9: mov ecx, dword ptr [eax + 4] */ 1369 MEM32(ebp + (-0xC)) = edx; /* 0x30007FCC: mov dword ptr [ebp - 0xc], edx */ 1370 edx = MEM32(eax + 0x8); /* 0x30007FCF: mov edx, dword ptr [eax + 8] */ 1371 eax = ebp + (-0x3C); /* 0x30007FD2: lea eax, [ebp - 0x3c] */ 1372 MEM32(ebp + (-0x8)) = ecx; /* 0x30007FD5: mov dword ptr [ebp - 8], ecx */ 1373 PUSH32(esp, eax); /* 0x30007FD8: push eax */ 1374 ecx = ebp + (-0xC); /* 0x30007FD9: lea ecx, [ebp - 0xc] */ 1375 MEM32(ebp + (-0x4)) = edx; /* 0x30007FDC: mov dword ptr [ebp - 4], edx */ 1376 RECOMP_ICALL(MEM32(0x300190D8)); /* 0x30007FDF: call dword ptr [0x300190d8] */ 1377 RECOMP_FLAGS_IN(); 1378 fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x30007FE5: fld dword ptr [ebp - 0x1c] */ 1379 ecx = MEM32(eax); /* 0x30007FE8: mov ecx, dword ptr [eax] */ 1380 edx = MEM32(eax + 0x4); /* 0x30007FEA: mov edx, dword ptr [eax + 4] */ 1381 eax = MEM32(eax + 0x8); /* 0x30007FED: mov eax, dword ptr [eax + 8] */ 1382 MEM32(ebp + (-0x28)) = eax; /* 0x30007FF0: mov dword ptr [ebp - 0x28], eax */ 1383 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x30007FF3: fmul dword ptr [ebp - 0x28] */ 1384 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x30007FF6: fld dword ptr [ebp - 0x20] */ 1385 MEM32(ebp + (-0x2C)) = edx; /* 0x30007FF9: mov dword ptr [ebp - 0x2c], edx */ 1386 _st[0] *= (double)*(float*)ADDR(ebp + (-0x2C)); /* 0x30007FFC: fmul dword ptr [ebp - 0x2c] */ 1387 MEM32(ebp + (-0x30)) = ecx; /* 0x30007FFF: mov dword ptr [ebp - 0x30], ecx */ 1388 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008002: faddp st(1) */ 1389 fp_push(*(float*)&MEM32(ebp + (-0x30))); /* 0x30008004: fld dword ptr [ebp - 0x30] */ 1390 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x30008007: fmul dword ptr [ebp - 0x24] */ 1391 { double _v = fp_pop(); _st[0] += _v; } /* 0x3000800A: faddp st(1) */ 1392 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3001919C)); /* 0x3000800C: fcomp dword ptr [0x3001919c] */ 1393 fp_pop(); 1394 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x30008012: fnstsw ax */ 1395 /* test HI8(eax), 1 */ /* 0x30008014: test ah, 1 */ 1396 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 1397 _cf = 0; 1398 _flag_k = FK_NARROW(FK_TEST, 24); 1399 if (TEST_Z(_flag_a, _flag_b)) goto L_30008024; /* 0x30008017: je 0x30008024 */ 1400 L_30008019: 1401 edi = POP32_VAL(esp); /* 0x30008019: pop edi */ 1402 esi = POP32_VAL(esp); /* 0x3000801A: pop esi */ 1403 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 1404 SET_LO8(eax, 0); /* 0x3000801B: xor al, al */ 1405 _cf = 0; 1406 _flag_k = FK_NARROW(FK_TEST, 24); 1407 ebx = POP32_VAL(esp); /* 0x3000801D: pop ebx */ 1408 esp = ebp; /* 0x3000801E: mov esp, ebp */ 1409 ebp = POP32_VAL(esp); /* 0x30008020: pop ebp */ 1410 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x30008021: ret 8 */ 1411 L_30008024: 1412 ecx = MEM32(ebp + (-0x18)); /* 0x30008024: mov ecx, dword ptr [ebp - 0x18] */ 1413 edx = MEM32(ebp + (-0x14)); /* 0x30008027: mov edx, dword ptr [ebp - 0x14] */ 1414 eax = MEM32(ebp + (-0x10)); /* 0x3000802A: mov eax, dword ptr [ebp - 0x10] */ 1415 MEM32(ebp + (-0x54)) = ecx; /* 0x3000802D: mov dword ptr [ebp - 0x54], ecx */ 1416 PUSH32(esp, edi); /* 0x30008030: push edi */ 1417 ecx = ebp + (-0x54); /* 0x30008031: lea ecx, [ebp - 0x54] */ 1418 MEM32(ebp + (-0x50)) = edx; /* 0x30008034: mov dword ptr [ebp - 0x50], edx */ 1419 MEM32(ebp + (-0x4C)) = eax; /* 0x30008037: mov dword ptr [ebp - 0x4c], eax */ 1420 RECOMP_ICALL(MEM32(0x300190BC)); /* 0x3000803A: call dword ptr [0x300190bc] */ 1421 RECOMP_FLAGS_IN(); 1422 ecx = MEM32(eax); /* 0x30008040: mov ecx, dword ptr [eax] */ 1423 MEM32(ebp + (-0x3C)) = ecx; /* 0x30008042: mov dword ptr [ebp - 0x3c], ecx */ 1424 edx = MEM32(eax + 0x4); /* 0x30008045: mov edx, dword ptr [eax + 4] */ 1425 ecx = MEM32(esi); /* 0x30008048: mov ecx, dword ptr [esi] */ 1426 MEM32(ebp + (-0x38)) = edx; /* 0x3000804A: mov dword ptr [ebp - 0x38], edx */ 1427 eax = MEM32(eax + 0x8); /* 0x3000804D: mov eax, dword ptr [eax + 8] */ 1428 edx = MEM32(esi + 0x4); /* 0x30008050: mov edx, dword ptr [esi + 4] */ 1429 MEM32(ebp + (-0x34)) = eax; /* 0x30008053: mov dword ptr [ebp - 0x34], eax */ 1430 eax = MEM32(esi + 0x8); /* 0x30008056: mov eax, dword ptr [esi + 8] */ 1431 MEM32(ebp + (-0x48)) = ecx; /* 0x30008059: mov dword ptr [ebp - 0x48], ecx */ 1432 PUSH32(esp, edi); /* 0x3000805C: push edi */ 1433 ecx = ebp + (-0x48); /* 0x3000805D: lea ecx, [ebp - 0x48] */ 1434 MEM32(ebp + (-0x44)) = edx; /* 0x30008060: mov dword ptr [ebp - 0x44], edx */ 1435 MEM32(ebp + (-0x40)) = eax; /* 0x30008063: mov dword ptr [ebp - 0x40], eax */ 1436 RECOMP_ICALL(MEM32(0x300190BC)); /* 0x30008066: call dword ptr [0x300190bc] */ 1437 RECOMP_FLAGS_IN(); 1438 ecx = MEM32(eax); /* 0x3000806C: mov ecx, dword ptr [eax] */ 1439 edx = MEM32(eax + 0x4); /* 0x3000806E: mov edx, dword ptr [eax + 4] */ 1440 eax = MEM32(eax + 0x8); /* 0x30008071: mov eax, dword ptr [eax + 8] */ 1441 MEM32(ebp + (-0x30)) = ecx; /* 0x30008074: mov dword ptr [ebp - 0x30], ecx */ 1442 ecx = ebp + (-0x3C); /* 0x30008077: lea ecx, [ebp - 0x3c] */ 1443 PUSH32(esp, ecx); /* 0x3000807A: push ecx */ 1444 ecx = ebp + (-0x30); /* 0x3000807B: lea ecx, [ebp - 0x30] */ 1445 MEM32(ebp + (-0x2C)) = edx; /* 0x3000807E: mov dword ptr [ebp - 0x2c], edx */ 1446 MEM32(ebp + (-0x28)) = eax; /* 0x30008081: mov dword ptr [ebp - 0x28], eax */ 1447 RECOMP_ICALL(MEM32(0x300190D8)); /* 0x30008084: call dword ptr [0x300190d8] */ 1448 RECOMP_FLAGS_IN(); 1449 edx = MEM32(eax); /* 0x3000808A: mov edx, dword ptr [eax] */ 1450 MEM32(ebp + (-0x60)) = edx; /* 0x3000808C: mov dword ptr [ebp - 0x60], edx */ 1451 ecx = MEM32(eax + 0x4); /* 0x3000808F: mov ecx, dword ptr [eax + 4] */ 1452 MEM32(ebp + (-0x5C)) = ecx; /* 0x30008092: mov dword ptr [ebp - 0x5c], ecx */ 1453 edx = MEM32(eax + 0x8); /* 0x30008095: mov edx, dword ptr [eax + 8] */ 1454 eax = ebp + (-0x60); /* 0x30008098: lea eax, [ebp - 0x60] */ 1455 PUSH32(esp, eax); /* 0x3000809B: push eax */ 1456 ecx = ebp + (-0x24); /* 0x3000809C: lea ecx, [ebp - 0x24] */ 1457 MEM32(ebp + (-0x58)) = edx; /* 0x3000809F: mov dword ptr [ebp - 0x58], edx */ 1458 RECOMP_ICALL(MEM32(0x300190B8)); /* 0x300080A2: call dword ptr [0x300190b8] */ 1459 RECOMP_FLAGS_IN(); 1460 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3001919C)); /* 0x300080A8: fcomp dword ptr [0x3001919c] */ 1461 fp_pop(); 1462 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x300080AE: fnstsw ax */ 1463 /* test HI8(eax), 1 */ /* 0x300080B0: test ah, 1 */ 1464 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 1465 _cf = 0; 1466 _flag_k = FK_NARROW(FK_TEST, 24); 1467 if (TEST_Z(_flag_a, _flag_b)) goto L_300080C0; /* 0x300080B3: je 0x300080c0 */ 1468 L_300080B5: 1469 edi = POP32_VAL(esp); /* 0x300080B5: pop edi */ 1470 esi = POP32_VAL(esp); /* 0x300080B6: pop esi */ 1471 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 1472 SET_LO8(eax, 0); /* 0x300080B7: xor al, al */ 1473 _cf = 0; 1474 _flag_k = FK_NARROW(FK_TEST, 24); 1475 ebx = POP32_VAL(esp); /* 0x300080B9: pop ebx */ 1476 esp = ebp; /* 0x300080BA: mov esp, ebp */ 1477 ebp = POP32_VAL(esp); /* 0x300080BC: pop ebp */ 1478 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x300080BD: ret 8 */ 1479 L_300080C0: 1480 edi = POP32_VAL(esp); /* 0x300080C0: pop edi */ 1481 esi = POP32_VAL(esp); /* 0x300080C1: pop esi */ 1482 SET_LO8(eax, 1); /* 0x300080C2: mov al, 1 */ 1483 ebx = POP32_VAL(esp); /* 0x300080C4: pop ebx */ 1484 esp = ebp; /* 0x300080C5: mov esp, ebp */ 1485 ebp = POP32_VAL(esp); /* 0x300080C7: pop ebp */ 1486 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x300080C8: ret 8 */ 1487 RECOMP_REGS_OUT(); 1488 } 1489 1490 void sub_300080D0(void) { 1491 int _fpu_cmp = 0; 1492 uint32_t _cf = 0; 1493 int _df = 1; 1494 uint32_t _flag_k = FK_NONE; 1495 uint32_t _flag_a = 0, _flag_b = 0; 1496 uint32_t _itail_tgt = 0; 1497 RECOMP_REGS_LOCALS 1498 RECOMP_ENTER(0x300080D0u); 1499 1500 L_300080D0: 1501 PUSH32(esp, ebp); /* 0x300080D0: push ebp */ 1502 ebp = esp; /* 0x300080D1: mov ebp, esp */ 1503 PUSH32(esp, 0xFFFFFFFFu); /* 0x300080D3: push -1 */ 1504 PUSH32(esp, 0x3001873Bu); /* 0x300080D5: push 0x3001873b */ 1505 eax = MEM32(FS_BASE + (0)); /* 0x300080DA: mov eax, dword ptr fs:[0] */ 1506 PUSH32(esp, eax); /* 0x300080E0: push eax */ 1507 MEM32(FS_BASE + (0)) = esp; /* 0x300080E1: mov dword ptr fs:[0], esp */ 1508 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 1509 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1510 esp = esp - 8; /* 0x300080E8: sub esp, 8 */ 1511 _flag_k = FK_CMP; 1512 PUSH32(esp, ebx); /* 0x300080EB: push ebx */ 1513 ebx = MEM32(ebp + 0x8); /* 0x300080EC: mov ebx, dword ptr [ebp + 8] */ 1514 PUSH32(esp, esi); /* 0x300080EF: push esi */ 1515 esi = ecx; /* 0x300080F0: mov esi, ecx */ 1516 /* cmp esi, ebx */ /* 0x300080F2: cmp esi, ebx */ 1517 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 1518 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1519 _flag_k = FK_CMP; 1520 if (CMP_NE(_flag_a, _flag_b)) goto L_3000810A; /* 0x300080F4: jne 0x3000810a */ 1521 L_300080F6: 1522 eax = esi; /* 0x300080F6: mov eax, esi */ 1523 esi = POP32_VAL(esp); /* 0x300080F8: pop esi */ 1524 ebx = POP32_VAL(esp); /* 0x300080F9: pop ebx */ 1525 ecx = MEM32(ebp + (-0xC)); /* 0x300080FA: mov ecx, dword ptr [ebp - 0xc] */ 1526 MEM32(FS_BASE + (0)) = ecx; /* 0x300080FD: mov dword ptr fs:[0], ecx */ 1527 esp = ebp; /* 0x30008104: mov esp, ebp */ 1528 ebp = POP32_VAL(esp); /* 0x30008106: pop ebp */ 1529 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30008107: ret 4 */ 1530 L_3000810A: 1531 eax = MEM32(ebx + 0x4); /* 0x3000810A: mov eax, dword ptr [ebx + 4] */ 1532 /* cmp MEM32(esi + 0x4), eax */ /* 0x3000810D: cmp dword ptr [esi + 4], eax */ 1533 _flag_a = (uint32_t)(MEM32(esi + 0x4)); _flag_b = (uint32_t)(eax); 1534 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1535 _flag_k = FK_CMP; 1536 PUSH32(esp, edi); /* 0x30008110: push edi */ 1537 if (CMP_GE(_flag_a, _flag_b)) goto L_30008162; /* 0x30008111: jge 0x30008162 */ 1538 L_30008113: 1539 eax = MEM32(esi); /* 0x30008113: mov eax, dword ptr [esi] */ 1540 PUSH32(esp, eax); /* 0x30008115: push eax */ 1541 RECOMP_ICALL(0x30018080u); /* 0x30008116: call 0x30018080 */ /* not lifted */ 1542 RECOMP_FLAGS_IN(); 1543 edi = MEM32(ebx + 0x4); /* 0x3000811B: mov edi, dword ptr [ebx + 4] */ 1544 eax = edi + edi * 2; /* 0x3000811E: lea eax, [edi + edi*2] */ 1545 if (2u) _cf = (((eax) >> 30) & 1u); /* 0x30008121: shl eax, 2 */ 1546 if (2u) { _flag_a = recomp_flags_pack((eax << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 1547 eax = eax << 2u; /* 0x30008121: shl eax, 2 */ 1548 PUSH32(esp, eax); /* 0x30008124: push eax */ 1549 RECOMP_ICALL(0x300180A8u); /* 0x30008125: call 0x300180a8 */ /* not lifted */ 1550 RECOMP_FLAGS_IN(); 1551 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 1552 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1553 esp = esp + 8; /* 0x3000812A: add esp, 8 */ 1554 _flag_k = FK_ADD; 1555 MEM32(ebp + (-0x14)) = eax; /* 0x3000812D: mov dword ptr [ebp - 0x14], eax */ 1556 /* test eax, eax */ /* 0x30008130: test eax, eax */ 1557 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1558 _cf = 0; 1559 _flag_k = FK_TEST; 1560 MEM32(ebp + (-0x4)) = 0; /* 0x30008132: mov dword ptr [ebp - 4], 0 */ 1561 if (TEST_Z(_flag_a, _flag_b)) goto L_3000815E; /* 0x30008139: je 0x3000815e */ 1562 L_3000813B: 1563 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1); 1564 edi = edi - 1; /* 0x3000813B: dec edi */ 1565 _flag_k = FK_DEC; 1566 /* test edi, edi */ /* 0x3000813C: test edi, edi */ 1567 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 1568 _cf = 0; 1569 _flag_k = FK_TEST; 1570 MEM32(ebp + (-0x10)) = eax; /* 0x3000813E: mov dword ptr [ebp - 0x10], eax */ 1571 if (TEST_S(_flag_a, _flag_b)) goto L_30008160; /* 0x30008141: jl 0x30008160 */ 1572 L_30008143: 1573 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1); 1574 edi = edi + 1; /* 0x30008143: inc edi */ 1575 _flag_k = FK_INC; 1576 L_30008144: 1577 ecx = MEM32(ebp + (-0x10)); /* 0x30008144: mov ecx, dword ptr [ebp - 0x10] */ 1578 RECOMP_ICALL(MEM32(0x300190E4)); /* 0x30008147: call dword ptr [0x300190e4] */ 1579 RECOMP_FLAGS_IN(); 1580 ecx = MEM32(ebp + (-0x10)); /* 0x3000814D: mov ecx, dword ptr [ebp - 0x10] */ 1581 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xCu); 1582 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1583 ecx = ecx + 0xCu; /* 0x30008150: add ecx, 0xc */ 1584 _flag_k = FK_ADD; 1585 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1); 1586 edi = edi - 1; /* 0x30008153: dec edi */ 1587 _flag_k = FK_DEC; 1588 MEM32(ebp + (-0x10)) = ecx; /* 0x30008154: mov dword ptr [ebp - 0x10], ecx */ 1589 RECOMP_BACKEDGE(); 1590 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_30008144; /* 0x30008157: jne 0x30008144 */ 1591 L_30008159: 1592 eax = MEM32(ebp + (-0x14)); /* 0x30008159: mov eax, dword ptr [ebp - 0x14] */ 1593 goto L_30008160; /* 0x3000815C: jmp 0x30008160 */ 1594 L_3000815E: 1595 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1596 eax = 0; /* 0x3000815E: xor eax, eax */ 1597 _cf = 0; 1598 _flag_k = FK_TEST; 1599 L_30008160: 1600 MEM32(esi) = eax; /* 0x30008160: mov dword ptr [esi], eax */ 1601 L_30008162: 1602 eax = MEM32(ebx + 0x4); /* 0x30008162: mov eax, dword ptr [ebx + 4] */ 1603 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1604 ecx = 0; /* 0x30008165: xor ecx, ecx */ 1605 _cf = 0; 1606 _flag_k = FK_TEST; 1607 /* test eax, eax */ /* 0x30008167: test eax, eax */ 1608 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1609 _cf = 0; 1610 _flag_k = FK_TEST; 1611 MEM32(esi + 0x4) = eax; /* 0x30008169: mov dword ptr [esi + 4], eax */ 1612 if (TEST_LE(_flag_a, _flag_b)) goto L_30008198; /* 0x3000816C: jle 0x30008198 */ 1613 L_3000816E: 1614 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1615 eax = 0; /* 0x3000816E: xor eax, eax */ 1616 _cf = 0; 1617 _flag_k = FK_TEST; 1618 L_30008170: 1619 edx = MEM32(ebx); /* 0x30008170: mov edx, dword ptr [ebx] */ 1620 ebx = MEM32(esi); /* 0x30008172: mov ebx, dword ptr [esi] */ 1621 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 1622 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1623 edx = edx + eax; /* 0x30008174: add edx, eax */ 1624 _flag_k = FK_ADD; 1625 edi = eax; /* 0x30008176: mov edi, eax */ 1626 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx); 1627 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1628 edi = edi + ebx; /* 0x30008178: add edi, ebx */ 1629 _flag_k = FK_ADD; 1630 ebx = MEM32(edx); /* 0x3000817A: mov ebx, dword ptr [edx] */ 1631 MEM32(edi) = ebx; /* 0x3000817C: mov dword ptr [edi], ebx */ 1632 ebx = MEM32(edx + 0x4); /* 0x3000817E: mov ebx, dword ptr [edx + 4] */ 1633 MEM32(edi + 0x4) = ebx; /* 0x30008181: mov dword ptr [edi + 4], ebx */ 1634 edx = MEM32(edx + 0x8); /* 0x30008184: mov edx, dword ptr [edx + 8] */ 1635 ebx = MEM32(ebp + 0x8); /* 0x30008187: mov ebx, dword ptr [ebp + 8] */ 1636 MEM32(edi + 0x8) = edx; /* 0x3000818A: mov dword ptr [edi + 8], edx */ 1637 edx = MEM32(esi + 0x4); /* 0x3000818D: mov edx, dword ptr [esi + 4] */ 1638 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 1639 ecx = ecx + 1; /* 0x30008190: inc ecx */ 1640 _flag_k = FK_INC; 1641 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu); 1642 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1643 eax = eax + 0xCu; /* 0x30008191: add eax, 0xc */ 1644 _flag_k = FK_ADD; 1645 /* cmp ecx, edx */ /* 0x30008194: cmp ecx, edx */ 1646 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 1647 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1648 _flag_k = FK_CMP; 1649 RECOMP_BACKEDGE(); 1650 if (CMP_L(_flag_a, _flag_b)) goto L_30008170; /* 0x30008196: jl 0x30008170 */ 1651 L_30008198: 1652 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(8); 1653 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1654 ebx = ebx + 8; /* 0x30008198: add ebx, 8 */ 1655 _flag_k = FK_ADD; 1656 ecx = MEM32(ebx); /* 0x3000819B: mov ecx, dword ptr [ebx] */ 1657 eax = esi + 0x8; /* 0x3000819D: lea eax, [esi + 8] */ 1658 MEM32(eax) = ecx; /* 0x300081A0: mov dword ptr [eax], ecx */ 1659 edx = MEM32(ebx + 0x4); /* 0x300081A2: mov edx, dword ptr [ebx + 4] */ 1660 MEM32(eax + 0x4) = edx; /* 0x300081A5: mov dword ptr [eax + 4], edx */ 1661 ecx = MEM32(ebx + 0x8); /* 0x300081A8: mov ecx, dword ptr [ebx + 8] */ 1662 MEM32(eax + 0x8) = ecx; /* 0x300081AB: mov dword ptr [eax + 8], ecx */ 1663 ecx = MEM32(ebp + (-0xC)); /* 0x300081AE: mov ecx, dword ptr [ebp - 0xc] */ 1664 edi = POP32_VAL(esp); /* 0x300081B1: pop edi */ 1665 eax = esi; /* 0x300081B2: mov eax, esi */ 1666 esi = POP32_VAL(esp); /* 0x300081B4: pop esi */ 1667 ebx = POP32_VAL(esp); /* 0x300081B5: pop ebx */ 1668 MEM32(FS_BASE + (0)) = ecx; /* 0x300081B6: mov dword ptr fs:[0], ecx */ 1669 esp = ebp; /* 0x300081BD: mov esp, ebp */ 1670 ebp = POP32_VAL(esp); /* 0x300081BF: pop ebp */ 1671 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x300081C0: ret 4 */ 1672 RECOMP_REGS_OUT(); 1673 } 1674 1675 void sub_300081D0(void) { 1676 int _fpu_cmp = 0; 1677 uint32_t _cf = 0; 1678 int _df = 1; 1679 uint32_t _flag_k = FK_NONE; 1680 uint32_t _flag_a = 0, _flag_b = 0; 1681 uint32_t _itail_tgt = 0; 1682 RECOMP_REGS_LOCALS 1683 RECOMP_ENTER(0x300081D0u); 1684 1685 L_300081D0: 1686 PUSH32(esp, ebp); /* 0x300081D0: push ebp */ 1687 ebp = esp; /* 0x300081D1: mov ebp, esp */ 1688 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 1689 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1690 esp = esp - 0xCu; /* 0x300081D3: sub esp, 0xc */ 1691 _flag_k = FK_CMP; 1692 eax = ecx + 0x8; /* 0x300081D6: lea eax, [ecx + 8] */ 1693 edx = MEM32(eax); /* 0x300081D9: mov edx, dword ptr [eax] */ 1694 MEM32(ebp + (-0xC)) = edx; /* 0x300081DB: mov dword ptr [ebp - 0xc], edx */ 1695 edx = MEM32(eax + 0x4); /* 0x300081DE: mov edx, dword ptr [eax + 4] */ 1696 eax = MEM32(eax + 0x8); /* 0x300081E1: mov eax, dword ptr [eax + 8] */ 1697 MEM32(ebp + (-0x4)) = eax; /* 0x300081E4: mov dword ptr [ebp - 4], eax */ 1698 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x300081E7: fld dword ptr [ebp - 4] */ 1699 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x300081EA: fmul dword ptr [ebp - 4] */ 1700 MEM32(ebp + (-0x8)) = edx; /* 0x300081ED: mov dword ptr [ebp - 8], edx */ 1701 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x300081F0: fld dword ptr [ebp - 0xc] */ 1702 eax = MEM32(ecx); /* 0x300081F3: mov eax, dword ptr [ecx] */ 1703 _st[0] *= (double)*(float*)ADDR(ebp + (-0xC)); /* 0x300081F5: fmul dword ptr [ebp - 0xc] */ 1704 { double _v = fp_pop(); _st[0] += _v; } /* 0x300081F8: faddp st(1) */ 1705 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x300081FA: fld dword ptr [ebp - 8] */ 1706 _st[0] *= (double)*(float*)ADDR(ebp + (-0x8)); /* 0x300081FD: fmul dword ptr [ebp - 8] */ 1707 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008200: faddp st(1) */ 1708 _st[0] = sqrt(_st[0]); /* 0x30008202: fsqrt */ 1709 _st[0] = (double)*(float*)ADDR(0x300191B8) / _st[0]; /* 0x30008204: fdivr dword ptr [0x300191b8] */ 1710 fp_push(_st[0]); /* 0x3000820A: fld st(0) */ 1711 _st[0] *= (double)*(float*)ADDR(ebp + (-0xC)); /* 0x3000820C: fmul dword ptr [ebp - 0xc] */ 1712 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x3000820F: fstp dword ptr [ebp - 0xc] */ 1713 fp_push(_st[0]); /* 0x30008212: fld st(0) */ 1714 _st[0] *= (double)*(float*)ADDR(ebp + (-0x8)); /* 0x30008214: fmul dword ptr [ebp - 8] */ 1715 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x30008217: fstp dword ptr [ebp - 8] */ 1716 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3000821A: fmul dword ptr [ebp - 4] */ 1717 _st[0] *= (double)*(float*)ADDR(eax + 0x8); /* 0x3000821D: fmul dword ptr [eax + 8] */ 1718 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x30008220: fld dword ptr [ebp - 8] */ 1719 _st[0] *= (double)*(float*)ADDR(eax + 0x4); /* 0x30008223: fmul dword ptr [eax + 4] */ 1720 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008226: faddp st(1) */ 1721 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x30008228: fld dword ptr [ebp - 0xc] */ 1722 _st[0] *= (double)*(float*)ADDR(eax); /* 0x3000822B: fmul dword ptr [eax] */ 1723 { double _v = fp_pop(); _st[0] += _v; } /* 0x3000822D: faddp st(1) */ 1724 esp = ebp; /* 0x3000822F: mov esp, ebp */ 1725 ebp = POP32_VAL(esp); /* 0x30008231: pop ebp */ 1726 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30008232: ret */ 1727 RECOMP_REGS_OUT(); 1728 } 1729 1730 void sub_30008240(void) { 1731 int _fpu_cmp = 0; 1732 uint32_t _cf = 0; 1733 int _df = 1; 1734 uint32_t _flag_k = FK_NONE; 1735 uint32_t _flag_a = 0, _flag_b = 0; 1736 uint32_t _itail_tgt = 0; 1737 RECOMP_REGS_LOCALS 1738 RECOMP_ENTER(0x30008240u); 1739 1740 L_30008240: 1741 PUSH32(esp, ebp); /* 0x30008240: push ebp */ 1742 ebp = esp; /* 0x30008241: mov ebp, esp */ 1743 PUSH32(esp, ecx); /* 0x30008243: push ecx */ 1744 eax = MEM32(ecx + 0x4); /* 0x30008244: mov eax, dword ptr [ecx + 4] */ 1745 PUSH32(esp, ebx); /* 0x30008247: push ebx */ 1746 PUSH32(esp, esi); /* 0x30008248: push esi */ 1747 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1748 ebx = 0; /* 0x30008249: xor ebx, ebx */ 1749 _cf = 0; 1750 _flag_k = FK_TEST; 1751 /* test eax, eax */ /* 0x3000824B: test eax, eax */ 1752 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1753 _cf = 0; 1754 _flag_k = FK_TEST; 1755 PUSH32(esp, edi); /* 0x3000824D: push edi */ 1756 MEM32(ebp + (-0x4)) = ecx; /* 0x3000824E: mov dword ptr [ebp - 4], ecx */ 1757 if (TEST_LE(_flag_a, _flag_b)) goto L_3000827E; /* 0x30008251: jle 0x3000827e */ 1758 L_30008253: 1759 edi = MEM32(ebp + 0x8); /* 0x30008253: mov edi, dword ptr [ebp + 8] */ 1760 L_30008256: 1761 eax = MEM32(edi + 0x4); /* 0x30008256: mov eax, dword ptr [edi + 4] */ 1762 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1763 esi = 0; /* 0x30008259: xor esi, esi */ 1764 _cf = 0; 1765 _flag_k = FK_TEST; 1766 /* test eax, eax */ /* 0x3000825B: test eax, eax */ 1767 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1768 _cf = 0; 1769 _flag_k = FK_TEST; 1770 if (TEST_LE(_flag_a, _flag_b)) goto L_30008276; /* 0x3000825D: jle 0x30008276 */ 1771 L_3000825F: 1772 PUSH32(esp, esi); /* 0x3000825F: push esi */ 1773 PUSH32(esp, edi); /* 0x30008260: push edi */ 1774 PUSH32(esp, ebx); /* 0x30008261: push ebx */ 1775 RECOMP_ICALL(0x300083C0u); /* 0x30008262: call 0x300083c0 */ /* not lifted */ 1776 RECOMP_FLAGS_IN(); 1777 /* test LO8(eax), LO8(eax) */ /* 0x30008267: test al, al */ 1778 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 1779 _cf = 0; 1780 _flag_k = FK_NARROW(FK_TEST, 24); 1781 if (TEST_NZ(_flag_a, _flag_b)) goto L_30008289; /* 0x30008269: jne 0x30008289 */ 1782 L_3000826B: 1783 eax = MEM32(edi + 0x4); /* 0x3000826B: mov eax, dword ptr [edi + 4] */ 1784 ecx = MEM32(ebp + (-0x4)); /* 0x3000826E: mov ecx, dword ptr [ebp - 4] */ 1785 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 1786 esi = esi + 1; /* 0x30008271: inc esi */ 1787 _flag_k = FK_INC; 1788 /* cmp esi, eax */ /* 0x30008272: cmp esi, eax */ 1789 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 1790 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1791 _flag_k = FK_CMP; 1792 RECOMP_BACKEDGE(); 1793 if (CMP_L(_flag_a, _flag_b)) goto L_3000825F; /* 0x30008274: jl 0x3000825f */ 1794 L_30008276: 1795 eax = MEM32(ecx + 0x4); /* 0x30008276: mov eax, dword ptr [ecx + 4] */ 1796 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(1); 1797 ebx = ebx + 1; /* 0x30008279: inc ebx */ 1798 _flag_k = FK_INC; 1799 /* cmp ebx, eax */ /* 0x3000827A: cmp ebx, eax */ 1800 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 1801 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1802 _flag_k = FK_CMP; 1803 RECOMP_BACKEDGE(); 1804 if (CMP_L(_flag_a, _flag_b)) goto L_30008256; /* 0x3000827C: jl 0x30008256 */ 1805 L_3000827E: 1806 edi = POP32_VAL(esp); /* 0x3000827E: pop edi */ 1807 esi = POP32_VAL(esp); /* 0x3000827F: pop esi */ 1808 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 1809 SET_LO8(eax, 0); /* 0x30008280: xor al, al */ 1810 _cf = 0; 1811 _flag_k = FK_NARROW(FK_TEST, 24); 1812 ebx = POP32_VAL(esp); /* 0x30008282: pop ebx */ 1813 esp = ebp; /* 0x30008283: mov esp, ebp */ 1814 ebp = POP32_VAL(esp); /* 0x30008285: pop ebp */ 1815 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30008286: ret 4 */ 1816 L_30008289: 1817 edi = POP32_VAL(esp); /* 0x30008289: pop edi */ 1818 esi = POP32_VAL(esp); /* 0x3000828A: pop esi */ 1819 SET_LO8(eax, 1); /* 0x3000828B: mov al, 1 */ 1820 ebx = POP32_VAL(esp); /* 0x3000828D: pop ebx */ 1821 esp = ebp; /* 0x3000828E: mov esp, ebp */ 1822 ebp = POP32_VAL(esp); /* 0x30008290: pop ebp */ 1823 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30008291: ret 4 */ 1824 RECOMP_REGS_OUT(); 1825 } 1826 1827 void sub_300082A0(void) { 1828 int _fpu_cmp = 0; 1829 uint32_t _cf = 0; 1830 int _df = 1; 1831 uint32_t _flag_k = FK_NONE; 1832 uint32_t _flag_a = 0, _flag_b = 0; 1833 uint32_t _itail_tgt = 0; 1834 RECOMP_REGS_LOCALS 1835 RECOMP_ENTER(0x300082A0u); 1836 1837 L_300082A0: 1838 PUSH32(esp, ebp); /* 0x300082A0: push ebp */ 1839 ebp = esp; /* 0x300082A1: mov ebp, esp */ 1840 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu); 1841 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1842 esp = esp - 0x1Cu; /* 0x300082A3: sub esp, 0x1c */ 1843 _flag_k = FK_CMP; 1844 fp_push(*(float*)&MEM32(0x3001919C)); /* 0x300082A6: fld dword ptr [0x3001919c] */ 1845 eax = ecx; /* 0x300082AC: mov eax, ecx */ 1846 ecx = MEM32(eax + 0x4); /* 0x300082AE: mov ecx, dword ptr [eax + 4] */ 1847 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x1C)) = _v; } /* 0x300082B1: fst dword ptr [ebp - 0x1c] */ 1848 /* test ecx, ecx */ /* 0x300082B4: test ecx, ecx */ 1849 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 1850 _cf = 0; 1851 _flag_k = FK_TEST; 1852 fp_push(*(float*)&MEM32(0x3001919C)); /* 0x300082B6: fld dword ptr [0x3001919c] */ 1853 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x18)) = _v; } /* 0x300082BC: fst dword ptr [ebp - 0x18] */ 1854 MEM32(ebp + (-0x4)) = ecx; /* 0x300082BF: mov dword ptr [ebp - 4], ecx */ 1855 fp_push(*(float*)&MEM32(0x3001919C)); /* 0x300082C2: fld dword ptr [0x3001919c] */ 1856 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x300082C8: fst dword ptr [ebp - 0x14] */ 1857 if (TEST_LE(_flag_a, _flag_b)) goto L_30008339; /* 0x300082CB: jle 0x30008339 */ 1858 L_300082CD: 1859 fp_push((double)(int32_t)MEM32(ebp + (-0x4))); /* 0x300082CD: fild dword ptr [ebp - 4] */ 1860 eax = MEM32(eax); /* 0x300082D0: mov eax, dword ptr [eax] */ 1861 PUSH32(esp, esi); /* 0x300082D2: push esi */ 1862 L_300082D3: 1863 edx = eax; /* 0x300082D3: mov edx, eax */ 1864 esi = MEM32(edx); /* 0x300082D5: mov esi, dword ptr [edx] */ 1865 MEM32(ebp + (-0x10)) = esi; /* 0x300082D7: mov dword ptr [ebp - 0x10], esi */ 1866 fp_push(*(float*)&MEM32(ebp + (-0x10))); /* 0x300082DA: fld dword ptr [ebp - 0x10] */ 1867 esi = MEM32(edx + 0x4); /* 0x300082DD: mov esi, dword ptr [edx + 4] */ 1868 _st[0] /= _st[1]; /* 0x300082E0: fdiv st(1) */ 1869 MEM32(ebp + (-0xC)) = esi; /* 0x300082E2: mov dword ptr [ebp - 0xc], esi */ 1870 edx = MEM32(edx + 0x8); /* 0x300082E5: mov edx, dword ptr [edx + 8] */ 1871 MEM32(ebp + (-0x8)) = edx; /* 0x300082E8: mov dword ptr [ebp - 8], edx */ 1872 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu); 1873 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1874 eax = eax + 0xCu; /* 0x300082EB: add eax, 0xc */ 1875 _flag_k = FK_ADD; 1876 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 1877 ecx = ecx - 1; /* 0x300082EE: dec ecx */ 1878 _flag_k = FK_DEC; 1879 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x300082EF: fld dword ptr [ebp - 0xc] */ 1880 _st[0] /= _st[2]; /* 0x300082F2: fdiv st(2) */ 1881 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x300082F4: fstp dword ptr [ebp - 0xc] */ 1882 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x300082F7: fld dword ptr [ebp - 8] */ 1883 _st[0] /= _st[2]; /* 0x300082FA: fdiv st(2) */ 1884 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x300082FC: fstp dword ptr [ebp - 8] */ 1885 { double _v = fp_pop(); _st[3] += _v; } /* 0x300082FF: faddp st(4) */ 1886 fp_xch(2); /* 0x30008301: fxch st(2) */ 1887 _st[0] += (double)*(float*)ADDR(ebp + (-0xC)); /* 0x30008303: fadd dword ptr [ebp - 0xc] */ 1888 fp_xch(2); /* 0x30008306: fxch st(2) */ 1889 fp_xch(1); /* 0x30008308: fxch st(1) */ 1890 _st[0] += (double)*(float*)ADDR(ebp + (-0x8)); /* 0x3000830A: fadd dword ptr [ebp - 8] */ 1891 fp_xch(1); /* 0x3000830D: fxch st(1) */ 1892 RECOMP_BACKEDGE(); 1893 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_300082D3; /* 0x3000830F: jne 0x300082d3 */ 1894 L_30008311: 1895 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30008311: fstp st(0) */ 1896 esi = POP32_VAL(esp); /* 0x30008313: pop esi */ 1897 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x30008314: fstp dword ptr [ebp - 0x14] */ 1898 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x18)) = _v; } /* 0x30008317: fstp dword ptr [ebp - 0x18] */ 1899 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x1C)) = _v; } /* 0x3000831A: fstp dword ptr [ebp - 0x1c] */ 1900 L_3000831D: 1901 eax = MEM32(ebp + 0x8); /* 0x3000831D: mov eax, dword ptr [ebp + 8] */ 1902 edx = MEM32(ebp + (-0x1C)); /* 0x30008320: mov edx, dword ptr [ebp - 0x1c] */ 1903 ecx = eax; /* 0x30008323: mov ecx, eax */ 1904 MEM32(ecx) = edx; /* 0x30008325: mov dword ptr [ecx], edx */ 1905 edx = MEM32(ebp + (-0x18)); /* 0x30008327: mov edx, dword ptr [ebp - 0x18] */ 1906 MEM32(ecx + 0x4) = edx; /* 0x3000832A: mov dword ptr [ecx + 4], edx */ 1907 edx = MEM32(ebp + (-0x14)); /* 0x3000832D: mov edx, dword ptr [ebp - 0x14] */ 1908 MEM32(ecx + 0x8) = edx; /* 0x30008330: mov dword ptr [ecx + 8], edx */ 1909 esp = ebp; /* 0x30008333: mov esp, ebp */ 1910 ebp = POP32_VAL(esp); /* 0x30008335: pop ebp */ 1911 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30008336: ret 4 */ 1912 L_30008339: 1913 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30008339: fstp st(0) */ 1914 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3000833B: fstp st(0) */ 1915 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3000833D: fstp st(0) */ 1916 RECOMP_BACKEDGE(); 1917 goto L_3000831D; /* 0x3000833F: jmp 0x3000831d */ 1918 { RECOMP_REGS_OUT(); return; } /* end of function */ 1919 RECOMP_REGS_OUT(); 1920 } 1921 1922 void sub_30008350(void) { 1923 int _fpu_cmp = 0; 1924 uint32_t _cf = 0; 1925 int _df = 1; 1926 uint32_t _flag_k = FK_NONE; 1927 uint32_t _flag_a = 0, _flag_b = 0; 1928 uint32_t _itail_tgt = 0; 1929 RECOMP_REGS_LOCALS 1930 RECOMP_ENTER(0x30008350u); 1931 1932 L_30008350: 1933 PUSH32(esp, ebp); /* 0x30008350: push ebp */ 1934 ebp = esp; /* 0x30008351: mov ebp, esp */ 1935 PUSH32(esp, ecx); /* 0x30008353: push ecx */ 1936 eax = MEM32(ecx + 0x4); /* 0x30008354: mov eax, dword ptr [ecx + 4] */ 1937 PUSH32(esp, ebx); /* 0x30008357: push ebx */ 1938 PUSH32(esp, esi); /* 0x30008358: push esi */ 1939 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1940 ebx = 0; /* 0x30008359: xor ebx, ebx */ 1941 _cf = 0; 1942 _flag_k = FK_TEST; 1943 /* test eax, eax */ /* 0x3000835B: test eax, eax */ 1944 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1945 _cf = 0; 1946 _flag_k = FK_TEST; 1947 PUSH32(esp, edi); /* 0x3000835D: push edi */ 1948 MEM32(ebp + (-0x4)) = ecx; /* 0x3000835E: mov dword ptr [ebp - 4], ecx */ 1949 if (TEST_LE(_flag_a, _flag_b)) goto L_3000839D; /* 0x30008361: jle 0x3000839d */ 1950 L_30008363: 1951 edi = MEM32(ebp + 0x8); /* 0x30008363: mov edi, dword ptr [ebp + 8] */ 1952 L_30008366: 1953 eax = MEM32(edi + 0x4); /* 0x30008366: mov eax, dword ptr [edi + 4] */ 1954 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1955 esi = 0; /* 0x30008369: xor esi, esi */ 1956 _cf = 0; 1957 _flag_k = FK_TEST; 1958 /* test eax, eax */ /* 0x3000836B: test eax, eax */ 1959 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1960 _cf = 0; 1961 _flag_k = FK_TEST; 1962 if (TEST_LE(_flag_a, _flag_b)) goto L_30008395; /* 0x3000836D: jle 0x30008395 */ 1963 L_3000836F: 1964 PUSH32(esp, esi); /* 0x3000836F: push esi */ 1965 PUSH32(esp, edi); /* 0x30008370: push edi */ 1966 PUSH32(esp, ebx); /* 0x30008371: push ebx */ 1967 RECOMP_ICALL(0x300083C0u); /* 0x30008372: call 0x300083c0 */ /* not lifted */ 1968 RECOMP_FLAGS_IN(); 1969 /* test LO8(eax), LO8(eax) */ /* 0x30008377: test al, al */ 1970 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 1971 _cf = 0; 1972 _flag_k = FK_NARROW(FK_TEST, 24); 1973 if (TEST_Z(_flag_a, _flag_b)) goto L_3000838A; /* 0x30008379: je 0x3000838a */ 1974 L_3000837B: 1975 ecx = MEM32(ebp + (-0x4)); /* 0x3000837B: mov ecx, dword ptr [ebp - 4] */ 1976 PUSH32(esp, esi); /* 0x3000837E: push esi */ 1977 PUSH32(esp, ebx); /* 0x3000837F: push ebx */ 1978 PUSH32(esp, edi); /* 0x30008380: push edi */ 1979 RECOMP_ICALL(0x300088A0u); /* 0x30008381: call 0x300088a0 */ /* not lifted */ 1980 RECOMP_FLAGS_IN(); 1981 /* test LO8(eax), LO8(eax) */ /* 0x30008386: test al, al */ 1982 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 1983 _cf = 0; 1984 _flag_k = FK_NARROW(FK_TEST, 24); 1985 if (TEST_Z(_flag_a, _flag_b)) goto L_300083A8; /* 0x30008388: je 0x300083a8 */ 1986 L_3000838A: 1987 eax = MEM32(edi + 0x4); /* 0x3000838A: mov eax, dword ptr [edi + 4] */ 1988 ecx = MEM32(ebp + (-0x4)); /* 0x3000838D: mov ecx, dword ptr [ebp - 4] */ 1989 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 1990 esi = esi + 1; /* 0x30008390: inc esi */ 1991 _flag_k = FK_INC; 1992 /* cmp esi, eax */ /* 0x30008391: cmp esi, eax */ 1993 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 1994 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1995 _flag_k = FK_CMP; 1996 RECOMP_BACKEDGE(); 1997 if (CMP_L(_flag_a, _flag_b)) goto L_3000836F; /* 0x30008393: jl 0x3000836f */ 1998 L_30008395: 1999 eax = MEM32(ecx + 0x4); /* 0x30008395: mov eax, dword ptr [ecx + 4] */ 2000 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(1); 2001 ebx = ebx + 1; /* 0x30008398: inc ebx */ 2002 _flag_k = FK_INC; 2003 /* cmp ebx, eax */ /* 0x30008399: cmp ebx, eax */ 2004 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 2005 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2006 _flag_k = FK_CMP; 2007 RECOMP_BACKEDGE(); 2008 if (CMP_L(_flag_a, _flag_b)) goto L_30008366; /* 0x3000839B: jl 0x30008366 */ 2009 L_3000839D: 2010 edi = POP32_VAL(esp); /* 0x3000839D: pop edi */ 2011 esi = POP32_VAL(esp); /* 0x3000839E: pop esi */ 2012 SET_LO8(eax, 1); /* 0x3000839F: mov al, 1 */ 2013 ebx = POP32_VAL(esp); /* 0x300083A1: pop ebx */ 2014 esp = ebp; /* 0x300083A2: mov esp, ebp */ 2015 ebp = POP32_VAL(esp); /* 0x300083A4: pop ebp */ 2016 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x300083A5: ret 4 */ 2017 L_300083A8: 2018 edi = POP32_VAL(esp); /* 0x300083A8: pop edi */ 2019 esi = POP32_VAL(esp); /* 0x300083A9: pop esi */ 2020 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 2021 SET_LO8(eax, 0); /* 0x300083AA: xor al, al */ 2022 _cf = 0; 2023 _flag_k = FK_NARROW(FK_TEST, 24); 2024 ebx = POP32_VAL(esp); /* 0x300083AC: pop ebx */ 2025 esp = ebp; /* 0x300083AD: mov esp, ebp */ 2026 ebp = POP32_VAL(esp); /* 0x300083AF: pop ebp */ 2027 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x300083B0: ret 4 */ 2028 RECOMP_REGS_OUT(); 2029 } 2030 2031 void sub_300083C0(void) { 2032 int _fpu_cmp = 0; 2033 uint32_t _cf = 0; 2034 int _df = 1; 2035 uint32_t _flag_k = FK_NONE; 2036 uint32_t _flag_a = 0, _flag_b = 0; 2037 uint32_t _itail_tgt = 0; 2038 RECOMP_REGS_LOCALS 2039 RECOMP_ENTER(0x300083C0u); 2040 2041 L_300083C0: 2042 PUSH32(esp, ebp); /* 0x300083C0: push ebp */ 2043 ebp = esp; /* 0x300083C1: mov ebp, esp */ 2044 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x24u); 2045 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2046 esp = esp - 0x24u; /* 0x300083C3: sub esp, 0x24 */ 2047 _flag_k = FK_CMP; 2048 PUSH32(esp, ebx); /* 0x300083C6: push ebx */ 2049 ebx = MEM32(ebp + 0x8); /* 0x300083C7: mov ebx, dword ptr [ebp + 8] */ 2050 eax = ebx; /* 0x300083CA: mov eax, ebx */ 2051 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x300083CC: cdq */ 2052 PUSH32(esp, esi); /* 0x300083CD: push esi */ 2053 esi = MEM32(ecx + 0x4); /* 0x300083CE: mov esi, dword ptr [ecx + 4] */ 2054 { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)esi; /* 0x300083D1: idiv esi */ 2055 if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); } 2056 else { eax = 0; edx = 0; } } 2057 ecx = MEM32(ecx); /* 0x300083D3: mov ecx, dword ptr [ecx] */ 2058 PUSH32(esp, edi); /* 0x300083D5: push edi */ 2059 eax = edx + edx * 2; /* 0x300083D6: lea eax, [edx + edx*2] */ 2060 edi = ecx + eax * 4; /* 0x300083D9: lea edi, [ecx + eax*4] */ 2061 eax = ebx + 0x1; /* 0x300083DC: lea eax, [ebx + 1] */ 2062 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x300083DF: cdq */ 2063 { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)esi; /* 0x300083E0: idiv esi */ 2064 if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); } 2065 else { eax = 0; edx = 0; } } 2066 ebx = MEM32(ebp + 0x10); /* 0x300083E2: mov ebx, dword ptr [ebp + 0x10] */ 2067 edx = edx + edx * 2; /* 0x300083E5: lea edx, [edx + edx*2] */ 2068 eax = ecx + edx * 4; /* 0x300083E8: lea eax, [ecx + edx*4] */ 2069 MEM32(ebp + 0x8) = eax; /* 0x300083EB: mov dword ptr [ebp + 8], eax */ 2070 eax = MEM32(ebp + 0xC); /* 0x300083EE: mov eax, dword ptr [ebp + 0xc] */ 2071 ecx = MEM32(eax + 0x4); /* 0x300083F1: mov ecx, dword ptr [eax + 4] */ 2072 esi = MEM32(eax); /* 0x300083F4: mov esi, dword ptr [eax] */ 2073 eax = ebx; /* 0x300083F6: mov eax, ebx */ 2074 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x300083F8: cdq */ 2075 { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)ecx; /* 0x300083F9: idiv ecx */ 2076 if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); } 2077 else { eax = 0; edx = 0; } } 2078 edx = edx + edx * 2; /* 0x300083FB: lea edx, [edx + edx*2] */ 2079 eax = esi + edx * 4; /* 0x300083FE: lea eax, [esi + edx*4] */ 2080 edx = MEM32(eax); /* 0x30008401: mov edx, dword ptr [eax] */ 2081 MEM32(ebp + (-0x18)) = edx; /* 0x30008403: mov dword ptr [ebp - 0x18], edx */ 2082 edx = MEM32(eax + 0x4); /* 0x30008406: mov edx, dword ptr [eax + 4] */ 2083 eax = MEM32(eax + 0x8); /* 0x30008409: mov eax, dword ptr [eax + 8] */ 2084 MEM32(ebp + (-0x10)) = eax; /* 0x3000840C: mov dword ptr [ebp - 0x10], eax */ 2085 MEM32(ebp + (-0x14)) = edx; /* 0x3000840F: mov dword ptr [ebp - 0x14], edx */ 2086 eax = ebx + 0x1; /* 0x30008412: lea eax, [ebx + 1] */ 2087 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x30008415: cdq */ 2088 { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)ecx; /* 0x30008416: idiv ecx */ 2089 if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); } 2090 else { eax = 0; edx = 0; } } 2091 ecx = edx + edx * 2; /* 0x30008418: lea ecx, [edx + edx*2] */ 2092 edx = esi + ecx * 4; /* 0x3000841B: lea edx, [esi + ecx*4] */ 2093 eax = MEM32(edx); /* 0x3000841E: mov eax, dword ptr [edx] */ 2094 ecx = MEM32(edx + 0x4); /* 0x30008420: mov ecx, dword ptr [edx + 4] */ 2095 edx = MEM32(edx + 0x8); /* 0x30008423: mov edx, dword ptr [edx + 8] */ 2096 MEM32(ebp + (-0xC)) = eax; /* 0x30008426: mov dword ptr [ebp - 0xc], eax */ 2097 MEM32(ebp + (-0x8)) = ecx; /* 0x30008429: mov dword ptr [ebp - 8], ecx */ 2098 eax = edi; /* 0x3000842C: mov eax, edi */ 2099 ecx = MEM32(eax); /* 0x3000842E: mov ecx, dword ptr [eax] */ 2100 MEM32(ebp + (-0x24)) = ecx; /* 0x30008430: mov dword ptr [ebp - 0x24], ecx */ 2101 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x30008433: fld dword ptr [ebp - 0x24] */ 2102 _st[0] -= (double)*(float*)ADDR(ebp + (-0x18)); /* 0x30008436: fsub dword ptr [ebp - 0x18] */ 2103 MEM32(ebp + (-0x4)) = edx; /* 0x30008439: mov dword ptr [ebp - 4], edx */ 2104 edx = MEM32(eax + 0x4); /* 0x3000843C: mov edx, dword ptr [eax + 4] */ 2105 eax = MEM32(eax + 0x8); /* 0x3000843F: mov eax, dword ptr [eax + 8] */ 2106 MEM32(ebp + (-0x20)) = edx; /* 0x30008442: mov dword ptr [ebp - 0x20], edx */ 2107 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x30008445: fld dword ptr [ebp - 0x20] */ 2108 _st[0] -= (double)*(float*)ADDR(ebp + (-0x14)); /* 0x30008448: fsub dword ptr [ebp - 0x14] */ 2109 MEM32(ebp + (-0x1C)) = eax; /* 0x3000844B: mov dword ptr [ebp - 0x1c], eax */ 2110 fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x3000844E: fld dword ptr [ebp - 0x1c] */ 2111 ecx = MEM32(ebp + 0x8); /* 0x30008451: mov ecx, dword ptr [ebp + 8] */ 2112 _st[0] -= (double)*(float*)ADDR(ebp + (-0x10)); /* 0x30008454: fsub dword ptr [ebp - 0x10] */ 2113 fp_push(_st[0]); /* 0x30008457: fld st(0) */ 2114 _st[0] *= _st[1]; /* 0x30008459: fmul st(1) */ 2115 fp_push(_st[2]); /* 0x3000845B: fld st(2) */ 2116 _st[0] *= _st[3]; /* 0x3000845D: fmul st(3) */ 2117 { double _v = fp_pop(); _st[0] += _v; } /* 0x3000845F: faddp st(1) */ 2118 fp_push(_st[3]); /* 0x30008461: fld st(3) */ 2119 _st[0] *= _st[4]; /* 0x30008463: fmul st(4) */ 2120 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008465: faddp st(1) */ 2121 _st[0] = sqrt(_st[0]); /* 0x30008467: fsqrt */ 2122 { _st[3] = _st[0]; g_st_i64[3] = g_st_i64[0]; fp_pop(); } /* 0x30008469: fstp st(3) */ 2123 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3000846B: fstp st(0) */ 2124 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3000846D: fstp st(0) */ 2125 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3001E27C)); /* 0x3000846F: fcomp dword ptr [0x3001e27c] */ 2126 fp_pop(); 2127 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x30008475: fnstsw ax */ 2128 /* test HI8(eax), 1 */ /* 0x30008477: test ah, 1 */ 2129 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 2130 _cf = 0; 2131 _flag_k = FK_NARROW(FK_TEST, 24); 2132 if (TEST_Z(_flag_a, _flag_b)) goto L_300084CA; /* 0x3000847A: je 0x300084ca */ 2133 L_3000847C: 2134 edx = ecx; /* 0x3000847C: mov edx, ecx */ 2135 eax = MEM32(edx); /* 0x3000847E: mov eax, dword ptr [edx] */ 2136 MEM32(ebp + (-0x24)) = eax; /* 0x30008480: mov dword ptr [ebp - 0x24], eax */ 2137 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x30008483: fld dword ptr [ebp - 0x24] */ 2138 _st[0] -= (double)*(float*)ADDR(ebp + (-0xC)); /* 0x30008486: fsub dword ptr [ebp - 0xc] */ 2139 eax = MEM32(edx + 0x4); /* 0x30008489: mov eax, dword ptr [edx + 4] */ 2140 edx = MEM32(edx + 0x8); /* 0x3000848C: mov edx, dword ptr [edx + 8] */ 2141 MEM32(ebp + (-0x20)) = eax; /* 0x3000848F: mov dword ptr [ebp - 0x20], eax */ 2142 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x30008492: fld dword ptr [ebp - 0x20] */ 2143 _st[0] -= (double)*(float*)ADDR(ebp + (-0x8)); /* 0x30008495: fsub dword ptr [ebp - 8] */ 2144 MEM32(ebp + (-0x1C)) = edx; /* 0x30008498: mov dword ptr [ebp - 0x1c], edx */ 2145 fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x3000849B: fld dword ptr [ebp - 0x1c] */ 2146 _st[0] -= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3000849E: fsub dword ptr [ebp - 4] */ 2147 fp_push(_st[0]); /* 0x300084A1: fld st(0) */ 2148 _st[0] *= _st[1]; /* 0x300084A3: fmul st(1) */ 2149 fp_push(_st[2]); /* 0x300084A5: fld st(2) */ 2150 _st[0] *= _st[3]; /* 0x300084A7: fmul st(3) */ 2151 { double _v = fp_pop(); _st[0] += _v; } /* 0x300084A9: faddp st(1) */ 2152 fp_push(_st[3]); /* 0x300084AB: fld st(3) */ 2153 _st[0] *= _st[4]; /* 0x300084AD: fmul st(4) */ 2154 { double _v = fp_pop(); _st[0] += _v; } /* 0x300084AF: faddp st(1) */ 2155 _st[0] = sqrt(_st[0]); /* 0x300084B1: fsqrt */ 2156 { _st[3] = _st[0]; g_st_i64[3] = g_st_i64[0]; fp_pop(); } /* 0x300084B3: fstp st(3) */ 2157 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x300084B5: fstp st(0) */ 2158 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x300084B7: fstp st(0) */ 2159 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3001E27C)); /* 0x300084B9: fcomp dword ptr [0x3001e27c] */ 2160 fp_pop(); 2161 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x300084BF: fnstsw ax */ 2162 /* test HI8(eax), 1 */ /* 0x300084C1: test ah, 1 */ 2163 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 2164 _cf = 0; 2165 _flag_k = FK_NARROW(FK_TEST, 24); 2166 if (TEST_NZ(_flag_a, _flag_b)) goto L_3000855A; /* 0x300084C4: jne 0x3000855a */ 2167 L_300084CA: 2168 eax = MEM32(edi); /* 0x300084CA: mov eax, dword ptr [edi] */ 2169 edx = MEM32(edi + 0x4); /* 0x300084CC: mov edx, dword ptr [edi + 4] */ 2170 MEM32(ebp + (-0x24)) = eax; /* 0x300084CF: mov dword ptr [ebp - 0x24], eax */ 2171 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x300084D2: fld dword ptr [ebp - 0x24] */ 2172 _st[0] -= (double)*(float*)ADDR(ebp + (-0xC)); /* 0x300084D5: fsub dword ptr [ebp - 0xc] */ 2173 eax = MEM32(edi + 0x8); /* 0x300084D8: mov eax, dword ptr [edi + 8] */ 2174 MEM32(ebp + (-0x20)) = edx; /* 0x300084DB: mov dword ptr [ebp - 0x20], edx */ 2175 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x300084DE: fld dword ptr [ebp - 0x20] */ 2176 _st[0] -= (double)*(float*)ADDR(ebp + (-0x8)); /* 0x300084E1: fsub dword ptr [ebp - 8] */ 2177 MEM32(ebp + (-0x1C)) = eax; /* 0x300084E4: mov dword ptr [ebp - 0x1c], eax */ 2178 fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x300084E7: fld dword ptr [ebp - 0x1c] */ 2179 _st[0] -= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x300084EA: fsub dword ptr [ebp - 4] */ 2180 fp_push(_st[0]); /* 0x300084ED: fld st(0) */ 2181 _st[0] *= _st[1]; /* 0x300084EF: fmul st(1) */ 2182 fp_push(_st[2]); /* 0x300084F1: fld st(2) */ 2183 _st[0] *= _st[3]; /* 0x300084F3: fmul st(3) */ 2184 { double _v = fp_pop(); _st[0] += _v; } /* 0x300084F5: faddp st(1) */ 2185 fp_push(_st[3]); /* 0x300084F7: fld st(3) */ 2186 _st[0] *= _st[4]; /* 0x300084F9: fmul st(4) */ 2187 { double _v = fp_pop(); _st[0] += _v; } /* 0x300084FB: faddp st(1) */ 2188 _st[0] = sqrt(_st[0]); /* 0x300084FD: fsqrt */ 2189 { _st[3] = _st[0]; g_st_i64[3] = g_st_i64[0]; fp_pop(); } /* 0x300084FF: fstp st(3) */ 2190 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30008501: fstp st(0) */ 2191 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30008503: fstp st(0) */ 2192 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3001E27C)); /* 0x30008505: fcomp dword ptr [0x3001e27c] */ 2193 fp_pop(); 2194 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3000850B: fnstsw ax */ 2195 /* test HI8(eax), 1 */ /* 0x3000850D: test ah, 1 */ 2196 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 2197 _cf = 0; 2198 _flag_k = FK_NARROW(FK_TEST, 24); 2199 if (TEST_Z(_flag_a, _flag_b)) goto L_30008565; /* 0x30008510: je 0x30008565 */ 2200 L_30008512: 2201 edx = MEM32(ecx); /* 0x30008512: mov edx, dword ptr [ecx] */ 2202 eax = MEM32(ecx + 0x4); /* 0x30008514: mov eax, dword ptr [ecx + 4] */ 2203 ecx = MEM32(ecx + 0x8); /* 0x30008517: mov ecx, dword ptr [ecx + 8] */ 2204 MEM32(ebp + (-0x24)) = edx; /* 0x3000851A: mov dword ptr [ebp - 0x24], edx */ 2205 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3000851D: fld dword ptr [ebp - 0x24] */ 2206 _st[0] -= (double)*(float*)ADDR(ebp + (-0x18)); /* 0x30008520: fsub dword ptr [ebp - 0x18] */ 2207 MEM32(ebp + (-0x20)) = eax; /* 0x30008523: mov dword ptr [ebp - 0x20], eax */ 2208 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x30008526: fld dword ptr [ebp - 0x20] */ 2209 MEM32(ebp + (-0x1C)) = ecx; /* 0x30008529: mov dword ptr [ebp - 0x1c], ecx */ 2210 _st[0] -= (double)*(float*)ADDR(ebp + (-0x14)); /* 0x3000852C: fsub dword ptr [ebp - 0x14] */ 2211 fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x3000852F: fld dword ptr [ebp - 0x1c] */ 2212 _st[0] -= (double)*(float*)ADDR(ebp + (-0x10)); /* 0x30008532: fsub dword ptr [ebp - 0x10] */ 2213 fp_push(_st[0]); /* 0x30008535: fld st(0) */ 2214 _st[0] *= _st[1]; /* 0x30008537: fmul st(1) */ 2215 fp_push(_st[2]); /* 0x30008539: fld st(2) */ 2216 _st[0] *= _st[3]; /* 0x3000853B: fmul st(3) */ 2217 { double _v = fp_pop(); _st[0] += _v; } /* 0x3000853D: faddp st(1) */ 2218 fp_push(_st[3]); /* 0x3000853F: fld st(3) */ 2219 _st[0] *= _st[4]; /* 0x30008541: fmul st(4) */ 2220 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008543: faddp st(1) */ 2221 _st[0] = sqrt(_st[0]); /* 0x30008545: fsqrt */ 2222 { _st[3] = _st[0]; g_st_i64[3] = g_st_i64[0]; fp_pop(); } /* 0x30008547: fstp st(3) */ 2223 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30008549: fstp st(0) */ 2224 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3000854B: fstp st(0) */ 2225 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3001E27C)); /* 0x3000854D: fcomp dword ptr [0x3001e27c] */ 2226 fp_pop(); 2227 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x30008553: fnstsw ax */ 2228 /* test HI8(eax), 1 */ /* 0x30008555: test ah, 1 */ 2229 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 2230 _cf = 0; 2231 _flag_k = FK_NARROW(FK_TEST, 24); 2232 if (TEST_Z(_flag_a, _flag_b)) goto L_30008565; /* 0x30008558: je 0x30008565 */ 2233 L_3000855A: 2234 edi = POP32_VAL(esp); /* 0x3000855A: pop edi */ 2235 esi = POP32_VAL(esp); /* 0x3000855B: pop esi */ 2236 SET_LO8(eax, 1); /* 0x3000855C: mov al, 1 */ 2237 ebx = POP32_VAL(esp); /* 0x3000855E: pop ebx */ 2238 esp = ebp; /* 0x3000855F: mov esp, ebp */ 2239 ebp = POP32_VAL(esp); /* 0x30008561: pop ebp */ 2240 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30008562: ret 0xc */ 2241 L_30008565: 2242 edi = POP32_VAL(esp); /* 0x30008565: pop edi */ 2243 esi = POP32_VAL(esp); /* 0x30008566: pop esi */ 2244 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 2245 SET_LO8(eax, 0); /* 0x30008567: xor al, al */ 2246 _cf = 0; 2247 _flag_k = FK_NARROW(FK_TEST, 24); 2248 ebx = POP32_VAL(esp); /* 0x30008569: pop ebx */ 2249 esp = ebp; /* 0x3000856A: mov esp, ebp */ 2250 ebp = POP32_VAL(esp); /* 0x3000856C: pop ebp */ 2251 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x3000856D: ret 0xc */ 2252 RECOMP_REGS_OUT(); 2253 } 2254 2255 void sub_30008570(void) { 2256 int _fpu_cmp = 0; 2257 uint32_t _cf = 0; 2258 int _df = 1; 2259 uint32_t _flag_k = FK_NONE; 2260 uint32_t _flag_a = 0, _flag_b = 0; 2261 uint32_t _itail_tgt = 0; 2262 RECOMP_REGS_LOCALS 2263 RECOMP_ENTER(0x30008570u); 2264 2265 L_30008570: 2266 /* cmp MEM32(ecx + 0x4), 2 */ /* 0x30008570: cmp dword ptr [ecx + 4], 2 */ 2267 _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(2); 2268 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2269 _flag_k = FK_CMP; 2270 if (CMP_LE(_flag_a, _flag_b)) goto L_300085A7; /* 0x30008574: jle 0x300085a7 */ 2271 L_30008576: 2272 fp_push(*(float*)&MEM32(ecx + 0x10)); /* 0x30008576: fld dword ptr [ecx + 0x10] */ 2273 fp_push(*(float*)&MEM32(ecx + 0xC)); /* 0x30008579: fld dword ptr [ecx + 0xc] */ 2274 fp_push(*(float*)&MEM32(ecx + 0x8)); /* 0x3000857C: fld dword ptr [ecx + 8] */ 2275 fp_push(_st[0]); /* 0x3000857F: fld st(0) */ 2276 _st[0] *= _st[1]; /* 0x30008581: fmul st(1) */ 2277 fp_push(_st[2]); /* 0x30008583: fld st(2) */ 2278 _st[0] *= _st[3]; /* 0x30008585: fmul st(3) */ 2279 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008587: faddp st(1) */ 2280 fp_push(_st[3]); /* 0x30008589: fld st(3) */ 2281 _st[0] *= _st[4]; /* 0x3000858B: fmul st(4) */ 2282 { double _v = fp_pop(); _st[0] += _v; } /* 0x3000858D: faddp st(1) */ 2283 _st[0] = sqrt(_st[0]); /* 0x3000858F: fsqrt */ 2284 { _st[3] = _st[0]; g_st_i64[3] = g_st_i64[0]; fp_pop(); } /* 0x30008591: fstp st(3) */ 2285 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30008593: fstp st(0) */ 2286 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30008595: fstp st(0) */ 2287 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3001E27C)); /* 0x30008597: fcomp dword ptr [0x3001e27c] */ 2288 fp_pop(); 2289 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3000859D: fnstsw ax */ 2290 /* test HI8(eax), 0x41u */ /* 0x3000859F: test ah, 0x41 */ 2291 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 2292 _cf = 0; 2293 _flag_k = FK_NARROW(FK_TEST, 24); 2294 if (TEST_NZ(_flag_a, _flag_b)) goto L_300085A7; /* 0x300085A2: jne 0x300085a7 */ 2295 L_300085A4: 2296 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 2297 SET_LO8(eax, 0); /* 0x300085A4: xor al, al */ 2298 _cf = 0; 2299 _flag_k = FK_NARROW(FK_TEST, 24); 2300 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300085A6: ret */ 2301 L_300085A7: 2302 SET_LO8(eax, 1); /* 0x300085A7: mov al, 1 */ 2303 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300085A9: ret */ 2304 RECOMP_REGS_OUT(); 2305 } 2306 2307 void sub_300085B0(void) { 2308 int _fpu_cmp = 0; 2309 uint32_t _cf = 0; 2310 int _df = 1; 2311 uint32_t _flag_k = FK_NONE; 2312 uint32_t _flag_a = 0, _flag_b = 0; 2313 uint32_t _itail_tgt = 0; 2314 RECOMP_REGS_LOCALS 2315 RECOMP_ENTER(0x300085B0u); 2316 2317 L_300085B0: 2318 PUSH32(esp, ebp); /* 0x300085B0: push ebp */ 2319 ebp = esp; /* 0x300085B1: mov ebp, esp */ 2320 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x44u); 2321 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2322 esp = esp - 0x44u; /* 0x300085B3: sub esp, 0x44 */ 2323 _flag_k = FK_CMP; 2324 PUSH32(esp, ebx); /* 0x300085B6: push ebx */ 2325 eax = ecx; /* 0x300085B7: mov eax, ecx */ 2326 ebx = MEM32(eax + 0x4); /* 0x300085B9: mov ebx, dword ptr [eax + 4] */ 2327 PUSH32(esp, esi); /* 0x300085BC: push esi */ 2328 esi = 1; /* 0x300085BD: mov esi, 1 */ 2329 /* cmp ebx, esi */ /* 0x300085C2: cmp ebx, esi */ 2330 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi); 2331 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2332 _flag_k = FK_CMP; 2333 PUSH32(esp, edi); /* 0x300085C4: push edi */ 2334 MEM32(ebp + (-0xC)) = eax; /* 0x300085C5: mov dword ptr [ebp - 0xc], eax */ 2335 MEM32(ebp + (-0x4)) = 2; /* 0x300085C8: mov dword ptr [ebp - 4], 2 */ 2336 MEM32(ebp + (-0x10)) = 0xBF800000u; /* 0x300085CF: mov dword ptr [ebp - 0x10], 0xbf800000 */ 2337 MEM32(ebp + (-0x14)) = 0xBF800000u; /* 0x300085D6: mov dword ptr [ebp - 0x14], 0xbf800000 */ 2338 ecx = esi; /* 0x300085DD: mov ecx, esi */ 2339 if (CMP_LE(_flag_a, _flag_b)) goto L_3000864E; /* 0x300085DF: jle 0x3000864e */ 2340 L_300085E1: 2341 eax = MEM32(eax); /* 0x300085E1: mov eax, dword ptr [eax] */ 2342 edx = eax + 0xC; /* 0x300085E3: lea edx, [eax + 0xc] */ 2343 MEM32(ebp + (-0x8)) = edx; /* 0x300085E6: mov dword ptr [ebp - 8], edx */ 2344 edx = eax + 0x8; /* 0x300085E9: lea edx, [eax + 8] */ 2345 L_300085EC: 2346 eax = MEM32(ebp + (-0x8)); /* 0x300085EC: mov eax, dword ptr [ebp - 8] */ 2347 edi = MEM32(eax); /* 0x300085EF: mov edi, dword ptr [eax] */ 2348 MEM32(ebp + (-0x38)) = edi; /* 0x300085F1: mov dword ptr [ebp - 0x38], edi */ 2349 fp_push(*(float*)&MEM32(ebp + (-0x38))); /* 0x300085F4: fld dword ptr [ebp - 0x38] */ 2350 _st[0] -= (double)*(float*)ADDR(edx + (-0x8)); /* 0x300085F7: fsub dword ptr [edx - 8] */ 2351 edi = MEM32(eax + 0x4); /* 0x300085FA: mov edi, dword ptr [eax + 4] */ 2352 eax = MEM32(eax + 0x8); /* 0x300085FD: mov eax, dword ptr [eax + 8] */ 2353 MEM32(ebp + (-0x34)) = edi; /* 0x30008600: mov dword ptr [ebp - 0x34], edi */ 2354 fp_push(*(float*)&MEM32(ebp + (-0x34))); /* 0x30008603: fld dword ptr [ebp - 0x34] */ 2355 _st[0] -= (double)*(float*)ADDR(edx + (-0x4)); /* 0x30008606: fsub dword ptr [edx - 4] */ 2356 MEM32(ebp + (-0x30)) = eax; /* 0x30008609: mov dword ptr [ebp - 0x30], eax */ 2357 fp_push(*(float*)&MEM32(ebp + (-0x30))); /* 0x3000860C: fld dword ptr [ebp - 0x30] */ 2358 _st[0] -= (double)*(float*)ADDR(edx); /* 0x3000860F: fsub dword ptr [edx] */ 2359 fp_push(_st[0]); /* 0x30008611: fld st(0) */ 2360 _st[0] *= _st[1]; /* 0x30008613: fmul st(1) */ 2361 fp_push(_st[2]); /* 0x30008615: fld st(2) */ 2362 _st[0] *= _st[3]; /* 0x30008617: fmul st(3) */ 2363 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008619: faddp st(1) */ 2364 fp_push(_st[3]); /* 0x3000861B: fld st(3) */ 2365 _st[0] *= _st[4]; /* 0x3000861D: fmul st(4) */ 2366 { double _v = fp_pop(); _st[0] += _v; } /* 0x3000861F: faddp st(1) */ 2367 { _st[3] = _st[0]; g_st_i64[3] = g_st_i64[0]; fp_pop(); } /* 0x30008621: fstp st(3) */ 2368 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30008623: fstp st(0) */ 2369 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30008625: fstp st(0) */ 2370 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + (-0x10))); /* 0x30008627: fcom dword ptr [ebp - 0x10] */ 2371 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3000862A: fnstsw ax */ 2372 /* test HI8(eax), 0x41u */ /* 0x3000862C: test ah, 0x41 */ 2373 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 2374 _cf = 0; 2375 _flag_k = FK_NARROW(FK_TEST, 24); 2376 if (TEST_NZ(_flag_a, _flag_b)) goto L_30008638; /* 0x3000862F: jne 0x30008638 */ 2377 L_30008631: 2378 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x30008631: fstp dword ptr [ebp - 0x10] */ 2379 esi = ecx; /* 0x30008634: mov esi, ecx */ 2380 goto L_3000863A; /* 0x30008636: jmp 0x3000863a */ 2381 L_30008638: 2382 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30008638: fstp st(0) */ 2383 L_3000863A: 2384 eax = MEM32(ebp + (-0x8)); /* 0x3000863A: mov eax, dword ptr [ebp - 8] */ 2385 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 2386 ecx = ecx + 1; /* 0x3000863D: inc ecx */ 2387 _flag_k = FK_INC; 2388 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu); 2389 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2390 eax = eax + 0xCu; /* 0x3000863E: add eax, 0xc */ 2391 _flag_k = FK_ADD; 2392 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0xCu); 2393 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2394 edx = edx + 0xCu; /* 0x30008641: add edx, 0xc */ 2395 _flag_k = FK_ADD; 2396 /* cmp ecx, ebx */ /* 0x30008644: cmp ecx, ebx */ 2397 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx); 2398 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2399 _flag_k = FK_CMP; 2400 MEM32(ebp + (-0x8)) = eax; /* 0x30008646: mov dword ptr [ebp - 8], eax */ 2401 RECOMP_BACKEDGE(); 2402 if (CMP_L(_flag_a, _flag_b)) goto L_300085EC; /* 0x30008649: jl 0x300085ec */ 2403 L_3000864B: 2404 eax = MEM32(ebp + (-0xC)); /* 0x3000864B: mov eax, dword ptr [ebp - 0xc] */ 2405 L_3000864E: 2406 edx = MEM32(eax); /* 0x3000864E: mov edx, dword ptr [eax] */ 2407 ecx = esi + esi * 2; /* 0x30008650: lea ecx, [esi + esi*2] */ 2408 eax = edx + ecx * 4; /* 0x30008653: lea eax, [edx + ecx*4] */ 2409 ecx = eax; /* 0x30008656: mov ecx, eax */ 2410 edx = MEM32(ecx); /* 0x30008658: mov edx, dword ptr [ecx] */ 2411 MEM32(ebp + (-0x2C)) = edx; /* 0x3000865A: mov dword ptr [ebp - 0x2c], edx */ 2412 fp_push(*(float*)&MEM32(ebp + (-0x2C))); /* 0x3000865D: fld dword ptr [ebp - 0x2c] */ 2413 _st[0] -= (double)*(float*)ADDR(eax + (-0xC)); /* 0x30008660: fsub dword ptr [eax - 0xc] */ 2414 edx = MEM32(ecx + 0x4); /* 0x30008663: mov edx, dword ptr [ecx + 4] */ 2415 ecx = MEM32(ecx + 0x8); /* 0x30008666: mov ecx, dword ptr [ecx + 8] */ 2416 MEM32(ebp + (-0x28)) = edx; /* 0x30008669: mov dword ptr [ebp - 0x28], edx */ 2417 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x2C)) = _v; } /* 0x3000866C: fstp dword ptr [ebp - 0x2c] */ 2418 edx = MEM32(ebp + (-0x2C)); /* 0x3000866F: mov edx, dword ptr [ebp - 0x2c] */ 2419 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x30008672: fld dword ptr [ebp - 0x28] */ 2420 MEM32(ebp + (-0x24)) = ecx; /* 0x30008675: mov dword ptr [ebp - 0x24], ecx */ 2421 _st[0] -= (double)*(float*)ADDR(eax + (-0x8)); /* 0x30008678: fsub dword ptr [eax - 8] */ 2422 edi = 1; /* 0x3000867B: mov edi, 1 */ 2423 /* cmp ebx, edi */ /* 0x30008680: cmp ebx, edi */ 2424 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edi); 2425 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2426 _flag_k = FK_CMP; 2427 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x30008682: fstp dword ptr [ebp - 0x28] */ 2428 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x30008685: fld dword ptr [ebp - 0x24] */ 2429 _st[0] -= (double)*(float*)ADDR(eax + (-0x4)); /* 0x30008688: fsub dword ptr [eax - 4] */ 2430 eax = MEM32(ebp + (-0x28)); /* 0x3000868B: mov eax, dword ptr [ebp - 0x28] */ 2431 MEM32(ebp + (-0x44)) = edx; /* 0x3000868E: mov dword ptr [ebp - 0x44], edx */ 2432 MEM32(ebp + (-0x40)) = eax; /* 0x30008691: mov dword ptr [ebp - 0x40], eax */ 2433 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x30008694: fstp dword ptr [ebp - 0x24] */ 2434 ecx = MEM32(ebp + (-0x24)); /* 0x30008697: mov ecx, dword ptr [ebp - 0x24] */ 2435 MEM32(ebp + (-0x3C)) = ecx; /* 0x3000869A: mov dword ptr [ebp - 0x3c], ecx */ 2436 if (CMP_LE(_flag_a, _flag_b)) goto L_30008762; /* 0x3000869D: jle 0x30008762 */ 2437 L_300086A3: 2438 eax = 0xCu; /* 0x300086A3: mov eax, 0xc */ 2439 MEM32(ebp + (-0x10)) = eax; /* 0x300086A8: mov dword ptr [ebp - 0x10], eax */ 2440 L_300086AB: 2441 /* cmp edi, esi */ /* 0x300086AB: cmp edi, esi */ 2442 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 2443 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2444 _flag_k = FK_CMP; 2445 if (CMP_EQ(_flag_a, _flag_b)) goto L_30008750; /* 0x300086AD: je 0x30008750 */ 2446 L_300086B3: 2447 edx = MEM32(ebp + (-0xC)); /* 0x300086B3: mov edx, dword ptr [ebp - 0xc] */ 2448 ecx = MEM32(edx); /* 0x300086B6: mov ecx, dword ptr [edx] */ 2449 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 2450 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2451 eax = eax + ecx; /* 0x300086B8: add eax, ecx */ 2452 _flag_k = FK_ADD; 2453 edx = eax; /* 0x300086BA: mov edx, eax */ 2454 ecx = MEM32(edx); /* 0x300086BC: mov ecx, dword ptr [edx] */ 2455 MEM32(ebp + (-0x2C)) = ecx; /* 0x300086BE: mov dword ptr [ebp - 0x2c], ecx */ 2456 fp_push(*(float*)&MEM32(ebp + (-0x2C))); /* 0x300086C1: fld dword ptr [ebp - 0x2c] */ 2457 _st[0] -= (double)*(float*)ADDR(eax + (-0xC)); /* 0x300086C4: fsub dword ptr [eax - 0xc] */ 2458 ecx = MEM32(edx + 0x4); /* 0x300086C7: mov ecx, dword ptr [edx + 4] */ 2459 edx = MEM32(edx + 0x8); /* 0x300086CA: mov edx, dword ptr [edx + 8] */ 2460 MEM32(ebp + (-0x28)) = ecx; /* 0x300086CD: mov dword ptr [ebp - 0x28], ecx */ 2461 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x2C)) = _v; } /* 0x300086D0: fstp dword ptr [ebp - 0x2c] */ 2462 MEM32(ebp + (-0x24)) = edx; /* 0x300086D3: mov dword ptr [ebp - 0x24], edx */ 2463 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x300086D6: fld dword ptr [ebp - 0x28] */ 2464 _st[0] -= (double)*(float*)ADDR(eax + (-0x8)); /* 0x300086D9: fsub dword ptr [eax - 8] */ 2465 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x300086DC: fstp dword ptr [ebp - 0x28] */ 2466 ecx = MEM32(ebp + (-0x28)); /* 0x300086DF: mov ecx, dword ptr [ebp - 0x28] */ 2467 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x300086E2: fld dword ptr [ebp - 0x24] */ 2468 MEM32(ebp + (-0x34)) = ecx; /* 0x300086E5: mov dword ptr [ebp - 0x34], ecx */ 2469 _st[0] -= (double)*(float*)ADDR(eax + (-0x4)); /* 0x300086E8: fsub dword ptr [eax - 4] */ 2470 eax = MEM32(ebp + (-0x2C)); /* 0x300086EB: mov eax, dword ptr [ebp - 0x2c] */ 2471 MEM32(ebp + (-0x38)) = eax; /* 0x300086EE: mov dword ptr [ebp - 0x38], eax */ 2472 eax = ebp + (-0x44); /* 0x300086F1: lea eax, [ebp - 0x44] */ 2473 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x300086F4: fstp dword ptr [ebp - 0x24] */ 2474 edx = MEM32(ebp + (-0x24)); /* 0x300086F7: mov edx, dword ptr [ebp - 0x24] */ 2475 PUSH32(esp, eax); /* 0x300086FA: push eax */ 2476 ecx = ebp + (-0x38); /* 0x300086FB: lea ecx, [ebp - 0x38] */ 2477 MEM32(ebp + (-0x30)) = edx; /* 0x300086FE: mov dword ptr [ebp - 0x30], edx */ 2478 RECOMP_ICALL(MEM32(0x300190D8)); /* 0x30008701: call dword ptr [0x300190d8] */ 2479 RECOMP_FLAGS_IN(); 2480 ecx = MEM32(eax); /* 0x30008707: mov ecx, dword ptr [eax] */ 2481 edx = MEM32(eax + 0x4); /* 0x30008709: mov edx, dword ptr [eax + 4] */ 2482 eax = MEM32(eax + 0x8); /* 0x3000870C: mov eax, dword ptr [eax + 8] */ 2483 MEM32(ebp + (-0x1C)) = edx; /* 0x3000870F: mov dword ptr [ebp - 0x1c], edx */ 2484 fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x30008712: fld dword ptr [ebp - 0x1c] */ 2485 _st[0] *= (double)*(float*)ADDR(ebp + (-0x1C)); /* 0x30008715: fmul dword ptr [ebp - 0x1c] */ 2486 MEM32(ebp + (-0x18)) = eax; /* 0x30008718: mov dword ptr [ebp - 0x18], eax */ 2487 fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x3000871B: fld dword ptr [ebp - 0x18] */ 2488 MEM32(ebp + (-0x20)) = ecx; /* 0x3000871E: mov dword ptr [ebp - 0x20], ecx */ 2489 _st[0] *= (double)*(float*)ADDR(ebp + (-0x18)); /* 0x30008721: fmul dword ptr [ebp - 0x18] */ 2490 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008724: faddp st(1) */ 2491 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x30008726: fld dword ptr [ebp - 0x20] */ 2492 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x30008729: fmul dword ptr [ebp - 0x20] */ 2493 { double _v = fp_pop(); _st[0] += _v; } /* 0x3000872C: faddp st(1) */ 2494 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + (-0x14))); /* 0x3000872E: fcom dword ptr [ebp - 0x14] */ 2495 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x30008731: fnstsw ax */ 2496 /* test HI8(eax), 0x41u */ /* 0x30008733: test ah, 0x41 */ 2497 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 2498 _cf = 0; 2499 _flag_k = FK_NARROW(FK_TEST, 24); 2500 if (TEST_NZ(_flag_a, _flag_b)) goto L_3000874E; /* 0x30008736: jne 0x3000874e */ 2501 L_30008738: 2502 eax = edi; /* 0x30008738: mov eax, edi */ 2503 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 2504 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2505 eax = eax - esi; /* 0x3000873A: sub eax, esi */ 2506 _flag_k = FK_CMP; 2507 /* cmp eax, 1 */ /* 0x3000873C: cmp eax, 1 */ 2508 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2509 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2510 _flag_k = FK_CMP; 2511 if (CMP_EQ(_flag_a, _flag_b)) goto L_30008746; /* 0x3000873F: je 0x30008746 */ 2512 L_30008741: 2513 /* cmp eax, 0xFFFFFFFFu */ /* 0x30008741: cmp eax, -1 */ 2514 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2515 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2516 _flag_k = FK_CMP; 2517 if (CMP_NE(_flag_a, _flag_b)) goto L_3000874E; /* 0x30008744: jne 0x3000874e */ 2518 L_30008746: 2519 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x30008746: fstp dword ptr [ebp - 0x14] */ 2520 MEM32(ebp + (-0x4)) = edi; /* 0x30008749: mov dword ptr [ebp - 4], edi */ 2521 goto L_30008750; /* 0x3000874C: jmp 0x30008750 */ 2522 L_3000874E: 2523 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3000874E: fstp st(0) */ 2524 L_30008750: 2525 eax = MEM32(ebp + (-0x10)); /* 0x30008750: mov eax, dword ptr [ebp - 0x10] */ 2526 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1); 2527 edi = edi + 1; /* 0x30008753: inc edi */ 2528 _flag_k = FK_INC; 2529 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu); 2530 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2531 eax = eax + 0xCu; /* 0x30008754: add eax, 0xc */ 2532 _flag_k = FK_ADD; 2533 /* cmp edi, ebx */ /* 0x30008757: cmp edi, ebx */ 2534 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx); 2535 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2536 _flag_k = FK_CMP; 2537 MEM32(ebp + (-0x10)) = eax; /* 0x30008759: mov dword ptr [ebp - 0x10], eax */ 2538 RECOMP_BACKEDGE(); 2539 if (CMP_L(_flag_a, _flag_b)) goto L_300086AB; /* 0x3000875C: jl 0x300086ab */ 2540 L_30008762: 2541 edx = MEM32(ebp + (-0x4)); /* 0x30008762: mov edx, dword ptr [ebp - 4] */ 2542 /* cmp esi, edx */ /* 0x30008765: cmp esi, edx */ 2543 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx); 2544 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2545 _flag_k = FK_CMP; 2546 if (CMP_LE(_flag_a, _flag_b)) goto L_30008772; /* 0x30008767: jle 0x30008772 */ 2547 L_30008769: 2548 eax = esi; /* 0x30008769: mov eax, esi */ 2549 esi = edx; /* 0x3000876B: mov esi, edx */ 2550 MEM32(ebp + (-0x4)) = eax; /* 0x3000876D: mov dword ptr [ebp - 4], eax */ 2551 edx = eax; /* 0x30008770: mov edx, eax */ 2552 L_30008772: 2553 ecx = MEM32(ebp + (-0xC)); /* 0x30008772: mov ecx, dword ptr [ebp - 0xc] */ 2554 ecx = MEM32(ecx); /* 0x30008775: mov ecx, dword ptr [ecx] */ 2555 eax = esi + esi * 2; /* 0x30008777: lea eax, [esi + esi*2] */ 2556 eax = ecx + eax * 4; /* 0x3000877A: lea eax, [ecx + eax*4] */ 2557 esi = eax; /* 0x3000877D: mov esi, eax */ 2558 edi = MEM32(esi); /* 0x3000877F: mov edi, dword ptr [esi] */ 2559 MEM32(ebp + (-0x2C)) = edi; /* 0x30008781: mov dword ptr [ebp - 0x2c], edi */ 2560 fp_push(*(float*)&MEM32(ebp + (-0x2C))); /* 0x30008784: fld dword ptr [ebp - 0x2c] */ 2561 _st[0] -= (double)*(float*)ADDR(eax + (-0xC)); /* 0x30008787: fsub dword ptr [eax - 0xc] */ 2562 edi = MEM32(esi + 0x4); /* 0x3000878A: mov edi, dword ptr [esi + 4] */ 2563 esi = MEM32(esi + 0x8); /* 0x3000878D: mov esi, dword ptr [esi + 8] */ 2564 MEM32(ebp + (-0x28)) = edi; /* 0x30008790: mov dword ptr [ebp - 0x28], edi */ 2565 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x2C)) = _v; } /* 0x30008793: fstp dword ptr [ebp - 0x2c] */ 2566 edx = edx + edx * 2; /* 0x30008796: lea edx, [edx + edx*2] */ 2567 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x30008799: fld dword ptr [ebp - 0x28] */ 2568 MEM32(ebp + (-0x24)) = esi; /* 0x3000879C: mov dword ptr [ebp - 0x24], esi */ 2569 _st[0] -= (double)*(float*)ADDR(eax + (-0x8)); /* 0x3000879F: fsub dword ptr [eax - 8] */ 2570 edi = POP32_VAL(esp); /* 0x300087A2: pop edi */ 2571 esi = POP32_VAL(esp); /* 0x300087A3: pop esi */ 2572 ebx = POP32_VAL(esp); /* 0x300087A4: pop ebx */ 2573 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x300087A5: fstp dword ptr [ebp - 0x28] */ 2574 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x300087A8: fld dword ptr [ebp - 0x24] */ 2575 _st[0] -= (double)*(float*)ADDR(eax + (-0x4)); /* 0x300087AB: fsub dword ptr [eax - 4] */ 2576 eax = ecx + edx * 4; /* 0x300087AE: lea eax, [ecx + edx*4] */ 2577 ecx = eax; /* 0x300087B1: mov ecx, eax */ 2578 edx = MEM32(ecx); /* 0x300087B3: mov edx, dword ptr [ecx] */ 2579 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x300087B5: fstp dword ptr [ebp - 0x24] */ 2580 MEM32(ebp + (-0x38)) = edx; /* 0x300087B8: mov dword ptr [ebp - 0x38], edx */ 2581 edx = MEM32(ecx + 0x4); /* 0x300087BB: mov edx, dword ptr [ecx + 4] */ 2582 fp_push(*(float*)&MEM32(ebp + (-0x38))); /* 0x300087BE: fld dword ptr [ebp - 0x38] */ 2583 _st[0] -= (double)*(float*)ADDR(eax + (-0xC)); /* 0x300087C1: fsub dword ptr [eax - 0xc] */ 2584 ecx = MEM32(ecx + 0x8); /* 0x300087C4: mov ecx, dword ptr [ecx + 8] */ 2585 MEM32(ebp + (-0x34)) = edx; /* 0x300087C7: mov dword ptr [ebp - 0x34], edx */ 2586 fp_push(*(float*)&MEM32(ebp + (-0x34))); /* 0x300087CA: fld dword ptr [ebp - 0x34] */ 2587 _st[0] -= (double)*(float*)ADDR(eax + (-0x8)); /* 0x300087CD: fsub dword ptr [eax - 8] */ 2588 MEM32(ebp + (-0x30)) = ecx; /* 0x300087D0: mov dword ptr [ebp - 0x30], ecx */ 2589 fp_push(*(float*)&MEM32(ebp + (-0x30))); /* 0x300087D3: fld dword ptr [ebp - 0x30] */ 2590 edx = MEM32(ebp + (-0x2C)); /* 0x300087D6: mov edx, dword ptr [ebp - 0x2c] */ 2591 _st[0] -= (double)*(float*)ADDR(eax + (-0x4)); /* 0x300087D9: fsub dword ptr [eax - 4] */ 2592 eax = MEM32(ebp + (-0x28)); /* 0x300087DC: mov eax, dword ptr [ebp - 0x28] */ 2593 ecx = MEM32(ebp + (-0x24)); /* 0x300087DF: mov ecx, dword ptr [ebp - 0x24] */ 2594 MEM32(ebp + (-0x38)) = edx; /* 0x300087E2: mov dword ptr [ebp - 0x38], edx */ 2595 fp_push(_st[0]); /* 0x300087E5: fld st(0) */ 2596 MEM32(ebp + (-0x34)) = eax; /* 0x300087E7: mov dword ptr [ebp - 0x34], eax */ 2597 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x300087EA: fmul dword ptr [ebp - 0x28] */ 2598 MEM32(ebp + (-0x30)) = ecx; /* 0x300087ED: mov dword ptr [ebp - 0x30], ecx */ 2599 fp_push(_st[2]); /* 0x300087F0: fld st(2) */ 2600 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x300087F2: fmul dword ptr [ebp - 0x24] */ 2601 { double _v = fp_pop(); _st[0] -= _v; } /* 0x300087F5: fsubp st(1) */ 2602 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x300087F7: fstp dword ptr [ebp - 4] */ 2603 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x300087FA: fld dword ptr [ebp - 0x24] */ 2604 edx = MEM32(ebp + (-0x4)); /* 0x300087FD: mov edx, dword ptr [ebp - 4] */ 2605 _st[0] *= _st[3]; /* 0x30008800: fmul st(3) */ 2606 MEM32(ebp + (-0x38)) = edx; /* 0x30008802: mov dword ptr [ebp - 0x38], edx */ 2607 fp_xch(1); /* 0x30008805: fxch st(1) */ 2608 ecx = edx; /* 0x30008807: mov ecx, edx */ 2609 _st[0] *= (double)*(float*)ADDR(ebp + (-0x2C)); /* 0x30008809: fmul dword ptr [ebp - 0x2c] */ 2610 { double _v = fp_pop(); _st[0] -= _v; } /* 0x3000880C: fsubp st(1) */ 2611 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x3000880E: fstp dword ptr [ebp - 0xc] */ 2612 eax = MEM32(ebp + (-0xC)); /* 0x30008811: mov eax, dword ptr [ebp - 0xc] */ 2613 _st[0] *= (double)*(float*)ADDR(ebp + (-0x2C)); /* 0x30008814: fmul dword ptr [ebp - 0x2c] */ 2614 edx = eax; /* 0x30008817: mov edx, eax */ 2615 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x30008819: fld dword ptr [ebp - 0x28] */ 2616 MEM32(ebp + (-0x34)) = eax; /* 0x3000881C: mov dword ptr [ebp - 0x34], eax */ 2617 _st[0] *= _st[2]; /* 0x3000881F: fmul st(2) */ 2618 MEM32(ebp + (-0x1C)) = edx; /* 0x30008821: mov dword ptr [ebp - 0x1c], edx */ 2619 { double _v = fp_pop(); _st[0] -= _v; } /* 0x30008824: fsubp st(1) */ 2620 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x30)) = _v; } /* 0x30008826: fstp dword ptr [ebp - 0x30] */ 2621 eax = MEM32(ebp + (-0x30)); /* 0x30008829: mov eax, dword ptr [ebp - 0x30] */ 2622 MEM32(ebp + (-0x18)) = eax; /* 0x3000882C: mov dword ptr [ebp - 0x18], eax */ 2623 SET_LO8(eax, MEM8(ebp + 0xC)); /* 0x3000882F: mov al, byte ptr [ebp + 0xc] */ 2624 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30008832: fstp st(0) */ 2625 /* test LO8(eax), LO8(eax) */ /* 0x30008834: test al, al */ 2626 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2627 _cf = 0; 2628 _flag_k = FK_NARROW(FK_TEST, 24); 2629 if (TEST_Z(_flag_a, _flag_b)) goto L_30008884; /* 0x30008836: je 0x30008884 */ 2630 L_30008838: 2631 fp_push(*(float*)&MEM32(ebp + (-0x30))); /* 0x30008838: fld dword ptr [ebp - 0x30] */ 2632 _st[0] *= (double)*(float*)ADDR(ebp + (-0x30)); /* 0x3000883B: fmul dword ptr [ebp - 0x30] */ 2633 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x3000883E: fld dword ptr [ebp - 0xc] */ 2634 _st[0] *= (double)*(float*)ADDR(ebp + (-0xC)); /* 0x30008841: fmul dword ptr [ebp - 0xc] */ 2635 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008844: faddp st(1) */ 2636 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x30008846: fld dword ptr [ebp - 4] */ 2637 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x30008849: fmul dword ptr [ebp - 4] */ 2638 { double _v = fp_pop(); _st[0] += _v; } /* 0x3000884C: faddp st(1) */ 2639 _st[0] = sqrt(_st[0]); /* 0x3000884E: fsqrt */ 2640 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3001919C)); /* 0x30008850: fcom dword ptr [0x3001919c] */ 2641 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x30008856: fnstsw ax */ 2642 /* test HI8(eax), 0x40u */ /* 0x30008858: test ah, 0x40 */ 2643 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 2644 _cf = 0; 2645 _flag_k = FK_NARROW(FK_TEST, 24); 2646 if (TEST_NZ(_flag_a, _flag_b)) goto L_30008882; /* 0x3000885B: jne 0x30008882 */ 2647 L_3000885D: 2648 _st[0] = (double)*(float*)ADDR(0x300191B8) / _st[0]; /* 0x3000885D: fdivr dword ptr [0x300191b8] */ 2649 fp_push(_st[0]); /* 0x30008863: fld st(0) */ 2650 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x30008865: fmul dword ptr [ebp - 4] */ 2651 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x30008868: fstp dword ptr [ebp - 0x20] */ 2652 ecx = MEM32(ebp + (-0x20)); /* 0x3000886B: mov ecx, dword ptr [ebp - 0x20] */ 2653 fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x3000886E: fld dword ptr [ebp - 0x1c] */ 2654 _st[0] *= _st[1]; /* 0x30008871: fmul st(1) */ 2655 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x1C)) = _v; } /* 0x30008873: fstp dword ptr [ebp - 0x1c] */ 2656 fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x30008876: fld dword ptr [ebp - 0x18] */ 2657 _st[0] *= _st[1]; /* 0x30008879: fmul st(1) */ 2658 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x18)) = _v; } /* 0x3000887B: fstp dword ptr [ebp - 0x18] */ 2659 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3000887E: fstp st(0) */ 2660 goto L_30008884; /* 0x30008880: jmp 0x30008884 */ 2661 L_30008882: 2662 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30008882: fstp st(0) */ 2663 L_30008884: 2664 eax = MEM32(ebp + 0x8); /* 0x30008884: mov eax, dword ptr [ebp + 8] */ 2665 edx = eax; /* 0x30008887: mov edx, eax */ 2666 MEM32(edx) = ecx; /* 0x30008889: mov dword ptr [edx], ecx */ 2667 ecx = MEM32(ebp + (-0x1C)); /* 0x3000888B: mov ecx, dword ptr [ebp - 0x1c] */ 2668 MEM32(edx + 0x4) = ecx; /* 0x3000888E: mov dword ptr [edx + 4], ecx */ 2669 ecx = MEM32(ebp + (-0x18)); /* 0x30008891: mov ecx, dword ptr [ebp - 0x18] */ 2670 MEM32(edx + 0x8) = ecx; /* 0x30008894: mov dword ptr [edx + 8], ecx */ 2671 esp = ebp; /* 0x30008897: mov esp, ebp */ 2672 ebp = POP32_VAL(esp); /* 0x30008899: pop ebp */ 2673 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3000889A: ret 8 */ 2674 RECOMP_REGS_OUT(); 2675 } 2676 2677 void sub_300088A0(void) { 2678 int _fpu_cmp = 0; 2679 uint32_t _cf = 0; 2680 int _df = 1; 2681 uint32_t _flag_k = FK_NONE; 2682 uint32_t _flag_a = 0, _flag_b = 0; 2683 uint32_t _itail_tgt = 0; 2684 RECOMP_REGS_LOCALS 2685 RECOMP_ENTER(0x300088A0u); 2686 2687 L_300088A0: 2688 PUSH32(esp, ebp); /* 0x300088A0: push ebp */ 2689 ebp = esp; /* 0x300088A1: mov ebp, esp */ 2690 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x58u); 2691 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2692 esp = esp - 0x58u; /* 0x300088A3: sub esp, 0x58 */ 2693 _flag_k = FK_CMP; 2694 PUSH32(esp, ebx); /* 0x300088A6: push ebx */ 2695 ebx = MEM32(ebp + 0xC); /* 0x300088A7: mov ebx, dword ptr [ebp + 0xc] */ 2696 PUSH32(esp, esi); /* 0x300088AA: push esi */ 2697 PUSH32(esp, edi); /* 0x300088AB: push edi */ 2698 edi = ecx; /* 0x300088AC: mov edi, ecx */ 2699 esi = MEM32(edi + 0x4); /* 0x300088AE: mov esi, dword ptr [edi + 4] */ 2700 eax = ebx + 0x2; /* 0x300088B1: lea eax, [ebx + 2] */ 2701 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x300088B4: cdq */ 2702 { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)esi; /* 0x300088B5: idiv esi */ 2703 if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); } 2704 else { eax = 0; edx = 0; } } 2705 ecx = MEM32(edi); /* 0x300088B7: mov ecx, dword ptr [edi] */ 2706 esi = MEM32(ebp + 0x8); /* 0x300088B9: mov esi, dword ptr [ebp + 8] */ 2707 eax = edx + edx * 2; /* 0x300088BC: lea eax, [edx + edx*2] */ 2708 edx = ecx + eax * 4; /* 0x300088BF: lea edx, [ecx + eax*4] */ 2709 eax = MEM32(edx); /* 0x300088C2: mov eax, dword ptr [edx] */ 2710 MEM32(ebp + (-0x3C)) = eax; /* 0x300088C4: mov dword ptr [ebp - 0x3c], eax */ 2711 eax = MEM32(edx + 0x4); /* 0x300088C7: mov eax, dword ptr [edx + 4] */ 2712 MEM32(ebp + (-0x38)) = eax; /* 0x300088CA: mov dword ptr [ebp - 0x38], eax */ 2713 edx = MEM32(edx + 0x8); /* 0x300088CD: mov edx, dword ptr [edx + 8] */ 2714 eax = MEM32(ebp + 0x10); /* 0x300088D0: mov eax, dword ptr [ebp + 0x10] */ 2715 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2); 2716 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2717 eax = eax + 2; /* 0x300088D3: add eax, 2 */ 2718 _flag_k = FK_ADD; 2719 MEM32(ebp + (-0x34)) = edx; /* 0x300088D6: mov dword ptr [ebp - 0x34], edx */ 2720 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x300088D9: cdq */ 2721 { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)MEM32(esi + 0x4); /* 0x300088DA: idiv dword ptr [esi + 4] */ 2722 if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); } 2723 else { eax = 0; edx = 0; } } 2724 eax = MEM32(esi); /* 0x300088DD: mov eax, dword ptr [esi] */ 2725 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(8); 2726 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2727 esi = esi + 8; /* 0x300088DF: add esi, 8 */ 2728 _flag_k = FK_ADD; 2729 edx = edx + edx * 2; /* 0x300088E2: lea edx, [edx + edx*2] */ 2730 edx = eax + edx * 4; /* 0x300088E5: lea edx, [eax + edx*4] */ 2731 eax = MEM32(edx); /* 0x300088E8: mov eax, dword ptr [edx] */ 2732 MEM32(ebp + (-0x48)) = eax; /* 0x300088EA: mov dword ptr [ebp - 0x48], eax */ 2733 eax = MEM32(edx + 0x4); /* 0x300088ED: mov eax, dword ptr [edx + 4] */ 2734 MEM32(ebp + (-0x44)) = eax; /* 0x300088F0: mov dword ptr [ebp - 0x44], eax */ 2735 edx = MEM32(edx + 0x8); /* 0x300088F3: mov edx, dword ptr [edx + 8] */ 2736 MEM32(ebp + (-0x40)) = edx; /* 0x300088F6: mov dword ptr [ebp - 0x40], edx */ 2737 eax = edi + 0x8; /* 0x300088F9: lea eax, [edi + 8] */ 2738 edx = MEM32(eax); /* 0x300088FC: mov edx, dword ptr [eax] */ 2739 MEM32(ebp + (-0xC)) = edx; /* 0x300088FE: mov dword ptr [ebp - 0xc], edx */ 2740 edx = MEM32(eax + 0x4); /* 0x30008901: mov edx, dword ptr [eax + 4] */ 2741 eax = MEM32(eax + 0x8); /* 0x30008904: mov eax, dword ptr [eax + 8] */ 2742 MEM32(ebp + (-0x8)) = edx; /* 0x30008907: mov dword ptr [ebp - 8], edx */ 2743 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x3000890A: fld dword ptr [ebp - 8] */ 2744 edx = MEM32(esi); /* 0x3000890D: mov edx, dword ptr [esi] */ 2745 MEM32(ebp + (-0x4)) = eax; /* 0x3000890F: mov dword ptr [ebp - 4], eax */ 2746 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x30008912: fld dword ptr [ebp - 4] */ 2747 eax = MEM32(esi + 0x4); /* 0x30008915: mov eax, dword ptr [esi + 4] */ 2748 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x30008918: fld dword ptr [ebp - 4] */ 2749 MEM32(ebp + (-0x18)) = edx; /* 0x3000891B: mov dword ptr [ebp - 0x18], edx */ 2750 edx = MEM32(esi + 0x8); /* 0x3000891E: mov edx, dword ptr [esi + 8] */ 2751 MEM32(ebp + (-0x10)) = edx; /* 0x30008921: mov dword ptr [ebp - 0x10], edx */ 2752 _st[0] *= (double)*(float*)ADDR(ebp + (-0x10)); /* 0x30008924: fmul dword ptr [ebp - 0x10] */ 2753 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x30008927: fld dword ptr [ebp - 8] */ 2754 MEM32(ebp + (-0x14)) = eax; /* 0x3000892A: mov dword ptr [ebp - 0x14], eax */ 2755 _st[0] *= (double)*(float*)ADDR(ebp + (-0x14)); /* 0x3000892D: fmul dword ptr [ebp - 0x14] */ 2756 eax = edx; /* 0x30008930: mov eax, edx */ 2757 edx = MEM32(ebp + (-0x14)); /* 0x30008932: mov edx, dword ptr [ebp - 0x14] */ 2758 MEM32(ebp + 0xC) = edx; /* 0x30008935: mov dword ptr [ebp + 0xc], edx */ 2759 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008938: faddp st(1) */ 2760 MEM32(ebp + 0x10) = eax; /* 0x3000893A: mov dword ptr [ebp + 0x10], eax */ 2761 fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x3000893D: fld dword ptr [ebp - 0x18] */ 2762 _st[0] *= (double)*(float*)ADDR(ebp + (-0xC)); /* 0x30008940: fmul dword ptr [ebp - 0xc] */ 2763 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008943: faddp st(1) */ 2764 fp_push(_st[2]); /* 0x30008945: fld st(2) */ 2765 { double _v = fp_pop(); _st[2] *= _v; } /* 0x30008947: fmulp st(3) */ 2766 fp_push(_st[1]); /* 0x30008949: fld st(1) */ 2767 _st[0] *= _st[2]; /* 0x3000894B: fmul st(2) */ 2768 { double _v = fp_pop(); _st[2] += _v; } /* 0x3000894D: faddp st(3) */ 2769 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x3000894F: fld dword ptr [ebp - 0xc] */ 2770 _st[0] *= (double)*(float*)ADDR(ebp + (-0xC)); /* 0x30008952: fmul dword ptr [ebp - 0xc] */ 2771 { double _v = fp_pop(); _st[2] += _v; } /* 0x30008955: faddp st(3) */ 2772 fp_xch(2); /* 0x30008957: fxch st(2) */ 2773 _st[0] = sqrt(_st[0]); /* 0x30008959: fsqrt */ 2774 fp_xch(2); /* 0x3000895B: fxch st(2) */ 2775 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x3000895D: fld dword ptr [ebp + 0xc] */ 2776 _st[0] *= (double)*(float*)ADDR(ebp + 0xC); /* 0x30008960: fmul dword ptr [ebp + 0xc] */ 2777 fp_push(*(float*)&MEM32(ebp + 0x10)); /* 0x30008963: fld dword ptr [ebp + 0x10] */ 2778 _st[0] *= (double)*(float*)ADDR(ebp + 0x10); /* 0x30008966: fmul dword ptr [ebp + 0x10] */ 2779 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008969: faddp st(1) */ 2780 fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x3000896B: fld dword ptr [ebp - 0x18] */ 2781 _st[0] *= (double)*(float*)ADDR(ebp + (-0x18)); /* 0x3000896E: fmul dword ptr [ebp - 0x18] */ 2782 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008971: faddp st(1) */ 2783 _st[0] = sqrt(_st[0]); /* 0x30008973: fsqrt */ 2784 { float _v = (float)_st[0]; *(float*)ADDR(ebp + 0xC) = _v; } /* 0x30008975: fst dword ptr [ebp + 0xc] */ 2785 eax = ebx + 0x1; /* 0x30008978: lea eax, [ebx + 1] */ 2786 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x3000897B: cdq */ 2787 { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)MEM32(edi + 0x4); /* 0x3000897C: idiv dword ptr [edi + 4] */ 2788 if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); } 2789 else { eax = 0; edx = 0; } } 2790 esi = ebx + ebx * 2; /* 0x3000897F: lea esi, [ebx + ebx*2] */ 2791 { double _v = fp_pop(); _st[2] *= _v; } /* 0x30008982: fmulp st(3) */ 2792 if (2u) _cf = (((esi) >> 30) & 1u); /* 0x30008984: shl esi, 2 */ 2793 if (2u) { _flag_a = recomp_flags_pack((esi << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2794 esi = esi << 2u; /* 0x30008984: shl esi, 2 */ 2795 fp_xch(2); /* 0x30008987: fxch st(2) */ 2796 { double _v = fp_pop(); _st[1] = _v == 0.0 ? _st[1] : _st[1] / _v; } /* 0x30008989: fdivp st(2) */ 2797 eax = edx + edx * 2; /* 0x3000898B: lea eax, [edx + edx*2] */ 2798 edx = ecx + eax * 4; /* 0x3000898E: lea edx, [ecx + eax*4] */ 2799 eax = MEM32(edx); /* 0x30008991: mov eax, dword ptr [edx] */ 2800 MEM32(ebp + (-0xC)) = eax; /* 0x30008993: mov dword ptr [ebp - 0xc], eax */ 2801 eax = MEM32(edx + 0x4); /* 0x30008996: mov eax, dword ptr [edx + 4] */ 2802 edx = MEM32(edx + 0x8); /* 0x30008999: mov edx, dword ptr [edx + 8] */ 2803 MEM32(ebp + (-0x8)) = eax; /* 0x3000899C: mov dword ptr [ebp - 8], eax */ 2804 MEM32(ebp + (-0x4)) = edx; /* 0x3000899F: mov dword ptr [ebp - 4], edx */ 2805 fp_xch(1); /* 0x300089A2: fxch st(1) */ 2806 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x300089A4: fstp dword ptr [ebp + 0xc] */ 2807 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x300089A7: fstp st(0) */ 2808 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x300089A9: fld dword ptr [ebp - 0xc] */ 2809 _st[0] -= (double)*(float*)ADDR(esi + ecx); /* 0x300089AC: fsub dword ptr [esi + ecx] */ 2810 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x300089AF: fstp dword ptr [ebp - 0xc] */ 2811 eax = MEM32(ebp + (-0xC)); /* 0x300089B2: mov eax, dword ptr [ebp - 0xc] */ 2812 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x300089B5: fld dword ptr [ebp - 8] */ 2813 _st[0] -= (double)*(float*)ADDR(esi + ecx + 0x4); /* 0x300089B8: fsub dword ptr [esi + ecx + 4] */ 2814 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x300089BC: fstp dword ptr [ebp - 8] */ 2815 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x300089BF: fld dword ptr [ebp - 4] */ 2816 _st[0] -= (double)*(float*)ADDR(esi + ecx + 0x8); /* 0x300089C2: fsub dword ptr [esi + ecx + 8] */ 2817 ecx = MEM32(ebp + (-0x8)); /* 0x300089C6: mov ecx, dword ptr [ebp - 8] */ 2818 MEM32(ebp + (-0x18)) = eax; /* 0x300089C9: mov dword ptr [ebp - 0x18], eax */ 2819 eax = MEM32(edi + 0x8); /* 0x300089CC: mov eax, dword ptr [edi + 8] */ 2820 MEM32(ebp + (-0x14)) = ecx; /* 0x300089CF: mov dword ptr [ebp - 0x14], ecx */ 2821 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x300089D2: fstp dword ptr [ebp - 4] */ 2822 edx = MEM32(ebp + (-0x4)); /* 0x300089D5: mov edx, dword ptr [ebp - 4] */ 2823 ecx = MEM32(edi + 0xC); /* 0x300089D8: mov ecx, dword ptr [edi + 0xc] */ 2824 MEM32(ebp + (-0x24)) = eax; /* 0x300089DB: mov dword ptr [ebp - 0x24], eax */ 2825 MEM32(ebp + (-0x10)) = edx; /* 0x300089DE: mov dword ptr [ebp - 0x10], edx */ 2826 edx = MEM32(edi + 0x10); /* 0x300089E1: mov edx, dword ptr [edi + 0x10] */ 2827 eax = ebp + (-0x18); /* 0x300089E4: lea eax, [ebp - 0x18] */ 2828 MEM32(ebp + (-0x20)) = ecx; /* 0x300089E7: mov dword ptr [ebp - 0x20], ecx */ 2829 PUSH32(esp, eax); /* 0x300089EA: push eax */ 2830 ecx = ebp + (-0x24); /* 0x300089EB: lea ecx, [ebp - 0x24] */ 2831 MEM32(ebp + (-0x1C)) = edx; /* 0x300089EE: mov dword ptr [ebp - 0x1c], edx */ 2832 RECOMP_ICALL(MEM32(0x300190D8)); /* 0x300089F1: call dword ptr [0x300190d8] */ 2833 RECOMP_FLAGS_IN(); 2834 ecx = MEM32(eax); /* 0x300089F7: mov ecx, dword ptr [eax] */ 2835 edx = MEM32(eax + 0x4); /* 0x300089F9: mov edx, dword ptr [eax + 4] */ 2836 eax = MEM32(eax + 0x8); /* 0x300089FC: mov eax, dword ptr [eax + 8] */ 2837 MEM32(ebp + (-0x4)) = eax; /* 0x300089FF: mov dword ptr [ebp - 4], eax */ 2838 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x30008A02: fld dword ptr [ebp - 4] */ 2839 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x30008A05: fmul dword ptr [ebp - 4] */ 2840 MEM32(ebp + (-0x8)) = edx; /* 0x30008A08: mov dword ptr [ebp - 8], edx */ 2841 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x30008A0B: fld dword ptr [ebp - 8] */ 2842 MEM32(ebp + (-0xC)) = ecx; /* 0x30008A0E: mov dword ptr [ebp - 0xc], ecx */ 2843 _st[0] *= (double)*(float*)ADDR(ebp + (-0x8)); /* 0x30008A11: fmul dword ptr [ebp - 8] */ 2844 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008A14: faddp st(1) */ 2845 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x30008A16: fld dword ptr [ebp - 0xc] */ 2846 _st[0] *= (double)*(float*)ADDR(ebp + (-0xC)); /* 0x30008A19: fmul dword ptr [ebp - 0xc] */ 2847 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008A1C: faddp st(1) */ 2848 _st[0] = sqrt(_st[0]); /* 0x30008A1E: fsqrt */ 2849 _st[0] = (double)*(float*)ADDR(0x300191B8) / _st[0]; /* 0x30008A20: fdivr dword ptr [0x300191b8] */ 2850 fp_push(_st[0]); /* 0x30008A26: fld st(0) */ 2851 _st[0] *= (double)*(float*)ADDR(ebp + (-0xC)); /* 0x30008A28: fmul dword ptr [ebp - 0xc] */ 2852 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x30008A2B: fstp dword ptr [ebp - 0xc] */ 2853 ecx = MEM32(ebp + (-0xC)); /* 0x30008A2E: mov ecx, dword ptr [ebp - 0xc] */ 2854 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x30008A31: fld dword ptr [ebp - 8] */ 2855 MEM32(ebp + (-0x30)) = ecx; /* 0x30008A34: mov dword ptr [ebp - 0x30], ecx */ 2856 _st[0] *= _st[1]; /* 0x30008A37: fmul st(1) */ 2857 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x30008A39: fstp dword ptr [ebp - 8] */ 2858 edx = MEM32(ebp + (-0x8)); /* 0x30008A3C: mov edx, dword ptr [ebp - 8] */ 2859 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x30008A3F: fld dword ptr [ebp - 4] */ 2860 MEM32(ebp + (-0x2C)) = edx; /* 0x30008A42: mov dword ptr [ebp - 0x2c], edx */ 2861 _st[0] *= _st[1]; /* 0x30008A45: fmul st(1) */ 2862 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x30008A47: fstp dword ptr [ebp - 4] */ 2863 eax = MEM32(ebp + (-0x4)); /* 0x30008A4A: mov eax, dword ptr [ebp - 4] */ 2864 MEM32(ebp + (-0x28)) = eax; /* 0x30008A4D: mov dword ptr [ebp - 0x28], eax */ 2865 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30008A50: fstp st(0) */ 2866 eax = MEM32(edi); /* 0x30008A52: mov eax, dword ptr [edi] */ 2867 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x30008A54: fld dword ptr [ebp - 4] */ 2868 _st[0] *= (double)*(float*)ADDR(esi + eax + 0x8); /* 0x30008A57: fmul dword ptr [esi + eax + 8] */ 2869 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 2870 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2871 esi = esi + eax; /* 0x30008A5B: add esi, eax */ 2872 _flag_k = FK_ADD; 2873 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x30008A5D: fld dword ptr [ebp - 8] */ 2874 PUSH32(esp, ecx); /* 0x30008A60: push ecx */ 2875 _st[0] *= (double)*(float*)ADDR(esi + 0x4); /* 0x30008A61: fmul dword ptr [esi + 4] */ 2876 ecx = ebp + (-0x30); /* 0x30008A64: lea ecx, [ebp - 0x30] */ 2877 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008A67: faddp st(1) */ 2878 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x30008A69: fld dword ptr [ebp - 0xc] */ 2879 _st[0] *= (double)*(float*)ADDR(esi); /* 0x30008A6C: fmul dword ptr [esi] */ 2880 { double _v = fp_pop(); _st[0] += _v; } /* 0x30008A6E: faddp st(1) */ 2881 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x30008A70: fstp dword ptr [esp] */ 2882 PUSH32(esp, ecx); /* 0x30008A73: push ecx */ 2883 ecx = ebp + (-0x58); /* 0x30008A74: lea ecx, [ebp - 0x58] */ 2884 RECOMP_ICALL(0x300097F0u); /* 0x30008A77: call 0x300097f0 */ /* not lifted */ 2885 RECOMP_FLAGS_IN(); 2886 edx = ebp + (-0x3C); /* 0x30008A7C: lea edx, [ebp - 0x3c] */ 2887 PUSH32(esp, edx); /* 0x30008A7F: push edx */ 2888 ecx = ebp + (-0x58); /* 0x30008A80: lea ecx, [ebp - 0x58] */ 2889 RECOMP_ICALL(0x30009870u); /* 0x30008A83: call 0x30009870 */ /* not lifted */ 2890 RECOMP_FLAGS_IN(); 2891 esi = eax; /* 0x30008A88: mov esi, eax */ 2892 eax = ebp + (-0x48); /* 0x30008A8A: lea eax, [ebp - 0x48] */ 2893 PUSH32(esp, eax); /* 0x30008A8D: push eax */ 2894 ecx = ebp + (-0x58); /* 0x30008A8E: lea ecx, [ebp - 0x58] */ 2895 RECOMP_ICALL(0x30009870u); /* 0x30008A91: call 0x30009870 */ /* not lifted */ 2896 RECOMP_FLAGS_IN(); 2897 edi = POP32_VAL(esp); /* 0x30008A96: pop edi */ 2898 /* cmp esi, eax */ /* 0x30008A97: cmp esi, eax */ 2899 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 2900 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2901 _flag_k = FK_CMP; 2902 esi = POP32_VAL(esp); /* 0x30008A99: pop esi */ 2903 ebx = POP32_VAL(esp); /* 0x30008A9A: pop ebx */ 2904 if (CMP_NE(_flag_a, _flag_b)) goto L_30008AB5; /* 0x30008A9B: jne 0x30008ab5 */ 2905 L_30008A9D: 2906 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x30008A9D: fld dword ptr [ebp + 0xc] */ 2907 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3001E27C)); /* 0x30008AA0: fcomp dword ptr [0x3001e27c] */ 2908 fp_pop(); 2909 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x30008AA6: fnstsw ax */ 2910 /* test HI8(eax), 0x41u */ /* 0x30008AA8: test ah, 0x41 */ 2911 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 2912 _cf = 0; 2913 _flag_k = FK_NARROW(FK_TEST, 24); 2914 if (TEST_NZ(_flag_a, _flag_b)) goto L_30008ACF; /* 0x30008AAB: jne 0x30008acf */ 2915 L_30008AAD: 2916 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 2917 SET_LO8(eax, 0); /* 0x30008AAD: xor al, al */ 2918 _cf = 0; 2919 _flag_k = FK_NARROW(FK_TEST, 24); 2920 esp = ebp; /* 0x30008AAF: mov esp, ebp */ 2921 ebp = POP32_VAL(esp); /* 0x30008AB1: pop ebp */ 2922 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30008AB2: ret 0xc */ 2923 L_30008AB5: 2924 fp_push(*(float*)&MEM32(0x3001E27C)); /* 0x30008AB5: fld dword ptr [0x3001e27c] */ 2925 _st[0] = -_st[0]; /* 0x30008ABB: fchs */ 2926 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0xC)); /* 0x30008ABD: fcomp dword ptr [ebp + 0xc] */ 2927 fp_pop(); 2928 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x30008AC0: fnstsw ax */ 2929 /* test HI8(eax), 0x41u */ /* 0x30008AC2: test ah, 0x41 */ 2930 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 2931 _cf = 0; 2932 _flag_k = FK_NARROW(FK_TEST, 24); 2933 if (TEST_NZ(_flag_a, _flag_b)) goto L_30008ACF; /* 0x30008AC5: jne 0x30008acf */ 2934 L_30008AC7: 2935 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 2936 SET_LO8(eax, 0); /* 0x30008AC7: xor al, al */ 2937 _cf = 0; 2938 _flag_k = FK_NARROW(FK_TEST, 24); 2939 esp = ebp; /* 0x30008AC9: mov esp, ebp */ 2940 ebp = POP32_VAL(esp); /* 0x30008ACB: pop ebp */ 2941 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30008ACC: ret 0xc */ 2942 L_30008ACF: 2943 SET_LO8(eax, 1); /* 0x30008ACF: mov al, 1 */ 2944 esp = ebp; /* 0x30008AD1: mov esp, ebp */ 2945 ebp = POP32_VAL(esp); /* 0x30008AD3: pop ebp */ 2946 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30008AD4: ret 0xc */ 2947 RECOMP_REGS_OUT(); 2948 } 2949 2950 void sub_30008AE0(void) { 2951 int _fpu_cmp = 0; 2952 uint32_t _cf = 0; 2953 int _df = 1; 2954 uint32_t _flag_k = FK_NONE; 2955 uint32_t _flag_a = 0, _flag_b = 0; 2956 uint32_t _itail_tgt = 0; 2957 RECOMP_REGS_LOCALS 2958 RECOMP_ENTER(0x30008AE0u); 2959 2960 L_30008AE0: 2961 PUSH32(esp, ebp); /* 0x30008AE0: push ebp */ 2962 ebp = esp; /* 0x30008AE1: mov ebp, esp */ 2963 PUSH32(esp, ebx); /* 0x30008AE3: push ebx */ 2964 ebx = MEM32(ebp + 0x8); /* 0x30008AE4: mov ebx, dword ptr [ebp + 8] */ 2965 PUSH32(esp, esi); /* 0x30008AE7: push esi */ 2966 PUSH32(esp, edi); /* 0x30008AE8: push edi */ 2967 edi = ecx; /* 0x30008AE9: mov edi, ecx */ 2968 eax = MEM32(edi + 0x4); /* 0x30008AEB: mov eax, dword ptr [edi + 4] */ 2969 PUSH32(esp, eax); /* 0x30008AEE: push eax */ 2970 ecx = ebx; /* 0x30008AEF: mov ecx, ebx */ 2971 RECOMP_ICALL(MEM32(0x30019078)); /* 0x30008AF1: call dword ptr [0x30019078] */ 2972 RECOMP_FLAGS_IN(); 2973 eax = MEM32(edi + 0x4); /* 0x30008AF7: mov eax, dword ptr [edi + 4] */ 2974 esi = MEM32(edi); /* 0x30008AFA: mov esi, dword ptr [edi] */ 2975 ecx = eax + eax * 2; /* 0x30008AFC: lea ecx, [eax + eax*2] */ 2976 edx = esi + ecx * 4; /* 0x30008AFF: lea edx, [esi + ecx*4] */ 2977 /* cmp esi, edx */ /* 0x30008B02: cmp esi, edx */ 2978 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx); 2979 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2980 _flag_k = FK_CMP; 2981 if (CMP_EQ(_flag_a, _flag_b)) goto L_30008B3B; /* 0x30008B04: je 0x30008b3b */ 2982 L_30008B06: 2983 eax = MEM32(esi); /* 0x30008B06: mov eax, dword ptr [esi] */ 2984 PUSH32(esp, eax); /* 0x30008B08: push eax */ 2985 ecx = ebx; /* 0x30008B09: mov ecx, ebx */ 2986 RECOMP_ICALL(MEM32(0x30019090)); /* 0x30008B0B: call dword ptr [0x30019090] */ 2987 RECOMP_FLAGS_IN(); 2988 ecx = MEM32(esi + 0x4); /* 0x30008B11: mov ecx, dword ptr [esi + 4] */ 2989 PUSH32(esp, ecx); /* 0x30008B14: push ecx */ 2990 ecx = ebx; /* 0x30008B15: mov ecx, ebx */ 2991 RECOMP_ICALL(MEM32(0x30019090)); /* 0x30008B17: call dword ptr [0x30019090] */ 2992 RECOMP_FLAGS_IN(); 2993 edx = MEM32(esi + 0x8); /* 0x30008B1D: mov edx, dword ptr [esi + 8] */ 2994 PUSH32(esp, edx); /* 0x30008B20: push edx */ 2995 ecx = ebx; /* 0x30008B21: mov ecx, ebx */ 2996 RECOMP_ICALL(MEM32(0x30019090)); /* 0x30008B23: call dword ptr [0x30019090] */ 2997 RECOMP_FLAGS_IN(); 2998 eax = MEM32(edi + 0x4); /* 0x30008B29: mov eax, dword ptr [edi + 4] */ 2999 ecx = MEM32(edi); /* 0x30008B2C: mov ecx, dword ptr [edi] */ 3000 eax = eax + eax * 2; /* 0x30008B2E: lea eax, [eax + eax*2] */ 3001 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0xCu); 3002 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3003 esi = esi + 0xCu; /* 0x30008B31: add esi, 0xc */ 3004 _flag_k = FK_ADD; 3005 edx = ecx + eax * 4; /* 0x30008B34: lea edx, [ecx + eax*4] */ 3006 /* cmp esi, edx */ /* 0x30008B37: cmp esi, edx */ 3007 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx); 3008 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3009 _flag_k = FK_CMP; 3010 RECOMP_BACKEDGE(); 3011 if (CMP_NE(_flag_a, _flag_b)) goto L_30008B06; /* 0x30008B39: jne 0x30008b06 */ 3012 L_30008B3B: 3013 edi = POP32_VAL(esp); /* 0x30008B3B: pop edi */ 3014 esi = POP32_VAL(esp); /* 0x30008B3C: pop esi */ 3015 ebx = POP32_VAL(esp); /* 0x30008B3D: pop ebx */ 3016 ebp = POP32_VAL(esp); /* 0x30008B3E: pop ebp */ 3017 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30008B3F: ret 4 */ 3018 RECOMP_REGS_OUT(); 3019 } 3020 3021 void sub_30008B50(void) { 3022 int _fpu_cmp = 0; 3023 uint32_t _cf = 0; 3024 int _df = 1; 3025 uint32_t _flag_k = FK_NONE; 3026 uint32_t _flag_a = 0, _flag_b = 0; 3027 uint32_t _itail_tgt = 0; 3028 RECOMP_REGS_LOCALS 3029 RECOMP_ENTER(0x30008B50u); 3030 3031 L_30008B50: 3032 PUSH32(esp, ebp); /* 0x30008B50: push ebp */ 3033 ebp = esp; /* 0x30008B51: mov ebp, esp */ 3034 PUSH32(esp, 0xFFFFFFFFu); /* 0x30008B53: push -1 */ 3035 PUSH32(esp, 0x3001875Bu); /* 0x30008B55: push 0x3001875b */ 3036 eax = MEM32(FS_BASE + (0)); /* 0x30008B5A: mov eax, dword ptr fs:[0] */ 3037 PUSH32(esp, eax); /* 0x30008B60: push eax */ 3038 MEM32(FS_BASE + (0)) = esp; /* 0x30008B61: mov dword ptr fs:[0], esp */ 3039 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u); 3040 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3041 esp = esp - 0x18u; /* 0x30008B68: sub esp, 0x18 */ 3042 _flag_k = FK_CMP; 3043 PUSH32(esp, ebx); /* 0x30008B6B: push ebx */ 3044 PUSH32(esp, esi); /* 0x30008B6C: push esi */ 3045 ebx = ecx; /* 0x30008B6D: mov ebx, ecx */ 3046 eax = MEM32(ebx); /* 0x30008B6F: mov eax, dword ptr [ebx] */ 3047 PUSH32(esp, edi); /* 0x30008B71: push edi */ 3048 PUSH32(esp, eax); /* 0x30008B72: push eax */ 3049 RECOMP_ICALL(0x30018080u); /* 0x30008B73: call 0x30018080 */ /* not lifted */ 3050 RECOMP_FLAGS_IN(); 3051 edi = MEM32(ebp + 0x8); /* 0x30008B78: mov edi, dword ptr [ebp + 8] */ 3052 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3053 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3054 esp = esp + 4; /* 0x30008B7B: add esp, 4 */ 3055 _flag_k = FK_ADD; 3056 eax = ebp + (-0x10); /* 0x30008B7E: lea eax, [ebp - 0x10] */ 3057 PUSH32(esp, eax); /* 0x30008B81: push eax */ 3058 ecx = edi; /* 0x30008B82: mov ecx, edi */ 3059 RECOMP_ICALL(MEM32(0x30019098)); /* 0x30008B84: call dword ptr [0x30019098] */ 3060 RECOMP_FLAGS_IN(); 3061 eax = MEM32(ebp + (-0x10)); /* 0x30008B8A: mov eax, dword ptr [ebp - 0x10] */ 3062 ecx = eax + eax * 2; /* 0x30008B8D: lea ecx, [eax + eax*2] */ 3063 if (2u) _cf = (((ecx) >> 30) & 1u); /* 0x30008B90: shl ecx, 2 */ 3064 if (2u) { _flag_a = recomp_flags_pack((ecx << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 3065 ecx = ecx << 2u; /* 0x30008B90: shl ecx, 2 */ 3066 PUSH32(esp, ecx); /* 0x30008B93: push ecx */ 3067 MEM32(ebp + (-0x14)) = eax; /* 0x30008B94: mov dword ptr [ebp - 0x14], eax */ 3068 RECOMP_ICALL(0x300180A8u); /* 0x30008B97: call 0x300180a8 */ /* not lifted */ 3069 RECOMP_FLAGS_IN(); 3070 esi = eax; /* 0x30008B9C: mov esi, eax */ 3071 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3072 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3073 esp = esp + 4; /* 0x30008B9E: add esp, 4 */ 3074 _flag_k = FK_ADD; 3075 MEM32(ebp + (-0x18)) = esi; /* 0x30008BA1: mov dword ptr [ebp - 0x18], esi */ 3076 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3077 ecx = 0; /* 0x30008BA4: xor ecx, ecx */ 3078 _cf = 0; 3079 _flag_k = FK_TEST; 3080 /* cmp esi, ecx */ /* 0x30008BA6: cmp esi, ecx */ 3081 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 3082 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3083 _flag_k = FK_CMP; 3084 MEM32(ebp + (-0x4)) = ecx; /* 0x30008BA8: mov dword ptr [ebp - 4], ecx */ 3085 if (CMP_EQ(_flag_a, _flag_b)) goto L_30008BDD; /* 0x30008BAB: je 0x30008bdd */ 3086 L_30008BAD: 3087 edx = MEM32(ebp + (-0x14)); /* 0x30008BAD: mov edx, dword ptr [ebp - 0x14] */ 3088 eax = edx + (-0x1); /* 0x30008BB0: lea eax, [edx - 1] */ 3089 /* cmp eax, ecx */ /* 0x30008BB3: cmp eax, ecx */ 3090 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 3091 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3092 _flag_k = FK_CMP; 3093 MEM32(ebp + 0x8) = esi; /* 0x30008BB5: mov dword ptr [ebp + 8], esi */ 3094 if (CMP_L(_flag_a, _flag_b)) goto L_30008BDF; /* 0x30008BB8: jl 0x30008bdf */ 3095 L_30008BBA: 3096 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 3097 eax = eax + 1; /* 0x30008BBA: inc eax */ 3098 _flag_k = FK_INC; 3099 MEM32(ebp + (-0x14)) = eax; /* 0x30008BBB: mov dword ptr [ebp - 0x14], eax */ 3100 L_30008BBE: 3101 ecx = MEM32(ebp + 0x8); /* 0x30008BBE: mov ecx, dword ptr [ebp + 8] */ 3102 RECOMP_ICALL(MEM32(0x300190E4)); /* 0x30008BC1: call dword ptr [0x300190e4] */ 3103 RECOMP_FLAGS_IN(); 3104 ecx = MEM32(ebp + 0x8); /* 0x30008BC7: mov ecx, dword ptr [ebp + 8] */ 3105 eax = MEM32(ebp + (-0x14)); /* 0x30008BCA: mov eax, dword ptr [ebp - 0x14] */ 3106 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xCu); 3107 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3108 ecx = ecx + 0xCu; /* 0x30008BCD: add ecx, 0xc */ 3109 _flag_k = FK_ADD; 3110 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 3111 eax = eax - 1; /* 0x30008BD0: dec eax */ 3112 _flag_k = FK_DEC; 3113 MEM32(ebp + 0x8) = ecx; /* 0x30008BD1: mov dword ptr [ebp + 8], ecx */ 3114 MEM32(ebp + (-0x14)) = eax; /* 0x30008BD4: mov dword ptr [ebp - 0x14], eax */ 3115 RECOMP_BACKEDGE(); 3116 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_30008BBE; /* 0x30008BD7: jne 0x30008bbe */ 3117 L_30008BD9: 3118 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3119 ecx = 0; /* 0x30008BD9: xor ecx, ecx */ 3120 _cf = 0; 3121 _flag_k = FK_TEST; 3122 goto L_30008BDF; /* 0x30008BDB: jmp 0x30008bdf */ 3123 L_30008BDD: 3124 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3125 esi = 0; /* 0x30008BDD: xor esi, esi */ 3126 _cf = 0; 3127 _flag_k = FK_TEST; 3128 L_30008BDF: 3129 /* cmp esi, ecx */ /* 0x30008BDF: cmp esi, ecx */ 3130 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 3131 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3132 _flag_k = FK_CMP; 3133 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x30008BE1: mov dword ptr [ebp - 4], 0xffffffff */ 3134 MEM32(ebx) = esi; /* 0x30008BE8: mov dword ptr [ebx], esi */ 3135 if (CMP_NE(_flag_a, _flag_b)) goto L_30008C02; /* 0x30008BEA: jne 0x30008c02 */ 3136 L_30008BEC: 3137 edi = POP32_VAL(esp); /* 0x30008BEC: pop edi */ 3138 esi = POP32_VAL(esp); /* 0x30008BED: pop esi */ 3139 MEM32(ebx + 0x4) = ecx; /* 0x30008BEE: mov dword ptr [ebx + 4], ecx */ 3140 ebx = POP32_VAL(esp); /* 0x30008BF1: pop ebx */ 3141 ecx = MEM32(ebp + (-0xC)); /* 0x30008BF2: mov ecx, dword ptr [ebp - 0xc] */ 3142 MEM32(FS_BASE + (0)) = ecx; /* 0x30008BF5: mov dword ptr fs:[0], ecx */ 3143 esp = ebp; /* 0x30008BFC: mov esp, ebp */ 3144 ebp = POP32_VAL(esp); /* 0x30008BFE: pop ebp */ 3145 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30008BFF: ret 4 */ 3146 L_30008C02: 3147 eax = MEM32(ebp + (-0x10)); /* 0x30008C02: mov eax, dword ptr [ebp - 0x10] */ 3148 /* cmp eax, ecx */ /* 0x30008C05: cmp eax, ecx */ 3149 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 3150 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3151 _flag_k = FK_CMP; 3152 MEM32(ebx + 0x4) = eax; /* 0x30008C07: mov dword ptr [ebx + 4], eax */ 3153 MEM32(ebp + 0x8) = ecx; /* 0x30008C0A: mov dword ptr [ebp + 8], ecx */ 3154 if (CMP_LE(_flag_a, _flag_b)) goto L_30008C71; /* 0x30008C0D: jle 0x30008c71 */ 3155 L_30008C0F: 3156 esi = MEM32(0x3001909C); /* 0x30008C0F: mov esi, dword ptr [0x3001909c] */ 3157 MEM32(ebp + (-0x14)) = ecx; /* 0x30008C15: mov dword ptr [ebp - 0x14], ecx */ 3158 L_30008C18: 3159 eax = ebp + (-0x24); /* 0x30008C18: lea eax, [ebp - 0x24] */ 3160 PUSH32(esp, eax); /* 0x30008C1B: push eax */ 3161 ecx = edi; /* 0x30008C1C: mov ecx, edi */ 3162 MEM32(ebp + (-0x24)) = 0; /* 0x30008C1E: mov dword ptr [ebp - 0x24], 0 */ 3163 MEM32(ebp + (-0x20)) = 0; /* 0x30008C25: mov dword ptr [ebp - 0x20], 0 */ 3164 MEM32(ebp + (-0x1C)) = 0; /* 0x30008C2C: mov dword ptr [ebp - 0x1c], 0 */ 3165 RECOMP_ICALL(esi); /* 0x30008C33: call esi */ 3166 RECOMP_FLAGS_IN(); 3167 ecx = ebp + (-0x20); /* 0x30008C35: lea ecx, [ebp - 0x20] */ 3168 PUSH32(esp, ecx); /* 0x30008C38: push ecx */ 3169 ecx = edi; /* 0x30008C39: mov ecx, edi */ 3170 RECOMP_ICALL(esi); /* 0x30008C3B: call esi */ 3171 RECOMP_FLAGS_IN(); 3172 edx = ebp + (-0x1C); /* 0x30008C3D: lea edx, [ebp - 0x1c] */ 3173 PUSH32(esp, edx); /* 0x30008C40: push edx */ 3174 ecx = edi; /* 0x30008C41: mov ecx, edi */ 3175 RECOMP_ICALL(esi); /* 0x30008C43: call esi */ 3176 RECOMP_FLAGS_IN(); 3177 ecx = MEM32(ebp + (-0x14)); /* 0x30008C45: mov ecx, dword ptr [ebp - 0x14] */ 3178 edx = MEM32(ebx); /* 0x30008C48: mov edx, dword ptr [ebx] */ 3179 eax = ecx; /* 0x30008C4A: mov eax, ecx */ 3180 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 3181 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3182 eax = eax + edx; /* 0x30008C4C: add eax, edx */ 3183 _flag_k = FK_ADD; 3184 edx = MEM32(ebp + (-0x24)); /* 0x30008C4E: mov edx, dword ptr [ebp - 0x24] */ 3185 MEM32(eax) = edx; /* 0x30008C51: mov dword ptr [eax], edx */ 3186 edx = MEM32(ebp + (-0x20)); /* 0x30008C53: mov edx, dword ptr [ebp - 0x20] */ 3187 MEM32(eax + 0x4) = edx; /* 0x30008C56: mov dword ptr [eax + 4], edx */ 3188 edx = MEM32(ebp + (-0x1C)); /* 0x30008C59: mov edx, dword ptr [ebp - 0x1c] */ 3189 MEM32(eax + 0x8) = edx; /* 0x30008C5C: mov dword ptr [eax + 8], edx */ 3190 eax = MEM32(ebp + 0x8); /* 0x30008C5F: mov eax, dword ptr [ebp + 8] */ 3191 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xCu); 3192 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3193 ecx = ecx + 0xCu; /* 0x30008C62: add ecx, 0xc */ 3194 _flag_k = FK_ADD; 3195 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 3196 eax = eax + 1; /* 0x30008C65: inc eax */ 3197 _flag_k = FK_INC; 3198 MEM32(ebp + (-0x14)) = ecx; /* 0x30008C66: mov dword ptr [ebp - 0x14], ecx */ 3199 /* cmp eax, MEM32(ebp + (-0x10)) */ /* 0x30008C69: cmp eax, dword ptr [ebp - 0x10] */ 3200 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ebp + (-0x10))); 3201 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3202 _flag_k = FK_CMP; 3203 MEM32(ebp + 0x8) = eax; /* 0x30008C6C: mov dword ptr [ebp + 8], eax */ 3204 RECOMP_BACKEDGE(); 3205 if (CMP_L(_flag_a, _flag_b)) goto L_30008C18; /* 0x30008C6F: jl 0x30008c18 */ 3206 L_30008C71: 3207 ecx = MEM32(ebp + (-0xC)); /* 0x30008C71: mov ecx, dword ptr [ebp - 0xc] */ 3208 edi = POP32_VAL(esp); /* 0x30008C74: pop edi */ 3209 esi = POP32_VAL(esp); /* 0x30008C75: pop esi */ 3210 ebx = POP32_VAL(esp); /* 0x30008C76: pop ebx */ 3211 MEM32(FS_BASE + (0)) = ecx; /* 0x30008C77: mov dword ptr fs:[0], ecx */ 3212 esp = ebp; /* 0x30008C7E: mov esp, ebp */ 3213 ebp = POP32_VAL(esp); /* 0x30008C80: pop ebp */ 3214 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30008C81: ret 4 */ 3215 RECOMP_REGS_OUT(); 3216 } 3217 3218 void sub_30008C90(void) { 3219 int _fpu_cmp = 0; 3220 uint32_t _cf = 0; 3221 int _df = 1; 3222 uint32_t _flag_k = FK_NONE; 3223 uint32_t _flag_a = 0, _flag_b = 0; 3224 uint32_t _itail_tgt = 0; 3225 RECOMP_REGS_LOCALS 3226 RECOMP_ENTER(0x30008C90u); 3227 3228 L_30008C90: 3229 RECOMP_ICALL(0x30008CA0u); /* 0x30008C90: call 0x30008ca0 */ /* not lifted */ 3230 RECOMP_FLAGS_IN(); 3231 goto L_30008CB0; /* 0x30008C95: jmp 0x30008cb0 */ 3232 L_30008CB0: 3233 PUSH32(esp, 0x30008CC0u); /* 0x30008CB0: push 0x30008cc0 */ 3234 RECOMP_ICALL(0x300180ECu); /* 0x30008CB5: call 0x300180ec */ /* not lifted */ 3235 RECOMP_FLAGS_IN(); 3236 ecx = POP32_VAL(esp); /* 0x30008CBA: pop ecx */ 3237 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30008CBB: ret */ 3238 RECOMP_REGS_OUT(); 3239 } 3240 3241 void sub_30008CA0(void) { 3242 int _fpu_cmp = 0; 3243 uint32_t _cf = 0; 3244 int _df = 1; 3245 uint32_t _flag_k = FK_NONE; 3246 uint32_t _flag_a = 0, _flag_b = 0; 3247 uint32_t _itail_tgt = 0; 3248 RECOMP_REGS_LOCALS 3249 RECOMP_ENTER(0x30008CA0u); 3250 3251 L_30008CA0: 3252 ecx = 0x3001E3D9u; /* 0x30008CA0: mov ecx, 0x3001e3d9 */ 3253 L_30008CA5: 3254 { _itail_tgt = (uint32_t)(MEM32(0x30019018)); goto _ljump; } 3255 { RECOMP_REGS_OUT(); return; } /* end of function */ 3256 _ljump: 3257 switch (_itail_tgt) { 3258 case 0x30008CA0u: goto L_30008CA0; 3259 case 0x30008CA5u: goto L_30008CA5; 3260 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 3261 } 3262 RECOMP_REGS_OUT(); 3263 } 3264 3265 void sub_30008CB0(void) { 3266 int _fpu_cmp = 0; 3267 uint32_t _cf = 0; 3268 int _df = 1; 3269 uint32_t _flag_k = FK_NONE; 3270 uint32_t _flag_a = 0, _flag_b = 0; 3271 uint32_t _itail_tgt = 0; 3272 RECOMP_REGS_LOCALS 3273 RECOMP_ENTER(0x30008CB0u); 3274 3275 L_30008CB0: 3276 PUSH32(esp, 0x30008CC0u); /* 0x30008CB0: push 0x30008cc0 */ 3277 RECOMP_ICALL(0x300180ECu); /* 0x30008CB5: call 0x300180ec */ /* not lifted */ 3278 RECOMP_FLAGS_IN(); 3279 ecx = POP32_VAL(esp); /* 0x30008CBA: pop ecx */ 3280 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30008CBB: ret */ 3281 RECOMP_REGS_OUT(); 3282 } 3283 3284 void sub_30008CC0(void) { 3285 int _fpu_cmp = 0; 3286 uint32_t _cf = 0; 3287 int _df = 1; 3288 uint32_t _flag_k = FK_NONE; 3289 uint32_t _flag_a = 0, _flag_b = 0; 3290 uint32_t _itail_tgt = 0; 3291 RECOMP_REGS_LOCALS 3292 RECOMP_ENTER(0x30008CC0u); 3293 3294 L_30008CC0: 3295 ecx = 0x3001E3D9u; /* 0x30008CC0: mov ecx, 0x3001e3d9 */ 3296 L_30008CC5: 3297 { _itail_tgt = (uint32_t)(MEM32(0x3001901C)); goto _ljump; } 3298 { RECOMP_REGS_OUT(); return; } /* end of function */ 3299 _ljump: 3300 switch (_itail_tgt) { 3301 case 0x30008CC0u: goto L_30008CC0; 3302 case 0x30008CC5u: goto L_30008CC5; 3303 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 3304 } 3305 RECOMP_REGS_OUT(); 3306 } 3307 3308 void sub_30008CD0(void) { 3309 int _fpu_cmp = 0; 3310 uint32_t _cf = 0; 3311 int _df = 1; 3312 uint32_t _flag_k = FK_NONE; 3313 uint32_t _flag_a = 0, _flag_b = 0; 3314 uint32_t _itail_tgt = 0; 3315 RECOMP_REGS_LOCALS 3316 RECOMP_ENTER(0x30008CD0u); 3317 3318 L_30008CD0: 3319 RECOMP_ICALL(0x30008CE0u); /* 0x30008CD0: call 0x30008ce0 */ /* not lifted */ 3320 RECOMP_FLAGS_IN(); 3321 goto L_30008CF0; /* 0x30008CD5: jmp 0x30008cf0 */ 3322 L_30008CF0: 3323 PUSH32(esp, 0x30008D00u); /* 0x30008CF0: push 0x30008d00 */ 3324 RECOMP_ICALL(0x300180ECu); /* 0x30008CF5: call 0x300180ec */ /* not lifted */ 3325 RECOMP_FLAGS_IN(); 3326 ecx = POP32_VAL(esp); /* 0x30008CFA: pop ecx */ 3327 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30008CFB: ret */ 3328 RECOMP_REGS_OUT(); 3329 } 3330 3331 void sub_30008CE0(void) { 3332 int _fpu_cmp = 0; 3333 uint32_t _cf = 0; 3334 int _df = 1; 3335 uint32_t _flag_k = FK_NONE; 3336 uint32_t _flag_a = 0, _flag_b = 0; 3337 uint32_t _itail_tgt = 0; 3338 RECOMP_REGS_LOCALS 3339 RECOMP_ENTER(0x30008CE0u); 3340 3341 L_30008CE0: 3342 ecx = 0x3001E3D8u; /* 0x30008CE0: mov ecx, 0x3001e3d8 */ 3343 L_30008CE5: 3344 { _itail_tgt = (uint32_t)(MEM32(0x30019020)); goto _ljump; } 3345 { RECOMP_REGS_OUT(); return; } /* end of function */ 3346 _ljump: 3347 switch (_itail_tgt) { 3348 case 0x30008CE0u: goto L_30008CE0; 3349 case 0x30008CE5u: goto L_30008CE5; 3350 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 3351 } 3352 RECOMP_REGS_OUT(); 3353 } 3354 3355 void sub_30008CF0(void) { 3356 int _fpu_cmp = 0; 3357 uint32_t _cf = 0; 3358 int _df = 1; 3359 uint32_t _flag_k = FK_NONE; 3360 uint32_t _flag_a = 0, _flag_b = 0; 3361 uint32_t _itail_tgt = 0; 3362 RECOMP_REGS_LOCALS 3363 RECOMP_ENTER(0x30008CF0u); 3364 3365 L_30008CF0: 3366 PUSH32(esp, 0x30008D00u); /* 0x30008CF0: push 0x30008d00 */ 3367 RECOMP_ICALL(0x300180ECu); /* 0x30008CF5: call 0x300180ec */ /* not lifted */ 3368 RECOMP_FLAGS_IN(); 3369 ecx = POP32_VAL(esp); /* 0x30008CFA: pop ecx */ 3370 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30008CFB: ret */ 3371 RECOMP_REGS_OUT(); 3372 } 3373 3374 void sub_30008D00(void) { 3375 int _fpu_cmp = 0; 3376 uint32_t _cf = 0; 3377 int _df = 1; 3378 uint32_t _flag_k = FK_NONE; 3379 uint32_t _flag_a = 0, _flag_b = 0; 3380 uint32_t _itail_tgt = 0; 3381 RECOMP_REGS_LOCALS 3382 RECOMP_ENTER(0x30008D00u); 3383 3384 L_30008D00: 3385 ecx = 0x3001E3D8u; /* 0x30008D00: mov ecx, 0x3001e3d8 */ 3386 L_30008D05: 3387 { _itail_tgt = (uint32_t)(MEM32(0x30019024)); goto _ljump; } 3388 { RECOMP_REGS_OUT(); return; } /* end of function */ 3389 _ljump: 3390 switch (_itail_tgt) { 3391 case 0x30008D00u: goto L_30008D00; 3392 case 0x30008D05u: goto L_30008D05; 3393 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 3394 } 3395 RECOMP_REGS_OUT(); 3396 } 3397 3398 void sub_30008D10(void) { 3399 int _fpu_cmp = 0; 3400 uint32_t _cf = 0; 3401 int _df = 1; 3402 uint32_t _flag_k = FK_NONE; 3403 uint32_t _flag_a = 0, _flag_b = 0; 3404 uint32_t _itail_tgt = 0; 3405 RECOMP_REGS_LOCALS 3406 RECOMP_ENTER(0x30008D10u); 3407 3408 L_30008D10: 3409 PUSH32(esp, ebp); /* 0x30008D10: push ebp */ 3410 ebp = esp; /* 0x30008D11: mov ebp, esp */ 3411 eax = ecx; /* 0x30008D13: mov eax, ecx */ 3412 ecx = MEM32(ebp + 0x8); /* 0x30008D15: mov ecx, dword ptr [ebp + 8] */ 3413 MEM32(eax) = 0x30019244u; /* 0x30008D18: mov dword ptr [eax], 0x30019244 */ 3414 edx = MEM32(ecx + 0x4); /* 0x30008D1E: mov edx, dword ptr [ecx + 4] */ 3415 MEM32(eax + 0x4) = edx; /* 0x30008D21: mov dword ptr [eax + 4], edx */ 3416 MEM32(eax) = 0x30019238u; /* 0x30008D24: mov dword ptr [eax], 0x30019238 */ 3417 ebp = POP32_VAL(esp); /* 0x30008D2A: pop ebp */ 3418 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30008D2B: ret 4 */ 3419 RECOMP_REGS_OUT(); 3420 } 3421 3422 void sub_30008D30(void) { 3423 int _fpu_cmp = 0; 3424 uint32_t _cf = 0; 3425 int _df = 1; 3426 uint32_t _flag_k = FK_NONE; 3427 uint32_t _flag_a = 0, _flag_b = 0; 3428 uint32_t _itail_tgt = 0; 3429 RECOMP_REGS_LOCALS 3430 RECOMP_ENTER(0x30008D30u); 3431 3432 L_30008D30: 3433 PUSH32(esp, ebp); /* 0x30008D30: push ebp */ 3434 ebp = esp; /* 0x30008D31: mov ebp, esp */ 3435 eax = ecx; /* 0x30008D33: mov eax, ecx */ 3436 ecx = MEM32(ebp + 0x8); /* 0x30008D35: mov ecx, dword ptr [ebp + 8] */ 3437 edx = MEM32(ecx + 0x4); /* 0x30008D38: mov edx, dword ptr [ecx + 4] */ 3438 MEM32(eax + 0x4) = edx; /* 0x30008D3B: mov dword ptr [eax + 4], edx */ 3439 ebp = POP32_VAL(esp); /* 0x30008D3E: pop ebp */ 3440 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30008D3F: ret 4 */ 3441 RECOMP_REGS_OUT(); 3442 } 3443 3444 void sub_30008D50(void) { 3445 int _fpu_cmp = 0; 3446 uint32_t _cf = 0; 3447 int _df = 1; 3448 uint32_t _flag_k = FK_NONE; 3449 uint32_t _flag_a = 0, _flag_b = 0; 3450 uint32_t _itail_tgt = 0; 3451 RECOMP_REGS_LOCALS 3452 RECOMP_ENTER(0x30008D50u); 3453 3454 L_30008D50: 3455 PUSH32(esp, ebp); /* 0x30008D50: push ebp */ 3456 ebp = esp; /* 0x30008D51: mov ebp, esp */ 3457 PUSH32(esp, ebx); /* 0x30008D53: push ebx */ 3458 SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x30008D54: mov bl, byte ptr [ebp + 8] */ 3459 /* test LO8(ebx), 2 */ /* 0x30008D57: test bl, 2 */ 3460 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 3461 _cf = 0; 3462 _flag_k = FK_NARROW(FK_TEST, 24); 3463 PUSH32(esp, esi); /* 0x30008D5A: push esi */ 3464 esi = ecx; /* 0x30008D5B: mov esi, ecx */ 3465 if (TEST_Z(_flag_a, _flag_b)) goto L_30008D8B; /* 0x30008D5D: je 0x30008d8b */ 3466 L_30008D5F: 3467 eax = MEM32(esi + (-0x4)); /* 0x30008D5F: mov eax, dword ptr [esi - 4] */ 3468 PUSH32(esp, edi); /* 0x30008D62: push edi */ 3469 PUSH32(esp, 0x30008E00u); /* 0x30008D63: push 0x30008e00 */ 3470 edi = esi + (-0x4); /* 0x30008D68: lea edi, [esi - 4] */ 3471 PUSH32(esp, eax); /* 0x30008D6B: push eax */ 3472 PUSH32(esp, 8); /* 0x30008D6C: push 8 */ 3473 PUSH32(esp, esi); /* 0x30008D6E: push esi */ 3474 RECOMP_ICALL(0x300180FEu); /* 0x30008D6F: call 0x300180fe */ /* not lifted */ 3475 RECOMP_FLAGS_IN(); 3476 /* test LO8(ebx), 1 */ /* 0x30008D74: test bl, 1 */ 3477 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 3478 _cf = 0; 3479 _flag_k = FK_NARROW(FK_TEST, 24); 3480 if (TEST_Z(_flag_a, _flag_b)) goto L_30008D82; /* 0x30008D77: je 0x30008d82 */ 3481 L_30008D79: 3482 PUSH32(esp, edi); /* 0x30008D79: push edi */ 3483 RECOMP_ICALL(0x30018080u); /* 0x30008D7A: call 0x30018080 */ /* not lifted */ 3484 RECOMP_FLAGS_IN(); 3485 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3486 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3487 esp = esp + 4; /* 0x30008D7F: add esp, 4 */ 3488 _flag_k = FK_ADD; 3489 L_30008D82: 3490 eax = edi; /* 0x30008D82: mov eax, edi */ 3491 edi = POP32_VAL(esp); /* 0x30008D84: pop edi */ 3492 esi = POP32_VAL(esp); /* 0x30008D85: pop esi */ 3493 ebx = POP32_VAL(esp); /* 0x30008D86: pop ebx */ 3494 ebp = POP32_VAL(esp); /* 0x30008D87: pop ebp */ 3495 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30008D88: ret 4 */ 3496 L_30008D8B: 3497 ecx = esi; /* 0x30008D8B: mov ecx, esi */ 3498 RECOMP_ICALL(0x30008E00u); /* 0x30008D8D: call 0x30008e00 */ /* not lifted */ 3499 RECOMP_FLAGS_IN(); 3500 /* test LO8(ebx), 1 */ /* 0x30008D92: test bl, 1 */ 3501 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 3502 _cf = 0; 3503 _flag_k = FK_NARROW(FK_TEST, 24); 3504 if (TEST_Z(_flag_a, _flag_b)) goto L_30008DA0; /* 0x30008D95: je 0x30008da0 */ 3505 L_30008D97: 3506 PUSH32(esp, esi); /* 0x30008D97: push esi */ 3507 RECOMP_ICALL(0x30018080u); /* 0x30008D98: call 0x30018080 */ /* not lifted */ 3508 RECOMP_FLAGS_IN(); 3509 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3510 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3511 esp = esp + 4; /* 0x30008D9D: add esp, 4 */ 3512 _flag_k = FK_ADD; 3513 L_30008DA0: 3514 eax = esi; /* 0x30008DA0: mov eax, esi */ 3515 esi = POP32_VAL(esp); /* 0x30008DA2: pop esi */ 3516 ebx = POP32_VAL(esp); /* 0x30008DA3: pop ebx */ 3517 ebp = POP32_VAL(esp); /* 0x30008DA4: pop ebp */ 3518 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30008DA5: ret 4 */ 3519 RECOMP_REGS_OUT(); 3520 } 3521 3522 void sub_30008DB0(void) { 3523 int _fpu_cmp = 0; 3524 uint32_t _cf = 0; 3525 int _df = 1; 3526 uint32_t _flag_k = FK_NONE; 3527 uint32_t _flag_a = 0, _flag_b = 0; 3528 uint32_t _itail_tgt = 0; 3529 RECOMP_REGS_LOCALS 3530 RECOMP_ENTER(0x30008DB0u); 3531 3532 L_30008DB0: 3533 PUSH32(esp, ebp); /* 0x30008DB0: push ebp */ 3534 ebp = esp; /* 0x30008DB1: mov ebp, esp */ 3535 PUSH32(esp, esi); /* 0x30008DB3: push esi */ 3536 PUSH32(esp, edi); /* 0x30008DB4: push edi */ 3537 edi = MEM32(ebp + 0x8); /* 0x30008DB5: mov edi, dword ptr [ebp + 8] */ 3538 esi = MEM32(edi + 0x4); /* 0x30008DB8: mov esi, dword ptr [edi + 4] */ 3539 /* cmp esi, MEM32(edi + 0x8) */ /* 0x30008DBB: cmp esi, dword ptr [edi + 8] */ 3540 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8)); 3541 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3542 _flag_k = FK_CMP; 3543 if (CMP_EQ(_flag_a, _flag_b)) goto L_30008DDF; /* 0x30008DBE: je 0x30008ddf */ 3544 L_30008DC0: 3545 PUSH32(esp, ebx); /* 0x30008DC0: push ebx */ 3546 ebx = MEM32(ebp + 0xC); /* 0x30008DC1: mov ebx, dword ptr [ebp + 0xc] */ 3547 L_30008DC4: 3548 eax = MEM32(esi); /* 0x30008DC4: mov eax, dword ptr [esi] */ 3549 PUSH32(esp, eax); /* 0x30008DC6: push eax */ 3550 ecx = ebx; /* 0x30008DC7: mov ecx, ebx */ 3551 RECOMP_ICALL(0x3000ED00u); /* 0x30008DC9: call 0x3000ed00 */ /* not lifted */ 3552 RECOMP_FLAGS_IN(); 3553 eax = MEM32(edi + 0x8); /* 0x30008DCE: mov eax, dword ptr [edi + 8] */ 3554 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u); 3555 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3556 esi = esi + 0x14u; /* 0x30008DD1: add esi, 0x14 */ 3557 _flag_k = FK_ADD; 3558 /* cmp esi, eax */ /* 0x30008DD4: cmp esi, eax */ 3559 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 3560 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3561 _flag_k = FK_CMP; 3562 RECOMP_BACKEDGE(); 3563 if (CMP_NE(_flag_a, _flag_b)) goto L_30008DC4; /* 0x30008DD6: jne 0x30008dc4 */ 3564 L_30008DD8: 3565 ebx = POP32_VAL(esp); /* 0x30008DD8: pop ebx */ 3566 edi = POP32_VAL(esp); /* 0x30008DD9: pop edi */ 3567 SET_LO8(eax, 1); /* 0x30008DDA: mov al, 1 */ 3568 esi = POP32_VAL(esp); /* 0x30008DDC: pop esi */ 3569 ebp = POP32_VAL(esp); /* 0x30008DDD: pop ebp */ 3570 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30008DDE: ret */ 3571 L_30008DDF: 3572 edi = POP32_VAL(esp); /* 0x30008DDF: pop edi */ 3573 SET_LO8(eax, 1); /* 0x30008DE0: mov al, 1 */ 3574 esi = POP32_VAL(esp); /* 0x30008DE2: pop esi */ 3575 ebp = POP32_VAL(esp); /* 0x30008DE3: pop ebp */ 3576 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30008DE4: ret */ 3577 RECOMP_REGS_OUT(); 3578 } 3579 3580 void sub_30008DF0(void) { 3581 int _fpu_cmp = 0; 3582 uint32_t _cf = 0; 3583 int _df = 1; 3584 uint32_t _flag_k = FK_NONE; 3585 uint32_t _flag_a = 0, _flag_b = 0; 3586 uint32_t _itail_tgt = 0; 3587 RECOMP_REGS_LOCALS 3588 RECOMP_ENTER(0x30008DF0u); 3589 3590 L_30008DF0: 3591 eax = ecx; /* 0x30008DF0: mov eax, ecx */ 3592 MEM32(eax + 0x4) = 0; /* 0x30008DF2: mov dword ptr [eax + 4], 0 */ 3593 MEM32(eax) = 0x30019238u; /* 0x30008DF9: mov dword ptr [eax], 0x30019238 */ 3594 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30008DFF: ret */ 3595 RECOMP_REGS_OUT(); 3596 } 3597 3598 void sub_30008E00(void) { 3599 int _fpu_cmp = 0; 3600 uint32_t _cf = 0; 3601 int _df = 1; 3602 uint32_t _flag_k = FK_NONE; 3603 uint32_t _flag_a = 0, _flag_b = 0; 3604 uint32_t _itail_tgt = 0; 3605 RECOMP_REGS_LOCALS 3606 RECOMP_ENTER(0x30008E00u); 3607 3608 L_30008E00: 3609 PUSH32(esp, esi); /* 0x30008E00: push esi */ 3610 esi = ecx; /* 0x30008E01: mov esi, ecx */ 3611 PUSH32(esp, edi); /* 0x30008E03: push edi */ 3612 edi = MEM32(esi + 0x4); /* 0x30008E04: mov edi, dword ptr [esi + 4] */ 3613 /* test edi, edi */ /* 0x30008E07: test edi, edi */ 3614 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 3615 _cf = 0; 3616 _flag_k = FK_TEST; 3617 MEM32(esi) = 0x30019238u; /* 0x30008E09: mov dword ptr [esi], 0x30019238 */ 3618 if (TEST_Z(_flag_a, _flag_b)) goto L_30008E21; /* 0x30008E0F: je 0x30008e21 */ 3619 L_30008E11: 3620 ecx = edi; /* 0x30008E11: mov ecx, edi */ 3621 RECOMP_ICALL(0x3000F910u); /* 0x30008E13: call 0x3000f910 */ /* not lifted */ 3622 RECOMP_FLAGS_IN(); 3623 PUSH32(esp, edi); /* 0x30008E18: push edi */ 3624 RECOMP_ICALL(0x30018080u); /* 0x30008E19: call 0x30018080 */ /* not lifted */ 3625 RECOMP_FLAGS_IN(); 3626 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3627 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3628 esp = esp + 4; /* 0x30008E1E: add esp, 4 */ 3629 _flag_k = FK_ADD; 3630 L_30008E21: 3631 edi = POP32_VAL(esp); /* 0x30008E21: pop edi */ 3632 MEM32(esi + 0x4) = 0; /* 0x30008E22: mov dword ptr [esi + 4], 0 */ 3633 esi = POP32_VAL(esp); /* 0x30008E29: pop esi */ 3634 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30008E2A: ret */ 3635 RECOMP_REGS_OUT(); 3636 } 3637 3638 void sub_30008E30(void) { 3639 int _fpu_cmp = 0; 3640 uint32_t _cf = 0; 3641 int _df = 1; 3642 uint32_t _flag_k = FK_NONE; 3643 uint32_t _flag_a = 0, _flag_b = 0; 3644 uint32_t _itail_tgt = 0; 3645 RECOMP_REGS_LOCALS 3646 RECOMP_ENTER(0x30008E30u); 3647 3648 L_30008E30: 3649 PUSH32(esp, ebp); /* 0x30008E30: push ebp */ 3650 ebp = esp; /* 0x30008E31: mov ebp, esp */ 3651 PUSH32(esp, 0xFFFFFFFFu); /* 0x30008E33: push -1 */ 3652 PUSH32(esp, 0x300187AAu); /* 0x30008E35: push 0x300187aa */ 3653 eax = MEM32(FS_BASE + (0)); /* 0x30008E3A: mov eax, dword ptr fs:[0] */ 3654 PUSH32(esp, eax); /* 0x30008E40: push eax */ 3655 MEM32(FS_BASE + (0)) = esp; /* 0x30008E41: mov dword ptr fs:[0], esp */ 3656 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x84u); 3657 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3658 esp = esp - 0x84u; /* 0x30008E48: sub esp, 0x84 */ 3659 _flag_k = FK_CMP; 3660 PUSH32(esp, ebx); /* 0x30008E4E: push ebx */ 3661 PUSH32(esp, esi); /* 0x30008E4F: push esi */ 3662 PUSH32(esp, edi); /* 0x30008E50: push edi */ 3663 edi = ecx; /* 0x30008E51: mov edi, ecx */ 3664 esi = MEM32(edi + 0x4); /* 0x30008E53: mov esi, dword ptr [edi + 4] */ 3665 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3666 ebx = 0; /* 0x30008E56: xor ebx, ebx */ 3667 _cf = 0; 3668 _flag_k = FK_TEST; 3669 /* cmp esi, ebx */ /* 0x30008E58: cmp esi, ebx */ 3670 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 3671 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3672 _flag_k = FK_CMP; 3673 MEM32(ebp + (-0x20)) = edi; /* 0x30008E5A: mov dword ptr [ebp - 0x20], edi */ 3674 if (CMP_EQ(_flag_a, _flag_b)) goto L_30008E6F; /* 0x30008E5D: je 0x30008e6f */ 3675 L_30008E5F: 3676 ecx = esi; /* 0x30008E5F: mov ecx, esi */ 3677 RECOMP_ICALL(0x3000F910u); /* 0x30008E61: call 0x3000f910 */ /* not lifted */ 3678 RECOMP_FLAGS_IN(); 3679 PUSH32(esp, esi); /* 0x30008E66: push esi */ 3680 RECOMP_ICALL(0x30018080u); /* 0x30008E67: call 0x30018080 */ /* not lifted */ 3681 RECOMP_FLAGS_IN(); 3682 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3683 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3684 esp = esp + 4; /* 0x30008E6C: add esp, 4 */ 3685 _flag_k = FK_ADD; 3686 L_30008E6F: 3687 PUSH32(esp, 0x28u); /* 0x30008E6F: push 0x28 */ 3688 RECOMP_ICALL(0x300180A8u); /* 0x30008E71: call 0x300180a8 */ /* not lifted */ 3689 RECOMP_FLAGS_IN(); 3690 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3691 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3692 esp = esp + 4; /* 0x30008E76: add esp, 4 */ 3693 _flag_k = FK_ADD; 3694 MEM32(ebp + (-0x4C)) = eax; /* 0x30008E79: mov dword ptr [ebp - 0x4c], eax */ 3695 /* cmp eax, ebx */ /* 0x30008E7C: cmp eax, ebx */ 3696 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 3697 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3698 _flag_k = FK_CMP; 3699 MEM32(ebp + (-0x4)) = ebx; /* 0x30008E7E: mov dword ptr [ebp - 4], ebx */ 3700 if (CMP_EQ(_flag_a, _flag_b)) goto L_30008E8C; /* 0x30008E81: je 0x30008e8c */ 3701 L_30008E83: 3702 ecx = eax; /* 0x30008E83: mov ecx, eax */ 3703 RECOMP_ICALL(0x3000F780u); /* 0x30008E85: call 0x3000f780 */ /* not lifted */ 3704 RECOMP_FLAGS_IN(); 3705 goto L_30008E8E; /* 0x30008E8A: jmp 0x30008e8e */ 3706 L_30008E8C: 3707 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3708 eax = 0; /* 0x30008E8C: xor eax, eax */ 3709 _cf = 0; 3710 _flag_k = FK_TEST; 3711 L_30008E8E: 3712 ecx = MEM32(ebp + 0x8); /* 0x30008E8E: mov ecx, dword ptr [ebp + 8] */ 3713 MEM32(edi + 0x4) = eax; /* 0x30008E91: mov dword ptr [edi + 4], eax */ 3714 eax = MEM32(ecx + 0x4); /* 0x30008E94: mov eax, dword ptr [ecx + 4] */ 3715 /* cmp eax, ebx */ /* 0x30008E97: cmp eax, ebx */ 3716 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 3717 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3718 _flag_k = FK_CMP; 3719 if (CMP_NE(_flag_a, _flag_b)) goto L_30008E9F; /* 0x30008E99: jne 0x30008e9f */ 3720 L_30008E9B: 3721 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3722 esi = 0; /* 0x30008E9B: xor esi, esi */ 3723 _cf = 0; 3724 _flag_k = FK_TEST; 3725 goto L_30008EB7; /* 0x30008E9D: jmp 0x30008eb7 */ 3726 L_30008E9F: 3727 ecx = MEM32(ecx + 0x8); /* 0x30008E9F: mov ecx, dword ptr [ecx + 8] */ 3728 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 3729 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3730 ecx = ecx - eax; /* 0x30008EA2: sub ecx, eax */ 3731 _flag_k = FK_CMP; 3732 eax = 0x2AAAAAABu; /* 0x30008EA4: mov eax, 0x2aaaaaab */ 3733 { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30008EA9: imul ecx */ 3734 eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r; 3735 _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; } 3736 if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30008EAB: sar edx, 3 */ 3737 if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 3738 edx = (uint32_t)((int32_t)edx >> 3u); 3739 eax = edx; /* 0x30008EAE: mov eax, edx */ 3740 if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30008EB0: shr eax, 0x1f */ 3741 if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 3742 eax = eax >> 31u; /* 0x30008EB0: shr eax, 0x1f */ 3743 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 3744 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3745 edx = edx + eax; /* 0x30008EB3: add edx, eax */ 3746 _flag_k = FK_ADD; 3747 esi = edx; /* 0x30008EB5: mov esi, edx */ 3748 L_30008EB7: 3749 SET_LO8(ecx, MEM8(ebp + 0xB)); /* 0x30008EB7: mov cl, byte ptr [ebp + 0xb] */ 3750 MEM8(ebp + (-0x48)) = (uint8_t)(LO8(ecx)); /* 0x30008EBA: mov byte ptr [ebp - 0x48], cl */ 3751 MEM32(ebp + (-0x44)) = ebx; /* 0x30008EBD: mov dword ptr [ebp - 0x44], ebx */ 3752 MEM32(ebp + (-0x40)) = ebx; /* 0x30008EC0: mov dword ptr [ebp - 0x40], ebx */ 3753 MEM32(ebp + (-0x3C)) = ebx; /* 0x30008EC3: mov dword ptr [ebp - 0x3c], ebx */ 3754 ecx = ebp + (-0x2C); /* 0x30008EC6: lea ecx, [ebp - 0x2c] */ 3755 MEM32(ebp + (-0x4)) = 1; /* 0x30008EC9: mov dword ptr [ebp - 4], 1 */ 3756 MEM32(ebp + (-0x38)) = 0; /* 0x30008ED0: mov dword ptr [ebp - 0x38], 0 */ 3757 MEM32(ebp + (-0x34)) = 0; /* 0x30008ED7: mov dword ptr [ebp - 0x34], 0 */ 3758 MEM32(ebp + (-0x30)) = 0; /* 0x30008EDE: mov dword ptr [ebp - 0x30], 0 */ 3759 RECOMP_ICALL(MEM32(0x300190E4)); /* 0x30008EE5: call dword ptr [0x300190e4] */ 3760 RECOMP_FLAGS_IN(); 3761 /* cmp esi, ebx */ /* 0x30008EEB: cmp esi, ebx */ 3762 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 3763 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3764 _flag_k = FK_CMP; 3765 SET_LO8(edx, MEM8(ebp + 0xB)); /* 0x30008EED: mov dl, byte ptr [ebp + 0xb] */ 3766 MEM32(ebp + (-0x4)) = 2; /* 0x30008EF0: mov dword ptr [ebp - 4], 2 */ 3767 MEM8(ebp + (-0x1C)) = (uint8_t)(LO8(edx)); /* 0x30008EF7: mov byte ptr [ebp - 0x1c], dl */ 3768 eax = esi; /* 0x30008EFA: mov eax, esi */ 3769 if (CMP_GE(_flag_a, _flag_b)) goto L_30008F00; /* 0x30008EFC: jge 0x30008f00 */ 3770 L_30008EFE: 3771 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3772 eax = 0; /* 0x30008EFE: xor eax, eax */ 3773 _cf = 0; 3774 _flag_k = FK_TEST; 3775 L_30008F00: 3776 eax = eax + eax * 4; /* 0x30008F00: lea eax, [eax + eax*4] */ 3777 if (3u) _cf = (((eax) >> 29) & 1u); /* 0x30008F03: shl eax, 3 */ 3778 if (3u) { _flag_a = recomp_flags_pack((eax << 3u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 3779 eax = eax << 3u; /* 0x30008F03: shl eax, 3 */ 3780 PUSH32(esp, eax); /* 0x30008F06: push eax */ 3781 RECOMP_ICALL(0x300180A8u); /* 0x30008F07: call 0x300180a8 */ /* not lifted */ 3782 RECOMP_FLAGS_IN(); 3783 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3784 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3785 esp = esp + 4; /* 0x30008F0C: add esp, 4 */ 3786 _flag_k = FK_ADD; 3787 /* cmp esi, ebx */ /* 0x30008F0F: cmp esi, ebx */ 3788 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 3789 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3790 _flag_k = FK_CMP; 3791 MEM32(ebp + (-0x18)) = eax; /* 0x30008F11: mov dword ptr [ebp - 0x18], eax */ 3792 edi = eax; /* 0x30008F14: mov edi, eax */ 3793 if (CMP_BE(_flag_a, _flag_b)) goto L_30008F32; /* 0x30008F16: jbe 0x30008f32 */ 3794 L_30008F18: 3795 ebx = esi; /* 0x30008F18: mov ebx, esi */ 3796 L_30008F1A: 3797 ecx = ebp + (-0x48); /* 0x30008F1A: lea ecx, [ebp - 0x48] */ 3798 PUSH32(esp, ecx); /* 0x30008F1D: push ecx */ 3799 PUSH32(esp, edi); /* 0x30008F1E: push edi */ 3800 RECOMP_ICALL(0x300090C0u); /* 0x30008F1F: call 0x300090c0 */ /* not lifted */ 3801 RECOMP_FLAGS_IN(); 3802 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3803 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3804 esp = esp + 8; /* 0x30008F24: add esp, 8 */ 3805 _flag_k = FK_ADD; 3806 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x28u); 3807 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3808 edi = edi + 0x28u; /* 0x30008F27: add edi, 0x28 */ 3809 _flag_k = FK_ADD; 3810 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(1); 3811 ebx = ebx - 1; /* 0x30008F2A: dec ebx */ 3812 _flag_k = FK_DEC; 3813 RECOMP_BACKEDGE(); 3814 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_30008F1A; /* 0x30008F2B: jne 0x30008f1a */ 3815 L_30008F2D: 3816 eax = MEM32(ebp + (-0x18)); /* 0x30008F2D: mov eax, dword ptr [ebp - 0x18] */ 3817 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3818 ebx = 0; /* 0x30008F30: xor ebx, ebx */ 3819 _cf = 0; 3820 _flag_k = FK_TEST; 3821 L_30008F32: 3822 edx = esi + esi * 4; /* 0x30008F32: lea edx, [esi + esi*4] */ 3823 eax = eax + edx * 8; /* 0x30008F35: lea eax, [eax + edx*8] */ 3824 MEM32(ebp + (-0x14)) = eax; /* 0x30008F38: mov dword ptr [ebp - 0x14], eax */ 3825 MEM32(ebp + (-0x10)) = eax; /* 0x30008F3B: mov dword ptr [ebp - 0x10], eax */ 3826 eax = MEM32(ebp + (-0x40)); /* 0x30008F3E: mov eax, dword ptr [ebp - 0x40] */ 3827 ecx = MEM32(ebp + (-0x44)); /* 0x30008F41: mov ecx, dword ptr [ebp - 0x44] */ 3828 PUSH32(esp, eax); /* 0x30008F44: push eax */ 3829 PUSH32(esp, ecx); /* 0x30008F45: push ecx */ 3830 ecx = ebp + (-0x48); /* 0x30008F46: lea ecx, [ebp - 0x48] */ 3831 MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x30008F49: mov byte ptr [ebp - 4], 4 */ 3832 RECOMP_ICALL(0x3000EC10u); /* 0x30008F4D: call 0x3000ec10 */ /* not lifted */ 3833 RECOMP_FLAGS_IN(); 3834 edx = MEM32(ebp + (-0x44)); /* 0x30008F52: mov edx, dword ptr [ebp - 0x44] */ 3835 PUSH32(esp, edx); /* 0x30008F55: push edx */ 3836 RECOMP_ICALL(0x30018080u); /* 0x30008F56: call 0x30018080 */ /* not lifted */ 3837 RECOMP_FLAGS_IN(); 3838 eax = MEM32(ebp + 0x8); /* 0x30008F5B: mov eax, dword ptr [ebp + 8] */ 3839 edi = MEM32(eax + 0x4); /* 0x30008F5E: mov edi, dword ptr [eax + 4] */ 3840 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3841 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3842 esp = esp + 4; /* 0x30008F61: add esp, 4 */ 3843 _flag_k = FK_ADD; 3844 /* cmp esi, ebx */ /* 0x30008F64: cmp esi, ebx */ 3845 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 3846 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3847 _flag_k = FK_CMP; 3848 MEM32(ebp + (-0x44)) = ebx; /* 0x30008F66: mov dword ptr [ebp - 0x44], ebx */ 3849 MEM32(ebp + (-0x40)) = ebx; /* 0x30008F69: mov dword ptr [ebp - 0x40], ebx */ 3850 MEM32(ebp + (-0x3C)) = ebx; /* 0x30008F6C: mov dword ptr [ebp - 0x3c], ebx */ 3851 if (CMP_LE(_flag_a, _flag_b)) goto L_30008F8C; /* 0x30008F6F: jle 0x30008f8c */ 3852 L_30008F71: 3853 ecx = MEM32(ebp + (-0x18)); /* 0x30008F71: mov ecx, dword ptr [ebp - 0x18] */ 3854 edx = ebx + ecx; /* 0x30008F74: lea edx, [ebx + ecx] */ 3855 PUSH32(esp, edx); /* 0x30008F77: push edx */ 3856 PUSH32(esp, edi); /* 0x30008F78: push edi */ 3857 RECOMP_ICALL(0x30008DB0u); /* 0x30008F79: call 0x30008db0 */ /* not lifted */ 3858 RECOMP_FLAGS_IN(); 3859 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3860 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3861 esp = esp + 8; /* 0x30008F7E: add esp, 8 */ 3862 _flag_k = FK_ADD; 3863 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x28u); 3864 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3865 ebx = ebx + 0x28u; /* 0x30008F81: add ebx, 0x28 */ 3866 _flag_k = FK_ADD; 3867 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x30u); 3868 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3869 edi = edi + 0x30u; /* 0x30008F84: add edi, 0x30 */ 3870 _flag_k = FK_ADD; 3871 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 3872 esi = esi - 1; /* 0x30008F87: dec esi */ 3873 _flag_k = FK_DEC; 3874 RECOMP_BACKEDGE(); 3875 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_30008F71; /* 0x30008F88: jne 0x30008f71 */ 3876 L_30008F8A: 3877 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3878 ebx = 0; /* 0x30008F8A: xor ebx, ebx */ 3879 _cf = 0; 3880 _flag_k = FK_TEST; 3881 L_30008F8C: 3882 esi = MEM32(ebp + (-0x20)); /* 0x30008F8C: mov esi, dword ptr [ebp - 0x20] */ 3883 ecx = MEM32(esi + 0x4); /* 0x30008F8F: mov ecx, dword ptr [esi + 4] */ 3884 eax = ebp + (-0x1C); /* 0x30008F92: lea eax, [ebp - 0x1c] */ 3885 PUSH32(esp, eax); /* 0x30008F95: push eax */ 3886 RECOMP_ICALL(0x30011110u); /* 0x30008F96: call 0x30011110 */ /* not lifted */ 3887 RECOMP_FLAGS_IN(); 3888 ecx = MEM32(esi + 0x4); /* 0x30008F9B: mov ecx, dword ptr [esi + 4] */ 3889 PUSH32(esp, ebx); /* 0x30008F9E: push ebx */ 3890 PUSH32(esp, ebx); /* 0x30008F9F: push ebx */ 3891 RECOMP_ICALL(0x3000FD70u); /* 0x30008FA0: call 0x3000fd70 */ /* not lifted */ 3892 RECOMP_FLAGS_IN(); 3893 PUSH32(esp, 0x800u); /* 0x30008FA5: push 0x800 */ 3894 ecx = ebp + (-0x90); /* 0x30008FAA: lea ecx, [ebp - 0x90] */ 3895 RECOMP_ICALL(MEM32(0x30019074)); /* 0x30008FB0: call dword ptr [0x30019074] */ 3896 RECOMP_FLAGS_IN(); 3897 MEM32(ebp + (-0x50)) = ebx; /* 0x30008FB6: mov dword ptr [ebp - 0x50], ebx */ 3898 ecx = ebp + (-0x90); /* 0x30008FB9: lea ecx, [ebp - 0x90] */ 3899 PUSH32(esp, ecx); /* 0x30008FBF: push ecx */ 3900 ecx = MEM32(esi + 0x4); /* 0x30008FC0: mov ecx, dword ptr [esi + 4] */ 3901 MEM8(ebp + (-0x4)) = (uint8_t)(5); /* 0x30008FC3: mov byte ptr [ebp - 4], 5 */ 3902 RECOMP_ICALL(0x30010280u); /* 0x30008FC7: call 0x30010280 */ /* not lifted */ 3903 RECOMP_FLAGS_IN(); 3904 PUSH32(esp, 0x10u); /* 0x30008FCC: push 0x10 */ 3905 RECOMP_ICALL(0x300180A8u); /* 0x30008FCE: call 0x300180a8 */ /* not lifted */ 3906 RECOMP_FLAGS_IN(); 3907 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3908 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3909 esp = esp + 4; /* 0x30008FD3: add esp, 4 */ 3910 _flag_k = FK_ADD; 3911 MEM32(ebp + 0x8) = eax; /* 0x30008FD6: mov dword ptr [ebp + 8], eax */ 3912 /* cmp eax, ebx */ /* 0x30008FD9: cmp eax, ebx */ 3913 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 3914 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3915 _flag_k = FK_CMP; 3916 MEM8(ebp + (-0x4)) = (uint8_t)(6); /* 0x30008FDB: mov byte ptr [ebp - 4], 6 */ 3917 if (CMP_EQ(_flag_a, _flag_b)) goto L_30008FEA; /* 0x30008FDF: je 0x30008fea */ 3918 L_30008FE1: 3919 ecx = eax; /* 0x30008FE1: mov ecx, eax */ 3920 RECOMP_ICALL(0x30013580u); /* 0x30008FE3: call 0x30013580 */ /* not lifted */ 3921 RECOMP_FLAGS_IN(); 3922 ebx = eax; /* 0x30008FE8: mov ebx, eax */ 3923 L_30008FEA: 3924 PUSH32(esp, 0); /* 0x30008FEA: push 0 */ 3925 ecx = ebp + (-0x90); /* 0x30008FEC: lea ecx, [ebp - 0x90] */ 3926 MEM8(ebp + (-0x4)) = (uint8_t)(5); /* 0x30008FF2: mov byte ptr [ebp - 4], 5 */ 3927 RECOMP_ICALL(MEM32(0x3001908C)); /* 0x30008FF6: call dword ptr [0x3001908c] */ 3928 RECOMP_FLAGS_IN(); 3929 edx = ebp + (-0x90); /* 0x30008FFC: lea edx, [ebp - 0x90] */ 3930 PUSH32(esp, edx); /* 0x30009002: push edx */ 3931 ecx = ebx; /* 0x30009003: mov ecx, ebx */ 3932 RECOMP_ICALL(0x300136E0u); /* 0x30009005: call 0x300136e0 */ /* not lifted */ 3933 RECOMP_FLAGS_IN(); 3934 ecx = ebp + (-0x90); /* 0x3000900A: lea ecx, [ebp - 0x90] */ 3935 MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x30009010: mov byte ptr [ebp - 4], 4 */ 3936 RECOMP_ICALL(MEM32(0x30019094)); /* 0x30009014: call dword ptr [0x30019094] */ 3937 RECOMP_FLAGS_IN(); 3938 eax = MEM32(ebp + (-0x14)); /* 0x3000901A: mov eax, dword ptr [ebp - 0x14] */ 3939 esi = MEM32(ebp + (-0x18)); /* 0x3000901D: mov esi, dword ptr [ebp - 0x18] */ 3940 /* cmp esi, eax */ /* 0x30009020: cmp esi, eax */ 3941 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 3942 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3943 _flag_k = FK_CMP; 3944 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x30009022: mov dword ptr [ebp - 4], 0xffffffff */ 3945 edi = eax; /* 0x30009029: mov edi, eax */ 3946 if (CMP_EQ(_flag_a, _flag_b)) goto L_3000903E; /* 0x3000902B: je 0x3000903e */ 3947 L_3000902D: 3948 ecx = esi; /* 0x3000902D: mov ecx, esi */ 3949 RECOMP_ICALL(0x3000E970u); /* 0x3000902F: call 0x3000e970 */ /* not lifted */ 3950 RECOMP_FLAGS_IN(); 3951 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x28u); 3952 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3953 esi = esi + 0x28u; /* 0x30009034: add esi, 0x28 */ 3954 _flag_k = FK_ADD; 3955 /* cmp esi, edi */ /* 0x30009037: cmp esi, edi */ 3956 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi); 3957 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3958 _flag_k = FK_CMP; 3959 RECOMP_BACKEDGE(); 3960 if (CMP_NE(_flag_a, _flag_b)) goto L_3000902D; /* 0x30009039: jne 0x3000902d */ 3961 L_3000903B: 3962 esi = MEM32(ebp + (-0x18)); /* 0x3000903B: mov esi, dword ptr [ebp - 0x18] */ 3963 L_3000903E: 3964 PUSH32(esp, esi); /* 0x3000903E: push esi */ 3965 RECOMP_ICALL(0x30018080u); /* 0x3000903F: call 0x30018080 */ /* not lifted */ 3966 RECOMP_FLAGS_IN(); 3967 ecx = MEM32(ebp + (-0xC)); /* 0x30009044: mov ecx, dword ptr [ebp - 0xc] */ 3968 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3969 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3970 esp = esp + 4; /* 0x30009047: add esp, 4 */ 3971 _flag_k = FK_ADD; 3972 edi = POP32_VAL(esp); /* 0x3000904A: pop edi */ 3973 esi = POP32_VAL(esp); /* 0x3000904B: pop esi */ 3974 eax = ebx; /* 0x3000904C: mov eax, ebx */ 3975 ebx = POP32_VAL(esp); /* 0x3000904E: pop ebx */ 3976 MEM32(FS_BASE + (0)) = ecx; /* 0x3000904F: mov dword ptr fs:[0], ecx */ 3977 esp = ebp; /* 0x30009056: mov esp, ebp */ 3978 ebp = POP32_VAL(esp); /* 0x30009058: pop ebp */ 3979 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30009059: ret 4 */ 3980 RECOMP_REGS_OUT(); 3981 } 3982 3983 void sub_30009060(void) { 3984 int _fpu_cmp = 0; 3985 uint32_t _cf = 0; 3986 int _df = 1; 3987 uint32_t _flag_k = FK_NONE; 3988 uint32_t _flag_a = 0, _flag_b = 0; 3989 uint32_t _itail_tgt = 0; 3990 RECOMP_REGS_LOCALS 3991 RECOMP_ENTER(0x30009060u); 3992 3993 L_30009060: 3994 PUSH32(esp, ebp); /* 0x30009060: push ebp */ 3995 ebp = esp; /* 0x30009061: mov ebp, esp */ 3996 ecx = MEM32(ecx + 0x4); /* 0x30009063: mov ecx, dword ptr [ecx + 4] */ 3997 /* test ecx, ecx */ /* 0x30009066: test ecx, ecx */ 3998 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 3999 _cf = 0; 4000 _flag_k = FK_TEST; 4001 if (TEST_Z(_flag_a, _flag_b)) goto L_30009073; /* 0x30009068: je 0x30009073 */ 4002 L_3000906A: 4003 eax = MEM32(ebp + 0x8); /* 0x3000906A: mov eax, dword ptr [ebp + 8] */ 4004 PUSH32(esp, eax); /* 0x3000906D: push eax */ 4005 RECOMP_ICALL(0x30010280u); /* 0x3000906E: call 0x30010280 */ /* not lifted */ 4006 RECOMP_FLAGS_IN(); 4007 L_30009073: 4008 ebp = POP32_VAL(esp); /* 0x30009073: pop ebp */ 4009 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30009074: ret 4 */ 4010 RECOMP_REGS_OUT(); 4011 } 4012 4013 void sub_30009080(void) { 4014 int _fpu_cmp = 0; 4015 uint32_t _cf = 0; 4016 int _df = 1; 4017 uint32_t _flag_k = FK_NONE; 4018 uint32_t _flag_a = 0, _flag_b = 0; 4019 uint32_t _itail_tgt = 0; 4020 RECOMP_REGS_LOCALS 4021 RECOMP_ENTER(0x30009080u); 4022 4023 L_30009080: 4024 PUSH32(esp, ebx); /* 0x30009080: push ebx */ 4025 PUSH32(esp, esi); /* 0x30009081: push esi */ 4026 PUSH32(esp, edi); /* 0x30009082: push edi */ 4027 edi = ecx; /* 0x30009083: mov edi, ecx */ 4028 ebx = MEM32(edi + 0x8); /* 0x30009085: mov ebx, dword ptr [edi + 8] */ 4029 esi = MEM32(edi + 0x4); /* 0x30009088: mov esi, dword ptr [edi + 4] */ 4030 /* cmp esi, ebx */ /* 0x3000908B: cmp esi, ebx */ 4031 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 4032 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4033 _flag_k = FK_CMP; 4034 if (CMP_EQ(_flag_a, _flag_b)) goto L_3000909D; /* 0x3000908D: je 0x3000909d */ 4035 L_3000908F: 4036 ecx = esi; /* 0x3000908F: mov ecx, esi */ 4037 RECOMP_ICALL(0x3000E970u); /* 0x30009091: call 0x3000e970 */ /* not lifted */ 4038 RECOMP_FLAGS_IN(); 4039 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x28u); 4040 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4041 esi = esi + 0x28u; /* 0x30009096: add esi, 0x28 */ 4042 _flag_k = FK_ADD; 4043 /* cmp esi, ebx */ /* 0x30009099: cmp esi, ebx */ 4044 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 4045 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4046 _flag_k = FK_CMP; 4047 RECOMP_BACKEDGE(); 4048 if (CMP_NE(_flag_a, _flag_b)) goto L_3000908F; /* 0x3000909B: jne 0x3000908f */ 4049 L_3000909D: 4050 eax = MEM32(edi + 0x4); /* 0x3000909D: mov eax, dword ptr [edi + 4] */ 4051 PUSH32(esp, eax); /* 0x300090A0: push eax */ 4052 RECOMP_ICALL(0x30018080u); /* 0x300090A1: call 0x30018080 */ /* not lifted */ 4053 RECOMP_FLAGS_IN(); 4054 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4055 eax = 0; /* 0x300090A6: xor eax, eax */ 4056 _cf = 0; 4057 _flag_k = FK_TEST; 4058 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4059 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4060 esp = esp + 4; /* 0x300090A8: add esp, 4 */ 4061 _flag_k = FK_ADD; 4062 MEM32(edi + 0x4) = eax; /* 0x300090AB: mov dword ptr [edi + 4], eax */ 4063 MEM32(edi + 0x8) = eax; /* 0x300090AE: mov dword ptr [edi + 8], eax */ 4064 MEM32(edi + 0xC) = eax; /* 0x300090B1: mov dword ptr [edi + 0xc], eax */ 4065 edi = POP32_VAL(esp); /* 0x300090B4: pop edi */ 4066 esi = POP32_VAL(esp); /* 0x300090B5: pop esi */ 4067 ebx = POP32_VAL(esp); /* 0x300090B6: pop ebx */ 4068 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300090B7: ret */ 4069 RECOMP_REGS_OUT(); 4070 } 4071 4072 void sub_300090C0(void) { 4073 int _fpu_cmp = 0; 4074 uint32_t _cf = 0; 4075 int _df = 1; 4076 uint32_t _flag_k = FK_NONE; 4077 uint32_t _flag_a = 0, _flag_b = 0; 4078 uint32_t _itail_tgt = 0; 4079 RECOMP_REGS_LOCALS 4080 RECOMP_ENTER(0x300090C0u); 4081 4082 L_300090C0: 4083 PUSH32(esp, ebp); /* 0x300090C0: push ebp */ 4084 ebp = esp; /* 0x300090C1: mov ebp, esp */ 4085 PUSH32(esp, 0xFFFFFFFFu); /* 0x300090C3: push -1 */ 4086 PUSH32(esp, 0x300187D1u); /* 0x300090C5: push 0x300187d1 */ 4087 eax = MEM32(FS_BASE + (0)); /* 0x300090CA: mov eax, dword ptr fs:[0] */ 4088 PUSH32(esp, eax); /* 0x300090D0: push eax */ 4089 MEM32(FS_BASE + (0)) = esp; /* 0x300090D1: mov dword ptr fs:[0], esp */ 4090 PUSH32(esp, ecx); /* 0x300090D8: push ecx */ 4091 PUSH32(esp, edi); /* 0x300090D9: push edi */ 4092 edi = MEM32(ebp + 0x8); /* 0x300090DA: mov edi, dword ptr [ebp + 8] */ 4093 MEM32(ebp + (-0x10)) = edi; /* 0x300090DD: mov dword ptr [ebp - 0x10], edi */ 4094 /* test edi, edi */ /* 0x300090E0: test edi, edi */ 4095 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 4096 _cf = 0; 4097 _flag_k = FK_TEST; 4098 MEM32(ebp + (-0x4)) = 0; /* 0x300090E2: mov dword ptr [ebp - 4], 0 */ 4099 if (TEST_Z(_flag_a, _flag_b)) goto L_3000919D; /* 0x300090E9: je 0x3000919d */ 4100 L_300090EF: 4101 PUSH32(esp, esi); /* 0x300090EF: push esi */ 4102 esi = MEM32(ebp + 0xC); /* 0x300090F0: mov esi, dword ptr [ebp + 0xc] */ 4103 SET_LO8(eax, MEM8(esi)); /* 0x300090F3: mov al, byte ptr [esi] */ 4104 MEM8(edi) = (uint8_t)(LO8(eax)); /* 0x300090F5: mov byte ptr [edi], al */ 4105 eax = MEM32(esi + 0x4); /* 0x300090F7: mov eax, dword ptr [esi + 4] */ 4106 /* test eax, eax */ /* 0x300090FA: test eax, eax */ 4107 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4108 _cf = 0; 4109 _flag_k = FK_TEST; 4110 if (TEST_NZ(_flag_a, _flag_b)) goto L_30009102; /* 0x300090FC: jne 0x30009102 */ 4111 L_300090FE: 4112 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4113 edx = 0; /* 0x300090FE: xor edx, edx */ 4114 _cf = 0; 4115 _flag_k = FK_TEST; 4116 goto L_30009117; /* 0x30009100: jmp 0x30009117 */ 4117 L_30009102: 4118 ecx = MEM32(esi + 0x8); /* 0x30009102: mov ecx, dword ptr [esi + 8] */ 4119 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 4120 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4121 ecx = ecx - eax; /* 0x30009105: sub ecx, eax */ 4122 _flag_k = FK_CMP; 4123 eax = 0x2AAAAAABu; /* 0x30009107: mov eax, 0x2aaaaaab */ 4124 { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x3000910C: imul ecx */ 4125 eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r; 4126 _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; } 4127 if (1u) _cf = (((edx) >> 0) & 1u); /* 0x3000910E: sar edx, 1 */ 4128 if (1u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 1u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 4129 edx = (uint32_t)((int32_t)edx >> 1u); 4130 ecx = edx; /* 0x30009110: mov ecx, edx */ 4131 if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30009112: shr ecx, 0x1f */ 4132 if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 4133 ecx = ecx >> 31u; /* 0x30009112: shr ecx, 0x1f */ 4134 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx); 4135 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4136 edx = edx + ecx; /* 0x30009115: add edx, ecx */ 4137 _flag_k = FK_ADD; 4138 L_30009117: 4139 /* test edx, edx */ /* 0x30009117: test edx, edx */ 4140 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 4141 _cf = 0; 4142 _flag_k = FK_TEST; 4143 eax = edx; /* 0x30009119: mov eax, edx */ 4144 if (TEST_NS(_flag_a, _flag_b)) goto L_3000911F; /* 0x3000911B: jge 0x3000911f */ 4145 L_3000911D: 4146 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4147 eax = 0; /* 0x3000911D: xor eax, eax */ 4148 _cf = 0; 4149 _flag_k = FK_TEST; 4150 L_3000911F: 4151 edx = eax + eax * 2; /* 0x3000911F: lea edx, [eax + eax*2] */ 4152 if (2u) _cf = (((edx) >> 30) & 1u); /* 0x30009122: shl edx, 2 */ 4153 if (2u) { _flag_a = recomp_flags_pack((edx << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 4154 edx = edx << 2u; /* 0x30009122: shl edx, 2 */ 4155 PUSH32(esp, edx); /* 0x30009125: push edx */ 4156 RECOMP_ICALL(0x300180A8u); /* 0x30009126: call 0x300180a8 */ /* not lifted */ 4157 RECOMP_FLAGS_IN(); 4158 MEM32(edi + 0x4) = eax; /* 0x3000912B: mov dword ptr [edi + 4], eax */ 4159 edx = MEM32(esi + 0x8); /* 0x3000912E: mov edx, dword ptr [esi + 8] */ 4160 ecx = eax; /* 0x30009131: mov ecx, eax */ 4161 eax = MEM32(esi + 0x4); /* 0x30009133: mov eax, dword ptr [esi + 4] */ 4162 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4163 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4164 esp = esp + 4; /* 0x30009136: add esp, 4 */ 4165 _flag_k = FK_ADD; 4166 /* cmp eax, edx */ /* 0x30009139: cmp eax, edx */ 4167 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 4168 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4169 _flag_k = FK_CMP; 4170 MEM32(ebp + 0xC) = edx; /* 0x3000913B: mov dword ptr [ebp + 0xc], edx */ 4171 if (CMP_EQ(_flag_a, _flag_b)) goto L_3000916A; /* 0x3000913E: je 0x3000916a */ 4172 L_30009140: 4173 PUSH32(esp, ebx); /* 0x30009140: push ebx */ 4174 L_30009141: 4175 /* test ecx, ecx */ /* 0x30009141: test ecx, ecx */ 4176 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 4177 _cf = 0; 4178 _flag_k = FK_TEST; 4179 if (TEST_Z(_flag_a, _flag_b)) goto L_3000915F; /* 0x30009143: je 0x3000915f */ 4180 L_30009145: 4181 edx = eax; /* 0x30009145: mov edx, eax */ 4182 ebx = MEM32(edx); /* 0x30009147: mov ebx, dword ptr [edx] */ 4183 edi = ecx; /* 0x30009149: mov edi, ecx */ 4184 MEM32(edi) = ebx; /* 0x3000914B: mov dword ptr [edi], ebx */ 4185 ebx = MEM32(edx + 0x4); /* 0x3000914D: mov ebx, dword ptr [edx + 4] */ 4186 MEM32(edi + 0x4) = ebx; /* 0x30009150: mov dword ptr [edi + 4], ebx */ 4187 edx = MEM32(edx + 0x8); /* 0x30009153: mov edx, dword ptr [edx + 8] */ 4188 MEM32(edi + 0x8) = edx; /* 0x30009156: mov dword ptr [edi + 8], edx */ 4189 edi = MEM32(ebp + 0x8); /* 0x30009159: mov edi, dword ptr [ebp + 8] */ 4190 edx = MEM32(ebp + 0xC); /* 0x3000915C: mov edx, dword ptr [ebp + 0xc] */ 4191 L_3000915F: 4192 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu); 4193 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4194 eax = eax + 0xCu; /* 0x3000915F: add eax, 0xc */ 4195 _flag_k = FK_ADD; 4196 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xCu); 4197 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4198 ecx = ecx + 0xCu; /* 0x30009162: add ecx, 0xc */ 4199 _flag_k = FK_ADD; 4200 /* cmp eax, edx */ /* 0x30009165: cmp eax, edx */ 4201 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 4202 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4203 _flag_k = FK_CMP; 4204 RECOMP_BACKEDGE(); 4205 if (CMP_NE(_flag_a, _flag_b)) goto L_30009141; /* 0x30009167: jne 0x30009141 */ 4206 L_30009169: 4207 ebx = POP32_VAL(esp); /* 0x30009169: pop ebx */ 4208 L_3000916A: 4209 MEM32(edi + 0x8) = ecx; /* 0x3000916A: mov dword ptr [edi + 8], ecx */ 4210 MEM32(edi + 0xC) = ecx; /* 0x3000916D: mov dword ptr [edi + 0xc], ecx */ 4211 eax = esi + 0x10; /* 0x30009170: lea eax, [esi + 0x10] */ 4212 edx = MEM32(eax); /* 0x30009173: mov edx, dword ptr [eax] */ 4213 ecx = edi + 0x10; /* 0x30009175: lea ecx, [edi + 0x10] */ 4214 MEM32(ecx) = edx; /* 0x30009178: mov dword ptr [ecx], edx */ 4215 edx = MEM32(eax + 0x4); /* 0x3000917A: mov edx, dword ptr [eax + 4] */ 4216 MEM32(ecx + 0x4) = edx; /* 0x3000917D: mov dword ptr [ecx + 4], edx */ 4217 eax = MEM32(eax + 0x8); /* 0x30009180: mov eax, dword ptr [eax + 8] */ 4218 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x1Cu); 4219 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4220 esi = esi + 0x1Cu; /* 0x30009183: add esi, 0x1c */ 4221 _flag_k = FK_ADD; 4222 MEM32(ecx + 0x8) = eax; /* 0x30009186: mov dword ptr [ecx + 8], eax */ 4223 ecx = MEM32(esi); /* 0x30009189: mov ecx, dword ptr [esi] */ 4224 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x1Cu); 4225 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4226 edi = edi + 0x1Cu; /* 0x3000918B: add edi, 0x1c */ 4227 _flag_k = FK_ADD; 4228 MEM32(edi) = ecx; /* 0x3000918E: mov dword ptr [edi], ecx */ 4229 edx = MEM32(esi + 0x4); /* 0x30009190: mov edx, dword ptr [esi + 4] */ 4230 MEM32(edi + 0x4) = edx; /* 0x30009193: mov dword ptr [edi + 4], edx */ 4231 eax = MEM32(esi + 0x8); /* 0x30009196: mov eax, dword ptr [esi + 8] */ 4232 MEM32(edi + 0x8) = eax; /* 0x30009199: mov dword ptr [edi + 8], eax */ 4233 esi = POP32_VAL(esp); /* 0x3000919C: pop esi */ 4234 L_3000919D: 4235 ecx = MEM32(ebp + (-0xC)); /* 0x3000919D: mov ecx, dword ptr [ebp - 0xc] */ 4236 edi = POP32_VAL(esp); /* 0x300091A0: pop edi */ 4237 MEM32(FS_BASE + (0)) = ecx; /* 0x300091A1: mov dword ptr fs:[0], ecx */ 4238 esp = ebp; /* 0x300091A8: mov esp, ebp */ 4239 ebp = POP32_VAL(esp); /* 0x300091AA: pop ebp */ 4240 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300091AB: ret */ 4241 RECOMP_REGS_OUT(); 4242 } 4243 4244 void sub_300091B0(void) { 4245 int _fpu_cmp = 0; 4246 uint32_t _cf = 0; 4247 int _df = 1; 4248 uint32_t _flag_k = FK_NONE; 4249 uint32_t _flag_a = 0, _flag_b = 0; 4250 uint32_t _itail_tgt = 0; 4251 RECOMP_REGS_LOCALS 4252 RECOMP_ENTER(0x300091B0u); 4253 4254 L_300091B0: 4255 RECOMP_ICALL(0x300091C0u); /* 0x300091B0: call 0x300091c0 */ /* not lifted */ 4256 RECOMP_FLAGS_IN(); 4257 goto L_300091D0; /* 0x300091B5: jmp 0x300091d0 */ 4258 L_300091D0: 4259 PUSH32(esp, 0x300091E0u); /* 0x300091D0: push 0x300091e0 */ 4260 RECOMP_ICALL(0x300180ECu); /* 0x300091D5: call 0x300180ec */ /* not lifted */ 4261 RECOMP_FLAGS_IN(); 4262 ecx = POP32_VAL(esp); /* 0x300091DA: pop ecx */ 4263 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300091DB: ret */ 4264 RECOMP_REGS_OUT(); 4265 } 4266 4267 void sub_300091C0(void) { 4268 int _fpu_cmp = 0; 4269 uint32_t _cf = 0; 4270 int _df = 1; 4271 uint32_t _flag_k = FK_NONE; 4272 uint32_t _flag_a = 0, _flag_b = 0; 4273 uint32_t _itail_tgt = 0; 4274 RECOMP_REGS_LOCALS 4275 RECOMP_ENTER(0x300091C0u); 4276 4277 L_300091C0: 4278 ecx = 0x3001E3DDu; /* 0x300091C0: mov ecx, 0x3001e3dd */ 4279 L_300091C5: 4280 { _itail_tgt = (uint32_t)(MEM32(0x30019018)); goto _ljump; } 4281 { RECOMP_REGS_OUT(); return; } /* end of function */ 4282 _ljump: 4283 switch (_itail_tgt) { 4284 case 0x300091C0u: goto L_300091C0; 4285 case 0x300091C5u: goto L_300091C5; 4286 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4287 } 4288 RECOMP_REGS_OUT(); 4289 } 4290 4291 void sub_300091D0(void) { 4292 int _fpu_cmp = 0; 4293 uint32_t _cf = 0; 4294 int _df = 1; 4295 uint32_t _flag_k = FK_NONE; 4296 uint32_t _flag_a = 0, _flag_b = 0; 4297 uint32_t _itail_tgt = 0; 4298 RECOMP_REGS_LOCALS 4299 RECOMP_ENTER(0x300091D0u); 4300 4301 L_300091D0: 4302 PUSH32(esp, 0x300091E0u); /* 0x300091D0: push 0x300091e0 */ 4303 RECOMP_ICALL(0x300180ECu); /* 0x300091D5: call 0x300180ec */ /* not lifted */ 4304 RECOMP_FLAGS_IN(); 4305 ecx = POP32_VAL(esp); /* 0x300091DA: pop ecx */ 4306 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300091DB: ret */ 4307 RECOMP_REGS_OUT(); 4308 } 4309 4310 void sub_300091E0(void) { 4311 int _fpu_cmp = 0; 4312 uint32_t _cf = 0; 4313 int _df = 1; 4314 uint32_t _flag_k = FK_NONE; 4315 uint32_t _flag_a = 0, _flag_b = 0; 4316 uint32_t _itail_tgt = 0; 4317 RECOMP_REGS_LOCALS 4318 RECOMP_ENTER(0x300091E0u); 4319 4320 L_300091E0: 4321 ecx = 0x3001E3DDu; /* 0x300091E0: mov ecx, 0x3001e3dd */ 4322 L_300091E5: 4323 { _itail_tgt = (uint32_t)(MEM32(0x3001901C)); goto _ljump; } 4324 { RECOMP_REGS_OUT(); return; } /* end of function */ 4325 _ljump: 4326 switch (_itail_tgt) { 4327 case 0x300091E0u: goto L_300091E0; 4328 case 0x300091E5u: goto L_300091E5; 4329 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4330 } 4331 RECOMP_REGS_OUT(); 4332 } 4333 4334 void sub_300091F0(void) { 4335 int _fpu_cmp = 0; 4336 uint32_t _cf = 0; 4337 int _df = 1; 4338 uint32_t _flag_k = FK_NONE; 4339 uint32_t _flag_a = 0, _flag_b = 0; 4340 uint32_t _itail_tgt = 0; 4341 RECOMP_REGS_LOCALS 4342 RECOMP_ENTER(0x300091F0u); 4343 4344 L_300091F0: 4345 RECOMP_ICALL(0x30009200u); /* 0x300091F0: call 0x30009200 */ /* not lifted */ 4346 RECOMP_FLAGS_IN(); 4347 goto L_30009210; /* 0x300091F5: jmp 0x30009210 */ 4348 L_30009210: 4349 PUSH32(esp, 0x30009220u); /* 0x30009210: push 0x30009220 */ 4350 RECOMP_ICALL(0x300180ECu); /* 0x30009215: call 0x300180ec */ /* not lifted */ 4351 RECOMP_FLAGS_IN(); 4352 ecx = POP32_VAL(esp); /* 0x3000921A: pop ecx */ 4353 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000921B: ret */ 4354 RECOMP_REGS_OUT(); 4355 } 4356 4357 void sub_30009200(void) { 4358 int _fpu_cmp = 0; 4359 uint32_t _cf = 0; 4360 int _df = 1; 4361 uint32_t _flag_k = FK_NONE; 4362 uint32_t _flag_a = 0, _flag_b = 0; 4363 uint32_t _itail_tgt = 0; 4364 RECOMP_REGS_LOCALS 4365 RECOMP_ENTER(0x30009200u); 4366 4367 L_30009200: 4368 ecx = 0x3001E3DCu; /* 0x30009200: mov ecx, 0x3001e3dc */ 4369 L_30009205: 4370 { _itail_tgt = (uint32_t)(MEM32(0x30019020)); goto _ljump; } 4371 { RECOMP_REGS_OUT(); return; } /* end of function */ 4372 _ljump: 4373 switch (_itail_tgt) { 4374 case 0x30009200u: goto L_30009200; 4375 case 0x30009205u: goto L_30009205; 4376 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4377 } 4378 RECOMP_REGS_OUT(); 4379 } 4380 4381 void sub_30009210(void) { 4382 int _fpu_cmp = 0; 4383 uint32_t _cf = 0; 4384 int _df = 1; 4385 uint32_t _flag_k = FK_NONE; 4386 uint32_t _flag_a = 0, _flag_b = 0; 4387 uint32_t _itail_tgt = 0; 4388 RECOMP_REGS_LOCALS 4389 RECOMP_ENTER(0x30009210u); 4390 4391 L_30009210: 4392 PUSH32(esp, 0x30009220u); /* 0x30009210: push 0x30009220 */ 4393 RECOMP_ICALL(0x300180ECu); /* 0x30009215: call 0x300180ec */ /* not lifted */ 4394 RECOMP_FLAGS_IN(); 4395 ecx = POP32_VAL(esp); /* 0x3000921A: pop ecx */ 4396 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000921B: ret */ 4397 RECOMP_REGS_OUT(); 4398 } 4399 4400 void sub_30009220(void) { 4401 int _fpu_cmp = 0; 4402 uint32_t _cf = 0; 4403 int _df = 1; 4404 uint32_t _flag_k = FK_NONE; 4405 uint32_t _flag_a = 0, _flag_b = 0; 4406 uint32_t _itail_tgt = 0; 4407 RECOMP_REGS_LOCALS 4408 RECOMP_ENTER(0x30009220u); 4409 4410 L_30009220: 4411 ecx = 0x3001E3DCu; /* 0x30009220: mov ecx, 0x3001e3dc */ 4412 L_30009225: 4413 { _itail_tgt = (uint32_t)(MEM32(0x30019024)); goto _ljump; } 4414 { RECOMP_REGS_OUT(); return; } /* end of function */ 4415 _ljump: 4416 switch (_itail_tgt) { 4417 case 0x30009220u: goto L_30009220; 4418 case 0x30009225u: goto L_30009225; 4419 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4420 } 4421 RECOMP_REGS_OUT(); 4422 } 4423 4424 void sub_30009230(void) { 4425 int _fpu_cmp = 0; 4426 uint32_t _cf = 0; 4427 int _df = 1; 4428 uint32_t _flag_k = FK_NONE; 4429 uint32_t _flag_a = 0, _flag_b = 0; 4430 uint32_t _itail_tgt = 0; 4431 RECOMP_REGS_LOCALS 4432 RECOMP_ENTER(0x30009230u); 4433 4434 L_30009230: 4435 PUSH32(esp, ebp); /* 0x30009230: push ebp */ 4436 ebp = esp; /* 0x30009231: mov ebp, esp */ 4437 PUSH32(esp, esi); /* 0x30009233: push esi */ 4438 eax = ecx; /* 0x30009234: mov eax, ecx */ 4439 ecx = MEM32(ebp + 0x8); /* 0x30009236: mov ecx, dword ptr [ebp + 8] */ 4440 MEM32(eax) = 0x300191ACu; /* 0x30009239: mov dword ptr [eax], 0x300191ac */ 4441 PUSH32(esp, edi); /* 0x3000923F: push edi */ 4442 edx = ecx + 0x4; /* 0x30009240: lea edx, [ecx + 4] */ 4443 edi = MEM32(edx); /* 0x30009243: mov edi, dword ptr [edx] */ 4444 esi = eax + 0x4; /* 0x30009245: lea esi, [eax + 4] */ 4445 MEM32(esi) = edi; /* 0x30009248: mov dword ptr [esi], edi */ 4446 edi = MEM32(edx + 0x4); /* 0x3000924A: mov edi, dword ptr [edx + 4] */ 4447 MEM32(esi + 0x4) = edi; /* 0x3000924D: mov dword ptr [esi + 4], edi */ 4448 edx = MEM32(edx + 0x8); /* 0x30009250: mov edx, dword ptr [edx + 8] */ 4449 MEM32(esi + 0x8) = edx; /* 0x30009253: mov dword ptr [esi + 8], edx */ 4450 edx = MEM32(ecx + 0x10); /* 0x30009256: mov edx, dword ptr [ecx + 0x10] */ 4451 MEM32(eax + 0x10) = edx; /* 0x30009259: mov dword ptr [eax + 0x10], edx */ 4452 edx = MEM32(ecx + 0x14); /* 0x3000925C: mov edx, dword ptr [ecx + 0x14] */ 4453 MEM32(eax + 0x14) = edx; /* 0x3000925F: mov dword ptr [eax + 0x14], edx */ 4454 MEM32(eax) = 0x300191C0u; /* 0x30009262: mov dword ptr [eax], 0x300191c0 */ 4455 edx = ecx + 0x18; /* 0x30009268: lea edx, [ecx + 0x18] */ 4456 edi = MEM32(edx); /* 0x3000926B: mov edi, dword ptr [edx] */ 4457 esi = eax + 0x18; /* 0x3000926D: lea esi, [eax + 0x18] */ 4458 MEM32(esi) = edi; /* 0x30009270: mov dword ptr [esi], edi */ 4459 edi = MEM32(edx + 0x4); /* 0x30009272: mov edi, dword ptr [edx + 4] */ 4460 MEM32(esi + 0x4) = edi; /* 0x30009275: mov dword ptr [esi + 4], edi */ 4461 edx = MEM32(edx + 0x8); /* 0x30009278: mov edx, dword ptr [edx + 8] */ 4462 MEM32(esi + 0x8) = edx; /* 0x3000927B: mov dword ptr [esi + 8], edx */ 4463 edx = ecx + 0x24; /* 0x3000927E: lea edx, [ecx + 0x24] */ 4464 edi = MEM32(edx); /* 0x30009281: mov edi, dword ptr [edx] */ 4465 esi = eax + 0x24; /* 0x30009283: lea esi, [eax + 0x24] */ 4466 MEM32(esi) = edi; /* 0x30009286: mov dword ptr [esi], edi */ 4467 edi = MEM32(edx + 0x4); /* 0x30009288: mov edi, dword ptr [edx + 4] */ 4468 MEM32(esi + 0x4) = edi; /* 0x3000928B: mov dword ptr [esi + 4], edi */ 4469 edx = MEM32(edx + 0x8); /* 0x3000928E: mov edx, dword ptr [edx + 8] */ 4470 MEM32(esi + 0x8) = edx; /* 0x30009291: mov dword ptr [esi + 8], edx */ 4471 edx = ecx + 0x30; /* 0x30009294: lea edx, [ecx + 0x30] */ 4472 edi = MEM32(edx); /* 0x30009297: mov edi, dword ptr [edx] */ 4473 esi = eax + 0x30; /* 0x30009299: lea esi, [eax + 0x30] */ 4474 MEM32(esi) = edi; /* 0x3000929C: mov dword ptr [esi], edi */ 4475 edi = MEM32(edx + 0x4); /* 0x3000929E: mov edi, dword ptr [edx + 4] */ 4476 MEM32(esi + 0x4) = edi; /* 0x300092A1: mov dword ptr [esi + 4], edi */ 4477 edi = MEM32(edx + 0x8); /* 0x300092A4: mov edi, dword ptr [edx + 8] */ 4478 MEM32(esi + 0x8) = edi; /* 0x300092A7: mov dword ptr [esi + 8], edi */ 4479 edx = MEM32(edx + 0xC); /* 0x300092AA: mov edx, dword ptr [edx + 0xc] */ 4480 MEM32(esi + 0xC) = edx; /* 0x300092AD: mov dword ptr [esi + 0xc], edx */ 4481 edx = ecx + 0x40; /* 0x300092B0: lea edx, [ecx + 0x40] */ 4482 edi = MEM32(edx); /* 0x300092B3: mov edi, dword ptr [edx] */ 4483 esi = eax + 0x40; /* 0x300092B5: lea esi, [eax + 0x40] */ 4484 MEM32(esi) = edi; /* 0x300092B8: mov dword ptr [esi], edi */ 4485 edi = MEM32(edx + 0x4); /* 0x300092BA: mov edi, dword ptr [edx + 4] */ 4486 MEM32(esi + 0x4) = edi; /* 0x300092BD: mov dword ptr [esi + 4], edi */ 4487 edi = MEM32(edx + 0x8); /* 0x300092C0: mov edi, dword ptr [edx + 8] */ 4488 MEM32(esi + 0x8) = edi; /* 0x300092C3: mov dword ptr [esi + 8], edi */ 4489 edx = MEM32(edx + 0xC); /* 0x300092C6: mov edx, dword ptr [edx + 0xc] */ 4490 MEM32(esi + 0xC) = edx; /* 0x300092C9: mov dword ptr [esi + 0xc], edx */ 4491 SET_LO8(ecx, MEM8(ecx + 0x50)); /* 0x300092CC: mov cl, byte ptr [ecx + 0x50] */ 4492 edi = POP32_VAL(esp); /* 0x300092CF: pop edi */ 4493 MEM8(eax + 0x50) = (uint8_t)(LO8(ecx)); /* 0x300092D0: mov byte ptr [eax + 0x50], cl */ 4494 MEM32(eax) = 0x3001924Cu; /* 0x300092D3: mov dword ptr [eax], 0x3001924c */ 4495 esi = POP32_VAL(esp); /* 0x300092D9: pop esi */ 4496 ebp = POP32_VAL(esp); /* 0x300092DA: pop ebp */ 4497 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x300092DB: ret 4 */ 4498 RECOMP_REGS_OUT(); 4499 } 4500 4501 void sub_300092E0(void) { 4502 int _fpu_cmp = 0; 4503 uint32_t _cf = 0; 4504 int _df = 1; 4505 uint32_t _flag_k = FK_NONE; 4506 uint32_t _flag_a = 0, _flag_b = 0; 4507 uint32_t _itail_tgt = 0; 4508 RECOMP_REGS_LOCALS 4509 RECOMP_ENTER(0x300092E0u); 4510 4511 L_300092E0: 4512 PUSH32(esp, ebp); /* 0x300092E0: push ebp */ 4513 ebp = esp; /* 0x300092E1: mov ebp, esp */ 4514 PUSH32(esp, ebx); /* 0x300092E3: push ebx */ 4515 SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x300092E4: mov bl, byte ptr [ebp + 8] */ 4516 /* test LO8(ebx), 2 */ /* 0x300092E7: test bl, 2 */ 4517 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 4518 _cf = 0; 4519 _flag_k = FK_NARROW(FK_TEST, 24); 4520 PUSH32(esp, esi); /* 0x300092EA: push esi */ 4521 esi = ecx; /* 0x300092EB: mov esi, ecx */ 4522 if (TEST_Z(_flag_a, _flag_b)) goto L_3000931B; /* 0x300092ED: je 0x3000931b */ 4523 L_300092EF: 4524 eax = MEM32(esi + (-0x4)); /* 0x300092EF: mov eax, dword ptr [esi - 4] */ 4525 PUSH32(esp, edi); /* 0x300092F2: push edi */ 4526 PUSH32(esp, 0x30009390u); /* 0x300092F3: push 0x30009390 */ 4527 edi = esi + (-0x4); /* 0x300092F8: lea edi, [esi - 4] */ 4528 PUSH32(esp, eax); /* 0x300092FB: push eax */ 4529 PUSH32(esp, 0x54u); /* 0x300092FC: push 0x54 */ 4530 PUSH32(esp, esi); /* 0x300092FE: push esi */ 4531 RECOMP_ICALL(0x300180FEu); /* 0x300092FF: call 0x300180fe */ /* not lifted */ 4532 RECOMP_FLAGS_IN(); 4533 /* test LO8(ebx), 1 */ /* 0x30009304: test bl, 1 */ 4534 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 4535 _cf = 0; 4536 _flag_k = FK_NARROW(FK_TEST, 24); 4537 if (TEST_Z(_flag_a, _flag_b)) goto L_30009312; /* 0x30009307: je 0x30009312 */ 4538 L_30009309: 4539 PUSH32(esp, edi); /* 0x30009309: push edi */ 4540 RECOMP_ICALL(0x30018080u); /* 0x3000930A: call 0x30018080 */ /* not lifted */ 4541 RECOMP_FLAGS_IN(); 4542 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4543 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4544 esp = esp + 4; /* 0x3000930F: add esp, 4 */ 4545 _flag_k = FK_ADD; 4546 L_30009312: 4547 eax = edi; /* 0x30009312: mov eax, edi */ 4548 edi = POP32_VAL(esp); /* 0x30009314: pop edi */ 4549 esi = POP32_VAL(esp); /* 0x30009315: pop esi */ 4550 ebx = POP32_VAL(esp); /* 0x30009316: pop ebx */ 4551 ebp = POP32_VAL(esp); /* 0x30009317: pop ebp */ 4552 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30009318: ret 4 */ 4553 L_3000931B: 4554 ecx = esi; /* 0x3000931B: mov ecx, esi */ 4555 RECOMP_ICALL(0x30009390u); /* 0x3000931D: call 0x30009390 */ /* not lifted */ 4556 RECOMP_FLAGS_IN(); 4557 /* test LO8(ebx), 1 */ /* 0x30009322: test bl, 1 */ 4558 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 4559 _cf = 0; 4560 _flag_k = FK_NARROW(FK_TEST, 24); 4561 if (TEST_Z(_flag_a, _flag_b)) goto L_30009330; /* 0x30009325: je 0x30009330 */ 4562 L_30009327: 4563 PUSH32(esp, esi); /* 0x30009327: push esi */ 4564 RECOMP_ICALL(0x30018080u); /* 0x30009328: call 0x30018080 */ /* not lifted */ 4565 RECOMP_FLAGS_IN(); 4566 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4567 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4568 esp = esp + 4; /* 0x3000932D: add esp, 4 */ 4569 _flag_k = FK_ADD; 4570 L_30009330: 4571 eax = esi; /* 0x30009330: mov eax, esi */ 4572 esi = POP32_VAL(esp); /* 0x30009332: pop esi */ 4573 ebx = POP32_VAL(esp); /* 0x30009333: pop ebx */ 4574 ebp = POP32_VAL(esp); /* 0x30009334: pop ebp */ 4575 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30009335: ret 4 */ 4576 RECOMP_REGS_OUT(); 4577 } 4578 4579 void sub_30009340(void) { 4580 int _fpu_cmp = 0; 4581 uint32_t _cf = 0; 4582 int _df = 1; 4583 uint32_t _flag_k = FK_NONE; 4584 uint32_t _flag_a = 0, _flag_b = 0; 4585 uint32_t _itail_tgt = 0; 4586 RECOMP_REGS_LOCALS 4587 RECOMP_ENTER(0x30009340u); 4588 4589 L_30009340: 4590 PUSH32(esp, esi); /* 0x30009340: push esi */ 4591 esi = ecx; /* 0x30009341: mov esi, ecx */ 4592 RECOMP_ICALL(0x30005550u); /* 0x30009343: call 0x30005550 */ /* not lifted */ 4593 RECOMP_FLAGS_IN(); 4594 MEM32(esi) = 0x3001924Cu; /* 0x30009348: mov dword ptr [esi], 0x3001924c */ 4595 eax = esi; /* 0x3000934E: mov eax, esi */ 4596 esi = POP32_VAL(esp); /* 0x30009350: pop esi */ 4597 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30009351: ret */ 4598 RECOMP_REGS_OUT(); 4599 } 4600 4601 void sub_30009360(void) { 4602 int _fpu_cmp = 0; 4603 uint32_t _cf = 0; 4604 int _df = 1; 4605 uint32_t _flag_k = FK_NONE; 4606 uint32_t _flag_a = 0, _flag_b = 0; 4607 uint32_t _itail_tgt = 0; 4608 RECOMP_REGS_LOCALS 4609 RECOMP_ENTER(0x30009360u); 4610 4611 L_30009360: 4612 PUSH32(esp, ebp); /* 0x30009360: push ebp */ 4613 ebp = esp; /* 0x30009361: mov ebp, esp */ 4614 eax = MEM32(ebp + 0xC); /* 0x30009363: mov eax, dword ptr [ebp + 0xc] */ 4615 PUSH32(esp, esi); /* 0x30009366: push esi */ 4616 esi = ecx; /* 0x30009367: mov esi, ecx */ 4617 ecx = MEM32(ebp + 0x8); /* 0x30009369: mov ecx, dword ptr [ebp + 8] */ 4618 PUSH32(esp, eax); /* 0x3000936C: push eax */ 4619 PUSH32(esp, ecx); /* 0x3000936D: push ecx */ 4620 ecx = esi; /* 0x3000936E: mov ecx, esi */ 4621 RECOMP_ICALL(0x300055D0u); /* 0x30009370: call 0x300055d0 */ /* not lifted */ 4622 RECOMP_FLAGS_IN(); 4623 MEM32(esi) = 0x3001924Cu; /* 0x30009375: mov dword ptr [esi], 0x3001924c */ 4624 eax = esi; /* 0x3000937B: mov eax, esi */ 4625 esi = POP32_VAL(esp); /* 0x3000937D: pop esi */ 4626 ebp = POP32_VAL(esp); /* 0x3000937E: pop ebp */ 4627 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3000937F: ret 8 */ 4628 RECOMP_REGS_OUT(); 4629 } 4630 4631 void sub_30009390(void) { 4632 int _fpu_cmp = 0; 4633 uint32_t _cf = 0; 4634 int _df = 1; 4635 uint32_t _flag_k = FK_NONE; 4636 uint32_t _flag_a = 0, _flag_b = 0; 4637 uint32_t _itail_tgt = 0; 4638 RECOMP_REGS_LOCALS 4639 RECOMP_ENTER(0x30009390u); 4640 4641 goto L_30009390; 4642 L_30005670: 4643 MEM32(ecx) = 0x30019188u; /* 0x30005670: mov dword ptr [ecx], 0x30019188 */ 4644 goto L_30006450; /* 0x30005676: jmp 0x30006450 */ 4645 L_30006450: 4646 MEM32(ecx) = 0x300191C0u; /* 0x30006450: mov dword ptr [ecx], 0x300191c0 */ 4647 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30006456: ret */ 4648 L_30009390: 4649 MEM32(ecx) = 0x3001924Cu; /* 0x30009390: mov dword ptr [ecx], 0x3001924c */ 4650 RECOMP_BACKEDGE(); 4651 goto L_30005670; /* 0x30009396: jmp 0x30005670 */ 4652 { RECOMP_REGS_OUT(); return; } /* end of function */ 4653 RECOMP_REGS_OUT(); 4654 } 4655 4656 void sub_300093A0(void) { 4657 int _fpu_cmp = 0; 4658 uint32_t _cf = 0; 4659 int _df = 1; 4660 uint32_t _flag_k = FK_NONE; 4661 uint32_t _flag_a = 0, _flag_b = 0; 4662 uint32_t _itail_tgt = 0; 4663 RECOMP_REGS_LOCALS 4664 RECOMP_ENTER(0x300093A0u); 4665 4666 L_300093A0: 4667 PUSH32(esp, ebp); /* 0x300093A0: push ebp */ 4668 ebp = esp; /* 0x300093A1: mov ebp, esp */ 4669 PUSH32(esp, 0xFFFFFFFFu); /* 0x300093A3: push -1 */ 4670 PUSH32(esp, 0x300187EBu); /* 0x300093A5: push 0x300187eb */ 4671 eax = MEM32(FS_BASE + (0)); /* 0x300093AA: mov eax, dword ptr fs:[0] */ 4672 PUSH32(esp, eax); /* 0x300093B0: push eax */ 4673 MEM32(FS_BASE + (0)) = esp; /* 0x300093B1: mov dword ptr fs:[0], esp */ 4674 PUSH32(esp, ecx); /* 0x300093B8: push ecx */ 4675 PUSH32(esp, esi); /* 0x300093B9: push esi */ 4676 PUSH32(esp, 0x54u); /* 0x300093BA: push 0x54 */ 4677 esi = ecx; /* 0x300093BC: mov esi, ecx */ 4678 RECOMP_ICALL(0x300180A8u); /* 0x300093BE: call 0x300180a8 */ /* not lifted */ 4679 RECOMP_FLAGS_IN(); 4680 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4681 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4682 esp = esp + 4; /* 0x300093C3: add esp, 4 */ 4683 _flag_k = FK_ADD; 4684 MEM32(ebp + (-0x10)) = eax; /* 0x300093C6: mov dword ptr [ebp - 0x10], eax */ 4685 /* test eax, eax */ /* 0x300093C9: test eax, eax */ 4686 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4687 _cf = 0; 4688 _flag_k = FK_TEST; 4689 MEM32(ebp + (-0x4)) = 0; /* 0x300093CB: mov dword ptr [ebp - 4], 0 */ 4690 if (TEST_Z(_flag_a, _flag_b)) goto L_300093F2; /* 0x300093D2: je 0x300093f2 */ 4691 L_300093D4: 4692 ecx = esi + 0x24; /* 0x300093D4: lea ecx, [esi + 0x24] */ 4693 PUSH32(esp, ecx); /* 0x300093D7: push ecx */ 4694 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x18u); 4695 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4696 esi = esi + 0x18u; /* 0x300093D8: add esi, 0x18 */ 4697 _flag_k = FK_ADD; 4698 PUSH32(esp, esi); /* 0x300093DB: push esi */ 4699 ecx = eax; /* 0x300093DC: mov ecx, eax */ 4700 RECOMP_ICALL(0x30009360u); /* 0x300093DE: call 0x30009360 */ /* not lifted */ 4701 RECOMP_FLAGS_IN(); 4702 esi = POP32_VAL(esp); /* 0x300093E3: pop esi */ 4703 ecx = MEM32(ebp + (-0xC)); /* 0x300093E4: mov ecx, dword ptr [ebp - 0xc] */ 4704 MEM32(FS_BASE + (0)) = ecx; /* 0x300093E7: mov dword ptr fs:[0], ecx */ 4705 esp = ebp; /* 0x300093EE: mov esp, ebp */ 4706 ebp = POP32_VAL(esp); /* 0x300093F0: pop ebp */ 4707 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300093F1: ret */ 4708 L_300093F2: 4709 ecx = MEM32(ebp + (-0xC)); /* 0x300093F2: mov ecx, dword ptr [ebp - 0xc] */ 4710 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4711 eax = 0; /* 0x300093F5: xor eax, eax */ 4712 _cf = 0; 4713 _flag_k = FK_TEST; 4714 esi = POP32_VAL(esp); /* 0x300093F7: pop esi */ 4715 MEM32(FS_BASE + (0)) = ecx; /* 0x300093F8: mov dword ptr fs:[0], ecx */ 4716 esp = ebp; /* 0x300093FF: mov esp, ebp */ 4717 ebp = POP32_VAL(esp); /* 0x30009401: pop ebp */ 4718 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30009402: ret */ 4719 RECOMP_REGS_OUT(); 4720 } 4721 4722 void sub_30009410(void) { 4723 int _fpu_cmp = 0; 4724 uint32_t _cf = 0; 4725 int _df = 1; 4726 uint32_t _flag_k = FK_NONE; 4727 uint32_t _flag_a = 0, _flag_b = 0; 4728 uint32_t _itail_tgt = 0; 4729 RECOMP_REGS_LOCALS 4730 RECOMP_ENTER(0x30009410u); 4731 4732 L_30009410: 4733 PUSH32(esp, ebp); /* 0x30009410: push ebp */ 4734 ebp = esp; /* 0x30009411: mov ebp, esp */ 4735 PUSH32(esp, ebx); /* 0x30009413: push ebx */ 4736 ebx = MEM32(ebp + 0x8); /* 0x30009414: mov ebx, dword ptr [ebp + 8] */ 4737 PUSH32(esp, esi); /* 0x30009417: push esi */ 4738 esi = ecx; /* 0x30009418: mov esi, ecx */ 4739 eax = MEM32(esi + 0x20); /* 0x3000941A: mov eax, dword ptr [esi + 0x20] */ 4740 ecx = MEM32(esi + 0x1C); /* 0x3000941D: mov ecx, dword ptr [esi + 0x1c] */ 4741 edx = MEM32(esi + 0x18); /* 0x30009420: mov edx, dword ptr [esi + 0x18] */ 4742 PUSH32(esp, edi); /* 0x30009423: push edi */ 4743 edi = MEM32(0x30019090); /* 0x30009424: mov edi, dword ptr [0x30019090] */ 4744 PUSH32(esp, eax); /* 0x3000942A: push eax */ 4745 PUSH32(esp, ecx); /* 0x3000942B: push ecx */ 4746 PUSH32(esp, edx); /* 0x3000942C: push edx */ 4747 ecx = ebx; /* 0x3000942D: mov ecx, ebx */ 4748 RECOMP_ICALL(edi); /* 0x3000942F: call edi */ 4749 RECOMP_FLAGS_IN(); 4750 ecx = eax; /* 0x30009431: mov ecx, eax */ 4751 RECOMP_ICALL(edi); /* 0x30009433: call edi */ 4752 RECOMP_FLAGS_IN(); 4753 ecx = eax; /* 0x30009435: mov ecx, eax */ 4754 RECOMP_ICALL(edi); /* 0x30009437: call edi */ 4755 RECOMP_FLAGS_IN(); 4756 eax = MEM32(esi + 0x2C); /* 0x30009439: mov eax, dword ptr [esi + 0x2c] */ 4757 ecx = MEM32(esi + 0x28); /* 0x3000943C: mov ecx, dword ptr [esi + 0x28] */ 4758 edx = MEM32(esi + 0x24); /* 0x3000943F: mov edx, dword ptr [esi + 0x24] */ 4759 PUSH32(esp, eax); /* 0x30009442: push eax */ 4760 PUSH32(esp, ecx); /* 0x30009443: push ecx */ 4761 PUSH32(esp, edx); /* 0x30009444: push edx */ 4762 ecx = ebx; /* 0x30009445: mov ecx, ebx */ 4763 RECOMP_ICALL(edi); /* 0x30009447: call edi */ 4764 RECOMP_FLAGS_IN(); 4765 ecx = eax; /* 0x30009449: mov ecx, eax */ 4766 RECOMP_ICALL(edi); /* 0x3000944B: call edi */ 4767 RECOMP_FLAGS_IN(); 4768 ecx = eax; /* 0x3000944D: mov ecx, eax */ 4769 RECOMP_ICALL(edi); /* 0x3000944F: call edi */ 4770 RECOMP_FLAGS_IN(); 4771 edi = POP32_VAL(esp); /* 0x30009451: pop edi */ 4772 esi = POP32_VAL(esp); /* 0x30009452: pop esi */ 4773 ebx = POP32_VAL(esp); /* 0x30009453: pop ebx */ 4774 ebp = POP32_VAL(esp); /* 0x30009454: pop ebp */ 4775 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30009455: ret 4 */ 4776 RECOMP_REGS_OUT(); 4777 } 4778 4779 void sub_30009460(void) { 4780 int _fpu_cmp = 0; 4781 uint32_t _cf = 0; 4782 int _df = 1; 4783 uint32_t _flag_k = FK_NONE; 4784 uint32_t _flag_a = 0, _flag_b = 0; 4785 uint32_t _itail_tgt = 0; 4786 RECOMP_REGS_LOCALS 4787 RECOMP_ENTER(0x30009460u); 4788 4789 L_30009460: 4790 PUSH32(esp, ebp); /* 0x30009460: push ebp */ 4791 ebp = esp; /* 0x30009461: mov ebp, esp */ 4792 PUSH32(esp, ebx); /* 0x30009463: push ebx */ 4793 ebx = MEM32(ebp + 0x8); /* 0x30009464: mov ebx, dword ptr [ebp + 8] */ 4794 PUSH32(esp, esi); /* 0x30009467: push esi */ 4795 esi = MEM32(0x3001909C); /* 0x30009468: mov esi, dword ptr [0x3001909c] */ 4796 PUSH32(esp, edi); /* 0x3000946E: push edi */ 4797 edi = ecx; /* 0x3000946F: mov edi, ecx */ 4798 eax = edi + 0x18; /* 0x30009471: lea eax, [edi + 0x18] */ 4799 ecx = eax + 0x8; /* 0x30009474: lea ecx, [eax + 8] */ 4800 PUSH32(esp, ecx); /* 0x30009477: push ecx */ 4801 edx = eax + 0x4; /* 0x30009478: lea edx, [eax + 4] */ 4802 PUSH32(esp, edx); /* 0x3000947B: push edx */ 4803 PUSH32(esp, eax); /* 0x3000947C: push eax */ 4804 ecx = ebx; /* 0x3000947D: mov ecx, ebx */ 4805 RECOMP_ICALL(esi); /* 0x3000947F: call esi */ 4806 RECOMP_FLAGS_IN(); 4807 ecx = eax; /* 0x30009481: mov ecx, eax */ 4808 RECOMP_ICALL(esi); /* 0x30009483: call esi */ 4809 RECOMP_FLAGS_IN(); 4810 ecx = eax; /* 0x30009485: mov ecx, eax */ 4811 RECOMP_ICALL(esi); /* 0x30009487: call esi */ 4812 RECOMP_FLAGS_IN(); 4813 eax = edi + 0x24; /* 0x30009489: lea eax, [edi + 0x24] */ 4814 ecx = eax + 0x8; /* 0x3000948C: lea ecx, [eax + 8] */ 4815 PUSH32(esp, ecx); /* 0x3000948F: push ecx */ 4816 edx = eax + 0x4; /* 0x30009490: lea edx, [eax + 4] */ 4817 PUSH32(esp, edx); /* 0x30009493: push edx */ 4818 PUSH32(esp, eax); /* 0x30009494: push eax */ 4819 ecx = ebx; /* 0x30009495: mov ecx, ebx */ 4820 RECOMP_ICALL(esi); /* 0x30009497: call esi */ 4821 RECOMP_FLAGS_IN(); 4822 ecx = eax; /* 0x30009499: mov ecx, eax */ 4823 RECOMP_ICALL(esi); /* 0x3000949B: call esi */ 4824 RECOMP_FLAGS_IN(); 4825 ecx = eax; /* 0x3000949D: mov ecx, eax */ 4826 RECOMP_ICALL(esi); /* 0x3000949F: call esi */ 4827 RECOMP_FLAGS_IN(); 4828 edi = POP32_VAL(esp); /* 0x300094A1: pop edi */ 4829 esi = POP32_VAL(esp); /* 0x300094A2: pop esi */ 4830 ebx = POP32_VAL(esp); /* 0x300094A3: pop ebx */ 4831 ebp = POP32_VAL(esp); /* 0x300094A4: pop ebp */ 4832 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x300094A5: ret 4 */ 4833 RECOMP_REGS_OUT(); 4834 } 4835 4836 void sub_300094B0(void) { 4837 int _fpu_cmp = 0; 4838 uint32_t _cf = 0; 4839 int _df = 1; 4840 uint32_t _flag_k = FK_NONE; 4841 uint32_t _flag_a = 0, _flag_b = 0; 4842 uint32_t _itail_tgt = 0; 4843 RECOMP_REGS_LOCALS 4844 RECOMP_ENTER(0x300094B0u); 4845 4846 L_300094B0: 4847 RECOMP_ICALL(0x300094C0u); /* 0x300094B0: call 0x300094c0 */ /* not lifted */ 4848 RECOMP_FLAGS_IN(); 4849 goto L_300094D0; /* 0x300094B5: jmp 0x300094d0 */ 4850 L_300094D0: 4851 PUSH32(esp, 0x300094E0u); /* 0x300094D0: push 0x300094e0 */ 4852 RECOMP_ICALL(0x300180ECu); /* 0x300094D5: call 0x300180ec */ /* not lifted */ 4853 RECOMP_FLAGS_IN(); 4854 ecx = POP32_VAL(esp); /* 0x300094DA: pop ecx */ 4855 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300094DB: ret */ 4856 RECOMP_REGS_OUT(); 4857 } 4858 4859 void sub_300094C0(void) { 4860 int _fpu_cmp = 0; 4861 uint32_t _cf = 0; 4862 int _df = 1; 4863 uint32_t _flag_k = FK_NONE; 4864 uint32_t _flag_a = 0, _flag_b = 0; 4865 uint32_t _itail_tgt = 0; 4866 RECOMP_REGS_LOCALS 4867 RECOMP_ENTER(0x300094C0u); 4868 4869 L_300094C0: 4870 ecx = 0x3001E3E1u; /* 0x300094C0: mov ecx, 0x3001e3e1 */ 4871 L_300094C5: 4872 { _itail_tgt = (uint32_t)(MEM32(0x30019018)); goto _ljump; } 4873 { RECOMP_REGS_OUT(); return; } /* end of function */ 4874 _ljump: 4875 switch (_itail_tgt) { 4876 case 0x300094C0u: goto L_300094C0; 4877 case 0x300094C5u: goto L_300094C5; 4878 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4879 } 4880 RECOMP_REGS_OUT(); 4881 } 4882 4883 void sub_300094D0(void) { 4884 int _fpu_cmp = 0; 4885 uint32_t _cf = 0; 4886 int _df = 1; 4887 uint32_t _flag_k = FK_NONE; 4888 uint32_t _flag_a = 0, _flag_b = 0; 4889 uint32_t _itail_tgt = 0; 4890 RECOMP_REGS_LOCALS 4891 RECOMP_ENTER(0x300094D0u); 4892 4893 L_300094D0: 4894 PUSH32(esp, 0x300094E0u); /* 0x300094D0: push 0x300094e0 */ 4895 RECOMP_ICALL(0x300180ECu); /* 0x300094D5: call 0x300180ec */ /* not lifted */ 4896 RECOMP_FLAGS_IN(); 4897 ecx = POP32_VAL(esp); /* 0x300094DA: pop ecx */ 4898 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300094DB: ret */ 4899 RECOMP_REGS_OUT(); 4900 } 4901 4902 void sub_300094E0(void) { 4903 int _fpu_cmp = 0; 4904 uint32_t _cf = 0; 4905 int _df = 1; 4906 uint32_t _flag_k = FK_NONE; 4907 uint32_t _flag_a = 0, _flag_b = 0; 4908 uint32_t _itail_tgt = 0; 4909 RECOMP_REGS_LOCALS 4910 RECOMP_ENTER(0x300094E0u); 4911 4912 L_300094E0: 4913 ecx = 0x3001E3E1u; /* 0x300094E0: mov ecx, 0x3001e3e1 */ 4914 L_300094E5: 4915 { _itail_tgt = (uint32_t)(MEM32(0x3001901C)); goto _ljump; } 4916 { RECOMP_REGS_OUT(); return; } /* end of function */ 4917 _ljump: 4918 switch (_itail_tgt) { 4919 case 0x300094E0u: goto L_300094E0; 4920 case 0x300094E5u: goto L_300094E5; 4921 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4922 } 4923 RECOMP_REGS_OUT(); 4924 } 4925 4926 void sub_300094F0(void) { 4927 int _fpu_cmp = 0; 4928 uint32_t _cf = 0; 4929 int _df = 1; 4930 uint32_t _flag_k = FK_NONE; 4931 uint32_t _flag_a = 0, _flag_b = 0; 4932 uint32_t _itail_tgt = 0; 4933 RECOMP_REGS_LOCALS 4934 RECOMP_ENTER(0x300094F0u); 4935 4936 L_300094F0: 4937 RECOMP_ICALL(0x30009500u); /* 0x300094F0: call 0x30009500 */ /* not lifted */ 4938 RECOMP_FLAGS_IN(); 4939 goto L_30009510; /* 0x300094F5: jmp 0x30009510 */ 4940 L_30009510: 4941 PUSH32(esp, 0x30009520u); /* 0x30009510: push 0x30009520 */ 4942 RECOMP_ICALL(0x300180ECu); /* 0x30009515: call 0x300180ec */ /* not lifted */ 4943 RECOMP_FLAGS_IN(); 4944 ecx = POP32_VAL(esp); /* 0x3000951A: pop ecx */ 4945 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000951B: ret */ 4946 RECOMP_REGS_OUT(); 4947 } 4948 4949 void sub_30009500(void) { 4950 int _fpu_cmp = 0; 4951 uint32_t _cf = 0; 4952 int _df = 1; 4953 uint32_t _flag_k = FK_NONE; 4954 uint32_t _flag_a = 0, _flag_b = 0; 4955 uint32_t _itail_tgt = 0; 4956 RECOMP_REGS_LOCALS 4957 RECOMP_ENTER(0x30009500u); 4958 4959 L_30009500: 4960 ecx = 0x3001E3E0u; /* 0x30009500: mov ecx, 0x3001e3e0 */ 4961 L_30009505: 4962 { _itail_tgt = (uint32_t)(MEM32(0x30019020)); goto _ljump; } 4963 { RECOMP_REGS_OUT(); return; } /* end of function */ 4964 _ljump: 4965 switch (_itail_tgt) { 4966 case 0x30009500u: goto L_30009500; 4967 case 0x30009505u: goto L_30009505; 4968 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4969 } 4970 RECOMP_REGS_OUT(); 4971 } 4972 4973 void sub_30009510(void) { 4974 int _fpu_cmp = 0; 4975 uint32_t _cf = 0; 4976 int _df = 1; 4977 uint32_t _flag_k = FK_NONE; 4978 uint32_t _flag_a = 0, _flag_b = 0; 4979 uint32_t _itail_tgt = 0; 4980 RECOMP_REGS_LOCALS 4981 RECOMP_ENTER(0x30009510u); 4982 4983 L_30009510: 4984 PUSH32(esp, 0x30009520u); /* 0x30009510: push 0x30009520 */ 4985 RECOMP_ICALL(0x300180ECu); /* 0x30009515: call 0x300180ec */ /* not lifted */ 4986 RECOMP_FLAGS_IN(); 4987 ecx = POP32_VAL(esp); /* 0x3000951A: pop ecx */ 4988 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000951B: ret */ 4989 RECOMP_REGS_OUT(); 4990 } 4991 4992 void sub_30009520(void) { 4993 int _fpu_cmp = 0; 4994 uint32_t _cf = 0; 4995 int _df = 1; 4996 uint32_t _flag_k = FK_NONE; 4997 uint32_t _flag_a = 0, _flag_b = 0; 4998 uint32_t _itail_tgt = 0; 4999 RECOMP_REGS_LOCALS 5000 RECOMP_ENTER(0x30009520u); 5001 5002 L_30009520: 5003 ecx = 0x3001E3E0u; /* 0x30009520: mov ecx, 0x3001e3e0 */ 5004 L_30009525: 5005 { _itail_tgt = (uint32_t)(MEM32(0x30019024)); goto _ljump; } 5006 { RECOMP_REGS_OUT(); return; } /* end of function */ 5007 _ljump: 5008 switch (_itail_tgt) { 5009 case 0x30009520u: goto L_30009520; 5010 case 0x30009525u: goto L_30009525; 5011 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 5012 } 5013 RECOMP_REGS_OUT(); 5014 } 5015 5016 void sub_30009530(void) { 5017 int _fpu_cmp = 0; 5018 uint32_t _cf = 0; 5019 int _df = 1; 5020 uint32_t _flag_k = FK_NONE; 5021 uint32_t _flag_a = 0, _flag_b = 0; 5022 uint32_t _itail_tgt = 0; 5023 RECOMP_REGS_LOCALS 5024 RECOMP_ENTER(0x30009530u); 5025 5026 L_30009530: 5027 PUSH32(esp, esi); /* 0x30009530: push esi */ 5028 esi = ecx; /* 0x30009531: mov esi, ecx */ 5029 RECOMP_ICALL(0x300076E0u); /* 0x30009533: call 0x300076e0 */ /* not lifted */ 5030 RECOMP_FLAGS_IN(); 5031 MEM32(esi) = 0x30019264u; /* 0x30009538: mov dword ptr [esi], 0x30019264 */ 5032 eax = esi; /* 0x3000953E: mov eax, esi */ 5033 esi = POP32_VAL(esp); /* 0x30009540: pop esi */ 5034 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30009541: ret */ 5035 RECOMP_REGS_OUT(); 5036 } 5037 5038 void sub_30009550(void) { 5039 int _fpu_cmp = 0; 5040 uint32_t _cf = 0; 5041 int _df = 1; 5042 uint32_t _flag_k = FK_NONE; 5043 uint32_t _flag_a = 0, _flag_b = 0; 5044 uint32_t _itail_tgt = 0; 5045 RECOMP_REGS_LOCALS 5046 RECOMP_ENTER(0x30009550u); 5047 5048 L_30009550: 5049 PUSH32(esp, ebp); /* 0x30009550: push ebp */ 5050 ebp = esp; /* 0x30009551: mov ebp, esp */ 5051 eax = ecx; /* 0x30009553: mov eax, ecx */ 5052 ecx = MEM32(ebp + 0x8); /* 0x30009555: mov ecx, dword ptr [ebp + 8] */ 5053 PUSH32(esp, esi); /* 0x30009558: push esi */ 5054 MEM32(eax) = 0x300191ACu; /* 0x30009559: mov dword ptr [eax], 0x300191ac */ 5055 PUSH32(esp, edi); /* 0x3000955F: push edi */ 5056 edx = ecx + 0x4; /* 0x30009560: lea edx, [ecx + 4] */ 5057 edi = MEM32(edx); /* 0x30009563: mov edi, dword ptr [edx] */ 5058 esi = eax + 0x4; /* 0x30009565: lea esi, [eax + 4] */ 5059 MEM32(esi) = edi; /* 0x30009568: mov dword ptr [esi], edi */ 5060 edi = MEM32(edx + 0x4); /* 0x3000956A: mov edi, dword ptr [edx + 4] */ 5061 MEM32(esi + 0x4) = edi; /* 0x3000956D: mov dword ptr [esi + 4], edi */ 5062 edx = MEM32(edx + 0x8); /* 0x30009570: mov edx, dword ptr [edx + 8] */ 5063 MEM32(esi + 0x8) = edx; /* 0x30009573: mov dword ptr [esi + 8], edx */ 5064 edx = MEM32(ecx + 0x10); /* 0x30009576: mov edx, dword ptr [ecx + 0x10] */ 5065 MEM32(eax + 0x10) = edx; /* 0x30009579: mov dword ptr [eax + 0x10], edx */ 5066 edx = MEM32(ecx + 0x14); /* 0x3000957C: mov edx, dword ptr [ecx + 0x14] */ 5067 MEM32(eax) = 0x300191C0u; /* 0x3000957F: mov dword ptr [eax], 0x300191c0 */ 5068 MEM32(eax + 0x14) = edx; /* 0x30009585: mov dword ptr [eax + 0x14], edx */ 5069 ecx = MEM32(ecx + 0x18); /* 0x30009588: mov ecx, dword ptr [ecx + 0x18] */ 5070 edi = POP32_VAL(esp); /* 0x3000958B: pop edi */ 5071 MEM32(eax + 0x18) = ecx; /* 0x3000958C: mov dword ptr [eax + 0x18], ecx */ 5072 MEM32(eax) = 0x30019264u; /* 0x3000958F: mov dword ptr [eax], 0x30019264 */ 5073 esi = POP32_VAL(esp); /* 0x30009595: pop esi */ 5074 ebp = POP32_VAL(esp); /* 0x30009596: pop ebp */ 5075 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30009597: ret 4 */ 5076 RECOMP_REGS_OUT(); 5077 } 5078 5079 void sub_300095A0(void) { 5080 int _fpu_cmp = 0; 5081 uint32_t _cf = 0; 5082 int _df = 1; 5083 uint32_t _flag_k = FK_NONE; 5084 uint32_t _flag_a = 0, _flag_b = 0; 5085 uint32_t _itail_tgt = 0; 5086 RECOMP_REGS_LOCALS 5087 RECOMP_ENTER(0x300095A0u); 5088 5089 L_300095A0: 5090 PUSH32(esp, ebp); /* 0x300095A0: push ebp */ 5091 ebp = esp; /* 0x300095A1: mov ebp, esp */ 5092 eax = ecx; /* 0x300095A3: mov eax, ecx */ 5093 ecx = MEM32(ebp + 0x8); /* 0x300095A5: mov ecx, dword ptr [ebp + 8] */ 5094 PUSH32(esp, esi); /* 0x300095A8: push esi */ 5095 PUSH32(esp, edi); /* 0x300095A9: push edi */ 5096 edx = ecx + 0x4; /* 0x300095AA: lea edx, [ecx + 4] */ 5097 edi = MEM32(edx); /* 0x300095AD: mov edi, dword ptr [edx] */ 5098 esi = eax + 0x4; /* 0x300095AF: lea esi, [eax + 4] */ 5099 MEM32(esi) = edi; /* 0x300095B2: mov dword ptr [esi], edi */ 5100 edi = MEM32(edx + 0x4); /* 0x300095B4: mov edi, dword ptr [edx + 4] */ 5101 MEM32(esi + 0x4) = edi; /* 0x300095B7: mov dword ptr [esi + 4], edi */ 5102 edx = MEM32(edx + 0x8); /* 0x300095BA: mov edx, dword ptr [edx + 8] */ 5103 MEM32(esi + 0x8) = edx; /* 0x300095BD: mov dword ptr [esi + 8], edx */ 5104 edx = MEM32(ecx + 0x10); /* 0x300095C0: mov edx, dword ptr [ecx + 0x10] */ 5105 MEM32(eax + 0x10) = edx; /* 0x300095C3: mov dword ptr [eax + 0x10], edx */ 5106 edx = MEM32(ecx + 0x14); /* 0x300095C6: mov edx, dword ptr [ecx + 0x14] */ 5107 MEM32(eax + 0x14) = edx; /* 0x300095C9: mov dword ptr [eax + 0x14], edx */ 5108 ecx = MEM32(ecx + 0x18); /* 0x300095CC: mov ecx, dword ptr [ecx + 0x18] */ 5109 edi = POP32_VAL(esp); /* 0x300095CF: pop edi */ 5110 MEM32(eax + 0x18) = ecx; /* 0x300095D0: mov dword ptr [eax + 0x18], ecx */ 5111 esi = POP32_VAL(esp); /* 0x300095D3: pop esi */ 5112 ebp = POP32_VAL(esp); /* 0x300095D4: pop ebp */ 5113 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x300095D5: ret 4 */ 5114 RECOMP_REGS_OUT(); 5115 } 5116 5117 void sub_300095E0(void) { 5118 int _fpu_cmp = 0; 5119 uint32_t _cf = 0; 5120 int _df = 1; 5121 uint32_t _flag_k = FK_NONE; 5122 uint32_t _flag_a = 0, _flag_b = 0; 5123 uint32_t _itail_tgt = 0; 5124 RECOMP_REGS_LOCALS 5125 RECOMP_ENTER(0x300095E0u); 5126 5127 L_300095E0: 5128 PUSH32(esp, ebp); /* 0x300095E0: push ebp */ 5129 ebp = esp; /* 0x300095E1: mov ebp, esp */ 5130 PUSH32(esp, ebx); /* 0x300095E3: push ebx */ 5131 SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x300095E4: mov bl, byte ptr [ebp + 8] */ 5132 /* test LO8(ebx), 2 */ /* 0x300095E7: test bl, 2 */ 5133 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 5134 _cf = 0; 5135 _flag_k = FK_NARROW(FK_TEST, 24); 5136 PUSH32(esp, esi); /* 0x300095EA: push esi */ 5137 esi = ecx; /* 0x300095EB: mov esi, ecx */ 5138 if (TEST_Z(_flag_a, _flag_b)) goto L_3000961B; /* 0x300095ED: je 0x3000961b */ 5139 L_300095EF: 5140 eax = MEM32(esi + (-0x4)); /* 0x300095EF: mov eax, dword ptr [esi - 4] */ 5141 PUSH32(esp, edi); /* 0x300095F2: push edi */ 5142 PUSH32(esp, 0x30009670u); /* 0x300095F3: push 0x30009670 */ 5143 edi = esi + (-0x4); /* 0x300095F8: lea edi, [esi - 4] */ 5144 PUSH32(esp, eax); /* 0x300095FB: push eax */ 5145 PUSH32(esp, 0x1Cu); /* 0x300095FC: push 0x1c */ 5146 PUSH32(esp, esi); /* 0x300095FE: push esi */ 5147 RECOMP_ICALL(0x300180FEu); /* 0x300095FF: call 0x300180fe */ /* not lifted */ 5148 RECOMP_FLAGS_IN(); 5149 /* test LO8(ebx), 1 */ /* 0x30009604: test bl, 1 */ 5150 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 5151 _cf = 0; 5152 _flag_k = FK_NARROW(FK_TEST, 24); 5153 if (TEST_Z(_flag_a, _flag_b)) goto L_30009612; /* 0x30009607: je 0x30009612 */ 5154 L_30009609: 5155 PUSH32(esp, edi); /* 0x30009609: push edi */ 5156 RECOMP_ICALL(0x30018080u); /* 0x3000960A: call 0x30018080 */ /* not lifted */ 5157 RECOMP_FLAGS_IN(); 5158 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5159 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5160 esp = esp + 4; /* 0x3000960F: add esp, 4 */ 5161 _flag_k = FK_ADD; 5162 L_30009612: 5163 eax = edi; /* 0x30009612: mov eax, edi */ 5164 edi = POP32_VAL(esp); /* 0x30009614: pop edi */ 5165 esi = POP32_VAL(esp); /* 0x30009615: pop esi */ 5166 ebx = POP32_VAL(esp); /* 0x30009616: pop ebx */ 5167 ebp = POP32_VAL(esp); /* 0x30009617: pop ebp */ 5168 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30009618: ret 4 */ 5169 L_3000961B: 5170 ecx = esi; /* 0x3000961B: mov ecx, esi */ 5171 RECOMP_ICALL(0x30009670u); /* 0x3000961D: call 0x30009670 */ /* not lifted */ 5172 RECOMP_FLAGS_IN(); 5173 /* test LO8(ebx), 1 */ /* 0x30009622: test bl, 1 */ 5174 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 5175 _cf = 0; 5176 _flag_k = FK_NARROW(FK_TEST, 24); 5177 if (TEST_Z(_flag_a, _flag_b)) goto L_30009630; /* 0x30009625: je 0x30009630 */ 5178 L_30009627: 5179 PUSH32(esp, esi); /* 0x30009627: push esi */ 5180 RECOMP_ICALL(0x30018080u); /* 0x30009628: call 0x30018080 */ /* not lifted */ 5181 RECOMP_FLAGS_IN(); 5182 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5183 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5184 esp = esp + 4; /* 0x3000962D: add esp, 4 */ 5185 _flag_k = FK_ADD; 5186 L_30009630: 5187 eax = esi; /* 0x30009630: mov eax, esi */ 5188 esi = POP32_VAL(esp); /* 0x30009632: pop esi */ 5189 ebx = POP32_VAL(esp); /* 0x30009633: pop ebx */ 5190 ebp = POP32_VAL(esp); /* 0x30009634: pop ebp */ 5191 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30009635: ret 4 */ 5192 RECOMP_REGS_OUT(); 5193 } 5194 5195 void sub_30009640(void) { 5196 int _fpu_cmp = 0; 5197 uint32_t _cf = 0; 5198 int _df = 1; 5199 uint32_t _flag_k = FK_NONE; 5200 uint32_t _flag_a = 0, _flag_b = 0; 5201 uint32_t _itail_tgt = 0; 5202 RECOMP_REGS_LOCALS 5203 RECOMP_ENTER(0x30009640u); 5204 5205 L_30009640: 5206 PUSH32(esp, ebp); /* 0x30009640: push ebp */ 5207 ebp = esp; /* 0x30009641: mov ebp, esp */ 5208 eax = MEM32(ebp + 0x14); /* 0x30009643: mov eax, dword ptr [ebp + 0x14] */ 5209 PUSH32(esp, esi); /* 0x30009646: push esi */ 5210 esi = ecx; /* 0x30009647: mov esi, ecx */ 5211 PUSH32(esp, eax); /* 0x30009649: push eax */ 5212 RECOMP_ICALL(0x30007700u); /* 0x3000964A: call 0x30007700 */ /* not lifted */ 5213 RECOMP_FLAGS_IN(); 5214 edx = MEM32(ebp + 0x8); /* 0x3000964F: mov edx, dword ptr [ebp + 8] */ 5215 eax = MEM32(ebp + 0xC); /* 0x30009652: mov eax, dword ptr [ebp + 0xc] */ 5216 ecx = esi + 0x4; /* 0x30009655: lea ecx, [esi + 4] */ 5217 MEM32(ecx) = edx; /* 0x30009658: mov dword ptr [ecx], edx */ 5218 edx = MEM32(ebp + 0x10); /* 0x3000965A: mov edx, dword ptr [ebp + 0x10] */ 5219 MEM32(ecx + 0x4) = eax; /* 0x3000965D: mov dword ptr [ecx + 4], eax */ 5220 MEM32(esi) = 0x30019264u; /* 0x30009660: mov dword ptr [esi], 0x30019264 */ 5221 eax = esi; /* 0x30009666: mov eax, esi */ 5222 MEM32(ecx + 0x8) = edx; /* 0x30009668: mov dword ptr [ecx + 8], edx */ 5223 esi = POP32_VAL(esp); /* 0x3000966B: pop esi */ 5224 ebp = POP32_VAL(esp); /* 0x3000966C: pop ebp */ 5225 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3000966D: ret 0x10 */ 5226 RECOMP_REGS_OUT(); 5227 } 5228 5229 void sub_30009670(void) { 5230 int _fpu_cmp = 0; 5231 uint32_t _cf = 0; 5232 int _df = 1; 5233 uint32_t _flag_k = FK_NONE; 5234 uint32_t _flag_a = 0, _flag_b = 0; 5235 uint32_t _itail_tgt = 0; 5236 RECOMP_REGS_LOCALS 5237 RECOMP_ENTER(0x30009670u); 5238 5239 goto L_30009670; 5240 L_30006450: 5241 MEM32(ecx) = 0x300191C0u; /* 0x30006450: mov dword ptr [ecx], 0x300191c0 */ 5242 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30006456: ret */ 5243 L_30007720: 5244 MEM32(ecx) = 0x30019220u; /* 0x30007720: mov dword ptr [ecx], 0x30019220 */ 5245 RECOMP_BACKEDGE(); 5246 goto L_30006450; /* 0x30007726: jmp 0x30006450 */ 5247 L_30009670: 5248 MEM32(ecx) = 0x30019264u; /* 0x30009670: mov dword ptr [ecx], 0x30019264 */ 5249 RECOMP_BACKEDGE(); 5250 goto L_30007720; /* 0x30009676: jmp 0x30007720 */ 5251 { RECOMP_REGS_OUT(); return; } /* end of function */ 5252 RECOMP_REGS_OUT(); 5253 } 5254 5255 void sub_30009680(void) { 5256 int _fpu_cmp = 0; 5257 uint32_t _cf = 0; 5258 int _df = 1; 5259 uint32_t _flag_k = FK_NONE; 5260 uint32_t _flag_a = 0, _flag_b = 0; 5261 uint32_t _itail_tgt = 0; 5262 RECOMP_REGS_LOCALS 5263 RECOMP_ENTER(0x30009680u); 5264 5265 L_30009680: 5266 PUSH32(esp, ebp); /* 0x30009680: push ebp */ 5267 ebp = esp; /* 0x30009681: mov ebp, esp */ 5268 PUSH32(esp, 0xFFFFFFFFu); /* 0x30009683: push -1 */ 5269 PUSH32(esp, 0x3001880Bu); /* 0x30009685: push 0x3001880b */ 5270 eax = MEM32(FS_BASE + (0)); /* 0x3000968A: mov eax, dword ptr fs:[0] */ 5271 PUSH32(esp, eax); /* 0x30009690: push eax */ 5272 MEM32(FS_BASE + (0)) = esp; /* 0x30009691: mov dword ptr fs:[0], esp */ 5273 PUSH32(esp, ecx); /* 0x30009698: push ecx */ 5274 PUSH32(esp, esi); /* 0x30009699: push esi */ 5275 PUSH32(esp, 0x1Cu); /* 0x3000969A: push 0x1c */ 5276 esi = ecx; /* 0x3000969C: mov esi, ecx */ 5277 RECOMP_ICALL(0x300180A8u); /* 0x3000969E: call 0x300180a8 */ /* not lifted */ 5278 RECOMP_FLAGS_IN(); 5279 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5280 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5281 esp = esp + 4; /* 0x300096A3: add esp, 4 */ 5282 _flag_k = FK_ADD; 5283 MEM32(ebp + (-0x10)) = eax; /* 0x300096A6: mov dword ptr [ebp - 0x10], eax */ 5284 /* test eax, eax */ /* 0x300096A9: test eax, eax */ 5285 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5286 _cf = 0; 5287 _flag_k = FK_TEST; 5288 MEM32(ebp + (-0x4)) = 0; /* 0x300096AB: mov dword ptr [ebp - 4], 0 */ 5289 if (TEST_Z(_flag_a, _flag_b)) goto L_300096E6; /* 0x300096B2: je 0x300096e6 */ 5290 L_300096B4: 5291 ecx = MEM32(esi + 0x18); /* 0x300096B4: mov ecx, dword ptr [esi + 0x18] */ 5292 PUSH32(esp, ecx); /* 0x300096B7: push ecx */ 5293 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 5294 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5295 esi = esi + 4; /* 0x300096B8: add esi, 4 */ 5296 _flag_k = FK_ADD; 5297 ecx = MEM32(esi); /* 0x300096BB: mov ecx, dword ptr [esi] */ 5298 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 5299 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5300 esp = esp - 0xCu; /* 0x300096BD: sub esp, 0xc */ 5301 _flag_k = FK_CMP; 5302 edx = esp; /* 0x300096C0: mov edx, esp */ 5303 MEM32(edx) = ecx; /* 0x300096C2: mov dword ptr [edx], ecx */ 5304 ecx = MEM32(esi + 0x4); /* 0x300096C4: mov ecx, dword ptr [esi + 4] */ 5305 MEM32(edx + 0x4) = ecx; /* 0x300096C7: mov dword ptr [edx + 4], ecx */ 5306 ecx = MEM32(esi + 0x8); /* 0x300096CA: mov ecx, dword ptr [esi + 8] */ 5307 MEM32(edx + 0x8) = ecx; /* 0x300096CD: mov dword ptr [edx + 8], ecx */ 5308 ecx = eax; /* 0x300096D0: mov ecx, eax */ 5309 RECOMP_ICALL(0x30009640u); /* 0x300096D2: call 0x30009640 */ /* not lifted */ 5310 RECOMP_FLAGS_IN(); 5311 ecx = MEM32(ebp + (-0xC)); /* 0x300096D7: mov ecx, dword ptr [ebp - 0xc] */ 5312 MEM32(FS_BASE + (0)) = ecx; /* 0x300096DA: mov dword ptr fs:[0], ecx */ 5313 esi = POP32_VAL(esp); /* 0x300096E1: pop esi */ 5314 esp = ebp; /* 0x300096E2: mov esp, ebp */ 5315 ebp = POP32_VAL(esp); /* 0x300096E4: pop ebp */ 5316 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300096E5: ret */ 5317 L_300096E6: 5318 ecx = MEM32(ebp + (-0xC)); /* 0x300096E6: mov ecx, dword ptr [ebp - 0xc] */ 5319 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5320 eax = 0; /* 0x300096E9: xor eax, eax */ 5321 _cf = 0; 5322 _flag_k = FK_TEST; 5323 MEM32(FS_BASE + (0)) = ecx; /* 0x300096EB: mov dword ptr fs:[0], ecx */ 5324 esi = POP32_VAL(esp); /* 0x300096F2: pop esi */ 5325 esp = ebp; /* 0x300096F3: mov esp, ebp */ 5326 ebp = POP32_VAL(esp); /* 0x300096F5: pop ebp */ 5327 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300096F6: ret */ 5328 RECOMP_REGS_OUT(); 5329 } 5330 5331 void sub_30009700(void) { 5332 int _fpu_cmp = 0; 5333 uint32_t _cf = 0; 5334 int _df = 1; 5335 uint32_t _flag_k = FK_NONE; 5336 uint32_t _flag_a = 0, _flag_b = 0; 5337 uint32_t _itail_tgt = 0; 5338 RECOMP_REGS_LOCALS 5339 RECOMP_ENTER(0x30009700u); 5340 5341 L_30009700: 5342 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30009700: ret 4 */ 5343 RECOMP_REGS_OUT(); 5344 } 5345 5346 void sub_30009710(void) { 5347 int _fpu_cmp = 0; 5348 uint32_t _cf = 0; 5349 int _df = 1; 5350 uint32_t _flag_k = FK_NONE; 5351 uint32_t _flag_a = 0, _flag_b = 0; 5352 uint32_t _itail_tgt = 0; 5353 RECOMP_REGS_LOCALS 5354 RECOMP_ENTER(0x30009710u); 5355 5356 L_30009710: 5357 SET_LO8(eax, 1); /* 0x30009710: mov al, 1 */ 5358 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30009712: ret */ 5359 RECOMP_REGS_OUT(); 5360 } 5361 5362 void sub_30009720(void) { 5363 int _fpu_cmp = 0; 5364 uint32_t _cf = 0; 5365 int _df = 1; 5366 uint32_t _flag_k = FK_NONE; 5367 uint32_t _flag_a = 0, _flag_b = 0; 5368 uint32_t _itail_tgt = 0; 5369 RECOMP_REGS_LOCALS 5370 RECOMP_ENTER(0x30009720u); 5371 5372 L_30009720: 5373 RECOMP_ICALL(0x30009730u); /* 0x30009720: call 0x30009730 */ /* not lifted */ 5374 RECOMP_FLAGS_IN(); 5375 goto L_30009740; /* 0x30009725: jmp 0x30009740 */ 5376 L_30009740: 5377 PUSH32(esp, 0x30009750u); /* 0x30009740: push 0x30009750 */ 5378 RECOMP_ICALL(0x300180ECu); /* 0x30009745: call 0x300180ec */ /* not lifted */ 5379 RECOMP_FLAGS_IN(); 5380 ecx = POP32_VAL(esp); /* 0x3000974A: pop ecx */ 5381 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000974B: ret */ 5382 RECOMP_REGS_OUT(); 5383 } 5384 5385 void sub_30009730(void) { 5386 int _fpu_cmp = 0; 5387 uint32_t _cf = 0; 5388 int _df = 1; 5389 uint32_t _flag_k = FK_NONE; 5390 uint32_t _flag_a = 0, _flag_b = 0; 5391 uint32_t _itail_tgt = 0; 5392 RECOMP_REGS_LOCALS 5393 RECOMP_ENTER(0x30009730u); 5394 5395 L_30009730: 5396 ecx = 0x3001E3E9u; /* 0x30009730: mov ecx, 0x3001e3e9 */ 5397 L_30009735: 5398 { _itail_tgt = (uint32_t)(MEM32(0x30019018)); goto _ljump; } 5399 { RECOMP_REGS_OUT(); return; } /* end of function */ 5400 _ljump: 5401 switch (_itail_tgt) { 5402 case 0x30009730u: goto L_30009730; 5403 case 0x30009735u: goto L_30009735; 5404 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 5405 } 5406 RECOMP_REGS_OUT(); 5407 } 5408 5409 void sub_30009740(void) { 5410 int _fpu_cmp = 0; 5411 uint32_t _cf = 0; 5412 int _df = 1; 5413 uint32_t _flag_k = FK_NONE; 5414 uint32_t _flag_a = 0, _flag_b = 0; 5415 uint32_t _itail_tgt = 0; 5416 RECOMP_REGS_LOCALS 5417 RECOMP_ENTER(0x30009740u); 5418 5419 L_30009740: 5420 PUSH32(esp, 0x30009750u); /* 0x30009740: push 0x30009750 */ 5421 RECOMP_ICALL(0x300180ECu); /* 0x30009745: call 0x300180ec */ /* not lifted */ 5422 RECOMP_FLAGS_IN(); 5423 ecx = POP32_VAL(esp); /* 0x3000974A: pop ecx */ 5424 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000974B: ret */ 5425 RECOMP_REGS_OUT(); 5426 } 5427 5428 void sub_30009750(void) { 5429 int _fpu_cmp = 0; 5430 uint32_t _cf = 0; 5431 int _df = 1; 5432 uint32_t _flag_k = FK_NONE; 5433 uint32_t _flag_a = 0, _flag_b = 0; 5434 uint32_t _itail_tgt = 0; 5435 RECOMP_REGS_LOCALS 5436 RECOMP_ENTER(0x30009750u); 5437 5438 L_30009750: 5439 ecx = 0x3001E3E9u; /* 0x30009750: mov ecx, 0x3001e3e9 */ 5440 L_30009755: 5441 { _itail_tgt = (uint32_t)(MEM32(0x3001901C)); goto _ljump; } 5442 { RECOMP_REGS_OUT(); return; } /* end of function */ 5443 _ljump: 5444 switch (_itail_tgt) { 5445 case 0x30009750u: goto L_30009750; 5446 case 0x30009755u: goto L_30009755; 5447 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 5448 } 5449 RECOMP_REGS_OUT(); 5450 } 5451 5452 void sub_30009760(void) { 5453 int _fpu_cmp = 0; 5454 uint32_t _cf = 0; 5455 int _df = 1; 5456 uint32_t _flag_k = FK_NONE; 5457 uint32_t _flag_a = 0, _flag_b = 0; 5458 uint32_t _itail_tgt = 0; 5459 RECOMP_REGS_LOCALS 5460 RECOMP_ENTER(0x30009760u); 5461 5462 L_30009760: 5463 RECOMP_ICALL(0x30009770u); /* 0x30009760: call 0x30009770 */ /* not lifted */ 5464 RECOMP_FLAGS_IN(); 5465 goto L_30009780; /* 0x30009765: jmp 0x30009780 */ 5466 L_30009780: 5467 PUSH32(esp, 0x30009790u); /* 0x30009780: push 0x30009790 */ 5468 RECOMP_ICALL(0x300180ECu); /* 0x30009785: call 0x300180ec */ /* not lifted */ 5469 RECOMP_FLAGS_IN(); 5470 ecx = POP32_VAL(esp); /* 0x3000978A: pop ecx */ 5471 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000978B: ret */ 5472 RECOMP_REGS_OUT(); 5473 } 5474 5475 void sub_30009770(void) { 5476 int _fpu_cmp = 0; 5477 uint32_t _cf = 0; 5478 int _df = 1; 5479 uint32_t _flag_k = FK_NONE; 5480 uint32_t _flag_a = 0, _flag_b = 0; 5481 uint32_t _itail_tgt = 0; 5482 RECOMP_REGS_LOCALS 5483 RECOMP_ENTER(0x30009770u); 5484 5485 L_30009770: 5486 ecx = 0x3001E3E8u; /* 0x30009770: mov ecx, 0x3001e3e8 */ 5487 L_30009775: 5488 { _itail_tgt = (uint32_t)(MEM32(0x30019020)); goto _ljump; } 5489 { RECOMP_REGS_OUT(); return; } /* end of function */ 5490 _ljump: 5491 switch (_itail_tgt) { 5492 case 0x30009770u: goto L_30009770; 5493 case 0x30009775u: goto L_30009775; 5494 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 5495 } 5496 RECOMP_REGS_OUT(); 5497 } 5498 5499 void sub_30009780(void) { 5500 int _fpu_cmp = 0; 5501 uint32_t _cf = 0; 5502 int _df = 1; 5503 uint32_t _flag_k = FK_NONE; 5504 uint32_t _flag_a = 0, _flag_b = 0; 5505 uint32_t _itail_tgt = 0; 5506 RECOMP_REGS_LOCALS 5507 RECOMP_ENTER(0x30009780u); 5508 5509 L_30009780: 5510 PUSH32(esp, 0x30009790u); /* 0x30009780: push 0x30009790 */ 5511 RECOMP_ICALL(0x300180ECu); /* 0x30009785: call 0x300180ec */ /* not lifted */ 5512 RECOMP_FLAGS_IN(); 5513 ecx = POP32_VAL(esp); /* 0x3000978A: pop ecx */ 5514 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000978B: ret */ 5515 RECOMP_REGS_OUT(); 5516 } 5517 5518 void sub_30009790(void) { 5519 int _fpu_cmp = 0; 5520 uint32_t _cf = 0; 5521 int _df = 1; 5522 uint32_t _flag_k = FK_NONE; 5523 uint32_t _flag_a = 0, _flag_b = 0; 5524 uint32_t _itail_tgt = 0; 5525 RECOMP_REGS_LOCALS 5526 RECOMP_ENTER(0x30009790u); 5527 5528 L_30009790: 5529 ecx = 0x3001E3E8u; /* 0x30009790: mov ecx, 0x3001e3e8 */ 5530 L_30009795: 5531 { _itail_tgt = (uint32_t)(MEM32(0x30019024)); goto _ljump; } 5532 { RECOMP_REGS_OUT(); return; } /* end of function */ 5533 _ljump: 5534 switch (_itail_tgt) { 5535 case 0x30009790u: goto L_30009790; 5536 case 0x30009795u: goto L_30009795; 5537 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 5538 } 5539 RECOMP_REGS_OUT(); 5540 } 5541 5542 void sub_300097A0(void) { 5543 int _fpu_cmp = 0; 5544 uint32_t _cf = 0; 5545 int _df = 1; 5546 uint32_t _flag_k = FK_NONE; 5547 uint32_t _flag_a = 0, _flag_b = 0; 5548 uint32_t _itail_tgt = 0; 5549 RECOMP_REGS_LOCALS 5550 RECOMP_ENTER(0x300097A0u); 5551 5552 L_300097A0: 5553 PUSH32(esp, ebp); /* 0x300097A0: push ebp */ 5554 ebp = esp; /* 0x300097A1: mov ebp, esp */ 5555 eax = ecx; /* 0x300097A3: mov eax, ecx */ 5556 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5557 ecx = 0; /* 0x300097A5: xor ecx, ecx */ 5558 _cf = 0; 5559 _flag_k = FK_TEST; 5560 MEM32(eax) = ecx; /* 0x300097A7: mov dword ptr [eax], ecx */ 5561 MEM32(eax + 0x4) = ecx; /* 0x300097A9: mov dword ptr [eax + 4], ecx */ 5562 MEM32(eax + 0x8) = ecx; /* 0x300097AC: mov dword ptr [eax + 8], ecx */ 5563 ecx = MEM32(ebp + 0x8); /* 0x300097AF: mov ecx, dword ptr [ebp + 8] */ 5564 PUSH32(esp, esi); /* 0x300097B2: push esi */ 5565 PUSH32(esp, edi); /* 0x300097B3: push edi */ 5566 edx = ecx + 0x8; /* 0x300097B4: lea edx, [ecx + 8] */ 5567 edi = MEM32(edx); /* 0x300097B7: mov edi, dword ptr [edx] */ 5568 esi = eax; /* 0x300097B9: mov esi, eax */ 5569 MEM32(esi) = edi; /* 0x300097BB: mov dword ptr [esi], edi */ 5570 edi = MEM32(edx + 0x4); /* 0x300097BD: mov edi, dword ptr [edx + 4] */ 5571 MEM32(esi + 0x4) = edi; /* 0x300097C0: mov dword ptr [esi + 4], edi */ 5572 edx = MEM32(edx + 0x8); /* 0x300097C3: mov edx, dword ptr [edx + 8] */ 5573 MEM32(esi + 0x8) = edx; /* 0x300097C6: mov dword ptr [esi + 8], edx */ 5574 ecx = MEM32(ecx); /* 0x300097C9: mov ecx, dword ptr [ecx] */ 5575 fp_push(*(float*)&MEM32(ecx + 0x8)); /* 0x300097CB: fld dword ptr [ecx + 8] */ 5576 edi = POP32_VAL(esp); /* 0x300097CE: pop edi */ 5577 _st[0] *= (double)*(float*)ADDR(eax + 0x8); /* 0x300097CF: fmul dword ptr [eax + 8] */ 5578 esi = POP32_VAL(esp); /* 0x300097D2: pop esi */ 5579 fp_push(*(float*)&MEM32(ecx + 0x4)); /* 0x300097D3: fld dword ptr [ecx + 4] */ 5580 _st[0] *= (double)*(float*)ADDR(eax + 0x4); /* 0x300097D6: fmul dword ptr [eax + 4] */ 5581 { double _v = fp_pop(); _st[0] += _v; } /* 0x300097D9: faddp st(1) */ 5582 fp_push(*(float*)&MEM32(ecx)); /* 0x300097DB: fld dword ptr [ecx] */ 5583 _st[0] *= (double)*(float*)ADDR(eax); /* 0x300097DD: fmul dword ptr [eax] */ 5584 { double _v = fp_pop(); _st[0] += _v; } /* 0x300097DF: faddp st(1) */ 5585 { float _v = (float)fp_pop(); *(float*)ADDR(eax + 0xC) = _v; } /* 0x300097E1: fstp dword ptr [eax + 0xc] */ 5586 ebp = POP32_VAL(esp); /* 0x300097E4: pop ebp */ 5587 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x300097E5: ret 4 */ 5588 RECOMP_REGS_OUT(); 5589 } 5590 5591 void sub_300097F0(void) { 5592 int _fpu_cmp = 0; 5593 uint32_t _cf = 0; 5594 int _df = 1; 5595 uint32_t _flag_k = FK_NONE; 5596 uint32_t _flag_a = 0, _flag_b = 0; 5597 uint32_t _itail_tgt = 0; 5598 RECOMP_REGS_LOCALS 5599 RECOMP_ENTER(0x300097F0u); 5600 5601 L_300097F0: 5602 PUSH32(esp, ebp); /* 0x300097F0: push ebp */ 5603 ebp = esp; /* 0x300097F1: mov ebp, esp */ 5604 eax = ecx; /* 0x300097F3: mov eax, ecx */ 5605 ecx = MEM32(ebp + 0x8); /* 0x300097F5: mov ecx, dword ptr [ebp + 8] */ 5606 PUSH32(esp, esi); /* 0x300097F8: push esi */ 5607 esi = MEM32(ecx); /* 0x300097F9: mov esi, dword ptr [ecx] */ 5608 edx = eax; /* 0x300097FB: mov edx, eax */ 5609 MEM32(edx) = esi; /* 0x300097FD: mov dword ptr [edx], esi */ 5610 esi = MEM32(ecx + 0x4); /* 0x300097FF: mov esi, dword ptr [ecx + 4] */ 5611 MEM32(edx + 0x4) = esi; /* 0x30009802: mov dword ptr [edx + 4], esi */ 5612 ecx = MEM32(ecx + 0x8); /* 0x30009805: mov ecx, dword ptr [ecx + 8] */ 5613 MEM32(edx + 0x8) = ecx; /* 0x30009808: mov dword ptr [edx + 8], ecx */ 5614 edx = MEM32(ebp + 0xC); /* 0x3000980B: mov edx, dword ptr [ebp + 0xc] */ 5615 MEM32(eax + 0xC) = edx; /* 0x3000980E: mov dword ptr [eax + 0xc], edx */ 5616 esi = POP32_VAL(esp); /* 0x30009811: pop esi */ 5617 ebp = POP32_VAL(esp); /* 0x30009812: pop ebp */ 5618 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x30009813: ret 8 */ 5619 RECOMP_REGS_OUT(); 5620 } 5621 5622 void sub_30009820(void) { 5623 int _fpu_cmp = 0; 5624 uint32_t _cf = 0; 5625 int _df = 1; 5626 uint32_t _flag_k = FK_NONE; 5627 uint32_t _flag_a = 0, _flag_b = 0; 5628 uint32_t _itail_tgt = 0; 5629 RECOMP_REGS_LOCALS 5630 RECOMP_ENTER(0x30009820u); 5631 5632 L_30009820: 5633 PUSH32(esp, ebp); /* 0x30009820: push ebp */ 5634 ebp = esp; /* 0x30009821: mov ebp, esp */ 5635 eax = MEM32(ebp + 0x8); /* 0x30009823: mov eax, dword ptr [ebp + 8] */ 5636 fp_push(*(float*)&MEM32(eax + 0x8)); /* 0x30009826: fld dword ptr [eax + 8] */ 5637 _st[0] *= (double)*(float*)ADDR(ecx + 0x8); /* 0x30009829: fmul dword ptr [ecx + 8] */ 5638 fp_push(*(float*)&MEM32(eax + 0x4)); /* 0x3000982C: fld dword ptr [eax + 4] */ 5639 _st[0] *= (double)*(float*)ADDR(ecx + 0x4); /* 0x3000982F: fmul dword ptr [ecx + 4] */ 5640 { double _v = fp_pop(); _st[0] += _v; } /* 0x30009832: faddp st(1) */ 5641 fp_push(*(float*)&MEM32(eax)); /* 0x30009834: fld dword ptr [eax] */ 5642 _st[0] *= (double)*(float*)ADDR(ecx); /* 0x30009836: fmul dword ptr [ecx] */ 5643 { double _v = fp_pop(); _st[0] += _v; } /* 0x30009838: faddp st(1) */ 5644 _st[0] -= (double)*(float*)ADDR(ecx + 0xC); /* 0x3000983A: fsub dword ptr [ecx + 0xc] */ 5645 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0xC)); /* 0x3000983D: fcom dword ptr [ebp + 0xc] */ 5646 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x30009840: fnstsw ax */ 5647 /* test HI8(eax), 0x41u */ /* 0x30009842: test ah, 0x41 */ 5648 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 5649 _cf = 0; 5650 _flag_k = FK_NARROW(FK_TEST, 24); 5651 if (TEST_NZ(_flag_a, _flag_b)) goto L_30009852; /* 0x30009845: jne 0x30009852 */ 5652 L_30009847: 5653 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x30009847: fstp st(0) */ 5654 eax = 1; /* 0x30009849: mov eax, 1 */ 5655 ebp = POP32_VAL(esp); /* 0x3000984E: pop ebp */ 5656 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3000984F: ret 8 */ 5657 L_30009852: 5658 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x30009852: fld dword ptr [ebp + 0xc] */ 5659 _st[0] = -_st[0]; /* 0x30009855: fchs */ 5660 fp_xch(1); /* 0x30009857: fxch st(1) */ 5661 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x30009859: fcompp */ 5662 fp_pop(); fp_pop(); 5663 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3000985B: fnstsw ax */ 5664 /* test HI8(eax), 1 */ /* 0x3000985D: test ah, 1 */ 5665 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5666 _cf = 0; 5667 _flag_k = FK_NARROW(FK_TEST, 24); 5668 if (TEST_Z(_flag_a, _flag_b)) goto L_30009869; /* 0x30009860: je 0x30009869 */ 5669 L_30009862: 5670 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 5671 eax = eax | 0xFFFFFFFFu; /* 0x30009862: or eax, 0xffffffff */ 5672 _cf = 0; 5673 _flag_k = FK_TEST; 5674 ebp = POP32_VAL(esp); /* 0x30009865: pop ebp */ 5675 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x30009866: ret 8 */ 5676 L_30009869: 5677 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5678 eax = 0; /* 0x30009869: xor eax, eax */ 5679 _cf = 0; 5680 _flag_k = FK_TEST; 5681 ebp = POP32_VAL(esp); /* 0x3000986B: pop ebp */ 5682 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3000986C: ret 8 */ 5683 RECOMP_REGS_OUT(); 5684 }