client/game/qqr.dll/lifted-0002.c (400286B)
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_42004550(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(0x42004550u); 17 18 L_42004550: 19 PUSH32(esp, ebp); /* 0x42004550: push ebp */ 20 ebp = esp; /* 0x42004551: mov ebp, esp */ 21 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 22 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 23 esp = esp - 8; /* 0x42004553: sub esp, 8 */ 24 _flag_k = FK_CMP; 25 PUSH32(esp, ebx); /* 0x42004556: push ebx */ 26 PUSH32(esp, esi); /* 0x42004557: push esi */ 27 esi = MEM32(ebp + 0x8); /* 0x42004558: mov esi, dword ptr [ebp + 8] */ 28 eax = MEM32(esi); /* 0x4200455B: mov eax, dword ptr [esi] */ 29 PUSH32(esp, edi); /* 0x4200455D: push edi */ 30 edi = ecx; /* 0x4200455E: mov edi, ecx */ 31 ecx = esi; /* 0x42004560: mov ecx, esi */ 32 RECOMP_ICALL(MEM32(eax + 0x38)); /* 0x42004562: call dword ptr [eax + 0x38] */ 33 RECOMP_FLAGS_IN(); 34 ebx = MEM32(ebp + 0xC); /* 0x42004565: mov ebx, dword ptr [ebp + 0xc] */ 35 PUSH32(esp, eax); /* 0x42004568: push eax */ 36 eax = MEM32(ebp + 0x10); /* 0x42004569: mov eax, dword ptr [ebp + 0x10] */ 37 ecx = ebp + (-0x4); /* 0x4200456C: lea ecx, [ebp - 4] */ 38 PUSH32(esp, ecx); /* 0x4200456F: push ecx */ 39 PUSH32(esp, 0x42022EC0u); /* 0x42004570: push 0x42022ec0 */ 40 edx = ebp + (-0x8); /* 0x42004575: lea edx, [ebp - 8] */ 41 PUSH32(esp, edx); /* 0x42004578: push edx */ 42 PUSH32(esp, 0x420227B0u); /* 0x42004579: push 0x420227b0 */ 43 PUSH32(esp, eax); /* 0x4200457E: push eax */ 44 PUSH32(esp, ebx); /* 0x4200457F: push ebx */ 45 ecx = edi; /* 0x42004580: mov ecx, edi */ 46 RECOMP_ICALL(0x420046D0u); /* 0x42004582: call 0x420046d0 */ /* not lifted */ 47 RECOMP_FLAGS_IN(); 48 /* cmp ebx, 0xFFFFFFFFu */ /* 0x42004587: cmp ebx, -1 */ 49 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0xFFFFFFFFu); 50 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 51 _flag_k = FK_CMP; 52 if (CMP_EQ(_flag_a, _flag_b)) goto L_420045F0; /* 0x4200458A: je 0x420045f0 */ 53 L_4200458C: 54 eax = MEM32(ebp + (-0x4)); /* 0x4200458C: mov eax, dword ptr [ebp - 4] */ 55 ebx = 0x42022EC0u; /* 0x4200458F: mov ebx, 0x42022ec0 */ 56 /* cmp eax, ebx */ /* 0x42004594: cmp eax, ebx */ 57 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 58 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 59 _flag_k = FK_CMP; 60 MEM32(ebp + 0x8) = ebx; /* 0x42004596: mov dword ptr [ebp + 8], ebx */ 61 if (CMP_EQ(_flag_a, _flag_b)) goto L_420045F0; /* 0x42004599: je 0x420045f0 */ 62 L_4200459B: 63 goto L_420045A0; /* 0x4200459B: jmp 0x420045a0 */ 64 L_4200459D: 65 ebx = MEM32(ebp + 0x8); /* 0x4200459D: mov ebx, dword ptr [ebp + 8] */ 66 L_420045A0: 67 eax = MEM32(ebx); /* 0x420045A0: mov eax, dword ptr [ebx] */ 68 edx = MEM32(edi); /* 0x420045A2: mov edx, dword ptr [edi] */ 69 PUSH32(esp, eax); /* 0x420045A4: push eax */ 70 ecx = edi; /* 0x420045A5: mov ecx, edi */ 71 RECOMP_ICALL(MEM32(edx + 0x7C)); /* 0x420045A7: call dword ptr [edx + 0x7c] */ 72 RECOMP_FLAGS_IN(); 73 eax = MEM32(eax + 0x8); /* 0x420045AA: mov eax, dword ptr [eax + 8] */ 74 edx = MEM32(edi); /* 0x420045AD: mov edx, dword ptr [edi] */ 75 MEM32(ebp + 0xC) = eax; /* 0x420045AF: mov dword ptr [ebp + 0xc], eax */ 76 eax = MEM32(ebx); /* 0x420045B2: mov eax, dword ptr [ebx] */ 77 PUSH32(esp, eax); /* 0x420045B4: push eax */ 78 ecx = edi; /* 0x420045B5: mov ecx, edi */ 79 RECOMP_ICALL(MEM32(edx + 0x7C)); /* 0x420045B7: call dword ptr [edx + 0x7c] */ 80 RECOMP_FLAGS_IN(); 81 ebx = MEM32(eax + 0x4); /* 0x420045BA: mov ebx, dword ptr [eax + 4] */ 82 /* cmp ebx, MEM32(ebp + 0xC) */ /* 0x420045BD: cmp ebx, dword ptr [ebp + 0xc] */ 83 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(ebp + 0xC)); 84 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 85 _flag_k = FK_CMP; 86 if (CMP_EQ(_flag_a, _flag_b)) goto L_420045D6; /* 0x420045C0: je 0x420045d6 */ 87 L_420045C2: 88 ecx = MEM32(ebx); /* 0x420045C2: mov ecx, dword ptr [ebx] */ 89 eax = MEM32(esi); /* 0x420045C4: mov eax, dword ptr [esi] */ 90 PUSH32(esp, ecx); /* 0x420045C6: push ecx */ 91 ecx = esi; /* 0x420045C7: mov ecx, esi */ 92 RECOMP_ICALL(MEM32(eax + 0x24)); /* 0x420045C9: call dword ptr [eax + 0x24] */ 93 RECOMP_FLAGS_IN(); 94 eax = MEM32(ebp + 0xC); /* 0x420045CC: mov eax, dword ptr [ebp + 0xc] */ 95 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(4); 96 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 97 ebx = ebx + 4; /* 0x420045CF: add ebx, 4 */ 98 _flag_k = FK_ADD; 99 /* cmp ebx, eax */ /* 0x420045D2: cmp ebx, eax */ 100 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 101 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 102 _flag_k = FK_CMP; 103 RECOMP_BACKEDGE(); 104 if (CMP_NE(_flag_a, _flag_b)) goto L_420045C2; /* 0x420045D4: jne 0x420045c2 */ 105 L_420045D6: 106 ebx = MEM32(ebp + 0x8); /* 0x420045D6: mov ebx, dword ptr [ebp + 8] */ 107 eax = MEM32(ebx); /* 0x420045D9: mov eax, dword ptr [ebx] */ 108 edx = MEM32(esi); /* 0x420045DB: mov edx, dword ptr [esi] */ 109 PUSH32(esp, eax); /* 0x420045DD: push eax */ 110 ecx = esi; /* 0x420045DE: mov ecx, esi */ 111 RECOMP_ICALL(MEM32(edx + 0x2C)); /* 0x420045E0: call dword ptr [edx + 0x2c] */ 112 RECOMP_FLAGS_IN(); 113 eax = MEM32(ebp + (-0x4)); /* 0x420045E3: mov eax, dword ptr [ebp - 4] */ 114 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(4); 115 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 116 ebx = ebx + 4; /* 0x420045E6: add ebx, 4 */ 117 _flag_k = FK_ADD; 118 /* cmp ebx, eax */ /* 0x420045E9: cmp ebx, eax */ 119 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 120 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 121 _flag_k = FK_CMP; 122 MEM32(ebp + 0x8) = ebx; /* 0x420045EB: mov dword ptr [ebp + 8], ebx */ 123 RECOMP_BACKEDGE(); 124 if (CMP_NE(_flag_a, _flag_b)) goto L_4200459D; /* 0x420045EE: jne 0x4200459d */ 125 L_420045F0: 126 edx = MEM32(ebp + 0x10); /* 0x420045F0: mov edx, dword ptr [ebp + 0x10] */ 127 /* cmp edx, 0xFFFFFFFFu */ /* 0x420045F3: cmp edx, -1 */ 128 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0xFFFFFFFFu); 129 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 130 _flag_k = FK_CMP; 131 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004697; /* 0x420045F6: je 0x42004697 */ 132 L_420045FC: 133 ecx = MEM32(ebp + (-0x8)); /* 0x420045FC: mov ecx, dword ptr [ebp - 8] */ 134 eax = 0x420227B0u; /* 0x420045FF: mov eax, 0x420227b0 */ 135 /* cmp ecx, eax */ /* 0x42004604: cmp ecx, eax */ 136 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 137 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 138 _flag_k = FK_CMP; 139 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004629; /* 0x42004606: je 0x42004629 */ 140 L_42004608: 141 /* cmp MEM32(eax), edx */ /* 0x42004608: cmp dword ptr [eax], edx */ 142 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(edx); 143 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 144 _flag_k = FK_CMP; 145 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004615; /* 0x4200460A: je 0x42004615 */ 146 L_4200460C: 147 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 148 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 149 eax = eax + 4; /* 0x4200460C: add eax, 4 */ 150 _flag_k = FK_ADD; 151 /* cmp eax, ecx */ /* 0x4200460F: cmp eax, ecx */ 152 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 153 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 154 _flag_k = FK_CMP; 155 RECOMP_BACKEDGE(); 156 if (CMP_NE(_flag_a, _flag_b)) goto L_42004608; /* 0x42004611: jne 0x42004608 */ 157 L_42004613: 158 goto L_42004629; /* 0x42004613: jmp 0x42004629 */ 159 L_42004615: 160 /* cmp eax, ecx */ /* 0x42004615: cmp eax, ecx */ 161 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 162 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 163 _flag_k = FK_CMP; 164 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004629; /* 0x42004617: je 0x42004629 */ 165 L_42004619: 166 ebx = MEM32(0x420227B0); /* 0x42004619: mov ebx, dword ptr [0x420227b0] */ 167 edx = MEM32(eax); /* 0x4200461F: mov edx, dword ptr [eax] */ 168 MEM32(eax) = ebx; /* 0x42004621: mov dword ptr [eax], ebx */ 169 MEM32(0x420227B0) = edx; /* 0x42004623: mov dword ptr [0x420227b0], edx */ 170 L_42004629: 171 ebx = 0x420227B0u; /* 0x42004629: mov ebx, 0x420227b0 */ 172 /* cmp ecx, ebx */ /* 0x4200462E: cmp ecx, ebx */ 173 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx); 174 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 175 _flag_k = FK_CMP; 176 MEM32(ebp + 0x8) = ebx; /* 0x42004630: mov dword ptr [ebp + 8], ebx */ 177 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004694; /* 0x42004633: je 0x42004694 */ 178 L_42004635: 179 goto L_4200463A; /* 0x42004635: jmp 0x4200463a */ 180 L_42004637: 181 ebx = MEM32(ebp + 0x8); /* 0x42004637: mov ebx, dword ptr [ebp + 8] */ 182 L_4200463A: 183 eax = MEM32(ebx); /* 0x4200463A: mov eax, dword ptr [ebx] */ 184 edx = MEM32(edi); /* 0x4200463C: mov edx, dword ptr [edi] */ 185 PUSH32(esp, eax); /* 0x4200463E: push eax */ 186 ecx = edi; /* 0x4200463F: mov ecx, edi */ 187 RECOMP_ICALL(MEM32(edx + 0x7C)); /* 0x42004641: call dword ptr [edx + 0x7c] */ 188 RECOMP_FLAGS_IN(); 189 eax = MEM32(eax + 0x8); /* 0x42004644: mov eax, dword ptr [eax + 8] */ 190 edx = MEM32(edi); /* 0x42004647: mov edx, dword ptr [edi] */ 191 MEM32(ebp + 0xC) = eax; /* 0x42004649: mov dword ptr [ebp + 0xc], eax */ 192 eax = MEM32(ebx); /* 0x4200464C: mov eax, dword ptr [ebx] */ 193 PUSH32(esp, eax); /* 0x4200464E: push eax */ 194 ecx = edi; /* 0x4200464F: mov ecx, edi */ 195 RECOMP_ICALL(MEM32(edx + 0x7C)); /* 0x42004651: call dword ptr [edx + 0x7c] */ 196 RECOMP_FLAGS_IN(); 197 ebx = MEM32(eax + 0x4); /* 0x42004654: mov ebx, dword ptr [eax + 4] */ 198 /* cmp ebx, MEM32(ebp + 0xC) */ /* 0x42004657: cmp ebx, dword ptr [ebp + 0xc] */ 199 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(ebp + 0xC)); 200 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 201 _flag_k = FK_CMP; 202 if (CMP_EQ(_flag_a, _flag_b)) goto L_4200467A; /* 0x4200465A: je 0x4200467a */ 203 L_4200465C: 204 ecx = MEM32(ebx); /* 0x4200465C: mov ecx, dword ptr [ebx] */ 205 eax = MEM32(esi); /* 0x4200465E: mov eax, dword ptr [esi] */ 206 PUSH32(esp, ecx); /* 0x42004660: push ecx */ 207 ecx = esi; /* 0x42004661: mov ecx, esi */ 208 RECOMP_ICALL(MEM32(eax + 0x1C)); /* 0x42004663: call dword ptr [eax + 0x1c] */ 209 RECOMP_FLAGS_IN(); 210 eax = MEM32(ebx); /* 0x42004666: mov eax, dword ptr [ebx] */ 211 edx = MEM32(esi); /* 0x42004668: mov edx, dword ptr [esi] */ 212 PUSH32(esp, eax); /* 0x4200466A: push eax */ 213 ecx = esi; /* 0x4200466B: mov ecx, esi */ 214 RECOMP_ICALL(MEM32(edx + 0x20)); /* 0x4200466D: call dword ptr [edx + 0x20] */ 215 RECOMP_FLAGS_IN(); 216 eax = MEM32(ebp + 0xC); /* 0x42004670: mov eax, dword ptr [ebp + 0xc] */ 217 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(4); 218 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 219 ebx = ebx + 4; /* 0x42004673: add ebx, 4 */ 220 _flag_k = FK_ADD; 221 /* cmp ebx, eax */ /* 0x42004676: cmp ebx, eax */ 222 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 223 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 224 _flag_k = FK_CMP; 225 RECOMP_BACKEDGE(); 226 if (CMP_NE(_flag_a, _flag_b)) goto L_4200465C; /* 0x42004678: jne 0x4200465c */ 227 L_4200467A: 228 ebx = MEM32(ebp + 0x8); /* 0x4200467A: mov ebx, dword ptr [ebp + 8] */ 229 eax = MEM32(ebx); /* 0x4200467D: mov eax, dword ptr [ebx] */ 230 edx = MEM32(esi); /* 0x4200467F: mov edx, dword ptr [esi] */ 231 PUSH32(esp, eax); /* 0x42004681: push eax */ 232 ecx = esi; /* 0x42004682: mov ecx, esi */ 233 RECOMP_ICALL(MEM32(edx + 0x30)); /* 0x42004684: call dword ptr [edx + 0x30] */ 234 RECOMP_FLAGS_IN(); 235 eax = MEM32(ebp + (-0x8)); /* 0x42004687: mov eax, dword ptr [ebp - 8] */ 236 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(4); 237 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 238 ebx = ebx + 4; /* 0x4200468A: add ebx, 4 */ 239 _flag_k = FK_ADD; 240 /* cmp ebx, eax */ /* 0x4200468D: cmp ebx, eax */ 241 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 242 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 243 _flag_k = FK_CMP; 244 MEM32(ebp + 0x8) = ebx; /* 0x4200468F: mov dword ptr [ebp + 8], ebx */ 245 RECOMP_BACKEDGE(); 246 if (CMP_NE(_flag_a, _flag_b)) goto L_42004637; /* 0x42004692: jne 0x42004637 */ 247 L_42004694: 248 edx = MEM32(ebp + 0x10); /* 0x42004694: mov edx, dword ptr [ebp + 0x10] */ 249 L_42004697: 250 eax = MEM32(esi); /* 0x42004697: mov eax, dword ptr [esi] */ 251 PUSH32(esp, edx); /* 0x42004699: push edx */ 252 ecx = esi; /* 0x4200469A: mov ecx, esi */ 253 RECOMP_ICALL(MEM32(eax + 0x34)); /* 0x4200469C: call dword ptr [eax + 0x34] */ 254 RECOMP_FLAGS_IN(); 255 edi = POP32_VAL(esp); /* 0x4200469F: pop edi */ 256 esi = POP32_VAL(esp); /* 0x420046A0: pop esi */ 257 ebx = POP32_VAL(esp); /* 0x420046A1: pop ebx */ 258 esp = ebp; /* 0x420046A2: mov esp, ebp */ 259 ebp = POP32_VAL(esp); /* 0x420046A4: pop ebp */ 260 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x420046A5: ret 0xc */ 261 RECOMP_REGS_OUT(); 262 } 263 264 void sub_420046B0(void) { 265 int _fpu_cmp = 0; 266 uint32_t _cf = 0; 267 int _df = 1; 268 uint32_t _flag_k = FK_NONE; 269 uint32_t _flag_a = 0, _flag_b = 0; 270 uint32_t _itail_tgt = 0; 271 RECOMP_REGS_LOCALS 272 RECOMP_ENTER(0x420046B0u); 273 274 L_420046B0: 275 PUSH32(esp, ebp); /* 0x420046B0: push ebp */ 276 ebp = esp; /* 0x420046B1: mov ebp, esp */ 277 edx = MEM32(ebp + 0x10); /* 0x420046B3: mov edx, dword ptr [ebp + 0x10] */ 278 eax = MEM32(ecx); /* 0x420046B6: mov eax, dword ptr [ecx] */ 279 PUSH32(esp, edx); /* 0x420046B8: push edx */ 280 edx = MEM32(ebp + 0xC); /* 0x420046B9: mov edx, dword ptr [ebp + 0xc] */ 281 PUSH32(esp, edx); /* 0x420046BC: push edx */ 282 edx = MEM32(ebp + 0x8); /* 0x420046BD: mov edx, dword ptr [ebp + 8] */ 283 PUSH32(esp, edx); /* 0x420046C0: push edx */ 284 RECOMP_ICALL(MEM32(eax + 0x84)); /* 0x420046C1: call dword ptr [eax + 0x84] */ 285 RECOMP_FLAGS_IN(); 286 ebp = POP32_VAL(esp); /* 0x420046C7: pop ebp */ 287 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x420046C8: ret 0xc */ 288 RECOMP_REGS_OUT(); 289 } 290 291 void sub_420046D0(void) { 292 int _fpu_cmp = 0; 293 uint32_t _cf = 0; 294 int _df = 1; 295 uint32_t _flag_k = FK_NONE; 296 uint32_t _flag_a = 0, _flag_b = 0; 297 uint32_t _itail_tgt = 0; 298 RECOMP_REGS_LOCALS 299 RECOMP_ENTER(0x420046D0u); 300 301 L_420046D0: 302 PUSH32(esp, ebp); /* 0x420046D0: push ebp */ 303 ebp = esp; /* 0x420046D1: mov ebp, esp */ 304 PUSH32(esp, ebx); /* 0x420046D3: push ebx */ 305 PUSH32(esp, esi); /* 0x420046D4: push esi */ 306 PUSH32(esp, edi); /* 0x420046D5: push edi */ 307 edi = MEM32(ebp + 0x20); /* 0x420046D6: mov edi, dword ptr [ebp + 0x20] */ 308 esi = ecx; /* 0x420046D9: mov esi, ecx */ 309 ecx = MEM32(ebp + 0xC); /* 0x420046DB: mov ecx, dword ptr [ebp + 0xc] */ 310 eax = MEM32(esi); /* 0x420046DE: mov eax, dword ptr [esi] */ 311 PUSH32(esp, edi); /* 0x420046E0: push edi */ 312 PUSH32(esp, 0x42022468u); /* 0x420046E1: push 0x42022468 */ 313 PUSH32(esp, ecx); /* 0x420046E6: push ecx */ 314 ecx = esi; /* 0x420046E7: mov ecx, esi */ 315 RECOMP_ICALL(MEM32(eax + 0x84)); /* 0x420046E9: call dword ptr [eax + 0x84] */ 316 RECOMP_FLAGS_IN(); 317 edx = MEM32(esi); /* 0x420046EF: mov edx, dword ptr [esi] */ 318 PUSH32(esp, edi); /* 0x420046F1: push edi */ 319 ebx = eax; /* 0x420046F2: mov ebx, eax */ 320 eax = MEM32(ebp + 0x8); /* 0x420046F4: mov eax, dword ptr [ebp + 8] */ 321 PUSH32(esp, 0x42022878u); /* 0x420046F7: push 0x42022878 */ 322 PUSH32(esp, eax); /* 0x420046FC: push eax */ 323 ecx = esi; /* 0x420046FD: mov ecx, esi */ 324 RECOMP_ICALL(MEM32(edx + 0x84)); /* 0x420046FF: call dword ptr [edx + 0x84] */ 325 RECOMP_FLAGS_IN(); 326 edx = MEM32(ebp + 0x10); /* 0x42004705: mov edx, dword ptr [ebp + 0x10] */ 327 ecx = 0x42022468u; /* 0x42004708: mov ecx, 0x42022468 */ 328 /* cmp ebx, ecx */ /* 0x4200470D: cmp ebx, ecx */ 329 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ecx); 330 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 331 _flag_k = FK_CMP; 332 MEM32(ebp + 0x20) = eax; /* 0x4200470F: mov dword ptr [ebp + 0x20], eax */ 333 edi = 0x42022878u; /* 0x42004712: mov edi, 0x42022878 */ 334 if (CMP_EQ(_flag_a, _flag_b)) goto L_4200473C; /* 0x42004717: je 0x4200473c */ 335 L_42004719: 336 /* cmp edi, MEM32(ebp + 0x20) */ /* 0x42004719: cmp edi, dword ptr [ebp + 0x20] */ 337 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebp + 0x20)); 338 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 339 _flag_k = FK_CMP; 340 if (CMP_EQ(_flag_a, _flag_b)) goto L_4200473C; /* 0x4200471C: je 0x4200473c */ 341 L_4200471E: 342 esi = MEM32(ecx); /* 0x4200471E: mov esi, dword ptr [ecx] */ 343 eax = MEM32(edi); /* 0x42004720: mov eax, dword ptr [edi] */ 344 /* cmp eax, esi */ /* 0x42004722: cmp eax, esi */ 345 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 346 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 347 _flag_k = FK_CMP; 348 if (CMP_LE(_flag_a, _flag_b)) goto L_42004730; /* 0x42004724: jle 0x42004730 */ 349 L_42004726: 350 MEM32(edx) = esi; /* 0x42004726: mov dword ptr [edx], esi */ 351 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4); 352 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 353 edx = edx + 4; /* 0x42004728: add edx, 4 */ 354 _flag_k = FK_ADD; 355 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 356 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 357 ecx = ecx + 4; /* 0x4200472B: add ecx, 4 */ 358 _flag_k = FK_ADD; 359 goto L_42004738; /* 0x4200472E: jmp 0x42004738 */ 360 L_42004730: 361 if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_L, _cf)) goto L_42004735; /* 0x42004730: jl 0x42004735 */ 362 L_42004732: 363 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 364 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 365 ecx = ecx + 4; /* 0x42004732: add ecx, 4 */ 366 _flag_k = FK_ADD; 367 L_42004735: 368 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4); 369 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 370 edi = edi + 4; /* 0x42004735: add edi, 4 */ 371 _flag_k = FK_ADD; 372 L_42004738: 373 /* cmp ecx, ebx */ /* 0x42004738: cmp ecx, ebx */ 374 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx); 375 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 376 _flag_k = FK_CMP; 377 RECOMP_BACKEDGE(); 378 if (CMP_NE(_flag_a, _flag_b)) goto L_42004719; /* 0x4200473A: jne 0x42004719 */ 379 L_4200473C: 380 /* cmp ecx, ebx */ /* 0x4200473C: cmp ecx, ebx */ 381 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx); 382 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 383 _flag_k = FK_CMP; 384 if (CMP_EQ(_flag_a, _flag_b)) goto L_4200474E; /* 0x4200473E: je 0x4200474e */ 385 L_42004740: 386 eax = MEM32(ecx); /* 0x42004740: mov eax, dword ptr [ecx] */ 387 MEM32(edx) = eax; /* 0x42004742: mov dword ptr [edx], eax */ 388 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 389 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 390 ecx = ecx + 4; /* 0x42004744: add ecx, 4 */ 391 _flag_k = FK_ADD; 392 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4); 393 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 394 edx = edx + 4; /* 0x42004747: add edx, 4 */ 395 _flag_k = FK_ADD; 396 /* cmp ecx, ebx */ /* 0x4200474A: cmp ecx, ebx */ 397 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx); 398 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 399 _flag_k = FK_CMP; 400 RECOMP_BACKEDGE(); 401 if (CMP_NE(_flag_a, _flag_b)) goto L_42004740; /* 0x4200474C: jne 0x42004740 */ 402 L_4200474E: 403 ecx = MEM32(ebp + 0x14); /* 0x4200474E: mov ecx, dword ptr [ebp + 0x14] */ 404 eax = MEM32(ebp + 0x18); /* 0x42004751: mov eax, dword ptr [ebp + 0x18] */ 405 MEM32(ecx) = edx; /* 0x42004754: mov dword ptr [ecx], edx */ 406 edx = MEM32(ebp + 0x20); /* 0x42004756: mov edx, dword ptr [ebp + 0x20] */ 407 ecx = 0x42022878u; /* 0x42004759: mov ecx, 0x42022878 */ 408 /* cmp edx, ecx */ /* 0x4200475E: cmp edx, ecx */ 409 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx); 410 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 411 _flag_k = FK_CMP; 412 esi = 0x42022468u; /* 0x42004760: mov esi, 0x42022468 */ 413 if (CMP_EQ(_flag_a, _flag_b)) goto L_4200478A; /* 0x42004765: je 0x4200478a */ 414 L_42004767: 415 /* cmp esi, ebx */ /* 0x42004767: cmp esi, ebx */ 416 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 417 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 418 _flag_k = FK_CMP; 419 if (CMP_EQ(_flag_a, _flag_b)) goto L_4200478A; /* 0x42004769: je 0x4200478a */ 420 L_4200476B: 421 edx = MEM32(ecx); /* 0x4200476B: mov edx, dword ptr [ecx] */ 422 edi = MEM32(esi); /* 0x4200476D: mov edi, dword ptr [esi] */ 423 /* cmp edi, edx */ /* 0x4200476F: cmp edi, edx */ 424 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx); 425 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 426 _flag_k = FK_CMP; 427 if (CMP_LE(_flag_a, _flag_b)) goto L_4200477D; /* 0x42004771: jle 0x4200477d */ 428 L_42004773: 429 MEM32(eax) = edx; /* 0x42004773: mov dword ptr [eax], edx */ 430 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 431 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 432 eax = eax + 4; /* 0x42004775: add eax, 4 */ 433 _flag_k = FK_ADD; 434 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 435 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 436 ecx = ecx + 4; /* 0x42004778: add ecx, 4 */ 437 _flag_k = FK_ADD; 438 goto L_42004785; /* 0x4200477B: jmp 0x42004785 */ 439 L_4200477D: 440 if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_L, _cf)) goto L_42004782; /* 0x4200477D: jl 0x42004782 */ 441 L_4200477F: 442 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 443 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 444 ecx = ecx + 4; /* 0x4200477F: add ecx, 4 */ 445 _flag_k = FK_ADD; 446 L_42004782: 447 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 448 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 449 esi = esi + 4; /* 0x42004782: add esi, 4 */ 450 _flag_k = FK_ADD; 451 L_42004785: 452 /* cmp ecx, MEM32(ebp + 0x20) */ /* 0x42004785: cmp ecx, dword ptr [ebp + 0x20] */ 453 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(ebp + 0x20)); 454 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 455 _flag_k = FK_CMP; 456 RECOMP_BACKEDGE(); 457 if (CMP_NE(_flag_a, _flag_b)) goto L_42004767; /* 0x42004788: jne 0x42004767 */ 458 L_4200478A: 459 edx = eax; /* 0x4200478A: mov edx, eax */ 460 eax = MEM32(ebp + 0x20); /* 0x4200478C: mov eax, dword ptr [ebp + 0x20] */ 461 /* cmp ecx, eax */ /* 0x4200478F: cmp ecx, eax */ 462 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 463 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 464 _flag_k = FK_CMP; 465 if (CMP_EQ(_flag_a, _flag_b)) goto L_420047AD; /* 0x42004791: je 0x420047ad */ 466 L_42004793: 467 esi = MEM32(ecx); /* 0x42004793: mov esi, dword ptr [ecx] */ 468 MEM32(edx) = esi; /* 0x42004795: mov dword ptr [edx], esi */ 469 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 470 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 471 ecx = ecx + 4; /* 0x42004797: add ecx, 4 */ 472 _flag_k = FK_ADD; 473 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4); 474 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 475 edx = edx + 4; /* 0x4200479A: add edx, 4 */ 476 _flag_k = FK_ADD; 477 /* cmp ecx, eax */ /* 0x4200479D: cmp ecx, eax */ 478 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 479 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 480 _flag_k = FK_CMP; 481 RECOMP_BACKEDGE(); 482 if (CMP_NE(_flag_a, _flag_b)) goto L_42004793; /* 0x4200479F: jne 0x42004793 */ 483 L_420047A1: 484 eax = MEM32(ebp + 0x1C); /* 0x420047A1: mov eax, dword ptr [ebp + 0x1c] */ 485 edi = POP32_VAL(esp); /* 0x420047A4: pop edi */ 486 esi = POP32_VAL(esp); /* 0x420047A5: pop esi */ 487 MEM32(eax) = edx; /* 0x420047A6: mov dword ptr [eax], edx */ 488 ebx = POP32_VAL(esp); /* 0x420047A8: pop ebx */ 489 ebp = POP32_VAL(esp); /* 0x420047A9: pop ebp */ 490 RECOMP_FLAGS_OUT(); esp += 32; { RECOMP_REGS_OUT(); return; } /* 0x420047AA: ret 0x1c */ 491 L_420047AD: 492 ecx = MEM32(ebp + 0x1C); /* 0x420047AD: mov ecx, dword ptr [ebp + 0x1c] */ 493 edi = POP32_VAL(esp); /* 0x420047B0: pop edi */ 494 esi = POP32_VAL(esp); /* 0x420047B1: pop esi */ 495 MEM32(ecx) = edx; /* 0x420047B2: mov dword ptr [ecx], edx */ 496 ebx = POP32_VAL(esp); /* 0x420047B4: pop ebx */ 497 ebp = POP32_VAL(esp); /* 0x420047B5: pop ebp */ 498 RECOMP_FLAGS_OUT(); esp += 32; { RECOMP_REGS_OUT(); return; } /* 0x420047B6: ret 0x1c */ 499 RECOMP_REGS_OUT(); 500 } 501 502 void sub_420047C0(void) { 503 int _fpu_cmp = 0; 504 uint32_t _cf = 0; 505 int _df = 1; 506 uint32_t _flag_k = FK_NONE; 507 uint32_t _flag_a = 0, _flag_b = 0; 508 uint32_t _itail_tgt = 0; 509 RECOMP_REGS_LOCALS 510 RECOMP_ENTER(0x420047C0u); 511 512 L_420047C0: 513 PUSH32(esp, ebp); /* 0x420047C0: push ebp */ 514 ebp = esp; /* 0x420047C1: mov ebp, esp */ 515 PUSH32(esp, ecx); /* 0x420047C3: push ecx */ 516 PUSH32(esp, ebx); /* 0x420047C4: push ebx */ 517 PUSH32(esp, esi); /* 0x420047C5: push esi */ 518 esi = ecx; /* 0x420047C6: mov esi, ecx */ 519 ecx = MEM32(ebp + 0x8); /* 0x420047C8: mov ecx, dword ptr [ebp + 8] */ 520 eax = MEM32(ecx); /* 0x420047CB: mov eax, dword ptr [ecx] */ 521 RECOMP_ICALL(MEM32(eax + 0x4)); /* 0x420047CD: call dword ptr [eax + 4] */ 522 RECOMP_FLAGS_IN(); 523 edx = MEM32(esi); /* 0x420047D0: mov edx, dword ptr [esi] */ 524 PUSH32(esp, 1); /* 0x420047D2: push 1 */ 525 PUSH32(esp, 0x42022530u); /* 0x420047D4: push 0x42022530 */ 526 PUSH32(esp, eax); /* 0x420047D9: push eax */ 527 ecx = esi; /* 0x420047DA: mov ecx, esi */ 528 RECOMP_ICALL(MEM32(edx + 0x84)); /* 0x420047DC: call dword ptr [edx + 0x84] */ 529 RECOMP_FLAGS_IN(); 530 ebx = 0x42022530u; /* 0x420047E2: mov ebx, 0x42022530 */ 531 /* cmp eax, ebx */ /* 0x420047E7: cmp eax, ebx */ 532 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 533 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 534 _flag_k = FK_CMP; 535 MEM32(ebp + (-0x4)) = eax; /* 0x420047E9: mov dword ptr [ebp - 4], eax */ 536 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004840; /* 0x420047EC: je 0x42004840 */ 537 L_420047EE: 538 PUSH32(esp, edi); /* 0x420047EE: push edi */ 539 L_420047EF: 540 eax = MEM32(ebx); /* 0x420047EF: mov eax, dword ptr [ebx] */ 541 edx = MEM32(esi); /* 0x420047F1: mov edx, dword ptr [esi] */ 542 PUSH32(esp, eax); /* 0x420047F3: push eax */ 543 ecx = esi; /* 0x420047F4: mov ecx, esi */ 544 RECOMP_ICALL(MEM32(edx + 0x7C)); /* 0x420047F6: call dword ptr [edx + 0x7c] */ 545 RECOMP_FLAGS_IN(); 546 edi = MEM32(eax + 0x14); /* 0x420047F9: mov edi, dword ptr [eax + 0x14] */ 547 edx = MEM32(esi); /* 0x420047FC: mov edx, dword ptr [esi] */ 548 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x10u); 549 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 550 eax = eax + 0x10u; /* 0x420047FE: add eax, 0x10 */ 551 _flag_k = FK_ADD; 552 eax = MEM32(ebx); /* 0x42004801: mov eax, dword ptr [ebx] */ 553 PUSH32(esp, eax); /* 0x42004803: push eax */ 554 ecx = esi; /* 0x42004804: mov ecx, esi */ 555 RECOMP_ICALL(MEM32(edx + 0x7C)); /* 0x42004806: call dword ptr [edx + 0x7c] */ 556 RECOMP_FLAGS_IN(); 557 ecx = MEM32(eax + 0x18); /* 0x42004809: mov ecx, dword ptr [eax + 0x18] */ 558 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x10u); 559 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 560 eax = eax + 0x10u; /* 0x4200480C: add eax, 0x10 */ 561 _flag_k = FK_ADD; 562 /* cmp edi, ecx */ /* 0x4200480F: cmp edi, ecx */ 563 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx); 564 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 565 _flag_k = FK_CMP; 566 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004835; /* 0x42004811: je 0x42004835 */ 567 L_42004813: 568 ecx = MEM32(edi); /* 0x42004813: mov ecx, dword ptr [edi] */ 569 edx = MEM32(ebp + 0x8); /* 0x42004815: mov edx, dword ptr [ebp + 8] */ 570 eax = MEM32(ecx); /* 0x42004818: mov eax, dword ptr [ecx] */ 571 PUSH32(esp, edx); /* 0x4200481A: push edx */ 572 RECOMP_ICALL(MEM32(eax + 0x28)); /* 0x4200481B: call dword ptr [eax + 0x28] */ 573 RECOMP_FLAGS_IN(); 574 eax = MEM32(ebx); /* 0x4200481E: mov eax, dword ptr [ebx] */ 575 edx = MEM32(esi); /* 0x42004820: mov edx, dword ptr [esi] */ 576 PUSH32(esp, eax); /* 0x42004822: push eax */ 577 ecx = esi; /* 0x42004823: mov ecx, esi */ 578 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4); 579 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 580 edi = edi + 4; /* 0x42004825: add edi, 4 */ 581 _flag_k = FK_ADD; 582 RECOMP_ICALL(MEM32(edx + 0x7C)); /* 0x42004828: call dword ptr [edx + 0x7c] */ 583 RECOMP_FLAGS_IN(); 584 ecx = MEM32(eax + 0x18); /* 0x4200482B: mov ecx, dword ptr [eax + 0x18] */ 585 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x10u); 586 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 587 eax = eax + 0x10u; /* 0x4200482E: add eax, 0x10 */ 588 _flag_k = FK_ADD; 589 /* cmp edi, ecx */ /* 0x42004831: cmp edi, ecx */ 590 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx); 591 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 592 _flag_k = FK_CMP; 593 RECOMP_BACKEDGE(); 594 if (CMP_NE(_flag_a, _flag_b)) goto L_42004813; /* 0x42004833: jne 0x42004813 */ 595 L_42004835: 596 eax = MEM32(ebp + (-0x4)); /* 0x42004835: mov eax, dword ptr [ebp - 4] */ 597 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(4); 598 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 599 ebx = ebx + 4; /* 0x42004838: add ebx, 4 */ 600 _flag_k = FK_ADD; 601 /* cmp ebx, eax */ /* 0x4200483B: cmp ebx, eax */ 602 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 603 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 604 _flag_k = FK_CMP; 605 RECOMP_BACKEDGE(); 606 if (CMP_NE(_flag_a, _flag_b)) goto L_420047EF; /* 0x4200483D: jne 0x420047ef */ 607 L_4200483F: 608 edi = POP32_VAL(esp); /* 0x4200483F: pop edi */ 609 L_42004840: 610 esi = POP32_VAL(esp); /* 0x42004840: pop esi */ 611 ebx = POP32_VAL(esp); /* 0x42004841: pop ebx */ 612 esp = ebp; /* 0x42004842: mov esp, ebp */ 613 ebp = POP32_VAL(esp); /* 0x42004844: pop ebp */ 614 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42004845: ret 4 */ 615 RECOMP_REGS_OUT(); 616 } 617 618 void sub_42004850(void) { 619 int _fpu_cmp = 0; 620 uint32_t _cf = 0; 621 int _df = 1; 622 uint32_t _flag_k = FK_NONE; 623 uint32_t _flag_a = 0, _flag_b = 0; 624 uint32_t _itail_tgt = 0; 625 RECOMP_REGS_LOCALS 626 RECOMP_ENTER(0x42004850u); 627 628 L_42004850: 629 MEM8(ecx + 0x8) = (uint8_t)(1); /* 0x42004850: mov byte ptr [ecx + 8], 1 */ 630 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42004854: ret */ 631 RECOMP_REGS_OUT(); 632 } 633 634 void sub_42004860(void) { 635 int _fpu_cmp = 0; 636 uint32_t _cf = 0; 637 int _df = 1; 638 uint32_t _flag_k = FK_NONE; 639 uint32_t _flag_a = 0, _flag_b = 0; 640 uint32_t _itail_tgt = 0; 641 RECOMP_REGS_LOCALS 642 RECOMP_ENTER(0x42004860u); 643 644 L_42004860: 645 SET_LO8(eax, MEM8(ecx + 0x8)); /* 0x42004860: mov al, byte ptr [ecx + 8] */ 646 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42004863: ret */ 647 RECOMP_REGS_OUT(); 648 } 649 650 void sub_42004870(void) { 651 int _fpu_cmp = 0; 652 uint32_t _cf = 0; 653 int _df = 1; 654 uint32_t _flag_k = FK_NONE; 655 uint32_t _flag_a = 0, _flag_b = 0; 656 uint32_t _itail_tgt = 0; 657 RECOMP_REGS_LOCALS 658 RECOMP_ENTER(0x42004870u); 659 660 L_42004870: 661 MEM8(ecx + 0x8) = (uint8_t)(0); /* 0x42004870: mov byte ptr [ecx + 8], 0 */ 662 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42004874: ret */ 663 RECOMP_REGS_OUT(); 664 } 665 666 void sub_42004880(void) { 667 int _fpu_cmp = 0; 668 uint32_t _cf = 0; 669 int _df = 1; 670 uint32_t _flag_k = FK_NONE; 671 uint32_t _flag_a = 0, _flag_b = 0; 672 uint32_t _itail_tgt = 0; 673 RECOMP_REGS_LOCALS 674 RECOMP_ENTER(0x42004880u); 675 676 L_42004880: 677 PUSH32(esp, ebp); /* 0x42004880: push ebp */ 678 ebp = esp; /* 0x42004881: mov ebp, esp */ 679 PUSH32(esp, ebx); /* 0x42004883: push ebx */ 680 PUSH32(esp, esi); /* 0x42004884: push esi */ 681 ebx = ecx; /* 0x42004885: mov ebx, ecx */ 682 eax = MEM32(ebx + 0x10); /* 0x42004887: mov eax, dword ptr [ebx + 0x10] */ 683 esi = MEM32(eax); /* 0x4200488A: mov esi, dword ptr [eax] */ 684 PUSH32(esp, edi); /* 0x4200488C: push edi */ 685 edi = MEM32(esi + 0x4); /* 0x4200488D: mov edi, dword ptr [esi + 4] */ 686 PUSH32(esp, 0xCu); /* 0x42004890: push 0xc */ 687 RECOMP_ICALL(0x42016F36u); /* 0x42004892: call 0x42016f36 */ /* not lifted */ 688 RECOMP_FLAGS_IN(); 689 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 690 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 691 esp = esp + 4; /* 0x42004897: add esp, 4 */ 692 _flag_k = FK_ADD; 693 /* test esi, esi */ /* 0x4200489A: test esi, esi */ 694 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 695 _cf = 0; 696 _flag_k = FK_TEST; 697 ecx = esi; /* 0x4200489C: mov ecx, esi */ 698 if (TEST_NZ(_flag_a, _flag_b)) goto L_420048A2; /* 0x4200489E: jne 0x420048a2 */ 699 L_420048A0: 700 ecx = eax; /* 0x420048A0: mov ecx, eax */ 701 L_420048A2: 702 /* test edi, edi */ /* 0x420048A2: test edi, edi */ 703 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 704 _cf = 0; 705 _flag_k = FK_TEST; 706 MEM32(eax) = ecx; /* 0x420048A4: mov dword ptr [eax], ecx */ 707 ecx = edi; /* 0x420048A6: mov ecx, edi */ 708 if (TEST_NZ(_flag_a, _flag_b)) goto L_420048AC; /* 0x420048A8: jne 0x420048ac */ 709 L_420048AA: 710 ecx = eax; /* 0x420048AA: mov ecx, eax */ 711 L_420048AC: 712 MEM32(eax + 0x4) = ecx; /* 0x420048AC: mov dword ptr [eax + 4], ecx */ 713 MEM32(esi + 0x4) = eax; /* 0x420048AF: mov dword ptr [esi + 4], eax */ 714 ecx = MEM32(eax + 0x4); /* 0x420048B2: mov ecx, dword ptr [eax + 4] */ 715 MEM32(ecx) = eax; /* 0x420048B5: mov dword ptr [ecx], eax */ 716 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(8); 717 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 718 eax = eax + 8; /* 0x420048B7: add eax, 8 */ 719 _flag_k = FK_ADD; 720 /* test eax, eax */ /* 0x420048BA: test eax, eax */ 721 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 722 _cf = 0; 723 _flag_k = FK_TEST; 724 if (TEST_Z(_flag_a, _flag_b)) goto L_420048C3; /* 0x420048BC: je 0x420048c3 */ 725 L_420048BE: 726 edx = MEM32(ebp + 0x8); /* 0x420048BE: mov edx, dword ptr [ebp + 8] */ 727 MEM32(eax) = edx; /* 0x420048C1: mov dword ptr [eax], edx */ 728 L_420048C3: 729 eax = MEM32(ebx + 0x14); /* 0x420048C3: mov eax, dword ptr [ebx + 0x14] */ 730 edi = POP32_VAL(esp); /* 0x420048C6: pop edi */ 731 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 732 eax = eax + 1; /* 0x420048C7: inc eax */ 733 _flag_k = FK_INC; 734 esi = POP32_VAL(esp); /* 0x420048C8: pop esi */ 735 MEM32(ebx + 0x14) = eax; /* 0x420048C9: mov dword ptr [ebx + 0x14], eax */ 736 ebx = POP32_VAL(esp); /* 0x420048CC: pop ebx */ 737 ebp = POP32_VAL(esp); /* 0x420048CD: pop ebp */ 738 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x420048CE: ret 4 */ 739 RECOMP_REGS_OUT(); 740 } 741 742 void sub_420048E0(void) { 743 int _fpu_cmp = 0; 744 uint32_t _cf = 0; 745 int _df = 1; 746 uint32_t _flag_k = FK_NONE; 747 uint32_t _flag_a = 0, _flag_b = 0; 748 uint32_t _itail_tgt = 0; 749 RECOMP_REGS_LOCALS 750 RECOMP_ENTER(0x420048E0u); 751 752 L_420048E0: 753 PUSH32(esp, ebp); /* 0x420048E0: push ebp */ 754 ebp = esp; /* 0x420048E1: mov ebp, esp */ 755 PUSH32(esp, 0xFFFFFFFFu); /* 0x420048E3: push -1 */ 756 PUSH32(esp, 0x42017228u); /* 0x420048E5: push 0x42017228 */ 757 eax = MEM32(FS_BASE + (0)); /* 0x420048EA: mov eax, dword ptr fs:[0] */ 758 PUSH32(esp, eax); /* 0x420048F0: push eax */ 759 MEM32(FS_BASE + (0)) = esp; /* 0x420048F1: mov dword ptr fs:[0], esp */ 760 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 761 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 762 esp = esp - 0x10u; /* 0x420048F8: sub esp, 0x10 */ 763 _flag_k = FK_CMP; 764 PUSH32(esp, ebx); /* 0x420048FB: push ebx */ 765 ebx = ecx; /* 0x420048FC: mov ebx, ecx */ 766 eax = MEM32(ebx + 0x14); /* 0x420048FE: mov eax, dword ptr [ebx + 0x14] */ 767 PUSH32(esp, esi); /* 0x42004901: push esi */ 768 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 769 esi = 0; /* 0x42004902: xor esi, esi */ 770 _cf = 0; 771 _flag_k = FK_TEST; 772 /* cmp eax, esi */ /* 0x42004904: cmp eax, esi */ 773 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 774 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 775 _flag_k = FK_CMP; 776 if (CMP_EQ(_flag_a, _flag_b)) goto L_420049D7; /* 0x42004906: je 0x420049d7 */ 777 L_4200490C: 778 PUSH32(esp, edi); /* 0x4200490C: push edi */ 779 goto L_42004911; /* 0x4200490D: jmp 0x42004911 */ 780 L_4200490F: 781 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 782 esi = 0; /* 0x4200490F: xor esi, esi */ 783 _cf = 0; 784 _flag_k = FK_TEST; 785 L_42004911: 786 SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x42004911: mov al, byte ptr [ebp - 0xd] */ 787 PUSH32(esp, 0xCu); /* 0x42004914: push 0xc */ 788 MEM8(ebp + (-0x1C)) = (uint8_t)(LO8(eax)); /* 0x42004916: mov byte ptr [ebp - 0x1c], al */ 789 RECOMP_ICALL(0x42016F36u); /* 0x42004919: call 0x42016f36 */ /* not lifted */ 790 RECOMP_FLAGS_IN(); 791 MEM32(eax) = eax; /* 0x4200491E: mov dword ptr [eax], eax */ 792 MEM32(eax + 0x4) = eax; /* 0x42004920: mov dword ptr [eax + 4], eax */ 793 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 794 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 795 esp = esp + 4; /* 0x42004923: add esp, 4 */ 796 _flag_k = FK_ADD; 797 MEM32(ebp + (-0x18)) = eax; /* 0x42004926: mov dword ptr [ebp - 0x18], eax */ 798 MEM32(ebp + (-0x14)) = esi; /* 0x42004929: mov dword ptr [ebp - 0x14], esi */ 799 eax = ebx + 0xC; /* 0x4200492C: lea eax, [ebx + 0xc] */ 800 PUSH32(esp, eax); /* 0x4200492F: push eax */ 801 ecx = ebp + (-0x1C); /* 0x42004930: lea ecx, [ebp - 0x1c] */ 802 MEM32(ebp + (-0x4)) = esi; /* 0x42004933: mov dword ptr [ebp - 4], esi */ 803 RECOMP_ICALL(0x42004A40u); /* 0x42004936: call 0x42004a40 */ /* not lifted */ 804 RECOMP_FLAGS_IN(); 805 eax = MEM32(ebp + (-0x18)); /* 0x4200493B: mov eax, dword ptr [ebp - 0x18] */ 806 esi = MEM32(eax); /* 0x4200493E: mov esi, dword ptr [eax] */ 807 /* cmp esi, eax */ /* 0x42004940: cmp esi, eax */ 808 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 809 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 810 _flag_k = FK_CMP; 811 edi = eax; /* 0x42004942: mov edi, eax */ 812 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004981; /* 0x42004944: je 0x42004981 */ 813 L_42004946: 814 ecx = MEM32(esi + 0x8); /* 0x42004946: mov ecx, dword ptr [esi + 8] */ 815 PUSH32(esp, 0); /* 0x42004949: push 0 */ 816 PUSH32(esp, 0x42022250u); /* 0x4200494B: push 0x42022250 */ 817 PUSH32(esp, 0x420221A0u); /* 0x42004950: push 0x420221a0 */ 818 PUSH32(esp, 0); /* 0x42004955: push 0 */ 819 PUSH32(esp, ecx); /* 0x42004957: push ecx */ 820 RECOMP_ICALL(0x42016F42u); /* 0x42004958: call 0x42016f42 */ /* not lifted */ 821 RECOMP_FLAGS_IN(); 822 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 823 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 824 esp = esp + 0x14u; /* 0x4200495D: add esp, 0x14 */ 825 _flag_k = FK_ADD; 826 /* test eax, eax */ /* 0x42004960: test eax, eax */ 827 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 828 _cf = 0; 829 _flag_k = FK_TEST; 830 if (TEST_NZ(_flag_a, _flag_b)) goto L_4200496B; /* 0x42004962: jne 0x4200496b */ 831 L_42004964: 832 edx = MEM32(esi + 0x8); /* 0x42004964: mov edx, dword ptr [esi + 8] */ 833 PUSH32(esp, eax); /* 0x42004967: push eax */ 834 PUSH32(esp, edx); /* 0x42004968: push edx */ 835 goto L_42004971; /* 0x42004969: jmp 0x42004971 */ 836 L_4200496B: 837 eax = MEM32(esi + 0x8); /* 0x4200496B: mov eax, dword ptr [esi + 8] */ 838 PUSH32(esp, 1); /* 0x4200496E: push 1 */ 839 PUSH32(esp, eax); /* 0x42004970: push eax */ 840 L_42004971: 841 ecx = ebx; /* 0x42004971: mov ecx, ebx */ 842 RECOMP_ICALL(0x42004180u); /* 0x42004973: call 0x42004180 */ /* not lifted */ 843 RECOMP_FLAGS_IN(); 844 esi = MEM32(esi); /* 0x42004978: mov esi, dword ptr [esi] */ 845 /* cmp esi, edi */ /* 0x4200497A: cmp esi, edi */ 846 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi); 847 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 848 _flag_k = FK_CMP; 849 RECOMP_BACKEDGE(); 850 if (CMP_NE(_flag_a, _flag_b)) goto L_42004946; /* 0x4200497C: jne 0x42004946 */ 851 L_4200497E: 852 eax = MEM32(ebp + (-0x18)); /* 0x4200497E: mov eax, dword ptr [ebp - 0x18] */ 853 L_42004981: 854 edi = eax; /* 0x42004981: mov edi, eax */ 855 esi = MEM32(edi); /* 0x42004983: mov esi, dword ptr [edi] */ 856 /* cmp esi, edi */ /* 0x42004985: cmp esi, edi */ 857 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi); 858 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 859 _flag_k = FK_CMP; 860 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x42004987: mov dword ptr [ebp - 4], 0xffffffff */ 861 if (CMP_EQ(_flag_a, _flag_b)) goto L_420049BA; /* 0x4200498E: je 0x420049ba */ 862 L_42004990: 863 eax = esi; /* 0x42004990: mov eax, esi */ 864 ecx = MEM32(eax + 0x4); /* 0x42004992: mov ecx, dword ptr [eax + 4] */ 865 edx = MEM32(eax); /* 0x42004995: mov edx, dword ptr [eax] */ 866 esi = MEM32(esi); /* 0x42004997: mov esi, dword ptr [esi] */ 867 MEM32(ecx) = edx; /* 0x42004999: mov dword ptr [ecx], edx */ 868 ecx = MEM32(eax); /* 0x4200499B: mov ecx, dword ptr [eax] */ 869 edx = MEM32(eax + 0x4); /* 0x4200499D: mov edx, dword ptr [eax + 4] */ 870 PUSH32(esp, eax); /* 0x420049A0: push eax */ 871 MEM32(ecx + 0x4) = edx; /* 0x420049A1: mov dword ptr [ecx + 4], edx */ 872 RECOMP_ICALL(0x42016DD0u); /* 0x420049A4: call 0x42016dd0 */ /* not lifted */ 873 RECOMP_FLAGS_IN(); 874 ecx = MEM32(ebp + (-0x14)); /* 0x420049A9: mov ecx, dword ptr [ebp - 0x14] */ 875 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 876 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 877 esp = esp + 4; /* 0x420049AC: add esp, 4 */ 878 _flag_k = FK_ADD; 879 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 880 ecx = ecx - 1; /* 0x420049AF: dec ecx */ 881 _flag_k = FK_DEC; 882 /* cmp esi, edi */ /* 0x420049B0: cmp esi, edi */ 883 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi); 884 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 885 _flag_k = FK_CMP; 886 MEM32(ebp + (-0x14)) = ecx; /* 0x420049B2: mov dword ptr [ebp - 0x14], ecx */ 887 RECOMP_BACKEDGE(); 888 if (CMP_NE(_flag_a, _flag_b)) goto L_42004990; /* 0x420049B5: jne 0x42004990 */ 889 L_420049B7: 890 eax = MEM32(ebp + (-0x18)); /* 0x420049B7: mov eax, dword ptr [ebp - 0x18] */ 891 L_420049BA: 892 PUSH32(esp, eax); /* 0x420049BA: push eax */ 893 RECOMP_ICALL(0x42016DD0u); /* 0x420049BB: call 0x42016dd0 */ /* not lifted */ 894 RECOMP_FLAGS_IN(); 895 ecx = MEM32(ebx + 0x14); /* 0x420049C0: mov ecx, dword ptr [ebx + 0x14] */ 896 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 897 eax = 0; /* 0x420049C3: xor eax, eax */ 898 _cf = 0; 899 _flag_k = FK_TEST; 900 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 901 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 902 esp = esp + 4; /* 0x420049C5: add esp, 4 */ 903 _flag_k = FK_ADD; 904 /* cmp ecx, eax */ /* 0x420049C8: cmp ecx, eax */ 905 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 906 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 907 _flag_k = FK_CMP; 908 MEM32(ebp + (-0x18)) = eax; /* 0x420049CA: mov dword ptr [ebp - 0x18], eax */ 909 MEM32(ebp + (-0x14)) = eax; /* 0x420049CD: mov dword ptr [ebp - 0x14], eax */ 910 RECOMP_BACKEDGE(); 911 if (CMP_NE(_flag_a, _flag_b)) goto L_4200490F; /* 0x420049D0: jne 0x4200490f */ 912 L_420049D6: 913 edi = POP32_VAL(esp); /* 0x420049D6: pop edi */ 914 L_420049D7: 915 ecx = MEM32(ebp + (-0xC)); /* 0x420049D7: mov ecx, dword ptr [ebp - 0xc] */ 916 esi = POP32_VAL(esp); /* 0x420049DA: pop esi */ 917 ebx = POP32_VAL(esp); /* 0x420049DB: pop ebx */ 918 MEM32(FS_BASE + (0)) = ecx; /* 0x420049DC: mov dword ptr fs:[0], ecx */ 919 esp = ebp; /* 0x420049E3: mov esp, ebp */ 920 ebp = POP32_VAL(esp); /* 0x420049E5: pop ebp */ 921 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x420049E6: ret */ 922 RECOMP_REGS_OUT(); 923 } 924 925 void sub_420049F0(void) { 926 int _fpu_cmp = 0; 927 uint32_t _cf = 0; 928 int _df = 1; 929 uint32_t _flag_k = FK_NONE; 930 uint32_t _flag_a = 0, _flag_b = 0; 931 uint32_t _itail_tgt = 0; 932 RECOMP_REGS_LOCALS 933 RECOMP_ENTER(0x420049F0u); 934 935 L_420049F0: 936 PUSH32(esp, ebp); /* 0x420049F0: push ebp */ 937 ebp = esp; /* 0x420049F1: mov ebp, esp */ 938 PUSH32(esp, esi); /* 0x420049F3: push esi */ 939 esi = ecx; /* 0x420049F4: mov esi, ecx */ 940 ecx = MEM32(esi + 0x10); /* 0x420049F6: mov ecx, dword ptr [esi + 0x10] */ 941 eax = MEM32(ecx); /* 0x420049F9: mov eax, dword ptr [ecx] */ 942 /* cmp eax, ecx */ /* 0x420049FB: cmp eax, ecx */ 943 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 944 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 945 _flag_k = FK_CMP; 946 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004A30; /* 0x420049FD: je 0x42004a30 */ 947 L_420049FF: 948 edx = MEM32(ebp + 0x8); /* 0x420049FF: mov edx, dword ptr [ebp + 8] */ 949 L_42004A02: 950 /* cmp MEM32(eax + 0x8), edx */ /* 0x42004A02: cmp dword ptr [eax + 8], edx */ 951 _flag_a = (uint32_t)(MEM32(eax + 0x8)); _flag_b = (uint32_t)(edx); 952 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 953 _flag_k = FK_CMP; 954 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004A0D; /* 0x42004A05: je 0x42004a0d */ 955 L_42004A07: 956 eax = MEM32(eax); /* 0x42004A07: mov eax, dword ptr [eax] */ 957 /* cmp eax, ecx */ /* 0x42004A09: cmp eax, ecx */ 958 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 959 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 960 _flag_k = FK_CMP; 961 RECOMP_BACKEDGE(); 962 if (CMP_NE(_flag_a, _flag_b)) goto L_42004A02; /* 0x42004A0B: jne 0x42004a02 */ 963 L_42004A0D: 964 /* cmp eax, ecx */ /* 0x42004A0D: cmp eax, ecx */ 965 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 966 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 967 _flag_k = FK_CMP; 968 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004A30; /* 0x42004A0F: je 0x42004a30 */ 969 L_42004A11: 970 ecx = MEM32(eax + 0x4); /* 0x42004A11: mov ecx, dword ptr [eax + 4] */ 971 edx = MEM32(eax); /* 0x42004A14: mov edx, dword ptr [eax] */ 972 MEM32(ecx) = edx; /* 0x42004A16: mov dword ptr [ecx], edx */ 973 ecx = MEM32(eax); /* 0x42004A18: mov ecx, dword ptr [eax] */ 974 edx = MEM32(eax + 0x4); /* 0x42004A1A: mov edx, dword ptr [eax + 4] */ 975 PUSH32(esp, eax); /* 0x42004A1D: push eax */ 976 MEM32(ecx + 0x4) = edx; /* 0x42004A1E: mov dword ptr [ecx + 4], edx */ 977 RECOMP_ICALL(0x42016DD0u); /* 0x42004A21: call 0x42016dd0 */ /* not lifted */ 978 RECOMP_FLAGS_IN(); 979 eax = MEM32(esi + 0x14); /* 0x42004A26: mov eax, dword ptr [esi + 0x14] */ 980 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 981 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 982 esp = esp + 4; /* 0x42004A29: add esp, 4 */ 983 _flag_k = FK_ADD; 984 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 985 eax = eax - 1; /* 0x42004A2C: dec eax */ 986 _flag_k = FK_DEC; 987 MEM32(esi + 0x14) = eax; /* 0x42004A2D: mov dword ptr [esi + 0x14], eax */ 988 L_42004A30: 989 esi = POP32_VAL(esp); /* 0x42004A30: pop esi */ 990 ebp = POP32_VAL(esp); /* 0x42004A31: pop ebp */ 991 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42004A32: ret 4 */ 992 RECOMP_REGS_OUT(); 993 } 994 995 void sub_42004A40(void) { 996 int _fpu_cmp = 0; 997 uint32_t _cf = 0; 998 int _df = 1; 999 uint32_t _flag_k = FK_NONE; 1000 uint32_t _flag_a = 0, _flag_b = 0; 1001 uint32_t _itail_tgt = 0; 1002 RECOMP_REGS_LOCALS 1003 RECOMP_ENTER(0x42004A40u); 1004 1005 L_42004A40: 1006 PUSH32(esp, ebp); /* 0x42004A40: push ebp */ 1007 ebp = esp; /* 0x42004A41: mov ebp, esp */ 1008 eax = MEM32(ebp + 0x8); /* 0x42004A43: mov eax, dword ptr [ebp + 8] */ 1009 edx = MEM32(ecx + 0x4); /* 0x42004A46: mov edx, dword ptr [ecx + 4] */ 1010 PUSH32(esp, esi); /* 0x42004A49: push esi */ 1011 esi = MEM32(eax + 0x4); /* 0x42004A4A: mov esi, dword ptr [eax + 4] */ 1012 MEM32(ecx + 0x4) = esi; /* 0x42004A4D: mov dword ptr [ecx + 4], esi */ 1013 MEM32(eax + 0x4) = edx; /* 0x42004A50: mov dword ptr [eax + 4], edx */ 1014 esi = MEM32(eax + 0x8); /* 0x42004A53: mov esi, dword ptr [eax + 8] */ 1015 edx = MEM32(ecx + 0x8); /* 0x42004A56: mov edx, dword ptr [ecx + 8] */ 1016 MEM32(ecx + 0x8) = esi; /* 0x42004A59: mov dword ptr [ecx + 8], esi */ 1017 MEM32(eax + 0x8) = edx; /* 0x42004A5C: mov dword ptr [eax + 8], edx */ 1018 esi = POP32_VAL(esp); /* 0x42004A5F: pop esi */ 1019 ebp = POP32_VAL(esp); /* 0x42004A60: pop ebp */ 1020 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42004A61: ret 4 */ 1021 RECOMP_REGS_OUT(); 1022 } 1023 1024 void sub_42004A70(void) { 1025 int _fpu_cmp = 0; 1026 uint32_t _cf = 0; 1027 int _df = 1; 1028 uint32_t _flag_k = FK_NONE; 1029 uint32_t _flag_a = 0, _flag_b = 0; 1030 uint32_t _itail_tgt = 0; 1031 RECOMP_REGS_LOCALS 1032 RECOMP_ENTER(0x42004A70u); 1033 1034 L_42004A70: 1035 PUSH32(esp, ebp); /* 0x42004A70: push ebp */ 1036 ebp = esp; /* 0x42004A71: mov ebp, esp */ 1037 eax = MEM32(ebp + 0x8); /* 0x42004A73: mov eax, dword ptr [ebp + 8] */ 1038 /* test eax, eax */ /* 0x42004A76: test eax, eax */ 1039 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1040 _cf = 0; 1041 _flag_k = FK_TEST; 1042 if (TEST_Z(_flag_a, _flag_b)) goto L_42004A81; /* 0x42004A78: je 0x42004a81 */ 1043 L_42004A7A: 1044 ecx = MEM32(ebp + 0xC); /* 0x42004A7A: mov ecx, dword ptr [ebp + 0xc] */ 1045 edx = MEM32(ecx); /* 0x42004A7D: mov edx, dword ptr [ecx] */ 1046 MEM32(eax) = edx; /* 0x42004A7F: mov dword ptr [eax], edx */ 1047 L_42004A81: 1048 ebp = POP32_VAL(esp); /* 0x42004A81: pop ebp */ 1049 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42004A82: ret */ 1050 RECOMP_REGS_OUT(); 1051 } 1052 1053 void sub_42004A90(void) { 1054 int _fpu_cmp = 0; 1055 uint32_t _cf = 0; 1056 int _df = 1; 1057 uint32_t _flag_k = FK_NONE; 1058 uint32_t _flag_a = 0, _flag_b = 0; 1059 uint32_t _itail_tgt = 0; 1060 RECOMP_REGS_LOCALS 1061 RECOMP_ENTER(0x42004A90u); 1062 1063 L_42004A90: 1064 PUSH32(esp, ebp); /* 0x42004A90: push ebp */ 1065 ebp = esp; /* 0x42004A91: mov ebp, esp */ 1066 eax = MEM32(ecx + 0x24); /* 0x42004A93: mov eax, dword ptr [ecx + 0x24] */ 1067 eax = (uint32_t)((int32_t)eax * (int32_t)MEM32(ebp + 0xC)); /* 0x42004A96: imul eax, dword ptr [ebp + 0xc] */ 1068 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ebp + 0x8)); 1069 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1070 eax = eax + MEM32(ebp + 0x8); /* 0x42004A9A: add eax, dword ptr [ebp + 8] */ 1071 _flag_k = FK_ADD; 1072 ebp = POP32_VAL(esp); /* 0x42004A9D: pop ebp */ 1073 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x42004A9E: ret 8 */ 1074 RECOMP_REGS_OUT(); 1075 } 1076 1077 void sub_42004AB0(void) { 1078 int _fpu_cmp = 0; 1079 uint32_t _cf = 0; 1080 int _df = 1; 1081 uint32_t _flag_k = FK_NONE; 1082 uint32_t _flag_a = 0, _flag_b = 0; 1083 uint32_t _itail_tgt = 0; 1084 RECOMP_REGS_LOCALS 1085 RECOMP_ENTER(0x42004AB0u); 1086 1087 L_42004AB0: 1088 PUSH32(esp, ebp); /* 0x42004AB0: push ebp */ 1089 ebp = esp; /* 0x42004AB1: mov ebp, esp */ 1090 PUSH32(esp, esi); /* 0x42004AB3: push esi */ 1091 esi = MEM32(ebp + 0x8); /* 0x42004AB4: mov esi, dword ptr [ebp + 8] */ 1092 eax = esi; /* 0x42004AB7: mov eax, esi */ 1093 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x42004AB9: cdq */ 1094 { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)MEM32(ecx + 0x24); /* 0x42004ABA: idiv dword ptr [ecx + 0x24] */ 1095 if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); } 1096 else { eax = 0; edx = 0; } } 1097 eax = MEM32(ebp + 0xC); /* 0x42004ABD: mov eax, dword ptr [ebp + 0xc] */ 1098 MEM32(eax) = edx; /* 0x42004AC0: mov dword ptr [eax], edx */ 1099 eax = esi; /* 0x42004AC2: mov eax, esi */ 1100 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x42004AC4: cdq */ 1101 { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)MEM32(ecx + 0x24); /* 0x42004AC5: idiv dword ptr [ecx + 0x24] */ 1102 if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); } 1103 else { eax = 0; edx = 0; } } 1104 ecx = MEM32(ebp + 0x10); /* 0x42004AC8: mov ecx, dword ptr [ebp + 0x10] */ 1105 esi = POP32_VAL(esp); /* 0x42004ACB: pop esi */ 1106 MEM32(ecx) = eax; /* 0x42004ACC: mov dword ptr [ecx], eax */ 1107 ebp = POP32_VAL(esp); /* 0x42004ACE: pop ebp */ 1108 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x42004ACF: ret 0xc */ 1109 RECOMP_REGS_OUT(); 1110 } 1111 1112 void sub_42004AE0(void) { 1113 int _fpu_cmp = 0; 1114 uint32_t _cf = 0; 1115 int _df = 1; 1116 uint32_t _flag_k = FK_NONE; 1117 uint32_t _flag_a = 0, _flag_b = 0; 1118 uint32_t _itail_tgt = 0; 1119 RECOMP_REGS_LOCALS 1120 RECOMP_ENTER(0x42004AE0u); 1121 1122 L_42004AE0: 1123 PUSH32(esp, ebp); /* 0x42004AE0: push ebp */ 1124 ebp = esp; /* 0x42004AE1: mov ebp, esp */ 1125 PUSH32(esp, esi); /* 0x42004AE3: push esi */ 1126 PUSH32(esp, edi); /* 0x42004AE4: push edi */ 1127 edi = MEM32(ebp + 0x8); /* 0x42004AE5: mov edi, dword ptr [ebp + 8] */ 1128 esi = ecx; /* 0x42004AE8: mov esi, ecx */ 1129 PUSH32(esp, edi); /* 0x42004AEA: push edi */ 1130 RECOMP_ICALL(0x42003CD0u); /* 0x42004AEB: call 0x42003cd0 */ /* not lifted */ 1131 RECOMP_FLAGS_IN(); 1132 eax = MEM32(edi + 0x24); /* 0x42004AF0: mov eax, dword ptr [edi + 0x24] */ 1133 MEM32(esi + 0x24) = eax; /* 0x42004AF3: mov dword ptr [esi + 0x24], eax */ 1134 ecx = MEM32(edi + 0x28); /* 0x42004AF6: mov ecx, dword ptr [edi + 0x28] */ 1135 MEM32(esi + 0x28) = ecx; /* 0x42004AF9: mov dword ptr [esi + 0x28], ecx */ 1136 edx = MEM32(edi + 0x2C); /* 0x42004AFC: mov edx, dword ptr [edi + 0x2c] */ 1137 MEM32(esi + 0x2C) = edx; /* 0x42004AFF: mov dword ptr [esi + 0x2c], edx */ 1138 eax = MEM32(edi + 0x30); /* 0x42004B02: mov eax, dword ptr [edi + 0x30] */ 1139 MEM32(esi + 0x30) = eax; /* 0x42004B05: mov dword ptr [esi + 0x30], eax */ 1140 ecx = MEM32(edi + 0x34); /* 0x42004B08: mov ecx, dword ptr [edi + 0x34] */ 1141 edi = POP32_VAL(esp); /* 0x42004B0B: pop edi */ 1142 MEM32(esi + 0x34) = ecx; /* 0x42004B0C: mov dword ptr [esi + 0x34], ecx */ 1143 MEM32(esi) = 0x42018388u; /* 0x42004B0F: mov dword ptr [esi], 0x42018388 */ 1144 MEM32(esi + 0x4) = 0x42018380u; /* 0x42004B15: mov dword ptr [esi + 4], 0x42018380 */ 1145 eax = esi; /* 0x42004B1C: mov eax, esi */ 1146 esi = POP32_VAL(esp); /* 0x42004B1E: pop esi */ 1147 ebp = POP32_VAL(esp); /* 0x42004B1F: pop ebp */ 1148 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42004B20: ret 4 */ 1149 RECOMP_REGS_OUT(); 1150 } 1151 1152 void sub_42004B30(void) { 1153 int _fpu_cmp = 0; 1154 uint32_t _cf = 0; 1155 int _df = 1; 1156 uint32_t _flag_k = FK_NONE; 1157 uint32_t _flag_a = 0, _flag_b = 0; 1158 uint32_t _itail_tgt = 0; 1159 RECOMP_REGS_LOCALS 1160 RECOMP_ENTER(0x42004B30u); 1161 1162 L_42004B30: 1163 PUSH32(esp, ebp); /* 0x42004B30: push ebp */ 1164 ebp = esp; /* 0x42004B31: mov ebp, esp */ 1165 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 1166 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1167 esp = esp - 0xCu; /* 0x42004B33: sub esp, 0xc */ 1168 _flag_k = FK_CMP; 1169 eax = MEM32(ebp + 0x8); /* 0x42004B36: mov eax, dword ptr [ebp + 8] */ 1170 SET_LO8(edx, MEM8(eax + 0x8)); /* 0x42004B39: mov dl, byte ptr [eax + 8] */ 1171 PUSH32(esp, ebx); /* 0x42004B3C: push ebx */ 1172 PUSH32(esp, esi); /* 0x42004B3D: push esi */ 1173 PUSH32(esp, edi); /* 0x42004B3E: push edi */ 1174 ebx = eax + 0xC; /* 0x42004B3F: lea ebx, [eax + 0xc] */ 1175 edi = ecx + 0xC; /* 0x42004B42: lea edi, [ecx + 0xc] */ 1176 /* cmp edi, ebx */ /* 0x42004B45: cmp edi, ebx */ 1177 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx); 1178 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1179 _flag_k = FK_CMP; 1180 MEM32(ebp + (-0xC)) = ecx; /* 0x42004B47: mov dword ptr [ebp - 0xc], ecx */ 1181 MEM8(ecx + 0x8) = (uint8_t)(LO8(edx)); /* 0x42004B4A: mov byte ptr [ecx + 8], dl */ 1182 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004BF5; /* 0x42004B4D: je 0x42004bf5 */ 1183 L_42004B53: 1184 esi = MEM32(edi + 0x4); /* 0x42004B53: mov esi, dword ptr [edi + 4] */ 1185 ebx = MEM32(ebx + 0x4); /* 0x42004B56: mov ebx, dword ptr [ebx + 4] */ 1186 edx = MEM32(esi); /* 0x42004B59: mov edx, dword ptr [esi] */ 1187 /* cmp edx, esi */ /* 0x42004B5B: cmp edx, esi */ 1188 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(esi); 1189 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1190 _flag_k = FK_CMP; 1191 eax = MEM32(ebx); /* 0x42004B5D: mov eax, dword ptr [ebx] */ 1192 MEM32(ebp + (-0x8)) = ebx; /* 0x42004B5F: mov dword ptr [ebp - 8], ebx */ 1193 MEM32(ebp + (-0x4)) = eax; /* 0x42004B62: mov dword ptr [ebp - 4], eax */ 1194 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004B81; /* 0x42004B65: je 0x42004b81 */ 1195 L_42004B67: 1196 goto L_42004B6C; /* 0x42004B67: jmp 0x42004b6c */ 1197 L_42004B69: 1198 ebx = MEM32(ebp + (-0x8)); /* 0x42004B69: mov ebx, dword ptr [ebp - 8] */ 1199 L_42004B6C: 1200 /* cmp eax, ebx */ /* 0x42004B6C: cmp eax, ebx */ 1201 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 1202 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1203 _flag_k = FK_CMP; 1204 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004B81; /* 0x42004B6E: je 0x42004b81 */ 1205 L_42004B70: 1206 ebx = MEM32(eax + 0x8); /* 0x42004B70: mov ebx, dword ptr [eax + 8] */ 1207 MEM32(edx + 0x8) = ebx; /* 0x42004B73: mov dword ptr [edx + 8], ebx */ 1208 edx = MEM32(edx); /* 0x42004B76: mov edx, dword ptr [edx] */ 1209 /* cmp edx, esi */ /* 0x42004B78: cmp edx, esi */ 1210 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(esi); 1211 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1212 _flag_k = FK_CMP; 1213 eax = MEM32(eax); /* 0x42004B7A: mov eax, dword ptr [eax] */ 1214 MEM32(ebp + (-0x4)) = eax; /* 0x42004B7C: mov dword ptr [ebp - 4], eax */ 1215 RECOMP_BACKEDGE(); 1216 if (CMP_NE(_flag_a, _flag_b)) goto L_42004B69; /* 0x42004B7F: jne 0x42004b69 */ 1217 L_42004B81: 1218 /* cmp edx, esi */ /* 0x42004B81: cmp edx, esi */ 1219 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(esi); 1220 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1221 _flag_k = FK_CMP; 1222 ebx = edx; /* 0x42004B83: mov ebx, edx */ 1223 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004BB4; /* 0x42004B85: je 0x42004bb4 */ 1224 L_42004B87: 1225 eax = ebx; /* 0x42004B87: mov eax, ebx */ 1226 ecx = MEM32(eax + 0x4); /* 0x42004B89: mov ecx, dword ptr [eax + 4] */ 1227 edx = MEM32(eax); /* 0x42004B8C: mov edx, dword ptr [eax] */ 1228 ebx = MEM32(ebx); /* 0x42004B8E: mov ebx, dword ptr [ebx] */ 1229 MEM32(ecx) = edx; /* 0x42004B90: mov dword ptr [ecx], edx */ 1230 ecx = MEM32(eax); /* 0x42004B92: mov ecx, dword ptr [eax] */ 1231 edx = MEM32(eax + 0x4); /* 0x42004B94: mov edx, dword ptr [eax + 4] */ 1232 PUSH32(esp, eax); /* 0x42004B97: push eax */ 1233 MEM32(ecx + 0x4) = edx; /* 0x42004B98: mov dword ptr [ecx + 4], edx */ 1234 RECOMP_ICALL(0x42016DD0u); /* 0x42004B9B: call 0x42016dd0 */ /* not lifted */ 1235 RECOMP_FLAGS_IN(); 1236 ecx = MEM32(edi + 0x8); /* 0x42004BA0: mov ecx, dword ptr [edi + 8] */ 1237 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1238 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1239 esp = esp + 4; /* 0x42004BA3: add esp, 4 */ 1240 _flag_k = FK_ADD; 1241 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 1242 ecx = ecx - 1; /* 0x42004BA6: dec ecx */ 1243 _flag_k = FK_DEC; 1244 /* cmp ebx, esi */ /* 0x42004BA7: cmp ebx, esi */ 1245 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi); 1246 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1247 _flag_k = FK_CMP; 1248 MEM32(edi + 0x8) = ecx; /* 0x42004BA9: mov dword ptr [edi + 8], ecx */ 1249 RECOMP_BACKEDGE(); 1250 if (CMP_NE(_flag_a, _flag_b)) goto L_42004B87; /* 0x42004BAC: jne 0x42004b87 */ 1251 L_42004BAE: 1252 ecx = MEM32(ebp + (-0xC)); /* 0x42004BAE: mov ecx, dword ptr [ebp - 0xc] */ 1253 eax = MEM32(ebp + (-0x4)); /* 0x42004BB1: mov eax, dword ptr [ebp - 4] */ 1254 L_42004BB4: 1255 /* cmp eax, MEM32(ebp + (-0x8)) */ /* 0x42004BB4: cmp eax, dword ptr [ebp - 8] */ 1256 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ebp + (-0x8))); 1257 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1258 _flag_k = FK_CMP; 1259 ebx = eax; /* 0x42004BB7: mov ebx, eax */ 1260 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004BF2; /* 0x42004BB9: je 0x42004bf2 */ 1261 L_42004BBB: 1262 eax = MEM32(esi + 0x4); /* 0x42004BBB: mov eax, dword ptr [esi + 4] */ 1263 PUSH32(esp, eax); /* 0x42004BBE: push eax */ 1264 PUSH32(esp, esi); /* 0x42004BBF: push esi */ 1265 ecx = edi; /* 0x42004BC0: mov ecx, edi */ 1266 RECOMP_ICALL(0x42005D10u); /* 0x42004BC2: call 0x42005d10 */ /* not lifted */ 1267 RECOMP_FLAGS_IN(); 1268 MEM32(esi + 0x4) = eax; /* 0x42004BC7: mov dword ptr [esi + 4], eax */ 1269 ecx = MEM32(eax + 0x4); /* 0x42004BCA: mov ecx, dword ptr [eax + 4] */ 1270 edx = ebx + 0x8; /* 0x42004BCD: lea edx, [ebx + 8] */ 1271 MEM32(ecx) = eax; /* 0x42004BD0: mov dword ptr [ecx], eax */ 1272 PUSH32(esp, edx); /* 0x42004BD2: push edx */ 1273 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(8); 1274 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1275 eax = eax + 8; /* 0x42004BD3: add eax, 8 */ 1276 _flag_k = FK_ADD; 1277 PUSH32(esp, eax); /* 0x42004BD6: push eax */ 1278 RECOMP_ICALL(0x42004A70u); /* 0x42004BD7: call 0x42004a70 */ /* not lifted */ 1279 RECOMP_FLAGS_IN(); 1280 ecx = MEM32(edi + 0x8); /* 0x42004BDC: mov ecx, dword ptr [edi + 8] */ 1281 eax = MEM32(ebp + (-0x8)); /* 0x42004BDF: mov eax, dword ptr [ebp - 8] */ 1282 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 1283 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1284 esp = esp + 8; /* 0x42004BE2: add esp, 8 */ 1285 _flag_k = FK_ADD; 1286 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 1287 ecx = ecx + 1; /* 0x42004BE5: inc ecx */ 1288 _flag_k = FK_INC; 1289 MEM32(edi + 0x8) = ecx; /* 0x42004BE6: mov dword ptr [edi + 8], ecx */ 1290 ebx = MEM32(ebx); /* 0x42004BE9: mov ebx, dword ptr [ebx] */ 1291 /* cmp ebx, eax */ /* 0x42004BEB: cmp ebx, eax */ 1292 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 1293 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1294 _flag_k = FK_CMP; 1295 RECOMP_BACKEDGE(); 1296 if (CMP_NE(_flag_a, _flag_b)) goto L_42004BBB; /* 0x42004BED: jne 0x42004bbb */ 1297 L_42004BEF: 1298 ecx = MEM32(ebp + (-0xC)); /* 0x42004BEF: mov ecx, dword ptr [ebp - 0xc] */ 1299 L_42004BF2: 1300 eax = MEM32(ebp + 0x8); /* 0x42004BF2: mov eax, dword ptr [ebp + 8] */ 1301 L_42004BF5: 1302 edx = MEM32(eax + 0x18); /* 0x42004BF5: mov edx, dword ptr [eax + 0x18] */ 1303 MEM32(ecx + 0x18) = edx; /* 0x42004BF8: mov dword ptr [ecx + 0x18], edx */ 1304 edx = MEM32(eax + 0x1C); /* 0x42004BFB: mov edx, dword ptr [eax + 0x1c] */ 1305 MEM32(ecx + 0x1C) = edx; /* 0x42004BFE: mov dword ptr [ecx + 0x1c], edx */ 1306 edx = MEM32(eax + 0x20); /* 0x42004C01: mov edx, dword ptr [eax + 0x20] */ 1307 MEM32(ecx + 0x20) = edx; /* 0x42004C04: mov dword ptr [ecx + 0x20], edx */ 1308 edx = MEM32(eax + 0x24); /* 0x42004C07: mov edx, dword ptr [eax + 0x24] */ 1309 MEM32(ecx + 0x24) = edx; /* 0x42004C0A: mov dword ptr [ecx + 0x24], edx */ 1310 edx = MEM32(eax + 0x28); /* 0x42004C0D: mov edx, dword ptr [eax + 0x28] */ 1311 MEM32(ecx + 0x28) = edx; /* 0x42004C10: mov dword ptr [ecx + 0x28], edx */ 1312 edx = MEM32(eax + 0x2C); /* 0x42004C13: mov edx, dword ptr [eax + 0x2c] */ 1313 MEM32(ecx + 0x2C) = edx; /* 0x42004C16: mov dword ptr [ecx + 0x2c], edx */ 1314 edx = MEM32(eax + 0x30); /* 0x42004C19: mov edx, dword ptr [eax + 0x30] */ 1315 edi = POP32_VAL(esp); /* 0x42004C1C: pop edi */ 1316 MEM32(ecx + 0x30) = edx; /* 0x42004C1D: mov dword ptr [ecx + 0x30], edx */ 1317 eax = MEM32(eax + 0x34); /* 0x42004C20: mov eax, dword ptr [eax + 0x34] */ 1318 esi = POP32_VAL(esp); /* 0x42004C23: pop esi */ 1319 MEM32(ecx + 0x34) = eax; /* 0x42004C24: mov dword ptr [ecx + 0x34], eax */ 1320 eax = ecx; /* 0x42004C27: mov eax, ecx */ 1321 ebx = POP32_VAL(esp); /* 0x42004C29: pop ebx */ 1322 esp = ebp; /* 0x42004C2A: mov esp, ebp */ 1323 ebp = POP32_VAL(esp); /* 0x42004C2C: pop ebp */ 1324 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42004C2D: ret 4 */ 1325 RECOMP_REGS_OUT(); 1326 } 1327 1328 void sub_42004C30(void) { 1329 int _fpu_cmp = 0; 1330 uint32_t _cf = 0; 1331 int _df = 1; 1332 uint32_t _flag_k = FK_NONE; 1333 uint32_t _flag_a = 0, _flag_b = 0; 1334 uint32_t _itail_tgt = 0; 1335 RECOMP_REGS_LOCALS 1336 RECOMP_ENTER(0x42004C30u); 1337 1338 L_42004C30: 1339 PUSH32(esp, ebp); /* 0x42004C30: push ebp */ 1340 ebp = esp; /* 0x42004C31: mov ebp, esp */ 1341 PUSH32(esp, ebx); /* 0x42004C33: push ebx */ 1342 SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x42004C34: mov bl, byte ptr [ebp + 8] */ 1343 /* test LO8(ebx), 2 */ /* 0x42004C37: test bl, 2 */ 1344 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 1345 _cf = 0; 1346 _flag_k = FK_NARROW(FK_TEST, 24); 1347 PUSH32(esp, esi); /* 0x42004C3A: push esi */ 1348 esi = ecx; /* 0x42004C3B: mov esi, ecx */ 1349 if (TEST_Z(_flag_a, _flag_b)) goto L_42004C6B; /* 0x42004C3D: je 0x42004c6b */ 1350 L_42004C3F: 1351 eax = MEM32(esi + (-0x4)); /* 0x42004C3F: mov eax, dword ptr [esi - 4] */ 1352 PUSH32(esp, edi); /* 0x42004C42: push edi */ 1353 PUSH32(esp, 0x42004FA0u); /* 0x42004C43: push 0x42004fa0 */ 1354 edi = esi + (-0x4); /* 0x42004C48: lea edi, [esi - 4] */ 1355 PUSH32(esp, eax); /* 0x42004C4B: push eax */ 1356 PUSH32(esp, 0x38u); /* 0x42004C4C: push 0x38 */ 1357 PUSH32(esp, esi); /* 0x42004C4E: push esi */ 1358 RECOMP_ICALL(0x42016E3Cu); /* 0x42004C4F: call 0x42016e3c */ /* not lifted */ 1359 RECOMP_FLAGS_IN(); 1360 /* test LO8(ebx), 1 */ /* 0x42004C54: test bl, 1 */ 1361 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 1362 _cf = 0; 1363 _flag_k = FK_NARROW(FK_TEST, 24); 1364 if (TEST_Z(_flag_a, _flag_b)) goto L_42004C62; /* 0x42004C57: je 0x42004c62 */ 1365 L_42004C59: 1366 PUSH32(esp, edi); /* 0x42004C59: push edi */ 1367 RECOMP_ICALL(0x42016DD0u); /* 0x42004C5A: call 0x42016dd0 */ /* not lifted */ 1368 RECOMP_FLAGS_IN(); 1369 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1370 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1371 esp = esp + 4; /* 0x42004C5F: add esp, 4 */ 1372 _flag_k = FK_ADD; 1373 L_42004C62: 1374 eax = edi; /* 0x42004C62: mov eax, edi */ 1375 edi = POP32_VAL(esp); /* 0x42004C64: pop edi */ 1376 esi = POP32_VAL(esp); /* 0x42004C65: pop esi */ 1377 ebx = POP32_VAL(esp); /* 0x42004C66: pop ebx */ 1378 ebp = POP32_VAL(esp); /* 0x42004C67: pop ebp */ 1379 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42004C68: ret 4 */ 1380 L_42004C6B: 1381 ecx = esi; /* 0x42004C6B: mov ecx, esi */ 1382 RECOMP_ICALL(0x42004FA0u); /* 0x42004C6D: call 0x42004fa0 */ /* not lifted */ 1383 RECOMP_FLAGS_IN(); 1384 /* test LO8(ebx), 1 */ /* 0x42004C72: test bl, 1 */ 1385 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 1386 _cf = 0; 1387 _flag_k = FK_NARROW(FK_TEST, 24); 1388 if (TEST_Z(_flag_a, _flag_b)) goto L_42004C80; /* 0x42004C75: je 0x42004c80 */ 1389 L_42004C77: 1390 PUSH32(esp, esi); /* 0x42004C77: push esi */ 1391 RECOMP_ICALL(0x42016DD0u); /* 0x42004C78: call 0x42016dd0 */ /* not lifted */ 1392 RECOMP_FLAGS_IN(); 1393 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1394 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1395 esp = esp + 4; /* 0x42004C7D: add esp, 4 */ 1396 _flag_k = FK_ADD; 1397 L_42004C80: 1398 eax = esi; /* 0x42004C80: mov eax, esi */ 1399 esi = POP32_VAL(esp); /* 0x42004C82: pop esi */ 1400 ebx = POP32_VAL(esp); /* 0x42004C83: pop ebx */ 1401 ebp = POP32_VAL(esp); /* 0x42004C84: pop ebp */ 1402 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42004C85: ret 4 */ 1403 RECOMP_REGS_OUT(); 1404 } 1405 1406 void sub_42004C90(void) { 1407 int _fpu_cmp = 0; 1408 uint32_t _cf = 0; 1409 int _df = 1; 1410 uint32_t _flag_k = FK_NONE; 1411 uint32_t _flag_a = 0, _flag_b = 0; 1412 uint32_t _itail_tgt = 0; 1413 RECOMP_REGS_LOCALS 1414 RECOMP_ENTER(0x42004C90u); 1415 1416 L_42004C90: 1417 RECOMP_ICALL(0x42004CA0u); /* 0x42004C90: call 0x42004ca0 */ /* not lifted */ 1418 RECOMP_FLAGS_IN(); 1419 goto L_42004CB0; /* 0x42004C95: jmp 0x42004cb0 */ 1420 L_42004CB0: 1421 PUSH32(esp, 0x42004CC0u); /* 0x42004CB0: push 0x42004cc0 */ 1422 RECOMP_ICALL(0x42016E07u); /* 0x42004CB5: call 0x42016e07 */ /* not lifted */ 1423 RECOMP_FLAGS_IN(); 1424 ecx = POP32_VAL(esp); /* 0x42004CBA: pop ecx */ 1425 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42004CBB: ret */ 1426 RECOMP_REGS_OUT(); 1427 } 1428 1429 void sub_42004CA0(void) { 1430 int _fpu_cmp = 0; 1431 uint32_t _cf = 0; 1432 int _df = 1; 1433 uint32_t _flag_k = FK_NONE; 1434 uint32_t _flag_a = 0, _flag_b = 0; 1435 uint32_t _itail_tgt = 0; 1436 RECOMP_REGS_LOCALS 1437 RECOMP_ENTER(0x42004CA0u); 1438 1439 L_42004CA0: 1440 ecx = 0x42022F89u; /* 0x42004CA0: mov ecx, 0x42022f89 */ 1441 L_42004CA5: 1442 { _itail_tgt = (uint32_t)(MEM32(0x42018014)); goto _ljump; } 1443 { RECOMP_REGS_OUT(); return; } /* end of function */ 1444 _ljump: 1445 switch (_itail_tgt) { 1446 case 0x42004CA0u: goto L_42004CA0; 1447 case 0x42004CA5u: goto L_42004CA5; 1448 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1449 } 1450 RECOMP_REGS_OUT(); 1451 } 1452 1453 void sub_42004CB0(void) { 1454 int _fpu_cmp = 0; 1455 uint32_t _cf = 0; 1456 int _df = 1; 1457 uint32_t _flag_k = FK_NONE; 1458 uint32_t _flag_a = 0, _flag_b = 0; 1459 uint32_t _itail_tgt = 0; 1460 RECOMP_REGS_LOCALS 1461 RECOMP_ENTER(0x42004CB0u); 1462 1463 L_42004CB0: 1464 PUSH32(esp, 0x42004CC0u); /* 0x42004CB0: push 0x42004cc0 */ 1465 RECOMP_ICALL(0x42016E07u); /* 0x42004CB5: call 0x42016e07 */ /* not lifted */ 1466 RECOMP_FLAGS_IN(); 1467 ecx = POP32_VAL(esp); /* 0x42004CBA: pop ecx */ 1468 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42004CBB: ret */ 1469 RECOMP_REGS_OUT(); 1470 } 1471 1472 void sub_42004CC0(void) { 1473 int _fpu_cmp = 0; 1474 uint32_t _cf = 0; 1475 int _df = 1; 1476 uint32_t _flag_k = FK_NONE; 1477 uint32_t _flag_a = 0, _flag_b = 0; 1478 uint32_t _itail_tgt = 0; 1479 RECOMP_REGS_LOCALS 1480 RECOMP_ENTER(0x42004CC0u); 1481 1482 L_42004CC0: 1483 ecx = 0x42022F89u; /* 0x42004CC0: mov ecx, 0x42022f89 */ 1484 L_42004CC5: 1485 { _itail_tgt = (uint32_t)(MEM32(0x42018010)); goto _ljump; } 1486 { RECOMP_REGS_OUT(); return; } /* end of function */ 1487 _ljump: 1488 switch (_itail_tgt) { 1489 case 0x42004CC0u: goto L_42004CC0; 1490 case 0x42004CC5u: goto L_42004CC5; 1491 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1492 } 1493 RECOMP_REGS_OUT(); 1494 } 1495 1496 void sub_42004CD0(void) { 1497 int _fpu_cmp = 0; 1498 uint32_t _cf = 0; 1499 int _df = 1; 1500 uint32_t _flag_k = FK_NONE; 1501 uint32_t _flag_a = 0, _flag_b = 0; 1502 uint32_t _itail_tgt = 0; 1503 RECOMP_REGS_LOCALS 1504 RECOMP_ENTER(0x42004CD0u); 1505 1506 L_42004CD0: 1507 RECOMP_ICALL(0x42004CE0u); /* 0x42004CD0: call 0x42004ce0 */ /* not lifted */ 1508 RECOMP_FLAGS_IN(); 1509 goto L_42004CF0; /* 0x42004CD5: jmp 0x42004cf0 */ 1510 L_42004CF0: 1511 PUSH32(esp, 0x42004D00u); /* 0x42004CF0: push 0x42004d00 */ 1512 RECOMP_ICALL(0x42016E07u); /* 0x42004CF5: call 0x42016e07 */ /* not lifted */ 1513 RECOMP_FLAGS_IN(); 1514 ecx = POP32_VAL(esp); /* 0x42004CFA: pop ecx */ 1515 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42004CFB: ret */ 1516 RECOMP_REGS_OUT(); 1517 } 1518 1519 void sub_42004CE0(void) { 1520 int _fpu_cmp = 0; 1521 uint32_t _cf = 0; 1522 int _df = 1; 1523 uint32_t _flag_k = FK_NONE; 1524 uint32_t _flag_a = 0, _flag_b = 0; 1525 uint32_t _itail_tgt = 0; 1526 RECOMP_REGS_LOCALS 1527 RECOMP_ENTER(0x42004CE0u); 1528 1529 L_42004CE0: 1530 ecx = 0x42022F88u; /* 0x42004CE0: mov ecx, 0x42022f88 */ 1531 L_42004CE5: 1532 { _itail_tgt = (uint32_t)(MEM32(0x42018008)); goto _ljump; } 1533 { RECOMP_REGS_OUT(); return; } /* end of function */ 1534 _ljump: 1535 switch (_itail_tgt) { 1536 case 0x42004CE0u: goto L_42004CE0; 1537 case 0x42004CE5u: goto L_42004CE5; 1538 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1539 } 1540 RECOMP_REGS_OUT(); 1541 } 1542 1543 void sub_42004CF0(void) { 1544 int _fpu_cmp = 0; 1545 uint32_t _cf = 0; 1546 int _df = 1; 1547 uint32_t _flag_k = FK_NONE; 1548 uint32_t _flag_a = 0, _flag_b = 0; 1549 uint32_t _itail_tgt = 0; 1550 RECOMP_REGS_LOCALS 1551 RECOMP_ENTER(0x42004CF0u); 1552 1553 L_42004CF0: 1554 PUSH32(esp, 0x42004D00u); /* 0x42004CF0: push 0x42004d00 */ 1555 RECOMP_ICALL(0x42016E07u); /* 0x42004CF5: call 0x42016e07 */ /* not lifted */ 1556 RECOMP_FLAGS_IN(); 1557 ecx = POP32_VAL(esp); /* 0x42004CFA: pop ecx */ 1558 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42004CFB: ret */ 1559 RECOMP_REGS_OUT(); 1560 } 1561 1562 void sub_42004D00(void) { 1563 int _fpu_cmp = 0; 1564 uint32_t _cf = 0; 1565 int _df = 1; 1566 uint32_t _flag_k = FK_NONE; 1567 uint32_t _flag_a = 0, _flag_b = 0; 1568 uint32_t _itail_tgt = 0; 1569 RECOMP_REGS_LOCALS 1570 RECOMP_ENTER(0x42004D00u); 1571 1572 L_42004D00: 1573 ecx = 0x42022F88u; /* 0x42004D00: mov ecx, 0x42022f88 */ 1574 L_42004D05: 1575 { _itail_tgt = (uint32_t)(MEM32(0x4201800C)); goto _ljump; } 1576 { RECOMP_REGS_OUT(); return; } /* end of function */ 1577 _ljump: 1578 switch (_itail_tgt) { 1579 case 0x42004D00u: goto L_42004D00; 1580 case 0x42004D05u: goto L_42004D05; 1581 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1582 } 1583 RECOMP_REGS_OUT(); 1584 } 1585 1586 void sub_42004D10(void) { 1587 int _fpu_cmp = 0; 1588 uint32_t _cf = 0; 1589 int _df = 1; 1590 uint32_t _flag_k = FK_NONE; 1591 uint32_t _flag_a = 0, _flag_b = 0; 1592 uint32_t _itail_tgt = 0; 1593 RECOMP_REGS_LOCALS 1594 RECOMP_ENTER(0x42004D10u); 1595 1596 L_42004D10: 1597 MEM32(ecx) = 0x42018414u; /* 0x42004D10: mov dword ptr [ecx], 0x42018414 */ 1598 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42004D16: ret */ 1599 RECOMP_REGS_OUT(); 1600 } 1601 1602 void sub_42004D20(void) { 1603 int _fpu_cmp = 0; 1604 uint32_t _cf = 0; 1605 int _df = 1; 1606 uint32_t _flag_k = FK_NONE; 1607 uint32_t _flag_a = 0, _flag_b = 0; 1608 uint32_t _itail_tgt = 0; 1609 RECOMP_REGS_LOCALS 1610 RECOMP_ENTER(0x42004D20u); 1611 1612 L_42004D20: 1613 eax = ecx; /* 0x42004D20: mov eax, ecx */ 1614 MEM32(eax) = 0x42018414u; /* 0x42004D22: mov dword ptr [eax], 0x42018414 */ 1615 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42004D28: ret */ 1616 RECOMP_REGS_OUT(); 1617 } 1618 1619 void sub_42004D30(void) { 1620 int _fpu_cmp = 0; 1621 uint32_t _cf = 0; 1622 int _df = 1; 1623 uint32_t _flag_k = FK_NONE; 1624 uint32_t _flag_a = 0, _flag_b = 0; 1625 uint32_t _itail_tgt = 0; 1626 RECOMP_REGS_LOCALS 1627 RECOMP_ENTER(0x42004D30u); 1628 1629 L_42004D30: 1630 eax = ecx; /* 0x42004D30: mov eax, ecx */ 1631 MEM32(eax) = 0x42018414u; /* 0x42004D32: mov dword ptr [eax], 0x42018414 */ 1632 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42004D38: ret 4 */ 1633 RECOMP_REGS_OUT(); 1634 } 1635 1636 void sub_42004D40(void) { 1637 int _fpu_cmp = 0; 1638 uint32_t _cf = 0; 1639 int _df = 1; 1640 uint32_t _flag_k = FK_NONE; 1641 uint32_t _flag_a = 0, _flag_b = 0; 1642 uint32_t _itail_tgt = 0; 1643 RECOMP_REGS_LOCALS 1644 RECOMP_ENTER(0x42004D40u); 1645 1646 L_42004D40: 1647 PUSH32(esp, ebp); /* 0x42004D40: push ebp */ 1648 ebp = esp; /* 0x42004D41: mov ebp, esp */ 1649 PUSH32(esp, ebx); /* 0x42004D43: push ebx */ 1650 SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x42004D44: mov bl, byte ptr [ebp + 8] */ 1651 /* test LO8(ebx), 2 */ /* 0x42004D47: test bl, 2 */ 1652 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 1653 _cf = 0; 1654 _flag_k = FK_NARROW(FK_TEST, 24); 1655 PUSH32(esp, esi); /* 0x42004D4A: push esi */ 1656 esi = ecx; /* 0x42004D4B: mov esi, ecx */ 1657 if (TEST_Z(_flag_a, _flag_b)) goto L_42004D7B; /* 0x42004D4D: je 0x42004d7b */ 1658 L_42004D4F: 1659 eax = MEM32(esi + (-0x4)); /* 0x42004D4F: mov eax, dword ptr [esi - 4] */ 1660 PUSH32(esp, edi); /* 0x42004D52: push edi */ 1661 PUSH32(esp, 0x42004D10u); /* 0x42004D53: push 0x42004d10 */ 1662 edi = esi + (-0x4); /* 0x42004D58: lea edi, [esi - 4] */ 1663 PUSH32(esp, eax); /* 0x42004D5B: push eax */ 1664 PUSH32(esp, 4); /* 0x42004D5C: push 4 */ 1665 PUSH32(esp, esi); /* 0x42004D5E: push esi */ 1666 RECOMP_ICALL(0x42016E3Cu); /* 0x42004D5F: call 0x42016e3c */ /* not lifted */ 1667 RECOMP_FLAGS_IN(); 1668 /* test LO8(ebx), 1 */ /* 0x42004D64: test bl, 1 */ 1669 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 1670 _cf = 0; 1671 _flag_k = FK_NARROW(FK_TEST, 24); 1672 if (TEST_Z(_flag_a, _flag_b)) goto L_42004D72; /* 0x42004D67: je 0x42004d72 */ 1673 L_42004D69: 1674 PUSH32(esp, edi); /* 0x42004D69: push edi */ 1675 RECOMP_ICALL(0x42016DD0u); /* 0x42004D6A: call 0x42016dd0 */ /* not lifted */ 1676 RECOMP_FLAGS_IN(); 1677 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1678 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1679 esp = esp + 4; /* 0x42004D6F: add esp, 4 */ 1680 _flag_k = FK_ADD; 1681 L_42004D72: 1682 eax = edi; /* 0x42004D72: mov eax, edi */ 1683 edi = POP32_VAL(esp); /* 0x42004D74: pop edi */ 1684 esi = POP32_VAL(esp); /* 0x42004D75: pop esi */ 1685 ebx = POP32_VAL(esp); /* 0x42004D76: pop ebx */ 1686 ebp = POP32_VAL(esp); /* 0x42004D77: pop ebp */ 1687 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42004D78: ret 4 */ 1688 L_42004D7B: 1689 /* test LO8(ebx), 1 */ /* 0x42004D7B: test bl, 1 */ 1690 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 1691 _cf = 0; 1692 _flag_k = FK_NARROW(FK_TEST, 24); 1693 MEM32(esi) = 0x42018414u; /* 0x42004D7E: mov dword ptr [esi], 0x42018414 */ 1694 if (TEST_Z(_flag_a, _flag_b)) goto L_42004D8F; /* 0x42004D84: je 0x42004d8f */ 1695 L_42004D86: 1696 PUSH32(esp, esi); /* 0x42004D86: push esi */ 1697 RECOMP_ICALL(0x42016DD0u); /* 0x42004D87: call 0x42016dd0 */ /* not lifted */ 1698 RECOMP_FLAGS_IN(); 1699 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1700 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1701 esp = esp + 4; /* 0x42004D8C: add esp, 4 */ 1702 _flag_k = FK_ADD; 1703 L_42004D8F: 1704 eax = esi; /* 0x42004D8F: mov eax, esi */ 1705 esi = POP32_VAL(esp); /* 0x42004D91: pop esi */ 1706 ebx = POP32_VAL(esp); /* 0x42004D92: pop ebx */ 1707 ebp = POP32_VAL(esp); /* 0x42004D93: pop ebp */ 1708 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42004D94: ret 4 */ 1709 RECOMP_REGS_OUT(); 1710 } 1711 1712 void sub_42004DA0(void) { 1713 int _fpu_cmp = 0; 1714 uint32_t _cf = 0; 1715 int _df = 1; 1716 uint32_t _flag_k = FK_NONE; 1717 uint32_t _flag_a = 0, _flag_b = 0; 1718 uint32_t _itail_tgt = 0; 1719 RECOMP_REGS_LOCALS 1720 RECOMP_ENTER(0x42004DA0u); 1721 1722 L_42004DA0: 1723 PUSH32(esp, ebp); /* 0x42004DA0: push ebp */ 1724 ebp = esp; /* 0x42004DA1: mov ebp, esp */ 1725 PUSH32(esp, 0xFFFFFFFFu); /* 0x42004DA3: push -1 */ 1726 PUSH32(esp, 0x42017248u); /* 0x42004DA5: push 0x42017248 */ 1727 eax = MEM32(FS_BASE + (0)); /* 0x42004DAA: mov eax, dword ptr fs:[0] */ 1728 PUSH32(esp, eax); /* 0x42004DB0: push eax */ 1729 MEM32(FS_BASE + (0)) = esp; /* 0x42004DB1: mov dword ptr fs:[0], esp */ 1730 PUSH32(esp, ecx); /* 0x42004DB8: push ecx */ 1731 eax = MEM32(ebp + 0x14); /* 0x42004DB9: mov eax, dword ptr [ebp + 0x14] */ 1732 PUSH32(esp, ebx); /* 0x42004DBC: push ebx */ 1733 ebx = MEM32(ebp + 0xC); /* 0x42004DBD: mov ebx, dword ptr [ebp + 0xc] */ 1734 PUSH32(esp, esi); /* 0x42004DC0: push esi */ 1735 PUSH32(esp, edi); /* 0x42004DC1: push edi */ 1736 edi = MEM32(ebp + 0x8); /* 0x42004DC2: mov edi, dword ptr [ebp + 8] */ 1737 edx = edi; /* 0x42004DC5: mov edx, edi */ 1738 edx = (uint32_t)((int32_t)edx * (int32_t)ebx); /* 0x42004DC7: imul edx, ebx */ 1739 esi = ecx; /* 0x42004DCA: mov esi, ecx */ 1740 ecx = MEM32(ebp + 0x10); /* 0x42004DCC: mov ecx, dword ptr [ebp + 0x10] */ 1741 PUSH32(esp, eax); /* 0x42004DCF: push eax */ 1742 PUSH32(esp, ecx); /* 0x42004DD0: push ecx */ 1743 PUSH32(esp, edx); /* 0x42004DD1: push edx */ 1744 ecx = esi; /* 0x42004DD2: mov ecx, esi */ 1745 MEM32(ebp + (-0x10)) = esi; /* 0x42004DD4: mov dword ptr [ebp - 0x10], esi */ 1746 RECOMP_ICALL(0x42003BE0u); /* 0x42004DD7: call 0x42003be0 */ /* not lifted */ 1747 RECOMP_FLAGS_IN(); 1748 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1749 eax = 0; /* 0x42004DDC: xor eax, eax */ 1750 _cf = 0; 1751 _flag_k = FK_TEST; 1752 ecx = esi; /* 0x42004DDE: mov ecx, esi */ 1753 MEM32(ebp + (-0x4)) = eax; /* 0x42004DE0: mov dword ptr [ebp - 4], eax */ 1754 MEM32(esi) = 0x42018388u; /* 0x42004DE3: mov dword ptr [esi], 0x42018388 */ 1755 MEM32(esi + 0x4) = 0x42018380u; /* 0x42004DE9: mov dword ptr [esi + 4], 0x42018380 */ 1756 MEM32(esi + 0x24) = edi; /* 0x42004DF0: mov dword ptr [esi + 0x24], edi */ 1757 MEM32(esi + 0x28) = ebx; /* 0x42004DF3: mov dword ptr [esi + 0x28], ebx */ 1758 MEM32(esi + 0x34) = eax; /* 0x42004DF6: mov dword ptr [esi + 0x34], eax */ 1759 RECOMP_ICALL(0x42004870u); /* 0x42004DF9: call 0x42004870 */ /* not lifted */ 1760 RECOMP_FLAGS_IN(); 1761 ecx = MEM32(ebp + (-0xC)); /* 0x42004DFE: mov ecx, dword ptr [ebp - 0xc] */ 1762 edi = POP32_VAL(esp); /* 0x42004E01: pop edi */ 1763 eax = esi; /* 0x42004E02: mov eax, esi */ 1764 esi = POP32_VAL(esp); /* 0x42004E04: pop esi */ 1765 ebx = POP32_VAL(esp); /* 0x42004E05: pop ebx */ 1766 MEM32(FS_BASE + (0)) = ecx; /* 0x42004E06: mov dword ptr fs:[0], ecx */ 1767 esp = ebp; /* 0x42004E0D: mov esp, ebp */ 1768 ebp = POP32_VAL(esp); /* 0x42004E0F: pop ebp */ 1769 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x42004E10: ret 0x10 */ 1770 RECOMP_REGS_OUT(); 1771 } 1772 1773 void sub_42004E20(void) { 1774 int _fpu_cmp = 0; 1775 uint32_t _cf = 0; 1776 int _df = 1; 1777 uint32_t _flag_k = FK_NONE; 1778 uint32_t _flag_a = 0, _flag_b = 0; 1779 uint32_t _itail_tgt = 0; 1780 RECOMP_REGS_LOCALS 1781 RECOMP_ENTER(0x42004E20u); 1782 1783 L_42004E20: 1784 PUSH32(esp, ebp); /* 0x42004E20: push ebp */ 1785 ebp = esp; /* 0x42004E21: mov ebp, esp */ 1786 PUSH32(esp, 0xFFFFFFFFu); /* 0x42004E23: push -1 */ 1787 PUSH32(esp, 0x4201727Eu); /* 0x42004E25: push 0x4201727e */ 1788 eax = MEM32(FS_BASE + (0)); /* 0x42004E2A: mov eax, dword ptr fs:[0] */ 1789 PUSH32(esp, eax); /* 0x42004E30: push eax */ 1790 MEM32(FS_BASE + (0)) = esp; /* 0x42004E31: mov dword ptr fs:[0], esp */ 1791 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 1792 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1793 esp = esp - 0xCu; /* 0x42004E38: sub esp, 0xc */ 1794 _flag_k = FK_CMP; 1795 PUSH32(esp, ebx); /* 0x42004E3B: push ebx */ 1796 PUSH32(esp, esi); /* 0x42004E3C: push esi */ 1797 PUSH32(esp, edi); /* 0x42004E3D: push edi */ 1798 edi = ecx; /* 0x42004E3E: mov edi, ecx */ 1799 eax = MEM32(edi + 0x24); /* 0x42004E40: mov eax, dword ptr [edi + 0x24] */ 1800 MEM32(ebp + (-0x14)) = eax; /* 0x42004E43: mov dword ptr [ebp - 0x14], eax */ 1801 fp_push((double)(int32_t)MEM32(ebp + (-0x14))); /* 0x42004E46: fild dword ptr [ebp - 0x14] */ 1802 esi = MEM32(edi + 0x28); /* 0x42004E49: mov esi, dword ptr [edi + 0x28] */ 1803 MEM32(ebp + (-0x14)) = esi; /* 0x42004E4C: mov dword ptr [ebp - 0x14], esi */ 1804 esi = (uint32_t)((int32_t)esi * (int32_t)eax); /* 0x42004E4F: imul esi, eax */ 1805 _st[0] = (double)*(float*)ADDR(edi + 0x1C) / _st[0]; /* 0x42004E52: fdivr dword ptr [edi + 0x1c] */ 1806 eax = esi + esi * 4; /* 0x42004E55: lea eax, [esi + esi*4] */ 1807 ecx = eax * 8 + 0x4; /* 0x42004E58: lea ecx, [eax*8 + 4] */ 1808 PUSH32(esp, ecx); /* 0x42004E5F: push ecx */ 1809 { float _v = (float)fp_pop(); *(float*)ADDR(edi + 0x2C) = _v; } /* 0x42004E60: fstp dword ptr [edi + 0x2c] */ 1810 fp_push((double)(int32_t)MEM32(ebp + (-0x14))); /* 0x42004E63: fild dword ptr [ebp - 0x14] */ 1811 _st[0] = (double)*(float*)ADDR(edi + 0x20) / _st[0]; /* 0x42004E66: fdivr dword ptr [edi + 0x20] */ 1812 { float _v = (float)fp_pop(); *(float*)ADDR(edi + 0x30) = _v; } /* 0x42004E69: fstp dword ptr [edi + 0x30] */ 1813 RECOMP_ICALL(0x42016F36u); /* 0x42004E6C: call 0x42016f36 */ /* not lifted */ 1814 RECOMP_FLAGS_IN(); 1815 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1816 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1817 esp = esp + 4; /* 0x42004E71: add esp, 4 */ 1818 _flag_k = FK_ADD; 1819 MEM32(ebp + (-0x14)) = eax; /* 0x42004E74: mov dword ptr [ebp - 0x14], eax */ 1820 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1821 ebx = 0; /* 0x42004E77: xor ebx, ebx */ 1822 _cf = 0; 1823 _flag_k = FK_TEST; 1824 /* cmp eax, ebx */ /* 0x42004E79: cmp eax, ebx */ 1825 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 1826 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1827 _flag_k = FK_CMP; 1828 MEM32(ebp + (-0x4)) = ebx; /* 0x42004E7B: mov dword ptr [ebp - 4], ebx */ 1829 if (CMP_EQ(_flag_a, _flag_b)) goto L_42004E98; /* 0x42004E7E: je 0x42004e98 */ 1830 L_42004E80: 1831 PUSH32(esp, 0x42004F60u); /* 0x42004E80: push 0x42004f60 */ 1832 PUSH32(esp, 0x42004F30u); /* 0x42004E85: push 0x42004f30 */ 1833 PUSH32(esp, esi); /* 0x42004E8A: push esi */ 1834 ebx = eax + 0x4; /* 0x42004E8B: lea ebx, [eax + 4] */ 1835 PUSH32(esp, 0x28u); /* 0x42004E8E: push 0x28 */ 1836 PUSH32(esp, ebx); /* 0x42004E90: push ebx */ 1837 MEM32(eax) = esi; /* 0x42004E91: mov dword ptr [eax], esi */ 1838 RECOMP_ICALL(0x42016F48u); /* 0x42004E93: call 0x42016f48 */ /* not lifted */ 1839 RECOMP_FLAGS_IN(); 1840 L_42004E98: 1841 edx = MEM32(edi + 0x28); /* 0x42004E98: mov edx, dword ptr [edi + 0x28] */ 1842 edx = (uint32_t)((int32_t)edx * (int32_t)MEM32(edi + 0x24)); /* 0x42004E9B: imul edx, dword ptr [edi + 0x24] */ 1843 MEM32(edi + 0x34) = ebx; /* 0x42004E9F: mov dword ptr [edi + 0x34], ebx */ 1844 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1845 ebx = 0; /* 0x42004EA2: xor ebx, ebx */ 1846 _cf = 0; 1847 _flag_k = FK_TEST; 1848 /* test edx, edx */ /* 0x42004EA4: test edx, edx */ 1849 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 1850 _cf = 0; 1851 _flag_k = FK_TEST; 1852 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x42004EA6: mov dword ptr [ebp - 4], 0xffffffff */ 1853 if (TEST_LE(_flag_a, _flag_b)) goto L_42004F1C; /* 0x42004EAD: jle 0x42004f1c */ 1854 L_42004EAF: 1855 MEM32(ebp + (-0x14)) = ebx; /* 0x42004EAF: mov dword ptr [ebp - 0x14], ebx */ 1856 L_42004EB2: 1857 PUSH32(esp, 0xCu); /* 0x42004EB2: push 0xc */ 1858 RECOMP_ICALL(0x42016F36u); /* 0x42004EB4: call 0x42016f36 */ /* not lifted */ 1859 RECOMP_FLAGS_IN(); 1860 esi = eax; /* 0x42004EB9: mov esi, eax */ 1861 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1862 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1863 esp = esp + 4; /* 0x42004EBB: add esp, 4 */ 1864 _flag_k = FK_ADD; 1865 MEM32(ebp + (-0x18)) = esi; /* 0x42004EBE: mov dword ptr [ebp - 0x18], esi */ 1866 /* test esi, esi */ /* 0x42004EC1: test esi, esi */ 1867 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 1868 _cf = 0; 1869 _flag_k = FK_TEST; 1870 MEM32(ebp + (-0x4)) = 1; /* 0x42004EC3: mov dword ptr [ebp - 4], 1 */ 1871 if (TEST_Z(_flag_a, _flag_b)) goto L_42004EF7; /* 0x42004ECA: je 0x42004ef7 */ 1872 L_42004ECC: 1873 SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x42004ECC: mov al, byte ptr [ebp - 0xd] */ 1874 PUSH32(esp, 0x14u); /* 0x42004ECF: push 0x14 */ 1875 MEM8(esi) = (uint8_t)(LO8(eax)); /* 0x42004ED1: mov byte ptr [esi], al */ 1876 RECOMP_ICALL(0x42016F36u); /* 0x42004ED3: call 0x42016f36 */ /* not lifted */ 1877 RECOMP_FLAGS_IN(); 1878 MEM32(eax) = eax; /* 0x42004ED8: mov dword ptr [eax], eax */ 1879 MEM32(eax + 0x4) = eax; /* 0x42004EDA: mov dword ptr [eax + 4], eax */ 1880 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1881 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1882 esp = esp + 4; /* 0x42004EDD: add esp, 4 */ 1883 _flag_k = FK_ADD; 1884 MEM32(esi + 0x4) = eax; /* 0x42004EE0: mov dword ptr [esi + 4], eax */ 1885 MEM32(esi + 0x8) = 0; /* 0x42004EE3: mov dword ptr [esi + 8], 0 */ 1886 ecx = esi; /* 0x42004EEA: mov ecx, esi */ 1887 MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x42004EEC: mov byte ptr [ebp - 4], 2 */ 1888 RECOMP_ICALL(0x42005DC0u); /* 0x42004EF0: call 0x42005dc0 */ /* not lifted */ 1889 RECOMP_FLAGS_IN(); 1890 goto L_42004EF9; /* 0x42004EF5: jmp 0x42004ef9 */ 1891 L_42004EF7: 1892 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1893 esi = 0; /* 0x42004EF7: xor esi, esi */ 1894 _cf = 0; 1895 _flag_k = FK_TEST; 1896 L_42004EF9: 1897 eax = MEM32(ebp + (-0x14)); /* 0x42004EF9: mov eax, dword ptr [ebp - 0x14] */ 1898 ecx = MEM32(edi + 0x34); /* 0x42004EFC: mov ecx, dword ptr [edi + 0x34] */ 1899 MEM32(ecx + eax + 0x20) = esi; /* 0x42004EFF: mov dword ptr [ecx + eax + 0x20], esi */ 1900 edx = MEM32(edi + 0x28); /* 0x42004F03: mov edx, dword ptr [edi + 0x28] */ 1901 edx = (uint32_t)((int32_t)edx * (int32_t)MEM32(edi + 0x24)); /* 0x42004F06: imul edx, dword ptr [edi + 0x24] */ 1902 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(1); 1903 ebx = ebx + 1; /* 0x42004F0A: inc ebx */ 1904 _flag_k = FK_INC; 1905 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x28u); 1906 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1907 eax = eax + 0x28u; /* 0x42004F0B: add eax, 0x28 */ 1908 _flag_k = FK_ADD; 1909 /* cmp ebx, edx */ /* 0x42004F0E: cmp ebx, edx */ 1910 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edx); 1911 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1912 _flag_k = FK_CMP; 1913 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x42004F10: mov dword ptr [ebp - 4], 0xffffffff */ 1914 MEM32(ebp + (-0x14)) = eax; /* 0x42004F17: mov dword ptr [ebp - 0x14], eax */ 1915 RECOMP_BACKEDGE(); 1916 if (CMP_L(_flag_a, _flag_b)) goto L_42004EB2; /* 0x42004F1A: jl 0x42004eb2 */ 1917 L_42004F1C: 1918 ecx = MEM32(ebp + (-0xC)); /* 0x42004F1C: mov ecx, dword ptr [ebp - 0xc] */ 1919 edi = POP32_VAL(esp); /* 0x42004F1F: pop edi */ 1920 esi = POP32_VAL(esp); /* 0x42004F20: pop esi */ 1921 ebx = POP32_VAL(esp); /* 0x42004F21: pop ebx */ 1922 MEM32(FS_BASE + (0)) = ecx; /* 0x42004F22: mov dword ptr fs:[0], ecx */ 1923 esp = ebp; /* 0x42004F29: mov esp, ebp */ 1924 ebp = POP32_VAL(esp); /* 0x42004F2B: pop ebp */ 1925 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x42004F2C: ret 0x10 */ 1926 RECOMP_REGS_OUT(); 1927 } 1928 1929 void sub_42004F30(void) { 1930 int _fpu_cmp = 0; 1931 uint32_t _cf = 0; 1932 int _df = 1; 1933 uint32_t _flag_k = FK_NONE; 1934 uint32_t _flag_a = 0, _flag_b = 0; 1935 uint32_t _itail_tgt = 0; 1936 RECOMP_REGS_LOCALS 1937 RECOMP_ENTER(0x42004F30u); 1938 1939 L_42004F30: 1940 PUSH32(esp, ebp); /* 0x42004F30: push ebp */ 1941 ebp = esp; /* 0x42004F31: mov ebp, esp */ 1942 PUSH32(esp, ecx); /* 0x42004F33: push ecx */ 1943 SET_LO8(edx, MEM8(ebp + (-0x1))); /* 0x42004F34: mov dl, byte ptr [ebp - 1] */ 1944 eax = ecx; /* 0x42004F37: mov eax, ecx */ 1945 SET_LO8(ecx, MEM8(ebp + (-0x1))); /* 0x42004F39: mov cl, byte ptr [ebp - 1] */ 1946 MEM8(eax) = (uint8_t)(LO8(ecx)); /* 0x42004F3C: mov byte ptr [eax], cl */ 1947 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1948 ecx = 0; /* 0x42004F3E: xor ecx, ecx */ 1949 _cf = 0; 1950 _flag_k = FK_TEST; 1951 MEM32(eax + 0x4) = ecx; /* 0x42004F40: mov dword ptr [eax + 4], ecx */ 1952 MEM32(eax + 0x8) = ecx; /* 0x42004F43: mov dword ptr [eax + 8], ecx */ 1953 MEM32(eax + 0xC) = ecx; /* 0x42004F46: mov dword ptr [eax + 0xc], ecx */ 1954 MEM8(eax + 0x10) = (uint8_t)(LO8(edx)); /* 0x42004F49: mov byte ptr [eax + 0x10], dl */ 1955 MEM32(eax + 0x14) = ecx; /* 0x42004F4C: mov dword ptr [eax + 0x14], ecx */ 1956 MEM32(eax + 0x18) = ecx; /* 0x42004F4F: mov dword ptr [eax + 0x18], ecx */ 1957 MEM32(eax + 0x1C) = ecx; /* 0x42004F52: mov dword ptr [eax + 0x1c], ecx */ 1958 MEM32(eax + 0x20) = ecx; /* 0x42004F55: mov dword ptr [eax + 0x20], ecx */ 1959 MEM32(eax + 0x24) = ecx; /* 0x42004F58: mov dword ptr [eax + 0x24], ecx */ 1960 esp = ebp; /* 0x42004F5B: mov esp, ebp */ 1961 ebp = POP32_VAL(esp); /* 0x42004F5D: pop ebp */ 1962 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42004F5E: ret */ 1963 RECOMP_REGS_OUT(); 1964 } 1965 1966 void sub_42004F60(void) { 1967 int _fpu_cmp = 0; 1968 uint32_t _cf = 0; 1969 int _df = 1; 1970 uint32_t _flag_k = FK_NONE; 1971 uint32_t _flag_a = 0, _flag_b = 0; 1972 uint32_t _itail_tgt = 0; 1973 RECOMP_REGS_LOCALS 1974 RECOMP_ENTER(0x42004F60u); 1975 1976 L_42004F60: 1977 PUSH32(esp, ebp); /* 0x42004F60: push ebp */ 1978 ebp = esp; /* 0x42004F61: mov ebp, esp */ 1979 PUSH32(esp, ecx); /* 0x42004F63: push ecx */ 1980 PUSH32(esp, esi); /* 0x42004F64: push esi */ 1981 esi = ecx; /* 0x42004F65: mov esi, ecx */ 1982 eax = MEM32(esi + 0x14); /* 0x42004F67: mov eax, dword ptr [esi + 0x14] */ 1983 PUSH32(esp, edi); /* 0x42004F6A: push edi */ 1984 PUSH32(esp, eax); /* 0x42004F6B: push eax */ 1985 MEM32(ebp + (-0x4)) = eax; /* 0x42004F6C: mov dword ptr [ebp - 4], eax */ 1986 RECOMP_ICALL(0x42016DD0u); /* 0x42004F6F: call 0x42016dd0 */ /* not lifted */ 1987 RECOMP_FLAGS_IN(); 1988 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1989 edi = 0; /* 0x42004F74: xor edi, edi */ 1990 _cf = 0; 1991 _flag_k = FK_TEST; 1992 MEM32(esi + 0x14) = edi; /* 0x42004F76: mov dword ptr [esi + 0x14], edi */ 1993 MEM32(esi + 0x18) = edi; /* 0x42004F79: mov dword ptr [esi + 0x18], edi */ 1994 MEM32(esi + 0x1C) = edi; /* 0x42004F7C: mov dword ptr [esi + 0x1c], edi */ 1995 eax = MEM32(esi + 0x4); /* 0x42004F7F: mov eax, dword ptr [esi + 4] */ 1996 PUSH32(esp, eax); /* 0x42004F82: push eax */ 1997 MEM32(ebp + (-0x4)) = eax; /* 0x42004F83: mov dword ptr [ebp - 4], eax */ 1998 RECOMP_ICALL(0x42016DD0u); /* 0x42004F86: call 0x42016dd0 */ /* not lifted */ 1999 RECOMP_FLAGS_IN(); 2000 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2001 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2002 esp = esp + 8; /* 0x42004F8B: add esp, 8 */ 2003 _flag_k = FK_ADD; 2004 MEM32(esi + 0x4) = edi; /* 0x42004F8E: mov dword ptr [esi + 4], edi */ 2005 MEM32(esi + 0x8) = edi; /* 0x42004F91: mov dword ptr [esi + 8], edi */ 2006 MEM32(esi + 0xC) = edi; /* 0x42004F94: mov dword ptr [esi + 0xc], edi */ 2007 edi = POP32_VAL(esp); /* 0x42004F97: pop edi */ 2008 esi = POP32_VAL(esp); /* 0x42004F98: pop esi */ 2009 esp = ebp; /* 0x42004F99: mov esp, ebp */ 2010 ebp = POP32_VAL(esp); /* 0x42004F9B: pop ebp */ 2011 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42004F9C: ret */ 2012 RECOMP_REGS_OUT(); 2013 } 2014 2015 void sub_42004FA0(void) { 2016 int _fpu_cmp = 0; 2017 uint32_t _cf = 0; 2018 int _df = 1; 2019 uint32_t _flag_k = FK_NONE; 2020 uint32_t _flag_a = 0, _flag_b = 0; 2021 uint32_t _itail_tgt = 0; 2022 RECOMP_REGS_LOCALS 2023 RECOMP_ENTER(0x42004FA0u); 2024 2025 L_42004FA0: 2026 PUSH32(esp, ebp); /* 0x42004FA0: push ebp */ 2027 ebp = esp; /* 0x42004FA1: mov ebp, esp */ 2028 PUSH32(esp, 0xFFFFFFFFu); /* 0x42004FA3: push -1 */ 2029 PUSH32(esp, 0x42017298u); /* 0x42004FA5: push 0x42017298 */ 2030 eax = MEM32(FS_BASE + (0)); /* 0x42004FAA: mov eax, dword ptr fs:[0] */ 2031 PUSH32(esp, eax); /* 0x42004FB0: push eax */ 2032 MEM32(FS_BASE + (0)) = esp; /* 0x42004FB1: mov dword ptr fs:[0], esp */ 2033 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 2034 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2035 esp = esp - 0x14u; /* 0x42004FB8: sub esp, 0x14 */ 2036 _flag_k = FK_CMP; 2037 PUSH32(esp, ebx); /* 0x42004FBB: push ebx */ 2038 ebx = ecx; /* 0x42004FBC: mov ebx, ecx */ 2039 PUSH32(esp, esi); /* 0x42004FBE: push esi */ 2040 MEM32(ebp + (-0x1C)) = ebx; /* 0x42004FBF: mov dword ptr [ebp - 0x1c], ebx */ 2041 MEM32(ebx) = 0x42018388u; /* 0x42004FC2: mov dword ptr [ebx], 0x42018388 */ 2042 MEM32(ebx + 0x4) = 0x42018380u; /* 0x42004FC8: mov dword ptr [ebx + 4], 0x42018380 */ 2043 eax = MEM32(ebx + 0x28); /* 0x42004FCF: mov eax, dword ptr [ebx + 0x28] */ 2044 eax = (uint32_t)((int32_t)eax * (int32_t)MEM32(ebx + 0x24)); /* 0x42004FD2: imul eax, dword ptr [ebx + 0x24] */ 2045 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2046 edx = 0; /* 0x42004FD6: xor edx, edx */ 2047 _cf = 0; 2048 _flag_k = FK_TEST; 2049 /* test eax, eax */ /* 0x42004FD8: test eax, eax */ 2050 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2051 _cf = 0; 2052 _flag_k = FK_TEST; 2053 MEM32(ebp + (-0x4)) = edx; /* 0x42004FDA: mov dword ptr [ebp - 4], edx */ 2054 MEM32(ebp + (-0x10)) = edx; /* 0x42004FDD: mov dword ptr [ebp - 0x10], edx */ 2055 if (TEST_LE(_flag_a, _flag_b)) goto L_42005053; /* 0x42004FE0: jle 0x42005053 */ 2056 L_42004FE2: 2057 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2058 eax = 0; /* 0x42004FE2: xor eax, eax */ 2059 _cf = 0; 2060 _flag_k = FK_TEST; 2061 PUSH32(esp, edi); /* 0x42004FE4: push edi */ 2062 MEM32(ebp + (-0x14)) = eax; /* 0x42004FE5: mov dword ptr [ebp - 0x14], eax */ 2063 L_42004FE8: 2064 ecx = MEM32(ebx + 0x34); /* 0x42004FE8: mov ecx, dword ptr [ebx + 0x34] */ 2065 edi = MEM32(eax + ecx + 0x20); /* 0x42004FEB: mov edi, dword ptr [eax + ecx + 0x20] */ 2066 /* cmp edi, edx */ /* 0x42004FEF: cmp edi, edx */ 2067 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx); 2068 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2069 _flag_k = FK_CMP; 2070 if (CMP_EQ(_flag_a, _flag_b)) goto L_42005033; /* 0x42004FF1: je 0x42005033 */ 2071 L_42004FF3: 2072 eax = MEM32(edi + 0x4); /* 0x42004FF3: mov eax, dword ptr [edi + 4] */ 2073 esi = MEM32(eax); /* 0x42004FF6: mov esi, dword ptr [eax] */ 2074 /* cmp esi, eax */ /* 0x42004FF8: cmp esi, eax */ 2075 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 2076 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2077 _flag_k = FK_CMP; 2078 MEM32(ebp + (-0x18)) = eax; /* 0x42004FFA: mov dword ptr [ebp - 0x18], eax */ 2079 if (CMP_EQ(_flag_a, _flag_b)) goto L_42005014; /* 0x42004FFD: je 0x42005014 */ 2080 L_42004FFF: 2081 eax = esi; /* 0x42004FFF: mov eax, esi */ 2082 esi = MEM32(esi); /* 0x42005001: mov esi, dword ptr [esi] */ 2083 PUSH32(esp, eax); /* 0x42005003: push eax */ 2084 edx = ebp + (-0x20); /* 0x42005004: lea edx, [ebp - 0x20] */ 2085 PUSH32(esp, edx); /* 0x42005007: push edx */ 2086 ecx = edi; /* 0x42005008: mov ecx, edi */ 2087 RECOMP_ICALL(0x42005C70u); /* 0x4200500A: call 0x42005c70 */ /* not lifted */ 2088 RECOMP_FLAGS_IN(); 2089 /* cmp esi, MEM32(ebp + (-0x18)) */ /* 0x4200500F: cmp esi, dword ptr [ebp - 0x18] */ 2090 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(ebp + (-0x18))); 2091 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2092 _flag_k = FK_CMP; 2093 RECOMP_BACKEDGE(); 2094 if (CMP_NE(_flag_a, _flag_b)) goto L_42004FFF; /* 0x42005012: jne 0x42004fff */ 2095 L_42005014: 2096 eax = MEM32(edi + 0x4); /* 0x42005014: mov eax, dword ptr [edi + 4] */ 2097 PUSH32(esp, eax); /* 0x42005017: push eax */ 2098 RECOMP_ICALL(0x42016DD0u); /* 0x42005018: call 0x42016dd0 */ /* not lifted */ 2099 RECOMP_FLAGS_IN(); 2100 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2101 eax = 0; /* 0x4200501D: xor eax, eax */ 2102 _cf = 0; 2103 _flag_k = FK_TEST; 2104 PUSH32(esp, edi); /* 0x4200501F: push edi */ 2105 MEM32(edi + 0x4) = eax; /* 0x42005020: mov dword ptr [edi + 4], eax */ 2106 MEM32(edi + 0x8) = eax; /* 0x42005023: mov dword ptr [edi + 8], eax */ 2107 RECOMP_ICALL(0x42016DD0u); /* 0x42005026: call 0x42016dd0 */ /* not lifted */ 2108 RECOMP_FLAGS_IN(); 2109 eax = MEM32(ebp + (-0x14)); /* 0x4200502B: mov eax, dword ptr [ebp - 0x14] */ 2110 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 2111 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2112 esp = esp + 8; /* 0x4200502E: add esp, 8 */ 2113 _flag_k = FK_ADD; 2114 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2115 edx = 0; /* 0x42005031: xor edx, edx */ 2116 _cf = 0; 2117 _flag_k = FK_TEST; 2118 L_42005033: 2119 ecx = MEM32(ebx + 0x34); /* 0x42005033: mov ecx, dword ptr [ebx + 0x34] */ 2120 MEM32(eax + ecx + 0x20) = edx; /* 0x42005036: mov dword ptr [eax + ecx + 0x20], edx */ 2121 esi = MEM32(ebx + 0x28); /* 0x4200503A: mov esi, dword ptr [ebx + 0x28] */ 2122 esi = (uint32_t)((int32_t)esi * (int32_t)MEM32(ebx + 0x24)); /* 0x4200503D: imul esi, dword ptr [ebx + 0x24] */ 2123 ecx = MEM32(ebp + (-0x10)); /* 0x42005041: mov ecx, dword ptr [ebp - 0x10] */ 2124 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 2125 ecx = ecx + 1; /* 0x42005044: inc ecx */ 2126 _flag_k = FK_INC; 2127 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x28u); 2128 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2129 eax = eax + 0x28u; /* 0x42005045: add eax, 0x28 */ 2130 _flag_k = FK_ADD; 2131 /* cmp ecx, esi */ /* 0x42005048: cmp ecx, esi */ 2132 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi); 2133 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2134 _flag_k = FK_CMP; 2135 MEM32(ebp + (-0x10)) = ecx; /* 0x4200504A: mov dword ptr [ebp - 0x10], ecx */ 2136 MEM32(ebp + (-0x14)) = eax; /* 0x4200504D: mov dword ptr [ebp - 0x14], eax */ 2137 RECOMP_BACKEDGE(); 2138 if (CMP_L(_flag_a, _flag_b)) goto L_42004FE8; /* 0x42005050: jl 0x42004fe8 */ 2139 L_42005052: 2140 edi = POP32_VAL(esp); /* 0x42005052: pop edi */ 2141 L_42005053: 2142 eax = MEM32(ebx + 0x34); /* 0x42005053: mov eax, dword ptr [ebx + 0x34] */ 2143 /* cmp eax, edx */ /* 0x42005056: cmp eax, edx */ 2144 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 2145 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2146 _flag_k = FK_CMP; 2147 if (CMP_EQ(_flag_a, _flag_b)) goto L_42005077; /* 0x42005058: je 0x42005077 */ 2148 L_4200505A: 2149 edx = MEM32(eax + (-0x4)); /* 0x4200505A: mov edx, dword ptr [eax - 4] */ 2150 esi = eax + (-0x4); /* 0x4200505D: lea esi, [eax - 4] */ 2151 PUSH32(esp, 0x42004F60u); /* 0x42005060: push 0x42004f60 */ 2152 PUSH32(esp, edx); /* 0x42005065: push edx */ 2153 PUSH32(esp, 0x28u); /* 0x42005066: push 0x28 */ 2154 PUSH32(esp, eax); /* 0x42005068: push eax */ 2155 RECOMP_ICALL(0x42016E3Cu); /* 0x42005069: call 0x42016e3c */ /* not lifted */ 2156 RECOMP_FLAGS_IN(); 2157 PUSH32(esp, esi); /* 0x4200506E: push esi */ 2158 RECOMP_ICALL(0x42016DD0u); /* 0x4200506F: call 0x42016dd0 */ /* not lifted */ 2159 RECOMP_FLAGS_IN(); 2160 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2161 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2162 esp = esp + 4; /* 0x42005074: add esp, 4 */ 2163 _flag_k = FK_ADD; 2164 L_42005077: 2165 ecx = ebx; /* 0x42005077: mov ecx, ebx */ 2166 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x42005079: mov dword ptr [ebp - 4], 0xffffffff */ 2167 RECOMP_ICALL(0x42003DA0u); /* 0x42005080: call 0x42003da0 */ /* not lifted */ 2168 RECOMP_FLAGS_IN(); 2169 ecx = MEM32(ebp + (-0xC)); /* 0x42005085: mov ecx, dword ptr [ebp - 0xc] */ 2170 esi = POP32_VAL(esp); /* 0x42005088: pop esi */ 2171 ebx = POP32_VAL(esp); /* 0x42005089: pop ebx */ 2172 MEM32(FS_BASE + (0)) = ecx; /* 0x4200508A: mov dword ptr fs:[0], ecx */ 2173 esp = ebp; /* 0x42005091: mov esp, ebp */ 2174 ebp = POP32_VAL(esp); /* 0x42005093: pop ebp */ 2175 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42005094: ret */ 2176 RECOMP_REGS_OUT(); 2177 } 2178 2179 void sub_420050A0(void) { 2180 int _fpu_cmp = 0; 2181 uint32_t _cf = 0; 2182 int _df = 1; 2183 uint32_t _flag_k = FK_NONE; 2184 uint32_t _flag_a = 0, _flag_b = 0; 2185 uint32_t _itail_tgt = 0; 2186 RECOMP_REGS_LOCALS 2187 RECOMP_ENTER(0x420050A0u); 2188 2189 L_420050A0: 2190 PUSH32(esp, ebp); /* 0x420050A0: push ebp */ 2191 ebp = esp; /* 0x420050A1: mov ebp, esp */ 2192 PUSH32(esp, ebx); /* 0x420050A3: push ebx */ 2193 ebx = MEM32(ebp + 0xC); /* 0x420050A4: mov ebx, dword ptr [ebp + 0xc] */ 2194 fp_push(*(float*)&MEM32(ebx)); /* 0x420050A7: fld dword ptr [ebx] */ 2195 PUSH32(esp, esi); /* 0x420050A9: push esi */ 2196 esi = ecx; /* 0x420050AA: mov esi, ecx */ 2197 _st[0] /= (double)*(float*)ADDR(esi + 0x2C); /* 0x420050AC: fdiv dword ptr [esi + 0x2c] */ 2198 PUSH32(esp, edi); /* 0x420050AF: push edi */ 2199 RECOMP_ICALL(0x42016F3Cu); /* 0x420050B0: call 0x42016f3c */ /* not lifted */ 2200 RECOMP_FLAGS_IN(); 2201 fp_push(*(float*)&MEM32(ebx + 0x8)); /* 0x420050B5: fld dword ptr [ebx + 8] */ 2202 _st[0] /= (double)*(float*)ADDR(esi + 0x30); /* 0x420050B8: fdiv dword ptr [esi + 0x30] */ 2203 edi = eax; /* 0x420050BB: mov edi, eax */ 2204 RECOMP_ICALL(0x42016F3Cu); /* 0x420050BD: call 0x42016f3c */ /* not lifted */ 2205 RECOMP_FLAGS_IN(); 2206 /* test edi, edi */ /* 0x420050C2: test edi, edi */ 2207 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 2208 _cf = 0; 2209 _flag_k = FK_TEST; 2210 ecx = eax; /* 0x420050C4: mov ecx, eax */ 2211 if (TEST_S(_flag_a, _flag_b)) goto L_420050E4; /* 0x420050C6: jl 0x420050e4 */ 2212 L_420050C8: 2213 eax = MEM32(esi + 0x24); /* 0x420050C8: mov eax, dword ptr [esi + 0x24] */ 2214 /* cmp edi, eax */ /* 0x420050CB: cmp edi, eax */ 2215 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 2216 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2217 _flag_k = FK_CMP; 2218 if (CMP_GE(_flag_a, _flag_b)) goto L_420050E4; /* 0x420050CD: jge 0x420050e4 */ 2219 L_420050CF: 2220 /* test ecx, ecx */ /* 0x420050CF: test ecx, ecx */ 2221 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 2222 _cf = 0; 2223 _flag_k = FK_TEST; 2224 if (TEST_S(_flag_a, _flag_b)) goto L_420050E4; /* 0x420050D1: jl 0x420050e4 */ 2225 L_420050D3: 2226 /* cmp ecx, MEM32(esi + 0x28) */ /* 0x420050D3: cmp ecx, dword ptr [esi + 0x28] */ 2227 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x28)); 2228 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2229 _flag_k = FK_CMP; 2230 if (CMP_GE(_flag_a, _flag_b)) goto L_420050E4; /* 0x420050D6: jge 0x420050e4 */ 2231 L_420050D8: 2232 eax = (uint32_t)((int32_t)eax * (int32_t)ecx); /* 0x420050D8: imul eax, ecx */ 2233 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 2234 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2235 eax = eax + edi; /* 0x420050DB: add eax, edi */ 2236 _flag_k = FK_ADD; 2237 edi = POP32_VAL(esp); /* 0x420050DD: pop edi */ 2238 esi = POP32_VAL(esp); /* 0x420050DE: pop esi */ 2239 ebx = POP32_VAL(esp); /* 0x420050DF: pop ebx */ 2240 ebp = POP32_VAL(esp); /* 0x420050E0: pop ebp */ 2241 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x420050E1: ret 8 */ 2242 L_420050E4: 2243 edi = POP32_VAL(esp); /* 0x420050E4: pop edi */ 2244 esi = POP32_VAL(esp); /* 0x420050E5: pop esi */ 2245 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 2246 eax = eax | 0xFFFFFFFFu; /* 0x420050E6: or eax, 0xffffffff */ 2247 _cf = 0; 2248 _flag_k = FK_TEST; 2249 ebx = POP32_VAL(esp); /* 0x420050E9: pop ebx */ 2250 ebp = POP32_VAL(esp); /* 0x420050EA: pop ebp */ 2251 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x420050EB: ret 8 */ 2252 RECOMP_REGS_OUT(); 2253 } 2254 2255 void sub_420050F0(void) { 2256 int _fpu_cmp = 0; 2257 uint32_t _cf = 0; 2258 int _df = 1; 2259 uint32_t _flag_k = FK_NONE; 2260 uint32_t _flag_a = 0, _flag_b = 0; 2261 uint32_t _itail_tgt = 0; 2262 RECOMP_REGS_LOCALS 2263 RECOMP_ENTER(0x420050F0u); 2264 2265 L_420050F0: 2266 PUSH32(esp, ebp); /* 0x420050F0: push ebp */ 2267 ebp = esp; /* 0x420050F1: mov ebp, esp */ 2268 PUSH32(esp, esi); /* 0x420050F3: push esi */ 2269 PUSH32(esp, edi); /* 0x420050F4: push edi */ 2270 edi = MEM32(ebp + 0x8); /* 0x420050F5: mov edi, dword ptr [ebp + 8] */ 2271 esi = ecx; /* 0x420050F8: mov esi, ecx */ 2272 eax = MEM32(esi); /* 0x420050FA: mov eax, dword ptr [esi] */ 2273 PUSH32(esp, edi); /* 0x420050FC: push edi */ 2274 RECOMP_ICALL(MEM32(eax + 0x7C)); /* 0x420050FD: call dword ptr [eax + 0x7c] */ 2275 RECOMP_FLAGS_IN(); 2276 edx = MEM32(eax + 0x18); /* 0x42005100: mov edx, dword ptr [eax + 0x18] */ 2277 ecx = ebp + 0xC; /* 0x42005103: lea ecx, [ebp + 0xc] */ 2278 PUSH32(esp, ecx); /* 0x42005106: push ecx */ 2279 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x10u); 2280 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2281 eax = eax + 0x10u; /* 0x42005107: add eax, 0x10 */ 2282 _flag_k = FK_ADD; 2283 PUSH32(esp, 1); /* 0x4200510A: push 1 */ 2284 PUSH32(esp, edx); /* 0x4200510C: push edx */ 2285 ecx = eax; /* 0x4200510D: mov ecx, eax */ 2286 RECOMP_ICALL(0x4200D9B0u); /* 0x4200510F: call 0x4200d9b0 */ /* not lifted */ 2287 RECOMP_FLAGS_IN(); 2288 ecx = MEM32(ebp + 0xC); /* 0x42005114: mov ecx, dword ptr [ebp + 0xc] */ 2289 eax = MEM32(ecx); /* 0x42005117: mov eax, dword ptr [ecx] */ 2290 RECOMP_ICALL(MEM32(eax + 0x3C)); /* 0x42005119: call dword ptr [eax + 0x3c] */ 2291 RECOMP_FLAGS_IN(); 2292 /* test LO8(eax), LO8(eax) */ /* 0x4200511C: test al, al */ 2293 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2294 _cf = 0; 2295 _flag_k = FK_NARROW(FK_TEST, 24); 2296 if (TEST_Z(_flag_a, _flag_b)) goto L_42005131; /* 0x4200511E: je 0x42005131 */ 2297 L_42005120: 2298 edx = MEM32(esi); /* 0x42005120: mov edx, dword ptr [esi] */ 2299 PUSH32(esp, edi); /* 0x42005122: push edi */ 2300 ecx = esi; /* 0x42005123: mov ecx, esi */ 2301 RECOMP_ICALL(MEM32(edx + 0x7C)); /* 0x42005125: call dword ptr [edx + 0x7c] */ 2302 RECOMP_FLAGS_IN(); 2303 ecx = MEM32(eax + 0x24); /* 0x42005128: mov ecx, dword ptr [eax + 0x24] */ 2304 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x24u); 2305 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2306 eax = eax + 0x24u; /* 0x4200512B: add eax, 0x24 */ 2307 _flag_k = FK_ADD; 2308 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 2309 ecx = ecx + 1; /* 0x4200512E: inc ecx */ 2310 _flag_k = FK_INC; 2311 MEM32(eax) = ecx; /* 0x4200512F: mov dword ptr [eax], ecx */ 2312 L_42005131: 2313 edi = POP32_VAL(esp); /* 0x42005131: pop edi */ 2314 esi = POP32_VAL(esp); /* 0x42005132: pop esi */ 2315 ebp = POP32_VAL(esp); /* 0x42005133: pop ebp */ 2316 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x42005134: ret 8 */ 2317 RECOMP_REGS_OUT(); 2318 } 2319 2320 void sub_42005140(void) { 2321 int _fpu_cmp = 0; 2322 uint32_t _cf = 0; 2323 int _df = 1; 2324 uint32_t _flag_k = FK_NONE; 2325 uint32_t _flag_a = 0, _flag_b = 0; 2326 uint32_t _itail_tgt = 0; 2327 RECOMP_REGS_LOCALS 2328 RECOMP_ENTER(0x42005140u); 2329 2330 L_42005140: 2331 PUSH32(esp, ebp); /* 0x42005140: push ebp */ 2332 ebp = esp; /* 0x42005141: mov ebp, esp */ 2333 eax = MEM32(ebp + 0x8); /* 0x42005143: mov eax, dword ptr [ebp + 8] */ 2334 ecx = MEM32(ecx + 0x34); /* 0x42005146: mov ecx, dword ptr [ecx + 0x34] */ 2335 eax = eax + eax * 4; /* 0x42005149: lea eax, [eax + eax*4] */ 2336 eax = ecx + eax * 8; /* 0x4200514C: lea eax, [ecx + eax*8] */ 2337 ebp = POP32_VAL(esp); /* 0x4200514F: pop ebp */ 2338 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42005150: ret 4 */ 2339 RECOMP_REGS_OUT(); 2340 } 2341 2342 void sub_42005160(void) { 2343 int _fpu_cmp = 0; 2344 uint32_t _cf = 0; 2345 int _df = 1; 2346 uint32_t _flag_k = FK_NONE; 2347 uint32_t _flag_a = 0, _flag_b = 0; 2348 uint32_t _itail_tgt = 0; 2349 RECOMP_REGS_LOCALS 2350 RECOMP_ENTER(0x42005160u); 2351 2352 L_42005160: 2353 PUSH32(esp, ebp); /* 0x42005160: push ebp */ 2354 ebp = esp; /* 0x42005161: mov ebp, esp */ 2355 edx = MEM32(ebp + 0x8); /* 0x42005163: mov edx, dword ptr [ebp + 8] */ 2356 eax = MEM32(ecx); /* 0x42005166: mov eax, dword ptr [ecx] */ 2357 PUSH32(esp, edx); /* 0x42005168: push edx */ 2358 RECOMP_ICALL(MEM32(eax + 0x7C)); /* 0x42005169: call dword ptr [eax + 0x7c] */ 2359 RECOMP_FLAGS_IN(); 2360 eax = MEM32(eax + 0x20); /* 0x4200516C: mov eax, dword ptr [eax + 0x20] */ 2361 ebp = POP32_VAL(esp); /* 0x4200516F: pop ebp */ 2362 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42005170: ret 4 */ 2363 RECOMP_REGS_OUT(); 2364 } 2365 2366 void sub_42005180(void) { 2367 int _fpu_cmp = 0; 2368 uint32_t _cf = 0; 2369 int _df = 1; 2370 uint32_t _flag_k = FK_NONE; 2371 uint32_t _flag_a = 0, _flag_b = 0; 2372 uint32_t _itail_tgt = 0; 2373 RECOMP_REGS_LOCALS 2374 RECOMP_ENTER(0x42005180u); 2375 2376 L_42005180: 2377 PUSH32(esp, ebp); /* 0x42005180: push ebp */ 2378 ebp = esp; /* 0x42005181: mov ebp, esp */ 2379 eax = MEM32(ebp + 0x14); /* 0x42005183: mov eax, dword ptr [ebp + 0x14] */ 2380 edx = MEM32(ebp + 0x10); /* 0x42005186: mov edx, dword ptr [ebp + 0x10] */ 2381 PUSH32(esp, eax); /* 0x42005189: push eax */ 2382 eax = MEM32(ebp + 0xC); /* 0x4200518A: mov eax, dword ptr [ebp + 0xc] */ 2383 PUSH32(esp, edx); /* 0x4200518D: push edx */ 2384 PUSH32(esp, eax); /* 0x4200518E: push eax */ 2385 eax = MEM32(ebp + 0x8); /* 0x4200518F: mov eax, dword ptr [ebp + 8] */ 2386 edx = eax + eax * 4; /* 0x42005192: lea edx, [eax + eax*4] */ 2387 eax = MEM32(ecx + 0x34); /* 0x42005195: mov eax, dword ptr [ecx + 0x34] */ 2388 ecx = MEM32(eax + edx * 8 + 0x20); /* 0x42005198: mov ecx, dword ptr [eax + edx*8 + 0x20] */ 2389 RECOMP_ICALL(0x42005FA0u); /* 0x4200519C: call 0x42005fa0 */ /* not lifted */ 2390 RECOMP_FLAGS_IN(); 2391 ebp = POP32_VAL(esp); /* 0x420051A1: pop ebp */ 2392 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x420051A2: ret 0x10 */ 2393 RECOMP_REGS_OUT(); 2394 } 2395 2396 void sub_420051B0(void) { 2397 int _fpu_cmp = 0; 2398 uint32_t _cf = 0; 2399 int _df = 1; 2400 uint32_t _flag_k = FK_NONE; 2401 uint32_t _flag_a = 0, _flag_b = 0; 2402 uint32_t _itail_tgt = 0; 2403 RECOMP_REGS_LOCALS 2404 RECOMP_ENTER(0x420051B0u); 2405 2406 L_420051B0: 2407 PUSH32(esp, ebp); /* 0x420051B0: push ebp */ 2408 ebp = esp; /* 0x420051B1: mov ebp, esp */ 2409 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 2410 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2411 esp = esp - 0xCu; /* 0x420051B3: sub esp, 0xc */ 2412 _flag_k = FK_CMP; 2413 PUSH32(esp, ebx); /* 0x420051B6: push ebx */ 2414 ebx = MEM32(ebp + 0x8); /* 0x420051B7: mov ebx, dword ptr [ebp + 8] */ 2415 /* test ebx, ebx */ /* 0x420051BA: test ebx, ebx */ 2416 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 2417 _cf = 0; 2418 _flag_k = FK_TEST; 2419 MEM32(ebp + (-0x4)) = ecx; /* 0x420051BC: mov dword ptr [ebp - 4], ecx */ 2420 if (TEST_S(_flag_a, _flag_b)) goto L_4200529F; /* 0x420051BF: jl 0x4200529f */ 2421 L_420051C5: 2422 /* cmp ebx, MEM32(ecx + 0x18) */ /* 0x420051C5: cmp ebx, dword ptr [ecx + 0x18] */ 2423 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(ecx + 0x18)); 2424 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2425 _flag_k = FK_CMP; 2426 if (CMP_GE(_flag_a, _flag_b)) goto L_4200529F; /* 0x420051C8: jge 0x4200529f */ 2427 L_420051CE: 2428 eax = ecx + 0x24; /* 0x420051CE: lea eax, [ecx + 0x24] */ 2429 MEM32(ebp + (-0x8)) = eax; /* 0x420051D1: mov dword ptr [ebp - 8], eax */ 2430 PUSH32(esp, esi); /* 0x420051D4: push esi */ 2431 esi = MEM32(eax); /* 0x420051D5: mov esi, dword ptr [eax] */ 2432 eax = ebx; /* 0x420051D7: mov eax, ebx */ 2433 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x420051D9: cdq */ 2434 { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)esi; /* 0x420051DA: idiv esi */ 2435 if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); } 2436 else { eax = 0; edx = 0; } } 2437 eax = ebx; /* 0x420051DC: mov eax, ebx */ 2438 ebx = MEM32(ebp + 0x10); /* 0x420051DE: mov ebx, dword ptr [ebp + 0x10] */ 2439 PUSH32(esp, edi); /* 0x420051E1: push edi */ 2440 edi = MEM32(ebp + 0xC); /* 0x420051E2: mov edi, dword ptr [ebp + 0xc] */ 2441 MEM32(ebp + (-0xC)) = edi; /* 0x420051E5: mov dword ptr [ebp - 0xc], edi */ 2442 MEM32(ebp + 0x8) = 0; /* 0x420051E8: mov dword ptr [ebp + 8], 0 */ 2443 ecx = edx; /* 0x420051EF: mov ecx, edx */ 2444 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x420051F1: cdq */ 2445 { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)esi; /* 0x420051F2: idiv esi */ 2446 if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); } 2447 else { eax = 0; edx = 0; } } 2448 edx = ecx; /* 0x420051F4: mov edx, ecx */ 2449 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ebx); 2450 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2451 edx = edx - ebx; /* 0x420051F6: sub edx, ebx */ 2452 _flag_k = FK_CMP; 2453 MEM32(ebp + 0xC) = edx; /* 0x420051F8: mov dword ptr [ebp + 0xc], edx */ 2454 /* test edx, edx */ /* 0x420051FB: test edx, edx */ 2455 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 2456 _cf = 0; 2457 _flag_k = FK_TEST; 2458 edx = ebp + 0xC; /* 0x420051FD: lea edx, [ebp + 0xc] */ 2459 if (TEST_G(_flag_a, _flag_b)) goto L_42005205; /* 0x42005200: jg 0x42005205 */ 2460 L_42005202: 2461 edx = ebp + 0x8; /* 0x42005202: lea edx, [ebp + 8] */ 2462 L_42005205: 2463 edx = MEM32(edx); /* 0x42005205: mov edx, dword ptr [edx] */ 2464 MEM32(ebp + 0x10) = edx; /* 0x42005207: mov dword ptr [ebp + 0x10], edx */ 2465 edx = eax; /* 0x4200520A: mov edx, eax */ 2466 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ebx); 2467 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2468 edx = edx - ebx; /* 0x4200520C: sub edx, ebx */ 2469 _flag_k = FK_CMP; 2470 MEM32(ebp + 0xC) = edx; /* 0x4200520E: mov dword ptr [ebp + 0xc], edx */ 2471 /* test edx, edx */ /* 0x42005211: test edx, edx */ 2472 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 2473 _cf = 0; 2474 _flag_k = FK_TEST; 2475 MEM32(ebp + 0x8) = 0; /* 0x42005213: mov dword ptr [ebp + 8], 0 */ 2476 edx = ebp + 0xC; /* 0x4200521A: lea edx, [ebp + 0xc] */ 2477 if (TEST_G(_flag_a, _flag_b)) goto L_42005222; /* 0x4200521D: jg 0x42005222 */ 2478 L_4200521F: 2479 edx = ebp + 0x8; /* 0x4200521F: lea edx, [ebp + 8] */ 2480 L_42005222: 2481 edx = MEM32(edx); /* 0x42005222: mov edx, dword ptr [edx] */ 2482 MEM32(ebp + 0x8) = edx; /* 0x42005224: mov dword ptr [ebp + 8], edx */ 2483 edx = eax + ebx + 0x1; /* 0x42005227: lea edx, [eax + ebx + 1] */ 2484 eax = MEM32(ebp + (-0x4)); /* 0x4200522B: mov eax, dword ptr [ebp - 4] */ 2485 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x28u); 2486 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2487 eax = eax + 0x28u; /* 0x4200522E: add eax, 0x28 */ 2488 _flag_k = FK_ADD; 2489 /* cmp edx, MEM32(eax) */ /* 0x42005231: cmp edx, dword ptr [eax] */ 2490 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(eax)); 2491 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2492 _flag_k = FK_CMP; 2493 MEM32(ebp + 0xC) = edx; /* 0x42005233: mov dword ptr [ebp + 0xc], edx */ 2494 if (CMP_GE(_flag_a, _flag_b)) goto L_4200523B; /* 0x42005236: jge 0x4200523b */ 2495 L_42005238: 2496 eax = ebp + 0xC; /* 0x42005238: lea eax, [ebp + 0xc] */ 2497 L_4200523B: 2498 eax = MEM32(eax); /* 0x4200523B: mov eax, dword ptr [eax] */ 2499 ecx = ecx + ebx + 0x1; /* 0x4200523D: lea ecx, [ecx + ebx + 1] */ 2500 ebx = MEM32(ebp + (-0x8)); /* 0x42005241: mov ebx, dword ptr [ebp - 8] */ 2501 edx = MEM32(ebx); /* 0x42005244: mov edx, dword ptr [ebx] */ 2502 MEM32(ebp + 0xC) = ecx; /* 0x42005246: mov dword ptr [ebp + 0xc], ecx */ 2503 /* cmp ecx, edx */ /* 0x42005249: cmp ecx, edx */ 2504 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 2505 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2506 _flag_k = FK_CMP; 2507 ecx = ebp + 0xC; /* 0x4200524B: lea ecx, [ebp + 0xc] */ 2508 if (CMP_L(_flag_a, _flag_b)) goto L_42005252; /* 0x4200524E: jl 0x42005252 */ 2509 L_42005250: 2510 ecx = ebx; /* 0x42005250: mov ecx, ebx */ 2511 L_42005252: 2512 edx = MEM32(ecx); /* 0x42005252: mov edx, dword ptr [ecx] */ 2513 ecx = MEM32(ebp + 0x8); /* 0x42005254: mov ecx, dword ptr [ebp + 8] */ 2514 esi = (uint32_t)((int32_t)esi * (int32_t)ecx); /* 0x42005257: imul esi, ecx */ 2515 /* cmp ecx, eax */ /* 0x4200525A: cmp ecx, eax */ 2516 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 2517 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2518 _flag_k = FK_CMP; 2519 if (CMP_GE(_flag_a, _flag_b)) goto L_42005294; /* 0x4200525C: jge 0x42005294 */ 2520 L_4200525E: 2521 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 2522 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2523 eax = eax - ecx; /* 0x4200525E: sub eax, ecx */ 2524 _flag_k = FK_CMP; 2525 MEM32(ebp + 0xC) = eax; /* 0x42005260: mov dword ptr [ebp + 0xc], eax */ 2526 L_42005263: 2527 eax = MEM32(ebp + 0x10); /* 0x42005263: mov eax, dword ptr [ebp + 0x10] */ 2528 /* cmp eax, edx */ /* 0x42005266: cmp eax, edx */ 2529 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 2530 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2531 _flag_k = FK_CMP; 2532 if (CMP_GE(_flag_a, _flag_b)) goto L_42005287; /* 0x42005268: jge 0x42005287 */ 2533 L_4200526A: 2534 ecx = edi; /* 0x4200526A: mov ecx, edi */ 2535 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(ebp + (-0xC))); 2536 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2537 ecx = ecx - MEM32(ebp + (-0xC)); /* 0x4200526C: sub ecx, dword ptr [ebp - 0xc] */ 2538 _flag_k = FK_CMP; 2539 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xFFFFFFFCu); 2540 ecx = ecx & 0xFFFFFFFCu; /* 0x4200526F: and ecx, 0xfffffffc */ 2541 _cf = 0; 2542 _flag_k = FK_TEST; 2543 /* cmp ecx, 0xC4u */ /* 0x42005272: cmp ecx, 0xc4 */ 2544 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xC4u); 2545 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2546 _flag_k = FK_CMP; 2547 if (CMP_GE(_flag_a, _flag_b)) goto L_42005282; /* 0x42005278: jge 0x42005282 */ 2548 L_4200527A: 2549 ecx = eax + esi; /* 0x4200527A: lea ecx, [eax + esi] */ 2550 MEM32(edi) = ecx; /* 0x4200527D: mov dword ptr [edi], ecx */ 2551 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4); 2552 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2553 edi = edi + 4; /* 0x4200527F: add edi, 4 */ 2554 _flag_k = FK_ADD; 2555 L_42005282: 2556 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2557 eax = eax + 1; /* 0x42005282: inc eax */ 2558 _flag_k = FK_INC; 2559 /* cmp eax, edx */ /* 0x42005283: cmp eax, edx */ 2560 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 2561 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2562 _flag_k = FK_CMP; 2563 RECOMP_BACKEDGE(); 2564 if (CMP_L(_flag_a, _flag_b)) goto L_4200526A; /* 0x42005285: jl 0x4200526a */ 2565 L_42005287: 2566 ecx = MEM32(ebx); /* 0x42005287: mov ecx, dword ptr [ebx] */ 2567 eax = MEM32(ebp + 0xC); /* 0x42005289: mov eax, dword ptr [ebp + 0xc] */ 2568 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 2569 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2570 esi = esi + ecx; /* 0x4200528C: add esi, ecx */ 2571 _flag_k = FK_ADD; 2572 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2573 eax = eax - 1; /* 0x4200528E: dec eax */ 2574 _flag_k = FK_DEC; 2575 MEM32(ebp + 0xC) = eax; /* 0x4200528F: mov dword ptr [ebp + 0xc], eax */ 2576 RECOMP_BACKEDGE(); 2577 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_42005263; /* 0x42005292: jne 0x42005263 */ 2578 L_42005294: 2579 eax = edi; /* 0x42005294: mov eax, edi */ 2580 edi = POP32_VAL(esp); /* 0x42005296: pop edi */ 2581 esi = POP32_VAL(esp); /* 0x42005297: pop esi */ 2582 ebx = POP32_VAL(esp); /* 0x42005298: pop ebx */ 2583 esp = ebp; /* 0x42005299: mov esp, ebp */ 2584 ebp = POP32_VAL(esp); /* 0x4200529B: pop ebp */ 2585 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x4200529C: ret 0xc */ 2586 L_4200529F: 2587 eax = MEM32(ebp + 0xC); /* 0x4200529F: mov eax, dword ptr [ebp + 0xc] */ 2588 ebx = POP32_VAL(esp); /* 0x420052A2: pop ebx */ 2589 esp = ebp; /* 0x420052A3: mov esp, ebp */ 2590 ebp = POP32_VAL(esp); /* 0x420052A5: pop ebp */ 2591 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x420052A6: ret 0xc */ 2592 RECOMP_REGS_OUT(); 2593 } 2594 2595 void sub_420052B0(void) { 2596 int _fpu_cmp = 0; 2597 uint32_t _cf = 0; 2598 int _df = 1; 2599 uint32_t _flag_k = FK_NONE; 2600 uint32_t _flag_a = 0, _flag_b = 0; 2601 uint32_t _itail_tgt = 0; 2602 RECOMP_REGS_LOCALS 2603 RECOMP_ENTER(0x420052B0u); 2604 2605 L_420052B0: 2606 PUSH32(esp, ebp); /* 0x420052B0: push ebp */ 2607 ebp = esp; /* 0x420052B1: mov ebp, esp */ 2608 PUSH32(esp, 0xFFFFFFFFu); /* 0x420052B3: push -1 */ 2609 PUSH32(esp, 0x420172B8u); /* 0x420052B5: push 0x420172b8 */ 2610 eax = MEM32(FS_BASE + (0)); /* 0x420052BA: mov eax, dword ptr fs:[0] */ 2611 PUSH32(esp, eax); /* 0x420052C0: push eax */ 2612 MEM32(FS_BASE + (0)) = esp; /* 0x420052C1: mov dword ptr fs:[0], esp */ 2613 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x38u); 2614 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2615 esp = esp - 0x38u; /* 0x420052C8: sub esp, 0x38 */ 2616 _flag_k = FK_CMP; 2617 PUSH32(esp, ebx); /* 0x420052CB: push ebx */ 2618 PUSH32(esp, esi); /* 0x420052CC: push esi */ 2619 esi = ecx; /* 0x420052CD: mov esi, ecx */ 2620 PUSH32(esp, edi); /* 0x420052CF: push edi */ 2621 MEM32(ebp + (-0x14)) = esi; /* 0x420052D0: mov dword ptr [ebp - 0x14], esi */ 2622 MEM32(ebp + (-0x34)) = esi; /* 0x420052D3: mov dword ptr [ebp - 0x34], esi */ 2623 RECOMP_ICALL(0x42004850u); /* 0x420052D6: call 0x42004850 */ /* not lifted */ 2624 RECOMP_FLAGS_IN(); 2625 eax = MEM32(esi + 0x28); /* 0x420052DB: mov eax, dword ptr [esi + 0x28] */ 2626 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2627 edi = 0; /* 0x420052DE: xor edi, edi */ 2628 _cf = 0; 2629 _flag_k = FK_TEST; 2630 /* cmp eax, edi */ /* 0x420052E0: cmp eax, edi */ 2631 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 2632 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2633 _flag_k = FK_CMP; 2634 MEM32(ebp + (-0x4)) = edi; /* 0x420052E2: mov dword ptr [ebp - 4], edi */ 2635 MEM32(ebp + (-0x2C)) = edi; /* 0x420052E5: mov dword ptr [ebp - 0x2c], edi */ 2636 MEM32(ebp + (-0x1C)) = edi; /* 0x420052E8: mov dword ptr [ebp - 0x1c], edi */ 2637 if (CMP_LE(_flag_a, _flag_b)) goto L_420054AC; /* 0x420052EB: jle 0x420054ac */ 2638 L_420052F1: 2639 ebx = MEM32(ebp + 0x8); /* 0x420052F1: mov ebx, dword ptr [ebp + 8] */ 2640 L_420052F4: 2641 ecx = MEM32(esi + 0x24); /* 0x420052F4: mov ecx, dword ptr [esi + 0x24] */ 2642 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2643 eax = 0; /* 0x420052F7: xor eax, eax */ 2644 _cf = 0; 2645 _flag_k = FK_TEST; 2646 /* test ecx, ecx */ /* 0x420052F9: test ecx, ecx */ 2647 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 2648 _cf = 0; 2649 _flag_k = FK_TEST; 2650 MEM32(ebp + (-0x10)) = eax; /* 0x420052FB: mov dword ptr [ebp - 0x10], eax */ 2651 if (TEST_LE(_flag_a, _flag_b)) goto L_42005492; /* 0x420052FE: jle 0x42005492 */ 2652 L_42005304: 2653 edi = edi + edi * 4; /* 0x42005304: lea edi, [edi + edi*4] */ 2654 if (3u) _cf = (((edi) >> 29) & 1u); /* 0x42005307: shl edi, 3 */ 2655 if (3u) { _flag_a = recomp_flags_pack((edi << 3u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 2656 edi = edi << 3u; /* 0x42005307: shl edi, 3 */ 2657 MEM32(ebp + (-0x18)) = edi; /* 0x4200530A: mov dword ptr [ebp - 0x18], edi */ 2658 goto L_42005312; /* 0x4200530D: jmp 0x42005312 */ 2659 L_4200530F: 2660 edi = MEM32(ebp + (-0x18)); /* 0x4200530F: mov edi, dword ptr [ebp - 0x18] */ 2661 L_42005312: 2662 edx = MEM32(esi + 0x34); /* 0x42005312: mov edx, dword ptr [esi + 0x34] */ 2663 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx); 2664 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2665 edi = edi + edx; /* 0x42005315: add edi, edx */ 2666 _flag_k = FK_ADD; 2667 edx = MEM32(edi + 0x4); /* 0x42005317: mov edx, dword ptr [edi + 4] */ 2668 /* test edx, edx */ /* 0x4200531A: test edx, edx */ 2669 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 2670 _cf = 0; 2671 _flag_k = FK_TEST; 2672 MEM32(ebp + (-0x28)) = edi; /* 0x4200531C: mov dword ptr [ebp - 0x28], edi */ 2673 if (TEST_Z(_flag_a, _flag_b)) goto L_42005477; /* 0x4200531F: je 0x42005477 */ 2674 L_42005325: 2675 edi = MEM32(edi + 0x8); /* 0x42005325: mov edi, dword ptr [edi + 8] */ 2676 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx); 2677 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2678 edi = edi - edx; /* 0x42005328: sub edi, edx */ 2679 _flag_k = FK_CMP; 2680 /* test edi, 0xFFFFFFFCu */ /* 0x4200532A: test edi, 0xfffffffc */ 2681 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFCu); 2682 _cf = 0; 2683 _flag_k = FK_TEST; 2684 if (TEST_Z(_flag_a, _flag_b)) goto L_42005477; /* 0x42005330: je 0x42005477 */ 2685 L_42005336: 2686 edx = MEM32(ebp + (-0x1C)); /* 0x42005336: mov edx, dword ptr [ebp - 0x1c] */ 2687 edi = edx + 0x1; /* 0x42005339: lea edi, [edx + 1] */ 2688 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2689 edx = 0; /* 0x4200533C: xor edx, edx */ 2690 _cf = 0; 2691 _flag_k = FK_TEST; 2692 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2693 eax = eax + 1; /* 0x4200533E: inc eax */ 2694 _flag_k = FK_INC; 2695 /* cmp eax, ecx */ /* 0x4200533F: cmp eax, ecx */ 2696 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 2697 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2698 _flag_k = FK_CMP; 2699 MEM32(ebp + 0x8) = edx; /* 0x42005341: mov dword ptr [ebp + 8], edx */ 2700 if (CMP_GE(_flag_a, _flag_b)) goto L_4200535B; /* 0x42005344: jge 0x4200535b */ 2701 L_42005346: 2702 edx = ecx; /* 0x42005346: mov edx, ecx */ 2703 edx = (uint32_t)((int32_t)edx * (int32_t)MEM32(ebp + (-0x1C))); /* 0x42005348: imul edx, dword ptr [ebp - 0x1c] */ 2704 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 2705 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2706 edx = edx + eax; /* 0x4200534C: add edx, eax */ 2707 _flag_k = FK_ADD; 2708 MEM32(ebp + 0x8) = 1; /* 0x4200534E: mov dword ptr [ebp + 8], 1 */ 2709 MEM32(ebp + (-0x44)) = edx; /* 0x42005355: mov dword ptr [ebp - 0x44], edx */ 2710 edx = MEM32(ebp + 0x8); /* 0x42005358: mov edx, dword ptr [ebp + 8] */ 2711 L_4200535B: 2712 /* cmp edi, MEM32(esi + 0x28) */ /* 0x4200535B: cmp edi, dword ptr [esi + 0x28] */ 2713 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x28)); 2714 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2715 _flag_k = FK_CMP; 2716 if (CMP_GE(_flag_a, _flag_b)) goto L_42005393; /* 0x4200535E: jge 0x42005393 */ 2717 L_42005360: 2718 eax = ecx; /* 0x42005360: mov eax, ecx */ 2719 eax = (uint32_t)((int32_t)eax * (int32_t)edi); /* 0x42005362: imul eax, edi */ 2720 edi = MEM32(ebp + (-0x10)); /* 0x42005365: mov edi, dword ptr [ebp - 0x10] */ 2721 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 2722 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2723 edi = edi + eax; /* 0x42005368: add edi, eax */ 2724 _flag_k = FK_ADD; 2725 MEM32(ebp + edx * 4 + (-0x44)) = edi; /* 0x4200536A: mov dword ptr [ebp + edx*4 - 0x44], edi */ 2726 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1); 2727 edx = edx + 1; /* 0x4200536E: inc edx */ 2728 _flag_k = FK_INC; 2729 /* cmp MEM32(ebp + (-0x10)), 0 */ /* 0x4200536F: cmp dword ptr [ebp - 0x10], 0 */ 2730 _flag_a = (uint32_t)(MEM32(ebp + (-0x10))); _flag_b = (uint32_t)(0); 2731 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2732 _flag_k = FK_CMP; 2733 MEM32(ebp + 0x8) = edx; /* 0x42005373: mov dword ptr [ebp + 8], edx */ 2734 if (CMP_LE(_flag_a, _flag_b)) goto L_42005381; /* 0x42005376: jle 0x42005381 */ 2735 L_42005378: 2736 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1); 2737 edi = edi - 1; /* 0x42005378: dec edi */ 2738 _flag_k = FK_DEC; 2739 MEM32(ebp + edx * 4 + (-0x44)) = edi; /* 0x42005379: mov dword ptr [ebp + edx*4 - 0x44], edi */ 2740 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1); 2741 edx = edx + 1; /* 0x4200537D: inc edx */ 2742 _flag_k = FK_INC; 2743 MEM32(ebp + 0x8) = edx; /* 0x4200537E: mov dword ptr [ebp + 8], edx */ 2744 L_42005381: 2745 edi = MEM32(ebp + (-0x10)); /* 0x42005381: mov edi, dword ptr [ebp - 0x10] */ 2746 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1); 2747 edi = edi + 1; /* 0x42005384: inc edi */ 2748 _flag_k = FK_INC; 2749 /* cmp edi, ecx */ /* 0x42005385: cmp edi, ecx */ 2750 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx); 2751 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2752 _flag_k = FK_CMP; 2753 if (CMP_GE(_flag_a, _flag_b)) goto L_42005393; /* 0x42005387: jge 0x42005393 */ 2754 L_42005389: 2755 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 2756 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2757 eax = eax + edi; /* 0x42005389: add eax, edi */ 2758 _flag_k = FK_ADD; 2759 MEM32(ebp + edx * 4 + (-0x44)) = eax; /* 0x4200538B: mov dword ptr [ebp + edx*4 - 0x44], eax */ 2760 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1); 2761 edx = edx + 1; /* 0x4200538F: inc edx */ 2762 _flag_k = FK_INC; 2763 MEM32(ebp + 0x8) = edx; /* 0x42005390: mov dword ptr [ebp + 8], edx */ 2764 L_42005393: 2765 ecx = MEM32(ebp + (-0x28)); /* 0x42005393: mov ecx, dword ptr [ebp - 0x28] */ 2766 eax = MEM32(ecx + 0x8); /* 0x42005396: mov eax, dword ptr [ecx + 8] */ 2767 edi = MEM32(ecx + 0x4); /* 0x42005399: mov edi, dword ptr [ecx + 4] */ 2768 /* cmp edi, eax */ /* 0x4200539C: cmp edi, eax */ 2769 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 2770 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2771 _flag_k = FK_CMP; 2772 MEM32(ebp + (-0x24)) = eax; /* 0x4200539E: mov dword ptr [ebp - 0x24], eax */ 2773 if (CMP_EQ(_flag_a, _flag_b)) goto L_420053E3; /* 0x420053A1: je 0x420053e3 */ 2774 L_420053A3: 2775 esi = edi + 0x4; /* 0x420053A3: lea esi, [edi + 4] */ 2776 /* cmp esi, eax */ /* 0x420053A6: cmp esi, eax */ 2777 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 2778 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2779 _flag_k = FK_CMP; 2780 MEM32(ebp + (-0x28)) = esi; /* 0x420053A8: mov dword ptr [ebp - 0x28], esi */ 2781 if (CMP_EQ(_flag_a, _flag_b)) goto L_420053DA; /* 0x420053AB: je 0x420053da */ 2782 L_420053AD: 2783 ecx = MEM32(esi); /* 0x420053AD: mov ecx, dword ptr [esi] */ 2784 edx = MEM32(edi); /* 0x420053AF: mov edx, dword ptr [edi] */ 2785 eax = MEM32(ebx); /* 0x420053B1: mov eax, dword ptr [ebx] */ 2786 PUSH32(esp, ecx); /* 0x420053B3: push ecx */ 2787 PUSH32(esp, edx); /* 0x420053B4: push edx */ 2788 ecx = ebx; /* 0x420053B5: mov ecx, ebx */ 2789 RECOMP_ICALL(MEM32(eax)); /* 0x420053B7: call dword ptr [eax] */ 2790 RECOMP_FLAGS_IN(); 2791 /* cmp eax, 1 */ /* 0x420053B9: cmp eax, 1 */ 2792 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2793 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2794 _flag_k = FK_CMP; 2795 if (CMP_EQ(_flag_a, _flag_b)) goto L_420053D1; /* 0x420053BC: je 0x420053d1 */ 2796 L_420053BE: 2797 /* cmp eax, 2 */ /* 0x420053BE: cmp eax, 2 */ 2798 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2); 2799 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2800 _flag_k = FK_CMP; 2801 if (CMP_EQ(_flag_a, _flag_b)) goto L_420054D4; /* 0x420053C1: je 0x420054d4 */ 2802 L_420053C7: 2803 eax = MEM32(ebp + (-0x24)); /* 0x420053C7: mov eax, dword ptr [ebp - 0x24] */ 2804 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 2805 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2806 esi = esi + 4; /* 0x420053CA: add esi, 4 */ 2807 _flag_k = FK_ADD; 2808 /* cmp esi, eax */ /* 0x420053CD: cmp esi, eax */ 2809 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 2810 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2811 _flag_k = FK_CMP; 2812 RECOMP_BACKEDGE(); 2813 if (CMP_NE(_flag_a, _flag_b)) goto L_420053AD; /* 0x420053CF: jne 0x420053ad */ 2814 L_420053D1: 2815 eax = MEM32(ebp + (-0x24)); /* 0x420053D1: mov eax, dword ptr [ebp - 0x24] */ 2816 edx = MEM32(ebp + 0x8); /* 0x420053D4: mov edx, dword ptr [ebp + 8] */ 2817 esi = MEM32(ebp + (-0x28)); /* 0x420053D7: mov esi, dword ptr [ebp - 0x28] */ 2818 L_420053DA: 2819 edi = esi; /* 0x420053DA: mov edi, esi */ 2820 /* cmp edi, eax */ /* 0x420053DC: cmp edi, eax */ 2821 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 2822 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2823 _flag_k = FK_CMP; 2824 RECOMP_BACKEDGE(); 2825 if (CMP_NE(_flag_a, _flag_b)) goto L_420053A3; /* 0x420053DE: jne 0x420053a3 */ 2826 L_420053E0: 2827 esi = MEM32(ebp + (-0x14)); /* 0x420053E0: mov esi, dword ptr [ebp - 0x14] */ 2828 L_420053E3: 2829 ecx = MEM32(ebp + (-0x18)); /* 0x420053E3: mov ecx, dword ptr [ebp - 0x18] */ 2830 eax = MEM32(esi + 0x34); /* 0x420053E6: mov eax, dword ptr [esi + 0x34] */ 2831 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 2832 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2833 eax = eax + ecx; /* 0x420053E9: add eax, ecx */ 2834 _flag_k = FK_ADD; 2835 ecx = MEM32(eax + 0x8); /* 0x420053EB: mov ecx, dword ptr [eax + 8] */ 2836 eax = MEM32(eax + 0x4); /* 0x420053EE: mov eax, dword ptr [eax + 4] */ 2837 /* cmp eax, ecx */ /* 0x420053F1: cmp eax, ecx */ 2838 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 2839 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2840 _flag_k = FK_CMP; 2841 MEM32(ebp + (-0x30)) = ecx; /* 0x420053F3: mov dword ptr [ebp - 0x30], ecx */ 2842 MEM32(ebp + (-0x24)) = eax; /* 0x420053F6: mov dword ptr [ebp - 0x24], eax */ 2843 if (CMP_EQ(_flag_a, _flag_b)) goto L_42005474; /* 0x420053F9: je 0x42005474 */ 2844 L_420053FB: 2845 /* test edx, edx */ /* 0x420053FB: test edx, edx */ 2846 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 2847 _cf = 0; 2848 _flag_k = FK_TEST; 2849 MEM32(ebp + (-0x28)) = 0; /* 0x420053FD: mov dword ptr [ebp - 0x28], 0 */ 2850 if (TEST_LE(_flag_a, _flag_b)) goto L_4200546A; /* 0x42005404: jle 0x4200546a */ 2851 L_42005406: 2852 eax = ebp + (-0x44); /* 0x42005406: lea eax, [ebp - 0x44] */ 2853 MEM32(ebp + (-0x20)) = eax; /* 0x42005409: mov dword ptr [ebp - 0x20], eax */ 2854 L_4200540C: 2855 ecx = MEM32(ebp + (-0x20)); /* 0x4200540C: mov ecx, dword ptr [ebp - 0x20] */ 2856 eax = MEM32(ecx); /* 0x4200540F: mov eax, dword ptr [ecx] */ 2857 ecx = MEM32(esi + 0x34); /* 0x42005411: mov ecx, dword ptr [esi + 0x34] */ 2858 eax = eax + eax * 4; /* 0x42005414: lea eax, [eax + eax*4] */ 2859 edi = MEM32(ecx + eax * 8 + 0x8); /* 0x42005417: mov edi, dword ptr [ecx + eax*8 + 8] */ 2860 esi = MEM32(ecx + eax * 8 + 0x4); /* 0x4200541B: mov esi, dword ptr [ecx + eax*8 + 4] */ 2861 /* cmp esi, edi */ /* 0x4200541F: cmp esi, edi */ 2862 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi); 2863 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2864 _flag_k = FK_CMP; 2865 eax = ecx + eax * 8; /* 0x42005421: lea eax, [ecx + eax*8] */ 2866 if (CMP_EQ(_flag_a, _flag_b)) goto L_4200544D; /* 0x42005424: je 0x4200544d */ 2867 L_42005426: 2868 eax = MEM32(esi); /* 0x42005426: mov eax, dword ptr [esi] */ 2869 ecx = MEM32(ebp + (-0x24)); /* 0x42005428: mov ecx, dword ptr [ebp - 0x24] */ 2870 edx = MEM32(ebx); /* 0x4200542B: mov edx, dword ptr [ebx] */ 2871 PUSH32(esp, eax); /* 0x4200542D: push eax */ 2872 eax = MEM32(ecx); /* 0x4200542E: mov eax, dword ptr [ecx] */ 2873 PUSH32(esp, eax); /* 0x42005430: push eax */ 2874 ecx = ebx; /* 0x42005431: mov ecx, ebx */ 2875 RECOMP_ICALL(MEM32(edx)); /* 0x42005433: call dword ptr [edx] */ 2876 RECOMP_FLAGS_IN(); 2877 /* cmp eax, 1 */ /* 0x42005435: cmp eax, 1 */ 2878 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2879 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2880 _flag_k = FK_CMP; 2881 if (CMP_EQ(_flag_a, _flag_b)) goto L_4200544A; /* 0x42005438: je 0x4200544a */ 2882 L_4200543A: 2883 /* cmp eax, 2 */ /* 0x4200543A: cmp eax, 2 */ 2884 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2); 2885 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2886 _flag_k = FK_CMP; 2887 if (CMP_EQ(_flag_a, _flag_b)) goto L_420054D4; /* 0x4200543D: je 0x420054d4 */ 2888 L_42005443: 2889 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 2890 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2891 esi = esi + 4; /* 0x42005443: add esi, 4 */ 2892 _flag_k = FK_ADD; 2893 /* cmp esi, edi */ /* 0x42005446: cmp esi, edi */ 2894 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi); 2895 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2896 _flag_k = FK_CMP; 2897 RECOMP_BACKEDGE(); 2898 if (CMP_NE(_flag_a, _flag_b)) goto L_42005426; /* 0x42005448: jne 0x42005426 */ 2899 L_4200544A: 2900 edx = MEM32(ebp + 0x8); /* 0x4200544A: mov edx, dword ptr [ebp + 8] */ 2901 L_4200544D: 2902 eax = MEM32(ebp + (-0x28)); /* 0x4200544D: mov eax, dword ptr [ebp - 0x28] */ 2903 esi = MEM32(ebp + (-0x20)); /* 0x42005450: mov esi, dword ptr [ebp - 0x20] */ 2904 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 2905 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2906 esi = esi + 4; /* 0x42005453: add esi, 4 */ 2907 _flag_k = FK_ADD; 2908 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2909 eax = eax + 1; /* 0x42005456: inc eax */ 2910 _flag_k = FK_INC; 2911 /* cmp eax, edx */ /* 0x42005457: cmp eax, edx */ 2912 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 2913 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2914 _flag_k = FK_CMP; 2915 MEM32(ebp + (-0x20)) = esi; /* 0x42005459: mov dword ptr [ebp - 0x20], esi */ 2916 esi = MEM32(ebp + (-0x14)); /* 0x4200545C: mov esi, dword ptr [ebp - 0x14] */ 2917 MEM32(ebp + (-0x28)) = eax; /* 0x4200545F: mov dword ptr [ebp - 0x28], eax */ 2918 RECOMP_BACKEDGE(); 2919 if (CMP_L(_flag_a, _flag_b)) goto L_4200540C; /* 0x42005462: jl 0x4200540c */ 2920 L_42005464: 2921 ecx = MEM32(ebp + (-0x30)); /* 0x42005464: mov ecx, dword ptr [ebp - 0x30] */ 2922 eax = MEM32(ebp + (-0x24)); /* 0x42005467: mov eax, dword ptr [ebp - 0x24] */ 2923 L_4200546A: 2924 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 2925 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2926 eax = eax + 4; /* 0x4200546A: add eax, 4 */ 2927 _flag_k = FK_ADD; 2928 /* cmp eax, ecx */ /* 0x4200546D: cmp eax, ecx */ 2929 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 2930 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2931 _flag_k = FK_CMP; 2932 MEM32(ebp + (-0x24)) = eax; /* 0x4200546F: mov dword ptr [ebp - 0x24], eax */ 2933 RECOMP_BACKEDGE(); 2934 if (CMP_NE(_flag_a, _flag_b)) goto L_420053FB; /* 0x42005472: jne 0x420053fb */ 2935 L_42005474: 2936 eax = MEM32(ebp + (-0x10)); /* 0x42005474: mov eax, dword ptr [ebp - 0x10] */ 2937 L_42005477: 2938 edi = MEM32(ebp + (-0x18)); /* 0x42005477: mov edi, dword ptr [ebp - 0x18] */ 2939 ecx = MEM32(esi + 0x24); /* 0x4200547A: mov ecx, dword ptr [esi + 0x24] */ 2940 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2941 eax = eax + 1; /* 0x4200547D: inc eax */ 2942 _flag_k = FK_INC; 2943 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x28u); 2944 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2945 edi = edi + 0x28u; /* 0x4200547E: add edi, 0x28 */ 2946 _flag_k = FK_ADD; 2947 /* cmp eax, ecx */ /* 0x42005481: cmp eax, ecx */ 2948 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 2949 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2950 _flag_k = FK_CMP; 2951 MEM32(ebp + (-0x10)) = eax; /* 0x42005483: mov dword ptr [ebp - 0x10], eax */ 2952 MEM32(ebp + (-0x18)) = edi; /* 0x42005486: mov dword ptr [ebp - 0x18], edi */ 2953 RECOMP_BACKEDGE(); 2954 if (CMP_L(_flag_a, _flag_b)) goto L_4200530F; /* 0x42005489: jl 0x4200530f */ 2955 L_4200548F: 2956 edi = MEM32(ebp + (-0x2C)); /* 0x4200548F: mov edi, dword ptr [ebp - 0x2c] */ 2957 L_42005492: 2958 eax = MEM32(ebp + (-0x1C)); /* 0x42005492: mov eax, dword ptr [ebp - 0x1c] */ 2959 edx = MEM32(esi + 0x24); /* 0x42005495: mov edx, dword ptr [esi + 0x24] */ 2960 ecx = MEM32(esi + 0x28); /* 0x42005498: mov ecx, dword ptr [esi + 0x28] */ 2961 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 2962 eax = eax + 1; /* 0x4200549B: inc eax */ 2963 _flag_k = FK_INC; 2964 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx); 2965 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2966 edi = edi + edx; /* 0x4200549C: add edi, edx */ 2967 _flag_k = FK_ADD; 2968 /* cmp eax, ecx */ /* 0x4200549E: cmp eax, ecx */ 2969 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 2970 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2971 _flag_k = FK_CMP; 2972 MEM32(ebp + (-0x1C)) = eax; /* 0x420054A0: mov dword ptr [ebp - 0x1c], eax */ 2973 MEM32(ebp + (-0x2C)) = edi; /* 0x420054A3: mov dword ptr [ebp - 0x2c], edi */ 2974 RECOMP_BACKEDGE(); 2975 if (CMP_L(_flag_a, _flag_b)) goto L_420052F4; /* 0x420054A6: jl 0x420052f4 */ 2976 L_420054AC: 2977 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x420054AC: mov dword ptr [ebp - 4], 0xffffffff */ 2978 L_420054B3: 2979 ecx = esi; /* 0x420054B3: mov ecx, esi */ 2980 RECOMP_ICALL(0x42004870u); /* 0x420054B5: call 0x42004870 */ /* not lifted */ 2981 RECOMP_FLAGS_IN(); 2982 ecx = esi; /* 0x420054BA: mov ecx, esi */ 2983 RECOMP_ICALL(0x420048E0u); /* 0x420054BC: call 0x420048e0 */ /* not lifted */ 2984 RECOMP_FLAGS_IN(); 2985 ecx = MEM32(ebp + (-0xC)); /* 0x420054C1: mov ecx, dword ptr [ebp - 0xc] */ 2986 edi = POP32_VAL(esp); /* 0x420054C4: pop edi */ 2987 esi = POP32_VAL(esp); /* 0x420054C5: pop esi */ 2988 ebx = POP32_VAL(esp); /* 0x420054C6: pop ebx */ 2989 MEM32(FS_BASE + (0)) = ecx; /* 0x420054C7: mov dword ptr fs:[0], ecx */ 2990 esp = ebp; /* 0x420054CE: mov esp, ebp */ 2991 ebp = POP32_VAL(esp); /* 0x420054D0: pop ebp */ 2992 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x420054D1: ret 4 */ 2993 L_420054D4: 2994 esi = MEM32(ebp + (-0x14)); /* 0x420054D4: mov esi, dword ptr [ebp - 0x14] */ 2995 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x420054D7: mov dword ptr [ebp - 4], 0xffffffff */ 2996 RECOMP_BACKEDGE(); 2997 goto L_420054B3; /* 0x420054DE: jmp 0x420054b3 */ 2998 { RECOMP_REGS_OUT(); return; } /* end of function */ 2999 RECOMP_REGS_OUT(); 3000 } 3001 3002 void sub_420054E0(void) { 3003 int _fpu_cmp = 0; 3004 uint32_t _cf = 0; 3005 int _df = 1; 3006 uint32_t _flag_k = FK_NONE; 3007 uint32_t _flag_a = 0, _flag_b = 0; 3008 uint32_t _itail_tgt = 0; 3009 RECOMP_REGS_LOCALS 3010 RECOMP_ENTER(0x420054E0u); 3011 3012 L_420054E0: 3013 PUSH32(esp, ebp); /* 0x420054E0: push ebp */ 3014 ebp = esp; /* 0x420054E1: mov ebp, esp */ 3015 PUSH32(esp, 0xFFFFFFFFu); /* 0x420054E3: push -1 */ 3016 PUSH32(esp, 0x420172D8u); /* 0x420054E5: push 0x420172d8 */ 3017 eax = MEM32(FS_BASE + (0)); /* 0x420054EA: mov eax, dword ptr fs:[0] */ 3018 PUSH32(esp, eax); /* 0x420054F0: push eax */ 3019 MEM32(FS_BASE + (0)) = esp; /* 0x420054F1: mov dword ptr fs:[0], esp */ 3020 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 3021 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3022 esp = esp - 0xCu; /* 0x420054F8: sub esp, 0xc */ 3023 _flag_k = FK_CMP; 3024 PUSH32(esp, esi); /* 0x420054FB: push esi */ 3025 esi = ecx; /* 0x420054FC: mov esi, ecx */ 3026 PUSH32(esp, edi); /* 0x420054FE: push edi */ 3027 MEM32(ebp + (-0x18)) = esi; /* 0x420054FF: mov dword ptr [ebp - 0x18], esi */ 3028 RECOMP_ICALL(0x42004850u); /* 0x42005502: call 0x42004850 */ /* not lifted */ 3029 RECOMP_FLAGS_IN(); 3030 eax = MEM32(esi + 0x28); /* 0x42005507: mov eax, dword ptr [esi + 0x28] */ 3031 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3032 edi = 0; /* 0x4200550A: xor edi, edi */ 3033 _cf = 0; 3034 _flag_k = FK_TEST; 3035 /* cmp eax, edi */ /* 0x4200550C: cmp eax, edi */ 3036 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 3037 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3038 _flag_k = FK_CMP; 3039 MEM32(ebp + (-0x4)) = edi; /* 0x4200550E: mov dword ptr [ebp - 4], edi */ 3040 MEM32(ebp + (-0x14)) = edi; /* 0x42005511: mov dword ptr [ebp - 0x14], edi */ 3041 MEM32(ebp + (-0x10)) = edi; /* 0x42005514: mov dword ptr [ebp - 0x10], edi */ 3042 if (CMP_LE(_flag_a, _flag_b)) goto L_42005576; /* 0x42005517: jle 0x42005576 */ 3043 L_42005519: 3044 PUSH32(esp, ebx); /* 0x42005519: push ebx */ 3045 L_4200551A: 3046 eax = MEM32(esi + 0x24); /* 0x4200551A: mov eax, dword ptr [esi + 0x24] */ 3047 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3048 ebx = 0; /* 0x4200551D: xor ebx, ebx */ 3049 _cf = 0; 3050 _flag_k = FK_TEST; 3051 /* test eax, eax */ /* 0x4200551F: test eax, eax */ 3052 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3053 _cf = 0; 3054 _flag_k = FK_TEST; 3055 if (TEST_LE(_flag_a, _flag_b)) goto L_4200555F; /* 0x42005521: jle 0x4200555f */ 3056 L_42005523: 3057 edi = edi + edi * 4; /* 0x42005523: lea edi, [edi + edi*4] */ 3058 if (3u) _cf = (((edi) >> 29) & 1u); /* 0x42005526: shl edi, 3 */ 3059 if (3u) { _flag_a = recomp_flags_pack((edi << 3u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 3060 edi = edi << 3u; /* 0x42005526: shl edi, 3 */ 3061 L_42005529: 3062 eax = MEM32(esi + 0x34); /* 0x42005529: mov eax, dword ptr [esi + 0x34] */ 3063 ecx = MEM32(eax + edi + 0x4); /* 0x4200552C: mov ecx, dword ptr [eax + edi + 4] */ 3064 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 3065 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3066 eax = eax + edi; /* 0x42005530: add eax, edi */ 3067 _flag_k = FK_ADD; 3068 /* test ecx, ecx */ /* 0x42005532: test ecx, ecx */ 3069 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 3070 _cf = 0; 3071 _flag_k = FK_TEST; 3072 if (TEST_Z(_flag_a, _flag_b)) goto L_42005551; /* 0x42005534: je 0x42005551 */ 3073 L_42005536: 3074 edx = MEM32(eax + 0x8); /* 0x42005536: mov edx, dword ptr [eax + 8] */ 3075 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx); 3076 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3077 edx = edx - ecx; /* 0x42005539: sub edx, ecx */ 3078 _flag_k = FK_CMP; 3079 /* test edx, 0xFFFFFFFCu */ /* 0x4200553B: test edx, 0xfffffffc */ 3080 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0xFFFFFFFCu); 3081 _cf = 0; 3082 _flag_k = FK_TEST; 3083 if (TEST_Z(_flag_a, _flag_b)) goto L_42005551; /* 0x42005541: je 0x42005551 */ 3084 L_42005543: 3085 ecx = MEM32(ebp + 0x8); /* 0x42005543: mov ecx, dword ptr [ebp + 8] */ 3086 eax = MEM32(eax + 0x20); /* 0x42005546: mov eax, dword ptr [eax + 0x20] */ 3087 PUSH32(esp, ecx); /* 0x42005549: push ecx */ 3088 ecx = eax; /* 0x4200554A: mov ecx, eax */ 3089 RECOMP_ICALL(0x420061D0u); /* 0x4200554C: call 0x420061d0 */ /* not lifted */ 3090 RECOMP_FLAGS_IN(); 3091 L_42005551: 3092 eax = MEM32(esi + 0x24); /* 0x42005551: mov eax, dword ptr [esi + 0x24] */ 3093 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(1); 3094 ebx = ebx + 1; /* 0x42005554: inc ebx */ 3095 _flag_k = FK_INC; 3096 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x28u); 3097 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3098 edi = edi + 0x28u; /* 0x42005555: add edi, 0x28 */ 3099 _flag_k = FK_ADD; 3100 /* cmp ebx, eax */ /* 0x42005558: cmp ebx, eax */ 3101 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 3102 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3103 _flag_k = FK_CMP; 3104 RECOMP_BACKEDGE(); 3105 if (CMP_L(_flag_a, _flag_b)) goto L_42005529; /* 0x4200555A: jl 0x42005529 */ 3106 L_4200555C: 3107 edi = MEM32(ebp + (-0x14)); /* 0x4200555C: mov edi, dword ptr [ebp - 0x14] */ 3108 L_4200555F: 3109 eax = MEM32(ebp + (-0x10)); /* 0x4200555F: mov eax, dword ptr [ebp - 0x10] */ 3110 edx = MEM32(esi + 0x24); /* 0x42005562: mov edx, dword ptr [esi + 0x24] */ 3111 ecx = MEM32(esi + 0x28); /* 0x42005565: mov ecx, dword ptr [esi + 0x28] */ 3112 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 3113 eax = eax + 1; /* 0x42005568: inc eax */ 3114 _flag_k = FK_INC; 3115 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx); 3116 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3117 edi = edi + edx; /* 0x42005569: add edi, edx */ 3118 _flag_k = FK_ADD; 3119 /* cmp eax, ecx */ /* 0x4200556B: cmp eax, ecx */ 3120 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 3121 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3122 _flag_k = FK_CMP; 3123 MEM32(ebp + (-0x10)) = eax; /* 0x4200556D: mov dword ptr [ebp - 0x10], eax */ 3124 MEM32(ebp + (-0x14)) = edi; /* 0x42005570: mov dword ptr [ebp - 0x14], edi */ 3125 RECOMP_BACKEDGE(); 3126 if (CMP_L(_flag_a, _flag_b)) goto L_4200551A; /* 0x42005573: jl 0x4200551a */ 3127 L_42005575: 3128 ebx = POP32_VAL(esp); /* 0x42005575: pop ebx */ 3129 L_42005576: 3130 ecx = esi; /* 0x42005576: mov ecx, esi */ 3131 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x42005578: mov dword ptr [ebp - 4], 0xffffffff */ 3132 RECOMP_ICALL(0x42004870u); /* 0x4200557F: call 0x42004870 */ /* not lifted */ 3133 RECOMP_FLAGS_IN(); 3134 ecx = esi; /* 0x42005584: mov ecx, esi */ 3135 RECOMP_ICALL(0x420048E0u); /* 0x42005586: call 0x420048e0 */ /* not lifted */ 3136 RECOMP_FLAGS_IN(); 3137 ecx = MEM32(ebp + (-0xC)); /* 0x4200558B: mov ecx, dword ptr [ebp - 0xc] */ 3138 edi = POP32_VAL(esp); /* 0x4200558E: pop edi */ 3139 esi = POP32_VAL(esp); /* 0x4200558F: pop esi */ 3140 MEM32(FS_BASE + (0)) = ecx; /* 0x42005590: mov dword ptr fs:[0], ecx */ 3141 esp = ebp; /* 0x42005597: mov esp, ebp */ 3142 ebp = POP32_VAL(esp); /* 0x42005599: pop ebp */ 3143 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x4200559A: ret 4 */ 3144 RECOMP_REGS_OUT(); 3145 } 3146 3147 void sub_420055A0(void) { 3148 int _fpu_cmp = 0; 3149 uint32_t _cf = 0; 3150 int _df = 1; 3151 uint32_t _flag_k = FK_NONE; 3152 uint32_t _flag_a = 0, _flag_b = 0; 3153 uint32_t _itail_tgt = 0; 3154 RECOMP_REGS_LOCALS 3155 RECOMP_ENTER(0x420055A0u); 3156 3157 L_420055A0: 3158 PUSH32(esp, ebp); /* 0x420055A0: push ebp */ 3159 ebp = esp; /* 0x420055A1: mov ebp, esp */ 3160 PUSH32(esp, 0xFFFFFFFFu); /* 0x420055A3: push -1 */ 3161 PUSH32(esp, 0x420172F8u); /* 0x420055A5: push 0x420172f8 */ 3162 eax = MEM32(FS_BASE + (0)); /* 0x420055AA: mov eax, dword ptr fs:[0] */ 3163 PUSH32(esp, eax); /* 0x420055B0: push eax */ 3164 MEM32(FS_BASE + (0)) = esp; /* 0x420055B1: mov dword ptr fs:[0], esp */ 3165 PUSH32(esp, ecx); /* 0x420055B8: push ecx */ 3166 PUSH32(esp, esi); /* 0x420055B9: push esi */ 3167 esi = ecx; /* 0x420055BA: mov esi, ecx */ 3168 MEM32(ebp + (-0x10)) = esi; /* 0x420055BC: mov dword ptr [ebp - 0x10], esi */ 3169 RECOMP_ICALL(0x42004850u); /* 0x420055BF: call 0x42004850 */ /* not lifted */ 3170 RECOMP_FLAGS_IN(); 3171 eax = MEM32(ebp + 0x8); /* 0x420055C4: mov eax, dword ptr [ebp + 8] */ 3172 ecx = MEM32(esi + 0x34); /* 0x420055C7: mov ecx, dword ptr [esi + 0x34] */ 3173 edx = MEM32(ebp + 0xC); /* 0x420055CA: mov edx, dword ptr [ebp + 0xc] */ 3174 eax = eax + eax * 4; /* 0x420055CD: lea eax, [eax + eax*4] */ 3175 ecx = MEM32(ecx + eax * 8 + 0x20); /* 0x420055D0: mov ecx, dword ptr [ecx + eax*8 + 0x20] */ 3176 PUSH32(esp, edx); /* 0x420055D4: push edx */ 3177 MEM32(ebp + (-0x4)) = 0; /* 0x420055D5: mov dword ptr [ebp - 4], 0 */ 3178 RECOMP_ICALL(0x420061D0u); /* 0x420055DC: call 0x420061d0 */ /* not lifted */ 3179 RECOMP_FLAGS_IN(); 3180 ecx = esi; /* 0x420055E1: mov ecx, esi */ 3181 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x420055E3: mov dword ptr [ebp - 4], 0xffffffff */ 3182 RECOMP_ICALL(0x42004870u); /* 0x420055EA: call 0x42004870 */ /* not lifted */ 3183 RECOMP_FLAGS_IN(); 3184 ecx = esi; /* 0x420055EF: mov ecx, esi */ 3185 RECOMP_ICALL(0x420048E0u); /* 0x420055F1: call 0x420048e0 */ /* not lifted */ 3186 RECOMP_FLAGS_IN(); 3187 ecx = MEM32(ebp + (-0xC)); /* 0x420055F6: mov ecx, dword ptr [ebp - 0xc] */ 3188 esi = POP32_VAL(esp); /* 0x420055F9: pop esi */ 3189 MEM32(FS_BASE + (0)) = ecx; /* 0x420055FA: mov dword ptr fs:[0], ecx */ 3190 esp = ebp; /* 0x42005601: mov esp, ebp */ 3191 ebp = POP32_VAL(esp); /* 0x42005603: pop ebp */ 3192 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x42005604: ret 8 */ 3193 RECOMP_REGS_OUT(); 3194 } 3195 3196 void sub_42005610(void) { 3197 int _fpu_cmp = 0; 3198 uint32_t _cf = 0; 3199 int _df = 1; 3200 uint32_t _flag_k = FK_NONE; 3201 uint32_t _flag_a = 0, _flag_b = 0; 3202 uint32_t _itail_tgt = 0; 3203 RECOMP_REGS_LOCALS 3204 RECOMP_ENTER(0x42005610u); 3205 3206 L_42005610: 3207 PUSH32(esp, ebp); /* 0x42005610: push ebp */ 3208 ebp = esp; /* 0x42005611: mov ebp, esp */ 3209 eax = MEM32(ebp + 0x8); /* 0x42005613: mov eax, dword ptr [ebp + 8] */ 3210 ecx = MEM32(ecx + 0x34); /* 0x42005616: mov ecx, dword ptr [ecx + 0x34] */ 3211 eax = eax + eax * 4; /* 0x42005619: lea eax, [eax + eax*4] */ 3212 PUSH32(esp, ebx); /* 0x4200561C: push ebx */ 3213 eax = ecx + eax * 8; /* 0x4200561D: lea eax, [ecx + eax*8] */ 3214 ecx = MEM32(eax + 0x4); /* 0x42005620: mov ecx, dword ptr [eax + 4] */ 3215 /* test ecx, ecx */ /* 0x42005623: test ecx, ecx */ 3216 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 3217 _cf = 0; 3218 _flag_k = FK_TEST; 3219 PUSH32(esp, esi); /* 0x42005625: push esi */ 3220 PUSH32(esp, edi); /* 0x42005626: push edi */ 3221 if (TEST_Z(_flag_a, _flag_b)) goto L_42005657; /* 0x42005627: je 0x42005657 */ 3222 L_42005629: 3223 edx = MEM32(eax + 0x8); /* 0x42005629: mov edx, dword ptr [eax + 8] */ 3224 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx); 3225 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3226 edx = edx - ecx; /* 0x4200562C: sub edx, ecx */ 3227 _flag_k = FK_CMP; 3228 /* test edx, 0xFFFFFFFCu */ /* 0x4200562E: test edx, 0xfffffffc */ 3229 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0xFFFFFFFCu); 3230 _cf = 0; 3231 _flag_k = FK_TEST; 3232 if (TEST_Z(_flag_a, _flag_b)) goto L_42005657; /* 0x42005634: je 0x42005657 */ 3233 L_42005636: 3234 ebx = MEM32(eax + 0x8); /* 0x42005636: mov ebx, dword ptr [eax + 8] */ 3235 esi = ecx; /* 0x42005639: mov esi, ecx */ 3236 /* cmp esi, ebx */ /* 0x4200563B: cmp esi, ebx */ 3237 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 3238 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3239 _flag_k = FK_CMP; 3240 if (CMP_EQ(_flag_a, _flag_b)) goto L_42005657; /* 0x4200563D: je 0x42005657 */ 3241 L_4200563F: 3242 edi = MEM32(ebp + 0xC); /* 0x4200563F: mov edi, dword ptr [ebp + 0xc] */ 3243 L_42005642: 3244 ecx = MEM32(esi); /* 0x42005642: mov ecx, dword ptr [esi] */ 3245 eax = MEM32(edi); /* 0x42005644: mov eax, dword ptr [edi] */ 3246 PUSH32(esp, ecx); /* 0x42005646: push ecx */ 3247 ecx = edi; /* 0x42005647: mov ecx, edi */ 3248 RECOMP_ICALL(MEM32(eax)); /* 0x42005649: call dword ptr [eax] */ 3249 RECOMP_FLAGS_IN(); 3250 /* cmp eax, 1 */ /* 0x4200564B: cmp eax, 1 */ 3251 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 3252 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3253 _flag_k = FK_CMP; 3254 if (CMP_EQ(_flag_a, _flag_b)) goto L_42005657; /* 0x4200564E: je 0x42005657 */ 3255 L_42005650: 3256 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 3257 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3258 esi = esi + 4; /* 0x42005650: add esi, 4 */ 3259 _flag_k = FK_ADD; 3260 /* cmp esi, ebx */ /* 0x42005653: cmp esi, ebx */ 3261 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 3262 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3263 _flag_k = FK_CMP; 3264 RECOMP_BACKEDGE(); 3265 if (CMP_NE(_flag_a, _flag_b)) goto L_42005642; /* 0x42005655: jne 0x42005642 */ 3266 L_42005657: 3267 edi = POP32_VAL(esp); /* 0x42005657: pop edi */ 3268 esi = POP32_VAL(esp); /* 0x42005658: pop esi */ 3269 ebx = POP32_VAL(esp); /* 0x42005659: pop ebx */ 3270 ebp = POP32_VAL(esp); /* 0x4200565A: pop ebp */ 3271 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x4200565B: ret 8 */ 3272 RECOMP_REGS_OUT(); 3273 } 3274 3275 void sub_42005660(void) { 3276 int _fpu_cmp = 0; 3277 uint32_t _cf = 0; 3278 int _df = 1; 3279 uint32_t _flag_k = FK_NONE; 3280 uint32_t _flag_a = 0, _flag_b = 0; 3281 uint32_t _itail_tgt = 0; 3282 RECOMP_REGS_LOCALS 3283 RECOMP_ENTER(0x42005660u); 3284 3285 L_42005660: 3286 PUSH32(esp, ebp); /* 0x42005660: push ebp */ 3287 ebp = esp; /* 0x42005661: mov ebp, esp */ 3288 PUSH32(esp, 0xFFFFFFFFu); /* 0x42005663: push -1 */ 3289 PUSH32(esp, 0x42017318u); /* 0x42005665: push 0x42017318 */ 3290 eax = MEM32(FS_BASE + (0)); /* 0x4200566A: mov eax, dword ptr fs:[0] */ 3291 PUSH32(esp, eax); /* 0x42005670: push eax */ 3292 MEM32(FS_BASE + (0)) = esp; /* 0x42005671: mov dword ptr fs:[0], esp */ 3293 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 3294 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3295 esp = esp - 0x14u; /* 0x42005678: sub esp, 0x14 */ 3296 _flag_k = FK_CMP; 3297 PUSH32(esp, ebx); /* 0x4200567B: push ebx */ 3298 PUSH32(esp, esi); /* 0x4200567C: push esi */ 3299 ebx = ecx; /* 0x4200567D: mov ebx, ecx */ 3300 PUSH32(esp, edi); /* 0x4200567F: push edi */ 3301 MEM32(ebp + (-0x20)) = ebx; /* 0x42005680: mov dword ptr [ebp - 0x20], ebx */ 3302 RECOMP_ICALL(0x42004850u); /* 0x42005683: call 0x42004850 */ /* not lifted */ 3303 RECOMP_FLAGS_IN(); 3304 ecx = MEM32(ebx + 0x28); /* 0x42005688: mov ecx, dword ptr [ebx + 0x28] */ 3305 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3306 eax = 0; /* 0x4200568B: xor eax, eax */ 3307 _cf = 0; 3308 _flag_k = FK_TEST; 3309 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3310 edx = 0; /* 0x4200568D: xor edx, edx */ 3311 _cf = 0; 3312 _flag_k = FK_TEST; 3313 /* cmp ecx, eax */ /* 0x4200568F: cmp ecx, eax */ 3314 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 3315 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3316 _flag_k = FK_CMP; 3317 MEM32(ebp + (-0x4)) = eax; /* 0x42005691: mov dword ptr [ebp - 4], eax */ 3318 MEM32(ebp + (-0x1C)) = edx; /* 0x42005694: mov dword ptr [ebp - 0x1c], edx */ 3319 MEM32(ebp + (-0x18)) = eax; /* 0x42005697: mov dword ptr [ebp - 0x18], eax */ 3320 if (CMP_LE(_flag_a, _flag_b)) goto L_4200571A; /* 0x4200569A: jle 0x4200571a */ 3321 L_4200569C: 3322 goto L_420056A0; /* 0x4200569C: jmp 0x420056a0 */ 3323 L_4200569E: 3324 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3325 eax = 0; /* 0x4200569E: xor eax, eax */ 3326 _cf = 0; 3327 _flag_k = FK_TEST; 3328 L_420056A0: 3329 /* cmp MEM32(ebx + 0x24), eax */ /* 0x420056A0: cmp dword ptr [ebx + 0x24], eax */ 3330 _flag_a = (uint32_t)(MEM32(ebx + 0x24)); _flag_b = (uint32_t)(eax); 3331 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3332 _flag_k = FK_CMP; 3333 MEM32(ebp + (-0x10)) = eax; /* 0x420056A3: mov dword ptr [ebp - 0x10], eax */ 3334 if (CMP_LE(_flag_a, _flag_b)) goto L_42005704; /* 0x420056A6: jle 0x42005704 */ 3335 L_420056A8: 3336 edx = edx + edx * 4; /* 0x420056A8: lea edx, [edx + edx*4] */ 3337 if (3u) _cf = (((edx) >> 29) & 1u); /* 0x420056AB: shl edx, 3 */ 3338 if (3u) { _flag_a = recomp_flags_pack((edx << 3u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 3339 edx = edx << 3u; /* 0x420056AB: shl edx, 3 */ 3340 MEM32(ebp + (-0x14)) = edx; /* 0x420056AE: mov dword ptr [ebp - 0x14], edx */ 3341 L_420056B1: 3342 eax = MEM32(ebx + 0x34); /* 0x420056B1: mov eax, dword ptr [ebx + 0x34] */ 3343 ecx = MEM32(eax + edx + 0x4); /* 0x420056B4: mov ecx, dword ptr [eax + edx + 4] */ 3344 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 3345 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3346 eax = eax + edx; /* 0x420056B8: add eax, edx */ 3347 _flag_k = FK_ADD; 3348 /* test ecx, ecx */ /* 0x420056BA: test ecx, ecx */ 3349 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 3350 _cf = 0; 3351 _flag_k = FK_TEST; 3352 if (TEST_Z(_flag_a, _flag_b)) goto L_420056ED; /* 0x420056BC: je 0x420056ed */ 3353 L_420056BE: 3354 esi = MEM32(eax + 0x8); /* 0x420056BE: mov esi, dword ptr [eax + 8] */ 3355 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 3356 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3357 esi = esi - ecx; /* 0x420056C1: sub esi, ecx */ 3358 _flag_k = FK_CMP; 3359 /* test esi, 0xFFFFFFFCu */ /* 0x420056C3: test esi, 0xfffffffc */ 3360 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0xFFFFFFFCu); 3361 _cf = 0; 3362 _flag_k = FK_TEST; 3363 if (TEST_Z(_flag_a, _flag_b)) goto L_420056ED; /* 0x420056C9: je 0x420056ed */ 3364 L_420056CB: 3365 edi = MEM32(eax + 0x8); /* 0x420056CB: mov edi, dword ptr [eax + 8] */ 3366 esi = ecx; /* 0x420056CE: mov esi, ecx */ 3367 /* cmp esi, edi */ /* 0x420056D0: cmp esi, edi */ 3368 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi); 3369 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3370 _flag_k = FK_CMP; 3371 if (CMP_EQ(_flag_a, _flag_b)) goto L_420056ED; /* 0x420056D2: je 0x420056ed */ 3372 L_420056D4: 3373 ecx = MEM32(ebp + 0x8); /* 0x420056D4: mov ecx, dword ptr [ebp + 8] */ 3374 eax = MEM32(esi); /* 0x420056D7: mov eax, dword ptr [esi] */ 3375 edx = MEM32(ecx); /* 0x420056D9: mov edx, dword ptr [ecx] */ 3376 PUSH32(esp, eax); /* 0x420056DB: push eax */ 3377 RECOMP_ICALL(MEM32(edx)); /* 0x420056DC: call dword ptr [edx] */ 3378 RECOMP_FLAGS_IN(); 3379 /* cmp eax, 1 */ /* 0x420056DE: cmp eax, 1 */ 3380 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 3381 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3382 _flag_k = FK_CMP; 3383 if (CMP_EQ(_flag_a, _flag_b)) goto L_4200571A; /* 0x420056E1: je 0x4200571a */ 3384 L_420056E3: 3385 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 3386 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3387 esi = esi + 4; /* 0x420056E3: add esi, 4 */ 3388 _flag_k = FK_ADD; 3389 /* cmp esi, edi */ /* 0x420056E6: cmp esi, edi */ 3390 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi); 3391 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3392 _flag_k = FK_CMP; 3393 RECOMP_BACKEDGE(); 3394 if (CMP_NE(_flag_a, _flag_b)) goto L_420056D4; /* 0x420056E8: jne 0x420056d4 */ 3395 L_420056EA: 3396 edx = MEM32(ebp + (-0x14)); /* 0x420056EA: mov edx, dword ptr [ebp - 0x14] */ 3397 L_420056ED: 3398 eax = MEM32(ebp + (-0x10)); /* 0x420056ED: mov eax, dword ptr [ebp - 0x10] */ 3399 ecx = MEM32(ebx + 0x24); /* 0x420056F0: mov ecx, dword ptr [ebx + 0x24] */ 3400 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 3401 eax = eax + 1; /* 0x420056F3: inc eax */ 3402 _flag_k = FK_INC; 3403 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x28u); 3404 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3405 edx = edx + 0x28u; /* 0x420056F4: add edx, 0x28 */ 3406 _flag_k = FK_ADD; 3407 /* cmp eax, ecx */ /* 0x420056F7: cmp eax, ecx */ 3408 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 3409 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3410 _flag_k = FK_CMP; 3411 MEM32(ebp + (-0x10)) = eax; /* 0x420056F9: mov dword ptr [ebp - 0x10], eax */ 3412 MEM32(ebp + (-0x14)) = edx; /* 0x420056FC: mov dword ptr [ebp - 0x14], edx */ 3413 RECOMP_BACKEDGE(); 3414 if (CMP_L(_flag_a, _flag_b)) goto L_420056B1; /* 0x420056FF: jl 0x420056b1 */ 3415 L_42005701: 3416 edx = MEM32(ebp + (-0x1C)); /* 0x42005701: mov edx, dword ptr [ebp - 0x1c] */ 3417 L_42005704: 3418 eax = MEM32(ebp + (-0x18)); /* 0x42005704: mov eax, dword ptr [ebp - 0x18] */ 3419 esi = MEM32(ebx + 0x24); /* 0x42005707: mov esi, dword ptr [ebx + 0x24] */ 3420 ecx = MEM32(ebx + 0x28); /* 0x4200570A: mov ecx, dword ptr [ebx + 0x28] */ 3421 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 3422 eax = eax + 1; /* 0x4200570D: inc eax */ 3423 _flag_k = FK_INC; 3424 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(esi); 3425 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3426 edx = edx + esi; /* 0x4200570E: add edx, esi */ 3427 _flag_k = FK_ADD; 3428 /* cmp eax, ecx */ /* 0x42005710: cmp eax, ecx */ 3429 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 3430 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3431 _flag_k = FK_CMP; 3432 MEM32(ebp + (-0x18)) = eax; /* 0x42005712: mov dword ptr [ebp - 0x18], eax */ 3433 MEM32(ebp + (-0x1C)) = edx; /* 0x42005715: mov dword ptr [ebp - 0x1c], edx */ 3434 RECOMP_BACKEDGE(); 3435 if (CMP_L(_flag_a, _flag_b)) goto L_4200569E; /* 0x42005718: jl 0x4200569e */ 3436 L_4200571A: 3437 ecx = ebx; /* 0x4200571A: mov ecx, ebx */ 3438 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x4200571C: mov dword ptr [ebp - 4], 0xffffffff */ 3439 RECOMP_ICALL(0x42004870u); /* 0x42005723: call 0x42004870 */ /* not lifted */ 3440 RECOMP_FLAGS_IN(); 3441 ecx = ebx; /* 0x42005728: mov ecx, ebx */ 3442 RECOMP_ICALL(0x420048E0u); /* 0x4200572A: call 0x420048e0 */ /* not lifted */ 3443 RECOMP_FLAGS_IN(); 3444 ecx = MEM32(ebp + (-0xC)); /* 0x4200572F: mov ecx, dword ptr [ebp - 0xc] */ 3445 edi = POP32_VAL(esp); /* 0x42005732: pop edi */ 3446 esi = POP32_VAL(esp); /* 0x42005733: pop esi */ 3447 ebx = POP32_VAL(esp); /* 0x42005734: pop ebx */ 3448 MEM32(FS_BASE + (0)) = ecx; /* 0x42005735: mov dword ptr fs:[0], ecx */ 3449 esp = ebp; /* 0x4200573C: mov esp, ebp */ 3450 ebp = POP32_VAL(esp); /* 0x4200573E: pop ebp */ 3451 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x4200573F: ret 4 */ 3452 RECOMP_REGS_OUT(); 3453 } 3454 3455 void sub_42005750(void) { 3456 int _fpu_cmp = 0; 3457 uint32_t _cf = 0; 3458 int _df = 1; 3459 uint32_t _flag_k = FK_NONE; 3460 uint32_t _flag_a = 0, _flag_b = 0; 3461 uint32_t _itail_tgt = 0; 3462 RECOMP_REGS_LOCALS 3463 RECOMP_ENTER(0x42005750u); 3464 3465 L_42005750: 3466 PUSH32(esp, ebp); /* 0x42005750: push ebp */ 3467 ebp = esp; /* 0x42005751: mov ebp, esp */ 3468 PUSH32(esp, 0xFFFFFFFFu); /* 0x42005753: push -1 */ 3469 PUSH32(esp, 0x42017338u); /* 0x42005755: push 0x42017338 */ 3470 eax = MEM32(FS_BASE + (0)); /* 0x4200575A: mov eax, dword ptr fs:[0] */ 3471 PUSH32(esp, eax); /* 0x42005760: push eax */ 3472 MEM32(FS_BASE + (0)) = esp; /* 0x42005761: mov dword ptr fs:[0], esp */ 3473 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x24u); 3474 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3475 esp = esp - 0x24u; /* 0x42005768: sub esp, 0x24 */ 3476 _flag_k = FK_CMP; 3477 PUSH32(esp, ebx); /* 0x4200576B: push ebx */ 3478 PUSH32(esp, esi); /* 0x4200576C: push esi */ 3479 PUSH32(esp, edi); /* 0x4200576D: push edi */ 3480 edi = ecx; /* 0x4200576E: mov edi, ecx */ 3481 MEM32(ebp + (-0x18)) = edi; /* 0x42005770: mov dword ptr [ebp - 0x18], edi */ 3482 RECOMP_ICALL(0x42004850u); /* 0x42005773: call 0x42004850 */ /* not lifted */ 3483 RECOMP_FLAGS_IN(); 3484 ebx = MEM32(ebp + 0x8); /* 0x42005778: mov ebx, dword ptr [ebp + 8] */ 3485 fp_push(*(float*)&MEM32(ebx)); /* 0x4200577B: fld dword ptr [ebx] */ 3486 esi = MEM32(edi + 0x24); /* 0x4200577D: mov esi, dword ptr [edi + 0x24] */ 3487 _st[0] /= (double)*(float*)ADDR(edi + 0x2C); /* 0x42005780: fdiv dword ptr [edi + 0x2c] */ 3488 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3489 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3490 esp = esp - 8; /* 0x42005783: sub esp, 8 */ 3491 _flag_k = FK_CMP; 3492 MEM32(ebp + (-0x4)) = 0; /* 0x42005786: mov dword ptr [ebp - 4], 0 */ 3493 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 3494 esi = esi - 1; /* 0x4200578D: dec esi */ 3495 _flag_k = FK_DEC; 3496 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x4200578E: fstp qword ptr [esp] */ 3497 RECOMP_ICALL(MEM32(0x42018054)); /* 0x42005791: call dword ptr [0x42018054] */ 3498 RECOMP_FLAGS_IN(); 3499 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3500 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3501 esp = esp + 8; /* 0x42005797: add esp, 8 */ 3502 _flag_k = FK_ADD; 3503 RECOMP_ICALL(0x42016F3Cu); /* 0x4200579A: call 0x42016f3c */ /* not lifted */ 3504 RECOMP_FLAGS_IN(); 3505 /* test eax, eax */ /* 0x4200579F: test eax, eax */ 3506 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3507 _cf = 0; 3508 _flag_k = FK_TEST; 3509 if (TEST_G(_flag_a, _flag_b)) goto L_420057AC; /* 0x420057A1: jg 0x420057ac */ 3510 L_420057A3: 3511 MEM32(ebp + 0x8) = 0; /* 0x420057A3: mov dword ptr [ebp + 8], 0 */ 3512 goto L_420057B6; /* 0x420057AA: jmp 0x420057b6 */ 3513 L_420057AC: 3514 /* cmp eax, esi */ /* 0x420057AC: cmp eax, esi */ 3515 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 3516 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3517 _flag_k = FK_CMP; 3518 MEM32(ebp + 0x8) = esi; /* 0x420057AE: mov dword ptr [ebp + 8], esi */ 3519 if (CMP_GE(_flag_a, _flag_b)) goto L_420057B6; /* 0x420057B1: jge 0x420057b6 */ 3520 L_420057B3: 3521 MEM32(ebp + 0x8) = eax; /* 0x420057B3: mov dword ptr [ebp + 8], eax */ 3522 L_420057B6: 3523 fp_push(*(float*)&MEM32(ebx + 0x8)); /* 0x420057B6: fld dword ptr [ebx + 8] */ 3524 esi = MEM32(edi + 0x28); /* 0x420057B9: mov esi, dword ptr [edi + 0x28] */ 3525 _st[0] /= (double)*(float*)ADDR(edi + 0x30); /* 0x420057BC: fdiv dword ptr [edi + 0x30] */ 3526 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3527 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3528 esp = esp - 8; /* 0x420057BF: sub esp, 8 */ 3529 _flag_k = FK_CMP; 3530 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 3531 esi = esi - 1; /* 0x420057C2: dec esi */ 3532 _flag_k = FK_DEC; 3533 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x420057C3: fstp qword ptr [esp] */ 3534 RECOMP_ICALL(MEM32(0x42018054)); /* 0x420057C6: call dword ptr [0x42018054] */ 3535 RECOMP_FLAGS_IN(); 3536 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3537 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3538 esp = esp + 8; /* 0x420057CC: add esp, 8 */ 3539 _flag_k = FK_ADD; 3540 RECOMP_ICALL(0x42016F3Cu); /* 0x420057CF: call 0x42016f3c */ /* not lifted */ 3541 RECOMP_FLAGS_IN(); 3542 /* test eax, eax */ /* 0x420057D4: test eax, eax */ 3543 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 3544 _cf = 0; 3545 _flag_k = FK_TEST; 3546 if (TEST_G(_flag_a, _flag_b)) goto L_420057DC; /* 0x420057D6: jg 0x420057dc */ 3547 L_420057D8: 3548 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 3549 eax = 0; /* 0x420057D8: xor eax, eax */ 3550 _cf = 0; 3551 _flag_k = FK_TEST; 3552 goto L_420057E2; /* 0x420057DA: jmp 0x420057e2 */ 3553 L_420057DC: 3554 /* cmp eax, esi */ /* 0x420057DC: cmp eax, esi */ 3555 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 3556 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3557 _flag_k = FK_CMP; 3558 if (CMP_L(_flag_a, _flag_b)) goto L_420057E2; /* 0x420057DE: jl 0x420057e2 */ 3559 L_420057E0: 3560 eax = esi; /* 0x420057E0: mov eax, esi */ 3561 L_420057E2: 3562 eax = (uint32_t)((int32_t)eax * (int32_t)MEM32(edi + 0x24)); /* 0x420057E2: imul eax, dword ptr [edi + 0x24] */ 3563 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ebp + 0x8)); 3564 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3565 eax = eax + MEM32(ebp + 0x8); /* 0x420057E6: add eax, dword ptr [ebp + 8] */ 3566 _flag_k = FK_ADD; 3567 PUSH32(esp, 1); /* 0x420057E9: push 1 */ 3568 esi = eax; /* 0x420057EB: mov esi, eax */ 3569 eax = MEM32(edi); /* 0x420057ED: mov eax, dword ptr [edi] */ 3570 PUSH32(esp, 0x42022F8Cu); /* 0x420057EF: push 0x42022f8c */ 3571 PUSH32(esp, esi); /* 0x420057F4: push esi */ 3572 ecx = edi; /* 0x420057F5: mov ecx, edi */ 3573 MEM32(ebp + (-0x14)) = esi; /* 0x420057F7: mov dword ptr [ebp - 0x14], esi */ 3574 RECOMP_ICALL(MEM32(eax + 0x84)); /* 0x420057FA: call dword ptr [eax + 0x84] */ 3575 RECOMP_FLAGS_IN(); 3576 MEM32(ebp + (-0x10)) = eax; /* 0x42005800: mov dword ptr [ebp - 0x10], eax */ 3577 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x42005803: fld dword ptr [ebp + 0xc] */ 3578 eax = MEM32(edi + 0x18); /* 0x42005806: mov eax, dword ptr [edi + 0x18] */ 3579 /* cmp esi, eax */ /* 0x42005809: cmp esi, eax */ 3580 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 3581 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3582 _flag_k = FK_CMP; 3583 _st[0] *= (double)*(float*)ADDR(ebp + 0xC); /* 0x4200580B: fmul dword ptr [ebp + 0xc] */ 3584 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x4200580E: fstp dword ptr [ebp + 8] */ 3585 if (CMP_GE(_flag_a, _flag_b)) goto L_420058C7; /* 0x42005811: jge 0x420058c7 */ 3586 L_42005817: 3587 ecx = MEM32(edi + 0x34); /* 0x42005817: mov ecx, dword ptr [edi + 0x34] */ 3588 eax = esi + esi * 4; /* 0x4200581A: lea eax, [esi + esi*4] */ 3589 if (3u) _cf = (((eax) >> 29) & 1u); /* 0x4200581D: shl eax, 3 */ 3590 if (3u) { _flag_a = recomp_flags_pack((eax << 3u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 3591 eax = eax << 3u; /* 0x4200581D: shl eax, 3 */ 3592 esi = MEM32(eax + ecx + 0x4); /* 0x42005820: mov esi, dword ptr [eax + ecx + 4] */ 3593 MEM32(ebp + 0xC) = eax; /* 0x42005824: mov dword ptr [ebp + 0xc], eax */ 3594 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 3595 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3596 eax = eax + ecx; /* 0x42005827: add eax, ecx */ 3597 _flag_k = FK_ADD; 3598 /* cmp esi, MEM32(eax + 0x8) */ /* 0x42005829: cmp esi, dword ptr [eax + 8] */ 3599 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8)); 3600 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3601 _flag_k = FK_CMP; 3602 if (CMP_EQ(_flag_a, _flag_b)) goto L_420058C7; /* 0x4200582C: je 0x420058c7 */ 3603 L_42005832: 3604 ecx = MEM32(esi); /* 0x42005832: mov ecx, dword ptr [esi] */ 3605 edx = MEM32(ecx); /* 0x42005834: mov edx, dword ptr [ecx] */ 3606 RECOMP_ICALL(MEM32(edx + 0xC)); /* 0x42005836: call dword ptr [edx + 0xc] */ 3607 RECOMP_FLAGS_IN(); 3608 ecx = MEM32(eax); /* 0x42005839: mov ecx, dword ptr [eax] */ 3609 edx = MEM32(eax + 0x4); /* 0x4200583B: mov edx, dword ptr [eax + 4] */ 3610 eax = MEM32(eax + 0x8); /* 0x4200583E: mov eax, dword ptr [eax + 8] */ 3611 MEM32(ebp + (-0x24)) = ecx; /* 0x42005841: mov dword ptr [ebp - 0x24], ecx */ 3612 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x42005844: fld dword ptr [ebp - 0x24] */ 3613 _st[0] -= (double)*(float*)ADDR(ebx); /* 0x42005847: fsub dword ptr [ebx] */ 3614 MEM32(ebp + (-0x20)) = edx; /* 0x42005849: mov dword ptr [ebp - 0x20], edx */ 3615 MEM32(ebp + (-0x1C)) = eax; /* 0x4200584C: mov dword ptr [ebp - 0x1c], eax */ 3616 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x4200584F: fstp dword ptr [ebp - 0x24] */ 3617 ecx = MEM32(ebp + (-0x24)); /* 0x42005852: mov ecx, dword ptr [ebp - 0x24] */ 3618 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x42005855: fld dword ptr [ebp - 0x20] */ 3619 MEM32(ebp + (-0x30)) = ecx; /* 0x42005858: mov dword ptr [ebp - 0x30], ecx */ 3620 _st[0] -= (double)*(float*)ADDR(ebx + 0x4); /* 0x4200585B: fsub dword ptr [ebx + 4] */ 3621 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x4200585E: fstp dword ptr [ebp - 0x20] */ 3622 edx = MEM32(ebp + (-0x20)); /* 0x42005861: mov edx, dword ptr [ebp - 0x20] */ 3623 fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x42005864: fld dword ptr [ebp - 0x1c] */ 3624 MEM32(ebp + (-0x2C)) = edx; /* 0x42005867: mov dword ptr [ebp - 0x2c], edx */ 3625 _st[0] -= (double)*(float*)ADDR(ebx + 0x8); /* 0x4200586A: fsub dword ptr [ebx + 8] */ 3626 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x1C)) = _v; } /* 0x4200586D: fstp dword ptr [ebp - 0x1c] */ 3627 eax = MEM32(ebp + (-0x1C)); /* 0x42005870: mov eax, dword ptr [ebp - 0x1c] */ 3628 MEM32(ebp + (-0x28)) = eax; /* 0x42005873: mov dword ptr [ebp - 0x28], eax */ 3629 SET_LO8(eax, MEM8(ebp + 0x14)); /* 0x42005876: mov al, byte ptr [ebp + 0x14] */ 3630 /* test LO8(eax), LO8(eax) */ /* 0x42005879: test al, al */ 3631 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3632 _cf = 0; 3633 _flag_k = FK_NARROW(FK_TEST, 24); 3634 if (TEST_Z(_flag_a, _flag_b)) goto L_42005885; /* 0x4200587B: je 0x42005885 */ 3635 L_4200587D: 3636 fp_push(*(float*)&MEM32(0x420180F8)); /* 0x4200587D: fld dword ptr [0x420180f8] */ 3637 goto L_42005888; /* 0x42005883: jmp 0x42005888 */ 3638 L_42005885: 3639 fp_push(*(float*)&MEM32(ebp + (-0x2C))); /* 0x42005885: fld dword ptr [ebp - 0x2c] */ 3640 L_42005888: 3641 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x42005888: fld dword ptr [ebp - 0x28] */ 3642 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x4200588B: fmul dword ptr [ebp - 0x28] */ 3643 fp_push(*(float*)&MEM32(ebp + (-0x30))); /* 0x4200588E: fld dword ptr [ebp - 0x30] */ 3644 _st[0] *= (double)*(float*)ADDR(ebp + (-0x30)); /* 0x42005891: fmul dword ptr [ebp - 0x30] */ 3645 { double _v = fp_pop(); _st[0] += _v; } /* 0x42005894: faddp st(1) */ 3646 fp_push(_st[1]); /* 0x42005896: fld st(1) */ 3647 _st[0] *= _st[2]; /* 0x42005898: fmul st(2) */ 3648 { double _v = fp_pop(); _st[0] += _v; } /* 0x4200589A: faddp st(1) */ 3649 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0x8)); /* 0x4200589C: fcomp dword ptr [ebp + 8] */ 3650 fp_pop(); 3651 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x4200589F: fnstsw ax */ 3652 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x420058A1: fstp st(0) */ 3653 /* test HI8(eax), 1 */ /* 0x420058A3: test ah, 1 */ 3654 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 3655 _cf = 0; 3656 _flag_k = FK_NARROW(FK_TEST, 24); 3657 if (TEST_Z(_flag_a, _flag_b)) goto L_420058B2; /* 0x420058A6: je 0x420058b2 */ 3658 L_420058A8: 3659 ecx = MEM32(ebp + 0x10); /* 0x420058A8: mov ecx, dword ptr [ebp + 0x10] */ 3660 eax = MEM32(esi); /* 0x420058AB: mov eax, dword ptr [esi] */ 3661 edx = MEM32(ecx); /* 0x420058AD: mov edx, dword ptr [ecx] */ 3662 PUSH32(esp, eax); /* 0x420058AF: push eax */ 3663 RECOMP_ICALL(MEM32(edx)); /* 0x420058B0: call dword ptr [edx] */ 3664 RECOMP_FLAGS_IN(); 3665 L_420058B2: 3666 ecx = MEM32(edi + 0x34); /* 0x420058B2: mov ecx, dword ptr [edi + 0x34] */ 3667 edx = MEM32(ebp + 0xC); /* 0x420058B5: mov edx, dword ptr [ebp + 0xc] */ 3668 eax = MEM32(ecx + edx + 0x8); /* 0x420058B8: mov eax, dword ptr [ecx + edx + 8] */ 3669 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 3670 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3671 esi = esi + 4; /* 0x420058BC: add esi, 4 */ 3672 _flag_k = FK_ADD; 3673 /* cmp esi, eax */ /* 0x420058BF: cmp esi, eax */ 3674 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 3675 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3676 _flag_k = FK_CMP; 3677 RECOMP_BACKEDGE(); 3678 if (CMP_NE(_flag_a, _flag_b)) goto L_42005832; /* 0x420058C1: jne 0x42005832 */ 3679 L_420058C7: 3680 eax = MEM32(ebp + (-0x10)); /* 0x420058C7: mov eax, dword ptr [ebp - 0x10] */ 3681 ecx = 0x42022F8Cu; /* 0x420058CA: mov ecx, 0x42022f8c */ 3682 /* cmp eax, ecx */ /* 0x420058CF: cmp eax, ecx */ 3683 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 3684 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3685 _flag_k = FK_CMP; 3686 MEM32(ebp + 0xC) = ecx; /* 0x420058D1: mov dword ptr [ebp + 0xc], ecx */ 3687 if (CMP_EQ(_flag_a, _flag_b)) goto L_420059A9; /* 0x420058D4: je 0x420059a9 */ 3688 L_420058DA: 3689 eax = MEM32(ecx); /* 0x420058DA: mov eax, dword ptr [ecx] */ 3690 /* cmp eax, MEM32(ebp + (-0x14)) */ /* 0x420058DC: cmp eax, dword ptr [ebp - 0x14] */ 3691 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ebp + (-0x14))); 3692 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3693 _flag_k = FK_CMP; 3694 if (CMP_EQ(_flag_a, _flag_b)) goto L_42005998; /* 0x420058DF: je 0x42005998 */ 3695 L_420058E5: 3696 edx = MEM32(edi + 0x34); /* 0x420058E5: mov edx, dword ptr [edi + 0x34] */ 3697 eax = eax + eax * 4; /* 0x420058E8: lea eax, [eax + eax*4] */ 3698 esi = MEM32(edx + eax * 8 + 0x4); /* 0x420058EB: mov esi, dword ptr [edx + eax*8 + 4] */ 3699 eax = edx + eax * 8; /* 0x420058EF: lea eax, [edx + eax*8] */ 3700 /* cmp esi, MEM32(eax + 0x8) */ /* 0x420058F2: cmp esi, dword ptr [eax + 8] */ 3701 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8)); 3702 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3703 _flag_k = FK_CMP; 3704 if (CMP_EQ(_flag_a, _flag_b)) goto L_42005998; /* 0x420058F5: je 0x42005998 */ 3705 L_420058FB: 3706 ecx = MEM32(esi); /* 0x420058FB: mov ecx, dword ptr [esi] */ 3707 eax = MEM32(ecx); /* 0x420058FD: mov eax, dword ptr [ecx] */ 3708 RECOMP_ICALL(MEM32(eax + 0xC)); /* 0x420058FF: call dword ptr [eax + 0xc] */ 3709 RECOMP_FLAGS_IN(); 3710 ecx = MEM32(eax); /* 0x42005902: mov ecx, dword ptr [eax] */ 3711 edx = MEM32(eax + 0x4); /* 0x42005904: mov edx, dword ptr [eax + 4] */ 3712 eax = MEM32(eax + 0x8); /* 0x42005907: mov eax, dword ptr [eax + 8] */ 3713 MEM32(ebp + (-0x24)) = ecx; /* 0x4200590A: mov dword ptr [ebp - 0x24], ecx */ 3714 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x4200590D: fld dword ptr [ebp - 0x24] */ 3715 _st[0] -= (double)*(float*)ADDR(ebx); /* 0x42005910: fsub dword ptr [ebx] */ 3716 MEM32(ebp + (-0x20)) = edx; /* 0x42005912: mov dword ptr [ebp - 0x20], edx */ 3717 MEM32(ebp + (-0x1C)) = eax; /* 0x42005915: mov dword ptr [ebp - 0x1c], eax */ 3718 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x42005918: fstp dword ptr [ebp - 0x24] */ 3719 ecx = MEM32(ebp + (-0x24)); /* 0x4200591B: mov ecx, dword ptr [ebp - 0x24] */ 3720 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x4200591E: fld dword ptr [ebp - 0x20] */ 3721 MEM32(ebp + (-0x30)) = ecx; /* 0x42005921: mov dword ptr [ebp - 0x30], ecx */ 3722 _st[0] -= (double)*(float*)ADDR(ebx + 0x4); /* 0x42005924: fsub dword ptr [ebx + 4] */ 3723 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x42005927: fstp dword ptr [ebp - 0x20] */ 3724 edx = MEM32(ebp + (-0x20)); /* 0x4200592A: mov edx, dword ptr [ebp - 0x20] */ 3725 fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x4200592D: fld dword ptr [ebp - 0x1c] */ 3726 MEM32(ebp + (-0x2C)) = edx; /* 0x42005930: mov dword ptr [ebp - 0x2c], edx */ 3727 _st[0] -= (double)*(float*)ADDR(ebx + 0x8); /* 0x42005933: fsub dword ptr [ebx + 8] */ 3728 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x1C)) = _v; } /* 0x42005936: fstp dword ptr [ebp - 0x1c] */ 3729 eax = MEM32(ebp + (-0x1C)); /* 0x42005939: mov eax, dword ptr [ebp - 0x1c] */ 3730 MEM32(ebp + (-0x28)) = eax; /* 0x4200593C: mov dword ptr [ebp - 0x28], eax */ 3731 SET_LO8(eax, MEM8(ebp + 0x14)); /* 0x4200593F: mov al, byte ptr [ebp + 0x14] */ 3732 /* test LO8(eax), LO8(eax) */ /* 0x42005942: test al, al */ 3733 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3734 _cf = 0; 3735 _flag_k = FK_NARROW(FK_TEST, 24); 3736 if (TEST_Z(_flag_a, _flag_b)) goto L_4200594E; /* 0x42005944: je 0x4200594e */ 3737 L_42005946: 3738 fp_push(*(float*)&MEM32(0x420180F8)); /* 0x42005946: fld dword ptr [0x420180f8] */ 3739 goto L_42005951; /* 0x4200594C: jmp 0x42005951 */ 3740 L_4200594E: 3741 fp_push(*(float*)&MEM32(ebp + (-0x2C))); /* 0x4200594E: fld dword ptr [ebp - 0x2c] */ 3742 L_42005951: 3743 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x42005951: fld dword ptr [ebp - 0x28] */ 3744 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x42005954: fmul dword ptr [ebp - 0x28] */ 3745 fp_push(*(float*)&MEM32(ebp + (-0x30))); /* 0x42005957: fld dword ptr [ebp - 0x30] */ 3746 _st[0] *= (double)*(float*)ADDR(ebp + (-0x30)); /* 0x4200595A: fmul dword ptr [ebp - 0x30] */ 3747 { double _v = fp_pop(); _st[0] += _v; } /* 0x4200595D: faddp st(1) */ 3748 fp_push(_st[1]); /* 0x4200595F: fld st(1) */ 3749 _st[0] *= _st[2]; /* 0x42005961: fmul st(2) */ 3750 { double _v = fp_pop(); _st[0] += _v; } /* 0x42005963: faddp st(1) */ 3751 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0x8)); /* 0x42005965: fcomp dword ptr [ebp + 8] */ 3752 fp_pop(); 3753 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x42005968: fnstsw ax */ 3754 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x4200596A: fstp st(0) */ 3755 /* test HI8(eax), 1 */ /* 0x4200596C: test ah, 1 */ 3756 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 3757 _cf = 0; 3758 _flag_k = FK_NARROW(FK_TEST, 24); 3759 if (TEST_Z(_flag_a, _flag_b)) goto L_4200597B; /* 0x4200596F: je 0x4200597b */ 3760 L_42005971: 3761 ecx = MEM32(ebp + 0x10); /* 0x42005971: mov ecx, dword ptr [ebp + 0x10] */ 3762 eax = MEM32(esi); /* 0x42005974: mov eax, dword ptr [esi] */ 3763 edx = MEM32(ecx); /* 0x42005976: mov edx, dword ptr [ecx] */ 3764 PUSH32(esp, eax); /* 0x42005978: push eax */ 3765 RECOMP_ICALL(MEM32(edx)); /* 0x42005979: call dword ptr [edx] */ 3766 RECOMP_FLAGS_IN(); 3767 L_4200597B: 3768 ecx = MEM32(ebp + 0xC); /* 0x4200597B: mov ecx, dword ptr [ebp + 0xc] */ 3769 eax = MEM32(ecx); /* 0x4200597E: mov eax, dword ptr [ecx] */ 3770 edx = eax + eax * 4; /* 0x42005980: lea edx, [eax + eax*4] */ 3771 eax = MEM32(edi + 0x34); /* 0x42005983: mov eax, dword ptr [edi + 0x34] */ 3772 ecx = MEM32(eax + edx * 8 + 0x8); /* 0x42005986: mov ecx, dword ptr [eax + edx*8 + 8] */ 3773 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 3774 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3775 esi = esi + 4; /* 0x4200598A: add esi, 4 */ 3776 _flag_k = FK_ADD; 3777 /* cmp esi, ecx */ /* 0x4200598D: cmp esi, ecx */ 3778 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 3779 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3780 _flag_k = FK_CMP; 3781 RECOMP_BACKEDGE(); 3782 if (CMP_NE(_flag_a, _flag_b)) goto L_420058FB; /* 0x4200598F: jne 0x420058fb */ 3783 L_42005995: 3784 ecx = MEM32(ebp + 0xC); /* 0x42005995: mov ecx, dword ptr [ebp + 0xc] */ 3785 L_42005998: 3786 eax = MEM32(ebp + (-0x10)); /* 0x42005998: mov eax, dword ptr [ebp - 0x10] */ 3787 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 3788 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3789 ecx = ecx + 4; /* 0x4200599B: add ecx, 4 */ 3790 _flag_k = FK_ADD; 3791 /* cmp ecx, eax */ /* 0x4200599E: cmp ecx, eax */ 3792 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 3793 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3794 _flag_k = FK_CMP; 3795 MEM32(ebp + 0xC) = ecx; /* 0x420059A0: mov dword ptr [ebp + 0xc], ecx */ 3796 RECOMP_BACKEDGE(); 3797 if (CMP_NE(_flag_a, _flag_b)) goto L_420058DA; /* 0x420059A3: jne 0x420058da */ 3798 L_420059A9: 3799 ecx = edi; /* 0x420059A9: mov ecx, edi */ 3800 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x420059AB: mov dword ptr [ebp - 4], 0xffffffff */ 3801 RECOMP_ICALL(0x42004870u); /* 0x420059B2: call 0x42004870 */ /* not lifted */ 3802 RECOMP_FLAGS_IN(); 3803 ecx = edi; /* 0x420059B7: mov ecx, edi */ 3804 RECOMP_ICALL(0x420048E0u); /* 0x420059B9: call 0x420048e0 */ /* not lifted */ 3805 RECOMP_FLAGS_IN(); 3806 ecx = MEM32(ebp + (-0xC)); /* 0x420059BE: mov ecx, dword ptr [ebp - 0xc] */ 3807 edi = POP32_VAL(esp); /* 0x420059C1: pop edi */ 3808 esi = POP32_VAL(esp); /* 0x420059C2: pop esi */ 3809 ebx = POP32_VAL(esp); /* 0x420059C3: pop ebx */ 3810 MEM32(FS_BASE + (0)) = ecx; /* 0x420059C4: mov dword ptr fs:[0], ecx */ 3811 esp = ebp; /* 0x420059CB: mov esp, ebp */ 3812 ebp = POP32_VAL(esp); /* 0x420059CD: pop ebp */ 3813 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x420059CE: ret 0x10 */ 3814 RECOMP_REGS_OUT(); 3815 } 3816 3817 void sub_420059E0(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(0x420059E0u); 3826 3827 L_420059E0: 3828 PUSH32(esp, ebp); /* 0x420059E0: push ebp */ 3829 ebp = esp; /* 0x420059E1: mov ebp, esp */ 3830 PUSH32(esp, 0xFFFFFFFFu); /* 0x420059E3: push -1 */ 3831 PUSH32(esp, 0x42017358u); /* 0x420059E5: push 0x42017358 */ 3832 eax = MEM32(FS_BASE + (0)); /* 0x420059EA: mov eax, dword ptr fs:[0] */ 3833 PUSH32(esp, eax); /* 0x420059F0: push eax */ 3834 MEM32(FS_BASE + (0)) = esp; /* 0x420059F1: mov dword ptr fs:[0], esp */ 3835 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x40u); 3836 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3837 esp = esp - 0x40u; /* 0x420059F8: sub esp, 0x40 */ 3838 _flag_k = FK_CMP; 3839 PUSH32(esp, ebx); /* 0x420059FB: push ebx */ 3840 PUSH32(esp, esi); /* 0x420059FC: push esi */ 3841 esi = ecx; /* 0x420059FD: mov esi, ecx */ 3842 PUSH32(esp, edi); /* 0x420059FF: push edi */ 3843 MEM32(ebp + (-0x34)) = esi; /* 0x42005A00: mov dword ptr [ebp - 0x34], esi */ 3844 RECOMP_ICALL(0x42004850u); /* 0x42005A03: call 0x42004850 */ /* not lifted */ 3845 RECOMP_FLAGS_IN(); 3846 eax = MEM32(ebp + 0x8); /* 0x42005A08: mov eax, dword ptr [ebp + 8] */ 3847 ecx = MEM32(eax); /* 0x42005A0B: mov ecx, dword ptr [eax] */ 3848 edx = MEM32(eax + 0x4); /* 0x42005A0D: mov edx, dword ptr [eax + 4] */ 3849 eax = MEM32(eax + 0x8); /* 0x42005A10: mov eax, dword ptr [eax + 8] */ 3850 MEM32(ebp + (-0x40)) = ecx; /* 0x42005A13: mov dword ptr [ebp - 0x40], ecx */ 3851 ecx = MEM32(ebp + 0xC); /* 0x42005A16: mov ecx, dword ptr [ebp + 0xc] */ 3852 MEM32(ebp + (-0x3C)) = edx; /* 0x42005A19: mov dword ptr [ebp - 0x3c], edx */ 3853 edx = MEM32(ecx); /* 0x42005A1C: mov edx, dword ptr [ecx] */ 3854 MEM32(ebp + (-0x38)) = eax; /* 0x42005A1E: mov dword ptr [ebp - 0x38], eax */ 3855 eax = MEM32(ecx + 0x4); /* 0x42005A21: mov eax, dword ptr [ecx + 4] */ 3856 ecx = MEM32(ecx + 0x8); /* 0x42005A24: mov ecx, dword ptr [ecx + 8] */ 3857 MEM32(ebp + (-0x48)) = eax; /* 0x42005A27: mov dword ptr [ebp - 0x48], eax */ 3858 eax = ebp + (-0x40); /* 0x42005A2A: lea eax, [ebp - 0x40] */ 3859 PUSH32(esp, eax); /* 0x42005A2D: push eax */ 3860 MEM32(ebp + (-0x4C)) = edx; /* 0x42005A2E: mov dword ptr [ebp - 0x4c], edx */ 3861 edx = MEM32(esi); /* 0x42005A31: mov edx, dword ptr [esi] */ 3862 MEM32(ebp + (-0x44)) = ecx; /* 0x42005A33: mov dword ptr [ebp - 0x44], ecx */ 3863 PUSH32(esp, 0xFFFFFFFFu); /* 0x42005A36: push -1 */ 3864 ecx = esi; /* 0x42005A38: mov ecx, esi */ 3865 MEM32(ebp + (-0x4)) = 0; /* 0x42005A3A: mov dword ptr [ebp - 4], 0 */ 3866 RECOMP_ICALL(MEM32(edx + 0x70)); /* 0x42005A41: call dword ptr [edx + 0x70] */ 3867 RECOMP_FLAGS_IN(); 3868 edx = MEM32(esi); /* 0x42005A44: mov edx, dword ptr [esi] */ 3869 edi = eax; /* 0x42005A46: mov edi, eax */ 3870 eax = ebp + (-0x4C); /* 0x42005A48: lea eax, [ebp - 0x4c] */ 3871 PUSH32(esp, eax); /* 0x42005A4B: push eax */ 3872 PUSH32(esp, 0xFFFFFFFFu); /* 0x42005A4C: push -1 */ 3873 ecx = esi; /* 0x42005A4E: mov ecx, esi */ 3874 RECOMP_ICALL(MEM32(edx + 0x70)); /* 0x42005A50: call dword ptr [edx + 0x70] */ 3875 RECOMP_FLAGS_IN(); 3876 fp_push(*(float*)&MEM32(ebp + (-0x40))); /* 0x42005A53: fld dword ptr [ebp - 0x40] */ 3877 ecx = MEM32(esi + 0x24); /* 0x42005A56: mov ecx, dword ptr [esi + 0x24] */ 3878 _st[0] /= (double)*(float*)ADDR(esi + 0x2C); /* 0x42005A59: fdiv dword ptr [esi + 0x2c] */ 3879 ebx = eax; /* 0x42005A5C: mov ebx, eax */ 3880 eax = edi; /* 0x42005A5E: mov eax, edi */ 3881 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x42005A60: cdq */ 3882 { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)ecx; /* 0x42005A61: idiv ecx */ 3883 if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); } 3884 else { eax = 0; edx = 0; } } 3885 eax = edi; /* 0x42005A63: mov eax, edi */ 3886 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x42005A65: fst dword ptr [ebp - 0x20] */ 3887 fp_push(*(float*)&MEM32(ebp + (-0x38))); /* 0x42005A68: fld dword ptr [ebp - 0x38] */ 3888 _st[0] /= (double)*(float*)ADDR(esi + 0x2C); /* 0x42005A6B: fdiv dword ptr [esi + 0x2c] */ 3889 MEM32(ebp + (-0x2C)) = edx; /* 0x42005A6E: mov dword ptr [ebp - 0x2c], edx */ 3890 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x42005A71: cdq */ 3891 { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)ecx; /* 0x42005A72: idiv ecx */ 3892 if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); } 3893 else { eax = 0; edx = 0; } } 3894 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x42005A74: fstp dword ptr [ebp + 0xc] */ 3895 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x42005A77: fld dword ptr [ebp - 0x4c] */ 3896 _st[0] /= (double)*(float*)ADDR(esi + 0x2C); /* 0x42005A7A: fdiv dword ptr [esi + 0x2c] */ 3897 edi = eax; /* 0x42005A7D: mov edi, eax */ 3898 eax = ebx; /* 0x42005A7F: mov eax, ebx */ 3899 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x42005A81: cdq */ 3900 { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)ecx; /* 0x42005A82: idiv ecx */ 3901 if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); } 3902 else { eax = 0; edx = 0; } } 3903 fp_push(*(float*)&MEM32(ebp + (-0x44))); /* 0x42005A84: fld dword ptr [ebp - 0x44] */ 3904 _st[0] /= (double)*(float*)ADDR(esi + 0x2C); /* 0x42005A87: fdiv dword ptr [esi + 0x2c] */ 3905 eax = ebx; /* 0x42005A8A: mov eax, ebx */ 3906 ebx = 1; /* 0x42005A8C: mov ebx, 1 */ 3907 MEM32(ebp + (-0x28)) = edx; /* 0x42005A91: mov dword ptr [ebp - 0x28], edx */ 3908 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x42005A94: cdq */ 3909 { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)ecx; /* 0x42005A95: idiv ecx */ 3910 if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); } 3911 else { eax = 0; edx = 0; } } 3912 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x42005A97: fstp dword ptr [ebp + 8] */ 3913 _st[0] -= _st[1]; /* 0x42005A9A: fsub st(1) */ 3914 fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x42005A9C: fld dword ptr [ebp + 8] */ 3915 _st[0] -= (double)*(float*)ADDR(ebp + 0xC); /* 0x42005A9F: fsub dword ptr [ebp + 0xc] */ 3916 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x42005AA2: fstp dword ptr [ebp + 8] */ 3917 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x420180F8)); /* 0x42005AA5: fcom dword ptr [0x420180f8] */ 3918 MEM32(ebp + (-0x30)) = eax; /* 0x42005AAB: mov dword ptr [ebp - 0x30], eax */ 3919 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x42005AAE: fnstsw ax */ 3920 /* test LO8(ebx), HI8(eax) */ /* 0x42005AB0: test bl, ah */ 3921 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(HI8(eax)) << 24; 3922 _cf = 0; 3923 _flag_k = FK_NARROW(FK_TEST, 24); 3924 if (TEST_NZ(_flag_a, _flag_b)) goto L_42005ADE; /* 0x42005AB2: jne 0x42005ade */ 3925 L_42005AB4: 3926 fp_push(*(float*)&MEM32(0x42018430)); /* 0x42005AB4: fld dword ptr [0x42018430] */ 3927 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3928 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3929 esp = esp - 8; /* 0x42005ABA: sub esp, 8 */ 3930 _flag_k = FK_CMP; 3931 _st[0] /= _st[1]; /* 0x42005ABD: fdiv st(1) */ 3932 MEM32(ebp + (-0x18)) = ebx; /* 0x42005ABF: mov dword ptr [ebp - 0x18], ebx */ 3933 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x42005AC2: fstp dword ptr [ebp - 0x10] */ 3934 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x42005AC5: fstp st(0) */ 3935 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x42005AC7: fstp qword ptr [esp] */ 3936 RECOMP_ICALL(MEM32(0x42018054)); /* 0x42005ACA: call dword ptr [0x42018054] */ 3937 RECOMP_FLAGS_IN(); 3938 _st[0] += *(double*)ADDR(0x42018428); /* 0x42005AD0: fadd qword ptr [0x42018428] */ 3939 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3940 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3941 esp = esp + 8; /* 0x42005AD6: add esp, 8 */ 3942 _flag_k = FK_ADD; 3943 _st[0] -= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x42005AD9: fsub dword ptr [ebp - 0x20] */ 3944 goto L_42005B09; /* 0x42005ADC: jmp 0x42005b09 */ 3945 L_42005ADE: 3946 fp_push(*(float*)&MEM32(0x42018420)); /* 0x42005ADE: fld dword ptr [0x42018420] */ 3947 MEM32(ebp + (-0x18)) = 0xFFFFFFFFu; /* 0x42005AE4: mov dword ptr [ebp - 0x18], 0xffffffff */ 3948 _st[0] /= _st[1]; /* 0x42005AEB: fdiv st(1) */ 3949 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x42005AED: fstp dword ptr [ebp - 0x10] */ 3950 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x42005AF0: fstp st(0) */ 3951 { double _v = fp_pop(); *(double*)ADDR(ebp + (-0x24)) = _v; } /* 0x42005AF2: fstp qword ptr [ebp - 0x24] */ 3952 ecx = MEM32(ebp + (-0x20)); /* 0x42005AF5: mov ecx, dword ptr [ebp - 0x20] */ 3953 edx = MEM32(ebp + (-0x24)); /* 0x42005AF8: mov edx, dword ptr [ebp - 0x24] */ 3954 PUSH32(esp, ecx); /* 0x42005AFB: push ecx */ 3955 PUSH32(esp, edx); /* 0x42005AFC: push edx */ 3956 RECOMP_ICALL(MEM32(0x42018054)); /* 0x42005AFD: call dword ptr [0x42018054] */ 3957 RECOMP_FLAGS_IN(); 3958 _st[0] = *(double*)ADDR(ebp + (-0x24)) - _st[0]; /* 0x42005B03: fsubr qword ptr [ebp - 0x24] */ 3959 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3960 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3961 esp = esp + 8; /* 0x42005B06: add esp, 8 */ 3962 _flag_k = FK_ADD; 3963 L_42005B09: 3964 _st[0] *= (double)*(float*)ADDR(ebp + (-0x10)); /* 0x42005B09: fmul dword ptr [ebp - 0x10] */ 3965 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x42005B0C: fstp dword ptr [ebp - 0x14] */ 3966 fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x42005B0F: fld dword ptr [ebp + 8] */ 3967 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x420180F8)); /* 0x42005B12: fcomp dword ptr [0x420180f8] */ 3968 fp_pop(); 3969 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x42005B18: fnstsw ax */ 3970 /* test HI8(eax), 1 */ /* 0x42005B1A: test ah, 1 */ 3971 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 3972 _cf = 0; 3973 _flag_k = FK_NARROW(FK_TEST, 24); 3974 if (TEST_NZ(_flag_a, _flag_b)) goto L_42005B4B; /* 0x42005B1D: jne 0x42005b4b */ 3975 L_42005B1F: 3976 fp_push(*(float*)&MEM32(0x42018430)); /* 0x42005B1F: fld dword ptr [0x42018430] */ 3977 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3978 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3979 esp = esp - 8; /* 0x42005B25: sub esp, 8 */ 3980 _flag_k = FK_CMP; 3981 _st[0] /= (double)*(float*)ADDR(ebp + 0x8); /* 0x42005B28: fdiv dword ptr [ebp + 8] */ 3982 MEM32(ebp + (-0x1C)) = ebx; /* 0x42005B2B: mov dword ptr [ebp - 0x1c], ebx */ 3983 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x42005B2E: fstp dword ptr [ebp + 8] */ 3984 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x42005B31: fld dword ptr [ebp + 0xc] */ 3985 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x42005B34: fstp qword ptr [esp] */ 3986 RECOMP_ICALL(MEM32(0x42018054)); /* 0x42005B37: call dword ptr [0x42018054] */ 3987 RECOMP_FLAGS_IN(); 3988 _st[0] += *(double*)ADDR(0x42018428); /* 0x42005B3D: fadd qword ptr [0x42018428] */ 3989 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3990 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3991 esp = esp + 8; /* 0x42005B43: add esp, 8 */ 3992 _flag_k = FK_ADD; 3993 _st[0] -= (double)*(float*)ADDR(ebp + 0xC); /* 0x42005B46: fsub dword ptr [ebp + 0xc] */ 3994 goto L_42005B78; /* 0x42005B49: jmp 0x42005b78 */ 3995 L_42005B4B: 3996 fp_push(*(float*)&MEM32(0x42018420)); /* 0x42005B4B: fld dword ptr [0x42018420] */ 3997 MEM32(ebp + (-0x1C)) = 0xFFFFFFFFu; /* 0x42005B51: mov dword ptr [ebp - 0x1c], 0xffffffff */ 3998 _st[0] /= (double)*(float*)ADDR(ebp + 0x8); /* 0x42005B58: fdiv dword ptr [ebp + 8] */ 3999 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x42005B5B: fstp dword ptr [ebp + 8] */ 4000 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x42005B5E: fld dword ptr [ebp + 0xc] */ 4001 { double _v = fp_pop(); *(double*)ADDR(ebp + (-0x24)) = _v; } /* 0x42005B61: fstp qword ptr [ebp - 0x24] */ 4002 eax = MEM32(ebp + (-0x20)); /* 0x42005B64: mov eax, dword ptr [ebp - 0x20] */ 4003 ecx = MEM32(ebp + (-0x24)); /* 0x42005B67: mov ecx, dword ptr [ebp - 0x24] */ 4004 PUSH32(esp, eax); /* 0x42005B6A: push eax */ 4005 PUSH32(esp, ecx); /* 0x42005B6B: push ecx */ 4006 RECOMP_ICALL(MEM32(0x42018054)); /* 0x42005B6C: call dword ptr [0x42018054] */ 4007 RECOMP_FLAGS_IN(); 4008 _st[0] = *(double*)ADDR(ebp + (-0x24)) - _st[0]; /* 0x42005B72: fsubr qword ptr [ebp - 0x24] */ 4009 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4010 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4011 esp = esp + 8; /* 0x42005B75: add esp, 8 */ 4012 _flag_k = FK_ADD; 4013 L_42005B78: 4014 eax = MEM32(ebp + (-0x28)); /* 0x42005B78: mov eax, dword ptr [ebp - 0x28] */ 4015 ebx = MEM32(ebp + (-0x2C)); /* 0x42005B7B: mov ebx, dword ptr [ebp - 0x2c] */ 4016 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 4017 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4018 eax = eax - ebx; /* 0x42005B7E: sub eax, ebx */ 4019 _flag_k = FK_CMP; 4020 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x42005B80: cdq */ 4021 ecx = eax; /* 0x42005B81: mov ecx, eax */ 4022 eax = MEM32(ebp + (-0x30)); /* 0x42005B83: mov eax, dword ptr [ebp - 0x30] */ 4023 _flag_a = (uint32_t)((ecx ^ edx)); _flag_b = (uint32_t)((ecx ^ edx)); 4024 ecx = ecx ^ edx; /* 0x42005B86: xor ecx, edx */ 4025 _cf = 0; 4026 _flag_k = FK_TEST; 4027 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 4028 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4029 eax = eax - edi; /* 0x42005B88: sub eax, edi */ 4030 _flag_k = FK_CMP; 4031 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 4032 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4033 ecx = ecx - edx; /* 0x42005B8A: sub ecx, edx */ 4034 _flag_k = FK_CMP; 4035 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x42005B8C: cdq */ 4036 _flag_a = (uint32_t)((eax ^ edx)); _flag_b = (uint32_t)((eax ^ edx)); 4037 eax = eax ^ edx; /* 0x42005B8D: xor eax, edx */ 4038 _cf = 0; 4039 _flag_k = FK_TEST; 4040 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 4041 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4042 eax = eax - edx; /* 0x42005B8F: sub eax, edx */ 4043 _flag_k = FK_CMP; 4044 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 4045 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4046 ecx = ecx + eax; /* 0x42005B91: add ecx, eax */ 4047 _flag_k = FK_ADD; 4048 _st[0] *= (double)*(float*)ADDR(ebp + 0x8); /* 0x42005B93: fmul dword ptr [ebp + 8] */ 4049 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x42005B96: fstp dword ptr [ebp + 0xc] */ 4050 if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_S)) goto L_42005BDF; /* 0x42005B99: js 0x42005bdf */ 4051 L_42005B9B: 4052 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4053 ecx = ecx + 1; /* 0x42005B9B: inc ecx */ 4054 _flag_k = FK_INC; 4055 MEM32(ebp + (-0x20)) = ecx; /* 0x42005B9C: mov dword ptr [ebp - 0x20], ecx */ 4056 L_42005B9F: 4057 ecx = MEM32(ebp + 0x10); /* 0x42005B9F: mov ecx, dword ptr [ebp + 0x10] */ 4058 edx = MEM32(ecx); /* 0x42005BA2: mov edx, dword ptr [ecx] */ 4059 eax = edi; /* 0x42005BA4: mov eax, edi */ 4060 eax = (uint32_t)((int32_t)eax * (int32_t)MEM32(esi + 0x24)); /* 0x42005BA6: imul eax, dword ptr [esi + 0x24] */ 4061 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 4062 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4063 eax = eax + ebx; /* 0x42005BAA: add eax, ebx */ 4064 _flag_k = FK_ADD; 4065 PUSH32(esp, eax); /* 0x42005BAC: push eax */ 4066 RECOMP_ICALL(MEM32(edx)); /* 0x42005BAD: call dword ptr [edx] */ 4067 RECOMP_FLAGS_IN(); 4068 fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x42005BAF: fld dword ptr [ebp - 0x14] */ 4069 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0xC)); /* 0x42005BB2: fcomp dword ptr [ebp + 0xc] */ 4070 fp_pop(); 4071 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x42005BB5: fnstsw ax */ 4072 /* test HI8(eax), 1 */ /* 0x42005BB7: test ah, 1 */ 4073 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 4074 _cf = 0; 4075 _flag_k = FK_NARROW(FK_TEST, 24); 4076 if (TEST_Z(_flag_a, _flag_b)) goto L_42005BCC; /* 0x42005BBA: je 0x42005bcc */ 4077 L_42005BBC: 4078 fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x42005BBC: fld dword ptr [ebp - 0x14] */ 4079 eax = MEM32(ebp + (-0x18)); /* 0x42005BBF: mov eax, dword ptr [ebp - 0x18] */ 4080 _st[0] += (double)*(float*)ADDR(ebp + (-0x10)); /* 0x42005BC2: fadd dword ptr [ebp - 0x10] */ 4081 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 4082 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4083 ebx = ebx + eax; /* 0x42005BC5: add ebx, eax */ 4084 _flag_k = FK_ADD; 4085 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x42005BC7: fstp dword ptr [ebp - 0x14] */ 4086 goto L_42005BDA; /* 0x42005BCA: jmp 0x42005bda */ 4087 L_42005BCC: 4088 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x42005BCC: fld dword ptr [ebp + 0xc] */ 4089 eax = MEM32(ebp + (-0x1C)); /* 0x42005BCF: mov eax, dword ptr [ebp - 0x1c] */ 4090 _st[0] += (double)*(float*)ADDR(ebp + 0x8); /* 0x42005BD2: fadd dword ptr [ebp + 8] */ 4091 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 4092 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4093 edi = edi + eax; /* 0x42005BD5: add edi, eax */ 4094 _flag_k = FK_ADD; 4095 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x42005BD7: fstp dword ptr [ebp + 0xc] */ 4096 L_42005BDA: 4097 _flag_a = (uint32_t)(MEM32(ebp + (-0x20))); _flag_b = (uint32_t)(1); 4098 MEM32(ebp + (-0x20)) = MEM32(ebp + (-0x20)) - 1; /* 0x42005BDA: dec dword ptr [ebp - 0x20] */ 4099 _flag_k = FK_DEC; 4100 RECOMP_BACKEDGE(); 4101 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_42005B9F; /* 0x42005BDD: jne 0x42005b9f */ 4102 L_42005BDF: 4103 ecx = esi; /* 0x42005BDF: mov ecx, esi */ 4104 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x42005BE1: mov dword ptr [ebp - 4], 0xffffffff */ 4105 RECOMP_ICALL(0x42004870u); /* 0x42005BE8: call 0x42004870 */ /* not lifted */ 4106 RECOMP_FLAGS_IN(); 4107 ecx = esi; /* 0x42005BED: mov ecx, esi */ 4108 RECOMP_ICALL(0x420048E0u); /* 0x42005BEF: call 0x420048e0 */ /* not lifted */ 4109 RECOMP_FLAGS_IN(); 4110 ecx = MEM32(ebp + (-0xC)); /* 0x42005BF4: mov ecx, dword ptr [ebp - 0xc] */ 4111 edi = POP32_VAL(esp); /* 0x42005BF7: pop edi */ 4112 esi = POP32_VAL(esp); /* 0x42005BF8: pop esi */ 4113 ebx = POP32_VAL(esp); /* 0x42005BF9: pop ebx */ 4114 MEM32(FS_BASE + (0)) = ecx; /* 0x42005BFA: mov dword ptr fs:[0], ecx */ 4115 esp = ebp; /* 0x42005C01: mov esp, ebp */ 4116 ebp = POP32_VAL(esp); /* 0x42005C03: pop ebp */ 4117 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x42005C04: ret 0xc */ 4118 RECOMP_REGS_OUT(); 4119 } 4120 4121 void sub_42005C10(void) { 4122 int _fpu_cmp = 0; 4123 uint32_t _cf = 0; 4124 int _df = 1; 4125 uint32_t _flag_k = FK_NONE; 4126 uint32_t _flag_a = 0, _flag_b = 0; 4127 uint32_t _itail_tgt = 0; 4128 RECOMP_REGS_LOCALS 4129 RECOMP_ENTER(0x42005C10u); 4130 4131 L_42005C10: 4132 PUSH32(esp, ebp); /* 0x42005C10: push ebp */ 4133 ebp = esp; /* 0x42005C11: mov ebp, esp */ 4134 PUSH32(esp, ebx); /* 0x42005C13: push ebx */ 4135 PUSH32(esp, edi); /* 0x42005C14: push edi */ 4136 edi = ecx; /* 0x42005C15: mov edi, ecx */ 4137 eax = MEM32(edi + 0x28); /* 0x42005C17: mov eax, dword ptr [edi + 0x28] */ 4138 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4139 ebx = 0; /* 0x42005C1A: xor ebx, ebx */ 4140 _cf = 0; 4141 _flag_k = FK_TEST; 4142 /* test eax, eax */ /* 0x42005C1C: test eax, eax */ 4143 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4144 _cf = 0; 4145 _flag_k = FK_TEST; 4146 if (TEST_LE(_flag_a, _flag_b)) goto L_42005C65; /* 0x42005C1E: jle 0x42005c65 */ 4147 L_42005C20: 4148 PUSH32(esp, esi); /* 0x42005C20: push esi */ 4149 L_42005C21: 4150 eax = MEM32(edi + 0x24); /* 0x42005C21: mov eax, dword ptr [edi + 0x24] */ 4151 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4152 esi = 0; /* 0x42005C24: xor esi, esi */ 4153 _cf = 0; 4154 _flag_k = FK_TEST; 4155 /* test eax, eax */ /* 0x42005C26: test eax, eax */ 4156 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4157 _cf = 0; 4158 _flag_k = FK_TEST; 4159 if (TEST_LE(_flag_a, _flag_b)) goto L_42005C5C; /* 0x42005C28: jle 0x42005c5c */ 4160 L_42005C2A: 4161 edx = MEM32(edi + 0x34); /* 0x42005C2A: mov edx, dword ptr [edi + 0x34] */ 4162 eax = (uint32_t)((int32_t)eax * (int32_t)ebx); /* 0x42005C2D: imul eax, ebx */ 4163 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 4164 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4165 eax = eax + esi; /* 0x42005C30: add eax, esi */ 4166 _flag_k = FK_ADD; 4167 ecx = eax + eax * 4; /* 0x42005C32: lea ecx, [eax + eax*4] */ 4168 ecx = edx + ecx * 8; /* 0x42005C35: lea ecx, [edx + ecx*8] */ 4169 edx = MEM32(ecx + 0x4); /* 0x42005C38: mov edx, dword ptr [ecx + 4] */ 4170 /* test edx, edx */ /* 0x42005C3B: test edx, edx */ 4171 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 4172 _cf = 0; 4173 _flag_k = FK_TEST; 4174 if (TEST_Z(_flag_a, _flag_b)) goto L_42005C54; /* 0x42005C3D: je 0x42005c54 */ 4175 L_42005C3F: 4176 ecx = MEM32(ecx + 0x8); /* 0x42005C3F: mov ecx, dword ptr [ecx + 8] */ 4177 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 4178 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4179 ecx = ecx - edx; /* 0x42005C42: sub ecx, edx */ 4180 _flag_k = FK_CMP; 4181 /* test ecx, 0xFFFFFFFCu */ /* 0x42005C44: test ecx, 0xfffffffc */ 4182 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xFFFFFFFCu); 4183 _cf = 0; 4184 _flag_k = FK_TEST; 4185 if (TEST_Z(_flag_a, _flag_b)) goto L_42005C54; /* 0x42005C4A: je 0x42005c54 */ 4186 L_42005C4C: 4187 ecx = MEM32(ebp + 0x8); /* 0x42005C4C: mov ecx, dword ptr [ebp + 8] */ 4188 edx = MEM32(ecx); /* 0x42005C4F: mov edx, dword ptr [ecx] */ 4189 PUSH32(esp, eax); /* 0x42005C51: push eax */ 4190 RECOMP_ICALL(MEM32(edx)); /* 0x42005C52: call dword ptr [edx] */ 4191 RECOMP_FLAGS_IN(); 4192 L_42005C54: 4193 eax = MEM32(edi + 0x24); /* 0x42005C54: mov eax, dword ptr [edi + 0x24] */ 4194 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 4195 esi = esi + 1; /* 0x42005C57: inc esi */ 4196 _flag_k = FK_INC; 4197 /* cmp esi, eax */ /* 0x42005C58: cmp esi, eax */ 4198 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 4199 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4200 _flag_k = FK_CMP; 4201 RECOMP_BACKEDGE(); 4202 if (CMP_L(_flag_a, _flag_b)) goto L_42005C2A; /* 0x42005C5A: jl 0x42005c2a */ 4203 L_42005C5C: 4204 eax = MEM32(edi + 0x28); /* 0x42005C5C: mov eax, dword ptr [edi + 0x28] */ 4205 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(1); 4206 ebx = ebx + 1; /* 0x42005C5F: inc ebx */ 4207 _flag_k = FK_INC; 4208 /* cmp ebx, eax */ /* 0x42005C60: cmp ebx, eax */ 4209 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 4210 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4211 _flag_k = FK_CMP; 4212 RECOMP_BACKEDGE(); 4213 if (CMP_L(_flag_a, _flag_b)) goto L_42005C21; /* 0x42005C62: jl 0x42005c21 */ 4214 L_42005C64: 4215 esi = POP32_VAL(esp); /* 0x42005C64: pop esi */ 4216 L_42005C65: 4217 edi = POP32_VAL(esp); /* 0x42005C65: pop edi */ 4218 ebx = POP32_VAL(esp); /* 0x42005C66: pop ebx */ 4219 ebp = POP32_VAL(esp); /* 0x42005C67: pop ebp */ 4220 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42005C68: ret 4 */ 4221 RECOMP_REGS_OUT(); 4222 } 4223 4224 void sub_42005C70(void) { 4225 int _fpu_cmp = 0; 4226 uint32_t _cf = 0; 4227 int _df = 1; 4228 uint32_t _flag_k = FK_NONE; 4229 uint32_t _flag_a = 0, _flag_b = 0; 4230 uint32_t _itail_tgt = 0; 4231 RECOMP_REGS_LOCALS 4232 RECOMP_ENTER(0x42005C70u); 4233 4234 L_42005C70: 4235 PUSH32(esp, ebp); /* 0x42005C70: push ebp */ 4236 ebp = esp; /* 0x42005C71: mov ebp, esp */ 4237 eax = MEM32(ebp + 0xC); /* 0x42005C73: mov eax, dword ptr [ebp + 0xc] */ 4238 edx = MEM32(eax); /* 0x42005C76: mov edx, dword ptr [eax] */ 4239 PUSH32(esp, esi); /* 0x42005C78: push esi */ 4240 esi = ecx; /* 0x42005C79: mov esi, ecx */ 4241 ecx = MEM32(eax + 0x4); /* 0x42005C7B: mov ecx, dword ptr [eax + 4] */ 4242 PUSH32(esp, edi); /* 0x42005C7E: push edi */ 4243 edi = MEM32(eax); /* 0x42005C7F: mov edi, dword ptr [eax] */ 4244 MEM32(ecx) = edx; /* 0x42005C81: mov dword ptr [ecx], edx */ 4245 ecx = MEM32(eax); /* 0x42005C83: mov ecx, dword ptr [eax] */ 4246 edx = MEM32(eax + 0x4); /* 0x42005C85: mov edx, dword ptr [eax + 4] */ 4247 PUSH32(esp, eax); /* 0x42005C88: push eax */ 4248 MEM32(ecx + 0x4) = edx; /* 0x42005C89: mov dword ptr [ecx + 4], edx */ 4249 RECOMP_ICALL(0x42016DD0u); /* 0x42005C8C: call 0x42016dd0 */ /* not lifted */ 4250 RECOMP_FLAGS_IN(); 4251 eax = MEM32(esi + 0x8); /* 0x42005C91: mov eax, dword ptr [esi + 8] */ 4252 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4253 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4254 esp = esp + 4; /* 0x42005C94: add esp, 4 */ 4255 _flag_k = FK_ADD; 4256 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 4257 eax = eax - 1; /* 0x42005C97: dec eax */ 4258 _flag_k = FK_DEC; 4259 MEM32(esi + 0x8) = eax; /* 0x42005C98: mov dword ptr [esi + 8], eax */ 4260 eax = MEM32(ebp + 0x8); /* 0x42005C9B: mov eax, dword ptr [ebp + 8] */ 4261 MEM32(eax) = edi; /* 0x42005C9E: mov dword ptr [eax], edi */ 4262 edi = POP32_VAL(esp); /* 0x42005CA0: pop edi */ 4263 esi = POP32_VAL(esp); /* 0x42005CA1: pop esi */ 4264 ebp = POP32_VAL(esp); /* 0x42005CA2: pop ebp */ 4265 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x42005CA3: ret 8 */ 4266 RECOMP_REGS_OUT(); 4267 } 4268 4269 void sub_42005CB0(void) { 4270 int _fpu_cmp = 0; 4271 uint32_t _cf = 0; 4272 int _df = 1; 4273 uint32_t _flag_k = FK_NONE; 4274 uint32_t _flag_a = 0, _flag_b = 0; 4275 uint32_t _itail_tgt = 0; 4276 RECOMP_REGS_LOCALS 4277 RECOMP_ENTER(0x42005CB0u); 4278 4279 L_42005CB0: 4280 PUSH32(esp, ebp); /* 0x42005CB0: push ebp */ 4281 ebp = esp; /* 0x42005CB1: mov ebp, esp */ 4282 ecx = MEM32(ebp + 0x8); /* 0x42005CB3: mov ecx, dword ptr [ebp + 8] */ 4283 edx = MEM32(ebp + 0xC); /* 0x42005CB6: mov edx, dword ptr [ebp + 0xc] */ 4284 /* cmp ecx, edx */ /* 0x42005CB9: cmp ecx, edx */ 4285 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 4286 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4287 _flag_k = FK_CMP; 4288 if (CMP_EQ(_flag_a, _flag_b)) goto L_42005CD8; /* 0x42005CBB: je 0x42005cd8 */ 4289 L_42005CBD: 4290 eax = MEM32(ebp + 0x10); /* 0x42005CBD: mov eax, dword ptr [ebp + 0x10] */ 4291 PUSH32(esp, esi); /* 0x42005CC0: push esi */ 4292 L_42005CC1: 4293 /* test eax, eax */ /* 0x42005CC1: test eax, eax */ 4294 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4295 _cf = 0; 4296 _flag_k = FK_TEST; 4297 if (TEST_Z(_flag_a, _flag_b)) goto L_42005CC9; /* 0x42005CC3: je 0x42005cc9 */ 4298 L_42005CC5: 4299 esi = MEM32(ecx); /* 0x42005CC5: mov esi, dword ptr [ecx] */ 4300 MEM32(eax) = esi; /* 0x42005CC7: mov dword ptr [eax], esi */ 4301 L_42005CC9: 4302 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 4303 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4304 ecx = ecx + 4; /* 0x42005CC9: add ecx, 4 */ 4305 _flag_k = FK_ADD; 4306 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 4307 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4308 eax = eax + 4; /* 0x42005CCC: add eax, 4 */ 4309 _flag_k = FK_ADD; 4310 /* cmp ecx, edx */ /* 0x42005CCF: cmp ecx, edx */ 4311 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 4312 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4313 _flag_k = FK_CMP; 4314 RECOMP_BACKEDGE(); 4315 if (CMP_NE(_flag_a, _flag_b)) goto L_42005CC1; /* 0x42005CD1: jne 0x42005cc1 */ 4316 L_42005CD3: 4317 esi = POP32_VAL(esp); /* 0x42005CD3: pop esi */ 4318 ebp = POP32_VAL(esp); /* 0x42005CD4: pop ebp */ 4319 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x42005CD5: ret 0xc */ 4320 L_42005CD8: 4321 eax = MEM32(ebp + 0x10); /* 0x42005CD8: mov eax, dword ptr [ebp + 0x10] */ 4322 ebp = POP32_VAL(esp); /* 0x42005CDB: pop ebp */ 4323 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x42005CDC: ret 0xc */ 4324 RECOMP_REGS_OUT(); 4325 } 4326 4327 void sub_42005CE0(void) { 4328 int _fpu_cmp = 0; 4329 uint32_t _cf = 0; 4330 int _df = 1; 4331 uint32_t _flag_k = FK_NONE; 4332 uint32_t _flag_a = 0, _flag_b = 0; 4333 uint32_t _itail_tgt = 0; 4334 RECOMP_REGS_LOCALS 4335 RECOMP_ENTER(0x42005CE0u); 4336 4337 L_42005CE0: 4338 PUSH32(esp, ebp); /* 0x42005CE0: push ebp */ 4339 ebp = esp; /* 0x42005CE1: mov ebp, esp */ 4340 eax = MEM32(ebp + 0xC); /* 0x42005CE3: mov eax, dword ptr [ebp + 0xc] */ 4341 /* test eax, eax */ /* 0x42005CE6: test eax, eax */ 4342 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4343 _cf = 0; 4344 _flag_k = FK_TEST; 4345 if (TEST_Z(_flag_a, _flag_b)) goto L_42005D02; /* 0x42005CE8: jbe 0x42005d02 */ 4346 L_42005CEA: 4347 edx = MEM32(ebp + 0x10); /* 0x42005CEA: mov edx, dword ptr [ebp + 0x10] */ 4348 ecx = eax; /* 0x42005CED: mov ecx, eax */ 4349 eax = MEM32(ebp + 0x8); /* 0x42005CEF: mov eax, dword ptr [ebp + 8] */ 4350 PUSH32(esp, esi); /* 0x42005CF2: push esi */ 4351 L_42005CF3: 4352 /* test eax, eax */ /* 0x42005CF3: test eax, eax */ 4353 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4354 _cf = 0; 4355 _flag_k = FK_TEST; 4356 if (TEST_Z(_flag_a, _flag_b)) goto L_42005CFB; /* 0x42005CF5: je 0x42005cfb */ 4357 L_42005CF7: 4358 esi = MEM32(edx); /* 0x42005CF7: mov esi, dword ptr [edx] */ 4359 MEM32(eax) = esi; /* 0x42005CF9: mov dword ptr [eax], esi */ 4360 L_42005CFB: 4361 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 4362 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4363 eax = eax + 4; /* 0x42005CFB: add eax, 4 */ 4364 _flag_k = FK_ADD; 4365 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4366 ecx = ecx - 1; /* 0x42005CFE: dec ecx */ 4367 _flag_k = FK_DEC; 4368 RECOMP_BACKEDGE(); 4369 if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_42005CF3; /* 0x42005CFF: jne 0x42005cf3 */ 4370 L_42005D01: 4371 esi = POP32_VAL(esp); /* 0x42005D01: pop esi */ 4372 L_42005D02: 4373 ebp = POP32_VAL(esp); /* 0x42005D02: pop ebp */ 4374 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x42005D03: ret 0xc */ 4375 RECOMP_REGS_OUT(); 4376 } 4377 4378 void sub_42005D10(void) { 4379 int _fpu_cmp = 0; 4380 uint32_t _cf = 0; 4381 int _df = 1; 4382 uint32_t _flag_k = FK_NONE; 4383 uint32_t _flag_a = 0, _flag_b = 0; 4384 uint32_t _itail_tgt = 0; 4385 RECOMP_REGS_LOCALS 4386 RECOMP_ENTER(0x42005D10u); 4387 4388 L_42005D10: 4389 PUSH32(esp, ebp); /* 0x42005D10: push ebp */ 4390 ebp = esp; /* 0x42005D11: mov ebp, esp */ 4391 PUSH32(esp, 0xCu); /* 0x42005D13: push 0xc */ 4392 RECOMP_ICALL(0x42016F36u); /* 0x42005D15: call 0x42016f36 */ /* not lifted */ 4393 RECOMP_FLAGS_IN(); 4394 ecx = MEM32(ebp + 0x8); /* 0x42005D1A: mov ecx, dword ptr [ebp + 8] */ 4395 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4396 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4397 esp = esp + 4; /* 0x42005D1D: add esp, 4 */ 4398 _flag_k = FK_ADD; 4399 /* test ecx, ecx */ /* 0x42005D20: test ecx, ecx */ 4400 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 4401 _cf = 0; 4402 _flag_k = FK_TEST; 4403 if (TEST_NZ(_flag_a, _flag_b)) goto L_42005D26; /* 0x42005D22: jne 0x42005d26 */ 4404 L_42005D24: 4405 ecx = eax; /* 0x42005D24: mov ecx, eax */ 4406 L_42005D26: 4407 MEM32(eax) = ecx; /* 0x42005D26: mov dword ptr [eax], ecx */ 4408 ecx = MEM32(ebp + 0xC); /* 0x42005D28: mov ecx, dword ptr [ebp + 0xc] */ 4409 /* test ecx, ecx */ /* 0x42005D2B: test ecx, ecx */ 4410 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 4411 _cf = 0; 4412 _flag_k = FK_TEST; 4413 if (TEST_Z(_flag_a, _flag_b)) goto L_42005D36; /* 0x42005D2D: je 0x42005d36 */ 4414 L_42005D2F: 4415 MEM32(eax + 0x4) = ecx; /* 0x42005D2F: mov dword ptr [eax + 4], ecx */ 4416 ebp = POP32_VAL(esp); /* 0x42005D32: pop ebp */ 4417 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x42005D33: ret 8 */ 4418 L_42005D36: 4419 MEM32(eax + 0x4) = eax; /* 0x42005D36: mov dword ptr [eax + 4], eax */ 4420 ebp = POP32_VAL(esp); /* 0x42005D39: pop ebp */ 4421 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x42005D3A: ret 8 */ 4422 RECOMP_REGS_OUT(); 4423 } 4424 4425 void sub_42005D40(void) { 4426 int _fpu_cmp = 0; 4427 uint32_t _cf = 0; 4428 int _df = 1; 4429 uint32_t _flag_k = FK_NONE; 4430 uint32_t _flag_a = 0, _flag_b = 0; 4431 uint32_t _itail_tgt = 0; 4432 RECOMP_REGS_LOCALS 4433 RECOMP_ENTER(0x42005D40u); 4434 4435 L_42005D40: 4436 RECOMP_ICALL(0x42005D50u); /* 0x42005D40: call 0x42005d50 */ /* not lifted */ 4437 RECOMP_FLAGS_IN(); 4438 goto L_42005D60; /* 0x42005D45: jmp 0x42005d60 */ 4439 L_42005D60: 4440 PUSH32(esp, 0x42005D70u); /* 0x42005D60: push 0x42005d70 */ 4441 RECOMP_ICALL(0x42016E07u); /* 0x42005D65: call 0x42016e07 */ /* not lifted */ 4442 RECOMP_FLAGS_IN(); 4443 ecx = POP32_VAL(esp); /* 0x42005D6A: pop ecx */ 4444 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42005D6B: ret */ 4445 RECOMP_REGS_OUT(); 4446 } 4447 4448 void sub_42005D50(void) { 4449 int _fpu_cmp = 0; 4450 uint32_t _cf = 0; 4451 int _df = 1; 4452 uint32_t _flag_k = FK_NONE; 4453 uint32_t _flag_a = 0, _flag_b = 0; 4454 uint32_t _itail_tgt = 0; 4455 RECOMP_REGS_LOCALS 4456 RECOMP_ENTER(0x42005D50u); 4457 4458 L_42005D50: 4459 ecx = 0x42023055u; /* 0x42005D50: mov ecx, 0x42023055 */ 4460 L_42005D55: 4461 { _itail_tgt = (uint32_t)(MEM32(0x42018014)); goto _ljump; } 4462 { RECOMP_REGS_OUT(); return; } /* end of function */ 4463 _ljump: 4464 switch (_itail_tgt) { 4465 case 0x42005D50u: goto L_42005D50; 4466 case 0x42005D55u: goto L_42005D55; 4467 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4468 } 4469 RECOMP_REGS_OUT(); 4470 } 4471 4472 void sub_42005D60(void) { 4473 int _fpu_cmp = 0; 4474 uint32_t _cf = 0; 4475 int _df = 1; 4476 uint32_t _flag_k = FK_NONE; 4477 uint32_t _flag_a = 0, _flag_b = 0; 4478 uint32_t _itail_tgt = 0; 4479 RECOMP_REGS_LOCALS 4480 RECOMP_ENTER(0x42005D60u); 4481 4482 L_42005D60: 4483 PUSH32(esp, 0x42005D70u); /* 0x42005D60: push 0x42005d70 */ 4484 RECOMP_ICALL(0x42016E07u); /* 0x42005D65: call 0x42016e07 */ /* not lifted */ 4485 RECOMP_FLAGS_IN(); 4486 ecx = POP32_VAL(esp); /* 0x42005D6A: pop ecx */ 4487 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42005D6B: ret */ 4488 RECOMP_REGS_OUT(); 4489 } 4490 4491 void sub_42005D70(void) { 4492 int _fpu_cmp = 0; 4493 uint32_t _cf = 0; 4494 int _df = 1; 4495 uint32_t _flag_k = FK_NONE; 4496 uint32_t _flag_a = 0, _flag_b = 0; 4497 uint32_t _itail_tgt = 0; 4498 RECOMP_REGS_LOCALS 4499 RECOMP_ENTER(0x42005D70u); 4500 4501 L_42005D70: 4502 ecx = 0x42023055u; /* 0x42005D70: mov ecx, 0x42023055 */ 4503 L_42005D75: 4504 { _itail_tgt = (uint32_t)(MEM32(0x42018010)); goto _ljump; } 4505 { RECOMP_REGS_OUT(); return; } /* end of function */ 4506 _ljump: 4507 switch (_itail_tgt) { 4508 case 0x42005D70u: goto L_42005D70; 4509 case 0x42005D75u: goto L_42005D75; 4510 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4511 } 4512 RECOMP_REGS_OUT(); 4513 } 4514 4515 void sub_42005D80(void) { 4516 int _fpu_cmp = 0; 4517 uint32_t _cf = 0; 4518 int _df = 1; 4519 uint32_t _flag_k = FK_NONE; 4520 uint32_t _flag_a = 0, _flag_b = 0; 4521 uint32_t _itail_tgt = 0; 4522 RECOMP_REGS_LOCALS 4523 RECOMP_ENTER(0x42005D80u); 4524 4525 L_42005D80: 4526 RECOMP_ICALL(0x42005D90u); /* 0x42005D80: call 0x42005d90 */ /* not lifted */ 4527 RECOMP_FLAGS_IN(); 4528 goto L_42005DA0; /* 0x42005D85: jmp 0x42005da0 */ 4529 L_42005DA0: 4530 PUSH32(esp, 0x42005DB0u); /* 0x42005DA0: push 0x42005db0 */ 4531 RECOMP_ICALL(0x42016E07u); /* 0x42005DA5: call 0x42016e07 */ /* not lifted */ 4532 RECOMP_FLAGS_IN(); 4533 ecx = POP32_VAL(esp); /* 0x42005DAA: pop ecx */ 4534 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42005DAB: ret */ 4535 RECOMP_REGS_OUT(); 4536 } 4537 4538 void sub_42005D90(void) { 4539 int _fpu_cmp = 0; 4540 uint32_t _cf = 0; 4541 int _df = 1; 4542 uint32_t _flag_k = FK_NONE; 4543 uint32_t _flag_a = 0, _flag_b = 0; 4544 uint32_t _itail_tgt = 0; 4545 RECOMP_REGS_LOCALS 4546 RECOMP_ENTER(0x42005D90u); 4547 4548 L_42005D90: 4549 ecx = 0x42023054u; /* 0x42005D90: mov ecx, 0x42023054 */ 4550 L_42005D95: 4551 { _itail_tgt = (uint32_t)(MEM32(0x42018008)); goto _ljump; } 4552 { RECOMP_REGS_OUT(); return; } /* end of function */ 4553 _ljump: 4554 switch (_itail_tgt) { 4555 case 0x42005D90u: goto L_42005D90; 4556 case 0x42005D95u: goto L_42005D95; 4557 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4558 } 4559 RECOMP_REGS_OUT(); 4560 } 4561 4562 void sub_42005DA0(void) { 4563 int _fpu_cmp = 0; 4564 uint32_t _cf = 0; 4565 int _df = 1; 4566 uint32_t _flag_k = FK_NONE; 4567 uint32_t _flag_a = 0, _flag_b = 0; 4568 uint32_t _itail_tgt = 0; 4569 RECOMP_REGS_LOCALS 4570 RECOMP_ENTER(0x42005DA0u); 4571 4572 L_42005DA0: 4573 PUSH32(esp, 0x42005DB0u); /* 0x42005DA0: push 0x42005db0 */ 4574 RECOMP_ICALL(0x42016E07u); /* 0x42005DA5: call 0x42016e07 */ /* not lifted */ 4575 RECOMP_FLAGS_IN(); 4576 ecx = POP32_VAL(esp); /* 0x42005DAA: pop ecx */ 4577 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42005DAB: ret */ 4578 RECOMP_REGS_OUT(); 4579 } 4580 4581 void sub_42005DB0(void) { 4582 int _fpu_cmp = 0; 4583 uint32_t _cf = 0; 4584 int _df = 1; 4585 uint32_t _flag_k = FK_NONE; 4586 uint32_t _flag_a = 0, _flag_b = 0; 4587 uint32_t _itail_tgt = 0; 4588 RECOMP_REGS_LOCALS 4589 RECOMP_ENTER(0x42005DB0u); 4590 4591 L_42005DB0: 4592 ecx = 0x42023054u; /* 0x42005DB0: mov ecx, 0x42023054 */ 4593 L_42005DB5: 4594 { _itail_tgt = (uint32_t)(MEM32(0x4201800C)); goto _ljump; } 4595 { RECOMP_REGS_OUT(); return; } /* end of function */ 4596 _ljump: 4597 switch (_itail_tgt) { 4598 case 0x42005DB0u: goto L_42005DB0; 4599 case 0x42005DB5u: goto L_42005DB5; 4600 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 4601 } 4602 RECOMP_REGS_OUT(); 4603 } 4604 4605 void sub_42005DC0(void) { 4606 int _fpu_cmp = 0; 4607 uint32_t _cf = 0; 4608 int _df = 1; 4609 uint32_t _flag_k = FK_NONE; 4610 uint32_t _flag_a = 0, _flag_b = 0; 4611 uint32_t _itail_tgt = 0; 4612 RECOMP_REGS_LOCALS 4613 RECOMP_ENTER(0x42005DC0u); 4614 4615 L_42005DC0: 4616 PUSH32(esp, ebp); /* 0x42005DC0: push ebp */ 4617 ebp = esp; /* 0x42005DC1: mov ebp, esp */ 4618 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu); 4619 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4620 esp = esp - 0x1Cu; /* 0x42005DC3: sub esp, 0x1c */ 4621 _flag_k = FK_CMP; 4622 PUSH32(esp, esi); /* 0x42005DC6: push esi */ 4623 esi = ecx; /* 0x42005DC7: mov esi, ecx */ 4624 PUSH32(esp, edi); /* 0x42005DC9: push edi */ 4625 edi = MEM32(esi + 0x4); /* 0x42005DCA: mov edi, dword ptr [esi + 4] */ 4626 eax = MEM32(edi); /* 0x42005DCD: mov eax, dword ptr [edi] */ 4627 /* cmp eax, edi */ /* 0x42005DCF: cmp eax, edi */ 4628 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 4629 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4630 _flag_k = FK_CMP; 4631 MEM32(ebp + (-0x4)) = eax; /* 0x42005DD1: mov dword ptr [ebp - 4], eax */ 4632 if (CMP_EQ(_flag_a, _flag_b)) goto L_42005DF7; /* 0x42005DD4: je 0x42005df7 */ 4633 L_42005DD6: 4634 PUSH32(esp, 0); /* 0x42005DD6: push 0 */ 4635 eax = ebp + (-0x8); /* 0x42005DD8: lea eax, [ebp - 8] */ 4636 PUSH32(esp, eax); /* 0x42005DDB: push eax */ 4637 ecx = ebp + (-0x4); /* 0x42005DDC: lea ecx, [ebp - 4] */ 4638 RECOMP_ICALL(0x420062F0u); /* 0x42005DDF: call 0x420062f0 */ /* not lifted */ 4639 RECOMP_FLAGS_IN(); 4640 ecx = MEM32(eax); /* 0x42005DE4: mov ecx, dword ptr [eax] */ 4641 PUSH32(esp, ecx); /* 0x42005DE6: push ecx */ 4642 edx = ebp + (-0xC); /* 0x42005DE7: lea edx, [ebp - 0xc] */ 4643 PUSH32(esp, edx); /* 0x42005DEA: push edx */ 4644 ecx = esi; /* 0x42005DEB: mov ecx, esi */ 4645 RECOMP_ICALL(0x42005C70u); /* 0x42005DED: call 0x42005c70 */ /* not lifted */ 4646 RECOMP_FLAGS_IN(); 4647 /* cmp MEM32(ebp + (-0x4)), edi */ /* 0x42005DF2: cmp dword ptr [ebp - 4], edi */ 4648 _flag_a = (uint32_t)(MEM32(ebp + (-0x4))); _flag_b = (uint32_t)(edi); 4649 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4650 _flag_k = FK_CMP; 4651 RECOMP_BACKEDGE(); 4652 if (CMP_NE(_flag_a, _flag_b)) goto L_42005DD6; /* 0x42005DF5: jne 0x42005dd6 */ 4653 L_42005DF7: 4654 ecx = MEM32(esi + 0x4); /* 0x42005DF7: mov ecx, dword ptr [esi + 4] */ 4655 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4656 eax = 0; /* 0x42005DFA: xor eax, eax */ 4657 _cf = 0; 4658 _flag_k = FK_TEST; 4659 MEM32(ebp + (-0x1C)) = 0x56B41478u; /* 0x42005DFC: mov dword ptr [ebp - 0x1c], 0x56b41478 */ 4660 MEM32(ebp + (-0x18)) = eax; /* 0x42005E03: mov dword ptr [ebp - 0x18], eax */ 4661 MEM32(ebp + (-0x14)) = eax; /* 0x42005E06: mov dword ptr [ebp - 0x14], eax */ 4662 edi = MEM32(ecx); /* 0x42005E09: mov edi, dword ptr [ecx] */ 4663 edx = MEM32(edi + 0x4); /* 0x42005E0B: mov edx, dword ptr [edi + 4] */ 4664 PUSH32(esp, ebx); /* 0x42005E0E: push ebx */ 4665 PUSH32(esp, edx); /* 0x42005E0F: push edx */ 4666 PUSH32(esp, edi); /* 0x42005E10: push edi */ 4667 ecx = esi; /* 0x42005E11: mov ecx, esi */ 4668 MEM32(ebp + (-0xC)) = eax; /* 0x42005E13: mov dword ptr [ebp - 0xc], eax */ 4669 RECOMP_ICALL(0x420062C0u); /* 0x42005E16: call 0x420062c0 */ /* not lifted */ 4670 RECOMP_FLAGS_IN(); 4671 MEM32(edi + 0x4) = eax; /* 0x42005E1B: mov dword ptr [edi + 4], eax */ 4672 ecx = MEM32(eax + 0x4); /* 0x42005E1E: mov ecx, dword ptr [eax + 4] */ 4673 edx = ebp + (-0x1C); /* 0x42005E21: lea edx, [ebp - 0x1c] */ 4674 MEM32(ecx) = eax; /* 0x42005E24: mov dword ptr [ecx], eax */ 4675 PUSH32(esp, edx); /* 0x42005E26: push edx */ 4676 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(8); 4677 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4678 eax = eax + 8; /* 0x42005E27: add eax, 8 */ 4679 _flag_k = FK_ADD; 4680 PUSH32(esp, eax); /* 0x42005E2A: push eax */ 4681 RECOMP_ICALL(0x4200E130u); /* 0x42005E2B: call 0x4200e130 */ /* not lifted */ 4682 RECOMP_FLAGS_IN(); 4683 ecx = MEM32(esi + 0x8); /* 0x42005E30: mov ecx, dword ptr [esi + 8] */ 4684 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 4685 eax = 0; /* 0x42005E33: xor eax, eax */ 4686 _cf = 0; 4687 _flag_k = FK_TEST; 4688 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4689 ecx = ecx + 1; /* 0x42005E35: inc ecx */ 4690 _flag_k = FK_INC; 4691 MEM32(ebp + (-0xC)) = eax; /* 0x42005E36: mov dword ptr [ebp - 0xc], eax */ 4692 MEM32(ebp + (-0x18)) = eax; /* 0x42005E39: mov dword ptr [ebp - 0x18], eax */ 4693 eax = MEM32(esi + 0x4); /* 0x42005E3C: mov eax, dword ptr [esi + 4] */ 4694 MEM32(esi + 0x8) = ecx; /* 0x42005E3F: mov dword ptr [esi + 8], ecx */ 4695 edi = MEM32(eax); /* 0x42005E42: mov edi, dword ptr [eax] */ 4696 ebx = MEM32(edi + 0x4); /* 0x42005E44: mov ebx, dword ptr [edi + 4] */ 4697 PUSH32(esp, 0x14u); /* 0x42005E47: push 0x14 */ 4698 MEM32(ebp + (-0x1C)) = 0xD6B41478u; /* 0x42005E49: mov dword ptr [ebp - 0x1c], 0xd6b41478 */ 4699 RECOMP_ICALL(0x42016F36u); /* 0x42005E50: call 0x42016f36 */ /* not lifted */ 4700 RECOMP_FLAGS_IN(); 4701 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 4702 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4703 esp = esp + 0xCu; /* 0x42005E55: add esp, 0xc */ 4704 _flag_k = FK_ADD; 4705 /* test edi, edi */ /* 0x42005E58: test edi, edi */ 4706 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 4707 _cf = 0; 4708 _flag_k = FK_TEST; 4709 ecx = edi; /* 0x42005E5A: mov ecx, edi */ 4710 if (TEST_NZ(_flag_a, _flag_b)) goto L_42005E60; /* 0x42005E5C: jne 0x42005e60 */ 4711 L_42005E5E: 4712 ecx = eax; /* 0x42005E5E: mov ecx, eax */ 4713 L_42005E60: 4714 /* test ebx, ebx */ /* 0x42005E60: test ebx, ebx */ 4715 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 4716 _cf = 0; 4717 _flag_k = FK_TEST; 4718 MEM32(eax) = ecx; /* 0x42005E62: mov dword ptr [eax], ecx */ 4719 if (TEST_NZ(_flag_a, _flag_b)) goto L_42005E68; /* 0x42005E64: jne 0x42005e68 */ 4720 L_42005E66: 4721 ebx = eax; /* 0x42005E66: mov ebx, eax */ 4722 L_42005E68: 4723 MEM32(eax + 0x4) = ebx; /* 0x42005E68: mov dword ptr [eax + 4], ebx */ 4724 MEM32(edi + 0x4) = eax; /* 0x42005E6B: mov dword ptr [edi + 4], eax */ 4725 ecx = MEM32(eax + 0x4); /* 0x42005E6E: mov ecx, dword ptr [eax + 4] */ 4726 MEM32(ecx) = eax; /* 0x42005E71: mov dword ptr [ecx], eax */ 4727 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(8); 4728 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4729 eax = eax + 8; /* 0x42005E73: add eax, 8 */ 4730 _flag_k = FK_ADD; 4731 /* test eax, eax */ /* 0x42005E76: test eax, eax */ 4732 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4733 _cf = 0; 4734 _flag_k = FK_TEST; 4735 ebx = POP32_VAL(esp); /* 0x42005E78: pop ebx */ 4736 if (TEST_Z(_flag_a, _flag_b)) goto L_42005E8C; /* 0x42005E79: je 0x42005e8c */ 4737 L_42005E7B: 4738 edx = MEM32(ebp + (-0x1C)); /* 0x42005E7B: mov edx, dword ptr [ebp - 0x1c] */ 4739 ecx = MEM32(ebp + (-0x18)); /* 0x42005E7E: mov ecx, dword ptr [ebp - 0x18] */ 4740 MEM32(eax) = edx; /* 0x42005E81: mov dword ptr [eax], edx */ 4741 MEM32(eax + 0x4) = ecx; /* 0x42005E83: mov dword ptr [eax + 4], ecx */ 4742 ecx = MEM32(ebp + (-0xC)); /* 0x42005E86: mov ecx, dword ptr [ebp - 0xc] */ 4743 MEM32(eax + 0x8) = ecx; /* 0x42005E89: mov dword ptr [eax + 8], ecx */ 4744 L_42005E8C: 4745 eax = MEM32(esi + 0x8); /* 0x42005E8C: mov eax, dword ptr [esi + 8] */ 4746 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1); 4747 eax = eax + 1; /* 0x42005E8F: inc eax */ 4748 _flag_k = FK_INC; 4749 edi = POP32_VAL(esp); /* 0x42005E90: pop edi */ 4750 MEM32(esi + 0x8) = eax; /* 0x42005E91: mov dword ptr [esi + 8], eax */ 4751 esi = POP32_VAL(esp); /* 0x42005E94: pop esi */ 4752 esp = ebp; /* 0x42005E95: mov esp, ebp */ 4753 ebp = POP32_VAL(esp); /* 0x42005E97: pop ebp */ 4754 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42005E98: ret */ 4755 RECOMP_REGS_OUT(); 4756 } 4757 4758 void sub_42005EA0(void) { 4759 int _fpu_cmp = 0; 4760 uint32_t _cf = 0; 4761 int _df = 1; 4762 uint32_t _flag_k = FK_NONE; 4763 uint32_t _flag_a = 0, _flag_b = 0; 4764 uint32_t _itail_tgt = 0; 4765 RECOMP_REGS_LOCALS 4766 RECOMP_ENTER(0x42005EA0u); 4767 4768 L_42005EA0: 4769 PUSH32(esp, ebp); /* 0x42005EA0: push ebp */ 4770 ebp = esp; /* 0x42005EA1: mov ebp, esp */ 4771 eax = MEM32(ebp + 0x8); /* 0x42005EA3: mov eax, dword ptr [ebp + 8] */ 4772 eax = MEM32(eax + 0x18); /* 0x42005EA6: mov eax, dword ptr [eax + 0x18] */ 4773 ebp = POP32_VAL(esp); /* 0x42005EA9: pop ebp */ 4774 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42005EAA: ret 4 */ 4775 RECOMP_REGS_OUT(); 4776 } 4777 4778 void sub_42005EB0(void) { 4779 int _fpu_cmp = 0; 4780 uint32_t _cf = 0; 4781 int _df = 1; 4782 uint32_t _flag_k = FK_NONE; 4783 uint32_t _flag_a = 0, _flag_b = 0; 4784 uint32_t _itail_tgt = 0; 4785 RECOMP_REGS_LOCALS 4786 RECOMP_ENTER(0x42005EB0u); 4787 4788 L_42005EB0: 4789 PUSH32(esp, ebp); /* 0x42005EB0: push ebp */ 4790 ebp = esp; /* 0x42005EB1: mov ebp, esp */ 4791 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u); 4792 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4793 esp = esp - 0x18u; /* 0x42005EB3: sub esp, 0x18 */ 4794 _flag_k = FK_CMP; 4795 PUSH32(esp, ebx); /* 0x42005EB6: push ebx */ 4796 MEM32(ebp + (-0x4)) = ecx; /* 0x42005EB7: mov dword ptr [ebp - 4], ecx */ 4797 ecx = MEM32(ecx + 0x4); /* 0x42005EBA: mov ecx, dword ptr [ecx + 4] */ 4798 PUSH32(esp, esi); /* 0x42005EBD: push esi */ 4799 esi = MEM32(ecx); /* 0x42005EBE: mov esi, dword ptr [ecx] */ 4800 /* cmp esi, ecx */ /* 0x42005EC0: cmp esi, ecx */ 4801 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 4802 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4803 _flag_k = FK_CMP; 4804 PUSH32(esp, edi); /* 0x42005EC2: push edi */ 4805 if (CMP_EQ(_flag_a, _flag_b)) goto L_42005ED8; /* 0x42005EC3: je 0x42005ed8 */ 4806 L_42005EC5: 4807 fp_push(*(float*)&MEM32(esi + 0x8)); /* 0x42005EC5: fld dword ptr [esi + 8] */ 4808 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0xC)); /* 0x42005EC8: fcomp dword ptr [ebp + 0xc] */ 4809 fp_pop(); 4810 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x42005ECB: fnstsw ax */ 4811 /* test HI8(eax), 0x41u */ /* 0x42005ECD: test ah, 0x41 */ 4812 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 4813 _cf = 0; 4814 _flag_k = FK_NARROW(FK_TEST, 24); 4815 if (TEST_Z(_flag_a, _flag_b)) goto L_42005ED8; /* 0x42005ED0: je 0x42005ed8 */ 4816 L_42005ED2: 4817 esi = MEM32(esi); /* 0x42005ED2: mov esi, dword ptr [esi] */ 4818 /* cmp esi, ecx */ /* 0x42005ED4: cmp esi, ecx */ 4819 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 4820 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4821 _flag_k = FK_CMP; 4822 RECOMP_BACKEDGE(); 4823 if (CMP_NE(_flag_a, _flag_b)) goto L_42005EC5; /* 0x42005ED6: jne 0x42005ec5 */ 4824 L_42005ED8: 4825 eax = MEM32(ebp + 0x10); /* 0x42005ED8: mov eax, dword ptr [ebp + 0x10] */ 4826 ecx = MEM32(ebp + 0xC); /* 0x42005EDB: mov ecx, dword ptr [ebp + 0xc] */ 4827 ebx = MEM32(ebp + 0x8); /* 0x42005EDE: mov ebx, dword ptr [ebp + 8] */ 4828 edi = MEM32(esi + 0x4); /* 0x42005EE1: mov edi, dword ptr [esi + 4] */ 4829 PUSH32(esp, 0x14u); /* 0x42005EE4: push 0x14 */ 4830 MEM32(ebp + (-0x8)) = eax; /* 0x42005EE6: mov dword ptr [ebp - 8], eax */ 4831 MEM32(ebp + (-0x18)) = ecx; /* 0x42005EE9: mov dword ptr [ebp - 0x18], ecx */ 4832 RECOMP_ICALL(0x42016F36u); /* 0x42005EEC: call 0x42016f36 */ /* not lifted */ 4833 RECOMP_FLAGS_IN(); 4834 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4835 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4836 esp = esp + 4; /* 0x42005EF1: add esp, 4 */ 4837 _flag_k = FK_ADD; 4838 /* test esi, esi */ /* 0x42005EF4: test esi, esi */ 4839 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 4840 _cf = 0; 4841 _flag_k = FK_TEST; 4842 ecx = esi; /* 0x42005EF6: mov ecx, esi */ 4843 if (TEST_NZ(_flag_a, _flag_b)) goto L_42005EFC; /* 0x42005EF8: jne 0x42005efc */ 4844 L_42005EFA: 4845 ecx = eax; /* 0x42005EFA: mov ecx, eax */ 4846 L_42005EFC: 4847 /* test edi, edi */ /* 0x42005EFC: test edi, edi */ 4848 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 4849 _cf = 0; 4850 _flag_k = FK_TEST; 4851 MEM32(eax) = ecx; /* 0x42005EFE: mov dword ptr [eax], ecx */ 4852 if (TEST_NZ(_flag_a, _flag_b)) goto L_42005F04; /* 0x42005F00: jne 0x42005f04 */ 4853 L_42005F02: 4854 edi = eax; /* 0x42005F02: mov edi, eax */ 4855 L_42005F04: 4856 MEM32(eax + 0x4) = edi; /* 0x42005F04: mov dword ptr [eax + 4], edi */ 4857 MEM32(esi + 0x4) = eax; /* 0x42005F07: mov dword ptr [esi + 4], eax */ 4858 edx = MEM32(eax + 0x4); /* 0x42005F0A: mov edx, dword ptr [eax + 4] */ 4859 MEM32(edx) = eax; /* 0x42005F0D: mov dword ptr [edx], eax */ 4860 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(8); 4861 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4862 eax = eax + 8; /* 0x42005F0F: add eax, 8 */ 4863 _flag_k = FK_ADD; 4864 /* test eax, eax */ /* 0x42005F12: test eax, eax */ 4865 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4866 _cf = 0; 4867 _flag_k = FK_TEST; 4868 if (TEST_Z(_flag_a, _flag_b)) goto L_42005F24; /* 0x42005F14: je 0x42005f24 */ 4869 L_42005F16: 4870 ecx = MEM32(ebp + (-0x18)); /* 0x42005F16: mov ecx, dword ptr [ebp - 0x18] */ 4871 MEM32(eax) = ecx; /* 0x42005F19: mov dword ptr [eax], ecx */ 4872 ecx = MEM32(ebp + (-0x8)); /* 0x42005F1B: mov ecx, dword ptr [ebp - 8] */ 4873 MEM32(eax + 0x4) = ebx; /* 0x42005F1E: mov dword ptr [eax + 4], ebx */ 4874 MEM32(eax + 0x8) = ecx; /* 0x42005F21: mov dword ptr [eax + 8], ecx */ 4875 L_42005F24: 4876 eax = MEM32(ebp + (-0x4)); /* 0x42005F24: mov eax, dword ptr [ebp - 4] */ 4877 edx = MEM32(eax + 0x8); /* 0x42005F27: mov edx, dword ptr [eax + 8] */ 4878 ecx = MEM32(ebp + 0x8); /* 0x42005F2A: mov ecx, dword ptr [ebp + 8] */ 4879 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1); 4880 edx = edx + 1; /* 0x42005F2D: inc edx */ 4881 _flag_k = FK_INC; 4882 MEM32(eax + 0x8) = edx; /* 0x42005F2E: mov dword ptr [eax + 8], edx */ 4883 MEM32(ebp + 0xC) = esi; /* 0x42005F31: mov dword ptr [ebp + 0xc], esi */ 4884 edx = MEM32(esi + 0x4); /* 0x42005F34: mov edx, dword ptr [esi + 4] */ 4885 eax = ebp + 0xC; /* 0x42005F37: lea eax, [ebp + 0xc] */ 4886 PUSH32(esp, eax); /* 0x42005F3A: push eax */ 4887 MEM32(ebp + 0xC) = edx; /* 0x42005F3B: mov dword ptr [ebp + 0xc], edx */ 4888 RECOMP_ICALL(0x42006CA0u); /* 0x42005F3E: call 0x42006ca0 */ /* not lifted */ 4889 RECOMP_FLAGS_IN(); 4890 edi = POP32_VAL(esp); /* 0x42005F43: pop edi */ 4891 esi = POP32_VAL(esp); /* 0x42005F44: pop esi */ 4892 ebx = POP32_VAL(esp); /* 0x42005F45: pop ebx */ 4893 esp = ebp; /* 0x42005F46: mov esp, ebp */ 4894 ebp = POP32_VAL(esp); /* 0x42005F48: pop ebp */ 4895 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x42005F49: ret 0xc */ 4896 RECOMP_REGS_OUT(); 4897 } 4898 4899 void sub_42005F50(void) { 4900 int _fpu_cmp = 0; 4901 uint32_t _cf = 0; 4902 int _df = 1; 4903 uint32_t _flag_k = FK_NONE; 4904 uint32_t _flag_a = 0, _flag_b = 0; 4905 uint32_t _itail_tgt = 0; 4906 RECOMP_REGS_LOCALS 4907 RECOMP_ENTER(0x42005F50u); 4908 4909 L_42005F50: 4910 PUSH32(esp, ebp); /* 0x42005F50: push ebp */ 4911 ebp = esp; /* 0x42005F51: mov ebp, esp */ 4912 PUSH32(esp, esi); /* 0x42005F53: push esi */ 4913 PUSH32(esp, edi); /* 0x42005F54: push edi */ 4914 edi = MEM32(ebp + 0x8); /* 0x42005F55: mov edi, dword ptr [ebp + 8] */ 4915 eax = MEM32(edi + 0x18); /* 0x42005F58: mov eax, dword ptr [edi + 0x18] */ 4916 /* test eax, eax */ /* 0x42005F5B: test eax, eax */ 4917 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 4918 _cf = 0; 4919 _flag_k = FK_TEST; 4920 esi = ecx; /* 0x42005F5D: mov esi, ecx */ 4921 if (TEST_Z(_flag_a, _flag_b)) goto L_42005F8B; /* 0x42005F5F: je 0x42005f8b */ 4922 L_42005F61: 4923 eax = MEM32(eax); /* 0x42005F61: mov eax, dword ptr [eax] */ 4924 ecx = MEM32(eax + 0x4); /* 0x42005F63: mov ecx, dword ptr [eax + 4] */ 4925 edx = MEM32(eax); /* 0x42005F66: mov edx, dword ptr [eax] */ 4926 MEM32(ecx) = edx; /* 0x42005F68: mov dword ptr [ecx], edx */ 4927 ecx = MEM32(eax); /* 0x42005F6A: mov ecx, dword ptr [eax] */ 4928 edx = MEM32(eax + 0x4); /* 0x42005F6C: mov edx, dword ptr [eax + 4] */ 4929 PUSH32(esp, eax); /* 0x42005F6F: push eax */ 4930 MEM32(ecx + 0x4) = edx; /* 0x42005F70: mov dword ptr [ecx + 4], edx */ 4931 RECOMP_ICALL(0x42016DD0u); /* 0x42005F73: call 0x42016dd0 */ /* not lifted */ 4932 RECOMP_FLAGS_IN(); 4933 ecx = MEM32(esi + 0x8); /* 0x42005F78: mov ecx, dword ptr [esi + 8] */ 4934 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 4935 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4936 esp = esp + 4; /* 0x42005F7B: add esp, 4 */ 4937 _flag_k = FK_ADD; 4938 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4939 ecx = ecx - 1; /* 0x42005F7E: dec ecx */ 4940 _flag_k = FK_DEC; 4941 MEM32(esi + 0x8) = ecx; /* 0x42005F7F: mov dword ptr [esi + 8], ecx */ 4942 PUSH32(esp, 0); /* 0x42005F82: push 0 */ 4943 ecx = edi; /* 0x42005F84: mov ecx, edi */ 4944 RECOMP_ICALL(0x42006CA0u); /* 0x42005F86: call 0x42006ca0 */ /* not lifted */ 4945 RECOMP_FLAGS_IN(); 4946 L_42005F8B: 4947 edi = POP32_VAL(esp); /* 0x42005F8B: pop edi */ 4948 esi = POP32_VAL(esp); /* 0x42005F8C: pop esi */ 4949 ebp = POP32_VAL(esp); /* 0x42005F8D: pop ebp */ 4950 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42005F8E: ret 4 */ 4951 RECOMP_REGS_OUT(); 4952 } 4953 4954 void sub_42005FA0(void) { 4955 int _fpu_cmp = 0; 4956 uint32_t _cf = 0; 4957 int _df = 1; 4958 uint32_t _flag_k = FK_NONE; 4959 uint32_t _flag_a = 0, _flag_b = 0; 4960 uint32_t _itail_tgt = 0; 4961 RECOMP_REGS_LOCALS 4962 RECOMP_ENTER(0x42005FA0u); 4963 4964 L_42005FA0: 4965 PUSH32(esp, ebp); /* 0x42005FA0: push ebp */ 4966 ebp = esp; /* 0x42005FA1: mov ebp, esp */ 4967 PUSH32(esp, ecx); /* 0x42005FA3: push ecx */ 4968 eax = MEM32(ebp + 0x8); /* 0x42005FA4: mov eax, dword ptr [ebp + 8] */ 4969 PUSH32(esp, ebx); /* 0x42005FA7: push ebx */ 4970 PUSH32(esp, esi); /* 0x42005FA8: push esi */ 4971 PUSH32(esp, edi); /* 0x42005FA9: push edi */ 4972 edi = MEM32(eax + 0x18); /* 0x42005FAA: mov edi, dword ptr [eax + 0x18] */ 4973 /* test edi, edi */ /* 0x42005FAD: test edi, edi */ 4974 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 4975 _cf = 0; 4976 _flag_k = FK_TEST; 4977 ebx = ecx; /* 0x42005FAF: mov ebx, ecx */ 4978 if (TEST_NZ(_flag_a, _flag_b)) goto L_42005FCC; /* 0x42005FB1: jne 0x42005fcc */ 4979 L_42005FB3: 4980 ecx = MEM32(ebp + 0x10); /* 0x42005FB3: mov ecx, dword ptr [ebp + 0x10] */ 4981 edx = MEM32(ebp + 0xC); /* 0x42005FB6: mov edx, dword ptr [ebp + 0xc] */ 4982 PUSH32(esp, ecx); /* 0x42005FB9: push ecx */ 4983 PUSH32(esp, edx); /* 0x42005FBA: push edx */ 4984 PUSH32(esp, eax); /* 0x42005FBB: push eax */ 4985 ecx = ebx; /* 0x42005FBC: mov ecx, ebx */ 4986 RECOMP_ICALL(0x42005EB0u); /* 0x42005FBE: call 0x42005eb0 */ /* not lifted */ 4987 RECOMP_FLAGS_IN(); 4988 edi = POP32_VAL(esp); /* 0x42005FC3: pop edi */ 4989 esi = POP32_VAL(esp); /* 0x42005FC4: pop esi */ 4990 ebx = POP32_VAL(esp); /* 0x42005FC5: pop ebx */ 4991 esp = ebp; /* 0x42005FC6: mov esp, ebp */ 4992 ebp = POP32_VAL(esp); /* 0x42005FC8: pop ebp */ 4993 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x42005FC9: ret 0xc */ 4994 L_42005FCC: 4995 ecx = MEM32(edi); /* 0x42005FCC: mov ecx, dword ptr [edi] */ 4996 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x42005FCE: fld dword ptr [ebp + 0xc] */ 4997 edx = MEM32(ecx + 0x4); /* 0x42005FD1: mov edx, dword ptr [ecx + 4] */ 4998 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edx + 0x8)); /* 0x42005FD4: fcom dword ptr [edx + 8] */ 4999 esi = ecx; /* 0x42005FD7: mov esi, ecx */ 5000 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x42005FD9: fnstsw ax */ 5001 /* test HI8(eax), 0x41u */ /* 0x42005FDB: test ah, 0x41 */ 5002 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 5003 _cf = 0; 5004 _flag_k = FK_NARROW(FK_TEST, 24); 5005 if (TEST_Z(_flag_a, _flag_b)) goto L_42005FEF; /* 0x42005FDE: je 0x42005fef */ 5006 L_42005FE0: 5007 esi = edx; /* 0x42005FE0: mov esi, edx */ 5008 edx = MEM32(edx + 0x4); /* 0x42005FE2: mov edx, dword ptr [edx + 4] */ 5009 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edx + 0x8)); /* 0x42005FE5: fcom dword ptr [edx + 8] */ 5010 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x42005FE8: fnstsw ax */ 5011 /* test HI8(eax), 0x41u */ /* 0x42005FEA: test ah, 0x41 */ 5012 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 5013 _cf = 0; 5014 _flag_k = FK_NARROW(FK_TEST, 24); 5015 RECOMP_BACKEDGE(); 5016 if (TEST_NZ(_flag_a, _flag_b)) goto L_42005FE0; /* 0x42005FED: jne 0x42005fe0 */ 5017 L_42005FEF: 5018 /* cmp esi, ecx */ /* 0x42005FEF: cmp esi, ecx */ 5019 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 5020 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5021 _flag_k = FK_CMP; 5022 if (CMP_NE(_flag_a, _flag_b)) goto L_420060B9; /* 0x42005FF1: jne 0x420060b9 */ 5023 L_42005FF7: 5024 edx = MEM32(ecx); /* 0x42005FF7: mov edx, dword ptr [ecx] */ 5025 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edx + 0x8)); /* 0x42005FF9: fcom dword ptr [edx + 8] */ 5026 esi = edx; /* 0x42005FFC: mov esi, edx */ 5027 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x42005FFE: fnstsw ax */ 5028 /* test HI8(eax), 0x41u */ /* 0x42006000: test ah, 0x41 */ 5029 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 5030 _cf = 0; 5031 _flag_k = FK_NARROW(FK_TEST, 24); 5032 if (TEST_NZ(_flag_a, _flag_b)) goto L_42006015; /* 0x42006003: jne 0x42006015 */ 5033 L_42006005: 5034 esi = MEM32(esi); /* 0x42006005: mov esi, dword ptr [esi] */ 5035 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(esi + 0x8)); /* 0x42006007: fcom dword ptr [esi + 8] */ 5036 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x4200600A: fnstsw ax */ 5037 /* test HI8(eax), 0x41u */ /* 0x4200600C: test ah, 0x41 */ 5038 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 5039 _cf = 0; 5040 _flag_k = FK_NARROW(FK_TEST, 24); 5041 RECOMP_BACKEDGE(); 5042 if (TEST_Z(_flag_a, _flag_b)) goto L_42006005; /* 0x4200600F: je 0x42006005 */ 5043 L_42006011: 5044 /* cmp esi, edx */ /* 0x42006011: cmp esi, edx */ 5045 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx); 5046 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5047 _flag_k = FK_CMP; 5048 if (CMP_NE(_flag_a, _flag_b)) goto L_42006029; /* 0x42006013: jne 0x42006029 */ 5049 L_42006015: 5050 { float _v = (float)fp_pop(); *(float*)ADDR(ecx + 0x8) = _v; } /* 0x42006015: fstp dword ptr [ecx + 8] */ 5051 eax = MEM32(edi); /* 0x42006018: mov eax, dword ptr [edi] */ 5052 ecx = MEM32(ebp + 0x10); /* 0x4200601A: mov ecx, dword ptr [ebp + 0x10] */ 5053 edi = POP32_VAL(esp); /* 0x4200601D: pop edi */ 5054 esi = POP32_VAL(esp); /* 0x4200601E: pop esi */ 5055 MEM32(eax + 0x10) = ecx; /* 0x4200601F: mov dword ptr [eax + 0x10], ecx */ 5056 ebx = POP32_VAL(esp); /* 0x42006022: pop ebx */ 5057 esp = ebp; /* 0x42006023: mov esp, ebp */ 5058 ebp = POP32_VAL(esp); /* 0x42006025: pop ebp */ 5059 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x42006026: ret 0xc */ 5060 L_42006029: 5061 eax = MEM32(ebp + 0x10); /* 0x42006029: mov eax, dword ptr [ebp + 0x10] */ 5062 { float _v = (float)fp_pop(); *(float*)ADDR(ecx + 0x8) = _v; } /* 0x4200602C: fstp dword ptr [ecx + 8] */ 5063 edx = MEM32(edi); /* 0x4200602F: mov edx, dword ptr [edi] */ 5064 MEM32(edx + 0x10) = eax; /* 0x42006031: mov dword ptr [edx + 0x10], eax */ 5065 eax = MEM32(edi); /* 0x42006034: mov eax, dword ptr [edi] */ 5066 ecx = MEM32(esi + 0x4); /* 0x42006036: mov ecx, dword ptr [esi + 4] */ 5067 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(8); 5068 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5069 eax = eax + 8; /* 0x42006039: add eax, 8 */ 5070 _flag_k = FK_ADD; 5071 PUSH32(esp, 0x14u); /* 0x4200603C: push 0x14 */ 5072 MEM32(ebp + (-0x4)) = eax; /* 0x4200603E: mov dword ptr [ebp - 4], eax */ 5073 MEM32(ebp + 0x10) = ecx; /* 0x42006041: mov dword ptr [ebp + 0x10], ecx */ 5074 RECOMP_ICALL(0x42016F36u); /* 0x42006044: call 0x42016f36 */ /* not lifted */ 5075 RECOMP_FLAGS_IN(); 5076 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5077 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5078 esp = esp + 4; /* 0x42006049: add esp, 4 */ 5079 _flag_k = FK_ADD; 5080 /* test esi, esi */ /* 0x4200604C: test esi, esi */ 5081 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 5082 _cf = 0; 5083 _flag_k = FK_TEST; 5084 ecx = esi; /* 0x4200604E: mov ecx, esi */ 5085 if (TEST_NZ(_flag_a, _flag_b)) goto L_42006054; /* 0x42006050: jne 0x42006054 */ 5086 L_42006052: 5087 ecx = eax; /* 0x42006052: mov ecx, eax */ 5088 L_42006054: 5089 MEM32(eax) = ecx; /* 0x42006054: mov dword ptr [eax], ecx */ 5090 ecx = MEM32(ebp + 0x10); /* 0x42006056: mov ecx, dword ptr [ebp + 0x10] */ 5091 /* test ecx, ecx */ /* 0x42006059: test ecx, ecx */ 5092 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 5093 _cf = 0; 5094 _flag_k = FK_TEST; 5095 if (TEST_NZ(_flag_a, _flag_b)) goto L_4200605F; /* 0x4200605B: jne 0x4200605f */ 5096 L_4200605D: 5097 ecx = eax; /* 0x4200605D: mov ecx, eax */ 5098 L_4200605F: 5099 MEM32(eax + 0x4) = ecx; /* 0x4200605F: mov dword ptr [eax + 4], ecx */ 5100 ecx = MEM32(ebp + (-0x4)); /* 0x42006062: mov ecx, dword ptr [ebp - 4] */ 5101 MEM32(esi + 0x4) = eax; /* 0x42006065: mov dword ptr [esi + 4], eax */ 5102 edx = MEM32(eax + 0x4); /* 0x42006068: mov edx, dword ptr [eax + 4] */ 5103 MEM32(edx) = eax; /* 0x4200606B: mov dword ptr [edx], eax */ 5104 PUSH32(esp, ecx); /* 0x4200606D: push ecx */ 5105 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(8); 5106 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5107 eax = eax + 8; /* 0x4200606E: add eax, 8 */ 5108 _flag_k = FK_ADD; 5109 PUSH32(esp, eax); /* 0x42006071: push eax */ 5110 RECOMP_ICALL(0x4200E130u); /* 0x42006072: call 0x4200e130 */ /* not lifted */ 5111 RECOMP_FLAGS_IN(); 5112 _flag_a = (uint32_t)(MEM32(ebx + 0x8)); _flag_b = (uint32_t)(1); 5113 MEM32(ebx + 0x8) = MEM32(ebx + 0x8) + 1; /* 0x42006077: inc dword ptr [ebx + 8] */ 5114 _flag_k = FK_INC; 5115 eax = MEM32(edi); /* 0x4200607A: mov eax, dword ptr [edi] */ 5116 edx = MEM32(eax + 0x4); /* 0x4200607C: mov edx, dword ptr [eax + 4] */ 5117 ecx = MEM32(eax); /* 0x4200607F: mov ecx, dword ptr [eax] */ 5118 MEM32(edx) = ecx; /* 0x42006081: mov dword ptr [edx], ecx */ 5119 edx = MEM32(eax); /* 0x42006083: mov edx, dword ptr [eax] */ 5120 ecx = MEM32(eax + 0x4); /* 0x42006085: mov ecx, dword ptr [eax + 4] */ 5121 PUSH32(esp, eax); /* 0x42006088: push eax */ 5122 MEM32(edx + 0x4) = ecx; /* 0x42006089: mov dword ptr [edx + 4], ecx */ 5123 RECOMP_ICALL(0x42016DD0u); /* 0x4200608C: call 0x42016dd0 */ /* not lifted */ 5124 RECOMP_FLAGS_IN(); 5125 edx = MEM32(ebx + 0x8); /* 0x42006091: mov edx, dword ptr [ebx + 8] */ 5126 ecx = MEM32(ebp + 0x8); /* 0x42006094: mov ecx, dword ptr [ebp + 8] */ 5127 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 5128 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5129 esp = esp + 0xCu; /* 0x42006097: add esp, 0xc */ 5130 _flag_k = FK_ADD; 5131 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1); 5132 edx = edx - 1; /* 0x4200609A: dec edx */ 5133 _flag_k = FK_DEC; 5134 MEM32(ebp + 0xC) = esi; /* 0x4200609B: mov dword ptr [ebp + 0xc], esi */ 5135 MEM32(ebx + 0x8) = edx; /* 0x4200609E: mov dword ptr [ebx + 8], edx */ 5136 edx = MEM32(esi + 0x4); /* 0x420060A1: mov edx, dword ptr [esi + 4] */ 5137 eax = ebp + 0xC; /* 0x420060A4: lea eax, [ebp + 0xc] */ 5138 PUSH32(esp, eax); /* 0x420060A7: push eax */ 5139 MEM32(ebp + 0xC) = edx; /* 0x420060A8: mov dword ptr [ebp + 0xc], edx */ 5140 RECOMP_ICALL(0x42006CA0u); /* 0x420060AB: call 0x42006ca0 */ /* not lifted */ 5141 RECOMP_FLAGS_IN(); 5142 edi = POP32_VAL(esp); /* 0x420060B0: pop edi */ 5143 esi = POP32_VAL(esp); /* 0x420060B1: pop esi */ 5144 ebx = POP32_VAL(esp); /* 0x420060B2: pop ebx */ 5145 esp = ebp; /* 0x420060B3: mov esp, ebp */ 5146 ebp = POP32_VAL(esp); /* 0x420060B5: pop ebp */ 5147 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x420060B6: ret 0xc */ 5148 L_420060B9: 5149 edx = MEM32(ebp + 0x10); /* 0x420060B9: mov edx, dword ptr [ebp + 0x10] */ 5150 { float _v = (float)fp_pop(); *(float*)ADDR(ecx + 0x8) = _v; } /* 0x420060BC: fstp dword ptr [ecx + 8] */ 5151 ecx = MEM32(edi); /* 0x420060BF: mov ecx, dword ptr [edi] */ 5152 MEM32(ecx + 0x10) = edx; /* 0x420060C1: mov dword ptr [ecx + 0x10], edx */ 5153 eax = MEM32(edi); /* 0x420060C4: mov eax, dword ptr [edi] */ 5154 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(8); 5155 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5156 eax = eax + 8; /* 0x420060C6: add eax, 8 */ 5157 _flag_k = FK_ADD; 5158 MEM32(ebp + (-0x4)) = eax; /* 0x420060C9: mov dword ptr [ebp - 4], eax */ 5159 eax = MEM32(esi + 0x4); /* 0x420060CC: mov eax, dword ptr [esi + 4] */ 5160 PUSH32(esp, 0x14u); /* 0x420060CF: push 0x14 */ 5161 MEM32(ebp + 0x10) = eax; /* 0x420060D1: mov dword ptr [ebp + 0x10], eax */ 5162 RECOMP_ICALL(0x42016F36u); /* 0x420060D4: call 0x42016f36 */ /* not lifted */ 5163 RECOMP_FLAGS_IN(); 5164 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5165 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5166 esp = esp + 4; /* 0x420060D9: add esp, 4 */ 5167 _flag_k = FK_ADD; 5168 /* test esi, esi */ /* 0x420060DC: test esi, esi */ 5169 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 5170 _cf = 0; 5171 _flag_k = FK_TEST; 5172 ecx = esi; /* 0x420060DE: mov ecx, esi */ 5173 if (TEST_NZ(_flag_a, _flag_b)) goto L_420060E4; /* 0x420060E0: jne 0x420060e4 */ 5174 L_420060E2: 5175 ecx = eax; /* 0x420060E2: mov ecx, eax */ 5176 L_420060E4: 5177 MEM32(eax) = ecx; /* 0x420060E4: mov dword ptr [eax], ecx */ 5178 ecx = MEM32(ebp + 0x10); /* 0x420060E6: mov ecx, dword ptr [ebp + 0x10] */ 5179 /* test ecx, ecx */ /* 0x420060E9: test ecx, ecx */ 5180 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 5181 _cf = 0; 5182 _flag_k = FK_TEST; 5183 if (TEST_NZ(_flag_a, _flag_b)) goto L_420060EF; /* 0x420060EB: jne 0x420060ef */ 5184 L_420060ED: 5185 ecx = eax; /* 0x420060ED: mov ecx, eax */ 5186 L_420060EF: 5187 MEM32(eax + 0x4) = ecx; /* 0x420060EF: mov dword ptr [eax + 4], ecx */ 5188 MEM32(esi + 0x4) = eax; /* 0x420060F2: mov dword ptr [esi + 4], eax */ 5189 ecx = MEM32(eax + 0x4); /* 0x420060F5: mov ecx, dword ptr [eax + 4] */ 5190 MEM32(ecx) = eax; /* 0x420060F8: mov dword ptr [ecx], eax */ 5191 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(8); 5192 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5193 eax = eax + 8; /* 0x420060FA: add eax, 8 */ 5194 _flag_k = FK_ADD; 5195 /* test eax, eax */ /* 0x420060FD: test eax, eax */ 5196 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5197 _cf = 0; 5198 _flag_k = FK_TEST; 5199 if (TEST_Z(_flag_a, _flag_b)) goto L_42006114; /* 0x420060FF: je 0x42006114 */ 5200 L_42006101: 5201 ecx = MEM32(ebp + (-0x4)); /* 0x42006101: mov ecx, dword ptr [ebp - 4] */ 5202 edx = MEM32(ecx); /* 0x42006104: mov edx, dword ptr [ecx] */ 5203 MEM32(eax) = edx; /* 0x42006106: mov dword ptr [eax], edx */ 5204 edx = MEM32(ecx + 0x4); /* 0x42006108: mov edx, dword ptr [ecx + 4] */ 5205 MEM32(eax + 0x4) = edx; /* 0x4200610B: mov dword ptr [eax + 4], edx */ 5206 ecx = MEM32(ecx + 0x8); /* 0x4200610E: mov ecx, dword ptr [ecx + 8] */ 5207 MEM32(eax + 0x8) = ecx; /* 0x42006111: mov dword ptr [eax + 8], ecx */ 5208 L_42006114: 5209 _flag_a = (uint32_t)(MEM32(ebx + 0x8)); _flag_b = (uint32_t)(1); 5210 MEM32(ebx + 0x8) = MEM32(ebx + 0x8) + 1; /* 0x42006114: inc dword ptr [ebx + 8] */ 5211 _flag_k = FK_INC; 5212 edi = MEM32(edi); /* 0x42006117: mov edi, dword ptr [edi] */ 5213 edx = MEM32(edi + 0x4); /* 0x42006119: mov edx, dword ptr [edi + 4] */ 5214 eax = MEM32(edi); /* 0x4200611C: mov eax, dword ptr [edi] */ 5215 MEM32(edx) = eax; /* 0x4200611E: mov dword ptr [edx], eax */ 5216 ecx = MEM32(edi); /* 0x42006120: mov ecx, dword ptr [edi] */ 5217 edx = MEM32(edi + 0x4); /* 0x42006122: mov edx, dword ptr [edi + 4] */ 5218 PUSH32(esp, edi); /* 0x42006125: push edi */ 5219 MEM32(ecx + 0x4) = edx; /* 0x42006126: mov dword ptr [ecx + 4], edx */ 5220 RECOMP_ICALL(0x42016DD0u); /* 0x42006129: call 0x42016dd0 */ /* not lifted */ 5221 RECOMP_FLAGS_IN(); 5222 ecx = MEM32(ebx + 0x8); /* 0x4200612E: mov ecx, dword ptr [ebx + 8] */ 5223 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5224 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5225 esp = esp + 4; /* 0x42006131: add esp, 4 */ 5226 _flag_k = FK_ADD; 5227 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 5228 ecx = ecx - 1; /* 0x42006134: dec ecx */ 5229 _flag_k = FK_DEC; 5230 MEM32(ebx + 0x8) = ecx; /* 0x42006135: mov dword ptr [ebx + 8], ecx */ 5231 MEM32(ebp + 0xC) = esi; /* 0x42006138: mov dword ptr [ebp + 0xc], esi */ 5232 eax = MEM32(esi + 0x4); /* 0x4200613B: mov eax, dword ptr [esi + 4] */ 5233 ecx = ebp + 0xC; /* 0x4200613E: lea ecx, [ebp + 0xc] */ 5234 PUSH32(esp, ecx); /* 0x42006141: push ecx */ 5235 ecx = MEM32(ebp + 0x8); /* 0x42006142: mov ecx, dword ptr [ebp + 8] */ 5236 MEM32(ebp + 0xC) = eax; /* 0x42006145: mov dword ptr [ebp + 0xc], eax */ 5237 RECOMP_ICALL(0x42006CA0u); /* 0x42006148: call 0x42006ca0 */ /* not lifted */ 5238 RECOMP_FLAGS_IN(); 5239 edi = POP32_VAL(esp); /* 0x4200614D: pop edi */ 5240 esi = POP32_VAL(esp); /* 0x4200614E: pop esi */ 5241 ebx = POP32_VAL(esp); /* 0x4200614F: pop ebx */ 5242 esp = ebp; /* 0x42006150: mov esp, ebp */ 5243 ebp = POP32_VAL(esp); /* 0x42006152: pop ebp */ 5244 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x42006153: ret 0xc */ 5245 RECOMP_REGS_OUT(); 5246 } 5247 5248 void sub_42006160(void) { 5249 int _fpu_cmp = 0; 5250 uint32_t _cf = 0; 5251 int _df = 1; 5252 uint32_t _flag_k = FK_NONE; 5253 uint32_t _flag_a = 0, _flag_b = 0; 5254 uint32_t _itail_tgt = 0; 5255 RECOMP_REGS_LOCALS 5256 RECOMP_ENTER(0x42006160u); 5257 5258 L_42006160: 5259 eax = MEM32(ecx + 0x8); /* 0x42006160: mov eax, dword ptr [ecx + 8] */ 5260 /* test eax, eax */ /* 0x42006163: test eax, eax */ 5261 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5262 _cf = 0; 5263 _flag_k = FK_TEST; 5264 if (TEST_Z(_flag_a, _flag_b)) goto L_42006178; /* 0x42006165: je 0x42006178 */ 5265 L_42006167: 5266 ecx = MEM32(ecx + 0x4); /* 0x42006167: mov ecx, dword ptr [ecx + 4] */ 5267 eax = MEM32(ecx); /* 0x4200616A: mov eax, dword ptr [ecx] */ 5268 eax = MEM32(eax); /* 0x4200616C: mov eax, dword ptr [eax] */ 5269 /* cmp eax, ecx */ /* 0x4200616E: cmp eax, ecx */ 5270 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 5271 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5272 _flag_k = FK_CMP; 5273 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006178; /* 0x42006170: je 0x42006178 */ 5274 L_42006172: 5275 eax = MEM32(eax); /* 0x42006172: mov eax, dword ptr [eax] */ 5276 /* cmp eax, ecx */ /* 0x42006174: cmp eax, ecx */ 5277 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 5278 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5279 _flag_k = FK_CMP; 5280 RECOMP_BACKEDGE(); 5281 if (CMP_NE(_flag_a, _flag_b)) goto L_42006172; /* 0x42006176: jne 0x42006172 */ 5282 L_42006178: 5283 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42006178: ret */ 5284 RECOMP_REGS_OUT(); 5285 } 5286 5287 void sub_42006180(void) { 5288 int _fpu_cmp = 0; 5289 uint32_t _cf = 0; 5290 int _df = 1; 5291 uint32_t _flag_k = FK_NONE; 5292 uint32_t _flag_a = 0, _flag_b = 0; 5293 uint32_t _itail_tgt = 0; 5294 RECOMP_REGS_LOCALS 5295 RECOMP_ENTER(0x42006180u); 5296 5297 L_42006180: 5298 PUSH32(esp, ebp); /* 0x42006180: push ebp */ 5299 ebp = esp; /* 0x42006181: mov ebp, esp */ 5300 PUSH32(esp, ecx); /* 0x42006183: push ecx */ 5301 PUSH32(esp, esi); /* 0x42006184: push esi */ 5302 esi = MEM32(ecx + 0x4); /* 0x42006185: mov esi, dword ptr [ecx + 4] */ 5303 edx = MEM32(esi); /* 0x42006188: mov edx, dword ptr [esi] */ 5304 /* cmp edx, esi */ /* 0x4200618A: cmp edx, esi */ 5305 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(esi); 5306 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5307 _flag_k = FK_CMP; 5308 if (CMP_EQ(_flag_a, _flag_b)) goto L_420061C8; /* 0x4200618C: je 0x420061c8 */ 5309 L_4200618E: 5310 PUSH32(esp, edi); /* 0x4200618E: push edi */ 5311 L_4200618F: 5312 fp_push(*(float*)&MEM32(edx + 0x10)); /* 0x4200618F: fld dword ptr [edx + 0x10] */ 5313 edi = MEM32(edx); /* 0x42006192: mov edi, dword ptr [edx] */ 5314 _st[0] += (double)*(float*)ADDR(edx + 0x8); /* 0x42006194: fadd dword ptr [edx + 8] */ 5315 ecx = edi; /* 0x42006197: mov ecx, edi */ 5316 /* cmp ecx, esi */ /* 0x42006199: cmp ecx, esi */ 5317 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi); 5318 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5319 _flag_k = FK_CMP; 5320 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x4200619B: fstp dword ptr [ebp - 4] */ 5321 if (CMP_EQ(_flag_a, _flag_b)) goto L_420061C1; /* 0x4200619E: je 0x420061c1 */ 5322 L_420061A0: 5323 fp_push(*(float*)&MEM32(ecx + 0x8)); /* 0x420061A0: fld dword ptr [ecx + 8] */ 5324 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edx + 0x8)); /* 0x420061A3: fcom dword ptr [edx + 8] */ 5325 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x420061A6: fnstsw ax */ 5326 /* test HI8(eax), 1 */ /* 0x420061A8: test ah, 1 */ 5327 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5328 _cf = 0; 5329 _flag_k = FK_NARROW(FK_TEST, 24); 5330 if (TEST_NZ(_flag_a, _flag_b)) goto L_420061BF; /* 0x420061AB: jne 0x420061bf */ 5331 L_420061AD: 5332 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + (-0x4))); /* 0x420061AD: fcomp dword ptr [ebp - 4] */ 5333 fp_pop(); 5334 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x420061B0: fnstsw ax */ 5335 /* test HI8(eax), 1 */ /* 0x420061B2: test ah, 1 */ 5336 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5337 _cf = 0; 5338 _flag_k = FK_NARROW(FK_TEST, 24); 5339 if (TEST_Z(_flag_a, _flag_b)) goto L_420061C1; /* 0x420061B5: je 0x420061c1 */ 5340 L_420061B7: 5341 ecx = MEM32(ecx); /* 0x420061B7: mov ecx, dword ptr [ecx] */ 5342 /* cmp ecx, esi */ /* 0x420061B9: cmp ecx, esi */ 5343 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi); 5344 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5345 _flag_k = FK_CMP; 5346 RECOMP_BACKEDGE(); 5347 if (CMP_NE(_flag_a, _flag_b)) goto L_420061A0; /* 0x420061BB: jne 0x420061a0 */ 5348 L_420061BD: 5349 goto L_420061C1; /* 0x420061BD: jmp 0x420061c1 */ 5350 L_420061BF: 5351 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x420061BF: fstp st(0) */ 5352 L_420061C1: 5353 edx = edi; /* 0x420061C1: mov edx, edi */ 5354 /* cmp edx, esi */ /* 0x420061C3: cmp edx, esi */ 5355 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(esi); 5356 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5357 _flag_k = FK_CMP; 5358 RECOMP_BACKEDGE(); 5359 if (CMP_NE(_flag_a, _flag_b)) goto L_4200618F; /* 0x420061C5: jne 0x4200618f */ 5360 L_420061C7: 5361 edi = POP32_VAL(esp); /* 0x420061C7: pop edi */ 5362 L_420061C8: 5363 esi = POP32_VAL(esp); /* 0x420061C8: pop esi */ 5364 esp = ebp; /* 0x420061C9: mov esp, ebp */ 5365 ebp = POP32_VAL(esp); /* 0x420061CB: pop ebp */ 5366 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x420061CC: ret 4 */ 5367 RECOMP_REGS_OUT(); 5368 } 5369 5370 void sub_420061D0(void) { 5371 int _fpu_cmp = 0; 5372 uint32_t _cf = 0; 5373 int _df = 1; 5374 uint32_t _flag_k = FK_NONE; 5375 uint32_t _flag_a = 0, _flag_b = 0; 5376 uint32_t _itail_tgt = 0; 5377 RECOMP_REGS_LOCALS 5378 RECOMP_ENTER(0x420061D0u); 5379 5380 L_420061D0: 5381 PUSH32(esp, ebp); /* 0x420061D0: push ebp */ 5382 ebp = esp; /* 0x420061D1: mov ebp, esp */ 5383 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 5384 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5385 esp = esp - 0xCu; /* 0x420061D3: sub esp, 0xc */ 5386 _flag_k = FK_CMP; 5387 eax = MEM32(ecx + 0x4); /* 0x420061D6: mov eax, dword ptr [ecx + 4] */ 5388 PUSH32(esp, edi); /* 0x420061D9: push edi */ 5389 edi = MEM32(eax); /* 0x420061DA: mov edi, dword ptr [eax] */ 5390 /* cmp edi, eax */ /* 0x420061DC: cmp edi, eax */ 5391 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 5392 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5393 _flag_k = FK_CMP; 5394 MEM32(ebp + (-0xC)) = ecx; /* 0x420061DE: mov dword ptr [ebp - 0xc], ecx */ 5395 if (CMP_EQ(_flag_a, _flag_b)) goto L_420062B3; /* 0x420061E1: je 0x420062b3 */ 5396 L_420061E7: 5397 PUSH32(esp, ebx); /* 0x420061E7: push ebx */ 5398 ebx = MEM32(ebp + 0x8); /* 0x420061E8: mov ebx, dword ptr [ebp + 8] */ 5399 PUSH32(esp, esi); /* 0x420061EB: push esi */ 5400 L_420061EC: 5401 fp_push(*(float*)&MEM32(edi + 0x10)); /* 0x420061EC: fld dword ptr [edi + 0x10] */ 5402 esi = MEM32(edi); /* 0x420061EF: mov esi, dword ptr [edi] */ 5403 /* cmp esi, eax */ /* 0x420061F1: cmp esi, eax */ 5404 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 5405 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5406 _flag_k = FK_CMP; 5407 _st[0] += (double)*(float*)ADDR(edi + 0x8); /* 0x420061F3: fadd dword ptr [edi + 8] */ 5408 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x420061F6: fstp dword ptr [ebp - 4] */ 5409 if (CMP_EQ(_flag_a, _flag_b)) goto L_420062A4; /* 0x420061F9: je 0x420062a4 */ 5410 L_420061FF: 5411 fp_push(*(float*)&MEM32(esi + 0x8)); /* 0x420061FF: fld dword ptr [esi + 8] */ 5412 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edi + 0x8)); /* 0x42006202: fcom dword ptr [edi + 8] */ 5413 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x42006205: fnstsw ax */ 5414 /* test HI8(eax), 1 */ /* 0x42006207: test ah, 1 */ 5415 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5416 _cf = 0; 5417 _flag_k = FK_NARROW(FK_TEST, 24); 5418 if (TEST_NZ(_flag_a, _flag_b)) goto L_420062A2; /* 0x4200620A: jne 0x420062a2 */ 5419 L_42006210: 5420 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + (-0x4))); /* 0x42006210: fcomp dword ptr [ebp - 4] */ 5421 fp_pop(); 5422 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x42006213: fnstsw ax */ 5423 /* test HI8(eax), 1 */ /* 0x42006215: test ah, 1 */ 5424 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5425 _cf = 0; 5426 _flag_k = FK_NARROW(FK_TEST, 24); 5427 if (TEST_Z(_flag_a, _flag_b)) goto L_420062A4; /* 0x42006218: je 0x420062a4 */ 5428 L_4200621E: 5429 /* test ebx, ebx */ /* 0x4200621E: test ebx, ebx */ 5430 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx); 5431 _cf = 0; 5432 _flag_k = FK_TEST; 5433 if (TEST_Z(_flag_a, _flag_b)) goto L_42006292; /* 0x42006220: je 0x42006292 */ 5434 L_42006222: 5435 ecx = MEM32(edi + 0xC); /* 0x42006222: mov ecx, dword ptr [edi + 0xc] */ 5436 eax = MEM32(ecx); /* 0x42006225: mov eax, dword ptr [ecx] */ 5437 ebx = MEM32(esi + 0xC); /* 0x42006227: mov ebx, dword ptr [esi + 0xc] */ 5438 RECOMP_ICALL(MEM32(eax + 0xC)); /* 0x4200622A: call dword ptr [eax + 0xc] */ 5439 RECOMP_FLAGS_IN(); 5440 edx = eax; /* 0x4200622D: mov edx, eax */ 5441 eax = MEM32(ebx); /* 0x4200622F: mov eax, dword ptr [ebx] */ 5442 ecx = ebx; /* 0x42006231: mov ecx, ebx */ 5443 MEM32(ebp + (-0x8)) = edx; /* 0x42006233: mov dword ptr [ebp - 8], edx */ 5444 RECOMP_ICALL(MEM32(eax + 0xC)); /* 0x42006236: call dword ptr [eax + 0xc] */ 5445 RECOMP_FLAGS_IN(); 5446 fp_push(*(float*)&MEM32(eax + 0x8)); /* 0x42006239: fld dword ptr [eax + 8] */ 5447 _st[0] -= (double)*(float*)ADDR(0x42018434); /* 0x4200623C: fsub dword ptr [0x42018434] */ 5448 ecx = MEM32(ebp + (-0x8)); /* 0x42006242: mov ecx, dword ptr [ebp - 8] */ 5449 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ecx + 0x8)); /* 0x42006245: fcomp dword ptr [ecx + 8] */ 5450 fp_pop(); 5451 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x42006248: fnstsw ax */ 5452 /* test HI8(eax), 1 */ /* 0x4200624A: test ah, 1 */ 5453 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5454 _cf = 0; 5455 _flag_k = FK_NARROW(FK_TEST, 24); 5456 if (TEST_Z(_flag_a, _flag_b)) goto L_4200628F; /* 0x4200624D: je 0x4200628f */ 5457 L_4200624F: 5458 ecx = MEM32(edi + 0xC); /* 0x4200624F: mov ecx, dword ptr [edi + 0xc] */ 5459 edx = MEM32(ecx); /* 0x42006252: mov edx, dword ptr [ecx] */ 5460 ebx = MEM32(esi + 0xC); /* 0x42006254: mov ebx, dword ptr [esi + 0xc] */ 5461 RECOMP_ICALL(MEM32(edx + 0xC)); /* 0x42006257: call dword ptr [edx + 0xc] */ 5462 RECOMP_FLAGS_IN(); 5463 edx = eax; /* 0x4200625A: mov edx, eax */ 5464 eax = MEM32(ebx); /* 0x4200625C: mov eax, dword ptr [ebx] */ 5465 ecx = ebx; /* 0x4200625E: mov ecx, ebx */ 5466 MEM32(ebp + (-0x8)) = edx; /* 0x42006260: mov dword ptr [ebp - 8], edx */ 5467 RECOMP_ICALL(MEM32(eax + 0xC)); /* 0x42006263: call dword ptr [eax + 0xc] */ 5468 RECOMP_FLAGS_IN(); 5469 fp_push(*(float*)&MEM32(eax + 0x8)); /* 0x42006266: fld dword ptr [eax + 8] */ 5470 _st[0] += (double)*(float*)ADDR(0x42018434); /* 0x42006269: fadd dword ptr [0x42018434] */ 5471 ecx = MEM32(ebp + (-0x8)); /* 0x4200626F: mov ecx, dword ptr [ebp - 8] */ 5472 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ecx + 0x8)); /* 0x42006272: fcomp dword ptr [ecx + 8] */ 5473 fp_pop(); 5474 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x42006275: fnstsw ax */ 5475 /* test HI8(eax), 0x41u */ /* 0x42006277: test ah, 0x41 */ 5476 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 5477 _cf = 0; 5478 _flag_k = FK_NARROW(FK_TEST, 24); 5479 if (TEST_NZ(_flag_a, _flag_b)) goto L_4200628F; /* 0x4200627A: jne 0x4200628f */ 5480 L_4200627C: 5481 eax = MEM32(esi + 0xC); /* 0x4200627C: mov eax, dword ptr [esi + 0xc] */ 5482 ecx = MEM32(edi + 0xC); /* 0x4200627F: mov ecx, dword ptr [edi + 0xc] */ 5483 ebx = MEM32(ebp + 0x8); /* 0x42006282: mov ebx, dword ptr [ebp + 8] */ 5484 edx = MEM32(ebx); /* 0x42006285: mov edx, dword ptr [ebx] */ 5485 PUSH32(esp, eax); /* 0x42006287: push eax */ 5486 PUSH32(esp, ecx); /* 0x42006288: push ecx */ 5487 ecx = ebx; /* 0x42006289: mov ecx, ebx */ 5488 RECOMP_ICALL(MEM32(edx)); /* 0x4200628B: call dword ptr [edx] */ 5489 RECOMP_FLAGS_IN(); 5490 goto L_42006292; /* 0x4200628D: jmp 0x42006292 */ 5491 L_4200628F: 5492 ebx = MEM32(ebp + 0x8); /* 0x4200628F: mov ebx, dword ptr [ebp + 8] */ 5493 L_42006292: 5494 ecx = MEM32(ebp + (-0xC)); /* 0x42006292: mov ecx, dword ptr [ebp - 0xc] */ 5495 esi = MEM32(esi); /* 0x42006295: mov esi, dword ptr [esi] */ 5496 /* cmp esi, MEM32(ecx + 0x4) */ /* 0x42006297: cmp esi, dword ptr [ecx + 4] */ 5497 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(ecx + 0x4)); 5498 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5499 _flag_k = FK_CMP; 5500 RECOMP_BACKEDGE(); 5501 if (CMP_NE(_flag_a, _flag_b)) goto L_420061FF; /* 0x4200629A: jne 0x420061ff */ 5502 L_420062A0: 5503 goto L_420062A4; /* 0x420062A0: jmp 0x420062a4 */ 5504 L_420062A2: 5505 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x420062A2: fstp st(0) */ 5506 L_420062A4: 5507 edi = MEM32(edi); /* 0x420062A4: mov edi, dword ptr [edi] */ 5508 eax = MEM32(ecx + 0x4); /* 0x420062A6: mov eax, dword ptr [ecx + 4] */ 5509 /* cmp edi, eax */ /* 0x420062A9: cmp edi, eax */ 5510 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 5511 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5512 _flag_k = FK_CMP; 5513 RECOMP_BACKEDGE(); 5514 if (CMP_NE(_flag_a, _flag_b)) goto L_420061EC; /* 0x420062AB: jne 0x420061ec */ 5515 L_420062B1: 5516 esi = POP32_VAL(esp); /* 0x420062B1: pop esi */ 5517 ebx = POP32_VAL(esp); /* 0x420062B2: pop ebx */ 5518 L_420062B3: 5519 edi = POP32_VAL(esp); /* 0x420062B3: pop edi */ 5520 esp = ebp; /* 0x420062B4: mov esp, ebp */ 5521 ebp = POP32_VAL(esp); /* 0x420062B6: pop ebp */ 5522 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x420062B7: ret 4 */ 5523 RECOMP_REGS_OUT(); 5524 } 5525 5526 void sub_420062C0(void) { 5527 int _fpu_cmp = 0; 5528 uint32_t _cf = 0; 5529 int _df = 1; 5530 uint32_t _flag_k = FK_NONE; 5531 uint32_t _flag_a = 0, _flag_b = 0; 5532 uint32_t _itail_tgt = 0; 5533 RECOMP_REGS_LOCALS 5534 RECOMP_ENTER(0x420062C0u); 5535 5536 L_420062C0: 5537 PUSH32(esp, ebp); /* 0x420062C0: push ebp */ 5538 ebp = esp; /* 0x420062C1: mov ebp, esp */ 5539 PUSH32(esp, 0x14u); /* 0x420062C3: push 0x14 */ 5540 RECOMP_ICALL(0x42016F36u); /* 0x420062C5: call 0x42016f36 */ /* not lifted */ 5541 RECOMP_FLAGS_IN(); 5542 ecx = MEM32(ebp + 0x8); /* 0x420062CA: mov ecx, dword ptr [ebp + 8] */ 5543 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5544 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5545 esp = esp + 4; /* 0x420062CD: add esp, 4 */ 5546 _flag_k = FK_ADD; 5547 /* test ecx, ecx */ /* 0x420062D0: test ecx, ecx */ 5548 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 5549 _cf = 0; 5550 _flag_k = FK_TEST; 5551 if (TEST_NZ(_flag_a, _flag_b)) goto L_420062D6; /* 0x420062D2: jne 0x420062d6 */ 5552 L_420062D4: 5553 ecx = eax; /* 0x420062D4: mov ecx, eax */ 5554 L_420062D6: 5555 MEM32(eax) = ecx; /* 0x420062D6: mov dword ptr [eax], ecx */ 5556 ecx = MEM32(ebp + 0xC); /* 0x420062D8: mov ecx, dword ptr [ebp + 0xc] */ 5557 /* test ecx, ecx */ /* 0x420062DB: test ecx, ecx */ 5558 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 5559 _cf = 0; 5560 _flag_k = FK_TEST; 5561 if (TEST_Z(_flag_a, _flag_b)) goto L_420062E6; /* 0x420062DD: je 0x420062e6 */ 5562 L_420062DF: 5563 MEM32(eax + 0x4) = ecx; /* 0x420062DF: mov dword ptr [eax + 4], ecx */ 5564 ebp = POP32_VAL(esp); /* 0x420062E2: pop ebp */ 5565 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x420062E3: ret 8 */ 5566 L_420062E6: 5567 MEM32(eax + 0x4) = eax; /* 0x420062E6: mov dword ptr [eax + 4], eax */ 5568 ebp = POP32_VAL(esp); /* 0x420062E9: pop ebp */ 5569 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x420062EA: ret 8 */ 5570 RECOMP_REGS_OUT(); 5571 } 5572 5573 void sub_420062F0(void) { 5574 int _fpu_cmp = 0; 5575 uint32_t _cf = 0; 5576 int _df = 1; 5577 uint32_t _flag_k = FK_NONE; 5578 uint32_t _flag_a = 0, _flag_b = 0; 5579 uint32_t _itail_tgt = 0; 5580 RECOMP_REGS_LOCALS 5581 RECOMP_ENTER(0x420062F0u); 5582 5583 L_420062F0: 5584 PUSH32(esp, ebp); /* 0x420062F0: push ebp */ 5585 ebp = esp; /* 0x420062F1: mov ebp, esp */ 5586 edx = MEM32(ecx); /* 0x420062F3: mov edx, dword ptr [ecx] */ 5587 eax = MEM32(edx); /* 0x420062F5: mov eax, dword ptr [edx] */ 5588 MEM32(ecx) = eax; /* 0x420062F7: mov dword ptr [ecx], eax */ 5589 eax = MEM32(ebp + 0x8); /* 0x420062F9: mov eax, dword ptr [ebp + 8] */ 5590 MEM32(eax) = edx; /* 0x420062FC: mov dword ptr [eax], edx */ 5591 ebp = POP32_VAL(esp); /* 0x420062FE: pop ebp */ 5592 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x420062FF: ret 8 */ 5593 RECOMP_REGS_OUT(); 5594 } 5595 5596 void sub_42006310(void) { 5597 int _fpu_cmp = 0; 5598 uint32_t _cf = 0; 5599 int _df = 1; 5600 uint32_t _flag_k = FK_NONE; 5601 uint32_t _flag_a = 0, _flag_b = 0; 5602 uint32_t _itail_tgt = 0; 5603 RECOMP_REGS_LOCALS 5604 RECOMP_ENTER(0x42006310u); 5605 5606 L_42006310: 5607 RECOMP_ICALL(0x42006320u); /* 0x42006310: call 0x42006320 */ /* not lifted */ 5608 RECOMP_FLAGS_IN(); 5609 goto L_42006330; /* 0x42006315: jmp 0x42006330 */ 5610 L_42006330: 5611 PUSH32(esp, 0x42006340u); /* 0x42006330: push 0x42006340 */ 5612 RECOMP_ICALL(0x42016E07u); /* 0x42006335: call 0x42016e07 */ /* not lifted */ 5613 RECOMP_FLAGS_IN(); 5614 ecx = POP32_VAL(esp); /* 0x4200633A: pop ecx */ 5615 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4200633B: ret */ 5616 RECOMP_REGS_OUT(); 5617 } 5618 5619 void sub_42006320(void) { 5620 int _fpu_cmp = 0; 5621 uint32_t _cf = 0; 5622 int _df = 1; 5623 uint32_t _flag_k = FK_NONE; 5624 uint32_t _flag_a = 0, _flag_b = 0; 5625 uint32_t _itail_tgt = 0; 5626 RECOMP_REGS_LOCALS 5627 RECOMP_ENTER(0x42006320u); 5628 5629 L_42006320: 5630 ecx = 0x42023059u; /* 0x42006320: mov ecx, 0x42023059 */ 5631 L_42006325: 5632 { _itail_tgt = (uint32_t)(MEM32(0x42018014)); goto _ljump; } 5633 { RECOMP_REGS_OUT(); return; } /* end of function */ 5634 _ljump: 5635 switch (_itail_tgt) { 5636 case 0x42006320u: goto L_42006320; 5637 case 0x42006325u: goto L_42006325; 5638 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 5639 } 5640 RECOMP_REGS_OUT(); 5641 } 5642 5643 void sub_42006330(void) { 5644 int _fpu_cmp = 0; 5645 uint32_t _cf = 0; 5646 int _df = 1; 5647 uint32_t _flag_k = FK_NONE; 5648 uint32_t _flag_a = 0, _flag_b = 0; 5649 uint32_t _itail_tgt = 0; 5650 RECOMP_REGS_LOCALS 5651 RECOMP_ENTER(0x42006330u); 5652 5653 L_42006330: 5654 PUSH32(esp, 0x42006340u); /* 0x42006330: push 0x42006340 */ 5655 RECOMP_ICALL(0x42016E07u); /* 0x42006335: call 0x42016e07 */ /* not lifted */ 5656 RECOMP_FLAGS_IN(); 5657 ecx = POP32_VAL(esp); /* 0x4200633A: pop ecx */ 5658 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4200633B: ret */ 5659 RECOMP_REGS_OUT(); 5660 } 5661 5662 void sub_42006340(void) { 5663 int _fpu_cmp = 0; 5664 uint32_t _cf = 0; 5665 int _df = 1; 5666 uint32_t _flag_k = FK_NONE; 5667 uint32_t _flag_a = 0, _flag_b = 0; 5668 uint32_t _itail_tgt = 0; 5669 RECOMP_REGS_LOCALS 5670 RECOMP_ENTER(0x42006340u); 5671 5672 L_42006340: 5673 ecx = 0x42023059u; /* 0x42006340: mov ecx, 0x42023059 */ 5674 L_42006345: 5675 { _itail_tgt = (uint32_t)(MEM32(0x42018010)); goto _ljump; } 5676 { RECOMP_REGS_OUT(); return; } /* end of function */ 5677 _ljump: 5678 switch (_itail_tgt) { 5679 case 0x42006340u: goto L_42006340; 5680 case 0x42006345u: goto L_42006345; 5681 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 5682 } 5683 RECOMP_REGS_OUT(); 5684 } 5685 5686 void sub_42006350(void) { 5687 int _fpu_cmp = 0; 5688 uint32_t _cf = 0; 5689 int _df = 1; 5690 uint32_t _flag_k = FK_NONE; 5691 uint32_t _flag_a = 0, _flag_b = 0; 5692 uint32_t _itail_tgt = 0; 5693 RECOMP_REGS_LOCALS 5694 RECOMP_ENTER(0x42006350u); 5695 5696 L_42006350: 5697 RECOMP_ICALL(0x42006360u); /* 0x42006350: call 0x42006360 */ /* not lifted */ 5698 RECOMP_FLAGS_IN(); 5699 goto L_42006370; /* 0x42006355: jmp 0x42006370 */ 5700 L_42006370: 5701 PUSH32(esp, 0x42006380u); /* 0x42006370: push 0x42006380 */ 5702 RECOMP_ICALL(0x42016E07u); /* 0x42006375: call 0x42016e07 */ /* not lifted */ 5703 RECOMP_FLAGS_IN(); 5704 ecx = POP32_VAL(esp); /* 0x4200637A: pop ecx */ 5705 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4200637B: ret */ 5706 RECOMP_REGS_OUT(); 5707 } 5708 5709 void sub_42006360(void) { 5710 int _fpu_cmp = 0; 5711 uint32_t _cf = 0; 5712 int _df = 1; 5713 uint32_t _flag_k = FK_NONE; 5714 uint32_t _flag_a = 0, _flag_b = 0; 5715 uint32_t _itail_tgt = 0; 5716 RECOMP_REGS_LOCALS 5717 RECOMP_ENTER(0x42006360u); 5718 5719 L_42006360: 5720 ecx = 0x42023058u; /* 0x42006360: mov ecx, 0x42023058 */ 5721 L_42006365: 5722 { _itail_tgt = (uint32_t)(MEM32(0x42018008)); goto _ljump; } 5723 { RECOMP_REGS_OUT(); return; } /* end of function */ 5724 _ljump: 5725 switch (_itail_tgt) { 5726 case 0x42006360u: goto L_42006360; 5727 case 0x42006365u: goto L_42006365; 5728 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 5729 } 5730 RECOMP_REGS_OUT(); 5731 } 5732 5733 void sub_42006370(void) { 5734 int _fpu_cmp = 0; 5735 uint32_t _cf = 0; 5736 int _df = 1; 5737 uint32_t _flag_k = FK_NONE; 5738 uint32_t _flag_a = 0, _flag_b = 0; 5739 uint32_t _itail_tgt = 0; 5740 RECOMP_REGS_LOCALS 5741 RECOMP_ENTER(0x42006370u); 5742 5743 L_42006370: 5744 PUSH32(esp, 0x42006380u); /* 0x42006370: push 0x42006380 */ 5745 RECOMP_ICALL(0x42016E07u); /* 0x42006375: call 0x42016e07 */ /* not lifted */ 5746 RECOMP_FLAGS_IN(); 5747 ecx = POP32_VAL(esp); /* 0x4200637A: pop ecx */ 5748 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x4200637B: ret */ 5749 RECOMP_REGS_OUT(); 5750 } 5751 5752 void sub_42006380(void) { 5753 int _fpu_cmp = 0; 5754 uint32_t _cf = 0; 5755 int _df = 1; 5756 uint32_t _flag_k = FK_NONE; 5757 uint32_t _flag_a = 0, _flag_b = 0; 5758 uint32_t _itail_tgt = 0; 5759 RECOMP_REGS_LOCALS 5760 RECOMP_ENTER(0x42006380u); 5761 5762 L_42006380: 5763 ecx = 0x42023058u; /* 0x42006380: mov ecx, 0x42023058 */ 5764 L_42006385: 5765 { _itail_tgt = (uint32_t)(MEM32(0x4201800C)); goto _ljump; } 5766 { RECOMP_REGS_OUT(); return; } /* end of function */ 5767 _ljump: 5768 switch (_itail_tgt) { 5769 case 0x42006380u: goto L_42006380; 5770 case 0x42006385u: goto L_42006385; 5771 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 5772 } 5773 RECOMP_REGS_OUT(); 5774 } 5775 5776 void sub_42006390(void) { 5777 int _fpu_cmp = 0; 5778 uint32_t _cf = 0; 5779 int _df = 1; 5780 uint32_t _flag_k = FK_NONE; 5781 uint32_t _flag_a = 0, _flag_b = 0; 5782 uint32_t _itail_tgt = 0; 5783 RECOMP_REGS_LOCALS 5784 RECOMP_ENTER(0x42006390u); 5785 5786 L_42006390: 5787 PUSH32(esp, esi); /* 0x42006390: push esi */ 5788 esi = ecx; /* 0x42006391: mov esi, ecx */ 5789 RECOMP_ICALL(0x42007070u); /* 0x42006393: call 0x42007070 */ /* not lifted */ 5790 RECOMP_FLAGS_IN(); 5791 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5792 eax = 0; /* 0x42006398: xor eax, eax */ 5793 _cf = 0; 5794 _flag_k = FK_TEST; 5795 MEM32(esi + 0x8) = eax; /* 0x4200639A: mov dword ptr [esi + 8], eax */ 5796 MEM32(esi + 0x4) = 0xC61C3C00u; /* 0x4200639D: mov dword ptr [esi + 4], 0xc61c3c00 */ 5797 MEM32(esi + 0xC) = eax; /* 0x420063A4: mov dword ptr [esi + 0xc], eax */ 5798 MEM32(esi + 0x14) = eax; /* 0x420063A7: mov dword ptr [esi + 0x14], eax */ 5799 MEM32(esi + 0x10) = 0x3F800000u; /* 0x420063AA: mov dword ptr [esi + 0x10], 0x3f800000 */ 5800 MEM32(esi) = 0x42018128u; /* 0x420063B1: mov dword ptr [esi], 0x42018128 */ 5801 eax = esi; /* 0x420063B7: mov eax, esi */ 5802 esi = POP32_VAL(esp); /* 0x420063B9: pop esi */ 5803 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x420063BA: ret */ 5804 RECOMP_REGS_OUT(); 5805 } 5806 5807 void sub_420063C0(void) { 5808 int _fpu_cmp = 0; 5809 uint32_t _cf = 0; 5810 int _df = 1; 5811 uint32_t _flag_k = FK_NONE; 5812 uint32_t _flag_a = 0, _flag_b = 0; 5813 uint32_t _itail_tgt = 0; 5814 RECOMP_REGS_LOCALS 5815 RECOMP_ENTER(0x420063C0u); 5816 5817 L_420063C0: 5818 MEM32(ecx) = 0x42018128u; /* 0x420063C0: mov dword ptr [ecx], 0x42018128 */ 5819 goto L_42007080; /* 0x420063C6: jmp 0x42007080 */ 5820 L_42007080: 5821 MEM32(ecx) = 0x42018120u; /* 0x42007080: mov dword ptr [ecx], 0x42018120 */ 5822 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42007086: ret */ 5823 RECOMP_REGS_OUT(); 5824 } 5825 5826 void sub_420063D0(void) { 5827 int _fpu_cmp = 0; 5828 uint32_t _cf = 0; 5829 int _df = 1; 5830 uint32_t _flag_k = FK_NONE; 5831 uint32_t _flag_a = 0, _flag_b = 0; 5832 uint32_t _itail_tgt = 0; 5833 RECOMP_REGS_LOCALS 5834 RECOMP_ENTER(0x420063D0u); 5835 5836 L_420063D0: 5837 PUSH32(esp, ebp); /* 0x420063D0: push ebp */ 5838 ebp = esp; /* 0x420063D1: mov ebp, esp */ 5839 edx = MEM32(ebp + 0xC); /* 0x420063D3: mov edx, dword ptr [ebp + 0xc] */ 5840 eax = ecx; /* 0x420063D6: mov eax, ecx */ 5841 ecx = MEM32(ebp + 0x8); /* 0x420063D8: mov ecx, dword ptr [ebp + 8] */ 5842 MEM32(eax) = ecx; /* 0x420063DB: mov dword ptr [eax], ecx */ 5843 ecx = MEM32(ebp + 0x10); /* 0x420063DD: mov ecx, dword ptr [ebp + 0x10] */ 5844 MEM32(eax + 0x4) = edx; /* 0x420063E0: mov dword ptr [eax + 4], edx */ 5845 MEM32(eax + 0x8) = ecx; /* 0x420063E3: mov dword ptr [eax + 8], ecx */ 5846 ebp = POP32_VAL(esp); /* 0x420063E6: pop ebp */ 5847 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x420063E7: ret 0xc */ 5848 RECOMP_REGS_OUT(); 5849 } 5850 5851 void sub_420063F0(void) { 5852 int _fpu_cmp = 0; 5853 uint32_t _cf = 0; 5854 int _df = 1; 5855 uint32_t _flag_k = FK_NONE; 5856 uint32_t _flag_a = 0, _flag_b = 0; 5857 uint32_t _itail_tgt = 0; 5858 RECOMP_REGS_LOCALS 5859 RECOMP_ENTER(0x420063F0u); 5860 5861 L_420063F0: 5862 PUSH32(esp, ebp); /* 0x420063F0: push ebp */ 5863 ebp = esp; /* 0x420063F1: mov ebp, esp */ 5864 PUSH32(esp, esi); /* 0x420063F3: push esi */ 5865 PUSH32(esp, edi); /* 0x420063F4: push edi */ 5866 edi = MEM32(ebp + 0x8); /* 0x420063F5: mov edi, dword ptr [ebp + 8] */ 5867 SET_LO8(eax, MEM8(edi + 0x4)); /* 0x420063F8: mov al, byte ptr [edi + 4] */ 5868 esi = ecx; /* 0x420063FB: mov esi, ecx */ 5869 MEM8(esi + 0x4) = (uint8_t)(LO8(eax)); /* 0x420063FD: mov byte ptr [esi + 4], al */ 5870 ecx = MEM32(edi + 0x8); /* 0x42006400: mov ecx, dword ptr [edi + 8] */ 5871 /* test ecx, ecx */ /* 0x42006403: test ecx, ecx */ 5872 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 5873 _cf = 0; 5874 _flag_k = FK_TEST; 5875 if (TEST_NZ(_flag_a, _flag_b)) goto L_4200640B; /* 0x42006405: jne 0x4200640b */ 5876 L_42006407: 5877 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5878 eax = 0; /* 0x42006407: xor eax, eax */ 5879 _cf = 0; 5880 _flag_k = FK_TEST; 5881 goto L_42006413; /* 0x42006409: jmp 0x42006413 */ 5882 L_4200640B: 5883 eax = MEM32(edi + 0xC); /* 0x4200640B: mov eax, dword ptr [edi + 0xc] */ 5884 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 5885 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5886 eax = eax - ecx; /* 0x4200640E: sub eax, ecx */ 5887 _flag_k = FK_CMP; 5888 if (2u) _cf = (((eax) >> 1) & 1u); /* 0x42006410: sar eax, 2 */ 5889 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 5890 eax = (uint32_t)((int32_t)eax >> 2u); 5891 L_42006413: 5892 /* test eax, eax */ /* 0x42006413: test eax, eax */ 5893 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5894 _cf = 0; 5895 _flag_k = FK_TEST; 5896 if (TEST_NS(_flag_a, _flag_b)) goto L_42006419; /* 0x42006415: jge 0x42006419 */ 5897 L_42006417: 5898 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5899 eax = 0; /* 0x42006417: xor eax, eax */ 5900 _cf = 0; 5901 _flag_k = FK_TEST; 5902 L_42006419: 5903 ecx = eax * 4; /* 0x42006419: lea ecx, [eax*4] */ 5904 PUSH32(esp, ecx); /* 0x42006420: push ecx */ 5905 RECOMP_ICALL(0x42016F36u); /* 0x42006421: call 0x42016f36 */ /* not lifted */ 5906 RECOMP_FLAGS_IN(); 5907 MEM32(esi + 0x8) = eax; /* 0x42006426: mov dword ptr [esi + 8], eax */ 5908 edx = MEM32(edi + 0xC); /* 0x42006429: mov edx, dword ptr [edi + 0xc] */ 5909 ecx = eax; /* 0x4200642C: mov ecx, eax */ 5910 eax = MEM32(edi + 0x8); /* 0x4200642E: mov eax, dword ptr [edi + 8] */ 5911 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 5912 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5913 esp = esp + 4; /* 0x42006431: add esp, 4 */ 5914 _flag_k = FK_ADD; 5915 /* cmp eax, edx */ /* 0x42006434: cmp eax, edx */ 5916 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 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_4200644C; /* 0x42006436: je 0x4200644c */ 5920 L_42006438: 5921 PUSH32(esp, ebx); /* 0x42006438: push ebx */ 5922 L_42006439: 5923 /* test ecx, ecx */ /* 0x42006439: test ecx, ecx */ 5924 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 5925 _cf = 0; 5926 _flag_k = FK_TEST; 5927 if (TEST_Z(_flag_a, _flag_b)) goto L_42006441; /* 0x4200643B: je 0x42006441 */ 5928 L_4200643D: 5929 ebx = MEM32(eax); /* 0x4200643D: mov ebx, dword ptr [eax] */ 5930 MEM32(ecx) = ebx; /* 0x4200643F: mov dword ptr [ecx], ebx */ 5931 L_42006441: 5932 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 5933 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5934 eax = eax + 4; /* 0x42006441: add eax, 4 */ 5935 _flag_k = FK_ADD; 5936 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 5937 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5938 ecx = ecx + 4; /* 0x42006444: add ecx, 4 */ 5939 _flag_k = FK_ADD; 5940 /* cmp eax, edx */ /* 0x42006447: cmp eax, edx */ 5941 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 5942 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5943 _flag_k = FK_CMP; 5944 RECOMP_BACKEDGE(); 5945 if (CMP_NE(_flag_a, _flag_b)) goto L_42006439; /* 0x42006449: jne 0x42006439 */ 5946 L_4200644B: 5947 ebx = POP32_VAL(esp); /* 0x4200644B: pop ebx */ 5948 L_4200644C: 5949 MEM32(esi + 0xC) = ecx; /* 0x4200644C: mov dword ptr [esi + 0xc], ecx */ 5950 MEM32(esi + 0x10) = ecx; /* 0x4200644F: mov dword ptr [esi + 0x10], ecx */ 5951 edx = MEM32(edi + 0x14); /* 0x42006452: mov edx, dword ptr [edi + 0x14] */ 5952 edi = POP32_VAL(esp); /* 0x42006455: pop edi */ 5953 MEM32(esi + 0x14) = edx; /* 0x42006456: mov dword ptr [esi + 0x14], edx */ 5954 MEM32(esi) = 0x4201843Cu; /* 0x42006459: mov dword ptr [esi], 0x4201843c */ 5955 eax = esi; /* 0x4200645F: mov eax, esi */ 5956 esi = POP32_VAL(esp); /* 0x42006461: pop esi */ 5957 ebp = POP32_VAL(esp); /* 0x42006462: pop ebp */ 5958 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006463: ret 4 */ 5959 RECOMP_REGS_OUT(); 5960 } 5961 5962 void sub_42006470(void) { 5963 int _fpu_cmp = 0; 5964 uint32_t _cf = 0; 5965 int _df = 1; 5966 uint32_t _flag_k = FK_NONE; 5967 uint32_t _flag_a = 0, _flag_b = 0; 5968 uint32_t _itail_tgt = 0; 5969 RECOMP_REGS_LOCALS 5970 RECOMP_ENTER(0x42006470u); 5971 5972 L_42006470: 5973 PUSH32(esp, ebp); /* 0x42006470: push ebp */ 5974 ebp = esp; /* 0x42006471: mov ebp, esp */ 5975 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 5976 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5977 esp = esp - 8; /* 0x42006473: sub esp, 8 */ 5978 _flag_k = FK_CMP; 5979 PUSH32(esp, ebx); /* 0x42006476: push ebx */ 5980 eax = ecx; /* 0x42006477: mov eax, ecx */ 5981 ecx = MEM32(ebp + 0x8); /* 0x42006479: mov ecx, dword ptr [ebp + 8] */ 5982 PUSH32(esp, esi); /* 0x4200647C: push esi */ 5983 PUSH32(esp, edi); /* 0x4200647D: push edi */ 5984 edi = ecx + 0x4; /* 0x4200647E: lea edi, [ecx + 4] */ 5985 esi = eax + 0x4; /* 0x42006481: lea esi, [eax + 4] */ 5986 /* cmp esi, edi */ /* 0x42006484: cmp esi, edi */ 5987 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi); 5988 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5989 _flag_k = FK_CMP; 5990 MEM32(ebp + (-0x4)) = eax; /* 0x42006486: mov dword ptr [ebp - 4], eax */ 5991 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006614; /* 0x42006489: je 0x42006614 */ 5992 L_4200648F: 5993 eax = MEM32(edi + 0x4); /* 0x4200648F: mov eax, dword ptr [edi + 4] */ 5994 /* test eax, eax */ /* 0x42006492: test eax, eax */ 5995 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 5996 _cf = 0; 5997 _flag_k = FK_TEST; 5998 if (TEST_NZ(_flag_a, _flag_b)) goto L_4200649A; /* 0x42006494: jne 0x4200649a */ 5999 L_42006496: 6000 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6001 ebx = 0; /* 0x42006496: xor ebx, ebx */ 6002 _cf = 0; 6003 _flag_k = FK_TEST; 6004 goto L_420064A2; /* 0x42006498: jmp 0x420064a2 */ 6005 L_4200649A: 6006 ebx = MEM32(edi + 0x8); /* 0x4200649A: mov ebx, dword ptr [edi + 8] */ 6007 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 6008 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6009 ebx = ebx - eax; /* 0x4200649D: sub ebx, eax */ 6010 _flag_k = FK_CMP; 6011 if (2u) _cf = (((ebx) >> 1) & 1u); /* 0x4200649F: sar ebx, 2 */ 6012 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ebx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6013 ebx = (uint32_t)((int32_t)ebx >> 2u); 6014 L_420064A2: 6015 edx = MEM32(esi + 0x4); /* 0x420064A2: mov edx, dword ptr [esi + 4] */ 6016 /* test edx, edx */ /* 0x420064A5: test edx, edx */ 6017 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 6018 _cf = 0; 6019 _flag_k = FK_TEST; 6020 if (TEST_NZ(_flag_a, _flag_b)) goto L_420064AD; /* 0x420064A7: jne 0x420064ad */ 6021 L_420064A9: 6022 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6023 ecx = 0; /* 0x420064A9: xor ecx, ecx */ 6024 _cf = 0; 6025 _flag_k = FK_TEST; 6026 goto L_420064B5; /* 0x420064AB: jmp 0x420064b5 */ 6027 L_420064AD: 6028 ecx = MEM32(esi + 0x8); /* 0x420064AD: mov ecx, dword ptr [esi + 8] */ 6029 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 6030 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6031 ecx = ecx - edx; /* 0x420064B0: sub ecx, edx */ 6032 _flag_k = FK_CMP; 6033 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x420064B2: sar ecx, 2 */ 6034 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6035 ecx = (uint32_t)((int32_t)ecx >> 2u); 6036 L_420064B5: 6037 /* cmp ebx, ecx */ /* 0x420064B5: cmp ebx, ecx */ 6038 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ecx); 6039 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6040 _flag_k = FK_CMP; 6041 if (CMP_A(_flag_a, _flag_b)) goto L_4200651B; /* 0x420064B7: ja 0x4200651b */ 6042 L_420064B9: 6043 ecx = MEM32(edi + 0x8); /* 0x420064B9: mov ecx, dword ptr [edi + 8] */ 6044 /* cmp eax, ecx */ /* 0x420064BC: cmp eax, ecx */ 6045 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 6046 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6047 _flag_k = FK_CMP; 6048 if (CMP_EQ(_flag_a, _flag_b)) goto L_420064CE; /* 0x420064BE: je 0x420064ce */ 6049 L_420064C0: 6050 esi = MEM32(eax); /* 0x420064C0: mov esi, dword ptr [eax] */ 6051 MEM32(edx) = esi; /* 0x420064C2: mov dword ptr [edx], esi */ 6052 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 6053 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6054 eax = eax + 4; /* 0x420064C4: add eax, 4 */ 6055 _flag_k = FK_ADD; 6056 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4); 6057 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6058 edx = edx + 4; /* 0x420064C7: add edx, 4 */ 6059 _flag_k = FK_ADD; 6060 /* cmp eax, ecx */ /* 0x420064CA: cmp eax, ecx */ 6061 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 6062 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6063 _flag_k = FK_CMP; 6064 RECOMP_BACKEDGE(); 6065 if (CMP_NE(_flag_a, _flag_b)) goto L_420064C0; /* 0x420064CC: jne 0x420064c0 */ 6066 L_420064CE: 6067 eax = MEM32(edi + 0x4); /* 0x420064CE: mov eax, dword ptr [edi + 4] */ 6068 /* test eax, eax */ /* 0x420064D1: test eax, eax */ 6069 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6070 _cf = 0; 6071 _flag_k = FK_TEST; 6072 if (TEST_NZ(_flag_a, _flag_b)) goto L_420064F5; /* 0x420064D3: jne 0x420064f5 */ 6073 L_420064D5: 6074 eax = MEM32(ebp + (-0x4)); /* 0x420064D5: mov eax, dword ptr [ebp - 4] */ 6075 edx = MEM32(eax + 0x8); /* 0x420064D8: mov edx, dword ptr [eax + 8] */ 6076 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6077 edi = 0; /* 0x420064DB: xor edi, edi */ 6078 _cf = 0; 6079 _flag_k = FK_TEST; 6080 ecx = edx + edi * 4; /* 0x420064DD: lea ecx, [edx + edi*4] */ 6081 MEM32(eax + 0xC) = ecx; /* 0x420064E0: mov dword ptr [eax + 0xc], ecx */ 6082 ecx = MEM32(ebp + 0x8); /* 0x420064E3: mov ecx, dword ptr [ebp + 8] */ 6083 edx = MEM32(ecx + 0x14); /* 0x420064E6: mov edx, dword ptr [ecx + 0x14] */ 6084 edi = POP32_VAL(esp); /* 0x420064E9: pop edi */ 6085 esi = POP32_VAL(esp); /* 0x420064EA: pop esi */ 6086 MEM32(eax + 0x14) = edx; /* 0x420064EB: mov dword ptr [eax + 0x14], edx */ 6087 ebx = POP32_VAL(esp); /* 0x420064EE: pop ebx */ 6088 esp = ebp; /* 0x420064EF: mov esp, ebp */ 6089 ebp = POP32_VAL(esp); /* 0x420064F1: pop ebp */ 6090 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x420064F2: ret 4 */ 6091 L_420064F5: 6092 edi = MEM32(edi + 0x8); /* 0x420064F5: mov edi, dword ptr [edi + 8] */ 6093 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 6094 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6095 edi = edi - eax; /* 0x420064F8: sub edi, eax */ 6096 _flag_k = FK_CMP; 6097 eax = MEM32(ebp + (-0x4)); /* 0x420064FA: mov eax, dword ptr [ebp - 4] */ 6098 edx = MEM32(eax + 0x8); /* 0x420064FD: mov edx, dword ptr [eax + 8] */ 6099 if (2u) _cf = (((edi) >> 1) & 1u); /* 0x42006500: sar edi, 2 */ 6100 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edi >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6101 edi = (uint32_t)((int32_t)edi >> 2u); 6102 ecx = edx + edi * 4; /* 0x42006503: lea ecx, [edx + edi*4] */ 6103 MEM32(eax + 0xC) = ecx; /* 0x42006506: mov dword ptr [eax + 0xc], ecx */ 6104 ecx = MEM32(ebp + 0x8); /* 0x42006509: mov ecx, dword ptr [ebp + 8] */ 6105 edx = MEM32(ecx + 0x14); /* 0x4200650C: mov edx, dword ptr [ecx + 0x14] */ 6106 edi = POP32_VAL(esp); /* 0x4200650F: pop edi */ 6107 esi = POP32_VAL(esp); /* 0x42006510: pop esi */ 6108 MEM32(eax + 0x14) = edx; /* 0x42006511: mov dword ptr [eax + 0x14], edx */ 6109 ebx = POP32_VAL(esp); /* 0x42006514: pop ebx */ 6110 esp = ebp; /* 0x42006515: mov esp, ebp */ 6111 ebp = POP32_VAL(esp); /* 0x42006517: pop ebp */ 6112 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006518: ret 4 */ 6113 L_4200651B: 6114 /* test eax, eax */ /* 0x4200651B: test eax, eax */ 6115 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6116 _cf = 0; 6117 _flag_k = FK_TEST; 6118 if (TEST_NZ(_flag_a, _flag_b)) goto L_42006523; /* 0x4200651D: jne 0x42006523 */ 6119 L_4200651F: 6120 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6121 ebx = 0; /* 0x4200651F: xor ebx, ebx */ 6122 _cf = 0; 6123 _flag_k = FK_TEST; 6124 goto L_4200652B; /* 0x42006521: jmp 0x4200652b */ 6125 L_42006523: 6126 ebx = MEM32(edi + 0x8); /* 0x42006523: mov ebx, dword ptr [edi + 8] */ 6127 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax); 6128 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6129 ebx = ebx - eax; /* 0x42006526: sub ebx, eax */ 6130 _flag_k = FK_CMP; 6131 if (2u) _cf = (((ebx) >> 1) & 1u); /* 0x42006528: sar ebx, 2 */ 6132 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ebx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6133 ebx = (uint32_t)((int32_t)ebx >> 2u); 6134 L_4200652B: 6135 /* test edx, edx */ /* 0x4200652B: test edx, edx */ 6136 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 6137 _cf = 0; 6138 _flag_k = FK_TEST; 6139 if (TEST_NZ(_flag_a, _flag_b)) goto L_42006533; /* 0x4200652D: jne 0x42006533 */ 6140 L_4200652F: 6141 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6142 ecx = 0; /* 0x4200652F: xor ecx, ecx */ 6143 _cf = 0; 6144 _flag_k = FK_TEST; 6145 goto L_4200653B; /* 0x42006531: jmp 0x4200653b */ 6146 L_42006533: 6147 ecx = MEM32(esi + 0xC); /* 0x42006533: mov ecx, dword ptr [esi + 0xc] */ 6148 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 6149 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6150 ecx = ecx - edx; /* 0x42006536: sub ecx, edx */ 6151 _flag_k = FK_CMP; 6152 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x42006538: sar ecx, 2 */ 6153 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6154 ecx = (uint32_t)((int32_t)ecx >> 2u); 6155 L_4200653B: 6156 /* cmp ebx, ecx */ /* 0x4200653B: cmp ebx, ecx */ 6157 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ecx); 6158 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6159 _flag_k = FK_CMP; 6160 if (CMP_A(_flag_a, _flag_b)) goto L_420065C7; /* 0x4200653D: ja 0x420065c7 */ 6161 L_42006543: 6162 /* test edx, edx */ /* 0x42006543: test edx, edx */ 6163 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 6164 _cf = 0; 6165 _flag_k = FK_TEST; 6166 if (TEST_NZ(_flag_a, _flag_b)) goto L_4200654B; /* 0x42006545: jne 0x4200654b */ 6167 L_42006547: 6168 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6169 esi = 0; /* 0x42006547: xor esi, esi */ 6170 _cf = 0; 6171 _flag_k = FK_TEST; 6172 goto L_42006553; /* 0x42006549: jmp 0x42006553 */ 6173 L_4200654B: 6174 esi = MEM32(esi + 0x8); /* 0x4200654B: mov esi, dword ptr [esi + 8] */ 6175 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx); 6176 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6177 esi = esi - edx; /* 0x4200654E: sub esi, edx */ 6178 _flag_k = FK_CMP; 6179 if (2u) _cf = (((esi) >> 1) & 1u); /* 0x42006550: sar esi, 2 */ 6180 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)esi >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6181 esi = (uint32_t)((int32_t)esi >> 2u); 6182 L_42006553: 6183 ecx = eax + esi * 4; /* 0x42006553: lea ecx, [eax + esi*4] */ 6184 /* cmp eax, ecx */ /* 0x42006556: cmp eax, ecx */ 6185 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 6186 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6187 _flag_k = FK_CMP; 6188 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006568; /* 0x42006558: je 0x42006568 */ 6189 L_4200655A: 6190 esi = MEM32(eax); /* 0x4200655A: mov esi, dword ptr [eax] */ 6191 MEM32(edx) = esi; /* 0x4200655C: mov dword ptr [edx], esi */ 6192 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 6193 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6194 eax = eax + 4; /* 0x4200655E: add eax, 4 */ 6195 _flag_k = FK_ADD; 6196 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4); 6197 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6198 edx = edx + 4; /* 0x42006561: add edx, 4 */ 6199 _flag_k = FK_ADD; 6200 /* cmp eax, ecx */ /* 0x42006564: cmp eax, ecx */ 6201 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 6202 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6203 _flag_k = FK_CMP; 6204 RECOMP_BACKEDGE(); 6205 if (CMP_NE(_flag_a, _flag_b)) goto L_4200655A; /* 0x42006566: jne 0x4200655a */ 6206 L_42006568: 6207 eax = MEM32(edi + 0x8); /* 0x42006568: mov eax, dword ptr [edi + 8] */ 6208 edx = MEM32(ebp + (-0x4)); /* 0x4200656B: mov edx, dword ptr [ebp - 4] */ 6209 ebx = MEM32(edx + 0xC); /* 0x4200656E: mov ebx, dword ptr [edx + 0xc] */ 6210 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4); 6211 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6212 edx = edx + 4; /* 0x42006571: add edx, 4 */ 6213 _flag_k = FK_ADD; 6214 /* cmp ecx, eax */ /* 0x42006574: cmp ecx, eax */ 6215 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 6216 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6217 _flag_k = FK_CMP; 6218 MEM32(ebp + (-0x8)) = eax; /* 0x42006576: mov dword ptr [ebp - 8], eax */ 6219 esi = ecx; /* 0x42006579: mov esi, ecx */ 6220 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006594; /* 0x4200657B: je 0x42006594 */ 6221 L_4200657D: 6222 PUSH32(esp, esi); /* 0x4200657D: push esi */ 6223 PUSH32(esp, ebx); /* 0x4200657E: push ebx */ 6224 RECOMP_ICALL(0x42004A70u); /* 0x4200657F: call 0x42004a70 */ /* not lifted */ 6225 RECOMP_FLAGS_IN(); 6226 eax = MEM32(ebp + (-0x8)); /* 0x42006584: mov eax, dword ptr [ebp - 8] */ 6227 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 6228 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6229 esi = esi + 4; /* 0x42006587: add esi, 4 */ 6230 _flag_k = FK_ADD; 6231 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6232 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6233 esp = esp + 8; /* 0x4200658A: add esp, 8 */ 6234 _flag_k = FK_ADD; 6235 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(4); 6236 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6237 ebx = ebx + 4; /* 0x4200658D: add ebx, 4 */ 6238 _flag_k = FK_ADD; 6239 /* cmp esi, eax */ /* 0x42006590: cmp esi, eax */ 6240 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 6241 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6242 _flag_k = FK_CMP; 6243 RECOMP_BACKEDGE(); 6244 if (CMP_NE(_flag_a, _flag_b)) goto L_4200657D; /* 0x42006592: jne 0x4200657d */ 6245 L_42006594: 6246 eax = MEM32(edi + 0x4); /* 0x42006594: mov eax, dword ptr [edi + 4] */ 6247 /* test eax, eax */ /* 0x42006597: test eax, eax */ 6248 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6249 _cf = 0; 6250 _flag_k = FK_TEST; 6251 if (TEST_NZ(_flag_a, _flag_b)) goto L_420065AE; /* 0x42006599: jne 0x420065ae */ 6252 L_4200659B: 6253 eax = MEM32(ebp + (-0x4)); /* 0x4200659B: mov eax, dword ptr [ebp - 4] */ 6254 ecx = MEM32(eax + 0x8); /* 0x4200659E: mov ecx, dword ptr [eax + 8] */ 6255 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6256 edi = 0; /* 0x420065A1: xor edi, edi */ 6257 _cf = 0; 6258 _flag_k = FK_TEST; 6259 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 6260 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6261 eax = eax + 4; /* 0x420065A3: add eax, 4 */ 6262 _flag_k = FK_ADD; 6263 edx = ecx + edi * 4; /* 0x420065A6: lea edx, [ecx + edi*4] */ 6264 MEM32(eax + 0x8) = edx; /* 0x420065A9: mov dword ptr [eax + 8], edx */ 6265 goto L_42006611; /* 0x420065AC: jmp 0x42006611 */ 6266 L_420065AE: 6267 edi = MEM32(edi + 0x8); /* 0x420065AE: mov edi, dword ptr [edi + 8] */ 6268 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 6269 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6270 edi = edi - eax; /* 0x420065B1: sub edi, eax */ 6271 _flag_k = FK_CMP; 6272 eax = MEM32(ebp + (-0x4)); /* 0x420065B3: mov eax, dword ptr [ebp - 4] */ 6273 ecx = MEM32(eax + 0x8); /* 0x420065B6: mov ecx, dword ptr [eax + 8] */ 6274 if (2u) _cf = (((edi) >> 1) & 1u); /* 0x420065B9: sar edi, 2 */ 6275 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edi >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6276 edi = (uint32_t)((int32_t)edi >> 2u); 6277 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 6278 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6279 eax = eax + 4; /* 0x420065BC: add eax, 4 */ 6280 _flag_k = FK_ADD; 6281 edx = ecx + edi * 4; /* 0x420065BF: lea edx, [ecx + edi*4] */ 6282 MEM32(eax + 0x8) = edx; /* 0x420065C2: mov dword ptr [eax + 8], edx */ 6283 goto L_42006611; /* 0x420065C5: jmp 0x42006611 */ 6284 L_420065C7: 6285 PUSH32(esp, edx); /* 0x420065C7: push edx */ 6286 MEM32(ebp + (-0x8)) = edx; /* 0x420065C8: mov dword ptr [ebp - 8], edx */ 6287 RECOMP_ICALL(0x42016DD0u); /* 0x420065CB: call 0x42016dd0 */ /* not lifted */ 6288 RECOMP_FLAGS_IN(); 6289 ecx = MEM32(edi + 0x4); /* 0x420065D0: mov ecx, dword ptr [edi + 4] */ 6290 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6291 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6292 esp = esp + 4; /* 0x420065D3: add esp, 4 */ 6293 _flag_k = FK_ADD; 6294 /* test ecx, ecx */ /* 0x420065D6: test ecx, ecx */ 6295 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 6296 _cf = 0; 6297 _flag_k = FK_TEST; 6298 if (TEST_NZ(_flag_a, _flag_b)) goto L_420065DE; /* 0x420065D8: jne 0x420065de */ 6299 L_420065DA: 6300 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6301 eax = 0; /* 0x420065DA: xor eax, eax */ 6302 _cf = 0; 6303 _flag_k = FK_TEST; 6304 goto L_420065E6; /* 0x420065DC: jmp 0x420065e6 */ 6305 L_420065DE: 6306 eax = MEM32(edi + 0x8); /* 0x420065DE: mov eax, dword ptr [edi + 8] */ 6307 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 6308 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6309 eax = eax - ecx; /* 0x420065E1: sub eax, ecx */ 6310 _flag_k = FK_CMP; 6311 if (2u) _cf = (((eax) >> 1) & 1u); /* 0x420065E3: sar eax, 2 */ 6312 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6313 eax = (uint32_t)((int32_t)eax >> 2u); 6314 L_420065E6: 6315 /* test eax, eax */ /* 0x420065E6: test eax, eax */ 6316 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6317 _cf = 0; 6318 _flag_k = FK_TEST; 6319 if (TEST_NS(_flag_a, _flag_b)) goto L_420065EC; /* 0x420065E8: jge 0x420065ec */ 6320 L_420065EA: 6321 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6322 eax = 0; /* 0x420065EA: xor eax, eax */ 6323 _cf = 0; 6324 _flag_k = FK_TEST; 6325 L_420065EC: 6326 if (2u) _cf = (((eax) >> 30) & 1u); /* 0x420065EC: shl eax, 2 */ 6327 if (2u) { _flag_a = recomp_flags_pack((eax << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6328 eax = eax << 2u; /* 0x420065EC: shl eax, 2 */ 6329 PUSH32(esp, eax); /* 0x420065EF: push eax */ 6330 RECOMP_ICALL(0x42016F36u); /* 0x420065F0: call 0x42016f36 */ /* not lifted */ 6331 RECOMP_FLAGS_IN(); 6332 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6333 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6334 esp = esp + 4; /* 0x420065F5: add esp, 4 */ 6335 _flag_k = FK_ADD; 6336 MEM32(esi + 0x4) = eax; /* 0x420065F8: mov dword ptr [esi + 4], eax */ 6337 ecx = MEM32(edi + 0x8); /* 0x420065FB: mov ecx, dword ptr [edi + 8] */ 6338 edi = MEM32(edi + 0x4); /* 0x420065FE: mov edi, dword ptr [edi + 4] */ 6339 PUSH32(esp, eax); /* 0x42006601: push eax */ 6340 PUSH32(esp, ecx); /* 0x42006602: push ecx */ 6341 PUSH32(esp, edi); /* 0x42006603: push edi */ 6342 ecx = esi; /* 0x42006604: mov ecx, esi */ 6343 RECOMP_ICALL(0x42005CB0u); /* 0x42006606: call 0x42005cb0 */ /* not lifted */ 6344 RECOMP_FLAGS_IN(); 6345 MEM32(esi + 0x8) = eax; /* 0x4200660B: mov dword ptr [esi + 8], eax */ 6346 MEM32(esi + 0xC) = eax; /* 0x4200660E: mov dword ptr [esi + 0xc], eax */ 6347 L_42006611: 6348 eax = MEM32(ebp + (-0x4)); /* 0x42006611: mov eax, dword ptr [ebp - 4] */ 6349 L_42006614: 6350 ecx = MEM32(ebp + 0x8); /* 0x42006614: mov ecx, dword ptr [ebp + 8] */ 6351 edx = MEM32(ecx + 0x14); /* 0x42006617: mov edx, dword ptr [ecx + 0x14] */ 6352 edi = POP32_VAL(esp); /* 0x4200661A: pop edi */ 6353 esi = POP32_VAL(esp); /* 0x4200661B: pop esi */ 6354 MEM32(eax + 0x14) = edx; /* 0x4200661C: mov dword ptr [eax + 0x14], edx */ 6355 ebx = POP32_VAL(esp); /* 0x4200661F: pop ebx */ 6356 esp = ebp; /* 0x42006620: mov esp, ebp */ 6357 ebp = POP32_VAL(esp); /* 0x42006622: pop ebp */ 6358 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006623: ret 4 */ 6359 RECOMP_REGS_OUT(); 6360 } 6361 6362 void sub_42006630(void) { 6363 int _fpu_cmp = 0; 6364 uint32_t _cf = 0; 6365 int _df = 1; 6366 uint32_t _flag_k = FK_NONE; 6367 uint32_t _flag_a = 0, _flag_b = 0; 6368 uint32_t _itail_tgt = 0; 6369 RECOMP_REGS_LOCALS 6370 RECOMP_ENTER(0x42006630u); 6371 6372 L_42006630: 6373 PUSH32(esp, ebp); /* 0x42006630: push ebp */ 6374 ebp = esp; /* 0x42006631: mov ebp, esp */ 6375 PUSH32(esp, ebx); /* 0x42006633: push ebx */ 6376 SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x42006634: mov bl, byte ptr [ebp + 8] */ 6377 /* test LO8(ebx), 2 */ /* 0x42006637: test bl, 2 */ 6378 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 6379 _cf = 0; 6380 _flag_k = FK_NARROW(FK_TEST, 24); 6381 PUSH32(esp, esi); /* 0x4200663A: push esi */ 6382 esi = ecx; /* 0x4200663B: mov esi, ecx */ 6383 if (TEST_Z(_flag_a, _flag_b)) goto L_4200666B; /* 0x4200663D: je 0x4200666b */ 6384 L_4200663F: 6385 eax = MEM32(esi + (-0x4)); /* 0x4200663F: mov eax, dword ptr [esi - 4] */ 6386 PUSH32(esp, edi); /* 0x42006642: push edi */ 6387 PUSH32(esp, 0x42006CD0u); /* 0x42006643: push 0x42006cd0 */ 6388 edi = esi + (-0x4); /* 0x42006648: lea edi, [esi - 4] */ 6389 PUSH32(esp, eax); /* 0x4200664B: push eax */ 6390 PUSH32(esp, 0x18u); /* 0x4200664C: push 0x18 */ 6391 PUSH32(esp, esi); /* 0x4200664E: push esi */ 6392 RECOMP_ICALL(0x42016E3Cu); /* 0x4200664F: call 0x42016e3c */ /* not lifted */ 6393 RECOMP_FLAGS_IN(); 6394 /* test LO8(ebx), 1 */ /* 0x42006654: test bl, 1 */ 6395 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 6396 _cf = 0; 6397 _flag_k = FK_NARROW(FK_TEST, 24); 6398 if (TEST_Z(_flag_a, _flag_b)) goto L_42006662; /* 0x42006657: je 0x42006662 */ 6399 L_42006659: 6400 PUSH32(esp, edi); /* 0x42006659: push edi */ 6401 RECOMP_ICALL(0x42016DD0u); /* 0x4200665A: call 0x42016dd0 */ /* not lifted */ 6402 RECOMP_FLAGS_IN(); 6403 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6404 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6405 esp = esp + 4; /* 0x4200665F: add esp, 4 */ 6406 _flag_k = FK_ADD; 6407 L_42006662: 6408 eax = edi; /* 0x42006662: mov eax, edi */ 6409 edi = POP32_VAL(esp); /* 0x42006664: pop edi */ 6410 esi = POP32_VAL(esp); /* 0x42006665: pop esi */ 6411 ebx = POP32_VAL(esp); /* 0x42006666: pop ebx */ 6412 ebp = POP32_VAL(esp); /* 0x42006667: pop ebp */ 6413 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006668: ret 4 */ 6414 L_4200666B: 6415 ecx = esi; /* 0x4200666B: mov ecx, esi */ 6416 RECOMP_ICALL(0x42006CD0u); /* 0x4200666D: call 0x42006cd0 */ /* not lifted */ 6417 RECOMP_FLAGS_IN(); 6418 /* test LO8(ebx), 1 */ /* 0x42006672: test bl, 1 */ 6419 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 6420 _cf = 0; 6421 _flag_k = FK_NARROW(FK_TEST, 24); 6422 if (TEST_Z(_flag_a, _flag_b)) goto L_42006680; /* 0x42006675: je 0x42006680 */ 6423 L_42006677: 6424 PUSH32(esp, esi); /* 0x42006677: push esi */ 6425 RECOMP_ICALL(0x42016DD0u); /* 0x42006678: call 0x42016dd0 */ /* not lifted */ 6426 RECOMP_FLAGS_IN(); 6427 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6428 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6429 esp = esp + 4; /* 0x4200667D: add esp, 4 */ 6430 _flag_k = FK_ADD; 6431 L_42006680: 6432 eax = esi; /* 0x42006680: mov eax, esi */ 6433 esi = POP32_VAL(esp); /* 0x42006682: pop esi */ 6434 ebx = POP32_VAL(esp); /* 0x42006683: pop ebx */ 6435 ebp = POP32_VAL(esp); /* 0x42006684: pop ebp */ 6436 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006685: ret 4 */ 6437 RECOMP_REGS_OUT(); 6438 } 6439 6440 void sub_42006690(void) { 6441 int _fpu_cmp = 0; 6442 uint32_t _cf = 0; 6443 int _df = 1; 6444 uint32_t _flag_k = FK_NONE; 6445 uint32_t _flag_a = 0, _flag_b = 0; 6446 uint32_t _itail_tgt = 0; 6447 RECOMP_REGS_LOCALS 6448 RECOMP_ENTER(0x42006690u); 6449 6450 L_42006690: 6451 PUSH32(esp, ebp); /* 0x42006690: push ebp */ 6452 ebp = esp; /* 0x42006691: mov ebp, esp */ 6453 PUSH32(esp, ecx); /* 0x42006693: push ecx */ 6454 PUSH32(esp, ebx); /* 0x42006694: push ebx */ 6455 PUSH32(esp, esi); /* 0x42006695: push esi */ 6456 esi = ecx; /* 0x42006696: mov esi, ecx */ 6457 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6458 ebx = 0; /* 0x42006698: xor ebx, ebx */ 6459 _cf = 0; 6460 _flag_k = FK_TEST; 6461 PUSH32(esp, 0x18u); /* 0x4200669A: push 0x18 */ 6462 MEM32(esi + 0x18) = ebx; /* 0x4200669C: mov dword ptr [esi + 0x18], ebx */ 6463 MEM32(esi) = 0x4201844Cu; /* 0x4200669F: mov dword ptr [esi], 0x4201844c */ 6464 RECOMP_ICALL(0x42016F36u); /* 0x420066A5: call 0x42016f36 */ /* not lifted */ 6465 RECOMP_FLAGS_IN(); 6466 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6467 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6468 esp = esp + 4; /* 0x420066AA: add esp, 4 */ 6469 _flag_k = FK_ADD; 6470 /* cmp eax, ebx */ /* 0x420066AD: cmp eax, ebx */ 6471 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 6472 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6473 _flag_k = FK_CMP; 6474 if (CMP_EQ(_flag_a, _flag_b)) goto L_420066CF; /* 0x420066AF: je 0x420066cf */ 6475 L_420066B1: 6476 SET_LO8(ecx, MEM8(ebp + (-0x1))); /* 0x420066B1: mov cl, byte ptr [ebp - 1] */ 6477 MEM8(eax + 0x4) = (uint8_t)(LO8(ecx)); /* 0x420066B4: mov byte ptr [eax + 4], cl */ 6478 MEM32(eax + 0x8) = ebx; /* 0x420066B7: mov dword ptr [eax + 8], ebx */ 6479 MEM32(eax + 0xC) = ebx; /* 0x420066BA: mov dword ptr [eax + 0xc], ebx */ 6480 MEM32(eax + 0x10) = ebx; /* 0x420066BD: mov dword ptr [eax + 0x10], ebx */ 6481 MEM32(eax) = 0x4201843Cu; /* 0x420066C0: mov dword ptr [eax], 0x4201843c */ 6482 MEM32(eax + 0x14) = 0x42007060u; /* 0x420066C6: mov dword ptr [eax + 0x14], 0x42007060 */ 6483 goto L_420066D1; /* 0x420066CD: jmp 0x420066d1 */ 6484 L_420066CF: 6485 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6486 eax = 0; /* 0x420066CF: xor eax, eax */ 6487 _cf = 0; 6488 _flag_k = FK_TEST; 6489 L_420066D1: 6490 PUSH32(esp, 0x18u); /* 0x420066D1: push 0x18 */ 6491 MEM32(esi + 0x4) = eax; /* 0x420066D3: mov dword ptr [esi + 4], eax */ 6492 RECOMP_ICALL(0x42016F36u); /* 0x420066D6: call 0x42016f36 */ /* not lifted */ 6493 RECOMP_FLAGS_IN(); 6494 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6495 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6496 esp = esp + 4; /* 0x420066DB: add esp, 4 */ 6497 _flag_k = FK_ADD; 6498 /* cmp eax, ebx */ /* 0x420066DE: cmp eax, ebx */ 6499 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 6500 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6501 _flag_k = FK_CMP; 6502 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006700; /* 0x420066E0: je 0x42006700 */ 6503 L_420066E2: 6504 SET_LO8(edx, MEM8(ebp + (-0x1))); /* 0x420066E2: mov dl, byte ptr [ebp - 1] */ 6505 MEM8(eax + 0x4) = (uint8_t)(LO8(edx)); /* 0x420066E5: mov byte ptr [eax + 4], dl */ 6506 MEM32(eax + 0x8) = ebx; /* 0x420066E8: mov dword ptr [eax + 8], ebx */ 6507 MEM32(eax + 0xC) = ebx; /* 0x420066EB: mov dword ptr [eax + 0xc], ebx */ 6508 MEM32(eax + 0x10) = ebx; /* 0x420066EE: mov dword ptr [eax + 0x10], ebx */ 6509 MEM32(eax) = 0x42018444u; /* 0x420066F1: mov dword ptr [eax], 0x42018444 */ 6510 MEM32(eax + 0x14) = 0x42007060u; /* 0x420066F7: mov dword ptr [eax + 0x14], 0x42007060 */ 6511 goto L_42006702; /* 0x420066FE: jmp 0x42006702 */ 6512 L_42006700: 6513 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6514 eax = 0; /* 0x42006700: xor eax, eax */ 6515 _cf = 0; 6516 _flag_k = FK_TEST; 6517 L_42006702: 6518 MEM32(esi + 0x8) = eax; /* 0x42006702: mov dword ptr [esi + 8], eax */ 6519 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 6520 eax = eax | 0xFFFFFFFFu; /* 0x42006705: or eax, 0xffffffff */ 6521 _cf = 0; 6522 _flag_k = FK_TEST; 6523 MEM32(esi + 0xC) = eax; /* 0x42006708: mov dword ptr [esi + 0xc], eax */ 6524 MEM32(esi + 0x10) = eax; /* 0x4200670B: mov dword ptr [esi + 0x10], eax */ 6525 MEM8(esi + 0x14) = (uint8_t)(LO8(ebx)); /* 0x4200670E: mov byte ptr [esi + 0x14], bl */ 6526 eax = esi; /* 0x42006711: mov eax, esi */ 6527 esi = POP32_VAL(esp); /* 0x42006713: pop esi */ 6528 ebx = POP32_VAL(esp); /* 0x42006714: pop ebx */ 6529 esp = ebp; /* 0x42006715: mov esp, ebp */ 6530 ebp = POP32_VAL(esp); /* 0x42006717: pop ebp */ 6531 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42006718: ret */ 6532 RECOMP_REGS_OUT(); 6533 } 6534 6535 void sub_42006720(void) { 6536 int _fpu_cmp = 0; 6537 uint32_t _cf = 0; 6538 int _df = 1; 6539 uint32_t _flag_k = FK_NONE; 6540 uint32_t _flag_a = 0, _flag_b = 0; 6541 uint32_t _itail_tgt = 0; 6542 RECOMP_REGS_LOCALS 6543 RECOMP_ENTER(0x42006720u); 6544 6545 L_42006720: 6546 PUSH32(esp, ebp); /* 0x42006720: push ebp */ 6547 ebp = esp; /* 0x42006721: mov ebp, esp */ 6548 PUSH32(esp, ebx); /* 0x42006723: push ebx */ 6549 SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x42006724: mov bl, byte ptr [ebp + 8] */ 6550 /* test LO8(ebx), 2 */ /* 0x42006727: test bl, 2 */ 6551 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 6552 _cf = 0; 6553 _flag_k = FK_NARROW(FK_TEST, 24); 6554 PUSH32(esp, esi); /* 0x4200672A: push esi */ 6555 esi = ecx; /* 0x4200672B: mov esi, ecx */ 6556 if (TEST_Z(_flag_a, _flag_b)) goto L_4200675B; /* 0x4200672D: je 0x4200675b */ 6557 L_4200672F: 6558 eax = MEM32(esi + (-0x4)); /* 0x4200672F: mov eax, dword ptr [esi - 4] */ 6559 PUSH32(esp, edi); /* 0x42006732: push edi */ 6560 PUSH32(esp, 0x42006780u); /* 0x42006733: push 0x42006780 */ 6561 edi = esi + (-0x4); /* 0x42006738: lea edi, [esi - 4] */ 6562 PUSH32(esp, eax); /* 0x4200673B: push eax */ 6563 PUSH32(esp, 0x20u); /* 0x4200673C: push 0x20 */ 6564 PUSH32(esp, esi); /* 0x4200673E: push esi */ 6565 RECOMP_ICALL(0x42016E3Cu); /* 0x4200673F: call 0x42016e3c */ /* not lifted */ 6566 RECOMP_FLAGS_IN(); 6567 /* test LO8(ebx), 1 */ /* 0x42006744: test bl, 1 */ 6568 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 6569 _cf = 0; 6570 _flag_k = FK_NARROW(FK_TEST, 24); 6571 if (TEST_Z(_flag_a, _flag_b)) goto L_42006752; /* 0x42006747: je 0x42006752 */ 6572 L_42006749: 6573 PUSH32(esp, edi); /* 0x42006749: push edi */ 6574 RECOMP_ICALL(0x42016DD0u); /* 0x4200674A: call 0x42016dd0 */ /* not lifted */ 6575 RECOMP_FLAGS_IN(); 6576 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6577 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6578 esp = esp + 4; /* 0x4200674F: add esp, 4 */ 6579 _flag_k = FK_ADD; 6580 L_42006752: 6581 eax = edi; /* 0x42006752: mov eax, edi */ 6582 edi = POP32_VAL(esp); /* 0x42006754: pop edi */ 6583 esi = POP32_VAL(esp); /* 0x42006755: pop esi */ 6584 ebx = POP32_VAL(esp); /* 0x42006756: pop ebx */ 6585 ebp = POP32_VAL(esp); /* 0x42006757: pop ebp */ 6586 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006758: ret 4 */ 6587 L_4200675B: 6588 ecx = esi; /* 0x4200675B: mov ecx, esi */ 6589 RECOMP_ICALL(0x42006780u); /* 0x4200675D: call 0x42006780 */ /* not lifted */ 6590 RECOMP_FLAGS_IN(); 6591 /* test LO8(ebx), 1 */ /* 0x42006762: test bl, 1 */ 6592 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 6593 _cf = 0; 6594 _flag_k = FK_NARROW(FK_TEST, 24); 6595 if (TEST_Z(_flag_a, _flag_b)) goto L_42006770; /* 0x42006765: je 0x42006770 */ 6596 L_42006767: 6597 PUSH32(esp, esi); /* 0x42006767: push esi */ 6598 RECOMP_ICALL(0x42016DD0u); /* 0x42006768: call 0x42016dd0 */ /* not lifted */ 6599 RECOMP_FLAGS_IN(); 6600 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6601 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6602 esp = esp + 4; /* 0x4200676D: add esp, 4 */ 6603 _flag_k = FK_ADD; 6604 L_42006770: 6605 eax = esi; /* 0x42006770: mov eax, esi */ 6606 esi = POP32_VAL(esp); /* 0x42006772: pop esi */ 6607 ebx = POP32_VAL(esp); /* 0x42006773: pop ebx */ 6608 ebp = POP32_VAL(esp); /* 0x42006774: pop ebp */ 6609 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006775: ret 4 */ 6610 RECOMP_REGS_OUT(); 6611 } 6612 6613 void sub_42006780(void) { 6614 int _fpu_cmp = 0; 6615 uint32_t _cf = 0; 6616 int _df = 1; 6617 uint32_t _flag_k = FK_NONE; 6618 uint32_t _flag_a = 0, _flag_b = 0; 6619 uint32_t _itail_tgt = 0; 6620 RECOMP_REGS_LOCALS 6621 RECOMP_ENTER(0x42006780u); 6622 6623 L_42006780: 6624 PUSH32(esp, esi); /* 0x42006780: push esi */ 6625 esi = ecx; /* 0x42006781: mov esi, ecx */ 6626 ecx = MEM32(esi + 0x4); /* 0x42006783: mov ecx, dword ptr [esi + 4] */ 6627 /* test ecx, ecx */ /* 0x42006786: test ecx, ecx */ 6628 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 6629 _cf = 0; 6630 _flag_k = FK_TEST; 6631 MEM32(esi) = 0x4201844Cu; /* 0x42006788: mov dword ptr [esi], 0x4201844c */ 6632 if (TEST_Z(_flag_a, _flag_b)) goto L_42006796; /* 0x4200678E: je 0x42006796 */ 6633 L_42006790: 6634 eax = MEM32(ecx); /* 0x42006790: mov eax, dword ptr [ecx] */ 6635 PUSH32(esp, 1); /* 0x42006792: push 1 */ 6636 RECOMP_ICALL(MEM32(eax)); /* 0x42006794: call dword ptr [eax] */ 6637 RECOMP_FLAGS_IN(); 6638 L_42006796: 6639 ecx = MEM32(esi + 0x8); /* 0x42006796: mov ecx, dword ptr [esi + 8] */ 6640 /* test ecx, ecx */ /* 0x42006799: test ecx, ecx */ 6641 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 6642 _cf = 0; 6643 _flag_k = FK_TEST; 6644 MEM32(esi + 0x4) = 0; /* 0x4200679B: mov dword ptr [esi + 4], 0 */ 6645 if (TEST_Z(_flag_a, _flag_b)) goto L_420067AA; /* 0x420067A2: je 0x420067aa */ 6646 L_420067A4: 6647 edx = MEM32(ecx); /* 0x420067A4: mov edx, dword ptr [ecx] */ 6648 PUSH32(esp, 1); /* 0x420067A6: push 1 */ 6649 RECOMP_ICALL(MEM32(edx)); /* 0x420067A8: call dword ptr [edx] */ 6650 RECOMP_FLAGS_IN(); 6651 L_420067AA: 6652 MEM32(esi + 0x8) = 0; /* 0x420067AA: mov dword ptr [esi + 8], 0 */ 6653 esi = POP32_VAL(esp); /* 0x420067B1: pop esi */ 6654 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x420067B2: ret */ 6655 RECOMP_REGS_OUT(); 6656 } 6657 6658 void sub_420067C0(void) { 6659 int _fpu_cmp = 0; 6660 uint32_t _cf = 0; 6661 int _df = 1; 6662 uint32_t _flag_k = FK_NONE; 6663 uint32_t _flag_a = 0, _flag_b = 0; 6664 uint32_t _itail_tgt = 0; 6665 RECOMP_REGS_LOCALS 6666 RECOMP_ENTER(0x420067C0u); 6667 6668 L_420067C0: 6669 PUSH32(esp, ebp); /* 0x420067C0: push ebp */ 6670 ebp = esp; /* 0x420067C1: mov ebp, esp */ 6671 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 6672 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6673 esp = esp - 0xCu; /* 0x420067C3: sub esp, 0xc */ 6674 _flag_k = FK_CMP; 6675 PUSH32(esp, esi); /* 0x420067C6: push esi */ 6676 esi = MEM32(ecx + 0x4); /* 0x420067C7: mov esi, dword ptr [ecx + 4] */ 6677 /* test esi, esi */ /* 0x420067CA: test esi, esi */ 6678 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 6679 _cf = 0; 6680 _flag_k = FK_TEST; 6681 PUSH32(esp, edi); /* 0x420067CC: push edi */ 6682 if (TEST_Z(_flag_a, _flag_b)) goto L_42006976; /* 0x420067CD: je 0x42006976 */ 6683 L_420067D3: 6684 eax = MEM32(ebp + 0x8); /* 0x420067D3: mov eax, dword ptr [ebp + 8] */ 6685 ecx = MEM32(esi + 0x10); /* 0x420067D6: mov ecx, dword ptr [esi + 0x10] */ 6686 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 6687 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6688 esi = esi + 4; /* 0x420067D9: add esi, 4 */ 6689 _flag_k = FK_ADD; 6690 MEM32(ebp + 0x8) = eax; /* 0x420067DC: mov dword ptr [ebp + 8], eax */ 6691 eax = MEM32(esi + 0x8); /* 0x420067DF: mov eax, dword ptr [esi + 8] */ 6692 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 6693 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6694 ecx = ecx - eax; /* 0x420067E2: sub ecx, eax */ 6695 _flag_k = FK_CMP; 6696 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x420067E4: sar ecx, 2 */ 6697 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6698 ecx = (uint32_t)((int32_t)ecx >> 2u); 6699 /* cmp ecx, 1 */ /* 0x420067E7: cmp ecx, 1 */ 6700 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 6701 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6702 _flag_k = FK_CMP; 6703 edi = eax; /* 0x420067EA: mov edi, eax */ 6704 if (CMP_AE(_flag_a, _flag_b)) goto L_420068DC; /* 0x420067EC: jae 0x420068dc */ 6705 L_420067F2: 6706 edx = MEM32(esi + 0x4); /* 0x420067F2: mov edx, dword ptr [esi + 4] */ 6707 /* test edx, edx */ /* 0x420067F5: test edx, edx */ 6708 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 6709 _cf = 0; 6710 _flag_k = FK_TEST; 6711 if (TEST_Z(_flag_a, _flag_b)) goto L_42006805; /* 0x420067F7: je 0x42006805 */ 6712 L_420067F9: 6713 ecx = eax; /* 0x420067F9: mov ecx, eax */ 6714 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 6715 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6716 ecx = ecx - edx; /* 0x420067FB: sub ecx, edx */ 6717 _flag_k = FK_CMP; 6718 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x420067FD: sar ecx, 2 */ 6719 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6720 ecx = (uint32_t)((int32_t)ecx >> 2u); 6721 /* cmp ecx, 1 */ /* 0x42006800: cmp ecx, 1 */ 6722 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 6723 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6724 _flag_k = FK_CMP; 6725 if (CMP_A(_flag_a, _flag_b)) goto L_4200680A; /* 0x42006803: ja 0x4200680a */ 6726 L_42006805: 6727 ecx = 1; /* 0x42006805: mov ecx, 1 */ 6728 L_4200680A: 6729 /* test edx, edx */ /* 0x4200680A: test edx, edx */ 6730 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 6731 _cf = 0; 6732 _flag_k = FK_TEST; 6733 if (TEST_NZ(_flag_a, _flag_b)) goto L_42006812; /* 0x4200680C: jne 0x42006812 */ 6734 L_4200680E: 6735 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6736 eax = 0; /* 0x4200680E: xor eax, eax */ 6737 _cf = 0; 6738 _flag_k = FK_TEST; 6739 goto L_42006817; /* 0x42006810: jmp 0x42006817 */ 6740 L_42006812: 6741 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 6742 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6743 eax = eax - edx; /* 0x42006812: sub eax, edx */ 6744 _flag_k = FK_CMP; 6745 if (2u) _cf = (((eax) >> 1) & 1u); /* 0x42006814: sar eax, 2 */ 6746 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6747 eax = (uint32_t)((int32_t)eax >> 2u); 6748 L_42006817: 6749 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 6750 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6751 eax = eax + ecx; /* 0x42006817: add eax, ecx */ 6752 _flag_k = FK_ADD; 6753 /* test eax, eax */ /* 0x42006819: test eax, eax */ 6754 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6755 _cf = 0; 6756 _flag_k = FK_TEST; 6757 MEM32(ebp + (-0xC)) = eax; /* 0x4200681B: mov dword ptr [ebp - 0xc], eax */ 6758 if (TEST_NS(_flag_a, _flag_b)) goto L_42006822; /* 0x4200681E: jge 0x42006822 */ 6759 L_42006820: 6760 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6761 eax = 0; /* 0x42006820: xor eax, eax */ 6762 _cf = 0; 6763 _flag_k = FK_TEST; 6764 L_42006822: 6765 edx = eax * 4; /* 0x42006822: lea edx, [eax*4] */ 6766 PUSH32(esp, ebx); /* 0x42006829: push ebx */ 6767 PUSH32(esp, edx); /* 0x4200682A: push edx */ 6768 RECOMP_ICALL(0x42016F36u); /* 0x4200682B: call 0x42016f36 */ /* not lifted */ 6769 RECOMP_FLAGS_IN(); 6770 MEM32(ebp + (-0x8)) = eax; /* 0x42006830: mov dword ptr [ebp - 8], eax */ 6771 ebx = eax; /* 0x42006833: mov ebx, eax */ 6772 eax = MEM32(esi + 0x4); /* 0x42006835: mov eax, dword ptr [esi + 4] */ 6773 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6774 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6775 esp = esp + 4; /* 0x42006838: add esp, 4 */ 6776 _flag_k = FK_ADD; 6777 /* cmp eax, edi */ /* 0x4200683B: cmp eax, edi */ 6778 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 6779 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6780 _flag_k = FK_CMP; 6781 MEM32(ebp + (-0x4)) = eax; /* 0x4200683D: mov dword ptr [ebp - 4], eax */ 6782 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006861; /* 0x42006840: je 0x42006861 */ 6783 L_42006842: 6784 goto L_42006847; /* 0x42006842: jmp 0x42006847 */ 6785 L_42006844: 6786 eax = MEM32(ebp + (-0x4)); /* 0x42006844: mov eax, dword ptr [ebp - 4] */ 6787 L_42006847: 6788 PUSH32(esp, eax); /* 0x42006847: push eax */ 6789 PUSH32(esp, ebx); /* 0x42006848: push ebx */ 6790 RECOMP_ICALL(0x42004A70u); /* 0x42006849: call 0x42004a70 */ /* not lifted */ 6791 RECOMP_FLAGS_IN(); 6792 eax = MEM32(ebp + (-0x4)); /* 0x4200684E: mov eax, dword ptr [ebp - 4] */ 6793 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 6794 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6795 eax = eax + 4; /* 0x42006851: add eax, 4 */ 6796 _flag_k = FK_ADD; 6797 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 6798 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6799 esp = esp + 8; /* 0x42006854: add esp, 8 */ 6800 _flag_k = FK_ADD; 6801 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(4); 6802 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6803 ebx = ebx + 4; /* 0x42006857: add ebx, 4 */ 6804 _flag_k = FK_ADD; 6805 /* cmp eax, edi */ /* 0x4200685A: cmp eax, edi */ 6806 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 6807 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6808 _flag_k = FK_CMP; 6809 MEM32(ebp + (-0x4)) = eax; /* 0x4200685C: mov dword ptr [ebp - 4], eax */ 6810 RECOMP_BACKEDGE(); 6811 if (CMP_NE(_flag_a, _flag_b)) goto L_42006844; /* 0x4200685F: jne 0x42006844 */ 6812 L_42006861: 6813 eax = ebp + 0x8; /* 0x42006861: lea eax, [ebp + 8] */ 6814 PUSH32(esp, eax); /* 0x42006864: push eax */ 6815 PUSH32(esp, 1); /* 0x42006865: push 1 */ 6816 PUSH32(esp, ebx); /* 0x42006867: push ebx */ 6817 ecx = esi; /* 0x42006868: mov ecx, esi */ 6818 RECOMP_ICALL(0x42005CE0u); /* 0x4200686A: call 0x42005ce0 */ /* not lifted */ 6819 RECOMP_FLAGS_IN(); 6820 ecx = MEM32(esi + 0x8); /* 0x4200686F: mov ecx, dword ptr [esi + 8] */ 6821 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(4); 6822 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6823 ebx = ebx + 4; /* 0x42006872: add ebx, 4 */ 6824 _flag_k = FK_ADD; 6825 PUSH32(esp, ebx); /* 0x42006875: push ebx */ 6826 PUSH32(esp, ecx); /* 0x42006876: push ecx */ 6827 PUSH32(esp, edi); /* 0x42006877: push edi */ 6828 ecx = esi; /* 0x42006878: mov ecx, esi */ 6829 RECOMP_ICALL(0x42005CB0u); /* 0x4200687A: call 0x42005cb0 */ /* not lifted */ 6830 RECOMP_FLAGS_IN(); 6831 edx = MEM32(esi + 0x8); /* 0x4200687F: mov edx, dword ptr [esi + 8] */ 6832 eax = MEM32(esi + 0x4); /* 0x42006882: mov eax, dword ptr [esi + 4] */ 6833 PUSH32(esp, edx); /* 0x42006885: push edx */ 6834 PUSH32(esp, eax); /* 0x42006886: push eax */ 6835 ecx = esi; /* 0x42006887: mov ecx, esi */ 6836 RECOMP_ICALL(0x42002690u); /* 0x42006889: call 0x42002690 */ /* not lifted */ 6837 RECOMP_FLAGS_IN(); 6838 ecx = MEM32(esi + 0x4); /* 0x4200688E: mov ecx, dword ptr [esi + 4] */ 6839 PUSH32(esp, ecx); /* 0x42006891: push ecx */ 6840 RECOMP_ICALL(0x42016DD0u); /* 0x42006892: call 0x42016dd0 */ /* not lifted */ 6841 RECOMP_FLAGS_IN(); 6842 eax = MEM32(ebp + (-0xC)); /* 0x42006897: mov eax, dword ptr [ebp - 0xc] */ 6843 edx = MEM32(ebp + (-0x8)); /* 0x4200689A: mov edx, dword ptr [ebp - 8] */ 6844 ecx = edx + eax * 4; /* 0x4200689D: lea ecx, [edx + eax*4] */ 6845 eax = MEM32(esi + 0x4); /* 0x420068A0: mov eax, dword ptr [esi + 4] */ 6846 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6847 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6848 esp = esp + 4; /* 0x420068A3: add esp, 4 */ 6849 _flag_k = FK_ADD; 6850 /* test eax, eax */ /* 0x420068A6: test eax, eax */ 6851 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 6852 _cf = 0; 6853 _flag_k = FK_TEST; 6854 MEM32(esi + 0xC) = ecx; /* 0x420068A8: mov dword ptr [esi + 0xc], ecx */ 6855 ebx = POP32_VAL(esp); /* 0x420068AB: pop ebx */ 6856 if (TEST_NZ(_flag_a, _flag_b)) goto L_420068C2; /* 0x420068AC: jne 0x420068c2 */ 6857 L_420068AE: 6858 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 6859 ecx = 0; /* 0x420068AE: xor ecx, ecx */ 6860 _cf = 0; 6861 _flag_k = FK_TEST; 6862 eax = edx + ecx * 4 + 0x4; /* 0x420068B0: lea eax, [edx + ecx*4 + 4] */ 6863 edi = POP32_VAL(esp); /* 0x420068B4: pop edi */ 6864 MEM32(esi + 0x8) = eax; /* 0x420068B5: mov dword ptr [esi + 8], eax */ 6865 MEM32(esi + 0x4) = edx; /* 0x420068B8: mov dword ptr [esi + 4], edx */ 6866 esi = POP32_VAL(esp); /* 0x420068BB: pop esi */ 6867 esp = ebp; /* 0x420068BC: mov esp, ebp */ 6868 ebp = POP32_VAL(esp); /* 0x420068BE: pop ebp */ 6869 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x420068BF: ret 4 */ 6870 L_420068C2: 6871 ecx = MEM32(esi + 0x8); /* 0x420068C2: mov ecx, dword ptr [esi + 8] */ 6872 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 6873 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6874 ecx = ecx - eax; /* 0x420068C5: sub ecx, eax */ 6875 _flag_k = FK_CMP; 6876 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x420068C7: sar ecx, 2 */ 6877 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6878 ecx = (uint32_t)((int32_t)ecx >> 2u); 6879 eax = edx + ecx * 4 + 0x4; /* 0x420068CA: lea eax, [edx + ecx*4 + 4] */ 6880 edi = POP32_VAL(esp); /* 0x420068CE: pop edi */ 6881 MEM32(esi + 0x8) = eax; /* 0x420068CF: mov dword ptr [esi + 8], eax */ 6882 MEM32(esi + 0x4) = edx; /* 0x420068D2: mov dword ptr [esi + 4], edx */ 6883 esi = POP32_VAL(esp); /* 0x420068D5: pop esi */ 6884 esp = ebp; /* 0x420068D6: mov esp, ebp */ 6885 ebp = POP32_VAL(esp); /* 0x420068D8: pop ebp */ 6886 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x420068D9: ret 4 */ 6887 L_420068DC: 6888 ecx = eax; /* 0x420068DC: mov ecx, eax */ 6889 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 6890 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6891 ecx = ecx - edi; /* 0x420068DE: sub ecx, edi */ 6892 _flag_k = FK_CMP; 6893 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x420068E0: sar ecx, 2 */ 6894 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6895 ecx = (uint32_t)((int32_t)ecx >> 2u); 6896 /* cmp ecx, 1 */ /* 0x420068E3: cmp ecx, 1 */ 6897 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 6898 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6899 _flag_k = FK_CMP; 6900 if (CMP_AE(_flag_a, _flag_b)) goto L_42006937; /* 0x420068E6: jae 0x42006937 */ 6901 L_420068E8: 6902 edx = edi + 0x4; /* 0x420068E8: lea edx, [edi + 4] */ 6903 PUSH32(esp, edx); /* 0x420068EB: push edx */ 6904 PUSH32(esp, eax); /* 0x420068EC: push eax */ 6905 PUSH32(esp, edi); /* 0x420068ED: push edi */ 6906 ecx = esi; /* 0x420068EE: mov ecx, esi */ 6907 RECOMP_ICALL(0x42005CB0u); /* 0x420068F0: call 0x42005cb0 */ /* not lifted */ 6908 RECOMP_FLAGS_IN(); 6909 eax = MEM32(esi + 0x8); /* 0x420068F5: mov eax, dword ptr [esi + 8] */ 6910 edx = eax; /* 0x420068F8: mov edx, eax */ 6911 ecx = ebp + 0x8; /* 0x420068FA: lea ecx, [ebp + 8] */ 6912 PUSH32(esp, ecx); /* 0x420068FD: push ecx */ 6913 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edi); 6914 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6915 edx = edx - edi; /* 0x420068FE: sub edx, edi */ 6916 _flag_k = FK_CMP; 6917 if (2u) _cf = (((edx) >> 1) & 1u); /* 0x42006900: sar edx, 2 */ 6918 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 6919 edx = (uint32_t)((int32_t)edx >> 2u); 6920 ecx = 1; /* 0x42006903: mov ecx, 1 */ 6921 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 6922 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6923 ecx = ecx - edx; /* 0x42006908: sub ecx, edx */ 6924 _flag_k = FK_CMP; 6925 PUSH32(esp, ecx); /* 0x4200690A: push ecx */ 6926 PUSH32(esp, eax); /* 0x4200690B: push eax */ 6927 ecx = esi; /* 0x4200690C: mov ecx, esi */ 6928 RECOMP_ICALL(0x42005CE0u); /* 0x4200690E: call 0x42005ce0 */ /* not lifted */ 6929 RECOMP_FLAGS_IN(); 6930 eax = MEM32(esi + 0x8); /* 0x42006913: mov eax, dword ptr [esi + 8] */ 6931 /* cmp edi, eax */ /* 0x42006916: cmp edi, eax */ 6932 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 6933 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6934 _flag_k = FK_CMP; 6935 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006972; /* 0x42006918: je 0x42006972 */ 6936 L_4200691A: 6937 edx = MEM32(ebp + 0x8); /* 0x4200691A: mov edx, dword ptr [ebp + 8] */ 6938 MEM32(edi) = edx; /* 0x4200691D: mov dword ptr [edi], edx */ 6939 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4); 6940 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6941 edi = edi + 4; /* 0x4200691F: add edi, 4 */ 6942 _flag_k = FK_ADD; 6943 /* cmp edi, eax */ /* 0x42006922: cmp edi, eax */ 6944 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 6945 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6946 _flag_k = FK_CMP; 6947 RECOMP_BACKEDGE(); 6948 if (CMP_NE(_flag_a, _flag_b)) goto L_4200691A; /* 0x42006924: jne 0x4200691a */ 6949 L_42006926: 6950 eax = MEM32(esi + 0x8); /* 0x42006926: mov eax, dword ptr [esi + 8] */ 6951 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 6952 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6953 eax = eax + 4; /* 0x42006929: add eax, 4 */ 6954 _flag_k = FK_ADD; 6955 edi = POP32_VAL(esp); /* 0x4200692C: pop edi */ 6956 MEM32(esi + 0x8) = eax; /* 0x4200692D: mov dword ptr [esi + 8], eax */ 6957 esi = POP32_VAL(esp); /* 0x42006930: pop esi */ 6958 esp = ebp; /* 0x42006931: mov esp, ebp */ 6959 ebp = POP32_VAL(esp); /* 0x42006933: pop ebp */ 6960 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006934: ret 4 */ 6961 L_42006937: 6962 PUSH32(esp, eax); /* 0x42006937: push eax */ 6963 PUSH32(esp, eax); /* 0x42006938: push eax */ 6964 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFCu); 6965 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6966 eax = eax + 0xFFFFFFFCu; /* 0x42006939: add eax, -4 */ 6967 _flag_k = FK_ADD; 6968 PUSH32(esp, eax); /* 0x4200693C: push eax */ 6969 ecx = esi; /* 0x4200693D: mov ecx, esi */ 6970 RECOMP_ICALL(0x42005CB0u); /* 0x4200693F: call 0x42005cb0 */ /* not lifted */ 6971 RECOMP_FLAGS_IN(); 6972 ecx = MEM32(esi + 0x8); /* 0x42006944: mov ecx, dword ptr [esi + 8] */ 6973 eax = ecx + (-0x4); /* 0x42006947: lea eax, [ecx - 4] */ 6974 /* cmp edi, eax */ /* 0x4200694A: cmp edi, eax */ 6975 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 6976 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6977 _flag_k = FK_CMP; 6978 if (CMP_EQ(_flag_a, _flag_b)) goto L_4200695D; /* 0x4200694C: je 0x4200695d */ 6979 L_4200694E: 6980 edx = MEM32(eax + (-0x4)); /* 0x4200694E: mov edx, dword ptr [eax - 4] */ 6981 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 6982 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6983 eax = eax - 4; /* 0x42006951: sub eax, 4 */ 6984 _flag_k = FK_CMP; 6985 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 6986 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6987 ecx = ecx - 4; /* 0x42006954: sub ecx, 4 */ 6988 _flag_k = FK_CMP; 6989 /* cmp eax, edi */ /* 0x42006957: cmp eax, edi */ 6990 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 6991 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6992 _flag_k = FK_CMP; 6993 MEM32(ecx) = edx; /* 0x42006959: mov dword ptr [ecx], edx */ 6994 RECOMP_BACKEDGE(); 6995 if (CMP_NE(_flag_a, _flag_b)) goto L_4200694E; /* 0x4200695B: jne 0x4200694e */ 6996 L_4200695D: 6997 ecx = edi + 0x4; /* 0x4200695D: lea ecx, [edi + 4] */ 6998 /* cmp edi, ecx */ /* 0x42006960: cmp edi, ecx */ 6999 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx); 7000 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7001 _flag_k = FK_CMP; 7002 eax = edi; /* 0x42006962: mov eax, edi */ 7003 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006972; /* 0x42006964: je 0x42006972 */ 7004 L_42006966: 7005 edx = MEM32(ebp + 0x8); /* 0x42006966: mov edx, dword ptr [ebp + 8] */ 7006 MEM32(eax) = edx; /* 0x42006969: mov dword ptr [eax], edx */ 7007 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 7008 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7009 eax = eax + 4; /* 0x4200696B: add eax, 4 */ 7010 _flag_k = FK_ADD; 7011 /* cmp eax, ecx */ /* 0x4200696E: cmp eax, ecx */ 7012 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 7013 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7014 _flag_k = FK_CMP; 7015 RECOMP_BACKEDGE(); 7016 if (CMP_NE(_flag_a, _flag_b)) goto L_42006966; /* 0x42006970: jne 0x42006966 */ 7017 L_42006972: 7018 _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(4); 7019 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7020 MEM32(esi + 0x8) = MEM32(esi + 0x8) + 4; /* 0x42006972: add dword ptr [esi + 8], 4 */ 7021 _flag_k = FK_ADD; 7022 L_42006976: 7023 edi = POP32_VAL(esp); /* 0x42006976: pop edi */ 7024 esi = POP32_VAL(esp); /* 0x42006977: pop esi */ 7025 esp = ebp; /* 0x42006978: mov esp, ebp */ 7026 ebp = POP32_VAL(esp); /* 0x4200697A: pop ebp */ 7027 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x4200697B: ret 4 */ 7028 RECOMP_REGS_OUT(); 7029 } 7030 7031 void sub_42006980(void) { 7032 int _fpu_cmp = 0; 7033 uint32_t _cf = 0; 7034 int _df = 1; 7035 uint32_t _flag_k = FK_NONE; 7036 uint32_t _flag_a = 0, _flag_b = 0; 7037 uint32_t _itail_tgt = 0; 7038 RECOMP_REGS_LOCALS 7039 RECOMP_ENTER(0x42006980u); 7040 7041 L_42006980: 7042 PUSH32(esp, ebp); /* 0x42006980: push ebp */ 7043 ebp = esp; /* 0x42006981: mov ebp, esp */ 7044 PUSH32(esp, esi); /* 0x42006983: push esi */ 7045 esi = MEM32(ecx + 0x4); /* 0x42006984: mov esi, dword ptr [ecx + 4] */ 7046 eax = MEM32(esi + 0xC); /* 0x42006987: mov eax, dword ptr [esi + 0xc] */ 7047 ecx = MEM32(esi + 0x8); /* 0x4200698A: mov ecx, dword ptr [esi + 8] */ 7048 /* cmp ecx, eax */ /* 0x4200698D: cmp ecx, eax */ 7049 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7050 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7051 _flag_k = FK_CMP; 7052 PUSH32(esp, edi); /* 0x4200698F: push edi */ 7053 if (CMP_EQ(_flag_a, _flag_b)) goto L_420069C8; /* 0x42006990: je 0x420069c8 */ 7054 L_42006992: 7055 edx = MEM32(ebp + 0x8); /* 0x42006992: mov edx, dword ptr [ebp + 8] */ 7056 L_42006995: 7057 /* cmp MEM32(ecx), edx */ /* 0x42006995: cmp dword ptr [ecx], edx */ 7058 _flag_a = (uint32_t)(MEM32(ecx)); _flag_b = (uint32_t)(edx); 7059 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7060 _flag_k = FK_CMP; 7061 if (CMP_EQ(_flag_a, _flag_b)) goto L_420069A0; /* 0x42006997: je 0x420069a0 */ 7062 L_42006999: 7063 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 7064 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7065 ecx = ecx + 4; /* 0x42006999: add ecx, 4 */ 7066 _flag_k = FK_ADD; 7067 /* cmp ecx, eax */ /* 0x4200699C: cmp ecx, eax */ 7068 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7069 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7070 _flag_k = FK_CMP; 7071 RECOMP_BACKEDGE(); 7072 if (CMP_NE(_flag_a, _flag_b)) goto L_42006995; /* 0x4200699E: jne 0x42006995 */ 7073 L_420069A0: 7074 /* cmp ecx, eax */ /* 0x420069A0: cmp ecx, eax */ 7075 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7076 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7077 _flag_k = FK_CMP; 7078 if (CMP_EQ(_flag_a, _flag_b)) goto L_420069C8; /* 0x420069A2: je 0x420069c8 */ 7079 L_420069A4: 7080 edx = MEM32(esi + 0xC); /* 0x420069A4: mov edx, dword ptr [esi + 0xc] */ 7081 eax = ecx + 0x4; /* 0x420069A7: lea eax, [ecx + 4] */ 7082 /* cmp eax, edx */ /* 0x420069AA: cmp eax, edx */ 7083 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 7084 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7085 _flag_k = FK_CMP; 7086 if (CMP_EQ(_flag_a, _flag_b)) goto L_420069BC; /* 0x420069AC: je 0x420069bc */ 7087 L_420069AE: 7088 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7089 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7090 ecx = ecx - eax; /* 0x420069AE: sub ecx, eax */ 7091 _flag_k = FK_CMP; 7092 L_420069B0: 7093 edi = MEM32(eax); /* 0x420069B0: mov edi, dword ptr [eax] */ 7094 MEM32(ecx + eax) = edi; /* 0x420069B2: mov dword ptr [ecx + eax], edi */ 7095 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 7096 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7097 eax = eax + 4; /* 0x420069B5: add eax, 4 */ 7098 _flag_k = FK_ADD; 7099 /* cmp eax, edx */ /* 0x420069B8: cmp eax, edx */ 7100 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 7101 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7102 _flag_k = FK_CMP; 7103 RECOMP_BACKEDGE(); 7104 if (CMP_NE(_flag_a, _flag_b)) goto L_420069B0; /* 0x420069BA: jne 0x420069b0 */ 7105 L_420069BC: 7106 eax = MEM32(esi + 0xC); /* 0x420069BC: mov eax, dword ptr [esi + 0xc] */ 7107 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFCu); 7108 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7109 eax = eax + 0xFFFFFFFCu; /* 0x420069BF: add eax, -4 */ 7110 _flag_k = FK_ADD; 7111 MEM32(ebp + 0x8) = eax; /* 0x420069C2: mov dword ptr [ebp + 8], eax */ 7112 MEM32(esi + 0xC) = eax; /* 0x420069C5: mov dword ptr [esi + 0xc], eax */ 7113 L_420069C8: 7114 edi = POP32_VAL(esp); /* 0x420069C8: pop edi */ 7115 esi = POP32_VAL(esp); /* 0x420069C9: pop esi */ 7116 ebp = POP32_VAL(esp); /* 0x420069CA: pop ebp */ 7117 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x420069CB: ret 4 */ 7118 RECOMP_REGS_OUT(); 7119 } 7120 7121 void sub_420069D0(void) { 7122 int _fpu_cmp = 0; 7123 uint32_t _cf = 0; 7124 int _df = 1; 7125 uint32_t _flag_k = FK_NONE; 7126 uint32_t _flag_a = 0, _flag_b = 0; 7127 uint32_t _itail_tgt = 0; 7128 RECOMP_REGS_LOCALS 7129 RECOMP_ENTER(0x420069D0u); 7130 7131 L_420069D0: 7132 PUSH32(esp, ebp); /* 0x420069D0: push ebp */ 7133 ebp = esp; /* 0x420069D1: mov ebp, esp */ 7134 PUSH32(esp, ebx); /* 0x420069D3: push ebx */ 7135 PUSH32(esp, esi); /* 0x420069D4: push esi */ 7136 PUSH32(esp, edi); /* 0x420069D5: push edi */ 7137 edi = MEM32(ecx + 0x4); /* 0x420069D6: mov edi, dword ptr [ecx + 4] */ 7138 esi = MEM32(edi + 0x8); /* 0x420069D9: mov esi, dword ptr [edi + 8] */ 7139 ebx = MEM32(edi + 0xC); /* 0x420069DC: mov ebx, dword ptr [edi + 0xc] */ 7140 /* cmp esi, ebx */ /* 0x420069DF: cmp esi, ebx */ 7141 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 7142 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7143 _flag_k = FK_CMP; 7144 if (CMP_EQ(_flag_a, _flag_b)) goto L_420069F3; /* 0x420069E1: je 0x420069f3 */ 7145 L_420069E3: 7146 eax = MEM32(ebp + 0x8); /* 0x420069E3: mov eax, dword ptr [ebp + 8] */ 7147 ecx = MEM32(esi); /* 0x420069E6: mov ecx, dword ptr [esi] */ 7148 PUSH32(esp, eax); /* 0x420069E8: push eax */ 7149 RECOMP_ICALL(MEM32(edi + 0x14)); /* 0x420069E9: call dword ptr [edi + 0x14] */ 7150 RECOMP_FLAGS_IN(); 7151 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 7152 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7153 esi = esi + 4; /* 0x420069EC: add esi, 4 */ 7154 _flag_k = FK_ADD; 7155 /* cmp esi, ebx */ /* 0x420069EF: cmp esi, ebx */ 7156 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 7157 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7158 _flag_k = FK_CMP; 7159 RECOMP_BACKEDGE(); 7160 if (CMP_NE(_flag_a, _flag_b)) goto L_420069E3; /* 0x420069F1: jne 0x420069e3 */ 7161 L_420069F3: 7162 edi = POP32_VAL(esp); /* 0x420069F3: pop edi */ 7163 esi = POP32_VAL(esp); /* 0x420069F4: pop esi */ 7164 ebx = POP32_VAL(esp); /* 0x420069F5: pop ebx */ 7165 ebp = POP32_VAL(esp); /* 0x420069F6: pop ebp */ 7166 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x420069F7: ret 4 */ 7167 RECOMP_REGS_OUT(); 7168 } 7169 7170 void sub_42006A00(void) { 7171 int _fpu_cmp = 0; 7172 uint32_t _cf = 0; 7173 int _df = 1; 7174 uint32_t _flag_k = FK_NONE; 7175 uint32_t _flag_a = 0, _flag_b = 0; 7176 uint32_t _itail_tgt = 0; 7177 RECOMP_REGS_LOCALS 7178 RECOMP_ENTER(0x42006A00u); 7179 7180 L_42006A00: 7181 PUSH32(esp, ebp); /* 0x42006A00: push ebp */ 7182 ebp = esp; /* 0x42006A01: mov ebp, esp */ 7183 eax = MEM32(ecx + 0x4); /* 0x42006A03: mov eax, dword ptr [ecx + 4] */ 7184 ecx = MEM32(eax + 0xC); /* 0x42006A06: mov ecx, dword ptr [eax + 0xc] */ 7185 eax = MEM32(eax + 0x8); /* 0x42006A09: mov eax, dword ptr [eax + 8] */ 7186 /* cmp eax, ecx */ /* 0x42006A0C: cmp eax, ecx */ 7187 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 7188 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7189 _flag_k = FK_CMP; 7190 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006A20; /* 0x42006A0E: je 0x42006a20 */ 7191 L_42006A10: 7192 edx = MEM32(ebp + 0x8); /* 0x42006A10: mov edx, dword ptr [ebp + 8] */ 7193 L_42006A13: 7194 /* cmp MEM32(eax), edx */ /* 0x42006A13: cmp dword ptr [eax], edx */ 7195 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(edx); 7196 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7197 _flag_k = FK_CMP; 7198 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006A1E; /* 0x42006A15: je 0x42006a1e */ 7199 L_42006A17: 7200 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 7201 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7202 eax = eax + 4; /* 0x42006A17: add eax, 4 */ 7203 _flag_k = FK_ADD; 7204 /* cmp eax, ecx */ /* 0x42006A1A: cmp eax, ecx */ 7205 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 7206 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7207 _flag_k = FK_CMP; 7208 RECOMP_BACKEDGE(); 7209 if (CMP_NE(_flag_a, _flag_b)) goto L_42006A13; /* 0x42006A1C: jne 0x42006a13 */ 7210 L_42006A1E: 7211 /* cmp eax, ecx */ /* 0x42006A1E: cmp eax, ecx */ 7212 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 7213 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7214 _flag_k = FK_CMP; 7215 L_42006A20: 7216 SET_LO8(eax, (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_NE, _cf)) ? 1 : 0); /* 0x42006A20: setne al */ 7217 ebp = POP32_VAL(esp); /* 0x42006A23: pop ebp */ 7218 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006A24: ret 4 */ 7219 RECOMP_REGS_OUT(); 7220 } 7221 7222 void sub_42006A30(void) { 7223 int _fpu_cmp = 0; 7224 uint32_t _cf = 0; 7225 int _df = 1; 7226 uint32_t _flag_k = FK_NONE; 7227 uint32_t _flag_a = 0, _flag_b = 0; 7228 uint32_t _itail_tgt = 0; 7229 RECOMP_REGS_LOCALS 7230 RECOMP_ENTER(0x42006A30u); 7231 7232 L_42006A30: 7233 PUSH32(esp, ebp); /* 0x42006A30: push ebp */ 7234 ebp = esp; /* 0x42006A31: mov ebp, esp */ 7235 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 7236 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7237 esp = esp - 0xCu; /* 0x42006A33: sub esp, 0xc */ 7238 _flag_k = FK_CMP; 7239 eax = MEM32(ebp + 0x8); /* 0x42006A36: mov eax, dword ptr [ebp + 8] */ 7240 PUSH32(esp, ebx); /* 0x42006A39: push ebx */ 7241 PUSH32(esp, esi); /* 0x42006A3A: push esi */ 7242 esi = MEM32(ecx + 0x8); /* 0x42006A3B: mov esi, dword ptr [ecx + 8] */ 7243 ebx = 4; /* 0x42006A3E: mov ebx, 4 */ 7244 ecx = MEM32(esi + ebx + 0xC); /* 0x42006A43: mov ecx, dword ptr [esi + ebx + 0xc] */ 7245 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 7246 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7247 esi = esi + ebx; /* 0x42006A47: add esi, ebx */ 7248 _flag_k = FK_ADD; 7249 MEM32(ebp + 0x8) = eax; /* 0x42006A49: mov dword ptr [ebp + 8], eax */ 7250 eax = MEM32(esi + 0x8); /* 0x42006A4C: mov eax, dword ptr [esi + 8] */ 7251 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7252 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7253 ecx = ecx - eax; /* 0x42006A4F: sub ecx, eax */ 7254 _flag_k = FK_CMP; 7255 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x42006A51: sar ecx, 2 */ 7256 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7257 ecx = (uint32_t)((int32_t)ecx >> 2u); 7258 /* cmp ecx, 1 */ /* 0x42006A54: cmp ecx, 1 */ 7259 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 7260 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7261 _flag_k = FK_CMP; 7262 PUSH32(esp, edi); /* 0x42006A57: push edi */ 7263 edi = eax; /* 0x42006A58: mov edi, eax */ 7264 if (CMP_AE(_flag_a, _flag_b)) goto L_42006B4A; /* 0x42006A5A: jae 0x42006b4a */ 7265 L_42006A60: 7266 edx = MEM32(esi + 0x4); /* 0x42006A60: mov edx, dword ptr [esi + 4] */ 7267 /* test edx, edx */ /* 0x42006A63: test edx, edx */ 7268 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 7269 _cf = 0; 7270 _flag_k = FK_TEST; 7271 if (TEST_Z(_flag_a, _flag_b)) goto L_42006A73; /* 0x42006A65: je 0x42006a73 */ 7272 L_42006A67: 7273 ecx = eax; /* 0x42006A67: mov ecx, eax */ 7274 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 7275 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7276 ecx = ecx - edx; /* 0x42006A69: sub ecx, edx */ 7277 _flag_k = FK_CMP; 7278 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x42006A6B: sar ecx, 2 */ 7279 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7280 ecx = (uint32_t)((int32_t)ecx >> 2u); 7281 /* cmp ecx, 1 */ /* 0x42006A6E: cmp ecx, 1 */ 7282 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 7283 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7284 _flag_k = FK_CMP; 7285 if (CMP_A(_flag_a, _flag_b)) goto L_42006A78; /* 0x42006A71: ja 0x42006a78 */ 7286 L_42006A73: 7287 ecx = 1; /* 0x42006A73: mov ecx, 1 */ 7288 L_42006A78: 7289 /* test edx, edx */ /* 0x42006A78: test edx, edx */ 7290 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 7291 _cf = 0; 7292 _flag_k = FK_TEST; 7293 if (TEST_NZ(_flag_a, _flag_b)) goto L_42006A80; /* 0x42006A7A: jne 0x42006a80 */ 7294 L_42006A7C: 7295 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7296 eax = 0; /* 0x42006A7C: xor eax, eax */ 7297 _cf = 0; 7298 _flag_k = FK_TEST; 7299 goto L_42006A85; /* 0x42006A7E: jmp 0x42006a85 */ 7300 L_42006A80: 7301 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 7302 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7303 eax = eax - edx; /* 0x42006A80: sub eax, edx */ 7304 _flag_k = FK_CMP; 7305 if (2u) _cf = (((eax) >> 1) & 1u); /* 0x42006A82: sar eax, 2 */ 7306 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7307 eax = (uint32_t)((int32_t)eax >> 2u); 7308 L_42006A85: 7309 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 7310 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7311 eax = eax + ecx; /* 0x42006A85: add eax, ecx */ 7312 _flag_k = FK_ADD; 7313 /* test eax, eax */ /* 0x42006A87: test eax, eax */ 7314 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7315 _cf = 0; 7316 _flag_k = FK_TEST; 7317 MEM32(ebp + (-0xC)) = eax; /* 0x42006A89: mov dword ptr [ebp - 0xc], eax */ 7318 if (TEST_NS(_flag_a, _flag_b)) goto L_42006A90; /* 0x42006A8C: jge 0x42006a90 */ 7319 L_42006A8E: 7320 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7321 eax = 0; /* 0x42006A8E: xor eax, eax */ 7322 _cf = 0; 7323 _flag_k = FK_TEST; 7324 L_42006A90: 7325 edx = eax * 4; /* 0x42006A90: lea edx, [eax*4] */ 7326 PUSH32(esp, edx); /* 0x42006A97: push edx */ 7327 RECOMP_ICALL(0x42016F36u); /* 0x42006A98: call 0x42016f36 */ /* not lifted */ 7328 RECOMP_FLAGS_IN(); 7329 MEM32(ebp + (-0x8)) = eax; /* 0x42006A9D: mov dword ptr [ebp - 8], eax */ 7330 ebx = eax; /* 0x42006AA0: mov ebx, eax */ 7331 eax = MEM32(esi + 0x4); /* 0x42006AA2: mov eax, dword ptr [esi + 4] */ 7332 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7333 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7334 esp = esp + 4; /* 0x42006AA5: add esp, 4 */ 7335 _flag_k = FK_ADD; 7336 /* cmp eax, edi */ /* 0x42006AA8: cmp eax, edi */ 7337 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 7338 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7339 _flag_k = FK_CMP; 7340 MEM32(ebp + (-0x4)) = eax; /* 0x42006AAA: mov dword ptr [ebp - 4], eax */ 7341 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006ACE; /* 0x42006AAD: je 0x42006ace */ 7342 L_42006AAF: 7343 goto L_42006AB4; /* 0x42006AAF: jmp 0x42006ab4 */ 7344 L_42006AB1: 7345 eax = MEM32(ebp + (-0x4)); /* 0x42006AB1: mov eax, dword ptr [ebp - 4] */ 7346 L_42006AB4: 7347 PUSH32(esp, eax); /* 0x42006AB4: push eax */ 7348 PUSH32(esp, ebx); /* 0x42006AB5: push ebx */ 7349 RECOMP_ICALL(0x42004A70u); /* 0x42006AB6: call 0x42004a70 */ /* not lifted */ 7350 RECOMP_FLAGS_IN(); 7351 eax = MEM32(ebp + (-0x4)); /* 0x42006ABB: mov eax, dword ptr [ebp - 4] */ 7352 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 7353 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7354 eax = eax + 4; /* 0x42006ABE: add eax, 4 */ 7355 _flag_k = FK_ADD; 7356 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 7357 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7358 esp = esp + 8; /* 0x42006AC1: add esp, 8 */ 7359 _flag_k = FK_ADD; 7360 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(4); 7361 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7362 ebx = ebx + 4; /* 0x42006AC4: add ebx, 4 */ 7363 _flag_k = FK_ADD; 7364 /* cmp eax, edi */ /* 0x42006AC7: cmp eax, edi */ 7365 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 7366 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7367 _flag_k = FK_CMP; 7368 MEM32(ebp + (-0x4)) = eax; /* 0x42006AC9: mov dword ptr [ebp - 4], eax */ 7369 RECOMP_BACKEDGE(); 7370 if (CMP_NE(_flag_a, _flag_b)) goto L_42006AB1; /* 0x42006ACC: jne 0x42006ab1 */ 7371 L_42006ACE: 7372 eax = ebp + 0x8; /* 0x42006ACE: lea eax, [ebp + 8] */ 7373 PUSH32(esp, eax); /* 0x42006AD1: push eax */ 7374 PUSH32(esp, 1); /* 0x42006AD2: push 1 */ 7375 PUSH32(esp, ebx); /* 0x42006AD4: push ebx */ 7376 ecx = esi; /* 0x42006AD5: mov ecx, esi */ 7377 RECOMP_ICALL(0x42005CE0u); /* 0x42006AD7: call 0x42005ce0 */ /* not lifted */ 7378 RECOMP_FLAGS_IN(); 7379 ecx = MEM32(esi + 0x8); /* 0x42006ADC: mov ecx, dword ptr [esi + 8] */ 7380 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(4); 7381 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7382 ebx = ebx + 4; /* 0x42006ADF: add ebx, 4 */ 7383 _flag_k = FK_ADD; 7384 PUSH32(esp, ebx); /* 0x42006AE2: push ebx */ 7385 PUSH32(esp, ecx); /* 0x42006AE3: push ecx */ 7386 PUSH32(esp, edi); /* 0x42006AE4: push edi */ 7387 ecx = esi; /* 0x42006AE5: mov ecx, esi */ 7388 RECOMP_ICALL(0x42005CB0u); /* 0x42006AE7: call 0x42005cb0 */ /* not lifted */ 7389 RECOMP_FLAGS_IN(); 7390 edx = MEM32(esi + 0x8); /* 0x42006AEC: mov edx, dword ptr [esi + 8] */ 7391 eax = MEM32(esi + 0x4); /* 0x42006AEF: mov eax, dword ptr [esi + 4] */ 7392 PUSH32(esp, edx); /* 0x42006AF2: push edx */ 7393 PUSH32(esp, eax); /* 0x42006AF3: push eax */ 7394 ecx = esi; /* 0x42006AF4: mov ecx, esi */ 7395 RECOMP_ICALL(0x42002690u); /* 0x42006AF6: call 0x42002690 */ /* not lifted */ 7396 RECOMP_FLAGS_IN(); 7397 ecx = MEM32(esi + 0x4); /* 0x42006AFB: mov ecx, dword ptr [esi + 4] */ 7398 PUSH32(esp, ecx); /* 0x42006AFE: push ecx */ 7399 RECOMP_ICALL(0x42016DD0u); /* 0x42006AFF: call 0x42016dd0 */ /* not lifted */ 7400 RECOMP_FLAGS_IN(); 7401 eax = MEM32(ebp + (-0xC)); /* 0x42006B04: mov eax, dword ptr [ebp - 0xc] */ 7402 edx = MEM32(ebp + (-0x8)); /* 0x42006B07: mov edx, dword ptr [ebp - 8] */ 7403 ecx = edx + eax * 4; /* 0x42006B0A: lea ecx, [edx + eax*4] */ 7404 eax = MEM32(esi + 0x4); /* 0x42006B0D: mov eax, dword ptr [esi + 4] */ 7405 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7406 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7407 esp = esp + 4; /* 0x42006B10: add esp, 4 */ 7408 _flag_k = FK_ADD; 7409 /* test eax, eax */ /* 0x42006B13: test eax, eax */ 7410 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7411 _cf = 0; 7412 _flag_k = FK_TEST; 7413 MEM32(esi + 0xC) = ecx; /* 0x42006B15: mov dword ptr [esi + 0xc], ecx */ 7414 if (TEST_NZ(_flag_a, _flag_b)) goto L_42006B2F; /* 0x42006B18: jne 0x42006b2f */ 7415 L_42006B1A: 7416 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7417 ecx = 0; /* 0x42006B1A: xor ecx, ecx */ 7418 _cf = 0; 7419 _flag_k = FK_TEST; 7420 eax = edx + ecx * 4 + 0x4; /* 0x42006B1C: lea eax, [edx + ecx*4 + 4] */ 7421 edi = POP32_VAL(esp); /* 0x42006B20: pop edi */ 7422 MEM32(esi + 0x8) = eax; /* 0x42006B21: mov dword ptr [esi + 8], eax */ 7423 MEM32(esi + 0x4) = edx; /* 0x42006B24: mov dword ptr [esi + 4], edx */ 7424 esi = POP32_VAL(esp); /* 0x42006B27: pop esi */ 7425 ebx = POP32_VAL(esp); /* 0x42006B28: pop ebx */ 7426 esp = ebp; /* 0x42006B29: mov esp, ebp */ 7427 ebp = POP32_VAL(esp); /* 0x42006B2B: pop ebp */ 7428 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006B2C: ret 4 */ 7429 L_42006B2F: 7430 ecx = MEM32(esi + 0x8); /* 0x42006B2F: mov ecx, dword ptr [esi + 8] */ 7431 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7432 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7433 ecx = ecx - eax; /* 0x42006B32: sub ecx, eax */ 7434 _flag_k = FK_CMP; 7435 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x42006B34: sar ecx, 2 */ 7436 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7437 ecx = (uint32_t)((int32_t)ecx >> 2u); 7438 eax = edx + ecx * 4 + 0x4; /* 0x42006B37: lea eax, [edx + ecx*4 + 4] */ 7439 edi = POP32_VAL(esp); /* 0x42006B3B: pop edi */ 7440 MEM32(esi + 0x8) = eax; /* 0x42006B3C: mov dword ptr [esi + 8], eax */ 7441 MEM32(esi + 0x4) = edx; /* 0x42006B3F: mov dword ptr [esi + 4], edx */ 7442 esi = POP32_VAL(esp); /* 0x42006B42: pop esi */ 7443 ebx = POP32_VAL(esp); /* 0x42006B43: pop ebx */ 7444 esp = ebp; /* 0x42006B44: mov esp, ebp */ 7445 ebp = POP32_VAL(esp); /* 0x42006B46: pop ebp */ 7446 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006B47: ret 4 */ 7447 L_42006B4A: 7448 ecx = eax; /* 0x42006B4A: mov ecx, eax */ 7449 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 7450 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7451 ecx = ecx - edi; /* 0x42006B4C: sub ecx, edi */ 7452 _flag_k = FK_CMP; 7453 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x42006B4E: sar ecx, 2 */ 7454 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7455 ecx = (uint32_t)((int32_t)ecx >> 2u); 7456 /* cmp ecx, 1 */ /* 0x42006B51: cmp ecx, 1 */ 7457 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 7458 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7459 _flag_k = FK_CMP; 7460 if (CMP_AE(_flag_a, _flag_b)) goto L_42006BA4; /* 0x42006B54: jae 0x42006ba4 */ 7461 L_42006B56: 7462 edx = edi + 0x4; /* 0x42006B56: lea edx, [edi + 4] */ 7463 PUSH32(esp, edx); /* 0x42006B59: push edx */ 7464 PUSH32(esp, eax); /* 0x42006B5A: push eax */ 7465 PUSH32(esp, edi); /* 0x42006B5B: push edi */ 7466 ecx = esi; /* 0x42006B5C: mov ecx, esi */ 7467 RECOMP_ICALL(0x42005CB0u); /* 0x42006B5E: call 0x42005cb0 */ /* not lifted */ 7468 RECOMP_FLAGS_IN(); 7469 eax = MEM32(esi + 0x8); /* 0x42006B63: mov eax, dword ptr [esi + 8] */ 7470 edx = eax; /* 0x42006B66: mov edx, eax */ 7471 ecx = ebp + 0x8; /* 0x42006B68: lea ecx, [ebp + 8] */ 7472 PUSH32(esp, ecx); /* 0x42006B6B: push ecx */ 7473 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edi); 7474 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7475 edx = edx - edi; /* 0x42006B6C: sub edx, edi */ 7476 _flag_k = FK_CMP; 7477 if (2u) _cf = (((edx) >> 1) & 1u); /* 0x42006B6E: sar edx, 2 */ 7478 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7479 edx = (uint32_t)((int32_t)edx >> 2u); 7480 ecx = 1; /* 0x42006B71: mov ecx, 1 */ 7481 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 7482 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7483 ecx = ecx - edx; /* 0x42006B76: sub ecx, edx */ 7484 _flag_k = FK_CMP; 7485 PUSH32(esp, ecx); /* 0x42006B78: push ecx */ 7486 PUSH32(esp, eax); /* 0x42006B79: push eax */ 7487 ecx = esi; /* 0x42006B7A: mov ecx, esi */ 7488 RECOMP_ICALL(0x42005CE0u); /* 0x42006B7C: call 0x42005ce0 */ /* not lifted */ 7489 RECOMP_FLAGS_IN(); 7490 eax = MEM32(esi + 0x8); /* 0x42006B81: mov eax, dword ptr [esi + 8] */ 7491 /* cmp edi, eax */ /* 0x42006B84: cmp edi, eax */ 7492 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 7493 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7494 _flag_k = FK_CMP; 7495 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006BD9; /* 0x42006B86: je 0x42006bd9 */ 7496 L_42006B88: 7497 edx = MEM32(ebp + 0x8); /* 0x42006B88: mov edx, dword ptr [ebp + 8] */ 7498 MEM32(edi) = edx; /* 0x42006B8B: mov dword ptr [edi], edx */ 7499 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx); 7500 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7501 edi = edi + ebx; /* 0x42006B8D: add edi, ebx */ 7502 _flag_k = FK_ADD; 7503 /* cmp edi, eax */ /* 0x42006B8F: cmp edi, eax */ 7504 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 7505 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7506 _flag_k = FK_CMP; 7507 RECOMP_BACKEDGE(); 7508 if (CMP_NE(_flag_a, _flag_b)) goto L_42006B88; /* 0x42006B91: jne 0x42006b88 */ 7509 L_42006B93: 7510 eax = MEM32(esi + 0x8); /* 0x42006B93: mov eax, dword ptr [esi + 8] */ 7511 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 7512 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7513 eax = eax + ebx; /* 0x42006B96: add eax, ebx */ 7514 _flag_k = FK_ADD; 7515 edi = POP32_VAL(esp); /* 0x42006B98: pop edi */ 7516 MEM32(esi + 0x8) = eax; /* 0x42006B99: mov dword ptr [esi + 8], eax */ 7517 esi = POP32_VAL(esp); /* 0x42006B9C: pop esi */ 7518 ebx = POP32_VAL(esp); /* 0x42006B9D: pop ebx */ 7519 esp = ebp; /* 0x42006B9E: mov esp, ebp */ 7520 ebp = POP32_VAL(esp); /* 0x42006BA0: pop ebp */ 7521 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006BA1: ret 4 */ 7522 L_42006BA4: 7523 PUSH32(esp, eax); /* 0x42006BA4: push eax */ 7524 PUSH32(esp, eax); /* 0x42006BA5: push eax */ 7525 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFCu); 7526 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7527 eax = eax + 0xFFFFFFFCu; /* 0x42006BA6: add eax, -4 */ 7528 _flag_k = FK_ADD; 7529 PUSH32(esp, eax); /* 0x42006BA9: push eax */ 7530 ecx = esi; /* 0x42006BAA: mov ecx, esi */ 7531 RECOMP_ICALL(0x42005CB0u); /* 0x42006BAC: call 0x42005cb0 */ /* not lifted */ 7532 RECOMP_FLAGS_IN(); 7533 ecx = MEM32(esi + 0x8); /* 0x42006BB1: mov ecx, dword ptr [esi + 8] */ 7534 eax = ecx + (-0x4); /* 0x42006BB4: lea eax, [ecx - 4] */ 7535 /* cmp edi, eax */ /* 0x42006BB7: cmp edi, eax */ 7536 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 7537 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7538 _flag_k = FK_CMP; 7539 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006BC7; /* 0x42006BB9: je 0x42006bc7 */ 7540 L_42006BBB: 7541 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 7542 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7543 eax = eax - ebx; /* 0x42006BBB: sub eax, ebx */ 7544 _flag_k = FK_CMP; 7545 edx = MEM32(eax); /* 0x42006BBD: mov edx, dword ptr [eax] */ 7546 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx); 7547 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7548 ecx = ecx - ebx; /* 0x42006BBF: sub ecx, ebx */ 7549 _flag_k = FK_CMP; 7550 /* cmp eax, edi */ /* 0x42006BC1: cmp eax, edi */ 7551 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 7552 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7553 _flag_k = FK_CMP; 7554 MEM32(ecx) = edx; /* 0x42006BC3: mov dword ptr [ecx], edx */ 7555 RECOMP_BACKEDGE(); 7556 if (CMP_NE(_flag_a, _flag_b)) goto L_42006BBB; /* 0x42006BC5: jne 0x42006bbb */ 7557 L_42006BC7: 7558 eax = edi + 0x4; /* 0x42006BC7: lea eax, [edi + 4] */ 7559 /* cmp edi, eax */ /* 0x42006BCA: cmp edi, eax */ 7560 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 7561 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7562 _flag_k = FK_CMP; 7563 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006BD9; /* 0x42006BCC: je 0x42006bd9 */ 7564 L_42006BCE: 7565 ecx = MEM32(ebp + 0x8); /* 0x42006BCE: mov ecx, dword ptr [ebp + 8] */ 7566 MEM32(edi) = ecx; /* 0x42006BD1: mov dword ptr [edi], ecx */ 7567 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx); 7568 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7569 edi = edi + ebx; /* 0x42006BD3: add edi, ebx */ 7570 _flag_k = FK_ADD; 7571 /* cmp edi, eax */ /* 0x42006BD5: cmp edi, eax */ 7572 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 7573 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7574 _flag_k = FK_CMP; 7575 RECOMP_BACKEDGE(); 7576 if (CMP_NE(_flag_a, _flag_b)) goto L_42006BCE; /* 0x42006BD7: jne 0x42006bce */ 7577 L_42006BD9: 7578 eax = MEM32(esi + 0x8); /* 0x42006BD9: mov eax, dword ptr [esi + 8] */ 7579 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx); 7580 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7581 eax = eax + ebx; /* 0x42006BDC: add eax, ebx */ 7582 _flag_k = FK_ADD; 7583 edi = POP32_VAL(esp); /* 0x42006BDE: pop edi */ 7584 MEM32(esi + 0x8) = eax; /* 0x42006BDF: mov dword ptr [esi + 8], eax */ 7585 esi = POP32_VAL(esp); /* 0x42006BE2: pop esi */ 7586 ebx = POP32_VAL(esp); /* 0x42006BE3: pop ebx */ 7587 esp = ebp; /* 0x42006BE4: mov esp, ebp */ 7588 ebp = POP32_VAL(esp); /* 0x42006BE6: pop ebp */ 7589 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006BE7: ret 4 */ 7590 RECOMP_REGS_OUT(); 7591 } 7592 7593 void sub_42006BF0(void) { 7594 int _fpu_cmp = 0; 7595 uint32_t _cf = 0; 7596 int _df = 1; 7597 uint32_t _flag_k = FK_NONE; 7598 uint32_t _flag_a = 0, _flag_b = 0; 7599 uint32_t _itail_tgt = 0; 7600 RECOMP_REGS_LOCALS 7601 RECOMP_ENTER(0x42006BF0u); 7602 7603 L_42006BF0: 7604 PUSH32(esp, ebp); /* 0x42006BF0: push ebp */ 7605 ebp = esp; /* 0x42006BF1: mov ebp, esp */ 7606 PUSH32(esp, esi); /* 0x42006BF3: push esi */ 7607 esi = MEM32(ecx + 0x8); /* 0x42006BF4: mov esi, dword ptr [ecx + 8] */ 7608 eax = MEM32(esi + 0xC); /* 0x42006BF7: mov eax, dword ptr [esi + 0xc] */ 7609 ecx = MEM32(esi + 0x8); /* 0x42006BFA: mov ecx, dword ptr [esi + 8] */ 7610 /* cmp ecx, eax */ /* 0x42006BFD: cmp ecx, eax */ 7611 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7612 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7613 _flag_k = FK_CMP; 7614 PUSH32(esp, edi); /* 0x42006BFF: push edi */ 7615 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006C38; /* 0x42006C00: je 0x42006c38 */ 7616 L_42006C02: 7617 edx = MEM32(ebp + 0x8); /* 0x42006C02: mov edx, dword ptr [ebp + 8] */ 7618 L_42006C05: 7619 /* cmp MEM32(ecx), edx */ /* 0x42006C05: cmp dword ptr [ecx], edx */ 7620 _flag_a = (uint32_t)(MEM32(ecx)); _flag_b = (uint32_t)(edx); 7621 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7622 _flag_k = FK_CMP; 7623 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006C10; /* 0x42006C07: je 0x42006c10 */ 7624 L_42006C09: 7625 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 7626 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7627 ecx = ecx + 4; /* 0x42006C09: add ecx, 4 */ 7628 _flag_k = FK_ADD; 7629 /* cmp ecx, eax */ /* 0x42006C0C: cmp ecx, eax */ 7630 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7631 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7632 _flag_k = FK_CMP; 7633 RECOMP_BACKEDGE(); 7634 if (CMP_NE(_flag_a, _flag_b)) goto L_42006C05; /* 0x42006C0E: jne 0x42006c05 */ 7635 L_42006C10: 7636 /* cmp ecx, eax */ /* 0x42006C10: cmp ecx, eax */ 7637 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7638 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7639 _flag_k = FK_CMP; 7640 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006C38; /* 0x42006C12: je 0x42006c38 */ 7641 L_42006C14: 7642 edx = MEM32(esi + 0xC); /* 0x42006C14: mov edx, dword ptr [esi + 0xc] */ 7643 eax = ecx + 0x4; /* 0x42006C17: lea eax, [ecx + 4] */ 7644 /* cmp eax, edx */ /* 0x42006C1A: cmp eax, edx */ 7645 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 7646 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7647 _flag_k = FK_CMP; 7648 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006C2C; /* 0x42006C1C: je 0x42006c2c */ 7649 L_42006C1E: 7650 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7651 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7652 ecx = ecx - eax; /* 0x42006C1E: sub ecx, eax */ 7653 _flag_k = FK_CMP; 7654 L_42006C20: 7655 edi = MEM32(eax); /* 0x42006C20: mov edi, dword ptr [eax] */ 7656 MEM32(ecx + eax) = edi; /* 0x42006C22: mov dword ptr [ecx + eax], edi */ 7657 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 7658 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7659 eax = eax + 4; /* 0x42006C25: add eax, 4 */ 7660 _flag_k = FK_ADD; 7661 /* cmp eax, edx */ /* 0x42006C28: cmp eax, edx */ 7662 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 7663 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7664 _flag_k = FK_CMP; 7665 RECOMP_BACKEDGE(); 7666 if (CMP_NE(_flag_a, _flag_b)) goto L_42006C20; /* 0x42006C2A: jne 0x42006c20 */ 7667 L_42006C2C: 7668 eax = MEM32(esi + 0xC); /* 0x42006C2C: mov eax, dword ptr [esi + 0xc] */ 7669 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFCu); 7670 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7671 eax = eax + 0xFFFFFFFCu; /* 0x42006C2F: add eax, -4 */ 7672 _flag_k = FK_ADD; 7673 MEM32(ebp + 0x8) = eax; /* 0x42006C32: mov dword ptr [ebp + 8], eax */ 7674 MEM32(esi + 0xC) = eax; /* 0x42006C35: mov dword ptr [esi + 0xc], eax */ 7675 L_42006C38: 7676 edi = POP32_VAL(esp); /* 0x42006C38: pop edi */ 7677 esi = POP32_VAL(esp); /* 0x42006C39: pop esi */ 7678 ebp = POP32_VAL(esp); /* 0x42006C3A: pop ebp */ 7679 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006C3B: ret 4 */ 7680 RECOMP_REGS_OUT(); 7681 } 7682 7683 void sub_42006C40(void) { 7684 int _fpu_cmp = 0; 7685 uint32_t _cf = 0; 7686 int _df = 1; 7687 uint32_t _flag_k = FK_NONE; 7688 uint32_t _flag_a = 0, _flag_b = 0; 7689 uint32_t _itail_tgt = 0; 7690 RECOMP_REGS_LOCALS 7691 RECOMP_ENTER(0x42006C40u); 7692 7693 L_42006C40: 7694 PUSH32(esp, ebp); /* 0x42006C40: push ebp */ 7695 ebp = esp; /* 0x42006C41: mov ebp, esp */ 7696 PUSH32(esp, ebx); /* 0x42006C43: push ebx */ 7697 PUSH32(esp, esi); /* 0x42006C44: push esi */ 7698 PUSH32(esp, edi); /* 0x42006C45: push edi */ 7699 edi = MEM32(ecx + 0x8); /* 0x42006C46: mov edi, dword ptr [ecx + 8] */ 7700 esi = MEM32(edi + 0x8); /* 0x42006C49: mov esi, dword ptr [edi + 8] */ 7701 ebx = MEM32(edi + 0xC); /* 0x42006C4C: mov ebx, dword ptr [edi + 0xc] */ 7702 /* cmp esi, ebx */ /* 0x42006C4F: cmp esi, ebx */ 7703 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 7704 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7705 _flag_k = FK_CMP; 7706 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006C63; /* 0x42006C51: je 0x42006c63 */ 7707 L_42006C53: 7708 eax = MEM32(ebp + 0x8); /* 0x42006C53: mov eax, dword ptr [ebp + 8] */ 7709 ecx = MEM32(esi); /* 0x42006C56: mov ecx, dword ptr [esi] */ 7710 PUSH32(esp, eax); /* 0x42006C58: push eax */ 7711 RECOMP_ICALL(MEM32(edi + 0x14)); /* 0x42006C59: call dword ptr [edi + 0x14] */ 7712 RECOMP_FLAGS_IN(); 7713 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4); 7714 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7715 esi = esi + 4; /* 0x42006C5C: add esi, 4 */ 7716 _flag_k = FK_ADD; 7717 /* cmp esi, ebx */ /* 0x42006C5F: cmp esi, ebx */ 7718 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 7719 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7720 _flag_k = FK_CMP; 7721 RECOMP_BACKEDGE(); 7722 if (CMP_NE(_flag_a, _flag_b)) goto L_42006C53; /* 0x42006C61: jne 0x42006c53 */ 7723 L_42006C63: 7724 edi = POP32_VAL(esp); /* 0x42006C63: pop edi */ 7725 esi = POP32_VAL(esp); /* 0x42006C64: pop esi */ 7726 ebx = POP32_VAL(esp); /* 0x42006C65: pop ebx */ 7727 ebp = POP32_VAL(esp); /* 0x42006C66: pop ebp */ 7728 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006C67: ret 4 */ 7729 RECOMP_REGS_OUT(); 7730 } 7731 7732 void sub_42006C70(void) { 7733 int _fpu_cmp = 0; 7734 uint32_t _cf = 0; 7735 int _df = 1; 7736 uint32_t _flag_k = FK_NONE; 7737 uint32_t _flag_a = 0, _flag_b = 0; 7738 uint32_t _itail_tgt = 0; 7739 RECOMP_REGS_LOCALS 7740 RECOMP_ENTER(0x42006C70u); 7741 7742 L_42006C70: 7743 PUSH32(esp, ebp); /* 0x42006C70: push ebp */ 7744 ebp = esp; /* 0x42006C71: mov ebp, esp */ 7745 eax = MEM32(ecx + 0x8); /* 0x42006C73: mov eax, dword ptr [ecx + 8] */ 7746 ecx = MEM32(eax + 0xC); /* 0x42006C76: mov ecx, dword ptr [eax + 0xc] */ 7747 eax = MEM32(eax + 0x8); /* 0x42006C79: mov eax, dword ptr [eax + 8] */ 7748 /* cmp eax, ecx */ /* 0x42006C7C: cmp eax, ecx */ 7749 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 7750 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7751 _flag_k = FK_CMP; 7752 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006C90; /* 0x42006C7E: je 0x42006c90 */ 7753 L_42006C80: 7754 edx = MEM32(ebp + 0x8); /* 0x42006C80: mov edx, dword ptr [ebp + 8] */ 7755 L_42006C83: 7756 /* cmp MEM32(eax), edx */ /* 0x42006C83: cmp dword ptr [eax], edx */ 7757 _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(edx); 7758 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7759 _flag_k = FK_CMP; 7760 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006C8E; /* 0x42006C85: je 0x42006c8e */ 7761 L_42006C87: 7762 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 7763 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7764 eax = eax + 4; /* 0x42006C87: add eax, 4 */ 7765 _flag_k = FK_ADD; 7766 /* cmp eax, ecx */ /* 0x42006C8A: cmp eax, ecx */ 7767 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 7768 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7769 _flag_k = FK_CMP; 7770 RECOMP_BACKEDGE(); 7771 if (CMP_NE(_flag_a, _flag_b)) goto L_42006C83; /* 0x42006C8C: jne 0x42006c83 */ 7772 L_42006C8E: 7773 /* cmp eax, ecx */ /* 0x42006C8E: cmp eax, ecx */ 7774 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 7775 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7776 _flag_k = FK_CMP; 7777 L_42006C90: 7778 SET_LO8(eax, (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_NE, _cf)) ? 1 : 0); /* 0x42006C90: setne al */ 7779 ebp = POP32_VAL(esp); /* 0x42006C93: pop ebp */ 7780 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006C94: ret 4 */ 7781 RECOMP_REGS_OUT(); 7782 } 7783 7784 void sub_42006CA0(void) { 7785 int _fpu_cmp = 0; 7786 uint32_t _cf = 0; 7787 int _df = 1; 7788 uint32_t _flag_k = FK_NONE; 7789 uint32_t _flag_a = 0, _flag_b = 0; 7790 uint32_t _itail_tgt = 0; 7791 RECOMP_REGS_LOCALS 7792 RECOMP_ENTER(0x42006CA0u); 7793 7794 L_42006CA0: 7795 PUSH32(esp, ebp); /* 0x42006CA0: push ebp */ 7796 ebp = esp; /* 0x42006CA1: mov ebp, esp */ 7797 edx = MEM32(ebp + 0x8); /* 0x42006CA3: mov edx, dword ptr [ebp + 8] */ 7798 /* test edx, edx */ /* 0x42006CA6: test edx, edx */ 7799 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 7800 _cf = 0; 7801 _flag_k = FK_TEST; 7802 if (TEST_Z(_flag_a, _flag_b)) goto L_42006CB8; /* 0x42006CA8: je 0x42006cb8 */ 7803 L_42006CAA: 7804 eax = ecx + 0x1C; /* 0x42006CAA: lea eax, [ecx + 0x1c] */ 7805 MEM32(ecx + 0x18) = eax; /* 0x42006CAD: mov dword ptr [ecx + 0x18], eax */ 7806 ecx = MEM32(edx); /* 0x42006CB0: mov ecx, dword ptr [edx] */ 7807 MEM32(eax) = ecx; /* 0x42006CB2: mov dword ptr [eax], ecx */ 7808 ebp = POP32_VAL(esp); /* 0x42006CB4: pop ebp */ 7809 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006CB5: ret 4 */ 7810 L_42006CB8: 7811 MEM32(ecx + 0x18) = 0; /* 0x42006CB8: mov dword ptr [ecx + 0x18], 0 */ 7812 ebp = POP32_VAL(esp); /* 0x42006CBF: pop ebp */ 7813 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006CC0: ret 4 */ 7814 RECOMP_REGS_OUT(); 7815 } 7816 7817 void sub_42006CD0(void) { 7818 int _fpu_cmp = 0; 7819 uint32_t _cf = 0; 7820 int _df = 1; 7821 uint32_t _flag_k = FK_NONE; 7822 uint32_t _flag_a = 0, _flag_b = 0; 7823 uint32_t _itail_tgt = 0; 7824 RECOMP_REGS_LOCALS 7825 RECOMP_ENTER(0x42006CD0u); 7826 7827 L_42006CD0: 7828 PUSH32(esp, ebp); /* 0x42006CD0: push ebp */ 7829 ebp = esp; /* 0x42006CD1: mov ebp, esp */ 7830 PUSH32(esp, ecx); /* 0x42006CD3: push ecx */ 7831 PUSH32(esp, esi); /* 0x42006CD4: push esi */ 7832 esi = ecx; /* 0x42006CD5: mov esi, ecx */ 7833 MEM32(esi) = 0x4201843Cu; /* 0x42006CD7: mov dword ptr [esi], 0x4201843c */ 7834 edx = MEM32(esi + 0xC); /* 0x42006CDD: mov edx, dword ptr [esi + 0xc] */ 7835 ecx = MEM32(esi + 0x8); /* 0x42006CE0: mov ecx, dword ptr [esi + 8] */ 7836 eax = edx; /* 0x42006CE3: mov eax, edx */ 7837 /* cmp eax, edx */ /* 0x42006CE5: cmp eax, edx */ 7838 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 7839 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7840 _flag_k = FK_CMP; 7841 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006CF9; /* 0x42006CE7: je 0x42006cf9 */ 7842 L_42006CE9: 7843 PUSH32(esp, edi); /* 0x42006CE9: push edi */ 7844 L_42006CEA: 7845 edi = MEM32(eax); /* 0x42006CEA: mov edi, dword ptr [eax] */ 7846 MEM32(ecx) = edi; /* 0x42006CEC: mov dword ptr [ecx], edi */ 7847 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 7848 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7849 eax = eax + 4; /* 0x42006CEE: add eax, 4 */ 7850 _flag_k = FK_ADD; 7851 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 7852 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7853 ecx = ecx + 4; /* 0x42006CF1: add ecx, 4 */ 7854 _flag_k = FK_ADD; 7855 /* cmp eax, edx */ /* 0x42006CF4: cmp eax, edx */ 7856 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 7857 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7858 _flag_k = FK_CMP; 7859 RECOMP_BACKEDGE(); 7860 if (CMP_NE(_flag_a, _flag_b)) goto L_42006CEA; /* 0x42006CF6: jne 0x42006cea */ 7861 L_42006CF8: 7862 edi = POP32_VAL(esp); /* 0x42006CF8: pop edi */ 7863 L_42006CF9: 7864 eax = MEM32(esi + 0xC); /* 0x42006CF9: mov eax, dword ptr [esi + 0xc] */ 7865 MEM32(ebp + (-0x4)) = eax; /* 0x42006CFC: mov dword ptr [ebp - 4], eax */ 7866 MEM32(esi + 0xC) = ecx; /* 0x42006CFF: mov dword ptr [esi + 0xc], ecx */ 7867 eax = MEM32(esi + 0x8); /* 0x42006D02: mov eax, dword ptr [esi + 8] */ 7868 PUSH32(esp, eax); /* 0x42006D05: push eax */ 7869 MEM32(ebp + (-0x4)) = eax; /* 0x42006D06: mov dword ptr [ebp - 4], eax */ 7870 RECOMP_ICALL(0x42016DD0u); /* 0x42006D09: call 0x42016dd0 */ /* not lifted */ 7871 RECOMP_FLAGS_IN(); 7872 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7873 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7874 esp = esp + 4; /* 0x42006D0E: add esp, 4 */ 7875 _flag_k = FK_ADD; 7876 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7877 eax = 0; /* 0x42006D11: xor eax, eax */ 7878 _cf = 0; 7879 _flag_k = FK_TEST; 7880 MEM32(esi + 0x8) = eax; /* 0x42006D13: mov dword ptr [esi + 8], eax */ 7881 MEM32(esi + 0xC) = eax; /* 0x42006D16: mov dword ptr [esi + 0xc], eax */ 7882 MEM32(esi + 0x10) = eax; /* 0x42006D19: mov dword ptr [esi + 0x10], eax */ 7883 esi = POP32_VAL(esp); /* 0x42006D1C: pop esi */ 7884 esp = ebp; /* 0x42006D1D: mov esp, ebp */ 7885 ebp = POP32_VAL(esp); /* 0x42006D1F: pop ebp */ 7886 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x42006D20: ret */ 7887 RECOMP_REGS_OUT(); 7888 } 7889 7890 void sub_42006D30(void) { 7891 int _fpu_cmp = 0; 7892 uint32_t _cf = 0; 7893 int _df = 1; 7894 uint32_t _flag_k = FK_NONE; 7895 uint32_t _flag_a = 0, _flag_b = 0; 7896 uint32_t _itail_tgt = 0; 7897 RECOMP_REGS_LOCALS 7898 RECOMP_ENTER(0x42006D30u); 7899 7900 L_42006D30: 7901 PUSH32(esp, ebp); /* 0x42006D30: push ebp */ 7902 ebp = esp; /* 0x42006D31: mov ebp, esp */ 7903 edx = MEM32(ebp + 0x8); /* 0x42006D33: mov edx, dword ptr [ebp + 8] */ 7904 eax = ecx; /* 0x42006D36: mov eax, ecx */ 7905 SET_LO8(ecx, MEM8(ebp + 0xB)); /* 0x42006D38: mov cl, byte ptr [ebp + 0xb] */ 7906 MEM8(eax + 0x4) = (uint8_t)(LO8(ecx)); /* 0x42006D3B: mov byte ptr [eax + 4], cl */ 7907 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7908 ecx = 0; /* 0x42006D3E: xor ecx, ecx */ 7909 _cf = 0; 7910 _flag_k = FK_TEST; 7911 MEM32(eax + 0x8) = ecx; /* 0x42006D40: mov dword ptr [eax + 8], ecx */ 7912 MEM32(eax + 0xC) = ecx; /* 0x42006D43: mov dword ptr [eax + 0xc], ecx */ 7913 MEM32(eax + 0x10) = ecx; /* 0x42006D46: mov dword ptr [eax + 0x10], ecx */ 7914 MEM32(eax) = 0x4201843Cu; /* 0x42006D49: mov dword ptr [eax], 0x4201843c */ 7915 MEM32(eax + 0x14) = edx; /* 0x42006D4F: mov dword ptr [eax + 0x14], edx */ 7916 ebp = POP32_VAL(esp); /* 0x42006D52: pop ebp */ 7917 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006D53: ret 4 */ 7918 RECOMP_REGS_OUT(); 7919 } 7920 7921 void sub_42006D60(void) { 7922 int _fpu_cmp = 0; 7923 uint32_t _cf = 0; 7924 int _df = 1; 7925 uint32_t _flag_k = FK_NONE; 7926 uint32_t _flag_a = 0, _flag_b = 0; 7927 uint32_t _itail_tgt = 0; 7928 RECOMP_REGS_LOCALS 7929 RECOMP_ENTER(0x42006D60u); 7930 7931 L_42006D60: 7932 PUSH32(esp, ebp); /* 0x42006D60: push ebp */ 7933 ebp = esp; /* 0x42006D61: mov ebp, esp */ 7934 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 7935 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7936 esp = esp - 0xCu; /* 0x42006D63: sub esp, 0xc */ 7937 _flag_k = FK_CMP; 7938 eax = MEM32(ecx + 0xC); /* 0x42006D66: mov eax, dword ptr [ecx + 0xc] */ 7939 PUSH32(esp, esi); /* 0x42006D69: push esi */ 7940 esi = ecx + 0x4; /* 0x42006D6A: lea esi, [ecx + 4] */ 7941 ecx = MEM32(esi + 0xC); /* 0x42006D6D: mov ecx, dword ptr [esi + 0xc] */ 7942 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 7943 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7944 ecx = ecx - eax; /* 0x42006D70: sub ecx, eax */ 7945 _flag_k = FK_CMP; 7946 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x42006D72: sar ecx, 2 */ 7947 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7948 ecx = (uint32_t)((int32_t)ecx >> 2u); 7949 /* cmp ecx, 1 */ /* 0x42006D75: cmp ecx, 1 */ 7950 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 7951 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7952 _flag_k = FK_CMP; 7953 PUSH32(esp, edi); /* 0x42006D78: push edi */ 7954 edi = eax; /* 0x42006D79: mov edi, eax */ 7955 if (CMP_AE(_flag_a, _flag_b)) goto L_42006E6B; /* 0x42006D7B: jae 0x42006e6b */ 7956 L_42006D81: 7957 edx = MEM32(esi + 0x4); /* 0x42006D81: mov edx, dword ptr [esi + 4] */ 7958 /* test edx, edx */ /* 0x42006D84: test edx, edx */ 7959 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 7960 _cf = 0; 7961 _flag_k = FK_TEST; 7962 if (TEST_Z(_flag_a, _flag_b)) goto L_42006D94; /* 0x42006D86: je 0x42006d94 */ 7963 L_42006D88: 7964 ecx = eax; /* 0x42006D88: mov ecx, eax */ 7965 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 7966 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7967 ecx = ecx - edx; /* 0x42006D8A: sub ecx, edx */ 7968 _flag_k = FK_CMP; 7969 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x42006D8C: sar ecx, 2 */ 7970 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7971 ecx = (uint32_t)((int32_t)ecx >> 2u); 7972 /* cmp ecx, 1 */ /* 0x42006D8F: cmp ecx, 1 */ 7973 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 7974 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7975 _flag_k = FK_CMP; 7976 if (CMP_A(_flag_a, _flag_b)) goto L_42006D99; /* 0x42006D92: ja 0x42006d99 */ 7977 L_42006D94: 7978 ecx = 1; /* 0x42006D94: mov ecx, 1 */ 7979 L_42006D99: 7980 /* test edx, edx */ /* 0x42006D99: test edx, edx */ 7981 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx); 7982 _cf = 0; 7983 _flag_k = FK_TEST; 7984 if (TEST_NZ(_flag_a, _flag_b)) goto L_42006DA1; /* 0x42006D9B: jne 0x42006da1 */ 7985 L_42006D9D: 7986 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 7987 eax = 0; /* 0x42006D9D: xor eax, eax */ 7988 _cf = 0; 7989 _flag_k = FK_TEST; 7990 goto L_42006DA6; /* 0x42006D9F: jmp 0x42006da6 */ 7991 L_42006DA1: 7992 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 7993 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7994 eax = eax - edx; /* 0x42006DA1: sub eax, edx */ 7995 _flag_k = FK_CMP; 7996 if (2u) _cf = (((eax) >> 1) & 1u); /* 0x42006DA3: sar eax, 2 */ 7997 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 7998 eax = (uint32_t)((int32_t)eax >> 2u); 7999 L_42006DA6: 8000 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 8001 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8002 eax = eax + ecx; /* 0x42006DA6: add eax, ecx */ 8003 _flag_k = FK_ADD; 8004 /* test eax, eax */ /* 0x42006DA8: test eax, eax */ 8005 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 8006 _cf = 0; 8007 _flag_k = FK_TEST; 8008 MEM32(ebp + (-0xC)) = eax; /* 0x42006DAA: mov dword ptr [ebp - 0xc], eax */ 8009 if (TEST_NS(_flag_a, _flag_b)) goto L_42006DB1; /* 0x42006DAD: jge 0x42006db1 */ 8010 L_42006DAF: 8011 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 8012 eax = 0; /* 0x42006DAF: xor eax, eax */ 8013 _cf = 0; 8014 _flag_k = FK_TEST; 8015 L_42006DB1: 8016 edx = eax * 4; /* 0x42006DB1: lea edx, [eax*4] */ 8017 PUSH32(esp, ebx); /* 0x42006DB8: push ebx */ 8018 PUSH32(esp, edx); /* 0x42006DB9: push edx */ 8019 RECOMP_ICALL(0x42016F36u); /* 0x42006DBA: call 0x42016f36 */ /* not lifted */ 8020 RECOMP_FLAGS_IN(); 8021 MEM32(ebp + (-0x8)) = eax; /* 0x42006DBF: mov dword ptr [ebp - 8], eax */ 8022 ebx = eax; /* 0x42006DC2: mov ebx, eax */ 8023 eax = MEM32(esi + 0x4); /* 0x42006DC4: mov eax, dword ptr [esi + 4] */ 8024 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8025 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8026 esp = esp + 4; /* 0x42006DC7: add esp, 4 */ 8027 _flag_k = FK_ADD; 8028 /* cmp eax, edi */ /* 0x42006DCA: cmp eax, edi */ 8029 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 8030 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8031 _flag_k = FK_CMP; 8032 MEM32(ebp + (-0x4)) = eax; /* 0x42006DCC: mov dword ptr [ebp - 4], eax */ 8033 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006DF0; /* 0x42006DCF: je 0x42006df0 */ 8034 L_42006DD1: 8035 goto L_42006DD6; /* 0x42006DD1: jmp 0x42006dd6 */ 8036 L_42006DD3: 8037 eax = MEM32(ebp + (-0x4)); /* 0x42006DD3: mov eax, dword ptr [ebp - 4] */ 8038 L_42006DD6: 8039 PUSH32(esp, eax); /* 0x42006DD6: push eax */ 8040 PUSH32(esp, ebx); /* 0x42006DD7: push ebx */ 8041 RECOMP_ICALL(0x42004A70u); /* 0x42006DD8: call 0x42004a70 */ /* not lifted */ 8042 RECOMP_FLAGS_IN(); 8043 eax = MEM32(ebp + (-0x4)); /* 0x42006DDD: mov eax, dword ptr [ebp - 4] */ 8044 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 8045 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8046 eax = eax + 4; /* 0x42006DE0: add eax, 4 */ 8047 _flag_k = FK_ADD; 8048 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 8049 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8050 esp = esp + 8; /* 0x42006DE3: add esp, 8 */ 8051 _flag_k = FK_ADD; 8052 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(4); 8053 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8054 ebx = ebx + 4; /* 0x42006DE6: add ebx, 4 */ 8055 _flag_k = FK_ADD; 8056 /* cmp eax, edi */ /* 0x42006DE9: cmp eax, edi */ 8057 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 8058 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8059 _flag_k = FK_CMP; 8060 MEM32(ebp + (-0x4)) = eax; /* 0x42006DEB: mov dword ptr [ebp - 4], eax */ 8061 RECOMP_BACKEDGE(); 8062 if (CMP_NE(_flag_a, _flag_b)) goto L_42006DD3; /* 0x42006DEE: jne 0x42006dd3 */ 8063 L_42006DF0: 8064 eax = ebp + 0x8; /* 0x42006DF0: lea eax, [ebp + 8] */ 8065 PUSH32(esp, eax); /* 0x42006DF3: push eax */ 8066 PUSH32(esp, 1); /* 0x42006DF4: push 1 */ 8067 PUSH32(esp, ebx); /* 0x42006DF6: push ebx */ 8068 ecx = esi; /* 0x42006DF7: mov ecx, esi */ 8069 RECOMP_ICALL(0x42005CE0u); /* 0x42006DF9: call 0x42005ce0 */ /* not lifted */ 8070 RECOMP_FLAGS_IN(); 8071 ecx = MEM32(esi + 0x8); /* 0x42006DFE: mov ecx, dword ptr [esi + 8] */ 8072 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(4); 8073 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8074 ebx = ebx + 4; /* 0x42006E01: add ebx, 4 */ 8075 _flag_k = FK_ADD; 8076 PUSH32(esp, ebx); /* 0x42006E04: push ebx */ 8077 PUSH32(esp, ecx); /* 0x42006E05: push ecx */ 8078 PUSH32(esp, edi); /* 0x42006E06: push edi */ 8079 ecx = esi; /* 0x42006E07: mov ecx, esi */ 8080 RECOMP_ICALL(0x42005CB0u); /* 0x42006E09: call 0x42005cb0 */ /* not lifted */ 8081 RECOMP_FLAGS_IN(); 8082 edx = MEM32(esi + 0x8); /* 0x42006E0E: mov edx, dword ptr [esi + 8] */ 8083 eax = MEM32(esi + 0x4); /* 0x42006E11: mov eax, dword ptr [esi + 4] */ 8084 PUSH32(esp, edx); /* 0x42006E14: push edx */ 8085 PUSH32(esp, eax); /* 0x42006E15: push eax */ 8086 ecx = esi; /* 0x42006E16: mov ecx, esi */ 8087 RECOMP_ICALL(0x42002690u); /* 0x42006E18: call 0x42002690 */ /* not lifted */ 8088 RECOMP_FLAGS_IN(); 8089 ecx = MEM32(esi + 0x4); /* 0x42006E1D: mov ecx, dword ptr [esi + 4] */ 8090 PUSH32(esp, ecx); /* 0x42006E20: push ecx */ 8091 RECOMP_ICALL(0x42016DD0u); /* 0x42006E21: call 0x42016dd0 */ /* not lifted */ 8092 RECOMP_FLAGS_IN(); 8093 eax = MEM32(ebp + (-0xC)); /* 0x42006E26: mov eax, dword ptr [ebp - 0xc] */ 8094 edx = MEM32(ebp + (-0x8)); /* 0x42006E29: mov edx, dword ptr [ebp - 8] */ 8095 ecx = edx + eax * 4; /* 0x42006E2C: lea ecx, [edx + eax*4] */ 8096 eax = MEM32(esi + 0x4); /* 0x42006E2F: mov eax, dword ptr [esi + 4] */ 8097 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8098 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8099 esp = esp + 4; /* 0x42006E32: add esp, 4 */ 8100 _flag_k = FK_ADD; 8101 /* test eax, eax */ /* 0x42006E35: test eax, eax */ 8102 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 8103 _cf = 0; 8104 _flag_k = FK_TEST; 8105 MEM32(esi + 0xC) = ecx; /* 0x42006E37: mov dword ptr [esi + 0xc], ecx */ 8106 ebx = POP32_VAL(esp); /* 0x42006E3A: pop ebx */ 8107 if (TEST_NZ(_flag_a, _flag_b)) goto L_42006E51; /* 0x42006E3B: jne 0x42006e51 */ 8108 L_42006E3D: 8109 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 8110 ecx = 0; /* 0x42006E3D: xor ecx, ecx */ 8111 _cf = 0; 8112 _flag_k = FK_TEST; 8113 eax = edx + ecx * 4 + 0x4; /* 0x42006E3F: lea eax, [edx + ecx*4 + 4] */ 8114 edi = POP32_VAL(esp); /* 0x42006E43: pop edi */ 8115 MEM32(esi + 0x8) = eax; /* 0x42006E44: mov dword ptr [esi + 8], eax */ 8116 MEM32(esi + 0x4) = edx; /* 0x42006E47: mov dword ptr [esi + 4], edx */ 8117 esi = POP32_VAL(esp); /* 0x42006E4A: pop esi */ 8118 esp = ebp; /* 0x42006E4B: mov esp, ebp */ 8119 ebp = POP32_VAL(esp); /* 0x42006E4D: pop ebp */ 8120 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006E4E: ret 4 */ 8121 L_42006E51: 8122 ecx = MEM32(esi + 0x8); /* 0x42006E51: mov ecx, dword ptr [esi + 8] */ 8123 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 8124 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8125 ecx = ecx - eax; /* 0x42006E54: sub ecx, eax */ 8126 _flag_k = FK_CMP; 8127 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x42006E56: sar ecx, 2 */ 8128 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 8129 ecx = (uint32_t)((int32_t)ecx >> 2u); 8130 eax = edx + ecx * 4 + 0x4; /* 0x42006E59: lea eax, [edx + ecx*4 + 4] */ 8131 edi = POP32_VAL(esp); /* 0x42006E5D: pop edi */ 8132 MEM32(esi + 0x8) = eax; /* 0x42006E5E: mov dword ptr [esi + 8], eax */ 8133 MEM32(esi + 0x4) = edx; /* 0x42006E61: mov dword ptr [esi + 4], edx */ 8134 esi = POP32_VAL(esp); /* 0x42006E64: pop esi */ 8135 esp = ebp; /* 0x42006E65: mov esp, ebp */ 8136 ebp = POP32_VAL(esp); /* 0x42006E67: pop ebp */ 8137 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006E68: ret 4 */ 8138 L_42006E6B: 8139 ecx = eax; /* 0x42006E6B: mov ecx, eax */ 8140 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 8141 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8142 ecx = ecx - edi; /* 0x42006E6D: sub ecx, edi */ 8143 _flag_k = FK_CMP; 8144 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x42006E6F: sar ecx, 2 */ 8145 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 8146 ecx = (uint32_t)((int32_t)ecx >> 2u); 8147 /* cmp ecx, 1 */ /* 0x42006E72: cmp ecx, 1 */ 8148 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 8149 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8150 _flag_k = FK_CMP; 8151 if (CMP_AE(_flag_a, _flag_b)) goto L_42006EC6; /* 0x42006E75: jae 0x42006ec6 */ 8152 L_42006E77: 8153 edx = edi + 0x4; /* 0x42006E77: lea edx, [edi + 4] */ 8154 PUSH32(esp, edx); /* 0x42006E7A: push edx */ 8155 PUSH32(esp, eax); /* 0x42006E7B: push eax */ 8156 PUSH32(esp, edi); /* 0x42006E7C: push edi */ 8157 ecx = esi; /* 0x42006E7D: mov ecx, esi */ 8158 RECOMP_ICALL(0x42005CB0u); /* 0x42006E7F: call 0x42005cb0 */ /* not lifted */ 8159 RECOMP_FLAGS_IN(); 8160 eax = MEM32(esi + 0x8); /* 0x42006E84: mov eax, dword ptr [esi + 8] */ 8161 edx = eax; /* 0x42006E87: mov edx, eax */ 8162 ecx = ebp + 0x8; /* 0x42006E89: lea ecx, [ebp + 8] */ 8163 PUSH32(esp, ecx); /* 0x42006E8C: push ecx */ 8164 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edi); 8165 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8166 edx = edx - edi; /* 0x42006E8D: sub edx, edi */ 8167 _flag_k = FK_CMP; 8168 if (2u) _cf = (((edx) >> 1) & 1u); /* 0x42006E8F: sar edx, 2 */ 8169 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 8170 edx = (uint32_t)((int32_t)edx >> 2u); 8171 ecx = 1; /* 0x42006E92: mov ecx, 1 */ 8172 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 8173 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8174 ecx = ecx - edx; /* 0x42006E97: sub ecx, edx */ 8175 _flag_k = FK_CMP; 8176 PUSH32(esp, ecx); /* 0x42006E99: push ecx */ 8177 PUSH32(esp, eax); /* 0x42006E9A: push eax */ 8178 ecx = esi; /* 0x42006E9B: mov ecx, esi */ 8179 RECOMP_ICALL(0x42005CE0u); /* 0x42006E9D: call 0x42005ce0 */ /* not lifted */ 8180 RECOMP_FLAGS_IN(); 8181 eax = MEM32(esi + 0x8); /* 0x42006EA2: mov eax, dword ptr [esi + 8] */ 8182 /* cmp edi, eax */ /* 0x42006EA5: cmp edi, eax */ 8183 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 8184 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8185 _flag_k = FK_CMP; 8186 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006F01; /* 0x42006EA7: je 0x42006f01 */ 8187 L_42006EA9: 8188 edx = MEM32(ebp + 0x8); /* 0x42006EA9: mov edx, dword ptr [ebp + 8] */ 8189 MEM32(edi) = edx; /* 0x42006EAC: mov dword ptr [edi], edx */ 8190 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4); 8191 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8192 edi = edi + 4; /* 0x42006EAE: add edi, 4 */ 8193 _flag_k = FK_ADD; 8194 /* cmp edi, eax */ /* 0x42006EB1: cmp edi, eax */ 8195 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 8196 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8197 _flag_k = FK_CMP; 8198 RECOMP_BACKEDGE(); 8199 if (CMP_NE(_flag_a, _flag_b)) goto L_42006EA9; /* 0x42006EB3: jne 0x42006ea9 */ 8200 L_42006EB5: 8201 eax = MEM32(esi + 0x8); /* 0x42006EB5: mov eax, dword ptr [esi + 8] */ 8202 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 8203 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8204 eax = eax + 4; /* 0x42006EB8: add eax, 4 */ 8205 _flag_k = FK_ADD; 8206 edi = POP32_VAL(esp); /* 0x42006EBB: pop edi */ 8207 MEM32(esi + 0x8) = eax; /* 0x42006EBC: mov dword ptr [esi + 8], eax */ 8208 esi = POP32_VAL(esp); /* 0x42006EBF: pop esi */ 8209 esp = ebp; /* 0x42006EC0: mov esp, ebp */ 8210 ebp = POP32_VAL(esp); /* 0x42006EC2: pop ebp */ 8211 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006EC3: ret 4 */ 8212 L_42006EC6: 8213 PUSH32(esp, eax); /* 0x42006EC6: push eax */ 8214 PUSH32(esp, eax); /* 0x42006EC7: push eax */ 8215 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFCu); 8216 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8217 eax = eax + 0xFFFFFFFCu; /* 0x42006EC8: add eax, -4 */ 8218 _flag_k = FK_ADD; 8219 PUSH32(esp, eax); /* 0x42006ECB: push eax */ 8220 ecx = esi; /* 0x42006ECC: mov ecx, esi */ 8221 RECOMP_ICALL(0x42005CB0u); /* 0x42006ECE: call 0x42005cb0 */ /* not lifted */ 8222 RECOMP_FLAGS_IN(); 8223 ecx = MEM32(esi + 0x8); /* 0x42006ED3: mov ecx, dword ptr [esi + 8] */ 8224 eax = ecx + (-0x4); /* 0x42006ED6: lea eax, [ecx - 4] */ 8225 /* cmp edi, eax */ /* 0x42006ED9: cmp edi, eax */ 8226 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 8227 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8228 _flag_k = FK_CMP; 8229 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006EEC; /* 0x42006EDB: je 0x42006eec */ 8230 L_42006EDD: 8231 edx = MEM32(eax + (-0x4)); /* 0x42006EDD: mov edx, dword ptr [eax - 4] */ 8232 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 8233 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8234 eax = eax - 4; /* 0x42006EE0: sub eax, 4 */ 8235 _flag_k = FK_CMP; 8236 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4); 8237 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8238 ecx = ecx - 4; /* 0x42006EE3: sub ecx, 4 */ 8239 _flag_k = FK_CMP; 8240 /* cmp eax, edi */ /* 0x42006EE6: cmp eax, edi */ 8241 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 8242 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8243 _flag_k = FK_CMP; 8244 MEM32(ecx) = edx; /* 0x42006EE8: mov dword ptr [ecx], edx */ 8245 RECOMP_BACKEDGE(); 8246 if (CMP_NE(_flag_a, _flag_b)) goto L_42006EDD; /* 0x42006EEA: jne 0x42006edd */ 8247 L_42006EEC: 8248 ecx = edi + 0x4; /* 0x42006EEC: lea ecx, [edi + 4] */ 8249 /* cmp edi, ecx */ /* 0x42006EEF: cmp edi, ecx */ 8250 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx); 8251 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8252 _flag_k = FK_CMP; 8253 eax = edi; /* 0x42006EF1: mov eax, edi */ 8254 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006F01; /* 0x42006EF3: je 0x42006f01 */ 8255 L_42006EF5: 8256 edx = MEM32(ebp + 0x8); /* 0x42006EF5: mov edx, dword ptr [ebp + 8] */ 8257 MEM32(eax) = edx; /* 0x42006EF8: mov dword ptr [eax], edx */ 8258 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 8259 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8260 eax = eax + 4; /* 0x42006EFA: add eax, 4 */ 8261 _flag_k = FK_ADD; 8262 /* cmp eax, ecx */ /* 0x42006EFD: cmp eax, ecx */ 8263 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 8264 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8265 _flag_k = FK_CMP; 8266 RECOMP_BACKEDGE(); 8267 if (CMP_NE(_flag_a, _flag_b)) goto L_42006EF5; /* 0x42006EFF: jne 0x42006ef5 */ 8268 L_42006F01: 8269 eax = MEM32(esi + 0x8); /* 0x42006F01: mov eax, dword ptr [esi + 8] */ 8270 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 8271 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8272 eax = eax + 4; /* 0x42006F04: add eax, 4 */ 8273 _flag_k = FK_ADD; 8274 edi = POP32_VAL(esp); /* 0x42006F07: pop edi */ 8275 MEM32(esi + 0x8) = eax; /* 0x42006F08: mov dword ptr [esi + 8], eax */ 8276 esi = POP32_VAL(esp); /* 0x42006F0B: pop esi */ 8277 esp = ebp; /* 0x42006F0C: mov esp, ebp */ 8278 ebp = POP32_VAL(esp); /* 0x42006F0E: pop ebp */ 8279 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006F0F: ret 4 */ 8280 RECOMP_REGS_OUT(); 8281 } 8282 8283 void sub_42006F20(void) { 8284 int _fpu_cmp = 0; 8285 uint32_t _cf = 0; 8286 int _df = 1; 8287 uint32_t _flag_k = FK_NONE; 8288 uint32_t _flag_a = 0, _flag_b = 0; 8289 uint32_t _itail_tgt = 0; 8290 RECOMP_REGS_LOCALS 8291 RECOMP_ENTER(0x42006F20u); 8292 8293 L_42006F20: 8294 PUSH32(esp, ebp); /* 0x42006F20: push ebp */ 8295 ebp = esp; /* 0x42006F21: mov ebp, esp */ 8296 eax = MEM32(ecx + 0xC); /* 0x42006F23: mov eax, dword ptr [ecx + 0xc] */ 8297 edx = MEM32(ecx + 0x8); /* 0x42006F26: mov edx, dword ptr [ecx + 8] */ 8298 /* cmp edx, eax */ /* 0x42006F29: cmp edx, eax */ 8299 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 8300 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8301 _flag_k = FK_CMP; 8302 PUSH32(esp, esi); /* 0x42006F2B: push esi */ 8303 PUSH32(esp, edi); /* 0x42006F2C: push edi */ 8304 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006F65; /* 0x42006F2D: je 0x42006f65 */ 8305 L_42006F2F: 8306 esi = MEM32(ebp + 0x8); /* 0x42006F2F: mov esi, dword ptr [ebp + 8] */ 8307 L_42006F32: 8308 /* cmp MEM32(edx), esi */ /* 0x42006F32: cmp dword ptr [edx], esi */ 8309 _flag_a = (uint32_t)(MEM32(edx)); _flag_b = (uint32_t)(esi); 8310 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8311 _flag_k = FK_CMP; 8312 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006F3D; /* 0x42006F34: je 0x42006f3d */ 8313 L_42006F36: 8314 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4); 8315 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8316 edx = edx + 4; /* 0x42006F36: add edx, 4 */ 8317 _flag_k = FK_ADD; 8318 /* cmp edx, eax */ /* 0x42006F39: cmp edx, eax */ 8319 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 8320 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8321 _flag_k = FK_CMP; 8322 RECOMP_BACKEDGE(); 8323 if (CMP_NE(_flag_a, _flag_b)) goto L_42006F32; /* 0x42006F3B: jne 0x42006f32 */ 8324 L_42006F3D: 8325 /* cmp edx, eax */ /* 0x42006F3D: cmp edx, eax */ 8326 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 8327 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8328 _flag_k = FK_CMP; 8329 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006F65; /* 0x42006F3F: je 0x42006f65 */ 8330 L_42006F41: 8331 esi = MEM32(ecx + 0xC); /* 0x42006F41: mov esi, dword ptr [ecx + 0xc] */ 8332 eax = edx + 0x4; /* 0x42006F44: lea eax, [edx + 4] */ 8333 /* cmp eax, esi */ /* 0x42006F47: cmp eax, esi */ 8334 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 8335 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8336 _flag_k = FK_CMP; 8337 if (CMP_EQ(_flag_a, _flag_b)) goto L_42006F59; /* 0x42006F49: je 0x42006f59 */ 8338 L_42006F4B: 8339 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 8340 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8341 edx = edx - eax; /* 0x42006F4B: sub edx, eax */ 8342 _flag_k = FK_CMP; 8343 L_42006F4D: 8344 edi = MEM32(eax); /* 0x42006F4D: mov edi, dword ptr [eax] */ 8345 MEM32(edx + eax) = edi; /* 0x42006F4F: mov dword ptr [edx + eax], edi */ 8346 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4); 8347 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8348 eax = eax + 4; /* 0x42006F52: add eax, 4 */ 8349 _flag_k = FK_ADD; 8350 /* cmp eax, esi */ /* 0x42006F55: cmp eax, esi */ 8351 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 8352 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8353 _flag_k = FK_CMP; 8354 RECOMP_BACKEDGE(); 8355 if (CMP_NE(_flag_a, _flag_b)) goto L_42006F4D; /* 0x42006F57: jne 0x42006f4d */ 8356 L_42006F59: 8357 eax = MEM32(ecx + 0xC); /* 0x42006F59: mov eax, dword ptr [ecx + 0xc] */ 8358 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFFCu); 8359 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8360 eax = eax + 0xFFFFFFFCu; /* 0x42006F5C: add eax, -4 */ 8361 _flag_k = FK_ADD; 8362 MEM32(ebp + 0x8) = eax; /* 0x42006F5F: mov dword ptr [ebp + 8], eax */ 8363 MEM32(ecx + 0xC) = eax; /* 0x42006F62: mov dword ptr [ecx + 0xc], eax */ 8364 L_42006F65: 8365 edi = POP32_VAL(esp); /* 0x42006F65: pop edi */ 8366 esi = POP32_VAL(esp); /* 0x42006F66: pop esi */ 8367 ebp = POP32_VAL(esp); /* 0x42006F67: pop ebp */ 8368 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x42006F68: ret 4 */ 8369 RECOMP_REGS_OUT(); 8370 }