client/vendor/ace/source/lifted-0055.c (295124B)
1 #define RECOMP_GENERATED_CODE 2 #include "recomp_types.h" 3 4 void sub_4707ADC0(void) { 5 int _fpu_cmp = 0; 6 uint32_t _cf = 0; 7 int _df = 1; 8 uint32_t _flag_k = FK_NONE; 9 uint32_t _flag_a = 0, _flag_b = 0; 10 uint32_t _itail_tgt = 0; 11 RECOMP_REGS_LOCALS 12 RECOMP_ENTER(0x4707ADC0u); 13 14 L_4707ADC0: 15 MEM32(0x4710EF28) = 0x47104BA0u; /* 0x4707ADC0: mov dword ptr [0x4710ef28], 0x47104ba0 */ 16 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707ADCA: ret */ 17 RECOMP_REGS_OUT(); 18 } 19 20 void sub_4707ADD0(void) { 21 int _fpu_cmp = 0; 22 uint32_t _cf = 0; 23 int _df = 1; 24 uint32_t _flag_k = FK_NONE; 25 uint32_t _flag_a = 0, _flag_b = 0; 26 uint32_t _itail_tgt = 0; 27 RECOMP_REGS_LOCALS 28 RECOMP_ENTER(0x4707ADD0u); 29 30 L_4707ADD0: 31 MEM32(0x4710EF3C) = 0x47104BD4u; /* 0x4707ADD0: mov dword ptr [0x4710ef3c], 0x47104bd4 */ 32 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707ADDA: ret */ 33 RECOMP_REGS_OUT(); 34 } 35 36 void sub_4707ADE0(void) { 37 int _fpu_cmp = 0; 38 uint32_t _cf = 0; 39 int _df = 1; 40 uint32_t _flag_k = FK_NONE; 41 uint32_t _flag_a = 0, _flag_b = 0; 42 uint32_t _itail_tgt = 0; 43 RECOMP_REGS_LOCALS 44 RECOMP_ENTER(0x4707ADE0u); 45 46 L_4707ADE0: 47 MEM32(0x4710EF38) = 0x4710AF3Cu; /* 0x4707ADE0: mov dword ptr [0x4710ef38], 0x4710af3c */ 48 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707ADEA: ret */ 49 RECOMP_REGS_OUT(); 50 } 51 52 void sub_4707ADF0(void) { 53 int _fpu_cmp = 0; 54 uint32_t _cf = 0; 55 int _df = 1; 56 uint32_t _flag_k = FK_NONE; 57 uint32_t _flag_a = 0, _flag_b = 0; 58 uint32_t _itail_tgt = 0; 59 RECOMP_REGS_LOCALS 60 RECOMP_ENTER(0x4707ADF0u); 61 62 L_4707ADF0: 63 PUSH32(esp, esi); /* 0x4707ADF0: push esi */ 64 esi = ecx; /* 0x4707ADF1: mov esi, ecx */ 65 RECOMP_ICALL(0x4707A510u); /* 0x4707ADF3: call 0x4707a510 */ /* not lifted */ 66 RECOMP_FLAGS_IN(); 67 eax = esi; /* 0x4707ADF8: mov eax, esi */ 68 esi = POP32_VAL(esp); /* 0x4707ADFA: pop esi */ 69 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707ADFB: ret */ 70 RECOMP_REGS_OUT(); 71 } 72 73 void sub_4707AE00(void) { 74 int _fpu_cmp = 0; 75 uint32_t _cf = 0; 76 int _df = 1; 77 uint32_t _flag_k = FK_NONE; 78 uint32_t _flag_a = 0, _flag_b = 0; 79 uint32_t _itail_tgt = 0; 80 RECOMP_REGS_LOCALS 81 RECOMP_ENTER(0x4707AE00u); 82 83 L_4707AE00: 84 eax = MEM32(esp + 0x4); /* 0x4707AE00: mov eax, dword ptr [esp + 4] */ 85 /* test eax, eax */ /* 0x4707AE04: test eax, eax */ 86 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 87 _cf = 0; 88 _flag_k = FK_TEST; 89 PUSH32(esp, esi); /* 0x4707AE06: push esi */ 90 esi = MEM32(ecx); /* 0x4707AE07: mov esi, dword ptr [ecx] */ 91 if (TEST_Z(_flag_a, _flag_b)) goto L_4707AE45; /* 0x4707AE09: je 0x4707ae45 */ 92 L_4707AE0B: 93 ecx = MEM32(esp + 0xC); /* 0x4707AE0B: mov ecx, dword ptr [esp + 0xc] */ 94 PUSH32(esp, ecx); /* 0x4707AE0F: push ecx */ 95 PUSH32(esp, eax); /* 0x4707AE10: push eax */ 96 PUSH32(esp, esi); /* 0x4707AE11: push esi */ 97 RECOMP_ICALL(0x4700E7F0u); /* 0x4707AE12: call 0x4700e7f0 */ /* not lifted */ 98 RECOMP_FLAGS_IN(); 99 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 100 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 101 esp = esp + 0xCu; /* 0x4707AE17: add esp, 0xc */ 102 _flag_k = FK_ADD; 103 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707AE1A: cmp eax, -1 */ 104 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 105 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 106 _flag_k = FK_CMP; 107 if (CMP_NE(_flag_a, _flag_b)) goto L_4707AE25; /* 0x4707AE1D: jne 0x4707ae25 */ 108 L_4707AE1F: 109 _flag_a = (uint32_t)((eax | eax)); _flag_b = (uint32_t)((eax | eax)); 110 eax = eax | eax; /* 0x4707AE1F: or eax, eax */ 111 _cf = 0; 112 _flag_k = FK_TEST; 113 esi = POP32_VAL(esp); /* 0x4707AE21: pop esi */ 114 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x4707AE22: ret 0xc */ 115 L_4707AE25: 116 edx = MEM32(esp + 0x10); /* 0x4707AE25: mov edx, dword ptr [esp + 0x10] */ 117 PUSH32(esp, 1); /* 0x4707AE29: push 1 */ 118 PUSH32(esp, esi); /* 0x4707AE2B: push esi */ 119 MEM32(edx) = 1; /* 0x4707AE2C: mov dword ptr [edx], 1 */ 120 RECOMP_ICALL(0x4700E9C0u); /* 0x4707AE32: call 0x4700e9c0 */ /* not lifted */ 121 RECOMP_FLAGS_IN(); 122 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 123 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 124 esp = esp + 8; /* 0x4707AE37: add esp, 8 */ 125 _flag_k = FK_ADD; 126 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707AE3A: cmp eax, -1 */ 127 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 128 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 129 _flag_k = FK_CMP; 130 if (CMP_NE(_flag_a, _flag_b)) goto L_4707AE45; /* 0x4707AE3D: jne 0x4707ae45 */ 131 L_4707AE3F: 132 _flag_a = (uint32_t)((eax | eax)); _flag_b = (uint32_t)((eax | eax)); 133 eax = eax | eax; /* 0x4707AE3F: or eax, eax */ 134 _cf = 0; 135 _flag_k = FK_TEST; 136 esi = POP32_VAL(esp); /* 0x4707AE41: pop esi */ 137 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x4707AE42: ret 0xc */ 138 L_4707AE45: 139 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 140 eax = 0; /* 0x4707AE45: xor eax, eax */ 141 _cf = 0; 142 _flag_k = FK_TEST; 143 esi = POP32_VAL(esp); /* 0x4707AE47: pop esi */ 144 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x4707AE48: ret 0xc */ 145 RECOMP_REGS_OUT(); 146 } 147 148 void sub_4707AE50(void) { 149 int _fpu_cmp = 0; 150 uint32_t _cf = 0; 151 int _df = 1; 152 uint32_t _flag_k = FK_NONE; 153 uint32_t _flag_a = 0, _flag_b = 0; 154 uint32_t _itail_tgt = 0; 155 RECOMP_REGS_LOCALS 156 RECOMP_ENTER(0x4707AE50u); 157 158 L_4707AE50: 159 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707AE50: push -1 */ 160 PUSH32(esp, 0x470A99A8u); /* 0x4707AE52: push 0x470a99a8 */ 161 eax = MEM32(FS_BASE + (0)); /* 0x4707AE57: mov eax, dword ptr fs:[0] */ 162 PUSH32(esp, eax); /* 0x4707AE5D: push eax */ 163 MEM32(FS_BASE + (0)) = esp; /* 0x4707AE5E: mov dword ptr fs:[0], esp */ 164 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 165 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 166 esp = esp - 8; /* 0x4707AE65: sub esp, 8 */ 167 _flag_k = FK_CMP; 168 PUSH32(esp, ebx); /* 0x4707AE68: push ebx */ 169 PUSH32(esp, ebp); /* 0x4707AE69: push ebp */ 170 PUSH32(esp, esi); /* 0x4707AE6A: push esi */ 171 PUSH32(esp, edi); /* 0x4707AE6B: push edi */ 172 ebp = ecx; /* 0x4707AE6C: mov ebp, ecx */ 173 eax = MEM32(esp + 0x38); /* 0x4707AE6E: mov eax, dword ptr [esp + 0x38] */ 174 /* test eax, eax */ /* 0x4707AE72: test eax, eax */ 175 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 176 _cf = 0; 177 _flag_k = FK_TEST; 178 edi = MEM32(esp + 0x28); /* 0x4707AE74: mov edi, dword ptr [esp + 0x28] */ 179 MEM32(esp + 0x20) = 0; /* 0x4707AE78: mov dword ptr [esp + 0x20], 0 */ 180 if (TEST_Z(_flag_a, _flag_b)) goto L_4707AEB1; /* 0x4707AE80: je 0x4707aeb1 */ 181 L_4707AE82: 182 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707AE82: call dword ptr [0x470ac3c8] */ 183 RECOMP_FLAGS_IN(); 184 esi = eax; /* 0x4707AE88: mov esi, eax */ 185 ebx = MEM32(esi); /* 0x4707AE8A: mov ebx, dword ptr [esi] */ 186 MEM32(esp + 0x10) = esi; /* 0x4707AE8C: mov dword ptr [esp + 0x10], esi */ 187 MEM32(esp + 0x14) = ebx; /* 0x4707AE90: mov dword ptr [esp + 0x14], ebx */ 188 eax = MEM32(ebp); /* 0x4707AE94: mov eax, dword ptr [ebp] */ 189 PUSH32(esp, 1); /* 0x4707AE97: push 1 */ 190 PUSH32(esp, eax); /* 0x4707AE99: push eax */ 191 MEM8(esp + 0x28) = (uint8_t)(1); /* 0x4707AE9A: mov byte ptr [esp + 0x28], 1 */ 192 RECOMP_ICALL(0x4700EA10u); /* 0x4707AE9F: call 0x4700ea10 */ /* not lifted */ 193 RECOMP_FLAGS_IN(); 194 PUSH32(esp, 1); /* 0x4707AEA4: push 1 */ 195 PUSH32(esp, edi); /* 0x4707AEA6: push edi */ 196 RECOMP_ICALL(0x4700EA10u); /* 0x4707AEA7: call 0x4700ea10 */ /* not lifted */ 197 RECOMP_FLAGS_IN(); 198 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 199 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 200 esp = esp + 0x10u; /* 0x4707AEAC: add esp, 0x10 */ 201 _flag_k = FK_ADD; 202 MEM32(esi) = ebx; /* 0x4707AEAF: mov dword ptr [esi], ebx */ 203 L_4707AEB1: 204 eax = MEM32(esp + 0x3C); /* 0x4707AEB1: mov eax, dword ptr [esp + 0x3c] */ 205 /* test eax, eax */ /* 0x4707AEB5: test eax, eax */ 206 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 207 _cf = 0; 208 _flag_k = FK_TEST; 209 if (TEST_Z(_flag_a, _flag_b)) goto L_4707AEC4; /* 0x4707AEB7: je 0x4707aec4 */ 210 L_4707AEB9: 211 PUSH32(esp, 0); /* 0x4707AEB9: push 0 */ 212 PUSH32(esp, 0); /* 0x4707AEBB: push 0 */ 213 PUSH32(esp, edi); /* 0x4707AEBD: push edi */ 214 RECOMP_ICALL(MEM32(0x470AC4C4)); /* 0x4707AEBE: call dword ptr [0x470ac4c4] */ 215 RECOMP_FLAGS_IN(); 216 L_4707AEC4: 217 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 218 eax = 0; /* 0x4707AEC4: xor eax, eax */ 219 _cf = 0; 220 _flag_k = FK_TEST; 221 /* cmp edi, 0xFFFFFFFFu */ /* 0x4707AEC6: cmp edi, -1 */ 222 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFFu); 223 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 224 _flag_k = FK_CMP; 225 SET_LO8(eax, (CMP_NE(_flag_a, _flag_b)) ? 1 : 0); /* 0x4707AEC9: setne al */ 226 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 227 eax = eax - 1; /* 0x4707AECC: dec eax */ 228 _flag_k = FK_DEC; 229 ebp = eax; /* 0x4707AECD: mov ebp, eax */ 230 edi = MEM32(esp + 0x2C); /* 0x4707AECF: mov edi, dword ptr [esp + 0x2c] */ 231 esi = MEM32(edi); /* 0x4707AED3: mov esi, dword ptr [edi] */ 232 /* cmp esi, edi */ /* 0x4707AED5: cmp esi, edi */ 233 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi); 234 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 235 _flag_k = FK_CMP; 236 ebx = MEM32(esp + 0x34); /* 0x4707AED7: mov ebx, dword ptr [esp + 0x34] */ 237 MEM32(esp + 0x20) = 2; /* 0x4707AEDB: mov dword ptr [esp + 0x20], 2 */ 238 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707AF02; /* 0x4707AEE3: je 0x4707af02 */ 239 L_4707AEE5: 240 eax = esi; /* 0x4707AEE5: mov eax, esi */ 241 /* test eax, eax */ /* 0x4707AEE7: test eax, eax */ 242 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 243 _cf = 0; 244 _flag_k = FK_TEST; 245 esi = MEM32(esi); /* 0x4707AEE9: mov esi, dword ptr [esi] */ 246 if (TEST_Z(_flag_a, _flag_b)) goto L_4707AEF5; /* 0x4707AEEB: je 0x4707aef5 */ 247 L_4707AEED: 248 edx = MEM32(ebx); /* 0x4707AEED: mov edx, dword ptr [ebx] */ 249 PUSH32(esp, eax); /* 0x4707AEEF: push eax */ 250 ecx = ebx; /* 0x4707AEF0: mov ecx, ebx */ 251 RECOMP_ICALL(MEM32(edx + 0xC)); /* 0x4707AEF2: call dword ptr [edx + 0xc] */ 252 RECOMP_FLAGS_IN(); 253 L_4707AEF5: 254 ecx = MEM32(esp + 0x30); /* 0x4707AEF5: mov ecx, dword ptr [esp + 0x30] */ 255 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 256 ecx = ecx - 1; /* 0x4707AEF9: dec ecx */ 257 _flag_k = FK_DEC; 258 /* cmp esi, edi */ /* 0x4707AEFA: cmp esi, edi */ 259 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi); 260 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 261 _flag_k = FK_CMP; 262 MEM32(esp + 0x30) = ecx; /* 0x4707AEFC: mov dword ptr [esp + 0x30], ecx */ 263 RECOMP_BACKEDGE(); 264 if (CMP_NE(_flag_a, _flag_b)) goto L_4707AEE5; /* 0x4707AF00: jne 0x4707aee5 */ 265 L_4707AF02: 266 /* test edi, edi */ /* 0x4707AF02: test edi, edi */ 267 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 268 _cf = 0; 269 _flag_k = FK_TEST; 270 MEM32(edi) = edi; /* 0x4707AF04: mov dword ptr [edi], edi */ 271 if (TEST_Z(_flag_a, _flag_b)) goto L_4707AF10; /* 0x4707AF06: je 0x4707af10 */ 272 L_4707AF08: 273 eax = MEM32(ebx); /* 0x4707AF08: mov eax, dword ptr [ebx] */ 274 PUSH32(esp, edi); /* 0x4707AF0A: push edi */ 275 ecx = ebx; /* 0x4707AF0B: mov ecx, ebx */ 276 RECOMP_ICALL(MEM32(eax + 0xC)); /* 0x4707AF0D: call dword ptr [eax + 0xc] */ 277 RECOMP_FLAGS_IN(); 278 L_4707AF10: 279 ecx = MEM32(esp + 0x18); /* 0x4707AF10: mov ecx, dword ptr [esp + 0x18] */ 280 edi = POP32_VAL(esp); /* 0x4707AF14: pop edi */ 281 esi = POP32_VAL(esp); /* 0x4707AF15: pop esi */ 282 eax = ebp; /* 0x4707AF16: mov eax, ebp */ 283 ebp = POP32_VAL(esp); /* 0x4707AF18: pop ebp */ 284 ebx = POP32_VAL(esp); /* 0x4707AF19: pop ebx */ 285 MEM32(FS_BASE + (0)) = ecx; /* 0x4707AF1A: mov dword ptr fs:[0], ecx */ 286 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 287 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 288 esp = esp + 0x14u; /* 0x4707AF21: add esp, 0x14 */ 289 _flag_k = FK_ADD; 290 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x4707AF24: ret 0x18 */ 291 RECOMP_REGS_OUT(); 292 } 293 294 void sub_4707AF30(void) { 295 int _fpu_cmp = 0; 296 uint32_t _cf = 0; 297 int _df = 1; 298 uint32_t _flag_k = FK_NONE; 299 uint32_t _flag_a = 0, _flag_b = 0; 300 uint32_t _itail_tgt = 0; 301 RECOMP_REGS_LOCALS 302 RECOMP_ENTER(0x4707AF30u); 303 304 L_4707AF30: 305 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 306 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 307 esp = esp - 8; /* 0x4707AF30: sub esp, 8 */ 308 _flag_k = FK_CMP; 309 eax = MEM32(esp + 0x14); /* 0x4707AF33: mov eax, dword ptr [esp + 0x14] */ 310 PUSH32(esp, ebx); /* 0x4707AF37: push ebx */ 311 PUSH32(esp, ebp); /* 0x4707AF38: push ebp */ 312 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 313 ebx = 0; /* 0x4707AF39: xor ebx, ebx */ 314 _cf = 0; 315 _flag_k = FK_TEST; 316 /* cmp eax, ebx */ /* 0x4707AF3B: cmp eax, ebx */ 317 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 318 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 319 _flag_k = FK_CMP; 320 PUSH32(esp, esi); /* 0x4707AF3D: push esi */ 321 ebp = ecx; /* 0x4707AF3E: mov ebp, ecx */ 322 esi = MEM32(ebp); /* 0x4707AF40: mov esi, dword ptr [ebp] */ 323 PUSH32(esp, edi); /* 0x4707AF43: push edi */ 324 MEM32(esp + 0x14) = ebx; /* 0x4707AF44: mov dword ptr [esp + 0x14], ebx */ 325 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707AF83; /* 0x4707AF48: je 0x4707af83 */ 326 L_4707AF4A: 327 ecx = MEM32(esp + 0x28); /* 0x4707AF4A: mov ecx, dword ptr [esp + 0x28] */ 328 PUSH32(esp, ecx); /* 0x4707AF4E: push ecx */ 329 PUSH32(esp, eax); /* 0x4707AF4F: push eax */ 330 PUSH32(esp, esi); /* 0x4707AF50: push esi */ 331 RECOMP_ICALL(0x4700E7F0u); /* 0x4707AF51: call 0x4700e7f0 */ /* not lifted */ 332 RECOMP_FLAGS_IN(); 333 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 334 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 335 esp = esp + 0xCu; /* 0x4707AF56: add esp, 0xc */ 336 _flag_k = FK_ADD; 337 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707AF59: cmp eax, -1 */ 338 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 339 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 340 _flag_k = FK_CMP; 341 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707AF76; /* 0x4707AF5C: je 0x4707af76 */ 342 L_4707AF5E: 343 PUSH32(esp, 1); /* 0x4707AF5E: push 1 */ 344 PUSH32(esp, esi); /* 0x4707AF60: push esi */ 345 MEM32(esp + 0x1C) = 1; /* 0x4707AF61: mov dword ptr [esp + 0x1c], 1 */ 346 RECOMP_ICALL(0x4700E9C0u); /* 0x4707AF69: call 0x4700e9c0 */ /* not lifted */ 347 RECOMP_FLAGS_IN(); 348 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 349 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 350 esp = esp + 8; /* 0x4707AF6E: add esp, 8 */ 351 _flag_k = FK_ADD; 352 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707AF71: cmp eax, -1 */ 353 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 354 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 355 _flag_k = FK_CMP; 356 if (CMP_NE(_flag_a, _flag_b)) goto L_4707AF83; /* 0x4707AF74: jne 0x4707af83 */ 357 L_4707AF76: 358 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 359 eax = eax | 0xFFFFFFFFu; /* 0x4707AF76: or eax, 0xffffffff */ 360 _cf = 0; 361 _flag_k = FK_TEST; 362 edi = POP32_VAL(esp); /* 0x4707AF79: pop edi */ 363 esi = POP32_VAL(esp); /* 0x4707AF7A: pop esi */ 364 ebp = POP32_VAL(esp); /* 0x4707AF7B: pop ebp */ 365 ebx = POP32_VAL(esp); /* 0x4707AF7C: pop ebx */ 366 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 367 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 368 esp = esp + 8; /* 0x4707AF7D: add esp, 8 */ 369 _flag_k = FK_ADD; 370 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707AF80: ret 0x14 */ 371 L_4707AF83: 372 ecx = MEM32(esp + 0x20); /* 0x4707AF83: mov ecx, dword ptr [esp + 0x20] */ 373 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 374 edi = 0; /* 0x4707AF87: xor edi, edi */ 375 _cf = 0; 376 _flag_k = FK_TEST; 377 /* test ecx, ecx */ /* 0x4707AF89: test ecx, ecx */ 378 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 379 _cf = 0; 380 _flag_k = FK_TEST; 381 MEM32(esp + 0x10) = edi; /* 0x4707AF8B: mov dword ptr [esp + 0x10], edi */ 382 if (TEST_Z(_flag_a, _flag_b)) goto L_4707AFA3; /* 0x4707AF8F: je 0x4707afa3 */ 383 L_4707AF91: 384 eax = MEM32(ecx + 0x8); /* 0x4707AF91: mov eax, dword ptr [ecx + 8] */ 385 edx = MEM32(ecx); /* 0x4707AF94: mov edx, dword ptr [ecx] */ 386 MEM32(esp + 0x10) = eax; /* 0x4707AF96: mov dword ptr [esp + 0x10], eax */ 387 edi = esp + 0x10; /* 0x4707AF9A: lea edi, [esp + 0x10] */ 388 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707AF9E: call dword ptr [edx + 4] */ 389 RECOMP_FLAGS_IN(); 390 ebx = eax; /* 0x4707AFA1: mov ebx, eax */ 391 L_4707AFA3: 392 eax = MEM32(ebp); /* 0x4707AFA3: mov eax, dword ptr [ebp] */ 393 PUSH32(esp, edi); /* 0x4707AFA6: push edi */ 394 PUSH32(esp, ebx); /* 0x4707AFA7: push ebx */ 395 PUSH32(esp, eax); /* 0x4707AFA8: push eax */ 396 RECOMP_ICALL(MEM32(0x470AC4A0)); /* 0x4707AFA9: call dword ptr [0x470ac4a0] */ 397 RECOMP_FLAGS_IN(); 398 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707AFAF: cmp eax, -1 */ 399 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 400 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 401 _flag_k = FK_CMP; 402 if (CMP_NE(_flag_a, _flag_b)) goto L_4707AFC7; /* 0x4707AFB2: jne 0x4707afc7 */ 403 L_4707AFB4: 404 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707AFB4: call dword ptr [0x470ac4a4] */ 405 RECOMP_FLAGS_IN(); 406 esi = eax; /* 0x4707AFBA: mov esi, eax */ 407 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707AFBC: call dword ptr [0x470ac3c8] */ 408 RECOMP_FLAGS_IN(); 409 MEM32(eax) = esi; /* 0x4707AFC2: mov dword ptr [eax], esi */ 410 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 411 eax = eax | 0xFFFFFFFFu; /* 0x4707AFC4: or eax, 0xffffffff */ 412 _cf = 0; 413 _flag_k = FK_TEST; 414 L_4707AFC7: 415 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707AFC7: cmp eax, -1 */ 416 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 417 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 418 _flag_k = FK_CMP; 419 esi = MEM32(esp + 0x1C); /* 0x4707AFCA: mov esi, dword ptr [esp + 0x1c] */ 420 MEM32(esi) = eax; /* 0x4707AFCE: mov dword ptr [esi], eax */ 421 if (CMP_NE(_flag_a, _flag_b)) goto L_4707AFED; /* 0x4707AFD0: jne 0x4707afed */ 422 L_4707AFD2: 423 eax = MEM32(esp + 0x28); /* 0x4707AFD2: mov eax, dword ptr [esp + 0x28] */ 424 /* test eax, eax */ /* 0x4707AFD6: test eax, eax */ 425 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 426 _cf = 0; 427 _flag_k = FK_TEST; 428 if (TEST_Z(_flag_a, _flag_b)) goto L_4707AFED; /* 0x4707AFD8: je 0x4707afed */ 429 L_4707AFDA: 430 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707AFDA: call dword ptr [0x470ac3c8] */ 431 RECOMP_FLAGS_IN(); 432 /* cmp MEM32(eax), 4 */ /* 0x4707AFE0: cmp dword ptr [eax], 4 */ 433 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(4); 434 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 435 _flag_k = FK_CMP; 436 if (CMP_NE(_flag_a, _flag_b)) goto L_4707AFED; /* 0x4707AFE3: jne 0x4707afed */ 437 L_4707AFE5: 438 eax = MEM32(esp + 0x24); /* 0x4707AFE5: mov eax, dword ptr [esp + 0x24] */ 439 /* test eax, eax */ /* 0x4707AFE9: test eax, eax */ 440 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 441 _cf = 0; 442 _flag_k = FK_TEST; 443 RECOMP_BACKEDGE(); 444 if (TEST_Z(_flag_a, _flag_b)) goto L_4707AFA3; /* 0x4707AFEB: je 0x4707afa3 */ 445 L_4707AFED: 446 /* cmp MEM32(esi), 0xFFFFFFFFu */ /* 0x4707AFED: cmp dword ptr [esi], -1 */ 447 _flag_a = (uint32_t)(MEM32(esi)); _flag_b = (uint32_t)(0xFFFFFFFFu); 448 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 449 _flag_k = FK_CMP; 450 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707B001; /* 0x4707AFF0: je 0x4707b001 */ 451 L_4707AFF2: 452 eax = MEM32(esp + 0x20); /* 0x4707AFF2: mov eax, dword ptr [esp + 0x20] */ 453 /* test eax, eax */ /* 0x4707AFF6: test eax, eax */ 454 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 455 _cf = 0; 456 _flag_k = FK_TEST; 457 if (TEST_Z(_flag_a, _flag_b)) goto L_4707B001; /* 0x4707AFF8: je 0x4707b001 */ 458 L_4707AFFA: 459 ecx = MEM32(esp + 0x10); /* 0x4707AFFA: mov ecx, dword ptr [esp + 0x10] */ 460 MEM32(eax + 0x8) = ecx; /* 0x4707AFFE: mov dword ptr [eax + 8], ecx */ 461 L_4707B001: 462 edx = MEM32(esp + 0x2C); /* 0x4707B001: mov edx, dword ptr [esp + 0x2c] */ 463 eax = MEM32(esp + 0x14); /* 0x4707B005: mov eax, dword ptr [esp + 0x14] */ 464 PUSH32(esp, edx); /* 0x4707B009: push edx */ 465 PUSH32(esp, eax); /* 0x4707B00A: push eax */ 466 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 467 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 468 esp = esp - 0x10u; /* 0x4707B00B: sub esp, 0x10 */ 469 _flag_k = FK_CMP; 470 ecx = esp; /* 0x4707B00E: mov ecx, esp */ 471 MEM32(esp + 0x40) = esp; /* 0x4707B010: mov dword ptr [esp + 0x40], esp */ 472 PUSH32(esp, esi); /* 0x4707B014: push esi */ 473 RECOMP_ICALL(0x47032F30u); /* 0x4707B015: call 0x47032f30 */ /* not lifted */ 474 RECOMP_FLAGS_IN(); 475 ecx = ebp; /* 0x4707B01A: mov ecx, ebp */ 476 RECOMP_ICALL(0x4707AE50u); /* 0x4707B01C: call 0x4707ae50 */ /* not lifted */ 477 RECOMP_FLAGS_IN(); 478 edi = POP32_VAL(esp); /* 0x4707B021: pop edi */ 479 esi = POP32_VAL(esp); /* 0x4707B022: pop esi */ 480 ebp = POP32_VAL(esp); /* 0x4707B023: pop ebp */ 481 ebx = POP32_VAL(esp); /* 0x4707B024: pop ebx */ 482 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 483 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 484 esp = esp + 8; /* 0x4707B025: add esp, 8 */ 485 _flag_k = FK_ADD; 486 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707B028: ret 0x14 */ 487 RECOMP_REGS_OUT(); 488 } 489 490 void sub_4707B030(void) { 491 int _fpu_cmp = 0; 492 uint32_t _cf = 0; 493 int _df = 1; 494 uint32_t _flag_k = FK_NONE; 495 uint32_t _flag_a = 0, _flag_b = 0; 496 uint32_t _itail_tgt = 0; 497 RECOMP_REGS_LOCALS 498 RECOMP_ENTER(0x4707B030u); 499 500 L_4707B030: 501 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 502 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 503 esp = esp - 8; /* 0x4707B030: sub esp, 8 */ 504 _flag_k = FK_CMP; 505 eax = MEM32(esp + 0x1C); /* 0x4707B033: mov eax, dword ptr [esp + 0x1c] */ 506 PUSH32(esp, ebx); /* 0x4707B037: push ebx */ 507 PUSH32(esp, ebp); /* 0x4707B038: push ebp */ 508 PUSH32(esp, esi); /* 0x4707B039: push esi */ 509 PUSH32(esp, edi); /* 0x4707B03A: push edi */ 510 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 511 edi = 0; /* 0x4707B03B: xor edi, edi */ 512 _cf = 0; 513 _flag_k = FK_TEST; 514 /* cmp eax, edi */ /* 0x4707B03D: cmp eax, edi */ 515 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 516 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 517 _flag_k = FK_CMP; 518 ebp = ecx; /* 0x4707B03F: mov ebp, ecx */ 519 esi = MEM32(ebp); /* 0x4707B041: mov esi, dword ptr [ebp] */ 520 MEM32(esp + 0x14) = edi; /* 0x4707B044: mov dword ptr [esp + 0x14], edi */ 521 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707B083; /* 0x4707B048: je 0x4707b083 */ 522 L_4707B04A: 523 ecx = MEM32(esp + 0x30); /* 0x4707B04A: mov ecx, dword ptr [esp + 0x30] */ 524 PUSH32(esp, ecx); /* 0x4707B04E: push ecx */ 525 PUSH32(esp, eax); /* 0x4707B04F: push eax */ 526 PUSH32(esp, esi); /* 0x4707B050: push esi */ 527 RECOMP_ICALL(0x4700E7F0u); /* 0x4707B051: call 0x4700e7f0 */ /* not lifted */ 528 RECOMP_FLAGS_IN(); 529 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 530 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 531 esp = esp + 0xCu; /* 0x4707B056: add esp, 0xc */ 532 _flag_k = FK_ADD; 533 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B059: cmp eax, -1 */ 534 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 535 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 536 _flag_k = FK_CMP; 537 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707B076; /* 0x4707B05C: je 0x4707b076 */ 538 L_4707B05E: 539 PUSH32(esp, 1); /* 0x4707B05E: push 1 */ 540 PUSH32(esp, esi); /* 0x4707B060: push esi */ 541 MEM32(esp + 0x1C) = 1; /* 0x4707B061: mov dword ptr [esp + 0x1c], 1 */ 542 RECOMP_ICALL(0x4700E9C0u); /* 0x4707B069: call 0x4700e9c0 */ /* not lifted */ 543 RECOMP_FLAGS_IN(); 544 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 545 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 546 esp = esp + 8; /* 0x4707B06E: add esp, 8 */ 547 _flag_k = FK_ADD; 548 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B071: cmp eax, -1 */ 549 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 550 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 551 _flag_k = FK_CMP; 552 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B083; /* 0x4707B074: jne 0x4707b083 */ 553 L_4707B076: 554 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 555 eax = eax | 0xFFFFFFFFu; /* 0x4707B076: or eax, 0xffffffff */ 556 _cf = 0; 557 _flag_k = FK_TEST; 558 edi = POP32_VAL(esp); /* 0x4707B079: pop edi */ 559 esi = POP32_VAL(esp); /* 0x4707B07A: pop esi */ 560 ebp = POP32_VAL(esp); /* 0x4707B07B: pop ebp */ 561 ebx = POP32_VAL(esp); /* 0x4707B07C: pop ebx */ 562 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 563 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 564 esp = esp + 8; /* 0x4707B07D: add esp, 8 */ 565 _flag_k = FK_ADD; 566 RECOMP_FLAGS_OUT(); esp += 32; { RECOMP_REGS_OUT(); return; } /* 0x4707B080: ret 0x1c */ 567 L_4707B083: 568 ecx = MEM32(esp + 0x28); /* 0x4707B083: mov ecx, dword ptr [esp + 0x28] */ 569 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 570 ebx = 0; /* 0x4707B087: xor ebx, ebx */ 571 _cf = 0; 572 _flag_k = FK_TEST; 573 /* test ecx, ecx */ /* 0x4707B089: test ecx, ecx */ 574 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 575 _cf = 0; 576 _flag_k = FK_TEST; 577 MEM32(esp + 0x10) = edi; /* 0x4707B08B: mov dword ptr [esp + 0x10], edi */ 578 if (TEST_Z(_flag_a, _flag_b)) goto L_4707B0A3; /* 0x4707B08F: je 0x4707b0a3 */ 579 L_4707B091: 580 eax = MEM32(ecx + 0x8); /* 0x4707B091: mov eax, dword ptr [ecx + 8] */ 581 edx = MEM32(ecx); /* 0x4707B094: mov edx, dword ptr [ecx] */ 582 MEM32(esp + 0x10) = eax; /* 0x4707B096: mov dword ptr [esp + 0x10], eax */ 583 edi = esp + 0x10; /* 0x4707B09A: lea edi, [esp + 0x10] */ 584 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707B09E: call dword ptr [edx + 4] */ 585 RECOMP_FLAGS_IN(); 586 ebx = eax; /* 0x4707B0A1: mov ebx, eax */ 587 L_4707B0A3: 588 ecx = MEM32(esp + 0x24); /* 0x4707B0A3: mov ecx, dword ptr [esp + 0x24] */ 589 edx = MEM32(esp + 0x20); /* 0x4707B0A7: mov edx, dword ptr [esp + 0x20] */ 590 eax = MEM32(ebp); /* 0x4707B0AB: mov eax, dword ptr [ebp] */ 591 PUSH32(esp, ecx); /* 0x4707B0AE: push ecx */ 592 PUSH32(esp, edx); /* 0x4707B0AF: push edx */ 593 PUSH32(esp, edi); /* 0x4707B0B0: push edi */ 594 PUSH32(esp, ebx); /* 0x4707B0B1: push ebx */ 595 PUSH32(esp, eax); /* 0x4707B0B2: push eax */ 596 RECOMP_ICALL(MEM32(0x470AC49C)); /* 0x4707B0B3: call dword ptr [0x470ac49c] */ 597 RECOMP_FLAGS_IN(); 598 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B0B9: cmp eax, -1 */ 599 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 600 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 601 _flag_k = FK_CMP; 602 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B0D1; /* 0x4707B0BC: jne 0x4707b0d1 */ 603 L_4707B0BE: 604 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707B0BE: call dword ptr [0x470ac4a4] */ 605 RECOMP_FLAGS_IN(); 606 esi = eax; /* 0x4707B0C4: mov esi, eax */ 607 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707B0C6: call dword ptr [0x470ac3c8] */ 608 RECOMP_FLAGS_IN(); 609 MEM32(eax) = esi; /* 0x4707B0CC: mov dword ptr [eax], esi */ 610 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 611 eax = eax | 0xFFFFFFFFu; /* 0x4707B0CE: or eax, 0xffffffff */ 612 _cf = 0; 613 _flag_k = FK_TEST; 614 L_4707B0D1: 615 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B0D1: cmp eax, -1 */ 616 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 617 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 618 _flag_k = FK_CMP; 619 esi = MEM32(esp + 0x1C); /* 0x4707B0D4: mov esi, dword ptr [esp + 0x1c] */ 620 MEM32(esi) = eax; /* 0x4707B0D8: mov dword ptr [esi], eax */ 621 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B0F7; /* 0x4707B0DA: jne 0x4707b0f7 */ 622 L_4707B0DC: 623 eax = MEM32(esp + 0x30); /* 0x4707B0DC: mov eax, dword ptr [esp + 0x30] */ 624 /* test eax, eax */ /* 0x4707B0E0: test eax, eax */ 625 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 626 _cf = 0; 627 _flag_k = FK_TEST; 628 if (TEST_Z(_flag_a, _flag_b)) goto L_4707B0F7; /* 0x4707B0E2: je 0x4707b0f7 */ 629 L_4707B0E4: 630 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707B0E4: call dword ptr [0x470ac3c8] */ 631 RECOMP_FLAGS_IN(); 632 /* cmp MEM32(eax), 4 */ /* 0x4707B0EA: cmp dword ptr [eax], 4 */ 633 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(4); 634 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 635 _flag_k = FK_CMP; 636 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B0F7; /* 0x4707B0ED: jne 0x4707b0f7 */ 637 L_4707B0EF: 638 eax = MEM32(esp + 0x2C); /* 0x4707B0EF: mov eax, dword ptr [esp + 0x2c] */ 639 /* test eax, eax */ /* 0x4707B0F3: test eax, eax */ 640 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 641 _cf = 0; 642 _flag_k = FK_TEST; 643 RECOMP_BACKEDGE(); 644 if (TEST_Z(_flag_a, _flag_b)) goto L_4707B0A3; /* 0x4707B0F5: je 0x4707b0a3 */ 645 L_4707B0F7: 646 /* cmp MEM32(esi), 0xFFFFFFFFu */ /* 0x4707B0F7: cmp dword ptr [esi], -1 */ 647 _flag_a = (uint32_t)(MEM32(esi)); _flag_b = (uint32_t)(0xFFFFFFFFu); 648 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 649 _flag_k = FK_CMP; 650 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707B10B; /* 0x4707B0FA: je 0x4707b10b */ 651 L_4707B0FC: 652 eax = MEM32(esp + 0x28); /* 0x4707B0FC: mov eax, dword ptr [esp + 0x28] */ 653 /* test eax, eax */ /* 0x4707B100: test eax, eax */ 654 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 655 _cf = 0; 656 _flag_k = FK_TEST; 657 if (TEST_Z(_flag_a, _flag_b)) goto L_4707B10B; /* 0x4707B102: je 0x4707b10b */ 658 L_4707B104: 659 ecx = MEM32(esp + 0x10); /* 0x4707B104: mov ecx, dword ptr [esp + 0x10] */ 660 MEM32(eax + 0x8) = ecx; /* 0x4707B108: mov dword ptr [eax + 8], ecx */ 661 L_4707B10B: 662 edx = MEM32(esp + 0x34); /* 0x4707B10B: mov edx, dword ptr [esp + 0x34] */ 663 eax = MEM32(esp + 0x14); /* 0x4707B10F: mov eax, dword ptr [esp + 0x14] */ 664 PUSH32(esp, edx); /* 0x4707B113: push edx */ 665 PUSH32(esp, eax); /* 0x4707B114: push eax */ 666 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 667 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 668 esp = esp - 0x10u; /* 0x4707B115: sub esp, 0x10 */ 669 _flag_k = FK_CMP; 670 ecx = esp; /* 0x4707B118: mov ecx, esp */ 671 MEM32(esp + 0x48) = esp; /* 0x4707B11A: mov dword ptr [esp + 0x48], esp */ 672 PUSH32(esp, esi); /* 0x4707B11E: push esi */ 673 RECOMP_ICALL(0x47032F30u); /* 0x4707B11F: call 0x47032f30 */ /* not lifted */ 674 RECOMP_FLAGS_IN(); 675 ecx = ebp; /* 0x4707B124: mov ecx, ebp */ 676 RECOMP_ICALL(0x4707AE50u); /* 0x4707B126: call 0x4707ae50 */ /* not lifted */ 677 RECOMP_FLAGS_IN(); 678 edi = POP32_VAL(esp); /* 0x4707B12B: pop edi */ 679 esi = POP32_VAL(esp); /* 0x4707B12C: pop esi */ 680 ebp = POP32_VAL(esp); /* 0x4707B12D: pop ebp */ 681 ebx = POP32_VAL(esp); /* 0x4707B12E: pop ebx */ 682 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 683 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 684 esp = esp + 8; /* 0x4707B12F: add esp, 8 */ 685 _flag_k = FK_ADD; 686 RECOMP_FLAGS_OUT(); esp += 32; { RECOMP_REGS_OUT(); return; } /* 0x4707B132: ret 0x1c */ 687 RECOMP_REGS_OUT(); 688 } 689 690 void sub_4707B140(void) { 691 int _fpu_cmp = 0; 692 uint32_t _cf = 0; 693 int _df = 1; 694 uint32_t _flag_k = FK_NONE; 695 uint32_t _flag_a = 0, _flag_b = 0; 696 uint32_t _itail_tgt = 0; 697 RECOMP_REGS_LOCALS 698 RECOMP_ENTER(0x4707B140u); 699 700 L_4707B140: 701 eax = MEM32(esp + 0x8); /* 0x4707B140: mov eax, dword ptr [esp + 8] */ 702 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 703 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 704 esp = esp - 0x10u; /* 0x4707B144: sub esp, 0x10 */ 705 _flag_k = FK_CMP; 706 PUSH32(esp, ebp); /* 0x4707B147: push ebp */ 707 PUSH32(esp, esi); /* 0x4707B148: push esi */ 708 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 709 ebp = 0; /* 0x4707B149: xor ebp, ebp */ 710 _cf = 0; 711 _flag_k = FK_TEST; 712 /* cmp eax, 2 */ /* 0x4707B14B: cmp eax, 2 */ 713 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2); 714 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 715 _flag_k = FK_CMP; 716 PUSH32(esp, edi); /* 0x4707B14E: push edi */ 717 esi = ecx; /* 0x4707B14F: mov esi, ecx */ 718 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B1E7; /* 0x4707B151: jne 0x4707b1e7 */ 719 L_4707B157: 720 ecx = MEM32(esp + 0x20); /* 0x4707B157: mov ecx, dword ptr [esp + 0x20] */ 721 edx = MEM32(0x4710DF0C); /* 0x4707B15B: mov edx, dword ptr [0x4710df0c] */ 722 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 723 eax = 0; /* 0x4707B161: xor eax, eax */ 724 _cf = 0; 725 _flag_k = FK_TEST; 726 MEM32(esp + 0xC) = eax; /* 0x4707B163: mov dword ptr [esp + 0xc], eax */ 727 MEM32(esp + 0x10) = eax; /* 0x4707B167: mov dword ptr [esp + 0x10], eax */ 728 MEM32(esp + 0x14) = eax; /* 0x4707B16B: mov dword ptr [esp + 0x14], eax */ 729 MEM32(esp + 0x18) = eax; /* 0x4707B16F: mov dword ptr [esp + 0x18], eax */ 730 /* cmp edx, MEM32(ecx + 0x4) */ /* 0x4707B173: cmp edx, dword ptr [ecx + 4] */ 731 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(ecx + 0x4)); 732 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 733 _flag_k = FK_CMP; 734 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B194; /* 0x4707B176: jne 0x4707b194 */ 735 L_4707B178: 736 eax = MEM32(0x4710DF10); /* 0x4707B178: mov eax, dword ptr [0x4710df10] */ 737 /* cmp eax, MEM32(ecx + 0x8) */ /* 0x4707B17D: cmp eax, dword ptr [ecx + 8] */ 738 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8)); 739 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 740 _flag_k = FK_CMP; 741 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B194; /* 0x4707B180: jne 0x4707b194 */ 742 L_4707B182: 743 PUSH32(esp, ebp); /* 0x4707B182: push ebp */ 744 MEM16(esp + 0x12) = (uint16_t)(LO16(ebp)); /* 0x4707B183: mov word ptr [esp + 0x12], bp */ 745 RECOMP_ICALL(MEM32(0x470AC4AC)); /* 0x4707B188: call dword ptr [0x470ac4ac] */ 746 RECOMP_FLAGS_IN(); 747 MEM32(esp + 0x10) = eax; /* 0x4707B18E: mov dword ptr [esp + 0x10], eax */ 748 goto L_4707B1B6; /* 0x4707B192: jmp 0x4707b1b6 */ 749 L_4707B194: 750 edx = MEM32(ecx); /* 0x4707B194: mov edx, dword ptr [ecx] */ 751 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707B196: call dword ptr [edx + 4] */ 752 RECOMP_FLAGS_IN(); 753 ecx = eax; /* 0x4707B199: mov ecx, eax */ 754 edx = MEM32(ecx); /* 0x4707B19B: mov edx, dword ptr [ecx] */ 755 MEM32(esp + 0xC) = edx; /* 0x4707B19D: mov dword ptr [esp + 0xc], edx */ 756 eax = MEM32(ecx + 0x4); /* 0x4707B1A1: mov eax, dword ptr [ecx + 4] */ 757 MEM32(esp + 0x10) = eax; /* 0x4707B1A4: mov dword ptr [esp + 0x10], eax */ 758 edx = MEM32(ecx + 0x8); /* 0x4707B1A8: mov edx, dword ptr [ecx + 8] */ 759 MEM32(esp + 0x14) = edx; /* 0x4707B1AB: mov dword ptr [esp + 0x14], edx */ 760 ecx = MEM32(ecx + 0xC); /* 0x4707B1AF: mov ecx, dword ptr [ecx + 0xc] */ 761 MEM32(esp + 0x18) = ecx; /* 0x4707B1B2: mov dword ptr [esp + 0x18], ecx */ 762 L_4707B1B6: 763 /* cmp MEM16(esp + 0xE), LO16(ebp) */ /* 0x4707B1B6: cmp word ptr [esp + 0xe], bp */ 764 _flag_a = (uint32_t)(MEM16(esp + 0xE)) << 16; _flag_b = (uint32_t)(LO16(ebp)) << 16; 765 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 766 _flag_k = FK_NARROW(FK_CMP, 16); 767 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B1D0; /* 0x4707B1BB: jne 0x4707b1d0 */ 768 L_4707B1BD: 769 ecx = MEM32(esi); /* 0x4707B1BD: mov ecx, dword ptr [esi] */ 770 PUSH32(esp, eax); /* 0x4707B1BF: push eax */ 771 PUSH32(esp, ecx); /* 0x4707B1C0: push ecx */ 772 RECOMP_ICALL(0x4700E920u); /* 0x4707B1C1: call 0x4700e920 */ /* not lifted */ 773 RECOMP_FLAGS_IN(); 774 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 775 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 776 esp = esp + 8; /* 0x4707B1C6: add esp, 8 */ 777 _flag_k = FK_ADD; 778 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B1C9: cmp eax, -1 */ 779 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 780 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 781 _flag_k = FK_CMP; 782 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B205; /* 0x4707B1CC: jne 0x4707b205 */ 783 L_4707B1CE: 784 goto L_4707B228; /* 0x4707B1CE: jmp 0x4707b228 */ 785 L_4707B1D0: 786 eax = MEM32(esi); /* 0x4707B1D0: mov eax, dword ptr [esi] */ 787 PUSH32(esp, 0x10u); /* 0x4707B1D2: push 0x10 */ 788 edx = esp + 0x10; /* 0x4707B1D4: lea edx, [esp + 0x10] */ 789 PUSH32(esp, edx); /* 0x4707B1D8: push edx */ 790 PUSH32(esp, eax); /* 0x4707B1D9: push eax */ 791 RECOMP_ICALL(MEM32(0x470AC48C)); /* 0x4707B1DA: call dword ptr [0x470ac48c] */ 792 RECOMP_FLAGS_IN(); 793 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B1E0: cmp eax, -1 */ 794 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 795 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 796 _flag_k = FK_CMP; 797 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B205; /* 0x4707B1E3: jne 0x4707b205 */ 798 L_4707B1E5: 799 goto L_4707B218; /* 0x4707B1E5: jmp 0x4707b218 */ 800 L_4707B1E7: 801 ecx = MEM32(esp + 0x20); /* 0x4707B1E7: mov ecx, dword ptr [esp + 0x20] */ 802 eax = MEM32(ecx); /* 0x4707B1EB: mov eax, dword ptr [ecx] */ 803 edi = MEM32(ecx + 0x8); /* 0x4707B1ED: mov edi, dword ptr [ecx + 8] */ 804 PUSH32(esp, ebx); /* 0x4707B1F0: push ebx */ 805 ebx = MEM32(esi); /* 0x4707B1F1: mov ebx, dword ptr [esi] */ 806 RECOMP_ICALL(MEM32(eax + 0x4)); /* 0x4707B1F3: call dword ptr [eax + 4] */ 807 RECOMP_FLAGS_IN(); 808 PUSH32(esp, edi); /* 0x4707B1F6: push edi */ 809 PUSH32(esp, eax); /* 0x4707B1F7: push eax */ 810 PUSH32(esp, ebx); /* 0x4707B1F8: push ebx */ 811 RECOMP_ICALL(MEM32(0x470AC48C)); /* 0x4707B1F9: call dword ptr [0x470ac48c] */ 812 RECOMP_FLAGS_IN(); 813 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B1FF: cmp eax, -1 */ 814 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 815 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 816 _flag_k = FK_CMP; 817 ebx = POP32_VAL(esp); /* 0x4707B202: pop ebx */ 818 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707B218; /* 0x4707B203: je 0x4707b218 */ 819 L_4707B205: 820 ecx = MEM32(esp + 0x28); /* 0x4707B205: mov ecx, dword ptr [esp + 0x28] */ 821 eax = MEM32(esi); /* 0x4707B209: mov eax, dword ptr [esi] */ 822 PUSH32(esp, ecx); /* 0x4707B20B: push ecx */ 823 PUSH32(esp, eax); /* 0x4707B20C: push eax */ 824 RECOMP_ICALL(MEM32(0x470AC444)); /* 0x4707B20D: call dword ptr [0x470ac444] */ 825 RECOMP_FLAGS_IN(); 826 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B213: cmp eax, -1 */ 827 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 828 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 829 _flag_k = FK_CMP; 830 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B234; /* 0x4707B216: jne 0x4707b234 */ 831 L_4707B218: 832 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707B218: call dword ptr [0x470ac4a4] */ 833 RECOMP_FLAGS_IN(); 834 edi = eax; /* 0x4707B21E: mov edi, eax */ 835 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707B220: call dword ptr [0x470ac3c8] */ 836 RECOMP_FLAGS_IN(); 837 MEM32(eax) = edi; /* 0x4707B226: mov dword ptr [eax], edi */ 838 L_4707B228: 839 ecx = esi; /* 0x4707B228: mov ecx, esi */ 840 ebp = 1; /* 0x4707B22A: mov ebp, 1 */ 841 RECOMP_ICALL(0x4707A640u); /* 0x4707B22F: call 0x4707a640 */ /* not lifted */ 842 RECOMP_FLAGS_IN(); 843 L_4707B234: 844 eax = ebp; /* 0x4707B234: mov eax, ebp */ 845 edi = POP32_VAL(esp); /* 0x4707B236: pop edi */ 846 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(eax); 847 _cf = (eax) != 0; 848 eax = (uint32_t)(-(int32_t)eax); /* 0x4707B237: neg eax */ 849 _flag_k = FK_CMP; 850 esi = POP32_VAL(esp); /* 0x4707B239: pop esi */ 851 { uint32_t _sa = eax, _sb = eax, _sc = _cf; /* 0x4707B23A: sbb eax, eax */ 852 eax = _sc ? 0xFFFFFFFFu : 0; 853 _flag_a = recomp_flags_sbb(_sa, _sb, _sc); _flag_b = 0; 854 _flag_k = FK_EFLAGS; _cf = _flag_a & 1u; } 855 ebp = POP32_VAL(esp); /* 0x4707B23C: pop ebp */ 856 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 857 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 858 esp = esp + 0x10u; /* 0x4707B23D: add esp, 0x10 */ 859 _flag_k = FK_ADD; 860 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x4707B240: ret 0xc */ 861 RECOMP_REGS_OUT(); 862 } 863 864 void sub_4707B250(void) { 865 int _fpu_cmp = 0; 866 uint32_t _cf = 0; 867 int _df = 1; 868 uint32_t _flag_k = FK_NONE; 869 uint32_t _flag_a = 0, _flag_b = 0; 870 uint32_t _itail_tgt = 0; 871 RECOMP_REGS_LOCALS 872 RECOMP_ENTER(0x4707B250u); 873 874 L_4707B250: 875 eax = MEM32(esp + 0x14); /* 0x4707B250: mov eax, dword ptr [esp + 0x14] */ 876 edx = MEM32(esp + 0xC); /* 0x4707B254: mov edx, dword ptr [esp + 0xc] */ 877 PUSH32(esp, esi); /* 0x4707B258: push esi */ 878 PUSH32(esp, edi); /* 0x4707B259: push edi */ 879 edi = MEM32(esp + 0x20); /* 0x4707B25A: mov edi, dword ptr [esp + 0x20] */ 880 PUSH32(esp, eax); /* 0x4707B25E: push eax */ 881 eax = MEM32(esp + 0x14); /* 0x4707B25F: mov eax, dword ptr [esp + 0x14] */ 882 esi = ecx; /* 0x4707B263: mov esi, ecx */ 883 ecx = MEM32(esp + 0x1C); /* 0x4707B265: mov ecx, dword ptr [esp + 0x1c] */ 884 PUSH32(esp, ecx); /* 0x4707B269: push ecx */ 885 ecx = MEM32(esp + 0x30); /* 0x4707B26A: mov ecx, dword ptr [esp + 0x30] */ 886 PUSH32(esp, edx); /* 0x4707B26E: push edx */ 887 PUSH32(esp, eax); /* 0x4707B26F: push eax */ 888 PUSH32(esp, ecx); /* 0x4707B270: push ecx */ 889 PUSH32(esp, edi); /* 0x4707B271: push edi */ 890 PUSH32(esp, 1); /* 0x4707B272: push 1 */ 891 ecx = esi; /* 0x4707B274: mov ecx, esi */ 892 RECOMP_ICALL(0x4707AAE0u); /* 0x4707B276: call 0x4707aae0 */ /* not lifted */ 893 RECOMP_FLAGS_IN(); 894 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B27B: cmp eax, -1 */ 895 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 896 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 897 _flag_k = FK_CMP; 898 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B287; /* 0x4707B27E: jne 0x4707b287 */ 899 L_4707B280: 900 edi = POP32_VAL(esp); /* 0x4707B280: pop edi */ 901 _flag_a = (uint32_t)((eax | eax)); _flag_b = (uint32_t)((eax | eax)); 902 eax = eax | eax; /* 0x4707B281: or eax, eax */ 903 _cf = 0; 904 _flag_k = FK_TEST; 905 esi = POP32_VAL(esp); /* 0x4707B283: pop esi */ 906 RECOMP_FLAGS_OUT(); esp += 36; { RECOMP_REGS_OUT(); return; } /* 0x4707B284: ret 0x20 */ 907 L_4707B287: 908 edx = MEM32(esp + 0x24); /* 0x4707B287: mov edx, dword ptr [esp + 0x24] */ 909 eax = MEM32(esp + 0xC); /* 0x4707B28B: mov eax, dword ptr [esp + 0xc] */ 910 PUSH32(esp, edx); /* 0x4707B28F: push edx */ 911 PUSH32(esp, edi); /* 0x4707B290: push edi */ 912 PUSH32(esp, eax); /* 0x4707B291: push eax */ 913 ecx = esi; /* 0x4707B292: mov ecx, esi */ 914 RECOMP_ICALL(0x4707B140u); /* 0x4707B294: call 0x4707b140 */ /* not lifted */ 915 RECOMP_FLAGS_IN(); 916 edi = POP32_VAL(esp); /* 0x4707B299: pop edi */ 917 esi = POP32_VAL(esp); /* 0x4707B29A: pop esi */ 918 RECOMP_FLAGS_OUT(); esp += 36; { RECOMP_REGS_OUT(); return; } /* 0x4707B29B: ret 0x20 */ 919 RECOMP_REGS_OUT(); 920 } 921 922 void sub_4707B2A0(void) { 923 int _fpu_cmp = 0; 924 uint32_t _cf = 0; 925 int _df = 1; 926 uint32_t _flag_k = FK_NONE; 927 uint32_t _flag_a = 0, _flag_b = 0; 928 uint32_t _itail_tgt = 0; 929 RECOMP_REGS_LOCALS 930 RECOMP_ENTER(0x4707B2A0u); 931 932 L_4707B2A0: 933 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707B2A0: push -1 */ 934 PUSH32(esp, 0x470A99C8u); /* 0x4707B2A2: push 0x470a99c8 */ 935 eax = MEM32(FS_BASE + (0)); /* 0x4707B2A7: mov eax, dword ptr fs:[0] */ 936 PUSH32(esp, eax); /* 0x4707B2AD: push eax */ 937 MEM32(FS_BASE + (0)) = esp; /* 0x4707B2AE: mov dword ptr fs:[0], esp */ 938 PUSH32(esp, ecx); /* 0x4707B2B5: push ecx */ 939 PUSH32(esp, esi); /* 0x4707B2B6: push esi */ 940 PUSH32(esp, edi); /* 0x4707B2B7: push edi */ 941 edi = ecx; /* 0x4707B2B8: mov edi, ecx */ 942 MEM32(esp + 0x8) = edi; /* 0x4707B2BA: mov dword ptr [esp + 8], edi */ 943 RECOMP_ICALL(0x4707A510u); /* 0x4707B2BE: call 0x4707a510 */ /* not lifted */ 944 RECOMP_FLAGS_IN(); 945 eax = MEM32(esp + 0x2C); /* 0x4707B2C3: mov eax, dword ptr [esp + 0x2c] */ 946 ecx = MEM32(esp + 0x28); /* 0x4707B2C7: mov ecx, dword ptr [esp + 0x28] */ 947 edx = MEM32(esp + 0x24); /* 0x4707B2CB: mov edx, dword ptr [esp + 0x24] */ 948 esi = MEM32(esp + 0x30); /* 0x4707B2CF: mov esi, dword ptr [esp + 0x30] */ 949 PUSH32(esp, eax); /* 0x4707B2D3: push eax */ 950 eax = MEM32(esp + 0x24); /* 0x4707B2D4: mov eax, dword ptr [esp + 0x24] */ 951 PUSH32(esp, ecx); /* 0x4707B2D8: push ecx */ 952 ecx = MEM32(esp + 0x40); /* 0x4707B2D9: mov ecx, dword ptr [esp + 0x40] */ 953 PUSH32(esp, edx); /* 0x4707B2DD: push edx */ 954 PUSH32(esp, eax); /* 0x4707B2DE: push eax */ 955 PUSH32(esp, ecx); /* 0x4707B2DF: push ecx */ 956 PUSH32(esp, esi); /* 0x4707B2E0: push esi */ 957 PUSH32(esp, 1); /* 0x4707B2E1: push 1 */ 958 ecx = edi; /* 0x4707B2E3: mov ecx, edi */ 959 MEM32(esp + 0x30) = 0; /* 0x4707B2E5: mov dword ptr [esp + 0x30], 0 */ 960 RECOMP_ICALL(0x4707AAE0u); /* 0x4707B2ED: call 0x4707aae0 */ /* not lifted */ 961 RECOMP_FLAGS_IN(); 962 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B2F2: cmp eax, -1 */ 963 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 964 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 965 _flag_k = FK_CMP; 966 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707B30E; /* 0x4707B2F5: je 0x4707b30e */ 967 L_4707B2F7: 968 edx = MEM32(esp + 0x34); /* 0x4707B2F7: mov edx, dword ptr [esp + 0x34] */ 969 eax = MEM32(esp + 0x1C); /* 0x4707B2FB: mov eax, dword ptr [esp + 0x1c] */ 970 PUSH32(esp, edx); /* 0x4707B2FF: push edx */ 971 PUSH32(esp, esi); /* 0x4707B300: push esi */ 972 PUSH32(esp, eax); /* 0x4707B301: push eax */ 973 ecx = edi; /* 0x4707B302: mov ecx, edi */ 974 RECOMP_ICALL(0x4707B140u); /* 0x4707B304: call 0x4707b140 */ /* not lifted */ 975 RECOMP_FLAGS_IN(); 976 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B309: cmp eax, -1 */ 977 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 978 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 979 _flag_k = FK_CMP; 980 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B386; /* 0x4707B30C: jne 0x4707b386 */ 981 L_4707B30E: 982 PUSH32(esp, ebx); /* 0x4707B30E: push ebx */ 983 RECOMP_ICALL(MEM32(0x470AC150)); /* 0x4707B30F: call dword ptr [0x470ac150] */ 984 RECOMP_FLAGS_IN(); 985 ebx = eax; /* 0x4707B315: mov ebx, eax */ 986 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707B317: call dword ptr [0x470ac3c8] */ 987 RECOMP_FLAGS_IN(); 988 eax = MEM32(eax); /* 0x4707B31D: mov eax, dword ptr [eax] */ 989 /* test eax, eax */ /* 0x4707B31F: test eax, eax */ 990 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 991 _cf = 0; 992 _flag_k = FK_TEST; 993 if (TEST_Z(_flag_a, _flag_b)) goto L_4707B325; /* 0x4707B321: je 0x4707b325 */ 994 L_4707B323: 995 ebx = eax; /* 0x4707B323: mov ebx, eax */ 996 L_4707B325: 997 RECOMP_ICALL(0x47039020u); /* 0x4707B325: call 0x47039020 */ /* not lifted */ 998 RECOMP_FLAGS_IN(); 999 esi = eax; /* 0x4707B32A: mov esi, eax */ 1000 ecx = esi; /* 0x4707B32C: mov ecx, esi */ 1001 RECOMP_ICALL(0x4703B210u); /* 0x4707B32E: call 0x4703b210 */ /* not lifted */ 1002 RECOMP_FLAGS_IN(); 1003 PUSH32(esp, eax); /* 0x4707B333: push eax */ 1004 ecx = esi; /* 0x4707B334: mov ecx, esi */ 1005 RECOMP_ICALL(0x4703B240u); /* 0x4707B336: call 0x4703b240 */ /* not lifted */ 1006 RECOMP_FLAGS_IN(); 1007 PUSH32(esp, eax); /* 0x4707B33B: push eax */ 1008 ecx = esi; /* 0x4707B33C: mov ecx, esi */ 1009 RECOMP_ICALL(0x4703B080u); /* 0x4707B33E: call 0x4703b080 */ /* not lifted */ 1010 RECOMP_FLAGS_IN(); 1011 PUSH32(esp, eax); /* 0x4707B343: push eax */ 1012 PUSH32(esp, ebx); /* 0x4707B344: push ebx */ 1013 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707B345: push -1 */ 1014 PUSH32(esp, 0x12Eu); /* 0x4707B347: push 0x12e */ 1015 PUSH32(esp, 0x4710AF8Cu); /* 0x4707B34C: push 0x4710af8c */ 1016 ecx = esi; /* 0x4707B351: mov ecx, esi */ 1017 RECOMP_ICALL(0x4703A340u); /* 0x4707B353: call 0x4703a340 */ /* not lifted */ 1018 RECOMP_FLAGS_IN(); 1019 PUSH32(esp, 0x4710AF78u); /* 0x4707B358: push 0x4710af78 */ 1020 PUSH32(esp, 0x471055F0u); /* 0x4707B35D: push 0x471055f0 */ 1021 PUSH32(esp, 0x80u); /* 0x4707B362: push 0x80 */ 1022 PUSH32(esp, esi); /* 0x4707B367: push esi */ 1023 RECOMP_ICALL(0x47039830u); /* 0x4707B368: call 0x47039830 */ /* not lifted */ 1024 RECOMP_FLAGS_IN(); 1025 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1026 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1027 esp = esp + 0x10u; /* 0x4707B36D: add esp, 0x10 */ 1028 _flag_k = FK_ADD; 1029 ebx = POP32_VAL(esp); /* 0x4707B370: pop ebx */ 1030 eax = edi; /* 0x4707B371: mov eax, edi */ 1031 edi = POP32_VAL(esp); /* 0x4707B373: pop edi */ 1032 esi = POP32_VAL(esp); /* 0x4707B374: pop esi */ 1033 ecx = MEM32(esp + 0x4); /* 0x4707B375: mov ecx, dword ptr [esp + 4] */ 1034 MEM32(FS_BASE + (0)) = ecx; /* 0x4707B379: mov dword ptr fs:[0], ecx */ 1035 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1036 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1037 esp = esp + 0x10u; /* 0x4707B380: add esp, 0x10 */ 1038 _flag_k = FK_ADD; 1039 RECOMP_FLAGS_OUT(); esp += 36; { RECOMP_REGS_OUT(); return; } /* 0x4707B383: ret 0x20 */ 1040 L_4707B386: 1041 ecx = MEM32(esp + 0xC); /* 0x4707B386: mov ecx, dword ptr [esp + 0xc] */ 1042 eax = edi; /* 0x4707B38A: mov eax, edi */ 1043 edi = POP32_VAL(esp); /* 0x4707B38C: pop edi */ 1044 esi = POP32_VAL(esp); /* 0x4707B38D: pop esi */ 1045 MEM32(FS_BASE + (0)) = ecx; /* 0x4707B38E: mov dword ptr fs:[0], ecx */ 1046 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1047 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1048 esp = esp + 0x10u; /* 0x4707B395: add esp, 0x10 */ 1049 _flag_k = FK_ADD; 1050 RECOMP_FLAGS_OUT(); esp += 36; { RECOMP_REGS_OUT(); return; } /* 0x4707B398: ret 0x20 */ 1051 RECOMP_REGS_OUT(); 1052 } 1053 1054 void sub_4707B3A0(void) { 1055 int _fpu_cmp = 0; 1056 uint32_t _cf = 0; 1057 int _df = 1; 1058 uint32_t _flag_k = FK_NONE; 1059 uint32_t _flag_a = 0, _flag_b = 0; 1060 uint32_t _itail_tgt = 0; 1061 RECOMP_REGS_LOCALS 1062 RECOMP_ENTER(0x4707B3A0u); 1063 1064 L_4707B3A0: 1065 eax = MEM32(esp + 0x8); /* 0x4707B3A0: mov eax, dword ptr [esp + 8] */ 1066 PUSH32(esp, esi); /* 0x4707B3A4: push esi */ 1067 PUSH32(esp, edi); /* 0x4707B3A5: push edi */ 1068 edi = MEM32(esp + 0x14); /* 0x4707B3A6: mov edi, dword ptr [esp + 0x14] */ 1069 esi = ecx; /* 0x4707B3AA: mov esi, ecx */ 1070 ecx = MEM32(esp + 0x1C); /* 0x4707B3AC: mov ecx, dword ptr [esp + 0x1c] */ 1071 PUSH32(esp, eax); /* 0x4707B3B0: push eax */ 1072 PUSH32(esp, ecx); /* 0x4707B3B1: push ecx */ 1073 PUSH32(esp, edi); /* 0x4707B3B2: push edi */ 1074 PUSH32(esp, 1); /* 0x4707B3B3: push 1 */ 1075 ecx = esi; /* 0x4707B3B5: mov ecx, esi */ 1076 RECOMP_ICALL(0x4707A680u); /* 0x4707B3B7: call 0x4707a680 */ /* not lifted */ 1077 RECOMP_FLAGS_IN(); 1078 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B3BC: cmp eax, -1 */ 1079 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 1080 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1081 _flag_k = FK_CMP; 1082 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B3C8; /* 0x4707B3BF: jne 0x4707b3c8 */ 1083 L_4707B3C1: 1084 edi = POP32_VAL(esp); /* 0x4707B3C1: pop edi */ 1085 _flag_a = (uint32_t)((eax | eax)); _flag_b = (uint32_t)((eax | eax)); 1086 eax = eax | eax; /* 0x4707B3C2: or eax, eax */ 1087 _cf = 0; 1088 _flag_k = FK_TEST; 1089 esi = POP32_VAL(esp); /* 0x4707B3C4: pop esi */ 1090 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707B3C5: ret 0x14 */ 1091 L_4707B3C8: 1092 edx = MEM32(esp + 0x18); /* 0x4707B3C8: mov edx, dword ptr [esp + 0x18] */ 1093 eax = MEM32(esp + 0xC); /* 0x4707B3CC: mov eax, dword ptr [esp + 0xc] */ 1094 PUSH32(esp, edx); /* 0x4707B3D0: push edx */ 1095 PUSH32(esp, edi); /* 0x4707B3D1: push edi */ 1096 PUSH32(esp, eax); /* 0x4707B3D2: push eax */ 1097 ecx = esi; /* 0x4707B3D3: mov ecx, esi */ 1098 RECOMP_ICALL(0x4707B140u); /* 0x4707B3D5: call 0x4707b140 */ /* not lifted */ 1099 RECOMP_FLAGS_IN(); 1100 edi = POP32_VAL(esp); /* 0x4707B3DA: pop edi */ 1101 esi = POP32_VAL(esp); /* 0x4707B3DB: pop esi */ 1102 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707B3DC: ret 0x14 */ 1103 RECOMP_REGS_OUT(); 1104 } 1105 1106 void sub_4707B3E0(void) { 1107 int _fpu_cmp = 0; 1108 uint32_t _cf = 0; 1109 int _df = 1; 1110 uint32_t _flag_k = FK_NONE; 1111 uint32_t _flag_a = 0, _flag_b = 0; 1112 uint32_t _itail_tgt = 0; 1113 RECOMP_REGS_LOCALS 1114 RECOMP_ENTER(0x4707B3E0u); 1115 1116 L_4707B3E0: 1117 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707B3E0: push -1 */ 1118 PUSH32(esp, 0x470A99E8u); /* 0x4707B3E2: push 0x470a99e8 */ 1119 eax = MEM32(FS_BASE + (0)); /* 0x4707B3E7: mov eax, dword ptr fs:[0] */ 1120 PUSH32(esp, eax); /* 0x4707B3ED: push eax */ 1121 MEM32(FS_BASE + (0)) = esp; /* 0x4707B3EE: mov dword ptr fs:[0], esp */ 1122 PUSH32(esp, ecx); /* 0x4707B3F5: push ecx */ 1123 PUSH32(esp, esi); /* 0x4707B3F6: push esi */ 1124 PUSH32(esp, edi); /* 0x4707B3F7: push edi */ 1125 edi = ecx; /* 0x4707B3F8: mov edi, ecx */ 1126 MEM32(esp + 0x8) = edi; /* 0x4707B3FA: mov dword ptr [esp + 8], edi */ 1127 RECOMP_ICALL(0x4707A510u); /* 0x4707B3FE: call 0x4707a510 */ /* not lifted */ 1128 RECOMP_FLAGS_IN(); 1129 eax = MEM32(esp + 0x20); /* 0x4707B403: mov eax, dword ptr [esp + 0x20] */ 1130 ecx = MEM32(esp + 0x2C); /* 0x4707B407: mov ecx, dword ptr [esp + 0x2c] */ 1131 esi = MEM32(esp + 0x24); /* 0x4707B40B: mov esi, dword ptr [esp + 0x24] */ 1132 PUSH32(esp, eax); /* 0x4707B40F: push eax */ 1133 PUSH32(esp, ecx); /* 0x4707B410: push ecx */ 1134 PUSH32(esp, esi); /* 0x4707B411: push esi */ 1135 PUSH32(esp, 1); /* 0x4707B412: push 1 */ 1136 ecx = edi; /* 0x4707B414: mov ecx, edi */ 1137 MEM32(esp + 0x24) = 0; /* 0x4707B416: mov dword ptr [esp + 0x24], 0 */ 1138 RECOMP_ICALL(0x4707A680u); /* 0x4707B41E: call 0x4707a680 */ /* not lifted */ 1139 RECOMP_FLAGS_IN(); 1140 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B423: cmp eax, -1 */ 1141 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 1142 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1143 _flag_k = FK_CMP; 1144 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707B43F; /* 0x4707B426: je 0x4707b43f */ 1145 L_4707B428: 1146 edx = MEM32(esp + 0x28); /* 0x4707B428: mov edx, dword ptr [esp + 0x28] */ 1147 eax = MEM32(esp + 0x1C); /* 0x4707B42C: mov eax, dword ptr [esp + 0x1c] */ 1148 PUSH32(esp, edx); /* 0x4707B430: push edx */ 1149 PUSH32(esp, esi); /* 0x4707B431: push esi */ 1150 PUSH32(esp, eax); /* 0x4707B432: push eax */ 1151 ecx = edi; /* 0x4707B433: mov ecx, edi */ 1152 RECOMP_ICALL(0x4707B140u); /* 0x4707B435: call 0x4707b140 */ /* not lifted */ 1153 RECOMP_FLAGS_IN(); 1154 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B43A: cmp eax, -1 */ 1155 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 1156 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1157 _flag_k = FK_CMP; 1158 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B4B7; /* 0x4707B43D: jne 0x4707b4b7 */ 1159 L_4707B43F: 1160 PUSH32(esp, ebx); /* 0x4707B43F: push ebx */ 1161 RECOMP_ICALL(MEM32(0x470AC150)); /* 0x4707B440: call dword ptr [0x470ac150] */ 1162 RECOMP_FLAGS_IN(); 1163 ebx = eax; /* 0x4707B446: mov ebx, eax */ 1164 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707B448: call dword ptr [0x470ac3c8] */ 1165 RECOMP_FLAGS_IN(); 1166 eax = MEM32(eax); /* 0x4707B44E: mov eax, dword ptr [eax] */ 1167 /* test eax, eax */ /* 0x4707B450: test eax, eax */ 1168 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1169 _cf = 0; 1170 _flag_k = FK_TEST; 1171 if (TEST_Z(_flag_a, _flag_b)) goto L_4707B456; /* 0x4707B452: je 0x4707b456 */ 1172 L_4707B454: 1173 ebx = eax; /* 0x4707B454: mov ebx, eax */ 1174 L_4707B456: 1175 RECOMP_ICALL(0x47039020u); /* 0x4707B456: call 0x47039020 */ /* not lifted */ 1176 RECOMP_FLAGS_IN(); 1177 esi = eax; /* 0x4707B45B: mov esi, eax */ 1178 ecx = esi; /* 0x4707B45D: mov ecx, esi */ 1179 RECOMP_ICALL(0x4703B210u); /* 0x4707B45F: call 0x4703b210 */ /* not lifted */ 1180 RECOMP_FLAGS_IN(); 1181 PUSH32(esp, eax); /* 0x4707B464: push eax */ 1182 ecx = esi; /* 0x4707B465: mov ecx, esi */ 1183 RECOMP_ICALL(0x4703B240u); /* 0x4707B467: call 0x4703b240 */ /* not lifted */ 1184 RECOMP_FLAGS_IN(); 1185 PUSH32(esp, eax); /* 0x4707B46C: push eax */ 1186 ecx = esi; /* 0x4707B46D: mov ecx, esi */ 1187 RECOMP_ICALL(0x4703B080u); /* 0x4707B46F: call 0x4703b080 */ /* not lifted */ 1188 RECOMP_FLAGS_IN(); 1189 PUSH32(esp, eax); /* 0x4707B474: push eax */ 1190 PUSH32(esp, ebx); /* 0x4707B475: push ebx */ 1191 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707B476: push -1 */ 1192 PUSH32(esp, 0x157u); /* 0x4707B478: push 0x157 */ 1193 PUSH32(esp, 0x4710AF8Cu); /* 0x4707B47D: push 0x4710af8c */ 1194 ecx = esi; /* 0x4707B482: mov ecx, esi */ 1195 RECOMP_ICALL(0x4703A340u); /* 0x4707B484: call 0x4703a340 */ /* not lifted */ 1196 RECOMP_FLAGS_IN(); 1197 PUSH32(esp, 0x4710AF78u); /* 0x4707B489: push 0x4710af78 */ 1198 PUSH32(esp, 0x471055F0u); /* 0x4707B48E: push 0x471055f0 */ 1199 PUSH32(esp, 0x80u); /* 0x4707B493: push 0x80 */ 1200 PUSH32(esp, esi); /* 0x4707B498: push esi */ 1201 RECOMP_ICALL(0x47039830u); /* 0x4707B499: call 0x47039830 */ /* not lifted */ 1202 RECOMP_FLAGS_IN(); 1203 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1204 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1205 esp = esp + 0x10u; /* 0x4707B49E: add esp, 0x10 */ 1206 _flag_k = FK_ADD; 1207 ebx = POP32_VAL(esp); /* 0x4707B4A1: pop ebx */ 1208 eax = edi; /* 0x4707B4A2: mov eax, edi */ 1209 edi = POP32_VAL(esp); /* 0x4707B4A4: pop edi */ 1210 esi = POP32_VAL(esp); /* 0x4707B4A5: pop esi */ 1211 ecx = MEM32(esp + 0x4); /* 0x4707B4A6: mov ecx, dword ptr [esp + 4] */ 1212 MEM32(FS_BASE + (0)) = ecx; /* 0x4707B4AA: mov dword ptr fs:[0], ecx */ 1213 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1214 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1215 esp = esp + 0x10u; /* 0x4707B4B1: add esp, 0x10 */ 1216 _flag_k = FK_ADD; 1217 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707B4B4: ret 0x14 */ 1218 L_4707B4B7: 1219 ecx = MEM32(esp + 0xC); /* 0x4707B4B7: mov ecx, dword ptr [esp + 0xc] */ 1220 eax = edi; /* 0x4707B4BB: mov eax, edi */ 1221 edi = POP32_VAL(esp); /* 0x4707B4BD: pop edi */ 1222 esi = POP32_VAL(esp); /* 0x4707B4BE: pop esi */ 1223 MEM32(FS_BASE + (0)) = ecx; /* 0x4707B4BF: mov dword ptr fs:[0], ecx */ 1224 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1225 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1226 esp = esp + 0x10u; /* 0x4707B4C6: add esp, 0x10 */ 1227 _flag_k = FK_ADD; 1228 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707B4C9: ret 0x14 */ 1229 RECOMP_REGS_OUT(); 1230 } 1231 1232 void sub_4707B4D0(void) { 1233 int _fpu_cmp = 0; 1234 uint32_t _cf = 0; 1235 int _df = 1; 1236 uint32_t _flag_k = FK_NONE; 1237 uint32_t _flag_a = 0, _flag_b = 0; 1238 uint32_t _itail_tgt = 0; 1239 RECOMP_REGS_LOCALS 1240 RECOMP_ENTER(0x4707B4D0u); 1241 1242 L_4707B4D0: 1243 ecx = 0x4710EF51u; /* 0x4707B4D0: mov ecx, 0x4710ef51 */ 1244 RECOMP_ICALL(MEM32(0x470AC1C8)); /* 0x4707B4D5: call dword ptr [0x470ac1c8] */ 1245 RECOMP_FLAGS_IN(); 1246 PUSH32(esp, 0x4707B4F0u); /* 0x4707B4DB: push 0x4707b4f0 */ 1247 RECOMP_ICALL(0x470A32D9u); /* 0x4707B4E0: call 0x470a32d9 */ /* not lifted */ 1248 RECOMP_FLAGS_IN(); 1249 ecx = POP32_VAL(esp); /* 0x4707B4E5: pop ecx */ 1250 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B4E6: ret */ 1251 RECOMP_REGS_OUT(); 1252 } 1253 1254 void sub_4707B4F0(void) { 1255 int _fpu_cmp = 0; 1256 uint32_t _cf = 0; 1257 int _df = 1; 1258 uint32_t _flag_k = FK_NONE; 1259 uint32_t _flag_a = 0, _flag_b = 0; 1260 uint32_t _itail_tgt = 0; 1261 RECOMP_REGS_LOCALS 1262 RECOMP_ENTER(0x4707B4F0u); 1263 1264 L_4707B4F0: 1265 ecx = 0x4710EF51u; /* 0x4707B4F0: mov ecx, 0x4710ef51 */ 1266 L_4707B4F5: 1267 { _itail_tgt = (uint32_t)(MEM32(0x470AC1BC)); goto _ljump; } 1268 { RECOMP_REGS_OUT(); return; } /* end of function */ 1269 _ljump: 1270 switch (_itail_tgt) { 1271 case 0x4707B4F0u: goto L_4707B4F0; 1272 case 0x4707B4F5u: goto L_4707B4F5; 1273 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1274 } 1275 RECOMP_REGS_OUT(); 1276 } 1277 1278 void sub_4707B500(void) { 1279 int _fpu_cmp = 0; 1280 uint32_t _cf = 0; 1281 int _df = 1; 1282 uint32_t _flag_k = FK_NONE; 1283 uint32_t _flag_a = 0, _flag_b = 0; 1284 uint32_t _itail_tgt = 0; 1285 RECOMP_REGS_LOCALS 1286 RECOMP_ENTER(0x4707B500u); 1287 1288 L_4707B500: 1289 ecx = 0x4710EF50u; /* 0x4707B500: mov ecx, 0x4710ef50 */ 1290 RECOMP_ICALL(MEM32(0x470AC1C4)); /* 0x4707B505: call dword ptr [0x470ac1c4] */ 1291 RECOMP_FLAGS_IN(); 1292 PUSH32(esp, 0x4707B520u); /* 0x4707B50B: push 0x4707b520 */ 1293 RECOMP_ICALL(0x470A32D9u); /* 0x4707B510: call 0x470a32d9 */ /* not lifted */ 1294 RECOMP_FLAGS_IN(); 1295 ecx = POP32_VAL(esp); /* 0x4707B515: pop ecx */ 1296 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B516: ret */ 1297 RECOMP_REGS_OUT(); 1298 } 1299 1300 void sub_4707B520(void) { 1301 int _fpu_cmp = 0; 1302 uint32_t _cf = 0; 1303 int _df = 1; 1304 uint32_t _flag_k = FK_NONE; 1305 uint32_t _flag_a = 0, _flag_b = 0; 1306 uint32_t _itail_tgt = 0; 1307 RECOMP_REGS_LOCALS 1308 RECOMP_ENTER(0x4707B520u); 1309 1310 L_4707B520: 1311 ecx = 0x4710EF50u; /* 0x4707B520: mov ecx, 0x4710ef50 */ 1312 L_4707B525: 1313 { _itail_tgt = (uint32_t)(MEM32(0x470AC1C0)); goto _ljump; } 1314 { RECOMP_REGS_OUT(); return; } /* end of function */ 1315 _ljump: 1316 switch (_itail_tgt) { 1317 case 0x4707B520u: goto L_4707B520; 1318 case 0x4707B525u: goto L_4707B525; 1319 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1320 } 1321 RECOMP_REGS_OUT(); 1322 } 1323 1324 void sub_4707B530(void) { 1325 int _fpu_cmp = 0; 1326 uint32_t _cf = 0; 1327 int _df = 1; 1328 uint32_t _flag_k = FK_NONE; 1329 uint32_t _flag_a = 0, _flag_b = 0; 1330 uint32_t _itail_tgt = 0; 1331 RECOMP_REGS_LOCALS 1332 RECOMP_ENTER(0x4707B530u); 1333 1334 L_4707B530: 1335 MEM32(0x4710EF44) = 0x47104A3Cu; /* 0x4707B530: mov dword ptr [0x4710ef44], 0x47104a3c */ 1336 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B53A: ret */ 1337 RECOMP_REGS_OUT(); 1338 } 1339 1340 void sub_4707B540(void) { 1341 int _fpu_cmp = 0; 1342 uint32_t _cf = 0; 1343 int _df = 1; 1344 uint32_t _flag_k = FK_NONE; 1345 uint32_t _flag_a = 0, _flag_b = 0; 1346 uint32_t _itail_tgt = 0; 1347 RECOMP_REGS_LOCALS 1348 RECOMP_ENTER(0x4707B540u); 1349 1350 L_4707B540: 1351 MEM32(0x4710EF58) = 0x47104A00u; /* 0x4707B540: mov dword ptr [0x4710ef58], 0x47104a00 */ 1352 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B54A: ret */ 1353 RECOMP_REGS_OUT(); 1354 } 1355 1356 void sub_4707B550(void) { 1357 int _fpu_cmp = 0; 1358 uint32_t _cf = 0; 1359 int _df = 1; 1360 uint32_t _flag_k = FK_NONE; 1361 uint32_t _flag_a = 0, _flag_b = 0; 1362 uint32_t _itail_tgt = 0; 1363 RECOMP_REGS_LOCALS 1364 RECOMP_ENTER(0x4707B550u); 1365 1366 L_4707B550: 1367 MEM32(0x4710EF54) = 0x47104A70u; /* 0x4707B550: mov dword ptr [0x4710ef54], 0x47104a70 */ 1368 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B55A: ret */ 1369 RECOMP_REGS_OUT(); 1370 } 1371 1372 void sub_4707B560(void) { 1373 int _fpu_cmp = 0; 1374 uint32_t _cf = 0; 1375 int _df = 1; 1376 uint32_t _flag_k = FK_NONE; 1377 uint32_t _flag_a = 0, _flag_b = 0; 1378 uint32_t _itail_tgt = 0; 1379 RECOMP_REGS_LOCALS 1380 RECOMP_ENTER(0x4707B560u); 1381 1382 L_4707B560: 1383 MEM32(0x4710EF60) = 0x47104B6Cu; /* 0x4707B560: mov dword ptr [0x4710ef60], 0x47104b6c */ 1384 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B56A: ret */ 1385 RECOMP_REGS_OUT(); 1386 } 1387 1388 void sub_4707B570(void) { 1389 int _fpu_cmp = 0; 1390 uint32_t _cf = 0; 1391 int _df = 1; 1392 uint32_t _flag_k = FK_NONE; 1393 uint32_t _flag_a = 0, _flag_b = 0; 1394 uint32_t _itail_tgt = 0; 1395 RECOMP_REGS_LOCALS 1396 RECOMP_ENTER(0x4707B570u); 1397 1398 L_4707B570: 1399 MEM32(0x4710EF48) = 0x47104BA0u; /* 0x4707B570: mov dword ptr [0x4710ef48], 0x47104ba0 */ 1400 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B57A: ret */ 1401 RECOMP_REGS_OUT(); 1402 } 1403 1404 void sub_4707B580(void) { 1405 int _fpu_cmp = 0; 1406 uint32_t _cf = 0; 1407 int _df = 1; 1408 uint32_t _flag_k = FK_NONE; 1409 uint32_t _flag_a = 0, _flag_b = 0; 1410 uint32_t _itail_tgt = 0; 1411 RECOMP_REGS_LOCALS 1412 RECOMP_ENTER(0x4707B580u); 1413 1414 L_4707B580: 1415 MEM32(0x4710EF5C) = 0x47104BD4u; /* 0x4707B580: mov dword ptr [0x4710ef5c], 0x47104bd4 */ 1416 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B58A: ret */ 1417 RECOMP_REGS_OUT(); 1418 } 1419 1420 void sub_4707B590(void) { 1421 int _fpu_cmp = 0; 1422 uint32_t _cf = 0; 1423 int _df = 1; 1424 uint32_t _flag_k = FK_NONE; 1425 uint32_t _flag_a = 0, _flag_b = 0; 1426 uint32_t _itail_tgt = 0; 1427 RECOMP_REGS_LOCALS 1428 RECOMP_ENTER(0x4707B590u); 1429 1430 L_4707B590: 1431 MEM32(0x4710EF4C) = 0x4710AFC8u; /* 0x4707B590: mov dword ptr [0x4710ef4c], 0x4710afc8 */ 1432 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B59A: ret */ 1433 RECOMP_REGS_OUT(); 1434 } 1435 1436 void sub_4707B5A0(void) { 1437 int _fpu_cmp = 0; 1438 uint32_t _cf = 0; 1439 int _df = 1; 1440 uint32_t _flag_k = FK_NONE; 1441 uint32_t _flag_a = 0, _flag_b = 0; 1442 uint32_t _itail_tgt = 0; 1443 RECOMP_REGS_LOCALS 1444 RECOMP_ENTER(0x4707B5A0u); 1445 1446 L_4707B5A0: 1447 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707B5A0: push -1 */ 1448 PUSH32(esp, 0x470A9A08u); /* 0x4707B5A2: push 0x470a9a08 */ 1449 eax = MEM32(FS_BASE + (0)); /* 0x4707B5A7: mov eax, dword ptr fs:[0] */ 1450 PUSH32(esp, eax); /* 0x4707B5AD: push eax */ 1451 MEM32(FS_BASE + (0)) = esp; /* 0x4707B5AE: mov dword ptr fs:[0], esp */ 1452 PUSH32(esp, ecx); /* 0x4707B5B5: push ecx */ 1453 PUSH32(esp, edi); /* 0x4707B5B6: push edi */ 1454 edi = ecx; /* 0x4707B5B7: mov edi, ecx */ 1455 MEM32(esp + 0x4) = edi; /* 0x4707B5B9: mov dword ptr [esp + 4], edi */ 1456 RECOMP_ICALL(0x4707A510u); /* 0x4707B5BD: call 0x4707a510 */ /* not lifted */ 1457 RECOMP_FLAGS_IN(); 1458 eax = MEM32(esp + 0x28); /* 0x4707B5C2: mov eax, dword ptr [esp + 0x28] */ 1459 ecx = MEM32(esp + 0x24); /* 0x4707B5C6: mov ecx, dword ptr [esp + 0x24] */ 1460 edx = MEM32(esp + 0x20); /* 0x4707B5CA: mov edx, dword ptr [esp + 0x20] */ 1461 PUSH32(esp, eax); /* 0x4707B5CE: push eax */ 1462 eax = MEM32(esp + 0x20); /* 0x4707B5CF: mov eax, dword ptr [esp + 0x20] */ 1463 PUSH32(esp, ecx); /* 0x4707B5D3: push ecx */ 1464 ecx = MEM32(esp + 0x20); /* 0x4707B5D4: mov ecx, dword ptr [esp + 0x20] */ 1465 PUSH32(esp, edx); /* 0x4707B5D8: push edx */ 1466 PUSH32(esp, eax); /* 0x4707B5D9: push eax */ 1467 PUSH32(esp, ecx); /* 0x4707B5DA: push ecx */ 1468 ecx = edi; /* 0x4707B5DB: mov ecx, edi */ 1469 MEM32(esp + 0x24) = 0; /* 0x4707B5DD: mov dword ptr [esp + 0x24], 0 */ 1470 RECOMP_ICALL(0x4707B680u); /* 0x4707B5E5: call 0x4707b680 */ /* not lifted */ 1471 RECOMP_FLAGS_IN(); 1472 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B5EA: cmp eax, -1 */ 1473 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 1474 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1475 _flag_k = FK_CMP; 1476 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B665; /* 0x4707B5ED: jne 0x4707b665 */ 1477 L_4707B5EF: 1478 PUSH32(esp, ebx); /* 0x4707B5EF: push ebx */ 1479 PUSH32(esp, esi); /* 0x4707B5F0: push esi */ 1480 RECOMP_ICALL(MEM32(0x470AC150)); /* 0x4707B5F1: call dword ptr [0x470ac150] */ 1481 RECOMP_FLAGS_IN(); 1482 ebx = eax; /* 0x4707B5F7: mov ebx, eax */ 1483 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707B5F9: call dword ptr [0x470ac3c8] */ 1484 RECOMP_FLAGS_IN(); 1485 eax = MEM32(eax); /* 0x4707B5FF: mov eax, dword ptr [eax] */ 1486 /* test eax, eax */ /* 0x4707B601: test eax, eax */ 1487 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1488 _cf = 0; 1489 _flag_k = FK_TEST; 1490 if (TEST_Z(_flag_a, _flag_b)) goto L_4707B607; /* 0x4707B603: je 0x4707b607 */ 1491 L_4707B605: 1492 ebx = eax; /* 0x4707B605: mov ebx, eax */ 1493 L_4707B607: 1494 RECOMP_ICALL(0x47039020u); /* 0x4707B607: call 0x47039020 */ /* not lifted */ 1495 RECOMP_FLAGS_IN(); 1496 esi = eax; /* 0x4707B60C: mov esi, eax */ 1497 ecx = esi; /* 0x4707B60E: mov ecx, esi */ 1498 RECOMP_ICALL(0x4703B210u); /* 0x4707B610: call 0x4703b210 */ /* not lifted */ 1499 RECOMP_FLAGS_IN(); 1500 PUSH32(esp, eax); /* 0x4707B615: push eax */ 1501 ecx = esi; /* 0x4707B616: mov ecx, esi */ 1502 RECOMP_ICALL(0x4703B240u); /* 0x4707B618: call 0x4703b240 */ /* not lifted */ 1503 RECOMP_FLAGS_IN(); 1504 PUSH32(esp, eax); /* 0x4707B61D: push eax */ 1505 ecx = esi; /* 0x4707B61E: mov ecx, esi */ 1506 RECOMP_ICALL(0x4703B080u); /* 0x4707B620: call 0x4703b080 */ /* not lifted */ 1507 RECOMP_FLAGS_IN(); 1508 PUSH32(esp, eax); /* 0x4707B625: push eax */ 1509 PUSH32(esp, ebx); /* 0x4707B626: push ebx */ 1510 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707B627: push -1 */ 1511 PUSH32(esp, 0x1Eu); /* 0x4707B629: push 0x1e */ 1512 PUSH32(esp, 0x4710B014u); /* 0x4707B62B: push 0x4710b014 */ 1513 ecx = esi; /* 0x4707B630: mov ecx, esi */ 1514 RECOMP_ICALL(0x4703A340u); /* 0x4707B632: call 0x4703a340 */ /* not lifted */ 1515 RECOMP_FLAGS_IN(); 1516 PUSH32(esp, 0x4710B000u); /* 0x4707B637: push 0x4710b000 */ 1517 PUSH32(esp, 0x471055F0u); /* 0x4707B63C: push 0x471055f0 */ 1518 PUSH32(esp, 0x80u); /* 0x4707B641: push 0x80 */ 1519 PUSH32(esp, esi); /* 0x4707B646: push esi */ 1520 RECOMP_ICALL(0x47039830u); /* 0x4707B647: call 0x47039830 */ /* not lifted */ 1521 RECOMP_FLAGS_IN(); 1522 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1523 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1524 esp = esp + 0x10u; /* 0x4707B64C: add esp, 0x10 */ 1525 _flag_k = FK_ADD; 1526 esi = POP32_VAL(esp); /* 0x4707B64F: pop esi */ 1527 ebx = POP32_VAL(esp); /* 0x4707B650: pop ebx */ 1528 eax = edi; /* 0x4707B651: mov eax, edi */ 1529 edi = POP32_VAL(esp); /* 0x4707B653: pop edi */ 1530 ecx = MEM32(esp + 0x4); /* 0x4707B654: mov ecx, dword ptr [esp + 4] */ 1531 MEM32(FS_BASE + (0)) = ecx; /* 0x4707B658: mov dword ptr fs:[0], ecx */ 1532 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1533 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1534 esp = esp + 0x10u; /* 0x4707B65F: add esp, 0x10 */ 1535 _flag_k = FK_ADD; 1536 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707B662: ret 0x14 */ 1537 L_4707B665: 1538 ecx = MEM32(esp + 0x8); /* 0x4707B665: mov ecx, dword ptr [esp + 8] */ 1539 eax = edi; /* 0x4707B669: mov eax, edi */ 1540 edi = POP32_VAL(esp); /* 0x4707B66B: pop edi */ 1541 MEM32(FS_BASE + (0)) = ecx; /* 0x4707B66C: mov dword ptr fs:[0], ecx */ 1542 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1543 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1544 esp = esp + 0x10u; /* 0x4707B673: add esp, 0x10 */ 1545 _flag_k = FK_ADD; 1546 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707B676: ret 0x14 */ 1547 RECOMP_REGS_OUT(); 1548 } 1549 1550 void sub_4707B680(void) { 1551 int _fpu_cmp = 0; 1552 uint32_t _cf = 0; 1553 int _df = 1; 1554 uint32_t _flag_k = FK_NONE; 1555 uint32_t _flag_a = 0, _flag_b = 0; 1556 uint32_t _itail_tgt = 0; 1557 RECOMP_REGS_LOCALS 1558 RECOMP_ENTER(0x4707B680u); 1559 1560 L_4707B680: 1561 eax = MEM32(esp + 0x14); /* 0x4707B680: mov eax, dword ptr [esp + 0x14] */ 1562 PUSH32(esp, ebp); /* 0x4707B684: push ebp */ 1563 ebp = MEM32(esp + 0x10); /* 0x4707B685: mov ebp, dword ptr [esp + 0x10] */ 1564 PUSH32(esp, edi); /* 0x4707B689: push edi */ 1565 edi = ecx; /* 0x4707B68A: mov edi, ecx */ 1566 ecx = MEM32(esp + 0x18); /* 0x4707B68C: mov ecx, dword ptr [esp + 0x18] */ 1567 PUSH32(esp, eax); /* 0x4707B690: push eax */ 1568 PUSH32(esp, ecx); /* 0x4707B691: push ecx */ 1569 PUSH32(esp, ebp); /* 0x4707B692: push ebp */ 1570 PUSH32(esp, 2); /* 0x4707B693: push 2 */ 1571 ecx = edi; /* 0x4707B695: mov ecx, edi */ 1572 RECOMP_ICALL(0x4707A680u); /* 0x4707B697: call 0x4707a680 */ /* not lifted */ 1573 RECOMP_FLAGS_IN(); 1574 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B69C: cmp eax, -1 */ 1575 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 1576 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1577 _flag_k = FK_CMP; 1578 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B6A8; /* 0x4707B69F: jne 0x4707b6a8 */ 1579 L_4707B6A1: 1580 edi = POP32_VAL(esp); /* 0x4707B6A1: pop edi */ 1581 _flag_a = (uint32_t)((eax | eax)); _flag_b = (uint32_t)((eax | eax)); 1582 eax = eax | eax; /* 0x4707B6A2: or eax, eax */ 1583 _cf = 0; 1584 _flag_k = FK_TEST; 1585 ebp = POP32_VAL(esp); /* 0x4707B6A4: pop ebp */ 1586 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707B6A5: ret 0x14 */ 1587 L_4707B6A8: 1588 ecx = MEM32(esp + 0x10); /* 0x4707B6A8: mov ecx, dword ptr [esp + 0x10] */ 1589 eax = MEM32(ecx + 0x4); /* 0x4707B6AC: mov eax, dword ptr [ecx + 4] */ 1590 edx = MEM32(0x4710DF0C); /* 0x4707B6AF: mov edx, dword ptr [0x4710df0c] */ 1591 /* cmp edx, eax */ /* 0x4707B6B5: cmp edx, eax */ 1592 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 1593 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1594 _flag_k = FK_CMP; 1595 PUSH32(esp, ebx); /* 0x4707B6B7: push ebx */ 1596 ebx = MEM32(0x4710DF10); /* 0x4707B6B8: mov ebx, dword ptr [0x4710df10] */ 1597 PUSH32(esp, esi); /* 0x4707B6BE: push esi */ 1598 esi = MEM32(esp + 0x14); /* 0x4707B6BF: mov esi, dword ptr [esp + 0x14] */ 1599 MEM32(esp + 0x24) = 0; /* 0x4707B6C3: mov dword ptr [esp + 0x24], 0 */ 1600 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B700; /* 0x4707B6CB: jne 0x4707b700 */ 1601 L_4707B6CD: 1602 /* cmp ebx, MEM32(ecx + 0x8) */ /* 0x4707B6CD: cmp ebx, dword ptr [ecx + 8] */ 1603 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(ecx + 0x8)); 1604 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1605 _flag_k = FK_CMP; 1606 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B700; /* 0x4707B6D0: jne 0x4707b700 */ 1607 L_4707B6D2: 1608 /* cmp edx, MEM32(esi + 0x4) */ /* 0x4707B6D2: cmp edx, dword ptr [esi + 4] */ 1609 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x4)); 1610 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1611 _flag_k = FK_CMP; 1612 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B700; /* 0x4707B6D5: jne 0x4707b700 */ 1613 L_4707B6D7: 1614 /* cmp ebx, MEM32(esi + 0x8) */ /* 0x4707B6D7: cmp ebx, dword ptr [esi + 8] */ 1615 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 1616 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1617 _flag_k = FK_CMP; 1618 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B700; /* 0x4707B6DA: jne 0x4707b700 */ 1619 L_4707B6DC: 1620 /* cmp ebp, 2 */ /* 0x4707B6DC: cmp ebp, 2 */ 1621 _flag_a = (uint32_t)(ebp); _flag_b = (uint32_t)(2); 1622 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1623 _flag_k = FK_CMP; 1624 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B7B7; /* 0x4707B6DF: jne 0x4707b7b7 */ 1625 L_4707B6E5: 1626 eax = MEM32(edi); /* 0x4707B6E5: mov eax, dword ptr [edi] */ 1627 PUSH32(esp, 0); /* 0x4707B6E7: push 0 */ 1628 PUSH32(esp, eax); /* 0x4707B6E9: push eax */ 1629 RECOMP_ICALL(0x4700E920u); /* 0x4707B6EA: call 0x4700e920 */ /* not lifted */ 1630 RECOMP_FLAGS_IN(); 1631 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 1632 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1633 esp = esp + 8; /* 0x4707B6EF: add esp, 8 */ 1634 _flag_k = FK_ADD; 1635 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B6F2: cmp eax, -1 */ 1636 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 1637 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1638 _flag_k = FK_CMP; 1639 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B7B7; /* 0x4707B6F5: jne 0x4707b7b7 */ 1640 L_4707B6FB: 1641 goto L_4707B7A2; /* 0x4707B6FB: jmp 0x4707b7a2 */ 1642 L_4707B700: 1643 /* cmp edx, eax */ /* 0x4707B700: cmp edx, eax */ 1644 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 1645 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1646 _flag_k = FK_CMP; 1647 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B709; /* 0x4707B702: jne 0x4707b709 */ 1648 L_4707B704: 1649 /* cmp ebx, MEM32(ecx + 0x8) */ /* 0x4707B704: cmp ebx, dword ptr [ecx + 8] */ 1650 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(ecx + 0x8)); 1651 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1652 _flag_k = FK_CMP; 1653 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707B731; /* 0x4707B707: je 0x4707b731 */ 1654 L_4707B709: 1655 /* cmp edx, MEM32(esi + 0x4) */ /* 0x4707B709: cmp edx, dword ptr [esi + 4] */ 1656 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x4)); 1657 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1658 _flag_k = FK_CMP; 1659 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B731; /* 0x4707B70C: jne 0x4707b731 */ 1660 L_4707B70E: 1661 /* cmp ebx, MEM32(esi + 0x8) */ /* 0x4707B70E: cmp ebx, dword ptr [esi + 8] */ 1662 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 1663 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1664 _flag_k = FK_CMP; 1665 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B731; /* 0x4707B711: jne 0x4707b731 */ 1666 L_4707B713: 1667 edx = MEM32(ecx); /* 0x4707B713: mov edx, dword ptr [ecx] */ 1668 esi = MEM32(ecx + 0x8); /* 0x4707B715: mov esi, dword ptr [ecx + 8] */ 1669 ebx = MEM32(edi); /* 0x4707B718: mov ebx, dword ptr [edi] */ 1670 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707B71A: call dword ptr [edx + 4] */ 1671 RECOMP_FLAGS_IN(); 1672 PUSH32(esp, esi); /* 0x4707B71D: push esi */ 1673 PUSH32(esp, eax); /* 0x4707B71E: push eax */ 1674 PUSH32(esp, ebx); /* 0x4707B71F: push ebx */ 1675 RECOMP_ICALL(MEM32(0x470AC48C)); /* 0x4707B720: call dword ptr [0x470ac48c] */ 1676 RECOMP_FLAGS_IN(); 1677 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B726: cmp eax, -1 */ 1678 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 1679 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1680 _flag_k = FK_CMP; 1681 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B7B7; /* 0x4707B729: jne 0x4707b7b7 */ 1682 L_4707B72F: 1683 goto L_4707B792; /* 0x4707B72F: jmp 0x4707b792 */ 1684 L_4707B731: 1685 /* cmp edx, eax */ /* 0x4707B731: cmp edx, eax */ 1686 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 1687 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1688 _flag_k = FK_CMP; 1689 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B760; /* 0x4707B733: jne 0x4707b760 */ 1690 L_4707B735: 1691 /* cmp ebx, MEM32(ecx + 0x8) */ /* 0x4707B735: cmp ebx, dword ptr [ecx + 8] */ 1692 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(ecx + 0x8)); 1693 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1694 _flag_k = FK_CMP; 1695 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B760; /* 0x4707B738: jne 0x4707b760 */ 1696 L_4707B73A: 1697 /* cmp edx, MEM32(esi + 0x4) */ /* 0x4707B73A: cmp edx, dword ptr [esi + 4] */ 1698 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x4)); 1699 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1700 _flag_k = FK_CMP; 1701 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B744; /* 0x4707B73D: jne 0x4707b744 */ 1702 L_4707B73F: 1703 /* cmp ebx, MEM32(esi + 0x8) */ /* 0x4707B73F: cmp ebx, dword ptr [esi + 8] */ 1704 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 1705 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1706 _flag_k = FK_CMP; 1707 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707B760; /* 0x4707B742: je 0x4707b760 */ 1708 L_4707B744: 1709 eax = MEM32(esi); /* 0x4707B744: mov eax, dword ptr [esi] */ 1710 ebx = MEM32(esi + 0x8); /* 0x4707B746: mov ebx, dword ptr [esi + 8] */ 1711 ebp = MEM32(edi); /* 0x4707B749: mov ebp, dword ptr [edi] */ 1712 ecx = esi; /* 0x4707B74B: mov ecx, esi */ 1713 RECOMP_ICALL(MEM32(eax + 0x4)); /* 0x4707B74D: call dword ptr [eax + 4] */ 1714 RECOMP_FLAGS_IN(); 1715 PUSH32(esp, ebx); /* 0x4707B750: push ebx */ 1716 PUSH32(esp, eax); /* 0x4707B751: push eax */ 1717 PUSH32(esp, ebp); /* 0x4707B752: push ebp */ 1718 RECOMP_ICALL(MEM32(0x470AC488)); /* 0x4707B753: call dword ptr [0x470ac488] */ 1719 RECOMP_FLAGS_IN(); 1720 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B759: cmp eax, -1 */ 1721 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 1722 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1723 _flag_k = FK_CMP; 1724 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B7B7; /* 0x4707B75C: jne 0x4707b7b7 */ 1725 L_4707B75E: 1726 goto L_4707B792; /* 0x4707B75E: jmp 0x4707b792 */ 1727 L_4707B760: 1728 edx = MEM32(ecx); /* 0x4707B760: mov edx, dword ptr [ecx] */ 1729 ebx = MEM32(ecx + 0x8); /* 0x4707B762: mov ebx, dword ptr [ecx + 8] */ 1730 ebp = MEM32(edi); /* 0x4707B765: mov ebp, dword ptr [edi] */ 1731 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707B767: call dword ptr [edx + 4] */ 1732 RECOMP_FLAGS_IN(); 1733 PUSH32(esp, ebx); /* 0x4707B76A: push ebx */ 1734 PUSH32(esp, eax); /* 0x4707B76B: push eax */ 1735 PUSH32(esp, ebp); /* 0x4707B76C: push ebp */ 1736 RECOMP_ICALL(MEM32(0x470AC48C)); /* 0x4707B76D: call dword ptr [0x470ac48c] */ 1737 RECOMP_FLAGS_IN(); 1738 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B773: cmp eax, -1 */ 1739 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 1740 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1741 _flag_k = FK_CMP; 1742 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707B792; /* 0x4707B776: je 0x4707b792 */ 1743 L_4707B778: 1744 eax = MEM32(esi); /* 0x4707B778: mov eax, dword ptr [esi] */ 1745 ebx = MEM32(esi + 0x8); /* 0x4707B77A: mov ebx, dword ptr [esi + 8] */ 1746 ebp = MEM32(edi); /* 0x4707B77D: mov ebp, dword ptr [edi] */ 1747 ecx = esi; /* 0x4707B77F: mov ecx, esi */ 1748 RECOMP_ICALL(MEM32(eax + 0x4)); /* 0x4707B781: call dword ptr [eax + 4] */ 1749 RECOMP_FLAGS_IN(); 1750 PUSH32(esp, ebx); /* 0x4707B784: push ebx */ 1751 PUSH32(esp, eax); /* 0x4707B785: push eax */ 1752 PUSH32(esp, ebp); /* 0x4707B786: push ebp */ 1753 RECOMP_ICALL(MEM32(0x470AC488)); /* 0x4707B787: call dword ptr [0x470ac488] */ 1754 RECOMP_FLAGS_IN(); 1755 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B78D: cmp eax, -1 */ 1756 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 1757 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1758 _flag_k = FK_CMP; 1759 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B7B7; /* 0x4707B790: jne 0x4707b7b7 */ 1760 L_4707B792: 1761 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707B792: call dword ptr [0x470ac4a4] */ 1762 RECOMP_FLAGS_IN(); 1763 esi = eax; /* 0x4707B798: mov esi, eax */ 1764 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707B79A: call dword ptr [0x470ac3c8] */ 1765 RECOMP_FLAGS_IN(); 1766 MEM32(eax) = esi; /* 0x4707B7A0: mov dword ptr [eax], esi */ 1767 L_4707B7A2: 1768 ecx = edi; /* 0x4707B7A2: mov ecx, edi */ 1769 MEM32(esp + 0x24) = 1; /* 0x4707B7A4: mov dword ptr [esp + 0x24], 1 */ 1770 RECOMP_ICALL(0x4707A640u); /* 0x4707B7AC: call 0x4707a640 */ /* not lifted */ 1771 RECOMP_FLAGS_IN(); 1772 MEM32(edi) = 0xFFFFFFFFu; /* 0x4707B7B1: mov dword ptr [edi], 0xffffffff */ 1773 L_4707B7B7: 1774 eax = MEM32(esp + 0x24); /* 0x4707B7B7: mov eax, dword ptr [esp + 0x24] */ 1775 esi = POP32_VAL(esp); /* 0x4707B7BB: pop esi */ 1776 ebx = POP32_VAL(esp); /* 0x4707B7BC: pop ebx */ 1777 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(eax); 1778 _cf = (eax) != 0; 1779 eax = (uint32_t)(-(int32_t)eax); /* 0x4707B7BD: neg eax */ 1780 _flag_k = FK_CMP; 1781 edi = POP32_VAL(esp); /* 0x4707B7BF: pop edi */ 1782 { uint32_t _sa = eax, _sb = eax, _sc = _cf; /* 0x4707B7C0: sbb eax, eax */ 1783 eax = _sc ? 0xFFFFFFFFu : 0; 1784 _flag_a = recomp_flags_sbb(_sa, _sb, _sc); _flag_b = 0; 1785 _flag_k = FK_EFLAGS; _cf = _flag_a & 1u; } 1786 ebp = POP32_VAL(esp); /* 0x4707B7C2: pop ebp */ 1787 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707B7C3: ret 0x14 */ 1788 RECOMP_REGS_OUT(); 1789 } 1790 1791 void sub_4707B7A2(void) { 1792 int _fpu_cmp = 0; 1793 uint32_t _cf = 0; 1794 int _df = 1; 1795 uint32_t _flag_k = FK_NONE; 1796 uint32_t _flag_a = 0, _flag_b = 0; 1797 uint32_t _itail_tgt = 0; 1798 RECOMP_REGS_LOCALS 1799 RECOMP_ENTER(0x4707B7A2u); 1800 1801 L_4707B7A2: 1802 ecx = edi; /* 0x4707B7A2: mov ecx, edi */ 1803 MEM32(esp + 0x24) = 1; /* 0x4707B7A4: mov dword ptr [esp + 0x24], 1 */ 1804 RECOMP_ICALL(0x4707A640u); /* 0x4707B7AC: call 0x4707a640 */ /* not lifted */ 1805 RECOMP_FLAGS_IN(); 1806 MEM32(edi) = 0xFFFFFFFFu; /* 0x4707B7B1: mov dword ptr [edi], 0xffffffff */ 1807 eax = MEM32(esp + 0x24); /* 0x4707B7B7: mov eax, dword ptr [esp + 0x24] */ 1808 esi = POP32_VAL(esp); /* 0x4707B7BB: pop esi */ 1809 ebx = POP32_VAL(esp); /* 0x4707B7BC: pop ebx */ 1810 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(eax); 1811 _cf = (eax) != 0; 1812 eax = (uint32_t)(-(int32_t)eax); /* 0x4707B7BD: neg eax */ 1813 _flag_k = FK_CMP; 1814 edi = POP32_VAL(esp); /* 0x4707B7BF: pop edi */ 1815 { uint32_t _sa = eax, _sb = eax, _sc = _cf; /* 0x4707B7C0: sbb eax, eax */ 1816 eax = _sc ? 0xFFFFFFFFu : 0; 1817 _flag_a = recomp_flags_sbb(_sa, _sb, _sc); _flag_b = 0; 1818 _flag_k = FK_EFLAGS; _cf = _flag_a & 1u; } 1819 ebp = POP32_VAL(esp); /* 0x4707B7C2: pop ebp */ 1820 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707B7C3: ret 0x14 */ 1821 RECOMP_REGS_OUT(); 1822 } 1823 1824 void sub_4707B7D0(void) { 1825 int _fpu_cmp = 0; 1826 uint32_t _cf = 0; 1827 int _df = 1; 1828 uint32_t _flag_k = FK_NONE; 1829 uint32_t _flag_a = 0, _flag_b = 0; 1830 uint32_t _itail_tgt = 0; 1831 RECOMP_REGS_LOCALS 1832 RECOMP_ENTER(0x4707B7D0u); 1833 1834 L_4707B7D0: 1835 ecx = 0x4710EF6Du; /* 0x4707B7D0: mov ecx, 0x4710ef6d */ 1836 RECOMP_ICALL(MEM32(0x470AC1C8)); /* 0x4707B7D5: call dword ptr [0x470ac1c8] */ 1837 RECOMP_FLAGS_IN(); 1838 PUSH32(esp, 0x4707B7F0u); /* 0x4707B7DB: push 0x4707b7f0 */ 1839 RECOMP_ICALL(0x470A32D9u); /* 0x4707B7E0: call 0x470a32d9 */ /* not lifted */ 1840 RECOMP_FLAGS_IN(); 1841 ecx = POP32_VAL(esp); /* 0x4707B7E5: pop ecx */ 1842 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B7E6: ret */ 1843 RECOMP_REGS_OUT(); 1844 } 1845 1846 void sub_4707B7F0(void) { 1847 int _fpu_cmp = 0; 1848 uint32_t _cf = 0; 1849 int _df = 1; 1850 uint32_t _flag_k = FK_NONE; 1851 uint32_t _flag_a = 0, _flag_b = 0; 1852 uint32_t _itail_tgt = 0; 1853 RECOMP_REGS_LOCALS 1854 RECOMP_ENTER(0x4707B7F0u); 1855 1856 L_4707B7F0: 1857 ecx = 0x4710EF6Du; /* 0x4707B7F0: mov ecx, 0x4710ef6d */ 1858 L_4707B7F5: 1859 { _itail_tgt = (uint32_t)(MEM32(0x470AC1BC)); goto _ljump; } 1860 { RECOMP_REGS_OUT(); return; } /* end of function */ 1861 _ljump: 1862 switch (_itail_tgt) { 1863 case 0x4707B7F0u: goto L_4707B7F0; 1864 case 0x4707B7F5u: goto L_4707B7F5; 1865 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1866 } 1867 RECOMP_REGS_OUT(); 1868 } 1869 1870 void sub_4707B800(void) { 1871 int _fpu_cmp = 0; 1872 uint32_t _cf = 0; 1873 int _df = 1; 1874 uint32_t _flag_k = FK_NONE; 1875 uint32_t _flag_a = 0, _flag_b = 0; 1876 uint32_t _itail_tgt = 0; 1877 RECOMP_REGS_LOCALS 1878 RECOMP_ENTER(0x4707B800u); 1879 1880 L_4707B800: 1881 ecx = 0x4710EF6Cu; /* 0x4707B800: mov ecx, 0x4710ef6c */ 1882 RECOMP_ICALL(MEM32(0x470AC1C4)); /* 0x4707B805: call dword ptr [0x470ac1c4] */ 1883 RECOMP_FLAGS_IN(); 1884 PUSH32(esp, 0x4707B820u); /* 0x4707B80B: push 0x4707b820 */ 1885 RECOMP_ICALL(0x470A32D9u); /* 0x4707B810: call 0x470a32d9 */ /* not lifted */ 1886 RECOMP_FLAGS_IN(); 1887 ecx = POP32_VAL(esp); /* 0x4707B815: pop ecx */ 1888 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B816: ret */ 1889 RECOMP_REGS_OUT(); 1890 } 1891 1892 void sub_4707B820(void) { 1893 int _fpu_cmp = 0; 1894 uint32_t _cf = 0; 1895 int _df = 1; 1896 uint32_t _flag_k = FK_NONE; 1897 uint32_t _flag_a = 0, _flag_b = 0; 1898 uint32_t _itail_tgt = 0; 1899 RECOMP_REGS_LOCALS 1900 RECOMP_ENTER(0x4707B820u); 1901 1902 L_4707B820: 1903 ecx = 0x4710EF6Cu; /* 0x4707B820: mov ecx, 0x4710ef6c */ 1904 L_4707B825: 1905 { _itail_tgt = (uint32_t)(MEM32(0x470AC1C0)); goto _ljump; } 1906 { RECOMP_REGS_OUT(); return; } /* end of function */ 1907 _ljump: 1908 switch (_itail_tgt) { 1909 case 0x4707B820u: goto L_4707B820; 1910 case 0x4707B825u: goto L_4707B825; 1911 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1912 } 1913 RECOMP_REGS_OUT(); 1914 } 1915 1916 void sub_4707B830(void) { 1917 int _fpu_cmp = 0; 1918 uint32_t _cf = 0; 1919 int _df = 1; 1920 uint32_t _flag_k = FK_NONE; 1921 uint32_t _flag_a = 0, _flag_b = 0; 1922 uint32_t _itail_tgt = 0; 1923 RECOMP_REGS_LOCALS 1924 RECOMP_ENTER(0x4707B830u); 1925 1926 L_4707B830: 1927 MEM32(0x4710EF64) = 0x47104A3Cu; /* 0x4707B830: mov dword ptr [0x4710ef64], 0x47104a3c */ 1928 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B83A: ret */ 1929 RECOMP_REGS_OUT(); 1930 } 1931 1932 void sub_4707B840(void) { 1933 int _fpu_cmp = 0; 1934 uint32_t _cf = 0; 1935 int _df = 1; 1936 uint32_t _flag_k = FK_NONE; 1937 uint32_t _flag_a = 0, _flag_b = 0; 1938 uint32_t _itail_tgt = 0; 1939 RECOMP_REGS_LOCALS 1940 RECOMP_ENTER(0x4707B840u); 1941 1942 L_4707B840: 1943 MEM32(0x4710EF74) = 0x47104A00u; /* 0x4707B840: mov dword ptr [0x4710ef74], 0x47104a00 */ 1944 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B84A: ret */ 1945 RECOMP_REGS_OUT(); 1946 } 1947 1948 void sub_4707B850(void) { 1949 int _fpu_cmp = 0; 1950 uint32_t _cf = 0; 1951 int _df = 1; 1952 uint32_t _flag_k = FK_NONE; 1953 uint32_t _flag_a = 0, _flag_b = 0; 1954 uint32_t _itail_tgt = 0; 1955 RECOMP_REGS_LOCALS 1956 RECOMP_ENTER(0x4707B850u); 1957 1958 L_4707B850: 1959 MEM32(0x4710EF70) = 0x47104A70u; /* 0x4707B850: mov dword ptr [0x4710ef70], 0x47104a70 */ 1960 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B85A: ret */ 1961 RECOMP_REGS_OUT(); 1962 } 1963 1964 void sub_4707B860(void) { 1965 int _fpu_cmp = 0; 1966 uint32_t _cf = 0; 1967 int _df = 1; 1968 uint32_t _flag_k = FK_NONE; 1969 uint32_t _flag_a = 0, _flag_b = 0; 1970 uint32_t _itail_tgt = 0; 1971 RECOMP_REGS_LOCALS 1972 RECOMP_ENTER(0x4707B860u); 1973 1974 L_4707B860: 1975 MEM32(0x4710EF80) = 0x47104B6Cu; /* 0x4707B860: mov dword ptr [0x4710ef80], 0x47104b6c */ 1976 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B86A: ret */ 1977 RECOMP_REGS_OUT(); 1978 } 1979 1980 void sub_4707B870(void) { 1981 int _fpu_cmp = 0; 1982 uint32_t _cf = 0; 1983 int _df = 1; 1984 uint32_t _flag_k = FK_NONE; 1985 uint32_t _flag_a = 0, _flag_b = 0; 1986 uint32_t _itail_tgt = 0; 1987 RECOMP_REGS_LOCALS 1988 RECOMP_ENTER(0x4707B870u); 1989 1990 L_4707B870: 1991 MEM32(0x4710EF68) = 0x47104BA0u; /* 0x4707B870: mov dword ptr [0x4710ef68], 0x47104ba0 */ 1992 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B87A: ret */ 1993 RECOMP_REGS_OUT(); 1994 } 1995 1996 void sub_4707B880(void) { 1997 int _fpu_cmp = 0; 1998 uint32_t _cf = 0; 1999 int _df = 1; 2000 uint32_t _flag_k = FK_NONE; 2001 uint32_t _flag_a = 0, _flag_b = 0; 2002 uint32_t _itail_tgt = 0; 2003 RECOMP_REGS_LOCALS 2004 RECOMP_ENTER(0x4707B880u); 2005 2006 L_4707B880: 2007 MEM32(0x4710EF78) = 0x47104BD4u; /* 0x4707B880: mov dword ptr [0x4710ef78], 0x47104bd4 */ 2008 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B88A: ret */ 2009 RECOMP_REGS_OUT(); 2010 } 2011 2012 void sub_4707B890(void) { 2013 int _fpu_cmp = 0; 2014 uint32_t _cf = 0; 2015 int _df = 1; 2016 uint32_t _flag_k = FK_NONE; 2017 uint32_t _flag_a = 0, _flag_b = 0; 2018 uint32_t _itail_tgt = 0; 2019 RECOMP_REGS_LOCALS 2020 RECOMP_ENTER(0x4707B890u); 2021 2022 L_4707B890: 2023 MEM32(0x4710EF7C) = 0x4710B050u; /* 0x4707B890: mov dword ptr [0x4710ef7c], 0x4710b050 */ 2024 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707B89A: ret */ 2025 RECOMP_REGS_OUT(); 2026 } 2027 2028 void sub_4707B8A0(void) { 2029 int _fpu_cmp = 0; 2030 uint32_t _cf = 0; 2031 int _df = 1; 2032 uint32_t _flag_k = FK_NONE; 2033 uint32_t _flag_a = 0, _flag_b = 0; 2034 uint32_t _itail_tgt = 0; 2035 RECOMP_REGS_LOCALS 2036 RECOMP_ENTER(0x4707B8A0u); 2037 2038 L_4707B8A0: 2039 ecx = MEM32(esp + 0x4); /* 0x4707B8A0: mov ecx, dword ptr [esp + 4] */ 2040 /* cmp MEM32(ecx), 0xFFFFFFFFu */ /* 0x4707B8A4: cmp dword ptr [ecx], -1 */ 2041 _flag_a = (uint32_t)(MEM32(ecx)); _flag_b = (uint32_t)(0xFFFFFFFFu); 2042 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2043 _flag_k = FK_CMP; 2044 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B8C9; /* 0x4707B8A7: jne 0x4707b8c9 */ 2045 L_4707B8A9: 2046 eax = MEM32(esp + 0x10); /* 0x4707B8A9: mov eax, dword ptr [esp + 0x10] */ 2047 edx = MEM32(esp + 0xC); /* 0x4707B8AD: mov edx, dword ptr [esp + 0xc] */ 2048 PUSH32(esp, eax); /* 0x4707B8B1: push eax */ 2049 eax = MEM32(esp + 0xC); /* 0x4707B8B2: mov eax, dword ptr [esp + 0xc] */ 2050 PUSH32(esp, edx); /* 0x4707B8B6: push edx */ 2051 PUSH32(esp, eax); /* 0x4707B8B7: push eax */ 2052 PUSH32(esp, 1); /* 0x4707B8B8: push 1 */ 2053 RECOMP_ICALL(0x4707A680u); /* 0x4707B8BA: call 0x4707a680 */ /* not lifted */ 2054 RECOMP_FLAGS_IN(); 2055 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B8BF: cmp eax, -1 */ 2056 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2057 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2058 _flag_k = FK_CMP; 2059 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B8C9; /* 0x4707B8C2: jne 0x4707b8c9 */ 2060 L_4707B8C4: 2061 _flag_a = (uint32_t)((eax | eax)); _flag_b = (uint32_t)((eax | eax)); 2062 eax = eax | eax; /* 0x4707B8C4: or eax, eax */ 2063 _cf = 0; 2064 _flag_k = FK_TEST; 2065 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707B8C6: ret 0x10 */ 2066 L_4707B8C9: 2067 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2068 eax = 0; /* 0x4707B8C9: xor eax, eax */ 2069 _cf = 0; 2070 _flag_k = FK_TEST; 2071 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707B8CB: ret 0x10 */ 2072 RECOMP_REGS_OUT(); 2073 } 2074 2075 void sub_4707B8D0(void) { 2076 int _fpu_cmp = 0; 2077 uint32_t _cf = 0; 2078 int _df = 1; 2079 uint32_t _flag_k = FK_NONE; 2080 uint32_t _flag_a = 0, _flag_b = 0; 2081 uint32_t _itail_tgt = 0; 2082 RECOMP_REGS_LOCALS 2083 RECOMP_ENTER(0x4707B8D0u); 2084 2085 L_4707B8D0: 2086 ecx = MEM32(esp + 0x4); /* 0x4707B8D0: mov ecx, dword ptr [esp + 4] */ 2087 /* cmp MEM32(ecx), 0xFFFFFFFFu */ /* 0x4707B8D4: cmp dword ptr [ecx], -1 */ 2088 _flag_a = (uint32_t)(MEM32(ecx)); _flag_b = (uint32_t)(0xFFFFFFFFu); 2089 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2090 _flag_k = FK_CMP; 2091 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B908; /* 0x4707B8D7: jne 0x4707b908 */ 2092 L_4707B8D9: 2093 eax = MEM32(esp + 0x1C); /* 0x4707B8D9: mov eax, dword ptr [esp + 0x1c] */ 2094 edx = MEM32(esp + 0x18); /* 0x4707B8DD: mov edx, dword ptr [esp + 0x18] */ 2095 PUSH32(esp, eax); /* 0x4707B8E1: push eax */ 2096 eax = MEM32(esp + 0x18); /* 0x4707B8E2: mov eax, dword ptr [esp + 0x18] */ 2097 PUSH32(esp, edx); /* 0x4707B8E6: push edx */ 2098 edx = MEM32(esp + 0x18); /* 0x4707B8E7: mov edx, dword ptr [esp + 0x18] */ 2099 PUSH32(esp, eax); /* 0x4707B8EB: push eax */ 2100 eax = MEM32(esp + 0x18); /* 0x4707B8EC: mov eax, dword ptr [esp + 0x18] */ 2101 PUSH32(esp, edx); /* 0x4707B8F0: push edx */ 2102 edx = MEM32(esp + 0x18); /* 0x4707B8F1: mov edx, dword ptr [esp + 0x18] */ 2103 PUSH32(esp, eax); /* 0x4707B8F5: push eax */ 2104 PUSH32(esp, edx); /* 0x4707B8F6: push edx */ 2105 PUSH32(esp, 1); /* 0x4707B8F7: push 1 */ 2106 RECOMP_ICALL(0x4707AAE0u); /* 0x4707B8F9: call 0x4707aae0 */ /* not lifted */ 2107 RECOMP_FLAGS_IN(); 2108 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B8FE: cmp eax, -1 */ 2109 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2110 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2111 _flag_k = FK_CMP; 2112 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B908; /* 0x4707B901: jne 0x4707b908 */ 2113 L_4707B903: 2114 _flag_a = (uint32_t)((eax | eax)); _flag_b = (uint32_t)((eax | eax)); 2115 eax = eax | eax; /* 0x4707B903: or eax, eax */ 2116 _cf = 0; 2117 _flag_k = FK_TEST; 2118 RECOMP_FLAGS_OUT(); esp += 32; { RECOMP_REGS_OUT(); return; } /* 0x4707B905: ret 0x1c */ 2119 L_4707B908: 2120 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2121 eax = 0; /* 0x4707B908: xor eax, eax */ 2122 _cf = 0; 2123 _flag_k = FK_TEST; 2124 RECOMP_FLAGS_OUT(); esp += 32; { RECOMP_REGS_OUT(); return; } /* 0x4707B90A: ret 0x1c */ 2125 RECOMP_REGS_OUT(); 2126 } 2127 2128 void sub_4707B910(void) { 2129 int _fpu_cmp = 0; 2130 uint32_t _cf = 0; 2131 int _df = 1; 2132 uint32_t _flag_k = FK_NONE; 2133 uint32_t _flag_a = 0, _flag_b = 0; 2134 uint32_t _itail_tgt = 0; 2135 RECOMP_REGS_LOCALS 2136 RECOMP_ENTER(0x4707B910u); 2137 2138 L_4707B910: 2139 eax = MEM32(FS_BASE + (0)); /* 0x4707B910: mov eax, dword ptr fs:[0] */ 2140 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707B916: push -1 */ 2141 PUSH32(esp, 0x470A9A28u); /* 0x4707B918: push 0x470a9a28 */ 2142 PUSH32(esp, eax); /* 0x4707B91D: push eax */ 2143 eax = MEM32(0x4710DF0C); /* 0x4707B91E: mov eax, dword ptr [0x4710df0c] */ 2144 MEM32(FS_BASE + (0)) = esp; /* 0x4707B923: mov dword ptr fs:[0], esp */ 2145 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2146 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2147 esp = esp - 8; /* 0x4707B92A: sub esp, 8 */ 2148 _flag_k = FK_CMP; 2149 PUSH32(esp, esi); /* 0x4707B92D: push esi */ 2150 esi = MEM32(esp + 0x24); /* 0x4707B92E: mov esi, dword ptr [esp + 0x24] */ 2151 /* cmp eax, MEM32(esi + 0x4) */ /* 0x4707B932: cmp eax, dword ptr [esi + 4] */ 2152 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(esi + 0x4)); 2153 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2154 _flag_k = FK_CMP; 2155 PUSH32(esp, edi); /* 0x4707B935: push edi */ 2156 edi = MEM32(esp + 0x20); /* 0x4707B936: mov edi, dword ptr [esp + 0x20] */ 2157 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B947; /* 0x4707B93A: jne 0x4707b947 */ 2158 L_4707B93C: 2159 ecx = MEM32(0x4710DF10); /* 0x4707B93C: mov ecx, dword ptr [0x4710df10] */ 2160 /* cmp ecx, MEM32(esi + 0x8) */ /* 0x4707B942: cmp ecx, dword ptr [esi + 8] */ 2161 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 2162 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2163 _flag_k = FK_CMP; 2164 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707B9AA; /* 0x4707B945: je 0x4707b9aa */ 2165 L_4707B947: 2166 edx = MEM32(esi); /* 0x4707B947: mov edx, dword ptr [esi] */ 2167 ecx = esi; /* 0x4707B949: mov ecx, esi */ 2168 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707B94B: call dword ptr [edx + 4] */ 2169 RECOMP_FLAGS_IN(); 2170 esi = MEM32(esi + 0x8); /* 0x4707B94E: mov esi, dword ptr [esi + 8] */ 2171 ecx = MEM32(edi); /* 0x4707B951: mov ecx, dword ptr [edi] */ 2172 PUSH32(esp, esi); /* 0x4707B953: push esi */ 2173 PUSH32(esp, eax); /* 0x4707B954: push eax */ 2174 PUSH32(esp, ecx); /* 0x4707B955: push ecx */ 2175 RECOMP_ICALL(MEM32(0x470AC48C)); /* 0x4707B956: call dword ptr [0x470ac48c] */ 2176 RECOMP_FLAGS_IN(); 2177 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B95C: cmp eax, -1 */ 2178 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2179 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2180 _flag_k = FK_CMP; 2181 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B9AA; /* 0x4707B95F: jne 0x4707b9aa */ 2182 L_4707B961: 2183 PUSH32(esp, ebx); /* 0x4707B961: push ebx */ 2184 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707B962: call dword ptr [0x470ac4a4] */ 2185 RECOMP_FLAGS_IN(); 2186 ebx = MEM32(0x470AC3C8); /* 0x4707B968: mov ebx, dword ptr [0x470ac3c8] */ 2187 esi = eax; /* 0x4707B96E: mov esi, eax */ 2188 RECOMP_ICALL(ebx); /* 0x4707B970: call ebx */ 2189 RECOMP_FLAGS_IN(); 2190 MEM32(eax) = esi; /* 0x4707B972: mov dword ptr [eax], esi */ 2191 RECOMP_ICALL(ebx); /* 0x4707B974: call ebx */ 2192 RECOMP_FLAGS_IN(); 2193 esi = eax; /* 0x4707B976: mov esi, eax */ 2194 ebx = MEM32(esi); /* 0x4707B978: mov ebx, dword ptr [esi] */ 2195 MEM32(esp + 0xC) = esi; /* 0x4707B97A: mov dword ptr [esp + 0xc], esi */ 2196 MEM32(esp + 0x10) = ebx; /* 0x4707B97E: mov dword ptr [esp + 0x10], ebx */ 2197 ecx = edi; /* 0x4707B982: mov ecx, edi */ 2198 MEM32(esp + 0x1C) = 0; /* 0x4707B984: mov dword ptr [esp + 0x1c], 0 */ 2199 RECOMP_ICALL(0x4707E7D0u); /* 0x4707B98C: call 0x4707e7d0 */ /* not lifted */ 2200 RECOMP_FLAGS_IN(); 2201 MEM32(esi) = ebx; /* 0x4707B991: mov dword ptr [esi], ebx */ 2202 ebx = POP32_VAL(esp); /* 0x4707B993: pop ebx */ 2203 edi = POP32_VAL(esp); /* 0x4707B994: pop edi */ 2204 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 2205 eax = eax | 0xFFFFFFFFu; /* 0x4707B995: or eax, 0xffffffff */ 2206 _cf = 0; 2207 _flag_k = FK_TEST; 2208 esi = POP32_VAL(esp); /* 0x4707B998: pop esi */ 2209 ecx = MEM32(esp + 0x8); /* 0x4707B999: mov ecx, dword ptr [esp + 8] */ 2210 MEM32(FS_BASE + (0)) = ecx; /* 0x4707B99D: mov dword ptr fs:[0], ecx */ 2211 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 2212 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2213 esp = esp + 0x14u; /* 0x4707B9A4: add esp, 0x14 */ 2214 _flag_k = FK_ADD; 2215 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x4707B9A7: ret 0xc */ 2216 L_4707B9AA: 2217 eax = MEM32(esp + 0x24); /* 0x4707B9AA: mov eax, dword ptr [esp + 0x24] */ 2218 /* test eax, eax */ /* 0x4707B9AE: test eax, eax */ 2219 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2220 _cf = 0; 2221 _flag_k = FK_TEST; 2222 if (TEST_Z(_flag_a, _flag_b)) goto L_4707B9D5; /* 0x4707B9B0: je 0x4707b9d5 */ 2223 L_4707B9B2: 2224 PUSH32(esp, 1); /* 0x4707B9B2: push 1 */ 2225 ecx = edi; /* 0x4707B9B4: mov ecx, edi */ 2226 RECOMP_ICALL(0x47032810u); /* 0x4707B9B6: call 0x47032810 */ /* not lifted */ 2227 RECOMP_FLAGS_IN(); 2228 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707B9BB: cmp eax, -1 */ 2229 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2230 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2231 _flag_k = FK_CMP; 2232 if (CMP_NE(_flag_a, _flag_b)) goto L_4707B9D5; /* 0x4707B9BE: jne 0x4707b9d5 */ 2233 L_4707B9C0: 2234 edi = POP32_VAL(esp); /* 0x4707B9C0: pop edi */ 2235 _flag_a = (uint32_t)((eax | eax)); _flag_b = (uint32_t)((eax | eax)); 2236 eax = eax | eax; /* 0x4707B9C1: or eax, eax */ 2237 _cf = 0; 2238 _flag_k = FK_TEST; 2239 esi = POP32_VAL(esp); /* 0x4707B9C3: pop esi */ 2240 ecx = MEM32(esp + 0x8); /* 0x4707B9C4: mov ecx, dword ptr [esp + 8] */ 2241 MEM32(FS_BASE + (0)) = ecx; /* 0x4707B9C8: mov dword ptr fs:[0], ecx */ 2242 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 2243 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2244 esp = esp + 0x14u; /* 0x4707B9CF: add esp, 0x14 */ 2245 _flag_k = FK_ADD; 2246 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x4707B9D2: ret 0xc */ 2247 L_4707B9D5: 2248 ecx = MEM32(esp + 0x10); /* 0x4707B9D5: mov ecx, dword ptr [esp + 0x10] */ 2249 edi = POP32_VAL(esp); /* 0x4707B9D9: pop edi */ 2250 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2251 eax = 0; /* 0x4707B9DA: xor eax, eax */ 2252 _cf = 0; 2253 _flag_k = FK_TEST; 2254 esi = POP32_VAL(esp); /* 0x4707B9DC: pop esi */ 2255 MEM32(FS_BASE + (0)) = ecx; /* 0x4707B9DD: mov dword ptr fs:[0], ecx */ 2256 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 2257 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2258 esp = esp + 0x14u; /* 0x4707B9E4: add esp, 0x14 */ 2259 _flag_k = FK_ADD; 2260 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x4707B9E7: ret 0xc */ 2261 RECOMP_REGS_OUT(); 2262 } 2263 2264 void sub_4707B9F0(void) { 2265 int _fpu_cmp = 0; 2266 uint32_t _cf = 0; 2267 int _df = 1; 2268 uint32_t _flag_k = FK_NONE; 2269 uint32_t _flag_a = 0, _flag_b = 0; 2270 uint32_t _itail_tgt = 0; 2271 RECOMP_REGS_LOCALS 2272 RECOMP_ENTER(0x4707B9F0u); 2273 2274 L_4707B9F0: 2275 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707B9F0: push -1 */ 2276 PUSH32(esp, 0x470A9A48u); /* 0x4707B9F2: push 0x470a9a48 */ 2277 eax = MEM32(FS_BASE + (0)); /* 0x4707B9F7: mov eax, dword ptr fs:[0] */ 2278 PUSH32(esp, eax); /* 0x4707B9FD: push eax */ 2279 MEM32(FS_BASE + (0)) = esp; /* 0x4707B9FE: mov dword ptr fs:[0], esp */ 2280 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2281 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2282 esp = esp - 8; /* 0x4707BA05: sub esp, 8 */ 2283 _flag_k = FK_CMP; 2284 PUSH32(esp, ebx); /* 0x4707BA08: push ebx */ 2285 PUSH32(esp, ebp); /* 0x4707BA09: push ebp */ 2286 ebp = MEM32(0x470AC3C8); /* 0x4707BA0A: mov ebp, dword ptr [0x470ac3c8] */ 2287 PUSH32(esp, esi); /* 0x4707BA10: push esi */ 2288 PUSH32(esp, edi); /* 0x4707BA11: push edi */ 2289 ebx = ecx; /* 0x4707BA12: mov ebx, ecx */ 2290 RECOMP_ICALL(ebp); /* 0x4707BA14: call ebp */ 2291 RECOMP_FLAGS_IN(); 2292 edi = eax; /* 0x4707BA16: mov edi, eax */ 2293 esi = MEM32(edi); /* 0x4707BA18: mov esi, dword ptr [edi] */ 2294 MEM32(esp + 0x10) = edi; /* 0x4707BA1A: mov dword ptr [esp + 0x10], edi */ 2295 MEM32(esp + 0x14) = esi; /* 0x4707BA1E: mov dword ptr [esp + 0x14], esi */ 2296 /* cmp MEM32(esp + 0x30), 0xFFFFFFFFu */ /* 0x4707BA22: cmp dword ptr [esp + 0x30], -1 */ 2297 _flag_a = (uint32_t)(MEM32(esp + 0x30)); _flag_b = (uint32_t)(0xFFFFFFFFu); 2298 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2299 _flag_k = FK_CMP; 2300 MEM32(esp + 0x20) = 0; /* 0x4707BA27: mov dword ptr [esp + 0x20], 0 */ 2301 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BAA1; /* 0x4707BA2F: jne 0x4707baa1 */ 2302 L_4707BA31: 2303 eax = MEM32(esp + 0x2C); /* 0x4707BA31: mov eax, dword ptr [esp + 0x2c] */ 2304 /* test eax, eax */ /* 0x4707BA35: test eax, eax */ 2305 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2306 _cf = 0; 2307 _flag_k = FK_TEST; 2308 if (TEST_Z(_flag_a, _flag_b)) goto L_4707BA78; /* 0x4707BA37: je 0x4707ba78 */ 2309 L_4707BA39: 2310 /* cmp esi, 0x2734u */ /* 0x4707BA39: cmp esi, 0x2734 */ 2311 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x2734u); 2312 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2313 _flag_k = FK_CMP; 2314 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707BA49; /* 0x4707BA3F: je 0x4707ba49 */ 2315 L_4707BA41: 2316 /* cmp esi, 0x2733u */ /* 0x4707BA41: cmp esi, 0x2733 */ 2317 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x2733u); 2318 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2319 _flag_k = FK_CMP; 2320 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BA78; /* 0x4707BA47: jne 0x4707ba78 */ 2321 L_4707BA49: 2322 /* cmp MEM32(eax), 0 */ /* 0x4707BA49: cmp dword ptr [eax], 0 */ 2323 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0); 2324 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2325 _flag_k = FK_CMP; 2326 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BA5C; /* 0x4707BA4C: jne 0x4707ba5c */ 2327 L_4707BA4E: 2328 ecx = MEM32(eax + 0x4); /* 0x4707BA4E: mov ecx, dword ptr [eax + 4] */ 2329 /* test ecx, ecx */ /* 0x4707BA51: test ecx, ecx */ 2330 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 2331 _cf = 0; 2332 _flag_k = FK_TEST; 2333 if (TEST_NZ(_flag_a, _flag_b)) goto L_4707BA5C; /* 0x4707BA53: jne 0x4707ba5c */ 2334 L_4707BA55: 2335 esi = 0x2733u; /* 0x4707BA55: mov esi, 0x2733 */ 2336 goto L_4707BAAC; /* 0x4707BA5A: jmp 0x4707baac */ 2337 L_4707BA5C: 2338 PUSH32(esp, eax); /* 0x4707BA5C: push eax */ 2339 eax = MEM32(esp + 0x2C); /* 0x4707BA5D: mov eax, dword ptr [esp + 0x2c] */ 2340 PUSH32(esp, 0); /* 0x4707BA61: push 0 */ 2341 PUSH32(esp, eax); /* 0x4707BA63: push eax */ 2342 ecx = ebx; /* 0x4707BA64: mov ecx, ebx */ 2343 RECOMP_ICALL(0x4707BC30u); /* 0x4707BA66: call 0x4707bc30 */ /* not lifted */ 2344 RECOMP_FLAGS_IN(); 2345 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BA6B: cmp eax, -1 */ 2346 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2347 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2348 _flag_k = FK_CMP; 2349 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BA9B; /* 0x4707BA6E: jne 0x4707ba9b */ 2350 L_4707BA70: 2351 RECOMP_ICALL(ebp); /* 0x4707BA70: call ebp */ 2352 RECOMP_FLAGS_IN(); 2353 esi = MEM32(eax); /* 0x4707BA72: mov esi, dword ptr [eax] */ 2354 MEM32(esp + 0x14) = esi; /* 0x4707BA74: mov dword ptr [esp + 0x14], esi */ 2355 L_4707BA78: 2356 /* cmp esi, 0x2748u */ /* 0x4707BA78: cmp esi, 0x2748 */ 2357 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x2748u); 2358 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2359 _flag_k = FK_CMP; 2360 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707BAA1; /* 0x4707BA7E: je 0x4707baa1 */ 2361 L_4707BA80: 2362 /* cmp esi, 0x2733u */ /* 0x4707BA80: cmp esi, 0x2733 */ 2363 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x2733u); 2364 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2365 _flag_k = FK_CMP; 2366 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707BAAC; /* 0x4707BA86: je 0x4707baac */ 2367 L_4707BA88: 2368 /* cmp esi, 0x274Cu */ /* 0x4707BA88: cmp esi, 0x274c */ 2369 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x274Cu); 2370 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2371 _flag_k = FK_CMP; 2372 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707BAAC; /* 0x4707BA8E: je 0x4707baac */ 2373 L_4707BA90: 2374 ecx = MEM32(esp + 0x28); /* 0x4707BA90: mov ecx, dword ptr [esp + 0x28] */ 2375 RECOMP_ICALL(0x4707E7D0u); /* 0x4707BA94: call 0x4707e7d0 */ /* not lifted */ 2376 RECOMP_FLAGS_IN(); 2377 goto L_4707BAAC; /* 0x4707BA99: jmp 0x4707baac */ 2378 L_4707BA9B: 2379 MEM32(edi) = esi; /* 0x4707BA9B: mov dword ptr [edi], esi */ 2380 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2381 eax = 0; /* 0x4707BA9D: xor eax, eax */ 2382 _cf = 0; 2383 _flag_k = FK_TEST; 2384 goto L_4707BAB2; /* 0x4707BA9F: jmp 0x4707bab2 */ 2385 L_4707BAA1: 2386 ecx = MEM32(esp + 0x28); /* 0x4707BAA1: mov ecx, dword ptr [esp + 0x28] */ 2387 PUSH32(esp, 1); /* 0x4707BAA5: push 1 */ 2388 RECOMP_ICALL(0x47032880u); /* 0x4707BAA7: call 0x47032880 */ /* not lifted */ 2389 RECOMP_FLAGS_IN(); 2390 L_4707BAAC: 2391 eax = MEM32(esp + 0x30); /* 0x4707BAAC: mov eax, dword ptr [esp + 0x30] */ 2392 MEM32(edi) = esi; /* 0x4707BAB0: mov dword ptr [edi], esi */ 2393 L_4707BAB2: 2394 ecx = MEM32(esp + 0x18); /* 0x4707BAB2: mov ecx, dword ptr [esp + 0x18] */ 2395 edi = POP32_VAL(esp); /* 0x4707BAB6: pop edi */ 2396 esi = POP32_VAL(esp); /* 0x4707BAB7: pop esi */ 2397 ebp = POP32_VAL(esp); /* 0x4707BAB8: pop ebp */ 2398 ebx = POP32_VAL(esp); /* 0x4707BAB9: pop ebx */ 2399 MEM32(FS_BASE + (0)) = ecx; /* 0x4707BABA: mov dword ptr fs:[0], ecx */ 2400 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 2401 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2402 esp = esp + 0x14u; /* 0x4707BAC1: add esp, 0x14 */ 2403 _flag_k = FK_ADD; 2404 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x4707BAC4: ret 0xc */ 2405 RECOMP_REGS_OUT(); 2406 } 2407 2408 void sub_4707BAD0(void) { 2409 int _fpu_cmp = 0; 2410 uint32_t _cf = 0; 2411 int _df = 1; 2412 uint32_t _flag_k = FK_NONE; 2413 uint32_t _flag_a = 0, _flag_b = 0; 2414 uint32_t _itail_tgt = 0; 2415 RECOMP_REGS_LOCALS 2416 RECOMP_ENTER(0x4707BAD0u); 2417 2418 L_4707BAD0: 2419 PUSH32(esp, ebp); /* 0x4707BAD0: push ebp */ 2420 PUSH32(esp, esi); /* 0x4707BAD1: push esi */ 2421 esi = MEM32(esp + 0xC); /* 0x4707BAD2: mov esi, dword ptr [esp + 0xc] */ 2422 /* cmp MEM32(esi), 0xFFFFFFFFu */ /* 0x4707BAD6: cmp dword ptr [esi], -1 */ 2423 _flag_a = (uint32_t)(MEM32(esi)); _flag_b = (uint32_t)(0xFFFFFFFFu); 2424 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2425 _flag_k = FK_CMP; 2426 ebp = ecx; /* 0x4707BAD9: mov ebp, ecx */ 2427 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BB01; /* 0x4707BADB: jne 0x4707bb01 */ 2428 L_4707BADD: 2429 eax = MEM32(esp + 0x1C); /* 0x4707BADD: mov eax, dword ptr [esp + 0x1c] */ 2430 ecx = MEM32(esp + 0x2C); /* 0x4707BAE1: mov ecx, dword ptr [esp + 0x2c] */ 2431 edx = MEM32(esp + 0x28); /* 0x4707BAE5: mov edx, dword ptr [esp + 0x28] */ 2432 PUSH32(esp, eax); /* 0x4707BAE9: push eax */ 2433 PUSH32(esp, ecx); /* 0x4707BAEA: push ecx */ 2434 PUSH32(esp, edx); /* 0x4707BAEB: push edx */ 2435 PUSH32(esp, 1); /* 0x4707BAEC: push 1 */ 2436 ecx = esi; /* 0x4707BAEE: mov ecx, esi */ 2437 RECOMP_ICALL(0x4707A680u); /* 0x4707BAF0: call 0x4707a680 */ /* not lifted */ 2438 RECOMP_FLAGS_IN(); 2439 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BAF5: cmp eax, -1 */ 2440 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2441 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2442 _flag_k = FK_CMP; 2443 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BB01; /* 0x4707BAF8: jne 0x4707bb01 */ 2444 L_4707BAFA: 2445 esi = POP32_VAL(esp); /* 0x4707BAFA: pop esi */ 2446 _flag_a = (uint32_t)((eax | eax)); _flag_b = (uint32_t)((eax | eax)); 2447 eax = eax | eax; /* 0x4707BAFB: or eax, eax */ 2448 _cf = 0; 2449 _flag_k = FK_TEST; 2450 ebp = POP32_VAL(esp); /* 0x4707BAFD: pop ebp */ 2451 RECOMP_FLAGS_OUT(); esp += 40; { RECOMP_REGS_OUT(); return; } /* 0x4707BAFE: ret 0x24 */ 2452 L_4707BB01: 2453 eax = MEM32(esp + 0x18); /* 0x4707BB01: mov eax, dword ptr [esp + 0x18] */ 2454 ecx = MEM32(esp + 0x14); /* 0x4707BB05: mov ecx, dword ptr [esp + 0x14] */ 2455 PUSH32(esp, eax); /* 0x4707BB09: push eax */ 2456 PUSH32(esp, ecx); /* 0x4707BB0A: push ecx */ 2457 PUSH32(esp, esi); /* 0x4707BB0B: push esi */ 2458 ecx = ebp; /* 0x4707BB0C: mov ecx, ebp */ 2459 RECOMP_ICALL(0x4707B910u); /* 0x4707BB0E: call 0x4707b910 */ /* not lifted */ 2460 RECOMP_FLAGS_IN(); 2461 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BB13: cmp eax, -1 */ 2462 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2463 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2464 _flag_k = FK_CMP; 2465 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BB1F; /* 0x4707BB16: jne 0x4707bb1f */ 2466 L_4707BB18: 2467 esi = POP32_VAL(esp); /* 0x4707BB18: pop esi */ 2468 _flag_a = (uint32_t)((eax | eax)); _flag_b = (uint32_t)((eax | eax)); 2469 eax = eax | eax; /* 0x4707BB19: or eax, eax */ 2470 _cf = 0; 2471 _flag_k = FK_TEST; 2472 ebp = POP32_VAL(esp); /* 0x4707BB1B: pop ebp */ 2473 RECOMP_FLAGS_OUT(); esp += 40; { RECOMP_REGS_OUT(); return; } /* 0x4707BB1C: ret 0x24 */ 2474 L_4707BB1F: 2475 ecx = MEM32(esp + 0x10); /* 0x4707BB1F: mov ecx, dword ptr [esp + 0x10] */ 2476 edx = MEM32(ecx); /* 0x4707BB23: mov edx, dword ptr [ecx] */ 2477 PUSH32(esp, ebx); /* 0x4707BB25: push ebx */ 2478 ebx = MEM32(esi); /* 0x4707BB26: mov ebx, dword ptr [esi] */ 2479 PUSH32(esp, edi); /* 0x4707BB28: push edi */ 2480 edi = MEM32(ecx + 0x8); /* 0x4707BB29: mov edi, dword ptr [ecx + 8] */ 2481 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707BB2C: call dword ptr [edx + 4] */ 2482 RECOMP_FLAGS_IN(); 2483 PUSH32(esp, edi); /* 0x4707BB2F: push edi */ 2484 PUSH32(esp, eax); /* 0x4707BB30: push eax */ 2485 PUSH32(esp, ebx); /* 0x4707BB31: push ebx */ 2486 RECOMP_ICALL(MEM32(0x470AC488)); /* 0x4707BB32: call dword ptr [0x470ac488] */ 2487 RECOMP_FLAGS_IN(); 2488 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BB38: cmp eax, -1 */ 2489 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2490 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2491 _flag_k = FK_CMP; 2492 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BB50; /* 0x4707BB3B: jne 0x4707bb50 */ 2493 L_4707BB3D: 2494 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707BB3D: call dword ptr [0x470ac4a4] */ 2495 RECOMP_FLAGS_IN(); 2496 edi = eax; /* 0x4707BB43: mov edi, eax */ 2497 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707BB45: call dword ptr [0x470ac3c8] */ 2498 RECOMP_FLAGS_IN(); 2499 MEM32(eax) = edi; /* 0x4707BB4B: mov dword ptr [eax], edi */ 2500 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 2501 eax = eax | 0xFFFFFFFFu; /* 0x4707BB4D: or eax, 0xffffffff */ 2502 _cf = 0; 2503 _flag_k = FK_TEST; 2504 L_4707BB50: 2505 PUSH32(esp, eax); /* 0x4707BB50: push eax */ 2506 eax = MEM32(esp + 0x20); /* 0x4707BB51: mov eax, dword ptr [esp + 0x20] */ 2507 PUSH32(esp, eax); /* 0x4707BB55: push eax */ 2508 PUSH32(esp, esi); /* 0x4707BB56: push esi */ 2509 ecx = ebp; /* 0x4707BB57: mov ecx, ebp */ 2510 RECOMP_ICALL(0x4707B9F0u); /* 0x4707BB59: call 0x4707b9f0 */ /* not lifted */ 2511 RECOMP_FLAGS_IN(); 2512 edi = POP32_VAL(esp); /* 0x4707BB5E: pop edi */ 2513 ebx = POP32_VAL(esp); /* 0x4707BB5F: pop ebx */ 2514 esi = POP32_VAL(esp); /* 0x4707BB60: pop esi */ 2515 ebp = POP32_VAL(esp); /* 0x4707BB61: pop ebp */ 2516 RECOMP_FLAGS_OUT(); esp += 40; { RECOMP_REGS_OUT(); return; } /* 0x4707BB62: ret 0x24 */ 2517 RECOMP_REGS_OUT(); 2518 } 2519 2520 void sub_4707BB70(void) { 2521 int _fpu_cmp = 0; 2522 uint32_t _cf = 0; 2523 int _df = 1; 2524 uint32_t _flag_k = FK_NONE; 2525 uint32_t _flag_a = 0, _flag_b = 0; 2526 uint32_t _itail_tgt = 0; 2527 RECOMP_REGS_LOCALS 2528 RECOMP_ENTER(0x4707BB70u); 2529 2530 L_4707BB70: 2531 PUSH32(esp, ebp); /* 0x4707BB70: push ebp */ 2532 PUSH32(esp, esi); /* 0x4707BB71: push esi */ 2533 esi = MEM32(esp + 0xC); /* 0x4707BB72: mov esi, dword ptr [esp + 0xc] */ 2534 /* cmp MEM32(esi), 0xFFFFFFFFu */ /* 0x4707BB76: cmp dword ptr [esi], -1 */ 2535 _flag_a = (uint32_t)(MEM32(esi)); _flag_b = (uint32_t)(0xFFFFFFFFu); 2536 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2537 _flag_k = FK_CMP; 2538 ebp = ecx; /* 0x4707BB79: mov ebp, ecx */ 2539 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BBB0; /* 0x4707BB7B: jne 0x4707bbb0 */ 2540 L_4707BB7D: 2541 eax = MEM32(esp + 0x3C); /* 0x4707BB7D: mov eax, dword ptr [esp + 0x3c] */ 2542 ecx = MEM32(esp + 0x38); /* 0x4707BB81: mov ecx, dword ptr [esp + 0x38] */ 2543 edx = MEM32(esp + 0x34); /* 0x4707BB85: mov edx, dword ptr [esp + 0x34] */ 2544 PUSH32(esp, eax); /* 0x4707BB89: push eax */ 2545 eax = MEM32(esp + 0x34); /* 0x4707BB8A: mov eax, dword ptr [esp + 0x34] */ 2546 PUSH32(esp, ecx); /* 0x4707BB8E: push ecx */ 2547 ecx = MEM32(esp + 0x50); /* 0x4707BB8F: mov ecx, dword ptr [esp + 0x50] */ 2548 PUSH32(esp, edx); /* 0x4707BB93: push edx */ 2549 edx = MEM32(esp + 0x50); /* 0x4707BB94: mov edx, dword ptr [esp + 0x50] */ 2550 PUSH32(esp, eax); /* 0x4707BB98: push eax */ 2551 PUSH32(esp, ecx); /* 0x4707BB99: push ecx */ 2552 PUSH32(esp, edx); /* 0x4707BB9A: push edx */ 2553 PUSH32(esp, 1); /* 0x4707BB9B: push 1 */ 2554 ecx = esi; /* 0x4707BB9D: mov ecx, esi */ 2555 RECOMP_ICALL(0x4707AAE0u); /* 0x4707BB9F: call 0x4707aae0 */ /* not lifted */ 2556 RECOMP_FLAGS_IN(); 2557 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BBA4: cmp eax, -1 */ 2558 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2559 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2560 _flag_k = FK_CMP; 2561 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BBB0; /* 0x4707BBA7: jne 0x4707bbb0 */ 2562 L_4707BBA9: 2563 esi = POP32_VAL(esp); /* 0x4707BBA9: pop esi */ 2564 _flag_a = (uint32_t)((eax | eax)); _flag_b = (uint32_t)((eax | eax)); 2565 eax = eax | eax; /* 0x4707BBAA: or eax, eax */ 2566 _cf = 0; 2567 _flag_k = FK_TEST; 2568 ebp = POP32_VAL(esp); /* 0x4707BBAC: pop ebp */ 2569 RECOMP_FLAGS_OUT(); esp += 68; { RECOMP_REGS_OUT(); return; } /* 0x4707BBAD: ret 0x40 */ 2570 L_4707BBB0: 2571 eax = MEM32(esp + 0x2C); /* 0x4707BBB0: mov eax, dword ptr [esp + 0x2c] */ 2572 ecx = MEM32(esp + 0x28); /* 0x4707BBB4: mov ecx, dword ptr [esp + 0x28] */ 2573 PUSH32(esp, eax); /* 0x4707BBB8: push eax */ 2574 PUSH32(esp, ecx); /* 0x4707BBB9: push ecx */ 2575 PUSH32(esp, esi); /* 0x4707BBBA: push esi */ 2576 ecx = ebp; /* 0x4707BBBB: mov ecx, ebp */ 2577 RECOMP_ICALL(0x4707B910u); /* 0x4707BBBD: call 0x4707b910 */ /* not lifted */ 2578 RECOMP_FLAGS_IN(); 2579 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BBC2: cmp eax, -1 */ 2580 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2581 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2582 _flag_k = FK_CMP; 2583 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BBCE; /* 0x4707BBC5: jne 0x4707bbce */ 2584 L_4707BBC7: 2585 esi = POP32_VAL(esp); /* 0x4707BBC7: pop esi */ 2586 _flag_a = (uint32_t)((eax | eax)); _flag_b = (uint32_t)((eax | eax)); 2587 eax = eax | eax; /* 0x4707BBC8: or eax, eax */ 2588 _cf = 0; 2589 _flag_k = FK_TEST; 2590 ebp = POP32_VAL(esp); /* 0x4707BBCA: pop ebp */ 2591 RECOMP_FLAGS_OUT(); esp += 68; { RECOMP_REGS_OUT(); return; } /* 0x4707BBCB: ret 0x40 */ 2592 L_4707BBCE: 2593 ecx = MEM32(esp + 0x10); /* 0x4707BBCE: mov ecx, dword ptr [esp + 0x10] */ 2594 edx = MEM32(ecx); /* 0x4707BBD2: mov edx, dword ptr [ecx] */ 2595 PUSH32(esp, ebx); /* 0x4707BBD4: push ebx */ 2596 ebx = MEM32(esi); /* 0x4707BBD5: mov ebx, dword ptr [esi] */ 2597 PUSH32(esp, edi); /* 0x4707BBD7: push edi */ 2598 edi = MEM32(ecx + 0x8); /* 0x4707BBD8: mov edi, dword ptr [ecx + 8] */ 2599 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707BBDB: call dword ptr [edx + 4] */ 2600 RECOMP_FLAGS_IN(); 2601 ecx = MEM32(esp + 0x28); /* 0x4707BBDE: mov ecx, dword ptr [esp + 0x28] */ 2602 edx = MEM32(esp + 0x24); /* 0x4707BBE2: mov edx, dword ptr [esp + 0x24] */ 2603 PUSH32(esp, ecx); /* 0x4707BBE6: push ecx */ 2604 ecx = MEM32(esp + 0x24); /* 0x4707BBE7: mov ecx, dword ptr [esp + 0x24] */ 2605 PUSH32(esp, edx); /* 0x4707BBEB: push edx */ 2606 edx = MEM32(esp + 0x24); /* 0x4707BBEC: mov edx, dword ptr [esp + 0x24] */ 2607 PUSH32(esp, ecx); /* 0x4707BBF0: push ecx */ 2608 PUSH32(esp, edx); /* 0x4707BBF1: push edx */ 2609 PUSH32(esp, edi); /* 0x4707BBF2: push edi */ 2610 PUSH32(esp, eax); /* 0x4707BBF3: push eax */ 2611 PUSH32(esp, ebx); /* 0x4707BBF4: push ebx */ 2612 RECOMP_ICALL(MEM32(0x470AC484)); /* 0x4707BBF5: call dword ptr [0x470ac484] */ 2613 RECOMP_FLAGS_IN(); 2614 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BBFB: cmp eax, -1 */ 2615 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2616 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2617 _flag_k = FK_CMP; 2618 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BC13; /* 0x4707BBFE: jne 0x4707bc13 */ 2619 L_4707BC00: 2620 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707BC00: call dword ptr [0x470ac4a4] */ 2621 RECOMP_FLAGS_IN(); 2622 edi = eax; /* 0x4707BC06: mov edi, eax */ 2623 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707BC08: call dword ptr [0x470ac3c8] */ 2624 RECOMP_FLAGS_IN(); 2625 MEM32(eax) = edi; /* 0x4707BC0E: mov dword ptr [eax], edi */ 2626 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 2627 eax = eax | 0xFFFFFFFFu; /* 0x4707BC10: or eax, 0xffffffff */ 2628 _cf = 0; 2629 _flag_k = FK_TEST; 2630 L_4707BC13: 2631 PUSH32(esp, eax); /* 0x4707BC13: push eax */ 2632 eax = MEM32(esp + 0x34); /* 0x4707BC14: mov eax, dword ptr [esp + 0x34] */ 2633 PUSH32(esp, eax); /* 0x4707BC18: push eax */ 2634 PUSH32(esp, esi); /* 0x4707BC19: push esi */ 2635 ecx = ebp; /* 0x4707BC1A: mov ecx, ebp */ 2636 RECOMP_ICALL(0x4707B9F0u); /* 0x4707BC1C: call 0x4707b9f0 */ /* not lifted */ 2637 RECOMP_FLAGS_IN(); 2638 edi = POP32_VAL(esp); /* 0x4707BC21: pop edi */ 2639 ebx = POP32_VAL(esp); /* 0x4707BC22: pop ebx */ 2640 esi = POP32_VAL(esp); /* 0x4707BC23: pop esi */ 2641 ebp = POP32_VAL(esp); /* 0x4707BC24: pop ebp */ 2642 RECOMP_FLAGS_OUT(); esp += 68; { RECOMP_REGS_OUT(); return; } /* 0x4707BC25: ret 0x40 */ 2643 RECOMP_REGS_OUT(); 2644 } 2645 2646 void sub_4707BC30(void) { 2647 int _fpu_cmp = 0; 2648 uint32_t _cf = 0; 2649 int _df = 1; 2650 uint32_t _flag_k = FK_NONE; 2651 uint32_t _flag_a = 0, _flag_b = 0; 2652 uint32_t _itail_tgt = 0; 2653 RECOMP_REGS_LOCALS 2654 RECOMP_ENTER(0x4707BC30u); 2655 2656 L_4707BC30: 2657 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707BC30: push -1 */ 2658 PUSH32(esp, 0x470A9A70u); /* 0x4707BC32: push 0x470a9a70 */ 2659 eax = MEM32(FS_BASE + (0)); /* 0x4707BC37: mov eax, dword ptr fs:[0] */ 2660 PUSH32(esp, eax); /* 0x4707BC3D: push eax */ 2661 MEM32(FS_BASE + (0)) = esp; /* 0x4707BC3E: mov dword ptr fs:[0], esp */ 2662 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 2663 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2664 esp = esp - 0x10u; /* 0x4707BC45: sub esp, 0x10 */ 2665 _flag_k = FK_CMP; 2666 PUSH32(esp, ebx); /* 0x4707BC48: push ebx */ 2667 PUSH32(esp, esi); /* 0x4707BC49: push esi */ 2668 PUSH32(esp, edi); /* 0x4707BC4A: push edi */ 2669 ecx = esp + 0xC; /* 0x4707BC4B: lea ecx, [esp + 0xc] */ 2670 MEM32(esp + 0xC) = 0; /* 0x4707BC4F: mov dword ptr [esp + 0xc], 0 */ 2671 MEM32(esp + 0x10) = 0x88B8u; /* 0x4707BC57: mov dword ptr [esp + 0x10], 0x88b8 */ 2672 RECOMP_ICALL(0x470543C0u); /* 0x4707BC5F: call 0x470543c0 */ /* not lifted */ 2673 RECOMP_FLAGS_IN(); 2674 ecx = MEM32(esp + 0x10); /* 0x4707BC64: mov ecx, dword ptr [esp + 0x10] */ 2675 eax = 0x10624DD3u; /* 0x4707BC68: mov eax, 0x10624dd3 */ 2676 { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x4707BC6D: imul ecx */ 2677 eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r; 2678 _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; } 2679 if (6u) _cf = (((edx) >> 5) & 1u); /* 0x4707BC6F: sar edx, 6 */ 2680 if (6u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 6u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2681 edx = (uint32_t)((int32_t)edx >> 6u); 2682 eax = edx; /* 0x4707BC72: mov eax, edx */ 2683 if (31u) _cf = (((eax) >> 30) & 1u); /* 0x4707BC74: shr eax, 0x1f */ 2684 if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2685 eax = eax >> 31u; /* 0x4707BC74: shr eax, 0x1f */ 2686 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 2687 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2688 edx = edx + eax; /* 0x4707BC77: add edx, eax */ 2689 _flag_k = FK_ADD; 2690 eax = MEM32(esp + 0xC); /* 0x4707BC79: mov eax, dword ptr [esp + 0xc] */ 2691 eax = eax + eax * 4; /* 0x4707BC7D: lea eax, [eax + eax*4] */ 2692 eax = eax + eax * 4; /* 0x4707BC80: lea eax, [eax + eax*4] */ 2693 ecx = eax + eax * 4; /* 0x4707BC83: lea ecx, [eax + eax*4] */ 2694 edx = edx + ecx * 8; /* 0x4707BC86: lea edx, [edx + ecx*8] */ 2695 PUSH32(esp, edx); /* 0x4707BC89: push edx */ 2696 RECOMP_ICALL(MEM32(0x470AC12C)); /* 0x4707BC8A: call dword ptr [0x470ac12c] */ 2697 RECOMP_FLAGS_IN(); 2698 ecx = MEM32(esp + 0x34); /* 0x4707BC90: mov ecx, dword ptr [esp + 0x34] */ 2699 edi = MEM32(esp + 0x2C); /* 0x4707BC94: mov edi, dword ptr [esp + 0x2c] */ 2700 eax = MEM32(edi); /* 0x4707BC98: mov eax, dword ptr [edi] */ 2701 PUSH32(esp, 0); /* 0x4707BC9A: push 0 */ 2702 PUSH32(esp, ecx); /* 0x4707BC9C: push ecx */ 2703 PUSH32(esp, eax); /* 0x4707BC9D: push eax */ 2704 RECOMP_ICALL(0x4700E540u); /* 0x4707BC9E: call 0x4700e540 */ /* not lifted */ 2705 RECOMP_FLAGS_IN(); 2706 esi = eax; /* 0x4707BCA3: mov esi, eax */ 2707 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 2708 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2709 esp = esp + 0xCu; /* 0x4707BCA5: add esp, 0xc */ 2710 _flag_k = FK_ADD; 2711 /* cmp esi, 0xFFFFFFFFu */ /* 0x4707BCA8: cmp esi, -1 */ 2712 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0xFFFFFFFFu); 2713 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2714 _flag_k = FK_CMP; 2715 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BCE7; /* 0x4707BCAB: jne 0x4707bce7 */ 2716 L_4707BCAD: 2717 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707BCAD: call dword ptr [0x470ac3c8] */ 2718 RECOMP_FLAGS_IN(); 2719 esi = eax; /* 0x4707BCB3: mov esi, eax */ 2720 ebx = MEM32(esi); /* 0x4707BCB5: mov ebx, dword ptr [esi] */ 2721 MEM32(esp + 0x14) = esi; /* 0x4707BCB7: mov dword ptr [esp + 0x14], esi */ 2722 MEM32(esp + 0x18) = ebx; /* 0x4707BCBB: mov dword ptr [esp + 0x18], ebx */ 2723 ecx = edi; /* 0x4707BCBF: mov ecx, edi */ 2724 MEM32(esp + 0x24) = 0; /* 0x4707BCC1: mov dword ptr [esp + 0x24], 0 */ 2725 RECOMP_ICALL(0x4707E7D0u); /* 0x4707BCC9: call 0x4707e7d0 */ /* not lifted */ 2726 RECOMP_FLAGS_IN(); 2727 edi = POP32_VAL(esp); /* 0x4707BCCE: pop edi */ 2728 MEM32(esi) = ebx; /* 0x4707BCCF: mov dword ptr [esi], ebx */ 2729 esi = POP32_VAL(esp); /* 0x4707BCD1: pop esi */ 2730 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 2731 eax = eax | 0xFFFFFFFFu; /* 0x4707BCD2: or eax, 0xffffffff */ 2732 _cf = 0; 2733 _flag_k = FK_TEST; 2734 ebx = POP32_VAL(esp); /* 0x4707BCD5: pop ebx */ 2735 ecx = MEM32(esp + 0x10); /* 0x4707BCD6: mov ecx, dword ptr [esp + 0x10] */ 2736 MEM32(FS_BASE + (0)) = ecx; /* 0x4707BCDA: mov dword ptr fs:[0], ecx */ 2737 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu); 2738 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2739 esp = esp + 0x1Cu; /* 0x4707BCE1: add esp, 0x1c */ 2740 _flag_k = FK_ADD; 2741 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x4707BCE4: ret 0xc */ 2742 L_4707BCE7: 2743 ecx = MEM32(esp + 0x30); /* 0x4707BCE7: mov ecx, dword ptr [esp + 0x30] */ 2744 /* test ecx, ecx */ /* 0x4707BCEB: test ecx, ecx */ 2745 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 2746 _cf = 0; 2747 _flag_k = FK_TEST; 2748 if (TEST_Z(_flag_a, _flag_b)) goto L_4707BD55; /* 0x4707BCED: je 0x4707bd55 */ 2749 L_4707BCEF: 2750 eax = MEM32(ecx + 0x8); /* 0x4707BCEF: mov eax, dword ptr [ecx + 8] */ 2751 edx = MEM32(ecx); /* 0x4707BCF2: mov edx, dword ptr [ecx] */ 2752 MEM32(esp + 0x2C) = eax; /* 0x4707BCF4: mov dword ptr [esp + 0x2c], eax */ 2753 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707BCF8: call dword ptr [edx + 4] */ 2754 RECOMP_FLAGS_IN(); 2755 ecx = esp + 0x2C; /* 0x4707BCFB: lea ecx, [esp + 0x2c] */ 2756 PUSH32(esp, ecx); /* 0x4707BCFF: push ecx */ 2757 PUSH32(esp, eax); /* 0x4707BD00: push eax */ 2758 PUSH32(esp, esi); /* 0x4707BD01: push esi */ 2759 RECOMP_ICALL(MEM32(0x470AC45C)); /* 0x4707BD02: call dword ptr [0x470ac45c] */ 2760 RECOMP_FLAGS_IN(); 2761 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BD08: cmp eax, -1 */ 2762 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2763 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2764 _flag_k = FK_CMP; 2765 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BD55; /* 0x4707BD0B: jne 0x4707bd55 */ 2766 L_4707BD0D: 2767 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707BD0D: call dword ptr [0x470ac4a4] */ 2768 RECOMP_FLAGS_IN(); 2769 ebx = MEM32(0x470AC3C8); /* 0x4707BD13: mov ebx, dword ptr [0x470ac3c8] */ 2770 esi = eax; /* 0x4707BD19: mov esi, eax */ 2771 RECOMP_ICALL(ebx); /* 0x4707BD1B: call ebx */ 2772 RECOMP_FLAGS_IN(); 2773 MEM32(eax) = esi; /* 0x4707BD1D: mov dword ptr [eax], esi */ 2774 RECOMP_ICALL(ebx); /* 0x4707BD1F: call ebx */ 2775 RECOMP_FLAGS_IN(); 2776 esi = eax; /* 0x4707BD21: mov esi, eax */ 2777 ebx = MEM32(esi); /* 0x4707BD23: mov ebx, dword ptr [esi] */ 2778 MEM32(esp + 0x14) = esi; /* 0x4707BD25: mov dword ptr [esp + 0x14], esi */ 2779 MEM32(esp + 0x18) = ebx; /* 0x4707BD29: mov dword ptr [esp + 0x18], ebx */ 2780 ecx = edi; /* 0x4707BD2D: mov ecx, edi */ 2781 MEM32(esp + 0x24) = 1; /* 0x4707BD2F: mov dword ptr [esp + 0x24], 1 */ 2782 RECOMP_ICALL(0x4707E7D0u); /* 0x4707BD37: call 0x4707e7d0 */ /* not lifted */ 2783 RECOMP_FLAGS_IN(); 2784 edi = POP32_VAL(esp); /* 0x4707BD3C: pop edi */ 2785 MEM32(esi) = ebx; /* 0x4707BD3D: mov dword ptr [esi], ebx */ 2786 esi = POP32_VAL(esp); /* 0x4707BD3F: pop esi */ 2787 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 2788 eax = eax | 0xFFFFFFFFu; /* 0x4707BD40: or eax, 0xffffffff */ 2789 _cf = 0; 2790 _flag_k = FK_TEST; 2791 ebx = POP32_VAL(esp); /* 0x4707BD43: pop ebx */ 2792 ecx = MEM32(esp + 0x10); /* 0x4707BD44: mov ecx, dword ptr [esp + 0x10] */ 2793 MEM32(FS_BASE + (0)) = ecx; /* 0x4707BD48: mov dword ptr fs:[0], ecx */ 2794 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu); 2795 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2796 esp = esp + 0x1Cu; /* 0x4707BD4F: add esp, 0x1c */ 2797 _flag_k = FK_ADD; 2798 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x4707BD52: ret 0xc */ 2799 L_4707BD55: 2800 PUSH32(esp, 1); /* 0x4707BD55: push 1 */ 2801 ecx = edi; /* 0x4707BD57: mov ecx, edi */ 2802 RECOMP_ICALL(0x47032880u); /* 0x4707BD59: call 0x47032880 */ /* not lifted */ 2803 RECOMP_FLAGS_IN(); 2804 ecx = MEM32(esp + 0x1C); /* 0x4707BD5E: mov ecx, dword ptr [esp + 0x1c] */ 2805 edi = POP32_VAL(esp); /* 0x4707BD62: pop edi */ 2806 esi = POP32_VAL(esp); /* 0x4707BD63: pop esi */ 2807 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2808 eax = 0; /* 0x4707BD64: xor eax, eax */ 2809 _cf = 0; 2810 _flag_k = FK_TEST; 2811 ebx = POP32_VAL(esp); /* 0x4707BD66: pop ebx */ 2812 MEM32(FS_BASE + (0)) = ecx; /* 0x4707BD67: mov dword ptr fs:[0], ecx */ 2813 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu); 2814 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2815 esp = esp + 0x1Cu; /* 0x4707BD6E: add esp, 0x1c */ 2816 _flag_k = FK_ADD; 2817 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x4707BD71: ret 0xc */ 2818 RECOMP_REGS_OUT(); 2819 } 2820 2821 void sub_4707BD80(void) { 2822 int _fpu_cmp = 0; 2823 uint32_t _cf = 0; 2824 int _df = 1; 2825 uint32_t _flag_k = FK_NONE; 2826 uint32_t _flag_a = 0, _flag_b = 0; 2827 uint32_t _itail_tgt = 0; 2828 RECOMP_REGS_LOCALS 2829 RECOMP_ENTER(0x4707BD80u); 2830 2831 L_4707BD80: 2832 PUSH32(esp, ebp); /* 0x4707BD80: push ebp */ 2833 PUSH32(esp, esi); /* 0x4707BD81: push esi */ 2834 esi = MEM32(esp + 0xC); /* 0x4707BD82: mov esi, dword ptr [esp + 0xc] */ 2835 /* cmp MEM32(esi), 0xFFFFFFFFu */ /* 0x4707BD86: cmp dword ptr [esi], -1 */ 2836 _flag_a = (uint32_t)(MEM32(esi)); _flag_b = (uint32_t)(0xFFFFFFFFu); 2837 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2838 _flag_k = FK_CMP; 2839 PUSH32(esp, edi); /* 0x4707BD89: push edi */ 2840 ebp = ecx; /* 0x4707BD8A: mov ebp, ecx */ 2841 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BDAB; /* 0x4707BD8C: jne 0x4707bdab */ 2842 L_4707BD8E: 2843 eax = MEM32(esp + 0x20); /* 0x4707BD8E: mov eax, dword ptr [esp + 0x20] */ 2844 ecx = MEM32(esp + 0x30); /* 0x4707BD92: mov ecx, dword ptr [esp + 0x30] */ 2845 edx = MEM32(esp + 0x2C); /* 0x4707BD96: mov edx, dword ptr [esp + 0x2c] */ 2846 PUSH32(esp, eax); /* 0x4707BD9A: push eax */ 2847 PUSH32(esp, ecx); /* 0x4707BD9B: push ecx */ 2848 PUSH32(esp, edx); /* 0x4707BD9C: push edx */ 2849 PUSH32(esp, 1); /* 0x4707BD9D: push 1 */ 2850 ecx = esi; /* 0x4707BD9F: mov ecx, esi */ 2851 RECOMP_ICALL(0x4707A680u); /* 0x4707BDA1: call 0x4707a680 */ /* not lifted */ 2852 RECOMP_FLAGS_IN(); 2853 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BDA6: cmp eax, -1 */ 2854 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2855 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2856 _flag_k = FK_CMP; 2857 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707BE06; /* 0x4707BDA9: je 0x4707be06 */ 2858 L_4707BDAB: 2859 eax = MEM32(esp + 0x1C); /* 0x4707BDAB: mov eax, dword ptr [esp + 0x1c] */ 2860 ecx = MEM32(esp + 0x18); /* 0x4707BDAF: mov ecx, dword ptr [esp + 0x18] */ 2861 PUSH32(esp, eax); /* 0x4707BDB3: push eax */ 2862 PUSH32(esp, ecx); /* 0x4707BDB4: push ecx */ 2863 PUSH32(esp, esi); /* 0x4707BDB5: push esi */ 2864 ecx = ebp; /* 0x4707BDB6: mov ecx, ebp */ 2865 RECOMP_ICALL(0x4707B910u); /* 0x4707BDB8: call 0x4707b910 */ /* not lifted */ 2866 RECOMP_FLAGS_IN(); 2867 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BDBD: cmp eax, -1 */ 2868 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2869 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2870 _flag_k = FK_CMP; 2871 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707BE06; /* 0x4707BDC0: je 0x4707be06 */ 2872 L_4707BDC2: 2873 ecx = MEM32(esp + 0x14); /* 0x4707BDC2: mov ecx, dword ptr [esp + 0x14] */ 2874 edx = MEM32(ecx); /* 0x4707BDC6: mov edx, dword ptr [ecx] */ 2875 edi = MEM32(ecx + 0x8); /* 0x4707BDC8: mov edi, dword ptr [ecx + 8] */ 2876 PUSH32(esp, ebx); /* 0x4707BDCB: push ebx */ 2877 ebx = MEM32(esi); /* 0x4707BDCC: mov ebx, dword ptr [esi] */ 2878 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707BDCE: call dword ptr [edx + 4] */ 2879 RECOMP_FLAGS_IN(); 2880 PUSH32(esp, edi); /* 0x4707BDD1: push edi */ 2881 PUSH32(esp, eax); /* 0x4707BDD2: push eax */ 2882 PUSH32(esp, ebx); /* 0x4707BDD3: push ebx */ 2883 RECOMP_ICALL(MEM32(0x470AC488)); /* 0x4707BDD4: call dword ptr [0x470ac488] */ 2884 RECOMP_FLAGS_IN(); 2885 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BDDA: cmp eax, -1 */ 2886 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2887 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2888 _flag_k = FK_CMP; 2889 ebx = POP32_VAL(esp); /* 0x4707BDDD: pop ebx */ 2890 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BDF3; /* 0x4707BDDE: jne 0x4707bdf3 */ 2891 L_4707BDE0: 2892 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707BDE0: call dword ptr [0x470ac4a4] */ 2893 RECOMP_FLAGS_IN(); 2894 edi = eax; /* 0x4707BDE6: mov edi, eax */ 2895 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707BDE8: call dword ptr [0x470ac3c8] */ 2896 RECOMP_FLAGS_IN(); 2897 MEM32(eax) = edi; /* 0x4707BDEE: mov dword ptr [eax], edi */ 2898 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 2899 eax = eax | 0xFFFFFFFFu; /* 0x4707BDF0: or eax, 0xffffffff */ 2900 _cf = 0; 2901 _flag_k = FK_TEST; 2902 L_4707BDF3: 2903 PUSH32(esp, eax); /* 0x4707BDF3: push eax */ 2904 eax = MEM32(esp + 0x1C); /* 0x4707BDF4: mov eax, dword ptr [esp + 0x1c] */ 2905 PUSH32(esp, eax); /* 0x4707BDF8: push eax */ 2906 PUSH32(esp, esi); /* 0x4707BDF9: push esi */ 2907 ecx = ebp; /* 0x4707BDFA: mov ecx, ebp */ 2908 RECOMP_ICALL(0x4707B9F0u); /* 0x4707BDFC: call 0x4707b9f0 */ /* not lifted */ 2909 RECOMP_FLAGS_IN(); 2910 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BE01: cmp eax, -1 */ 2911 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 2912 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2913 _flag_k = FK_CMP; 2914 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BE82; /* 0x4707BE04: jne 0x4707be82 */ 2915 L_4707BE06: 2916 eax = MEM32(esp + 0x18); /* 0x4707BE06: mov eax, dword ptr [esp + 0x18] */ 2917 /* test eax, eax */ /* 0x4707BE0A: test eax, eax */ 2918 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2919 _cf = 0; 2920 _flag_k = FK_TEST; 2921 if (TEST_Z(_flag_a, _flag_b)) goto L_4707BE82; /* 0x4707BE0C: je 0x4707be82 */ 2922 L_4707BE0E: 2923 esi = MEM32(0x470AC3C8); /* 0x4707BE0E: mov esi, dword ptr [0x470ac3c8] */ 2924 RECOMP_ICALL(esi); /* 0x4707BE14: call esi */ 2925 RECOMP_FLAGS_IN(); 2926 /* cmp MEM32(eax), 0x2733u */ /* 0x4707BE16: cmp dword ptr [eax], 0x2733 */ 2927 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x2733u); 2928 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2929 _flag_k = FK_CMP; 2930 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707BE82; /* 0x4707BE1C: je 0x4707be82 */ 2931 L_4707BE1E: 2932 RECOMP_ICALL(esi); /* 0x4707BE1E: call esi */ 2933 RECOMP_FLAGS_IN(); 2934 /* cmp MEM32(eax), 0x79u */ /* 0x4707BE20: cmp dword ptr [eax], 0x79 */ 2935 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x79u); 2936 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2937 _flag_k = FK_CMP; 2938 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707BE82; /* 0x4707BE23: je 0x4707be82 */ 2939 L_4707BE25: 2940 RECOMP_ICALL(MEM32(0x470AC150)); /* 0x4707BE25: call dword ptr [0x470ac150] */ 2941 RECOMP_FLAGS_IN(); 2942 edi = eax; /* 0x4707BE2B: mov edi, eax */ 2943 RECOMP_ICALL(esi); /* 0x4707BE2D: call esi */ 2944 RECOMP_FLAGS_IN(); 2945 eax = MEM32(eax); /* 0x4707BE2F: mov eax, dword ptr [eax] */ 2946 /* test eax, eax */ /* 0x4707BE31: test eax, eax */ 2947 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2948 _cf = 0; 2949 _flag_k = FK_TEST; 2950 if (TEST_Z(_flag_a, _flag_b)) goto L_4707BE37; /* 0x4707BE33: je 0x4707be37 */ 2951 L_4707BE35: 2952 edi = eax; /* 0x4707BE35: mov edi, eax */ 2953 L_4707BE37: 2954 RECOMP_ICALL(0x47039020u); /* 0x4707BE37: call 0x47039020 */ /* not lifted */ 2955 RECOMP_FLAGS_IN(); 2956 esi = eax; /* 0x4707BE3C: mov esi, eax */ 2957 ecx = esi; /* 0x4707BE3E: mov ecx, esi */ 2958 RECOMP_ICALL(0x4703B210u); /* 0x4707BE40: call 0x4703b210 */ /* not lifted */ 2959 RECOMP_FLAGS_IN(); 2960 PUSH32(esp, eax); /* 0x4707BE45: push eax */ 2961 ecx = esi; /* 0x4707BE46: mov ecx, esi */ 2962 RECOMP_ICALL(0x4703B240u); /* 0x4707BE48: call 0x4703b240 */ /* not lifted */ 2963 RECOMP_FLAGS_IN(); 2964 PUSH32(esp, eax); /* 0x4707BE4D: push eax */ 2965 ecx = esi; /* 0x4707BE4E: mov ecx, esi */ 2966 RECOMP_ICALL(0x4703B080u); /* 0x4707BE50: call 0x4703b080 */ /* not lifted */ 2967 RECOMP_FLAGS_IN(); 2968 PUSH32(esp, eax); /* 0x4707BE55: push eax */ 2969 PUSH32(esp, edi); /* 0x4707BE56: push edi */ 2970 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707BE57: push -1 */ 2971 PUSH32(esp, 0x11Au); /* 0x4707BE59: push 0x11a */ 2972 PUSH32(esp, 0x4710B0B4u); /* 0x4707BE5E: push 0x4710b0b4 */ 2973 ecx = esi; /* 0x4707BE63: mov ecx, esi */ 2974 RECOMP_ICALL(0x4703A340u); /* 0x4707BE65: call 0x4703a340 */ /* not lifted */ 2975 RECOMP_FLAGS_IN(); 2976 PUSH32(esp, 0x4710B08Cu); /* 0x4707BE6A: push 0x4710b08c */ 2977 PUSH32(esp, 0x471055F0u); /* 0x4707BE6F: push 0x471055f0 */ 2978 PUSH32(esp, 0x80u); /* 0x4707BE74: push 0x80 */ 2979 PUSH32(esp, esi); /* 0x4707BE79: push esi */ 2980 RECOMP_ICALL(0x47039830u); /* 0x4707BE7A: call 0x47039830 */ /* not lifted */ 2981 RECOMP_FLAGS_IN(); 2982 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 2983 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2984 esp = esp + 0x10u; /* 0x4707BE7F: add esp, 0x10 */ 2985 _flag_k = FK_ADD; 2986 L_4707BE82: 2987 edi = POP32_VAL(esp); /* 0x4707BE82: pop edi */ 2988 esi = POP32_VAL(esp); /* 0x4707BE83: pop esi */ 2989 eax = ebp; /* 0x4707BE84: mov eax, ebp */ 2990 ebp = POP32_VAL(esp); /* 0x4707BE86: pop ebp */ 2991 RECOMP_FLAGS_OUT(); esp += 40; { RECOMP_REGS_OUT(); return; } /* 0x4707BE87: ret 0x24 */ 2992 RECOMP_REGS_OUT(); 2993 } 2994 2995 void sub_4707BE90(void) { 2996 int _fpu_cmp = 0; 2997 uint32_t _cf = 0; 2998 int _df = 1; 2999 uint32_t _flag_k = FK_NONE; 3000 uint32_t _flag_a = 0, _flag_b = 0; 3001 uint32_t _itail_tgt = 0; 3002 RECOMP_REGS_LOCALS 3003 RECOMP_ENTER(0x4707BE90u); 3004 3005 L_4707BE90: 3006 PUSH32(esp, ebp); /* 0x4707BE90: push ebp */ 3007 PUSH32(esp, esi); /* 0x4707BE91: push esi */ 3008 esi = MEM32(esp + 0xC); /* 0x4707BE92: mov esi, dword ptr [esp + 0xc] */ 3009 /* cmp MEM32(esi), 0xFFFFFFFFu */ /* 0x4707BE96: cmp dword ptr [esi], -1 */ 3010 _flag_a = (uint32_t)(MEM32(esi)); _flag_b = (uint32_t)(0xFFFFFFFFu); 3011 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3012 _flag_k = FK_CMP; 3013 PUSH32(esp, edi); /* 0x4707BE99: push edi */ 3014 ebp = ecx; /* 0x4707BE9A: mov ebp, ecx */ 3015 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BECA; /* 0x4707BE9C: jne 0x4707beca */ 3016 L_4707BE9E: 3017 eax = MEM32(esp + 0x40); /* 0x4707BE9E: mov eax, dword ptr [esp + 0x40] */ 3018 ecx = MEM32(esp + 0x3C); /* 0x4707BEA2: mov ecx, dword ptr [esp + 0x3c] */ 3019 edx = MEM32(esp + 0x38); /* 0x4707BEA6: mov edx, dword ptr [esp + 0x38] */ 3020 PUSH32(esp, eax); /* 0x4707BEAA: push eax */ 3021 eax = MEM32(esp + 0x38); /* 0x4707BEAB: mov eax, dword ptr [esp + 0x38] */ 3022 PUSH32(esp, ecx); /* 0x4707BEAF: push ecx */ 3023 ecx = MEM32(esp + 0x54); /* 0x4707BEB0: mov ecx, dword ptr [esp + 0x54] */ 3024 PUSH32(esp, edx); /* 0x4707BEB4: push edx */ 3025 edx = MEM32(esp + 0x54); /* 0x4707BEB5: mov edx, dword ptr [esp + 0x54] */ 3026 PUSH32(esp, eax); /* 0x4707BEB9: push eax */ 3027 PUSH32(esp, ecx); /* 0x4707BEBA: push ecx */ 3028 PUSH32(esp, edx); /* 0x4707BEBB: push edx */ 3029 PUSH32(esp, 1); /* 0x4707BEBC: push 1 */ 3030 ecx = esi; /* 0x4707BEBE: mov ecx, esi */ 3031 RECOMP_ICALL(0x4707AAE0u); /* 0x4707BEC0: call 0x4707aae0 */ /* not lifted */ 3032 RECOMP_FLAGS_IN(); 3033 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BEC5: cmp eax, -1 */ 3034 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3035 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3036 _flag_k = FK_CMP; 3037 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707BF39; /* 0x4707BEC8: je 0x4707bf39 */ 3038 L_4707BECA: 3039 eax = MEM32(esp + 0x30); /* 0x4707BECA: mov eax, dword ptr [esp + 0x30] */ 3040 ecx = MEM32(esp + 0x2C); /* 0x4707BECE: mov ecx, dword ptr [esp + 0x2c] */ 3041 PUSH32(esp, eax); /* 0x4707BED2: push eax */ 3042 PUSH32(esp, ecx); /* 0x4707BED3: push ecx */ 3043 PUSH32(esp, esi); /* 0x4707BED4: push esi */ 3044 ecx = ebp; /* 0x4707BED5: mov ecx, ebp */ 3045 RECOMP_ICALL(0x4707B910u); /* 0x4707BED7: call 0x4707b910 */ /* not lifted */ 3046 RECOMP_FLAGS_IN(); 3047 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BEDC: cmp eax, -1 */ 3048 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3049 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3050 _flag_k = FK_CMP; 3051 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707BF39; /* 0x4707BEDF: je 0x4707bf39 */ 3052 L_4707BEE1: 3053 ecx = MEM32(esp + 0x14); /* 0x4707BEE1: mov ecx, dword ptr [esp + 0x14] */ 3054 edx = MEM32(ecx); /* 0x4707BEE5: mov edx, dword ptr [ecx] */ 3055 edi = MEM32(ecx + 0x8); /* 0x4707BEE7: mov edi, dword ptr [ecx + 8] */ 3056 PUSH32(esp, ebx); /* 0x4707BEEA: push ebx */ 3057 ebx = MEM32(esi); /* 0x4707BEEB: mov ebx, dword ptr [esi] */ 3058 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707BEED: call dword ptr [edx + 4] */ 3059 RECOMP_FLAGS_IN(); 3060 ecx = MEM32(esp + 0x28); /* 0x4707BEF0: mov ecx, dword ptr [esp + 0x28] */ 3061 edx = MEM32(esp + 0x24); /* 0x4707BEF4: mov edx, dword ptr [esp + 0x24] */ 3062 PUSH32(esp, ecx); /* 0x4707BEF8: push ecx */ 3063 ecx = MEM32(esp + 0x24); /* 0x4707BEF9: mov ecx, dword ptr [esp + 0x24] */ 3064 PUSH32(esp, edx); /* 0x4707BEFD: push edx */ 3065 edx = MEM32(esp + 0x24); /* 0x4707BEFE: mov edx, dword ptr [esp + 0x24] */ 3066 PUSH32(esp, ecx); /* 0x4707BF02: push ecx */ 3067 PUSH32(esp, edx); /* 0x4707BF03: push edx */ 3068 PUSH32(esp, edi); /* 0x4707BF04: push edi */ 3069 PUSH32(esp, eax); /* 0x4707BF05: push eax */ 3070 PUSH32(esp, ebx); /* 0x4707BF06: push ebx */ 3071 RECOMP_ICALL(MEM32(0x470AC484)); /* 0x4707BF07: call dword ptr [0x470ac484] */ 3072 RECOMP_FLAGS_IN(); 3073 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BF0D: cmp eax, -1 */ 3074 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3075 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3076 _flag_k = FK_CMP; 3077 ebx = POP32_VAL(esp); /* 0x4707BF10: pop ebx */ 3078 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BF26; /* 0x4707BF11: jne 0x4707bf26 */ 3079 L_4707BF13: 3080 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707BF13: call dword ptr [0x470ac4a4] */ 3081 RECOMP_FLAGS_IN(); 3082 edi = eax; /* 0x4707BF19: mov edi, eax */ 3083 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707BF1B: call dword ptr [0x470ac3c8] */ 3084 RECOMP_FLAGS_IN(); 3085 MEM32(eax) = edi; /* 0x4707BF21: mov dword ptr [eax], edi */ 3086 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 3087 eax = eax | 0xFFFFFFFFu; /* 0x4707BF23: or eax, 0xffffffff */ 3088 _cf = 0; 3089 _flag_k = FK_TEST; 3090 L_4707BF26: 3091 PUSH32(esp, eax); /* 0x4707BF26: push eax */ 3092 eax = MEM32(esp + 0x30); /* 0x4707BF27: mov eax, dword ptr [esp + 0x30] */ 3093 PUSH32(esp, eax); /* 0x4707BF2B: push eax */ 3094 PUSH32(esp, esi); /* 0x4707BF2C: push esi */ 3095 ecx = ebp; /* 0x4707BF2D: mov ecx, ebp */ 3096 RECOMP_ICALL(0x4707B9F0u); /* 0x4707BF2F: call 0x4707b9f0 */ /* not lifted */ 3097 RECOMP_FLAGS_IN(); 3098 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707BF34: cmp eax, -1 */ 3099 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3100 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3101 _flag_k = FK_CMP; 3102 if (CMP_NE(_flag_a, _flag_b)) goto L_4707BFB5; /* 0x4707BF37: jne 0x4707bfb5 */ 3103 L_4707BF39: 3104 eax = MEM32(esp + 0x2C); /* 0x4707BF39: mov eax, dword ptr [esp + 0x2c] */ 3105 /* test eax, eax */ /* 0x4707BF3D: test eax, eax */ 3106 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3107 _cf = 0; 3108 _flag_k = FK_TEST; 3109 if (TEST_Z(_flag_a, _flag_b)) goto L_4707BFB5; /* 0x4707BF3F: je 0x4707bfb5 */ 3110 L_4707BF41: 3111 esi = MEM32(0x470AC3C8); /* 0x4707BF41: mov esi, dword ptr [0x470ac3c8] */ 3112 RECOMP_ICALL(esi); /* 0x4707BF47: call esi */ 3113 RECOMP_FLAGS_IN(); 3114 /* cmp MEM32(eax), 0x2733u */ /* 0x4707BF49: cmp dword ptr [eax], 0x2733 */ 3115 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x2733u); 3116 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3117 _flag_k = FK_CMP; 3118 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707BFB5; /* 0x4707BF4F: je 0x4707bfb5 */ 3119 L_4707BF51: 3120 RECOMP_ICALL(esi); /* 0x4707BF51: call esi */ 3121 RECOMP_FLAGS_IN(); 3122 /* cmp MEM32(eax), 0x79u */ /* 0x4707BF53: cmp dword ptr [eax], 0x79 */ 3123 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x79u); 3124 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3125 _flag_k = FK_CMP; 3126 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707BFB5; /* 0x4707BF56: je 0x4707bfb5 */ 3127 L_4707BF58: 3128 RECOMP_ICALL(MEM32(0x470AC150)); /* 0x4707BF58: call dword ptr [0x470ac150] */ 3129 RECOMP_FLAGS_IN(); 3130 edi = eax; /* 0x4707BF5E: mov edi, eax */ 3131 RECOMP_ICALL(esi); /* 0x4707BF60: call esi */ 3132 RECOMP_FLAGS_IN(); 3133 eax = MEM32(eax); /* 0x4707BF62: mov eax, dword ptr [eax] */ 3134 /* test eax, eax */ /* 0x4707BF64: test eax, eax */ 3135 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3136 _cf = 0; 3137 _flag_k = FK_TEST; 3138 if (TEST_Z(_flag_a, _flag_b)) goto L_4707BF6A; /* 0x4707BF66: je 0x4707bf6a */ 3139 L_4707BF68: 3140 edi = eax; /* 0x4707BF68: mov edi, eax */ 3141 L_4707BF6A: 3142 RECOMP_ICALL(0x47039020u); /* 0x4707BF6A: call 0x47039020 */ /* not lifted */ 3143 RECOMP_FLAGS_IN(); 3144 esi = eax; /* 0x4707BF6F: mov esi, eax */ 3145 ecx = esi; /* 0x4707BF71: mov ecx, esi */ 3146 RECOMP_ICALL(0x4703B210u); /* 0x4707BF73: call 0x4703b210 */ /* not lifted */ 3147 RECOMP_FLAGS_IN(); 3148 PUSH32(esp, eax); /* 0x4707BF78: push eax */ 3149 ecx = esi; /* 0x4707BF79: mov ecx, esi */ 3150 RECOMP_ICALL(0x4703B240u); /* 0x4707BF7B: call 0x4703b240 */ /* not lifted */ 3151 RECOMP_FLAGS_IN(); 3152 PUSH32(esp, eax); /* 0x4707BF80: push eax */ 3153 ecx = esi; /* 0x4707BF81: mov ecx, esi */ 3154 RECOMP_ICALL(0x4703B080u); /* 0x4707BF83: call 0x4703b080 */ /* not lifted */ 3155 RECOMP_FLAGS_IN(); 3156 PUSH32(esp, eax); /* 0x4707BF88: push eax */ 3157 PUSH32(esp, edi); /* 0x4707BF89: push edi */ 3158 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707BF8A: push -1 */ 3159 PUSH32(esp, 0x13Cu); /* 0x4707BF8C: push 0x13c */ 3160 PUSH32(esp, 0x4710B0B4u); /* 0x4707BF91: push 0x4710b0b4 */ 3161 ecx = esi; /* 0x4707BF96: mov ecx, esi */ 3162 RECOMP_ICALL(0x4703A340u); /* 0x4707BF98: call 0x4703a340 */ /* not lifted */ 3163 RECOMP_FLAGS_IN(); 3164 PUSH32(esp, 0x4710B08Cu); /* 0x4707BF9D: push 0x4710b08c */ 3165 PUSH32(esp, 0x471055F0u); /* 0x4707BFA2: push 0x471055f0 */ 3166 PUSH32(esp, 0x80u); /* 0x4707BFA7: push 0x80 */ 3167 PUSH32(esp, esi); /* 0x4707BFAC: push esi */ 3168 RECOMP_ICALL(0x47039830u); /* 0x4707BFAD: call 0x47039830 */ /* not lifted */ 3169 RECOMP_FLAGS_IN(); 3170 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 3171 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3172 esp = esp + 0x10u; /* 0x4707BFB2: add esp, 0x10 */ 3173 _flag_k = FK_ADD; 3174 L_4707BFB5: 3175 edi = POP32_VAL(esp); /* 0x4707BFB5: pop edi */ 3176 esi = POP32_VAL(esp); /* 0x4707BFB6: pop esi */ 3177 eax = ebp; /* 0x4707BFB7: mov eax, ebp */ 3178 ebp = POP32_VAL(esp); /* 0x4707BFB9: pop ebp */ 3179 RECOMP_FLAGS_OUT(); esp += 68; { RECOMP_REGS_OUT(); return; } /* 0x4707BFBA: ret 0x40 */ 3180 RECOMP_REGS_OUT(); 3181 } 3182 3183 void sub_4707BFC0(void) { 3184 int _fpu_cmp = 0; 3185 uint32_t _cf = 0; 3186 int _df = 1; 3187 uint32_t _flag_k = FK_NONE; 3188 uint32_t _flag_a = 0, _flag_b = 0; 3189 uint32_t _itail_tgt = 0; 3190 RECOMP_REGS_LOCALS 3191 RECOMP_ENTER(0x4707BFC0u); 3192 3193 L_4707BFC0: 3194 ecx = 0x4710EF8Du; /* 0x4707BFC0: mov ecx, 0x4710ef8d */ 3195 RECOMP_ICALL(MEM32(0x470AC1C8)); /* 0x4707BFC5: call dword ptr [0x470ac1c8] */ 3196 RECOMP_FLAGS_IN(); 3197 PUSH32(esp, 0x4707BFE0u); /* 0x4707BFCB: push 0x4707bfe0 */ 3198 RECOMP_ICALL(0x470A32D9u); /* 0x4707BFD0: call 0x470a32d9 */ /* not lifted */ 3199 RECOMP_FLAGS_IN(); 3200 ecx = POP32_VAL(esp); /* 0x4707BFD5: pop ecx */ 3201 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707BFD6: ret */ 3202 RECOMP_REGS_OUT(); 3203 } 3204 3205 void sub_4707BFE0(void) { 3206 int _fpu_cmp = 0; 3207 uint32_t _cf = 0; 3208 int _df = 1; 3209 uint32_t _flag_k = FK_NONE; 3210 uint32_t _flag_a = 0, _flag_b = 0; 3211 uint32_t _itail_tgt = 0; 3212 RECOMP_REGS_LOCALS 3213 RECOMP_ENTER(0x4707BFE0u); 3214 3215 L_4707BFE0: 3216 ecx = 0x4710EF8Du; /* 0x4707BFE0: mov ecx, 0x4710ef8d */ 3217 L_4707BFE5: 3218 { _itail_tgt = (uint32_t)(MEM32(0x470AC1BC)); goto _ljump; } 3219 { RECOMP_REGS_OUT(); return; } /* end of function */ 3220 _ljump: 3221 switch (_itail_tgt) { 3222 case 0x4707BFE0u: goto L_4707BFE0; 3223 case 0x4707BFE5u: goto L_4707BFE5; 3224 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 3225 } 3226 RECOMP_REGS_OUT(); 3227 } 3228 3229 void sub_4707BFF0(void) { 3230 int _fpu_cmp = 0; 3231 uint32_t _cf = 0; 3232 int _df = 1; 3233 uint32_t _flag_k = FK_NONE; 3234 uint32_t _flag_a = 0, _flag_b = 0; 3235 uint32_t _itail_tgt = 0; 3236 RECOMP_REGS_LOCALS 3237 RECOMP_ENTER(0x4707BFF0u); 3238 3239 L_4707BFF0: 3240 ecx = 0x4710EF8Cu; /* 0x4707BFF0: mov ecx, 0x4710ef8c */ 3241 RECOMP_ICALL(MEM32(0x470AC1C4)); /* 0x4707BFF5: call dword ptr [0x470ac1c4] */ 3242 RECOMP_FLAGS_IN(); 3243 PUSH32(esp, 0x4707C010u); /* 0x4707BFFB: push 0x4707c010 */ 3244 RECOMP_ICALL(0x470A32D9u); /* 0x4707C000: call 0x470a32d9 */ /* not lifted */ 3245 RECOMP_FLAGS_IN(); 3246 ecx = POP32_VAL(esp); /* 0x4707C005: pop ecx */ 3247 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707C006: ret */ 3248 RECOMP_REGS_OUT(); 3249 } 3250 3251 void sub_4707C010(void) { 3252 int _fpu_cmp = 0; 3253 uint32_t _cf = 0; 3254 int _df = 1; 3255 uint32_t _flag_k = FK_NONE; 3256 uint32_t _flag_a = 0, _flag_b = 0; 3257 uint32_t _itail_tgt = 0; 3258 RECOMP_REGS_LOCALS 3259 RECOMP_ENTER(0x4707C010u); 3260 3261 L_4707C010: 3262 ecx = 0x4710EF8Cu; /* 0x4707C010: mov ecx, 0x4710ef8c */ 3263 L_4707C015: 3264 { _itail_tgt = (uint32_t)(MEM32(0x470AC1C0)); goto _ljump; } 3265 { RECOMP_REGS_OUT(); return; } /* end of function */ 3266 _ljump: 3267 switch (_itail_tgt) { 3268 case 0x4707C010u: goto L_4707C010; 3269 case 0x4707C015u: goto L_4707C015; 3270 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 3271 } 3272 RECOMP_REGS_OUT(); 3273 } 3274 3275 void sub_4707C020(void) { 3276 int _fpu_cmp = 0; 3277 uint32_t _cf = 0; 3278 int _df = 1; 3279 uint32_t _flag_k = FK_NONE; 3280 uint32_t _flag_a = 0, _flag_b = 0; 3281 uint32_t _itail_tgt = 0; 3282 RECOMP_REGS_LOCALS 3283 RECOMP_ENTER(0x4707C020u); 3284 3285 L_4707C020: 3286 MEM32(0x4710EF84) = 0x47104A3Cu; /* 0x4707C020: mov dword ptr [0x4710ef84], 0x47104a3c */ 3287 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707C02A: ret */ 3288 RECOMP_REGS_OUT(); 3289 } 3290 3291 void sub_4707C030(void) { 3292 int _fpu_cmp = 0; 3293 uint32_t _cf = 0; 3294 int _df = 1; 3295 uint32_t _flag_k = FK_NONE; 3296 uint32_t _flag_a = 0, _flag_b = 0; 3297 uint32_t _itail_tgt = 0; 3298 RECOMP_REGS_LOCALS 3299 RECOMP_ENTER(0x4707C030u); 3300 3301 L_4707C030: 3302 MEM32(0x4710EF94) = 0x47104A00u; /* 0x4707C030: mov dword ptr [0x4710ef94], 0x47104a00 */ 3303 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707C03A: ret */ 3304 RECOMP_REGS_OUT(); 3305 } 3306 3307 void sub_4707C040(void) { 3308 int _fpu_cmp = 0; 3309 uint32_t _cf = 0; 3310 int _df = 1; 3311 uint32_t _flag_k = FK_NONE; 3312 uint32_t _flag_a = 0, _flag_b = 0; 3313 uint32_t _itail_tgt = 0; 3314 RECOMP_REGS_LOCALS 3315 RECOMP_ENTER(0x4707C040u); 3316 3317 L_4707C040: 3318 MEM32(0x4710EF90) = 0x47104A70u; /* 0x4707C040: mov dword ptr [0x4710ef90], 0x47104a70 */ 3319 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707C04A: ret */ 3320 RECOMP_REGS_OUT(); 3321 } 3322 3323 void sub_4707C050(void) { 3324 int _fpu_cmp = 0; 3325 uint32_t _cf = 0; 3326 int _df = 1; 3327 uint32_t _flag_k = FK_NONE; 3328 uint32_t _flag_a = 0, _flag_b = 0; 3329 uint32_t _itail_tgt = 0; 3330 RECOMP_REGS_LOCALS 3331 RECOMP_ENTER(0x4707C050u); 3332 3333 L_4707C050: 3334 MEM32(0x4710EFA0) = 0x47104B6Cu; /* 0x4707C050: mov dword ptr [0x4710efa0], 0x47104b6c */ 3335 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707C05A: ret */ 3336 RECOMP_REGS_OUT(); 3337 } 3338 3339 void sub_4707C060(void) { 3340 int _fpu_cmp = 0; 3341 uint32_t _cf = 0; 3342 int _df = 1; 3343 uint32_t _flag_k = FK_NONE; 3344 uint32_t _flag_a = 0, _flag_b = 0; 3345 uint32_t _itail_tgt = 0; 3346 RECOMP_REGS_LOCALS 3347 RECOMP_ENTER(0x4707C060u); 3348 3349 L_4707C060: 3350 MEM32(0x4710EF88) = 0x47104BA0u; /* 0x4707C060: mov dword ptr [0x4710ef88], 0x47104ba0 */ 3351 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707C06A: ret */ 3352 RECOMP_REGS_OUT(); 3353 } 3354 3355 void sub_4707C070(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(0x4707C070u); 3364 3365 L_4707C070: 3366 MEM32(0x4710EF9C) = 0x47104BD4u; /* 0x4707C070: mov dword ptr [0x4710ef9c], 0x47104bd4 */ 3367 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707C07A: ret */ 3368 RECOMP_REGS_OUT(); 3369 } 3370 3371 void sub_4707C080(void) { 3372 int _fpu_cmp = 0; 3373 uint32_t _cf = 0; 3374 int _df = 1; 3375 uint32_t _flag_k = FK_NONE; 3376 uint32_t _flag_a = 0, _flag_b = 0; 3377 uint32_t _itail_tgt = 0; 3378 RECOMP_REGS_LOCALS 3379 RECOMP_ENTER(0x4707C080u); 3380 3381 L_4707C080: 3382 MEM32(0x4710EF98) = 0x4710B0F4u; /* 0x4707C080: mov dword ptr [0x4710ef98], 0x4710b0f4 */ 3383 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707C08A: ret */ 3384 RECOMP_REGS_OUT(); 3385 } 3386 3387 void sub_4707C090(void) { 3388 int _fpu_cmp = 0; 3389 uint32_t _cf = 0; 3390 int _df = 1; 3391 uint32_t _flag_k = FK_NONE; 3392 uint32_t _flag_a = 0, _flag_b = 0; 3393 uint32_t _itail_tgt = 0; 3394 RECOMP_REGS_LOCALS 3395 RECOMP_ENTER(0x4707C090u); 3396 3397 L_4707C090: 3398 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x118u); 3399 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3400 esp = esp - 0x118u; /* 0x4707C090: sub esp, 0x118 */ 3401 _flag_k = FK_CMP; 3402 PUSH32(esp, ebx); /* 0x4707C096: push ebx */ 3403 PUSH32(esp, ebp); /* 0x4707C097: push ebp */ 3404 PUSH32(esp, esi); /* 0x4707C098: push esi */ 3405 esi = ecx; /* 0x4707C099: mov esi, ecx */ 3406 PUSH32(esp, edi); /* 0x4707C09B: push edi */ 3407 ecx = esp + 0x1C; /* 0x4707C09C: lea ecx, [esp + 0x1c] */ 3408 RECOMP_ICALL(0x4702FFC0u); /* 0x4707C0A0: call 0x4702ffc0 */ /* not lifted */ 3409 RECOMP_FLAGS_IN(); 3410 edi = MEM32(esi); /* 0x4707C0A5: mov edi, dword ptr [esi] */ 3411 eax = esp + 0x24; /* 0x4707C0A7: lea eax, [esp + 0x24] */ 3412 PUSH32(esp, eax); /* 0x4707C0AB: push eax */ 3413 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3414 ebx = 0; /* 0x4707C0AC: xor ebx, ebx */ 3415 _cf = 0; 3416 _flag_k = FK_TEST; 3417 PUSH32(esp, edi); /* 0x4707C0AE: push edi */ 3418 MEM32(esp + 0x28) = 0xFFFFFFFFu; /* 0x4707C0AF: mov dword ptr [esp + 0x28], 0xffffffff */ 3419 MEM32(esp + 0x24) = ebx; /* 0x4707C0B7: mov dword ptr [esp + 0x24], ebx */ 3420 MEM32(esp + 0x2C) = ebx; /* 0x4707C0BB: mov dword ptr [esp + 0x2c], ebx */ 3421 RECOMP_ICALL(0x470A3290u); /* 0x4707C0BF: call 0x470a3290 */ /* not lifted */ 3422 RECOMP_FLAGS_IN(); 3423 /* test eax, eax */ /* 0x4707C0C4: test eax, eax */ 3424 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3425 _cf = 0; 3426 _flag_k = FK_TEST; 3427 if (TEST_NZ(_flag_a, _flag_b)) goto L_4707C0F5; /* 0x4707C0C6: jne 0x4707c0f5 */ 3428 L_4707C0C8: 3429 edx = MEM32(esp + 0x24); /* 0x4707C0C8: mov edx, dword ptr [esp + 0x24] */ 3430 /* cmp edx, ebx */ /* 0x4707C0CC: cmp edx, ebx */ 3431 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ebx); 3432 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3433 _flag_k = FK_CMP; 3434 if (CMP_BE(_flag_a, _flag_b)) goto L_4707C0E0; /* 0x4707C0CE: jbe 0x4707c0e0 */ 3435 L_4707C0D0: 3436 ecx = esp + 0x28; /* 0x4707C0D0: lea ecx, [esp + 0x28] */ 3437 L_4707C0D4: 3438 /* cmp MEM32(ecx), edi */ /* 0x4707C0D4: cmp dword ptr [ecx], edi */ 3439 _flag_a = (uint32_t)(MEM32(ecx)); _flag_b = (uint32_t)(edi); 3440 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3441 _flag_k = FK_CMP; 3442 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707C0E0; /* 0x4707C0D6: je 0x4707c0e0 */ 3443 L_4707C0D8: 3444 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 3445 eax = eax + 1; /* 0x4707C0D8: inc eax */ 3446 _flag_k = FK_INC; 3447 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 3448 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3449 ecx = ecx + 4; /* 0x4707C0D9: add ecx, 4 */ 3450 _flag_k = FK_ADD; 3451 /* cmp eax, edx */ /* 0x4707C0DC: cmp eax, edx */ 3452 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 3453 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3454 _flag_k = FK_CMP; 3455 RECOMP_BACKEDGE(); 3456 if (CMP_B(_flag_a, _flag_b)) goto L_4707C0D4; /* 0x4707C0DE: jb 0x4707c0d4 */ 3457 L_4707C0E0: 3458 /* cmp eax, edx */ /* 0x4707C0E0: cmp eax, edx */ 3459 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 3460 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3461 _flag_k = FK_CMP; 3462 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C0F1; /* 0x4707C0E2: jne 0x4707c0f1 */ 3463 L_4707C0E4: 3464 /* cmp edx, 0x40u */ /* 0x4707C0E4: cmp edx, 0x40 */ 3465 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x40u); 3466 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3467 _flag_k = FK_CMP; 3468 if (CMP_AE(_flag_a, _flag_b)) goto L_4707C0F1; /* 0x4707C0E7: jae 0x4707c0f1 */ 3469 L_4707C0E9: 3470 MEM32(esp + eax * 4 + 0x28) = edi; /* 0x4707C0E9: mov dword ptr [esp + eax*4 + 0x28], edi */ 3471 _flag_a = (uint32_t)(MEM32(esp + 0x24)); _flag_b = (uint32_t)(1); 3472 MEM32(esp + 0x24) = MEM32(esp + 0x24) + 1; /* 0x4707C0ED: inc dword ptr [esp + 0x24] */ 3473 _flag_k = FK_INC; 3474 L_4707C0F1: 3475 _flag_a = (uint32_t)(MEM32(esp + 0x1C)); _flag_b = (uint32_t)(1); 3476 MEM32(esp + 0x1C) = MEM32(esp + 0x1C) + 1; /* 0x4707C0F1: inc dword ptr [esp + 0x1c] */ 3477 _flag_k = FK_INC; 3478 L_4707C0F5: 3479 edx = MEM32(esp + 0x1C); /* 0x4707C0F5: mov edx, dword ptr [esp + 0x1c] */ 3480 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3481 eax = 0; /* 0x4707C0F9: xor eax, eax */ 3482 _cf = 0; 3483 _flag_k = FK_TEST; 3484 /* cmp edx, ebx */ /* 0x4707C0FB: cmp edx, ebx */ 3485 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ebx); 3486 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3487 _flag_k = FK_CMP; 3488 edx = MEM32(esp + 0x138); /* 0x4707C0FD: mov edx, dword ptr [esp + 0x138] */ 3489 SET_LO8(eax, (CMP_LE(_flag_a, _flag_b)) ? 1 : 0); /* 0x4707C104: setle al */ 3490 PUSH32(esp, edx); /* 0x4707C107: push edx */ 3491 PUSH32(esp, ebx); /* 0x4707C108: push ebx */ 3492 ecx = esp + 0x2C; /* 0x4707C109: lea ecx, [esp + 0x2c] */ 3493 PUSH32(esp, ebx); /* 0x4707C10D: push ebx */ 3494 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 3495 eax = eax - 1; /* 0x4707C10E: dec eax */ 3496 _flag_k = FK_DEC; 3497 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 3498 eax = eax & ecx; /* 0x4707C10F: and eax, ecx */ 3499 _cf = 0; 3500 _flag_k = FK_TEST; 3501 ecx = MEM32(esi); /* 0x4707C111: mov ecx, dword ptr [esi] */ 3502 PUSH32(esp, eax); /* 0x4707C113: push eax */ 3503 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 3504 ecx = ecx + 1; /* 0x4707C114: inc ecx */ 3505 _flag_k = FK_INC; 3506 PUSH32(esp, ecx); /* 0x4707C115: push ecx */ 3507 RECOMP_ICALL(MEM32(0x470AC478)); /* 0x4707C116: call dword ptr [0x470ac478] */ 3508 RECOMP_FLAGS_IN(); 3509 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C11C: cmp eax, -1 */ 3510 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3511 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3512 _flag_k = FK_CMP; 3513 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707C159; /* 0x4707C11F: je 0x4707c159 */ 3514 L_4707C121: 3515 /* cmp eax, ebx */ /* 0x4707C121: cmp eax, ebx */ 3516 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 3517 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3518 _flag_k = FK_CMP; 3519 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707C253; /* 0x4707C123: je 0x4707c253 */ 3520 L_4707C129: 3521 ebp = MEM32(esp + 0x130); /* 0x4707C129: mov ebp, dword ptr [esp + 0x130] */ 3522 edx = MEM32(ebp); /* 0x4707C130: mov edx, dword ptr [ebp] */ 3523 ecx = ebp; /* 0x4707C133: mov ecx, ebp */ 3524 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707C135: call dword ptr [edx + 4] */ 3525 RECOMP_FLAGS_IN(); 3526 edi = eax; /* 0x4707C138: mov edi, eax */ 3527 eax = MEM32(ebp + 0x8); /* 0x4707C13A: mov eax, dword ptr [ebp + 8] */ 3528 ecx = esp + 0x14; /* 0x4707C13D: lea ecx, [esp + 0x14] */ 3529 PUSH32(esp, ecx); /* 0x4707C141: push ecx */ 3530 MEM32(esp + 0x14) = eax; /* 0x4707C142: mov dword ptr [esp + 0x14], eax */ 3531 eax = MEM32(esi); /* 0x4707C146: mov eax, dword ptr [esi] */ 3532 PUSH32(esp, 0x4004667Fu); /* 0x4707C148: push 0x4004667f */ 3533 PUSH32(esp, eax); /* 0x4707C14D: push eax */ 3534 RECOMP_ICALL(MEM32(0x470AC4A8)); /* 0x4707C14E: call dword ptr [0x470ac4a8] */ 3535 RECOMP_FLAGS_IN(); 3536 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C154: cmp eax, -1 */ 3537 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3538 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3539 _flag_k = FK_CMP; 3540 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C179; /* 0x4707C157: jne 0x4707c179 */ 3541 L_4707C159: 3542 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707C159: call dword ptr [0x470ac4a4] */ 3543 RECOMP_FLAGS_IN(); 3544 esi = eax; /* 0x4707C15F: mov esi, eax */ 3545 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707C161: call dword ptr [0x470ac3c8] */ 3546 RECOMP_FLAGS_IN(); 3547 edi = POP32_VAL(esp); /* 0x4707C167: pop edi */ 3548 MEM32(eax) = esi; /* 0x4707C168: mov dword ptr [eax], esi */ 3549 esi = POP32_VAL(esp); /* 0x4707C16A: pop esi */ 3550 ebp = POP32_VAL(esp); /* 0x4707C16B: pop ebp */ 3551 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 3552 eax = eax | 0xFFFFFFFFu; /* 0x4707C16C: or eax, 0xffffffff */ 3553 _cf = 0; 3554 _flag_k = FK_TEST; 3555 ebx = POP32_VAL(esp); /* 0x4707C16F: pop ebx */ 3556 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x118u); 3557 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3558 esp = esp + 0x118u; /* 0x4707C170: add esp, 0x118 */ 3559 _flag_k = FK_ADD; 3560 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707C176: ret 0x10 */ 3561 L_4707C179: 3562 eax = MEM32(esp + 0x14); /* 0x4707C179: mov eax, dword ptr [esp + 0x14] */ 3563 /* cmp eax, ebx */ /* 0x4707C17D: cmp eax, ebx */ 3564 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 3565 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3566 _flag_k = FK_CMP; 3567 if (CMP_BE(_flag_a, _flag_b)) goto L_4707C244; /* 0x4707C17F: jbe 0x4707c244 */ 3568 L_4707C185: 3569 PUSH32(esp, eax); /* 0x4707C185: push eax */ 3570 RECOMP_ICALL(0x470A33F2u); /* 0x4707C186: call 0x470a33f2 */ /* not lifted */ 3571 RECOMP_FLAGS_IN(); 3572 edx = MEM32(esp + 0x130); /* 0x4707C18B: mov edx, dword ptr [esp + 0x130] */ 3573 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 3574 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3575 esp = esp + 4; /* 0x4707C192: add esp, 4 */ 3576 _flag_k = FK_ADD; 3577 /* cmp eax, ebx */ /* 0x4707C195: cmp eax, ebx */ 3578 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 3579 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3580 _flag_k = FK_CMP; 3581 MEM32(edx + 0x4) = eax; /* 0x4707C197: mov dword ptr [edx + 4], eax */ 3582 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C1B8; /* 0x4707C19A: jne 0x4707c1b8 */ 3583 L_4707C19C: 3584 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707C19C: call dword ptr [0x470ac3c8] */ 3585 RECOMP_FLAGS_IN(); 3586 edi = POP32_VAL(esp); /* 0x4707C1A2: pop edi */ 3587 esi = POP32_VAL(esp); /* 0x4707C1A3: pop esi */ 3588 ebp = POP32_VAL(esp); /* 0x4707C1A4: pop ebp */ 3589 MEM32(eax) = 0xCu; /* 0x4707C1A5: mov dword ptr [eax], 0xc */ 3590 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 3591 eax = eax | 0xFFFFFFFFu; /* 0x4707C1AB: or eax, 0xffffffff */ 3592 _cf = 0; 3593 _flag_k = FK_TEST; 3594 ebx = POP32_VAL(esp); /* 0x4707C1AE: pop ebx */ 3595 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x118u); 3596 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3597 esp = esp + 0x118u; /* 0x4707C1AF: add esp, 0x118 */ 3598 _flag_k = FK_ADD; 3599 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707C1B5: ret 0x10 */ 3600 L_4707C1B8: 3601 ecx = MEM32(esi); /* 0x4707C1B8: mov ecx, dword ptr [esi] */ 3602 ebx = MEM32(esp + 0x134); /* 0x4707C1BA: mov ebx, dword ptr [esp + 0x134] */ 3603 esi = MEM32(esp + 0x14); /* 0x4707C1C1: mov esi, dword ptr [esp + 0x14] */ 3604 edx = esp + 0x10; /* 0x4707C1C5: lea edx, [esp + 0x10] */ 3605 PUSH32(esp, edx); /* 0x4707C1C9: push edx */ 3606 PUSH32(esp, edi); /* 0x4707C1CA: push edi */ 3607 PUSH32(esp, ebx); /* 0x4707C1CB: push ebx */ 3608 PUSH32(esp, esi); /* 0x4707C1CC: push esi */ 3609 PUSH32(esp, eax); /* 0x4707C1CD: push eax */ 3610 PUSH32(esp, ecx); /* 0x4707C1CE: push ecx */ 3611 RECOMP_ICALL(MEM32(0x470AC470)); /* 0x4707C1CF: call dword ptr [0x470ac470] */ 3612 RECOMP_FLAGS_IN(); 3613 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C1D5: cmp eax, -1 */ 3614 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3615 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3616 _flag_k = FK_CMP; 3617 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C225; /* 0x4707C1D8: jne 0x4707c225 */ 3618 L_4707C1DA: 3619 edi = MEM32(0x470AC3C8); /* 0x4707C1DA: mov edi, dword ptr [0x470ac3c8] */ 3620 RECOMP_ICALL(edi); /* 0x4707C1E0: call edi */ 3621 RECOMP_FLAGS_IN(); 3622 MEM32(esp + 0x18) = eax; /* 0x4707C1E2: mov dword ptr [esp + 0x18], eax */ 3623 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707C1E6: call dword ptr [0x470ac4a4] */ 3624 RECOMP_FLAGS_IN(); 3625 ecx = MEM32(esp + 0x18); /* 0x4707C1EC: mov ecx, dword ptr [esp + 0x18] */ 3626 MEM32(ecx) = eax; /* 0x4707C1F0: mov dword ptr [ecx], eax */ 3627 RECOMP_ICALL(edi); /* 0x4707C1F2: call edi */ 3628 RECOMP_FLAGS_IN(); 3629 /* cmp MEM32(eax), 0x2738u */ /* 0x4707C1F4: cmp dword ptr [eax], 0x2738 */ 3630 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x2738u); 3631 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3632 _flag_k = FK_CMP; 3633 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C222; /* 0x4707C1FA: jne 0x4707c222 */ 3634 L_4707C1FC: 3635 /* test LO8(ebx), 2 */ /* 0x4707C1FC: test bl, 2 */ 3636 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 3637 _cf = 0; 3638 _flag_k = FK_NARROW(FK_TEST, 24); 3639 if (TEST_Z(_flag_a, _flag_b)) goto L_4707C222; /* 0x4707C1FF: je 0x4707c222 */ 3640 L_4707C201: 3641 ecx = MEM32(esp + 0x12C); /* 0x4707C201: mov ecx, dword ptr [esp + 0x12c] */ 3642 edx = MEM32(esp + 0x10); /* 0x4707C208: mov edx, dword ptr [esp + 0x10] */ 3643 eax = esi; /* 0x4707C20C: mov eax, esi */ 3644 edi = POP32_VAL(esp); /* 0x4707C20E: pop edi */ 3645 MEM32(ecx) = eax; /* 0x4707C20F: mov dword ptr [ecx], eax */ 3646 esi = POP32_VAL(esp); /* 0x4707C211: pop esi */ 3647 MEM32(ebp + 0x8) = edx; /* 0x4707C212: mov dword ptr [ebp + 8], edx */ 3648 eax = MEM32(ecx); /* 0x4707C215: mov eax, dword ptr [ecx] */ 3649 ebp = POP32_VAL(esp); /* 0x4707C217: pop ebp */ 3650 ebx = POP32_VAL(esp); /* 0x4707C218: pop ebx */ 3651 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x118u); 3652 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3653 esp = esp + 0x118u; /* 0x4707C219: add esp, 0x118 */ 3654 _flag_k = FK_ADD; 3655 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707C21F: ret 0x10 */ 3656 L_4707C222: 3657 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 3658 eax = eax | 0xFFFFFFFFu; /* 0x4707C222: or eax, 0xffffffff */ 3659 _cf = 0; 3660 _flag_k = FK_TEST; 3661 L_4707C225: 3662 ecx = MEM32(esp + 0x12C); /* 0x4707C225: mov ecx, dword ptr [esp + 0x12c] */ 3663 edx = MEM32(esp + 0x10); /* 0x4707C22C: mov edx, dword ptr [esp + 0x10] */ 3664 edi = POP32_VAL(esp); /* 0x4707C230: pop edi */ 3665 MEM32(ecx) = eax; /* 0x4707C231: mov dword ptr [ecx], eax */ 3666 esi = POP32_VAL(esp); /* 0x4707C233: pop esi */ 3667 MEM32(ebp + 0x8) = edx; /* 0x4707C234: mov dword ptr [ebp + 8], edx */ 3668 eax = MEM32(ecx); /* 0x4707C237: mov eax, dword ptr [ecx] */ 3669 ebp = POP32_VAL(esp); /* 0x4707C239: pop ebp */ 3670 ebx = POP32_VAL(esp); /* 0x4707C23A: pop ebx */ 3671 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x118u); 3672 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3673 esp = esp + 0x118u; /* 0x4707C23B: add esp, 0x118 */ 3674 _flag_k = FK_ADD; 3675 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707C241: ret 0x10 */ 3676 L_4707C244: 3677 edi = POP32_VAL(esp); /* 0x4707C244: pop edi */ 3678 esi = POP32_VAL(esp); /* 0x4707C245: pop esi */ 3679 ebp = POP32_VAL(esp); /* 0x4707C246: pop ebp */ 3680 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3681 eax = 0; /* 0x4707C247: xor eax, eax */ 3682 _cf = 0; 3683 _flag_k = FK_TEST; 3684 ebx = POP32_VAL(esp); /* 0x4707C249: pop ebx */ 3685 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x118u); 3686 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3687 esp = esp + 0x118u; /* 0x4707C24A: add esp, 0x118 */ 3688 _flag_k = FK_ADD; 3689 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707C250: ret 0x10 */ 3690 L_4707C253: 3691 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707C253: call dword ptr [0x470ac3c8] */ 3692 RECOMP_FLAGS_IN(); 3693 edi = POP32_VAL(esp); /* 0x4707C259: pop edi */ 3694 esi = POP32_VAL(esp); /* 0x4707C25A: pop esi */ 3695 ebp = POP32_VAL(esp); /* 0x4707C25B: pop ebp */ 3696 MEM32(eax) = 0x79u; /* 0x4707C25C: mov dword ptr [eax], 0x79 */ 3697 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 3698 eax = eax | 0xFFFFFFFFu; /* 0x4707C262: or eax, 0xffffffff */ 3699 _cf = 0; 3700 _flag_k = FK_TEST; 3701 ebx = POP32_VAL(esp); /* 0x4707C265: pop ebx */ 3702 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x118u); 3703 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3704 esp = esp + 0x118u; /* 0x4707C266: add esp, 0x118 */ 3705 _flag_k = FK_ADD; 3706 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707C26C: ret 0x10 */ 3707 RECOMP_REGS_OUT(); 3708 } 3709 3710 void sub_4707C270(void) { 3711 int _fpu_cmp = 0; 3712 uint32_t _cf = 0; 3713 int _df = 1; 3714 uint32_t _flag_k = FK_NONE; 3715 uint32_t _flag_a = 0, _flag_b = 0; 3716 uint32_t _itail_tgt = 0; 3717 RECOMP_REGS_LOCALS 3718 RECOMP_ENTER(0x4707C270u); 3719 3720 L_4707C270: 3721 eax = MEM32(0x4710DF0C); /* 0x4707C270: mov eax, dword ptr [0x4710df0c] */ 3722 PUSH32(esp, ebx); /* 0x4707C275: push ebx */ 3723 ebx = ecx; /* 0x4707C276: mov ebx, ecx */ 3724 ecx = MEM32(esp + 0x8); /* 0x4707C278: mov ecx, dword ptr [esp + 8] */ 3725 edx = MEM32(ecx + 0x4); /* 0x4707C27C: mov edx, dword ptr [ecx + 4] */ 3726 PUSH32(esp, ebp); /* 0x4707C27F: push ebp */ 3727 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3728 ebp = 0; /* 0x4707C280: xor ebp, ebp */ 3729 _cf = 0; 3730 _flag_k = FK_TEST; 3731 /* cmp eax, edx */ /* 0x4707C282: cmp eax, edx */ 3732 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 3733 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3734 _flag_k = FK_CMP; 3735 PUSH32(esp, esi); /* 0x4707C284: push esi */ 3736 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C2AC; /* 0x4707C285: jne 0x4707c2ac */ 3737 L_4707C287: 3738 edx = MEM32(0x4710DF10); /* 0x4707C287: mov edx, dword ptr [0x4710df10] */ 3739 /* cmp edx, MEM32(ecx + 0x8) */ /* 0x4707C28D: cmp edx, dword ptr [ecx + 8] */ 3740 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(ecx + 0x8)); 3741 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3742 _flag_k = FK_CMP; 3743 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C2AC; /* 0x4707C290: jne 0x4707c2ac */ 3744 L_4707C292: 3745 /* cmp MEM32(esp + 0x14), 2 */ /* 0x4707C292: cmp dword ptr [esp + 0x14], 2 */ 3746 _flag_a = (uint32_t)(MEM32(esp + 0x14)); _flag_b = (uint32_t)(2); 3747 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3748 _flag_k = FK_CMP; 3749 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C2AC; /* 0x4707C297: jne 0x4707c2ac */ 3750 L_4707C299: 3751 eax = MEM32(ebx); /* 0x4707C299: mov eax, dword ptr [ebx] */ 3752 PUSH32(esp, ebp); /* 0x4707C29B: push ebp */ 3753 PUSH32(esp, eax); /* 0x4707C29C: push eax */ 3754 RECOMP_ICALL(0x4700E920u); /* 0x4707C29D: call 0x4700e920 */ /* not lifted */ 3755 RECOMP_FLAGS_IN(); 3756 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3757 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3758 esp = esp + 8; /* 0x4707C2A2: add esp, 8 */ 3759 _flag_k = FK_ADD; 3760 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C2A5: cmp eax, -1 */ 3761 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3762 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3763 _flag_k = FK_CMP; 3764 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C2E2; /* 0x4707C2A8: jne 0x4707c2e2 */ 3765 L_4707C2AA: 3766 goto L_4707C2D6; /* 0x4707C2AA: jmp 0x4707c2d6 */ 3767 L_4707C2AC: 3768 eax = MEM32(ecx); /* 0x4707C2AC: mov eax, dword ptr [ecx] */ 3769 esi = MEM32(ecx + 0x8); /* 0x4707C2AE: mov esi, dword ptr [ecx + 8] */ 3770 PUSH32(esp, edi); /* 0x4707C2B1: push edi */ 3771 edi = MEM32(ebx); /* 0x4707C2B2: mov edi, dword ptr [ebx] */ 3772 RECOMP_ICALL(MEM32(eax + 0x4)); /* 0x4707C2B4: call dword ptr [eax + 4] */ 3773 RECOMP_FLAGS_IN(); 3774 PUSH32(esp, esi); /* 0x4707C2B7: push esi */ 3775 PUSH32(esp, eax); /* 0x4707C2B8: push eax */ 3776 PUSH32(esp, edi); /* 0x4707C2B9: push edi */ 3777 RECOMP_ICALL(MEM32(0x470AC48C)); /* 0x4707C2BA: call dword ptr [0x470ac48c] */ 3778 RECOMP_FLAGS_IN(); 3779 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C2C0: cmp eax, -1 */ 3780 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3781 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3782 _flag_k = FK_CMP; 3783 edi = POP32_VAL(esp); /* 0x4707C2C3: pop edi */ 3784 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C2E2; /* 0x4707C2C4: jne 0x4707c2e2 */ 3785 L_4707C2C6: 3786 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707C2C6: call dword ptr [0x470ac4a4] */ 3787 RECOMP_FLAGS_IN(); 3788 esi = eax; /* 0x4707C2CC: mov esi, eax */ 3789 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707C2CE: call dword ptr [0x470ac3c8] */ 3790 RECOMP_FLAGS_IN(); 3791 MEM32(eax) = esi; /* 0x4707C2D4: mov dword ptr [eax], esi */ 3792 L_4707C2D6: 3793 ecx = ebx; /* 0x4707C2D6: mov ecx, ebx */ 3794 ebp = 1; /* 0x4707C2D8: mov ebp, 1 */ 3795 RECOMP_ICALL(0x4707A640u); /* 0x4707C2DD: call 0x4707a640 */ /* not lifted */ 3796 RECOMP_FLAGS_IN(); 3797 L_4707C2E2: 3798 eax = ebp; /* 0x4707C2E2: mov eax, ebp */ 3799 esi = POP32_VAL(esp); /* 0x4707C2E4: pop esi */ 3800 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(eax); 3801 _cf = (eax) != 0; 3802 eax = (uint32_t)(-(int32_t)eax); /* 0x4707C2E5: neg eax */ 3803 _flag_k = FK_CMP; 3804 ebp = POP32_VAL(esp); /* 0x4707C2E7: pop ebp */ 3805 { uint32_t _sa = eax, _sb = eax, _sc = _cf; /* 0x4707C2E8: sbb eax, eax */ 3806 eax = _sc ? 0xFFFFFFFFu : 0; 3807 _flag_a = recomp_flags_sbb(_sa, _sb, _sc); _flag_b = 0; 3808 _flag_k = FK_EFLAGS; _cf = _flag_a & 1u; } 3809 ebx = POP32_VAL(esp); /* 0x4707C2EA: pop ebx */ 3810 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x4707C2EB: ret 8 */ 3811 RECOMP_REGS_OUT(); 3812 } 3813 3814 void sub_4707C2F0(void) { 3815 int _fpu_cmp = 0; 3816 uint32_t _cf = 0; 3817 int _df = 1; 3818 uint32_t _flag_k = FK_NONE; 3819 uint32_t _flag_a = 0, _flag_b = 0; 3820 uint32_t _itail_tgt = 0; 3821 RECOMP_REGS_LOCALS 3822 RECOMP_ENTER(0x4707C2F0u); 3823 3824 L_4707C2F0: 3825 eax = MEM32(esp + 0x1C); /* 0x4707C2F0: mov eax, dword ptr [esp + 0x1c] */ 3826 edx = MEM32(esp + 0x14); /* 0x4707C2F4: mov edx, dword ptr [esp + 0x14] */ 3827 PUSH32(esp, esi); /* 0x4707C2F8: push esi */ 3828 PUSH32(esp, edi); /* 0x4707C2F9: push edi */ 3829 edi = MEM32(esp + 0x10); /* 0x4707C2FA: mov edi, dword ptr [esp + 0x10] */ 3830 PUSH32(esp, eax); /* 0x4707C2FE: push eax */ 3831 eax = MEM32(esp + 0x1C); /* 0x4707C2FF: mov eax, dword ptr [esp + 0x1c] */ 3832 esi = ecx; /* 0x4707C303: mov esi, ecx */ 3833 ecx = MEM32(esp + 0x24); /* 0x4707C305: mov ecx, dword ptr [esp + 0x24] */ 3834 PUSH32(esp, ecx); /* 0x4707C309: push ecx */ 3835 ecx = MEM32(esp + 0x1C); /* 0x4707C30A: mov ecx, dword ptr [esp + 0x1c] */ 3836 PUSH32(esp, edx); /* 0x4707C30E: push edx */ 3837 PUSH32(esp, eax); /* 0x4707C30F: push eax */ 3838 PUSH32(esp, ecx); /* 0x4707C310: push ecx */ 3839 PUSH32(esp, edi); /* 0x4707C311: push edi */ 3840 PUSH32(esp, 2); /* 0x4707C312: push 2 */ 3841 ecx = esi; /* 0x4707C314: mov ecx, esi */ 3842 RECOMP_ICALL(0x4707AAE0u); /* 0x4707C316: call 0x4707aae0 */ /* not lifted */ 3843 RECOMP_FLAGS_IN(); 3844 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C31B: cmp eax, -1 */ 3845 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3846 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3847 _flag_k = FK_CMP; 3848 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C327; /* 0x4707C31E: jne 0x4707c327 */ 3849 L_4707C320: 3850 edi = POP32_VAL(esp); /* 0x4707C320: pop edi */ 3851 _flag_a = (uint32_t)((eax | eax)); _flag_b = (uint32_t)((eax | eax)); 3852 eax = eax | eax; /* 0x4707C321: or eax, eax */ 3853 _cf = 0; 3854 _flag_k = FK_TEST; 3855 esi = POP32_VAL(esp); /* 0x4707C323: pop esi */ 3856 RECOMP_FLAGS_OUT(); esp += 32; { RECOMP_REGS_OUT(); return; } /* 0x4707C324: ret 0x1c */ 3857 L_4707C327: 3858 ecx = MEM32(esp + 0xC); /* 0x4707C327: mov ecx, dword ptr [esp + 0xc] */ 3859 edx = MEM32(0x4710DF0C); /* 0x4707C32B: mov edx, dword ptr [0x4710df0c] */ 3860 /* cmp edx, MEM32(ecx + 0x4) */ /* 0x4707C331: cmp edx, dword ptr [ecx + 4] */ 3861 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(ecx + 0x4)); 3862 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3863 _flag_k = FK_CMP; 3864 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C366; /* 0x4707C334: jne 0x4707c366 */ 3865 L_4707C336: 3866 eax = MEM32(0x4710DF10); /* 0x4707C336: mov eax, dword ptr [0x4710df10] */ 3867 /* cmp eax, MEM32(ecx + 0x8) */ /* 0x4707C33B: cmp eax, dword ptr [ecx + 8] */ 3868 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8)); 3869 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3870 _flag_k = FK_CMP; 3871 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C366; /* 0x4707C33E: jne 0x4707c366 */ 3872 L_4707C340: 3873 /* cmp edi, 2 */ /* 0x4707C340: cmp edi, 2 */ 3874 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(2); 3875 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3876 _flag_k = FK_CMP; 3877 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C366; /* 0x4707C343: jne 0x4707c366 */ 3878 L_4707C345: 3879 eax = MEM32(esi); /* 0x4707C345: mov eax, dword ptr [esi] */ 3880 PUSH32(esp, 0); /* 0x4707C347: push 0 */ 3881 PUSH32(esp, eax); /* 0x4707C349: push eax */ 3882 RECOMP_ICALL(0x4700E920u); /* 0x4707C34A: call 0x4700e920 */ /* not lifted */ 3883 RECOMP_FLAGS_IN(); 3884 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3885 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3886 esp = esp + 8; /* 0x4707C34F: add esp, 8 */ 3887 _flag_k = FK_ADD; 3888 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C352: cmp eax, -1 */ 3889 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3890 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3891 _flag_k = FK_CMP; 3892 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C39F; /* 0x4707C355: jne 0x4707c39f */ 3893 L_4707C357: 3894 ecx = esi; /* 0x4707C357: mov ecx, esi */ 3895 RECOMP_ICALL(0x4707A640u); /* 0x4707C359: call 0x4707a640 */ /* not lifted */ 3896 RECOMP_FLAGS_IN(); 3897 edi = POP32_VAL(esp); /* 0x4707C35E: pop edi */ 3898 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 3899 eax = eax | 0xFFFFFFFFu; /* 0x4707C35F: or eax, 0xffffffff */ 3900 _cf = 0; 3901 _flag_k = FK_TEST; 3902 esi = POP32_VAL(esp); /* 0x4707C362: pop esi */ 3903 RECOMP_FLAGS_OUT(); esp += 32; { RECOMP_REGS_OUT(); return; } /* 0x4707C363: ret 0x1c */ 3904 L_4707C366: 3905 edx = MEM32(ecx); /* 0x4707C366: mov edx, dword ptr [ecx] */ 3906 edi = MEM32(ecx + 0x8); /* 0x4707C368: mov edi, dword ptr [ecx + 8] */ 3907 PUSH32(esp, ebx); /* 0x4707C36B: push ebx */ 3908 ebx = MEM32(esi); /* 0x4707C36C: mov ebx, dword ptr [esi] */ 3909 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707C36E: call dword ptr [edx + 4] */ 3910 RECOMP_FLAGS_IN(); 3911 PUSH32(esp, edi); /* 0x4707C371: push edi */ 3912 PUSH32(esp, eax); /* 0x4707C372: push eax */ 3913 PUSH32(esp, ebx); /* 0x4707C373: push ebx */ 3914 RECOMP_ICALL(MEM32(0x470AC48C)); /* 0x4707C374: call dword ptr [0x470ac48c] */ 3915 RECOMP_FLAGS_IN(); 3916 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C37A: cmp eax, -1 */ 3917 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3918 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3919 _flag_k = FK_CMP; 3920 ebx = POP32_VAL(esp); /* 0x4707C37D: pop ebx */ 3921 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C39F; /* 0x4707C37E: jne 0x4707c39f */ 3922 L_4707C380: 3923 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707C380: call dword ptr [0x470ac4a4] */ 3924 RECOMP_FLAGS_IN(); 3925 edi = eax; /* 0x4707C386: mov edi, eax */ 3926 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707C388: call dword ptr [0x470ac3c8] */ 3927 RECOMP_FLAGS_IN(); 3928 ecx = esi; /* 0x4707C38E: mov ecx, esi */ 3929 MEM32(eax) = edi; /* 0x4707C390: mov dword ptr [eax], edi */ 3930 RECOMP_ICALL(0x4707A640u); /* 0x4707C392: call 0x4707a640 */ /* not lifted */ 3931 RECOMP_FLAGS_IN(); 3932 edi = POP32_VAL(esp); /* 0x4707C397: pop edi */ 3933 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 3934 eax = eax | 0xFFFFFFFFu; /* 0x4707C398: or eax, 0xffffffff */ 3935 _cf = 0; 3936 _flag_k = FK_TEST; 3937 esi = POP32_VAL(esp); /* 0x4707C39B: pop esi */ 3938 RECOMP_FLAGS_OUT(); esp += 32; { RECOMP_REGS_OUT(); return; } /* 0x4707C39C: ret 0x1c */ 3939 L_4707C39F: 3940 edi = POP32_VAL(esp); /* 0x4707C39F: pop edi */ 3941 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3942 eax = 0; /* 0x4707C3A0: xor eax, eax */ 3943 _cf = 0; 3944 _flag_k = FK_TEST; 3945 esi = POP32_VAL(esp); /* 0x4707C3A2: pop esi */ 3946 RECOMP_FLAGS_OUT(); esp += 32; { RECOMP_REGS_OUT(); return; } /* 0x4707C3A3: ret 0x1c */ 3947 RECOMP_REGS_OUT(); 3948 } 3949 3950 void sub_4707C3B0(void) { 3951 int _fpu_cmp = 0; 3952 uint32_t _cf = 0; 3953 int _df = 1; 3954 uint32_t _flag_k = FK_NONE; 3955 uint32_t _flag_a = 0, _flag_b = 0; 3956 uint32_t _itail_tgt = 0; 3957 RECOMP_REGS_LOCALS 3958 RECOMP_ENTER(0x4707C3B0u); 3959 3960 L_4707C3B0: 3961 eax = MEM32(esp + 0x10); /* 0x4707C3B0: mov eax, dword ptr [esp + 0x10] */ 3962 PUSH32(esp, esi); /* 0x4707C3B4: push esi */ 3963 PUSH32(esp, edi); /* 0x4707C3B5: push edi */ 3964 edi = MEM32(esp + 0x10); /* 0x4707C3B6: mov edi, dword ptr [esp + 0x10] */ 3965 esi = ecx; /* 0x4707C3BA: mov esi, ecx */ 3966 ecx = MEM32(esp + 0x14); /* 0x4707C3BC: mov ecx, dword ptr [esp + 0x14] */ 3967 PUSH32(esp, eax); /* 0x4707C3C0: push eax */ 3968 PUSH32(esp, ecx); /* 0x4707C3C1: push ecx */ 3969 PUSH32(esp, edi); /* 0x4707C3C2: push edi */ 3970 PUSH32(esp, 2); /* 0x4707C3C3: push 2 */ 3971 ecx = esi; /* 0x4707C3C5: mov ecx, esi */ 3972 RECOMP_ICALL(0x4707A680u); /* 0x4707C3C7: call 0x4707a680 */ /* not lifted */ 3973 RECOMP_FLAGS_IN(); 3974 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C3CC: cmp eax, -1 */ 3975 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3976 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3977 _flag_k = FK_CMP; 3978 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C3D8; /* 0x4707C3CF: jne 0x4707c3d8 */ 3979 L_4707C3D1: 3980 edi = POP32_VAL(esp); /* 0x4707C3D1: pop edi */ 3981 _flag_a = (uint32_t)((eax | eax)); _flag_b = (uint32_t)((eax | eax)); 3982 eax = eax | eax; /* 0x4707C3D2: or eax, eax */ 3983 _cf = 0; 3984 _flag_k = FK_TEST; 3985 esi = POP32_VAL(esp); /* 0x4707C3D4: pop esi */ 3986 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707C3D5: ret 0x10 */ 3987 L_4707C3D8: 3988 ecx = MEM32(esp + 0xC); /* 0x4707C3D8: mov ecx, dword ptr [esp + 0xc] */ 3989 edx = MEM32(0x4710DF0C); /* 0x4707C3DC: mov edx, dword ptr [0x4710df0c] */ 3990 eax = MEM32(ecx + 0x4); /* 0x4707C3E2: mov eax, dword ptr [ecx + 4] */ 3991 PUSH32(esp, ebp); /* 0x4707C3E5: push ebp */ 3992 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3993 ebp = 0; /* 0x4707C3E6: xor ebp, ebp */ 3994 _cf = 0; 3995 _flag_k = FK_TEST; 3996 /* cmp edx, eax */ /* 0x4707C3E8: cmp edx, eax */ 3997 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 3998 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3999 _flag_k = FK_CMP; 4000 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C40E; /* 0x4707C3EA: jne 0x4707c40e */ 4001 L_4707C3EC: 4002 eax = MEM32(0x4710DF10); /* 0x4707C3EC: mov eax, dword ptr [0x4710df10] */ 4003 /* cmp eax, MEM32(ecx + 0x8) */ /* 0x4707C3F1: cmp eax, dword ptr [ecx + 8] */ 4004 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8)); 4005 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4006 _flag_k = FK_CMP; 4007 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C40E; /* 0x4707C3F4: jne 0x4707c40e */ 4008 L_4707C3F6: 4009 /* cmp edi, 2 */ /* 0x4707C3F6: cmp edi, 2 */ 4010 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(2); 4011 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4012 _flag_k = FK_CMP; 4013 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C40E; /* 0x4707C3F9: jne 0x4707c40e */ 4014 L_4707C3FB: 4015 eax = MEM32(esi); /* 0x4707C3FB: mov eax, dword ptr [esi] */ 4016 PUSH32(esp, ebp); /* 0x4707C3FD: push ebp */ 4017 PUSH32(esp, eax); /* 0x4707C3FE: push eax */ 4018 RECOMP_ICALL(0x4700E920u); /* 0x4707C3FF: call 0x4700e920 */ /* not lifted */ 4019 RECOMP_FLAGS_IN(); 4020 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4021 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4022 esp = esp + 8; /* 0x4707C404: add esp, 8 */ 4023 _flag_k = FK_ADD; 4024 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C407: cmp eax, -1 */ 4025 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 4026 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4027 _flag_k = FK_CMP; 4028 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C444; /* 0x4707C40A: jne 0x4707c444 */ 4029 L_4707C40C: 4030 goto L_4707C438; /* 0x4707C40C: jmp 0x4707c438 */ 4031 L_4707C40E: 4032 edx = MEM32(ecx); /* 0x4707C40E: mov edx, dword ptr [ecx] */ 4033 edi = MEM32(ecx + 0x8); /* 0x4707C410: mov edi, dword ptr [ecx + 8] */ 4034 PUSH32(esp, ebx); /* 0x4707C413: push ebx */ 4035 ebx = MEM32(esi); /* 0x4707C414: mov ebx, dword ptr [esi] */ 4036 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707C416: call dword ptr [edx + 4] */ 4037 RECOMP_FLAGS_IN(); 4038 PUSH32(esp, edi); /* 0x4707C419: push edi */ 4039 PUSH32(esp, eax); /* 0x4707C41A: push eax */ 4040 PUSH32(esp, ebx); /* 0x4707C41B: push ebx */ 4041 RECOMP_ICALL(MEM32(0x470AC48C)); /* 0x4707C41C: call dword ptr [0x470ac48c] */ 4042 RECOMP_FLAGS_IN(); 4043 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C422: cmp eax, -1 */ 4044 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 4045 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4046 _flag_k = FK_CMP; 4047 ebx = POP32_VAL(esp); /* 0x4707C425: pop ebx */ 4048 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C444; /* 0x4707C426: jne 0x4707c444 */ 4049 L_4707C428: 4050 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707C428: call dword ptr [0x470ac4a4] */ 4051 RECOMP_FLAGS_IN(); 4052 edi = eax; /* 0x4707C42E: mov edi, eax */ 4053 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707C430: call dword ptr [0x470ac3c8] */ 4054 RECOMP_FLAGS_IN(); 4055 MEM32(eax) = edi; /* 0x4707C436: mov dword ptr [eax], edi */ 4056 L_4707C438: 4057 ecx = esi; /* 0x4707C438: mov ecx, esi */ 4058 ebp = 1; /* 0x4707C43A: mov ebp, 1 */ 4059 RECOMP_ICALL(0x4707A640u); /* 0x4707C43F: call 0x4707a640 */ /* not lifted */ 4060 RECOMP_FLAGS_IN(); 4061 L_4707C444: 4062 eax = ebp; /* 0x4707C444: mov eax, ebp */ 4063 ebp = POP32_VAL(esp); /* 0x4707C446: pop ebp */ 4064 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(eax); 4065 _cf = (eax) != 0; 4066 eax = (uint32_t)(-(int32_t)eax); /* 0x4707C447: neg eax */ 4067 _flag_k = FK_CMP; 4068 edi = POP32_VAL(esp); /* 0x4707C449: pop edi */ 4069 { uint32_t _sa = eax, _sb = eax, _sc = _cf; /* 0x4707C44A: sbb eax, eax */ 4070 eax = _sc ? 0xFFFFFFFFu : 0; 4071 _flag_a = recomp_flags_sbb(_sa, _sb, _sc); _flag_b = 0; 4072 _flag_k = FK_EFLAGS; _cf = _flag_a & 1u; } 4073 esi = POP32_VAL(esp); /* 0x4707C44C: pop esi */ 4074 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707C44D: ret 0x10 */ 4075 RECOMP_REGS_OUT(); 4076 } 4077 4078 void sub_4707C450(void) { 4079 int _fpu_cmp = 0; 4080 uint32_t _cf = 0; 4081 int _df = 1; 4082 uint32_t _flag_k = FK_NONE; 4083 uint32_t _flag_a = 0, _flag_b = 0; 4084 uint32_t _itail_tgt = 0; 4085 RECOMP_REGS_LOCALS 4086 RECOMP_ENTER(0x4707C450u); 4087 4088 L_4707C450: 4089 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707C450: push -1 */ 4090 PUSH32(esp, 0x470A9A88u); /* 0x4707C452: push 0x470a9a88 */ 4091 eax = MEM32(FS_BASE + (0)); /* 0x4707C457: mov eax, dword ptr fs:[0] */ 4092 PUSH32(esp, eax); /* 0x4707C45D: push eax */ 4093 MEM32(FS_BASE + (0)) = esp; /* 0x4707C45E: mov dword ptr fs:[0], esp */ 4094 PUSH32(esp, ecx); /* 0x4707C465: push ecx */ 4095 PUSH32(esp, ebx); /* 0x4707C466: push ebx */ 4096 PUSH32(esp, esi); /* 0x4707C467: push esi */ 4097 esi = ecx; /* 0x4707C468: mov esi, ecx */ 4098 PUSH32(esp, edi); /* 0x4707C46A: push edi */ 4099 MEM32(esp + 0xC) = esi; /* 0x4707C46B: mov dword ptr [esp + 0xc], esi */ 4100 RECOMP_ICALL(0x4707A510u); /* 0x4707C46F: call 0x4707a510 */ /* not lifted */ 4101 RECOMP_FLAGS_IN(); 4102 eax = MEM32(esp + 0x2C); /* 0x4707C474: mov eax, dword ptr [esp + 0x2c] */ 4103 ecx = MEM32(esp + 0x28); /* 0x4707C478: mov ecx, dword ptr [esp + 0x28] */ 4104 ebx = MEM32(esp + 0x24); /* 0x4707C47C: mov ebx, dword ptr [esp + 0x24] */ 4105 PUSH32(esp, eax); /* 0x4707C480: push eax */ 4106 PUSH32(esp, ecx); /* 0x4707C481: push ecx */ 4107 PUSH32(esp, ebx); /* 0x4707C482: push ebx */ 4108 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4109 edi = 0; /* 0x4707C483: xor edi, edi */ 4110 _cf = 0; 4111 _flag_k = FK_TEST; 4112 PUSH32(esp, 2); /* 0x4707C485: push 2 */ 4113 ecx = esi; /* 0x4707C487: mov ecx, esi */ 4114 MEM32(esp + 0x28) = edi; /* 0x4707C489: mov dword ptr [esp + 0x28], edi */ 4115 RECOMP_ICALL(0x4707A680u); /* 0x4707C48D: call 0x4707a680 */ /* not lifted */ 4116 RECOMP_FLAGS_IN(); 4117 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C492: cmp eax, -1 */ 4118 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 4119 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4120 _flag_k = FK_CMP; 4121 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707C507; /* 0x4707C495: je 0x4707c507 */ 4122 L_4707C497: 4123 ecx = MEM32(esp + 0x20); /* 0x4707C497: mov ecx, dword ptr [esp + 0x20] */ 4124 edx = MEM32(0x4710DF0C); /* 0x4707C49B: mov edx, dword ptr [0x4710df0c] */ 4125 /* cmp edx, MEM32(ecx + 0x4) */ /* 0x4707C4A1: cmp edx, dword ptr [ecx + 4] */ 4126 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(ecx + 0x4)); 4127 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4128 _flag_k = FK_CMP; 4129 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C4C8; /* 0x4707C4A4: jne 0x4707c4c8 */ 4130 L_4707C4A6: 4131 eax = MEM32(0x4710DF10); /* 0x4707C4A6: mov eax, dword ptr [0x4710df10] */ 4132 /* cmp eax, MEM32(ecx + 0x8) */ /* 0x4707C4AB: cmp eax, dword ptr [ecx + 8] */ 4133 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8)); 4134 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4135 _flag_k = FK_CMP; 4136 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C4C8; /* 0x4707C4AE: jne 0x4707c4c8 */ 4137 L_4707C4B0: 4138 /* cmp ebx, 2 */ /* 0x4707C4B0: cmp ebx, 2 */ 4139 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(2); 4140 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4141 _flag_k = FK_CMP; 4142 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C4C8; /* 0x4707C4B3: jne 0x4707c4c8 */ 4143 L_4707C4B5: 4144 eax = MEM32(esi); /* 0x4707C4B5: mov eax, dword ptr [esi] */ 4145 PUSH32(esp, edi); /* 0x4707C4B7: push edi */ 4146 PUSH32(esp, eax); /* 0x4707C4B8: push eax */ 4147 RECOMP_ICALL(0x4700E920u); /* 0x4707C4B9: call 0x4700e920 */ /* not lifted */ 4148 RECOMP_FLAGS_IN(); 4149 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4150 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4151 esp = esp + 8; /* 0x4707C4BE: add esp, 8 */ 4152 _flag_k = FK_ADD; 4153 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C4C1: cmp eax, -1 */ 4154 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 4155 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4156 _flag_k = FK_CMP; 4157 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C4FE; /* 0x4707C4C4: jne 0x4707c4fe */ 4158 L_4707C4C6: 4159 goto L_4707C4F2; /* 0x4707C4C6: jmp 0x4707c4f2 */ 4160 L_4707C4C8: 4161 edx = MEM32(ecx); /* 0x4707C4C8: mov edx, dword ptr [ecx] */ 4162 ebx = MEM32(ecx + 0x8); /* 0x4707C4CA: mov ebx, dword ptr [ecx + 8] */ 4163 PUSH32(esp, ebp); /* 0x4707C4CD: push ebp */ 4164 ebp = MEM32(esi); /* 0x4707C4CE: mov ebp, dword ptr [esi] */ 4165 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707C4D0: call dword ptr [edx + 4] */ 4166 RECOMP_FLAGS_IN(); 4167 PUSH32(esp, ebx); /* 0x4707C4D3: push ebx */ 4168 PUSH32(esp, eax); /* 0x4707C4D4: push eax */ 4169 PUSH32(esp, ebp); /* 0x4707C4D5: push ebp */ 4170 RECOMP_ICALL(MEM32(0x470AC48C)); /* 0x4707C4D6: call dword ptr [0x470ac48c] */ 4171 RECOMP_FLAGS_IN(); 4172 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C4DC: cmp eax, -1 */ 4173 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 4174 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4175 _flag_k = FK_CMP; 4176 ebp = POP32_VAL(esp); /* 0x4707C4DF: pop ebp */ 4177 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C4FE; /* 0x4707C4E0: jne 0x4707c4fe */ 4178 L_4707C4E2: 4179 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707C4E2: call dword ptr [0x470ac4a4] */ 4180 RECOMP_FLAGS_IN(); 4181 edi = eax; /* 0x4707C4E8: mov edi, eax */ 4182 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707C4EA: call dword ptr [0x470ac3c8] */ 4183 RECOMP_FLAGS_IN(); 4184 MEM32(eax) = edi; /* 0x4707C4F0: mov dword ptr [eax], edi */ 4185 L_4707C4F2: 4186 ecx = esi; /* 0x4707C4F2: mov ecx, esi */ 4187 edi = 1; /* 0x4707C4F4: mov edi, 1 */ 4188 RECOMP_ICALL(0x4707A640u); /* 0x4707C4F9: call 0x4707a640 */ /* not lifted */ 4189 RECOMP_FLAGS_IN(); 4190 L_4707C4FE: 4191 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(edi); 4192 _cf = (edi) != 0; 4193 edi = (uint32_t)(-(int32_t)edi); /* 0x4707C4FE: neg edi */ 4194 _flag_k = FK_CMP; 4195 { uint32_t _sa = edi, _sb = edi, _sc = _cf; /* 0x4707C500: sbb edi, edi */ 4196 edi = _sc ? 0xFFFFFFFFu : 0; 4197 _flag_a = recomp_flags_sbb(_sa, _sb, _sc); _flag_b = 0; 4198 _flag_k = FK_EFLAGS; _cf = _flag_a & 1u; } 4199 /* cmp edi, 0xFFFFFFFFu */ /* 0x4707C502: cmp edi, -1 */ 4200 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFFu); 4201 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4202 _flag_k = FK_CMP; 4203 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C568; /* 0x4707C505: jne 0x4707c568 */ 4204 L_4707C507: 4205 RECOMP_ICALL(MEM32(0x470AC150)); /* 0x4707C507: call dword ptr [0x470ac150] */ 4206 RECOMP_FLAGS_IN(); 4207 ebx = eax; /* 0x4707C50D: mov ebx, eax */ 4208 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707C50F: call dword ptr [0x470ac3c8] */ 4209 RECOMP_FLAGS_IN(); 4210 eax = MEM32(eax); /* 0x4707C515: mov eax, dword ptr [eax] */ 4211 /* test eax, eax */ /* 0x4707C517: test eax, eax */ 4212 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4213 _cf = 0; 4214 _flag_k = FK_TEST; 4215 if (TEST_Z(_flag_a, _flag_b)) goto L_4707C51D; /* 0x4707C519: je 0x4707c51d */ 4216 L_4707C51B: 4217 ebx = eax; /* 0x4707C51B: mov ebx, eax */ 4218 L_4707C51D: 4219 RECOMP_ICALL(0x47039020u); /* 0x4707C51D: call 0x47039020 */ /* not lifted */ 4220 RECOMP_FLAGS_IN(); 4221 edi = eax; /* 0x4707C522: mov edi, eax */ 4222 ecx = edi; /* 0x4707C524: mov ecx, edi */ 4223 RECOMP_ICALL(0x4703B210u); /* 0x4707C526: call 0x4703b210 */ /* not lifted */ 4224 RECOMP_FLAGS_IN(); 4225 PUSH32(esp, eax); /* 0x4707C52B: push eax */ 4226 ecx = edi; /* 0x4707C52C: mov ecx, edi */ 4227 RECOMP_ICALL(0x4703B240u); /* 0x4707C52E: call 0x4703b240 */ /* not lifted */ 4228 RECOMP_FLAGS_IN(); 4229 PUSH32(esp, eax); /* 0x4707C533: push eax */ 4230 ecx = edi; /* 0x4707C534: mov ecx, edi */ 4231 RECOMP_ICALL(0x4703B080u); /* 0x4707C536: call 0x4703b080 */ /* not lifted */ 4232 RECOMP_FLAGS_IN(); 4233 PUSH32(esp, eax); /* 0x4707C53B: push eax */ 4234 PUSH32(esp, ebx); /* 0x4707C53C: push ebx */ 4235 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707C53D: push -1 */ 4236 PUSH32(esp, 0xB4u); /* 0x4707C53F: push 0xb4 */ 4237 PUSH32(esp, 0x4710B138u); /* 0x4707C544: push 0x4710b138 */ 4238 ecx = edi; /* 0x4707C549: mov ecx, edi */ 4239 RECOMP_ICALL(0x4703A340u); /* 0x4707C54B: call 0x4703a340 */ /* not lifted */ 4240 RECOMP_FLAGS_IN(); 4241 PUSH32(esp, 0x4710B128u); /* 0x4707C550: push 0x4710b128 */ 4242 PUSH32(esp, 0x471055F0u); /* 0x4707C555: push 0x471055f0 */ 4243 PUSH32(esp, 0x80u); /* 0x4707C55A: push 0x80 */ 4244 PUSH32(esp, edi); /* 0x4707C55F: push edi */ 4245 RECOMP_ICALL(0x47039830u); /* 0x4707C560: call 0x47039830 */ /* not lifted */ 4246 RECOMP_FLAGS_IN(); 4247 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 4248 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4249 esp = esp + 0x10u; /* 0x4707C565: add esp, 0x10 */ 4250 _flag_k = FK_ADD; 4251 L_4707C568: 4252 ecx = MEM32(esp + 0x10); /* 0x4707C568: mov ecx, dword ptr [esp + 0x10] */ 4253 edi = POP32_VAL(esp); /* 0x4707C56C: pop edi */ 4254 eax = esi; /* 0x4707C56D: mov eax, esi */ 4255 esi = POP32_VAL(esp); /* 0x4707C56F: pop esi */ 4256 ebx = POP32_VAL(esp); /* 0x4707C570: pop ebx */ 4257 MEM32(FS_BASE + (0)) = ecx; /* 0x4707C571: mov dword ptr fs:[0], ecx */ 4258 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 4259 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4260 esp = esp + 0x10u; /* 0x4707C578: add esp, 0x10 */ 4261 _flag_k = FK_ADD; 4262 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707C57B: ret 0x10 */ 4263 RECOMP_REGS_OUT(); 4264 } 4265 4266 void sub_4707C580(void) { 4267 int _fpu_cmp = 0; 4268 uint32_t _cf = 0; 4269 int _df = 1; 4270 uint32_t _flag_k = FK_NONE; 4271 uint32_t _flag_a = 0, _flag_b = 0; 4272 uint32_t _itail_tgt = 0; 4273 RECOMP_REGS_LOCALS 4274 RECOMP_ENTER(0x4707C580u); 4275 4276 L_4707C580: 4277 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707C580: push -1 */ 4278 PUSH32(esp, 0x470A9AA8u); /* 0x4707C582: push 0x470a9aa8 */ 4279 eax = MEM32(FS_BASE + (0)); /* 0x4707C587: mov eax, dword ptr fs:[0] */ 4280 PUSH32(esp, eax); /* 0x4707C58D: push eax */ 4281 MEM32(FS_BASE + (0)) = esp; /* 0x4707C58E: mov dword ptr fs:[0], esp */ 4282 PUSH32(esp, ecx); /* 0x4707C595: push ecx */ 4283 PUSH32(esp, ebx); /* 0x4707C596: push ebx */ 4284 PUSH32(esp, ebp); /* 0x4707C597: push ebp */ 4285 PUSH32(esp, esi); /* 0x4707C598: push esi */ 4286 esi = ecx; /* 0x4707C599: mov esi, ecx */ 4287 PUSH32(esp, edi); /* 0x4707C59B: push edi */ 4288 MEM32(esp + 0x10) = esi; /* 0x4707C59C: mov dword ptr [esp + 0x10], esi */ 4289 RECOMP_ICALL(0x4707A510u); /* 0x4707C5A0: call 0x4707a510 */ /* not lifted */ 4290 RECOMP_FLAGS_IN(); 4291 eax = MEM32(esp + 0x3C); /* 0x4707C5A5: mov eax, dword ptr [esp + 0x3c] */ 4292 ecx = MEM32(esp + 0x38); /* 0x4707C5A9: mov ecx, dword ptr [esp + 0x38] */ 4293 edx = MEM32(esp + 0x34); /* 0x4707C5AD: mov edx, dword ptr [esp + 0x34] */ 4294 edi = MEM32(esp + 0x28); /* 0x4707C5B1: mov edi, dword ptr [esp + 0x28] */ 4295 PUSH32(esp, eax); /* 0x4707C5B5: push eax */ 4296 eax = MEM32(esp + 0x34); /* 0x4707C5B6: mov eax, dword ptr [esp + 0x34] */ 4297 PUSH32(esp, ecx); /* 0x4707C5BA: push ecx */ 4298 ecx = MEM32(esp + 0x34); /* 0x4707C5BB: mov ecx, dword ptr [esp + 0x34] */ 4299 PUSH32(esp, edx); /* 0x4707C5BF: push edx */ 4300 PUSH32(esp, eax); /* 0x4707C5C0: push eax */ 4301 PUSH32(esp, ecx); /* 0x4707C5C1: push ecx */ 4302 PUSH32(esp, edi); /* 0x4707C5C2: push edi */ 4303 PUSH32(esp, 2); /* 0x4707C5C3: push 2 */ 4304 ecx = esi; /* 0x4707C5C5: mov ecx, esi */ 4305 MEM32(esp + 0x38) = 0; /* 0x4707C5C7: mov dword ptr [esp + 0x38], 0 */ 4306 RECOMP_ICALL(0x4707AAE0u); /* 0x4707C5CF: call 0x4707aae0 */ /* not lifted */ 4307 RECOMP_FLAGS_IN(); 4308 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C5D4: cmp eax, -1 */ 4309 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 4310 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4311 _flag_k = FK_CMP; 4312 ebp = MEM32(0x470AC3C8); /* 0x4707C5D7: mov ebp, dword ptr [0x470ac3c8] */ 4313 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707C640; /* 0x4707C5DD: je 0x4707c640 */ 4314 L_4707C5DF: 4315 ecx = MEM32(esp + 0x24); /* 0x4707C5DF: mov ecx, dword ptr [esp + 0x24] */ 4316 edx = MEM32(0x4710DF0C); /* 0x4707C5E3: mov edx, dword ptr [0x4710df0c] */ 4317 /* cmp edx, MEM32(ecx + 0x4) */ /* 0x4707C5E9: cmp edx, dword ptr [ecx + 4] */ 4318 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(ecx + 0x4)); 4319 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4320 _flag_k = FK_CMP; 4321 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C615; /* 0x4707C5EC: jne 0x4707c615 */ 4322 L_4707C5EE: 4323 eax = MEM32(0x4710DF10); /* 0x4707C5EE: mov eax, dword ptr [0x4710df10] */ 4324 /* cmp eax, MEM32(ecx + 0x8) */ /* 0x4707C5F3: cmp eax, dword ptr [ecx + 8] */ 4325 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8)); 4326 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4327 _flag_k = FK_CMP; 4328 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C615; /* 0x4707C5F6: jne 0x4707c615 */ 4329 L_4707C5F8: 4330 /* cmp edi, 2 */ /* 0x4707C5F8: cmp edi, 2 */ 4331 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(2); 4332 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4333 _flag_k = FK_CMP; 4334 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C615; /* 0x4707C5FB: jne 0x4707c615 */ 4335 L_4707C5FD: 4336 eax = MEM32(esi); /* 0x4707C5FD: mov eax, dword ptr [esi] */ 4337 PUSH32(esp, 0); /* 0x4707C5FF: push 0 */ 4338 PUSH32(esp, eax); /* 0x4707C601: push eax */ 4339 RECOMP_ICALL(0x4700E920u); /* 0x4707C602: call 0x4700e920 */ /* not lifted */ 4340 RECOMP_FLAGS_IN(); 4341 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4342 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4343 esp = esp + 8; /* 0x4707C607: add esp, 8 */ 4344 _flag_k = FK_ADD; 4345 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C60A: cmp eax, -1 */ 4346 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 4347 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4348 _flag_k = FK_CMP; 4349 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C69D; /* 0x4707C60D: jne 0x4707c69d */ 4350 L_4707C613: 4351 goto L_4707C639; /* 0x4707C613: jmp 0x4707c639 */ 4352 L_4707C615: 4353 edx = MEM32(ecx); /* 0x4707C615: mov edx, dword ptr [ecx] */ 4354 edi = MEM32(ecx + 0x8); /* 0x4707C617: mov edi, dword ptr [ecx + 8] */ 4355 ebx = MEM32(esi); /* 0x4707C61A: mov ebx, dword ptr [esi] */ 4356 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707C61C: call dword ptr [edx + 4] */ 4357 RECOMP_FLAGS_IN(); 4358 PUSH32(esp, edi); /* 0x4707C61F: push edi */ 4359 PUSH32(esp, eax); /* 0x4707C620: push eax */ 4360 PUSH32(esp, ebx); /* 0x4707C621: push ebx */ 4361 RECOMP_ICALL(MEM32(0x470AC48C)); /* 0x4707C622: call dword ptr [0x470ac48c] */ 4362 RECOMP_FLAGS_IN(); 4363 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C628: cmp eax, -1 */ 4364 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 4365 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4366 _flag_k = FK_CMP; 4367 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C69D; /* 0x4707C62B: jne 0x4707c69d */ 4368 L_4707C62D: 4369 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707C62D: call dword ptr [0x470ac4a4] */ 4370 RECOMP_FLAGS_IN(); 4371 edi = eax; /* 0x4707C633: mov edi, eax */ 4372 RECOMP_ICALL(ebp); /* 0x4707C635: call ebp */ 4373 RECOMP_FLAGS_IN(); 4374 MEM32(eax) = edi; /* 0x4707C637: mov dword ptr [eax], edi */ 4375 L_4707C639: 4376 ecx = esi; /* 0x4707C639: mov ecx, esi */ 4377 RECOMP_ICALL(0x4707A640u); /* 0x4707C63B: call 0x4707a640 */ /* not lifted */ 4378 RECOMP_FLAGS_IN(); 4379 L_4707C640: 4380 RECOMP_ICALL(MEM32(0x470AC150)); /* 0x4707C640: call dword ptr [0x470ac150] */ 4381 RECOMP_FLAGS_IN(); 4382 ebx = eax; /* 0x4707C646: mov ebx, eax */ 4383 RECOMP_ICALL(ebp); /* 0x4707C648: call ebp */ 4384 RECOMP_FLAGS_IN(); 4385 eax = MEM32(eax); /* 0x4707C64A: mov eax, dword ptr [eax] */ 4386 /* test eax, eax */ /* 0x4707C64C: test eax, eax */ 4387 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4388 _cf = 0; 4389 _flag_k = FK_TEST; 4390 if (TEST_Z(_flag_a, _flag_b)) goto L_4707C652; /* 0x4707C64E: je 0x4707c652 */ 4391 L_4707C650: 4392 ebx = eax; /* 0x4707C650: mov ebx, eax */ 4393 L_4707C652: 4394 RECOMP_ICALL(0x47039020u); /* 0x4707C652: call 0x47039020 */ /* not lifted */ 4395 RECOMP_FLAGS_IN(); 4396 edi = eax; /* 0x4707C657: mov edi, eax */ 4397 ecx = edi; /* 0x4707C659: mov ecx, edi */ 4398 RECOMP_ICALL(0x4703B210u); /* 0x4707C65B: call 0x4703b210 */ /* not lifted */ 4399 RECOMP_FLAGS_IN(); 4400 PUSH32(esp, eax); /* 0x4707C660: push eax */ 4401 ecx = edi; /* 0x4707C661: mov ecx, edi */ 4402 RECOMP_ICALL(0x4703B240u); /* 0x4707C663: call 0x4703b240 */ /* not lifted */ 4403 RECOMP_FLAGS_IN(); 4404 PUSH32(esp, eax); /* 0x4707C668: push eax */ 4405 ecx = edi; /* 0x4707C669: mov ecx, edi */ 4406 RECOMP_ICALL(0x4703B080u); /* 0x4707C66B: call 0x4703b080 */ /* not lifted */ 4407 RECOMP_FLAGS_IN(); 4408 PUSH32(esp, eax); /* 0x4707C670: push eax */ 4409 PUSH32(esp, ebx); /* 0x4707C671: push ebx */ 4410 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707C672: push -1 */ 4411 PUSH32(esp, 0xC9u); /* 0x4707C674: push 0xc9 */ 4412 PUSH32(esp, 0x4710B138u); /* 0x4707C679: push 0x4710b138 */ 4413 ecx = edi; /* 0x4707C67E: mov ecx, edi */ 4414 RECOMP_ICALL(0x4703A340u); /* 0x4707C680: call 0x4703a340 */ /* not lifted */ 4415 RECOMP_FLAGS_IN(); 4416 PUSH32(esp, 0x4710B128u); /* 0x4707C685: push 0x4710b128 */ 4417 PUSH32(esp, 0x471055F0u); /* 0x4707C68A: push 0x471055f0 */ 4418 PUSH32(esp, 0x80u); /* 0x4707C68F: push 0x80 */ 4419 PUSH32(esp, edi); /* 0x4707C694: push edi */ 4420 RECOMP_ICALL(0x47039830u); /* 0x4707C695: call 0x47039830 */ /* not lifted */ 4421 RECOMP_FLAGS_IN(); 4422 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 4423 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4424 esp = esp + 0x10u; /* 0x4707C69A: add esp, 0x10 */ 4425 _flag_k = FK_ADD; 4426 L_4707C69D: 4427 ecx = MEM32(esp + 0x14); /* 0x4707C69D: mov ecx, dword ptr [esp + 0x14] */ 4428 edi = POP32_VAL(esp); /* 0x4707C6A1: pop edi */ 4429 eax = esi; /* 0x4707C6A2: mov eax, esi */ 4430 esi = POP32_VAL(esp); /* 0x4707C6A4: pop esi */ 4431 ebp = POP32_VAL(esp); /* 0x4707C6A5: pop ebp */ 4432 ebx = POP32_VAL(esp); /* 0x4707C6A6: pop ebx */ 4433 MEM32(FS_BASE + (0)) = ecx; /* 0x4707C6A7: mov dword ptr fs:[0], ecx */ 4434 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 4435 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4436 esp = esp + 0x10u; /* 0x4707C6AE: add esp, 0x10 */ 4437 _flag_k = FK_ADD; 4438 RECOMP_FLAGS_OUT(); esp += 32; { RECOMP_REGS_OUT(); return; } /* 0x4707C6B1: ret 0x1c */ 4439 RECOMP_REGS_OUT(); 4440 } 4441 4442 void sub_4707C6C0(void) { 4443 int _fpu_cmp = 0; 4444 uint32_t _cf = 0; 4445 int _df = 1; 4446 uint32_t _flag_k = FK_NONE; 4447 uint32_t _flag_a = 0, _flag_b = 0; 4448 uint32_t _itail_tgt = 0; 4449 RECOMP_REGS_LOCALS 4450 RECOMP_ENTER(0x4707C6C0u); 4451 4452 L_4707C6C0: 4453 PUSH32(esp, esi); /* 0x4707C6C0: push esi */ 4454 esi = MEM32(esp + 0x10); /* 0x4707C6C1: mov esi, dword ptr [esp + 0x10] */ 4455 eax = MEM32(esi); /* 0x4707C6C5: mov eax, dword ptr [esi] */ 4456 PUSH32(esp, edi); /* 0x4707C6C7: push edi */ 4457 edi = ecx; /* 0x4707C6C8: mov edi, ecx */ 4458 ecx = esi; /* 0x4707C6CA: mov ecx, esi */ 4459 RECOMP_ICALL(MEM32(eax + 0x4)); /* 0x4707C6CC: call dword ptr [eax + 4] */ 4460 RECOMP_FLAGS_IN(); 4461 esi = MEM32(esi + 0x8); /* 0x4707C6CF: mov esi, dword ptr [esi + 8] */ 4462 ecx = MEM32(esp + 0x18); /* 0x4707C6D2: mov ecx, dword ptr [esp + 0x18] */ 4463 edi = MEM32(edi); /* 0x4707C6D6: mov edi, dword ptr [edi] */ 4464 PUSH32(esp, 0); /* 0x4707C6D8: push 0 */ 4465 PUSH32(esp, 0); /* 0x4707C6DA: push 0 */ 4466 PUSH32(esp, esi); /* 0x4707C6DC: push esi */ 4467 PUSH32(esp, eax); /* 0x4707C6DD: push eax */ 4468 eax = MEM32(esp + 0x20); /* 0x4707C6DE: mov eax, dword ptr [esp + 0x20] */ 4469 PUSH32(esp, ecx); /* 0x4707C6E2: push ecx */ 4470 ecx = MEM32(esp + 0x20); /* 0x4707C6E3: mov ecx, dword ptr [esp + 0x20] */ 4471 edx = esp + 0x28; /* 0x4707C6E7: lea edx, [esp + 0x28] */ 4472 PUSH32(esp, edx); /* 0x4707C6EB: push edx */ 4473 PUSH32(esp, eax); /* 0x4707C6EC: push eax */ 4474 PUSH32(esp, ecx); /* 0x4707C6ED: push ecx */ 4475 PUSH32(esp, edi); /* 0x4707C6EE: push edi */ 4476 MEM32(esp + 0x38) = 0; /* 0x4707C6EF: mov dword ptr [esp + 0x38], 0 */ 4477 RECOMP_ICALL(MEM32(0x470AC4D4)); /* 0x4707C6F7: call dword ptr [0x470ac4d4] */ 4478 RECOMP_FLAGS_IN(); 4479 /* test eax, eax */ /* 0x4707C6FD: test eax, eax */ 4480 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4481 _cf = 0; 4482 _flag_k = FK_TEST; 4483 if (TEST_Z(_flag_a, _flag_b)) goto L_4707C719; /* 0x4707C6FF: je 0x4707c719 */ 4484 L_4707C701: 4485 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707C701: call dword ptr [0x470ac3c8] */ 4486 RECOMP_FLAGS_IN(); 4487 esi = eax; /* 0x4707C707: mov esi, eax */ 4488 RECOMP_ICALL(MEM32(0x470AC150)); /* 0x4707C709: call dword ptr [0x470ac150] */ 4489 RECOMP_FLAGS_IN(); 4490 MEM32(esi) = eax; /* 0x4707C70F: mov dword ptr [esi], eax */ 4491 edi = POP32_VAL(esp); /* 0x4707C711: pop edi */ 4492 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 4493 eax = eax | 0xFFFFFFFFu; /* 0x4707C712: or eax, 0xffffffff */ 4494 _cf = 0; 4495 _flag_k = FK_TEST; 4496 esi = POP32_VAL(esp); /* 0x4707C715: pop esi */ 4497 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707C716: ret 0x10 */ 4498 L_4707C719: 4499 eax = MEM32(esp + 0x14); /* 0x4707C719: mov eax, dword ptr [esp + 0x14] */ 4500 edi = POP32_VAL(esp); /* 0x4707C71D: pop edi */ 4501 esi = POP32_VAL(esp); /* 0x4707C71E: pop esi */ 4502 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707C71F: ret 0x10 */ 4503 RECOMP_REGS_OUT(); 4504 } 4505 4506 void sub_4707C730(void) { 4507 int _fpu_cmp = 0; 4508 uint32_t _cf = 0; 4509 int _df = 1; 4510 uint32_t _flag_k = FK_NONE; 4511 uint32_t _flag_a = 0, _flag_b = 0; 4512 uint32_t _itail_tgt = 0; 4513 RECOMP_REGS_LOCALS 4514 RECOMP_ENTER(0x4707C730u); 4515 4516 L_4707C730: 4517 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u); 4518 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4519 esp = esp - 0x18u; /* 0x4707C730: sub esp, 0x18 */ 4520 _flag_k = FK_CMP; 4521 eax = MEM32(esp + 0x1C); /* 0x4707C733: mov eax, dword ptr [esp + 0x1c] */ 4522 PUSH32(esp, esi); /* 0x4707C737: push esi */ 4523 esi = MEM32(esp + 0x28); /* 0x4707C738: mov esi, dword ptr [esp + 0x28] */ 4524 edx = MEM32(esi); /* 0x4707C73C: mov edx, dword ptr [esi] */ 4525 PUSH32(esp, edi); /* 0x4707C73E: push edi */ 4526 edi = ecx; /* 0x4707C73F: mov edi, ecx */ 4527 ecx = MEM32(esp + 0x28); /* 0x4707C741: mov ecx, dword ptr [esp + 0x28] */ 4528 MEM32(esp + 0x14) = ecx; /* 0x4707C745: mov dword ptr [esp + 0x14], ecx */ 4529 ecx = esi; /* 0x4707C749: mov ecx, esi */ 4530 MEM32(esp + 0x10) = eax; /* 0x4707C74B: mov dword ptr [esp + 0x10], eax */ 4531 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707C74F: call dword ptr [edx + 4] */ 4532 RECOMP_FLAGS_IN(); 4533 ecx = MEM32(esi + 0x8); /* 0x4707C752: mov ecx, dword ptr [esi + 8] */ 4534 edx = MEM32(esp + 0x30); /* 0x4707C755: mov edx, dword ptr [esp + 0x30] */ 4535 edi = MEM32(edi); /* 0x4707C759: mov edi, dword ptr [edi] */ 4536 MEM32(esp + 0xC) = ecx; /* 0x4707C75B: mov dword ptr [esp + 0xc], ecx */ 4537 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4538 ecx = 0; /* 0x4707C75F: xor ecx, ecx */ 4539 _cf = 0; 4540 _flag_k = FK_TEST; 4541 PUSH32(esp, ecx); /* 0x4707C761: push ecx */ 4542 PUSH32(esp, ecx); /* 0x4707C762: push ecx */ 4543 MEM32(esp + 0x20) = ecx; /* 0x4707C763: mov dword ptr [esp + 0x20], ecx */ 4544 MEM32(esp + 0x24) = ecx; /* 0x4707C767: mov dword ptr [esp + 0x24], ecx */ 4545 MEM32(esp + 0x2C) = ecx; /* 0x4707C76B: mov dword ptr [esp + 0x2c], ecx */ 4546 ecx = esp + 0x14; /* 0x4707C76F: lea ecx, [esp + 0x14] */ 4547 PUSH32(esp, ecx); /* 0x4707C773: push ecx */ 4548 ecx = MEM32(esp + 0x20); /* 0x4707C774: mov ecx, dword ptr [esp + 0x20] */ 4549 PUSH32(esp, eax); /* 0x4707C778: push eax */ 4550 MEM32(esp + 0x38) = edx; /* 0x4707C779: mov dword ptr [esp + 0x38], edx */ 4551 edx = esp + 0x38; /* 0x4707C77D: lea edx, [esp + 0x38] */ 4552 PUSH32(esp, edx); /* 0x4707C781: push edx */ 4553 edx = MEM32(esp + 0x24); /* 0x4707C782: mov edx, dword ptr [esp + 0x24] */ 4554 MEM32(esp + 0x1C) = eax; /* 0x4707C786: mov dword ptr [esp + 0x1c], eax */ 4555 eax = esp + 0x38; /* 0x4707C78A: lea eax, [esp + 0x38] */ 4556 PUSH32(esp, eax); /* 0x4707C78E: push eax */ 4557 PUSH32(esp, ecx); /* 0x4707C78F: push ecx */ 4558 PUSH32(esp, edx); /* 0x4707C790: push edx */ 4559 PUSH32(esp, edi); /* 0x4707C791: push edi */ 4560 RECOMP_ICALL(MEM32(0x470AC4B4)); /* 0x4707C792: call dword ptr [0x470ac4b4] */ 4561 RECOMP_FLAGS_IN(); 4562 /* test eax, eax */ /* 0x4707C798: test eax, eax */ 4563 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4564 _cf = 0; 4565 _flag_k = FK_TEST; 4566 if (TEST_Z(_flag_a, _flag_b)) goto L_4707C7BE; /* 0x4707C79A: je 0x4707c7be */ 4567 L_4707C79C: 4568 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707C79C: call dword ptr [0x470ac3c8] */ 4569 RECOMP_FLAGS_IN(); 4570 edi = eax; /* 0x4707C7A2: mov edi, eax */ 4571 RECOMP_ICALL(MEM32(0x470AC150)); /* 0x4707C7A4: call dword ptr [0x470ac150] */ 4572 RECOMP_FLAGS_IN(); 4573 MEM32(edi) = eax; /* 0x4707C7AA: mov dword ptr [edi], eax */ 4574 ecx = MEM32(esp + 0xC); /* 0x4707C7AC: mov ecx, dword ptr [esp + 0xc] */ 4575 edi = POP32_VAL(esp); /* 0x4707C7B0: pop edi */ 4576 MEM32(esi + 0x8) = ecx; /* 0x4707C7B1: mov dword ptr [esi + 8], ecx */ 4577 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 4578 eax = eax | 0xFFFFFFFFu; /* 0x4707C7B4: or eax, 0xffffffff */ 4579 _cf = 0; 4580 _flag_k = FK_TEST; 4581 esi = POP32_VAL(esp); /* 0x4707C7B7: pop esi */ 4582 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u); 4583 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4584 esp = esp + 0x18u; /* 0x4707C7B8: add esp, 0x18 */ 4585 _flag_k = FK_ADD; 4586 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707C7BB: ret 0x10 */ 4587 L_4707C7BE: 4588 edx = MEM32(esp + 0xC); /* 0x4707C7BE: mov edx, dword ptr [esp + 0xc] */ 4589 eax = MEM32(esp + 0x24); /* 0x4707C7C2: mov eax, dword ptr [esp + 0x24] */ 4590 edi = POP32_VAL(esp); /* 0x4707C7C6: pop edi */ 4591 MEM32(esi + 0x8) = edx; /* 0x4707C7C7: mov dword ptr [esi + 8], edx */ 4592 esi = POP32_VAL(esp); /* 0x4707C7CA: pop esi */ 4593 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u); 4594 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4595 esp = esp + 0x18u; /* 0x4707C7CB: add esp, 0x18 */ 4596 _flag_k = FK_ADD; 4597 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707C7CE: ret 0x10 */ 4598 RECOMP_REGS_OUT(); 4599 } 4600 4601 void sub_4707C7E0(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(0x4707C7E0u); 4610 4611 L_4707C7E0: 4612 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x114u); 4613 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4614 esp = esp - 0x114u; /* 0x4707C7E0: sub esp, 0x114 */ 4615 _flag_k = FK_CMP; 4616 PUSH32(esp, ebx); /* 0x4707C7E6: push ebx */ 4617 PUSH32(esp, ebp); /* 0x4707C7E7: push ebp */ 4618 PUSH32(esp, esi); /* 0x4707C7E8: push esi */ 4619 PUSH32(esp, edi); /* 0x4707C7E9: push edi */ 4620 edi = ecx; /* 0x4707C7EA: mov edi, ecx */ 4621 ecx = esp + 0x18; /* 0x4707C7EC: lea ecx, [esp + 0x18] */ 4622 RECOMP_ICALL(0x4702FFC0u); /* 0x4707C7F0: call 0x4702ffc0 */ /* not lifted */ 4623 RECOMP_FLAGS_IN(); 4624 esi = MEM32(edi); /* 0x4707C7F5: mov esi, dword ptr [edi] */ 4625 eax = esp + 0x20; /* 0x4707C7F7: lea eax, [esp + 0x20] */ 4626 PUSH32(esp, eax); /* 0x4707C7FB: push eax */ 4627 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4628 ebx = 0; /* 0x4707C7FC: xor ebx, ebx */ 4629 _cf = 0; 4630 _flag_k = FK_TEST; 4631 PUSH32(esp, esi); /* 0x4707C7FE: push esi */ 4632 MEM32(esp + 0x24) = 0xFFFFFFFFu; /* 0x4707C7FF: mov dword ptr [esp + 0x24], 0xffffffff */ 4633 MEM32(esp + 0x20) = ebx; /* 0x4707C807: mov dword ptr [esp + 0x20], ebx */ 4634 MEM32(esp + 0x28) = ebx; /* 0x4707C80B: mov dword ptr [esp + 0x28], ebx */ 4635 RECOMP_ICALL(0x470A3290u); /* 0x4707C80F: call 0x470a3290 */ /* not lifted */ 4636 RECOMP_FLAGS_IN(); 4637 /* test eax, eax */ /* 0x4707C814: test eax, eax */ 4638 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4639 _cf = 0; 4640 _flag_k = FK_TEST; 4641 if (TEST_NZ(_flag_a, _flag_b)) goto L_4707C845; /* 0x4707C816: jne 0x4707c845 */ 4642 L_4707C818: 4643 edx = MEM32(esp + 0x20); /* 0x4707C818: mov edx, dword ptr [esp + 0x20] */ 4644 /* cmp edx, ebx */ /* 0x4707C81C: cmp edx, ebx */ 4645 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ebx); 4646 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4647 _flag_k = FK_CMP; 4648 if (CMP_BE(_flag_a, _flag_b)) goto L_4707C830; /* 0x4707C81E: jbe 0x4707c830 */ 4649 L_4707C820: 4650 ecx = esp + 0x24; /* 0x4707C820: lea ecx, [esp + 0x24] */ 4651 L_4707C824: 4652 /* cmp MEM32(ecx), esi */ /* 0x4707C824: cmp dword ptr [ecx], esi */ 4653 _flag_a = (uint32_t)(MEM32(ecx)); _flag_b = (uint32_t)(esi); 4654 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4655 _flag_k = FK_CMP; 4656 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707C830; /* 0x4707C826: je 0x4707c830 */ 4657 L_4707C828: 4658 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 4659 eax = eax + 1; /* 0x4707C828: inc eax */ 4660 _flag_k = FK_INC; 4661 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 4662 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4663 ecx = ecx + 4; /* 0x4707C829: add ecx, 4 */ 4664 _flag_k = FK_ADD; 4665 /* cmp eax, edx */ /* 0x4707C82C: cmp eax, edx */ 4666 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 4667 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4668 _flag_k = FK_CMP; 4669 RECOMP_BACKEDGE(); 4670 if (CMP_B(_flag_a, _flag_b)) goto L_4707C824; /* 0x4707C82E: jb 0x4707c824 */ 4671 L_4707C830: 4672 /* cmp eax, edx */ /* 0x4707C830: cmp eax, edx */ 4673 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 4674 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4675 _flag_k = FK_CMP; 4676 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C841; /* 0x4707C832: jne 0x4707c841 */ 4677 L_4707C834: 4678 /* cmp edx, 0x40u */ /* 0x4707C834: cmp edx, 0x40 */ 4679 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x40u); 4680 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4681 _flag_k = FK_CMP; 4682 if (CMP_AE(_flag_a, _flag_b)) goto L_4707C841; /* 0x4707C837: jae 0x4707c841 */ 4683 L_4707C839: 4684 MEM32(esp + eax * 4 + 0x24) = esi; /* 0x4707C839: mov dword ptr [esp + eax*4 + 0x24], esi */ 4685 _flag_a = (uint32_t)(MEM32(esp + 0x20)); _flag_b = (uint32_t)(1); 4686 MEM32(esp + 0x20) = MEM32(esp + 0x20) + 1; /* 0x4707C83D: inc dword ptr [esp + 0x20] */ 4687 _flag_k = FK_INC; 4688 L_4707C841: 4689 _flag_a = (uint32_t)(MEM32(esp + 0x18)); _flag_b = (uint32_t)(1); 4690 MEM32(esp + 0x18) = MEM32(esp + 0x18) + 1; /* 0x4707C841: inc dword ptr [esp + 0x18] */ 4691 _flag_k = FK_INC; 4692 L_4707C845: 4693 edx = MEM32(esp + 0x18); /* 0x4707C845: mov edx, dword ptr [esp + 0x18] */ 4694 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4695 eax = 0; /* 0x4707C849: xor eax, eax */ 4696 _cf = 0; 4697 _flag_k = FK_TEST; 4698 /* cmp edx, ebx */ /* 0x4707C84B: cmp edx, ebx */ 4699 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ebx); 4700 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4701 _flag_k = FK_CMP; 4702 edx = MEM32(esp + 0x138); /* 0x4707C84D: mov edx, dword ptr [esp + 0x138] */ 4703 SET_LO8(eax, (CMP_LE(_flag_a, _flag_b)) ? 1 : 0); /* 0x4707C854: setle al */ 4704 PUSH32(esp, edx); /* 0x4707C857: push edx */ 4705 PUSH32(esp, ebx); /* 0x4707C858: push ebx */ 4706 ecx = esp + 0x28; /* 0x4707C859: lea ecx, [esp + 0x28] */ 4707 PUSH32(esp, ebx); /* 0x4707C85D: push ebx */ 4708 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 4709 eax = eax - 1; /* 0x4707C85E: dec eax */ 4710 _flag_k = FK_DEC; 4711 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 4712 eax = eax & ecx; /* 0x4707C85F: and eax, ecx */ 4713 _cf = 0; 4714 _flag_k = FK_TEST; 4715 ecx = MEM32(edi); /* 0x4707C861: mov ecx, dword ptr [edi] */ 4716 PUSH32(esp, eax); /* 0x4707C863: push eax */ 4717 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4718 ecx = ecx + 1; /* 0x4707C864: inc ecx */ 4719 _flag_k = FK_INC; 4720 PUSH32(esp, ecx); /* 0x4707C865: push ecx */ 4721 RECOMP_ICALL(MEM32(0x470AC478)); /* 0x4707C866: call dword ptr [0x470ac478] */ 4722 RECOMP_FLAGS_IN(); 4723 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C86C: cmp eax, -1 */ 4724 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 4725 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4726 _flag_k = FK_CMP; 4727 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C891; /* 0x4707C86F: jne 0x4707c891 */ 4728 L_4707C871: 4729 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707C871: call dword ptr [0x470ac4a4] */ 4730 RECOMP_FLAGS_IN(); 4731 esi = eax; /* 0x4707C877: mov esi, eax */ 4732 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707C879: call dword ptr [0x470ac3c8] */ 4733 RECOMP_FLAGS_IN(); 4734 edi = POP32_VAL(esp); /* 0x4707C87F: pop edi */ 4735 MEM32(eax) = esi; /* 0x4707C880: mov dword ptr [eax], esi */ 4736 esi = POP32_VAL(esp); /* 0x4707C882: pop esi */ 4737 ebp = POP32_VAL(esp); /* 0x4707C883: pop ebp */ 4738 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 4739 eax = eax | 0xFFFFFFFFu; /* 0x4707C884: or eax, 0xffffffff */ 4740 _cf = 0; 4741 _flag_k = FK_TEST; 4742 ebx = POP32_VAL(esp); /* 0x4707C887: pop ebx */ 4743 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x114u); 4744 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4745 esp = esp + 0x114u; /* 0x4707C888: add esp, 0x114 */ 4746 _flag_k = FK_ADD; 4747 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707C88E: ret 0x14 */ 4748 L_4707C891: 4749 /* cmp eax, ebx */ /* 0x4707C891: cmp eax, ebx */ 4750 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 4751 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4752 _flag_k = FK_CMP; 4753 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707C92E; /* 0x4707C893: je 0x4707c92e */ 4754 L_4707C899: 4755 esi = MEM32(esp + 0x130); /* 0x4707C899: mov esi, dword ptr [esp + 0x130] */ 4756 edx = MEM32(esi); /* 0x4707C8A0: mov edx, dword ptr [esi] */ 4757 ecx = esi; /* 0x4707C8A2: mov ecx, esi */ 4758 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707C8A4: call dword ptr [edx + 4] */ 4759 RECOMP_FLAGS_IN(); 4760 ecx = MEM32(esi + 0x8); /* 0x4707C8A7: mov ecx, dword ptr [esi + 8] */ 4761 ebx = MEM32(esp + 0x134); /* 0x4707C8AA: mov ebx, dword ptr [esp + 0x134] */ 4762 edx = esp + 0x10; /* 0x4707C8B1: lea edx, [esp + 0x10] */ 4763 PUSH32(esp, edx); /* 0x4707C8B5: push edx */ 4764 PUSH32(esp, eax); /* 0x4707C8B6: push eax */ 4765 eax = MEM32(esp + 0x130); /* 0x4707C8B7: mov eax, dword ptr [esp + 0x130] */ 4766 MEM32(esp + 0x18) = ecx; /* 0x4707C8BE: mov dword ptr [esp + 0x18], ecx */ 4767 ecx = MEM32(edi); /* 0x4707C8C2: mov ecx, dword ptr [edi] */ 4768 edi = MEM32(esp + 0x134); /* 0x4707C8C4: mov edi, dword ptr [esp + 0x134] */ 4769 PUSH32(esp, ebx); /* 0x4707C8CB: push ebx */ 4770 PUSH32(esp, edi); /* 0x4707C8CC: push edi */ 4771 PUSH32(esp, eax); /* 0x4707C8CD: push eax */ 4772 PUSH32(esp, ecx); /* 0x4707C8CE: push ecx */ 4773 RECOMP_ICALL(MEM32(0x470AC470)); /* 0x4707C8CF: call dword ptr [0x470ac470] */ 4774 RECOMP_FLAGS_IN(); 4775 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C8D5: cmp eax, -1 */ 4776 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 4777 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4778 _flag_k = FK_CMP; 4779 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C91A; /* 0x4707C8D8: jne 0x4707c91a */ 4780 L_4707C8DA: 4781 ebp = MEM32(0x470AC3C8); /* 0x4707C8DA: mov ebp, dword ptr [0x470ac3c8] */ 4782 RECOMP_ICALL(ebp); /* 0x4707C8E0: call ebp */ 4783 RECOMP_FLAGS_IN(); 4784 MEM32(esp + 0x14) = eax; /* 0x4707C8E2: mov dword ptr [esp + 0x14], eax */ 4785 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707C8E6: call dword ptr [0x470ac4a4] */ 4786 RECOMP_FLAGS_IN(); 4787 ecx = MEM32(esp + 0x14); /* 0x4707C8EC: mov ecx, dword ptr [esp + 0x14] */ 4788 MEM32(ecx) = eax; /* 0x4707C8F0: mov dword ptr [ecx], eax */ 4789 RECOMP_ICALL(ebp); /* 0x4707C8F2: call ebp */ 4790 RECOMP_FLAGS_IN(); 4791 /* cmp MEM32(eax), 0x2738u */ /* 0x4707C8F4: cmp dword ptr [eax], 0x2738 */ 4792 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x2738u); 4793 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4794 _flag_k = FK_CMP; 4795 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C917; /* 0x4707C8FA: jne 0x4707c917 */ 4796 L_4707C8FC: 4797 /* test LO8(ebx), 2 */ /* 0x4707C8FC: test bl, 2 */ 4798 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 4799 _cf = 0; 4800 _flag_k = FK_NARROW(FK_TEST, 24); 4801 if (TEST_Z(_flag_a, _flag_b)) goto L_4707C917; /* 0x4707C8FF: je 0x4707c917 */ 4802 L_4707C901: 4803 edx = MEM32(esp + 0x10); /* 0x4707C901: mov edx, dword ptr [esp + 0x10] */ 4804 eax = edi; /* 0x4707C905: mov eax, edi */ 4805 edi = POP32_VAL(esp); /* 0x4707C907: pop edi */ 4806 MEM32(esi + 0x8) = edx; /* 0x4707C908: mov dword ptr [esi + 8], edx */ 4807 esi = POP32_VAL(esp); /* 0x4707C90B: pop esi */ 4808 ebp = POP32_VAL(esp); /* 0x4707C90C: pop ebp */ 4809 ebx = POP32_VAL(esp); /* 0x4707C90D: pop ebx */ 4810 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x114u); 4811 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4812 esp = esp + 0x114u; /* 0x4707C90E: add esp, 0x114 */ 4813 _flag_k = FK_ADD; 4814 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707C914: ret 0x14 */ 4815 L_4707C917: 4816 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 4817 eax = eax | 0xFFFFFFFFu; /* 0x4707C917: or eax, 0xffffffff */ 4818 _cf = 0; 4819 _flag_k = FK_TEST; 4820 L_4707C91A: 4821 edx = MEM32(esp + 0x10); /* 0x4707C91A: mov edx, dword ptr [esp + 0x10] */ 4822 edi = POP32_VAL(esp); /* 0x4707C91E: pop edi */ 4823 MEM32(esi + 0x8) = edx; /* 0x4707C91F: mov dword ptr [esi + 8], edx */ 4824 esi = POP32_VAL(esp); /* 0x4707C922: pop esi */ 4825 ebp = POP32_VAL(esp); /* 0x4707C923: pop ebp */ 4826 ebx = POP32_VAL(esp); /* 0x4707C924: pop ebx */ 4827 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x114u); 4828 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4829 esp = esp + 0x114u; /* 0x4707C925: add esp, 0x114 */ 4830 _flag_k = FK_ADD; 4831 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707C92B: ret 0x14 */ 4832 L_4707C92E: 4833 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707C92E: call dword ptr [0x470ac3c8] */ 4834 RECOMP_FLAGS_IN(); 4835 edi = POP32_VAL(esp); /* 0x4707C934: pop edi */ 4836 esi = POP32_VAL(esp); /* 0x4707C935: pop esi */ 4837 ebp = POP32_VAL(esp); /* 0x4707C936: pop ebp */ 4838 MEM32(eax) = 0x79u; /* 0x4707C937: mov dword ptr [eax], 0x79 */ 4839 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 4840 eax = eax | 0xFFFFFFFFu; /* 0x4707C93D: or eax, 0xffffffff */ 4841 _cf = 0; 4842 _flag_k = FK_TEST; 4843 ebx = POP32_VAL(esp); /* 0x4707C940: pop ebx */ 4844 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x114u); 4845 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4846 esp = esp + 0x114u; /* 0x4707C941: add esp, 0x114 */ 4847 _flag_k = FK_ADD; 4848 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707C947: ret 0x14 */ 4849 RECOMP_REGS_OUT(); 4850 } 4851 4852 void sub_4707C950(void) { 4853 int _fpu_cmp = 0; 4854 uint32_t _cf = 0; 4855 int _df = 1; 4856 uint32_t _flag_k = FK_NONE; 4857 uint32_t _flag_a = 0, _flag_b = 0; 4858 uint32_t _itail_tgt = 0; 4859 RECOMP_REGS_LOCALS 4860 RECOMP_ENTER(0x4707C950u); 4861 4862 L_4707C950: 4863 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10Cu); 4864 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4865 esp = esp - 0x10Cu; /* 0x4707C950: sub esp, 0x10c */ 4866 _flag_k = FK_CMP; 4867 PUSH32(esp, esi); /* 0x4707C956: push esi */ 4868 PUSH32(esp, edi); /* 0x4707C957: push edi */ 4869 edi = ecx; /* 0x4707C958: mov edi, ecx */ 4870 ecx = esp + 0x8; /* 0x4707C95A: lea ecx, [esp + 8] */ 4871 RECOMP_ICALL(0x4702FFC0u); /* 0x4707C95E: call 0x4702ffc0 */ /* not lifted */ 4872 RECOMP_FLAGS_IN(); 4873 esi = MEM32(edi); /* 0x4707C963: mov esi, dword ptr [edi] */ 4874 eax = esp + 0x10; /* 0x4707C965: lea eax, [esp + 0x10] */ 4875 PUSH32(esp, eax); /* 0x4707C969: push eax */ 4876 PUSH32(esp, esi); /* 0x4707C96A: push esi */ 4877 MEM32(esp + 0x14) = 0xFFFFFFFFu; /* 0x4707C96B: mov dword ptr [esp + 0x14], 0xffffffff */ 4878 MEM32(esp + 0x10) = 0; /* 0x4707C973: mov dword ptr [esp + 0x10], 0 */ 4879 MEM32(esp + 0x18) = 0; /* 0x4707C97B: mov dword ptr [esp + 0x18], 0 */ 4880 RECOMP_ICALL(0x470A3290u); /* 0x4707C983: call 0x470a3290 */ /* not lifted */ 4881 RECOMP_FLAGS_IN(); 4882 /* test eax, eax */ /* 0x4707C988: test eax, eax */ 4883 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4884 _cf = 0; 4885 _flag_k = FK_TEST; 4886 if (TEST_NZ(_flag_a, _flag_b)) goto L_4707C9B9; /* 0x4707C98A: jne 0x4707c9b9 */ 4887 L_4707C98C: 4888 edx = MEM32(esp + 0x10); /* 0x4707C98C: mov edx, dword ptr [esp + 0x10] */ 4889 /* test edx, edx */ /* 0x4707C990: test edx, edx */ 4890 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 4891 _cf = 0; 4892 _flag_k = FK_TEST; 4893 if (TEST_Z(_flag_a, _flag_b)) goto L_4707C9A4; /* 0x4707C992: jbe 0x4707c9a4 */ 4894 L_4707C994: 4895 ecx = esp + 0x14; /* 0x4707C994: lea ecx, [esp + 0x14] */ 4896 L_4707C998: 4897 /* cmp MEM32(ecx), esi */ /* 0x4707C998: cmp dword ptr [ecx], esi */ 4898 _flag_a = (uint32_t)(MEM32(ecx)); _flag_b = (uint32_t)(esi); 4899 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4900 _flag_k = FK_CMP; 4901 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707C9A4; /* 0x4707C99A: je 0x4707c9a4 */ 4902 L_4707C99C: 4903 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 4904 eax = eax + 1; /* 0x4707C99C: inc eax */ 4905 _flag_k = FK_INC; 4906 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 4907 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4908 ecx = ecx + 4; /* 0x4707C99D: add ecx, 4 */ 4909 _flag_k = FK_ADD; 4910 /* cmp eax, edx */ /* 0x4707C9A0: cmp eax, edx */ 4911 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 4912 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4913 _flag_k = FK_CMP; 4914 RECOMP_BACKEDGE(); 4915 if (CMP_B(_flag_a, _flag_b)) goto L_4707C998; /* 0x4707C9A2: jb 0x4707c998 */ 4916 L_4707C9A4: 4917 /* cmp eax, edx */ /* 0x4707C9A4: cmp eax, edx */ 4918 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 4919 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4920 _flag_k = FK_CMP; 4921 if (CMP_NE(_flag_a, _flag_b)) goto L_4707C9B5; /* 0x4707C9A6: jne 0x4707c9b5 */ 4922 L_4707C9A8: 4923 /* cmp edx, 0x40u */ /* 0x4707C9A8: cmp edx, 0x40 */ 4924 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x40u); 4925 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4926 _flag_k = FK_CMP; 4927 if (CMP_AE(_flag_a, _flag_b)) goto L_4707C9B5; /* 0x4707C9AB: jae 0x4707c9b5 */ 4928 L_4707C9AD: 4929 MEM32(esp + eax * 4 + 0x14) = esi; /* 0x4707C9AD: mov dword ptr [esp + eax*4 + 0x14], esi */ 4930 _flag_a = (uint32_t)(MEM32(esp + 0x10)); _flag_b = (uint32_t)(1); 4931 MEM32(esp + 0x10) = MEM32(esp + 0x10) + 1; /* 0x4707C9B1: inc dword ptr [esp + 0x10] */ 4932 _flag_k = FK_INC; 4933 L_4707C9B5: 4934 _flag_a = (uint32_t)(MEM32(esp + 0x8)); _flag_b = (uint32_t)(1); 4935 MEM32(esp + 0x8) = MEM32(esp + 0x8) + 1; /* 0x4707C9B5: inc dword ptr [esp + 8] */ 4936 _flag_k = FK_INC; 4937 L_4707C9B9: 4938 edx = MEM32(esp + 0x8); /* 0x4707C9B9: mov edx, dword ptr [esp + 8] */ 4939 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4940 eax = 0; /* 0x4707C9BD: xor eax, eax */ 4941 _cf = 0; 4942 _flag_k = FK_TEST; 4943 /* test edx, edx */ /* 0x4707C9BF: test edx, edx */ 4944 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 4945 _cf = 0; 4946 _flag_k = FK_TEST; 4947 edx = MEM32(esp + 0x128); /* 0x4707C9C1: mov edx, dword ptr [esp + 0x128] */ 4948 SET_LO8(eax, (TEST_LE(_flag_a, _flag_b)) ? 1 : 0); /* 0x4707C9C8: setle al */ 4949 PUSH32(esp, edx); /* 0x4707C9CB: push edx */ 4950 ecx = esp + 0x14; /* 0x4707C9CC: lea ecx, [esp + 0x14] */ 4951 PUSH32(esp, 0); /* 0x4707C9D0: push 0 */ 4952 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 4953 eax = eax - 1; /* 0x4707C9D2: dec eax */ 4954 _flag_k = FK_DEC; 4955 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 4956 eax = eax & ecx; /* 0x4707C9D3: and eax, ecx */ 4957 _cf = 0; 4958 _flag_k = FK_TEST; 4959 ecx = MEM32(edi); /* 0x4707C9D5: mov ecx, dword ptr [edi] */ 4960 PUSH32(esp, eax); /* 0x4707C9D7: push eax */ 4961 PUSH32(esp, 0); /* 0x4707C9D8: push 0 */ 4962 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4963 ecx = ecx + 1; /* 0x4707C9DA: inc ecx */ 4964 _flag_k = FK_INC; 4965 PUSH32(esp, ecx); /* 0x4707C9DB: push ecx */ 4966 RECOMP_ICALL(MEM32(0x470AC478)); /* 0x4707C9DC: call dword ptr [0x470ac478] */ 4967 RECOMP_FLAGS_IN(); 4968 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707C9E2: cmp eax, -1 */ 4969 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 4970 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4971 _flag_k = FK_CMP; 4972 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707CA24; /* 0x4707C9E5: je 0x4707ca24 */ 4973 L_4707C9E7: 4974 /* test eax, eax */ /* 0x4707C9E7: test eax, eax */ 4975 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4976 _cf = 0; 4977 _flag_k = FK_TEST; 4978 if (TEST_Z(_flag_a, _flag_b)) goto L_4707CA42; /* 0x4707C9E9: je 0x4707ca42 */ 4979 L_4707C9EB: 4980 esi = MEM32(esp + 0x120); /* 0x4707C9EB: mov esi, dword ptr [esp + 0x120] */ 4981 edx = MEM32(esi); /* 0x4707C9F2: mov edx, dword ptr [esi] */ 4982 ecx = esi; /* 0x4707C9F4: mov ecx, esi */ 4983 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707C9F6: call dword ptr [edx + 4] */ 4984 RECOMP_FLAGS_IN(); 4985 esi = MEM32(esi + 0x8); /* 0x4707C9F9: mov esi, dword ptr [esi + 8] */ 4986 edx = MEM32(esp + 0x11C); /* 0x4707C9FC: mov edx, dword ptr [esp + 0x11c] */ 4987 ecx = MEM32(edi); /* 0x4707CA03: mov ecx, dword ptr [edi] */ 4988 PUSH32(esp, esi); /* 0x4707CA05: push esi */ 4989 PUSH32(esp, eax); /* 0x4707CA06: push eax */ 4990 eax = MEM32(esp + 0x12C); /* 0x4707CA07: mov eax, dword ptr [esp + 0x12c] */ 4991 PUSH32(esp, eax); /* 0x4707CA0E: push eax */ 4992 eax = MEM32(esp + 0x124); /* 0x4707CA0F: mov eax, dword ptr [esp + 0x124] */ 4993 PUSH32(esp, edx); /* 0x4707CA16: push edx */ 4994 PUSH32(esp, eax); /* 0x4707CA17: push eax */ 4995 PUSH32(esp, ecx); /* 0x4707CA18: push ecx */ 4996 RECOMP_ICALL(MEM32(0x470AC4B8)); /* 0x4707CA19: call dword ptr [0x470ac4b8] */ 4997 RECOMP_FLAGS_IN(); 4998 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707CA1F: cmp eax, -1 */ 4999 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 5000 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5001 _flag_k = FK_CMP; 5002 if (CMP_NE(_flag_a, _flag_b)) goto L_4707CA51; /* 0x4707CA22: jne 0x4707ca51 */ 5003 L_4707CA24: 5004 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707CA24: call dword ptr [0x470ac4a4] */ 5005 RECOMP_FLAGS_IN(); 5006 esi = eax; /* 0x4707CA2A: mov esi, eax */ 5007 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707CA2C: call dword ptr [0x470ac3c8] */ 5008 RECOMP_FLAGS_IN(); 5009 MEM32(eax) = esi; /* 0x4707CA32: mov dword ptr [eax], esi */ 5010 edi = POP32_VAL(esp); /* 0x4707CA34: pop edi */ 5011 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 5012 eax = eax | 0xFFFFFFFFu; /* 0x4707CA35: or eax, 0xffffffff */ 5013 _cf = 0; 5014 _flag_k = FK_TEST; 5015 esi = POP32_VAL(esp); /* 0x4707CA38: pop esi */ 5016 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10Cu); 5017 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5018 esp = esp + 0x10Cu; /* 0x4707CA39: add esp, 0x10c */ 5019 _flag_k = FK_ADD; 5020 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707CA3F: ret 0x14 */ 5021 L_4707CA42: 5022 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707CA42: call dword ptr [0x470ac3c8] */ 5023 RECOMP_FLAGS_IN(); 5024 MEM32(eax) = 0x79u; /* 0x4707CA48: mov dword ptr [eax], 0x79 */ 5025 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 5026 eax = eax | 0xFFFFFFFFu; /* 0x4707CA4E: or eax, 0xffffffff */ 5027 _cf = 0; 5028 _flag_k = FK_TEST; 5029 L_4707CA51: 5030 edi = POP32_VAL(esp); /* 0x4707CA51: pop edi */ 5031 esi = POP32_VAL(esp); /* 0x4707CA52: pop esi */ 5032 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10Cu); 5033 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5034 esp = esp + 0x10Cu; /* 0x4707CA53: add esp, 0x10c */ 5035 _flag_k = FK_ADD; 5036 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707CA59: ret 0x14 */ 5037 RECOMP_REGS_OUT(); 5038 } 5039 5040 void sub_4707CA60(void) { 5041 int _fpu_cmp = 0; 5042 uint32_t _cf = 0; 5043 int _df = 1; 5044 uint32_t _flag_k = FK_NONE; 5045 uint32_t _flag_a = 0, _flag_b = 0; 5046 uint32_t _itail_tgt = 0; 5047 RECOMP_REGS_LOCALS 5048 RECOMP_ENTER(0x4707CA60u); 5049 5050 L_4707CA60: 5051 ecx = 0x4710EFB1u; /* 0x4707CA60: mov ecx, 0x4710efb1 */ 5052 RECOMP_ICALL(MEM32(0x470AC1C8)); /* 0x4707CA65: call dword ptr [0x470ac1c8] */ 5053 RECOMP_FLAGS_IN(); 5054 PUSH32(esp, 0x4707CA80u); /* 0x4707CA6B: push 0x4707ca80 */ 5055 RECOMP_ICALL(0x470A32D9u); /* 0x4707CA70: call 0x470a32d9 */ /* not lifted */ 5056 RECOMP_FLAGS_IN(); 5057 ecx = POP32_VAL(esp); /* 0x4707CA75: pop ecx */ 5058 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707CA76: ret */ 5059 RECOMP_REGS_OUT(); 5060 } 5061 5062 void sub_4707CA80(void) { 5063 int _fpu_cmp = 0; 5064 uint32_t _cf = 0; 5065 int _df = 1; 5066 uint32_t _flag_k = FK_NONE; 5067 uint32_t _flag_a = 0, _flag_b = 0; 5068 uint32_t _itail_tgt = 0; 5069 RECOMP_REGS_LOCALS 5070 RECOMP_ENTER(0x4707CA80u); 5071 5072 L_4707CA80: 5073 ecx = 0x4710EFB1u; /* 0x4707CA80: mov ecx, 0x4710efb1 */ 5074 L_4707CA85: 5075 { _itail_tgt = (uint32_t)(MEM32(0x470AC1BC)); goto _ljump; } 5076 { RECOMP_REGS_OUT(); return; } /* end of function */ 5077 _ljump: 5078 switch (_itail_tgt) { 5079 case 0x4707CA80u: goto L_4707CA80; 5080 case 0x4707CA85u: goto L_4707CA85; 5081 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 5082 } 5083 RECOMP_REGS_OUT(); 5084 } 5085 5086 void sub_4707CA90(void) { 5087 int _fpu_cmp = 0; 5088 uint32_t _cf = 0; 5089 int _df = 1; 5090 uint32_t _flag_k = FK_NONE; 5091 uint32_t _flag_a = 0, _flag_b = 0; 5092 uint32_t _itail_tgt = 0; 5093 RECOMP_REGS_LOCALS 5094 RECOMP_ENTER(0x4707CA90u); 5095 5096 L_4707CA90: 5097 ecx = 0x4710EFB0u; /* 0x4707CA90: mov ecx, 0x4710efb0 */ 5098 RECOMP_ICALL(MEM32(0x470AC1C4)); /* 0x4707CA95: call dword ptr [0x470ac1c4] */ 5099 RECOMP_FLAGS_IN(); 5100 PUSH32(esp, 0x4707CAB0u); /* 0x4707CA9B: push 0x4707cab0 */ 5101 RECOMP_ICALL(0x470A32D9u); /* 0x4707CAA0: call 0x470a32d9 */ /* not lifted */ 5102 RECOMP_FLAGS_IN(); 5103 ecx = POP32_VAL(esp); /* 0x4707CAA5: pop ecx */ 5104 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707CAA6: ret */ 5105 RECOMP_REGS_OUT(); 5106 } 5107 5108 void sub_4707CAB0(void) { 5109 int _fpu_cmp = 0; 5110 uint32_t _cf = 0; 5111 int _df = 1; 5112 uint32_t _flag_k = FK_NONE; 5113 uint32_t _flag_a = 0, _flag_b = 0; 5114 uint32_t _itail_tgt = 0; 5115 RECOMP_REGS_LOCALS 5116 RECOMP_ENTER(0x4707CAB0u); 5117 5118 L_4707CAB0: 5119 ecx = 0x4710EFB0u; /* 0x4707CAB0: mov ecx, 0x4710efb0 */ 5120 L_4707CAB5: 5121 { _itail_tgt = (uint32_t)(MEM32(0x470AC1C0)); goto _ljump; } 5122 { RECOMP_REGS_OUT(); return; } /* end of function */ 5123 _ljump: 5124 switch (_itail_tgt) { 5125 case 0x4707CAB0u: goto L_4707CAB0; 5126 case 0x4707CAB5u: goto L_4707CAB5; 5127 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 5128 } 5129 RECOMP_REGS_OUT(); 5130 } 5131 5132 void sub_4707CAC0(void) { 5133 int _fpu_cmp = 0; 5134 uint32_t _cf = 0; 5135 int _df = 1; 5136 uint32_t _flag_k = FK_NONE; 5137 uint32_t _flag_a = 0, _flag_b = 0; 5138 uint32_t _itail_tgt = 0; 5139 RECOMP_REGS_LOCALS 5140 RECOMP_ENTER(0x4707CAC0u); 5141 5142 L_4707CAC0: 5143 MEM32(0x4710EFA4) = 0x47104A3Cu; /* 0x4707CAC0: mov dword ptr [0x4710efa4], 0x47104a3c */ 5144 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707CACA: ret */ 5145 RECOMP_REGS_OUT(); 5146 } 5147 5148 void sub_4707CAD0(void) { 5149 int _fpu_cmp = 0; 5150 uint32_t _cf = 0; 5151 int _df = 1; 5152 uint32_t _flag_k = FK_NONE; 5153 uint32_t _flag_a = 0, _flag_b = 0; 5154 uint32_t _itail_tgt = 0; 5155 RECOMP_REGS_LOCALS 5156 RECOMP_ENTER(0x4707CAD0u); 5157 5158 L_4707CAD0: 5159 MEM32(0x4710EFB8) = 0x47104A00u; /* 0x4707CAD0: mov dword ptr [0x4710efb8], 0x47104a00 */ 5160 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707CADA: ret */ 5161 RECOMP_REGS_OUT(); 5162 } 5163 5164 void sub_4707CAE0(void) { 5165 int _fpu_cmp = 0; 5166 uint32_t _cf = 0; 5167 int _df = 1; 5168 uint32_t _flag_k = FK_NONE; 5169 uint32_t _flag_a = 0, _flag_b = 0; 5170 uint32_t _itail_tgt = 0; 5171 RECOMP_REGS_LOCALS 5172 RECOMP_ENTER(0x4707CAE0u); 5173 5174 L_4707CAE0: 5175 MEM32(0x4710EFB4) = 0x47104A70u; /* 0x4707CAE0: mov dword ptr [0x4710efb4], 0x47104a70 */ 5176 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707CAEA: ret */ 5177 RECOMP_REGS_OUT(); 5178 } 5179 5180 void sub_4707CAF0(void) { 5181 int _fpu_cmp = 0; 5182 uint32_t _cf = 0; 5183 int _df = 1; 5184 uint32_t _flag_k = FK_NONE; 5185 uint32_t _flag_a = 0, _flag_b = 0; 5186 uint32_t _itail_tgt = 0; 5187 RECOMP_REGS_LOCALS 5188 RECOMP_ENTER(0x4707CAF0u); 5189 5190 L_4707CAF0: 5191 MEM32(0x4710EFC0) = 0x47104B6Cu; /* 0x4707CAF0: mov dword ptr [0x4710efc0], 0x47104b6c */ 5192 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707CAFA: ret */ 5193 RECOMP_REGS_OUT(); 5194 } 5195 5196 void sub_4707CB00(void) { 5197 int _fpu_cmp = 0; 5198 uint32_t _cf = 0; 5199 int _df = 1; 5200 uint32_t _flag_k = FK_NONE; 5201 uint32_t _flag_a = 0, _flag_b = 0; 5202 uint32_t _itail_tgt = 0; 5203 RECOMP_REGS_LOCALS 5204 RECOMP_ENTER(0x4707CB00u); 5205 5206 L_4707CB00: 5207 MEM32(0x4710EFA8) = 0x47104BA0u; /* 0x4707CB00: mov dword ptr [0x4710efa8], 0x47104ba0 */ 5208 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707CB0A: ret */ 5209 RECOMP_REGS_OUT(); 5210 } 5211 5212 void sub_4707CB10(void) { 5213 int _fpu_cmp = 0; 5214 uint32_t _cf = 0; 5215 int _df = 1; 5216 uint32_t _flag_k = FK_NONE; 5217 uint32_t _flag_a = 0, _flag_b = 0; 5218 uint32_t _itail_tgt = 0; 5219 RECOMP_REGS_LOCALS 5220 RECOMP_ENTER(0x4707CB10u); 5221 5222 L_4707CB10: 5223 MEM32(0x4710EFBC) = 0x47104BD4u; /* 0x4707CB10: mov dword ptr [0x4710efbc], 0x47104bd4 */ 5224 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707CB1A: ret */ 5225 RECOMP_REGS_OUT(); 5226 } 5227 5228 void sub_4707CB20(void) { 5229 int _fpu_cmp = 0; 5230 uint32_t _cf = 0; 5231 int _df = 1; 5232 uint32_t _flag_k = FK_NONE; 5233 uint32_t _flag_a = 0, _flag_b = 0; 5234 uint32_t _itail_tgt = 0; 5235 RECOMP_REGS_LOCALS 5236 RECOMP_ENTER(0x4707CB20u); 5237 5238 L_4707CB20: 5239 PUSH32(esp, esi); /* 0x4707CB20: push esi */ 5240 PUSH32(esp, edi); /* 0x4707CB21: push edi */ 5241 edi = MEM32(esp + 0xC); /* 0x4707CB22: mov edi, dword ptr [esp + 0xc] */ 5242 esi = ecx; /* 0x4707CB26: mov esi, ecx */ 5243 PUSH32(esp, edi); /* 0x4707CB28: push edi */ 5244 RECOMP_ICALL(0x47031A30u); /* 0x4707CB29: call 0x47031a30 */ /* not lifted */ 5245 RECOMP_FLAGS_IN(); 5246 eax = MEM32(edi + 0x1C); /* 0x4707CB2E: mov eax, dword ptr [edi + 0x1c] */ 5247 MEM32(esi + 0x1C) = eax; /* 0x4707CB31: mov dword ptr [esi + 0x1c], eax */ 5248 edi = POP32_VAL(esp); /* 0x4707CB34: pop edi */ 5249 eax = esi; /* 0x4707CB35: mov eax, esi */ 5250 esi = POP32_VAL(esp); /* 0x4707CB37: pop esi */ 5251 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x4707CB38: ret 4 */ 5252 RECOMP_REGS_OUT(); 5253 } 5254 5255 void sub_4707CB40(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(0x4707CB40u); 5264 5265 L_4707CB40: 5266 eax = ecx; /* 0x4707CB40: mov eax, ecx */ 5267 ecx = MEM32(esp + 0x4); /* 0x4707CB42: mov ecx, dword ptr [esp + 4] */ 5268 edx = MEM32(ecx + 0x4); /* 0x4707CB46: mov edx, dword ptr [ecx + 4] */ 5269 MEM32(eax + 0x4) = edx; /* 0x4707CB49: mov dword ptr [eax + 4], edx */ 5270 edx = MEM32(ecx + 0x8); /* 0x4707CB4C: mov edx, dword ptr [ecx + 8] */ 5271 PUSH32(esp, esi); /* 0x4707CB4F: push esi */ 5272 MEM32(eax + 0x8) = edx; /* 0x4707CB50: mov dword ptr [eax + 8], edx */ 5273 PUSH32(esp, edi); /* 0x4707CB53: push edi */ 5274 edx = ecx + 0xC; /* 0x4707CB54: lea edx, [ecx + 0xc] */ 5275 edi = MEM32(edx); /* 0x4707CB57: mov edi, dword ptr [edx] */ 5276 esi = eax + 0xC; /* 0x4707CB59: lea esi, [eax + 0xc] */ 5277 MEM32(esi) = edi; /* 0x4707CB5C: mov dword ptr [esi], edi */ 5278 edi = MEM32(edx + 0x4); /* 0x4707CB5E: mov edi, dword ptr [edx + 4] */ 5279 MEM32(esi + 0x4) = edi; /* 0x4707CB61: mov dword ptr [esi + 4], edi */ 5280 edi = MEM32(edx + 0x8); /* 0x4707CB64: mov edi, dword ptr [edx + 8] */ 5281 MEM32(esi + 0x8) = edi; /* 0x4707CB67: mov dword ptr [esi + 8], edi */ 5282 edx = MEM32(edx + 0xC); /* 0x4707CB6A: mov edx, dword ptr [edx + 0xc] */ 5283 MEM32(esi + 0xC) = edx; /* 0x4707CB6D: mov dword ptr [esi + 0xc], edx */ 5284 ecx = MEM32(ecx + 0x1C); /* 0x4707CB70: mov ecx, dword ptr [ecx + 0x1c] */ 5285 edi = POP32_VAL(esp); /* 0x4707CB73: pop edi */ 5286 MEM32(eax + 0x1C) = ecx; /* 0x4707CB74: mov dword ptr [eax + 0x1c], ecx */ 5287 esi = POP32_VAL(esp); /* 0x4707CB77: pop esi */ 5288 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x4707CB78: ret 4 */ 5289 RECOMP_REGS_OUT(); 5290 } 5291 5292 void sub_4707CB80(void) { 5293 int _fpu_cmp = 0; 5294 uint32_t _cf = 0; 5295 int _df = 1; 5296 uint32_t _flag_k = FK_NONE; 5297 uint32_t _flag_a = 0, _flag_b = 0; 5298 uint32_t _itail_tgt = 0; 5299 RECOMP_REGS_LOCALS 5300 RECOMP_ENTER(0x4707CB80u); 5301 5302 L_4707CB80: 5303 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707CB80: push -1 */ 5304 PUSH32(esp, 0x470A9AC8u); /* 0x4707CB82: push 0x470a9ac8 */ 5305 eax = MEM32(FS_BASE + (0)); /* 0x4707CB87: mov eax, dword ptr fs:[0] */ 5306 PUSH32(esp, eax); /* 0x4707CB8D: push eax */ 5307 MEM32(FS_BASE + (0)) = esp; /* 0x4707CB8E: mov dword ptr fs:[0], esp */ 5308 PUSH32(esp, ecx); /* 0x4707CB95: push ecx */ 5309 PUSH32(esp, ebx); /* 0x4707CB96: push ebx */ 5310 ebx = MEM32(esp + 0x18); /* 0x4707CB97: mov ebx, dword ptr [esp + 0x18] */ 5311 eax = MEM32(ebx); /* 0x4707CB9B: mov eax, dword ptr [ebx] */ 5312 PUSH32(esp, esi); /* 0x4707CB9D: push esi */ 5313 esi = ecx; /* 0x4707CB9E: mov esi, ecx */ 5314 PUSH32(esp, edi); /* 0x4707CBA0: push edi */ 5315 MEM32(esp + 0xC) = esi; /* 0x4707CBA1: mov dword ptr [esp + 0xc], esi */ 5316 MEM32(esi) = eax; /* 0x4707CBA5: mov dword ptr [esi], eax */ 5317 MEM32(esi + 0x4) = 0; /* 0x4707CBA7: mov dword ptr [esi + 4], 0 */ 5318 MEM32(esi + 0x8) = 0; /* 0x4707CBAE: mov dword ptr [esi + 8], 0 */ 5319 eax = MEM32(ebx + 0xC); /* 0x4707CBB5: mov eax, dword ptr [ebx + 0xc] */ 5320 /* test eax, eax */ /* 0x4707CBB8: test eax, eax */ 5321 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5322 _cf = 0; 5323 _flag_k = FK_TEST; 5324 MEM32(esp + 0x18) = 0; /* 0x4707CBBA: mov dword ptr [esp + 0x18], 0 */ 5325 MEM32(esi + 0xC) = eax; /* 0x4707CBC2: mov dword ptr [esi + 0xc], eax */ 5326 if (TEST_NZ(_flag_a, _flag_b)) goto L_4707CBCF; /* 0x4707CBC5: jne 0x4707cbcf */ 5327 L_4707CBC7: 5328 RECOMP_ICALL(0x4703DAC0u); /* 0x4707CBC7: call 0x4703dac0 */ /* not lifted */ 5329 RECOMP_FLAGS_IN(); 5330 MEM32(esi + 0xC) = eax; /* 0x4707CBCC: mov dword ptr [esi + 0xc], eax */ 5331 L_4707CBCF: 5332 ecx = MEM32(esi + 0xC); /* 0x4707CBCF: mov ecx, dword ptr [esi + 0xc] */ 5333 edx = MEM32(ecx); /* 0x4707CBD2: mov edx, dword ptr [ecx] */ 5334 PUSH32(esp, 8); /* 0x4707CBD4: push 8 */ 5335 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707CBD6: call dword ptr [edx + 4] */ 5336 RECOMP_FLAGS_IN(); 5337 /* test eax, eax */ /* 0x4707CBD9: test eax, eax */ 5338 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5339 _cf = 0; 5340 _flag_k = FK_TEST; 5341 MEM32(esi + 0x4) = eax; /* 0x4707CBDB: mov dword ptr [esi + 4], eax */ 5342 if (TEST_Z(_flag_a, _flag_b)) goto L_4707CC14; /* 0x4707CBDE: je 0x4707cc14 */ 5343 L_4707CBE0: 5344 MEM32(eax) = 0; /* 0x4707CBE0: mov dword ptr [eax], 0 */ 5345 eax = MEM32(esi + 0x4); /* 0x4707CBE6: mov eax, dword ptr [esi + 4] */ 5346 MEM32(eax) = eax; /* 0x4707CBE9: mov dword ptr [eax], eax */ 5347 eax = MEM32(ebx + 0x4); /* 0x4707CBEB: mov eax, dword ptr [ebx + 4] */ 5348 edi = MEM32(eax); /* 0x4707CBEE: mov edi, dword ptr [eax] */ 5349 /* cmp edi, eax */ /* 0x4707CBF0: cmp edi, eax */ 5350 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 5351 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5352 _flag_k = FK_CMP; 5353 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707CC42; /* 0x4707CBF2: je 0x4707cc42 */ 5354 L_4707CBF4: 5355 ecx = MEM32(edi + 0x4); /* 0x4707CBF4: mov ecx, dword ptr [edi + 4] */ 5356 eax = MEM32(esi + 0x4); /* 0x4707CBF7: mov eax, dword ptr [esi + 4] */ 5357 MEM32(eax + 0x4) = ecx; /* 0x4707CBFA: mov dword ptr [eax + 4], ecx */ 5358 ecx = MEM32(esi + 0xC); /* 0x4707CBFD: mov ecx, dword ptr [esi + 0xc] */ 5359 edx = MEM32(ecx); /* 0x4707CC00: mov edx, dword ptr [ecx] */ 5360 PUSH32(esp, 8); /* 0x4707CC02: push 8 */ 5361 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707CC04: call dword ptr [edx + 4] */ 5362 RECOMP_FLAGS_IN(); 5363 /* test eax, eax */ /* 0x4707CC07: test eax, eax */ 5364 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5365 _cf = 0; 5366 _flag_k = FK_TEST; 5367 if (TEST_Z(_flag_a, _flag_b)) goto L_4707CC22; /* 0x4707CC09: je 0x4707cc22 */ 5368 L_4707CC0B: 5369 ecx = MEM32(esi + 0x4); /* 0x4707CC0B: mov ecx, dword ptr [esi + 4] */ 5370 edx = MEM32(ecx); /* 0x4707CC0E: mov edx, dword ptr [ecx] */ 5371 MEM32(eax) = edx; /* 0x4707CC10: mov dword ptr [eax], edx */ 5372 goto L_4707CC30; /* 0x4707CC12: jmp 0x4707cc30 */ 5373 L_4707CC14: 5374 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707CC14: call dword ptr [0x470ac3c8] */ 5375 RECOMP_FLAGS_IN(); 5376 MEM32(eax) = 0xCu; /* 0x4707CC1A: mov dword ptr [eax], 0xc */ 5377 goto L_4707CC42; /* 0x4707CC20: jmp 0x4707cc42 */ 5378 L_4707CC22: 5379 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707CC22: call dword ptr [0x470ac3c8] */ 5380 RECOMP_FLAGS_IN(); 5381 MEM32(eax) = 0xCu; /* 0x4707CC28: mov dword ptr [eax], 0xc */ 5382 goto L_4707CC3B; /* 0x4707CC2E: jmp 0x4707cc3b */ 5383 L_4707CC30: 5384 ecx = MEM32(esi + 0x4); /* 0x4707CC30: mov ecx, dword ptr [esi + 4] */ 5385 MEM32(ecx) = eax; /* 0x4707CC33: mov dword ptr [ecx], eax */ 5386 MEM32(esi + 0x4) = eax; /* 0x4707CC35: mov dword ptr [esi + 4], eax */ 5387 _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(1); 5388 MEM32(esi + 0x8) = MEM32(esi + 0x8) + 1; /* 0x4707CC38: inc dword ptr [esi + 8] */ 5389 _flag_k = FK_INC; 5390 L_4707CC3B: 5391 edi = MEM32(edi); /* 0x4707CC3B: mov edi, dword ptr [edi] */ 5392 /* cmp edi, MEM32(ebx + 0x4) */ /* 0x4707CC3D: cmp edi, dword ptr [ebx + 4] */ 5393 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebx + 0x4)); 5394 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5395 _flag_k = FK_CMP; 5396 RECOMP_BACKEDGE(); 5397 if (CMP_NE(_flag_a, _flag_b)) goto L_4707CBF4; /* 0x4707CC40: jne 0x4707cbf4 */ 5398 L_4707CC42: 5399 edx = MEM32(ebx + 0x10); /* 0x4707CC42: mov edx, dword ptr [ebx + 0x10] */ 5400 ecx = MEM32(esp + 0x10); /* 0x4707CC45: mov ecx, dword ptr [esp + 0x10] */ 5401 edi = POP32_VAL(esp); /* 0x4707CC49: pop edi */ 5402 MEM32(esi + 0x10) = edx; /* 0x4707CC4A: mov dword ptr [esi + 0x10], edx */ 5403 eax = esi; /* 0x4707CC4D: mov eax, esi */ 5404 esi = POP32_VAL(esp); /* 0x4707CC4F: pop esi */ 5405 ebx = POP32_VAL(esp); /* 0x4707CC50: pop ebx */ 5406 MEM32(FS_BASE + (0)) = ecx; /* 0x4707CC51: mov dword ptr fs:[0], ecx */ 5407 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 5408 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5409 esp = esp + 0x10u; /* 0x4707CC58: add esp, 0x10 */ 5410 _flag_k = FK_ADD; 5411 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x4707CC5B: ret 4 */ 5412 RECOMP_REGS_OUT(); 5413 } 5414 5415 void sub_4707CC60(void) { 5416 int _fpu_cmp = 0; 5417 uint32_t _cf = 0; 5418 int _df = 1; 5419 uint32_t _flag_k = FK_NONE; 5420 uint32_t _flag_a = 0, _flag_b = 0; 5421 uint32_t _itail_tgt = 0; 5422 RECOMP_REGS_LOCALS 5423 RECOMP_ENTER(0x4707CC60u); 5424 5425 L_4707CC60: 5426 PUSH32(esp, ebx); /* 0x4707CC60: push ebx */ 5427 ebx = MEM32(esp + 0x8); /* 0x4707CC61: mov ebx, dword ptr [esp + 8] */ 5428 eax = MEM32(ebx); /* 0x4707CC65: mov eax, dword ptr [ebx] */ 5429 PUSH32(esp, ebp); /* 0x4707CC67: push ebp */ 5430 ebp = ecx; /* 0x4707CC68: mov ebp, ecx */ 5431 PUSH32(esp, esi); /* 0x4707CC6A: push esi */ 5432 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(4); 5433 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5434 ebx = ebx + 4; /* 0x4707CC6B: add ebx, 4 */ 5435 _flag_k = FK_ADD; 5436 esi = ebp + 0x4; /* 0x4707CC6E: lea esi, [ebp + 4] */ 5437 /* cmp esi, ebx */ /* 0x4707CC71: cmp esi, ebx */ 5438 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 5439 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5440 _flag_k = FK_CMP; 5441 PUSH32(esp, edi); /* 0x4707CC73: push edi */ 5442 MEM32(ebp) = eax; /* 0x4707CC74: mov dword ptr [ebp], eax */ 5443 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707CCBC; /* 0x4707CC77: je 0x4707ccbc */ 5444 L_4707CC79: 5445 eax = MEM32(esi); /* 0x4707CC79: mov eax, dword ptr [esi] */ 5446 edi = MEM32(eax); /* 0x4707CC7B: mov edi, dword ptr [eax] */ 5447 /* cmp edi, eax */ /* 0x4707CC7D: cmp edi, eax */ 5448 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 5449 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5450 _flag_k = FK_CMP; 5451 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707CC9F; /* 0x4707CC7F: je 0x4707cc9f */ 5452 L_4707CC81: 5453 eax = edi; /* 0x4707CC81: mov eax, edi */ 5454 /* test eax, eax */ /* 0x4707CC83: test eax, eax */ 5455 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5456 _cf = 0; 5457 _flag_k = FK_TEST; 5458 edi = MEM32(edi); /* 0x4707CC85: mov edi, dword ptr [edi] */ 5459 if (TEST_Z(_flag_a, _flag_b)) goto L_4707CC92; /* 0x4707CC87: je 0x4707cc92 */ 5460 L_4707CC89: 5461 ecx = MEM32(esi + 0x8); /* 0x4707CC89: mov ecx, dword ptr [esi + 8] */ 5462 edx = MEM32(ecx); /* 0x4707CC8C: mov edx, dword ptr [ecx] */ 5463 PUSH32(esp, eax); /* 0x4707CC8E: push eax */ 5464 RECOMP_ICALL(MEM32(edx + 0xC)); /* 0x4707CC8F: call dword ptr [edx + 0xc] */ 5465 RECOMP_FLAGS_IN(); 5466 L_4707CC92: 5467 ecx = MEM32(esi + 0x4); /* 0x4707CC92: mov ecx, dword ptr [esi + 4] */ 5468 eax = MEM32(esi); /* 0x4707CC95: mov eax, dword ptr [esi] */ 5469 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 5470 ecx = ecx - 1; /* 0x4707CC97: dec ecx */ 5471 _flag_k = FK_DEC; 5472 /* cmp edi, eax */ /* 0x4707CC98: cmp edi, eax */ 5473 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 5474 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5475 _flag_k = FK_CMP; 5476 MEM32(esi + 0x4) = ecx; /* 0x4707CC9A: mov dword ptr [esi + 4], ecx */ 5477 RECOMP_BACKEDGE(); 5478 if (CMP_NE(_flag_a, _flag_b)) goto L_4707CC81; /* 0x4707CC9D: jne 0x4707cc81 */ 5479 L_4707CC9F: 5480 eax = MEM32(esi); /* 0x4707CC9F: mov eax, dword ptr [esi] */ 5481 MEM32(eax) = eax; /* 0x4707CCA1: mov dword ptr [eax], eax */ 5482 eax = MEM32(ebx); /* 0x4707CCA3: mov eax, dword ptr [ebx] */ 5483 edi = MEM32(eax); /* 0x4707CCA5: mov edi, dword ptr [eax] */ 5484 /* cmp edi, eax */ /* 0x4707CCA7: cmp edi, eax */ 5485 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 5486 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5487 _flag_k = FK_CMP; 5488 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707CCBC; /* 0x4707CCA9: je 0x4707ccbc */ 5489 L_4707CCAB: 5490 eax = edi + 0x4; /* 0x4707CCAB: lea eax, [edi + 4] */ 5491 PUSH32(esp, eax); /* 0x4707CCAE: push eax */ 5492 ecx = esi; /* 0x4707CCAF: mov ecx, esi */ 5493 RECOMP_ICALL(0x47067230u); /* 0x4707CCB1: call 0x47067230 */ /* not lifted */ 5494 RECOMP_FLAGS_IN(); 5495 edi = MEM32(edi); /* 0x4707CCB6: mov edi, dword ptr [edi] */ 5496 /* cmp edi, MEM32(ebx) */ /* 0x4707CCB8: cmp edi, dword ptr [ebx] */ 5497 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebx)); 5498 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5499 _flag_k = FK_CMP; 5500 RECOMP_BACKEDGE(); 5501 if (CMP_NE(_flag_a, _flag_b)) goto L_4707CCAB; /* 0x4707CCBA: jne 0x4707ccab */ 5502 L_4707CCBC: 5503 ecx = MEM32(esp + 0x14); /* 0x4707CCBC: mov ecx, dword ptr [esp + 0x14] */ 5504 edx = MEM32(ecx + 0x10); /* 0x4707CCC0: mov edx, dword ptr [ecx + 0x10] */ 5505 edi = POP32_VAL(esp); /* 0x4707CCC3: pop edi */ 5506 esi = POP32_VAL(esp); /* 0x4707CCC4: pop esi */ 5507 MEM32(ebp + 0x10) = edx; /* 0x4707CCC5: mov dword ptr [ebp + 0x10], edx */ 5508 eax = ebp; /* 0x4707CCC8: mov eax, ebp */ 5509 ebp = POP32_VAL(esp); /* 0x4707CCCA: pop ebp */ 5510 ebx = POP32_VAL(esp); /* 0x4707CCCB: pop ebx */ 5511 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x4707CCCC: ret 4 */ 5512 RECOMP_REGS_OUT(); 5513 } 5514 5515 void sub_4707CCD0(void) { 5516 int _fpu_cmp = 0; 5517 uint32_t _cf = 0; 5518 int _df = 1; 5519 uint32_t _flag_k = FK_NONE; 5520 uint32_t _flag_a = 0, _flag_b = 0; 5521 uint32_t _itail_tgt = 0; 5522 RECOMP_REGS_LOCALS 5523 RECOMP_ENTER(0x4707CCD0u); 5524 5525 goto L_4707CCD0; 5526 L_47014F70: 5527 MEM32(ecx) = 0x470AC510u; /* 0x47014F70: mov dword ptr [ecx], 0x470ac510 */ 5528 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x47014F76: ret */ 5529 L_4707CCD0: 5530 MEM32(ecx) = 0x470AC520u; /* 0x4707CCD0: mov dword ptr [ecx], 0x470ac520 */ 5531 RECOMP_BACKEDGE(); 5532 goto L_47014F70; /* 0x4707CCD6: jmp 0x47014f70 */ 5533 { RECOMP_REGS_OUT(); return; } /* end of function */ 5534 RECOMP_REGS_OUT(); 5535 } 5536 5537 void sub_4707CCE0(void) { 5538 int _fpu_cmp = 0; 5539 uint32_t _cf = 0; 5540 int _df = 1; 5541 uint32_t _flag_k = FK_NONE; 5542 uint32_t _flag_a = 0, _flag_b = 0; 5543 uint32_t _itail_tgt = 0; 5544 RECOMP_REGS_LOCALS 5545 RECOMP_ENTER(0x4707CCE0u); 5546 5547 L_4707CCE0: 5548 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707CCE0: push -1 */ 5549 PUSH32(esp, 0x470A9AE8u); /* 0x4707CCE2: push 0x470a9ae8 */ 5550 eax = MEM32(FS_BASE + (0)); /* 0x4707CCE7: mov eax, dword ptr fs:[0] */ 5551 PUSH32(esp, eax); /* 0x4707CCED: push eax */ 5552 MEM32(FS_BASE + (0)) = esp; /* 0x4707CCEE: mov dword ptr fs:[0], esp */ 5553 PUSH32(esp, ecx); /* 0x4707CCF5: push ecx */ 5554 PUSH32(esp, esi); /* 0x4707CCF6: push esi */ 5555 esi = ecx; /* 0x4707CCF7: mov esi, ecx */ 5556 PUSH32(esp, edi); /* 0x4707CCF9: push edi */ 5557 MEM32(esp + 0x8) = esi; /* 0x4707CCFA: mov dword ptr [esp + 8], esi */ 5558 eax = MEM32(esi + 0x4); /* 0x4707CCFE: mov eax, dword ptr [esi + 4] */ 5559 edi = MEM32(eax); /* 0x4707CD01: mov edi, dword ptr [eax] */ 5560 /* cmp edi, eax */ /* 0x4707CD03: cmp edi, eax */ 5561 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 5562 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5563 _flag_k = FK_CMP; 5564 MEM32(esp + 0x14) = 0; /* 0x4707CD05: mov dword ptr [esp + 0x14], 0 */ 5565 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707CD2E; /* 0x4707CD0D: je 0x4707cd2e */ 5566 L_4707CD0F: 5567 eax = edi; /* 0x4707CD0F: mov eax, edi */ 5568 /* test eax, eax */ /* 0x4707CD11: test eax, eax */ 5569 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5570 _cf = 0; 5571 _flag_k = FK_TEST; 5572 edi = MEM32(edi); /* 0x4707CD13: mov edi, dword ptr [edi] */ 5573 if (TEST_Z(_flag_a, _flag_b)) goto L_4707CD20; /* 0x4707CD15: je 0x4707cd20 */ 5574 L_4707CD17: 5575 ecx = MEM32(esi + 0xC); /* 0x4707CD17: mov ecx, dword ptr [esi + 0xc] */ 5576 edx = MEM32(ecx); /* 0x4707CD1A: mov edx, dword ptr [ecx] */ 5577 PUSH32(esp, eax); /* 0x4707CD1C: push eax */ 5578 RECOMP_ICALL(MEM32(edx + 0xC)); /* 0x4707CD1D: call dword ptr [edx + 0xc] */ 5579 RECOMP_FLAGS_IN(); 5580 L_4707CD20: 5581 ecx = MEM32(esi + 0x8); /* 0x4707CD20: mov ecx, dword ptr [esi + 8] */ 5582 eax = MEM32(esi + 0x4); /* 0x4707CD23: mov eax, dword ptr [esi + 4] */ 5583 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 5584 ecx = ecx - 1; /* 0x4707CD26: dec ecx */ 5585 _flag_k = FK_DEC; 5586 /* cmp edi, eax */ /* 0x4707CD27: cmp edi, eax */ 5587 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 5588 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5589 _flag_k = FK_CMP; 5590 MEM32(esi + 0x8) = ecx; /* 0x4707CD29: mov dword ptr [esi + 8], ecx */ 5591 RECOMP_BACKEDGE(); 5592 if (CMP_NE(_flag_a, _flag_b)) goto L_4707CD0F; /* 0x4707CD2C: jne 0x4707cd0f */ 5593 L_4707CD2E: 5594 eax = MEM32(esi + 0x4); /* 0x4707CD2E: mov eax, dword ptr [esi + 4] */ 5595 MEM32(eax) = eax; /* 0x4707CD31: mov dword ptr [eax], eax */ 5596 eax = MEM32(esi + 0x4); /* 0x4707CD33: mov eax, dword ptr [esi + 4] */ 5597 /* test eax, eax */ /* 0x4707CD36: test eax, eax */ 5598 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5599 _cf = 0; 5600 _flag_k = FK_TEST; 5601 if (TEST_Z(_flag_a, _flag_b)) goto L_4707CD43; /* 0x4707CD38: je 0x4707cd43 */ 5602 L_4707CD3A: 5603 ecx = MEM32(esi + 0xC); /* 0x4707CD3A: mov ecx, dword ptr [esi + 0xc] */ 5604 edx = MEM32(ecx); /* 0x4707CD3D: mov edx, dword ptr [ecx] */ 5605 PUSH32(esp, eax); /* 0x4707CD3F: push eax */ 5606 RECOMP_ICALL(MEM32(edx + 0xC)); /* 0x4707CD40: call dword ptr [edx + 0xc] */ 5607 RECOMP_FLAGS_IN(); 5608 L_4707CD43: 5609 ecx = MEM32(esp + 0xC); /* 0x4707CD43: mov ecx, dword ptr [esp + 0xc] */ 5610 MEM32(esi + 0x4) = 0; /* 0x4707CD47: mov dword ptr [esi + 4], 0 */ 5611 edi = POP32_VAL(esp); /* 0x4707CD4E: pop edi */ 5612 esi = POP32_VAL(esp); /* 0x4707CD4F: pop esi */ 5613 MEM32(FS_BASE + (0)) = ecx; /* 0x4707CD50: mov dword ptr fs:[0], ecx */ 5614 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 5615 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5616 esp = esp + 0x10u; /* 0x4707CD57: add esp, 0x10 */ 5617 _flag_k = FK_ADD; 5618 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707CD5A: ret */ 5619 RECOMP_REGS_OUT(); 5620 } 5621 5622 void sub_4707CD60(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(0x4707CD60u); 5631 5632 L_4707CD60: 5633 PUSH32(esp, esi); /* 0x4707CD60: push esi */ 5634 esi = MEM32(esp + 0x10); /* 0x4707CD61: mov esi, dword ptr [esp + 0x10] */ 5635 eax = MEM32(esi); /* 0x4707CD65: mov eax, dword ptr [esi] */ 5636 PUSH32(esp, edi); /* 0x4707CD67: push edi */ 5637 edi = ecx; /* 0x4707CD68: mov edi, ecx */ 5638 ecx = esi; /* 0x4707CD6A: mov ecx, esi */ 5639 RECOMP_ICALL(MEM32(eax + 0x4)); /* 0x4707CD6C: call dword ptr [eax + 4] */ 5640 RECOMP_FLAGS_IN(); 5641 esi = MEM32(esi + 0x8); /* 0x4707CD6F: mov esi, dword ptr [esi + 8] */ 5642 ecx = MEM32(esp + 0x18); /* 0x4707CD72: mov ecx, dword ptr [esp + 0x18] */ 5643 edx = MEM32(esp + 0x10); /* 0x4707CD76: mov edx, dword ptr [esp + 0x10] */ 5644 edi = MEM32(edi); /* 0x4707CD7A: mov edi, dword ptr [edi] */ 5645 PUSH32(esp, esi); /* 0x4707CD7C: push esi */ 5646 PUSH32(esp, eax); /* 0x4707CD7D: push eax */ 5647 eax = MEM32(esp + 0x14); /* 0x4707CD7E: mov eax, dword ptr [esp + 0x14] */ 5648 PUSH32(esp, ecx); /* 0x4707CD82: push ecx */ 5649 PUSH32(esp, edx); /* 0x4707CD83: push edx */ 5650 PUSH32(esp, eax); /* 0x4707CD84: push eax */ 5651 PUSH32(esp, edi); /* 0x4707CD85: push edi */ 5652 RECOMP_ICALL(MEM32(0x470AC4B8)); /* 0x4707CD86: call dword ptr [0x470ac4b8] */ 5653 RECOMP_FLAGS_IN(); 5654 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707CD8C: cmp eax, -1 */ 5655 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 5656 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5657 _flag_k = FK_CMP; 5658 if (CMP_NE(_flag_a, _flag_b)) goto L_4707CDA4; /* 0x4707CD8F: jne 0x4707cda4 */ 5659 L_4707CD91: 5660 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707CD91: call dword ptr [0x470ac4a4] */ 5661 RECOMP_FLAGS_IN(); 5662 esi = eax; /* 0x4707CD97: mov esi, eax */ 5663 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707CD99: call dword ptr [0x470ac3c8] */ 5664 RECOMP_FLAGS_IN(); 5665 MEM32(eax) = esi; /* 0x4707CD9F: mov dword ptr [eax], esi */ 5666 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 5667 eax = eax | 0xFFFFFFFFu; /* 0x4707CDA1: or eax, 0xffffffff */ 5668 _cf = 0; 5669 _flag_k = FK_TEST; 5670 L_4707CDA4: 5671 edi = POP32_VAL(esp); /* 0x4707CDA4: pop edi */ 5672 esi = POP32_VAL(esp); /* 0x4707CDA5: pop esi */ 5673 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707CDA6: ret 0x10 */ 5674 RECOMP_REGS_OUT(); 5675 } 5676 5677 void sub_4707CDB0(void) { 5678 int _fpu_cmp = 0; 5679 uint32_t _cf = 0; 5680 int _df = 1; 5681 uint32_t _flag_k = FK_NONE; 5682 uint32_t _flag_a = 0, _flag_b = 0; 5683 uint32_t _itail_tgt = 0; 5684 RECOMP_REGS_LOCALS 5685 RECOMP_ENTER(0x4707CDB0u); 5686 5687 L_4707CDB0: 5688 MEM32(0x4710EFAC) = 0x4710B174u; /* 0x4707CDB0: mov dword ptr [0x4710efac], 0x4710b174 */ 5689 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707CDBA: ret */ 5690 RECOMP_REGS_OUT(); 5691 } 5692 5693 void sub_4707CDC0(void) { 5694 int _fpu_cmp = 0; 5695 uint32_t _cf = 0; 5696 int _df = 1; 5697 uint32_t _flag_k = FK_NONE; 5698 uint32_t _flag_a = 0, _flag_b = 0; 5699 uint32_t _itail_tgt = 0; 5700 RECOMP_REGS_LOCALS 5701 RECOMP_ENTER(0x4707CDC0u); 5702 5703 L_4707CDC0: 5704 eax = MEM32(esp + 0x4); /* 0x4707CDC0: mov eax, dword ptr [esp + 4] */ 5705 PUSH32(esp, esi); /* 0x4707CDC4: push esi */ 5706 esi = ecx; /* 0x4707CDC5: mov esi, ecx */ 5707 PUSH32(esp, eax); /* 0x4707CDC7: push eax */ 5708 RECOMP_ICALL(0x47031A30u); /* 0x4707CDC8: call 0x47031a30 */ /* not lifted */ 5709 RECOMP_FLAGS_IN(); 5710 ecx = MEM32(esp + 0xC); /* 0x4707CDCD: mov ecx, dword ptr [esp + 0xc] */ 5711 MEM32(esi + 0x1C) = ecx; /* 0x4707CDD1: mov dword ptr [esi + 0x1c], ecx */ 5712 eax = esi; /* 0x4707CDD4: mov eax, esi */ 5713 esi = POP32_VAL(esp); /* 0x4707CDD6: pop esi */ 5714 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x4707CDD7: ret 8 */ 5715 RECOMP_REGS_OUT(); 5716 } 5717 5718 void sub_4707CDE0(void) { 5719 int _fpu_cmp = 0; 5720 uint32_t _cf = 0; 5721 int _df = 1; 5722 uint32_t _flag_k = FK_NONE; 5723 uint32_t _flag_a = 0, _flag_b = 0; 5724 uint32_t _itail_tgt = 0; 5725 RECOMP_REGS_LOCALS 5726 RECOMP_ENTER(0x4707CDE0u); 5727 5728 L_4707CDE0: 5729 PUSH32(esp, ebx); /* 0x4707CDE0: push ebx */ 5730 ebx = ecx; /* 0x4707CDE1: mov ebx, ecx */ 5731 PUSH32(esp, esi); /* 0x4707CDE3: push esi */ 5732 esi = MEM32(ebx + 0x10); /* 0x4707CDE4: mov esi, dword ptr [ebx + 0x10] */ 5733 /* test esi, esi */ /* 0x4707CDE7: test esi, esi */ 5734 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 5735 _cf = 0; 5736 _flag_k = FK_TEST; 5737 if (TEST_Z(_flag_a, _flag_b)) goto L_4707CE0A; /* 0x4707CDE9: je 0x4707ce0a */ 5738 L_4707CDEB: 5739 PUSH32(esp, edi); /* 0x4707CDEB: push edi */ 5740 L_4707CDEC: 5741 /* test esi, esi */ /* 0x4707CDEC: test esi, esi */ 5742 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 5743 _cf = 0; 5744 _flag_k = FK_TEST; 5745 edi = MEM32(esi + 0x1C); /* 0x4707CDEE: mov edi, dword ptr [esi + 0x1c] */ 5746 if (TEST_Z(_flag_a, _flag_b)) goto L_4707CE03; /* 0x4707CDF1: je 0x4707ce03 */ 5747 L_4707CDF3: 5748 ecx = esi; /* 0x4707CDF3: mov ecx, esi */ 5749 RECOMP_ICALL(0x4707CCD0u); /* 0x4707CDF5: call 0x4707ccd0 */ /* not lifted */ 5750 RECOMP_FLAGS_IN(); 5751 PUSH32(esp, esi); /* 0x4707CDFA: push esi */ 5752 RECOMP_ICALL(0x470A32A2u); /* 0x4707CDFB: call 0x470a32a2 */ /* not lifted */ 5753 RECOMP_FLAGS_IN(); 5754 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5755 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5756 esp = esp + 4; /* 0x4707CE00: add esp, 4 */ 5757 _flag_k = FK_ADD; 5758 L_4707CE03: 5759 /* test edi, edi */ /* 0x4707CE03: test edi, edi */ 5760 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 5761 _cf = 0; 5762 _flag_k = FK_TEST; 5763 esi = edi; /* 0x4707CE05: mov esi, edi */ 5764 RECOMP_BACKEDGE(); 5765 if (TEST_NZ(_flag_a, _flag_b)) goto L_4707CDEC; /* 0x4707CE07: jne 0x4707cdec */ 5766 L_4707CE09: 5767 edi = POP32_VAL(esp); /* 0x4707CE09: pop edi */ 5768 L_4707CE0A: 5769 ecx = ebx; /* 0x4707CE0A: mov ecx, ebx */ 5770 RECOMP_ICALL(0x4707A640u); /* 0x4707CE0C: call 0x4707a640 */ /* not lifted */ 5771 RECOMP_FLAGS_IN(); 5772 esi = POP32_VAL(esp); /* 0x4707CE11: pop esi */ 5773 ebx = POP32_VAL(esp); /* 0x4707CE12: pop ebx */ 5774 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707CE13: ret */ 5775 RECOMP_REGS_OUT(); 5776 } 5777 5778 void sub_4707CE20(void) { 5779 int _fpu_cmp = 0; 5780 uint32_t _cf = 0; 5781 int _df = 1; 5782 uint32_t _flag_k = FK_NONE; 5783 uint32_t _flag_a = 0, _flag_b = 0; 5784 uint32_t _itail_tgt = 0; 5785 RECOMP_REGS_LOCALS 5786 RECOMP_ENTER(0x4707CE20u); 5787 5788 L_4707CE20: 5789 PUSH32(esp, esi); /* 0x4707CE20: push esi */ 5790 esi = ecx; /* 0x4707CE21: mov esi, ecx */ 5791 RECOMP_ICALL(0x4707A510u); /* 0x4707CE23: call 0x4707a510 */ /* not lifted */ 5792 RECOMP_FLAGS_IN(); 5793 MEM32(esi + 0x10) = 0; /* 0x4707CE28: mov dword ptr [esi + 0x10], 0 */ 5794 eax = esi; /* 0x4707CE2F: mov eax, esi */ 5795 esi = POP32_VAL(esp); /* 0x4707CE31: pop esi */ 5796 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707CE32: ret */ 5797 RECOMP_REGS_OUT(); 5798 } 5799 5800 void sub_4707CE40(void) { 5801 int _fpu_cmp = 0; 5802 uint32_t _cf = 0; 5803 int _df = 1; 5804 uint32_t _flag_k = FK_NONE; 5805 uint32_t _flag_a = 0, _flag_b = 0; 5806 uint32_t _itail_tgt = 0; 5807 RECOMP_REGS_LOCALS 5808 RECOMP_ENTER(0x4707CE40u); 5809 5810 L_4707CE40: 5811 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707CE40: push -1 */ 5812 PUSH32(esp, 0x470A9B08u); /* 0x4707CE42: push 0x470a9b08 */ 5813 eax = MEM32(FS_BASE + (0)); /* 0x4707CE47: mov eax, dword ptr fs:[0] */ 5814 PUSH32(esp, eax); /* 0x4707CE4D: push eax */ 5815 MEM32(FS_BASE + (0)) = esp; /* 0x4707CE4E: mov dword ptr fs:[0], esp */ 5816 PUSH32(esp, ecx); /* 0x4707CE55: push ecx */ 5817 eax = MEM32(esp + 0x20); /* 0x4707CE56: mov eax, dword ptr [esp + 0x20] */ 5818 edx = MEM32(esp + 0x18); /* 0x4707CE5A: mov edx, dword ptr [esp + 0x18] */ 5819 PUSH32(esp, esi); /* 0x4707CE5E: push esi */ 5820 PUSH32(esp, edi); /* 0x4707CE5F: push edi */ 5821 edi = ecx; /* 0x4707CE60: mov edi, ecx */ 5822 ecx = MEM32(esp + 0x24); /* 0x4707CE62: mov ecx, dword ptr [esp + 0x24] */ 5823 PUSH32(esp, eax); /* 0x4707CE66: push eax */ 5824 eax = MEM32(esp + 0x20); /* 0x4707CE67: mov eax, dword ptr [esp + 0x20] */ 5825 PUSH32(esp, ecx); /* 0x4707CE6B: push ecx */ 5826 PUSH32(esp, edx); /* 0x4707CE6C: push edx */ 5827 PUSH32(esp, eax); /* 0x4707CE6D: push eax */ 5828 ecx = edi; /* 0x4707CE6E: mov ecx, edi */ 5829 MEM32(esp + 0x18) = edi; /* 0x4707CE70: mov dword ptr [esp + 0x18], edi */ 5830 RECOMP_ICALL(0x4707C450u); /* 0x4707CE74: call 0x4707c450 */ /* not lifted */ 5831 RECOMP_FLAGS_IN(); 5832 ecx = MEM32(esp + 0x2C); /* 0x4707CE79: mov ecx, dword ptr [esp + 0x2c] */ 5833 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5834 esi = 0; /* 0x4707CE7D: xor esi, esi */ 5835 _cf = 0; 5836 _flag_k = FK_TEST; 5837 PUSH32(esp, ecx); /* 0x4707CE7F: push ecx */ 5838 ecx = edi; /* 0x4707CE80: mov ecx, edi */ 5839 MEM32(esp + 0x18) = esi; /* 0x4707CE82: mov dword ptr [esp + 0x18], esi */ 5840 MEM32(edi + 0x10) = esi; /* 0x4707CE86: mov dword ptr [edi + 0x10], esi */ 5841 RECOMP_ICALL(0x4707CF60u); /* 0x4707CE89: call 0x4707cf60 */ /* not lifted */ 5842 RECOMP_FLAGS_IN(); 5843 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707CE8E: cmp eax, -1 */ 5844 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 5845 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5846 _flag_k = FK_CMP; 5847 if (CMP_NE(_flag_a, _flag_b)) goto L_4707CF08; /* 0x4707CE91: jne 0x4707cf08 */ 5848 L_4707CE93: 5849 PUSH32(esp, ebx); /* 0x4707CE93: push ebx */ 5850 RECOMP_ICALL(MEM32(0x470AC150)); /* 0x4707CE94: call dword ptr [0x470ac150] */ 5851 RECOMP_FLAGS_IN(); 5852 ebx = eax; /* 0x4707CE9A: mov ebx, eax */ 5853 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707CE9C: call dword ptr [0x470ac3c8] */ 5854 RECOMP_FLAGS_IN(); 5855 eax = MEM32(eax); /* 0x4707CEA2: mov eax, dword ptr [eax] */ 5856 /* cmp eax, esi */ /* 0x4707CEA4: cmp eax, esi */ 5857 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 5858 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5859 _flag_k = FK_CMP; 5860 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707CEAA; /* 0x4707CEA6: je 0x4707ceaa */ 5861 L_4707CEA8: 5862 ebx = eax; /* 0x4707CEA8: mov ebx, eax */ 5863 L_4707CEAA: 5864 RECOMP_ICALL(0x47039020u); /* 0x4707CEAA: call 0x47039020 */ /* not lifted */ 5865 RECOMP_FLAGS_IN(); 5866 esi = eax; /* 0x4707CEAF: mov esi, eax */ 5867 ecx = esi; /* 0x4707CEB1: mov ecx, esi */ 5868 RECOMP_ICALL(0x4703B210u); /* 0x4707CEB3: call 0x4703b210 */ /* not lifted */ 5869 RECOMP_FLAGS_IN(); 5870 PUSH32(esp, eax); /* 0x4707CEB8: push eax */ 5871 ecx = esi; /* 0x4707CEB9: mov ecx, esi */ 5872 RECOMP_ICALL(0x4703B240u); /* 0x4707CEBB: call 0x4703b240 */ /* not lifted */ 5873 RECOMP_FLAGS_IN(); 5874 PUSH32(esp, eax); /* 0x4707CEC0: push eax */ 5875 ecx = esi; /* 0x4707CEC1: mov ecx, esi */ 5876 RECOMP_ICALL(0x4703B080u); /* 0x4707CEC3: call 0x4703b080 */ /* not lifted */ 5877 RECOMP_FLAGS_IN(); 5878 PUSH32(esp, eax); /* 0x4707CEC8: push eax */ 5879 PUSH32(esp, ebx); /* 0x4707CEC9: push ebx */ 5880 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707CECA: push -1 */ 5881 PUSH32(esp, 0x4Au); /* 0x4707CECC: push 0x4a */ 5882 PUSH32(esp, 0x4710B1C8u); /* 0x4707CECE: push 0x4710b1c8 */ 5883 ecx = esi; /* 0x4707CED3: mov ecx, esi */ 5884 RECOMP_ICALL(0x4703A340u); /* 0x4707CED5: call 0x4703a340 */ /* not lifted */ 5885 RECOMP_FLAGS_IN(); 5886 PUSH32(esp, 0x4710B1B0u); /* 0x4707CEDA: push 0x4710b1b0 */ 5887 PUSH32(esp, 0x471055F0u); /* 0x4707CEDF: push 0x471055f0 */ 5888 PUSH32(esp, 0x80u); /* 0x4707CEE4: push 0x80 */ 5889 PUSH32(esp, esi); /* 0x4707CEE9: push esi */ 5890 RECOMP_ICALL(0x47039830u); /* 0x4707CEEA: call 0x47039830 */ /* not lifted */ 5891 RECOMP_FLAGS_IN(); 5892 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 5893 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5894 esp = esp + 0x10u; /* 0x4707CEEF: add esp, 0x10 */ 5895 _flag_k = FK_ADD; 5896 ebx = POP32_VAL(esp); /* 0x4707CEF2: pop ebx */ 5897 eax = edi; /* 0x4707CEF3: mov eax, edi */ 5898 edi = POP32_VAL(esp); /* 0x4707CEF5: pop edi */ 5899 esi = POP32_VAL(esp); /* 0x4707CEF6: pop esi */ 5900 ecx = MEM32(esp + 0x4); /* 0x4707CEF7: mov ecx, dword ptr [esp + 4] */ 5901 MEM32(FS_BASE + (0)) = ecx; /* 0x4707CEFB: mov dword ptr fs:[0], ecx */ 5902 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 5903 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5904 esp = esp + 0x10u; /* 0x4707CF02: add esp, 0x10 */ 5905 _flag_k = FK_ADD; 5906 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707CF05: ret 0x14 */ 5907 L_4707CF08: 5908 ecx = MEM32(esp + 0xC); /* 0x4707CF08: mov ecx, dword ptr [esp + 0xc] */ 5909 eax = edi; /* 0x4707CF0C: mov eax, edi */ 5910 edi = POP32_VAL(esp); /* 0x4707CF0E: pop edi */ 5911 esi = POP32_VAL(esp); /* 0x4707CF0F: pop esi */ 5912 MEM32(FS_BASE + (0)) = ecx; /* 0x4707CF10: mov dword ptr fs:[0], ecx */ 5913 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 5914 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5915 esp = esp + 0x10u; /* 0x4707CF17: add esp, 0x10 */ 5916 _flag_k = FK_ADD; 5917 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707CF1A: ret 0x14 */ 5918 RECOMP_REGS_OUT(); 5919 } 5920 5921 void sub_4707CF20(void) { 5922 int _fpu_cmp = 0; 5923 uint32_t _cf = 0; 5924 int _df = 1; 5925 uint32_t _flag_k = FK_NONE; 5926 uint32_t _flag_a = 0, _flag_b = 0; 5927 uint32_t _itail_tgt = 0; 5928 RECOMP_REGS_LOCALS 5929 RECOMP_ENTER(0x4707CF20u); 5930 5931 L_4707CF20: 5932 eax = MEM32(esp + 0x10); /* 0x4707CF20: mov eax, dword ptr [esp + 0x10] */ 5933 edx = MEM32(esp + 0x8); /* 0x4707CF24: mov edx, dword ptr [esp + 8] */ 5934 PUSH32(esp, esi); /* 0x4707CF28: push esi */ 5935 PUSH32(esp, eax); /* 0x4707CF29: push eax */ 5936 eax = MEM32(esp + 0xC); /* 0x4707CF2A: mov eax, dword ptr [esp + 0xc] */ 5937 esi = ecx; /* 0x4707CF2E: mov esi, ecx */ 5938 ecx = MEM32(esp + 0x14); /* 0x4707CF30: mov ecx, dword ptr [esp + 0x14] */ 5939 PUSH32(esp, ecx); /* 0x4707CF34: push ecx */ 5940 PUSH32(esp, edx); /* 0x4707CF35: push edx */ 5941 PUSH32(esp, eax); /* 0x4707CF36: push eax */ 5942 ecx = esi; /* 0x4707CF37: mov ecx, esi */ 5943 RECOMP_ICALL(0x4707C3B0u); /* 0x4707CF39: call 0x4707c3b0 */ /* not lifted */ 5944 RECOMP_FLAGS_IN(); 5945 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707CF3E: cmp eax, -1 */ 5946 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 5947 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5948 _flag_k = FK_CMP; 5949 if (CMP_NE(_flag_a, _flag_b)) goto L_4707CF49; /* 0x4707CF41: jne 0x4707cf49 */ 5950 L_4707CF43: 5951 _flag_a = (uint32_t)((eax | eax)); _flag_b = (uint32_t)((eax | eax)); 5952 eax = eax | eax; /* 0x4707CF43: or eax, eax */ 5953 _cf = 0; 5954 _flag_k = FK_TEST; 5955 esi = POP32_VAL(esp); /* 0x4707CF45: pop esi */ 5956 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707CF46: ret 0x14 */ 5957 L_4707CF49: 5958 ecx = MEM32(esp + 0x18); /* 0x4707CF49: mov ecx, dword ptr [esp + 0x18] */ 5959 PUSH32(esp, ecx); /* 0x4707CF4D: push ecx */ 5960 ecx = esi; /* 0x4707CF4E: mov ecx, esi */ 5961 RECOMP_ICALL(0x4707CF60u); /* 0x4707CF50: call 0x4707cf60 */ /* not lifted */ 5962 RECOMP_FLAGS_IN(); 5963 esi = POP32_VAL(esp); /* 0x4707CF55: pop esi */ 5964 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x4707CF56: ret 0x14 */ 5965 RECOMP_REGS_OUT(); 5966 } 5967 5968 void sub_4707CF60(void) { 5969 int _fpu_cmp = 0; 5970 uint32_t _cf = 0; 5971 int _df = 1; 5972 uint32_t _flag_k = FK_NONE; 5973 uint32_t _flag_a = 0, _flag_b = 0; 5974 uint32_t _itail_tgt = 0; 5975 RECOMP_REGS_LOCALS 5976 RECOMP_ENTER(0x4707CF60u); 5977 5978 L_4707CF60: 5979 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707CF60: push -1 */ 5980 PUSH32(esp, 0x470A9B33u); /* 0x4707CF62: push 0x470a9b33 */ 5981 eax = MEM32(FS_BASE + (0)); /* 0x4707CF67: mov eax, dword ptr fs:[0] */ 5982 PUSH32(esp, eax); /* 0x4707CF6D: push eax */ 5983 MEM32(FS_BASE + (0)) = esp; /* 0x4707CF6E: mov dword ptr fs:[0], esp */ 5984 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x24u); 5985 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5986 esp = esp - 0x24u; /* 0x4707CF75: sub esp, 0x24 */ 5987 _flag_k = FK_CMP; 5988 PUSH32(esp, ebx); /* 0x4707CF78: push ebx */ 5989 PUSH32(esp, esi); /* 0x4707CF79: push esi */ 5990 PUSH32(esp, edi); /* 0x4707CF7A: push edi */ 5991 PUSH32(esp, 4); /* 0x4707CF7B: push 4 */ 5992 edi = ecx; /* 0x4707CF7D: mov edi, ecx */ 5993 eax = MEM32(edi); /* 0x4707CF7F: mov eax, dword ptr [edi] */ 5994 ecx = esp + 0x10; /* 0x4707CF81: lea ecx, [esp + 0x10] */ 5995 PUSH32(esp, ecx); /* 0x4707CF85: push ecx */ 5996 PUSH32(esp, 0x20u); /* 0x4707CF86: push 0x20 */ 5997 PUSH32(esp, 0xFFFFu); /* 0x4707CF88: push 0xffff */ 5998 ebx = 1; /* 0x4707CF8D: mov ebx, 1 */ 5999 PUSH32(esp, eax); /* 0x4707CF92: push eax */ 6000 MEM32(esp + 0x20) = ebx; /* 0x4707CF93: mov dword ptr [esp + 0x20], ebx */ 6001 RECOMP_ICALL(MEM32(0x470AC440)); /* 0x4707CF97: call dword ptr [0x470ac440] */ 6002 RECOMP_FLAGS_IN(); 6003 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707CF9D: cmp eax, -1 */ 6004 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 6005 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6006 _flag_k = FK_CMP; 6007 if (CMP_NE(_flag_a, _flag_b)) goto L_4707CFC9; /* 0x4707CFA0: jne 0x4707cfc9 */ 6008 L_4707CFA2: 6009 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707CFA2: call dword ptr [0x470ac4a4] */ 6010 RECOMP_FLAGS_IN(); 6011 esi = eax; /* 0x4707CFA8: mov esi, eax */ 6012 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707CFAA: call dword ptr [0x470ac3c8] */ 6013 RECOMP_FLAGS_IN(); 6014 edi = POP32_VAL(esp); /* 0x4707CFB0: pop edi */ 6015 MEM32(eax) = esi; /* 0x4707CFB1: mov dword ptr [eax], esi */ 6016 esi = POP32_VAL(esp); /* 0x4707CFB3: pop esi */ 6017 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 6018 eax = eax | 0xFFFFFFFFu; /* 0x4707CFB4: or eax, 0xffffffff */ 6019 _cf = 0; 6020 _flag_k = FK_TEST; 6021 ebx = POP32_VAL(esp); /* 0x4707CFB7: pop ebx */ 6022 ecx = MEM32(esp + 0x24); /* 0x4707CFB8: mov ecx, dword ptr [esp + 0x24] */ 6023 MEM32(FS_BASE + (0)) = ecx; /* 0x4707CFBC: mov dword ptr fs:[0], ecx */ 6024 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x30u); 6025 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6026 esp = esp + 0x30u; /* 0x4707CFC3: add esp, 0x30 */ 6027 _flag_k = FK_ADD; 6028 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x4707CFC6: ret 4 */ 6029 L_4707CFC9: 6030 PUSH32(esp, 0xFFFFFFFFu); /* 0x4707CFC9: push -1 */ 6031 PUSH32(esp, 0); /* 0x4707CFCB: push 0 */ 6032 ecx = esp + 0x1C; /* 0x4707CFCD: lea ecx, [esp + 0x1c] */ 6033 RECOMP_ICALL(0x47031F70u); /* 0x4707CFD1: call 0x47031f70 */ /* not lifted */ 6034 RECOMP_FLAGS_IN(); 6035 PUSH32(esp, 0x20u); /* 0x4707CFD6: push 0x20 */ 6036 MEM32(esp + 0x3C) = 0; /* 0x4707CFD8: mov dword ptr [esp + 0x3c], 0 */ 6037 RECOMP_ICALL(0x470A33F2u); /* 0x4707CFE0: call 0x470a33f2 */ /* not lifted */ 6038 RECOMP_FLAGS_IN(); 6039 esi = eax; /* 0x4707CFE5: mov esi, eax */ 6040 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6041 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6042 esp = esp + 4; /* 0x4707CFE7: add esp, 4 */ 6043 _flag_k = FK_ADD; 6044 MEM32(esp + 0x10) = esi; /* 0x4707CFEA: mov dword ptr [esp + 0x10], esi */ 6045 /* test esi, esi */ /* 0x4707CFEE: test esi, esi */ 6046 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 6047 _cf = 0; 6048 _flag_k = FK_TEST; 6049 MEM8(esp + 0x38) = (uint8_t)(LO8(ebx)); /* 0x4707CFF0: mov byte ptr [esp + 0x38], bl */ 6050 if (TEST_Z(_flag_a, _flag_b)) goto L_4707D00A; /* 0x4707CFF4: je 0x4707d00a */ 6051 L_4707CFF6: 6052 ebx = MEM32(edi + 0x10); /* 0x4707CFF6: mov ebx, dword ptr [edi + 0x10] */ 6053 edx = esp + 0x14; /* 0x4707CFF9: lea edx, [esp + 0x14] */ 6054 PUSH32(esp, edx); /* 0x4707CFFD: push edx */ 6055 ecx = esi; /* 0x4707CFFE: mov ecx, esi */ 6056 RECOMP_ICALL(0x47031A30u); /* 0x4707D000: call 0x47031a30 */ /* not lifted */ 6057 RECOMP_FLAGS_IN(); 6058 MEM32(esi + 0x1C) = ebx; /* 0x4707D005: mov dword ptr [esi + 0x1c], ebx */ 6059 goto L_4707D00C; /* 0x4707D008: jmp 0x4707d00c */ 6060 L_4707D00A: 6061 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6062 esi = 0; /* 0x4707D00A: xor esi, esi */ 6063 _cf = 0; 6064 _flag_k = FK_TEST; 6065 L_4707D00C: 6066 /* test esi, esi */ /* 0x4707D00C: test esi, esi */ 6067 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 6068 _cf = 0; 6069 _flag_k = FK_TEST; 6070 MEM32(edi + 0x10) = esi; /* 0x4707D00E: mov dword ptr [edi + 0x10], esi */ 6071 if (TEST_NZ(_flag_a, _flag_b)) goto L_4707D04F; /* 0x4707D011: jne 0x4707d04f */ 6072 L_4707D013: 6073 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707D013: call dword ptr [0x470ac3c8] */ 6074 RECOMP_FLAGS_IN(); 6075 MEM32(eax) = 0xCu; /* 0x4707D019: mov dword ptr [eax], 0xc */ 6076 ecx = esp + 0x14; /* 0x4707D01F: lea ecx, [esp + 0x14] */ 6077 MEM32(esp + 0x38) = 0xFFFFFFFFu; /* 0x4707D023: mov dword ptr [esp + 0x38], 0xffffffff */ 6078 MEM32(esp + 0x14) = 0x470AC520u; /* 0x4707D02B: mov dword ptr [esp + 0x14], 0x470ac520 */ 6079 RECOMP_ICALL(0x47014F70u); /* 0x4707D033: call 0x47014f70 */ /* not lifted */ 6080 RECOMP_FLAGS_IN(); 6081 edi = POP32_VAL(esp); /* 0x4707D038: pop edi */ 6082 esi = POP32_VAL(esp); /* 0x4707D039: pop esi */ 6083 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 6084 eax = eax | 0xFFFFFFFFu; /* 0x4707D03A: or eax, 0xffffffff */ 6085 _cf = 0; 6086 _flag_k = FK_TEST; 6087 ebx = POP32_VAL(esp); /* 0x4707D03D: pop ebx */ 6088 ecx = MEM32(esp + 0x24); /* 0x4707D03E: mov ecx, dword ptr [esp + 0x24] */ 6089 MEM32(FS_BASE + (0)) = ecx; /* 0x4707D042: mov dword ptr fs:[0], ecx */ 6090 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x30u); 6091 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6092 esp = esp + 0x30u; /* 0x4707D049: add esp, 0x30 */ 6093 _flag_k = FK_ADD; 6094 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x4707D04C: ret 4 */ 6095 L_4707D04F: 6096 ecx = esp + 0x14; /* 0x4707D04F: lea ecx, [esp + 0x14] */ 6097 MEM32(esp + 0x38) = 0xFFFFFFFFu; /* 0x4707D053: mov dword ptr [esp + 0x38], 0xffffffff */ 6098 MEM32(esp + 0x14) = 0x470AC520u; /* 0x4707D05B: mov dword ptr [esp + 0x14], 0x470ac520 */ 6099 RECOMP_ICALL(0x47014F70u); /* 0x4707D063: call 0x47014f70 */ /* not lifted */ 6100 RECOMP_FLAGS_IN(); 6101 ecx = MEM32(esp + 0x30); /* 0x4707D068: mov ecx, dword ptr [esp + 0x30] */ 6102 edi = POP32_VAL(esp); /* 0x4707D06C: pop edi */ 6103 esi = POP32_VAL(esp); /* 0x4707D06D: pop esi */ 6104 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6105 eax = 0; /* 0x4707D06E: xor eax, eax */ 6106 _cf = 0; 6107 _flag_k = FK_TEST; 6108 ebx = POP32_VAL(esp); /* 0x4707D070: pop ebx */ 6109 MEM32(FS_BASE + (0)) = ecx; /* 0x4707D071: mov dword ptr fs:[0], ecx */ 6110 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x30u); 6111 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6112 esp = esp + 0x30u; /* 0x4707D078: add esp, 0x30 */ 6113 _flag_k = FK_ADD; 6114 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x4707D07B: ret 4 */ 6115 RECOMP_REGS_OUT(); 6116 } 6117 6118 void sub_4707D080(void) { 6119 int _fpu_cmp = 0; 6120 uint32_t _cf = 0; 6121 int _df = 1; 6122 uint32_t _flag_k = FK_NONE; 6123 uint32_t _flag_a = 0, _flag_b = 0; 6124 uint32_t _itail_tgt = 0; 6125 RECOMP_REGS_LOCALS 6126 RECOMP_ENTER(0x4707D080u); 6127 6128 L_4707D080: 6129 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6130 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6131 esp = esp - 8; /* 0x4707D080: sub esp, 8 */ 6132 _flag_k = FK_CMP; 6133 PUSH32(esp, ebx); /* 0x4707D083: push ebx */ 6134 PUSH32(esp, ebp); /* 0x4707D084: push ebp */ 6135 PUSH32(esp, esi); /* 0x4707D085: push esi */ 6136 PUSH32(esp, edi); /* 0x4707D086: push edi */ 6137 edi = ecx; /* 0x4707D087: mov edi, ecx */ 6138 esi = MEM32(edi + 0x10); /* 0x4707D089: mov esi, dword ptr [edi + 0x10] */ 6139 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6140 eax = 0; /* 0x4707D08C: xor eax, eax */ 6141 _cf = 0; 6142 _flag_k = FK_TEST; 6143 /* cmp esi, eax */ /* 0x4707D08E: cmp esi, eax */ 6144 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 6145 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6146 _flag_k = FK_CMP; 6147 MEM32(esp + 0x10) = eax; /* 0x4707D090: mov dword ptr [esp + 0x10], eax */ 6148 MEM32(esp + 0x14) = eax; /* 0x4707D094: mov dword ptr [esp + 0x14], eax */ 6149 if (CMP_NE(_flag_a, _flag_b)) goto L_4707D0A7; /* 0x4707D098: jne 0x4707d0a7 */ 6150 L_4707D09A: 6151 edi = POP32_VAL(esp); /* 0x4707D09A: pop edi */ 6152 esi = POP32_VAL(esp); /* 0x4707D09B: pop esi */ 6153 ebp = POP32_VAL(esp); /* 0x4707D09C: pop ebp */ 6154 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 6155 eax = eax | 0xFFFFFFFFu; /* 0x4707D09D: or eax, 0xffffffff */ 6156 _cf = 0; 6157 _flag_k = FK_TEST; 6158 ebx = POP32_VAL(esp); /* 0x4707D0A0: pop ebx */ 6159 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6160 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6161 esp = esp + 8; /* 0x4707D0A1: add esp, 8 */ 6162 _flag_k = FK_ADD; 6163 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707D0A4: ret 0x10 */ 6164 L_4707D0A7: 6165 ebx = MEM32(esp + 0x28); /* 0x4707D0A7: mov ebx, dword ptr [esp + 0x28] */ 6166 ebp = MEM32(esp + 0x20); /* 0x4707D0AB: mov ebp, dword ptr [esp + 0x20] */ 6167 L_4707D0AF: 6168 eax = MEM32(esp + 0x24); /* 0x4707D0AF: mov eax, dword ptr [esp + 0x24] */ 6169 PUSH32(esp, 1); /* 0x4707D0B3: push 1 */ 6170 PUSH32(esp, eax); /* 0x4707D0B5: push eax */ 6171 ecx = esi; /* 0x4707D0B6: mov ecx, esi */ 6172 RECOMP_ICALL(0x47032340u); /* 0x4707D0B8: call 0x47032340 */ /* not lifted */ 6173 RECOMP_FLAGS_IN(); 6174 edx = MEM32(esi); /* 0x4707D0BD: mov edx, dword ptr [esi] */ 6175 ecx = esi; /* 0x4707D0BF: mov ecx, esi */ 6176 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x4707D0C1: call dword ptr [edx + 4] */ 6177 RECOMP_FLAGS_IN(); 6178 ecx = MEM32(esi + 0x8); /* 0x4707D0C4: mov ecx, dword ptr [esi + 8] */ 6179 edx = MEM32(edi); /* 0x4707D0C7: mov edx, dword ptr [edi] */ 6180 PUSH32(esp, ecx); /* 0x4707D0C9: push ecx */ 6181 PUSH32(esp, eax); /* 0x4707D0CA: push eax */ 6182 eax = MEM32(esp + 0x24); /* 0x4707D0CB: mov eax, dword ptr [esp + 0x24] */ 6183 PUSH32(esp, ebx); /* 0x4707D0CF: push ebx */ 6184 PUSH32(esp, ebp); /* 0x4707D0D0: push ebp */ 6185 PUSH32(esp, eax); /* 0x4707D0D1: push eax */ 6186 PUSH32(esp, edx); /* 0x4707D0D2: push edx */ 6187 RECOMP_ICALL(MEM32(0x470AC4B8)); /* 0x4707D0D3: call dword ptr [0x470ac4b8] */ 6188 RECOMP_FLAGS_IN(); 6189 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707D0D9: cmp eax, -1 */ 6190 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 6191 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6192 _flag_k = FK_CMP; 6193 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707D0FA; /* 0x4707D0DC: je 0x4707d0fa */ 6194 L_4707D0DE: 6195 edx = MEM32(esp + 0x14); /* 0x4707D0DE: mov edx, dword ptr [esp + 0x14] */ 6196 ecx = MEM32(esp + 0x10); /* 0x4707D0E2: mov ecx, dword ptr [esp + 0x10] */ 6197 esi = MEM32(esi + 0x1C); /* 0x4707D0E6: mov esi, dword ptr [esi + 0x1c] */ 6198 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 6199 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6200 edx = edx + eax; /* 0x4707D0E9: add edx, eax */ 6201 _flag_k = FK_ADD; 6202 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 6203 ecx = ecx + 1; /* 0x4707D0EB: inc ecx */ 6204 _flag_k = FK_INC; 6205 /* test esi, esi */ /* 0x4707D0EC: test esi, esi */ 6206 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 6207 _cf = 0; 6208 _flag_k = FK_TEST; 6209 MEM32(esp + 0x14) = edx; /* 0x4707D0EE: mov dword ptr [esp + 0x14], edx */ 6210 MEM32(esp + 0x10) = ecx; /* 0x4707D0F2: mov dword ptr [esp + 0x10], ecx */ 6211 if (TEST_Z(_flag_a, _flag_b)) goto L_4707D117; /* 0x4707D0F6: je 0x4707d117 */ 6212 L_4707D0F8: 6213 RECOMP_BACKEDGE(); 6214 goto L_4707D0AF; /* 0x4707D0F8: jmp 0x4707d0af */ 6215 L_4707D0FA: 6216 RECOMP_ICALL(MEM32(0x470AC4A4)); /* 0x4707D0FA: call dword ptr [0x470ac4a4] */ 6217 RECOMP_FLAGS_IN(); 6218 esi = eax; /* 0x4707D100: mov esi, eax */ 6219 RECOMP_ICALL(MEM32(0x470AC3C8)); /* 0x4707D102: call dword ptr [0x470ac3c8] */ 6220 RECOMP_FLAGS_IN(); 6221 edi = POP32_VAL(esp); /* 0x4707D108: pop edi */ 6222 MEM32(eax) = esi; /* 0x4707D109: mov dword ptr [eax], esi */ 6223 esi = POP32_VAL(esp); /* 0x4707D10B: pop esi */ 6224 ebp = POP32_VAL(esp); /* 0x4707D10C: pop ebp */ 6225 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 6226 eax = eax | 0xFFFFFFFFu; /* 0x4707D10D: or eax, 0xffffffff */ 6227 _cf = 0; 6228 _flag_k = FK_TEST; 6229 ebx = POP32_VAL(esp); /* 0x4707D110: pop ebx */ 6230 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6231 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6232 esp = esp + 8; /* 0x4707D111: add esp, 8 */ 6233 _flag_k = FK_ADD; 6234 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707D114: ret 0x10 */ 6235 L_4707D117: 6236 eax = MEM32(esp + 0x10); /* 0x4707D117: mov eax, dword ptr [esp + 0x10] */ 6237 /* test eax, eax */ /* 0x4707D11B: test eax, eax */ 6238 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6239 _cf = 0; 6240 _flag_k = FK_TEST; 6241 if (TEST_NZ(_flag_a, _flag_b)) goto L_4707D12B; /* 0x4707D11D: jne 0x4707d12b */ 6242 L_4707D11F: 6243 edi = POP32_VAL(esp); /* 0x4707D11F: pop edi */ 6244 esi = POP32_VAL(esp); /* 0x4707D120: pop esi */ 6245 ebp = POP32_VAL(esp); /* 0x4707D121: pop ebp */ 6246 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6247 eax = 0; /* 0x4707D122: xor eax, eax */ 6248 _cf = 0; 6249 _flag_k = FK_TEST; 6250 ebx = POP32_VAL(esp); /* 0x4707D124: pop ebx */ 6251 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6252 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6253 esp = esp + 8; /* 0x4707D125: add esp, 8 */ 6254 _flag_k = FK_ADD; 6255 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707D128: ret 0x10 */ 6256 L_4707D12B: 6257 eax = MEM32(esp + 0x14); /* 0x4707D12B: mov eax, dword ptr [esp + 0x14] */ 6258 edi = POP32_VAL(esp); /* 0x4707D12F: pop edi */ 6259 esi = POP32_VAL(esp); /* 0x4707D130: pop esi */ 6260 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6261 edx = 0; /* 0x4707D131: xor edx, edx */ 6262 _cf = 0; 6263 _flag_k = FK_TEST; 6264 { uint64_t _dividend = ((uint64_t)edx << 32) | eax; uint32_t _dv = (uint32_t)MEM32(esp + 0x8); /* 0x4707D133: div dword ptr [esp + 8] */ 6265 if (_dv) { eax = (uint32_t)(_dividend / _dv); edx = (uint32_t)(_dividend % _dv); } 6266 else { eax = 0; edx = 0; } } 6267 ebp = POP32_VAL(esp); /* 0x4707D137: pop ebp */ 6268 ebx = POP32_VAL(esp); /* 0x4707D138: pop ebx */ 6269 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6270 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6271 esp = esp + 8; /* 0x4707D139: add esp, 8 */ 6272 _flag_k = FK_ADD; 6273 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707D13C: ret 0x10 */ 6274 RECOMP_REGS_OUT(); 6275 } 6276 6277 void sub_4707D140(void) { 6278 int _fpu_cmp = 0; 6279 uint32_t _cf = 0; 6280 int _df = 1; 6281 uint32_t _flag_k = FK_NONE; 6282 uint32_t _flag_a = 0, _flag_b = 0; 6283 uint32_t _itail_tgt = 0; 6284 RECOMP_REGS_LOCALS 6285 RECOMP_ENTER(0x4707D140u); 6286 6287 L_4707D140: 6288 PUSH32(esp, ebx); /* 0x4707D140: push ebx */ 6289 PUSH32(esp, ebp); /* 0x4707D141: push ebp */ 6290 PUSH32(esp, esi); /* 0x4707D142: push esi */ 6291 PUSH32(esp, edi); /* 0x4707D143: push edi */ 6292 edi = ecx; /* 0x4707D144: mov edi, ecx */ 6293 esi = MEM32(edi + 0x10); /* 0x4707D146: mov esi, dword ptr [edi + 0x10] */ 6294 /* test esi, esi */ /* 0x4707D149: test esi, esi */ 6295 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 6296 _cf = 0; 6297 _flag_k = FK_TEST; 6298 if (TEST_NZ(_flag_a, _flag_b)) goto L_4707D157; /* 0x4707D14B: jne 0x4707d157 */ 6299 L_4707D14D: 6300 edi = POP32_VAL(esp); /* 0x4707D14D: pop edi */ 6301 esi = POP32_VAL(esp); /* 0x4707D14E: pop esi */ 6302 ebp = POP32_VAL(esp); /* 0x4707D14F: pop ebp */ 6303 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 6304 eax = eax | 0xFFFFFFFFu; /* 0x4707D150: or eax, 0xffffffff */ 6305 _cf = 0; 6306 _flag_k = FK_TEST; 6307 ebx = POP32_VAL(esp); /* 0x4707D153: pop ebx */ 6308 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707D154: ret 0x10 */ 6309 L_4707D157: 6310 ebx = MEM32(esp + 0x20); /* 0x4707D157: mov ebx, dword ptr [esp + 0x20] */ 6311 ebp = MEM32(esp + 0x18); /* 0x4707D15B: mov ebp, dword ptr [esp + 0x18] */ 6312 L_4707D15F: 6313 eax = MEM32(esp + 0x14); /* 0x4707D15F: mov eax, dword ptr [esp + 0x14] */ 6314 PUSH32(esp, ebx); /* 0x4707D163: push ebx */ 6315 PUSH32(esp, esi); /* 0x4707D164: push esi */ 6316 PUSH32(esp, ebp); /* 0x4707D165: push ebp */ 6317 PUSH32(esp, eax); /* 0x4707D166: push eax */ 6318 ecx = edi; /* 0x4707D167: mov ecx, edi */ 6319 RECOMP_ICALL(0x4707C6C0u); /* 0x4707D169: call 0x4707c6c0 */ /* not lifted */ 6320 RECOMP_FLAGS_IN(); 6321 /* cmp eax, 0xFFFFFFFFu */ /* 0x4707D16E: cmp eax, -1 */ 6322 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 6323 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6324 _flag_k = FK_CMP; 6325 RECOMP_BACKEDGE(); 6326 if (CMP_EQ(_flag_a, _flag_b)) goto L_4707D14D; /* 0x4707D171: je 0x4707d14d */ 6327 L_4707D173: 6328 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x20u); 6329 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6330 esi = esi + 0x20u; /* 0x4707D173: add esi, 0x20 */ 6331 _flag_k = FK_ADD; 6332 RECOMP_BACKEDGE(); 6333 if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_NE)) goto L_4707D15F; /* 0x4707D176: jne 0x4707d15f */ 6334 L_4707D178: 6335 edi = POP32_VAL(esp); /* 0x4707D178: pop edi */ 6336 esi = POP32_VAL(esp); /* 0x4707D179: pop esi */ 6337 ebp = POP32_VAL(esp); /* 0x4707D17A: pop ebp */ 6338 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6339 eax = 0; /* 0x4707D17B: xor eax, eax */ 6340 _cf = 0; 6341 _flag_k = FK_TEST; 6342 ebx = POP32_VAL(esp); /* 0x4707D17D: pop ebx */ 6343 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707D17E: ret 0x10 */ 6344 RECOMP_REGS_OUT(); 6345 } 6346 6347 void sub_4707D190(void) { 6348 int _fpu_cmp = 0; 6349 uint32_t _cf = 0; 6350 int _df = 1; 6351 uint32_t _flag_k = FK_NONE; 6352 uint32_t _flag_a = 0, _flag_b = 0; 6353 uint32_t _itail_tgt = 0; 6354 RECOMP_REGS_LOCALS 6355 RECOMP_ENTER(0x4707D190u); 6356 6357 L_4707D190: 6358 eax = MEM32(esp + 0x10); /* 0x4707D190: mov eax, dword ptr [esp + 0x10] */ 6359 edx = MEM32(esp + 0xC); /* 0x4707D194: mov edx, dword ptr [esp + 0xc] */ 6360 PUSH32(esp, eax); /* 0x4707D198: push eax */ 6361 eax = MEM32(esp + 0xC); /* 0x4707D199: mov eax, dword ptr [esp + 0xc] */ 6362 PUSH32(esp, edx); /* 0x4707D19D: push edx */ 6363 edx = MEM32(esp + 0xC); /* 0x4707D19E: mov edx, dword ptr [esp + 0xc] */ 6364 PUSH32(esp, eax); /* 0x4707D1A2: push eax */ 6365 PUSH32(esp, edx); /* 0x4707D1A3: push edx */ 6366 RECOMP_ICALL(0x4707C6C0u); /* 0x4707D1A4: call 0x4707c6c0 */ /* not lifted */ 6367 RECOMP_FLAGS_IN(); 6368 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x4707D1A9: ret 0x10 */ 6369 RECOMP_REGS_OUT(); 6370 } 6371 6372 void sub_4707D1B0(void) { 6373 int _fpu_cmp = 0; 6374 uint32_t _cf = 0; 6375 int _df = 1; 6376 uint32_t _flag_k = FK_NONE; 6377 uint32_t _flag_a = 0, _flag_b = 0; 6378 uint32_t _itail_tgt = 0; 6379 RECOMP_REGS_LOCALS 6380 RECOMP_ENTER(0x4707D1B0u); 6381 6382 L_4707D1B0: 6383 ecx = 0x4710EFD1u; /* 0x4707D1B0: mov ecx, 0x4710efd1 */ 6384 RECOMP_ICALL(MEM32(0x470AC1C8)); /* 0x4707D1B5: call dword ptr [0x470ac1c8] */ 6385 RECOMP_FLAGS_IN(); 6386 PUSH32(esp, 0x4707D1D0u); /* 0x4707D1BB: push 0x4707d1d0 */ 6387 RECOMP_ICALL(0x470A32D9u); /* 0x4707D1C0: call 0x470a32d9 */ /* not lifted */ 6388 RECOMP_FLAGS_IN(); 6389 ecx = POP32_VAL(esp); /* 0x4707D1C5: pop ecx */ 6390 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707D1C6: ret */ 6391 RECOMP_REGS_OUT(); 6392 } 6393 6394 void sub_4707D1D0(void) { 6395 int _fpu_cmp = 0; 6396 uint32_t _cf = 0; 6397 int _df = 1; 6398 uint32_t _flag_k = FK_NONE; 6399 uint32_t _flag_a = 0, _flag_b = 0; 6400 uint32_t _itail_tgt = 0; 6401 RECOMP_REGS_LOCALS 6402 RECOMP_ENTER(0x4707D1D0u); 6403 6404 L_4707D1D0: 6405 ecx = 0x4710EFD1u; /* 0x4707D1D0: mov ecx, 0x4710efd1 */ 6406 L_4707D1D5: 6407 { _itail_tgt = (uint32_t)(MEM32(0x470AC1BC)); goto _ljump; } 6408 { RECOMP_REGS_OUT(); return; } /* end of function */ 6409 _ljump: 6410 switch (_itail_tgt) { 6411 case 0x4707D1D0u: goto L_4707D1D0; 6412 case 0x4707D1D5u: goto L_4707D1D5; 6413 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 6414 } 6415 RECOMP_REGS_OUT(); 6416 } 6417 6418 void sub_4707D1E0(void) { 6419 int _fpu_cmp = 0; 6420 uint32_t _cf = 0; 6421 int _df = 1; 6422 uint32_t _flag_k = FK_NONE; 6423 uint32_t _flag_a = 0, _flag_b = 0; 6424 uint32_t _itail_tgt = 0; 6425 RECOMP_REGS_LOCALS 6426 RECOMP_ENTER(0x4707D1E0u); 6427 6428 L_4707D1E0: 6429 ecx = 0x4710EFD0u; /* 0x4707D1E0: mov ecx, 0x4710efd0 */ 6430 RECOMP_ICALL(MEM32(0x470AC1C4)); /* 0x4707D1E5: call dword ptr [0x470ac1c4] */ 6431 RECOMP_FLAGS_IN(); 6432 PUSH32(esp, 0x4707D200u); /* 0x4707D1EB: push 0x4707d200 */ 6433 RECOMP_ICALL(0x470A32D9u); /* 0x4707D1F0: call 0x470a32d9 */ /* not lifted */ 6434 RECOMP_FLAGS_IN(); 6435 ecx = POP32_VAL(esp); /* 0x4707D1F5: pop ecx */ 6436 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707D1F6: ret */ 6437 RECOMP_REGS_OUT(); 6438 } 6439 6440 void sub_4707D200(void) { 6441 int _fpu_cmp = 0; 6442 uint32_t _cf = 0; 6443 int _df = 1; 6444 uint32_t _flag_k = FK_NONE; 6445 uint32_t _flag_a = 0, _flag_b = 0; 6446 uint32_t _itail_tgt = 0; 6447 RECOMP_REGS_LOCALS 6448 RECOMP_ENTER(0x4707D200u); 6449 6450 L_4707D200: 6451 ecx = 0x4710EFD0u; /* 0x4707D200: mov ecx, 0x4710efd0 */ 6452 L_4707D205: 6453 { _itail_tgt = (uint32_t)(MEM32(0x470AC1C0)); goto _ljump; } 6454 { RECOMP_REGS_OUT(); return; } /* end of function */ 6455 _ljump: 6456 switch (_itail_tgt) { 6457 case 0x4707D200u: goto L_4707D200; 6458 case 0x4707D205u: goto L_4707D205; 6459 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 6460 } 6461 RECOMP_REGS_OUT(); 6462 } 6463 6464 void sub_4707D210(void) { 6465 int _fpu_cmp = 0; 6466 uint32_t _cf = 0; 6467 int _df = 1; 6468 uint32_t _flag_k = FK_NONE; 6469 uint32_t _flag_a = 0, _flag_b = 0; 6470 uint32_t _itail_tgt = 0; 6471 RECOMP_REGS_LOCALS 6472 RECOMP_ENTER(0x4707D210u); 6473 6474 L_4707D210: 6475 MEM32(0x4710EFC4) = 0x47104A3Cu; /* 0x4707D210: mov dword ptr [0x4710efc4], 0x47104a3c */ 6476 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4707D21A: ret */ 6477 RECOMP_REGS_OUT(); 6478 }