client/game/hhr.dll/lifted-0003.c (383769B)
1 #define RECOMP_GENERATED_CODE 2 #include "recomp_types.h" 3 #include <math.h> 4 #include <stdio.h> 5 #include <stdlib.h> 6 #include <string.h> 7 8 void sub_31006F00(void) { 9 int _fpu_cmp = 0; 10 uint32_t _cf = 0; 11 int _df = 1; 12 uint32_t _flag_k = FK_NONE; 13 uint32_t _flag_a = 0, _flag_b = 0; 14 uint32_t _itail_tgt = 0; 15 RECOMP_REGS_LOCALS 16 RECOMP_ENTER(0x31006F00u); 17 18 L_31006F00: 19 PUSH32(esp, ebp); /* 0x31006F00: push ebp */ 20 ebp = esp; /* 0x31006F01: mov ebp, esp */ 21 PUSH32(esp, ebx); /* 0x31006F03: push ebx */ 22 SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x31006F04: mov bl, byte ptr [ebp + 8] */ 23 /* test LO8(ebx), 2 */ /* 0x31006F07: test bl, 2 */ 24 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 25 _cf = 0; 26 _flag_k = FK_NARROW(FK_TEST, 24); 27 PUSH32(esp, esi); /* 0x31006F0A: push esi */ 28 esi = ecx; /* 0x31006F0B: mov esi, ecx */ 29 if (TEST_Z(_flag_a, _flag_b)) goto L_31006F3B; /* 0x31006F0D: je 0x31006f3b */ 30 L_31006F0F: 31 eax = MEM32(esi + (-0x4)); /* 0x31006F0F: mov eax, dword ptr [esi - 4] */ 32 PUSH32(esp, edi); /* 0x31006F12: push edi */ 33 PUSH32(esp, 0x31006F60u); /* 0x31006F13: push 0x31006f60 */ 34 edi = esi + (-0x4); /* 0x31006F18: lea edi, [esi - 4] */ 35 PUSH32(esp, eax); /* 0x31006F1B: push eax */ 36 PUSH32(esp, 0x10u); /* 0x31006F1C: push 0x10 */ 37 PUSH32(esp, esi); /* 0x31006F1E: push esi */ 38 RECOMP_ICALL(0x310468E0u); /* 0x31006F1F: call 0x310468e0 */ /* not lifted */ 39 RECOMP_FLAGS_IN(); 40 /* test LO8(ebx), 1 */ /* 0x31006F24: test bl, 1 */ 41 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 42 _cf = 0; 43 _flag_k = FK_NARROW(FK_TEST, 24); 44 if (TEST_Z(_flag_a, _flag_b)) goto L_31006F32; /* 0x31006F27: je 0x31006f32 */ 45 L_31006F29: 46 PUSH32(esp, edi); /* 0x31006F29: push edi */ 47 RECOMP_ICALL(0x31046858u); /* 0x31006F2A: call 0x31046858 */ /* not lifted */ 48 RECOMP_FLAGS_IN(); 49 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 50 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 51 esp = esp + 4; /* 0x31006F2F: add esp, 4 */ 52 _flag_k = FK_ADD; 53 L_31006F32: 54 eax = edi; /* 0x31006F32: mov eax, edi */ 55 edi = POP32_VAL(esp); /* 0x31006F34: pop edi */ 56 esi = POP32_VAL(esp); /* 0x31006F35: pop esi */ 57 ebx = POP32_VAL(esp); /* 0x31006F36: pop ebx */ 58 ebp = POP32_VAL(esp); /* 0x31006F37: pop ebp */ 59 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31006F38: ret 4 */ 60 L_31006F3B: 61 ecx = esi; /* 0x31006F3B: mov ecx, esi */ 62 RECOMP_ICALL(0x31006F60u); /* 0x31006F3D: call 0x31006f60 */ /* not lifted */ 63 RECOMP_FLAGS_IN(); 64 /* test LO8(ebx), 1 */ /* 0x31006F42: test bl, 1 */ 65 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 66 _cf = 0; 67 _flag_k = FK_NARROW(FK_TEST, 24); 68 if (TEST_Z(_flag_a, _flag_b)) goto L_31006F50; /* 0x31006F45: je 0x31006f50 */ 69 L_31006F47: 70 PUSH32(esp, esi); /* 0x31006F47: push esi */ 71 RECOMP_ICALL(0x31046858u); /* 0x31006F48: call 0x31046858 */ /* not lifted */ 72 RECOMP_FLAGS_IN(); 73 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 74 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 75 esp = esp + 4; /* 0x31006F4D: add esp, 4 */ 76 _flag_k = FK_ADD; 77 L_31006F50: 78 eax = esi; /* 0x31006F50: mov eax, esi */ 79 esi = POP32_VAL(esp); /* 0x31006F52: pop esi */ 80 ebx = POP32_VAL(esp); /* 0x31006F53: pop ebx */ 81 ebp = POP32_VAL(esp); /* 0x31006F54: pop ebp */ 82 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31006F55: ret 4 */ 83 RECOMP_REGS_OUT(); 84 } 85 86 void sub_31006F60(void) { 87 int _fpu_cmp = 0; 88 uint32_t _cf = 0; 89 int _df = 1; 90 uint32_t _flag_k = FK_NONE; 91 uint32_t _flag_a = 0, _flag_b = 0; 92 uint32_t _itail_tgt = 0; 93 RECOMP_REGS_LOCALS 94 RECOMP_ENTER(0x31006F60u); 95 96 L_31006F60: 97 PUSH32(esp, ebp); /* 0x31006F60: push ebp */ 98 ebp = esp; /* 0x31006F61: mov ebp, esp */ 99 PUSH32(esp, 0xFFFFFFFFu); /* 0x31006F63: push -1 */ 100 PUSH32(esp, 0x31047018u); /* 0x31006F65: push 0x31047018 */ 101 eax = MEM32(FS_BASE + (0)); /* 0x31006F6A: mov eax, dword ptr fs:[0] */ 102 PUSH32(esp, eax); /* 0x31006F70: push eax */ 103 MEM32(FS_BASE + (0)) = esp; /* 0x31006F71: mov dword ptr fs:[0], esp */ 104 PUSH32(esp, ecx); /* 0x31006F78: push ecx */ 105 PUSH32(esp, esi); /* 0x31006F79: push esi */ 106 esi = ecx; /* 0x31006F7A: mov esi, ecx */ 107 MEM32(ebp + (-0x10)) = esi; /* 0x31006F7C: mov dword ptr [ebp - 0x10], esi */ 108 MEM32(esi) = 0x310484E4u; /* 0x31006F7F: mov dword ptr [esi], 0x310484e4 */ 109 ecx = MEM32(esi + 0xC); /* 0x31006F85: mov ecx, dword ptr [esi + 0xc] */ 110 /* test ecx, ecx */ /* 0x31006F88: test ecx, ecx */ 111 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 112 _cf = 0; 113 _flag_k = FK_TEST; 114 MEM32(ebp + (-0x4)) = 0; /* 0x31006F8A: mov dword ptr [ebp - 4], 0 */ 115 if (TEST_Z(_flag_a, _flag_b)) goto L_31006F9F; /* 0x31006F91: je 0x31006f9f */ 116 L_31006F93: 117 RECOMP_ICALL(0x31008F50u); /* 0x31006F93: call 0x31008f50 */ /* not lifted */ 118 RECOMP_FLAGS_IN(); 119 MEM32(esi + 0xC) = 0; /* 0x31006F98: mov dword ptr [esi + 0xc], 0 */ 120 L_31006F9F: 121 ecx = MEM32(esi + 0x8); /* 0x31006F9F: mov ecx, dword ptr [esi + 8] */ 122 /* test ecx, ecx */ /* 0x31006FA2: test ecx, ecx */ 123 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 124 _cf = 0; 125 _flag_k = FK_TEST; 126 if (TEST_Z(_flag_a, _flag_b)) goto L_31006FAC; /* 0x31006FA4: je 0x31006fac */ 127 L_31006FA6: 128 eax = MEM32(ecx); /* 0x31006FA6: mov eax, dword ptr [ecx] */ 129 PUSH32(esp, 1); /* 0x31006FA8: push 1 */ 130 RECOMP_ICALL(MEM32(eax)); /* 0x31006FAA: call dword ptr [eax] */ 131 RECOMP_FLAGS_IN(); 132 L_31006FAC: 133 ecx = esi; /* 0x31006FAC: mov ecx, esi */ 134 MEM32(esi + 0x8) = 0; /* 0x31006FAE: mov dword ptr [esi + 8], 0 */ 135 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x31006FB5: mov dword ptr [ebp - 4], 0xffffffff */ 136 RECOMP_ICALL(0x31004E20u); /* 0x31006FBC: call 0x31004e20 */ /* not lifted */ 137 RECOMP_FLAGS_IN(); 138 ecx = MEM32(ebp + (-0xC)); /* 0x31006FC1: mov ecx, dword ptr [ebp - 0xc] */ 139 esi = POP32_VAL(esp); /* 0x31006FC4: pop esi */ 140 MEM32(FS_BASE + (0)) = ecx; /* 0x31006FC5: mov dword ptr fs:[0], ecx */ 141 esp = ebp; /* 0x31006FCC: mov esp, ebp */ 142 ebp = POP32_VAL(esp); /* 0x31006FCE: pop ebp */ 143 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31006FCF: ret */ 144 RECOMP_REGS_OUT(); 145 } 146 147 void sub_31006FD0(void) { 148 int _fpu_cmp = 0; 149 uint32_t _cf = 0; 150 int _df = 1; 151 uint32_t _flag_k = FK_NONE; 152 uint32_t _flag_a = 0, _flag_b = 0; 153 uint32_t _itail_tgt = 0; 154 RECOMP_REGS_LOCALS 155 RECOMP_ENTER(0x31006FD0u); 156 157 L_31006FD0: 158 PUSH32(esp, ebp); /* 0x31006FD0: push ebp */ 159 ebp = esp; /* 0x31006FD1: mov ebp, esp */ 160 PUSH32(esp, 0xFFFFFFFFu); /* 0x31006FD3: push -1 */ 161 PUSH32(esp, 0x31047038u); /* 0x31006FD5: push 0x31047038 */ 162 eax = MEM32(FS_BASE + (0)); /* 0x31006FDA: mov eax, dword ptr fs:[0] */ 163 PUSH32(esp, eax); /* 0x31006FE0: push eax */ 164 MEM32(FS_BASE + (0)) = esp; /* 0x31006FE1: mov dword ptr fs:[0], esp */ 165 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 166 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 167 esp = esp - 8; /* 0x31006FE8: sub esp, 8 */ 168 _flag_k = FK_CMP; 169 PUSH32(esp, ebx); /* 0x31006FEB: push ebx */ 170 PUSH32(esp, esi); /* 0x31006FEC: push esi */ 171 esi = ecx; /* 0x31006FED: mov esi, ecx */ 172 ebx = MEM32(esi + 0x8); /* 0x31006FEF: mov ebx, dword ptr [esi + 8] */ 173 PUSH32(esp, edi); /* 0x31006FF2: push edi */ 174 PUSH32(esp, 0); /* 0x31006FF3: push 0 */ 175 ecx = ebx; /* 0x31006FF5: mov ecx, ebx */ 176 MEM32(ebp + (-0x14)) = ebx; /* 0x31006FF7: mov dword ptr [ebp - 0x14], ebx */ 177 RECOMP_ICALL(MEM32(0x310482A4)); /* 0x31006FFA: call dword ptr [0x310482a4] */ 178 RECOMP_FLAGS_IN(); 179 MEM32(ebp + (-0x10)) = eax; /* 0x31007000: mov dword ptr [ebp - 0x10], eax */ 180 eax = MEM32(esi); /* 0x31007003: mov eax, dword ptr [esi] */ 181 ecx = esi; /* 0x31007005: mov ecx, esi */ 182 MEM32(ebp + (-0x4)) = 0; /* 0x31007007: mov dword ptr [ebp - 4], 0 */ 183 RECOMP_ICALL(MEM32(eax + 0x24)); /* 0x3100700E: call dword ptr [eax + 0x24] */ 184 RECOMP_FLAGS_IN(); 185 SET_LO8(eax, MEM8(ebp + 0xC)); /* 0x31007011: mov al, byte ptr [ebp + 0xc] */ 186 /* test LO8(eax), LO8(eax) */ /* 0x31007014: test al, al */ 187 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 188 _cf = 0; 189 _flag_k = FK_NARROW(FK_TEST, 24); 190 if (TEST_Z(_flag_a, _flag_b)) goto L_3100702B; /* 0x31007016: je 0x3100702b */ 191 L_31007018: 192 ecx = MEM32(ebp + 0x8); /* 0x31007018: mov ecx, dword ptr [ebp + 8] */ 193 eax = MEM32(ecx + 0x4); /* 0x3100701B: mov eax, dword ptr [ecx + 4] */ 194 /* test eax, eax */ /* 0x3100701E: test eax, eax */ 195 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 196 _cf = 0; 197 _flag_k = FK_TEST; 198 if (TEST_NZ(_flag_a, _flag_b)) goto L_31007027; /* 0x31007020: jne 0x31007027 */ 199 L_31007022: 200 eax = MEM32(0x310480EC); /* 0x31007022: mov eax, dword ptr [0x310480ec] */ 201 L_31007027: 202 PUSH32(esp, 1); /* 0x31007027: push 1 */ 203 goto L_3100703C; /* 0x31007029: jmp 0x3100703c */ 204 L_3100702B: 205 edx = MEM32(ebp + 0x8); /* 0x3100702B: mov edx, dword ptr [ebp + 8] */ 206 eax = MEM32(edx + 0x4); /* 0x3100702E: mov eax, dword ptr [edx + 4] */ 207 /* test eax, eax */ /* 0x31007031: test eax, eax */ 208 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 209 _cf = 0; 210 _flag_k = FK_TEST; 211 if (TEST_NZ(_flag_a, _flag_b)) goto L_3100703A; /* 0x31007033: jne 0x3100703a */ 212 L_31007035: 213 eax = MEM32(0x310480EC); /* 0x31007035: mov eax, dword ptr [0x310480ec] */ 214 L_3100703A: 215 PUSH32(esp, 0); /* 0x3100703A: push 0 */ 216 L_3100703C: 217 PUSH32(esp, eax); /* 0x3100703C: push eax */ 218 RECOMP_ICALL(0x31008740u); /* 0x3100703D: call 0x31008740 */ /* not lifted */ 219 RECOMP_FLAGS_IN(); 220 edi = eax; /* 0x31007042: mov edi, eax */ 221 eax = MEM32(edi + 0xC); /* 0x31007044: mov eax, dword ptr [edi + 0xc] */ 222 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 223 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 224 esp = esp + 8; /* 0x31007047: add esp, 8 */ 225 _flag_k = FK_ADD; 226 /* test eax, eax */ /* 0x3100704A: test eax, eax */ 227 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 228 _cf = 0; 229 _flag_k = FK_TEST; 230 if (TEST_NZ(_flag_a, _flag_b)) goto L_31007057; /* 0x3100704C: jne 0x31007057 */ 231 L_3100704E: 232 eax = MEM32(esi); /* 0x3100704E: mov eax, dword ptr [esi] */ 233 PUSH32(esp, 1); /* 0x31007050: push 1 */ 234 ecx = esi; /* 0x31007052: mov ecx, esi */ 235 RECOMP_ICALL(MEM32(eax + 0x2C)); /* 0x31007054: call dword ptr [eax + 0x2c] */ 236 RECOMP_FLAGS_IN(); 237 L_31007057: 238 ecx = MEM32(esi + 0xC); /* 0x31007057: mov ecx, dword ptr [esi + 0xc] */ 239 /* test ecx, ecx */ /* 0x3100705A: test ecx, ecx */ 240 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 241 _cf = 0; 242 _flag_k = FK_TEST; 243 if (TEST_Z(_flag_a, _flag_b)) goto L_3100706A; /* 0x3100705C: je 0x3100706a */ 244 L_3100705E: 245 RECOMP_ICALL(0x31008F50u); /* 0x3100705E: call 0x31008f50 */ /* not lifted */ 246 RECOMP_FLAGS_IN(); 247 MEM32(esi + 0xC) = 0; /* 0x31007063: mov dword ptr [esi + 0xc], 0 */ 248 L_3100706A: 249 ecx = MEM32(ebp + (-0x10)); /* 0x3100706A: mov ecx, dword ptr [ebp - 0x10] */ 250 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 251 eax = eax | 0xFFFFFFFFu; /* 0x3100706D: or eax, 0xffffffff */ 252 _cf = 0; 253 _flag_k = FK_TEST; 254 /* cmp ecx, eax */ /* 0x31007070: cmp ecx, eax */ 255 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 256 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 257 _flag_k = FK_CMP; 258 MEM32(esi + 0xC) = edi; /* 0x31007072: mov dword ptr [esi + 0xc], edi */ 259 MEM32(ebp + (-0x4)) = eax; /* 0x31007075: mov dword ptr [ebp - 4], eax */ 260 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007082; /* 0x31007078: je 0x31007082 */ 261 L_3100707A: 262 ecx = ebx; /* 0x3100707A: mov ecx, ebx */ 263 RECOMP_ICALL(MEM32(0x31048294)); /* 0x3100707C: call dword ptr [0x31048294] */ 264 RECOMP_FLAGS_IN(); 265 L_31007082: 266 ecx = MEM32(ebp + (-0xC)); /* 0x31007082: mov ecx, dword ptr [ebp - 0xc] */ 267 edi = POP32_VAL(esp); /* 0x31007085: pop edi */ 268 esi = POP32_VAL(esp); /* 0x31007086: pop esi */ 269 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 270 eax = 0; /* 0x31007087: xor eax, eax */ 271 _cf = 0; 272 _flag_k = FK_TEST; 273 ebx = POP32_VAL(esp); /* 0x31007089: pop ebx */ 274 MEM32(FS_BASE + (0)) = ecx; /* 0x3100708A: mov dword ptr fs:[0], ecx */ 275 esp = ebp; /* 0x31007091: mov esp, ebp */ 276 ebp = POP32_VAL(esp); /* 0x31007093: pop ebp */ 277 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31007094: ret 8 */ 278 RECOMP_REGS_OUT(); 279 } 280 281 void sub_310070A0(void) { 282 int _fpu_cmp = 0; 283 uint32_t _cf = 0; 284 int _df = 1; 285 uint32_t _flag_k = FK_NONE; 286 uint32_t _flag_a = 0, _flag_b = 0; 287 uint32_t _itail_tgt = 0; 288 RECOMP_REGS_LOCALS 289 RECOMP_ENTER(0x310070A0u); 290 291 L_310070A0: 292 PUSH32(esp, ebp); /* 0x310070A0: push ebp */ 293 ebp = esp; /* 0x310070A1: mov ebp, esp */ 294 PUSH32(esp, 0xFFFFFFFFu); /* 0x310070A3: push -1 */ 295 PUSH32(esp, 0x31047058u); /* 0x310070A5: push 0x31047058 */ 296 eax = MEM32(FS_BASE + (0)); /* 0x310070AA: mov eax, dword ptr fs:[0] */ 297 PUSH32(esp, eax); /* 0x310070B0: push eax */ 298 MEM32(FS_BASE + (0)) = esp; /* 0x310070B1: mov dword ptr fs:[0], esp */ 299 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 300 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 301 esp = esp - 8; /* 0x310070B8: sub esp, 8 */ 302 _flag_k = FK_CMP; 303 PUSH32(esp, ebx); /* 0x310070BB: push ebx */ 304 PUSH32(esp, esi); /* 0x310070BC: push esi */ 305 esi = ecx; /* 0x310070BD: mov esi, ecx */ 306 PUSH32(esp, edi); /* 0x310070BF: push edi */ 307 edi = MEM32(esi + 0x8); /* 0x310070C0: mov edi, dword ptr [esi + 8] */ 308 PUSH32(esp, 0); /* 0x310070C3: push 0 */ 309 ecx = edi; /* 0x310070C5: mov ecx, edi */ 310 MEM32(ebp + (-0x14)) = edi; /* 0x310070C7: mov dword ptr [ebp - 0x14], edi */ 311 RECOMP_ICALL(MEM32(0x310482A4)); /* 0x310070CA: call dword ptr [0x310482a4] */ 312 RECOMP_FLAGS_IN(); 313 ebx = eax; /* 0x310070D0: mov ebx, eax */ 314 MEM32(ebp + (-0x10)) = ebx; /* 0x310070D2: mov dword ptr [ebp - 0x10], ebx */ 315 ecx = MEM32(esi + 0xC); /* 0x310070D5: mov ecx, dword ptr [esi + 0xc] */ 316 /* test ecx, ecx */ /* 0x310070D8: test ecx, ecx */ 317 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 318 _cf = 0; 319 _flag_k = FK_TEST; 320 MEM32(ebp + (-0x4)) = 0; /* 0x310070DA: mov dword ptr [ebp - 4], 0 */ 321 if (TEST_Z(_flag_a, _flag_b)) goto L_310070EF; /* 0x310070E1: je 0x310070ef */ 322 L_310070E3: 323 RECOMP_ICALL(0x31008F50u); /* 0x310070E3: call 0x31008f50 */ /* not lifted */ 324 RECOMP_FLAGS_IN(); 325 MEM32(esi + 0xC) = 0; /* 0x310070E8: mov dword ptr [esi + 0xc], 0 */ 326 L_310070EF: 327 /* cmp ebx, 0xFFFFFFFFu */ /* 0x310070EF: cmp ebx, -1 */ 328 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0xFFFFFFFFu); 329 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 330 _flag_k = FK_CMP; 331 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x310070F2: mov dword ptr [ebp - 4], 0xffffffff */ 332 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007103; /* 0x310070F9: je 0x31007103 */ 333 L_310070FB: 334 ecx = edi; /* 0x310070FB: mov ecx, edi */ 335 RECOMP_ICALL(MEM32(0x31048294)); /* 0x310070FD: call dword ptr [0x31048294] */ 336 RECOMP_FLAGS_IN(); 337 L_31007103: 338 ecx = MEM32(ebp + (-0xC)); /* 0x31007103: mov ecx, dword ptr [ebp - 0xc] */ 339 edi = POP32_VAL(esp); /* 0x31007106: pop edi */ 340 esi = POP32_VAL(esp); /* 0x31007107: pop esi */ 341 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 342 eax = 0; /* 0x31007108: xor eax, eax */ 343 _cf = 0; 344 _flag_k = FK_TEST; 345 ebx = POP32_VAL(esp); /* 0x3100710A: pop ebx */ 346 MEM32(FS_BASE + (0)) = ecx; /* 0x3100710B: mov dword ptr fs:[0], ecx */ 347 esp = ebp; /* 0x31007112: mov esp, ebp */ 348 ebp = POP32_VAL(esp); /* 0x31007114: pop ebp */ 349 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31007115: ret */ 350 RECOMP_REGS_OUT(); 351 } 352 353 void sub_31007120(void) { 354 int _fpu_cmp = 0; 355 uint32_t _cf = 0; 356 int _df = 1; 357 uint32_t _flag_k = FK_NONE; 358 uint32_t _flag_a = 0, _flag_b = 0; 359 uint32_t _itail_tgt = 0; 360 RECOMP_REGS_LOCALS 361 RECOMP_ENTER(0x31007120u); 362 363 L_31007120: 364 PUSH32(esp, ebp); /* 0x31007120: push ebp */ 365 ebp = esp; /* 0x31007121: mov ebp, esp */ 366 PUSH32(esp, ecx); /* 0x31007123: push ecx */ 367 PUSH32(esp, ebx); /* 0x31007124: push ebx */ 368 ebx = MEM32(ebp + 0x8); /* 0x31007125: mov ebx, dword ptr [ebp + 8] */ 369 PUSH32(esp, esi); /* 0x31007128: push esi */ 370 esi = MEM32(ecx + 0xC); /* 0x31007129: mov esi, dword ptr [ecx + 0xc] */ 371 SET_LO8(eax, MEM8(esi + 0x4)); /* 0x3100712C: mov al, byte ptr [esi + 4] */ 372 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 373 edx = 0; /* 0x3100712F: xor edx, edx */ 374 _cf = 0; 375 _flag_k = FK_TEST; 376 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 377 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 378 esi = esi + 4; /* 0x31007131: add esi, 4 */ 379 _flag_k = FK_ADD; 380 MEM8(ebx) = (uint8_t)(LO8(eax)); /* 0x31007134: mov byte ptr [ebx], al */ 381 MEM32(ebx + 0x4) = edx; /* 0x31007136: mov dword ptr [ebx + 4], edx */ 382 MEM32(ebx + 0x8) = edx; /* 0x31007139: mov dword ptr [ebx + 8], edx */ 383 MEM32(ebx + 0xC) = edx; /* 0x3100713C: mov dword ptr [ebx + 0xc], edx */ 384 ecx = MEM32(0x310480F8); /* 0x3100713F: mov ecx, dword ptr [0x310480f8] */ 385 eax = MEM32(ecx); /* 0x31007145: mov eax, dword ptr [ecx] */ 386 ecx = MEM32(esi + 0x8); /* 0x31007147: mov ecx, dword ptr [esi + 8] */ 387 PUSH32(esp, edi); /* 0x3100714A: push edi */ 388 edi = ecx; /* 0x3100714B: mov edi, ecx */ 389 /* cmp eax, edi */ /* 0x3100714D: cmp eax, edi */ 390 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 391 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 392 _flag_k = FK_CMP; 393 MEM32(ebp + (-0x4)) = edx; /* 0x3100714F: mov dword ptr [ebp - 4], edx */ 394 MEM32(ebp + 0x8) = edi; /* 0x31007152: mov dword ptr [ebp + 8], edi */ 395 if (CMP_AE(_flag_a, _flag_b)) goto L_3100715C; /* 0x31007155: jae 0x3100715c */ 396 L_31007157: 397 MEM32(ebp + 0x8) = eax; /* 0x31007157: mov dword ptr [ebp + 8], eax */ 398 edi = eax; /* 0x3100715A: mov edi, eax */ 399 L_3100715C: 400 /* cmp ebx, esi */ /* 0x3100715C: cmp ebx, esi */ 401 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi); 402 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 403 _flag_k = FK_CMP; 404 if (CMP_NE(_flag_a, _flag_b)) goto L_310071D1; /* 0x3100715E: jne 0x310071d1 */ 405 L_31007160: 406 /* cmp edi, edx */ /* 0x31007160: cmp edi, edx */ 407 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx); 408 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 409 _flag_k = FK_CMP; 410 esi = eax; /* 0x31007162: mov esi, eax */ 411 if (CMP_BE(_flag_a, _flag_b)) goto L_3100716E; /* 0x31007164: jbe 0x3100716e */ 412 L_31007166: 413 RECOMP_ICALL(MEM32(0x310480B4)); /* 0x31007166: call dword ptr [0x310480b4] */ 414 RECOMP_FLAGS_IN(); 415 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 416 edx = 0; /* 0x3100716C: xor edx, edx */ 417 _cf = 0; 418 _flag_k = FK_TEST; 419 L_3100716E: 420 eax = MEM32(ebx + 0x8); /* 0x3100716E: mov eax, dword ptr [ebx + 8] */ 421 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 422 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 423 eax = eax - edi; /* 0x31007171: sub eax, edi */ 424 _flag_k = FK_CMP; 425 /* cmp eax, esi */ /* 0x31007173: cmp eax, esi */ 426 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 427 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 428 _flag_k = FK_CMP; 429 if (CMP_AE(_flag_a, _flag_b)) goto L_31007179; /* 0x31007175: jae 0x31007179 */ 430 L_31007177: 431 esi = eax; /* 0x31007177: mov esi, eax */ 432 L_31007179: 433 /* cmp esi, edx */ /* 0x31007179: cmp esi, edx */ 434 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx); 435 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 436 _flag_k = FK_CMP; 437 if (CMP_BE(_flag_a, _flag_b)) goto L_3100725F; /* 0x3100717B: jbe 0x3100725f */ 438 L_31007181: 439 ecx = ebx; /* 0x31007181: mov ecx, ebx */ 440 RECOMP_ICALL(MEM32(0x310480E4)); /* 0x31007183: call dword ptr [0x310480e4] */ 441 RECOMP_FLAGS_IN(); 442 ecx = MEM32(ebx + 0x8); /* 0x31007189: mov ecx, dword ptr [ebx + 8] */ 443 edx = MEM32(ebx + 0x4); /* 0x3100718C: mov edx, dword ptr [ebx + 4] */ 444 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi); 445 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 446 ecx = ecx - esi; /* 0x3100718F: sub ecx, esi */ 447 _flag_k = FK_CMP; 448 eax = edx + edi; /* 0x31007191: lea eax, [edx + edi] */ 449 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 450 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 451 ecx = ecx - edi; /* 0x31007194: sub ecx, edi */ 452 _flag_k = FK_CMP; 453 PUSH32(esp, ecx); /* 0x31007196: push ecx */ 454 edx = eax + esi; /* 0x31007197: lea edx, [eax + esi] */ 455 PUSH32(esp, edx); /* 0x3100719A: push edx */ 456 PUSH32(esp, eax); /* 0x3100719B: push eax */ 457 RECOMP_ICALL(MEM32(0x3104822C)); /* 0x3100719C: call dword ptr [0x3104822c] */ 458 RECOMP_FLAGS_IN(); 459 edi = MEM32(ebx + 0x8); /* 0x310071A2: mov edi, dword ptr [ebx + 8] */ 460 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 461 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 462 esp = esp + 0xCu; /* 0x310071A5: add esp, 0xc */ 463 _flag_k = FK_ADD; 464 PUSH32(esp, 0); /* 0x310071A8: push 0 */ 465 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 466 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 467 edi = edi - esi; /* 0x310071AA: sub edi, esi */ 468 _flag_k = FK_CMP; 469 PUSH32(esp, edi); /* 0x310071AC: push edi */ 470 ecx = ebx; /* 0x310071AD: mov ecx, ebx */ 471 RECOMP_ICALL(MEM32(0x31048070)); /* 0x310071AF: call dword ptr [0x31048070] */ 472 RECOMP_FLAGS_IN(); 473 /* test LO8(eax), LO8(eax) */ /* 0x310071B5: test al, al */ 474 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 475 _cf = 0; 476 _flag_k = FK_NARROW(FK_TEST, 24); 477 if (TEST_Z(_flag_a, _flag_b)) goto L_3100725F; /* 0x310071B7: je 0x3100725f */ 478 L_310071BD: 479 PUSH32(esp, edi); /* 0x310071BD: push edi */ 480 ecx = ebx; /* 0x310071BE: mov ecx, ebx */ 481 RECOMP_ICALL(MEM32(0x310480E8)); /* 0x310071C0: call dword ptr [0x310480e8] */ 482 RECOMP_FLAGS_IN(); 483 edi = POP32_VAL(esp); /* 0x310071C6: pop edi */ 484 esi = POP32_VAL(esp); /* 0x310071C7: pop esi */ 485 eax = ebx; /* 0x310071C8: mov eax, ebx */ 486 ebx = POP32_VAL(esp); /* 0x310071CA: pop ebx */ 487 esp = ebp; /* 0x310071CB: mov esp, ebp */ 488 ebp = POP32_VAL(esp); /* 0x310071CD: pop ebp */ 489 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x310071CE: ret 4 */ 490 L_310071D1: 491 /* cmp edi, edx */ /* 0x310071D1: cmp edi, edx */ 492 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx); 493 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 494 _flag_k = FK_CMP; 495 if (CMP_BE(_flag_a, _flag_b)) goto L_31007223; /* 0x310071D3: jbe 0x31007223 */ 496 L_310071D5: 497 /* cmp edi, ecx */ /* 0x310071D5: cmp edi, ecx */ 498 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx); 499 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 500 _flag_k = FK_CMP; 501 if (CMP_NE(_flag_a, _flag_b)) goto L_31007223; /* 0x310071D7: jne 0x31007223 */ 502 L_310071D9: 503 eax = MEM32(esi + 0x4); /* 0x310071D9: mov eax, dword ptr [esi + 4] */ 504 /* cmp eax, edx */ /* 0x310071DC: cmp eax, edx */ 505 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 506 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 507 _flag_k = FK_CMP; 508 if (CMP_NE(_flag_a, _flag_b)) goto L_310071E5; /* 0x310071DE: jne 0x310071e5 */ 509 L_310071E0: 510 eax = MEM32(0x310480EC); /* 0x310071E0: mov eax, dword ptr [0x310480ec] */ 511 L_310071E5: 512 /* cmp MEM8(eax + (-0x1)), 0xFEu */ /* 0x310071E5: cmp byte ptr [eax - 1], 0xfe */ 513 _flag_a = (uint32_t)(MEM8(eax + (-0x1))) << 24; _flag_b = (uint32_t)(0xFEu) << 24; 514 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 515 _flag_k = FK_NARROW(FK_CMP, 24); 516 if (CMP_AE(_flag_a, _flag_b)) goto L_31007223; /* 0x310071E9: jae 0x31007223 */ 517 L_310071EB: 518 PUSH32(esp, 1); /* 0x310071EB: push 1 */ 519 ecx = ebx; /* 0x310071ED: mov ecx, ebx */ 520 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x310071EF: call dword ptr [0x310480d4] */ 521 RECOMP_FLAGS_IN(); 522 eax = MEM32(esi + 0x4); /* 0x310071F5: mov eax, dword ptr [esi + 4] */ 523 /* test eax, eax */ /* 0x310071F8: test eax, eax */ 524 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 525 _cf = 0; 526 _flag_k = FK_TEST; 527 if (TEST_NZ(_flag_a, _flag_b)) goto L_31007201; /* 0x310071FA: jne 0x31007201 */ 528 L_310071FC: 529 eax = MEM32(0x310480EC); /* 0x310071FC: mov eax, dword ptr [0x310480ec] */ 530 L_31007201: 531 MEM32(ebx + 0x4) = eax; /* 0x31007201: mov dword ptr [ebx + 4], eax */ 532 ecx = MEM32(esi + 0x8); /* 0x31007204: mov ecx, dword ptr [esi + 8] */ 533 MEM32(ebx + 0x8) = ecx; /* 0x31007207: mov dword ptr [ebx + 8], ecx */ 534 edx = MEM32(esi + 0xC); /* 0x3100720A: mov edx, dword ptr [esi + 0xc] */ 535 MEM32(ebx + 0xC) = edx; /* 0x3100720D: mov dword ptr [ebx + 0xc], edx */ 536 SET_LO8(ecx, MEM8(eax + (-0x1))); /* 0x31007210: mov cl, byte ptr [eax - 1] */ 537 edi = POP32_VAL(esp); /* 0x31007213: pop edi */ 538 _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(1) << 24; 539 SET_LO8(ecx, LO8(ecx) + 1); /* 0x31007214: inc cl */ 540 _flag_k = FK_NARROW(FK_INC, 24); 541 MEM8(eax + (-0x1)) = (uint8_t)(LO8(ecx)); /* 0x31007216: mov byte ptr [eax - 1], cl */ 542 esi = POP32_VAL(esp); /* 0x31007219: pop esi */ 543 eax = ebx; /* 0x3100721A: mov eax, ebx */ 544 ebx = POP32_VAL(esp); /* 0x3100721C: pop ebx */ 545 esp = ebp; /* 0x3100721D: mov esp, ebp */ 546 ebp = POP32_VAL(esp); /* 0x3100721F: pop ebp */ 547 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31007220: ret 4 */ 548 L_31007223: 549 PUSH32(esp, 1); /* 0x31007223: push 1 */ 550 PUSH32(esp, edi); /* 0x31007225: push edi */ 551 ecx = ebx; /* 0x31007226: mov ecx, ebx */ 552 RECOMP_ICALL(MEM32(0x31048070)); /* 0x31007228: call dword ptr [0x31048070] */ 553 RECOMP_FLAGS_IN(); 554 /* test LO8(eax), LO8(eax) */ /* 0x3100722E: test al, al */ 555 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 556 _cf = 0; 557 _flag_k = FK_NARROW(FK_TEST, 24); 558 if (TEST_Z(_flag_a, _flag_b)) goto L_3100725F; /* 0x31007230: je 0x3100725f */ 559 L_31007232: 560 esi = MEM32(esi + 0x4); /* 0x31007232: mov esi, dword ptr [esi + 4] */ 561 /* test esi, esi */ /* 0x31007235: test esi, esi */ 562 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 563 _cf = 0; 564 _flag_k = FK_TEST; 565 if (TEST_NZ(_flag_a, _flag_b)) goto L_3100723F; /* 0x31007237: jne 0x3100723f */ 566 L_31007239: 567 esi = MEM32(0x310480EC); /* 0x31007239: mov esi, dword ptr [0x310480ec] */ 568 L_3100723F: 569 ecx = edi; /* 0x3100723F: mov ecx, edi */ 570 edi = MEM32(ebx + 0x4); /* 0x31007241: mov edi, dword ptr [ebx + 4] */ 571 eax = ecx; /* 0x31007244: mov eax, ecx */ 572 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x31007246: shr ecx, 2 */ 573 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 574 ecx = ecx >> 2u; /* 0x31007246: shr ecx, 2 */ 575 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31007249: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 576 ecx = eax; /* 0x3100724B: mov ecx, eax */ 577 eax = MEM32(ebp + 0x8); /* 0x3100724D: mov eax, dword ptr [ebp + 8] */ 578 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 579 ecx = ecx & 3; /* 0x31007250: and ecx, 3 */ 580 _cf = 0; 581 _flag_k = FK_TEST; 582 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x31007253: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 583 ecx = MEM32(ebx + 0x4); /* 0x31007255: mov ecx, dword ptr [ebx + 4] */ 584 MEM32(ebx + 0x8) = eax; /* 0x31007258: mov dword ptr [ebx + 8], eax */ 585 MEM8(ecx + eax) = (uint8_t)(0); /* 0x3100725B: mov byte ptr [ecx + eax], 0 */ 586 L_3100725F: 587 edi = POP32_VAL(esp); /* 0x3100725F: pop edi */ 588 esi = POP32_VAL(esp); /* 0x31007260: pop esi */ 589 eax = ebx; /* 0x31007261: mov eax, ebx */ 590 ebx = POP32_VAL(esp); /* 0x31007263: pop ebx */ 591 esp = ebp; /* 0x31007264: mov esp, ebp */ 592 ebp = POP32_VAL(esp); /* 0x31007266: pop ebp */ 593 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31007267: ret 4 */ 594 RECOMP_REGS_OUT(); 595 } 596 597 void sub_31007270(void) { 598 int _fpu_cmp = 0; 599 uint32_t _cf = 0; 600 int _df = 1; 601 uint32_t _flag_k = FK_NONE; 602 uint32_t _flag_a = 0, _flag_b = 0; 603 uint32_t _itail_tgt = 0; 604 RECOMP_REGS_LOCALS 605 RECOMP_ENTER(0x31007270u); 606 607 L_31007270: 608 PUSH32(esp, ebp); /* 0x31007270: push ebp */ 609 ebp = esp; /* 0x31007271: mov ebp, esp */ 610 PUSH32(esp, ecx); /* 0x31007273: push ecx */ 611 edx = MEM32(ebp + 0xC); /* 0x31007274: mov edx, dword ptr [ebp + 0xc] */ 612 ecx = MEM32(ecx + 0xC); /* 0x31007277: mov ecx, dword ptr [ecx + 0xc] */ 613 eax = MEM32(ecx); /* 0x3100727A: mov eax, dword ptr [ecx] */ 614 PUSH32(esp, esi); /* 0x3100727C: push esi */ 615 esi = MEM32(ebp + 0x8); /* 0x3100727D: mov esi, dword ptr [ebp + 8] */ 616 PUSH32(esp, edx); /* 0x31007280: push edx */ 617 PUSH32(esp, esi); /* 0x31007281: push esi */ 618 MEM32(ebp + (-0x4)) = 0; /* 0x31007282: mov dword ptr [ebp - 4], 0 */ 619 RECOMP_ICALL(MEM32(eax + 0x2C)); /* 0x31007289: call dword ptr [eax + 0x2c] */ 620 RECOMP_FLAGS_IN(); 621 eax = esi; /* 0x3100728C: mov eax, esi */ 622 esi = POP32_VAL(esp); /* 0x3100728E: pop esi */ 623 esp = ebp; /* 0x3100728F: mov esp, ebp */ 624 ebp = POP32_VAL(esp); /* 0x31007291: pop ebp */ 625 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31007292: ret 8 */ 626 RECOMP_REGS_OUT(); 627 } 628 629 void sub_310072A0(void) { 630 int _fpu_cmp = 0; 631 uint32_t _cf = 0; 632 int _df = 1; 633 uint32_t _flag_k = FK_NONE; 634 uint32_t _flag_a = 0, _flag_b = 0; 635 uint32_t _itail_tgt = 0; 636 RECOMP_REGS_LOCALS 637 RECOMP_ENTER(0x310072A0u); 638 639 L_310072A0: 640 PUSH32(esp, ebp); /* 0x310072A0: push ebp */ 641 ebp = esp; /* 0x310072A1: mov ebp, esp */ 642 PUSH32(esp, ecx); /* 0x310072A3: push ecx */ 643 edx = MEM32(ebp + 0xC); /* 0x310072A4: mov edx, dword ptr [ebp + 0xc] */ 644 ecx = MEM32(ecx + 0xC); /* 0x310072A7: mov ecx, dword ptr [ecx + 0xc] */ 645 eax = MEM32(ecx); /* 0x310072AA: mov eax, dword ptr [ecx] */ 646 PUSH32(esp, esi); /* 0x310072AC: push esi */ 647 esi = MEM32(ebp + 0x8); /* 0x310072AD: mov esi, dword ptr [ebp + 8] */ 648 PUSH32(esp, edx); /* 0x310072B0: push edx */ 649 PUSH32(esp, esi); /* 0x310072B1: push esi */ 650 MEM32(ebp + (-0x4)) = 0; /* 0x310072B2: mov dword ptr [ebp - 4], 0 */ 651 RECOMP_ICALL(MEM32(eax + 0x34)); /* 0x310072B9: call dword ptr [eax + 0x34] */ 652 RECOMP_FLAGS_IN(); 653 eax = esi; /* 0x310072BC: mov eax, esi */ 654 esi = POP32_VAL(esp); /* 0x310072BE: pop esi */ 655 esp = ebp; /* 0x310072BF: mov esp, ebp */ 656 ebp = POP32_VAL(esp); /* 0x310072C1: pop ebp */ 657 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x310072C2: ret 8 */ 658 RECOMP_REGS_OUT(); 659 } 660 661 void sub_310072D0(void) { 662 int _fpu_cmp = 0; 663 uint32_t _cf = 0; 664 int _df = 1; 665 uint32_t _flag_k = FK_NONE; 666 uint32_t _flag_a = 0, _flag_b = 0; 667 uint32_t _itail_tgt = 0; 668 RECOMP_REGS_LOCALS 669 RECOMP_ENTER(0x310072D0u); 670 671 L_310072D0: 672 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x310072D0: ret 8 */ 673 RECOMP_REGS_OUT(); 674 } 675 676 void sub_310072E0(void) { 677 int _fpu_cmp = 0; 678 uint32_t _cf = 0; 679 int _df = 1; 680 uint32_t _flag_k = FK_NONE; 681 uint32_t _flag_a = 0, _flag_b = 0; 682 uint32_t _itail_tgt = 0; 683 RECOMP_REGS_LOCALS 684 RECOMP_ENTER(0x310072E0u); 685 686 L_310072E0: 687 PUSH32(esp, ebp); /* 0x310072E0: push ebp */ 688 ebp = esp; /* 0x310072E1: mov ebp, esp */ 689 PUSH32(esp, 0xFFFFFFFFu); /* 0x310072E3: push -1 */ 690 PUSH32(esp, 0x31047078u); /* 0x310072E5: push 0x31047078 */ 691 eax = MEM32(FS_BASE + (0)); /* 0x310072EA: mov eax, dword ptr fs:[0] */ 692 PUSH32(esp, eax); /* 0x310072F0: push eax */ 693 MEM32(FS_BASE + (0)) = esp; /* 0x310072F1: mov dword ptr fs:[0], esp */ 694 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 695 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 696 esp = esp - 8; /* 0x310072F8: sub esp, 8 */ 697 _flag_k = FK_CMP; 698 PUSH32(esp, ebx); /* 0x310072FB: push ebx */ 699 PUSH32(esp, esi); /* 0x310072FC: push esi */ 700 esi = ecx; /* 0x310072FD: mov esi, ecx */ 701 PUSH32(esp, edi); /* 0x310072FF: push edi */ 702 edi = MEM32(esi + 0x8); /* 0x31007300: mov edi, dword ptr [esi + 8] */ 703 PUSH32(esp, 0); /* 0x31007303: push 0 */ 704 ecx = edi; /* 0x31007305: mov ecx, edi */ 705 MEM32(ebp + (-0x14)) = edi; /* 0x31007307: mov dword ptr [ebp - 0x14], edi */ 706 RECOMP_ICALL(MEM32(0x310482A4)); /* 0x3100730A: call dword ptr [0x310482a4] */ 707 RECOMP_FLAGS_IN(); 708 MEM32(ebp + (-0x10)) = eax; /* 0x31007310: mov dword ptr [ebp - 0x10], eax */ 709 eax = MEM32(ebp + 0x8); /* 0x31007313: mov eax, dword ptr [ebp + 8] */ 710 PUSH32(esp, eax); /* 0x31007316: push eax */ 711 ecx = esi; /* 0x31007317: mov ecx, esi */ 712 MEM32(ebp + (-0x4)) = 0; /* 0x31007319: mov dword ptr [ebp - 4], 0 */ 713 RECOMP_ICALL(0x31004EF0u); /* 0x31007320: call 0x31004ef0 */ /* not lifted */ 714 RECOMP_FLAGS_IN(); 715 ecx = MEM32(ebp + (-0x10)); /* 0x31007325: mov ecx, dword ptr [ebp - 0x10] */ 716 ebx = eax; /* 0x31007328: mov ebx, eax */ 717 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 718 eax = eax | 0xFFFFFFFFu; /* 0x3100732A: or eax, 0xffffffff */ 719 _cf = 0; 720 _flag_k = FK_TEST; 721 /* cmp ecx, eax */ /* 0x3100732D: cmp ecx, eax */ 722 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 723 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 724 _flag_k = FK_CMP; 725 MEM32(ebp + (-0x4)) = eax; /* 0x3100732F: mov dword ptr [ebp - 4], eax */ 726 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100733C; /* 0x31007332: je 0x3100733c */ 727 L_31007334: 728 ecx = edi; /* 0x31007334: mov ecx, edi */ 729 RECOMP_ICALL(MEM32(0x31048294)); /* 0x31007336: call dword ptr [0x31048294] */ 730 RECOMP_FLAGS_IN(); 731 L_3100733C: 732 /* test ebx, ebx */ /* 0x3100733C: test ebx, ebx */ 733 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 734 _cf = 0; 735 _flag_k = FK_TEST; 736 if (TEST_Z(_flag_a, _flag_b)) goto L_31007368; /* 0x3100733E: je 0x31007368 */ 737 L_31007340: 738 edx = MEM32(esi); /* 0x31007340: mov edx, dword ptr [esi] */ 739 PUSH32(esp, ebx); /* 0x31007342: push ebx */ 740 ecx = esi; /* 0x31007343: mov ecx, esi */ 741 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x31007345: call dword ptr [edx + 4] */ 742 RECOMP_FLAGS_IN(); 743 /* test LO8(eax), LO8(eax) */ /* 0x31007348: test al, al */ 744 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 745 _cf = 0; 746 _flag_k = FK_NARROW(FK_TEST, 24); 747 if (TEST_NZ(_flag_a, _flag_b)) goto L_31007368; /* 0x3100734A: jne 0x31007368 */ 748 L_3100734C: 749 ecx = ebx; /* 0x3100734C: mov ecx, ebx */ 750 RECOMP_ICALL(0x310050E0u); /* 0x3100734E: call 0x310050e0 */ /* not lifted */ 751 RECOMP_FLAGS_IN(); 752 edi = POP32_VAL(esp); /* 0x31007353: pop edi */ 753 esi = POP32_VAL(esp); /* 0x31007354: pop esi */ 754 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 755 eax = 0; /* 0x31007355: xor eax, eax */ 756 _cf = 0; 757 _flag_k = FK_TEST; 758 ebx = POP32_VAL(esp); /* 0x31007357: pop ebx */ 759 ecx = MEM32(ebp + (-0xC)); /* 0x31007358: mov ecx, dword ptr [ebp - 0xc] */ 760 MEM32(FS_BASE + (0)) = ecx; /* 0x3100735B: mov dword ptr fs:[0], ecx */ 761 esp = ebp; /* 0x31007362: mov esp, ebp */ 762 ebp = POP32_VAL(esp); /* 0x31007364: pop ebp */ 763 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31007365: ret 4 */ 764 L_31007368: 765 ecx = MEM32(ebp + (-0xC)); /* 0x31007368: mov ecx, dword ptr [ebp - 0xc] */ 766 edi = POP32_VAL(esp); /* 0x3100736B: pop edi */ 767 esi = POP32_VAL(esp); /* 0x3100736C: pop esi */ 768 eax = ebx; /* 0x3100736D: mov eax, ebx */ 769 ebx = POP32_VAL(esp); /* 0x3100736F: pop ebx */ 770 MEM32(FS_BASE + (0)) = ecx; /* 0x31007370: mov dword ptr fs:[0], ecx */ 771 esp = ebp; /* 0x31007377: mov esp, ebp */ 772 ebp = POP32_VAL(esp); /* 0x31007379: pop ebp */ 773 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3100737A: ret 4 */ 774 RECOMP_REGS_OUT(); 775 } 776 777 void sub_31007380(void) { 778 int _fpu_cmp = 0; 779 uint32_t _cf = 0; 780 int _df = 1; 781 uint32_t _flag_k = FK_NONE; 782 uint32_t _flag_a = 0, _flag_b = 0; 783 uint32_t _itail_tgt = 0; 784 RECOMP_REGS_LOCALS 785 RECOMP_ENTER(0x31007380u); 786 787 L_31007380: 788 PUSH32(esp, ebp); /* 0x31007380: push ebp */ 789 ebp = esp; /* 0x31007381: mov ebp, esp */ 790 PUSH32(esp, 0xFFFFFFFFu); /* 0x31007383: push -1 */ 791 PUSH32(esp, 0x310470B4u); /* 0x31007385: push 0x310470b4 */ 792 eax = MEM32(FS_BASE + (0)); /* 0x3100738A: mov eax, dword ptr fs:[0] */ 793 PUSH32(esp, eax); /* 0x31007390: push eax */ 794 MEM32(FS_BASE + (0)) = esp; /* 0x31007391: mov dword ptr fs:[0], esp */ 795 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x5Cu); 796 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 797 esp = esp - 0x5Cu; /* 0x31007398: sub esp, 0x5c */ 798 _flag_k = FK_CMP; 799 PUSH32(esp, ebx); /* 0x3100739B: push ebx */ 800 PUSH32(esp, esi); /* 0x3100739C: push esi */ 801 ebx = ecx; /* 0x3100739D: mov ebx, ecx */ 802 ecx = MEM32(ebx + 0x8); /* 0x3100739F: mov ecx, dword ptr [ebx + 8] */ 803 PUSH32(esp, edi); /* 0x310073A2: push edi */ 804 PUSH32(esp, 0); /* 0x310073A3: push 0 */ 805 MEM32(ebp + (-0x18)) = ecx; /* 0x310073A5: mov dword ptr [ebp - 0x18], ecx */ 806 MEM32(ebp + (-0x24)) = ecx; /* 0x310073A8: mov dword ptr [ebp - 0x24], ecx */ 807 RECOMP_ICALL(MEM32(0x310482A4)); /* 0x310073AB: call dword ptr [0x310482a4] */ 808 RECOMP_FLAGS_IN(); 809 MEM32(ebp + (-0x20)) = eax; /* 0x310073B1: mov dword ptr [ebp - 0x20], eax */ 810 PUSH32(esp, 0x14u); /* 0x310073B4: push 0x14 */ 811 MEM32(ebp + (-0x4)) = 0; /* 0x310073B6: mov dword ptr [ebp - 4], 0 */ 812 MEM8(ebp + (-0xD)) = (uint8_t)(0); /* 0x310073BD: mov byte ptr [ebp - 0xd], 0 */ 813 RECOMP_ICALL(0x310468DAu); /* 0x310073C1: call 0x310468da */ /* not lifted */ 814 RECOMP_FLAGS_IN(); 815 esi = eax; /* 0x310073C6: mov esi, eax */ 816 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 817 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 818 esp = esp + 4; /* 0x310073C8: add esp, 4 */ 819 _flag_k = FK_ADD; 820 MEM32(ebp + (-0x1C)) = esi; /* 0x310073CB: mov dword ptr [ebp - 0x1c], esi */ 821 /* test esi, esi */ /* 0x310073CE: test esi, esi */ 822 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 823 _cf = 0; 824 _flag_k = FK_TEST; 825 edi = MEM32(ebp + 0x8); /* 0x310073D0: mov edi, dword ptr [ebp + 8] */ 826 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x310073D3: mov byte ptr [ebp - 4], 1 */ 827 if (TEST_Z(_flag_a, _flag_b)) goto L_310073FB; /* 0x310073D7: je 0x310073fb */ 828 L_310073D9: 829 eax = edi + 0x4; /* 0x310073D9: lea eax, [edi + 4] */ 830 PUSH32(esp, eax); /* 0x310073DC: push eax */ 831 ecx = esi + 0x8; /* 0x310073DD: lea ecx, [esi + 8] */ 832 MEM32(esi) = 0; /* 0x310073E0: mov dword ptr [esi], 0 */ 833 MEM32(esi + 0x4) = 0; /* 0x310073E6: mov dword ptr [esi + 4], 0 */ 834 RECOMP_ICALL(0x31007530u); /* 0x310073ED: call 0x31007530 */ /* not lifted */ 835 RECOMP_FLAGS_IN(); 836 MEM32(esi + 0x10) = 0; /* 0x310073F2: mov dword ptr [esi + 0x10], 0 */ 837 goto L_310073FD; /* 0x310073F9: jmp 0x310073fd */ 838 L_310073FB: 839 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 840 esi = 0; /* 0x310073FB: xor esi, esi */ 841 _cf = 0; 842 _flag_k = FK_TEST; 843 L_310073FD: 844 ecx = MEM32(esi + 0x10); /* 0x310073FD: mov ecx, dword ptr [esi + 0x10] */ 845 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 846 ecx = ecx + 1; /* 0x31007400: inc ecx */ 847 _flag_k = FK_INC; 848 /* test esi, esi */ /* 0x31007401: test esi, esi */ 849 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 850 _cf = 0; 851 _flag_k = FK_TEST; 852 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x31007403: mov byte ptr [ebp - 4], 0 */ 853 MEM32(esi + 0x10) = ecx; /* 0x31007407: mov dword ptr [esi + 0x10], ecx */ 854 if (TEST_NZ(_flag_a, _flag_b)) goto L_31007457; /* 0x3100740A: jne 0x31007457 */ 855 L_3100740C: 856 eax = MEM32(edi + 0x8); /* 0x3100740C: mov eax, dword ptr [edi + 8] */ 857 edi = MEM32(edi + 0x4); /* 0x3100740F: mov edi, dword ptr [edi + 4] */ 858 ecx = MEM32(0x310481FC); /* 0x31007412: mov ecx, dword ptr [0x310481fc] */ 859 PUSH32(esp, eax); /* 0x31007418: push eax */ 860 PUSH32(esp, edi); /* 0x31007419: push edi */ 861 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x40u); 862 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 863 ecx = ecx + 0x40u; /* 0x3100741A: add ecx, 0x40 */ 864 _flag_k = FK_ADD; 865 PUSH32(esp, 0x31051FD4u); /* 0x3100741D: push 0x31051fd4 */ 866 PUSH32(esp, ecx); /* 0x31007422: push ecx */ 867 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x31007423: call dword ptr [0x310481f8] */ 868 RECOMP_FLAGS_IN(); 869 ecx = MEM32(ebp + (-0x20)); /* 0x31007429: mov ecx, dword ptr [ebp - 0x20] */ 870 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 871 eax = eax | 0xFFFFFFFFu; /* 0x3100742C: or eax, 0xffffffff */ 872 _cf = 0; 873 _flag_k = FK_TEST; 874 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 875 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 876 esp = esp + 0x10u; /* 0x3100742F: add esp, 0x10 */ 877 _flag_k = FK_ADD; 878 /* cmp ecx, eax */ /* 0x31007432: cmp ecx, eax */ 879 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 880 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 881 _flag_k = FK_CMP; 882 MEM32(ebp + (-0x4)) = eax; /* 0x31007434: mov dword ptr [ebp - 4], eax */ 883 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007442; /* 0x31007437: je 0x31007442 */ 884 L_31007439: 885 ecx = MEM32(ebp + (-0x18)); /* 0x31007439: mov ecx, dword ptr [ebp - 0x18] */ 886 RECOMP_ICALL(MEM32(0x31048294)); /* 0x3100743C: call dword ptr [0x31048294] */ 887 RECOMP_FLAGS_IN(); 888 L_31007442: 889 edi = POP32_VAL(esp); /* 0x31007442: pop edi */ 890 esi = POP32_VAL(esp); /* 0x31007443: pop esi */ 891 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 892 SET_LO8(eax, 0); /* 0x31007444: xor al, al */ 893 _cf = 0; 894 _flag_k = FK_NARROW(FK_TEST, 24); 895 ebx = POP32_VAL(esp); /* 0x31007446: pop ebx */ 896 ecx = MEM32(ebp + (-0xC)); /* 0x31007447: mov ecx, dword ptr [ebp - 0xc] */ 897 MEM32(FS_BASE + (0)) = ecx; /* 0x3100744A: mov dword ptr fs:[0], ecx */ 898 esp = ebp; /* 0x31007451: mov esp, ebp */ 899 ebp = POP32_VAL(esp); /* 0x31007453: pop ebp */ 900 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31007454: ret 4 */ 901 L_31007457: 902 ecx = MEM32(ebx + 0xC); /* 0x31007457: mov ecx, dword ptr [ebx + 0xc] */ 903 edx = MEM32(ecx); /* 0x3100745A: mov edx, dword ptr [ecx] */ 904 PUSH32(esp, esi); /* 0x3100745C: push esi */ 905 eax = ebp + (-0x14); /* 0x3100745D: lea eax, [ebp - 0x14] */ 906 PUSH32(esp, eax); /* 0x31007460: push eax */ 907 RECOMP_ICALL(MEM32(edx + 0xC)); /* 0x31007461: call dword ptr [edx + 0xc] */ 908 RECOMP_FLAGS_IN(); 909 eax = MEM32(esi + 0x10); /* 0x31007464: mov eax, dword ptr [esi + 0x10] */ 910 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 911 eax = eax - 1; /* 0x31007467: dec eax */ 912 _flag_k = FK_DEC; 913 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x31007468: mov byte ptr [ebp - 4], 2 */ 914 MEM32(esi + 0x10) = eax; /* 0x3100746C: mov dword ptr [esi + 0x10], eax */ 915 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_3100747A; /* 0x3100746F: jne 0x3100747a */ 916 L_31007471: 917 PUSH32(esp, esi); /* 0x31007471: push esi */ 918 RECOMP_ICALL(0x31046858u); /* 0x31007472: call 0x31046858 */ /* not lifted */ 919 RECOMP_FLAGS_IN(); 920 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 921 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 922 esp = esp + 4; /* 0x31007477: add esp, 4 */ 923 _flag_k = FK_ADD; 924 L_3100747A: 925 eax = MEM32(ebp + (-0x14)); /* 0x3100747A: mov eax, dword ptr [ebp - 0x14] */ 926 /* cmp MEM32(eax), 0x80000000u */ /* 0x3100747D: cmp dword ptr [eax], 0x80000000 */ 927 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x80000000u); 928 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 929 _flag_k = FK_CMP; 930 ecx = MEM32(eax + 0x4); /* 0x31007483: mov ecx, dword ptr [eax + 4] */ 931 if (CMP_AE(_flag_a, _flag_b)) goto L_3100748D; /* 0x31007486: jae 0x3100748d */ 932 L_31007488: 933 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(8); 934 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 935 eax = eax + 8; /* 0x31007488: add eax, 8 */ 936 _flag_k = FK_ADD; 937 goto L_31007490; /* 0x3100748B: jmp 0x31007490 */ 938 L_3100748D: 939 eax = MEM32(eax + 0x8); /* 0x3100748D: mov eax, dword ptr [eax + 8] */ 940 L_31007490: 941 PUSH32(esp, ecx); /* 0x31007490: push ecx */ 942 PUSH32(esp, eax); /* 0x31007491: push eax */ 943 ecx = ebp + (-0x68); /* 0x31007492: lea ecx, [ebp - 0x68] */ 944 RECOMP_ICALL(MEM32(0x31048320)); /* 0x31007495: call dword ptr [0x31048320] */ 945 RECOMP_FLAGS_IN(); 946 MEM32(ebp + (-0x28)) = 0; /* 0x3100749B: mov dword ptr [ebp - 0x28], 0 */ 947 ecx = ebp + (-0x68); /* 0x310074A2: lea ecx, [ebp - 0x68] */ 948 MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x310074A5: mov byte ptr [ebp - 4], 3 */ 949 RECOMP_ICALL(MEM32(0x31048344)); /* 0x310074A9: call dword ptr [0x31048344] */ 950 RECOMP_FLAGS_IN(); 951 /* test eax, eax */ /* 0x310074AF: test eax, eax */ 952 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 953 _cf = 0; 954 _flag_k = FK_TEST; 955 if (TEST_Z(_flag_a, _flag_b)) goto L_310074D8; /* 0x310074B1: je 0x310074d8 */ 956 L_310074B3: 957 edx = MEM32(edi); /* 0x310074B3: mov edx, dword ptr [edi] */ 958 eax = ebp + (-0x68); /* 0x310074B5: lea eax, [ebp - 0x68] */ 959 PUSH32(esp, eax); /* 0x310074B8: push eax */ 960 ecx = edi; /* 0x310074B9: mov ecx, edi */ 961 RECOMP_ICALL(MEM32(edx + 0xC)); /* 0x310074BB: call dword ptr [edx + 0xc] */ 962 RECOMP_FLAGS_IN(); 963 /* test LO8(eax), LO8(eax) */ /* 0x310074BE: test al, al */ 964 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 965 _cf = 0; 966 _flag_k = FK_NARROW(FK_TEST, 24); 967 MEM8(ebp + (-0xD)) = (uint8_t)(LO8(eax)); /* 0x310074C0: mov byte ptr [ebp - 0xd], al */ 968 MEM8(edi + 0x14) = (uint8_t)(1); /* 0x310074C3: mov byte ptr [edi + 0x14], 1 */ 969 MEM8(edi + 0x15) = (uint8_t)(0); /* 0x310074C7: mov byte ptr [edi + 0x15], 0 */ 970 if (TEST_Z(_flag_a, _flag_b)) goto L_310074E1; /* 0x310074CB: je 0x310074e1 */ 971 L_310074CD: 972 edx = MEM32(ebx); /* 0x310074CD: mov edx, dword ptr [ebx] */ 973 PUSH32(esp, 0); /* 0x310074CF: push 0 */ 974 ecx = ebx; /* 0x310074D1: mov ecx, ebx */ 975 RECOMP_ICALL(MEM32(edx + 0x2C)); /* 0x310074D3: call dword ptr [edx + 0x2c] */ 976 RECOMP_FLAGS_IN(); 977 goto L_310074E1; /* 0x310074D6: jmp 0x310074e1 */ 978 L_310074D8: 979 eax = MEM32(ebx); /* 0x310074D8: mov eax, dword ptr [ebx] */ 980 PUSH32(esp, 5); /* 0x310074DA: push 5 */ 981 ecx = ebx; /* 0x310074DC: mov ecx, ebx */ 982 RECOMP_ICALL(MEM32(eax + 0x2C)); /* 0x310074DE: call dword ptr [eax + 0x2c] */ 983 RECOMP_FLAGS_IN(); 984 L_310074E1: 985 ecx = ebp + (-0x68); /* 0x310074E1: lea ecx, [ebp - 0x68] */ 986 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x310074E4: mov byte ptr [ebp - 4], 2 */ 987 RECOMP_ICALL(MEM32(0x31048314)); /* 0x310074E8: call dword ptr [0x31048314] */ 988 RECOMP_FLAGS_IN(); 989 ecx = ebp + (-0x14); /* 0x310074EE: lea ecx, [ebp - 0x14] */ 990 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x310074F1: mov byte ptr [ebp - 4], 0 */ 991 RECOMP_ICALL(0x31004760u); /* 0x310074F5: call 0x31004760 */ /* not lifted */ 992 RECOMP_FLAGS_IN(); 993 ecx = MEM32(ebp + (-0x20)); /* 0x310074FA: mov ecx, dword ptr [ebp - 0x20] */ 994 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 995 eax = eax | 0xFFFFFFFFu; /* 0x310074FD: or eax, 0xffffffff */ 996 _cf = 0; 997 _flag_k = FK_TEST; 998 /* cmp ecx, eax */ /* 0x31007500: cmp ecx, eax */ 999 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 1000 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1001 _flag_k = FK_CMP; 1002 MEM32(ebp + (-0x4)) = eax; /* 0x31007502: mov dword ptr [ebp - 4], eax */ 1003 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007510; /* 0x31007505: je 0x31007510 */ 1004 L_31007507: 1005 ecx = MEM32(ebp + (-0x18)); /* 0x31007507: mov ecx, dword ptr [ebp - 0x18] */ 1006 RECOMP_ICALL(MEM32(0x31048294)); /* 0x3100750A: call dword ptr [0x31048294] */ 1007 RECOMP_FLAGS_IN(); 1008 L_31007510: 1009 ecx = MEM32(ebp + (-0xC)); /* 0x31007510: mov ecx, dword ptr [ebp - 0xc] */ 1010 SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x31007513: mov al, byte ptr [ebp - 0xd] */ 1011 edi = POP32_VAL(esp); /* 0x31007516: pop edi */ 1012 esi = POP32_VAL(esp); /* 0x31007517: pop esi */ 1013 ebx = POP32_VAL(esp); /* 0x31007518: pop ebx */ 1014 MEM32(FS_BASE + (0)) = ecx; /* 0x31007519: mov dword ptr fs:[0], ecx */ 1015 esp = ebp; /* 0x31007520: mov esp, ebp */ 1016 ebp = POP32_VAL(esp); /* 0x31007522: pop ebp */ 1017 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31007523: ret 4 */ 1018 RECOMP_REGS_OUT(); 1019 } 1020 1021 void sub_31007530(void) { 1022 int _fpu_cmp = 0; 1023 uint32_t _cf = 0; 1024 int _df = 1; 1025 uint32_t _flag_k = FK_NONE; 1026 uint32_t _flag_a = 0, _flag_b = 0; 1027 uint32_t _itail_tgt = 0; 1028 RECOMP_REGS_LOCALS 1029 RECOMP_ENTER(0x31007530u); 1030 1031 L_31007530: 1032 PUSH32(esp, ebp); /* 0x31007530: push ebp */ 1033 ebp = esp; /* 0x31007531: mov ebp, esp */ 1034 eax = ecx; /* 0x31007533: mov eax, ecx */ 1035 ecx = MEM32(ebp + 0x8); /* 0x31007535: mov ecx, dword ptr [ebp + 8] */ 1036 /* cmp eax, ecx */ /* 0x31007538: cmp eax, ecx */ 1037 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 1038 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1039 _flag_k = FK_CMP; 1040 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007546; /* 0x3100753A: je 0x31007546 */ 1041 L_3100753C: 1042 edx = MEM32(ecx); /* 0x3100753C: mov edx, dword ptr [ecx] */ 1043 MEM32(eax) = edx; /* 0x3100753E: mov dword ptr [eax], edx */ 1044 ecx = MEM32(ecx + 0x4); /* 0x31007540: mov ecx, dword ptr [ecx + 4] */ 1045 MEM32(eax + 0x4) = ecx; /* 0x31007543: mov dword ptr [eax + 4], ecx */ 1046 L_31007546: 1047 ebp = POP32_VAL(esp); /* 0x31007546: pop ebp */ 1048 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31007547: ret 4 */ 1049 RECOMP_REGS_OUT(); 1050 } 1051 1052 void sub_31007550(void) { 1053 int _fpu_cmp = 0; 1054 uint32_t _cf = 0; 1055 int _df = 1; 1056 uint32_t _flag_k = FK_NONE; 1057 uint32_t _flag_a = 0, _flag_b = 0; 1058 uint32_t _itail_tgt = 0; 1059 RECOMP_REGS_LOCALS 1060 RECOMP_ENTER(0x31007550u); 1061 1062 L_31007550: 1063 PUSH32(esp, ebp); /* 0x31007550: push ebp */ 1064 ebp = esp; /* 0x31007551: mov ebp, esp */ 1065 PUSH32(esp, 0xFFFFFFFFu); /* 0x31007553: push -1 */ 1066 PUSH32(esp, 0x310470D6u); /* 0x31007555: push 0x310470d6 */ 1067 eax = MEM32(FS_BASE + (0)); /* 0x3100755A: mov eax, dword ptr fs:[0] */ 1068 PUSH32(esp, eax); /* 0x31007560: push eax */ 1069 MEM32(FS_BASE + (0)) = esp; /* 0x31007561: mov dword ptr fs:[0], esp */ 1070 PUSH32(esp, ecx); /* 0x31007568: push ecx */ 1071 PUSH32(esp, ebx); /* 0x31007569: push ebx */ 1072 PUSH32(esp, esi); /* 0x3100756A: push esi */ 1073 PUSH32(esp, edi); /* 0x3100756B: push edi */ 1074 PUSH32(esp, 0x20u); /* 0x3100756C: push 0x20 */ 1075 ebx = ecx; /* 0x3100756E: mov ebx, ecx */ 1076 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1077 edi = 0; /* 0x31007570: xor edi, edi */ 1078 _cf = 0; 1079 _flag_k = FK_TEST; 1080 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1081 esi = 0; /* 0x31007572: xor esi, esi */ 1082 _cf = 0; 1083 _flag_k = FK_TEST; 1084 RECOMP_ICALL(0x310468DAu); /* 0x31007574: call 0x310468da */ /* not lifted */ 1085 RECOMP_FLAGS_IN(); 1086 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1087 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1088 esp = esp + 4; /* 0x31007579: add esp, 4 */ 1089 _flag_k = FK_ADD; 1090 MEM32(ebp + (-0x10)) = eax; /* 0x3100757C: mov dword ptr [ebp - 0x10], eax */ 1091 /* cmp eax, edi */ /* 0x3100757F: cmp eax, edi */ 1092 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 1093 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1094 _flag_k = FK_CMP; 1095 MEM32(ebp + (-0x4)) = edi; /* 0x31007581: mov dword ptr [ebp - 4], edi */ 1096 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007593; /* 0x31007584: je 0x31007593 */ 1097 L_31007586: 1098 ecx = MEM32(ebp + 0x8); /* 0x31007586: mov ecx, dword ptr [ebp + 8] */ 1099 PUSH32(esp, ecx); /* 0x31007589: push ecx */ 1100 ecx = eax; /* 0x3100758A: mov ecx, eax */ 1101 RECOMP_ICALL(0x31005F20u); /* 0x3100758C: call 0x31005f20 */ /* not lifted */ 1102 RECOMP_FLAGS_IN(); 1103 edi = eax; /* 0x31007591: mov edi, eax */ 1104 L_31007593: 1105 PUSH32(esp, edi); /* 0x31007593: push edi */ 1106 ecx = ebx; /* 0x31007594: mov ecx, ebx */ 1107 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x31007596: mov dword ptr [ebp - 4], 0xffffffff */ 1108 RECOMP_ICALL(0x31007900u); /* 0x3100759D: call 0x31007900 */ /* not lifted */ 1109 RECOMP_FLAGS_IN(); 1110 /* cmp LO8(eax), 1 */ /* 0x310075A2: cmp al, 1 */ 1111 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 1112 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1113 _flag_k = FK_NARROW(FK_CMP, 24); 1114 if (CMP_NE(_flag_a, _flag_b)) goto L_310075F6; /* 0x310075A4: jne 0x310075f6 */ 1115 L_310075A6: 1116 PUSH32(esp, 0x44u); /* 0x310075A6: push 0x44 */ 1117 RECOMP_ICALL(0x310468DAu); /* 0x310075A8: call 0x310468da */ /* not lifted */ 1118 RECOMP_FLAGS_IN(); 1119 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1120 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1121 esp = esp + 4; /* 0x310075AD: add esp, 4 */ 1122 _flag_k = FK_ADD; 1123 MEM32(ebp + 0x8) = eax; /* 0x310075B0: mov dword ptr [ebp + 8], eax */ 1124 /* test eax, eax */ /* 0x310075B3: test eax, eax */ 1125 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1126 _cf = 0; 1127 _flag_k = FK_TEST; 1128 MEM32(ebp + (-0x4)) = 1; /* 0x310075B5: mov dword ptr [ebp - 4], 1 */ 1129 if (TEST_Z(_flag_a, _flag_b)) goto L_310075D2; /* 0x310075BC: je 0x310075d2 */ 1130 L_310075BE: 1131 ecx = MEM32(edi + 0x1C); /* 0x310075BE: mov ecx, dword ptr [edi + 0x1c] */ 1132 edx = MEM32(edi + 0x18); /* 0x310075C1: mov edx, dword ptr [edi + 0x18] */ 1133 PUSH32(esp, ecx); /* 0x310075C4: push ecx */ 1134 PUSH32(esp, edx); /* 0x310075C5: push edx */ 1135 ecx = eax; /* 0x310075C6: mov ecx, eax */ 1136 RECOMP_ICALL(MEM32(0x31048320)); /* 0x310075C8: call dword ptr [0x31048320] */ 1137 RECOMP_FLAGS_IN(); 1138 esi = eax; /* 0x310075CE: mov esi, eax */ 1139 goto L_310075D4; /* 0x310075D0: jmp 0x310075d4 */ 1140 L_310075D2: 1141 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1142 esi = 0; /* 0x310075D2: xor esi, esi */ 1143 _cf = 0; 1144 _flag_k = FK_TEST; 1145 L_310075D4: 1146 ecx = esi; /* 0x310075D4: mov ecx, esi */ 1147 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x310075D6: mov dword ptr [ebp - 4], 0xffffffff */ 1148 MEM32(esi + 0x40) = 0; /* 0x310075DD: mov dword ptr [esi + 0x40], 0 */ 1149 RECOMP_ICALL(MEM32(0x31048344)); /* 0x310075E4: call dword ptr [0x31048344] */ 1150 RECOMP_FLAGS_IN(); 1151 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1152 eax = 0; /* 0x310075EA: xor eax, eax */ 1153 _cf = 0; 1154 _flag_k = FK_TEST; 1155 MEM8(esi + 0x24) = (uint8_t)(1); /* 0x310075EC: mov byte ptr [esi + 0x24], 1 */ 1156 MEM32(edi + 0x18) = eax; /* 0x310075F0: mov dword ptr [edi + 0x18], eax */ 1157 MEM32(edi + 0x1C) = eax; /* 0x310075F3: mov dword ptr [edi + 0x1c], eax */ 1158 L_310075F6: 1159 ecx = edi; /* 0x310075F6: mov ecx, edi */ 1160 RECOMP_ICALL(0x310050E0u); /* 0x310075F8: call 0x310050e0 */ /* not lifted */ 1161 RECOMP_FLAGS_IN(); 1162 ecx = MEM32(ebp + (-0xC)); /* 0x310075FD: mov ecx, dword ptr [ebp - 0xc] */ 1163 edi = POP32_VAL(esp); /* 0x31007600: pop edi */ 1164 eax = esi; /* 0x31007601: mov eax, esi */ 1165 esi = POP32_VAL(esp); /* 0x31007603: pop esi */ 1166 ebx = POP32_VAL(esp); /* 0x31007604: pop ebx */ 1167 MEM32(FS_BASE + (0)) = ecx; /* 0x31007605: mov dword ptr fs:[0], ecx */ 1168 esp = ebp; /* 0x3100760C: mov esp, ebp */ 1169 ebp = POP32_VAL(esp); /* 0x3100760E: pop ebp */ 1170 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3100760F: ret 4 */ 1171 RECOMP_REGS_OUT(); 1172 } 1173 1174 void sub_31007620(void) { 1175 int _fpu_cmp = 0; 1176 uint32_t _cf = 0; 1177 int _df = 1; 1178 uint32_t _flag_k = FK_NONE; 1179 uint32_t _flag_a = 0, _flag_b = 0; 1180 uint32_t _itail_tgt = 0; 1181 RECOMP_REGS_LOCALS 1182 RECOMP_ENTER(0x31007620u); 1183 1184 L_31007620: 1185 PUSH32(esp, ebp); /* 0x31007620: push ebp */ 1186 ebp = esp; /* 0x31007621: mov ebp, esp */ 1187 PUSH32(esp, 0xFFFFFFFFu); /* 0x31007623: push -1 */ 1188 PUSH32(esp, 0x310470F9u); /* 0x31007625: push 0x310470f9 */ 1189 eax = MEM32(FS_BASE + (0)); /* 0x3100762A: mov eax, dword ptr fs:[0] */ 1190 PUSH32(esp, eax); /* 0x31007630: push eax */ 1191 MEM32(FS_BASE + (0)) = esp; /* 0x31007631: mov dword ptr fs:[0], esp */ 1192 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x54u); 1193 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1194 esp = esp - 0x54u; /* 0x31007638: sub esp, 0x54 */ 1195 _flag_k = FK_CMP; 1196 PUSH32(esp, ebx); /* 0x3100763B: push ebx */ 1197 ebx = MEM32(ecx + 0x8); /* 0x3100763C: mov ebx, dword ptr [ecx + 8] */ 1198 PUSH32(esp, esi); /* 0x3100763F: push esi */ 1199 PUSH32(esp, edi); /* 0x31007640: push edi */ 1200 MEM32(ebp + (-0x14)) = ecx; /* 0x31007641: mov dword ptr [ebp - 0x14], ecx */ 1201 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1202 esi = 0; /* 0x31007644: xor esi, esi */ 1203 _cf = 0; 1204 _flag_k = FK_TEST; 1205 PUSH32(esp, esi); /* 0x31007646: push esi */ 1206 ecx = ebx; /* 0x31007647: mov ecx, ebx */ 1207 MEM32(ebp + (-0x1C)) = ebx; /* 0x31007649: mov dword ptr [ebp - 0x1c], ebx */ 1208 RECOMP_ICALL(MEM32(0x310482A4)); /* 0x3100764C: call dword ptr [0x310482a4] */ 1209 RECOMP_FLAGS_IN(); 1210 MEM32(ebp + (-0x18)) = eax; /* 0x31007652: mov dword ptr [ebp - 0x18], eax */ 1211 PUSH32(esp, 0x800u); /* 0x31007655: push 0x800 */ 1212 ecx = ebp + (-0x60); /* 0x3100765A: lea ecx, [ebp - 0x60] */ 1213 MEM32(ebp + (-0x4)) = esi; /* 0x3100765D: mov dword ptr [ebp - 4], esi */ 1214 RECOMP_ICALL(MEM32(0x31048338)); /* 0x31007660: call dword ptr [0x31048338] */ 1215 RECOMP_FLAGS_IN(); 1216 MEM32(ebp + (-0x20)) = esi; /* 0x31007666: mov dword ptr [ebp - 0x20], esi */ 1217 esi = MEM32(ebp + 0x8); /* 0x31007669: mov esi, dword ptr [ebp + 8] */ 1218 eax = MEM32(esi); /* 0x3100766C: mov eax, dword ptr [esi] */ 1219 ecx = ebp + (-0x60); /* 0x3100766E: lea ecx, [ebp - 0x60] */ 1220 PUSH32(esp, ecx); /* 0x31007671: push ecx */ 1221 ecx = esi; /* 0x31007672: mov ecx, esi */ 1222 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x31007674: mov byte ptr [ebp - 4], 1 */ 1223 RECOMP_ICALL(MEM32(eax + 0x8)); /* 0x31007678: call dword ptr [eax + 8] */ 1224 RECOMP_FLAGS_IN(); 1225 edi = MEM32(ebp + (-0x50)); /* 0x3100767B: mov edi, dword ptr [ebp - 0x50] */ 1226 PUSH32(esp, 0); /* 0x3100767E: push 0 */ 1227 ecx = ebp + (-0x60); /* 0x31007680: lea ecx, [ebp - 0x60] */ 1228 RECOMP_ICALL(MEM32(0x31048344)); /* 0x31007683: call dword ptr [0x31048344] */ 1229 RECOMP_FLAGS_IN(); 1230 PUSH32(esp, eax); /* 0x31007689: push eax */ 1231 PUSH32(esp, edi); /* 0x3100768A: push edi */ 1232 ecx = ebp + (-0x10); /* 0x3100768B: lea ecx, [ebp - 0x10] */ 1233 RECOMP_ICALL(0x310045D0u); /* 0x3100768E: call 0x310045d0 */ /* not lifted */ 1234 RECOMP_FLAGS_IN(); 1235 PUSH32(esp, 0x14u); /* 0x31007693: push 0x14 */ 1236 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x31007695: mov byte ptr [ebp - 4], 2 */ 1237 edi = esi + 0x4; /* 0x31007699: lea edi, [esi + 4] */ 1238 RECOMP_ICALL(0x310468DAu); /* 0x3100769C: call 0x310468da */ /* not lifted */ 1239 RECOMP_FLAGS_IN(); 1240 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1241 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1242 esp = esp + 4; /* 0x310076A1: add esp, 4 */ 1243 _flag_k = FK_ADD; 1244 /* test eax, eax */ /* 0x310076A4: test eax, eax */ 1245 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1246 _cf = 0; 1247 _flag_k = FK_TEST; 1248 if (TEST_Z(_flag_a, _flag_b)) goto L_310076D1; /* 0x310076A6: je 0x310076d1 */ 1249 L_310076A8: 1250 ecx = eax + 0x8; /* 0x310076A8: lea ecx, [eax + 8] */ 1251 /* cmp ecx, edi */ /* 0x310076AB: cmp ecx, edi */ 1252 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 1253 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1254 _flag_k = FK_CMP; 1255 MEM32(eax) = 0; /* 0x310076AD: mov dword ptr [eax], 0 */ 1256 MEM32(eax + 0x4) = 0; /* 0x310076B3: mov dword ptr [eax + 4], 0 */ 1257 if (CMP_EQ(_flag_a, _flag_b)) goto L_310076C6; /* 0x310076BA: je 0x310076c6 */ 1258 L_310076BC: 1259 edx = MEM32(edi); /* 0x310076BC: mov edx, dword ptr [edi] */ 1260 MEM32(ecx) = edx; /* 0x310076BE: mov dword ptr [ecx], edx */ 1261 edx = MEM32(edi + 0x4); /* 0x310076C0: mov edx, dword ptr [edi + 4] */ 1262 MEM32(ecx + 0x4) = edx; /* 0x310076C3: mov dword ptr [ecx + 4], edx */ 1263 L_310076C6: 1264 MEM32(eax + 0x10) = 0; /* 0x310076C6: mov dword ptr [eax + 0x10], 0 */ 1265 edi = eax; /* 0x310076CD: mov edi, eax */ 1266 goto L_310076D3; /* 0x310076CF: jmp 0x310076d3 */ 1267 L_310076D1: 1268 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1269 edi = 0; /* 0x310076D1: xor edi, edi */ 1270 _cf = 0; 1271 _flag_k = FK_TEST; 1272 L_310076D3: 1273 ecx = MEM32(edi + 0x10); /* 0x310076D3: mov ecx, dword ptr [edi + 0x10] */ 1274 eax = MEM32(ebp + (-0x14)); /* 0x310076D6: mov eax, dword ptr [ebp - 0x14] */ 1275 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 1276 ecx = ecx + 1; /* 0x310076D9: inc ecx */ 1277 _flag_k = FK_INC; 1278 MEM32(edi + 0x10) = ecx; /* 0x310076DA: mov dword ptr [edi + 0x10], ecx */ 1279 ecx = MEM32(eax + 0xC); /* 0x310076DD: mov ecx, dword ptr [eax + 0xc] */ 1280 edx = MEM32(ecx); /* 0x310076E0: mov edx, dword ptr [ecx] */ 1281 eax = ebp + (-0x10); /* 0x310076E2: lea eax, [ebp - 0x10] */ 1282 PUSH32(esp, eax); /* 0x310076E5: push eax */ 1283 PUSH32(esp, edi); /* 0x310076E6: push edi */ 1284 RECOMP_ICALL(MEM32(edx + 0x18)); /* 0x310076E7: call dword ptr [edx + 0x18] */ 1285 RECOMP_FLAGS_IN(); 1286 _flag_a = (uint32_t)(MEM32(edi + 0x10)); _flag_b = (uint32_t)(1); 1287 MEM32(edi + 0x10) = MEM32(edi + 0x10) - 1; /* 0x310076EA: dec dword ptr [edi + 0x10] */ 1288 _flag_k = FK_DEC; 1289 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_310076FC; /* 0x310076ED: jne 0x310076fc */ 1290 L_310076EF: 1291 /* test edi, edi */ /* 0x310076EF: test edi, edi */ 1292 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 1293 _cf = 0; 1294 _flag_k = FK_TEST; 1295 if (TEST_Z(_flag_a, _flag_b)) goto L_310076FC; /* 0x310076F1: je 0x310076fc */ 1296 L_310076F3: 1297 PUSH32(esp, edi); /* 0x310076F3: push edi */ 1298 RECOMP_ICALL(0x31046858u); /* 0x310076F4: call 0x31046858 */ /* not lifted */ 1299 RECOMP_FLAGS_IN(); 1300 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1301 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1302 esp = esp + 4; /* 0x310076F9: add esp, 4 */ 1303 _flag_k = FK_ADD; 1304 L_310076FC: 1305 ecx = ebp + (-0x10); /* 0x310076FC: lea ecx, [ebp - 0x10] */ 1306 MEM8(esi + 0x14) = (uint8_t)(1); /* 0x310076FF: mov byte ptr [esi + 0x14], 1 */ 1307 MEM8(esi + 0x15) = (uint8_t)(0); /* 0x31007703: mov byte ptr [esi + 0x15], 0 */ 1308 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x31007707: mov byte ptr [ebp - 4], 1 */ 1309 RECOMP_ICALL(0x31004760u); /* 0x3100770B: call 0x31004760 */ /* not lifted */ 1310 RECOMP_FLAGS_IN(); 1311 ecx = ebp + (-0x60); /* 0x31007710: lea ecx, [ebp - 0x60] */ 1312 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x31007713: mov byte ptr [ebp - 4], 0 */ 1313 RECOMP_ICALL(MEM32(0x31048314)); /* 0x31007717: call dword ptr [0x31048314] */ 1314 RECOMP_FLAGS_IN(); 1315 ecx = MEM32(ebp + (-0x18)); /* 0x3100771D: mov ecx, dword ptr [ebp - 0x18] */ 1316 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 1317 eax = eax | 0xFFFFFFFFu; /* 0x31007720: or eax, 0xffffffff */ 1318 _cf = 0; 1319 _flag_k = FK_TEST; 1320 /* cmp ecx, eax */ /* 0x31007723: cmp ecx, eax */ 1321 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 1322 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1323 _flag_k = FK_CMP; 1324 MEM32(ebp + (-0x4)) = eax; /* 0x31007725: mov dword ptr [ebp - 4], eax */ 1325 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007732; /* 0x31007728: je 0x31007732 */ 1326 L_3100772A: 1327 ecx = ebx; /* 0x3100772A: mov ecx, ebx */ 1328 RECOMP_ICALL(MEM32(0x31048294)); /* 0x3100772C: call dword ptr [0x31048294] */ 1329 RECOMP_FLAGS_IN(); 1330 L_31007732: 1331 ecx = MEM32(ebp + (-0xC)); /* 0x31007732: mov ecx, dword ptr [ebp - 0xc] */ 1332 edi = POP32_VAL(esp); /* 0x31007735: pop edi */ 1333 esi = POP32_VAL(esp); /* 0x31007736: pop esi */ 1334 ebx = POP32_VAL(esp); /* 0x31007737: pop ebx */ 1335 MEM32(FS_BASE + (0)) = ecx; /* 0x31007738: mov dword ptr fs:[0], ecx */ 1336 esp = ebp; /* 0x3100773F: mov esp, ebp */ 1337 ebp = POP32_VAL(esp); /* 0x31007741: pop ebp */ 1338 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31007742: ret 4 */ 1339 RECOMP_REGS_OUT(); 1340 } 1341 1342 void sub_31007750(void) { 1343 int _fpu_cmp = 0; 1344 uint32_t _cf = 0; 1345 int _df = 1; 1346 uint32_t _flag_k = FK_NONE; 1347 uint32_t _flag_a = 0, _flag_b = 0; 1348 uint32_t _itail_tgt = 0; 1349 RECOMP_REGS_LOCALS 1350 RECOMP_ENTER(0x31007750u); 1351 1352 L_31007750: 1353 PUSH32(esp, ebp); /* 0x31007750: push ebp */ 1354 ebp = esp; /* 0x31007751: mov ebp, esp */ 1355 PUSH32(esp, 0xFFFFFFFFu); /* 0x31007753: push -1 */ 1356 PUSH32(esp, 0x31047118u); /* 0x31007755: push 0x31047118 */ 1357 eax = MEM32(FS_BASE + (0)); /* 0x3100775A: mov eax, dword ptr fs:[0] */ 1358 PUSH32(esp, eax); /* 0x31007760: push eax */ 1359 MEM32(FS_BASE + (0)) = esp; /* 0x31007761: mov dword ptr fs:[0], esp */ 1360 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 1361 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1362 esp = esp - 8; /* 0x31007768: sub esp, 8 */ 1363 _flag_k = FK_CMP; 1364 PUSH32(esp, ebx); /* 0x3100776B: push ebx */ 1365 PUSH32(esp, esi); /* 0x3100776C: push esi */ 1366 PUSH32(esp, edi); /* 0x3100776D: push edi */ 1367 edi = ecx; /* 0x3100776E: mov edi, ecx */ 1368 ebx = MEM32(edi + 0x8); /* 0x31007770: mov ebx, dword ptr [edi + 8] */ 1369 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1370 esi = 0; /* 0x31007773: xor esi, esi */ 1371 _cf = 0; 1372 _flag_k = FK_TEST; 1373 PUSH32(esp, esi); /* 0x31007775: push esi */ 1374 ecx = ebx; /* 0x31007776: mov ecx, ebx */ 1375 MEM32(ebp + (-0x14)) = ebx; /* 0x31007778: mov dword ptr [ebp - 0x14], ebx */ 1376 RECOMP_ICALL(MEM32(0x310482A4)); /* 0x3100777B: call dword ptr [0x310482a4] */ 1377 RECOMP_FLAGS_IN(); 1378 MEM32(ebp + (-0x10)) = eax; /* 0x31007781: mov dword ptr [ebp - 0x10], eax */ 1379 PUSH32(esp, 0x14u); /* 0x31007784: push 0x14 */ 1380 MEM32(ebp + (-0x4)) = esi; /* 0x31007786: mov dword ptr [ebp - 4], esi */ 1381 RECOMP_ICALL(0x310468DAu); /* 0x31007789: call 0x310468da */ /* not lifted */ 1382 RECOMP_FLAGS_IN(); 1383 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1384 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1385 esp = esp + 4; /* 0x3100778E: add esp, 4 */ 1386 _flag_k = FK_ADD; 1387 /* cmp eax, esi */ /* 0x31007791: cmp eax, esi */ 1388 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 1389 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1390 _flag_k = FK_CMP; 1391 if (CMP_EQ(_flag_a, _flag_b)) goto L_310077B5; /* 0x31007793: je 0x310077b5 */ 1392 L_31007795: 1393 edx = MEM32(ebp + 0x8); /* 0x31007795: mov edx, dword ptr [ebp + 8] */ 1394 ecx = eax + 0x8; /* 0x31007798: lea ecx, [eax + 8] */ 1395 /* cmp ecx, edx */ /* 0x3100779B: cmp ecx, edx */ 1396 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 1397 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1398 _flag_k = FK_CMP; 1399 MEM32(eax) = esi; /* 0x3100779D: mov dword ptr [eax], esi */ 1400 MEM32(eax + 0x4) = esi; /* 0x3100779F: mov dword ptr [eax + 4], esi */ 1401 if (CMP_EQ(_flag_a, _flag_b)) goto L_310077B0; /* 0x310077A2: je 0x310077b0 */ 1402 L_310077A4: 1403 esi = MEM32(edx); /* 0x310077A4: mov esi, dword ptr [edx] */ 1404 MEM32(ecx) = esi; /* 0x310077A6: mov dword ptr [ecx], esi */ 1405 edx = MEM32(edx + 0x4); /* 0x310077A8: mov edx, dword ptr [edx + 4] */ 1406 MEM32(ecx + 0x4) = edx; /* 0x310077AB: mov dword ptr [ecx + 4], edx */ 1407 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1408 esi = 0; /* 0x310077AE: xor esi, esi */ 1409 _cf = 0; 1410 _flag_k = FK_TEST; 1411 L_310077B0: 1412 MEM32(eax + 0x10) = esi; /* 0x310077B0: mov dword ptr [eax + 0x10], esi */ 1413 esi = eax; /* 0x310077B3: mov esi, eax */ 1414 L_310077B5: 1415 _flag_a = (uint32_t)(MEM32(esi + 0x10)); _flag_b = (uint32_t)(1); 1416 MEM32(esi + 0x10) = MEM32(esi + 0x10) + 1; /* 0x310077B5: inc dword ptr [esi + 0x10] */ 1417 _flag_k = FK_INC; 1418 ecx = MEM32(edi + 0xC); /* 0x310077B8: mov ecx, dword ptr [edi + 0xc] */ 1419 eax = MEM32(ecx); /* 0x310077BB: mov eax, dword ptr [ecx] */ 1420 PUSH32(esp, esi); /* 0x310077BD: push esi */ 1421 RECOMP_ICALL(MEM32(eax + 0x1C)); /* 0x310077BE: call dword ptr [eax + 0x1c] */ 1422 RECOMP_FLAGS_IN(); 1423 _flag_a = (uint32_t)(MEM32(esi + 0x10)); _flag_b = (uint32_t)(1); 1424 MEM32(esi + 0x10) = MEM32(esi + 0x10) - 1; /* 0x310077C1: dec dword ptr [esi + 0x10] */ 1425 _flag_k = FK_DEC; 1426 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_310077D3; /* 0x310077C4: jne 0x310077d3 */ 1427 L_310077C6: 1428 /* test esi, esi */ /* 0x310077C6: test esi, esi */ 1429 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 1430 _cf = 0; 1431 _flag_k = FK_TEST; 1432 if (TEST_Z(_flag_a, _flag_b)) goto L_310077D3; /* 0x310077C8: je 0x310077d3 */ 1433 L_310077CA: 1434 PUSH32(esp, esi); /* 0x310077CA: push esi */ 1435 RECOMP_ICALL(0x31046858u); /* 0x310077CB: call 0x31046858 */ /* not lifted */ 1436 RECOMP_FLAGS_IN(); 1437 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1438 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1439 esp = esp + 4; /* 0x310077D0: add esp, 4 */ 1440 _flag_k = FK_ADD; 1441 L_310077D3: 1442 ecx = MEM32(ebp + (-0x10)); /* 0x310077D3: mov ecx, dword ptr [ebp - 0x10] */ 1443 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 1444 eax = eax | 0xFFFFFFFFu; /* 0x310077D6: or eax, 0xffffffff */ 1445 _cf = 0; 1446 _flag_k = FK_TEST; 1447 /* cmp ecx, eax */ /* 0x310077D9: cmp ecx, eax */ 1448 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 1449 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1450 _flag_k = FK_CMP; 1451 MEM32(ebp + (-0x4)) = eax; /* 0x310077DB: mov dword ptr [ebp - 4], eax */ 1452 if (CMP_EQ(_flag_a, _flag_b)) goto L_310077E8; /* 0x310077DE: je 0x310077e8 */ 1453 L_310077E0: 1454 ecx = ebx; /* 0x310077E0: mov ecx, ebx */ 1455 RECOMP_ICALL(MEM32(0x31048294)); /* 0x310077E2: call dword ptr [0x31048294] */ 1456 RECOMP_FLAGS_IN(); 1457 L_310077E8: 1458 ecx = MEM32(ebp + (-0xC)); /* 0x310077E8: mov ecx, dword ptr [ebp - 0xc] */ 1459 edi = POP32_VAL(esp); /* 0x310077EB: pop edi */ 1460 esi = POP32_VAL(esp); /* 0x310077EC: pop esi */ 1461 ebx = POP32_VAL(esp); /* 0x310077ED: pop ebx */ 1462 MEM32(FS_BASE + (0)) = ecx; /* 0x310077EE: mov dword ptr fs:[0], ecx */ 1463 esp = ebp; /* 0x310077F5: mov esp, ebp */ 1464 ebp = POP32_VAL(esp); /* 0x310077F7: pop ebp */ 1465 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x310077F8: ret 4 */ 1466 RECOMP_REGS_OUT(); 1467 } 1468 1469 void sub_31007800(void) { 1470 int _fpu_cmp = 0; 1471 uint32_t _cf = 0; 1472 int _df = 1; 1473 uint32_t _flag_k = FK_NONE; 1474 uint32_t _flag_a = 0, _flag_b = 0; 1475 uint32_t _itail_tgt = 0; 1476 RECOMP_REGS_LOCALS 1477 RECOMP_ENTER(0x31007800u); 1478 1479 L_31007800: 1480 PUSH32(esp, ebp); /* 0x31007800: push ebp */ 1481 ebp = esp; /* 0x31007801: mov ebp, esp */ 1482 ecx = MEM32(ecx + 0xC); /* 0x31007803: mov ecx, dword ptr [ecx + 0xc] */ 1483 eax = MEM32(ecx); /* 0x31007806: mov eax, dword ptr [ecx] */ 1484 PUSH32(esp, esi); /* 0x31007808: push esi */ 1485 RECOMP_ICALL(MEM32(eax + 0x60)); /* 0x31007809: call dword ptr [eax + 0x60] */ 1486 RECOMP_FLAGS_IN(); 1487 esi = MEM32(ebp + 0x8); /* 0x3100780C: mov esi, dword ptr [ebp + 8] */ 1488 ecx = esi; /* 0x3100780F: mov ecx, esi */ 1489 MEM32(esi) = eax; /* 0x31007811: mov dword ptr [esi], eax */ 1490 MEM32(esi + 0x4) = 0; /* 0x31007813: mov dword ptr [esi + 4], 0 */ 1491 RECOMP_ICALL(MEM32(0x3104829C)); /* 0x3100781A: call dword ptr [0x3104829c] */ 1492 RECOMP_FLAGS_IN(); 1493 eax = esi; /* 0x31007820: mov eax, esi */ 1494 esi = POP32_VAL(esp); /* 0x31007822: pop esi */ 1495 ebp = POP32_VAL(esp); /* 0x31007823: pop ebp */ 1496 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31007824: ret 4 */ 1497 RECOMP_REGS_OUT(); 1498 } 1499 1500 void sub_31007830(void) { 1501 int _fpu_cmp = 0; 1502 uint32_t _cf = 0; 1503 int _df = 1; 1504 uint32_t _flag_k = FK_NONE; 1505 uint32_t _flag_a = 0, _flag_b = 0; 1506 uint32_t _itail_tgt = 0; 1507 RECOMP_REGS_LOCALS 1508 RECOMP_ENTER(0x31007830u); 1509 1510 L_31007830: 1511 PUSH32(esp, ebp); /* 0x31007830: push ebp */ 1512 ebp = esp; /* 0x31007831: mov ebp, esp */ 1513 PUSH32(esp, 0xFFFFFFFFu); /* 0x31007833: push -1 */ 1514 PUSH32(esp, 0x31047143u); /* 0x31007835: push 0x31047143 */ 1515 eax = MEM32(FS_BASE + (0)); /* 0x3100783A: mov eax, dword ptr fs:[0] */ 1516 PUSH32(esp, eax); /* 0x31007840: push eax */ 1517 MEM32(FS_BASE + (0)) = esp; /* 0x31007841: mov dword ptr fs:[0], esp */ 1518 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 1519 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1520 esp = esp - 8; /* 0x31007848: sub esp, 8 */ 1521 _flag_k = FK_CMP; 1522 PUSH32(esp, esi); /* 0x3100784B: push esi */ 1523 PUSH32(esp, edi); /* 0x3100784C: push edi */ 1524 PUSH32(esp, 0x20u); /* 0x3100784D: push 0x20 */ 1525 esi = ecx; /* 0x3100784F: mov esi, ecx */ 1526 RECOMP_ICALL(0x310468DAu); /* 0x31007851: call 0x310468da */ /* not lifted */ 1527 RECOMP_FLAGS_IN(); 1528 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1529 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1530 esp = esp + 4; /* 0x31007856: add esp, 4 */ 1531 _flag_k = FK_ADD; 1532 MEM32(ebp + (-0x10)) = eax; /* 0x31007859: mov dword ptr [ebp - 0x10], eax */ 1533 /* test eax, eax */ /* 0x3100785C: test eax, eax */ 1534 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1535 _cf = 0; 1536 _flag_k = FK_TEST; 1537 MEM32(ebp + (-0x4)) = 0; /* 0x3100785E: mov dword ptr [ebp - 4], 0 */ 1538 if (TEST_Z(_flag_a, _flag_b)) goto L_31007876; /* 0x31007865: je 0x31007876 */ 1539 L_31007867: 1540 ecx = MEM32(ebp + 0x8); /* 0x31007867: mov ecx, dword ptr [ebp + 8] */ 1541 PUSH32(esp, ecx); /* 0x3100786A: push ecx */ 1542 ecx = eax; /* 0x3100786B: mov ecx, eax */ 1543 RECOMP_ICALL(0x31005F20u); /* 0x3100786D: call 0x31005f20 */ /* not lifted */ 1544 RECOMP_FLAGS_IN(); 1545 edi = eax; /* 0x31007872: mov edi, eax */ 1546 goto L_31007878; /* 0x31007874: jmp 0x31007878 */ 1547 L_31007876: 1548 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1549 edi = 0; /* 0x31007876: xor edi, edi */ 1550 _cf = 0; 1551 _flag_k = FK_TEST; 1552 L_31007878: 1553 PUSH32(esp, edi); /* 0x31007878: push edi */ 1554 ecx = esi; /* 0x31007879: mov ecx, esi */ 1555 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100787B: mov dword ptr [ebp - 4], 0xffffffff */ 1556 RECOMP_ICALL(0x31007900u); /* 0x31007882: call 0x31007900 */ /* not lifted */ 1557 RECOMP_FLAGS_IN(); 1558 /* test LO8(eax), LO8(eax) */ /* 0x31007887: test al, al */ 1559 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 1560 _cf = 0; 1561 _flag_k = FK_NARROW(FK_TEST, 24); 1562 if (TEST_NZ(_flag_a, _flag_b)) goto L_310078E1; /* 0x31007889: jne 0x310078e1 */ 1563 L_3100788B: 1564 PUSH32(esp, ebx); /* 0x3100788B: push ebx */ 1565 ecx = edi; /* 0x3100788C: mov ecx, edi */ 1566 RECOMP_ICALL(0x310050E0u); /* 0x3100788E: call 0x310050e0 */ /* not lifted */ 1567 RECOMP_FLAGS_IN(); 1568 edi = MEM32(esi + 0x8); /* 0x31007893: mov edi, dword ptr [esi + 8] */ 1569 PUSH32(esp, 0); /* 0x31007896: push 0 */ 1570 ecx = edi; /* 0x31007898: mov ecx, edi */ 1571 MEM32(ebp + (-0x14)) = edi; /* 0x3100789A: mov dword ptr [ebp - 0x14], edi */ 1572 RECOMP_ICALL(MEM32(0x310482A4)); /* 0x3100789D: call dword ptr [0x310482a4] */ 1573 RECOMP_FLAGS_IN(); 1574 ebx = eax; /* 0x310078A3: mov ebx, eax */ 1575 MEM32(ebp + (-0x10)) = ebx; /* 0x310078A5: mov dword ptr [ebp - 0x10], ebx */ 1576 edx = MEM32(esi); /* 0x310078A8: mov edx, dword ptr [esi] */ 1577 PUSH32(esp, 5); /* 0x310078AA: push 5 */ 1578 ecx = esi; /* 0x310078AC: mov ecx, esi */ 1579 MEM32(ebp + (-0x4)) = 1; /* 0x310078AE: mov dword ptr [ebp - 4], 1 */ 1580 RECOMP_ICALL(MEM32(edx + 0x2C)); /* 0x310078B5: call dword ptr [edx + 0x2c] */ 1581 RECOMP_FLAGS_IN(); 1582 /* cmp ebx, 0xFFFFFFFFu */ /* 0x310078B8: cmp ebx, -1 */ 1583 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0xFFFFFFFFu); 1584 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1585 _flag_k = FK_CMP; 1586 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x310078BB: mov dword ptr [ebp - 4], 0xffffffff */ 1587 ebx = POP32_VAL(esp); /* 0x310078C2: pop ebx */ 1588 if (CMP_EQ(_flag_a, _flag_b)) goto L_310078CD; /* 0x310078C3: je 0x310078cd */ 1589 L_310078C5: 1590 ecx = edi; /* 0x310078C5: mov ecx, edi */ 1591 RECOMP_ICALL(MEM32(0x31048294)); /* 0x310078C7: call dword ptr [0x31048294] */ 1592 RECOMP_FLAGS_IN(); 1593 L_310078CD: 1594 edi = POP32_VAL(esp); /* 0x310078CD: pop edi */ 1595 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1596 eax = 0; /* 0x310078CE: xor eax, eax */ 1597 _cf = 0; 1598 _flag_k = FK_TEST; 1599 esi = POP32_VAL(esp); /* 0x310078D0: pop esi */ 1600 ecx = MEM32(ebp + (-0xC)); /* 0x310078D1: mov ecx, dword ptr [ebp - 0xc] */ 1601 MEM32(FS_BASE + (0)) = ecx; /* 0x310078D4: mov dword ptr fs:[0], ecx */ 1602 esp = ebp; /* 0x310078DB: mov esp, ebp */ 1603 ebp = POP32_VAL(esp); /* 0x310078DD: pop ebp */ 1604 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x310078DE: ret 4 */ 1605 L_310078E1: 1606 ecx = MEM32(ebp + (-0xC)); /* 0x310078E1: mov ecx, dword ptr [ebp - 0xc] */ 1607 eax = edi; /* 0x310078E4: mov eax, edi */ 1608 edi = POP32_VAL(esp); /* 0x310078E6: pop edi */ 1609 esi = POP32_VAL(esp); /* 0x310078E7: pop esi */ 1610 MEM32(FS_BASE + (0)) = ecx; /* 0x310078E8: mov dword ptr fs:[0], ecx */ 1611 esp = ebp; /* 0x310078EF: mov esp, ebp */ 1612 ebp = POP32_VAL(esp); /* 0x310078F1: pop ebp */ 1613 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x310078F2: ret 4 */ 1614 RECOMP_REGS_OUT(); 1615 } 1616 1617 void sub_31007900(void) { 1618 int _fpu_cmp = 0; 1619 uint32_t _cf = 0; 1620 int _df = 1; 1621 uint32_t _flag_k = FK_NONE; 1622 uint32_t _flag_a = 0, _flag_b = 0; 1623 uint32_t _itail_tgt = 0; 1624 RECOMP_REGS_LOCALS 1625 RECOMP_ENTER(0x31007900u); 1626 1627 L_31007900: 1628 PUSH32(esp, ebp); /* 0x31007900: push ebp */ 1629 ebp = esp; /* 0x31007901: mov ebp, esp */ 1630 PUSH32(esp, 0xFFFFFFFFu); /* 0x31007903: push -1 */ 1631 PUSH32(esp, 0x31047169u); /* 0x31007905: push 0x31047169 */ 1632 eax = MEM32(FS_BASE + (0)); /* 0x3100790A: mov eax, dword ptr fs:[0] */ 1633 PUSH32(esp, eax); /* 0x31007910: push eax */ 1634 MEM32(FS_BASE + (0)) = esp; /* 0x31007911: mov dword ptr fs:[0], esp */ 1635 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x58u); 1636 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1637 esp = esp - 0x58u; /* 0x31007918: sub esp, 0x58 */ 1638 _flag_k = FK_CMP; 1639 PUSH32(esp, ebx); /* 0x3100791B: push ebx */ 1640 PUSH32(esp, esi); /* 0x3100791C: push esi */ 1641 ebx = ecx; /* 0x3100791D: mov ebx, ecx */ 1642 ecx = MEM32(ebx + 0x8); /* 0x3100791F: mov ecx, dword ptr [ebx + 8] */ 1643 PUSH32(esp, edi); /* 0x31007922: push edi */ 1644 PUSH32(esp, 0); /* 0x31007923: push 0 */ 1645 MEM32(ebp + (-0x18)) = ecx; /* 0x31007925: mov dword ptr [ebp - 0x18], ecx */ 1646 MEM32(ebp + (-0x20)) = ecx; /* 0x31007928: mov dword ptr [ebp - 0x20], ecx */ 1647 RECOMP_ICALL(MEM32(0x310482A4)); /* 0x3100792B: call dword ptr [0x310482a4] */ 1648 RECOMP_FLAGS_IN(); 1649 MEM32(ebp + (-0x1C)) = eax; /* 0x31007931: mov dword ptr [ebp - 0x1c], eax */ 1650 PUSH32(esp, 0x14u); /* 0x31007934: push 0x14 */ 1651 MEM32(ebp + (-0x4)) = 0; /* 0x31007936: mov dword ptr [ebp - 4], 0 */ 1652 MEM8(ebp + (-0xD)) = (uint8_t)(0); /* 0x3100793D: mov byte ptr [ebp - 0xd], 0 */ 1653 RECOMP_ICALL(0x310468DAu); /* 0x31007941: call 0x310468da */ /* not lifted */ 1654 RECOMP_FLAGS_IN(); 1655 edi = MEM32(ebp + 0x8); /* 0x31007946: mov edi, dword ptr [ebp + 8] */ 1656 esi = eax; /* 0x31007949: mov esi, eax */ 1657 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1658 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1659 esp = esp + 4; /* 0x3100794B: add esp, 4 */ 1660 _flag_k = FK_ADD; 1661 /* test esi, esi */ /* 0x3100794E: test esi, esi */ 1662 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 1663 _cf = 0; 1664 _flag_k = FK_TEST; 1665 if (TEST_Z(_flag_a, _flag_b)) goto L_31007974; /* 0x31007950: je 0x31007974 */ 1666 L_31007952: 1667 eax = edi + 0x4; /* 0x31007952: lea eax, [edi + 4] */ 1668 PUSH32(esp, eax); /* 0x31007955: push eax */ 1669 ecx = esi + 0x8; /* 0x31007956: lea ecx, [esi + 8] */ 1670 MEM32(esi) = 0; /* 0x31007959: mov dword ptr [esi], 0 */ 1671 MEM32(esi + 0x4) = 0; /* 0x3100795F: mov dword ptr [esi + 4], 0 */ 1672 RECOMP_ICALL(0x31007530u); /* 0x31007966: call 0x31007530 */ /* not lifted */ 1673 RECOMP_FLAGS_IN(); 1674 MEM32(esi + 0x10) = 0; /* 0x3100796B: mov dword ptr [esi + 0x10], 0 */ 1675 goto L_31007976; /* 0x31007972: jmp 0x31007976 */ 1676 L_31007974: 1677 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1678 esi = 0; /* 0x31007974: xor esi, esi */ 1679 _cf = 0; 1680 _flag_k = FK_TEST; 1681 L_31007976: 1682 ecx = MEM32(esi + 0x10); /* 0x31007976: mov ecx, dword ptr [esi + 0x10] */ 1683 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 1684 ecx = ecx + 1; /* 0x31007979: inc ecx */ 1685 _flag_k = FK_INC; 1686 /* test esi, esi */ /* 0x3100797A: test esi, esi */ 1687 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 1688 _cf = 0; 1689 _flag_k = FK_TEST; 1690 MEM32(esi + 0x10) = ecx; /* 0x3100797C: mov dword ptr [esi + 0x10], ecx */ 1691 if (TEST_NZ(_flag_a, _flag_b)) goto L_310079CC; /* 0x3100797F: jne 0x310079cc */ 1692 L_31007981: 1693 eax = MEM32(edi + 0x8); /* 0x31007981: mov eax, dword ptr [edi + 8] */ 1694 edi = MEM32(edi + 0x4); /* 0x31007984: mov edi, dword ptr [edi + 4] */ 1695 ecx = MEM32(0x310481FC); /* 0x31007987: mov ecx, dword ptr [0x310481fc] */ 1696 PUSH32(esp, eax); /* 0x3100798D: push eax */ 1697 PUSH32(esp, edi); /* 0x3100798E: push edi */ 1698 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x40u); 1699 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1700 ecx = ecx + 0x40u; /* 0x3100798F: add ecx, 0x40 */ 1701 _flag_k = FK_ADD; 1702 PUSH32(esp, 0x31051FD4u); /* 0x31007992: push 0x31051fd4 */ 1703 PUSH32(esp, ecx); /* 0x31007997: push ecx */ 1704 RECOMP_ICALL(MEM32(0x310481F8)); /* 0x31007998: call dword ptr [0x310481f8] */ 1705 RECOMP_FLAGS_IN(); 1706 ecx = MEM32(ebp + (-0x1C)); /* 0x3100799E: mov ecx, dword ptr [ebp - 0x1c] */ 1707 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 1708 eax = eax | 0xFFFFFFFFu; /* 0x310079A1: or eax, 0xffffffff */ 1709 _cf = 0; 1710 _flag_k = FK_TEST; 1711 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 1712 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1713 esp = esp + 0x10u; /* 0x310079A4: add esp, 0x10 */ 1714 _flag_k = FK_ADD; 1715 /* cmp ecx, eax */ /* 0x310079A7: cmp ecx, eax */ 1716 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 1717 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1718 _flag_k = FK_CMP; 1719 MEM32(ebp + (-0x4)) = eax; /* 0x310079A9: mov dword ptr [ebp - 4], eax */ 1720 if (CMP_EQ(_flag_a, _flag_b)) goto L_310079B7; /* 0x310079AC: je 0x310079b7 */ 1721 L_310079AE: 1722 ecx = MEM32(ebp + (-0x18)); /* 0x310079AE: mov ecx, dword ptr [ebp - 0x18] */ 1723 RECOMP_ICALL(MEM32(0x31048294)); /* 0x310079B1: call dword ptr [0x31048294] */ 1724 RECOMP_FLAGS_IN(); 1725 L_310079B7: 1726 edi = POP32_VAL(esp); /* 0x310079B7: pop edi */ 1727 esi = POP32_VAL(esp); /* 0x310079B8: pop esi */ 1728 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 1729 SET_LO8(eax, 0); /* 0x310079B9: xor al, al */ 1730 _cf = 0; 1731 _flag_k = FK_NARROW(FK_TEST, 24); 1732 ebx = POP32_VAL(esp); /* 0x310079BB: pop ebx */ 1733 ecx = MEM32(ebp + (-0xC)); /* 0x310079BC: mov ecx, dword ptr [ebp - 0xc] */ 1734 MEM32(FS_BASE + (0)) = ecx; /* 0x310079BF: mov dword ptr fs:[0], ecx */ 1735 esp = ebp; /* 0x310079C6: mov esp, ebp */ 1736 ebp = POP32_VAL(esp); /* 0x310079C8: pop ebp */ 1737 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x310079C9: ret 4 */ 1738 L_310079CC: 1739 ecx = MEM32(ebx + 0xC); /* 0x310079CC: mov ecx, dword ptr [ebx + 0xc] */ 1740 edx = MEM32(ecx); /* 0x310079CF: mov edx, dword ptr [ecx] */ 1741 PUSH32(esp, esi); /* 0x310079D1: push esi */ 1742 eax = ebp + (-0x14); /* 0x310079D2: lea eax, [ebp - 0x14] */ 1743 PUSH32(esp, eax); /* 0x310079D5: push eax */ 1744 RECOMP_ICALL(MEM32(edx + 0xC)); /* 0x310079D6: call dword ptr [edx + 0xc] */ 1745 RECOMP_FLAGS_IN(); 1746 eax = MEM32(esi + 0x10); /* 0x310079D9: mov eax, dword ptr [esi + 0x10] */ 1747 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 1748 eax = eax - 1; /* 0x310079DC: dec eax */ 1749 _flag_k = FK_DEC; 1750 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x310079DD: mov byte ptr [ebp - 4], 1 */ 1751 MEM32(esi + 0x10) = eax; /* 0x310079E1: mov dword ptr [esi + 0x10], eax */ 1752 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_310079EF; /* 0x310079E4: jne 0x310079ef */ 1753 L_310079E6: 1754 PUSH32(esp, esi); /* 0x310079E6: push esi */ 1755 RECOMP_ICALL(0x31046858u); /* 0x310079E7: call 0x31046858 */ /* not lifted */ 1756 RECOMP_FLAGS_IN(); 1757 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1758 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1759 esp = esp + 4; /* 0x310079EC: add esp, 4 */ 1760 _flag_k = FK_ADD; 1761 L_310079EF: 1762 eax = MEM32(ebp + (-0x14)); /* 0x310079EF: mov eax, dword ptr [ebp - 0x14] */ 1763 /* cmp MEM32(eax), 0x80000000u */ /* 0x310079F2: cmp dword ptr [eax], 0x80000000 */ 1764 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x80000000u); 1765 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1766 _flag_k = FK_CMP; 1767 ecx = MEM32(eax + 0x4); /* 0x310079F8: mov ecx, dword ptr [eax + 4] */ 1768 if (CMP_AE(_flag_a, _flag_b)) goto L_31007A02; /* 0x310079FB: jae 0x31007a02 */ 1769 L_310079FD: 1770 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(8); 1771 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1772 eax = eax + 8; /* 0x310079FD: add eax, 8 */ 1773 _flag_k = FK_ADD; 1774 goto L_31007A05; /* 0x31007A00: jmp 0x31007a05 */ 1775 L_31007A02: 1776 eax = MEM32(eax + 0x8); /* 0x31007A02: mov eax, dword ptr [eax + 8] */ 1777 L_31007A05: 1778 PUSH32(esp, ecx); /* 0x31007A05: push ecx */ 1779 PUSH32(esp, eax); /* 0x31007A06: push eax */ 1780 ecx = ebp + (-0x64); /* 0x31007A07: lea ecx, [ebp - 0x64] */ 1781 RECOMP_ICALL(MEM32(0x31048320)); /* 0x31007A0A: call dword ptr [0x31048320] */ 1782 RECOMP_FLAGS_IN(); 1783 MEM32(ebp + (-0x24)) = 0; /* 0x31007A10: mov dword ptr [ebp - 0x24], 0 */ 1784 esi = MEM32(0x31048344); /* 0x31007A17: mov esi, dword ptr [0x31048344] */ 1785 ecx = ebp + (-0x64); /* 0x31007A1D: lea ecx, [ebp - 0x64] */ 1786 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x31007A20: mov byte ptr [ebp - 4], 2 */ 1787 RECOMP_ICALL(esi); /* 0x31007A24: call esi */ 1788 RECOMP_FLAGS_IN(); 1789 /* test eax, eax */ /* 0x31007A26: test eax, eax */ 1790 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1791 _cf = 0; 1792 _flag_k = FK_TEST; 1793 if (TEST_Z(_flag_a, _flag_b)) goto L_31007A47; /* 0x31007A28: je 0x31007a47 */ 1794 L_31007A2A: 1795 ecx = ebp + (-0x64); /* 0x31007A2A: lea ecx, [ebp - 0x64] */ 1796 RECOMP_ICALL(esi); /* 0x31007A2D: call esi */ 1797 RECOMP_FLAGS_IN(); 1798 PUSH32(esp, eax); /* 0x31007A2F: push eax */ 1799 ecx = ebp + (-0x64); /* 0x31007A30: lea ecx, [ebp - 0x64] */ 1800 PUSH32(esp, ecx); /* 0x31007A33: push ecx */ 1801 ecx = edi; /* 0x31007A34: mov ecx, edi */ 1802 RECOMP_ICALL(0x31006130u); /* 0x31007A36: call 0x31006130 */ /* not lifted */ 1803 RECOMP_FLAGS_IN(); 1804 SET_LO8(ebx, LO8(eax)); /* 0x31007A3B: mov bl, al */ 1805 MEM8(edi + 0x14) = (uint8_t)(1); /* 0x31007A3D: mov byte ptr [edi + 0x14], 1 */ 1806 MEM8(edi + 0x15) = (uint8_t)(0); /* 0x31007A41: mov byte ptr [edi + 0x15], 0 */ 1807 goto L_31007A53; /* 0x31007A45: jmp 0x31007a53 */ 1808 L_31007A47: 1809 edx = MEM32(ebx); /* 0x31007A47: mov edx, dword ptr [ebx] */ 1810 PUSH32(esp, 5); /* 0x31007A49: push 5 */ 1811 ecx = ebx; /* 0x31007A4B: mov ecx, ebx */ 1812 RECOMP_ICALL(MEM32(edx + 0x2C)); /* 0x31007A4D: call dword ptr [edx + 0x2c] */ 1813 RECOMP_FLAGS_IN(); 1814 SET_LO8(ebx, MEM8(ebp + (-0xD))); /* 0x31007A50: mov bl, byte ptr [ebp - 0xd] */ 1815 L_31007A53: 1816 ecx = ebp + (-0x64); /* 0x31007A53: lea ecx, [ebp - 0x64] */ 1817 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x31007A56: mov byte ptr [ebp - 4], 1 */ 1818 RECOMP_ICALL(MEM32(0x31048314)); /* 0x31007A5A: call dword ptr [0x31048314] */ 1819 RECOMP_FLAGS_IN(); 1820 ecx = ebp + (-0x14); /* 0x31007A60: lea ecx, [ebp - 0x14] */ 1821 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x31007A63: mov byte ptr [ebp - 4], 0 */ 1822 RECOMP_ICALL(0x31004760u); /* 0x31007A67: call 0x31004760 */ /* not lifted */ 1823 RECOMP_FLAGS_IN(); 1824 ecx = MEM32(ebp + (-0x1C)); /* 0x31007A6C: mov ecx, dword ptr [ebp - 0x1c] */ 1825 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 1826 eax = eax | 0xFFFFFFFFu; /* 0x31007A6F: or eax, 0xffffffff */ 1827 _cf = 0; 1828 _flag_k = FK_TEST; 1829 /* cmp ecx, eax */ /* 0x31007A72: cmp ecx, eax */ 1830 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 1831 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1832 _flag_k = FK_CMP; 1833 MEM32(ebp + (-0x4)) = eax; /* 0x31007A74: mov dword ptr [ebp - 4], eax */ 1834 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007A82; /* 0x31007A77: je 0x31007a82 */ 1835 L_31007A79: 1836 ecx = MEM32(ebp + (-0x18)); /* 0x31007A79: mov ecx, dword ptr [ebp - 0x18] */ 1837 RECOMP_ICALL(MEM32(0x31048294)); /* 0x31007A7C: call dword ptr [0x31048294] */ 1838 RECOMP_FLAGS_IN(); 1839 L_31007A82: 1840 ecx = MEM32(ebp + (-0xC)); /* 0x31007A82: mov ecx, dword ptr [ebp - 0xc] */ 1841 edi = POP32_VAL(esp); /* 0x31007A85: pop edi */ 1842 esi = POP32_VAL(esp); /* 0x31007A86: pop esi */ 1843 SET_LO8(eax, LO8(ebx)); /* 0x31007A87: mov al, bl */ 1844 ebx = POP32_VAL(esp); /* 0x31007A89: pop ebx */ 1845 MEM32(FS_BASE + (0)) = ecx; /* 0x31007A8A: mov dword ptr fs:[0], ecx */ 1846 esp = ebp; /* 0x31007A91: mov esp, ebp */ 1847 ebp = POP32_VAL(esp); /* 0x31007A93: pop ebp */ 1848 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31007A94: ret 4 */ 1849 RECOMP_REGS_OUT(); 1850 } 1851 1852 void sub_31007AA0(void) { 1853 int _fpu_cmp = 0; 1854 uint32_t _cf = 0; 1855 int _df = 1; 1856 uint32_t _flag_k = FK_NONE; 1857 uint32_t _flag_a = 0, _flag_b = 0; 1858 uint32_t _itail_tgt = 0; 1859 RECOMP_REGS_LOCALS 1860 RECOMP_ENTER(0x31007AA0u); 1861 1862 L_31007AA0: 1863 PUSH32(esp, ebp); /* 0x31007AA0: push ebp */ 1864 ebp = esp; /* 0x31007AA1: mov ebp, esp */ 1865 PUSH32(esp, 0xFFFFFFFFu); /* 0x31007AA3: push -1 */ 1866 PUSH32(esp, 0x31047199u); /* 0x31007AA5: push 0x31047199 */ 1867 eax = MEM32(FS_BASE + (0)); /* 0x31007AAA: mov eax, dword ptr fs:[0] */ 1868 PUSH32(esp, eax); /* 0x31007AB0: push eax */ 1869 MEM32(FS_BASE + (0)) = esp; /* 0x31007AB1: mov dword ptr fs:[0], esp */ 1870 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x54u); 1871 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1872 esp = esp - 0x54u; /* 0x31007AB8: sub esp, 0x54 */ 1873 _flag_k = FK_CMP; 1874 PUSH32(esp, ebx); /* 0x31007ABB: push ebx */ 1875 ebx = MEM32(ecx + 0x8); /* 0x31007ABC: mov ebx, dword ptr [ecx + 8] */ 1876 PUSH32(esp, esi); /* 0x31007ABF: push esi */ 1877 PUSH32(esp, edi); /* 0x31007AC0: push edi */ 1878 MEM32(ebp + (-0x14)) = ecx; /* 0x31007AC1: mov dword ptr [ebp - 0x14], ecx */ 1879 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1880 esi = 0; /* 0x31007AC4: xor esi, esi */ 1881 _cf = 0; 1882 _flag_k = FK_TEST; 1883 PUSH32(esp, esi); /* 0x31007AC6: push esi */ 1884 ecx = ebx; /* 0x31007AC7: mov ecx, ebx */ 1885 MEM32(ebp + (-0x1C)) = ebx; /* 0x31007AC9: mov dword ptr [ebp - 0x1c], ebx */ 1886 RECOMP_ICALL(MEM32(0x310482A4)); /* 0x31007ACC: call dword ptr [0x310482a4] */ 1887 RECOMP_FLAGS_IN(); 1888 MEM32(ebp + (-0x18)) = eax; /* 0x31007AD2: mov dword ptr [ebp - 0x18], eax */ 1889 PUSH32(esp, 0x800u); /* 0x31007AD5: push 0x800 */ 1890 ecx = ebp + (-0x60); /* 0x31007ADA: lea ecx, [ebp - 0x60] */ 1891 MEM32(ebp + (-0x4)) = esi; /* 0x31007ADD: mov dword ptr [ebp - 4], esi */ 1892 RECOMP_ICALL(MEM32(0x31048338)); /* 0x31007AE0: call dword ptr [0x31048338] */ 1893 RECOMP_FLAGS_IN(); 1894 MEM32(ebp + (-0x20)) = esi; /* 0x31007AE6: mov dword ptr [ebp - 0x20], esi */ 1895 esi = MEM32(ebp + 0x8); /* 0x31007AE9: mov esi, dword ptr [ebp + 8] */ 1896 eax = MEM32(esi); /* 0x31007AEC: mov eax, dword ptr [esi] */ 1897 ecx = ebp + (-0x60); /* 0x31007AEE: lea ecx, [ebp - 0x60] */ 1898 PUSH32(esp, ecx); /* 0x31007AF1: push ecx */ 1899 ecx = esi; /* 0x31007AF2: mov ecx, esi */ 1900 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x31007AF4: mov byte ptr [ebp - 4], 1 */ 1901 RECOMP_ICALL(MEM32(eax + 0x8)); /* 0x31007AF8: call dword ptr [eax + 8] */ 1902 RECOMP_FLAGS_IN(); 1903 edi = MEM32(ebp + (-0x50)); /* 0x31007AFB: mov edi, dword ptr [ebp - 0x50] */ 1904 PUSH32(esp, 0); /* 0x31007AFE: push 0 */ 1905 ecx = ebp + (-0x60); /* 0x31007B00: lea ecx, [ebp - 0x60] */ 1906 RECOMP_ICALL(MEM32(0x31048344)); /* 0x31007B03: call dword ptr [0x31048344] */ 1907 RECOMP_FLAGS_IN(); 1908 PUSH32(esp, eax); /* 0x31007B09: push eax */ 1909 PUSH32(esp, edi); /* 0x31007B0A: push edi */ 1910 ecx = ebp + (-0x10); /* 0x31007B0B: lea ecx, [ebp - 0x10] */ 1911 RECOMP_ICALL(0x310045D0u); /* 0x31007B0E: call 0x310045d0 */ /* not lifted */ 1912 RECOMP_FLAGS_IN(); 1913 PUSH32(esp, 0x14u); /* 0x31007B13: push 0x14 */ 1914 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x31007B15: mov byte ptr [ebp - 4], 2 */ 1915 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 1916 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1917 esi = esi + 4; /* 0x31007B19: add esi, 4 */ 1918 _flag_k = FK_ADD; 1919 RECOMP_ICALL(0x310468DAu); /* 0x31007B1C: call 0x310468da */ /* not lifted */ 1920 RECOMP_FLAGS_IN(); 1921 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1922 edi = 0; /* 0x31007B21: xor edi, edi */ 1923 _cf = 0; 1924 _flag_k = FK_TEST; 1925 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1926 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1927 esp = esp + 4; /* 0x31007B23: add esp, 4 */ 1928 _flag_k = FK_ADD; 1929 /* cmp eax, edi */ /* 0x31007B26: cmp eax, edi */ 1930 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 1931 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1932 _flag_k = FK_CMP; 1933 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007B47; /* 0x31007B28: je 0x31007b47 */ 1934 L_31007B2A: 1935 ecx = eax + 0x8; /* 0x31007B2A: lea ecx, [eax + 8] */ 1936 /* cmp ecx, esi */ /* 0x31007B2D: cmp ecx, esi */ 1937 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi); 1938 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1939 _flag_k = FK_CMP; 1940 MEM32(eax) = edi; /* 0x31007B2F: mov dword ptr [eax], edi */ 1941 MEM32(eax + 0x4) = edi; /* 0x31007B31: mov dword ptr [eax + 4], edi */ 1942 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007B40; /* 0x31007B34: je 0x31007b40 */ 1943 L_31007B36: 1944 edx = MEM32(esi); /* 0x31007B36: mov edx, dword ptr [esi] */ 1945 MEM32(ecx) = edx; /* 0x31007B38: mov dword ptr [ecx], edx */ 1946 edx = MEM32(esi + 0x4); /* 0x31007B3A: mov edx, dword ptr [esi + 4] */ 1947 MEM32(ecx + 0x4) = edx; /* 0x31007B3D: mov dword ptr [ecx + 4], edx */ 1948 L_31007B40: 1949 MEM32(eax + 0x10) = edi; /* 0x31007B40: mov dword ptr [eax + 0x10], edi */ 1950 esi = eax; /* 0x31007B43: mov esi, eax */ 1951 goto L_31007B49; /* 0x31007B45: jmp 0x31007b49 */ 1952 L_31007B47: 1953 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1954 esi = 0; /* 0x31007B47: xor esi, esi */ 1955 _cf = 0; 1956 _flag_k = FK_TEST; 1957 L_31007B49: 1958 ecx = MEM32(esi + 0x10); /* 0x31007B49: mov ecx, dword ptr [esi + 0x10] */ 1959 eax = MEM32(ebp + (-0x14)); /* 0x31007B4C: mov eax, dword ptr [ebp - 0x14] */ 1960 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 1961 ecx = ecx + 1; /* 0x31007B4F: inc ecx */ 1962 _flag_k = FK_INC; 1963 MEM32(esi + 0x10) = ecx; /* 0x31007B50: mov dword ptr [esi + 0x10], ecx */ 1964 ecx = MEM32(eax + 0xC); /* 0x31007B53: mov ecx, dword ptr [eax + 0xc] */ 1965 edx = MEM32(ecx); /* 0x31007B56: mov edx, dword ptr [ecx] */ 1966 eax = ebp + (-0x10); /* 0x31007B58: lea eax, [ebp - 0x10] */ 1967 PUSH32(esp, eax); /* 0x31007B5B: push eax */ 1968 PUSH32(esp, esi); /* 0x31007B5C: push esi */ 1969 RECOMP_ICALL(MEM32(edx + 0x18)); /* 0x31007B5D: call dword ptr [edx + 0x18] */ 1970 RECOMP_FLAGS_IN(); 1971 _flag_a = (uint32_t)(MEM32(esi + 0x10)); _flag_b = (uint32_t)(1); 1972 MEM32(esi + 0x10) = MEM32(esi + 0x10) - 1; /* 0x31007B60: dec dword ptr [esi + 0x10] */ 1973 _flag_k = FK_DEC; 1974 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_31007B72; /* 0x31007B63: jne 0x31007b72 */ 1975 L_31007B65: 1976 /* cmp esi, edi */ /* 0x31007B65: cmp esi, edi */ 1977 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi); 1978 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1979 _flag_k = FK_CMP; 1980 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007B72; /* 0x31007B67: je 0x31007b72 */ 1981 L_31007B69: 1982 PUSH32(esp, esi); /* 0x31007B69: push esi */ 1983 RECOMP_ICALL(0x31046858u); /* 0x31007B6A: call 0x31046858 */ /* not lifted */ 1984 RECOMP_FLAGS_IN(); 1985 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1986 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1987 esp = esp + 4; /* 0x31007B6F: add esp, 4 */ 1988 _flag_k = FK_ADD; 1989 L_31007B72: 1990 ecx = ebp + (-0x10); /* 0x31007B72: lea ecx, [ebp - 0x10] */ 1991 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x31007B75: mov byte ptr [ebp - 4], 1 */ 1992 RECOMP_ICALL(0x31004760u); /* 0x31007B79: call 0x31004760 */ /* not lifted */ 1993 RECOMP_FLAGS_IN(); 1994 ecx = ebp + (-0x60); /* 0x31007B7E: lea ecx, [ebp - 0x60] */ 1995 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x31007B81: mov byte ptr [ebp - 4], 0 */ 1996 RECOMP_ICALL(MEM32(0x31048314)); /* 0x31007B85: call dword ptr [0x31048314] */ 1997 RECOMP_FLAGS_IN(); 1998 ecx = MEM32(ebp + (-0x18)); /* 0x31007B8B: mov ecx, dword ptr [ebp - 0x18] */ 1999 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 2000 eax = eax | 0xFFFFFFFFu; /* 0x31007B8E: or eax, 0xffffffff */ 2001 _cf = 0; 2002 _flag_k = FK_TEST; 2003 /* cmp ecx, eax */ /* 0x31007B91: cmp ecx, eax */ 2004 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 2005 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2006 _flag_k = FK_CMP; 2007 MEM32(ebp + (-0x4)) = eax; /* 0x31007B93: mov dword ptr [ebp - 4], eax */ 2008 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007BA0; /* 0x31007B96: je 0x31007ba0 */ 2009 L_31007B98: 2010 ecx = ebx; /* 0x31007B98: mov ecx, ebx */ 2011 RECOMP_ICALL(MEM32(0x31048294)); /* 0x31007B9A: call dword ptr [0x31048294] */ 2012 RECOMP_FLAGS_IN(); 2013 L_31007BA0: 2014 ecx = MEM32(ebp + (-0xC)); /* 0x31007BA0: mov ecx, dword ptr [ebp - 0xc] */ 2015 edi = POP32_VAL(esp); /* 0x31007BA3: pop edi */ 2016 esi = POP32_VAL(esp); /* 0x31007BA4: pop esi */ 2017 ebx = POP32_VAL(esp); /* 0x31007BA5: pop ebx */ 2018 MEM32(FS_BASE + (0)) = ecx; /* 0x31007BA6: mov dword ptr fs:[0], ecx */ 2019 esp = ebp; /* 0x31007BAD: mov esp, ebp */ 2020 ebp = POP32_VAL(esp); /* 0x31007BAF: pop ebp */ 2021 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31007BB0: ret 4 */ 2022 RECOMP_REGS_OUT(); 2023 } 2024 2025 void sub_31007BC0(void) { 2026 int _fpu_cmp = 0; 2027 uint32_t _cf = 0; 2028 int _df = 1; 2029 uint32_t _flag_k = FK_NONE; 2030 uint32_t _flag_a = 0, _flag_b = 0; 2031 uint32_t _itail_tgt = 0; 2032 RECOMP_REGS_LOCALS 2033 RECOMP_ENTER(0x31007BC0u); 2034 2035 L_31007BC0: 2036 PUSH32(esp, ebp); /* 0x31007BC0: push ebp */ 2037 ebp = esp; /* 0x31007BC1: mov ebp, esp */ 2038 PUSH32(esp, 0xFFFFFFFFu); /* 0x31007BC3: push -1 */ 2039 PUSH32(esp, 0x310471C0u); /* 0x31007BC5: push 0x310471c0 */ 2040 eax = MEM32(FS_BASE + (0)); /* 0x31007BCA: mov eax, dword ptr fs:[0] */ 2041 PUSH32(esp, eax); /* 0x31007BD0: push eax */ 2042 MEM32(FS_BASE + (0)) = esp; /* 0x31007BD1: mov dword ptr fs:[0], esp */ 2043 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 2044 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2045 esp = esp - 0xCu; /* 0x31007BD8: sub esp, 0xc */ 2046 _flag_k = FK_CMP; 2047 PUSH32(esp, ebx); /* 0x31007BDB: push ebx */ 2048 PUSH32(esp, esi); /* 0x31007BDC: push esi */ 2049 PUSH32(esp, edi); /* 0x31007BDD: push edi */ 2050 edi = ecx; /* 0x31007BDE: mov edi, ecx */ 2051 ebx = MEM32(edi + 0x8); /* 0x31007BE0: mov ebx, dword ptr [edi + 8] */ 2052 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2053 esi = 0; /* 0x31007BE3: xor esi, esi */ 2054 _cf = 0; 2055 _flag_k = FK_TEST; 2056 PUSH32(esp, esi); /* 0x31007BE5: push esi */ 2057 ecx = ebx; /* 0x31007BE6: mov ecx, ebx */ 2058 MEM32(ebp + (-0x18)) = ebx; /* 0x31007BE8: mov dword ptr [ebp - 0x18], ebx */ 2059 RECOMP_ICALL(MEM32(0x310482A4)); /* 0x31007BEB: call dword ptr [0x310482a4] */ 2060 RECOMP_FLAGS_IN(); 2061 MEM32(ebp + (-0x14)) = eax; /* 0x31007BF1: mov dword ptr [ebp - 0x14], eax */ 2062 eax = MEM32(ebp + 0x10); /* 0x31007BF4: mov eax, dword ptr [ebp + 0x10] */ 2063 ecx = MEM32(ebp + 0xC); /* 0x31007BF7: mov ecx, dword ptr [ebp + 0xc] */ 2064 PUSH32(esp, esi); /* 0x31007BFA: push esi */ 2065 PUSH32(esp, eax); /* 0x31007BFB: push eax */ 2066 PUSH32(esp, ecx); /* 0x31007BFC: push ecx */ 2067 ecx = ebp + (-0x10); /* 0x31007BFD: lea ecx, [ebp - 0x10] */ 2068 MEM32(ebp + (-0x4)) = esi; /* 0x31007C00: mov dword ptr [ebp - 4], esi */ 2069 RECOMP_ICALL(0x310045D0u); /* 0x31007C03: call 0x310045d0 */ /* not lifted */ 2070 RECOMP_FLAGS_IN(); 2071 PUSH32(esp, 0x14u); /* 0x31007C08: push 0x14 */ 2072 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x31007C0A: mov byte ptr [ebp - 4], 1 */ 2073 RECOMP_ICALL(0x310468DAu); /* 0x31007C0E: call 0x310468da */ /* not lifted */ 2074 RECOMP_FLAGS_IN(); 2075 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2076 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2077 esp = esp + 4; /* 0x31007C13: add esp, 4 */ 2078 _flag_k = FK_ADD; 2079 /* cmp eax, esi */ /* 0x31007C16: cmp eax, esi */ 2080 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 2081 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2082 _flag_k = FK_CMP; 2083 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007C3A; /* 0x31007C18: je 0x31007c3a */ 2084 L_31007C1A: 2085 edx = MEM32(ebp + 0x8); /* 0x31007C1A: mov edx, dword ptr [ebp + 8] */ 2086 ecx = eax + 0x8; /* 0x31007C1D: lea ecx, [eax + 8] */ 2087 /* cmp ecx, edx */ /* 0x31007C20: cmp ecx, edx */ 2088 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 2089 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2090 _flag_k = FK_CMP; 2091 MEM32(eax) = esi; /* 0x31007C22: mov dword ptr [eax], esi */ 2092 MEM32(eax + 0x4) = esi; /* 0x31007C24: mov dword ptr [eax + 4], esi */ 2093 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007C35; /* 0x31007C27: je 0x31007c35 */ 2094 L_31007C29: 2095 esi = MEM32(edx); /* 0x31007C29: mov esi, dword ptr [edx] */ 2096 MEM32(ecx) = esi; /* 0x31007C2B: mov dword ptr [ecx], esi */ 2097 edx = MEM32(edx + 0x4); /* 0x31007C2D: mov edx, dword ptr [edx + 4] */ 2098 MEM32(ecx + 0x4) = edx; /* 0x31007C30: mov dword ptr [ecx + 4], edx */ 2099 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2100 esi = 0; /* 0x31007C33: xor esi, esi */ 2101 _cf = 0; 2102 _flag_k = FK_TEST; 2103 L_31007C35: 2104 MEM32(eax + 0x10) = esi; /* 0x31007C35: mov dword ptr [eax + 0x10], esi */ 2105 esi = eax; /* 0x31007C38: mov esi, eax */ 2106 L_31007C3A: 2107 _flag_a = (uint32_t)(MEM32(esi + 0x10)); _flag_b = (uint32_t)(1); 2108 MEM32(esi + 0x10) = MEM32(esi + 0x10) + 1; /* 0x31007C3A: inc dword ptr [esi + 0x10] */ 2109 _flag_k = FK_INC; 2110 ecx = MEM32(edi + 0xC); /* 0x31007C3D: mov ecx, dword ptr [edi + 0xc] */ 2111 eax = MEM32(ecx); /* 0x31007C40: mov eax, dword ptr [ecx] */ 2112 edx = ebp + (-0x10); /* 0x31007C42: lea edx, [ebp - 0x10] */ 2113 PUSH32(esp, edx); /* 0x31007C45: push edx */ 2114 PUSH32(esp, esi); /* 0x31007C46: push esi */ 2115 RECOMP_ICALL(MEM32(eax + 0x18)); /* 0x31007C47: call dword ptr [eax + 0x18] */ 2116 RECOMP_FLAGS_IN(); 2117 _flag_a = (uint32_t)(MEM32(esi + 0x10)); _flag_b = (uint32_t)(1); 2118 MEM32(esi + 0x10) = MEM32(esi + 0x10) - 1; /* 0x31007C4A: dec dword ptr [esi + 0x10] */ 2119 _flag_k = FK_DEC; 2120 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_31007C5C; /* 0x31007C4D: jne 0x31007c5c */ 2121 L_31007C4F: 2122 /* test esi, esi */ /* 0x31007C4F: test esi, esi */ 2123 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 2124 _cf = 0; 2125 _flag_k = FK_TEST; 2126 if (TEST_Z(_flag_a, _flag_b)) goto L_31007C5C; /* 0x31007C51: je 0x31007c5c */ 2127 L_31007C53: 2128 PUSH32(esp, esi); /* 0x31007C53: push esi */ 2129 RECOMP_ICALL(0x31046858u); /* 0x31007C54: call 0x31046858 */ /* not lifted */ 2130 RECOMP_FLAGS_IN(); 2131 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2132 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2133 esp = esp + 4; /* 0x31007C59: add esp, 4 */ 2134 _flag_k = FK_ADD; 2135 L_31007C5C: 2136 ecx = ebp + (-0x10); /* 0x31007C5C: lea ecx, [ebp - 0x10] */ 2137 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x31007C5F: mov byte ptr [ebp - 4], 0 */ 2138 RECOMP_ICALL(0x31004760u); /* 0x31007C63: call 0x31004760 */ /* not lifted */ 2139 RECOMP_FLAGS_IN(); 2140 ecx = MEM32(ebp + (-0x14)); /* 0x31007C68: mov ecx, dword ptr [ebp - 0x14] */ 2141 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 2142 eax = eax | 0xFFFFFFFFu; /* 0x31007C6B: or eax, 0xffffffff */ 2143 _cf = 0; 2144 _flag_k = FK_TEST; 2145 /* cmp ecx, eax */ /* 0x31007C6E: cmp ecx, eax */ 2146 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 2147 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2148 _flag_k = FK_CMP; 2149 MEM32(ebp + (-0x4)) = eax; /* 0x31007C70: mov dword ptr [ebp - 4], eax */ 2150 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007C7D; /* 0x31007C73: je 0x31007c7d */ 2151 L_31007C75: 2152 ecx = ebx; /* 0x31007C75: mov ecx, ebx */ 2153 RECOMP_ICALL(MEM32(0x31048294)); /* 0x31007C77: call dword ptr [0x31048294] */ 2154 RECOMP_FLAGS_IN(); 2155 L_31007C7D: 2156 ecx = MEM32(ebp + (-0xC)); /* 0x31007C7D: mov ecx, dword ptr [ebp - 0xc] */ 2157 edi = POP32_VAL(esp); /* 0x31007C80: pop edi */ 2158 esi = POP32_VAL(esp); /* 0x31007C81: pop esi */ 2159 ebx = POP32_VAL(esp); /* 0x31007C82: pop ebx */ 2160 MEM32(FS_BASE + (0)) = ecx; /* 0x31007C83: mov dword ptr fs:[0], ecx */ 2161 esp = ebp; /* 0x31007C8A: mov esp, ebp */ 2162 ebp = POP32_VAL(esp); /* 0x31007C8C: pop ebp */ 2163 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31007C8D: ret 0xc */ 2164 RECOMP_REGS_OUT(); 2165 } 2166 2167 void sub_31007C90(void) { 2168 int _fpu_cmp = 0; 2169 uint32_t _cf = 0; 2170 int _df = 1; 2171 uint32_t _flag_k = FK_NONE; 2172 uint32_t _flag_a = 0, _flag_b = 0; 2173 uint32_t _itail_tgt = 0; 2174 RECOMP_REGS_LOCALS 2175 RECOMP_ENTER(0x31007C90u); 2176 2177 L_31007C90: 2178 PUSH32(esp, ebp); /* 0x31007C90: push ebp */ 2179 ebp = esp; /* 0x31007C91: mov ebp, esp */ 2180 PUSH32(esp, 0xFFFFFFFFu); /* 0x31007C93: push -1 */ 2181 PUSH32(esp, 0x310471D8u); /* 0x31007C95: push 0x310471d8 */ 2182 eax = MEM32(FS_BASE + (0)); /* 0x31007C9A: mov eax, dword ptr fs:[0] */ 2183 PUSH32(esp, eax); /* 0x31007CA0: push eax */ 2184 MEM32(FS_BASE + (0)) = esp; /* 0x31007CA1: mov dword ptr fs:[0], esp */ 2185 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 2186 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2187 esp = esp - 0xCu; /* 0x31007CA8: sub esp, 0xc */ 2188 _flag_k = FK_CMP; 2189 PUSH32(esp, ebx); /* 0x31007CAB: push ebx */ 2190 PUSH32(esp, esi); /* 0x31007CAC: push esi */ 2191 PUSH32(esp, edi); /* 0x31007CAD: push edi */ 2192 edi = ecx; /* 0x31007CAE: mov edi, ecx */ 2193 ebx = MEM32(edi + 0x8); /* 0x31007CB0: mov ebx, dword ptr [edi + 8] */ 2194 PUSH32(esp, 0); /* 0x31007CB3: push 0 */ 2195 ecx = ebx; /* 0x31007CB5: mov ecx, ebx */ 2196 MEM32(ebp + (-0x18)) = ebx; /* 0x31007CB7: mov dword ptr [ebp - 0x18], ebx */ 2197 RECOMP_ICALL(MEM32(0x310482A4)); /* 0x31007CBA: call dword ptr [0x310482a4] */ 2198 RECOMP_FLAGS_IN(); 2199 MEM32(ebp + (-0x14)) = eax; /* 0x31007CC0: mov dword ptr [ebp - 0x14], eax */ 2200 PUSH32(esp, 0x14u); /* 0x31007CC3: push 0x14 */ 2201 MEM32(ebp + (-0x4)) = 0; /* 0x31007CC5: mov dword ptr [ebp - 4], 0 */ 2202 RECOMP_ICALL(0x310468DAu); /* 0x31007CCC: call 0x310468da */ /* not lifted */ 2203 RECOMP_FLAGS_IN(); 2204 esi = eax; /* 0x31007CD1: mov esi, eax */ 2205 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2206 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2207 esp = esp + 4; /* 0x31007CD3: add esp, 4 */ 2208 _flag_k = FK_ADD; 2209 /* test esi, esi */ /* 0x31007CD6: test esi, esi */ 2210 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 2211 _cf = 0; 2212 _flag_k = FK_TEST; 2213 if (TEST_Z(_flag_a, _flag_b)) goto L_31007CFC; /* 0x31007CD8: je 0x31007cfc */ 2214 L_31007CDA: 2215 eax = MEM32(ebp + 0x8); /* 0x31007CDA: mov eax, dword ptr [ebp + 8] */ 2216 PUSH32(esp, eax); /* 0x31007CDD: push eax */ 2217 ecx = esi + 0x8; /* 0x31007CDE: lea ecx, [esi + 8] */ 2218 MEM32(esi) = 0; /* 0x31007CE1: mov dword ptr [esi], 0 */ 2219 MEM32(esi + 0x4) = 0; /* 0x31007CE7: mov dword ptr [esi + 4], 0 */ 2220 RECOMP_ICALL(0x31007530u); /* 0x31007CEE: call 0x31007530 */ /* not lifted */ 2221 RECOMP_FLAGS_IN(); 2222 MEM32(esi + 0x10) = 0; /* 0x31007CF3: mov dword ptr [esi + 0x10], 0 */ 2223 goto L_31007CFE; /* 0x31007CFA: jmp 0x31007cfe */ 2224 L_31007CFC: 2225 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2226 esi = 0; /* 0x31007CFC: xor esi, esi */ 2227 _cf = 0; 2228 _flag_k = FK_TEST; 2229 L_31007CFE: 2230 _flag_a = (uint32_t)(MEM32(esi + 0x10)); _flag_b = (uint32_t)(1); 2231 MEM32(esi + 0x10) = MEM32(esi + 0x10) + 1; /* 0x31007CFE: inc dword ptr [esi + 0x10] */ 2232 _flag_k = FK_INC; 2233 ecx = MEM32(edi + 0xC); /* 0x31007D01: mov ecx, dword ptr [edi + 0xc] */ 2234 edx = MEM32(ecx); /* 0x31007D04: mov edx, dword ptr [ecx] */ 2235 PUSH32(esp, esi); /* 0x31007D06: push esi */ 2236 eax = ebp + (-0x10); /* 0x31007D07: lea eax, [ebp - 0x10] */ 2237 PUSH32(esp, eax); /* 0x31007D0A: push eax */ 2238 RECOMP_ICALL(MEM32(edx + 0xC)); /* 0x31007D0B: call dword ptr [edx + 0xc] */ 2239 RECOMP_FLAGS_IN(); 2240 _flag_a = (uint32_t)(MEM32(esi + 0x10)); _flag_b = (uint32_t)(1); 2241 MEM32(esi + 0x10) = MEM32(esi + 0x10) - 1; /* 0x31007D0E: dec dword ptr [esi + 0x10] */ 2242 _flag_k = FK_DEC; 2243 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_31007D20; /* 0x31007D11: jne 0x31007d20 */ 2244 L_31007D13: 2245 /* test esi, esi */ /* 0x31007D13: test esi, esi */ 2246 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 2247 _cf = 0; 2248 _flag_k = FK_TEST; 2249 if (TEST_Z(_flag_a, _flag_b)) goto L_31007D20; /* 0x31007D15: je 0x31007d20 */ 2250 L_31007D17: 2251 PUSH32(esp, esi); /* 0x31007D17: push esi */ 2252 RECOMP_ICALL(0x31046858u); /* 0x31007D18: call 0x31046858 */ /* not lifted */ 2253 RECOMP_FLAGS_IN(); 2254 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2255 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2256 esp = esp + 4; /* 0x31007D1D: add esp, 4 */ 2257 _flag_k = FK_ADD; 2258 L_31007D20: 2259 eax = MEM32(ebp + (-0x10)); /* 0x31007D20: mov eax, dword ptr [ebp - 0x10] */ 2260 ecx = MEM32(eax + 0x4); /* 0x31007D23: mov ecx, dword ptr [eax + 4] */ 2261 /* test ecx, ecx */ /* 0x31007D26: test ecx, ecx */ 2262 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 2263 _cf = 0; 2264 _flag_k = FK_TEST; 2265 if (TEST_Z(_flag_a, _flag_b)) goto L_31007D45; /* 0x31007D28: je 0x31007d45 */ 2266 L_31007D2A: 2267 /* cmp MEM32(eax), 0x80000000u */ /* 0x31007D2A: cmp dword ptr [eax], 0x80000000 */ 2268 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x80000000u); 2269 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2270 _flag_k = FK_CMP; 2271 ecx = eax + 0x8; /* 0x31007D30: lea ecx, [eax + 8] */ 2272 if (CMP_B(_flag_a, _flag_b)) goto L_31007D38; /* 0x31007D33: jb 0x31007d38 */ 2273 L_31007D35: 2274 ecx = MEM32(eax + 0x8); /* 0x31007D35: mov ecx, dword ptr [eax + 8] */ 2275 L_31007D38: 2276 edx = MEM32(ebp + 0xC); /* 0x31007D38: mov edx, dword ptr [ebp + 0xc] */ 2277 MEM32(edx) = ecx; /* 0x31007D3B: mov dword ptr [edx], ecx */ 2278 eax = MEM32(eax + 0x4); /* 0x31007D3D: mov eax, dword ptr [eax + 4] */ 2279 ecx = MEM32(ebp + 0x10); /* 0x31007D40: mov ecx, dword ptr [ebp + 0x10] */ 2280 MEM32(ecx) = eax; /* 0x31007D43: mov dword ptr [ecx], eax */ 2281 L_31007D45: 2282 ecx = ebp + (-0x10); /* 0x31007D45: lea ecx, [ebp - 0x10] */ 2283 RECOMP_ICALL(0x31004760u); /* 0x31007D48: call 0x31004760 */ /* not lifted */ 2284 RECOMP_FLAGS_IN(); 2285 ecx = MEM32(ebp + (-0x14)); /* 0x31007D4D: mov ecx, dword ptr [ebp - 0x14] */ 2286 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 2287 eax = eax | 0xFFFFFFFFu; /* 0x31007D50: or eax, 0xffffffff */ 2288 _cf = 0; 2289 _flag_k = FK_TEST; 2290 /* cmp ecx, eax */ /* 0x31007D53: cmp ecx, eax */ 2291 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 2292 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2293 _flag_k = FK_CMP; 2294 MEM32(ebp + (-0x4)) = eax; /* 0x31007D55: mov dword ptr [ebp - 4], eax */ 2295 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007D62; /* 0x31007D58: je 0x31007d62 */ 2296 L_31007D5A: 2297 ecx = ebx; /* 0x31007D5A: mov ecx, ebx */ 2298 RECOMP_ICALL(MEM32(0x31048294)); /* 0x31007D5C: call dword ptr [0x31048294] */ 2299 RECOMP_FLAGS_IN(); 2300 L_31007D62: 2301 ecx = MEM32(ebp + (-0xC)); /* 0x31007D62: mov ecx, dword ptr [ebp - 0xc] */ 2302 edi = POP32_VAL(esp); /* 0x31007D65: pop edi */ 2303 esi = POP32_VAL(esp); /* 0x31007D66: pop esi */ 2304 SET_LO8(eax, 1); /* 0x31007D67: mov al, 1 */ 2305 ebx = POP32_VAL(esp); /* 0x31007D69: pop ebx */ 2306 MEM32(FS_BASE + (0)) = ecx; /* 0x31007D6A: mov dword ptr fs:[0], ecx */ 2307 esp = ebp; /* 0x31007D71: mov esp, ebp */ 2308 ebp = POP32_VAL(esp); /* 0x31007D73: pop ebp */ 2309 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31007D74: ret 0xc */ 2310 RECOMP_REGS_OUT(); 2311 } 2312 2313 void sub_31007D80(void) { 2314 int _fpu_cmp = 0; 2315 uint32_t _cf = 0; 2316 int _df = 1; 2317 uint32_t _flag_k = FK_NONE; 2318 uint32_t _flag_a = 0, _flag_b = 0; 2319 uint32_t _itail_tgt = 0; 2320 RECOMP_REGS_LOCALS 2321 RECOMP_ENTER(0x31007D80u); 2322 2323 L_31007D80: 2324 PUSH32(esp, ebp); /* 0x31007D80: push ebp */ 2325 ebp = esp; /* 0x31007D81: mov ebp, esp */ 2326 PUSH32(esp, 0xFFFFFFFFu); /* 0x31007D83: push -1 */ 2327 PUSH32(esp, 0x31047200u); /* 0x31007D85: push 0x31047200 */ 2328 eax = MEM32(FS_BASE + (0)); /* 0x31007D8A: mov eax, dword ptr fs:[0] */ 2329 PUSH32(esp, eax); /* 0x31007D90: push eax */ 2330 MEM32(FS_BASE + (0)) = esp; /* 0x31007D91: mov dword ptr fs:[0], esp */ 2331 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x30u); 2332 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2333 esp = esp - 0x30u; /* 0x31007D98: sub esp, 0x30 */ 2334 _flag_k = FK_CMP; 2335 PUSH32(esp, ebx); /* 0x31007D9B: push ebx */ 2336 PUSH32(esp, esi); /* 0x31007D9C: push esi */ 2337 ebx = ecx; /* 0x31007D9D: mov ebx, ecx */ 2338 ecx = MEM32(ebx + 0x8); /* 0x31007D9F: mov ecx, dword ptr [ebx + 8] */ 2339 PUSH32(esp, edi); /* 0x31007DA2: push edi */ 2340 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2341 esi = 0; /* 0x31007DA3: xor esi, esi */ 2342 _cf = 0; 2343 _flag_k = FK_TEST; 2344 PUSH32(esp, esi); /* 0x31007DA5: push esi */ 2345 MEM32(ebp + (-0x18)) = ebx; /* 0x31007DA6: mov dword ptr [ebp - 0x18], ebx */ 2346 MEM32(ebp + (-0x1C)) = ecx; /* 0x31007DA9: mov dword ptr [ebp - 0x1c], ecx */ 2347 MEM32(ebp + (-0x2C)) = ecx; /* 0x31007DAC: mov dword ptr [ebp - 0x2c], ecx */ 2348 RECOMP_ICALL(MEM32(0x310482A4)); /* 0x31007DAF: call dword ptr [0x310482a4] */ 2349 RECOMP_FLAGS_IN(); 2350 MEM32(ebp + (-0x28)) = eax; /* 0x31007DB5: mov dword ptr [ebp - 0x28], eax */ 2351 SET_LO8(eax, MEM8(ebp + 0xF)); /* 0x31007DB8: mov al, byte ptr [ebp + 0xf] */ 2352 edi = MEM32(ebp + 0xC); /* 0x31007DBB: mov edi, dword ptr [ebp + 0xc] */ 2353 PUSH32(esp, 0xFA0u); /* 0x31007DBE: push 0xfa0 */ 2354 MEM32(ebp + (-0x4)) = esi; /* 0x31007DC3: mov dword ptr [ebp - 4], esi */ 2355 MEM32(ebp + (-0x10)) = edi; /* 0x31007DC6: mov dword ptr [ebp - 0x10], edi */ 2356 MEM32(ebp + (-0x14)) = esi; /* 0x31007DC9: mov dword ptr [ebp - 0x14], esi */ 2357 MEM8(ebp + (-0x3C)) = (uint8_t)(LO8(eax)); /* 0x31007DCC: mov byte ptr [ebp - 0x3c], al */ 2358 RECOMP_ICALL(0x310468DAu); /* 0x31007DCF: call 0x310468da */ /* not lifted */ 2359 RECOMP_FLAGS_IN(); 2360 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2361 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2362 esp = esp + 4; /* 0x31007DD4: add esp, 4 */ 2363 _flag_k = FK_ADD; 2364 MEM32(ebp + (-0x38)) = eax; /* 0x31007DD7: mov dword ptr [ebp - 0x38], eax */ 2365 esi = eax; /* 0x31007DDA: mov esi, eax */ 2366 MEM32(ebp + 0xC) = 0x3E8u; /* 0x31007DDC: mov dword ptr [ebp + 0xc], 0x3e8 */ 2367 L_31007DE3: 2368 ecx = ebp + (-0x14); /* 0x31007DE3: lea ecx, [ebp - 0x14] */ 2369 PUSH32(esp, ecx); /* 0x31007DE6: push ecx */ 2370 PUSH32(esp, esi); /* 0x31007DE7: push esi */ 2371 RECOMP_ICALL(0x31008130u); /* 0x31007DE8: call 0x31008130 */ /* not lifted */ 2372 RECOMP_FLAGS_IN(); 2373 eax = MEM32(ebp + 0xC); /* 0x31007DED: mov eax, dword ptr [ebp + 0xc] */ 2374 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2375 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2376 esp = esp + 8; /* 0x31007DF0: add esp, 8 */ 2377 _flag_k = FK_ADD; 2378 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 2379 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2380 esi = esi + 4; /* 0x31007DF3: add esi, 4 */ 2381 _flag_k = FK_ADD; 2382 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2383 eax = eax - 1; /* 0x31007DF6: dec eax */ 2384 _flag_k = FK_DEC; 2385 MEM32(ebp + 0xC) = eax; /* 0x31007DF7: mov dword ptr [ebp + 0xc], eax */ 2386 RECOMP_BACKEDGE(); 2387 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_31007DE3; /* 0x31007DFA: jne 0x31007de3 */ 2388 L_31007DFC: 2389 eax = MEM32(ebp + (-0x38)); /* 0x31007DFC: mov eax, dword ptr [ebp - 0x38] */ 2390 ecx = eax + 0xFA0; /* 0x31007DFF: lea ecx, [eax + 0xfa0] */ 2391 MEM32(ebp + (-0x34)) = ecx; /* 0x31007E05: mov dword ptr [ebp - 0x34], ecx */ 2392 MEM32(ebp + (-0x30)) = ecx; /* 0x31007E08: mov dword ptr [ebp - 0x30], ecx */ 2393 MEM32(eax) = 0; /* 0x31007E0B: mov dword ptr [eax], 0 */ 2394 ecx = MEM32(ebx + 0xC); /* 0x31007E11: mov ecx, dword ptr [ebx + 0xc] */ 2395 edx = MEM32(ecx); /* 0x31007E14: mov edx, dword ptr [ecx] */ 2396 eax = ebp + (-0x3C); /* 0x31007E16: lea eax, [ebp - 0x3c] */ 2397 PUSH32(esp, eax); /* 0x31007E19: push eax */ 2398 eax = ebp + (-0x10); /* 0x31007E1A: lea eax, [ebp - 0x10] */ 2399 PUSH32(esp, eax); /* 0x31007E1D: push eax */ 2400 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x31007E1E: mov byte ptr [ebp - 4], 1 */ 2401 RECOMP_ICALL(MEM32(edx + 0x14)); /* 0x31007E22: call dword ptr [edx + 0x14] */ 2402 RECOMP_FLAGS_IN(); 2403 /* cmp MEM32(ebp + (-0x10)), edi */ /* 0x31007E25: cmp dword ptr [ebp - 0x10], edi */ 2404 _flag_a = (uint32_t)(MEM32(ebp + (-0x10))); _flag_b = (uint32_t)(edi); 2405 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2406 _flag_k = FK_CMP; 2407 if (CMP_NE(_flag_a, _flag_b)) goto L_31007E90; /* 0x31007E28: jne 0x31007e90 */ 2408 L_31007E2A: 2409 ebx = MEM32(ebp + 0x8); /* 0x31007E2A: mov ebx, dword ptr [ebp + 8] */ 2410 L_31007E2D: 2411 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2412 esi = 0; /* 0x31007E2D: xor esi, esi */ 2413 _cf = 0; 2414 _flag_k = FK_TEST; 2415 L_31007E2F: 2416 eax = MEM32(ebp + (-0x38)); /* 0x31007E2F: mov eax, dword ptr [ebp - 0x38] */ 2417 /* test eax, eax */ /* 0x31007E32: test eax, eax */ 2418 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2419 _cf = 0; 2420 _flag_k = FK_TEST; 2421 ecx = MEM32(ebp + (-0x34)); /* 0x31007E34: mov ecx, dword ptr [ebp - 0x34] */ 2422 if (TEST_Z(_flag_a, _flag_b)) goto L_31007E61; /* 0x31007E37: je 0x31007e61 */ 2423 L_31007E39: 2424 edx = ecx; /* 0x31007E39: mov edx, ecx */ 2425 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 2426 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2427 edx = edx - eax; /* 0x31007E3B: sub edx, eax */ 2428 _flag_k = FK_CMP; 2429 if (2u) _cf = (((edx) >> 1) & 1u); /* 0x31007E3D: sar edx, 2 */ 2430 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2431 edx = (uint32_t)((int32_t)edx >> 2u); 2432 /* cmp esi, edx */ /* 0x31007E40: cmp esi, edx */ 2433 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx); 2434 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2435 _flag_k = FK_CMP; 2436 if (CMP_AE(_flag_a, _flag_b)) goto L_31007E61; /* 0x31007E42: jae 0x31007e61 */ 2437 L_31007E44: 2438 eax = MEM32(eax + esi * 4); /* 0x31007E44: mov eax, dword ptr [eax + esi*4] */ 2439 ecx = MEM32(ebx + 0x8); /* 0x31007E47: mov ecx, dword ptr [ebx + 8] */ 2440 MEM32(ebp + (-0x20)) = eax; /* 0x31007E4A: mov dword ptr [ebp - 0x20], eax */ 2441 eax = ebp + (-0x24); /* 0x31007E4D: lea eax, [ebp - 0x24] */ 2442 PUSH32(esp, eax); /* 0x31007E50: push eax */ 2443 PUSH32(esp, 1); /* 0x31007E51: push 1 */ 2444 PUSH32(esp, ecx); /* 0x31007E53: push ecx */ 2445 ecx = ebx; /* 0x31007E54: mov ecx, ebx */ 2446 MEM32(ebp + (-0x24)) = edi; /* 0x31007E56: mov dword ptr [ebp - 0x24], edi */ 2447 RECOMP_ICALL(0x31007ED0u); /* 0x31007E59: call 0x31007ed0 */ /* not lifted */ 2448 RECOMP_FLAGS_IN(); 2449 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 2450 esi = esi + 1; /* 0x31007E5E: inc esi */ 2451 _flag_k = FK_INC; 2452 RECOMP_BACKEDGE(); 2453 goto L_31007E2F; /* 0x31007E5F: jmp 0x31007e2f */ 2454 L_31007E61: 2455 edx = MEM32(ecx + (-0x4)); /* 0x31007E61: mov edx, dword ptr [ecx - 4] */ 2456 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1); 2457 edx = edx + 1; /* 0x31007E64: inc edx */ 2458 _flag_k = FK_INC; 2459 /* test eax, eax */ /* 0x31007E65: test eax, eax */ 2460 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2461 _cf = 0; 2462 _flag_k = FK_TEST; 2463 if (TEST_Z(_flag_a, _flag_b)) goto L_31007E93; /* 0x31007E67: je 0x31007e93 */ 2464 L_31007E69: 2465 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 2466 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2467 ecx = ecx - eax; /* 0x31007E69: sub ecx, eax */ 2468 _flag_k = FK_CMP; 2469 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xFFFFFFFCu); 2470 ecx = ecx & 0xFFFFFFFCu; /* 0x31007E6B: and ecx, 0xfffffffc */ 2471 _cf = 0; 2472 _flag_k = FK_TEST; 2473 /* cmp ecx, 0xFA0u */ /* 0x31007E6E: cmp ecx, 0xfa0 */ 2474 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xFA0u); 2475 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2476 _flag_k = FK_CMP; 2477 if (CMP_NE(_flag_a, _flag_b)) goto L_31007E93; /* 0x31007E74: jne 0x31007e93 */ 2478 L_31007E76: 2479 MEM32(eax) = edx; /* 0x31007E76: mov dword ptr [eax], edx */ 2480 edx = MEM32(ebp + (-0x18)); /* 0x31007E78: mov edx, dword ptr [ebp - 0x18] */ 2481 ecx = MEM32(edx + 0xC); /* 0x31007E7B: mov ecx, dword ptr [edx + 0xc] */ 2482 eax = MEM32(ecx); /* 0x31007E7E: mov eax, dword ptr [ecx] */ 2483 edx = ebp + (-0x3C); /* 0x31007E80: lea edx, [ebp - 0x3c] */ 2484 PUSH32(esp, edx); /* 0x31007E83: push edx */ 2485 edx = ebp + (-0x10); /* 0x31007E84: lea edx, [ebp - 0x10] */ 2486 PUSH32(esp, edx); /* 0x31007E87: push edx */ 2487 RECOMP_ICALL(MEM32(eax + 0x14)); /* 0x31007E88: call dword ptr [eax + 0x14] */ 2488 RECOMP_FLAGS_IN(); 2489 /* cmp MEM32(ebp + (-0x10)), edi */ /* 0x31007E8B: cmp dword ptr [ebp - 0x10], edi */ 2490 _flag_a = (uint32_t)(MEM32(ebp + (-0x10))); _flag_b = (uint32_t)(edi); 2491 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2492 _flag_k = FK_CMP; 2493 RECOMP_BACKEDGE(); 2494 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007E2D; /* 0x31007E8E: je 0x31007e2d */ 2495 L_31007E90: 2496 eax = MEM32(ebp + (-0x38)); /* 0x31007E90: mov eax, dword ptr [ebp - 0x38] */ 2497 L_31007E93: 2498 PUSH32(esp, eax); /* 0x31007E93: push eax */ 2499 RECOMP_ICALL(0x31046858u); /* 0x31007E94: call 0x31046858 */ /* not lifted */ 2500 RECOMP_FLAGS_IN(); 2501 ecx = MEM32(ebp + (-0x28)); /* 0x31007E99: mov ecx, dword ptr [ebp - 0x28] */ 2502 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2503 eax = 0; /* 0x31007E9C: xor eax, eax */ 2504 _cf = 0; 2505 _flag_k = FK_TEST; 2506 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2507 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2508 esp = esp + 4; /* 0x31007E9E: add esp, 4 */ 2509 _flag_k = FK_ADD; 2510 edi = POP32_VAL(esp); /* 0x31007EA1: pop edi */ 2511 MEM32(ebp + (-0x38)) = eax; /* 0x31007EA2: mov dword ptr [ebp - 0x38], eax */ 2512 MEM32(ebp + (-0x34)) = eax; /* 0x31007EA5: mov dword ptr [ebp - 0x34], eax */ 2513 MEM32(ebp + (-0x30)) = eax; /* 0x31007EA8: mov dword ptr [ebp - 0x30], eax */ 2514 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 2515 eax = eax | 0xFFFFFFFFu; /* 0x31007EAB: or eax, 0xffffffff */ 2516 _cf = 0; 2517 _flag_k = FK_TEST; 2518 /* cmp ecx, eax */ /* 0x31007EAE: cmp ecx, eax */ 2519 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 2520 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2521 _flag_k = FK_CMP; 2522 esi = POP32_VAL(esp); /* 0x31007EB0: pop esi */ 2523 MEM32(ebp + (-0x4)) = eax; /* 0x31007EB1: mov dword ptr [ebp - 4], eax */ 2524 ebx = POP32_VAL(esp); /* 0x31007EB4: pop ebx */ 2525 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007EC0; /* 0x31007EB5: je 0x31007ec0 */ 2526 L_31007EB7: 2527 ecx = MEM32(ebp + (-0x1C)); /* 0x31007EB7: mov ecx, dword ptr [ebp - 0x1c] */ 2528 RECOMP_ICALL(MEM32(0x31048294)); /* 0x31007EBA: call dword ptr [0x31048294] */ 2529 RECOMP_FLAGS_IN(); 2530 L_31007EC0: 2531 ecx = MEM32(ebp + (-0xC)); /* 0x31007EC0: mov ecx, dword ptr [ebp - 0xc] */ 2532 MEM32(FS_BASE + (0)) = ecx; /* 0x31007EC3: mov dword ptr fs:[0], ecx */ 2533 esp = ebp; /* 0x31007ECA: mov esp, ebp */ 2534 ebp = POP32_VAL(esp); /* 0x31007ECC: pop ebp */ 2535 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31007ECD: ret 8 */ 2536 RECOMP_REGS_OUT(); 2537 } 2538 2539 void sub_31007ED0(void) { 2540 int _fpu_cmp = 0; 2541 uint32_t _cf = 0; 2542 int _df = 1; 2543 uint32_t _flag_k = FK_NONE; 2544 uint32_t _flag_a = 0, _flag_b = 0; 2545 uint32_t _itail_tgt = 0; 2546 RECOMP_REGS_LOCALS 2547 RECOMP_ENTER(0x31007ED0u); 2548 2549 L_31007ED0: 2550 PUSH32(esp, ebp); /* 0x31007ED0: push ebp */ 2551 ebp = esp; /* 0x31007ED1: mov ebp, esp */ 2552 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 2553 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2554 esp = esp - 0x10u; /* 0x31007ED3: sub esp, 0x10 */ 2555 _flag_k = FK_CMP; 2556 edx = MEM32(ecx + 0xC); /* 0x31007ED6: mov edx, dword ptr [ecx + 0xc] */ 2557 eax = MEM32(ebp + 0xC); /* 0x31007ED9: mov eax, dword ptr [ebp + 0xc] */ 2558 PUSH32(esp, ebx); /* 0x31007EDC: push ebx */ 2559 PUSH32(esp, esi); /* 0x31007EDD: push esi */ 2560 esi = MEM32(ecx + 0x8); /* 0x31007EDE: mov esi, dword ptr [ecx + 8] */ 2561 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(esi); 2562 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2563 edx = edx - esi; /* 0x31007EE1: sub edx, esi */ 2564 _flag_k = FK_CMP; 2565 if (3u) _cf = (((edx) >> 2) & 1u); /* 0x31007EE3: sar edx, 3 */ 2566 if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2567 edx = (uint32_t)((int32_t)edx >> 3u); 2568 /* cmp edx, eax */ /* 0x31007EE6: cmp edx, eax */ 2569 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 2570 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2571 _flag_k = FK_CMP; 2572 PUSH32(esp, edi); /* 0x31007EE8: push edi */ 2573 MEM32(ebp + (-0x4)) = ecx; /* 0x31007EE9: mov dword ptr [ebp - 4], ecx */ 2574 if (CMP_AE(_flag_a, _flag_b)) goto L_31008002; /* 0x31007EEC: jae 0x31008002 */ 2575 L_31007EF2: 2576 edx = MEM32(ecx + 0x4); /* 0x31007EF2: mov edx, dword ptr [ecx + 4] */ 2577 /* test edx, edx */ /* 0x31007EF5: test edx, edx */ 2578 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 2579 _cf = 0; 2580 _flag_k = FK_TEST; 2581 if (TEST_Z(_flag_a, _flag_b)) goto L_31007F0A; /* 0x31007EF7: je 0x31007f0a */ 2582 L_31007EF9: 2583 ecx = esi; /* 0x31007EF9: mov ecx, esi */ 2584 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 2585 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2586 ecx = ecx - edx; /* 0x31007EFB: sub ecx, edx */ 2587 _flag_k = FK_CMP; 2588 if (3u) _cf = (((ecx) >> 2) & 1u); /* 0x31007EFD: sar ecx, 3 */ 2589 if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2590 ecx = (uint32_t)((int32_t)ecx >> 3u); 2591 /* cmp eax, ecx */ /* 0x31007F00: cmp eax, ecx */ 2592 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 2593 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2594 _flag_k = FK_CMP; 2595 if (CMP_AE(_flag_a, _flag_b)) goto L_31007F06; /* 0x31007F02: jae 0x31007f06 */ 2596 L_31007F04: 2597 eax = ecx; /* 0x31007F04: mov eax, ecx */ 2598 L_31007F06: 2599 /* test edx, edx */ /* 0x31007F06: test edx, edx */ 2600 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 2601 _cf = 0; 2602 _flag_k = FK_TEST; 2603 if (TEST_NZ(_flag_a, _flag_b)) goto L_31007F0E; /* 0x31007F08: jne 0x31007f0e */ 2604 L_31007F0A: 2605 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2606 esi = 0; /* 0x31007F0A: xor esi, esi */ 2607 _cf = 0; 2608 _flag_k = FK_TEST; 2609 goto L_31007F13; /* 0x31007F0C: jmp 0x31007f13 */ 2610 L_31007F0E: 2611 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx); 2612 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2613 esi = esi - edx; /* 0x31007F0E: sub esi, edx */ 2614 _flag_k = FK_CMP; 2615 if (3u) _cf = (((esi) >> 2) & 1u); /* 0x31007F10: sar esi, 3 */ 2616 if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)esi >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2617 esi = (uint32_t)((int32_t)esi >> 3u); 2618 L_31007F13: 2619 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 2620 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2621 eax = eax + esi; /* 0x31007F13: add eax, esi */ 2622 _flag_k = FK_ADD; 2623 /* test eax, eax */ /* 0x31007F15: test eax, eax */ 2624 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2625 _cf = 0; 2626 _flag_k = FK_TEST; 2627 MEM32(ebp + (-0x10)) = eax; /* 0x31007F17: mov dword ptr [ebp - 0x10], eax */ 2628 if (TEST_NS(_flag_a, _flag_b)) goto L_31007F1E; /* 0x31007F1A: jge 0x31007f1e */ 2629 L_31007F1C: 2630 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2631 eax = 0; /* 0x31007F1C: xor eax, eax */ 2632 _cf = 0; 2633 _flag_k = FK_TEST; 2634 L_31007F1E: 2635 if (3u) _cf = (((eax) >> 29) & 1u); /* 0x31007F1E: shl eax, 3 */ 2636 if (3u) { _flag_a = recomp_flags_pack((eax << 3u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2637 eax = eax << 3u; /* 0x31007F1E: shl eax, 3 */ 2638 PUSH32(esp, eax); /* 0x31007F21: push eax */ 2639 RECOMP_ICALL(0x310468DAu); /* 0x31007F22: call 0x310468da */ /* not lifted */ 2640 RECOMP_FLAGS_IN(); 2641 ebx = MEM32(ebp + (-0x4)); /* 0x31007F27: mov ebx, dword ptr [ebp - 4] */ 2642 esi = MEM32(ebx + 0x4); /* 0x31007F2A: mov esi, dword ptr [ebx + 4] */ 2643 MEM32(ebp + (-0xC)) = eax; /* 0x31007F2D: mov dword ptr [ebp - 0xc], eax */ 2644 edi = eax; /* 0x31007F30: mov edi, eax */ 2645 eax = MEM32(ebp + 0x8); /* 0x31007F32: mov eax, dword ptr [ebp + 8] */ 2646 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2647 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2648 esp = esp + 4; /* 0x31007F35: add esp, 4 */ 2649 _flag_k = FK_ADD; 2650 /* cmp esi, eax */ /* 0x31007F38: cmp esi, eax */ 2651 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 2652 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2653 _flag_k = FK_CMP; 2654 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007F53; /* 0x31007F3A: je 0x31007f53 */ 2655 L_31007F3C: 2656 PUSH32(esp, esi); /* 0x31007F3C: push esi */ 2657 PUSH32(esp, edi); /* 0x31007F3D: push edi */ 2658 RECOMP_ICALL(0x31006BE0u); /* 0x31007F3E: call 0x31006be0 */ /* not lifted */ 2659 RECOMP_FLAGS_IN(); 2660 eax = MEM32(ebp + 0x8); /* 0x31007F43: mov eax, dword ptr [ebp + 8] */ 2661 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(8); 2662 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2663 esi = esi + 8; /* 0x31007F46: add esi, 8 */ 2664 _flag_k = FK_ADD; 2665 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2666 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2667 esp = esp + 8; /* 0x31007F49: add esp, 8 */ 2668 _flag_k = FK_ADD; 2669 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(8); 2670 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2671 edi = edi + 8; /* 0x31007F4C: add edi, 8 */ 2672 _flag_k = FK_ADD; 2673 /* cmp esi, eax */ /* 0x31007F4F: cmp esi, eax */ 2674 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 2675 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2676 _flag_k = FK_CMP; 2677 RECOMP_BACKEDGE(); 2678 if (CMP_NE(_flag_a, _flag_b)) goto L_31007F3C; /* 0x31007F51: jne 0x31007f3c */ 2679 L_31007F53: 2680 eax = MEM32(ebp + 0xC); /* 0x31007F53: mov eax, dword ptr [ebp + 0xc] */ 2681 /* test eax, eax */ /* 0x31007F56: test eax, eax */ 2682 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2683 _cf = 0; 2684 _flag_k = FK_TEST; 2685 esi = edi; /* 0x31007F58: mov esi, edi */ 2686 if (TEST_Z(_flag_a, _flag_b)) goto L_31007F7B; /* 0x31007F5A: jbe 0x31007f7b */ 2687 L_31007F5C: 2688 MEM32(ebp + (-0x8)) = eax; /* 0x31007F5C: mov dword ptr [ebp - 8], eax */ 2689 L_31007F5F: 2690 ecx = MEM32(ebp + 0x10); /* 0x31007F5F: mov ecx, dword ptr [ebp + 0x10] */ 2691 PUSH32(esp, ecx); /* 0x31007F62: push ecx */ 2692 PUSH32(esp, esi); /* 0x31007F63: push esi */ 2693 RECOMP_ICALL(0x31006BE0u); /* 0x31007F64: call 0x31006be0 */ /* not lifted */ 2694 RECOMP_FLAGS_IN(); 2695 eax = MEM32(ebp + (-0x8)); /* 0x31007F69: mov eax, dword ptr [ebp - 8] */ 2696 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2697 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2698 esp = esp + 8; /* 0x31007F6C: add esp, 8 */ 2699 _flag_k = FK_ADD; 2700 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(8); 2701 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2702 esi = esi + 8; /* 0x31007F6F: add esi, 8 */ 2703 _flag_k = FK_ADD; 2704 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2705 eax = eax - 1; /* 0x31007F72: dec eax */ 2706 _flag_k = FK_DEC; 2707 MEM32(ebp + (-0x8)) = eax; /* 0x31007F73: mov dword ptr [ebp - 8], eax */ 2708 RECOMP_BACKEDGE(); 2709 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_31007F5F; /* 0x31007F76: jne 0x31007f5f */ 2710 L_31007F78: 2711 eax = MEM32(ebp + 0xC); /* 0x31007F78: mov eax, dword ptr [ebp + 0xc] */ 2712 L_31007F7B: 2713 esi = MEM32(ebp + 0x8); /* 0x31007F7B: mov esi, dword ptr [ebp + 8] */ 2714 eax = edi + eax * 8; /* 0x31007F7E: lea eax, [edi + eax*8] */ 2715 edi = MEM32(ebx + 0x8); /* 0x31007F81: mov edi, dword ptr [ebx + 8] */ 2716 /* cmp esi, edi */ /* 0x31007F84: cmp esi, edi */ 2717 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi); 2718 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2719 _flag_k = FK_CMP; 2720 if (CMP_EQ(_flag_a, _flag_b)) goto L_31007FA8; /* 0x31007F86: je 0x31007fa8 */ 2721 L_31007F88: 2722 MEM32(ebp + 0x8) = eax; /* 0x31007F88: mov dword ptr [ebp + 8], eax */ 2723 L_31007F8B: 2724 edx = MEM32(ebp + 0x8); /* 0x31007F8B: mov edx, dword ptr [ebp + 8] */ 2725 PUSH32(esp, esi); /* 0x31007F8E: push esi */ 2726 PUSH32(esp, edx); /* 0x31007F8F: push edx */ 2727 RECOMP_ICALL(0x31006BE0u); /* 0x31007F90: call 0x31006be0 */ /* not lifted */ 2728 RECOMP_FLAGS_IN(); 2729 ecx = MEM32(ebp + 0x8); /* 0x31007F95: mov ecx, dword ptr [ebp + 8] */ 2730 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(8); 2731 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2732 esi = esi + 8; /* 0x31007F98: add esi, 8 */ 2733 _flag_k = FK_ADD; 2734 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(8); 2735 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2736 ecx = ecx + 8; /* 0x31007F9B: add ecx, 8 */ 2737 _flag_k = FK_ADD; 2738 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2739 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2740 esp = esp + 8; /* 0x31007F9E: add esp, 8 */ 2741 _flag_k = FK_ADD; 2742 /* cmp esi, edi */ /* 0x31007FA1: cmp esi, edi */ 2743 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi); 2744 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2745 _flag_k = FK_CMP; 2746 MEM32(ebp + 0x8) = ecx; /* 0x31007FA3: mov dword ptr [ebp + 8], ecx */ 2747 RECOMP_BACKEDGE(); 2748 if (CMP_NE(_flag_a, _flag_b)) goto L_31007F8B; /* 0x31007FA6: jne 0x31007f8b */ 2749 L_31007FA8: 2750 eax = MEM32(ebx + 0x4); /* 0x31007FA8: mov eax, dword ptr [ebx + 4] */ 2751 PUSH32(esp, eax); /* 0x31007FAB: push eax */ 2752 MEM32(ebp + 0x8) = eax; /* 0x31007FAC: mov dword ptr [ebp + 8], eax */ 2753 RECOMP_ICALL(0x31046858u); /* 0x31007FAF: call 0x31046858 */ /* not lifted */ 2754 RECOMP_FLAGS_IN(); 2755 edx = MEM32(ebp + (-0xC)); /* 0x31007FB4: mov edx, dword ptr [ebp - 0xc] */ 2756 eax = MEM32(ebp + (-0x10)); /* 0x31007FB7: mov eax, dword ptr [ebp - 0x10] */ 2757 ecx = edx + eax * 8; /* 0x31007FBA: lea ecx, [edx + eax*8] */ 2758 MEM32(ebx + 0xC) = ecx; /* 0x31007FBD: mov dword ptr [ebx + 0xc], ecx */ 2759 ecx = MEM32(ebx + 0x4); /* 0x31007FC0: mov ecx, dword ptr [ebx + 4] */ 2760 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2761 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2762 esp = esp + 4; /* 0x31007FC3: add esp, 4 */ 2763 _flag_k = FK_ADD; 2764 /* test ecx, ecx */ /* 0x31007FC6: test ecx, ecx */ 2765 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 2766 _cf = 0; 2767 _flag_k = FK_TEST; 2768 if (TEST_NZ(_flag_a, _flag_b)) goto L_31007FE3; /* 0x31007FC8: jne 0x31007fe3 */ 2769 L_31007FCA: 2770 ecx = MEM32(ebp + 0xC); /* 0x31007FCA: mov ecx, dword ptr [ebp + 0xc] */ 2771 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2772 eax = 0; /* 0x31007FCD: xor eax, eax */ 2773 _cf = 0; 2774 _flag_k = FK_TEST; 2775 eax = ecx; /* 0x31007FCF: mov eax, ecx */ 2776 edi = POP32_VAL(esp); /* 0x31007FD1: pop edi */ 2777 eax = edx + eax * 8; /* 0x31007FD2: lea eax, [edx + eax*8] */ 2778 esi = POP32_VAL(esp); /* 0x31007FD5: pop esi */ 2779 MEM32(ebx + 0x8) = eax; /* 0x31007FD6: mov dword ptr [ebx + 8], eax */ 2780 MEM32(ebx + 0x4) = edx; /* 0x31007FD9: mov dword ptr [ebx + 4], edx */ 2781 ebx = POP32_VAL(esp); /* 0x31007FDC: pop ebx */ 2782 esp = ebp; /* 0x31007FDD: mov esp, ebp */ 2783 ebp = POP32_VAL(esp); /* 0x31007FDF: pop ebp */ 2784 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31007FE0: ret 0xc */ 2785 L_31007FE3: 2786 eax = MEM32(ebx + 0x8); /* 0x31007FE3: mov eax, dword ptr [ebx + 8] */ 2787 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 2788 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2789 eax = eax - ecx; /* 0x31007FE6: sub eax, ecx */ 2790 _flag_k = FK_CMP; 2791 ecx = MEM32(ebp + 0xC); /* 0x31007FE8: mov ecx, dword ptr [ebp + 0xc] */ 2792 if (3u) _cf = (((eax) >> 2) & 1u); /* 0x31007FEB: sar eax, 3 */ 2793 if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2794 eax = (uint32_t)((int32_t)eax >> 3u); 2795 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 2796 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2797 eax = eax + ecx; /* 0x31007FEE: add eax, ecx */ 2798 _flag_k = FK_ADD; 2799 edi = POP32_VAL(esp); /* 0x31007FF0: pop edi */ 2800 eax = edx + eax * 8; /* 0x31007FF1: lea eax, [edx + eax*8] */ 2801 esi = POP32_VAL(esp); /* 0x31007FF4: pop esi */ 2802 MEM32(ebx + 0x8) = eax; /* 0x31007FF5: mov dword ptr [ebx + 8], eax */ 2803 MEM32(ebx + 0x4) = edx; /* 0x31007FF8: mov dword ptr [ebx + 4], edx */ 2804 ebx = POP32_VAL(esp); /* 0x31007FFB: pop ebx */ 2805 esp = ebp; /* 0x31007FFC: mov esp, ebp */ 2806 ebp = POP32_VAL(esp); /* 0x31007FFE: pop ebp */ 2807 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31007FFF: ret 0xc */ 2808 L_31008002: 2809 ebx = MEM32(ebp + 0x8); /* 0x31008002: mov ebx, dword ptr [ebp + 8] */ 2810 edx = esi; /* 0x31008005: mov edx, esi */ 2811 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ebx); 2812 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2813 edx = edx - ebx; /* 0x31008007: sub edx, ebx */ 2814 _flag_k = FK_CMP; 2815 if (3u) _cf = (((edx) >> 2) & 1u); /* 0x31008009: sar edx, 3 */ 2816 if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2817 edx = (uint32_t)((int32_t)edx >> 3u); 2818 /* cmp edx, eax */ /* 0x3100800C: cmp edx, eax */ 2819 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 2820 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2821 _flag_k = FK_CMP; 2822 if (CMP_AE(_flag_a, _flag_b)) goto L_310080A5; /* 0x3100800E: jae 0x310080a5 */ 2823 L_31008014: 2824 edx = eax * 8; /* 0x31008014: lea edx, [eax*8] */ 2825 MEM32(ebp + (-0x8)) = edx; /* 0x3100801B: mov dword ptr [ebp - 8], edx */ 2826 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ebx); 2827 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2828 edx = edx + ebx; /* 0x3100801E: add edx, ebx */ 2829 _flag_k = FK_ADD; 2830 /* cmp ebx, esi */ /* 0x31008020: cmp ebx, esi */ 2831 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi); 2832 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2833 _flag_k = FK_CMP; 2834 edi = ebx; /* 0x31008022: mov edi, ebx */ 2835 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100804C; /* 0x31008024: je 0x3100804c */ 2836 L_31008026: 2837 MEM32(ebp + 0x8) = edx; /* 0x31008026: mov dword ptr [ebp + 8], edx */ 2838 L_31008029: 2839 eax = MEM32(ebp + 0x8); /* 0x31008029: mov eax, dword ptr [ebp + 8] */ 2840 PUSH32(esp, edi); /* 0x3100802C: push edi */ 2841 PUSH32(esp, eax); /* 0x3100802D: push eax */ 2842 RECOMP_ICALL(0x31006BE0u); /* 0x3100802E: call 0x31006be0 */ /* not lifted */ 2843 RECOMP_FLAGS_IN(); 2844 ecx = MEM32(ebp + 0x8); /* 0x31008033: mov ecx, dword ptr [ebp + 8] */ 2845 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(8); 2846 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2847 edi = edi + 8; /* 0x31008036: add edi, 8 */ 2848 _flag_k = FK_ADD; 2849 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(8); 2850 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2851 ecx = ecx + 8; /* 0x31008039: add ecx, 8 */ 2852 _flag_k = FK_ADD; 2853 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2854 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2855 esp = esp + 8; /* 0x3100803C: add esp, 8 */ 2856 _flag_k = FK_ADD; 2857 /* cmp edi, esi */ /* 0x3100803F: cmp edi, esi */ 2858 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 2859 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2860 _flag_k = FK_CMP; 2861 MEM32(ebp + 0x8) = ecx; /* 0x31008041: mov dword ptr [ebp + 8], ecx */ 2862 RECOMP_BACKEDGE(); 2863 if (CMP_NE(_flag_a, _flag_b)) goto L_31008029; /* 0x31008044: jne 0x31008029 */ 2864 L_31008046: 2865 ecx = MEM32(ebp + (-0x4)); /* 0x31008046: mov ecx, dword ptr [ebp - 4] */ 2866 eax = MEM32(ebp + 0xC); /* 0x31008049: mov eax, dword ptr [ebp + 0xc] */ 2867 L_3100804C: 2868 esi = MEM32(ecx + 0x8); /* 0x3100804C: mov esi, dword ptr [ecx + 8] */ 2869 edi = MEM32(ebp + 0x10); /* 0x3100804F: mov edi, dword ptr [ebp + 0x10] */ 2870 edx = esi; /* 0x31008052: mov edx, esi */ 2871 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ebx); 2872 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2873 edx = edx - ebx; /* 0x31008054: sub edx, ebx */ 2874 _flag_k = FK_CMP; 2875 if (3u) _cf = (((edx) >> 2) & 1u); /* 0x31008056: sar edx, 3 */ 2876 if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2877 edx = (uint32_t)((int32_t)edx >> 3u); 2878 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 2879 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2880 eax = eax - edx; /* 0x31008059: sub eax, edx */ 2881 _flag_k = FK_CMP; 2882 if (/* sub result */ CMP_EQ(_flag_a, _flag_b)) goto L_31008079; /* 0x3100805B: je 0x31008079 */ 2883 L_3100805D: 2884 MEM32(ebp + 0xC) = eax; /* 0x3100805D: mov dword ptr [ebp + 0xc], eax */ 2885 L_31008060: 2886 PUSH32(esp, edi); /* 0x31008060: push edi */ 2887 PUSH32(esp, esi); /* 0x31008061: push esi */ 2888 RECOMP_ICALL(0x31006BE0u); /* 0x31008062: call 0x31006be0 */ /* not lifted */ 2889 RECOMP_FLAGS_IN(); 2890 eax = MEM32(ebp + 0xC); /* 0x31008067: mov eax, dword ptr [ebp + 0xc] */ 2891 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2892 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2893 esp = esp + 8; /* 0x3100806A: add esp, 8 */ 2894 _flag_k = FK_ADD; 2895 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(8); 2896 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2897 esi = esi + 8; /* 0x3100806D: add esi, 8 */ 2898 _flag_k = FK_ADD; 2899 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2900 eax = eax - 1; /* 0x31008070: dec eax */ 2901 _flag_k = FK_DEC; 2902 MEM32(ebp + 0xC) = eax; /* 0x31008071: mov dword ptr [ebp + 0xc], eax */ 2903 RECOMP_BACKEDGE(); 2904 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_31008060; /* 0x31008074: jne 0x31008060 */ 2905 L_31008076: 2906 ecx = MEM32(ebp + (-0x4)); /* 0x31008076: mov ecx, dword ptr [ebp - 4] */ 2907 L_31008079: 2908 eax = MEM32(ecx + 0x8); /* 0x31008079: mov eax, dword ptr [ecx + 8] */ 2909 /* cmp ebx, eax */ /* 0x3100807C: cmp ebx, eax */ 2910 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 2911 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2912 _flag_k = FK_CMP; 2913 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008091; /* 0x3100807E: je 0x31008091 */ 2914 L_31008080: 2915 edx = MEM32(edi); /* 0x31008080: mov edx, dword ptr [edi] */ 2916 MEM32(ebx) = edx; /* 0x31008082: mov dword ptr [ebx], edx */ 2917 edx = MEM32(edi + 0x4); /* 0x31008084: mov edx, dword ptr [edi + 4] */ 2918 MEM32(ebx + 0x4) = edx; /* 0x31008087: mov dword ptr [ebx + 4], edx */ 2919 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(8); 2920 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2921 ebx = ebx + 8; /* 0x3100808A: add ebx, 8 */ 2922 _flag_k = FK_ADD; 2923 /* cmp ebx, eax */ /* 0x3100808D: cmp ebx, eax */ 2924 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 2925 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2926 _flag_k = FK_CMP; 2927 RECOMP_BACKEDGE(); 2928 if (CMP_NE(_flag_a, _flag_b)) goto L_31008080; /* 0x3100808F: jne 0x31008080 */ 2929 L_31008091: 2930 edx = MEM32(ecx + 0x8); /* 0x31008091: mov edx, dword ptr [ecx + 8] */ 2931 eax = MEM32(ebp + (-0x8)); /* 0x31008094: mov eax, dword ptr [ebp - 8] */ 2932 edi = POP32_VAL(esp); /* 0x31008097: pop edi */ 2933 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 2934 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2935 edx = edx + eax; /* 0x31008098: add edx, eax */ 2936 _flag_k = FK_ADD; 2937 esi = POP32_VAL(esp); /* 0x3100809A: pop esi */ 2938 MEM32(ecx + 0x8) = edx; /* 0x3100809B: mov dword ptr [ecx + 8], edx */ 2939 ebx = POP32_VAL(esp); /* 0x3100809E: pop ebx */ 2940 esp = ebp; /* 0x3100809F: mov esp, ebp */ 2941 ebp = POP32_VAL(esp); /* 0x310080A1: pop ebp */ 2942 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x310080A2: ret 0xc */ 2943 L_310080A5: 2944 /* test eax, eax */ /* 0x310080A5: test eax, eax */ 2945 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2946 _cf = 0; 2947 _flag_k = FK_TEST; 2948 if (TEST_Z(_flag_a, _flag_b)) goto L_3100811B; /* 0x310080A7: jbe 0x3100811b */ 2949 L_310080A9: 2950 if (3u) _cf = (((eax) >> 29) & 1u); /* 0x310080A9: shl eax, 3 */ 2951 if (3u) { _flag_a = recomp_flags_pack((eax << 3u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2952 eax = eax << 3u; /* 0x310080A9: shl eax, 3 */ 2953 edi = esi; /* 0x310080AC: mov edi, esi */ 2954 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 2955 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2956 edi = edi - eax; /* 0x310080AE: sub edi, eax */ 2957 _flag_k = FK_CMP; 2958 /* cmp edi, esi */ /* 0x310080B0: cmp edi, esi */ 2959 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 2960 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2961 _flag_k = FK_CMP; 2962 MEM32(ebp + 0xC) = esi; /* 0x310080B2: mov dword ptr [ebp + 0xc], esi */ 2963 MEM32(ebp + (-0x8)) = eax; /* 0x310080B5: mov dword ptr [ebp - 8], eax */ 2964 if (CMP_EQ(_flag_a, _flag_b)) goto L_310080DA; /* 0x310080B8: je 0x310080da */ 2965 L_310080BA: 2966 ecx = MEM32(ebp + 0xC); /* 0x310080BA: mov ecx, dword ptr [ebp + 0xc] */ 2967 PUSH32(esp, edi); /* 0x310080BD: push edi */ 2968 PUSH32(esp, ecx); /* 0x310080BE: push ecx */ 2969 RECOMP_ICALL(0x31006BE0u); /* 0x310080BF: call 0x31006be0 */ /* not lifted */ 2970 RECOMP_FLAGS_IN(); 2971 edx = MEM32(ebp + 0xC); /* 0x310080C4: mov edx, dword ptr [ebp + 0xc] */ 2972 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(8); 2973 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2974 edx = edx + 8; /* 0x310080C7: add edx, 8 */ 2975 _flag_k = FK_ADD; 2976 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(8); 2977 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2978 edi = edi + 8; /* 0x310080CA: add edi, 8 */ 2979 _flag_k = FK_ADD; 2980 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2981 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2982 esp = esp + 8; /* 0x310080CD: add esp, 8 */ 2983 _flag_k = FK_ADD; 2984 /* cmp edi, esi */ /* 0x310080D0: cmp edi, esi */ 2985 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 2986 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2987 _flag_k = FK_CMP; 2988 MEM32(ebp + 0xC) = edx; /* 0x310080D2: mov dword ptr [ebp + 0xc], edx */ 2989 RECOMP_BACKEDGE(); 2990 if (CMP_NE(_flag_a, _flag_b)) goto L_310080BA; /* 0x310080D5: jne 0x310080ba */ 2991 L_310080D7: 2992 ecx = MEM32(ebp + (-0x4)); /* 0x310080D7: mov ecx, dword ptr [ebp - 4] */ 2993 L_310080DA: 2994 edx = MEM32(ecx + 0x8); /* 0x310080DA: mov edx, dword ptr [ecx + 8] */ 2995 esi = MEM32(ebp + (-0x8)); /* 0x310080DD: mov esi, dword ptr [ebp - 8] */ 2996 eax = edx; /* 0x310080E0: mov eax, edx */ 2997 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 2998 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2999 eax = eax - esi; /* 0x310080E2: sub eax, esi */ 3000 _flag_k = FK_CMP; 3001 /* cmp ebx, eax */ /* 0x310080E4: cmp ebx, eax */ 3002 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 3003 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3004 _flag_k = FK_CMP; 3005 if (CMP_EQ(_flag_a, _flag_b)) goto L_310080FD; /* 0x310080E6: je 0x310080fd */ 3006 L_310080E8: 3007 edi = MEM32(eax + (-0x8)); /* 0x310080E8: mov edi, dword ptr [eax - 8] */ 3008 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(8); 3009 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3010 eax = eax - 8; /* 0x310080EB: sub eax, 8 */ 3011 _flag_k = FK_CMP; 3012 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(8); 3013 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3014 edx = edx - 8; /* 0x310080EE: sub edx, 8 */ 3015 _flag_k = FK_CMP; 3016 /* cmp eax, ebx */ /* 0x310080F1: cmp eax, ebx */ 3017 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 3018 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3019 _flag_k = FK_CMP; 3020 MEM32(edx) = edi; /* 0x310080F3: mov dword ptr [edx], edi */ 3021 edi = MEM32(eax + 0x4); /* 0x310080F5: mov edi, dword ptr [eax + 4] */ 3022 MEM32(edx + 0x4) = edi; /* 0x310080F8: mov dword ptr [edx + 4], edi */ 3023 RECOMP_BACKEDGE(); 3024 if (CMP_NE(_flag_a, _flag_b)) goto L_310080E8; /* 0x310080FB: jne 0x310080e8 */ 3025 L_310080FD: 3026 edx = esi + ebx; /* 0x310080FD: lea edx, [esi + ebx] */ 3027 /* cmp ebx, edx */ /* 0x31008100: cmp ebx, edx */ 3028 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edx); 3029 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3030 _flag_k = FK_CMP; 3031 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008118; /* 0x31008102: je 0x31008118 */ 3032 L_31008104: 3033 eax = MEM32(ebp + 0x10); /* 0x31008104: mov eax, dword ptr [ebp + 0x10] */ 3034 L_31008107: 3035 edi = MEM32(eax); /* 0x31008107: mov edi, dword ptr [eax] */ 3036 MEM32(ebx) = edi; /* 0x31008109: mov dword ptr [ebx], edi */ 3037 edi = MEM32(eax + 0x4); /* 0x3100810B: mov edi, dword ptr [eax + 4] */ 3038 MEM32(ebx + 0x4) = edi; /* 0x3100810E: mov dword ptr [ebx + 4], edi */ 3039 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(8); 3040 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3041 ebx = ebx + 8; /* 0x31008111: add ebx, 8 */ 3042 _flag_k = FK_ADD; 3043 /* cmp ebx, edx */ /* 0x31008114: cmp ebx, edx */ 3044 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edx); 3045 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3046 _flag_k = FK_CMP; 3047 RECOMP_BACKEDGE(); 3048 if (CMP_NE(_flag_a, _flag_b)) goto L_31008107; /* 0x31008116: jne 0x31008107 */ 3049 L_31008118: 3050 _flag_a = (uint32_t)(MEM32(ecx + 0x8)); _flag_b = (uint32_t)(esi); 3051 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3052 MEM32(ecx + 0x8) = MEM32(ecx + 0x8) + esi; /* 0x31008118: add dword ptr [ecx + 8], esi */ 3053 _flag_k = FK_ADD; 3054 L_3100811B: 3055 edi = POP32_VAL(esp); /* 0x3100811B: pop edi */ 3056 esi = POP32_VAL(esp); /* 0x3100811C: pop esi */ 3057 ebx = POP32_VAL(esp); /* 0x3100811D: pop ebx */ 3058 esp = ebp; /* 0x3100811E: mov esp, ebp */ 3059 ebp = POP32_VAL(esp); /* 0x31008120: pop ebp */ 3060 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31008121: ret 0xc */ 3061 RECOMP_REGS_OUT(); 3062 } 3063 3064 void sub_31008130(void) { 3065 int _fpu_cmp = 0; 3066 uint32_t _cf = 0; 3067 int _df = 1; 3068 uint32_t _flag_k = FK_NONE; 3069 uint32_t _flag_a = 0, _flag_b = 0; 3070 uint32_t _itail_tgt = 0; 3071 RECOMP_REGS_LOCALS 3072 RECOMP_ENTER(0x31008130u); 3073 3074 L_31008130: 3075 PUSH32(esp, ebp); /* 0x31008130: push ebp */ 3076 ebp = esp; /* 0x31008131: mov ebp, esp */ 3077 eax = MEM32(ebp + 0x8); /* 0x31008133: mov eax, dword ptr [ebp + 8] */ 3078 /* test eax, eax */ /* 0x31008136: test eax, eax */ 3079 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3080 _cf = 0; 3081 _flag_k = FK_TEST; 3082 if (TEST_Z(_flag_a, _flag_b)) goto L_31008141; /* 0x31008138: je 0x31008141 */ 3083 L_3100813A: 3084 ecx = MEM32(ebp + 0xC); /* 0x3100813A: mov ecx, dword ptr [ebp + 0xc] */ 3085 edx = MEM32(ecx); /* 0x3100813D: mov edx, dword ptr [ecx] */ 3086 MEM32(eax) = edx; /* 0x3100813F: mov dword ptr [eax], edx */ 3087 L_31008141: 3088 ebp = POP32_VAL(esp); /* 0x31008141: pop ebp */ 3089 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31008142: ret */ 3090 RECOMP_REGS_OUT(); 3091 } 3092 3093 void sub_31008150(void) { 3094 int _fpu_cmp = 0; 3095 uint32_t _cf = 0; 3096 int _df = 1; 3097 uint32_t _flag_k = FK_NONE; 3098 uint32_t _flag_a = 0, _flag_b = 0; 3099 uint32_t _itail_tgt = 0; 3100 RECOMP_REGS_LOCALS 3101 RECOMP_ENTER(0x31008150u); 3102 3103 L_31008150: 3104 RECOMP_ICALL(0x31008160u); /* 0x31008150: call 0x31008160 */ /* not lifted */ 3105 RECOMP_FLAGS_IN(); 3106 goto L_31008170; /* 0x31008155: jmp 0x31008170 */ 3107 L_31008170: 3108 PUSH32(esp, 0x31008180u); /* 0x31008170: push 0x31008180 */ 3109 RECOMP_ICALL(0x310468C8u); /* 0x31008175: call 0x310468c8 */ /* not lifted */ 3110 RECOMP_FLAGS_IN(); 3111 ecx = POP32_VAL(esp); /* 0x3100817A: pop ecx */ 3112 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100817B: ret */ 3113 RECOMP_REGS_OUT(); 3114 } 3115 3116 void sub_31008160(void) { 3117 int _fpu_cmp = 0; 3118 uint32_t _cf = 0; 3119 int _df = 1; 3120 uint32_t _flag_k = FK_NONE; 3121 uint32_t _flag_a = 0, _flag_b = 0; 3122 uint32_t _itail_tgt = 0; 3123 RECOMP_REGS_LOCALS 3124 RECOMP_ENTER(0x31008160u); 3125 3126 L_31008160: 3127 ecx = 0x31057E11u; /* 0x31008160: mov ecx, 0x31057e11 */ 3128 L_31008165: 3129 { _itail_tgt = (uint32_t)(MEM32(0x31048108)); goto _ljump; } 3130 { RECOMP_REGS_OUT(); return; } /* end of function */ 3131 _ljump: 3132 switch (_itail_tgt) { 3133 case 0x31008160u: goto L_31008160; 3134 case 0x31008165u: goto L_31008165; 3135 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 3136 } 3137 RECOMP_REGS_OUT(); 3138 } 3139 3140 void sub_31008170(void) { 3141 int _fpu_cmp = 0; 3142 uint32_t _cf = 0; 3143 int _df = 1; 3144 uint32_t _flag_k = FK_NONE; 3145 uint32_t _flag_a = 0, _flag_b = 0; 3146 uint32_t _itail_tgt = 0; 3147 RECOMP_REGS_LOCALS 3148 RECOMP_ENTER(0x31008170u); 3149 3150 L_31008170: 3151 PUSH32(esp, 0x31008180u); /* 0x31008170: push 0x31008180 */ 3152 RECOMP_ICALL(0x310468C8u); /* 0x31008175: call 0x310468c8 */ /* not lifted */ 3153 RECOMP_FLAGS_IN(); 3154 ecx = POP32_VAL(esp); /* 0x3100817A: pop ecx */ 3155 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100817B: ret */ 3156 RECOMP_REGS_OUT(); 3157 } 3158 3159 void sub_31008180(void) { 3160 int _fpu_cmp = 0; 3161 uint32_t _cf = 0; 3162 int _df = 1; 3163 uint32_t _flag_k = FK_NONE; 3164 uint32_t _flag_a = 0, _flag_b = 0; 3165 uint32_t _itail_tgt = 0; 3166 RECOMP_REGS_LOCALS 3167 RECOMP_ENTER(0x31008180u); 3168 3169 L_31008180: 3170 ecx = 0x31057E11u; /* 0x31008180: mov ecx, 0x31057e11 */ 3171 L_31008185: 3172 { _itail_tgt = (uint32_t)(MEM32(0x3104807C)); goto _ljump; } 3173 { RECOMP_REGS_OUT(); return; } /* end of function */ 3174 _ljump: 3175 switch (_itail_tgt) { 3176 case 0x31008180u: goto L_31008180; 3177 case 0x31008185u: goto L_31008185; 3178 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 3179 } 3180 RECOMP_REGS_OUT(); 3181 } 3182 3183 void sub_31008190(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(0x31008190u); 3192 3193 L_31008190: 3194 RECOMP_ICALL(0x310081A0u); /* 0x31008190: call 0x310081a0 */ /* not lifted */ 3195 RECOMP_FLAGS_IN(); 3196 goto L_310081B0; /* 0x31008195: jmp 0x310081b0 */ 3197 L_310081B0: 3198 PUSH32(esp, 0x310081C0u); /* 0x310081B0: push 0x310081c0 */ 3199 RECOMP_ICALL(0x310468C8u); /* 0x310081B5: call 0x310468c8 */ /* not lifted */ 3200 RECOMP_FLAGS_IN(); 3201 ecx = POP32_VAL(esp); /* 0x310081BA: pop ecx */ 3202 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310081BB: ret */ 3203 RECOMP_REGS_OUT(); 3204 } 3205 3206 void sub_310081A0(void) { 3207 int _fpu_cmp = 0; 3208 uint32_t _cf = 0; 3209 int _df = 1; 3210 uint32_t _flag_k = FK_NONE; 3211 uint32_t _flag_a = 0, _flag_b = 0; 3212 uint32_t _itail_tgt = 0; 3213 RECOMP_REGS_LOCALS 3214 RECOMP_ENTER(0x310081A0u); 3215 3216 L_310081A0: 3217 ecx = 0x31057E10u; /* 0x310081A0: mov ecx, 0x31057e10 */ 3218 L_310081A5: 3219 { _itail_tgt = (uint32_t)(MEM32(0x31048104)); goto _ljump; } 3220 { RECOMP_REGS_OUT(); return; } /* end of function */ 3221 _ljump: 3222 switch (_itail_tgt) { 3223 case 0x310081A0u: goto L_310081A0; 3224 case 0x310081A5u: goto L_310081A5; 3225 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 3226 } 3227 RECOMP_REGS_OUT(); 3228 } 3229 3230 void sub_310081B0(void) { 3231 int _fpu_cmp = 0; 3232 uint32_t _cf = 0; 3233 int _df = 1; 3234 uint32_t _flag_k = FK_NONE; 3235 uint32_t _flag_a = 0, _flag_b = 0; 3236 uint32_t _itail_tgt = 0; 3237 RECOMP_REGS_LOCALS 3238 RECOMP_ENTER(0x310081B0u); 3239 3240 L_310081B0: 3241 PUSH32(esp, 0x310081C0u); /* 0x310081B0: push 0x310081c0 */ 3242 RECOMP_ICALL(0x310468C8u); /* 0x310081B5: call 0x310468c8 */ /* not lifted */ 3243 RECOMP_FLAGS_IN(); 3244 ecx = POP32_VAL(esp); /* 0x310081BA: pop ecx */ 3245 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310081BB: ret */ 3246 RECOMP_REGS_OUT(); 3247 } 3248 3249 void sub_310081C0(void) { 3250 int _fpu_cmp = 0; 3251 uint32_t _cf = 0; 3252 int _df = 1; 3253 uint32_t _flag_k = FK_NONE; 3254 uint32_t _flag_a = 0, _flag_b = 0; 3255 uint32_t _itail_tgt = 0; 3256 RECOMP_REGS_LOCALS 3257 RECOMP_ENTER(0x310081C0u); 3258 3259 L_310081C0: 3260 ecx = 0x31057E10u; /* 0x310081C0: mov ecx, 0x31057e10 */ 3261 L_310081C5: 3262 { _itail_tgt = (uint32_t)(MEM32(0x31048080)); goto _ljump; } 3263 { RECOMP_REGS_OUT(); return; } /* end of function */ 3264 _ljump: 3265 switch (_itail_tgt) { 3266 case 0x310081C0u: goto L_310081C0; 3267 case 0x310081C5u: goto L_310081C5; 3268 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 3269 } 3270 RECOMP_REGS_OUT(); 3271 } 3272 3273 void sub_310081D0(void) { 3274 int _fpu_cmp = 0; 3275 uint32_t _cf = 0; 3276 int _df = 1; 3277 uint32_t _flag_k = FK_NONE; 3278 uint32_t _flag_a = 0, _flag_b = 0; 3279 uint32_t _itail_tgt = 0; 3280 RECOMP_REGS_LOCALS 3281 RECOMP_ENTER(0x310081D0u); 3282 3283 L_310081D0: 3284 goto L_310081E0; /* 0x310081D0: jmp 0x310081e0 */ 3285 L_310081E0: 3286 MEM32(0x31057DF8) = 0x31051998u; /* 0x310081E0: mov dword ptr [0x31057df8], 0x31051998 */ 3287 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310081EA: ret */ 3288 RECOMP_REGS_OUT(); 3289 } 3290 3291 void sub_310081E0(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(0x310081E0u); 3300 3301 L_310081E0: 3302 MEM32(0x31057DF8) = 0x31051998u; /* 0x310081E0: mov dword ptr [0x31057df8], 0x31051998 */ 3303 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310081EA: ret */ 3304 RECOMP_REGS_OUT(); 3305 } 3306 3307 void sub_310081F0(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(0x310081F0u); 3316 3317 L_310081F0: 3318 goto L_31008200; /* 0x310081F0: jmp 0x31008200 */ 3319 L_31008200: 3320 MEM32(0x31057E1C) = 0x310519E4u; /* 0x31008200: mov dword ptr [0x31057e1c], 0x310519e4 */ 3321 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100820A: ret */ 3322 RECOMP_REGS_OUT(); 3323 } 3324 3325 void sub_31008200(void) { 3326 int _fpu_cmp = 0; 3327 uint32_t _cf = 0; 3328 int _df = 1; 3329 uint32_t _flag_k = FK_NONE; 3330 uint32_t _flag_a = 0, _flag_b = 0; 3331 uint32_t _itail_tgt = 0; 3332 RECOMP_REGS_LOCALS 3333 RECOMP_ENTER(0x31008200u); 3334 3335 L_31008200: 3336 MEM32(0x31057E1C) = 0x310519E4u; /* 0x31008200: mov dword ptr [0x31057e1c], 0x310519e4 */ 3337 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100820A: ret */ 3338 RECOMP_REGS_OUT(); 3339 } 3340 3341 void sub_31008210(void) { 3342 int _fpu_cmp = 0; 3343 uint32_t _cf = 0; 3344 int _df = 1; 3345 uint32_t _flag_k = FK_NONE; 3346 uint32_t _flag_a = 0, _flag_b = 0; 3347 uint32_t _itail_tgt = 0; 3348 RECOMP_REGS_LOCALS 3349 RECOMP_ENTER(0x31008210u); 3350 3351 L_31008210: 3352 goto L_31008220; /* 0x31008210: jmp 0x31008220 */ 3353 L_31008220: 3354 MEM32(0x31057E18) = 0x31051A20u; /* 0x31008220: mov dword ptr [0x31057e18], 0x31051a20 */ 3355 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100822A: ret */ 3356 RECOMP_REGS_OUT(); 3357 } 3358 3359 void sub_31008220(void) { 3360 int _fpu_cmp = 0; 3361 uint32_t _cf = 0; 3362 int _df = 1; 3363 uint32_t _flag_k = FK_NONE; 3364 uint32_t _flag_a = 0, _flag_b = 0; 3365 uint32_t _itail_tgt = 0; 3366 RECOMP_REGS_LOCALS 3367 RECOMP_ENTER(0x31008220u); 3368 3369 L_31008220: 3370 MEM32(0x31057E18) = 0x31051A20u; /* 0x31008220: mov dword ptr [0x31057e18], 0x31051a20 */ 3371 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100822A: ret */ 3372 RECOMP_REGS_OUT(); 3373 } 3374 3375 void sub_31008230(void) { 3376 int _fpu_cmp = 0; 3377 uint32_t _cf = 0; 3378 int _df = 1; 3379 uint32_t _flag_k = FK_NONE; 3380 uint32_t _flag_a = 0, _flag_b = 0; 3381 uint32_t _itail_tgt = 0; 3382 RECOMP_REGS_LOCALS 3383 RECOMP_ENTER(0x31008230u); 3384 3385 L_31008230: 3386 goto L_31008240; /* 0x31008230: jmp 0x31008240 */ 3387 L_31008240: 3388 MEM32(0x31057E38) = 0x31051CDCu; /* 0x31008240: mov dword ptr [0x31057e38], 0x31051cdc */ 3389 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100824A: ret */ 3390 RECOMP_REGS_OUT(); 3391 } 3392 3393 void sub_31008240(void) { 3394 int _fpu_cmp = 0; 3395 uint32_t _cf = 0; 3396 int _df = 1; 3397 uint32_t _flag_k = FK_NONE; 3398 uint32_t _flag_a = 0, _flag_b = 0; 3399 uint32_t _itail_tgt = 0; 3400 RECOMP_REGS_LOCALS 3401 RECOMP_ENTER(0x31008240u); 3402 3403 L_31008240: 3404 MEM32(0x31057E38) = 0x31051CDCu; /* 0x31008240: mov dword ptr [0x31057e38], 0x31051cdc */ 3405 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100824A: ret */ 3406 RECOMP_REGS_OUT(); 3407 } 3408 3409 void sub_31008250(void) { 3410 int _fpu_cmp = 0; 3411 uint32_t _cf = 0; 3412 int _df = 1; 3413 uint32_t _flag_k = FK_NONE; 3414 uint32_t _flag_a = 0, _flag_b = 0; 3415 uint32_t _itail_tgt = 0; 3416 RECOMP_REGS_LOCALS 3417 RECOMP_ENTER(0x31008250u); 3418 3419 L_31008250: 3420 goto L_31008260; /* 0x31008250: jmp 0x31008260 */ 3421 L_31008260: 3422 MEM32(0x31057E08) = 0x31051D10u; /* 0x31008260: mov dword ptr [0x31057e08], 0x31051d10 */ 3423 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100826A: ret */ 3424 RECOMP_REGS_OUT(); 3425 } 3426 3427 void sub_31008260(void) { 3428 int _fpu_cmp = 0; 3429 uint32_t _cf = 0; 3430 int _df = 1; 3431 uint32_t _flag_k = FK_NONE; 3432 uint32_t _flag_a = 0, _flag_b = 0; 3433 uint32_t _itail_tgt = 0; 3434 RECOMP_REGS_LOCALS 3435 RECOMP_ENTER(0x31008260u); 3436 3437 L_31008260: 3438 MEM32(0x31057E08) = 0x31051D10u; /* 0x31008260: mov dword ptr [0x31057e08], 0x31051d10 */ 3439 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100826A: ret */ 3440 RECOMP_REGS_OUT(); 3441 } 3442 3443 void sub_31008270(void) { 3444 int _fpu_cmp = 0; 3445 uint32_t _cf = 0; 3446 int _df = 1; 3447 uint32_t _flag_k = FK_NONE; 3448 uint32_t _flag_a = 0, _flag_b = 0; 3449 uint32_t _itail_tgt = 0; 3450 RECOMP_REGS_LOCALS 3451 RECOMP_ENTER(0x31008270u); 3452 3453 L_31008270: 3454 goto L_31008280; /* 0x31008270: jmp 0x31008280 */ 3455 L_31008280: 3456 MEM32(0x31057E30) = 0x31051D44u; /* 0x31008280: mov dword ptr [0x31057e30], 0x31051d44 */ 3457 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100828A: ret */ 3458 RECOMP_REGS_OUT(); 3459 } 3460 3461 void sub_31008280(void) { 3462 int _fpu_cmp = 0; 3463 uint32_t _cf = 0; 3464 int _df = 1; 3465 uint32_t _flag_k = FK_NONE; 3466 uint32_t _flag_a = 0, _flag_b = 0; 3467 uint32_t _itail_tgt = 0; 3468 RECOMP_REGS_LOCALS 3469 RECOMP_ENTER(0x31008280u); 3470 3471 L_31008280: 3472 MEM32(0x31057E30) = 0x31051D44u; /* 0x31008280: mov dword ptr [0x31057e30], 0x31051d44 */ 3473 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100828A: ret */ 3474 RECOMP_REGS_OUT(); 3475 } 3476 3477 void sub_31008290(void) { 3478 int _fpu_cmp = 0; 3479 uint32_t _cf = 0; 3480 int _df = 1; 3481 uint32_t _flag_k = FK_NONE; 3482 uint32_t _flag_a = 0, _flag_b = 0; 3483 uint32_t _itail_tgt = 0; 3484 RECOMP_REGS_LOCALS 3485 RECOMP_ENTER(0x31008290u); 3486 3487 L_31008290: 3488 goto L_310082A0; /* 0x31008290: jmp 0x310082a0 */ 3489 L_310082A0: 3490 MEM32(0x31057E24) = 0x31051D7Cu; /* 0x310082A0: mov dword ptr [0x31057e24], 0x31051d7c */ 3491 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310082AA: ret */ 3492 RECOMP_REGS_OUT(); 3493 } 3494 3495 void sub_310082A0(void) { 3496 int _fpu_cmp = 0; 3497 uint32_t _cf = 0; 3498 int _df = 1; 3499 uint32_t _flag_k = FK_NONE; 3500 uint32_t _flag_a = 0, _flag_b = 0; 3501 uint32_t _itail_tgt = 0; 3502 RECOMP_REGS_LOCALS 3503 RECOMP_ENTER(0x310082A0u); 3504 3505 L_310082A0: 3506 MEM32(0x31057E24) = 0x31051D7Cu; /* 0x310082A0: mov dword ptr [0x31057e24], 0x31051d7c */ 3507 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310082AA: ret */ 3508 RECOMP_REGS_OUT(); 3509 } 3510 3511 void sub_310082B0(void) { 3512 int _fpu_cmp = 0; 3513 uint32_t _cf = 0; 3514 int _df = 1; 3515 uint32_t _flag_k = FK_NONE; 3516 uint32_t _flag_a = 0, _flag_b = 0; 3517 uint32_t _itail_tgt = 0; 3518 RECOMP_REGS_LOCALS 3519 RECOMP_ENTER(0x310082B0u); 3520 3521 L_310082B0: 3522 goto L_310082C0; /* 0x310082B0: jmp 0x310082c0 */ 3523 L_310082C0: 3524 MEM32(0x31057E2C) = 0x31051DB8u; /* 0x310082C0: mov dword ptr [0x31057e2c], 0x31051db8 */ 3525 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310082CA: ret */ 3526 RECOMP_REGS_OUT(); 3527 } 3528 3529 void sub_310082C0(void) { 3530 int _fpu_cmp = 0; 3531 uint32_t _cf = 0; 3532 int _df = 1; 3533 uint32_t _flag_k = FK_NONE; 3534 uint32_t _flag_a = 0, _flag_b = 0; 3535 uint32_t _itail_tgt = 0; 3536 RECOMP_REGS_LOCALS 3537 RECOMP_ENTER(0x310082C0u); 3538 3539 L_310082C0: 3540 MEM32(0x31057E2C) = 0x31051DB8u; /* 0x310082C0: mov dword ptr [0x31057e2c], 0x31051db8 */ 3541 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310082CA: ret */ 3542 RECOMP_REGS_OUT(); 3543 } 3544 3545 void sub_310082D0(void) { 3546 int _fpu_cmp = 0; 3547 uint32_t _cf = 0; 3548 int _df = 1; 3549 uint32_t _flag_k = FK_NONE; 3550 uint32_t _flag_a = 0, _flag_b = 0; 3551 uint32_t _itail_tgt = 0; 3552 RECOMP_REGS_LOCALS 3553 RECOMP_ENTER(0x310082D0u); 3554 3555 L_310082D0: 3556 goto L_310082E0; /* 0x310082D0: jmp 0x310082e0 */ 3557 L_310082E0: 3558 MEM32(0x31057E14) = 0x31051DF0u; /* 0x310082E0: mov dword ptr [0x31057e14], 0x31051df0 */ 3559 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310082EA: ret */ 3560 RECOMP_REGS_OUT(); 3561 } 3562 3563 void sub_310082E0(void) { 3564 int _fpu_cmp = 0; 3565 uint32_t _cf = 0; 3566 int _df = 1; 3567 uint32_t _flag_k = FK_NONE; 3568 uint32_t _flag_a = 0, _flag_b = 0; 3569 uint32_t _itail_tgt = 0; 3570 RECOMP_REGS_LOCALS 3571 RECOMP_ENTER(0x310082E0u); 3572 3573 L_310082E0: 3574 MEM32(0x31057E14) = 0x31051DF0u; /* 0x310082E0: mov dword ptr [0x31057e14], 0x31051df0 */ 3575 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310082EA: ret */ 3576 RECOMP_REGS_OUT(); 3577 } 3578 3579 void sub_310082F0(void) { 3580 int _fpu_cmp = 0; 3581 uint32_t _cf = 0; 3582 int _df = 1; 3583 uint32_t _flag_k = FK_NONE; 3584 uint32_t _flag_a = 0, _flag_b = 0; 3585 uint32_t _itail_tgt = 0; 3586 RECOMP_REGS_LOCALS 3587 RECOMP_ENTER(0x310082F0u); 3588 3589 L_310082F0: 3590 goto L_31008300; /* 0x310082F0: jmp 0x31008300 */ 3591 L_31008300: 3592 MEM32(0x31057E04) = 0x31051E24u; /* 0x31008300: mov dword ptr [0x31057e04], 0x31051e24 */ 3593 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100830A: ret */ 3594 RECOMP_REGS_OUT(); 3595 } 3596 3597 void sub_31008300(void) { 3598 int _fpu_cmp = 0; 3599 uint32_t _cf = 0; 3600 int _df = 1; 3601 uint32_t _flag_k = FK_NONE; 3602 uint32_t _flag_a = 0, _flag_b = 0; 3603 uint32_t _itail_tgt = 0; 3604 RECOMP_REGS_LOCALS 3605 RECOMP_ENTER(0x31008300u); 3606 3607 L_31008300: 3608 MEM32(0x31057E04) = 0x31051E24u; /* 0x31008300: mov dword ptr [0x31057e04], 0x31051e24 */ 3609 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100830A: ret */ 3610 RECOMP_REGS_OUT(); 3611 } 3612 3613 void sub_31008310(void) { 3614 int _fpu_cmp = 0; 3615 uint32_t _cf = 0; 3616 int _df = 1; 3617 uint32_t _flag_k = FK_NONE; 3618 uint32_t _flag_a = 0, _flag_b = 0; 3619 uint32_t _itail_tgt = 0; 3620 RECOMP_REGS_LOCALS 3621 RECOMP_ENTER(0x31008310u); 3622 3623 L_31008310: 3624 goto L_31008320; /* 0x31008310: jmp 0x31008320 */ 3625 L_31008320: 3626 MEM32(0x31057E34) = 0x31051E60u; /* 0x31008320: mov dword ptr [0x31057e34], 0x31051e60 */ 3627 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100832A: ret */ 3628 RECOMP_REGS_OUT(); 3629 } 3630 3631 void sub_31008320(void) { 3632 int _fpu_cmp = 0; 3633 uint32_t _cf = 0; 3634 int _df = 1; 3635 uint32_t _flag_k = FK_NONE; 3636 uint32_t _flag_a = 0, _flag_b = 0; 3637 uint32_t _itail_tgt = 0; 3638 RECOMP_REGS_LOCALS 3639 RECOMP_ENTER(0x31008320u); 3640 3641 L_31008320: 3642 MEM32(0x31057E34) = 0x31051E60u; /* 0x31008320: mov dword ptr [0x31057e34], 0x31051e60 */ 3643 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100832A: ret */ 3644 RECOMP_REGS_OUT(); 3645 } 3646 3647 void sub_31008330(void) { 3648 int _fpu_cmp = 0; 3649 uint32_t _cf = 0; 3650 int _df = 1; 3651 uint32_t _flag_k = FK_NONE; 3652 uint32_t _flag_a = 0, _flag_b = 0; 3653 uint32_t _itail_tgt = 0; 3654 RECOMP_REGS_LOCALS 3655 RECOMP_ENTER(0x31008330u); 3656 3657 L_31008330: 3658 goto L_31008340; /* 0x31008330: jmp 0x31008340 */ 3659 L_31008340: 3660 MEM32(0x31057E20) = 0x31051E98u; /* 0x31008340: mov dword ptr [0x31057e20], 0x31051e98 */ 3661 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100834A: ret */ 3662 RECOMP_REGS_OUT(); 3663 } 3664 3665 void sub_31008340(void) { 3666 int _fpu_cmp = 0; 3667 uint32_t _cf = 0; 3668 int _df = 1; 3669 uint32_t _flag_k = FK_NONE; 3670 uint32_t _flag_a = 0, _flag_b = 0; 3671 uint32_t _itail_tgt = 0; 3672 RECOMP_REGS_LOCALS 3673 RECOMP_ENTER(0x31008340u); 3674 3675 L_31008340: 3676 MEM32(0x31057E20) = 0x31051E98u; /* 0x31008340: mov dword ptr [0x31057e20], 0x31051e98 */ 3677 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100834A: ret */ 3678 RECOMP_REGS_OUT(); 3679 } 3680 3681 void sub_31008350(void) { 3682 int _fpu_cmp = 0; 3683 uint32_t _cf = 0; 3684 int _df = 1; 3685 uint32_t _flag_k = FK_NONE; 3686 uint32_t _flag_a = 0, _flag_b = 0; 3687 uint32_t _itail_tgt = 0; 3688 RECOMP_REGS_LOCALS 3689 RECOMP_ENTER(0x31008350u); 3690 3691 L_31008350: 3692 goto L_31008360; /* 0x31008350: jmp 0x31008360 */ 3693 L_31008360: 3694 MEM32(0x31057E0C) = 0x31051ED4u; /* 0x31008360: mov dword ptr [0x31057e0c], 0x31051ed4 */ 3695 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100836A: ret */ 3696 RECOMP_REGS_OUT(); 3697 } 3698 3699 void sub_31008360(void) { 3700 int _fpu_cmp = 0; 3701 uint32_t _cf = 0; 3702 int _df = 1; 3703 uint32_t _flag_k = FK_NONE; 3704 uint32_t _flag_a = 0, _flag_b = 0; 3705 uint32_t _itail_tgt = 0; 3706 RECOMP_REGS_LOCALS 3707 RECOMP_ENTER(0x31008360u); 3708 3709 L_31008360: 3710 MEM32(0x31057E0C) = 0x31051ED4u; /* 0x31008360: mov dword ptr [0x31057e0c], 0x31051ed4 */ 3711 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100836A: ret */ 3712 RECOMP_REGS_OUT(); 3713 } 3714 3715 void sub_31008370(void) { 3716 int _fpu_cmp = 0; 3717 uint32_t _cf = 0; 3718 int _df = 1; 3719 uint32_t _flag_k = FK_NONE; 3720 uint32_t _flag_a = 0, _flag_b = 0; 3721 uint32_t _itail_tgt = 0; 3722 RECOMP_REGS_LOCALS 3723 RECOMP_ENTER(0x31008370u); 3724 3725 L_31008370: 3726 goto L_31008380; /* 0x31008370: jmp 0x31008380 */ 3727 L_31008380: 3728 MEM32(0x31057E00) = 0x31051F10u; /* 0x31008380: mov dword ptr [0x31057e00], 0x31051f10 */ 3729 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100838A: ret */ 3730 RECOMP_REGS_OUT(); 3731 } 3732 3733 void sub_31008380(void) { 3734 int _fpu_cmp = 0; 3735 uint32_t _cf = 0; 3736 int _df = 1; 3737 uint32_t _flag_k = FK_NONE; 3738 uint32_t _flag_a = 0, _flag_b = 0; 3739 uint32_t _itail_tgt = 0; 3740 RECOMP_REGS_LOCALS 3741 RECOMP_ENTER(0x31008380u); 3742 3743 L_31008380: 3744 MEM32(0x31057E00) = 0x31051F10u; /* 0x31008380: mov dword ptr [0x31057e00], 0x31051f10 */ 3745 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100838A: ret */ 3746 RECOMP_REGS_OUT(); 3747 } 3748 3749 void sub_31008390(void) { 3750 int _fpu_cmp = 0; 3751 uint32_t _cf = 0; 3752 int _df = 1; 3753 uint32_t _flag_k = FK_NONE; 3754 uint32_t _flag_a = 0, _flag_b = 0; 3755 uint32_t _itail_tgt = 0; 3756 RECOMP_REGS_LOCALS 3757 RECOMP_ENTER(0x31008390u); 3758 3759 L_31008390: 3760 goto L_310083A0; /* 0x31008390: jmp 0x310083a0 */ 3761 L_310083A0: 3762 MEM32(0x31057E28) = 0x31051F44u; /* 0x310083A0: mov dword ptr [0x31057e28], 0x31051f44 */ 3763 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310083AA: ret */ 3764 RECOMP_REGS_OUT(); 3765 } 3766 3767 void sub_310083A0(void) { 3768 int _fpu_cmp = 0; 3769 uint32_t _cf = 0; 3770 int _df = 1; 3771 uint32_t _flag_k = FK_NONE; 3772 uint32_t _flag_a = 0, _flag_b = 0; 3773 uint32_t _itail_tgt = 0; 3774 RECOMP_REGS_LOCALS 3775 RECOMP_ENTER(0x310083A0u); 3776 3777 L_310083A0: 3778 MEM32(0x31057E28) = 0x31051F44u; /* 0x310083A0: mov dword ptr [0x31057e28], 0x31051f44 */ 3779 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310083AA: ret */ 3780 RECOMP_REGS_OUT(); 3781 } 3782 3783 void sub_310083B0(void) { 3784 int _fpu_cmp = 0; 3785 uint32_t _cf = 0; 3786 int _df = 1; 3787 uint32_t _flag_k = FK_NONE; 3788 uint32_t _flag_a = 0, _flag_b = 0; 3789 uint32_t _itail_tgt = 0; 3790 RECOMP_REGS_LOCALS 3791 RECOMP_ENTER(0x310083B0u); 3792 3793 L_310083B0: 3794 goto L_310083C0; /* 0x310083B0: jmp 0x310083c0 */ 3795 L_310083C0: 3796 MEM32(0x31057DFC) = 0x31051F78u; /* 0x310083C0: mov dword ptr [0x31057dfc], 0x31051f78 */ 3797 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310083CA: ret */ 3798 RECOMP_REGS_OUT(); 3799 } 3800 3801 void sub_310083C0(void) { 3802 int _fpu_cmp = 0; 3803 uint32_t _cf = 0; 3804 int _df = 1; 3805 uint32_t _flag_k = FK_NONE; 3806 uint32_t _flag_a = 0, _flag_b = 0; 3807 uint32_t _itail_tgt = 0; 3808 RECOMP_REGS_LOCALS 3809 RECOMP_ENTER(0x310083C0u); 3810 3811 L_310083C0: 3812 MEM32(0x31057DFC) = 0x31051F78u; /* 0x310083C0: mov dword ptr [0x31057dfc], 0x31051f78 */ 3813 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310083CA: ret */ 3814 RECOMP_REGS_OUT(); 3815 } 3816 3817 void sub_310083D0(void) { 3818 int _fpu_cmp = 0; 3819 uint32_t _cf = 0; 3820 int _df = 1; 3821 uint32_t _flag_k = FK_NONE; 3822 uint32_t _flag_a = 0, _flag_b = 0; 3823 uint32_t _itail_tgt = 0; 3824 RECOMP_REGS_LOCALS 3825 RECOMP_ENTER(0x310083D0u); 3826 3827 L_310083D0: 3828 PUSH32(esp, ebp); /* 0x310083D0: push ebp */ 3829 ebp = esp; /* 0x310083D1: mov ebp, esp */ 3830 PUSH32(esp, 0xFFFFFFFFu); /* 0x310083D3: push -1 */ 3831 PUSH32(esp, 0x3104722Bu); /* 0x310083D5: push 0x3104722b */ 3832 eax = MEM32(FS_BASE + (0)); /* 0x310083DA: mov eax, dword ptr fs:[0] */ 3833 PUSH32(esp, eax); /* 0x310083E0: push eax */ 3834 MEM32(FS_BASE + (0)) = esp; /* 0x310083E1: mov dword ptr fs:[0], esp */ 3835 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3836 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3837 esp = esp - 8; /* 0x310083E8: sub esp, 8 */ 3838 _flag_k = FK_CMP; 3839 PUSH32(esp, ebx); /* 0x310083EB: push ebx */ 3840 PUSH32(esp, esi); /* 0x310083EC: push esi */ 3841 esi = ecx; /* 0x310083ED: mov esi, ecx */ 3842 PUSH32(esp, edi); /* 0x310083EF: push edi */ 3843 ecx = esi + 0x4; /* 0x310083F0: lea ecx, [esi + 4] */ 3844 MEM32(ebp + (-0x14)) = esi; /* 0x310083F3: mov dword ptr [ebp - 0x14], esi */ 3845 RECOMP_ICALL(0x310045B0u); /* 0x310083F6: call 0x310045b0 */ /* not lifted */ 3846 RECOMP_FLAGS_IN(); 3847 edi = MEM32(ebp + 0x8); /* 0x310083FB: mov edi, dword ptr [ebp + 8] */ 3848 ebx = MEM32(0x3104805C); /* 0x310083FE: mov ebx, dword ptr [0x3104805c] */ 3849 PUSH32(esp, 0); /* 0x31008404: push 0 */ 3850 PUSH32(esp, 0x30000000u); /* 0x31008406: push 0x30000000 */ 3851 PUSH32(esp, 4); /* 0x3100840B: push 4 */ 3852 PUSH32(esp, 0); /* 0x3100840D: push 0 */ 3853 PUSH32(esp, 3); /* 0x3100840F: push 3 */ 3854 PUSH32(esp, 0x80000000u); /* 0x31008411: push 0x80000000 */ 3855 PUSH32(esp, edi); /* 0x31008416: push edi */ 3856 MEM32(ebp + (-0x4)) = 0; /* 0x31008417: mov dword ptr [ebp - 4], 0 */ 3857 RECOMP_ICALL(ebx); /* 0x3100841E: call ebx */ 3858 RECOMP_FLAGS_IN(); 3859 /* cmp eax, 0xFFFFFFFFu */ /* 0x31008420: cmp eax, -1 */ 3860 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3861 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3862 _flag_k = FK_CMP; 3863 MEM32(esi) = eax; /* 0x31008423: mov dword ptr [esi], eax */ 3864 if (CMP_NE(_flag_a, _flag_b)) goto L_31008443; /* 0x31008425: jne 0x31008443 */ 3865 L_31008427: 3866 PUSH32(esp, 0); /* 0x31008427: push 0 */ 3867 PUSH32(esp, 0x30000000u); /* 0x31008429: push 0x30000000 */ 3868 PUSH32(esp, 4); /* 0x3100842E: push 4 */ 3869 PUSH32(esp, 0); /* 0x31008430: push 0 */ 3870 PUSH32(esp, 3); /* 0x31008432: push 3 */ 3871 PUSH32(esp, 0x80000000u); /* 0x31008434: push 0x80000000 */ 3872 PUSH32(esp, edi); /* 0x31008439: push edi */ 3873 RECOMP_ICALL(ebx); /* 0x3100843A: call ebx */ 3874 RECOMP_FLAGS_IN(); 3875 /* cmp eax, 0xFFFFFFFFu */ /* 0x3100843C: cmp eax, -1 */ 3876 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3877 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3878 _flag_k = FK_CMP; 3879 MEM32(esi) = eax; /* 0x3100843F: mov dword ptr [esi], eax */ 3880 RECOMP_BACKEDGE(); 3881 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008427; /* 0x31008441: je 0x31008427 */ 3882 L_31008443: 3883 PUSH32(esp, 0); /* 0x31008443: push 0 */ 3884 ecx = ebp + (-0x10); /* 0x31008445: lea ecx, [ebp - 0x10] */ 3885 RECOMP_ICALL(0x31004520u); /* 0x31008448: call 0x31004520 */ /* not lifted */ 3886 RECOMP_FLAGS_IN(); 3887 SET_LO8(ebx, 1); /* 0x3100844D: mov bl, 1 */ 3888 PUSH32(esp, 0x00021000u); /* 0x3100844F: push 0x21000 */ 3889 ecx = ebp + 0x8; /* 0x31008454: lea ecx, [ebp + 8] */ 3890 MEM8(ebp + (-0x4)) = (uint8_t)(LO8(ebx)); /* 0x31008457: mov byte ptr [ebp - 4], bl */ 3891 RECOMP_ICALL(0x31004520u); /* 0x3100845A: call 0x31004520 */ /* not lifted */ 3892 RECOMP_FLAGS_IN(); 3893 PUSH32(esp, eax); /* 0x3100845F: push eax */ 3894 ecx = esi + 0x4; /* 0x31008460: lea ecx, [esi + 4] */ 3895 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x31008463: mov byte ptr [ebp - 4], 2 */ 3896 RECOMP_ICALL(0x310046E0u); /* 0x31008467: call 0x310046e0 */ /* not lifted */ 3897 RECOMP_FLAGS_IN(); 3898 ecx = ebp + 0x8; /* 0x3100846C: lea ecx, [ebp + 8] */ 3899 MEM8(ebp + (-0x4)) = (uint8_t)(LO8(ebx)); /* 0x3100846F: mov byte ptr [ebp - 4], bl */ 3900 RECOMP_ICALL(0x31004760u); /* 0x31008472: call 0x31004760 */ /* not lifted */ 3901 RECOMP_FLAGS_IN(); 3902 ecx = ebp + (-0x10); /* 0x31008477: lea ecx, [ebp - 0x10] */ 3903 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x3100847A: mov byte ptr [ebp - 4], 0 */ 3904 RECOMP_ICALL(0x31004760u); /* 0x3100847E: call 0x31004760 */ /* not lifted */ 3905 RECOMP_FLAGS_IN(); 3906 ecx = MEM32(ebp + (-0xC)); /* 0x31008483: mov ecx, dword ptr [ebp - 0xc] */ 3907 edi = POP32_VAL(esp); /* 0x31008486: pop edi */ 3908 eax = esi; /* 0x31008487: mov eax, esi */ 3909 esi = POP32_VAL(esp); /* 0x31008489: pop esi */ 3910 ebx = POP32_VAL(esp); /* 0x3100848A: pop ebx */ 3911 MEM32(FS_BASE + (0)) = ecx; /* 0x3100848B: mov dword ptr fs:[0], ecx */ 3912 esp = ebp; /* 0x31008492: mov esp, ebp */ 3913 ebp = POP32_VAL(esp); /* 0x31008494: pop ebp */ 3914 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31008495: ret 4 */ 3915 RECOMP_REGS_OUT(); 3916 } 3917 3918 void sub_310084A0(void) { 3919 int _fpu_cmp = 0; 3920 uint32_t _cf = 0; 3921 int _df = 1; 3922 uint32_t _flag_k = FK_NONE; 3923 uint32_t _flag_a = 0, _flag_b = 0; 3924 uint32_t _itail_tgt = 0; 3925 RECOMP_REGS_LOCALS 3926 RECOMP_ENTER(0x310084A0u); 3927 3928 L_310084A0: 3929 PUSH32(esp, esi); /* 0x310084A0: push esi */ 3930 esi = ecx; /* 0x310084A1: mov esi, ecx */ 3931 eax = MEM32(esi); /* 0x310084A3: mov eax, dword ptr [esi] */ 3932 /* cmp eax, 0xFFFFFFFFu */ /* 0x310084A5: cmp eax, -1 */ 3933 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFFu); 3934 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3935 _flag_k = FK_CMP; 3936 if (CMP_EQ(_flag_a, _flag_b)) goto L_310084B1; /* 0x310084A8: je 0x310084b1 */ 3937 L_310084AA: 3938 PUSH32(esp, eax); /* 0x310084AA: push eax */ 3939 RECOMP_ICALL(MEM32(0x31048050)); /* 0x310084AB: call dword ptr [0x31048050] */ 3940 RECOMP_FLAGS_IN(); 3941 L_310084B1: 3942 MEM32(esi) = 0xFFFFFFFFu; /* 0x310084B1: mov dword ptr [esi], 0xffffffff */ 3943 esi = POP32_VAL(esp); /* 0x310084B7: pop esi */ 3944 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310084B8: ret */ 3945 RECOMP_REGS_OUT(); 3946 } 3947 3948 void sub_310084C0(void) { 3949 int _fpu_cmp = 0; 3950 uint32_t _cf = 0; 3951 int _df = 1; 3952 uint32_t _flag_k = FK_NONE; 3953 uint32_t _flag_a = 0, _flag_b = 0; 3954 uint32_t _itail_tgt = 0; 3955 RECOMP_REGS_LOCALS 3956 RECOMP_ENTER(0x310084C0u); 3957 3958 L_310084C0: 3959 PUSH32(esp, ebp); /* 0x310084C0: push ebp */ 3960 ebp = esp; /* 0x310084C1: mov ebp, esp */ 3961 PUSH32(esp, 0xFFFFFFFFu); /* 0x310084C3: push -1 */ 3962 PUSH32(esp, 0x3104725Fu); /* 0x310084C5: push 0x3104725f */ 3963 eax = MEM32(FS_BASE + (0)); /* 0x310084CA: mov eax, dword ptr fs:[0] */ 3964 PUSH32(esp, eax); /* 0x310084D0: push eax */ 3965 MEM32(FS_BASE + (0)) = esp; /* 0x310084D1: mov dword ptr fs:[0], esp */ 3966 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 3967 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3968 esp = esp - 0x14u; /* 0x310084D8: sub esp, 0x14 */ 3969 _flag_k = FK_CMP; 3970 PUSH32(esp, ebx); /* 0x310084DB: push ebx */ 3971 PUSH32(esp, esi); /* 0x310084DC: push esi */ 3972 esi = ecx; /* 0x310084DD: mov esi, ecx */ 3973 eax = MEM32(esi); /* 0x310084DF: mov eax, dword ptr [esi] */ 3974 /* cmp eax, 0xFFFFFFFFu */ /* 0x310084E1: 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 PUSH32(esp, edi); /* 0x310084E4: push edi */ 3979 MEM32(ebp + (-0x18)) = esi; /* 0x310084E5: mov dword ptr [ebp - 0x18], esi */ 3980 MEM32(ebp + (-0x1C)) = 0; /* 0x310084E8: mov dword ptr [ebp - 0x1c], 0 */ 3981 if (CMP_NE(_flag_a, _flag_b)) goto L_31008500; /* 0x310084EF: jne 0x31008500 */ 3982 L_310084F1: 3983 esi = MEM32(ebp + 0x8); /* 0x310084F1: mov esi, dword ptr [ebp + 8] */ 3984 ecx = esi; /* 0x310084F4: mov ecx, esi */ 3985 RECOMP_ICALL(0x310045B0u); /* 0x310084F6: call 0x310045b0 */ /* not lifted */ 3986 RECOMP_FLAGS_IN(); 3987 goto L_31008726; /* 0x310084FB: jmp 0x31008726 */ 3988 L_31008500: 3989 ecx = MEM32(ebp + 0xC); /* 0x31008500: mov ecx, dword ptr [ebp + 0xc] */ 3990 PUSH32(esp, 0); /* 0x31008503: push 0 */ 3991 PUSH32(esp, 0); /* 0x31008505: push 0 */ 3992 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xFFFFF000u); 3993 ecx = ecx & 0xFFFFF000u; /* 0x31008507: and ecx, 0xfffff000 */ 3994 _cf = 0; 3995 _flag_k = FK_TEST; 3996 PUSH32(esp, ecx); /* 0x3100850D: push ecx */ 3997 PUSH32(esp, eax); /* 0x3100850E: push eax */ 3998 RECOMP_ICALL(MEM32(0x31048064)); /* 0x3100850F: call dword ptr [0x31048064] */ 3999 RECOMP_FLAGS_IN(); 4000 eax = MEM32(esi + 0x4); /* 0x31008515: mov eax, dword ptr [esi + 4] */ 4001 /* cmp MEM32(eax), 0x80000000u */ /* 0x31008518: cmp dword ptr [eax], 0x80000000 */ 4002 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x80000000u); 4003 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4004 _flag_k = FK_CMP; 4005 ebx = eax + 0x8; /* 0x3100851E: lea ebx, [eax + 8] */ 4006 if (CMP_B(_flag_a, _flag_b)) goto L_31008526; /* 0x31008521: jb 0x31008526 */ 4007 L_31008523: 4008 ebx = MEM32(eax + 0x8); /* 0x31008523: mov ebx, dword ptr [eax + 8] */ 4009 L_31008526: 4010 eax = MEM32(ebp + 0x10); /* 0x31008526: mov eax, dword ptr [ebp + 0x10] */ 4011 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0xFFFu); 4012 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4013 ebx = ebx + 0xFFFu; /* 0x31008529: add ebx, 0xfff */ 4014 _flag_k = FK_ADD; 4015 edx = eax + (-0xF6951); /* 0x3100852F: lea edx, [eax - 0xf6951] */ 4016 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0xFFFFF000u); 4017 ebx = ebx & 0xFFFFF000u; /* 0x31008535: and ebx, 0xfffff000 */ 4018 _cf = 0; 4019 _flag_k = FK_TEST; 4020 /* cmp edx, 0x19u */ /* 0x3100853B: cmp edx, 0x19 */ 4021 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x19u); 4022 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4023 _flag_k = FK_CMP; 4024 edi = 0x2000u; /* 0x3100853E: mov edi, 0x2000 */ 4025 if (CMP_A(_flag_a, _flag_b)) goto L_31008552; /* 0x31008543: ja 0x31008552 */ 4026 L_31008545: 4027 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4028 ecx = 0; /* 0x31008545: xor ecx, ecx */ 4029 _cf = 0; 4030 _flag_k = FK_TEST; 4031 SET_LO8(ecx, MEM8(eax + 0x30F5B6BB)); /* 0x31008547: mov cl, byte ptr [eax + 0x30f5b6bb] */ 4032 edi = ecx; /* 0x3100854D: mov edi, ecx */ 4033 if (10u) _cf = (((edi) >> 22) & 1u); /* 0x3100854F: shl edi, 0xa */ 4034 if (10u) { _flag_a = recomp_flags_pack((edi << 10u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 4035 edi = edi << 10u; /* 0x3100854F: shl edi, 0xa */ 4036 L_31008552: 4037 eax = MEM32(esi); /* 0x31008552: mov eax, dword ptr [esi] */ 4038 PUSH32(esp, 0); /* 0x31008554: push 0 */ 4039 edx = ebp + (-0x14); /* 0x31008556: lea edx, [ebp - 0x14] */ 4040 PUSH32(esp, edx); /* 0x31008559: push edx */ 4041 PUSH32(esp, edi); /* 0x3100855A: push edi */ 4042 PUSH32(esp, ebx); /* 0x3100855B: push ebx */ 4043 PUSH32(esp, eax); /* 0x3100855C: push eax */ 4044 RECOMP_ICALL(MEM32(0x31048054)); /* 0x3100855D: call dword ptr [0x31048054] */ 4045 RECOMP_FLAGS_IN(); 4046 esi = MEM32(ebp + 0xC); /* 0x31008563: mov esi, dword ptr [ebp + 0xc] */ 4047 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0xFFFu); 4048 esi = esi & 0xFFFu; /* 0x31008566: and esi, 0xfff */ 4049 _cf = 0; 4050 _flag_k = FK_TEST; 4051 /* test eax, eax */ /* 0x3100856C: test eax, eax */ 4052 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4053 _cf = 0; 4054 _flag_k = FK_TEST; 4055 if (TEST_Z(_flag_a, _flag_b)) goto L_3100871C; /* 0x3100856E: je 0x3100871c */ 4056 L_31008574: 4057 /* cmp MEM16(esi + ebx), 0xFAFAu */ /* 0x31008574: cmp word ptr [esi + ebx], 0xfafa */ 4058 _flag_a = (uint32_t)(MEM16(esi + ebx)) << 16; _flag_b = (uint32_t)(0xFAFAu) << 16; 4059 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4060 _flag_k = FK_NARROW(FK_CMP, 16); 4061 if (CMP_NE(_flag_a, _flag_b)) goto L_3100871C; /* 0x3100857A: jne 0x3100871c */ 4062 L_31008580: 4063 ecx = MEM32(esi + ebx + 0x6); /* 0x31008580: mov ecx, dword ptr [esi + ebx + 6] */ 4064 eax = MEM32(esi + ebx + 0x2); /* 0x31008584: mov eax, dword ptr [esi + ebx + 2] */ 4065 edx = ecx + 0xA; /* 0x31008588: lea edx, [ecx + 0xa] */ 4066 /* cmp eax, edx */ /* 0x3100858B: cmp eax, edx */ 4067 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 4068 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4069 _flag_k = FK_CMP; 4070 if (CMP_B(_flag_a, _flag_b)) goto L_3100871C; /* 0x3100858D: jb 0x3100871c */ 4071 L_31008593: 4072 eax = esi + ebx + 0x12; /* 0x31008593: lea eax, [esi + ebx + 0x12] */ 4073 MEM32(ebp + (-0x20)) = eax; /* 0x31008597: mov dword ptr [ebp - 0x20], eax */ 4074 eax = MEM32(eax); /* 0x3100859A: mov eax, dword ptr [eax] */ 4075 edx = eax + 0xC; /* 0x3100859C: lea edx, [eax + 0xc] */ 4076 /* cmp ecx, edx */ /* 0x3100859F: cmp ecx, edx */ 4077 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 4078 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4079 _flag_k = FK_CMP; 4080 if (CMP_NE(_flag_a, _flag_b)) goto L_3100871C; /* 0x310085A1: jne 0x3100871c */ 4081 L_310085A7: 4082 ecx = MEM32(ebp + 0x10); /* 0x310085A7: mov ecx, dword ptr [ebp + 0x10] */ 4083 /* cmp ecx, MEM32(esi + ebx + 0xA) */ /* 0x310085AA: cmp ecx, dword ptr [esi + ebx + 0xa] */ 4084 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + ebx + 0xA)); 4085 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4086 _flag_k = FK_CMP; 4087 if (CMP_NE(_flag_a, _flag_b)) goto L_3100871C; /* 0x310085AE: jne 0x3100871c */ 4088 L_310085B4: 4089 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 4090 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4091 edi = edi - esi; /* 0x310085B4: sub edi, esi */ 4092 _flag_k = FK_CMP; 4093 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x16u); 4094 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4095 edi = edi - 0x16u; /* 0x310085B6: sub edi, 0x16 */ 4096 _flag_k = FK_CMP; 4097 /* cmp eax, edi */ /* 0x310085B9: cmp eax, edi */ 4098 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 4099 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4100 _flag_k = FK_CMP; 4101 MEM32(ebp + 0xC) = edi; /* 0x310085BB: mov dword ptr [ebp + 0xc], edi */ 4102 if (CMP_A(_flag_a, _flag_b)) goto L_310085D7; /* 0x310085BE: ja 0x310085d7 */ 4103 L_310085C0: 4104 PUSH32(esp, 0); /* 0x310085C0: push 0 */ 4105 edx = esi + ebx + 0x16; /* 0x310085C2: lea edx, [esi + ebx + 0x16] */ 4106 esi = MEM32(ebp + 0x8); /* 0x310085C6: mov esi, dword ptr [ebp + 8] */ 4107 PUSH32(esp, eax); /* 0x310085C9: push eax */ 4108 PUSH32(esp, edx); /* 0x310085CA: push edx */ 4109 ecx = esi; /* 0x310085CB: mov ecx, esi */ 4110 RECOMP_ICALL(0x310045D0u); /* 0x310085CD: call 0x310045d0 */ /* not lifted */ 4111 RECOMP_FLAGS_IN(); 4112 goto L_31008726; /* 0x310085D2: jmp 0x31008726 */ 4113 L_310085D7: 4114 PUSH32(esp, eax); /* 0x310085D7: push eax */ 4115 ecx = ebp + (-0x10); /* 0x310085D8: lea ecx, [ebp - 0x10] */ 4116 RECOMP_ICALL(0x31004520u); /* 0x310085DB: call 0x31004520 */ /* not lifted */ 4117 RECOMP_FLAGS_IN(); 4118 eax = MEM32(ebp + (-0x10)); /* 0x310085E0: mov eax, dword ptr [ebp - 0x10] */ 4119 /* cmp MEM32(eax), 0x80000000u */ /* 0x310085E3: cmp dword ptr [eax], 0x80000000 */ 4120 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x80000000u); 4121 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4122 _flag_k = FK_CMP; 4123 MEM32(ebp + (-0x4)) = 1; /* 0x310085E9: mov dword ptr [ebp - 4], 1 */ 4124 if (CMP_AE(_flag_a, _flag_b)) goto L_310085F7; /* 0x310085F0: jae 0x310085f7 */ 4125 L_310085F2: 4126 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(8); 4127 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4128 eax = eax + 8; /* 0x310085F2: add eax, 8 */ 4129 _flag_k = FK_ADD; 4130 goto L_310085FA; /* 0x310085F5: jmp 0x310085fa */ 4131 L_310085F7: 4132 eax = MEM32(eax + 0x8); /* 0x310085F7: mov eax, dword ptr [eax + 8] */ 4133 L_310085FA: 4134 ecx = edi; /* 0x310085FA: mov ecx, edi */ 4135 edi = eax; /* 0x310085FC: mov edi, eax */ 4136 eax = ecx; /* 0x310085FE: mov eax, ecx */ 4137 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x31008600: shr ecx, 2 */ 4138 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 4139 ecx = ecx >> 2u; /* 0x31008600: shr ecx, 2 */ 4140 esi = esi + ebx + 0x16; /* 0x31008603: lea esi, [esi + ebx + 0x16] */ 4141 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31008607: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 4142 ecx = eax; /* 0x31008609: mov ecx, eax */ 4143 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 4144 ecx = ecx & 3; /* 0x3100860B: and ecx, 3 */ 4145 _cf = 0; 4146 _flag_k = FK_TEST; 4147 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x3100860E: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 4148 ecx = MEM32(ebp + (-0x20)); /* 0x31008610: mov ecx, dword ptr [ebp - 0x20] */ 4149 edi = MEM32(ecx); /* 0x31008613: mov edi, dword ptr [ecx] */ 4150 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebp + 0xC)); 4151 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4152 edi = edi - MEM32(ebp + 0xC); /* 0x31008615: sub edi, dword ptr [ebp + 0xc] */ 4153 _flag_k = FK_CMP; 4154 /* cmp edi, 0x00020000u */ /* 0x31008618: cmp edi, 0x20000 */ 4155 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x00020000u); 4156 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4157 _flag_k = FK_CMP; 4158 if (CMP_A(_flag_a, _flag_b)) goto L_31008669; /* 0x3100861E: ja 0x31008669 */ 4159 L_31008620: 4160 ecx = MEM32(ebp + (-0x18)); /* 0x31008620: mov ecx, dword ptr [ebp - 0x18] */ 4161 PUSH32(esp, 0); /* 0x31008623: push 0 */ 4162 edx = ebp + (-0x14); /* 0x31008625: lea edx, [ebp - 0x14] */ 4163 PUSH32(esp, edx); /* 0x31008628: push edx */ 4164 edx = MEM32(ecx); /* 0x31008629: mov edx, dword ptr [ecx] */ 4165 eax = edi + 0xFFF; /* 0x3100862B: lea eax, [edi + 0xfff] */ 4166 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFF000u); 4167 eax = eax & 0xFFFFF000u; /* 0x31008631: and eax, 0xfffff000 */ 4168 _cf = 0; 4169 _flag_k = FK_TEST; 4170 PUSH32(esp, eax); /* 0x31008636: push eax */ 4171 PUSH32(esp, ebx); /* 0x31008637: push ebx */ 4172 PUSH32(esp, edx); /* 0x31008638: push edx */ 4173 RECOMP_ICALL(MEM32(0x31048054)); /* 0x31008639: call dword ptr [0x31048054] */ 4174 RECOMP_FLAGS_IN(); 4175 ecx = MEM32(ebp + (-0x10)); /* 0x3100863F: mov ecx, dword ptr [ebp - 0x10] */ 4176 /* cmp MEM32(ecx), 0x80000000u */ /* 0x31008642: cmp dword ptr [ecx], 0x80000000 */ 4177 _flag_a = (uint32_t)(MEM32(ecx)); _flag_b = (uint32_t)(0x80000000u); 4178 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4179 _flag_k = FK_CMP; 4180 edx = ecx + 0x8; /* 0x31008648: lea edx, [ecx + 8] */ 4181 if (CMP_B(_flag_a, _flag_b)) goto L_31008650; /* 0x3100864B: jb 0x31008650 */ 4182 L_3100864D: 4183 edx = MEM32(ecx + 0x8); /* 0x3100864D: mov edx, dword ptr [ecx + 8] */ 4184 L_31008650: 4185 ecx = edi; /* 0x31008650: mov ecx, edi */ 4186 edi = MEM32(ebp + 0xC); /* 0x31008652: mov edi, dword ptr [ebp + 0xc] */ 4187 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx); 4188 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4189 edi = edi + edx; /* 0x31008655: add edi, edx */ 4190 _flag_k = FK_ADD; 4191 edx = ecx; /* 0x31008657: mov edx, ecx */ 4192 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x31008659: shr ecx, 2 */ 4193 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 4194 ecx = ecx >> 2u; /* 0x31008659: shr ecx, 2 */ 4195 esi = ebx; /* 0x3100865C: mov esi, ebx */ 4196 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x3100865E: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 4197 ecx = edx; /* 0x31008660: mov ecx, edx */ 4198 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 4199 ecx = ecx & 3; /* 0x31008662: and ecx, 3 */ 4200 _cf = 0; 4201 _flag_k = FK_TEST; 4202 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x31008665: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 4203 goto L_310086E3; /* 0x31008667: jmp 0x310086e3 */ 4204 L_31008669: 4205 eax = edi + 0x1FFF; /* 0x31008669: lea eax, [edi + 0x1fff] */ 4206 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFF000u); 4207 eax = eax & 0xFFFFF000u; /* 0x3100866F: and eax, 0xfffff000 */ 4208 _cf = 0; 4209 _flag_k = FK_TEST; 4210 PUSH32(esp, eax); /* 0x31008674: push eax */ 4211 RECOMP_ICALL(0x310468DAu); /* 0x31008675: call 0x310468da */ /* not lifted */ 4212 RECOMP_FLAGS_IN(); 4213 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4214 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4215 esp = esp + 4; /* 0x3100867A: add esp, 4 */ 4216 _flag_k = FK_ADD; 4217 PUSH32(esp, 0); /* 0x3100867D: push 0 */ 4218 ebx = eax; /* 0x3100867F: mov ebx, eax */ 4219 eax = MEM32(ebp + (-0x18)); /* 0x31008681: mov eax, dword ptr [ebp - 0x18] */ 4220 ecx = ebp + (-0x14); /* 0x31008684: lea ecx, [ebp - 0x14] */ 4221 PUSH32(esp, ecx); /* 0x31008687: push ecx */ 4222 ecx = MEM32(eax); /* 0x31008688: mov ecx, dword ptr [eax] */ 4223 edx = edi + 0xFFF; /* 0x3100868A: lea edx, [edi + 0xfff] */ 4224 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0xFFFFF000u); 4225 edx = edx & 0xFFFFF000u; /* 0x31008690: and edx, 0xfffff000 */ 4226 _cf = 0; 4227 _flag_k = FK_TEST; 4228 esi = ebx + 0xFFF; /* 0x31008696: lea esi, [ebx + 0xfff] */ 4229 PUSH32(esp, edx); /* 0x3100869C: push edx */ 4230 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0xFFFFF000u); 4231 esi = esi & 0xFFFFF000u; /* 0x3100869D: and esi, 0xfffff000 */ 4232 _cf = 0; 4233 _flag_k = FK_TEST; 4234 PUSH32(esp, esi); /* 0x310086A3: push esi */ 4235 PUSH32(esp, ecx); /* 0x310086A4: push ecx */ 4236 RECOMP_ICALL(MEM32(0x31048054)); /* 0x310086A5: call dword ptr [0x31048054] */ 4237 RECOMP_FLAGS_IN(); 4238 MEM32(ebp + 0x10) = eax; /* 0x310086AB: mov dword ptr [ebp + 0x10], eax */ 4239 eax = MEM32(ebp + (-0x10)); /* 0x310086AE: mov eax, dword ptr [ebp - 0x10] */ 4240 /* cmp MEM32(eax), 0x80000000u */ /* 0x310086B1: cmp dword ptr [eax], 0x80000000 */ 4241 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x80000000u); 4242 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4243 _flag_k = FK_CMP; 4244 if (CMP_AE(_flag_a, _flag_b)) goto L_310086BE; /* 0x310086B7: jae 0x310086be */ 4245 L_310086B9: 4246 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(8); 4247 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4248 eax = eax + 8; /* 0x310086B9: add eax, 8 */ 4249 _flag_k = FK_ADD; 4250 goto L_310086C1; /* 0x310086BC: jmp 0x310086c1 */ 4251 L_310086BE: 4252 eax = MEM32(eax + 0x8); /* 0x310086BE: mov eax, dword ptr [eax + 8] */ 4253 L_310086C1: 4254 edx = MEM32(ebp + 0xC); /* 0x310086C1: mov edx, dword ptr [ebp + 0xc] */ 4255 ecx = edi; /* 0x310086C4: mov ecx, edi */ 4256 edi = eax + edx; /* 0x310086C6: lea edi, [eax + edx] */ 4257 eax = ecx; /* 0x310086C9: mov eax, ecx */ 4258 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x310086CB: shr ecx, 2 */ 4259 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 4260 ecx = ecx >> 2u; /* 0x310086CB: shr ecx, 2 */ 4261 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x310086CE: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 4262 ecx = eax; /* 0x310086D0: mov ecx, eax */ 4263 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 4264 ecx = ecx & 3; /* 0x310086D2: and ecx, 3 */ 4265 _cf = 0; 4266 _flag_k = FK_TEST; 4267 PUSH32(esp, ebx); /* 0x310086D5: push ebx */ 4268 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x310086D6: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 4269 RECOMP_ICALL(0x31046858u); /* 0x310086D8: call 0x31046858 */ /* not lifted */ 4270 RECOMP_FLAGS_IN(); 4271 eax = MEM32(ebp + 0x10); /* 0x310086DD: mov eax, dword ptr [ebp + 0x10] */ 4272 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4273 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4274 esp = esp + 4; /* 0x310086E0: add esp, 4 */ 4275 _flag_k = FK_ADD; 4276 L_310086E3: 4277 /* test eax, eax */ /* 0x310086E3: test eax, eax */ 4278 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4279 _cf = 0; 4280 _flag_k = FK_TEST; 4281 if (TEST_NZ(_flag_a, _flag_b)) goto L_310086F3; /* 0x310086E5: jne 0x310086f3 */ 4282 L_310086E7: 4283 esi = MEM32(ebp + 0x8); /* 0x310086E7: mov esi, dword ptr [ebp + 8] */ 4284 ecx = esi; /* 0x310086EA: mov ecx, esi */ 4285 RECOMP_ICALL(0x310045B0u); /* 0x310086EC: call 0x310045b0 */ /* not lifted */ 4286 RECOMP_FLAGS_IN(); 4287 goto L_31008707; /* 0x310086F1: jmp 0x31008707 */ 4288 L_310086F3: 4289 ecx = MEM32(ebp + (-0x10)); /* 0x310086F3: mov ecx, dword ptr [ebp - 0x10] */ 4290 MEM32(ebp + 0xC) = ecx; /* 0x310086F6: mov dword ptr [ebp + 0xc], ecx */ 4291 ebx = MEM32(ebp + 0xC); /* 0x310086F9: mov ebx, dword ptr [ebp + 0xc] */ 4292 _flag_a = __atomic_fetch_add((uint32_t *)ADDR(ebx), 1, __ATOMIC_SEQ_CST); _flag_b = 1; /* 0x310086FC: lock inc dword ptr [ebx] */ 4293 _flag_k = FK_INC; 4294 esi = MEM32(ebp + 0x8); /* 0x310086FF: mov esi, dword ptr [ebp + 8] */ 4295 edx = MEM32(ebp + (-0x10)); /* 0x31008702: mov edx, dword ptr [ebp - 0x10] */ 4296 MEM32(esi) = edx; /* 0x31008705: mov dword ptr [esi], edx */ 4297 L_31008707: 4298 ecx = ebp + (-0x10); /* 0x31008707: lea ecx, [ebp - 0x10] */ 4299 MEM32(ebp + (-0x1C)) = 1; /* 0x3100870A: mov dword ptr [ebp - 0x1c], 1 */ 4300 MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x31008711: mov byte ptr [ebp - 4], 0 */ 4301 RECOMP_ICALL(0x31004760u); /* 0x31008715: call 0x31004760 */ /* not lifted */ 4302 RECOMP_FLAGS_IN(); 4303 goto L_31008726; /* 0x3100871A: jmp 0x31008726 */ 4304 L_3100871C: 4305 esi = MEM32(ebp + 0x8); /* 0x3100871C: mov esi, dword ptr [ebp + 8] */ 4306 ecx = esi; /* 0x3100871F: mov ecx, esi */ 4307 RECOMP_ICALL(0x310045B0u); /* 0x31008721: call 0x310045b0 */ /* not lifted */ 4308 RECOMP_FLAGS_IN(); 4309 L_31008726: 4310 ecx = MEM32(ebp + (-0xC)); /* 0x31008726: mov ecx, dword ptr [ebp - 0xc] */ 4311 edi = POP32_VAL(esp); /* 0x31008729: pop edi */ 4312 eax = esi; /* 0x3100872A: mov eax, esi */ 4313 esi = POP32_VAL(esp); /* 0x3100872C: pop esi */ 4314 ebx = POP32_VAL(esp); /* 0x3100872D: pop ebx */ 4315 MEM32(FS_BASE + (0)) = ecx; /* 0x3100872E: mov dword ptr fs:[0], ecx */ 4316 esp = ebp; /* 0x31008735: mov esp, ebp */ 4317 ebp = POP32_VAL(esp); /* 0x31008737: pop ebp */ 4318 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31008738: ret 0xc */ 4319 RECOMP_REGS_OUT(); 4320 } 4321 4322 void sub_31008726(void) { 4323 int _fpu_cmp = 0; 4324 uint32_t _cf = 0; 4325 int _df = 1; 4326 uint32_t _flag_k = FK_NONE; 4327 uint32_t _flag_a = 0, _flag_b = 0; 4328 uint32_t _itail_tgt = 0; 4329 RECOMP_REGS_LOCALS 4330 RECOMP_ENTER(0x31008726u); 4331 4332 L_31008726: 4333 ecx = MEM32(ebp + (-0xC)); /* 0x31008726: mov ecx, dword ptr [ebp - 0xc] */ 4334 edi = POP32_VAL(esp); /* 0x31008729: pop edi */ 4335 eax = esi; /* 0x3100872A: mov eax, esi */ 4336 esi = POP32_VAL(esp); /* 0x3100872C: pop esi */ 4337 ebx = POP32_VAL(esp); /* 0x3100872D: pop ebx */ 4338 MEM32(FS_BASE + (0)) = ecx; /* 0x3100872E: mov dword ptr fs:[0], ecx */ 4339 esp = ebp; /* 0x31008735: mov esp, ebp */ 4340 ebp = POP32_VAL(esp); /* 0x31008737: pop ebp */ 4341 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31008738: ret 0xc */ 4342 RECOMP_REGS_OUT(); 4343 } 4344 4345 void sub_31008740(void) { 4346 int _fpu_cmp = 0; 4347 uint32_t _cf = 0; 4348 int _df = 1; 4349 uint32_t _flag_k = FK_NONE; 4350 uint32_t _flag_a = 0, _flag_b = 0; 4351 uint32_t _itail_tgt = 0; 4352 RECOMP_REGS_LOCALS 4353 RECOMP_ENTER(0x31008740u); 4354 4355 L_31008740: 4356 PUSH32(esp, ebp); /* 0x31008740: push ebp */ 4357 ebp = esp; /* 0x31008741: mov ebp, esp */ 4358 PUSH32(esp, 0xFFFFFFFFu); /* 0x31008743: push -1 */ 4359 PUSH32(esp, 0x310472A4u); /* 0x31008745: push 0x310472a4 */ 4360 eax = MEM32(FS_BASE + (0)); /* 0x3100874A: mov eax, dword ptr fs:[0] */ 4361 PUSH32(esp, eax); /* 0x31008750: push eax */ 4362 MEM32(FS_BASE + (0)) = esp; /* 0x31008751: mov dword ptr fs:[0], esp */ 4363 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xA4u); 4364 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4365 esp = esp - 0xA4u; /* 0x31008758: sub esp, 0xa4 */ 4366 _flag_k = FK_CMP; 4367 PUSH32(esp, ebx); /* 0x3100875E: push ebx */ 4368 PUSH32(esp, esi); /* 0x3100875F: push esi */ 4369 PUSH32(esp, edi); /* 0x31008760: push edi */ 4370 PUSH32(esp, 0x80u); /* 0x31008761: push 0x80 */ 4371 eax = ebp + (-0xB0); /* 0x31008766: lea eax, [ebp - 0xb0] */ 4372 PUSH32(esp, eax); /* 0x3100876C: push eax */ 4373 MEM32(ebp + (-0x20)) = 0; /* 0x3100876D: mov dword ptr [ebp - 0x20], 0 */ 4374 RECOMP_ICALL(MEM32(0x31048264)); /* 0x31008774: call dword ptr [0x31048264] */ 4375 RECOMP_FLAGS_IN(); 4376 SET_LO8(ecx, MEM8(ebp + 0xB)); /* 0x3100877A: mov cl, byte ptr [ebp + 0xb] */ 4377 MEM8(ebp + (-0x1C)) = (uint8_t)(LO8(ecx)); /* 0x3100877D: mov byte ptr [ebp - 0x1c], cl */ 4378 PUSH32(esp, 0); /* 0x31008780: push 0 */ 4379 ecx = ebp + (-0x1C); /* 0x31008782: lea ecx, [ebp - 0x1c] */ 4380 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31008785: call dword ptr [0x310480d4] */ 4381 RECOMP_FLAGS_IN(); 4382 esi = MEM32(ebp + 0x8); /* 0x3100878B: mov esi, dword ptr [ebp + 8] */ 4383 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 4384 ecx = ecx | 0xFFFFFFFFu; /* 0x3100878E: or ecx, 0xffffffff */ 4385 _cf = 0; 4386 _flag_k = FK_TEST; 4387 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4388 eax = 0; /* 0x31008791: xor eax, eax */ 4389 _cf = 0; 4390 _flag_k = FK_TEST; 4391 edi = esi; /* 0x31008793: mov edi, esi */ 4392 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x31008795: repne scasb al, byte ptr es:[edi] */ 4393 ecx = ~ecx; /* 0x31008797: not ecx */ 4394 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4395 ecx = ecx - 1; /* 0x31008799: dec ecx */ 4396 _flag_k = FK_DEC; 4397 ebx = ecx; /* 0x3100879A: mov ebx, ecx */ 4398 PUSH32(esp, 1); /* 0x3100879C: push 1 */ 4399 PUSH32(esp, ebx); /* 0x3100879E: push ebx */ 4400 ecx = ebp + (-0x1C); /* 0x3100879F: lea ecx, [ebp - 0x1c] */ 4401 RECOMP_ICALL(MEM32(0x31048070)); /* 0x310087A2: call dword ptr [0x31048070] */ 4402 RECOMP_FLAGS_IN(); 4403 /* test LO8(eax), LO8(eax) */ /* 0x310087A8: test al, al */ 4404 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4405 _cf = 0; 4406 _flag_k = FK_NARROW(FK_TEST, 24); 4407 if (TEST_Z(_flag_a, _flag_b)) goto L_310087C9; /* 0x310087AA: je 0x310087c9 */ 4408 L_310087AC: 4409 edi = MEM32(ebp + (-0x18)); /* 0x310087AC: mov edi, dword ptr [ebp - 0x18] */ 4410 ecx = ebx; /* 0x310087AF: mov ecx, ebx */ 4411 edx = ecx; /* 0x310087B1: mov edx, ecx */ 4412 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x310087B3: shr ecx, 2 */ 4413 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 4414 ecx = ecx >> 2u; /* 0x310087B3: shr ecx, 2 */ 4415 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x310087B6: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 4416 ecx = edx; /* 0x310087B8: mov ecx, edx */ 4417 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 4418 ecx = ecx & 3; /* 0x310087BA: and ecx, 3 */ 4419 _cf = 0; 4420 _flag_k = FK_TEST; 4421 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x310087BD: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 4422 PUSH32(esp, ebx); /* 0x310087BF: push ebx */ 4423 ecx = ebp + (-0x1C); /* 0x310087C0: lea ecx, [ebp - 0x1c] */ 4424 RECOMP_ICALL(MEM32(0x310480E8)); /* 0x310087C3: call dword ptr [0x310480e8] */ 4425 RECOMP_FLAGS_IN(); 4426 L_310087C9: 4427 PUSH32(esp, 1); /* 0x310087C9: push 1 */ 4428 PUSH32(esp, 0); /* 0x310087CB: push 0 */ 4429 eax = ebp + 0xB; /* 0x310087CD: lea eax, [ebp + 0xb] */ 4430 SET_LO8(ebx, 0x5Cu); /* 0x310087D0: mov bl, 0x5c */ 4431 PUSH32(esp, eax); /* 0x310087D2: push eax */ 4432 ecx = ebp + (-0x1C); /* 0x310087D3: lea ecx, [ebp - 0x1c] */ 4433 MEM32(ebp + (-0x4)) = 0; /* 0x310087D6: mov dword ptr [ebp - 4], 0 */ 4434 MEM8(ebp + 0xB) = (uint8_t)(LO8(ebx)); /* 0x310087DD: mov byte ptr [ebp + 0xb], bl */ 4435 RECOMP_ICALL(MEM32(0x310480AC)); /* 0x310087E0: call dword ptr [0x310480ac] */ 4436 RECOMP_FLAGS_IN(); 4437 esi = eax; /* 0x310087E6: mov esi, eax */ 4438 /* cmp esi, 0xFFFFFFFFu */ /* 0x310087E8: cmp esi, -1 */ 4439 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0xFFFFFFFFu); 4440 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4441 _flag_k = FK_CMP; 4442 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100882D; /* 0x310087EB: je 0x3100882d */ 4443 L_310087ED: 4444 /* cmp MEM32(ebp + (-0x14)), esi */ /* 0x310087ED: cmp dword ptr [ebp - 0x14], esi */ 4445 _flag_a = (uint32_t)(MEM32(ebp + (-0x14))); _flag_b = (uint32_t)(esi); 4446 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4447 _flag_k = FK_CMP; 4448 if (CMP_B(_flag_a, _flag_b)) goto L_3100880A; /* 0x310087F0: jb 0x3100880a */ 4449 L_310087F2: 4450 eax = MEM32(ebp + (-0x18)); /* 0x310087F2: mov eax, dword ptr [ebp - 0x18] */ 4451 /* test eax, eax */ /* 0x310087F5: test eax, eax */ 4452 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4453 _cf = 0; 4454 _flag_k = FK_TEST; 4455 if (TEST_Z(_flag_a, _flag_b)) goto L_3100880A; /* 0x310087F7: je 0x3100880a */ 4456 L_310087F9: 4457 ecx = ebp + (-0x1C); /* 0x310087F9: lea ecx, [ebp - 0x1c] */ 4458 RECOMP_ICALL(MEM32(0x310480E4)); /* 0x310087FC: call dword ptr [0x310480e4] */ 4459 RECOMP_FLAGS_IN(); 4460 ecx = MEM32(ebp + (-0x18)); /* 0x31008802: mov ecx, dword ptr [ebp - 0x18] */ 4461 eax = ecx + esi; /* 0x31008805: lea eax, [ecx + esi] */ 4462 goto L_3100880F; /* 0x31008808: jmp 0x3100880f */ 4463 L_3100880A: 4464 eax = MEM32(0x310480EC); /* 0x3100880A: mov eax, dword ptr [0x310480ec] */ 4465 L_3100880F: 4466 PUSH32(esp, 1); /* 0x3100880F: push 1 */ 4467 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 4468 esi = esi + 1; /* 0x31008811: inc esi */ 4469 _flag_k = FK_INC; 4470 PUSH32(esp, esi); /* 0x31008812: push esi */ 4471 edx = ebp + 0xB; /* 0x31008813: lea edx, [ebp + 0xb] */ 4472 MEM8(eax) = (uint8_t)(0x2Fu); /* 0x31008816: mov byte ptr [eax], 0x2f */ 4473 PUSH32(esp, edx); /* 0x31008819: push edx */ 4474 ecx = ebp + (-0x1C); /* 0x3100881A: lea ecx, [ebp - 0x1c] */ 4475 MEM8(ebp + 0xB) = (uint8_t)(LO8(ebx)); /* 0x3100881D: mov byte ptr [ebp + 0xb], bl */ 4476 RECOMP_ICALL(MEM32(0x310480AC)); /* 0x31008820: call dword ptr [0x310480ac] */ 4477 RECOMP_FLAGS_IN(); 4478 esi = eax; /* 0x31008826: mov esi, eax */ 4479 /* cmp esi, 0xFFFFFFFFu */ /* 0x31008828: cmp esi, -1 */ 4480 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0xFFFFFFFFu); 4481 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4482 _flag_k = FK_CMP; 4483 RECOMP_BACKEDGE(); 4484 if (CMP_NE(_flag_a, _flag_b)) goto L_310087ED; /* 0x3100882B: jne 0x310087ed */ 4485 L_3100882D: 4486 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 4487 ecx = ecx | 0xFFFFFFFFu; /* 0x3100882D: or ecx, 0xffffffff */ 4488 _cf = 0; 4489 _flag_k = FK_TEST; 4490 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4491 eax = 0; /* 0x31008830: xor eax, eax */ 4492 _cf = 0; 4493 _flag_k = FK_TEST; 4494 edi = ebp + (-0xB0); /* 0x31008832: lea edi, [ebp - 0xb0] */ 4495 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x31008838: repne scasb al, byte ptr es:[edi] */ 4496 ecx = ~ecx; /* 0x3100883A: not ecx */ 4497 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4498 ecx = ecx - 1; /* 0x3100883C: dec ecx */ 4499 _flag_k = FK_DEC; 4500 esi = ecx; /* 0x3100883D: mov esi, ecx */ 4501 RECOMP_ICALL(0x31009DF0u); /* 0x3100883F: call 0x31009df0 */ /* not lifted */ 4502 RECOMP_FLAGS_IN(); 4503 /* test LO8(eax), LO8(eax) */ /* 0x31008844: test al, al */ 4504 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4505 _cf = 0; 4506 _flag_k = FK_NARROW(FK_TEST, 24); 4507 if (TEST_Z(_flag_a, _flag_b)) goto L_3100886E; /* 0x31008846: je 0x3100886e */ 4508 L_31008848: 4509 eax = MEM32(ebp + (-0x18)); /* 0x31008848: mov eax, dword ptr [ebp - 0x18] */ 4510 /* test eax, eax */ /* 0x3100884B: test eax, eax */ 4511 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4512 _cf = 0; 4513 _flag_k = FK_TEST; 4514 if (TEST_NZ(_flag_a, _flag_b)) goto L_31008854; /* 0x3100884D: jne 0x31008854 */ 4515 L_3100884F: 4516 eax = MEM32(0x310480EC); /* 0x3100884F: mov eax, dword ptr [0x310480ec] */ 4517 L_31008854: 4518 PUSH32(esp, esi); /* 0x31008854: push esi */ 4519 ecx = ebp + (-0xB0); /* 0x31008855: lea ecx, [ebp - 0xb0] */ 4520 PUSH32(esp, ecx); /* 0x3100885B: push ecx */ 4521 PUSH32(esp, eax); /* 0x3100885C: push eax */ 4522 RECOMP_ICALL(MEM32(0x31048180)); /* 0x3100885D: call dword ptr [0x31048180] */ 4523 RECOMP_FLAGS_IN(); 4524 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 4525 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4526 esp = esp + 0xCu; /* 0x31008863: add esp, 0xc */ 4527 _flag_k = FK_ADD; 4528 /* test eax, eax */ /* 0x31008866: test eax, eax */ 4529 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4530 _cf = 0; 4531 _flag_k = FK_TEST; 4532 if (TEST_NZ(_flag_a, _flag_b)) goto L_3100886E; /* 0x31008868: jne 0x3100886e */ 4533 L_3100886A: 4534 SET_LO8(ebx, 1); /* 0x3100886A: mov bl, 1 */ 4535 goto L_31008870; /* 0x3100886C: jmp 0x31008870 */ 4536 L_3100886E: 4537 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 4538 SET_LO8(ebx, 0); /* 0x3100886E: xor bl, bl */ 4539 _cf = 0; 4540 _flag_k = FK_NARROW(FK_TEST, 24); 4541 L_31008870: 4542 edx = MEM32(ebp + (-0x14)); /* 0x31008870: mov edx, dword ptr [ebp - 0x14] */ 4543 /* test edx, edx */ /* 0x31008873: test edx, edx */ 4544 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 4545 _cf = 0; 4546 _flag_k = FK_TEST; 4547 if (TEST_Z(_flag_a, _flag_b)) goto L_310088FB; /* 0x31008875: je 0x310088fb */ 4548 L_3100887B: 4549 eax = MEM32(ebp + (-0x18)); /* 0x3100887B: mov eax, dword ptr [ebp - 0x18] */ 4550 /* test eax, eax */ /* 0x3100887E: test eax, eax */ 4551 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4552 _cf = 0; 4553 _flag_k = FK_TEST; 4554 if (TEST_Z(_flag_a, _flag_b)) goto L_310088AC; /* 0x31008880: je 0x310088ac */ 4555 L_31008882: 4556 SET_LO8(ecx, MEM8(eax + (-0x1))); /* 0x31008882: mov cl, byte ptr [eax - 1] */ 4557 /* test LO8(ecx), LO8(ecx) */ /* 0x31008885: test cl, cl */ 4558 _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24; 4559 _cf = 0; 4560 _flag_k = FK_NARROW(FK_TEST, 24); 4561 if (TEST_Z(_flag_a, _flag_b)) goto L_3100889D; /* 0x31008887: je 0x3100889d */ 4562 L_31008889: 4563 /* cmp LO8(ecx), 0xFFu */ /* 0x31008889: cmp cl, 0xff */ 4564 _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 4565 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4566 _flag_k = FK_NARROW(FK_CMP, 24); 4567 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100889D; /* 0x3100888C: je 0x3100889d */ 4568 L_3100888E: 4569 PUSH32(esp, 0); /* 0x3100888E: push 0 */ 4570 PUSH32(esp, edx); /* 0x31008890: push edx */ 4571 ecx = ebp + (-0x1C); /* 0x31008891: lea ecx, [ebp - 0x1c] */ 4572 RECOMP_ICALL(MEM32(0x31048070)); /* 0x31008894: call dword ptr [0x31048070] */ 4573 RECOMP_FLAGS_IN(); 4574 eax = MEM32(ebp + (-0x18)); /* 0x3100889A: mov eax, dword ptr [ebp - 0x18] */ 4575 L_3100889D: 4576 /* test eax, eax */ /* 0x3100889D: test eax, eax */ 4577 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4578 _cf = 0; 4579 _flag_k = FK_TEST; 4580 if (TEST_Z(_flag_a, _flag_b)) goto L_310088AC; /* 0x3100889F: je 0x310088ac */ 4581 L_310088A1: 4582 MEM8(eax + (-0x1)) = (uint8_t)(0xFFu); /* 0x310088A1: mov byte ptr [eax - 1], 0xff */ 4583 eax = MEM32(ebp + (-0x18)); /* 0x310088A5: mov eax, dword ptr [ebp - 0x18] */ 4584 /* test eax, eax */ /* 0x310088A8: test eax, eax */ 4585 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4586 _cf = 0; 4587 _flag_k = FK_TEST; 4588 if (TEST_NZ(_flag_a, _flag_b)) goto L_310088B0; /* 0x310088AA: jne 0x310088b0 */ 4589 L_310088AC: 4590 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4591 eax = 0; /* 0x310088AC: xor eax, eax */ 4592 _cf = 0; 4593 _flag_k = FK_TEST; 4594 goto L_310088B5; /* 0x310088AE: jmp 0x310088b5 */ 4595 L_310088B0: 4596 edx = MEM32(ebp + (-0x14)); /* 0x310088B0: mov edx, dword ptr [ebp - 0x14] */ 4597 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 4598 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4599 eax = eax + edx; /* 0x310088B3: add eax, edx */ 4600 _flag_k = FK_ADD; 4601 L_310088B5: 4602 /* cmp MEM8(eax + (-0x1)), 0x2Fu */ /* 0x310088B5: cmp byte ptr [eax - 1], 0x2f */ 4603 _flag_a = (uint32_t)(MEM8(eax + (-0x1))) << 24; _flag_b = (uint32_t)(0x2Fu) << 24; 4604 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4605 _flag_k = FK_NARROW(FK_CMP, 24); 4606 if (CMP_EQ(_flag_a, _flag_b)) goto L_310088FB; /* 0x310088B9: je 0x310088fb */ 4607 L_310088BB: 4608 eax = MEM32(0x310480F8); /* 0x310088BB: mov eax, dword ptr [0x310480f8] */ 4609 ecx = MEM32(eax); /* 0x310088C0: mov ecx, dword ptr [eax] */ 4610 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(ebp + (-0x14))); 4611 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4612 ecx = ecx - MEM32(ebp + (-0x14)); /* 0x310088C2: sub ecx, dword ptr [ebp - 0x14] */ 4613 _flag_k = FK_CMP; 4614 /* cmp ecx, 1 */ /* 0x310088C5: cmp ecx, 1 */ 4615 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4616 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4617 _flag_k = FK_CMP; 4618 if (CMP_A(_flag_a, _flag_b)) goto L_310088D0; /* 0x310088C8: ja 0x310088d0 */ 4619 L_310088CA: 4620 RECOMP_ICALL(MEM32(0x310480B0)); /* 0x310088CA: call dword ptr [0x310480b0] */ 4621 RECOMP_FLAGS_IN(); 4622 L_310088D0: 4623 edx = MEM32(ebp + (-0x14)); /* 0x310088D0: mov edx, dword ptr [ebp - 0x14] */ 4624 esi = edx + 0x1; /* 0x310088D3: lea esi, [edx + 1] */ 4625 PUSH32(esp, 0); /* 0x310088D6: push 0 */ 4626 PUSH32(esp, esi); /* 0x310088D8: push esi */ 4627 ecx = ebp + (-0x1C); /* 0x310088D9: lea ecx, [ebp - 0x1c] */ 4628 RECOMP_ICALL(MEM32(0x31048070)); /* 0x310088DC: call dword ptr [0x31048070] */ 4629 RECOMP_FLAGS_IN(); 4630 /* test LO8(eax), LO8(eax) */ /* 0x310088E2: test al, al */ 4631 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4632 _cf = 0; 4633 _flag_k = FK_NARROW(FK_TEST, 24); 4634 if (TEST_Z(_flag_a, _flag_b)) goto L_310088FB; /* 0x310088E4: je 0x310088fb */ 4635 L_310088E6: 4636 ecx = MEM32(ebp + (-0x14)); /* 0x310088E6: mov ecx, dword ptr [ebp - 0x14] */ 4637 eax = MEM32(ebp + (-0x18)); /* 0x310088E9: mov eax, dword ptr [ebp - 0x18] */ 4638 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 4639 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4640 eax = eax + ecx; /* 0x310088EC: add eax, ecx */ 4641 _flag_k = FK_ADD; 4642 PUSH32(esp, esi); /* 0x310088EE: push esi */ 4643 ecx = ebp + (-0x1C); /* 0x310088EF: lea ecx, [ebp - 0x1c] */ 4644 MEM8(eax) = (uint8_t)(0x2Fu); /* 0x310088F2: mov byte ptr [eax], 0x2f */ 4645 RECOMP_ICALL(MEM32(0x310480E8)); /* 0x310088F5: call dword ptr [0x310480e8] */ 4646 RECOMP_FLAGS_IN(); 4647 L_310088FB: 4648 /* test LO8(ebx), LO8(ebx) */ /* 0x310088FB: test bl, bl */ 4649 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 4650 _cf = 0; 4651 _flag_k = FK_NARROW(FK_TEST, 24); 4652 if (TEST_Z(_flag_a, _flag_b)) goto L_3100890E; /* 0x310088FD: je 0x3100890e */ 4653 L_310088FF: 4654 PUSH32(esp, 1); /* 0x310088FF: push 1 */ 4655 PUSH32(esp, 0x31052060u); /* 0x31008901: push 0x31052060 */ 4656 RECOMP_ICALL(0x310013E0u); /* 0x31008906: call 0x310013e0 */ /* not lifted */ 4657 RECOMP_FLAGS_IN(); 4658 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4659 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4660 esp = esp + 8; /* 0x3100890B: add esp, 8 */ 4661 _flag_k = FK_ADD; 4662 L_3100890E: 4663 edx = MEM32(ebp + 0xC); /* 0x3100890E: mov edx, dword ptr [ebp + 0xc] */ 4664 PUSH32(esp, edx); /* 0x31008911: push edx */ 4665 eax = ebp + (-0x1C); /* 0x31008912: lea eax, [ebp - 0x1c] */ 4666 PUSH32(esp, eax); /* 0x31008915: push eax */ 4667 RECOMP_ICALL(0x31009FA0u); /* 0x31008916: call 0x31009fa0 */ /* not lifted */ 4668 RECOMP_FLAGS_IN(); 4669 esi = eax; /* 0x3100891B: mov esi, eax */ 4670 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4671 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4672 esp = esp + 8; /* 0x3100891D: add esp, 8 */ 4673 _flag_k = FK_ADD; 4674 /* test esi, esi */ /* 0x31008920: test esi, esi */ 4675 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 4676 _cf = 0; 4677 _flag_k = FK_TEST; 4678 if (TEST_NZ(_flag_a, _flag_b)) goto L_310089E0; /* 0x31008922: jne 0x310089e0 */ 4679 L_31008928: 4680 PUSH32(esp, 0x30u); /* 0x31008928: push 0x30 */ 4681 RECOMP_ICALL(0x310468DAu); /* 0x3100892A: call 0x310468da */ /* not lifted */ 4682 RECOMP_FLAGS_IN(); 4683 esi = eax; /* 0x3100892F: mov esi, eax */ 4684 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4685 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4686 esp = esp + 4; /* 0x31008931: add esp, 4 */ 4687 _flag_k = FK_ADD; 4688 MEM32(ebp + 0x8) = esi; /* 0x31008934: mov dword ptr [ebp + 8], esi */ 4689 /* test esi, esi */ /* 0x31008937: test esi, esi */ 4690 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 4691 _cf = 0; 4692 _flag_k = FK_TEST; 4693 MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x31008939: mov byte ptr [ebp - 4], 1 */ 4694 if (TEST_Z(_flag_a, _flag_b)) goto L_310089C6; /* 0x3100893D: je 0x310089c6 */ 4695 L_31008943: 4696 SET_LO8(ecx, MEM8(ebp + 0xB)); /* 0x31008943: mov cl, byte ptr [ebp + 0xb] */ 4697 MEM8(ebp + (-0x30)) = (uint8_t)(LO8(ecx)); /* 0x31008946: mov byte ptr [ebp - 0x30], cl */ 4698 PUSH32(esp, 0); /* 0x31008949: push 0 */ 4699 ecx = ebp + (-0x30); /* 0x3100894B: lea ecx, [ebp - 0x30] */ 4700 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x3100894E: call dword ptr [0x310480d4] */ 4701 RECOMP_FLAGS_IN(); 4702 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 4703 ecx = ecx | 0xFFFFFFFFu; /* 0x31008954: or ecx, 0xffffffff */ 4704 _cf = 0; 4705 _flag_k = FK_TEST; 4706 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4707 eax = 0; /* 0x31008957: xor eax, eax */ 4708 _cf = 0; 4709 _flag_k = FK_TEST; 4710 edi = 0x31057D88u; /* 0x31008959: mov edi, 0x31057d88 */ 4711 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x3100895E: repne scasb al, byte ptr es:[edi] */ 4712 ecx = ~ecx; /* 0x31008960: not ecx */ 4713 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4714 ecx = ecx - 1; /* 0x31008962: dec ecx */ 4715 _flag_k = FK_DEC; 4716 ebx = ecx; /* 0x31008963: mov ebx, ecx */ 4717 PUSH32(esp, 1); /* 0x31008965: push 1 */ 4718 PUSH32(esp, ebx); /* 0x31008967: push ebx */ 4719 ecx = ebp + (-0x30); /* 0x31008968: lea ecx, [ebp - 0x30] */ 4720 RECOMP_ICALL(MEM32(0x31048070)); /* 0x3100896B: call dword ptr [0x31048070] */ 4721 RECOMP_FLAGS_IN(); 4722 /* test LO8(eax), LO8(eax) */ /* 0x31008971: test al, al */ 4723 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4724 _cf = 0; 4725 _flag_k = FK_NARROW(FK_TEST, 24); 4726 if (TEST_Z(_flag_a, _flag_b)) goto L_3100899A; /* 0x31008973: je 0x3100899a */ 4727 L_31008975: 4728 edi = MEM32(ebp + (-0x2C)); /* 0x31008975: mov edi, dword ptr [ebp - 0x2c] */ 4729 ecx = ebx; /* 0x31008978: mov ecx, ebx */ 4730 edx = ecx; /* 0x3100897A: mov edx, ecx */ 4731 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x3100897C: shr ecx, 2 */ 4732 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 4733 ecx = ecx >> 2u; /* 0x3100897C: shr ecx, 2 */ 4734 esi = 0x31057D88u; /* 0x3100897F: mov esi, 0x31057d88 */ 4735 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31008984: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 4736 ecx = edx; /* 0x31008986: mov ecx, edx */ 4737 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 4738 ecx = ecx & 3; /* 0x31008988: and ecx, 3 */ 4739 _cf = 0; 4740 _flag_k = FK_TEST; 4741 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x3100898B: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 4742 eax = MEM32(ebp + (-0x2C)); /* 0x3100898D: mov eax, dword ptr [ebp - 0x2c] */ 4743 esi = MEM32(ebp + 0x8); /* 0x31008990: mov esi, dword ptr [ebp + 8] */ 4744 MEM32(ebp + (-0x28)) = ebx; /* 0x31008993: mov dword ptr [ebp - 0x28], ebx */ 4745 MEM8(ebx + eax) = (uint8_t)(0); /* 0x31008996: mov byte ptr [ebx + eax], 0 */ 4746 L_3100899A: 4747 MEM32(ebp + (-0x20)) = 1; /* 0x3100899A: mov dword ptr [ebp - 0x20], 1 */ 4748 ecx = ebp + (-0x30); /* 0x310089A1: lea ecx, [ebp - 0x30] */ 4749 PUSH32(esp, ecx); /* 0x310089A4: push ecx */ 4750 ecx = esi; /* 0x310089A5: mov ecx, esi */ 4751 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x310089A7: mov byte ptr [ebp - 4], 2 */ 4752 RECOMP_ICALL(0x31008C90u); /* 0x310089AB: call 0x31008c90 */ /* not lifted */ 4753 RECOMP_FLAGS_IN(); 4754 ecx = esi; /* 0x310089B0: mov ecx, esi */ 4755 MEM32(ebp + (-0x4)) = 3; /* 0x310089B2: mov dword ptr [ebp - 4], 3 */ 4756 MEM32(esi) = 0x31048518u; /* 0x310089B9: mov dword ptr [esi], 0x31048518 */ 4757 RECOMP_ICALL(0x31008F90u); /* 0x310089BF: call 0x31008f90 */ /* not lifted */ 4758 RECOMP_FLAGS_IN(); 4759 goto L_310089C8; /* 0x310089C4: jmp 0x310089c8 */ 4760 L_310089C6: 4761 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4762 esi = 0; /* 0x310089C6: xor esi, esi */ 4763 _cf = 0; 4764 _flag_k = FK_TEST; 4765 L_310089C8: 4766 /* test MEM8(ebp + (-0x20)), 1 */ /* 0x310089C8: test byte ptr [ebp - 0x20], 1 */ 4767 _flag_a = (uint32_t)(MEM8(ebp + (-0x20))) << 24; _flag_b = (uint32_t)(1) << 24; 4768 _cf = 0; 4769 _flag_k = FK_NARROW(FK_TEST, 24); 4770 MEM32(ebp + (-0x4)) = 0; /* 0x310089CC: mov dword ptr [ebp - 4], 0 */ 4771 if (TEST_Z(_flag_a, _flag_b)) goto L_310089E0; /* 0x310089D3: je 0x310089e0 */ 4772 L_310089D5: 4773 PUSH32(esp, 1); /* 0x310089D5: push 1 */ 4774 ecx = ebp + (-0x30); /* 0x310089D7: lea ecx, [ebp - 0x30] */ 4775 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x310089DA: call dword ptr [0x310480d4] */ 4776 RECOMP_FLAGS_IN(); 4777 L_310089E0: 4778 ecx = MEM32(ebp + (-0x18)); /* 0x310089E0: mov ecx, dword ptr [ebp - 0x18] */ 4779 /* test ecx, ecx */ /* 0x310089E3: test ecx, ecx */ 4780 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 4781 _cf = 0; 4782 _flag_k = FK_TEST; 4783 if (TEST_Z(_flag_a, _flag_b)) goto L_31008A14; /* 0x310089E5: je 0x31008a14 */ 4784 L_310089E7: 4785 SET_LO8(eax, MEM8(ecx + (-0x1))); /* 0x310089E7: mov al, byte ptr [ecx - 1] */ 4786 /* test LO8(eax), LO8(eax) */ /* 0x310089EA: test al, al */ 4787 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4788 _cf = 0; 4789 _flag_k = FK_NARROW(FK_TEST, 24); 4790 if (TEST_Z(_flag_a, _flag_b)) goto L_31008A0A; /* 0x310089EC: je 0x31008a0a */ 4791 L_310089EE: 4792 /* cmp LO8(eax), 0xFFu */ /* 0x310089EE: cmp al, 0xff */ 4793 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 4794 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4795 _flag_k = FK_NARROW(FK_CMP, 24); 4796 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008A0A; /* 0x310089F0: je 0x31008a0a */ 4797 L_310089F2: 4798 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 4799 SET_LO8(eax, LO8(eax) - 1); /* 0x310089F2: dec al */ 4800 _flag_k = FK_NARROW(FK_DEC, 24); 4801 edi = POP32_VAL(esp); /* 0x310089F4: pop edi */ 4802 MEM8(ecx + (-0x1)) = (uint8_t)(LO8(eax)); /* 0x310089F5: mov byte ptr [ecx - 1], al */ 4803 eax = esi; /* 0x310089F8: mov eax, esi */ 4804 esi = POP32_VAL(esp); /* 0x310089FA: pop esi */ 4805 ebx = POP32_VAL(esp); /* 0x310089FB: pop ebx */ 4806 ecx = MEM32(ebp + (-0xC)); /* 0x310089FC: mov ecx, dword ptr [ebp - 0xc] */ 4807 MEM32(FS_BASE + (0)) = ecx; /* 0x310089FF: mov dword ptr fs:[0], ecx */ 4808 esp = ebp; /* 0x31008A06: mov esp, ebp */ 4809 ebp = POP32_VAL(esp); /* 0x31008A08: pop ebp */ 4810 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31008A09: ret */ 4811 L_31008A0A: 4812 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4813 ecx = ecx - 1; /* 0x31008A0A: dec ecx */ 4814 _flag_k = FK_DEC; 4815 PUSH32(esp, ecx); /* 0x31008A0B: push ecx */ 4816 RECOMP_ICALL(0x31046858u); /* 0x31008A0C: call 0x31046858 */ /* not lifted */ 4817 RECOMP_FLAGS_IN(); 4818 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4819 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4820 esp = esp + 4; /* 0x31008A11: add esp, 4 */ 4821 _flag_k = FK_ADD; 4822 L_31008A14: 4823 ecx = MEM32(ebp + (-0xC)); /* 0x31008A14: mov ecx, dword ptr [ebp - 0xc] */ 4824 edi = POP32_VAL(esp); /* 0x31008A17: pop edi */ 4825 eax = esi; /* 0x31008A18: mov eax, esi */ 4826 esi = POP32_VAL(esp); /* 0x31008A1A: pop esi */ 4827 ebx = POP32_VAL(esp); /* 0x31008A1B: pop ebx */ 4828 MEM32(FS_BASE + (0)) = ecx; /* 0x31008A1C: mov dword ptr fs:[0], ecx */ 4829 esp = ebp; /* 0x31008A23: mov esp, ebp */ 4830 ebp = POP32_VAL(esp); /* 0x31008A25: pop ebp */ 4831 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31008A26: ret */ 4832 RECOMP_REGS_OUT(); 4833 } 4834 4835 void sub_31008A30(void) { 4836 int _fpu_cmp = 0; 4837 uint32_t _cf = 0; 4838 int _df = 1; 4839 uint32_t _flag_k = FK_NONE; 4840 uint32_t _flag_a = 0, _flag_b = 0; 4841 uint32_t _itail_tgt = 0; 4842 RECOMP_REGS_LOCALS 4843 RECOMP_ENTER(0x31008A30u); 4844 4845 L_31008A30: 4846 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4847 eax = 0; /* 0x31008A30: xor eax, eax */ 4848 _cf = 0; 4849 _flag_k = FK_TEST; 4850 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31008A32: ret */ 4851 RECOMP_REGS_OUT(); 4852 } 4853 4854 void sub_31008A40(void) { 4855 int _fpu_cmp = 0; 4856 uint32_t _cf = 0; 4857 int _df = 1; 4858 uint32_t _flag_k = FK_NONE; 4859 uint32_t _flag_a = 0, _flag_b = 0; 4860 uint32_t _itail_tgt = 0; 4861 RECOMP_REGS_LOCALS 4862 RECOMP_ENTER(0x31008A40u); 4863 4864 L_31008A40: 4865 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 4866 SET_LO8(eax, 0); /* 0x31008A40: xor al, al */ 4867 _cf = 0; 4868 _flag_k = FK_NARROW(FK_TEST, 24); 4869 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31008A42: ret 4 */ 4870 RECOMP_REGS_OUT(); 4871 } 4872 4873 void sub_31008A50(void) { 4874 int _fpu_cmp = 0; 4875 uint32_t _cf = 0; 4876 int _df = 1; 4877 uint32_t _flag_k = FK_NONE; 4878 uint32_t _flag_a = 0, _flag_b = 0; 4879 uint32_t _itail_tgt = 0; 4880 RECOMP_REGS_LOCALS 4881 RECOMP_ENTER(0x31008A50u); 4882 4883 L_31008A50: 4884 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31008A50: ret 4 */ 4885 RECOMP_REGS_OUT(); 4886 } 4887 4888 void sub_31008A60(void) { 4889 int _fpu_cmp = 0; 4890 uint32_t _cf = 0; 4891 int _df = 1; 4892 uint32_t _flag_k = FK_NONE; 4893 uint32_t _flag_a = 0, _flag_b = 0; 4894 uint32_t _itail_tgt = 0; 4895 RECOMP_REGS_LOCALS 4896 RECOMP_ENTER(0x31008A60u); 4897 4898 L_31008A60: 4899 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4900 eax = 0; /* 0x31008A60: xor eax, eax */ 4901 _cf = 0; 4902 _flag_k = FK_TEST; 4903 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31008A62: ret 4 */ 4904 RECOMP_REGS_OUT(); 4905 } 4906 4907 void sub_31008A70(void) { 4908 int _fpu_cmp = 0; 4909 uint32_t _cf = 0; 4910 int _df = 1; 4911 uint32_t _flag_k = FK_NONE; 4912 uint32_t _flag_a = 0, _flag_b = 0; 4913 uint32_t _itail_tgt = 0; 4914 RECOMP_REGS_LOCALS 4915 RECOMP_ENTER(0x31008A70u); 4916 4917 L_31008A70: 4918 eax = 1; /* 0x31008A70: mov eax, 1 */ 4919 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31008A75: ret 8 */ 4920 RECOMP_REGS_OUT(); 4921 } 4922 4923 void sub_31008A80(void) { 4924 int _fpu_cmp = 0; 4925 uint32_t _cf = 0; 4926 int _df = 1; 4927 uint32_t _flag_k = FK_NONE; 4928 uint32_t _flag_a = 0, _flag_b = 0; 4929 uint32_t _itail_tgt = 0; 4930 RECOMP_REGS_LOCALS 4931 RECOMP_ENTER(0x31008A80u); 4932 4933 L_31008A80: 4934 eax = 1; /* 0x31008A80: mov eax, 1 */ 4935 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31008A85: ret 4 */ 4936 RECOMP_REGS_OUT(); 4937 } 4938 4939 void sub_31008A90(void) { 4940 int _fpu_cmp = 0; 4941 uint32_t _cf = 0; 4942 int _df = 1; 4943 uint32_t _flag_k = FK_NONE; 4944 uint32_t _flag_a = 0, _flag_b = 0; 4945 uint32_t _itail_tgt = 0; 4946 RECOMP_REGS_LOCALS 4947 RECOMP_ENTER(0x31008A90u); 4948 4949 L_31008A90: 4950 PUSH32(esp, ebp); /* 0x31008A90: push ebp */ 4951 ebp = esp; /* 0x31008A91: mov ebp, esp */ 4952 PUSH32(esp, ecx); /* 0x31008A93: push ecx */ 4953 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x31008A94: mov al, byte ptr [ebp + 0xb] */ 4954 PUSH32(esp, ebx); /* 0x31008A97: push ebx */ 4955 ebx = MEM32(ebp + 0x8); /* 0x31008A98: mov ebx, dword ptr [ebp + 8] */ 4956 PUSH32(esp, esi); /* 0x31008A9B: push esi */ 4957 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4958 esi = 0; /* 0x31008A9C: xor esi, esi */ 4959 _cf = 0; 4960 _flag_k = FK_TEST; 4961 PUSH32(esp, edi); /* 0x31008A9E: push edi */ 4962 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 4963 ecx = ecx | 0xFFFFFFFFu; /* 0x31008A9F: or ecx, 0xffffffff */ 4964 _cf = 0; 4965 _flag_k = FK_TEST; 4966 MEM8(ebx) = (uint8_t)(LO8(eax)); /* 0x31008AA2: mov byte ptr [ebx], al */ 4967 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4968 eax = 0; /* 0x31008AA4: xor eax, eax */ 4969 _cf = 0; 4970 _flag_k = FK_TEST; 4971 edi = 0x31057D88u; /* 0x31008AA6: mov edi, 0x31057d88 */ 4972 MEM32(ebx + 0x4) = esi; /* 0x31008AAB: mov dword ptr [ebx + 4], esi */ 4973 MEM32(ebx + 0x8) = esi; /* 0x31008AAE: mov dword ptr [ebx + 8], esi */ 4974 MEM32(ebx + 0xC) = esi; /* 0x31008AB1: mov dword ptr [ebx + 0xc], esi */ 4975 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x31008AB4: repne scasb al, byte ptr es:[edi] */ 4976 ecx = ~ecx; /* 0x31008AB6: not ecx */ 4977 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4978 ecx = ecx - 1; /* 0x31008AB8: dec ecx */ 4979 _flag_k = FK_DEC; 4980 edi = ecx; /* 0x31008AB9: mov edi, ecx */ 4981 /* cmp edi, 0xFFFFFFFDu */ /* 0x31008ABB: cmp edi, -3 */ 4982 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFDu); 4983 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4984 _flag_k = FK_CMP; 4985 MEM32(ebp + (-0x4)) = esi; /* 0x31008ABE: mov dword ptr [ebp - 4], esi */ 4986 MEM32(ebp + 0x8) = edi; /* 0x31008AC1: mov dword ptr [ebp + 8], edi */ 4987 if (CMP_BE(_flag_a, _flag_b)) goto L_31008ACC; /* 0x31008AC4: jbe 0x31008acc */ 4988 L_31008AC6: 4989 RECOMP_ICALL(MEM32(0x310480B0)); /* 0x31008AC6: call dword ptr [0x310480b0] */ 4990 RECOMP_FLAGS_IN(); 4991 L_31008ACC: 4992 eax = MEM32(ebx + 0x4); /* 0x31008ACC: mov eax, dword ptr [ebx + 4] */ 4993 /* cmp eax, esi */ /* 0x31008ACF: cmp eax, esi */ 4994 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 4995 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4996 _flag_k = FK_CMP; 4997 MEM32(ebx + 0x8) = esi; /* 0x31008AD1: mov dword ptr [ebx + 8], esi */ 4998 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008AFA; /* 0x31008AD4: je 0x31008afa */ 4999 L_31008AD6: 5000 SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x31008AD6: mov al, byte ptr [eax - 1] */ 5001 /* test LO8(eax), LO8(eax) */ /* 0x31008AD9: test al, al */ 5002 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5003 _cf = 0; 5004 _flag_k = FK_NARROW(FK_TEST, 24); 5005 if (TEST_Z(_flag_a, _flag_b)) goto L_31008AFA; /* 0x31008ADB: je 0x31008afa */ 5006 L_31008ADD: 5007 /* cmp LO8(eax), 0xFFu */ /* 0x31008ADD: cmp al, 0xff */ 5008 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 5009 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5010 _flag_k = FK_NARROW(FK_CMP, 24); 5011 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008AFA; /* 0x31008ADF: je 0x31008afa */ 5012 L_31008AE1: 5013 /* cmp edi, esi */ /* 0x31008AE1: cmp edi, esi */ 5014 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 5015 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5016 _flag_k = FK_CMP; 5017 if (CMP_NE(_flag_a, _flag_b)) goto L_31008B29; /* 0x31008AE3: jne 0x31008b29 */ 5018 L_31008AE5: 5019 PUSH32(esp, 1); /* 0x31008AE5: push 1 */ 5020 ecx = ebx; /* 0x31008AE7: mov ecx, ebx */ 5021 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31008AE9: call dword ptr [0x310480d4] */ 5022 RECOMP_FLAGS_IN(); 5023 edi = POP32_VAL(esp); /* 0x31008AEF: pop edi */ 5024 esi = POP32_VAL(esp); /* 0x31008AF0: pop esi */ 5025 eax = ebx; /* 0x31008AF1: mov eax, ebx */ 5026 ebx = POP32_VAL(esp); /* 0x31008AF3: pop ebx */ 5027 esp = ebp; /* 0x31008AF4: mov esp, ebp */ 5028 ebp = POP32_VAL(esp); /* 0x31008AF6: pop ebp */ 5029 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31008AF7: ret 8 */ 5030 L_31008AFA: 5031 /* cmp edi, esi */ /* 0x31008AFA: cmp edi, esi */ 5032 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 5033 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5034 _flag_k = FK_CMP; 5035 if (CMP_NE(_flag_a, _flag_b)) goto L_31008B13; /* 0x31008AFC: jne 0x31008b13 */ 5036 L_31008AFE: 5037 PUSH32(esp, 1); /* 0x31008AFE: push 1 */ 5038 ecx = ebx; /* 0x31008B00: mov ecx, ebx */ 5039 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31008B02: call dword ptr [0x310480d4] */ 5040 RECOMP_FLAGS_IN(); 5041 edi = POP32_VAL(esp); /* 0x31008B08: pop edi */ 5042 esi = POP32_VAL(esp); /* 0x31008B09: pop esi */ 5043 eax = ebx; /* 0x31008B0A: mov eax, ebx */ 5044 ebx = POP32_VAL(esp); /* 0x31008B0C: pop ebx */ 5045 esp = ebp; /* 0x31008B0D: mov esp, ebp */ 5046 ebp = POP32_VAL(esp); /* 0x31008B0F: pop ebp */ 5047 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31008B10: ret 8 */ 5048 L_31008B13: 5049 eax = MEM32(ebx + 0xC); /* 0x31008B13: mov eax, dword ptr [ebx + 0xc] */ 5050 /* cmp eax, 0x1Fu */ /* 0x31008B16: cmp eax, 0x1f */ 5051 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x1Fu); 5052 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5053 _flag_k = FK_CMP; 5054 if (CMP_A(_flag_a, _flag_b)) goto L_31008B1F; /* 0x31008B19: ja 0x31008b1f */ 5055 L_31008B1B: 5056 /* cmp eax, edi */ /* 0x31008B1B: cmp eax, edi */ 5057 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 5058 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5059 _flag_k = FK_CMP; 5060 if (CMP_AE(_flag_a, _flag_b)) goto L_31008B32; /* 0x31008B1D: jae 0x31008b32 */ 5061 L_31008B1F: 5062 PUSH32(esp, 1); /* 0x31008B1F: push 1 */ 5063 ecx = ebx; /* 0x31008B21: mov ecx, ebx */ 5064 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31008B23: call dword ptr [0x310480d4] */ 5065 RECOMP_FLAGS_IN(); 5066 L_31008B29: 5067 PUSH32(esp, edi); /* 0x31008B29: push edi */ 5068 ecx = ebx; /* 0x31008B2A: mov ecx, ebx */ 5069 RECOMP_ICALL(MEM32(0x310480A8)); /* 0x31008B2C: call dword ptr [0x310480a8] */ 5070 RECOMP_FLAGS_IN(); 5071 L_31008B32: 5072 eax = MEM32(ebp + 0x8); /* 0x31008B32: mov eax, dword ptr [ebp + 8] */ 5073 ecx = edi; /* 0x31008B35: mov ecx, edi */ 5074 edi = MEM32(ebx + 0x4); /* 0x31008B37: mov edi, dword ptr [ebx + 4] */ 5075 edx = ecx; /* 0x31008B3A: mov edx, ecx */ 5076 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x31008B3C: shr ecx, 2 */ 5077 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 5078 ecx = ecx >> 2u; /* 0x31008B3C: shr ecx, 2 */ 5079 esi = 0x31057D88u; /* 0x31008B3F: mov esi, 0x31057d88 */ 5080 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31008B44: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 5081 ecx = edx; /* 0x31008B46: mov ecx, edx */ 5082 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 5083 ecx = ecx & 3; /* 0x31008B48: and ecx, 3 */ 5084 _cf = 0; 5085 _flag_k = FK_TEST; 5086 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x31008B4B: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 5087 ecx = MEM32(ebx + 0x4); /* 0x31008B4D: mov ecx, dword ptr [ebx + 4] */ 5088 MEM32(ebx + 0x8) = eax; /* 0x31008B50: mov dword ptr [ebx + 8], eax */ 5089 edi = POP32_VAL(esp); /* 0x31008B53: pop edi */ 5090 MEM8(ecx + eax) = (uint8_t)(0); /* 0x31008B54: mov byte ptr [ecx + eax], 0 */ 5091 esi = POP32_VAL(esp); /* 0x31008B58: pop esi */ 5092 eax = ebx; /* 0x31008B59: mov eax, ebx */ 5093 ebx = POP32_VAL(esp); /* 0x31008B5B: pop ebx */ 5094 esp = ebp; /* 0x31008B5C: mov esp, ebp */ 5095 ebp = POP32_VAL(esp); /* 0x31008B5E: pop ebp */ 5096 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31008B5F: ret 8 */ 5097 RECOMP_REGS_OUT(); 5098 } 5099 5100 void sub_31008B70(void) { 5101 int _fpu_cmp = 0; 5102 uint32_t _cf = 0; 5103 int _df = 1; 5104 uint32_t _flag_k = FK_NONE; 5105 uint32_t _flag_a = 0, _flag_b = 0; 5106 uint32_t _itail_tgt = 0; 5107 RECOMP_REGS_LOCALS 5108 RECOMP_ENTER(0x31008B70u); 5109 5110 L_31008B70: 5111 PUSH32(esp, ebp); /* 0x31008B70: push ebp */ 5112 ebp = esp; /* 0x31008B71: mov ebp, esp */ 5113 PUSH32(esp, ecx); /* 0x31008B73: push ecx */ 5114 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x31008B74: mov al, byte ptr [ebp + 0xb] */ 5115 PUSH32(esp, ebx); /* 0x31008B77: push ebx */ 5116 ebx = MEM32(ebp + 0x8); /* 0x31008B78: mov ebx, dword ptr [ebp + 8] */ 5117 PUSH32(esp, esi); /* 0x31008B7B: push esi */ 5118 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5119 esi = 0; /* 0x31008B7C: xor esi, esi */ 5120 _cf = 0; 5121 _flag_k = FK_TEST; 5122 PUSH32(esp, edi); /* 0x31008B7E: push edi */ 5123 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 5124 ecx = ecx | 0xFFFFFFFFu; /* 0x31008B7F: or ecx, 0xffffffff */ 5125 _cf = 0; 5126 _flag_k = FK_TEST; 5127 MEM8(ebx) = (uint8_t)(LO8(eax)); /* 0x31008B82: mov byte ptr [ebx], al */ 5128 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5129 eax = 0; /* 0x31008B84: xor eax, eax */ 5130 _cf = 0; 5131 _flag_k = FK_TEST; 5132 edi = 0x31057D88u; /* 0x31008B86: mov edi, 0x31057d88 */ 5133 MEM32(ebx + 0x4) = esi; /* 0x31008B8B: mov dword ptr [ebx + 4], esi */ 5134 MEM32(ebx + 0x8) = esi; /* 0x31008B8E: mov dword ptr [ebx + 8], esi */ 5135 MEM32(ebx + 0xC) = esi; /* 0x31008B91: mov dword ptr [ebx + 0xc], esi */ 5136 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x31008B94: repne scasb al, byte ptr es:[edi] */ 5137 ecx = ~ecx; /* 0x31008B96: not ecx */ 5138 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 5139 ecx = ecx - 1; /* 0x31008B98: dec ecx */ 5140 _flag_k = FK_DEC; 5141 edi = ecx; /* 0x31008B99: mov edi, ecx */ 5142 /* cmp edi, 0xFFFFFFFDu */ /* 0x31008B9B: cmp edi, -3 */ 5143 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFDu); 5144 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5145 _flag_k = FK_CMP; 5146 MEM32(ebp + (-0x4)) = esi; /* 0x31008B9E: mov dword ptr [ebp - 4], esi */ 5147 MEM32(ebp + 0x8) = edi; /* 0x31008BA1: mov dword ptr [ebp + 8], edi */ 5148 if (CMP_BE(_flag_a, _flag_b)) goto L_31008BAC; /* 0x31008BA4: jbe 0x31008bac */ 5149 L_31008BA6: 5150 RECOMP_ICALL(MEM32(0x310480B0)); /* 0x31008BA6: call dword ptr [0x310480b0] */ 5151 RECOMP_FLAGS_IN(); 5152 L_31008BAC: 5153 eax = MEM32(ebx + 0x4); /* 0x31008BAC: mov eax, dword ptr [ebx + 4] */ 5154 /* cmp eax, esi */ /* 0x31008BAF: cmp eax, esi */ 5155 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 5156 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5157 _flag_k = FK_CMP; 5158 MEM32(ebx + 0x8) = esi; /* 0x31008BB1: mov dword ptr [ebx + 8], esi */ 5159 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008BDA; /* 0x31008BB4: je 0x31008bda */ 5160 L_31008BB6: 5161 SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x31008BB6: mov al, byte ptr [eax - 1] */ 5162 /* test LO8(eax), LO8(eax) */ /* 0x31008BB9: test al, al */ 5163 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5164 _cf = 0; 5165 _flag_k = FK_NARROW(FK_TEST, 24); 5166 if (TEST_Z(_flag_a, _flag_b)) goto L_31008BDA; /* 0x31008BBB: je 0x31008bda */ 5167 L_31008BBD: 5168 /* cmp LO8(eax), 0xFFu */ /* 0x31008BBD: cmp al, 0xff */ 5169 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 5170 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5171 _flag_k = FK_NARROW(FK_CMP, 24); 5172 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008BDA; /* 0x31008BBF: je 0x31008bda */ 5173 L_31008BC1: 5174 /* cmp edi, esi */ /* 0x31008BC1: cmp edi, esi */ 5175 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 5176 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5177 _flag_k = FK_CMP; 5178 if (CMP_NE(_flag_a, _flag_b)) goto L_31008C09; /* 0x31008BC3: jne 0x31008c09 */ 5179 L_31008BC5: 5180 PUSH32(esp, 1); /* 0x31008BC5: push 1 */ 5181 ecx = ebx; /* 0x31008BC7: mov ecx, ebx */ 5182 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31008BC9: call dword ptr [0x310480d4] */ 5183 RECOMP_FLAGS_IN(); 5184 edi = POP32_VAL(esp); /* 0x31008BCF: pop edi */ 5185 esi = POP32_VAL(esp); /* 0x31008BD0: pop esi */ 5186 eax = ebx; /* 0x31008BD1: mov eax, ebx */ 5187 ebx = POP32_VAL(esp); /* 0x31008BD3: pop ebx */ 5188 esp = ebp; /* 0x31008BD4: mov esp, ebp */ 5189 ebp = POP32_VAL(esp); /* 0x31008BD6: pop ebp */ 5190 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31008BD7: ret 4 */ 5191 L_31008BDA: 5192 /* cmp edi, esi */ /* 0x31008BDA: cmp edi, esi */ 5193 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 5194 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5195 _flag_k = FK_CMP; 5196 if (CMP_NE(_flag_a, _flag_b)) goto L_31008BF3; /* 0x31008BDC: jne 0x31008bf3 */ 5197 L_31008BDE: 5198 PUSH32(esp, 1); /* 0x31008BDE: push 1 */ 5199 ecx = ebx; /* 0x31008BE0: mov ecx, ebx */ 5200 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31008BE2: call dword ptr [0x310480d4] */ 5201 RECOMP_FLAGS_IN(); 5202 edi = POP32_VAL(esp); /* 0x31008BE8: pop edi */ 5203 esi = POP32_VAL(esp); /* 0x31008BE9: pop esi */ 5204 eax = ebx; /* 0x31008BEA: mov eax, ebx */ 5205 ebx = POP32_VAL(esp); /* 0x31008BEC: pop ebx */ 5206 esp = ebp; /* 0x31008BED: mov esp, ebp */ 5207 ebp = POP32_VAL(esp); /* 0x31008BEF: pop ebp */ 5208 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31008BF0: ret 4 */ 5209 L_31008BF3: 5210 eax = MEM32(ebx + 0xC); /* 0x31008BF3: mov eax, dword ptr [ebx + 0xc] */ 5211 /* cmp eax, 0x1Fu */ /* 0x31008BF6: cmp eax, 0x1f */ 5212 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x1Fu); 5213 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5214 _flag_k = FK_CMP; 5215 if (CMP_A(_flag_a, _flag_b)) goto L_31008BFF; /* 0x31008BF9: ja 0x31008bff */ 5216 L_31008BFB: 5217 /* cmp eax, edi */ /* 0x31008BFB: cmp eax, edi */ 5218 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 5219 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5220 _flag_k = FK_CMP; 5221 if (CMP_AE(_flag_a, _flag_b)) goto L_31008C12; /* 0x31008BFD: jae 0x31008c12 */ 5222 L_31008BFF: 5223 PUSH32(esp, 1); /* 0x31008BFF: push 1 */ 5224 ecx = ebx; /* 0x31008C01: mov ecx, ebx */ 5225 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31008C03: call dword ptr [0x310480d4] */ 5226 RECOMP_FLAGS_IN(); 5227 L_31008C09: 5228 PUSH32(esp, edi); /* 0x31008C09: push edi */ 5229 ecx = ebx; /* 0x31008C0A: mov ecx, ebx */ 5230 RECOMP_ICALL(MEM32(0x310480A8)); /* 0x31008C0C: call dword ptr [0x310480a8] */ 5231 RECOMP_FLAGS_IN(); 5232 L_31008C12: 5233 eax = MEM32(ebp + 0x8); /* 0x31008C12: mov eax, dword ptr [ebp + 8] */ 5234 ecx = edi; /* 0x31008C15: mov ecx, edi */ 5235 edi = MEM32(ebx + 0x4); /* 0x31008C17: mov edi, dword ptr [ebx + 4] */ 5236 edx = ecx; /* 0x31008C1A: mov edx, ecx */ 5237 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x31008C1C: shr ecx, 2 */ 5238 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 5239 ecx = ecx >> 2u; /* 0x31008C1C: shr ecx, 2 */ 5240 esi = 0x31057D88u; /* 0x31008C1F: mov esi, 0x31057d88 */ 5241 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31008C24: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 5242 ecx = edx; /* 0x31008C26: mov ecx, edx */ 5243 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 5244 ecx = ecx & 3; /* 0x31008C28: and ecx, 3 */ 5245 _cf = 0; 5246 _flag_k = FK_TEST; 5247 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x31008C2B: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 5248 ecx = MEM32(ebx + 0x4); /* 0x31008C2D: mov ecx, dword ptr [ebx + 4] */ 5249 MEM32(ebx + 0x8) = eax; /* 0x31008C30: mov dword ptr [ebx + 8], eax */ 5250 edi = POP32_VAL(esp); /* 0x31008C33: pop edi */ 5251 MEM8(ecx + eax) = (uint8_t)(0); /* 0x31008C34: mov byte ptr [ecx + eax], 0 */ 5252 esi = POP32_VAL(esp); /* 0x31008C38: pop esi */ 5253 eax = ebx; /* 0x31008C39: mov eax, ebx */ 5254 ebx = POP32_VAL(esp); /* 0x31008C3B: pop ebx */ 5255 esp = ebp; /* 0x31008C3C: mov esp, ebp */ 5256 ebp = POP32_VAL(esp); /* 0x31008C3E: pop ebp */ 5257 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31008C3F: ret 4 */ 5258 RECOMP_REGS_OUT(); 5259 } 5260 5261 void sub_31008C50(void) { 5262 int _fpu_cmp = 0; 5263 uint32_t _cf = 0; 5264 int _df = 1; 5265 uint32_t _flag_k = FK_NONE; 5266 uint32_t _flag_a = 0, _flag_b = 0; 5267 uint32_t _itail_tgt = 0; 5268 RECOMP_REGS_LOCALS 5269 RECOMP_ENTER(0x31008C50u); 5270 5271 L_31008C50: 5272 PUSH32(esp, ebp); /* 0x31008C50: push ebp */ 5273 ebp = esp; /* 0x31008C51: mov ebp, esp */ 5274 PUSH32(esp, esi); /* 0x31008C53: push esi */ 5275 esi = ecx; /* 0x31008C54: mov esi, ecx */ 5276 RECOMP_ICALL(0x31008C80u); /* 0x31008C56: call 0x31008c80 */ /* not lifted */ 5277 RECOMP_FLAGS_IN(); 5278 /* test MEM8(ebp + 0x8), 1 */ /* 0x31008C5B: test byte ptr [ebp + 8], 1 */ 5279 _flag_a = (uint32_t)(MEM8(ebp + 0x8)) << 24; _flag_b = (uint32_t)(1) << 24; 5280 _cf = 0; 5281 _flag_k = FK_NARROW(FK_TEST, 24); 5282 if (TEST_Z(_flag_a, _flag_b)) goto L_31008C6A; /* 0x31008C5F: je 0x31008c6a */ 5283 L_31008C61: 5284 PUSH32(esp, esi); /* 0x31008C61: push esi */ 5285 RECOMP_ICALL(0x31046858u); /* 0x31008C62: call 0x31046858 */ /* not lifted */ 5286 RECOMP_FLAGS_IN(); 5287 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5288 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5289 esp = esp + 4; /* 0x31008C67: add esp, 4 */ 5290 _flag_k = FK_ADD; 5291 L_31008C6A: 5292 eax = esi; /* 0x31008C6A: mov eax, esi */ 5293 esi = POP32_VAL(esp); /* 0x31008C6C: pop esi */ 5294 ebp = POP32_VAL(esp); /* 0x31008C6D: pop ebp */ 5295 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31008C6E: ret 4 */ 5296 RECOMP_REGS_OUT(); 5297 } 5298 5299 void sub_31008C80(void) { 5300 int _fpu_cmp = 0; 5301 uint32_t _cf = 0; 5302 int _df = 1; 5303 uint32_t _flag_k = FK_NONE; 5304 uint32_t _flag_a = 0, _flag_b = 0; 5305 uint32_t _itail_tgt = 0; 5306 RECOMP_REGS_LOCALS 5307 RECOMP_ENTER(0x31008C80u); 5308 5309 L_31008C80: 5310 goto L_31008E30; /* 0x31008C80: jmp 0x31008e30 */ 5311 L_31008E30: 5312 PUSH32(esp, ebp); /* 0x31008E30: push ebp */ 5313 ebp = esp; /* 0x31008E31: mov ebp, esp */ 5314 PUSH32(esp, 0xFFFFFFFFu); /* 0x31008E33: push -1 */ 5315 PUSH32(esp, 0x310472DCu); /* 0x31008E35: push 0x310472dc */ 5316 eax = MEM32(FS_BASE + (0)); /* 0x31008E3A: mov eax, dword ptr fs:[0] */ 5317 PUSH32(esp, eax); /* 0x31008E40: push eax */ 5318 MEM32(FS_BASE + (0)) = esp; /* 0x31008E41: mov dword ptr fs:[0], esp */ 5319 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 5320 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5321 esp = esp - 0x10u; /* 0x31008E48: sub esp, 0x10 */ 5322 _flag_k = FK_CMP; 5323 PUSH32(esp, ebx); /* 0x31008E4B: push ebx */ 5324 PUSH32(esp, esi); /* 0x31008E4C: push esi */ 5325 PUSH32(esp, edi); /* 0x31008E4D: push edi */ 5326 edi = ecx; /* 0x31008E4E: mov edi, ecx */ 5327 MEM32(ebp + (-0x14)) = edi; /* 0x31008E50: mov dword ptr [ebp - 0x14], edi */ 5328 MEM32(edi) = 0x3104858Cu; /* 0x31008E53: mov dword ptr [edi], 0x3104858c */ 5329 eax = MEM32(edi + 0x18); /* 0x31008E59: mov eax, dword ptr [edi + 0x18] */ 5330 ecx = MEM32(edi + 0x24); /* 0x31008E5C: mov ecx, dword ptr [edi + 0x24] */ 5331 /* test ecx, ecx */ /* 0x31008E5F: test ecx, ecx */ 5332 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 5333 _cf = 0; 5334 _flag_k = FK_TEST; 5335 esi = edi + 0x14; /* 0x31008E61: lea esi, [edi + 0x14] */ 5336 ebx = eax; /* 0x31008E64: mov ebx, eax */ 5337 eax = MEM32(eax); /* 0x31008E66: mov eax, dword ptr [eax] */ 5338 MEM32(ebp + (-0x4)) = 0; /* 0x31008E68: mov dword ptr [ebp - 4], 0 */ 5339 MEM32(ebp + (-0x10)) = eax; /* 0x31008E6F: mov dword ptr [ebp - 0x10], eax */ 5340 if (TEST_Z(_flag_a, _flag_b)) goto L_31008EC2; /* 0x31008E72: je 0x31008ec2 */ 5341 L_31008E74: 5342 eax = ebp + (-0x18); /* 0x31008E74: lea eax, [ebp - 0x18] */ 5343 PUSH32(esp, eax); /* 0x31008E77: push eax */ 5344 ecx = esi; /* 0x31008E78: mov ecx, esi */ 5345 RECOMP_ICALL(0x3100E400u); /* 0x31008E7A: call 0x3100e400 */ /* not lifted */ 5346 RECOMP_FLAGS_IN(); 5347 ecx = eax; /* 0x31008E7F: mov ecx, eax */ 5348 eax = MEM32(ebp + (-0x10)); /* 0x31008E81: mov eax, dword ptr [ebp - 0x10] */ 5349 /* cmp eax, MEM32(ecx) */ /* 0x31008E84: cmp eax, dword ptr [ecx] */ 5350 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx)); 5351 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5352 _flag_k = FK_CMP; 5353 if (CMP_NE(_flag_a, _flag_b)) goto L_31008EC2; /* 0x31008E86: jne 0x31008ec2 */ 5354 L_31008E88: 5355 ecx = MEM32(esi + 0x4); /* 0x31008E88: mov ecx, dword ptr [esi + 4] */ 5356 /* cmp ebx, ecx */ /* 0x31008E8B: cmp ebx, ecx */ 5357 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ecx); 5358 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5359 _flag_k = FK_CMP; 5360 if (CMP_NE(_flag_a, _flag_b)) goto L_31008EC2; /* 0x31008E8D: jne 0x31008ec2 */ 5361 L_31008E8F: 5362 edx = MEM32(ecx + 0x4); /* 0x31008E8F: mov edx, dword ptr [ecx + 4] */ 5363 PUSH32(esp, edx); /* 0x31008E92: push edx */ 5364 ecx = esi; /* 0x31008E93: mov ecx, esi */ 5365 RECOMP_ICALL(0x31009DB0u); /* 0x31008E95: call 0x31009db0 */ /* not lifted */ 5366 RECOMP_FLAGS_IN(); 5367 eax = MEM32(esi + 0x4); /* 0x31008E9A: mov eax, dword ptr [esi + 4] */ 5368 ecx = MEM32(esi + 0x8); /* 0x31008E9D: mov ecx, dword ptr [esi + 8] */ 5369 MEM32(eax + 0x4) = ecx; /* 0x31008EA0: mov dword ptr [eax + 4], ecx */ 5370 eax = MEM32(esi + 0x4); /* 0x31008EA3: mov eax, dword ptr [esi + 4] */ 5371 MEM32(esi + 0x10) = 0; /* 0x31008EA6: mov dword ptr [esi + 0x10], 0 */ 5372 MEM32(eax) = eax; /* 0x31008EAD: mov dword ptr [eax], eax */ 5373 eax = MEM32(esi + 0x4); /* 0x31008EAF: mov eax, dword ptr [esi + 4] */ 5374 edx = ebp + (-0x18); /* 0x31008EB2: lea edx, [ebp - 0x18] */ 5375 PUSH32(esp, edx); /* 0x31008EB5: push edx */ 5376 ecx = esi; /* 0x31008EB6: mov ecx, esi */ 5377 MEM32(eax + 0x8) = eax; /* 0x31008EB8: mov dword ptr [eax + 8], eax */ 5378 RECOMP_ICALL(0x3100E400u); /* 0x31008EBB: call 0x3100e400 */ /* not lifted */ 5379 RECOMP_FLAGS_IN(); 5380 goto L_31008EE7; /* 0x31008EC0: jmp 0x31008ee7 */ 5381 L_31008EC2: 5382 /* cmp eax, ebx */ /* 0x31008EC2: cmp eax, ebx */ 5383 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 5384 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5385 _flag_k = FK_CMP; 5386 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008EE7; /* 0x31008EC4: je 0x31008ee7 */ 5387 L_31008EC6: 5388 PUSH32(esp, 0); /* 0x31008EC6: push 0 */ 5389 eax = ebp + (-0x18); /* 0x31008EC8: lea eax, [ebp - 0x18] */ 5390 PUSH32(esp, eax); /* 0x31008ECB: push eax */ 5391 ecx = ebp + (-0x10); /* 0x31008ECC: lea ecx, [ebp - 0x10] */ 5392 RECOMP_ICALL(0x3100FE30u); /* 0x31008ECF: call 0x3100fe30 */ /* not lifted */ 5393 RECOMP_FLAGS_IN(); 5394 ecx = MEM32(eax); /* 0x31008ED4: mov ecx, dword ptr [eax] */ 5395 PUSH32(esp, ecx); /* 0x31008ED6: push ecx */ 5396 edx = ebp + (-0x1C); /* 0x31008ED7: lea edx, [ebp - 0x1c] */ 5397 PUSH32(esp, edx); /* 0x31008EDA: push edx */ 5398 ecx = esi; /* 0x31008EDB: mov ecx, esi */ 5399 RECOMP_ICALL(0x310099F0u); /* 0x31008EDD: call 0x310099f0 */ /* not lifted */ 5400 RECOMP_FLAGS_IN(); 5401 /* cmp MEM32(ebp + (-0x10)), ebx */ /* 0x31008EE2: cmp dword ptr [ebp - 0x10], ebx */ 5402 _flag_a = (uint32_t)(MEM32(ebp + (-0x10))); _flag_b = (uint32_t)(ebx); 5403 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5404 _flag_k = FK_CMP; 5405 RECOMP_BACKEDGE(); 5406 if (CMP_NE(_flag_a, _flag_b)) goto L_31008EC6; /* 0x31008EE5: jne 0x31008ec6 */ 5407 L_31008EE7: 5408 eax = MEM32(esi + 0x4); /* 0x31008EE7: mov eax, dword ptr [esi + 4] */ 5409 PUSH32(esp, eax); /* 0x31008EEA: push eax */ 5410 RECOMP_ICALL(0x31046858u); /* 0x31008EEB: call 0x31046858 */ /* not lifted */ 5411 RECOMP_FLAGS_IN(); 5412 ecx = MEM32(esi + 0x8); /* 0x31008EF0: mov ecx, dword ptr [esi + 8] */ 5413 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5414 ebx = 0; /* 0x31008EF3: xor ebx, ebx */ 5415 _cf = 0; 5416 _flag_k = FK_TEST; 5417 PUSH32(esp, ecx); /* 0x31008EF5: push ecx */ 5418 MEM32(esi + 0x4) = ebx; /* 0x31008EF6: mov dword ptr [esi + 4], ebx */ 5419 MEM32(esi + 0x10) = ebx; /* 0x31008EF9: mov dword ptr [esi + 0x10], ebx */ 5420 RECOMP_ICALL(0x31046858u); /* 0x31008EFC: call 0x31046858 */ /* not lifted */ 5421 RECOMP_FLAGS_IN(); 5422 MEM32(esi + 0x8) = ebx; /* 0x31008F01: mov dword ptr [esi + 8], ebx */ 5423 eax = MEM32(edi + 0x8); /* 0x31008F04: mov eax, dword ptr [edi + 8] */ 5424 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 5425 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5426 esp = esp + 8; /* 0x31008F07: add esp, 8 */ 5427 _flag_k = FK_ADD; 5428 /* cmp eax, ebx */ /* 0x31008F0A: cmp eax, ebx */ 5429 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 5430 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5431 _flag_k = FK_CMP; 5432 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008F2A; /* 0x31008F0C: je 0x31008f2a */ 5433 L_31008F0E: 5434 ecx = eax + (-0x1); /* 0x31008F0E: lea ecx, [eax - 1] */ 5435 SET_LO8(eax, MEM8(ecx)); /* 0x31008F11: mov al, byte ptr [ecx] */ 5436 /* test LO8(eax), LO8(eax) */ /* 0x31008F13: test al, al */ 5437 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5438 _cf = 0; 5439 _flag_k = FK_NARROW(FK_TEST, 24); 5440 if (TEST_Z(_flag_a, _flag_b)) goto L_31008F21; /* 0x31008F15: je 0x31008f21 */ 5441 L_31008F17: 5442 /* cmp LO8(eax), 0xFFu */ /* 0x31008F17: cmp al, 0xff */ 5443 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 5444 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5445 _flag_k = FK_NARROW(FK_CMP, 24); 5446 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008F21; /* 0x31008F19: je 0x31008f21 */ 5447 L_31008F1B: 5448 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5449 SET_LO8(eax, LO8(eax) - 1); /* 0x31008F1B: dec al */ 5450 _flag_k = FK_NARROW(FK_DEC, 24); 5451 MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x31008F1D: mov byte ptr [ecx], al */ 5452 goto L_31008F2A; /* 0x31008F1F: jmp 0x31008f2a */ 5453 L_31008F21: 5454 PUSH32(esp, ecx); /* 0x31008F21: push ecx */ 5455 RECOMP_ICALL(0x31046858u); /* 0x31008F22: call 0x31046858 */ /* not lifted */ 5456 RECOMP_FLAGS_IN(); 5457 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5458 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5459 esp = esp + 4; /* 0x31008F27: add esp, 4 */ 5460 _flag_k = FK_ADD; 5461 L_31008F2A: 5462 ecx = MEM32(ebp + (-0xC)); /* 0x31008F2A: mov ecx, dword ptr [ebp - 0xc] */ 5463 MEM32(edi + 0x8) = ebx; /* 0x31008F2D: mov dword ptr [edi + 8], ebx */ 5464 MEM32(edi + 0xC) = ebx; /* 0x31008F30: mov dword ptr [edi + 0xc], ebx */ 5465 MEM32(edi + 0x10) = ebx; /* 0x31008F33: mov dword ptr [edi + 0x10], ebx */ 5466 edi = POP32_VAL(esp); /* 0x31008F36: pop edi */ 5467 esi = POP32_VAL(esp); /* 0x31008F37: pop esi */ 5468 ebx = POP32_VAL(esp); /* 0x31008F38: pop ebx */ 5469 MEM32(FS_BASE + (0)) = ecx; /* 0x31008F39: mov dword ptr fs:[0], ecx */ 5470 esp = ebp; /* 0x31008F40: mov esp, ebp */ 5471 ebp = POP32_VAL(esp); /* 0x31008F42: pop ebp */ 5472 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31008F43: ret */ 5473 RECOMP_REGS_OUT(); 5474 } 5475 5476 void sub_31008C90(void) { 5477 int _fpu_cmp = 0; 5478 uint32_t _cf = 0; 5479 int _df = 1; 5480 uint32_t _flag_k = FK_NONE; 5481 uint32_t _flag_a = 0, _flag_b = 0; 5482 uint32_t _itail_tgt = 0; 5483 RECOMP_REGS_LOCALS 5484 RECOMP_ENTER(0x31008C90u); 5485 5486 L_31008C90: 5487 PUSH32(esp, ebp); /* 0x31008C90: push ebp */ 5488 ebp = esp; /* 0x31008C91: mov ebp, esp */ 5489 PUSH32(esp, 0xFFFFFFFFu); /* 0x31008C93: push -1 */ 5490 PUSH32(esp, 0x310472BCu); /* 0x31008C95: push 0x310472bc */ 5491 eax = MEM32(FS_BASE + (0)); /* 0x31008C9A: mov eax, dword ptr fs:[0] */ 5492 PUSH32(esp, eax); /* 0x31008CA0: push eax */ 5493 MEM32(FS_BASE + (0)) = esp; /* 0x31008CA1: mov dword ptr fs:[0], esp */ 5494 PUSH32(esp, ecx); /* 0x31008CA8: push ecx */ 5495 PUSH32(esp, ebx); /* 0x31008CA9: push ebx */ 5496 ebx = ecx; /* 0x31008CAA: mov ebx, ecx */ 5497 PUSH32(esp, esi); /* 0x31008CAC: push esi */ 5498 esi = MEM32(ebp + 0x8); /* 0x31008CAD: mov esi, dword ptr [ebp + 8] */ 5499 SET_LO8(eax, MEM8(esi)); /* 0x31008CB0: mov al, byte ptr [esi] */ 5500 MEM8(ebx + 0x4) = (uint8_t)(LO8(eax)); /* 0x31008CB2: mov byte ptr [ebx + 4], al */ 5501 PUSH32(esp, edi); /* 0x31008CB5: push edi */ 5502 edi = ebx + 0x4; /* 0x31008CB6: lea edi, [ebx + 4] */ 5503 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5504 eax = 0; /* 0x31008CB9: xor eax, eax */ 5505 _cf = 0; 5506 _flag_k = FK_TEST; 5507 MEM32(edi + 0x4) = eax; /* 0x31008CBB: mov dword ptr [edi + 4], eax */ 5508 MEM32(edi + 0x8) = eax; /* 0x31008CBE: mov dword ptr [edi + 8], eax */ 5509 MEM32(edi + 0xC) = eax; /* 0x31008CC1: mov dword ptr [edi + 0xc], eax */ 5510 ecx = MEM32(0x310480F8); /* 0x31008CC4: mov ecx, dword ptr [0x310480f8] */ 5511 edx = MEM32(esi + 0x8); /* 0x31008CCA: mov edx, dword ptr [esi + 8] */ 5512 ecx = MEM32(ecx); /* 0x31008CCD: mov ecx, dword ptr [ecx] */ 5513 eax = edx; /* 0x31008CCF: mov eax, edx */ 5514 /* cmp ecx, eax */ /* 0x31008CD1: cmp ecx, eax */ 5515 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 5516 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5517 _flag_k = FK_CMP; 5518 MEM32(ebp + (-0x10)) = ebx; /* 0x31008CD3: mov dword ptr [ebp - 0x10], ebx */ 5519 MEM32(ebp + 0x8) = eax; /* 0x31008CD6: mov dword ptr [ebp + 8], eax */ 5520 if (CMP_AE(_flag_a, _flag_b)) goto L_31008CE0; /* 0x31008CD9: jae 0x31008ce0 */ 5521 L_31008CDB: 5522 MEM32(ebp + 0x8) = ecx; /* 0x31008CDB: mov dword ptr [ebp + 8], ecx */ 5523 eax = ecx; /* 0x31008CDE: mov eax, ecx */ 5524 L_31008CE0: 5525 /* cmp edi, esi */ /* 0x31008CE0: cmp edi, esi */ 5526 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 5527 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5528 _flag_k = FK_CMP; 5529 if (CMP_NE(_flag_a, _flag_b)) goto L_31008CFF; /* 0x31008CE2: jne 0x31008cff */ 5530 L_31008CE4: 5531 PUSH32(esp, ecx); /* 0x31008CE4: push ecx */ 5532 PUSH32(esp, eax); /* 0x31008CE5: push eax */ 5533 ecx = edi; /* 0x31008CE6: mov ecx, edi */ 5534 RECOMP_ICALL(MEM32(0x310480A4)); /* 0x31008CE8: call dword ptr [0x310480a4] */ 5535 RECOMP_FLAGS_IN(); 5536 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5537 esi = 0; /* 0x31008CEE: xor esi, esi */ 5538 _cf = 0; 5539 _flag_k = FK_TEST; 5540 PUSH32(esp, esi); /* 0x31008CF0: push esi */ 5541 PUSH32(esp, esi); /* 0x31008CF1: push esi */ 5542 ecx = edi; /* 0x31008CF2: mov ecx, edi */ 5543 RECOMP_ICALL(MEM32(0x310480A4)); /* 0x31008CF4: call dword ptr [0x310480a4] */ 5544 RECOMP_FLAGS_IN(); 5545 goto L_31008D82; /* 0x31008CFA: jmp 0x31008d82 */ 5546 L_31008CFF: 5547 /* test eax, eax */ /* 0x31008CFF: test eax, eax */ 5548 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5549 _cf = 0; 5550 _flag_k = FK_TEST; 5551 if (TEST_Z(_flag_a, _flag_b)) goto L_31008D44; /* 0x31008D01: jbe 0x31008d44 */ 5552 L_31008D03: 5553 /* cmp eax, edx */ /* 0x31008D03: cmp eax, edx */ 5554 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 5555 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5556 _flag_k = FK_CMP; 5557 if (CMP_NE(_flag_a, _flag_b)) goto L_31008D44; /* 0x31008D05: jne 0x31008d44 */ 5558 L_31008D07: 5559 ecx = MEM32(esi + 0x4); /* 0x31008D07: mov ecx, dword ptr [esi + 4] */ 5560 /* test ecx, ecx */ /* 0x31008D0A: test ecx, ecx */ 5561 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 5562 _cf = 0; 5563 _flag_k = FK_TEST; 5564 if (TEST_NZ(_flag_a, _flag_b)) goto L_31008D14; /* 0x31008D0C: jne 0x31008d14 */ 5565 L_31008D0E: 5566 ecx = MEM32(0x310480EC); /* 0x31008D0E: mov ecx, dword ptr [0x310480ec] */ 5567 L_31008D14: 5568 /* cmp MEM8(ecx + (-0x1)), 0xFEu */ /* 0x31008D14: cmp byte ptr [ecx - 1], 0xfe */ 5569 _flag_a = (uint32_t)(MEM8(ecx + (-0x1))) << 24; _flag_b = (uint32_t)(0xFEu) << 24; 5570 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5571 _flag_k = FK_NARROW(FK_CMP, 24); 5572 if (CMP_AE(_flag_a, _flag_b)) goto L_31008D44; /* 0x31008D18: jae 0x31008d44 */ 5573 L_31008D1A: 5574 PUSH32(esp, 1); /* 0x31008D1A: push 1 */ 5575 ecx = edi; /* 0x31008D1C: mov ecx, edi */ 5576 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31008D1E: call dword ptr [0x310480d4] */ 5577 RECOMP_FLAGS_IN(); 5578 eax = MEM32(esi + 0x4); /* 0x31008D24: mov eax, dword ptr [esi + 4] */ 5579 /* test eax, eax */ /* 0x31008D27: test eax, eax */ 5580 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5581 _cf = 0; 5582 _flag_k = FK_TEST; 5583 if (TEST_NZ(_flag_a, _flag_b)) goto L_31008D30; /* 0x31008D29: jne 0x31008d30 */ 5584 L_31008D2B: 5585 eax = MEM32(0x310480EC); /* 0x31008D2B: mov eax, dword ptr [0x310480ec] */ 5586 L_31008D30: 5587 MEM32(edi + 0x4) = eax; /* 0x31008D30: mov dword ptr [edi + 4], eax */ 5588 ecx = MEM32(esi + 0x8); /* 0x31008D33: mov ecx, dword ptr [esi + 8] */ 5589 MEM32(edi + 0x8) = ecx; /* 0x31008D36: mov dword ptr [edi + 8], ecx */ 5590 esi = MEM32(esi + 0xC); /* 0x31008D39: mov esi, dword ptr [esi + 0xc] */ 5591 MEM32(edi + 0xC) = esi; /* 0x31008D3C: mov dword ptr [edi + 0xc], esi */ 5592 _flag_a = (uint32_t)(MEM8(eax + (-0x1))) << 24; _flag_b = (uint32_t)(1) << 24; 5593 MEM8(eax + (-0x1)) = (uint8_t)(MEM8(eax + (-0x1)) + 1); /* 0x31008D3F: inc byte ptr [eax - 1] */ 5594 _flag_k = FK_NARROW(FK_INC, 24); 5595 goto L_31008D80; /* 0x31008D42: jmp 0x31008d80 */ 5596 L_31008D44: 5597 PUSH32(esp, 1); /* 0x31008D44: push 1 */ 5598 PUSH32(esp, eax); /* 0x31008D46: push eax */ 5599 ecx = edi; /* 0x31008D47: mov ecx, edi */ 5600 RECOMP_ICALL(MEM32(0x31048070)); /* 0x31008D49: call dword ptr [0x31048070] */ 5601 RECOMP_FLAGS_IN(); 5602 /* test LO8(eax), LO8(eax) */ /* 0x31008D4F: test al, al */ 5603 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5604 _cf = 0; 5605 _flag_k = FK_NARROW(FK_TEST, 24); 5606 if (TEST_Z(_flag_a, _flag_b)) goto L_31008D80; /* 0x31008D51: je 0x31008d80 */ 5607 L_31008D53: 5608 esi = MEM32(esi + 0x4); /* 0x31008D53: mov esi, dword ptr [esi + 4] */ 5609 /* test esi, esi */ /* 0x31008D56: test esi, esi */ 5610 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 5611 _cf = 0; 5612 _flag_k = FK_TEST; 5613 if (TEST_NZ(_flag_a, _flag_b)) goto L_31008D60; /* 0x31008D58: jne 0x31008d60 */ 5614 L_31008D5A: 5615 esi = MEM32(0x310480EC); /* 0x31008D5A: mov esi, dword ptr [0x310480ec] */ 5616 L_31008D60: 5617 ecx = MEM32(ebp + 0x8); /* 0x31008D60: mov ecx, dword ptr [ebp + 8] */ 5618 edi = MEM32(edi + 0x4); /* 0x31008D63: mov edi, dword ptr [edi + 4] */ 5619 edx = ecx; /* 0x31008D66: mov edx, ecx */ 5620 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x31008D68: shr ecx, 2 */ 5621 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 5622 ecx = ecx >> 2u; /* 0x31008D68: shr ecx, 2 */ 5623 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31008D6B: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 5624 ecx = edx; /* 0x31008D6D: mov ecx, edx */ 5625 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 5626 ecx = ecx & 3; /* 0x31008D6F: and ecx, 3 */ 5627 _cf = 0; 5628 _flag_k = FK_TEST; 5629 eax = edx; /* 0x31008D72: mov eax, edx */ 5630 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x31008D74: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 5631 PUSH32(esp, eax); /* 0x31008D76: push eax */ 5632 ecx = ebx + 0x4; /* 0x31008D77: lea ecx, [ebx + 4] */ 5633 RECOMP_ICALL(MEM32(0x310480E8)); /* 0x31008D7A: call dword ptr [0x310480e8] */ 5634 RECOMP_FLAGS_IN(); 5635 L_31008D80: 5636 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5637 esi = 0; /* 0x31008D80: xor esi, esi */ 5638 _cf = 0; 5639 _flag_k = FK_TEST; 5640 L_31008D82: 5641 SET_LO8(ecx, MEM8(ebp + 0xB)); /* 0x31008D82: mov cl, byte ptr [ebp + 0xb] */ 5642 SET_LO8(edx, MEM8(ebp + 0xB)); /* 0x31008D85: mov dl, byte ptr [ebp + 0xb] */ 5643 PUSH32(esp, 0x18u); /* 0x31008D88: push 0x18 */ 5644 MEM32(ebp + (-0x4)) = esi; /* 0x31008D8A: mov dword ptr [ebp - 4], esi */ 5645 MEM8(ebx + 0x14) = (uint8_t)(LO8(ecx)); /* 0x31008D8D: mov byte ptr [ebx + 0x14], cl */ 5646 MEM8(ebx + 0x15) = (uint8_t)(LO8(edx)); /* 0x31008D90: mov byte ptr [ebx + 0x15], dl */ 5647 MEM8(ebx + 0x20) = (uint8_t)(0); /* 0x31008D93: mov byte ptr [ebx + 0x20], 0 */ 5648 RECOMP_ICALL(0x310468DAu); /* 0x31008D97: call 0x310468da */ /* not lifted */ 5649 RECOMP_FLAGS_IN(); 5650 MEM32(eax + 0x4) = esi; /* 0x31008D9C: mov dword ptr [eax + 4], esi */ 5651 MEM8(eax + 0x14) = (uint8_t)(1); /* 0x31008D9F: mov byte ptr [eax + 0x14], 1 */ 5652 MEM8(eax + 0x15) = (uint8_t)(0); /* 0x31008DA3: mov byte ptr [eax + 0x15], 0 */ 5653 MEM32(ebx + 0x1C) = eax; /* 0x31008DA7: mov dword ptr [ebx + 0x1c], eax */ 5654 MEM8(eax + 0x15) = (uint8_t)(1); /* 0x31008DAA: mov byte ptr [eax + 0x15], 1 */ 5655 eax = MEM32(ebx + 0x1C); /* 0x31008DAE: mov eax, dword ptr [ebx + 0x1c] */ 5656 MEM32(eax) = esi; /* 0x31008DB1: mov dword ptr [eax], esi */ 5657 ecx = MEM32(ebx + 0x1C); /* 0x31008DB3: mov ecx, dword ptr [ebx + 0x1c] */ 5658 MEM32(ecx + 0x8) = esi; /* 0x31008DB6: mov dword ptr [ecx + 8], esi */ 5659 edi = MEM32(ebx + 0x1C); /* 0x31008DB9: mov edi, dword ptr [ebx + 0x1c] */ 5660 PUSH32(esp, 0x18u); /* 0x31008DBC: push 0x18 */ 5661 RECOMP_ICALL(0x310468DAu); /* 0x31008DBE: call 0x310468da */ /* not lifted */ 5662 RECOMP_FLAGS_IN(); 5663 ecx = MEM32(ebp + (-0xC)); /* 0x31008DC3: mov ecx, dword ptr [ebp - 0xc] */ 5664 MEM32(eax + 0x4) = edi; /* 0x31008DC6: mov dword ptr [eax + 4], edi */ 5665 MEM8(eax + 0x14) = (uint8_t)(0); /* 0x31008DC9: mov byte ptr [eax + 0x14], 0 */ 5666 MEM8(eax + 0x15) = (uint8_t)(0); /* 0x31008DCD: mov byte ptr [eax + 0x15], 0 */ 5667 MEM32(ebx + 0x18) = eax; /* 0x31008DD1: mov dword ptr [ebx + 0x18], eax */ 5668 MEM32(eax) = eax; /* 0x31008DD4: mov dword ptr [eax], eax */ 5669 eax = MEM32(ebx + 0x18); /* 0x31008DD6: mov eax, dword ptr [ebx + 0x18] */ 5670 MEM32(eax + 0x8) = eax; /* 0x31008DD9: mov dword ptr [eax + 8], eax */ 5671 MEM32(ebx + 0x24) = esi; /* 0x31008DDC: mov dword ptr [ebx + 0x24], esi */ 5672 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 5673 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5674 esp = esp + 8; /* 0x31008DDF: add esp, 8 */ 5675 _flag_k = FK_ADD; 5676 MEM32(ebx + 0x28) = esi; /* 0x31008DE2: mov dword ptr [ebx + 0x28], esi */ 5677 MEM32(ebx + 0x2C) = esi; /* 0x31008DE5: mov dword ptr [ebx + 0x2c], esi */ 5678 edi = POP32_VAL(esp); /* 0x31008DE8: pop edi */ 5679 MEM32(ebx) = 0x3104858Cu; /* 0x31008DE9: mov dword ptr [ebx], 0x3104858c */ 5680 esi = POP32_VAL(esp); /* 0x31008DEF: pop esi */ 5681 eax = ebx; /* 0x31008DF0: mov eax, ebx */ 5682 ebx = POP32_VAL(esp); /* 0x31008DF2: pop ebx */ 5683 MEM32(FS_BASE + (0)) = ecx; /* 0x31008DF3: mov dword ptr fs:[0], ecx */ 5684 esp = ebp; /* 0x31008DFA: mov esp, ebp */ 5685 ebp = POP32_VAL(esp); /* 0x31008DFC: pop ebp */ 5686 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31008DFD: ret 4 */ 5687 RECOMP_REGS_OUT(); 5688 } 5689 5690 void sub_31008D82(void) { 5691 int _fpu_cmp = 0; 5692 uint32_t _cf = 0; 5693 int _df = 1; 5694 uint32_t _flag_k = FK_NONE; 5695 uint32_t _flag_a = 0, _flag_b = 0; 5696 uint32_t _itail_tgt = 0; 5697 RECOMP_REGS_LOCALS 5698 RECOMP_ENTER(0x31008D82u); 5699 5700 L_31008D82: 5701 SET_LO8(ecx, MEM8(ebp + 0xB)); /* 0x31008D82: mov cl, byte ptr [ebp + 0xb] */ 5702 SET_LO8(edx, MEM8(ebp + 0xB)); /* 0x31008D85: mov dl, byte ptr [ebp + 0xb] */ 5703 PUSH32(esp, 0x18u); /* 0x31008D88: push 0x18 */ 5704 MEM32(ebp + (-0x4)) = esi; /* 0x31008D8A: mov dword ptr [ebp - 4], esi */ 5705 MEM8(ebx + 0x14) = (uint8_t)(LO8(ecx)); /* 0x31008D8D: mov byte ptr [ebx + 0x14], cl */ 5706 MEM8(ebx + 0x15) = (uint8_t)(LO8(edx)); /* 0x31008D90: mov byte ptr [ebx + 0x15], dl */ 5707 MEM8(ebx + 0x20) = (uint8_t)(0); /* 0x31008D93: mov byte ptr [ebx + 0x20], 0 */ 5708 RECOMP_ICALL(0x310468DAu); /* 0x31008D97: call 0x310468da */ /* not lifted */ 5709 RECOMP_FLAGS_IN(); 5710 MEM32(eax + 0x4) = esi; /* 0x31008D9C: mov dword ptr [eax + 4], esi */ 5711 MEM8(eax + 0x14) = (uint8_t)(1); /* 0x31008D9F: mov byte ptr [eax + 0x14], 1 */ 5712 MEM8(eax + 0x15) = (uint8_t)(0); /* 0x31008DA3: mov byte ptr [eax + 0x15], 0 */ 5713 MEM32(ebx + 0x1C) = eax; /* 0x31008DA7: mov dword ptr [ebx + 0x1c], eax */ 5714 MEM8(eax + 0x15) = (uint8_t)(1); /* 0x31008DAA: mov byte ptr [eax + 0x15], 1 */ 5715 eax = MEM32(ebx + 0x1C); /* 0x31008DAE: mov eax, dword ptr [ebx + 0x1c] */ 5716 MEM32(eax) = esi; /* 0x31008DB1: mov dword ptr [eax], esi */ 5717 ecx = MEM32(ebx + 0x1C); /* 0x31008DB3: mov ecx, dword ptr [ebx + 0x1c] */ 5718 MEM32(ecx + 0x8) = esi; /* 0x31008DB6: mov dword ptr [ecx + 8], esi */ 5719 edi = MEM32(ebx + 0x1C); /* 0x31008DB9: mov edi, dword ptr [ebx + 0x1c] */ 5720 PUSH32(esp, 0x18u); /* 0x31008DBC: push 0x18 */ 5721 RECOMP_ICALL(0x310468DAu); /* 0x31008DBE: call 0x310468da */ /* not lifted */ 5722 RECOMP_FLAGS_IN(); 5723 ecx = MEM32(ebp + (-0xC)); /* 0x31008DC3: mov ecx, dword ptr [ebp - 0xc] */ 5724 MEM32(eax + 0x4) = edi; /* 0x31008DC6: mov dword ptr [eax + 4], edi */ 5725 MEM8(eax + 0x14) = (uint8_t)(0); /* 0x31008DC9: mov byte ptr [eax + 0x14], 0 */ 5726 MEM8(eax + 0x15) = (uint8_t)(0); /* 0x31008DCD: mov byte ptr [eax + 0x15], 0 */ 5727 MEM32(ebx + 0x18) = eax; /* 0x31008DD1: mov dword ptr [ebx + 0x18], eax */ 5728 MEM32(eax) = eax; /* 0x31008DD4: mov dword ptr [eax], eax */ 5729 eax = MEM32(ebx + 0x18); /* 0x31008DD6: mov eax, dword ptr [ebx + 0x18] */ 5730 MEM32(eax + 0x8) = eax; /* 0x31008DD9: mov dword ptr [eax + 8], eax */ 5731 MEM32(ebx + 0x24) = esi; /* 0x31008DDC: mov dword ptr [ebx + 0x24], esi */ 5732 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 5733 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5734 esp = esp + 8; /* 0x31008DDF: add esp, 8 */ 5735 _flag_k = FK_ADD; 5736 MEM32(ebx + 0x28) = esi; /* 0x31008DE2: mov dword ptr [ebx + 0x28], esi */ 5737 MEM32(ebx + 0x2C) = esi; /* 0x31008DE5: mov dword ptr [ebx + 0x2c], esi */ 5738 edi = POP32_VAL(esp); /* 0x31008DE8: pop edi */ 5739 MEM32(ebx) = 0x3104858Cu; /* 0x31008DE9: mov dword ptr [ebx], 0x3104858c */ 5740 esi = POP32_VAL(esp); /* 0x31008DEF: pop esi */ 5741 eax = ebx; /* 0x31008DF0: mov eax, ebx */ 5742 ebx = POP32_VAL(esp); /* 0x31008DF2: pop ebx */ 5743 MEM32(FS_BASE + (0)) = ecx; /* 0x31008DF3: mov dword ptr fs:[0], ecx */ 5744 esp = ebp; /* 0x31008DFA: mov esp, ebp */ 5745 ebp = POP32_VAL(esp); /* 0x31008DFC: pop ebp */ 5746 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31008DFD: ret 4 */ 5747 RECOMP_REGS_OUT(); 5748 } 5749 5750 void sub_31008E00(void) { 5751 int _fpu_cmp = 0; 5752 uint32_t _cf = 0; 5753 int _df = 1; 5754 uint32_t _flag_k = FK_NONE; 5755 uint32_t _flag_a = 0, _flag_b = 0; 5756 uint32_t _itail_tgt = 0; 5757 RECOMP_REGS_LOCALS 5758 RECOMP_ENTER(0x31008E00u); 5759 5760 L_31008E00: 5761 PUSH32(esp, ebp); /* 0x31008E00: push ebp */ 5762 ebp = esp; /* 0x31008E01: mov ebp, esp */ 5763 PUSH32(esp, esi); /* 0x31008E03: push esi */ 5764 esi = ecx; /* 0x31008E04: mov esi, ecx */ 5765 RECOMP_ICALL(0x31008E30u); /* 0x31008E06: call 0x31008e30 */ /* not lifted */ 5766 RECOMP_FLAGS_IN(); 5767 /* test MEM8(ebp + 0x8), 1 */ /* 0x31008E0B: test byte ptr [ebp + 8], 1 */ 5768 _flag_a = (uint32_t)(MEM8(ebp + 0x8)) << 24; _flag_b = (uint32_t)(1) << 24; 5769 _cf = 0; 5770 _flag_k = FK_NARROW(FK_TEST, 24); 5771 if (TEST_Z(_flag_a, _flag_b)) goto L_31008E1A; /* 0x31008E0F: je 0x31008e1a */ 5772 L_31008E11: 5773 PUSH32(esp, esi); /* 0x31008E11: push esi */ 5774 RECOMP_ICALL(0x31046858u); /* 0x31008E12: call 0x31046858 */ /* not lifted */ 5775 RECOMP_FLAGS_IN(); 5776 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5777 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5778 esp = esp + 4; /* 0x31008E17: add esp, 4 */ 5779 _flag_k = FK_ADD; 5780 L_31008E1A: 5781 eax = esi; /* 0x31008E1A: mov eax, esi */ 5782 esi = POP32_VAL(esp); /* 0x31008E1C: pop esi */ 5783 ebp = POP32_VAL(esp); /* 0x31008E1D: pop ebp */ 5784 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31008E1E: ret 4 */ 5785 RECOMP_REGS_OUT(); 5786 } 5787 5788 void sub_31008E30(void) { 5789 int _fpu_cmp = 0; 5790 uint32_t _cf = 0; 5791 int _df = 1; 5792 uint32_t _flag_k = FK_NONE; 5793 uint32_t _flag_a = 0, _flag_b = 0; 5794 uint32_t _itail_tgt = 0; 5795 RECOMP_REGS_LOCALS 5796 RECOMP_ENTER(0x31008E30u); 5797 5798 L_31008E30: 5799 PUSH32(esp, ebp); /* 0x31008E30: push ebp */ 5800 ebp = esp; /* 0x31008E31: mov ebp, esp */ 5801 PUSH32(esp, 0xFFFFFFFFu); /* 0x31008E33: push -1 */ 5802 PUSH32(esp, 0x310472DCu); /* 0x31008E35: push 0x310472dc */ 5803 eax = MEM32(FS_BASE + (0)); /* 0x31008E3A: mov eax, dword ptr fs:[0] */ 5804 PUSH32(esp, eax); /* 0x31008E40: push eax */ 5805 MEM32(FS_BASE + (0)) = esp; /* 0x31008E41: mov dword ptr fs:[0], esp */ 5806 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 5807 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5808 esp = esp - 0x10u; /* 0x31008E48: sub esp, 0x10 */ 5809 _flag_k = FK_CMP; 5810 PUSH32(esp, ebx); /* 0x31008E4B: push ebx */ 5811 PUSH32(esp, esi); /* 0x31008E4C: push esi */ 5812 PUSH32(esp, edi); /* 0x31008E4D: push edi */ 5813 edi = ecx; /* 0x31008E4E: mov edi, ecx */ 5814 MEM32(ebp + (-0x14)) = edi; /* 0x31008E50: mov dword ptr [ebp - 0x14], edi */ 5815 MEM32(edi) = 0x3104858Cu; /* 0x31008E53: mov dword ptr [edi], 0x3104858c */ 5816 eax = MEM32(edi + 0x18); /* 0x31008E59: mov eax, dword ptr [edi + 0x18] */ 5817 ecx = MEM32(edi + 0x24); /* 0x31008E5C: mov ecx, dword ptr [edi + 0x24] */ 5818 /* test ecx, ecx */ /* 0x31008E5F: test ecx, ecx */ 5819 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 5820 _cf = 0; 5821 _flag_k = FK_TEST; 5822 esi = edi + 0x14; /* 0x31008E61: lea esi, [edi + 0x14] */ 5823 ebx = eax; /* 0x31008E64: mov ebx, eax */ 5824 eax = MEM32(eax); /* 0x31008E66: mov eax, dword ptr [eax] */ 5825 MEM32(ebp + (-0x4)) = 0; /* 0x31008E68: mov dword ptr [ebp - 4], 0 */ 5826 MEM32(ebp + (-0x10)) = eax; /* 0x31008E6F: mov dword ptr [ebp - 0x10], eax */ 5827 if (TEST_Z(_flag_a, _flag_b)) goto L_31008EC2; /* 0x31008E72: je 0x31008ec2 */ 5828 L_31008E74: 5829 eax = ebp + (-0x18); /* 0x31008E74: lea eax, [ebp - 0x18] */ 5830 PUSH32(esp, eax); /* 0x31008E77: push eax */ 5831 ecx = esi; /* 0x31008E78: mov ecx, esi */ 5832 RECOMP_ICALL(0x3100E400u); /* 0x31008E7A: call 0x3100e400 */ /* not lifted */ 5833 RECOMP_FLAGS_IN(); 5834 ecx = eax; /* 0x31008E7F: mov ecx, eax */ 5835 eax = MEM32(ebp + (-0x10)); /* 0x31008E81: mov eax, dword ptr [ebp - 0x10] */ 5836 /* cmp eax, MEM32(ecx) */ /* 0x31008E84: cmp eax, dword ptr [ecx] */ 5837 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx)); 5838 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5839 _flag_k = FK_CMP; 5840 if (CMP_NE(_flag_a, _flag_b)) goto L_31008EC2; /* 0x31008E86: jne 0x31008ec2 */ 5841 L_31008E88: 5842 ecx = MEM32(esi + 0x4); /* 0x31008E88: mov ecx, dword ptr [esi + 4] */ 5843 /* cmp ebx, ecx */ /* 0x31008E8B: cmp ebx, ecx */ 5844 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ecx); 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_31008EC2; /* 0x31008E8D: jne 0x31008ec2 */ 5848 L_31008E8F: 5849 edx = MEM32(ecx + 0x4); /* 0x31008E8F: mov edx, dword ptr [ecx + 4] */ 5850 PUSH32(esp, edx); /* 0x31008E92: push edx */ 5851 ecx = esi; /* 0x31008E93: mov ecx, esi */ 5852 RECOMP_ICALL(0x31009DB0u); /* 0x31008E95: call 0x31009db0 */ /* not lifted */ 5853 RECOMP_FLAGS_IN(); 5854 eax = MEM32(esi + 0x4); /* 0x31008E9A: mov eax, dword ptr [esi + 4] */ 5855 ecx = MEM32(esi + 0x8); /* 0x31008E9D: mov ecx, dword ptr [esi + 8] */ 5856 MEM32(eax + 0x4) = ecx; /* 0x31008EA0: mov dword ptr [eax + 4], ecx */ 5857 eax = MEM32(esi + 0x4); /* 0x31008EA3: mov eax, dword ptr [esi + 4] */ 5858 MEM32(esi + 0x10) = 0; /* 0x31008EA6: mov dword ptr [esi + 0x10], 0 */ 5859 MEM32(eax) = eax; /* 0x31008EAD: mov dword ptr [eax], eax */ 5860 eax = MEM32(esi + 0x4); /* 0x31008EAF: mov eax, dword ptr [esi + 4] */ 5861 edx = ebp + (-0x18); /* 0x31008EB2: lea edx, [ebp - 0x18] */ 5862 PUSH32(esp, edx); /* 0x31008EB5: push edx */ 5863 ecx = esi; /* 0x31008EB6: mov ecx, esi */ 5864 MEM32(eax + 0x8) = eax; /* 0x31008EB8: mov dword ptr [eax + 8], eax */ 5865 RECOMP_ICALL(0x3100E400u); /* 0x31008EBB: call 0x3100e400 */ /* not lifted */ 5866 RECOMP_FLAGS_IN(); 5867 goto L_31008EE7; /* 0x31008EC0: jmp 0x31008ee7 */ 5868 L_31008EC2: 5869 /* cmp eax, ebx */ /* 0x31008EC2: cmp eax, ebx */ 5870 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 5871 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5872 _flag_k = FK_CMP; 5873 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008EE7; /* 0x31008EC4: je 0x31008ee7 */ 5874 L_31008EC6: 5875 PUSH32(esp, 0); /* 0x31008EC6: push 0 */ 5876 eax = ebp + (-0x18); /* 0x31008EC8: lea eax, [ebp - 0x18] */ 5877 PUSH32(esp, eax); /* 0x31008ECB: push eax */ 5878 ecx = ebp + (-0x10); /* 0x31008ECC: lea ecx, [ebp - 0x10] */ 5879 RECOMP_ICALL(0x3100FE30u); /* 0x31008ECF: call 0x3100fe30 */ /* not lifted */ 5880 RECOMP_FLAGS_IN(); 5881 ecx = MEM32(eax); /* 0x31008ED4: mov ecx, dword ptr [eax] */ 5882 PUSH32(esp, ecx); /* 0x31008ED6: push ecx */ 5883 edx = ebp + (-0x1C); /* 0x31008ED7: lea edx, [ebp - 0x1c] */ 5884 PUSH32(esp, edx); /* 0x31008EDA: push edx */ 5885 ecx = esi; /* 0x31008EDB: mov ecx, esi */ 5886 RECOMP_ICALL(0x310099F0u); /* 0x31008EDD: call 0x310099f0 */ /* not lifted */ 5887 RECOMP_FLAGS_IN(); 5888 /* cmp MEM32(ebp + (-0x10)), ebx */ /* 0x31008EE2: cmp dword ptr [ebp - 0x10], ebx */ 5889 _flag_a = (uint32_t)(MEM32(ebp + (-0x10))); _flag_b = (uint32_t)(ebx); 5890 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5891 _flag_k = FK_CMP; 5892 RECOMP_BACKEDGE(); 5893 if (CMP_NE(_flag_a, _flag_b)) goto L_31008EC6; /* 0x31008EE5: jne 0x31008ec6 */ 5894 L_31008EE7: 5895 eax = MEM32(esi + 0x4); /* 0x31008EE7: mov eax, dword ptr [esi + 4] */ 5896 PUSH32(esp, eax); /* 0x31008EEA: push eax */ 5897 RECOMP_ICALL(0x31046858u); /* 0x31008EEB: call 0x31046858 */ /* not lifted */ 5898 RECOMP_FLAGS_IN(); 5899 ecx = MEM32(esi + 0x8); /* 0x31008EF0: mov ecx, dword ptr [esi + 8] */ 5900 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5901 ebx = 0; /* 0x31008EF3: xor ebx, ebx */ 5902 _cf = 0; 5903 _flag_k = FK_TEST; 5904 PUSH32(esp, ecx); /* 0x31008EF5: push ecx */ 5905 MEM32(esi + 0x4) = ebx; /* 0x31008EF6: mov dword ptr [esi + 4], ebx */ 5906 MEM32(esi + 0x10) = ebx; /* 0x31008EF9: mov dword ptr [esi + 0x10], ebx */ 5907 RECOMP_ICALL(0x31046858u); /* 0x31008EFC: call 0x31046858 */ /* not lifted */ 5908 RECOMP_FLAGS_IN(); 5909 MEM32(esi + 0x8) = ebx; /* 0x31008F01: mov dword ptr [esi + 8], ebx */ 5910 eax = MEM32(edi + 0x8); /* 0x31008F04: mov eax, dword ptr [edi + 8] */ 5911 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 5912 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5913 esp = esp + 8; /* 0x31008F07: add esp, 8 */ 5914 _flag_k = FK_ADD; 5915 /* cmp eax, ebx */ /* 0x31008F0A: cmp eax, ebx */ 5916 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 5917 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5918 _flag_k = FK_CMP; 5919 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008F2A; /* 0x31008F0C: je 0x31008f2a */ 5920 L_31008F0E: 5921 ecx = eax + (-0x1); /* 0x31008F0E: lea ecx, [eax - 1] */ 5922 SET_LO8(eax, MEM8(ecx)); /* 0x31008F11: mov al, byte ptr [ecx] */ 5923 /* test LO8(eax), LO8(eax) */ /* 0x31008F13: test al, al */ 5924 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5925 _cf = 0; 5926 _flag_k = FK_NARROW(FK_TEST, 24); 5927 if (TEST_Z(_flag_a, _flag_b)) goto L_31008F21; /* 0x31008F15: je 0x31008f21 */ 5928 L_31008F17: 5929 /* cmp LO8(eax), 0xFFu */ /* 0x31008F17: cmp al, 0xff */ 5930 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 5931 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5932 _flag_k = FK_NARROW(FK_CMP, 24); 5933 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008F21; /* 0x31008F19: je 0x31008f21 */ 5934 L_31008F1B: 5935 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5936 SET_LO8(eax, LO8(eax) - 1); /* 0x31008F1B: dec al */ 5937 _flag_k = FK_NARROW(FK_DEC, 24); 5938 MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x31008F1D: mov byte ptr [ecx], al */ 5939 goto L_31008F2A; /* 0x31008F1F: jmp 0x31008f2a */ 5940 L_31008F21: 5941 PUSH32(esp, ecx); /* 0x31008F21: push ecx */ 5942 RECOMP_ICALL(0x31046858u); /* 0x31008F22: call 0x31046858 */ /* not lifted */ 5943 RECOMP_FLAGS_IN(); 5944 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5945 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5946 esp = esp + 4; /* 0x31008F27: add esp, 4 */ 5947 _flag_k = FK_ADD; 5948 L_31008F2A: 5949 ecx = MEM32(ebp + (-0xC)); /* 0x31008F2A: mov ecx, dword ptr [ebp - 0xc] */ 5950 MEM32(edi + 0x8) = ebx; /* 0x31008F2D: mov dword ptr [edi + 8], ebx */ 5951 MEM32(edi + 0xC) = ebx; /* 0x31008F30: mov dword ptr [edi + 0xc], ebx */ 5952 MEM32(edi + 0x10) = ebx; /* 0x31008F33: mov dword ptr [edi + 0x10], ebx */ 5953 edi = POP32_VAL(esp); /* 0x31008F36: pop edi */ 5954 esi = POP32_VAL(esp); /* 0x31008F37: pop esi */ 5955 ebx = POP32_VAL(esp); /* 0x31008F38: pop ebx */ 5956 MEM32(FS_BASE + (0)) = ecx; /* 0x31008F39: mov dword ptr fs:[0], ecx */ 5957 esp = ebp; /* 0x31008F40: mov esp, ebp */ 5958 ebp = POP32_VAL(esp); /* 0x31008F42: pop ebp */ 5959 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31008F43: ret */ 5960 RECOMP_REGS_OUT(); 5961 } 5962 5963 void sub_31008EE7(void) { 5964 int _fpu_cmp = 0; 5965 uint32_t _cf = 0; 5966 int _df = 1; 5967 uint32_t _flag_k = FK_NONE; 5968 uint32_t _flag_a = 0, _flag_b = 0; 5969 uint32_t _itail_tgt = 0; 5970 RECOMP_REGS_LOCALS 5971 RECOMP_ENTER(0x31008EE7u); 5972 5973 L_31008EE7: 5974 eax = MEM32(esi + 0x4); /* 0x31008EE7: mov eax, dword ptr [esi + 4] */ 5975 PUSH32(esp, eax); /* 0x31008EEA: push eax */ 5976 RECOMP_ICALL(0x31046858u); /* 0x31008EEB: call 0x31046858 */ /* not lifted */ 5977 RECOMP_FLAGS_IN(); 5978 ecx = MEM32(esi + 0x8); /* 0x31008EF0: mov ecx, dword ptr [esi + 8] */ 5979 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5980 ebx = 0; /* 0x31008EF3: xor ebx, ebx */ 5981 _cf = 0; 5982 _flag_k = FK_TEST; 5983 PUSH32(esp, ecx); /* 0x31008EF5: push ecx */ 5984 MEM32(esi + 0x4) = ebx; /* 0x31008EF6: mov dword ptr [esi + 4], ebx */ 5985 MEM32(esi + 0x10) = ebx; /* 0x31008EF9: mov dword ptr [esi + 0x10], ebx */ 5986 RECOMP_ICALL(0x31046858u); /* 0x31008EFC: call 0x31046858 */ /* not lifted */ 5987 RECOMP_FLAGS_IN(); 5988 MEM32(esi + 0x8) = ebx; /* 0x31008F01: mov dword ptr [esi + 8], ebx */ 5989 eax = MEM32(edi + 0x8); /* 0x31008F04: mov eax, dword ptr [edi + 8] */ 5990 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 5991 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5992 esp = esp + 8; /* 0x31008F07: add esp, 8 */ 5993 _flag_k = FK_ADD; 5994 /* cmp eax, ebx */ /* 0x31008F0A: cmp eax, ebx */ 5995 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 5996 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5997 _flag_k = FK_CMP; 5998 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008F2A; /* 0x31008F0C: je 0x31008f2a */ 5999 L_31008F0E: 6000 ecx = eax + (-0x1); /* 0x31008F0E: lea ecx, [eax - 1] */ 6001 SET_LO8(eax, MEM8(ecx)); /* 0x31008F11: mov al, byte ptr [ecx] */ 6002 /* test LO8(eax), LO8(eax) */ /* 0x31008F13: test al, al */ 6003 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 6004 _cf = 0; 6005 _flag_k = FK_NARROW(FK_TEST, 24); 6006 if (TEST_Z(_flag_a, _flag_b)) goto L_31008F21; /* 0x31008F15: je 0x31008f21 */ 6007 L_31008F17: 6008 /* cmp LO8(eax), 0xFFu */ /* 0x31008F17: cmp al, 0xff */ 6009 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 6010 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6011 _flag_k = FK_NARROW(FK_CMP, 24); 6012 if (CMP_EQ(_flag_a, _flag_b)) goto L_31008F21; /* 0x31008F19: je 0x31008f21 */ 6013 L_31008F1B: 6014 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 6015 SET_LO8(eax, LO8(eax) - 1); /* 0x31008F1B: dec al */ 6016 _flag_k = FK_NARROW(FK_DEC, 24); 6017 MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x31008F1D: mov byte ptr [ecx], al */ 6018 goto L_31008F2A; /* 0x31008F1F: jmp 0x31008f2a */ 6019 L_31008F21: 6020 PUSH32(esp, ecx); /* 0x31008F21: push ecx */ 6021 RECOMP_ICALL(0x31046858u); /* 0x31008F22: call 0x31046858 */ /* not lifted */ 6022 RECOMP_FLAGS_IN(); 6023 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6024 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6025 esp = esp + 4; /* 0x31008F27: add esp, 4 */ 6026 _flag_k = FK_ADD; 6027 L_31008F2A: 6028 ecx = MEM32(ebp + (-0xC)); /* 0x31008F2A: mov ecx, dword ptr [ebp - 0xc] */ 6029 MEM32(edi + 0x8) = ebx; /* 0x31008F2D: mov dword ptr [edi + 8], ebx */ 6030 MEM32(edi + 0xC) = ebx; /* 0x31008F30: mov dword ptr [edi + 0xc], ebx */ 6031 MEM32(edi + 0x10) = ebx; /* 0x31008F33: mov dword ptr [edi + 0x10], ebx */ 6032 edi = POP32_VAL(esp); /* 0x31008F36: pop edi */ 6033 esi = POP32_VAL(esp); /* 0x31008F37: pop esi */ 6034 ebx = POP32_VAL(esp); /* 0x31008F38: pop ebx */ 6035 MEM32(FS_BASE + (0)) = ecx; /* 0x31008F39: mov dword ptr fs:[0], ecx */ 6036 esp = ebp; /* 0x31008F40: mov esp, ebp */ 6037 ebp = POP32_VAL(esp); /* 0x31008F42: pop ebp */ 6038 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31008F43: ret */ 6039 RECOMP_REGS_OUT(); 6040 } 6041 6042 void sub_31008F2A(void) { 6043 int _fpu_cmp = 0; 6044 uint32_t _cf = 0; 6045 int _df = 1; 6046 uint32_t _flag_k = FK_NONE; 6047 uint32_t _flag_a = 0, _flag_b = 0; 6048 uint32_t _itail_tgt = 0; 6049 RECOMP_REGS_LOCALS 6050 RECOMP_ENTER(0x31008F2Au); 6051 6052 L_31008F2A: 6053 ecx = MEM32(ebp + (-0xC)); /* 0x31008F2A: mov ecx, dword ptr [ebp - 0xc] */ 6054 MEM32(edi + 0x8) = ebx; /* 0x31008F2D: mov dword ptr [edi + 8], ebx */ 6055 MEM32(edi + 0xC) = ebx; /* 0x31008F30: mov dword ptr [edi + 0xc], ebx */ 6056 MEM32(edi + 0x10) = ebx; /* 0x31008F33: mov dword ptr [edi + 0x10], ebx */ 6057 edi = POP32_VAL(esp); /* 0x31008F36: pop edi */ 6058 esi = POP32_VAL(esp); /* 0x31008F37: pop esi */ 6059 ebx = POP32_VAL(esp); /* 0x31008F38: pop ebx */ 6060 MEM32(FS_BASE + (0)) = ecx; /* 0x31008F39: mov dword ptr fs:[0], ecx */ 6061 esp = ebp; /* 0x31008F40: mov esp, ebp */ 6062 ebp = POP32_VAL(esp); /* 0x31008F42: pop ebp */ 6063 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31008F43: ret */ 6064 RECOMP_REGS_OUT(); 6065 } 6066 6067 void sub_31008F50(void) { 6068 int _fpu_cmp = 0; 6069 uint32_t _cf = 0; 6070 int _df = 1; 6071 uint32_t _flag_k = FK_NONE; 6072 uint32_t _flag_a = 0, _flag_b = 0; 6073 uint32_t _itail_tgt = 0; 6074 RECOMP_REGS_LOCALS 6075 RECOMP_ENTER(0x31008F50u); 6076 6077 L_31008F50: 6078 PUSH32(esp, esi); /* 0x31008F50: push esi */ 6079 esi = ecx; /* 0x31008F51: mov esi, ecx */ 6080 PUSH32(esp, edi); /* 0x31008F53: push edi */ 6081 edi = esi + 0x28; /* 0x31008F54: lea edi, [esi + 0x28] */ 6082 PUSH32(esp, edi); /* 0x31008F57: push edi */ 6083 RECOMP_ICALL(0x31004740u); /* 0x31008F58: call 0x31004740 */ /* not lifted */ 6084 RECOMP_FLAGS_IN(); 6085 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6086 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6087 esp = esp + 4; /* 0x31008F5D: add esp, 4 */ 6088 _flag_k = FK_ADD; 6089 /* cmp eax, 1 */ /* 0x31008F60: cmp eax, 1 */ 6090 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 6091 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6092 _flag_k = FK_CMP; 6093 if (CMP_NE(_flag_a, _flag_b)) goto L_31008F81; /* 0x31008F63: jne 0x31008f81 */ 6094 L_31008F65: 6095 RECOMP_ICALL(0x310099D0u); /* 0x31008F65: call 0x310099d0 */ /* not lifted */ 6096 RECOMP_FLAGS_IN(); 6097 /* cmp MEM32(edi), 0 */ /* 0x31008F6A: cmp dword ptr [edi], 0 */ 6098 _flag_a = (uint32_t)(MEM32(edi)); _flag_b = (uint32_t)(0); 6099 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6100 _flag_k = FK_CMP; 6101 if (CMP_NE(_flag_a, _flag_b)) goto L_31008F7C; /* 0x31008F6D: jne 0x31008f7c */ 6102 L_31008F6F: 6103 /* test esi, esi */ /* 0x31008F6F: test esi, esi */ 6104 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 6105 _cf = 0; 6106 _flag_k = FK_TEST; 6107 if (TEST_Z(_flag_a, _flag_b)) goto L_31008F7C; /* 0x31008F71: je 0x31008f7c */ 6108 L_31008F73: 6109 eax = MEM32(esi); /* 0x31008F73: mov eax, dword ptr [esi] */ 6110 PUSH32(esp, 1); /* 0x31008F75: push 1 */ 6111 ecx = esi; /* 0x31008F77: mov ecx, esi */ 6112 RECOMP_ICALL(MEM32(eax + 0x6C)); /* 0x31008F79: call dword ptr [eax + 0x6c] */ 6113 RECOMP_FLAGS_IN(); 6114 L_31008F7C: 6115 RECOMP_ICALL(0x310099E0u); /* 0x31008F7C: call 0x310099e0 */ /* not lifted */ 6116 RECOMP_FLAGS_IN(); 6117 L_31008F81: 6118 edi = POP32_VAL(esp); /* 0x31008F81: pop edi */ 6119 esi = POP32_VAL(esp); /* 0x31008F82: pop esi */ 6120 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31008F83: ret */ 6121 RECOMP_REGS_OUT(); 6122 } 6123 6124 void sub_31008F90(void) { 6125 int _fpu_cmp = 0; 6126 uint32_t _cf = 0; 6127 int _df = 1; 6128 uint32_t _flag_k = FK_NONE; 6129 uint32_t _flag_a = 0, _flag_b = 0; 6130 uint32_t _itail_tgt = 0; 6131 RECOMP_REGS_LOCALS 6132 RECOMP_ENTER(0x31008F90u); 6133 6134 L_31008F90: 6135 PUSH32(esp, ebp); /* 0x31008F90: push ebp */ 6136 ebp = esp; /* 0x31008F91: mov ebp, esp */ 6137 PUSH32(esp, ecx); /* 0x31008F93: push ecx */ 6138 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x28u); 6139 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6140 ecx = ecx + 0x28u; /* 0x31008F94: add ecx, 0x28 */ 6141 _flag_k = FK_ADD; 6142 PUSH32(esp, ebx); /* 0x31008F97: push ebx */ 6143 MEM32(ebp + (-0x4)) = ecx; /* 0x31008F98: mov dword ptr [ebp - 4], ecx */ 6144 ebx = MEM32(ebp + (-0x4)); /* 0x31008F9B: mov ebx, dword ptr [ebp - 4] */ 6145 _flag_a = __atomic_fetch_add((uint32_t *)ADDR(ebx), 1, __ATOMIC_SEQ_CST); _flag_b = 1; /* 0x31008F9E: lock inc dword ptr [ebx] */ 6146 _flag_k = FK_INC; 6147 ebx = POP32_VAL(esp); /* 0x31008FA1: pop ebx */ 6148 esp = ebp; /* 0x31008FA2: mov esp, ebp */ 6149 ebp = POP32_VAL(esp); /* 0x31008FA4: pop ebp */ 6150 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31008FA5: ret */ 6151 RECOMP_REGS_OUT(); 6152 } 6153 6154 void sub_31008FB0(void) { 6155 int _fpu_cmp = 0; 6156 uint32_t _cf = 0; 6157 int _df = 1; 6158 uint32_t _flag_k = FK_NONE; 6159 uint32_t _flag_a = 0, _flag_b = 0; 6160 uint32_t _itail_tgt = 0; 6161 RECOMP_REGS_LOCALS 6162 RECOMP_ENTER(0x31008FB0u); 6163 6164 L_31008FB0: 6165 PUSH32(esp, ebp); /* 0x31008FB0: push ebp */ 6166 ebp = esp; /* 0x31008FB1: mov ebp, esp */ 6167 eax = MEM32(ebp + 0x8); /* 0x31008FB3: mov eax, dword ptr [ebp + 8] */ 6168 eax = MEM32(eax + 0x4); /* 0x31008FB6: mov eax, dword ptr [eax + 4] */ 6169 /* test eax, eax */ /* 0x31008FB9: test eax, eax */ 6170 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6171 _cf = 0; 6172 _flag_k = FK_TEST; 6173 PUSH32(esp, esi); /* 0x31008FBB: push esi */ 6174 PUSH32(esp, edi); /* 0x31008FBC: push edi */ 6175 edi = ecx; /* 0x31008FBD: mov edi, ecx */ 6176 if (TEST_NZ(_flag_a, _flag_b)) goto L_31008FC6; /* 0x31008FBF: jne 0x31008fc6 */ 6177 L_31008FC1: 6178 eax = MEM32(0x310480EC); /* 0x31008FC1: mov eax, dword ptr [0x310480ec] */ 6179 L_31008FC6: 6180 PUSH32(esp, 0); /* 0x31008FC6: push 0 */ 6181 PUSH32(esp, eax); /* 0x31008FC8: push eax */ 6182 RECOMP_ICALL(0x31008740u); /* 0x31008FC9: call 0x31008740 */ /* not lifted */ 6183 RECOMP_FLAGS_IN(); 6184 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6185 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6186 esp = esp + 8; /* 0x31008FCE: add esp, 8 */ 6187 _flag_k = FK_ADD; 6188 ecx = edi; /* 0x31008FD1: mov ecx, edi */ 6189 esi = eax; /* 0x31008FD3: mov esi, eax */ 6190 RECOMP_ICALL(0x31008F50u); /* 0x31008FD5: call 0x31008f50 */ /* not lifted */ 6191 RECOMP_FLAGS_IN(); 6192 edi = POP32_VAL(esp); /* 0x31008FDA: pop edi */ 6193 eax = esi; /* 0x31008FDB: mov eax, esi */ 6194 esi = POP32_VAL(esp); /* 0x31008FDD: pop esi */ 6195 ebp = POP32_VAL(esp); /* 0x31008FDE: pop ebp */ 6196 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31008FDF: ret 4 */ 6197 RECOMP_REGS_OUT(); 6198 } 6199 6200 void sub_31008FF0(void) { 6201 int _fpu_cmp = 0; 6202 uint32_t _cf = 0; 6203 int _df = 1; 6204 uint32_t _flag_k = FK_NONE; 6205 uint32_t _flag_a = 0, _flag_b = 0; 6206 uint32_t _itail_tgt = 0; 6207 RECOMP_REGS_LOCALS 6208 RECOMP_ENTER(0x31008FF0u); 6209 6210 L_31008FF0: 6211 PUSH32(esp, ebp); /* 0x31008FF0: push ebp */ 6212 ebp = esp; /* 0x31008FF1: mov ebp, esp */ 6213 PUSH32(esp, ecx); /* 0x31008FF3: push ecx */ 6214 eax = MEM32(ebp + 0x8); /* 0x31008FF4: mov eax, dword ptr [ebp + 8] */ 6215 SET_LO8(edx, MEM8(ebp + 0xB)); /* 0x31008FF7: mov dl, byte ptr [ebp + 0xb] */ 6216 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6217 ecx = 0; /* 0x31008FFA: xor ecx, ecx */ 6218 _cf = 0; 6219 _flag_k = FK_TEST; 6220 MEM32(ebp + (-0x4)) = ecx; /* 0x31008FFC: mov dword ptr [ebp - 4], ecx */ 6221 MEM8(eax) = (uint8_t)(LO8(edx)); /* 0x31008FFF: mov byte ptr [eax], dl */ 6222 MEM32(eax + 0x4) = ecx; /* 0x31009001: mov dword ptr [eax + 4], ecx */ 6223 MEM32(eax + 0x8) = ecx; /* 0x31009004: mov dword ptr [eax + 8], ecx */ 6224 MEM32(eax + 0xC) = ecx; /* 0x31009007: mov dword ptr [eax + 0xc], ecx */ 6225 esp = ebp; /* 0x3100900A: mov esp, ebp */ 6226 ebp = POP32_VAL(esp); /* 0x3100900C: pop ebp */ 6227 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3100900D: ret 4 */ 6228 RECOMP_REGS_OUT(); 6229 } 6230 6231 void sub_31009010(void) { 6232 int _fpu_cmp = 0; 6233 uint32_t _cf = 0; 6234 int _df = 1; 6235 uint32_t _flag_k = FK_NONE; 6236 uint32_t _flag_a = 0, _flag_b = 0; 6237 uint32_t _itail_tgt = 0; 6238 RECOMP_REGS_LOCALS 6239 RECOMP_ENTER(0x31009010u); 6240 6241 L_31009010: 6242 PUSH32(esp, ebp); /* 0x31009010: push ebp */ 6243 ebp = esp; /* 0x31009011: mov ebp, esp */ 6244 PUSH32(esp, ecx); /* 0x31009013: push ecx */ 6245 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x31009014: mov al, byte ptr [ebp + 0xb] */ 6246 PUSH32(esp, ebx); /* 0x31009017: push ebx */ 6247 ebx = MEM32(ebp + 0x8); /* 0x31009018: mov ebx, dword ptr [ebp + 8] */ 6248 PUSH32(esp, esi); /* 0x3100901B: push esi */ 6249 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6250 esi = 0; /* 0x3100901C: xor esi, esi */ 6251 _cf = 0; 6252 _flag_k = FK_TEST; 6253 PUSH32(esp, edi); /* 0x3100901E: push edi */ 6254 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 6255 ecx = ecx | 0xFFFFFFFFu; /* 0x3100901F: or ecx, 0xffffffff */ 6256 _cf = 0; 6257 _flag_k = FK_TEST; 6258 MEM8(ebx) = (uint8_t)(LO8(eax)); /* 0x31009022: mov byte ptr [ebx], al */ 6259 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6260 eax = 0; /* 0x31009024: xor eax, eax */ 6261 _cf = 0; 6262 _flag_k = FK_TEST; 6263 edi = 0x31052080u; /* 0x31009026: mov edi, 0x31052080 */ 6264 MEM32(ebx + 0x4) = esi; /* 0x3100902B: mov dword ptr [ebx + 4], esi */ 6265 MEM32(ebx + 0x8) = esi; /* 0x3100902E: mov dword ptr [ebx + 8], esi */ 6266 MEM32(ebx + 0xC) = esi; /* 0x31009031: mov dword ptr [ebx + 0xc], esi */ 6267 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x31009034: repne scasb al, byte ptr es:[edi] */ 6268 ecx = ~ecx; /* 0x31009036: not ecx */ 6269 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 6270 ecx = ecx - 1; /* 0x31009038: dec ecx */ 6271 _flag_k = FK_DEC; 6272 edi = ecx; /* 0x31009039: mov edi, ecx */ 6273 /* cmp edi, 0xFFFFFFFDu */ /* 0x3100903B: cmp edi, -3 */ 6274 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFDu); 6275 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6276 _flag_k = FK_CMP; 6277 MEM32(ebp + (-0x4)) = esi; /* 0x3100903E: mov dword ptr [ebp - 4], esi */ 6278 MEM32(ebp + 0x8) = edi; /* 0x31009041: mov dword ptr [ebp + 8], edi */ 6279 if (CMP_BE(_flag_a, _flag_b)) goto L_3100904C; /* 0x31009044: jbe 0x3100904c */ 6280 L_31009046: 6281 RECOMP_ICALL(MEM32(0x310480B0)); /* 0x31009046: call dword ptr [0x310480b0] */ 6282 RECOMP_FLAGS_IN(); 6283 L_3100904C: 6284 eax = MEM32(ebx + 0x4); /* 0x3100904C: mov eax, dword ptr [ebx + 4] */ 6285 /* cmp eax, esi */ /* 0x3100904F: cmp eax, esi */ 6286 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 6287 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6288 _flag_k = FK_CMP; 6289 MEM32(ebx + 0x8) = esi; /* 0x31009051: mov dword ptr [ebx + 8], esi */ 6290 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100907A; /* 0x31009054: je 0x3100907a */ 6291 L_31009056: 6292 SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x31009056: mov al, byte ptr [eax - 1] */ 6293 /* test LO8(eax), LO8(eax) */ /* 0x31009059: test al, al */ 6294 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 6295 _cf = 0; 6296 _flag_k = FK_NARROW(FK_TEST, 24); 6297 if (TEST_Z(_flag_a, _flag_b)) goto L_3100907A; /* 0x3100905B: je 0x3100907a */ 6298 L_3100905D: 6299 /* cmp LO8(eax), 0xFFu */ /* 0x3100905D: cmp al, 0xff */ 6300 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 6301 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6302 _flag_k = FK_NARROW(FK_CMP, 24); 6303 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100907A; /* 0x3100905F: je 0x3100907a */ 6304 L_31009061: 6305 /* cmp edi, esi */ /* 0x31009061: cmp edi, esi */ 6306 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 6307 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6308 _flag_k = FK_CMP; 6309 if (CMP_NE(_flag_a, _flag_b)) goto L_310090A9; /* 0x31009063: jne 0x310090a9 */ 6310 L_31009065: 6311 PUSH32(esp, 1); /* 0x31009065: push 1 */ 6312 ecx = ebx; /* 0x31009067: mov ecx, ebx */ 6313 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31009069: call dword ptr [0x310480d4] */ 6314 RECOMP_FLAGS_IN(); 6315 edi = POP32_VAL(esp); /* 0x3100906F: pop edi */ 6316 esi = POP32_VAL(esp); /* 0x31009070: pop esi */ 6317 eax = ebx; /* 0x31009071: mov eax, ebx */ 6318 ebx = POP32_VAL(esp); /* 0x31009073: pop ebx */ 6319 esp = ebp; /* 0x31009074: mov esp, ebp */ 6320 ebp = POP32_VAL(esp); /* 0x31009076: pop ebp */ 6321 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31009077: ret 0xc */ 6322 L_3100907A: 6323 /* cmp edi, esi */ /* 0x3100907A: cmp edi, esi */ 6324 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 6325 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6326 _flag_k = FK_CMP; 6327 if (CMP_NE(_flag_a, _flag_b)) goto L_31009093; /* 0x3100907C: jne 0x31009093 */ 6328 L_3100907E: 6329 PUSH32(esp, 1); /* 0x3100907E: push 1 */ 6330 ecx = ebx; /* 0x31009080: mov ecx, ebx */ 6331 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31009082: call dword ptr [0x310480d4] */ 6332 RECOMP_FLAGS_IN(); 6333 edi = POP32_VAL(esp); /* 0x31009088: pop edi */ 6334 esi = POP32_VAL(esp); /* 0x31009089: pop esi */ 6335 eax = ebx; /* 0x3100908A: mov eax, ebx */ 6336 ebx = POP32_VAL(esp); /* 0x3100908C: pop ebx */ 6337 esp = ebp; /* 0x3100908D: mov esp, ebp */ 6338 ebp = POP32_VAL(esp); /* 0x3100908F: pop ebp */ 6339 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31009090: ret 0xc */ 6340 L_31009093: 6341 eax = MEM32(ebx + 0xC); /* 0x31009093: mov eax, dword ptr [ebx + 0xc] */ 6342 /* cmp eax, 0x1Fu */ /* 0x31009096: cmp eax, 0x1f */ 6343 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x1Fu); 6344 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6345 _flag_k = FK_CMP; 6346 if (CMP_A(_flag_a, _flag_b)) goto L_3100909F; /* 0x31009099: ja 0x3100909f */ 6347 L_3100909B: 6348 /* cmp eax, edi */ /* 0x3100909B: cmp eax, edi */ 6349 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 6350 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6351 _flag_k = FK_CMP; 6352 if (CMP_AE(_flag_a, _flag_b)) goto L_310090B2; /* 0x3100909D: jae 0x310090b2 */ 6353 L_3100909F: 6354 PUSH32(esp, 1); /* 0x3100909F: push 1 */ 6355 ecx = ebx; /* 0x310090A1: mov ecx, ebx */ 6356 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x310090A3: call dword ptr [0x310480d4] */ 6357 RECOMP_FLAGS_IN(); 6358 L_310090A9: 6359 PUSH32(esp, edi); /* 0x310090A9: push edi */ 6360 ecx = ebx; /* 0x310090AA: mov ecx, ebx */ 6361 RECOMP_ICALL(MEM32(0x310480A8)); /* 0x310090AC: call dword ptr [0x310480a8] */ 6362 RECOMP_FLAGS_IN(); 6363 L_310090B2: 6364 eax = MEM32(ebp + 0x8); /* 0x310090B2: mov eax, dword ptr [ebp + 8] */ 6365 ecx = edi; /* 0x310090B5: mov ecx, edi */ 6366 edi = MEM32(ebx + 0x4); /* 0x310090B7: mov edi, dword ptr [ebx + 4] */ 6367 edx = ecx; /* 0x310090BA: mov edx, ecx */ 6368 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x310090BC: shr ecx, 2 */ 6369 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6370 ecx = ecx >> 2u; /* 0x310090BC: shr ecx, 2 */ 6371 esi = 0x31052080u; /* 0x310090BF: mov esi, 0x31052080 */ 6372 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x310090C4: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 6373 ecx = edx; /* 0x310090C6: mov ecx, edx */ 6374 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 6375 ecx = ecx & 3; /* 0x310090C8: and ecx, 3 */ 6376 _cf = 0; 6377 _flag_k = FK_TEST; 6378 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x310090CB: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 6379 ecx = MEM32(ebx + 0x4); /* 0x310090CD: mov ecx, dword ptr [ebx + 4] */ 6380 MEM32(ebx + 0x8) = eax; /* 0x310090D0: mov dword ptr [ebx + 8], eax */ 6381 edi = POP32_VAL(esp); /* 0x310090D3: pop edi */ 6382 MEM8(ecx + eax) = (uint8_t)(0); /* 0x310090D4: mov byte ptr [ecx + eax], 0 */ 6383 esi = POP32_VAL(esp); /* 0x310090D8: pop esi */ 6384 eax = ebx; /* 0x310090D9: mov eax, ebx */ 6385 ebx = POP32_VAL(esp); /* 0x310090DB: pop ebx */ 6386 esp = ebp; /* 0x310090DC: mov esp, ebp */ 6387 ebp = POP32_VAL(esp); /* 0x310090DE: pop ebp */ 6388 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x310090DF: ret 0xc */ 6389 RECOMP_REGS_OUT(); 6390 } 6391 6392 void sub_310090F0(void) { 6393 int _fpu_cmp = 0; 6394 uint32_t _cf = 0; 6395 int _df = 1; 6396 uint32_t _flag_k = FK_NONE; 6397 uint32_t _flag_a = 0, _flag_b = 0; 6398 uint32_t _itail_tgt = 0; 6399 RECOMP_REGS_LOCALS 6400 RECOMP_ENTER(0x310090F0u); 6401 6402 L_310090F0: 6403 PUSH32(esp, ebp); /* 0x310090F0: push ebp */ 6404 ebp = esp; /* 0x310090F1: mov ebp, esp */ 6405 PUSH32(esp, ecx); /* 0x310090F3: push ecx */ 6406 PUSH32(esp, esi); /* 0x310090F4: push esi */ 6407 esi = MEM32(ebp + 0x8); /* 0x310090F5: mov esi, dword ptr [ebp + 8] */ 6408 ecx = esi; /* 0x310090F8: mov ecx, esi */ 6409 MEM32(ebp + (-0x4)) = 0; /* 0x310090FA: mov dword ptr [ebp - 4], 0 */ 6410 RECOMP_ICALL(0x310045B0u); /* 0x31009101: call 0x310045b0 */ /* not lifted */ 6411 RECOMP_FLAGS_IN(); 6412 eax = esi; /* 0x31009106: mov eax, esi */ 6413 esi = POP32_VAL(esp); /* 0x31009108: pop esi */ 6414 esp = ebp; /* 0x31009109: mov esp, ebp */ 6415 ebp = POP32_VAL(esp); /* 0x3100910B: pop ebp */ 6416 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3100910C: ret 4 */ 6417 RECOMP_REGS_OUT(); 6418 } 6419 6420 void sub_31009110(void) { 6421 int _fpu_cmp = 0; 6422 uint32_t _cf = 0; 6423 int _df = 1; 6424 uint32_t _flag_k = FK_NONE; 6425 uint32_t _flag_a = 0, _flag_b = 0; 6426 uint32_t _itail_tgt = 0; 6427 RECOMP_REGS_LOCALS 6428 RECOMP_ENTER(0x31009110u); 6429 6430 L_31009110: 6431 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 6432 eax = eax | 0xFFFFFFFFu; /* 0x31009110: or eax, 0xffffffff */ 6433 _cf = 0; 6434 _flag_k = FK_TEST; 6435 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31009113: ret 4 */ 6436 RECOMP_REGS_OUT(); 6437 } 6438 6439 void sub_31009120(void) { 6440 int _fpu_cmp = 0; 6441 uint32_t _cf = 0; 6442 int _df = 1; 6443 uint32_t _flag_k = FK_NONE; 6444 uint32_t _flag_a = 0, _flag_b = 0; 6445 uint32_t _itail_tgt = 0; 6446 RECOMP_REGS_LOCALS 6447 RECOMP_ENTER(0x31009120u); 6448 6449 L_31009120: 6450 PUSH32(esp, ebp); /* 0x31009120: push ebp */ 6451 ebp = esp; /* 0x31009121: mov ebp, esp */ 6452 PUSH32(esp, ecx); /* 0x31009123: push ecx */ 6453 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x31009124: mov al, byte ptr [ebp + 0xb] */ 6454 PUSH32(esp, ebx); /* 0x31009127: push ebx */ 6455 ebx = MEM32(ebp + 0x8); /* 0x31009128: mov ebx, dword ptr [ebp + 8] */ 6456 PUSH32(esp, esi); /* 0x3100912B: push esi */ 6457 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6458 esi = 0; /* 0x3100912C: xor esi, esi */ 6459 _cf = 0; 6460 _flag_k = FK_TEST; 6461 PUSH32(esp, edi); /* 0x3100912E: push edi */ 6462 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 6463 ecx = ecx | 0xFFFFFFFFu; /* 0x3100912F: or ecx, 0xffffffff */ 6464 _cf = 0; 6465 _flag_k = FK_TEST; 6466 MEM8(ebx) = (uint8_t)(LO8(eax)); /* 0x31009132: mov byte ptr [ebx], al */ 6467 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6468 eax = 0; /* 0x31009134: xor eax, eax */ 6469 _cf = 0; 6470 _flag_k = FK_TEST; 6471 edi = 0x31052094u; /* 0x31009136: mov edi, 0x31052094 */ 6472 MEM32(ebx + 0x4) = esi; /* 0x3100913B: mov dword ptr [ebx + 4], esi */ 6473 MEM32(ebx + 0x8) = esi; /* 0x3100913E: mov dword ptr [ebx + 8], esi */ 6474 MEM32(ebx + 0xC) = esi; /* 0x31009141: mov dword ptr [ebx + 0xc], esi */ 6475 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x31009144: repne scasb al, byte ptr es:[edi] */ 6476 ecx = ~ecx; /* 0x31009146: not ecx */ 6477 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 6478 ecx = ecx - 1; /* 0x31009148: dec ecx */ 6479 _flag_k = FK_DEC; 6480 edi = ecx; /* 0x31009149: mov edi, ecx */ 6481 /* cmp edi, 0xFFFFFFFDu */ /* 0x3100914B: cmp edi, -3 */ 6482 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFDu); 6483 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6484 _flag_k = FK_CMP; 6485 MEM32(ebp + (-0x4)) = esi; /* 0x3100914E: mov dword ptr [ebp - 4], esi */ 6486 MEM32(ebp + 0x8) = edi; /* 0x31009151: mov dword ptr [ebp + 8], edi */ 6487 if (CMP_BE(_flag_a, _flag_b)) goto L_3100915C; /* 0x31009154: jbe 0x3100915c */ 6488 L_31009156: 6489 RECOMP_ICALL(MEM32(0x310480B0)); /* 0x31009156: call dword ptr [0x310480b0] */ 6490 RECOMP_FLAGS_IN(); 6491 L_3100915C: 6492 eax = MEM32(ebx + 0x4); /* 0x3100915C: mov eax, dword ptr [ebx + 4] */ 6493 /* cmp eax, esi */ /* 0x3100915F: cmp eax, esi */ 6494 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 6495 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6496 _flag_k = FK_CMP; 6497 MEM32(ebx + 0x8) = esi; /* 0x31009161: mov dword ptr [ebx + 8], esi */ 6498 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100918A; /* 0x31009164: je 0x3100918a */ 6499 L_31009166: 6500 SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x31009166: mov al, byte ptr [eax - 1] */ 6501 /* test LO8(eax), LO8(eax) */ /* 0x31009169: test al, al */ 6502 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 6503 _cf = 0; 6504 _flag_k = FK_NARROW(FK_TEST, 24); 6505 if (TEST_Z(_flag_a, _flag_b)) goto L_3100918A; /* 0x3100916B: je 0x3100918a */ 6506 L_3100916D: 6507 /* cmp LO8(eax), 0xFFu */ /* 0x3100916D: cmp al, 0xff */ 6508 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 6509 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6510 _flag_k = FK_NARROW(FK_CMP, 24); 6511 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100918A; /* 0x3100916F: je 0x3100918a */ 6512 L_31009171: 6513 /* cmp edi, esi */ /* 0x31009171: cmp edi, esi */ 6514 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 6515 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6516 _flag_k = FK_CMP; 6517 if (CMP_NE(_flag_a, _flag_b)) goto L_310091B9; /* 0x31009173: jne 0x310091b9 */ 6518 L_31009175: 6519 PUSH32(esp, 1); /* 0x31009175: push 1 */ 6520 ecx = ebx; /* 0x31009177: mov ecx, ebx */ 6521 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31009179: call dword ptr [0x310480d4] */ 6522 RECOMP_FLAGS_IN(); 6523 edi = POP32_VAL(esp); /* 0x3100917F: pop edi */ 6524 esi = POP32_VAL(esp); /* 0x31009180: pop esi */ 6525 eax = ebx; /* 0x31009181: mov eax, ebx */ 6526 ebx = POP32_VAL(esp); /* 0x31009183: pop ebx */ 6527 esp = ebp; /* 0x31009184: mov esp, ebp */ 6528 ebp = POP32_VAL(esp); /* 0x31009186: pop ebp */ 6529 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31009187: ret 4 */ 6530 L_3100918A: 6531 /* cmp edi, esi */ /* 0x3100918A: cmp edi, esi */ 6532 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 6533 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6534 _flag_k = FK_CMP; 6535 if (CMP_NE(_flag_a, _flag_b)) goto L_310091A3; /* 0x3100918C: jne 0x310091a3 */ 6536 L_3100918E: 6537 PUSH32(esp, 1); /* 0x3100918E: push 1 */ 6538 ecx = ebx; /* 0x31009190: mov ecx, ebx */ 6539 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31009192: call dword ptr [0x310480d4] */ 6540 RECOMP_FLAGS_IN(); 6541 edi = POP32_VAL(esp); /* 0x31009198: pop edi */ 6542 esi = POP32_VAL(esp); /* 0x31009199: pop esi */ 6543 eax = ebx; /* 0x3100919A: mov eax, ebx */ 6544 ebx = POP32_VAL(esp); /* 0x3100919C: pop ebx */ 6545 esp = ebp; /* 0x3100919D: mov esp, ebp */ 6546 ebp = POP32_VAL(esp); /* 0x3100919F: pop ebp */ 6547 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x310091A0: ret 4 */ 6548 L_310091A3: 6549 eax = MEM32(ebx + 0xC); /* 0x310091A3: mov eax, dword ptr [ebx + 0xc] */ 6550 /* cmp eax, 0x1Fu */ /* 0x310091A6: cmp eax, 0x1f */ 6551 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x1Fu); 6552 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6553 _flag_k = FK_CMP; 6554 if (CMP_A(_flag_a, _flag_b)) goto L_310091AF; /* 0x310091A9: ja 0x310091af */ 6555 L_310091AB: 6556 /* cmp eax, edi */ /* 0x310091AB: cmp eax, edi */ 6557 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 6558 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6559 _flag_k = FK_CMP; 6560 if (CMP_AE(_flag_a, _flag_b)) goto L_310091C2; /* 0x310091AD: jae 0x310091c2 */ 6561 L_310091AF: 6562 PUSH32(esp, 1); /* 0x310091AF: push 1 */ 6563 ecx = ebx; /* 0x310091B1: mov ecx, ebx */ 6564 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x310091B3: call dword ptr [0x310480d4] */ 6565 RECOMP_FLAGS_IN(); 6566 L_310091B9: 6567 PUSH32(esp, edi); /* 0x310091B9: push edi */ 6568 ecx = ebx; /* 0x310091BA: mov ecx, ebx */ 6569 RECOMP_ICALL(MEM32(0x310480A8)); /* 0x310091BC: call dword ptr [0x310480a8] */ 6570 RECOMP_FLAGS_IN(); 6571 L_310091C2: 6572 eax = MEM32(ebp + 0x8); /* 0x310091C2: mov eax, dword ptr [ebp + 8] */ 6573 ecx = edi; /* 0x310091C5: mov ecx, edi */ 6574 edi = MEM32(ebx + 0x4); /* 0x310091C7: mov edi, dword ptr [ebx + 4] */ 6575 edx = ecx; /* 0x310091CA: mov edx, ecx */ 6576 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x310091CC: shr ecx, 2 */ 6577 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6578 ecx = ecx >> 2u; /* 0x310091CC: shr ecx, 2 */ 6579 esi = 0x31052094u; /* 0x310091CF: mov esi, 0x31052094 */ 6580 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x310091D4: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 6581 ecx = edx; /* 0x310091D6: mov ecx, edx */ 6582 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 6583 ecx = ecx & 3; /* 0x310091D8: and ecx, 3 */ 6584 _cf = 0; 6585 _flag_k = FK_TEST; 6586 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x310091DB: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 6587 ecx = MEM32(ebx + 0x4); /* 0x310091DD: mov ecx, dword ptr [ebx + 4] */ 6588 MEM32(ebx + 0x8) = eax; /* 0x310091E0: mov dword ptr [ebx + 8], eax */ 6589 edi = POP32_VAL(esp); /* 0x310091E3: pop edi */ 6590 MEM8(ecx + eax) = (uint8_t)(0); /* 0x310091E4: mov byte ptr [ecx + eax], 0 */ 6591 esi = POP32_VAL(esp); /* 0x310091E8: pop esi */ 6592 eax = ebx; /* 0x310091E9: mov eax, ebx */ 6593 ebx = POP32_VAL(esp); /* 0x310091EB: pop ebx */ 6594 esp = ebp; /* 0x310091EC: mov esp, ebp */ 6595 ebp = POP32_VAL(esp); /* 0x310091EE: pop ebp */ 6596 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x310091EF: ret 4 */ 6597 RECOMP_REGS_OUT(); 6598 } 6599 6600 void sub_31009200(void) { 6601 int _fpu_cmp = 0; 6602 uint32_t _cf = 0; 6603 int _df = 1; 6604 uint32_t _flag_k = FK_NONE; 6605 uint32_t _flag_a = 0, _flag_b = 0; 6606 uint32_t _itail_tgt = 0; 6607 RECOMP_REGS_LOCALS 6608 RECOMP_ENTER(0x31009200u); 6609 6610 L_31009200: 6611 PUSH32(esp, ebp); /* 0x31009200: push ebp */ 6612 ebp = esp; /* 0x31009201: mov ebp, esp */ 6613 PUSH32(esp, ecx); /* 0x31009203: push ecx */ 6614 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x31009204: mov al, byte ptr [ebp + 0xb] */ 6615 PUSH32(esp, ebx); /* 0x31009207: push ebx */ 6616 ebx = MEM32(ebp + 0x8); /* 0x31009208: mov ebx, dword ptr [ebp + 8] */ 6617 PUSH32(esp, esi); /* 0x3100920B: push esi */ 6618 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6619 esi = 0; /* 0x3100920C: xor esi, esi */ 6620 _cf = 0; 6621 _flag_k = FK_TEST; 6622 PUSH32(esp, edi); /* 0x3100920E: push edi */ 6623 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 6624 ecx = ecx | 0xFFFFFFFFu; /* 0x3100920F: or ecx, 0xffffffff */ 6625 _cf = 0; 6626 _flag_k = FK_TEST; 6627 MEM8(ebx) = (uint8_t)(LO8(eax)); /* 0x31009212: mov byte ptr [ebx], al */ 6628 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6629 eax = 0; /* 0x31009214: xor eax, eax */ 6630 _cf = 0; 6631 _flag_k = FK_TEST; 6632 edi = 0x310520C8u; /* 0x31009216: mov edi, 0x310520c8 */ 6633 MEM32(ebx + 0x4) = esi; /* 0x3100921B: mov dword ptr [ebx + 4], esi */ 6634 MEM32(ebx + 0x8) = esi; /* 0x3100921E: mov dword ptr [ebx + 8], esi */ 6635 MEM32(ebx + 0xC) = esi; /* 0x31009221: mov dword ptr [ebx + 0xc], esi */ 6636 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x31009224: repne scasb al, byte ptr es:[edi] */ 6637 ecx = ~ecx; /* 0x31009226: not ecx */ 6638 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 6639 ecx = ecx - 1; /* 0x31009228: dec ecx */ 6640 _flag_k = FK_DEC; 6641 edi = ecx; /* 0x31009229: mov edi, ecx */ 6642 /* cmp edi, 0xFFFFFFFDu */ /* 0x3100922B: cmp edi, -3 */ 6643 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFDu); 6644 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6645 _flag_k = FK_CMP; 6646 MEM32(ebp + (-0x4)) = esi; /* 0x3100922E: mov dword ptr [ebp - 4], esi */ 6647 MEM32(ebp + 0x8) = edi; /* 0x31009231: mov dword ptr [ebp + 8], edi */ 6648 if (CMP_BE(_flag_a, _flag_b)) goto L_3100923C; /* 0x31009234: jbe 0x3100923c */ 6649 L_31009236: 6650 RECOMP_ICALL(MEM32(0x310480B0)); /* 0x31009236: call dword ptr [0x310480b0] */ 6651 RECOMP_FLAGS_IN(); 6652 L_3100923C: 6653 eax = MEM32(ebx + 0x4); /* 0x3100923C: mov eax, dword ptr [ebx + 4] */ 6654 /* cmp eax, esi */ /* 0x3100923F: cmp eax, esi */ 6655 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 6656 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6657 _flag_k = FK_CMP; 6658 MEM32(ebx + 0x8) = esi; /* 0x31009241: mov dword ptr [ebx + 8], esi */ 6659 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100926A; /* 0x31009244: je 0x3100926a */ 6660 L_31009246: 6661 SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x31009246: mov al, byte ptr [eax - 1] */ 6662 /* test LO8(eax), LO8(eax) */ /* 0x31009249: test al, al */ 6663 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 6664 _cf = 0; 6665 _flag_k = FK_NARROW(FK_TEST, 24); 6666 if (TEST_Z(_flag_a, _flag_b)) goto L_3100926A; /* 0x3100924B: je 0x3100926a */ 6667 L_3100924D: 6668 /* cmp LO8(eax), 0xFFu */ /* 0x3100924D: cmp al, 0xff */ 6669 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 6670 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6671 _flag_k = FK_NARROW(FK_CMP, 24); 6672 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100926A; /* 0x3100924F: je 0x3100926a */ 6673 L_31009251: 6674 /* cmp edi, esi */ /* 0x31009251: cmp edi, esi */ 6675 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 6676 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6677 _flag_k = FK_CMP; 6678 if (CMP_NE(_flag_a, _flag_b)) goto L_31009299; /* 0x31009253: jne 0x31009299 */ 6679 L_31009255: 6680 PUSH32(esp, 1); /* 0x31009255: push 1 */ 6681 ecx = ebx; /* 0x31009257: mov ecx, ebx */ 6682 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31009259: call dword ptr [0x310480d4] */ 6683 RECOMP_FLAGS_IN(); 6684 edi = POP32_VAL(esp); /* 0x3100925F: pop edi */ 6685 esi = POP32_VAL(esp); /* 0x31009260: pop esi */ 6686 eax = ebx; /* 0x31009261: mov eax, ebx */ 6687 ebx = POP32_VAL(esp); /* 0x31009263: pop ebx */ 6688 esp = ebp; /* 0x31009264: mov esp, ebp */ 6689 ebp = POP32_VAL(esp); /* 0x31009266: pop ebp */ 6690 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31009267: ret 8 */ 6691 L_3100926A: 6692 /* cmp edi, esi */ /* 0x3100926A: cmp edi, esi */ 6693 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 6694 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6695 _flag_k = FK_CMP; 6696 if (CMP_NE(_flag_a, _flag_b)) goto L_31009283; /* 0x3100926C: jne 0x31009283 */ 6697 L_3100926E: 6698 PUSH32(esp, 1); /* 0x3100926E: push 1 */ 6699 ecx = ebx; /* 0x31009270: mov ecx, ebx */ 6700 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31009272: call dword ptr [0x310480d4] */ 6701 RECOMP_FLAGS_IN(); 6702 edi = POP32_VAL(esp); /* 0x31009278: pop edi */ 6703 esi = POP32_VAL(esp); /* 0x31009279: pop esi */ 6704 eax = ebx; /* 0x3100927A: mov eax, ebx */ 6705 ebx = POP32_VAL(esp); /* 0x3100927C: pop ebx */ 6706 esp = ebp; /* 0x3100927D: mov esp, ebp */ 6707 ebp = POP32_VAL(esp); /* 0x3100927F: pop ebp */ 6708 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31009280: ret 8 */ 6709 L_31009283: 6710 eax = MEM32(ebx + 0xC); /* 0x31009283: mov eax, dword ptr [ebx + 0xc] */ 6711 /* cmp eax, 0x1Fu */ /* 0x31009286: cmp eax, 0x1f */ 6712 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x1Fu); 6713 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6714 _flag_k = FK_CMP; 6715 if (CMP_A(_flag_a, _flag_b)) goto L_3100928F; /* 0x31009289: ja 0x3100928f */ 6716 L_3100928B: 6717 /* cmp eax, edi */ /* 0x3100928B: cmp eax, edi */ 6718 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 6719 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6720 _flag_k = FK_CMP; 6721 if (CMP_AE(_flag_a, _flag_b)) goto L_310092A2; /* 0x3100928D: jae 0x310092a2 */ 6722 L_3100928F: 6723 PUSH32(esp, 1); /* 0x3100928F: push 1 */ 6724 ecx = ebx; /* 0x31009291: mov ecx, ebx */ 6725 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31009293: call dword ptr [0x310480d4] */ 6726 RECOMP_FLAGS_IN(); 6727 L_31009299: 6728 PUSH32(esp, edi); /* 0x31009299: push edi */ 6729 ecx = ebx; /* 0x3100929A: mov ecx, ebx */ 6730 RECOMP_ICALL(MEM32(0x310480A8)); /* 0x3100929C: call dword ptr [0x310480a8] */ 6731 RECOMP_FLAGS_IN(); 6732 L_310092A2: 6733 eax = MEM32(ebp + 0x8); /* 0x310092A2: mov eax, dword ptr [ebp + 8] */ 6734 ecx = edi; /* 0x310092A5: mov ecx, edi */ 6735 edi = MEM32(ebx + 0x4); /* 0x310092A7: mov edi, dword ptr [ebx + 4] */ 6736 edx = ecx; /* 0x310092AA: mov edx, ecx */ 6737 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x310092AC: shr ecx, 2 */ 6738 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6739 ecx = ecx >> 2u; /* 0x310092AC: shr ecx, 2 */ 6740 esi = 0x310520C8u; /* 0x310092AF: mov esi, 0x310520c8 */ 6741 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x310092B4: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 6742 ecx = edx; /* 0x310092B6: mov ecx, edx */ 6743 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 6744 ecx = ecx & 3; /* 0x310092B8: and ecx, 3 */ 6745 _cf = 0; 6746 _flag_k = FK_TEST; 6747 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x310092BB: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 6748 ecx = MEM32(ebx + 0x4); /* 0x310092BD: mov ecx, dword ptr [ebx + 4] */ 6749 MEM32(ebx + 0x8) = eax; /* 0x310092C0: mov dword ptr [ebx + 8], eax */ 6750 edi = POP32_VAL(esp); /* 0x310092C3: pop edi */ 6751 MEM8(ecx + eax) = (uint8_t)(0); /* 0x310092C4: mov byte ptr [ecx + eax], 0 */ 6752 esi = POP32_VAL(esp); /* 0x310092C8: pop esi */ 6753 eax = ebx; /* 0x310092C9: mov eax, ebx */ 6754 ebx = POP32_VAL(esp); /* 0x310092CB: pop ebx */ 6755 esp = ebp; /* 0x310092CC: mov esp, ebp */ 6756 ebp = POP32_VAL(esp); /* 0x310092CE: pop ebp */ 6757 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x310092CF: ret 8 */ 6758 RECOMP_REGS_OUT(); 6759 } 6760 6761 void sub_310092E0(void) { 6762 int _fpu_cmp = 0; 6763 uint32_t _cf = 0; 6764 int _df = 1; 6765 uint32_t _flag_k = FK_NONE; 6766 uint32_t _flag_a = 0, _flag_b = 0; 6767 uint32_t _itail_tgt = 0; 6768 RECOMP_REGS_LOCALS 6769 RECOMP_ENTER(0x310092E0u); 6770 6771 L_310092E0: 6772 PUSH32(esp, ebp); /* 0x310092E0: push ebp */ 6773 ebp = esp; /* 0x310092E1: mov ebp, esp */ 6774 PUSH32(esp, ecx); /* 0x310092E3: push ecx */ 6775 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x310092E4: mov al, byte ptr [ebp + 0xb] */ 6776 PUSH32(esp, ebx); /* 0x310092E7: push ebx */ 6777 ebx = MEM32(ebp + 0x8); /* 0x310092E8: mov ebx, dword ptr [ebp + 8] */ 6778 PUSH32(esp, esi); /* 0x310092EB: push esi */ 6779 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6780 esi = 0; /* 0x310092EC: xor esi, esi */ 6781 _cf = 0; 6782 _flag_k = FK_TEST; 6783 PUSH32(esp, edi); /* 0x310092EE: push edi */ 6784 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 6785 ecx = ecx | 0xFFFFFFFFu; /* 0x310092EF: or ecx, 0xffffffff */ 6786 _cf = 0; 6787 _flag_k = FK_TEST; 6788 MEM8(ebx) = (uint8_t)(LO8(eax)); /* 0x310092F2: mov byte ptr [ebx], al */ 6789 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6790 eax = 0; /* 0x310092F4: xor eax, eax */ 6791 _cf = 0; 6792 _flag_k = FK_TEST; 6793 edi = 0x31052100u; /* 0x310092F6: mov edi, 0x31052100 */ 6794 MEM32(ebx + 0x4) = esi; /* 0x310092FB: mov dword ptr [ebx + 4], esi */ 6795 MEM32(ebx + 0x8) = esi; /* 0x310092FE: mov dword ptr [ebx + 8], esi */ 6796 MEM32(ebx + 0xC) = esi; /* 0x31009301: mov dword ptr [ebx + 0xc], esi */ 6797 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x31009304: repne scasb al, byte ptr es:[edi] */ 6798 ecx = ~ecx; /* 0x31009306: not ecx */ 6799 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 6800 ecx = ecx - 1; /* 0x31009308: dec ecx */ 6801 _flag_k = FK_DEC; 6802 edi = ecx; /* 0x31009309: mov edi, ecx */ 6803 /* cmp edi, 0xFFFFFFFDu */ /* 0x3100930B: cmp edi, -3 */ 6804 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFDu); 6805 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6806 _flag_k = FK_CMP; 6807 MEM32(ebp + (-0x4)) = esi; /* 0x3100930E: mov dword ptr [ebp - 4], esi */ 6808 MEM32(ebp + 0x8) = edi; /* 0x31009311: mov dword ptr [ebp + 8], edi */ 6809 if (CMP_BE(_flag_a, _flag_b)) goto L_3100931C; /* 0x31009314: jbe 0x3100931c */ 6810 L_31009316: 6811 RECOMP_ICALL(MEM32(0x310480B0)); /* 0x31009316: call dword ptr [0x310480b0] */ 6812 RECOMP_FLAGS_IN(); 6813 L_3100931C: 6814 eax = MEM32(ebx + 0x4); /* 0x3100931C: mov eax, dword ptr [ebx + 4] */ 6815 /* cmp eax, esi */ /* 0x3100931F: cmp eax, esi */ 6816 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 6817 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6818 _flag_k = FK_CMP; 6819 MEM32(ebx + 0x8) = esi; /* 0x31009321: mov dword ptr [ebx + 8], esi */ 6820 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100934A; /* 0x31009324: je 0x3100934a */ 6821 L_31009326: 6822 SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x31009326: mov al, byte ptr [eax - 1] */ 6823 /* test LO8(eax), LO8(eax) */ /* 0x31009329: test al, al */ 6824 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 6825 _cf = 0; 6826 _flag_k = FK_NARROW(FK_TEST, 24); 6827 if (TEST_Z(_flag_a, _flag_b)) goto L_3100934A; /* 0x3100932B: je 0x3100934a */ 6828 L_3100932D: 6829 /* cmp LO8(eax), 0xFFu */ /* 0x3100932D: cmp al, 0xff */ 6830 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 6831 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6832 _flag_k = FK_NARROW(FK_CMP, 24); 6833 if (CMP_EQ(_flag_a, _flag_b)) goto L_3100934A; /* 0x3100932F: je 0x3100934a */ 6834 L_31009331: 6835 /* cmp edi, esi */ /* 0x31009331: cmp edi, esi */ 6836 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 6837 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6838 _flag_k = FK_CMP; 6839 if (CMP_NE(_flag_a, _flag_b)) goto L_31009379; /* 0x31009333: jne 0x31009379 */ 6840 L_31009335: 6841 PUSH32(esp, 1); /* 0x31009335: push 1 */ 6842 ecx = ebx; /* 0x31009337: mov ecx, ebx */ 6843 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31009339: call dword ptr [0x310480d4] */ 6844 RECOMP_FLAGS_IN(); 6845 edi = POP32_VAL(esp); /* 0x3100933F: pop edi */ 6846 esi = POP32_VAL(esp); /* 0x31009340: pop esi */ 6847 eax = ebx; /* 0x31009341: mov eax, ebx */ 6848 ebx = POP32_VAL(esp); /* 0x31009343: pop ebx */ 6849 esp = ebp; /* 0x31009344: mov esp, ebp */ 6850 ebp = POP32_VAL(esp); /* 0x31009346: pop ebp */ 6851 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31009347: ret 4 */ 6852 L_3100934A: 6853 /* cmp edi, esi */ /* 0x3100934A: cmp edi, esi */ 6854 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 6855 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6856 _flag_k = FK_CMP; 6857 if (CMP_NE(_flag_a, _flag_b)) goto L_31009363; /* 0x3100934C: jne 0x31009363 */ 6858 L_3100934E: 6859 PUSH32(esp, 1); /* 0x3100934E: push 1 */ 6860 ecx = ebx; /* 0x31009350: mov ecx, ebx */ 6861 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31009352: call dword ptr [0x310480d4] */ 6862 RECOMP_FLAGS_IN(); 6863 edi = POP32_VAL(esp); /* 0x31009358: pop edi */ 6864 esi = POP32_VAL(esp); /* 0x31009359: pop esi */ 6865 eax = ebx; /* 0x3100935A: mov eax, ebx */ 6866 ebx = POP32_VAL(esp); /* 0x3100935C: pop ebx */ 6867 esp = ebp; /* 0x3100935D: mov esp, ebp */ 6868 ebp = POP32_VAL(esp); /* 0x3100935F: pop ebp */ 6869 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31009360: ret 4 */ 6870 L_31009363: 6871 eax = MEM32(ebx + 0xC); /* 0x31009363: mov eax, dword ptr [ebx + 0xc] */ 6872 /* cmp eax, 0x1Fu */ /* 0x31009366: cmp eax, 0x1f */ 6873 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x1Fu); 6874 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6875 _flag_k = FK_CMP; 6876 if (CMP_A(_flag_a, _flag_b)) goto L_3100936F; /* 0x31009369: ja 0x3100936f */ 6877 L_3100936B: 6878 /* cmp eax, edi */ /* 0x3100936B: cmp eax, edi */ 6879 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 6880 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6881 _flag_k = FK_CMP; 6882 if (CMP_AE(_flag_a, _flag_b)) goto L_31009382; /* 0x3100936D: jae 0x31009382 */ 6883 L_3100936F: 6884 PUSH32(esp, 1); /* 0x3100936F: push 1 */ 6885 ecx = ebx; /* 0x31009371: mov ecx, ebx */ 6886 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x31009373: call dword ptr [0x310480d4] */ 6887 RECOMP_FLAGS_IN(); 6888 L_31009379: 6889 PUSH32(esp, edi); /* 0x31009379: push edi */ 6890 ecx = ebx; /* 0x3100937A: mov ecx, ebx */ 6891 RECOMP_ICALL(MEM32(0x310480A8)); /* 0x3100937C: call dword ptr [0x310480a8] */ 6892 RECOMP_FLAGS_IN(); 6893 L_31009382: 6894 eax = MEM32(ebp + 0x8); /* 0x31009382: mov eax, dword ptr [ebp + 8] */ 6895 ecx = edi; /* 0x31009385: mov ecx, edi */ 6896 edi = MEM32(ebx + 0x4); /* 0x31009387: mov edi, dword ptr [ebx + 4] */ 6897 edx = ecx; /* 0x3100938A: mov edx, ecx */ 6898 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x3100938C: shr ecx, 2 */ 6899 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6900 ecx = ecx >> 2u; /* 0x3100938C: shr ecx, 2 */ 6901 esi = 0x31052100u; /* 0x3100938F: mov esi, 0x31052100 */ 6902 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31009394: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 6903 ecx = edx; /* 0x31009396: mov ecx, edx */ 6904 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 6905 ecx = ecx & 3; /* 0x31009398: and ecx, 3 */ 6906 _cf = 0; 6907 _flag_k = FK_TEST; 6908 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x3100939B: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 6909 ecx = MEM32(ebx + 0x4); /* 0x3100939D: mov ecx, dword ptr [ebx + 4] */ 6910 MEM32(ebx + 0x8) = eax; /* 0x310093A0: mov dword ptr [ebx + 8], eax */ 6911 edi = POP32_VAL(esp); /* 0x310093A3: pop edi */ 6912 MEM8(ecx + eax) = (uint8_t)(0); /* 0x310093A4: mov byte ptr [ecx + eax], 0 */ 6913 esi = POP32_VAL(esp); /* 0x310093A8: pop esi */ 6914 eax = ebx; /* 0x310093A9: mov eax, ebx */ 6915 ebx = POP32_VAL(esp); /* 0x310093AB: pop ebx */ 6916 esp = ebp; /* 0x310093AC: mov esp, ebp */ 6917 ebp = POP32_VAL(esp); /* 0x310093AE: pop ebp */ 6918 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x310093AF: ret 4 */ 6919 RECOMP_REGS_OUT(); 6920 } 6921 6922 void sub_310093C0(void) { 6923 int _fpu_cmp = 0; 6924 uint32_t _cf = 0; 6925 int _df = 1; 6926 uint32_t _flag_k = FK_NONE; 6927 uint32_t _flag_a = 0, _flag_b = 0; 6928 uint32_t _itail_tgt = 0; 6929 RECOMP_REGS_LOCALS 6930 RECOMP_ENTER(0x310093C0u); 6931 6932 L_310093C0: 6933 PUSH32(esp, ebp); /* 0x310093C0: push ebp */ 6934 ebp = esp; /* 0x310093C1: mov ebp, esp */ 6935 PUSH32(esp, ecx); /* 0x310093C3: push ecx */ 6936 SET_LO8(eax, MEM8(ecx + 0x4)); /* 0x310093C4: mov al, byte ptr [ecx + 4] */ 6937 PUSH32(esp, ebx); /* 0x310093C7: push ebx */ 6938 ebx = MEM32(ebp + 0x8); /* 0x310093C8: mov ebx, dword ptr [ebp + 8] */ 6939 PUSH32(esp, esi); /* 0x310093CB: push esi */ 6940 esi = ecx + 0x4; /* 0x310093CC: lea esi, [ecx + 4] */ 6941 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6942 edx = 0; /* 0x310093CF: xor edx, edx */ 6943 _cf = 0; 6944 _flag_k = FK_TEST; 6945 MEM8(ebx) = (uint8_t)(LO8(eax)); /* 0x310093D1: mov byte ptr [ebx], al */ 6946 MEM32(ebx + 0x4) = edx; /* 0x310093D3: mov dword ptr [ebx + 4], edx */ 6947 MEM32(ebx + 0x8) = edx; /* 0x310093D6: mov dword ptr [ebx + 8], edx */ 6948 MEM32(ebx + 0xC) = edx; /* 0x310093D9: mov dword ptr [ebx + 0xc], edx */ 6949 ecx = MEM32(0x310480F8); /* 0x310093DC: mov ecx, dword ptr [0x310480f8] */ 6950 eax = MEM32(ecx); /* 0x310093E2: mov eax, dword ptr [ecx] */ 6951 ecx = MEM32(esi + 0x8); /* 0x310093E4: mov ecx, dword ptr [esi + 8] */ 6952 PUSH32(esp, edi); /* 0x310093E7: push edi */ 6953 edi = ecx; /* 0x310093E8: mov edi, ecx */ 6954 /* cmp eax, edi */ /* 0x310093EA: cmp eax, edi */ 6955 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 6956 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6957 _flag_k = FK_CMP; 6958 MEM32(ebp + (-0x4)) = edx; /* 0x310093EC: mov dword ptr [ebp - 4], edx */ 6959 MEM32(ebp + 0x8) = edi; /* 0x310093EF: mov dword ptr [ebp + 8], edi */ 6960 if (CMP_AE(_flag_a, _flag_b)) goto L_310093F9; /* 0x310093F2: jae 0x310093f9 */ 6961 L_310093F4: 6962 MEM32(ebp + 0x8) = eax; /* 0x310093F4: mov dword ptr [ebp + 8], eax */ 6963 edi = eax; /* 0x310093F7: mov edi, eax */ 6964 L_310093F9: 6965 /* cmp ebx, esi */ /* 0x310093F9: cmp ebx, esi */ 6966 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi); 6967 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6968 _flag_k = FK_CMP; 6969 if (CMP_NE(_flag_a, _flag_b)) goto L_3100946E; /* 0x310093FB: jne 0x3100946e */ 6970 L_310093FD: 6971 /* cmp edi, edx */ /* 0x310093FD: cmp edi, edx */ 6972 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx); 6973 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6974 _flag_k = FK_CMP; 6975 esi = eax; /* 0x310093FF: mov esi, eax */ 6976 if (CMP_BE(_flag_a, _flag_b)) goto L_3100940B; /* 0x31009401: jbe 0x3100940b */ 6977 L_31009403: 6978 RECOMP_ICALL(MEM32(0x310480B4)); /* 0x31009403: call dword ptr [0x310480b4] */ 6979 RECOMP_FLAGS_IN(); 6980 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6981 edx = 0; /* 0x31009409: xor edx, edx */ 6982 _cf = 0; 6983 _flag_k = FK_TEST; 6984 L_3100940B: 6985 eax = MEM32(ebx + 0x8); /* 0x3100940B: mov eax, dword ptr [ebx + 8] */ 6986 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 6987 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6988 eax = eax - edi; /* 0x3100940E: sub eax, edi */ 6989 _flag_k = FK_CMP; 6990 /* cmp eax, esi */ /* 0x31009410: cmp eax, esi */ 6991 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 6992 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6993 _flag_k = FK_CMP; 6994 if (CMP_AE(_flag_a, _flag_b)) goto L_31009416; /* 0x31009412: jae 0x31009416 */ 6995 L_31009414: 6996 esi = eax; /* 0x31009414: mov esi, eax */ 6997 L_31009416: 6998 /* cmp esi, edx */ /* 0x31009416: cmp esi, edx */ 6999 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx); 7000 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7001 _flag_k = FK_CMP; 7002 if (CMP_BE(_flag_a, _flag_b)) goto L_310094FC; /* 0x31009418: jbe 0x310094fc */ 7003 L_3100941E: 7004 ecx = ebx; /* 0x3100941E: mov ecx, ebx */ 7005 RECOMP_ICALL(MEM32(0x310480E4)); /* 0x31009420: call dword ptr [0x310480e4] */ 7006 RECOMP_FLAGS_IN(); 7007 ecx = MEM32(ebx + 0x8); /* 0x31009426: mov ecx, dword ptr [ebx + 8] */ 7008 edx = MEM32(ebx + 0x4); /* 0x31009429: mov edx, dword ptr [ebx + 4] */ 7009 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi); 7010 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7011 ecx = ecx - esi; /* 0x3100942C: sub ecx, esi */ 7012 _flag_k = FK_CMP; 7013 eax = edi + edx; /* 0x3100942E: lea eax, [edi + edx] */ 7014 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 7015 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7016 ecx = ecx - edi; /* 0x31009431: sub ecx, edi */ 7017 _flag_k = FK_CMP; 7018 PUSH32(esp, ecx); /* 0x31009433: push ecx */ 7019 edx = eax + esi; /* 0x31009434: lea edx, [eax + esi] */ 7020 PUSH32(esp, edx); /* 0x31009437: push edx */ 7021 PUSH32(esp, eax); /* 0x31009438: push eax */ 7022 RECOMP_ICALL(MEM32(0x3104822C)); /* 0x31009439: call dword ptr [0x3104822c] */ 7023 RECOMP_FLAGS_IN(); 7024 edi = MEM32(ebx + 0x8); /* 0x3100943F: mov edi, dword ptr [ebx + 8] */ 7025 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 7026 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7027 esp = esp + 0xCu; /* 0x31009442: add esp, 0xc */ 7028 _flag_k = FK_ADD; 7029 PUSH32(esp, 0); /* 0x31009445: push 0 */ 7030 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi); 7031 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7032 edi = edi - esi; /* 0x31009447: sub edi, esi */ 7033 _flag_k = FK_CMP; 7034 PUSH32(esp, edi); /* 0x31009449: push edi */ 7035 ecx = ebx; /* 0x3100944A: mov ecx, ebx */ 7036 RECOMP_ICALL(MEM32(0x31048070)); /* 0x3100944C: call dword ptr [0x31048070] */ 7037 RECOMP_FLAGS_IN(); 7038 /* test LO8(eax), LO8(eax) */ /* 0x31009452: test al, al */ 7039 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 7040 _cf = 0; 7041 _flag_k = FK_NARROW(FK_TEST, 24); 7042 if (TEST_Z(_flag_a, _flag_b)) goto L_310094FC; /* 0x31009454: je 0x310094fc */ 7043 L_3100945A: 7044 PUSH32(esp, edi); /* 0x3100945A: push edi */ 7045 ecx = ebx; /* 0x3100945B: mov ecx, ebx */ 7046 RECOMP_ICALL(MEM32(0x310480E8)); /* 0x3100945D: call dword ptr [0x310480e8] */ 7047 RECOMP_FLAGS_IN(); 7048 edi = POP32_VAL(esp); /* 0x31009463: pop edi */ 7049 esi = POP32_VAL(esp); /* 0x31009464: pop esi */ 7050 eax = ebx; /* 0x31009465: mov eax, ebx */ 7051 ebx = POP32_VAL(esp); /* 0x31009467: pop ebx */ 7052 esp = ebp; /* 0x31009468: mov esp, ebp */ 7053 ebp = POP32_VAL(esp); /* 0x3100946A: pop ebp */ 7054 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3100946B: ret 4 */ 7055 L_3100946E: 7056 /* cmp edi, edx */ /* 0x3100946E: cmp edi, edx */ 7057 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx); 7058 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7059 _flag_k = FK_CMP; 7060 if (CMP_BE(_flag_a, _flag_b)) goto L_310094C0; /* 0x31009470: jbe 0x310094c0 */ 7061 L_31009472: 7062 /* cmp edi, ecx */ /* 0x31009472: cmp edi, ecx */ 7063 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx); 7064 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7065 _flag_k = FK_CMP; 7066 if (CMP_NE(_flag_a, _flag_b)) goto L_310094C0; /* 0x31009474: jne 0x310094c0 */ 7067 L_31009476: 7068 eax = MEM32(esi + 0x4); /* 0x31009476: mov eax, dword ptr [esi + 4] */ 7069 /* cmp eax, edx */ /* 0x31009479: cmp eax, edx */ 7070 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 7071 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7072 _flag_k = FK_CMP; 7073 if (CMP_NE(_flag_a, _flag_b)) goto L_31009482; /* 0x3100947B: jne 0x31009482 */ 7074 L_3100947D: 7075 eax = MEM32(0x310480EC); /* 0x3100947D: mov eax, dword ptr [0x310480ec] */ 7076 L_31009482: 7077 /* cmp MEM8(eax + (-0x1)), 0xFEu */ /* 0x31009482: cmp byte ptr [eax - 1], 0xfe */ 7078 _flag_a = (uint32_t)(MEM8(eax + (-0x1))) << 24; _flag_b = (uint32_t)(0xFEu) << 24; 7079 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7080 _flag_k = FK_NARROW(FK_CMP, 24); 7081 if (CMP_AE(_flag_a, _flag_b)) goto L_310094C0; /* 0x31009486: jae 0x310094c0 */ 7082 L_31009488: 7083 PUSH32(esp, 1); /* 0x31009488: push 1 */ 7084 ecx = ebx; /* 0x3100948A: mov ecx, ebx */ 7085 RECOMP_ICALL(MEM32(0x310480D4)); /* 0x3100948C: call dword ptr [0x310480d4] */ 7086 RECOMP_FLAGS_IN(); 7087 eax = MEM32(esi + 0x4); /* 0x31009492: mov eax, dword ptr [esi + 4] */ 7088 /* test eax, eax */ /* 0x31009495: test eax, eax */ 7089 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7090 _cf = 0; 7091 _flag_k = FK_TEST; 7092 if (TEST_NZ(_flag_a, _flag_b)) goto L_3100949E; /* 0x31009497: jne 0x3100949e */ 7093 L_31009499: 7094 eax = MEM32(0x310480EC); /* 0x31009499: mov eax, dword ptr [0x310480ec] */ 7095 L_3100949E: 7096 MEM32(ebx + 0x4) = eax; /* 0x3100949E: mov dword ptr [ebx + 4], eax */ 7097 ecx = MEM32(esi + 0x8); /* 0x310094A1: mov ecx, dword ptr [esi + 8] */ 7098 MEM32(ebx + 0x8) = ecx; /* 0x310094A4: mov dword ptr [ebx + 8], ecx */ 7099 edx = MEM32(esi + 0xC); /* 0x310094A7: mov edx, dword ptr [esi + 0xc] */ 7100 MEM32(ebx + 0xC) = edx; /* 0x310094AA: mov dword ptr [ebx + 0xc], edx */ 7101 SET_LO8(ecx, MEM8(eax + (-0x1))); /* 0x310094AD: mov cl, byte ptr [eax - 1] */ 7102 edi = POP32_VAL(esp); /* 0x310094B0: pop edi */ 7103 _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(1) << 24; 7104 SET_LO8(ecx, LO8(ecx) + 1); /* 0x310094B1: inc cl */ 7105 _flag_k = FK_NARROW(FK_INC, 24); 7106 MEM8(eax + (-0x1)) = (uint8_t)(LO8(ecx)); /* 0x310094B3: mov byte ptr [eax - 1], cl */ 7107 esi = POP32_VAL(esp); /* 0x310094B6: pop esi */ 7108 eax = ebx; /* 0x310094B7: mov eax, ebx */ 7109 ebx = POP32_VAL(esp); /* 0x310094B9: pop ebx */ 7110 esp = ebp; /* 0x310094BA: mov esp, ebp */ 7111 ebp = POP32_VAL(esp); /* 0x310094BC: pop ebp */ 7112 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x310094BD: ret 4 */ 7113 L_310094C0: 7114 PUSH32(esp, 1); /* 0x310094C0: push 1 */ 7115 PUSH32(esp, edi); /* 0x310094C2: push edi */ 7116 ecx = ebx; /* 0x310094C3: mov ecx, ebx */ 7117 RECOMP_ICALL(MEM32(0x31048070)); /* 0x310094C5: call dword ptr [0x31048070] */ 7118 RECOMP_FLAGS_IN(); 7119 /* test LO8(eax), LO8(eax) */ /* 0x310094CB: test al, al */ 7120 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 7121 _cf = 0; 7122 _flag_k = FK_NARROW(FK_TEST, 24); 7123 if (TEST_Z(_flag_a, _flag_b)) goto L_310094FC; /* 0x310094CD: je 0x310094fc */ 7124 L_310094CF: 7125 esi = MEM32(esi + 0x4); /* 0x310094CF: mov esi, dword ptr [esi + 4] */ 7126 /* test esi, esi */ /* 0x310094D2: test esi, esi */ 7127 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 7128 _cf = 0; 7129 _flag_k = FK_TEST; 7130 if (TEST_NZ(_flag_a, _flag_b)) goto L_310094DC; /* 0x310094D4: jne 0x310094dc */ 7131 L_310094D6: 7132 esi = MEM32(0x310480EC); /* 0x310094D6: mov esi, dword ptr [0x310480ec] */ 7133 L_310094DC: 7134 ecx = edi; /* 0x310094DC: mov ecx, edi */ 7135 edi = MEM32(ebx + 0x4); /* 0x310094DE: mov edi, dword ptr [ebx + 4] */ 7136 eax = ecx; /* 0x310094E1: mov eax, ecx */ 7137 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x310094E3: shr ecx, 2 */ 7138 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7139 ecx = ecx >> 2u; /* 0x310094E3: shr ecx, 2 */ 7140 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x310094E6: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 7141 ecx = eax; /* 0x310094E8: mov ecx, eax */ 7142 eax = MEM32(ebp + 0x8); /* 0x310094EA: mov eax, dword ptr [ebp + 8] */ 7143 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 7144 ecx = ecx & 3; /* 0x310094ED: and ecx, 3 */ 7145 _cf = 0; 7146 _flag_k = FK_TEST; 7147 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x310094F0: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 7148 ecx = MEM32(ebx + 0x4); /* 0x310094F2: mov ecx, dword ptr [ebx + 4] */ 7149 MEM32(ebx + 0x8) = eax; /* 0x310094F5: mov dword ptr [ebx + 8], eax */ 7150 MEM8(eax + ecx) = (uint8_t)(0); /* 0x310094F8: mov byte ptr [eax + ecx], 0 */ 7151 L_310094FC: 7152 edi = POP32_VAL(esp); /* 0x310094FC: pop edi */ 7153 esi = POP32_VAL(esp); /* 0x310094FD: pop esi */ 7154 eax = ebx; /* 0x310094FE: mov eax, ebx */ 7155 ebx = POP32_VAL(esp); /* 0x31009500: pop ebx */ 7156 esp = ebp; /* 0x31009501: mov esp, ebp */ 7157 ebp = POP32_VAL(esp); /* 0x31009503: pop ebp */ 7158 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x31009504: ret 4 */ 7159 RECOMP_REGS_OUT(); 7160 } 7161 7162 void sub_31009510(void) { 7163 int _fpu_cmp = 0; 7164 uint32_t _cf = 0; 7165 int _df = 1; 7166 uint32_t _flag_k = FK_NONE; 7167 uint32_t _flag_a = 0, _flag_b = 0; 7168 uint32_t _itail_tgt = 0; 7169 RECOMP_REGS_LOCALS 7170 RECOMP_ENTER(0x31009510u); 7171 7172 L_31009510: 7173 PUSH32(esp, ebp); /* 0x31009510: push ebp */ 7174 ebp = esp; /* 0x31009511: mov ebp, esp */ 7175 PUSH32(esp, 0xFFFFFFFFu); /* 0x31009513: push -1 */ 7176 PUSH32(esp, 0x310472F9u); /* 0x31009515: push 0x310472f9 */ 7177 eax = MEM32(FS_BASE + (0)); /* 0x3100951A: mov eax, dword ptr fs:[0] */ 7178 PUSH32(esp, eax); /* 0x31009520: push eax */ 7179 MEM32(FS_BASE + (0)) = esp; /* 0x31009521: mov dword ptr fs:[0], esp */ 7180 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xDCu); 7181 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7182 esp = esp - 0xDCu; /* 0x31009528: sub esp, 0xdc */ 7183 _flag_k = FK_CMP; 7184 eax = MEM32(ebp + 0xC); /* 0x3100952E: mov eax, dword ptr [ebp + 0xc] */ 7185 PUSH32(esp, ebx); /* 0x31009531: push ebx */ 7186 PUSH32(esp, esi); /* 0x31009532: push esi */ 7187 PUSH32(esp, edi); /* 0x31009533: push edi */ 7188 PUSH32(esp, eax); /* 0x31009534: push eax */ 7189 esi = ecx; /* 0x31009535: mov esi, ecx */ 7190 ecx = ebp + (-0xE8); /* 0x31009537: lea ecx, [ebp - 0xe8] */ 7191 PUSH32(esp, 0x31052128u); /* 0x3100953D: push 0x31052128 */ 7192 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7193 ebx = 0; /* 0x31009542: xor ebx, ebx */ 7194 _cf = 0; 7195 _flag_k = FK_TEST; 7196 PUSH32(esp, ecx); /* 0x31009544: push ecx */ 7197 MEM32(ebp + (-0x20)) = ebx; /* 0x31009545: mov dword ptr [ebp - 0x20], ebx */ 7198 RECOMP_ICALL(MEM32(0x31048208)); /* 0x31009548: call dword ptr [0x31048208] */ 7199 RECOMP_FLAGS_IN(); 7200 SET_LO8(edx, MEM8(esi + 0x4)); /* 0x3100954E: mov dl, byte ptr [esi + 4] */ 7201 ecx = MEM32(0x310480F8); /* 0x31009551: mov ecx, dword ptr [0x310480f8] */ 7202 eax = esi + 0x4; /* 0x31009557: lea eax, [esi + 4] */ 7203 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 7204 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7205 esp = esp + 0xCu; /* 0x3100955A: add esp, 0xc */ 7206 _flag_k = FK_ADD; 7207 MEM8(ebp + (-0x1C)) = (uint8_t)(LO8(edx)); /* 0x3100955D: mov byte ptr [ebp - 0x1c], dl */ 7208 MEM32(ebp + (-0x18)) = ebx; /* 0x31009560: mov dword ptr [ebp - 0x18], ebx */ 7209 MEM32(ebp + (-0x14)) = ebx; /* 0x31009563: mov dword ptr [ebp - 0x14], ebx */ 7210 MEM32(ebp + (-0x10)) = ebx; /* 0x31009566: mov dword ptr [ebp - 0x10], ebx */ 7211 edx = MEM32(ecx); /* 0x31009569: mov edx, dword ptr [ecx] */ 7212 PUSH32(esp, edx); /* 0x3100956B: push edx */ 7213 PUSH32(esp, ebx); /* 0x3100956C: push ebx */ 7214 PUSH32(esp, eax); /* 0x3100956D: push eax */ 7215 ecx = ebp + (-0x1C); /* 0x3100956E: lea ecx, [ebp - 0x1c] */ 7216 RECOMP_ICALL(MEM32(0x310480FC)); /* 0x31009571: call dword ptr [0x310480fc] */ 7217 RECOMP_FLAGS_IN(); 7218 edx = MEM32(ebp + (-0x14)); /* 0x31009577: mov edx, dword ptr [ebp - 0x14] */ 7219 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 7220 ecx = ecx | 0xFFFFFFFFu; /* 0x3100957A: or ecx, 0xffffffff */ 7221 _cf = 0; 7222 _flag_k = FK_TEST; 7223 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7224 eax = 0; /* 0x3100957D: xor eax, eax */ 7225 _cf = 0; 7226 _flag_k = FK_TEST; 7227 edi = ebp + (-0xE8); /* 0x3100957F: lea edi, [ebp - 0xe8] */ 7228 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x31009585: repne scasb al, byte ptr es:[edi] */ 7229 eax = MEM32(0x310480F8); /* 0x31009587: mov eax, dword ptr [0x310480f8] */ 7230 ecx = ~ecx; /* 0x3100958C: not ecx */ 7231 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 7232 ecx = ecx - 1; /* 0x3100958E: dec ecx */ 7233 _flag_k = FK_DEC; 7234 esi = ecx; /* 0x3100958F: mov esi, ecx */ 7235 ecx = MEM32(eax); /* 0x31009591: mov ecx, dword ptr [eax] */ 7236 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 7237 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7238 ecx = ecx - edx; /* 0x31009593: sub ecx, edx */ 7239 _flag_k = FK_CMP; 7240 /* cmp ecx, esi */ /* 0x31009595: cmp ecx, esi */ 7241 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi); 7242 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7243 _flag_k = FK_CMP; 7244 MEM32(ebp + (-0x4)) = ebx; /* 0x31009597: mov dword ptr [ebp - 4], ebx */ 7245 if (CMP_A(_flag_a, _flag_b)) goto L_310095A2; /* 0x3100959A: ja 0x310095a2 */ 7246 L_3100959C: 7247 RECOMP_ICALL(MEM32(0x310480B0)); /* 0x3100959C: call dword ptr [0x310480b0] */ 7248 RECOMP_FLAGS_IN(); 7249 L_310095A2: 7250 /* cmp esi, ebx */ /* 0x310095A2: cmp esi, ebx */ 7251 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 7252 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7253 _flag_k = FK_CMP; 7254 if (CMP_BE(_flag_a, _flag_b)) goto L_310095E7; /* 0x310095A4: jbe 0x310095e7 */ 7255 L_310095A6: 7256 edx = MEM32(ebp + (-0x14)); /* 0x310095A6: mov edx, dword ptr [ebp - 0x14] */ 7257 ebx = edx + esi; /* 0x310095A9: lea ebx, [edx + esi] */ 7258 PUSH32(esp, 0); /* 0x310095AC: push 0 */ 7259 PUSH32(esp, ebx); /* 0x310095AE: push ebx */ 7260 ecx = ebp + (-0x1C); /* 0x310095AF: lea ecx, [ebp - 0x1c] */ 7261 RECOMP_ICALL(MEM32(0x31048070)); /* 0x310095B2: call dword ptr [0x31048070] */ 7262 RECOMP_FLAGS_IN(); 7263 /* test LO8(eax), LO8(eax) */ /* 0x310095B8: test al, al */ 7264 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 7265 _cf = 0; 7266 _flag_k = FK_NARROW(FK_TEST, 24); 7267 if (TEST_Z(_flag_a, _flag_b)) goto L_310095E5; /* 0x310095BA: je 0x310095e5 */ 7268 L_310095BC: 7269 eax = MEM32(ebp + (-0x18)); /* 0x310095BC: mov eax, dword ptr [ebp - 0x18] */ 7270 edx = MEM32(ebp + (-0x14)); /* 0x310095BF: mov edx, dword ptr [ebp - 0x14] */ 7271 ecx = esi; /* 0x310095C2: mov ecx, esi */ 7272 edi = edx + eax; /* 0x310095C4: lea edi, [edx + eax] */ 7273 eax = ecx; /* 0x310095C7: mov eax, ecx */ 7274 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x310095C9: shr ecx, 2 */ 7275 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7276 ecx = ecx >> 2u; /* 0x310095C9: shr ecx, 2 */ 7277 esi = ebp + (-0xE8); /* 0x310095CC: lea esi, [ebp - 0xe8] */ 7278 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x310095D2: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 7279 ecx = eax; /* 0x310095D4: mov ecx, eax */ 7280 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 7281 ecx = ecx & 3; /* 0x310095D6: and ecx, 3 */ 7282 _cf = 0; 7283 _flag_k = FK_TEST; 7284 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x310095D9: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 7285 ecx = MEM32(ebp + (-0x18)); /* 0x310095DB: mov ecx, dword ptr [ebp - 0x18] */ 7286 MEM32(ebp + (-0x14)) = ebx; /* 0x310095DE: mov dword ptr [ebp - 0x14], ebx */ 7287 MEM8(ecx + ebx) = (uint8_t)(0); /* 0x310095E1: mov byte ptr [ecx + ebx], 0 */ 7288 L_310095E5: 7289 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7290 ebx = 0; /* 0x310095E5: xor ebx, ebx */ 7291 _cf = 0; 7292 _flag_k = FK_TEST; 7293 L_310095E7: 7294 esi = MEM32(ebp + 0x8); /* 0x310095E7: mov esi, dword ptr [ebp + 8] */ 7295 SET_LO8(edx, MEM8(ebp + (-0x1C))); /* 0x310095EA: mov dl, byte ptr [ebp - 0x1c] */ 7296 MEM8(esi) = (uint8_t)(LO8(edx)); /* 0x310095ED: mov byte ptr [esi], dl */ 7297 MEM32(esi + 0x4) = ebx; /* 0x310095EF: mov dword ptr [esi + 4], ebx */ 7298 MEM32(esi + 0x8) = ebx; /* 0x310095F2: mov dword ptr [esi + 8], ebx */ 7299 MEM32(esi + 0xC) = ebx; /* 0x310095F5: mov dword ptr [esi + 0xc], ebx */ 7300 eax = MEM32(0x310480F8); /* 0x310095F8: mov eax, dword ptr [0x310480f8] */ 7301 ecx = MEM32(eax); /* 0x310095FD: mov ecx, dword ptr [eax] */ 7302 PUSH32(esp, ecx); /* 0x310095FF: push ecx */ 7303 PUSH32(esp, ebx); /* 0x31009600: push ebx */ 7304 edx = ebp + (-0x1C); /* 0x31009601: lea edx, [ebp - 0x1c] */ 7305 PUSH32(esp, edx); /* 0x31009604: push edx */ 7306 ecx = esi; /* 0x31009605: mov ecx, esi */ 7307 RECOMP_ICALL(MEM32(0x310480FC)); /* 0x31009607: call dword ptr [0x310480fc] */ 7308 RECOMP_FLAGS_IN(); 7309 ecx = MEM32(ebp + (-0x18)); /* 0x3100960D: mov ecx, dword ptr [ebp - 0x18] */ 7310 /* cmp ecx, ebx */ /* 0x31009610: cmp ecx, ebx */ 7311 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx); 7312 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7313 _flag_k = FK_CMP; 7314 if (CMP_EQ(_flag_a, _flag_b)) goto L_31009630; /* 0x31009612: je 0x31009630 */ 7315 L_31009614: 7316 SET_LO8(eax, MEM8(ecx + (-0x1))); /* 0x31009614: mov al, byte ptr [ecx - 1] */ 7317 /* test LO8(eax), LO8(eax) */ /* 0x31009617: test al, al */ 7318 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 7319 _cf = 0; 7320 _flag_k = FK_NARROW(FK_TEST, 24); 7321 if (TEST_Z(_flag_a, _flag_b)) goto L_31009626; /* 0x31009619: je 0x31009626 */ 7322 L_3100961B: 7323 /* cmp LO8(eax), 0xFFu */ /* 0x3100961B: cmp al, 0xff */ 7324 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 7325 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7326 _flag_k = FK_NARROW(FK_CMP, 24); 7327 if (CMP_EQ(_flag_a, _flag_b)) goto L_31009626; /* 0x3100961D: je 0x31009626 */ 7328 L_3100961F: 7329 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 7330 SET_LO8(eax, LO8(eax) - 1); /* 0x3100961F: dec al */ 7331 _flag_k = FK_NARROW(FK_DEC, 24); 7332 MEM8(ecx + (-0x1)) = (uint8_t)(LO8(eax)); /* 0x31009621: mov byte ptr [ecx - 1], al */ 7333 goto L_31009630; /* 0x31009624: jmp 0x31009630 */ 7334 L_31009626: 7335 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 7336 ecx = ecx - 1; /* 0x31009626: dec ecx */ 7337 _flag_k = FK_DEC; 7338 PUSH32(esp, ecx); /* 0x31009627: push ecx */ 7339 RECOMP_ICALL(0x31046858u); /* 0x31009628: call 0x31046858 */ /* not lifted */ 7340 RECOMP_FLAGS_IN(); 7341 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7342 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7343 esp = esp + 4; /* 0x3100962D: add esp, 4 */ 7344 _flag_k = FK_ADD; 7345 L_31009630: 7346 ecx = MEM32(ebp + (-0xC)); /* 0x31009630: mov ecx, dword ptr [ebp - 0xc] */ 7347 edi = POP32_VAL(esp); /* 0x31009633: pop edi */ 7348 eax = esi; /* 0x31009634: mov eax, esi */ 7349 esi = POP32_VAL(esp); /* 0x31009636: pop esi */ 7350 ebx = POP32_VAL(esp); /* 0x31009637: pop ebx */ 7351 MEM32(FS_BASE + (0)) = ecx; /* 0x31009638: mov dword ptr fs:[0], ecx */ 7352 esp = ebp; /* 0x3100963F: mov esp, ebp */ 7353 ebp = POP32_VAL(esp); /* 0x31009641: pop ebp */ 7354 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31009642: ret 8 */ 7355 RECOMP_REGS_OUT(); 7356 } 7357 7358 void sub_31009650(void) { 7359 int _fpu_cmp = 0; 7360 uint32_t _cf = 0; 7361 int _df = 1; 7362 uint32_t _flag_k = FK_NONE; 7363 uint32_t _flag_a = 0, _flag_b = 0; 7364 uint32_t _itail_tgt = 0; 7365 RECOMP_REGS_LOCALS 7366 RECOMP_ENTER(0x31009650u); 7367 7368 L_31009650: 7369 PUSH32(esp, ebp); /* 0x31009650: push ebp */ 7370 ebp = esp; /* 0x31009651: mov ebp, esp */ 7371 PUSH32(esp, 0xFFFFFFFFu); /* 0x31009653: push -1 */ 7372 PUSH32(esp, 0x31047319u); /* 0x31009655: push 0x31047319 */ 7373 eax = MEM32(FS_BASE + (0)); /* 0x3100965A: mov eax, dword ptr fs:[0] */ 7374 PUSH32(esp, eax); /* 0x31009660: push eax */ 7375 MEM32(FS_BASE + (0)) = esp; /* 0x31009661: mov dword ptr fs:[0], esp */ 7376 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xDCu); 7377 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7378 esp = esp - 0xDCu; /* 0x31009668: sub esp, 0xdc */ 7379 _flag_k = FK_CMP; 7380 SET_LO8(eax, MEM8(ebp + 0xF)); /* 0x3100966E: mov al, byte ptr [ebp + 0xf] */ 7381 PUSH32(esp, ebx); /* 0x31009671: push ebx */ 7382 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7383 ebx = 0; /* 0x31009672: xor ebx, ebx */ 7384 _cf = 0; 7385 _flag_k = FK_TEST; 7386 PUSH32(esp, esi); /* 0x31009674: push esi */ 7387 PUSH32(esp, edi); /* 0x31009675: push edi */ 7388 esi = ecx; /* 0x31009676: mov esi, ecx */ 7389 MEM32(ebp + (-0x20)) = ebx; /* 0x31009678: mov dword ptr [ebp - 0x20], ebx */ 7390 MEM8(ebp + (-0x1C)) = (uint8_t)(LO8(eax)); /* 0x3100967B: mov byte ptr [ebp - 0x1c], al */ 7391 MEM32(ebp + (-0x18)) = ebx; /* 0x3100967E: mov dword ptr [ebp - 0x18], ebx */ 7392 MEM32(ebp + (-0x14)) = ebx; /* 0x31009681: mov dword ptr [ebp - 0x14], ebx */ 7393 MEM32(ebp + (-0x10)) = ebx; /* 0x31009684: mov dword ptr [ebp - 0x10], ebx */ 7394 ecx = MEM32(ebp + 0xC); /* 0x31009687: mov ecx, dword ptr [ebp + 0xc] */ 7395 PUSH32(esp, ecx); /* 0x3100968A: push ecx */ 7396 edx = ebp + (-0xE8); /* 0x3100968B: lea edx, [ebp - 0xe8] */ 7397 PUSH32(esp, 0x31052138u); /* 0x31009691: push 0x31052138 */ 7398 PUSH32(esp, edx); /* 0x31009696: push edx */ 7399 MEM32(ebp + (-0x4)) = ebx; /* 0x31009697: mov dword ptr [ebp - 4], ebx */ 7400 RECOMP_ICALL(MEM32(0x31048208)); /* 0x3100969A: call dword ptr [0x31048208] */ 7401 RECOMP_FLAGS_IN(); 7402 eax = MEM32(0x310480F8); /* 0x310096A0: mov eax, dword ptr [0x310480f8] */ 7403 ecx = MEM32(eax); /* 0x310096A5: mov ecx, dword ptr [eax] */ 7404 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 7405 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7406 esp = esp + 0xCu; /* 0x310096A7: add esp, 0xc */ 7407 _flag_k = FK_ADD; 7408 PUSH32(esp, ecx); /* 0x310096AA: push ecx */ 7409 PUSH32(esp, ebx); /* 0x310096AB: push ebx */ 7410 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 7411 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7412 esi = esi + 4; /* 0x310096AC: add esi, 4 */ 7413 _flag_k = FK_ADD; 7414 PUSH32(esp, esi); /* 0x310096AF: push esi */ 7415 ecx = ebp + (-0x1C); /* 0x310096B0: lea ecx, [ebp - 0x1c] */ 7416 RECOMP_ICALL(MEM32(0x310480FC)); /* 0x310096B3: call dword ptr [0x310480fc] */ 7417 RECOMP_FLAGS_IN(); 7418 edx = MEM32(0x310480F8); /* 0x310096B9: mov edx, dword ptr [0x310480f8] */ 7419 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7420 eax = 0; /* 0x310096BF: xor eax, eax */ 7421 _cf = 0; 7422 _flag_k = FK_TEST; 7423 _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu)); 7424 ecx = ecx | 0xFFFFFFFFu; /* 0x310096C1: or ecx, 0xffffffff */ 7425 _cf = 0; 7426 _flag_k = FK_TEST; 7427 edi = ebp + (-0xE8); /* 0x310096C4: lea edi, [ebp - 0xe8] */ 7428 if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x310096CA: repne scasb al, byte ptr es:[edi] */ 7429 eax = MEM32(edx); /* 0x310096CC: mov eax, dword ptr [edx] */ 7430 edx = MEM32(ebp + (-0x14)); /* 0x310096CE: mov edx, dword ptr [ebp - 0x14] */ 7431 ecx = ~ecx; /* 0x310096D1: not ecx */ 7432 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 7433 ecx = ecx - 1; /* 0x310096D3: dec ecx */ 7434 _flag_k = FK_DEC; 7435 esi = ecx; /* 0x310096D4: mov esi, ecx */ 7436 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 7437 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7438 eax = eax - edx; /* 0x310096D6: sub eax, edx */ 7439 _flag_k = FK_CMP; 7440 /* cmp eax, esi */ /* 0x310096D8: cmp eax, esi */ 7441 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 7442 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7443 _flag_k = FK_CMP; 7444 if (CMP_A(_flag_a, _flag_b)) goto L_310096E2; /* 0x310096DA: ja 0x310096e2 */ 7445 L_310096DC: 7446 RECOMP_ICALL(MEM32(0x310480B0)); /* 0x310096DC: call dword ptr [0x310480b0] */ 7447 RECOMP_FLAGS_IN(); 7448 L_310096E2: 7449 /* cmp esi, ebx */ /* 0x310096E2: cmp esi, ebx */ 7450 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 7451 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7452 _flag_k = FK_CMP; 7453 if (CMP_BE(_flag_a, _flag_b)) goto L_31009727; /* 0x310096E4: jbe 0x31009727 */ 7454 L_310096E6: 7455 ecx = MEM32(ebp + (-0x14)); /* 0x310096E6: mov ecx, dword ptr [ebp - 0x14] */ 7456 ebx = ecx + esi; /* 0x310096E9: lea ebx, [ecx + esi] */ 7457 PUSH32(esp, 0); /* 0x310096EC: push 0 */ 7458 PUSH32(esp, ebx); /* 0x310096EE: push ebx */ 7459 ecx = ebp + (-0x1C); /* 0x310096EF: lea ecx, [ebp - 0x1c] */ 7460 RECOMP_ICALL(MEM32(0x31048070)); /* 0x310096F2: call dword ptr [0x31048070] */ 7461 RECOMP_FLAGS_IN(); 7462 /* test LO8(eax), LO8(eax) */ /* 0x310096F8: test al, al */ 7463 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 7464 _cf = 0; 7465 _flag_k = FK_NARROW(FK_TEST, 24); 7466 if (TEST_Z(_flag_a, _flag_b)) goto L_31009725; /* 0x310096FA: je 0x31009725 */ 7467 L_310096FC: 7468 eax = MEM32(ebp + (-0x14)); /* 0x310096FC: mov eax, dword ptr [ebp - 0x14] */ 7469 edx = MEM32(ebp + (-0x18)); /* 0x310096FF: mov edx, dword ptr [ebp - 0x18] */ 7470 ecx = esi; /* 0x31009702: mov ecx, esi */ 7471 edi = eax + edx; /* 0x31009704: lea edi, [eax + edx] */ 7472 edx = ecx; /* 0x31009707: mov edx, ecx */ 7473 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x31009709: shr ecx, 2 */ 7474 if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7475 ecx = ecx >> 2u; /* 0x31009709: shr ecx, 2 */ 7476 esi = ebp + (-0xE8); /* 0x3100970C: lea esi, [ebp - 0xe8] */ 7477 if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x31009712: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; } 7478 ecx = edx; /* 0x31009714: mov ecx, edx */ 7479 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3); 7480 ecx = ecx & 3; /* 0x31009716: and ecx, 3 */ 7481 _cf = 0; 7482 _flag_k = FK_TEST; 7483 if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x31009719: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; } 7484 eax = MEM32(ebp + (-0x18)); /* 0x3100971B: mov eax, dword ptr [ebp - 0x18] */ 7485 MEM32(ebp + (-0x14)) = ebx; /* 0x3100971E: mov dword ptr [ebp - 0x14], ebx */ 7486 MEM8(eax + ebx) = (uint8_t)(0); /* 0x31009721: mov byte ptr [eax + ebx], 0 */ 7487 L_31009725: 7488 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7489 ebx = 0; /* 0x31009725: xor ebx, ebx */ 7490 _cf = 0; 7491 _flag_k = FK_TEST; 7492 L_31009727: 7493 esi = MEM32(ebp + 0x8); /* 0x31009727: mov esi, dword ptr [ebp + 8] */ 7494 SET_LO8(ecx, MEM8(ebp + (-0x1C))); /* 0x3100972A: mov cl, byte ptr [ebp - 0x1c] */ 7495 MEM8(esi) = (uint8_t)(LO8(ecx)); /* 0x3100972D: mov byte ptr [esi], cl */ 7496 MEM32(esi + 0x4) = ebx; /* 0x3100972F: mov dword ptr [esi + 4], ebx */ 7497 MEM32(esi + 0x8) = ebx; /* 0x31009732: mov dword ptr [esi + 8], ebx */ 7498 MEM32(esi + 0xC) = ebx; /* 0x31009735: mov dword ptr [esi + 0xc], ebx */ 7499 edx = MEM32(0x310480F8); /* 0x31009738: mov edx, dword ptr [0x310480f8] */ 7500 eax = MEM32(edx); /* 0x3100973E: mov eax, dword ptr [edx] */ 7501 PUSH32(esp, eax); /* 0x31009740: push eax */ 7502 PUSH32(esp, ebx); /* 0x31009741: push ebx */ 7503 ecx = ebp + (-0x1C); /* 0x31009742: lea ecx, [ebp - 0x1c] */ 7504 PUSH32(esp, ecx); /* 0x31009745: push ecx */ 7505 ecx = esi; /* 0x31009746: mov ecx, esi */ 7506 RECOMP_ICALL(MEM32(0x310480FC)); /* 0x31009748: call dword ptr [0x310480fc] */ 7507 RECOMP_FLAGS_IN(); 7508 ecx = MEM32(ebp + (-0x18)); /* 0x3100974E: mov ecx, dword ptr [ebp - 0x18] */ 7509 /* cmp ecx, ebx */ /* 0x31009751: cmp ecx, ebx */ 7510 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx); 7511 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7512 _flag_k = FK_CMP; 7513 if (CMP_EQ(_flag_a, _flag_b)) goto L_31009771; /* 0x31009753: je 0x31009771 */ 7514 L_31009755: 7515 SET_LO8(eax, MEM8(ecx + (-0x1))); /* 0x31009755: mov al, byte ptr [ecx - 1] */ 7516 /* test LO8(eax), LO8(eax) */ /* 0x31009758: test al, al */ 7517 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 7518 _cf = 0; 7519 _flag_k = FK_NARROW(FK_TEST, 24); 7520 if (TEST_Z(_flag_a, _flag_b)) goto L_31009767; /* 0x3100975A: je 0x31009767 */ 7521 L_3100975C: 7522 /* cmp LO8(eax), 0xFFu */ /* 0x3100975C: cmp al, 0xff */ 7523 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24; 7524 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7525 _flag_k = FK_NARROW(FK_CMP, 24); 7526 if (CMP_EQ(_flag_a, _flag_b)) goto L_31009767; /* 0x3100975E: je 0x31009767 */ 7527 L_31009760: 7528 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 7529 SET_LO8(eax, LO8(eax) - 1); /* 0x31009760: dec al */ 7530 _flag_k = FK_NARROW(FK_DEC, 24); 7531 MEM8(ecx + (-0x1)) = (uint8_t)(LO8(eax)); /* 0x31009762: mov byte ptr [ecx - 1], al */ 7532 goto L_31009771; /* 0x31009765: jmp 0x31009771 */ 7533 L_31009767: 7534 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 7535 ecx = ecx - 1; /* 0x31009767: dec ecx */ 7536 _flag_k = FK_DEC; 7537 PUSH32(esp, ecx); /* 0x31009768: push ecx */ 7538 RECOMP_ICALL(0x31046858u); /* 0x31009769: call 0x31046858 */ /* not lifted */ 7539 RECOMP_FLAGS_IN(); 7540 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7541 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7542 esp = esp + 4; /* 0x3100976E: add esp, 4 */ 7543 _flag_k = FK_ADD; 7544 L_31009771: 7545 ecx = MEM32(ebp + (-0xC)); /* 0x31009771: mov ecx, dword ptr [ebp - 0xc] */ 7546 edi = POP32_VAL(esp); /* 0x31009774: pop edi */ 7547 eax = esi; /* 0x31009775: mov eax, esi */ 7548 esi = POP32_VAL(esp); /* 0x31009777: pop esi */ 7549 ebx = POP32_VAL(esp); /* 0x31009778: pop ebx */ 7550 MEM32(FS_BASE + (0)) = ecx; /* 0x31009779: mov dword ptr fs:[0], ecx */ 7551 esp = ebp; /* 0x31009780: mov esp, ebp */ 7552 ebp = POP32_VAL(esp); /* 0x31009782: pop ebp */ 7553 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31009783: ret 8 */ 7554 RECOMP_REGS_OUT(); 7555 } 7556 7557 void sub_31009790(void) { 7558 int _fpu_cmp = 0; 7559 uint32_t _cf = 0; 7560 int _df = 1; 7561 uint32_t _flag_k = FK_NONE; 7562 uint32_t _flag_a = 0, _flag_b = 0; 7563 uint32_t _itail_tgt = 0; 7564 RECOMP_REGS_LOCALS 7565 RECOMP_ENTER(0x31009790u); 7566 7567 L_31009790: 7568 PUSH32(esp, ebp); /* 0x31009790: push ebp */ 7569 ebp = esp; /* 0x31009791: mov ebp, esp */ 7570 edx = MEM32(ebp + 0x8); /* 0x31009793: mov edx, dword ptr [ebp + 8] */ 7571 eax = MEM32(ecx); /* 0x31009796: mov eax, dword ptr [ecx] */ 7572 PUSH32(esp, edx); /* 0x31009798: push edx */ 7573 RECOMP_ICALL(MEM32(eax)); /* 0x31009799: call dword ptr [eax] */ 7574 RECOMP_FLAGS_IN(); 7575 ebp = POP32_VAL(esp); /* 0x3100979B: pop ebp */ 7576 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3100979C: ret 4 */ 7577 RECOMP_REGS_OUT(); 7578 } 7579 7580 void sub_310097A0(void) { 7581 int _fpu_cmp = 0; 7582 uint32_t _cf = 0; 7583 int _df = 1; 7584 uint32_t _flag_k = FK_NONE; 7585 uint32_t _flag_a = 0, _flag_b = 0; 7586 uint32_t _itail_tgt = 0; 7587 RECOMP_REGS_LOCALS 7588 RECOMP_ENTER(0x310097A0u); 7589 7590 L_310097A0: 7591 PUSH32(esp, ebp); /* 0x310097A0: push ebp */ 7592 ebp = esp; /* 0x310097A1: mov ebp, esp */ 7593 PUSH32(esp, 0xFFFFFFFFu); /* 0x310097A3: push -1 */ 7594 PUSH32(esp, 0x31047340u); /* 0x310097A5: push 0x31047340 */ 7595 eax = MEM32(FS_BASE + (0)); /* 0x310097AA: mov eax, dword ptr fs:[0] */ 7596 PUSH32(esp, eax); /* 0x310097B0: push eax */ 7597 MEM32(FS_BASE + (0)) = esp; /* 0x310097B1: mov dword ptr fs:[0], esp */ 7598 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 7599 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7600 esp = esp - 8; /* 0x310097B8: sub esp, 8 */ 7601 _flag_k = FK_CMP; 7602 PUSH32(esp, ebx); /* 0x310097BB: push ebx */ 7603 PUSH32(esp, esi); /* 0x310097BC: push esi */ 7604 esi = ecx; /* 0x310097BD: mov esi, ecx */ 7605 PUSH32(esp, edi); /* 0x310097BF: push edi */ 7606 ecx = ebp + (-0x14); /* 0x310097C0: lea ecx, [ebp - 0x14] */ 7607 RECOMP_ICALL(0x310045B0u); /* 0x310097C3: call 0x310045b0 */ /* not lifted */ 7608 RECOMP_FLAGS_IN(); 7609 ebx = MEM32(ebp + 0xC); /* 0x310097C8: mov ebx, dword ptr [ebp + 0xc] */ 7610 PUSH32(esp, eax); /* 0x310097CB: push eax */ 7611 ecx = ebx; /* 0x310097CC: mov ecx, ebx */ 7612 MEM32(ebp + (-0x4)) = 0; /* 0x310097CE: mov dword ptr [ebp - 4], 0 */ 7613 RECOMP_ICALL(0x310046E0u); /* 0x310097D5: call 0x310046e0 */ /* not lifted */ 7614 RECOMP_FLAGS_IN(); 7615 ecx = ebp + (-0x14); /* 0x310097DA: lea ecx, [ebp - 0x14] */ 7616 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x310097DD: mov dword ptr [ebp - 4], 0xffffffff */ 7617 RECOMP_ICALL(0x31004760u); /* 0x310097E4: call 0x31004760 */ /* not lifted */ 7618 RECOMP_FLAGS_IN(); 7619 edi = MEM32(ebp + 0x10); /* 0x310097E9: mov edi, dword ptr [ebp + 0x10] */ 7620 /* test edi, edi */ /* 0x310097EC: test edi, edi */ 7621 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 7622 _cf = 0; 7623 _flag_k = FK_TEST; 7624 if (TEST_NS(_flag_a, _flag_b)) goto L_31009805; /* 0x310097EE: jge 0x31009805 */ 7625 L_310097F0: 7626 edi = POP32_VAL(esp); /* 0x310097F0: pop edi */ 7627 esi = POP32_VAL(esp); /* 0x310097F1: pop esi */ 7628 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7629 eax = 0; /* 0x310097F2: xor eax, eax */ 7630 _cf = 0; 7631 _flag_k = FK_TEST; 7632 ebx = POP32_VAL(esp); /* 0x310097F4: pop ebx */ 7633 ecx = MEM32(ebp + (-0xC)); /* 0x310097F5: mov ecx, dword ptr [ebp - 0xc] */ 7634 MEM32(FS_BASE + (0)) = ecx; /* 0x310097F8: mov dword ptr fs:[0], ecx */ 7635 esp = ebp; /* 0x310097FF: mov esp, ebp */ 7636 ebp = POP32_VAL(esp); /* 0x31009801: pop ebp */ 7637 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31009802: ret 0xc */ 7638 L_31009805: 7639 ecx = MEM32(ebp + 0x8); /* 0x31009805: mov ecx, dword ptr [ebp + 8] */ 7640 eax = MEM32(esi); /* 0x31009808: mov eax, dword ptr [esi] */ 7641 PUSH32(esp, ecx); /* 0x3100980A: push ecx */ 7642 edx = ebp + (-0x10); /* 0x3100980B: lea edx, [ebp - 0x10] */ 7643 PUSH32(esp, edx); /* 0x3100980E: push edx */ 7644 ecx = esi; /* 0x3100980F: mov ecx, esi */ 7645 RECOMP_ICALL(MEM32(eax + 0xC)); /* 0x31009811: call dword ptr [eax + 0xc] */ 7646 RECOMP_FLAGS_IN(); 7647 eax = MEM32(ebp + (-0x10)); /* 0x31009814: mov eax, dword ptr [ebp - 0x10] */ 7648 ecx = MEM32(eax + 0x4); /* 0x31009817: mov ecx, dword ptr [eax + 4] */ 7649 /* test ecx, ecx */ /* 0x3100981A: test ecx, ecx */ 7650 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 7651 _cf = 0; 7652 _flag_k = FK_TEST; 7653 MEM32(ebp + (-0x4)) = 1; /* 0x3100981C: mov dword ptr [ebp - 4], 1 */ 7654 if (TEST_NZ(_flag_a, _flag_b)) goto L_31009849; /* 0x31009823: jne 0x31009849 */ 7655 L_31009825: 7656 ecx = ebp + (-0x10); /* 0x31009825: lea ecx, [ebp - 0x10] */ 7657 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x31009828: mov dword ptr [ebp - 4], 0xffffffff */ 7658 RECOMP_ICALL(0x31004760u); /* 0x3100982F: call 0x31004760 */ /* not lifted */ 7659 RECOMP_FLAGS_IN(); 7660 edi = POP32_VAL(esp); /* 0x31009834: pop edi */ 7661 esi = POP32_VAL(esp); /* 0x31009835: pop esi */ 7662 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7663 eax = 0; /* 0x31009836: xor eax, eax */ 7664 _cf = 0; 7665 _flag_k = FK_TEST; 7666 ebx = POP32_VAL(esp); /* 0x31009838: pop ebx */ 7667 ecx = MEM32(ebp + (-0xC)); /* 0x31009839: mov ecx, dword ptr [ebp - 0xc] */ 7668 MEM32(FS_BASE + (0)) = ecx; /* 0x3100983C: mov dword ptr fs:[0], ecx */ 7669 esp = ebp; /* 0x31009843: mov esp, ebp */ 7670 ebp = POP32_VAL(esp); /* 0x31009845: pop ebp */ 7671 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x31009846: ret 0xc */ 7672 L_31009849: 7673 /* test edi, edi */ /* 0x31009849: test edi, edi */ 7674 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 7675 _cf = 0; 7676 _flag_k = FK_TEST; 7677 if (TEST_NZ(_flag_a, _flag_b)) goto L_31009858; /* 0x3100984B: jne 0x31009858 */ 7678 L_3100984D: 7679 ecx = ebp + (-0x10); /* 0x3100984D: lea ecx, [ebp - 0x10] */ 7680 PUSH32(esp, ecx); /* 0x31009850: push ecx */ 7681 ecx = ebx; /* 0x31009851: mov ecx, ebx */ 7682 RECOMP_ICALL(0x310046E0u); /* 0x31009853: call 0x310046e0 */ /* not lifted */ 7683 RECOMP_FLAGS_IN(); 7684 L_31009858: 7685 ecx = ebp + (-0x10); /* 0x31009858: lea ecx, [ebp - 0x10] */ 7686 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100985B: mov dword ptr [ebp - 4], 0xffffffff */ 7687 RECOMP_ICALL(0x31004760u); /* 0x31009862: call 0x31004760 */ /* not lifted */ 7688 RECOMP_FLAGS_IN(); 7689 ecx = MEM32(ebp + (-0xC)); /* 0x31009867: mov ecx, dword ptr [ebp - 0xc] */ 7690 edi = POP32_VAL(esp); /* 0x3100986A: pop edi */ 7691 esi = POP32_VAL(esp); /* 0x3100986B: pop esi */ 7692 eax = 1; /* 0x3100986C: mov eax, 1 */ 7693 ebx = POP32_VAL(esp); /* 0x31009871: pop ebx */ 7694 MEM32(FS_BASE + (0)) = ecx; /* 0x31009872: mov dword ptr fs:[0], ecx */ 7695 esp = ebp; /* 0x31009879: mov esp, ebp */ 7696 ebp = POP32_VAL(esp); /* 0x3100987B: pop ebp */ 7697 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x3100987C: ret 0xc */ 7698 RECOMP_REGS_OUT(); 7699 } 7700 7701 void sub_31009880(void) { 7702 int _fpu_cmp = 0; 7703 uint32_t _cf = 0; 7704 int _df = 1; 7705 uint32_t _flag_k = FK_NONE; 7706 uint32_t _flag_a = 0, _flag_b = 0; 7707 uint32_t _itail_tgt = 0; 7708 RECOMP_REGS_LOCALS 7709 RECOMP_ENTER(0x31009880u); 7710 7711 L_31009880: 7712 PUSH32(esp, ebp); /* 0x31009880: push ebp */ 7713 ebp = esp; /* 0x31009881: mov ebp, esp */ 7714 PUSH32(esp, ecx); /* 0x31009883: push ecx */ 7715 PUSH32(esp, ebx); /* 0x31009884: push ebx */ 7716 PUSH32(esp, esi); /* 0x31009885: push esi */ 7717 PUSH32(esp, edi); /* 0x31009886: push edi */ 7718 edi = MEM32(ebp + 0xC); /* 0x31009887: mov edi, dword ptr [ebp + 0xc] */ 7719 eax = MEM32(edi + 0x4); /* 0x3100988A: mov eax, dword ptr [edi + 4] */ 7720 /* test eax, eax */ /* 0x3100988D: test eax, eax */ 7721 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7722 _cf = 0; 7723 _flag_k = FK_TEST; 7724 ebx = ecx; /* 0x3100988F: mov ebx, ecx */ 7725 if (TEST_Z(_flag_a, _flag_b)) goto L_310099BA; /* 0x31009891: je 0x310099ba */ 7726 L_31009897: 7727 ecx = MEM32(edi + 0x8); /* 0x31009897: mov ecx, dword ptr [edi + 8] */ 7728 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7729 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7730 ecx = ecx - eax; /* 0x3100989A: sub ecx, eax */ 7731 _flag_k = FK_CMP; 7732 /* test ecx, 0xFFFFFFFCu */ /* 0x3100989C: test ecx, 0xfffffffc */ 7733 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xFFFFFFFCu); 7734 _cf = 0; 7735 _flag_k = FK_TEST; 7736 if (TEST_Z(_flag_a, _flag_b)) goto L_310099BA; /* 0x310098A2: je 0x310099ba */ 7737 L_310098A8: 7738 edx = MEM32(ebp + 0x8); /* 0x310098A8: mov edx, dword ptr [ebp + 8] */ 7739 ecx = MEM32(edx); /* 0x310098AB: mov ecx, dword ptr [edx] */ 7740 MEM32(ebp + (-0x4)) = ecx; /* 0x310098AD: mov dword ptr [ebp - 4], ecx */ 7741 edx = MEM32(eax); /* 0x310098B0: mov edx, dword ptr [eax] */ 7742 eax = MEM32(ebx); /* 0x310098B2: mov eax, dword ptr [ebx] */ 7743 ecx = ebp + 0xC; /* 0x310098B4: lea ecx, [ebp + 0xc] */ 7744 MEM32(ebp + 0xC) = edx; /* 0x310098B7: mov dword ptr [ebp + 0xc], edx */ 7745 PUSH32(esp, ecx); /* 0x310098BA: push ecx */ 7746 edx = ebp + (-0x4); /* 0x310098BB: lea edx, [ebp - 4] */ 7747 PUSH32(esp, edx); /* 0x310098BE: push edx */ 7748 ecx = ebx; /* 0x310098BF: mov ecx, ebx */ 7749 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7750 esi = 0; /* 0x310098C1: xor esi, esi */ 7751 _cf = 0; 7752 _flag_k = FK_TEST; 7753 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x310098C3: call dword ptr [eax + 0x10] */ 7754 RECOMP_FLAGS_IN(); 7755 /* test eax, eax */ /* 0x310098C6: test eax, eax */ 7756 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7757 _cf = 0; 7758 _flag_k = FK_TEST; 7759 ecx = MEM32(edi + 0x4); /* 0x310098C8: mov ecx, dword ptr [edi + 4] */ 7760 edx = MEM32(ebp + 0xC); /* 0x310098CB: mov edx, dword ptr [ebp + 0xc] */ 7761 MEM32(ecx) = edx; /* 0x310098CE: mov dword ptr [ecx], edx */ 7762 if (TEST_NZ(_flag_a, _flag_b)) goto L_3100993F; /* 0x310098D0: jne 0x3100993f */ 7763 L_310098D2: 7764 ecx = MEM32(ebp + 0x8); /* 0x310098D2: mov ecx, dword ptr [ebp + 8] */ 7765 edx = MEM32(ecx); /* 0x310098D5: mov edx, dword ptr [ecx] */ 7766 ecx = MEM32(ebp + (-0x4)); /* 0x310098D7: mov ecx, dword ptr [ebp - 4] */ 7767 /* cmp edx, ecx */ /* 0x310098DA: cmp edx, ecx */ 7768 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx); 7769 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7770 _flag_k = FK_CMP; 7771 if (CMP_NE(_flag_a, _flag_b)) goto L_3100992A; /* 0x310098DC: jne 0x3100992a */ 7772 L_310098DE: 7773 edx = MEM32(ebp + 0xC); /* 0x310098DE: mov edx, dword ptr [ebp + 0xc] */ 7774 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1); 7775 edx = edx + 1; /* 0x310098E1: inc edx */ 7776 _flag_k = FK_INC; 7777 eax = 0; /* 0x310098E2: mov eax, 0 */ 7778 SET_LO8(eax, (/* inc result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) ? 1 : 0); /* 0x310098E7: sete al */ 7779 MEM32(ebp + 0xC) = edx; /* 0x310098EA: mov dword ptr [ebp + 0xc], edx */ 7780 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7781 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7782 ecx = ecx + eax; /* 0x310098ED: add ecx, eax */ 7783 _flag_k = FK_ADD; 7784 eax = MEM32(edi + 0x4); /* 0x310098EF: mov eax, dword ptr [edi + 4] */ 7785 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 7786 esi = esi + 1; /* 0x310098F2: inc esi */ 7787 _flag_k = FK_INC; 7788 /* test eax, eax */ /* 0x310098F3: test eax, eax */ 7789 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7790 _cf = 0; 7791 _flag_k = FK_TEST; 7792 MEM32(ebp + (-0x4)) = ecx; /* 0x310098F5: mov dword ptr [ebp - 4], ecx */ 7793 if (TEST_Z(_flag_a, _flag_b)) goto L_310099BA; /* 0x310098F8: je 0x310099ba */ 7794 L_310098FE: 7795 ecx = MEM32(edi + 0x8); /* 0x310098FE: mov ecx, dword ptr [edi + 8] */ 7796 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7797 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7798 ecx = ecx - eax; /* 0x31009901: sub ecx, eax */ 7799 _flag_k = FK_CMP; 7800 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x31009903: sar ecx, 2 */ 7801 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7802 ecx = (uint32_t)((int32_t)ecx >> 2u); 7803 /* cmp esi, ecx */ /* 0x31009906: cmp esi, ecx */ 7804 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 7805 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7806 _flag_k = FK_CMP; 7807 if (CMP_AE(_flag_a, _flag_b)) goto L_310099BA; /* 0x31009908: jae 0x310099ba */ 7808 L_3100990E: 7809 edx = MEM32(ebx); /* 0x3100990E: mov edx, dword ptr [ebx] */ 7810 eax = ebp + 0xC; /* 0x31009910: lea eax, [ebp + 0xc] */ 7811 PUSH32(esp, eax); /* 0x31009913: push eax */ 7812 ecx = ebp + (-0x4); /* 0x31009914: lea ecx, [ebp - 4] */ 7813 PUSH32(esp, ecx); /* 0x31009917: push ecx */ 7814 ecx = ebx; /* 0x31009918: mov ecx, ebx */ 7815 RECOMP_ICALL(MEM32(edx + 0x10)); /* 0x3100991A: call dword ptr [edx + 0x10] */ 7816 RECOMP_FLAGS_IN(); 7817 /* test eax, eax */ /* 0x3100991D: test eax, eax */ 7818 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7819 _cf = 0; 7820 _flag_k = FK_TEST; 7821 edx = MEM32(edi + 0x4); /* 0x3100991F: mov edx, dword ptr [edi + 4] */ 7822 ecx = MEM32(ebp + 0xC); /* 0x31009922: mov ecx, dword ptr [ebp + 0xc] */ 7823 MEM32(edx + esi * 4) = ecx; /* 0x31009925: mov dword ptr [edx + esi*4], ecx */ 7824 RECOMP_BACKEDGE(); 7825 if (TEST_Z(_flag_a, _flag_b)) goto L_310098D2; /* 0x31009928: je 0x310098d2 */ 7826 L_3100992A: 7827 /* test esi, esi */ /* 0x3100992A: test esi, esi */ 7828 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 7829 _cf = 0; 7830 _flag_k = FK_TEST; 7831 if (TEST_NZ(_flag_a, _flag_b)) goto L_3100993F; /* 0x3100992C: jne 0x3100993f */ 7832 L_3100992E: 7833 /* test eax, eax */ /* 0x3100992E: test eax, eax */ 7834 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7835 _cf = 0; 7836 _flag_k = FK_TEST; 7837 if (TEST_NZ(_flag_a, _flag_b)) goto L_3100993F; /* 0x31009930: jne 0x3100993f */ 7838 L_31009932: 7839 edx = MEM32(ebp + (-0x4)); /* 0x31009932: mov edx, dword ptr [ebp - 4] */ 7840 eax = MEM32(ebp + 0x8); /* 0x31009935: mov eax, dword ptr [ebp + 8] */ 7841 MEM32(eax) = edx; /* 0x31009938: mov dword ptr [eax], edx */ 7842 esi = 1; /* 0x3100993A: mov esi, 1 */ 7843 L_3100993F: 7844 eax = MEM32(edi + 0x4); /* 0x3100993F: mov eax, dword ptr [edi + 4] */ 7845 /* test eax, eax */ /* 0x31009942: test eax, eax */ 7846 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7847 _cf = 0; 7848 _flag_k = FK_TEST; 7849 MEM32(ebp + 0x8) = 0; /* 0x31009944: mov dword ptr [ebp + 8], 0 */ 7850 if (TEST_NZ(_flag_a, _flag_b)) goto L_31009951; /* 0x3100994B: jne 0x31009951 */ 7851 L_3100994D: 7852 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7853 ecx = 0; /* 0x3100994D: xor ecx, ecx */ 7854 _cf = 0; 7855 _flag_k = FK_TEST; 7856 goto L_31009959; /* 0x3100994F: jmp 0x31009959 */ 7857 L_31009951: 7858 ecx = MEM32(edi + 0x8); /* 0x31009951: mov ecx, dword ptr [edi + 8] */ 7859 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7860 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7861 ecx = ecx - eax; /* 0x31009954: sub ecx, eax */ 7862 _flag_k = FK_CMP; 7863 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x31009956: sar ecx, 2 */ 7864 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7865 ecx = (uint32_t)((int32_t)ecx >> 2u); 7866 L_31009959: 7867 /* cmp ecx, esi */ /* 0x31009959: cmp ecx, esi */ 7868 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi); 7869 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7870 _flag_k = FK_CMP; 7871 if (CMP_AE(_flag_a, _flag_b)) goto L_31009988; /* 0x3100995B: jae 0x31009988 */ 7872 L_3100995D: 7873 /* test eax, eax */ /* 0x3100995D: test eax, eax */ 7874 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7875 _cf = 0; 7876 _flag_k = FK_TEST; 7877 if (TEST_NZ(_flag_a, _flag_b)) goto L_31009965; /* 0x3100995F: jne 0x31009965 */ 7878 L_31009961: 7879 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7880 ecx = 0; /* 0x31009961: xor ecx, ecx */ 7881 _cf = 0; 7882 _flag_k = FK_TEST; 7883 goto L_3100996D; /* 0x31009963: jmp 0x3100996d */ 7884 L_31009965: 7885 ecx = MEM32(edi + 0x8); /* 0x31009965: mov ecx, dword ptr [edi + 8] */ 7886 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7887 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7888 ecx = ecx - eax; /* 0x31009968: sub ecx, eax */ 7889 _flag_k = FK_CMP; 7890 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x3100996A: sar ecx, 2 */ 7891 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7892 ecx = (uint32_t)((int32_t)ecx >> 2u); 7893 L_3100996D: 7894 eax = MEM32(edi + 0x8); /* 0x3100996D: mov eax, dword ptr [edi + 8] */ 7895 edx = ebp + 0x8; /* 0x31009970: lea edx, [ebp + 8] */ 7896 PUSH32(esp, edx); /* 0x31009973: push edx */ 7897 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 7898 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7899 esi = esi - ecx; /* 0x31009974: sub esi, ecx */ 7900 _flag_k = FK_CMP; 7901 PUSH32(esp, esi); /* 0x31009976: push esi */ 7902 PUSH32(esp, eax); /* 0x31009977: push eax */ 7903 ecx = edi; /* 0x31009978: mov ecx, edi */ 7904 RECOMP_ICALL(0x310048B0u); /* 0x3100997A: call 0x310048b0 */ /* not lifted */ 7905 RECOMP_FLAGS_IN(); 7906 edi = POP32_VAL(esp); /* 0x3100997F: pop edi */ 7907 esi = POP32_VAL(esp); /* 0x31009980: pop esi */ 7908 ebx = POP32_VAL(esp); /* 0x31009981: pop ebx */ 7909 esp = ebp; /* 0x31009982: mov esp, ebp */ 7910 ebp = POP32_VAL(esp); /* 0x31009984: pop ebp */ 7911 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x31009985: ret 8 */ 7912 L_31009988: 7913 /* test eax, eax */ /* 0x31009988: test eax, eax */ 7914 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7915 _cf = 0; 7916 _flag_k = FK_TEST; 7917 if (TEST_Z(_flag_a, _flag_b)) goto L_310099BA; /* 0x3100998A: je 0x310099ba */ 7918 L_3100998C: 7919 ecx = MEM32(edi + 0x8); /* 0x3100998C: mov ecx, dword ptr [edi + 8] */ 7920 edx = ecx; /* 0x3100998F: mov edx, ecx */ 7921 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 7922 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7923 edx = edx - eax; /* 0x31009991: sub edx, eax */ 7924 _flag_k = FK_CMP; 7925 if (2u) _cf = (((edx) >> 1) & 1u); /* 0x31009993: sar edx, 2 */ 7926 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7927 edx = (uint32_t)((int32_t)edx >> 2u); 7928 /* cmp esi, edx */ /* 0x31009996: cmp esi, edx */ 7929 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx); 7930 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7931 _flag_k = FK_CMP; 7932 if (CMP_AE(_flag_a, _flag_b)) goto L_310099BA; /* 0x31009998: jae 0x310099ba */ 7933 L_3100999A: 7934 edx = eax + esi * 4; /* 0x3100999A: lea edx, [eax + esi*4] */ 7935 eax = ecx; /* 0x3100999D: mov eax, ecx */ 7936 /* cmp eax, ecx */ /* 0x3100999F: cmp eax, ecx */ 7937 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 7938 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7939 _flag_k = FK_CMP; 7940 if (CMP_EQ(_flag_a, _flag_b)) goto L_310099B1; /* 0x310099A1: je 0x310099b1 */ 7941 L_310099A3: 7942 esi = MEM32(eax); /* 0x310099A3: mov esi, dword ptr [eax] */ 7943 MEM32(edx) = esi; /* 0x310099A5: mov dword ptr [edx], esi */ 7944 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 7945 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7946 eax = eax + 4; /* 0x310099A7: add eax, 4 */ 7947 _flag_k = FK_ADD; 7948 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4); 7949 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7950 edx = edx + 4; /* 0x310099AA: add edx, 4 */ 7951 _flag_k = FK_ADD; 7952 /* cmp eax, ecx */ /* 0x310099AD: cmp eax, ecx */ 7953 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 7954 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7955 _flag_k = FK_CMP; 7956 RECOMP_BACKEDGE(); 7957 if (CMP_NE(_flag_a, _flag_b)) goto L_310099A3; /* 0x310099AF: jne 0x310099a3 */ 7958 L_310099B1: 7959 eax = MEM32(edi + 0x8); /* 0x310099B1: mov eax, dword ptr [edi + 8] */ 7960 MEM32(ebp + 0x8) = eax; /* 0x310099B4: mov dword ptr [ebp + 8], eax */ 7961 MEM32(edi + 0x8) = edx; /* 0x310099B7: mov dword ptr [edi + 8], edx */ 7962 L_310099BA: 7963 edi = POP32_VAL(esp); /* 0x310099BA: pop edi */ 7964 esi = POP32_VAL(esp); /* 0x310099BB: pop esi */ 7965 ebx = POP32_VAL(esp); /* 0x310099BC: pop ebx */ 7966 esp = ebp; /* 0x310099BD: mov esp, ebp */ 7967 ebp = POP32_VAL(esp); /* 0x310099BF: pop ebp */ 7968 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x310099C0: ret 8 */ 7969 RECOMP_REGS_OUT(); 7970 }