client/game/llr.dll/lifted-0023.c (561373B)
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_3803B1F3(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(0x3803B1F3u); 17 18 goto L_3803B1F3; 19 L_3803B0CD: 20 ecx = MEM32(eax + 0x4); /* 0x3803B0CD: mov ecx, dword ptr [eax + 4] */ 21 SET_LO8(edx, MEM8(ecx + 0x20)); /* 0x3803B0D0: mov dl, byte ptr [ecx + 0x20] */ 22 /* test LO8(edx), LO8(edx) */ /* 0x3803B0D3: test dl, dl */ 23 _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24; 24 _cf = 0; 25 _flag_k = FK_NARROW(FK_TEST, 24); 26 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803B24D; /* 0x3803B0D5: jne 0x3803b24d */ 27 L_3803B0DB: 28 edi = MEM32(ecx + 0x4); /* 0x3803B0DB: mov edi, dword ptr [ecx + 4] */ 29 edx = MEM32(edi); /* 0x3803B0DE: mov edx, dword ptr [edi] */ 30 /* cmp ecx, edx */ /* 0x3803B0E0: cmp ecx, edx */ 31 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 32 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 33 _flag_k = FK_CMP; 34 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1A9; /* 0x3803B0E2: jne 0x3803b1a9 */ 35 L_3803B0E8: 36 edx = MEM32(edi + 0x8); /* 0x3803B0E8: mov edx, dword ptr [edi + 8] */ 37 /* cmp MEM8(edx + 0x20), 0 */ /* 0x3803B0EB: cmp byte ptr [edx + 0x20], 0 */ 38 _flag_a = (uint32_t)(MEM8(edx + 0x20)) << 24; _flag_b = (uint32_t)(0) << 24; 39 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 40 _flag_k = FK_NARROW(FK_CMP, 24); 41 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B10C; /* 0x3803B0EF: jne 0x3803b10c */ 42 L_3803B0F1: 43 MEM8(ecx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B0F1: mov byte ptr [ecx + 0x20], bl */ 44 MEM8(edx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B0F4: mov byte ptr [edx + 0x20], bl */ 45 ecx = MEM32(eax + 0x4); /* 0x3803B0F7: mov ecx, dword ptr [eax + 4] */ 46 edx = MEM32(ecx + 0x4); /* 0x3803B0FA: mov edx, dword ptr [ecx + 4] */ 47 MEM8(edx + 0x20) = (uint8_t)(0); /* 0x3803B0FD: mov byte ptr [edx + 0x20], 0 */ 48 eax = MEM32(eax + 0x4); /* 0x3803B101: mov eax, dword ptr [eax + 4] */ 49 eax = MEM32(eax + 0x4); /* 0x3803B104: mov eax, dword ptr [eax + 4] */ 50 goto L_3803B241; /* 0x3803B107: jmp 0x3803b241 */ 51 L_3803B10C: 52 /* cmp eax, MEM32(ecx + 0x8) */ /* 0x3803B10C: cmp eax, dword ptr [ecx + 8] */ 53 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8)); 54 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 55 _flag_k = FK_CMP; 56 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B14B; /* 0x3803B10F: jne 0x3803b14b */ 57 L_3803B111: 58 eax = ecx; /* 0x3803B111: mov eax, ecx */ 59 ecx = MEM32(eax + 0x8); /* 0x3803B113: mov ecx, dword ptr [eax + 8] */ 60 edx = MEM32(ecx); /* 0x3803B116: mov edx, dword ptr [ecx] */ 61 MEM32(eax + 0x8) = edx; /* 0x3803B118: mov dword ptr [eax + 8], edx */ 62 edx = MEM32(ecx); /* 0x3803B11B: mov edx, dword ptr [ecx] */ 63 /* cmp edx, MEM32(esi + 0x8) */ /* 0x3803B11D: cmp edx, dword ptr [esi + 8] */ 64 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 65 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 66 _flag_k = FK_CMP; 67 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B125; /* 0x3803B120: je 0x3803b125 */ 68 L_3803B122: 69 MEM32(edx + 0x4) = eax; /* 0x3803B122: mov dword ptr [edx + 4], eax */ 70 L_3803B125: 71 edx = MEM32(eax + 0x4); /* 0x3803B125: mov edx, dword ptr [eax + 4] */ 72 MEM32(ecx + 0x4) = edx; /* 0x3803B128: mov dword ptr [ecx + 4], edx */ 73 edx = MEM32(esi + 0x4); /* 0x3803B12B: mov edx, dword ptr [esi + 4] */ 74 /* cmp eax, MEM32(edx + 0x4) */ /* 0x3803B12E: cmp eax, dword ptr [edx + 4] */ 75 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4)); 76 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 77 _flag_k = FK_CMP; 78 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B138; /* 0x3803B131: jne 0x3803b138 */ 79 L_3803B133: 80 MEM32(edx + 0x4) = ecx; /* 0x3803B133: mov dword ptr [edx + 4], ecx */ 81 goto L_3803B146; /* 0x3803B136: jmp 0x3803b146 */ 82 L_3803B138: 83 edx = MEM32(eax + 0x4); /* 0x3803B138: mov edx, dword ptr [eax + 4] */ 84 /* cmp eax, MEM32(edx) */ /* 0x3803B13B: cmp eax, dword ptr [edx] */ 85 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx)); 86 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 87 _flag_k = FK_CMP; 88 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B143; /* 0x3803B13D: jne 0x3803b143 */ 89 L_3803B13F: 90 MEM32(edx) = ecx; /* 0x3803B13F: mov dword ptr [edx], ecx */ 91 goto L_3803B146; /* 0x3803B141: jmp 0x3803b146 */ 92 L_3803B143: 93 MEM32(edx + 0x8) = ecx; /* 0x3803B143: mov dword ptr [edx + 8], ecx */ 94 L_3803B146: 95 MEM32(ecx) = eax; /* 0x3803B146: mov dword ptr [ecx], eax */ 96 MEM32(eax + 0x4) = ecx; /* 0x3803B148: mov dword ptr [eax + 4], ecx */ 97 L_3803B14B: 98 ecx = MEM32(eax + 0x4); /* 0x3803B14B: mov ecx, dword ptr [eax + 4] */ 99 MEM8(ecx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B14E: mov byte ptr [ecx + 0x20], bl */ 100 edx = MEM32(eax + 0x4); /* 0x3803B151: mov edx, dword ptr [eax + 4] */ 101 ecx = MEM32(edx + 0x4); /* 0x3803B154: mov ecx, dword ptr [edx + 4] */ 102 MEM8(ecx + 0x20) = (uint8_t)(0); /* 0x3803B157: mov byte ptr [ecx + 0x20], 0 */ 103 edx = MEM32(eax + 0x4); /* 0x3803B15B: mov edx, dword ptr [eax + 4] */ 104 ecx = MEM32(edx + 0x4); /* 0x3803B15E: mov ecx, dword ptr [edx + 4] */ 105 edx = MEM32(ecx); /* 0x3803B161: mov edx, dword ptr [ecx] */ 106 edi = MEM32(edx + 0x8); /* 0x3803B163: mov edi, dword ptr [edx + 8] */ 107 MEM32(ecx) = edi; /* 0x3803B166: mov dword ptr [ecx], edi */ 108 edi = MEM32(edx + 0x8); /* 0x3803B168: mov edi, dword ptr [edx + 8] */ 109 /* cmp edi, MEM32(esi + 0x8) */ /* 0x3803B16B: cmp edi, dword ptr [esi + 8] */ 110 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 111 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 112 _flag_k = FK_CMP; 113 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B173; /* 0x3803B16E: je 0x3803b173 */ 114 L_3803B170: 115 MEM32(edi + 0x4) = ecx; /* 0x3803B170: mov dword ptr [edi + 4], ecx */ 116 L_3803B173: 117 edi = MEM32(ecx + 0x4); /* 0x3803B173: mov edi, dword ptr [ecx + 4] */ 118 MEM32(edx + 0x4) = edi; /* 0x3803B176: mov dword ptr [edx + 4], edi */ 119 edi = MEM32(esi + 0x4); /* 0x3803B179: mov edi, dword ptr [esi + 4] */ 120 /* cmp ecx, MEM32(edi + 0x4) */ /* 0x3803B17C: cmp ecx, dword ptr [edi + 4] */ 121 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x4)); 122 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 123 _flag_k = FK_CMP; 124 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B18C; /* 0x3803B17F: jne 0x3803b18c */ 125 L_3803B181: 126 MEM32(edi + 0x4) = edx; /* 0x3803B181: mov dword ptr [edi + 4], edx */ 127 MEM32(edx + 0x8) = ecx; /* 0x3803B184: mov dword ptr [edx + 8], ecx */ 128 goto L_3803B23E; /* 0x3803B187: jmp 0x3803b23e */ 129 L_3803B18C: 130 edi = MEM32(ecx + 0x4); /* 0x3803B18C: mov edi, dword ptr [ecx + 4] */ 131 /* cmp ecx, MEM32(edi + 0x8) */ /* 0x3803B18F: cmp ecx, dword ptr [edi + 8] */ 132 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x8)); 133 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 134 _flag_k = FK_CMP; 135 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B19F; /* 0x3803B192: jne 0x3803b19f */ 136 L_3803B194: 137 MEM32(edi + 0x8) = edx; /* 0x3803B194: mov dword ptr [edi + 8], edx */ 138 MEM32(edx + 0x8) = ecx; /* 0x3803B197: mov dword ptr [edx + 8], ecx */ 139 goto L_3803B23E; /* 0x3803B19A: jmp 0x3803b23e */ 140 L_3803B19F: 141 MEM32(edi) = edx; /* 0x3803B19F: mov dword ptr [edi], edx */ 142 MEM32(edx + 0x8) = ecx; /* 0x3803B1A1: mov dword ptr [edx + 8], ecx */ 143 goto L_3803B23E; /* 0x3803B1A4: jmp 0x3803b23e */ 144 L_3803B1A9: 145 /* cmp MEM8(edx + 0x20), 0 */ /* 0x3803B1A9: cmp byte ptr [edx + 0x20], 0 */ 146 _flag_a = (uint32_t)(MEM8(edx + 0x20)) << 24; _flag_b = (uint32_t)(0) << 24; 147 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 148 _flag_k = FK_NARROW(FK_CMP, 24); 149 RECOMP_BACKEDGE(); 150 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B0F1; /* 0x3803B1AD: je 0x3803b0f1 */ 151 L_3803B1B3: 152 /* cmp eax, MEM32(ecx) */ /* 0x3803B1B3: cmp eax, dword ptr [ecx] */ 153 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx)); 154 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 155 _flag_k = FK_CMP; 156 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1F3; /* 0x3803B1B5: jne 0x3803b1f3 */ 157 L_3803B1B7: 158 eax = ecx; /* 0x3803B1B7: mov eax, ecx */ 159 ecx = MEM32(eax); /* 0x3803B1B9: mov ecx, dword ptr [eax] */ 160 edx = MEM32(ecx + 0x8); /* 0x3803B1BB: mov edx, dword ptr [ecx + 8] */ 161 MEM32(eax) = edx; /* 0x3803B1BE: mov dword ptr [eax], edx */ 162 edx = MEM32(ecx + 0x8); /* 0x3803B1C0: mov edx, dword ptr [ecx + 8] */ 163 /* cmp edx, MEM32(esi + 0x8) */ /* 0x3803B1C3: cmp edx, dword ptr [esi + 8] */ 164 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 165 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 166 _flag_k = FK_CMP; 167 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B1CB; /* 0x3803B1C6: je 0x3803b1cb */ 168 L_3803B1C8: 169 MEM32(edx + 0x4) = eax; /* 0x3803B1C8: mov dword ptr [edx + 4], eax */ 170 L_3803B1CB: 171 edx = MEM32(eax + 0x4); /* 0x3803B1CB: mov edx, dword ptr [eax + 4] */ 172 MEM32(ecx + 0x4) = edx; /* 0x3803B1CE: mov dword ptr [ecx + 4], edx */ 173 edx = MEM32(esi + 0x4); /* 0x3803B1D1: mov edx, dword ptr [esi + 4] */ 174 /* cmp eax, MEM32(edx + 0x4) */ /* 0x3803B1D4: cmp eax, dword ptr [edx + 4] */ 175 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4)); 176 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 177 _flag_k = FK_CMP; 178 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1DE; /* 0x3803B1D7: jne 0x3803b1de */ 179 L_3803B1D9: 180 MEM32(edx + 0x4) = ecx; /* 0x3803B1D9: mov dword ptr [edx + 4], ecx */ 181 goto L_3803B1ED; /* 0x3803B1DC: jmp 0x3803b1ed */ 182 L_3803B1DE: 183 edx = MEM32(eax + 0x4); /* 0x3803B1DE: mov edx, dword ptr [eax + 4] */ 184 /* cmp eax, MEM32(edx + 0x8) */ /* 0x3803B1E1: cmp eax, dword ptr [edx + 8] */ 185 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x8)); 186 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 187 _flag_k = FK_CMP; 188 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1EB; /* 0x3803B1E4: jne 0x3803b1eb */ 189 L_3803B1E6: 190 MEM32(edx + 0x8) = ecx; /* 0x3803B1E6: mov dword ptr [edx + 8], ecx */ 191 goto L_3803B1ED; /* 0x3803B1E9: jmp 0x3803b1ed */ 192 L_3803B1EB: 193 MEM32(edx) = ecx; /* 0x3803B1EB: mov dword ptr [edx], ecx */ 194 L_3803B1ED: 195 MEM32(ecx + 0x8) = eax; /* 0x3803B1ED: mov dword ptr [ecx + 8], eax */ 196 MEM32(eax + 0x4) = ecx; /* 0x3803B1F0: mov dword ptr [eax + 4], ecx */ 197 L_3803B1F3: 198 ecx = MEM32(eax + 0x4); /* 0x3803B1F3: mov ecx, dword ptr [eax + 4] */ 199 MEM8(ecx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B1F6: mov byte ptr [ecx + 0x20], bl */ 200 edx = MEM32(eax + 0x4); /* 0x3803B1F9: mov edx, dword ptr [eax + 4] */ 201 ecx = MEM32(edx + 0x4); /* 0x3803B1FC: mov ecx, dword ptr [edx + 4] */ 202 MEM8(ecx + 0x20) = (uint8_t)(0); /* 0x3803B1FF: mov byte ptr [ecx + 0x20], 0 */ 203 edx = MEM32(eax + 0x4); /* 0x3803B203: mov edx, dword ptr [eax + 4] */ 204 ecx = MEM32(edx + 0x4); /* 0x3803B206: mov ecx, dword ptr [edx + 4] */ 205 edx = MEM32(ecx + 0x8); /* 0x3803B209: mov edx, dword ptr [ecx + 8] */ 206 edi = MEM32(edx); /* 0x3803B20C: mov edi, dword ptr [edx] */ 207 MEM32(ecx + 0x8) = edi; /* 0x3803B20E: mov dword ptr [ecx + 8], edi */ 208 edi = MEM32(edx); /* 0x3803B211: mov edi, dword ptr [edx] */ 209 /* cmp edi, MEM32(esi + 0x8) */ /* 0x3803B213: cmp edi, dword ptr [esi + 8] */ 210 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 211 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 212 _flag_k = FK_CMP; 213 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B21B; /* 0x3803B216: je 0x3803b21b */ 214 L_3803B218: 215 MEM32(edi + 0x4) = ecx; /* 0x3803B218: mov dword ptr [edi + 4], ecx */ 216 L_3803B21B: 217 edi = MEM32(ecx + 0x4); /* 0x3803B21B: mov edi, dword ptr [ecx + 4] */ 218 MEM32(edx + 0x4) = edi; /* 0x3803B21E: mov dword ptr [edx + 4], edi */ 219 edi = MEM32(esi + 0x4); /* 0x3803B221: mov edi, dword ptr [esi + 4] */ 220 /* cmp ecx, MEM32(edi + 0x4) */ /* 0x3803B224: cmp ecx, dword ptr [edi + 4] */ 221 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x4)); 222 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 223 _flag_k = FK_CMP; 224 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B22E; /* 0x3803B227: jne 0x3803b22e */ 225 L_3803B229: 226 MEM32(edi + 0x4) = edx; /* 0x3803B229: mov dword ptr [edi + 4], edx */ 227 goto L_3803B23C; /* 0x3803B22C: jmp 0x3803b23c */ 228 L_3803B22E: 229 edi = MEM32(ecx + 0x4); /* 0x3803B22E: mov edi, dword ptr [ecx + 4] */ 230 /* cmp ecx, MEM32(edi) */ /* 0x3803B231: cmp ecx, dword ptr [edi] */ 231 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi)); 232 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 233 _flag_k = FK_CMP; 234 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B239; /* 0x3803B233: jne 0x3803b239 */ 235 L_3803B235: 236 MEM32(edi) = edx; /* 0x3803B235: mov dword ptr [edi], edx */ 237 goto L_3803B23C; /* 0x3803B237: jmp 0x3803b23c */ 238 L_3803B239: 239 MEM32(edi + 0x8) = edx; /* 0x3803B239: mov dword ptr [edi + 8], edx */ 240 L_3803B23C: 241 MEM32(edx) = ecx; /* 0x3803B23C: mov dword ptr [edx], ecx */ 242 L_3803B23E: 243 MEM32(ecx + 0x4) = edx; /* 0x3803B23E: mov dword ptr [ecx + 4], edx */ 244 L_3803B241: 245 ecx = MEM32(esi + 0x4); /* 0x3803B241: mov ecx, dword ptr [esi + 4] */ 246 /* cmp eax, MEM32(ecx + 0x4) */ /* 0x3803B244: cmp eax, dword ptr [ecx + 4] */ 247 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4)); 248 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 249 _flag_k = FK_CMP; 250 RECOMP_BACKEDGE(); 251 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B0CD; /* 0x3803B247: jne 0x3803b0cd */ 252 L_3803B24D: 253 edx = MEM32(esi + 0x4); /* 0x3803B24D: mov edx, dword ptr [esi + 4] */ 254 eax = MEM32(edx + 0x4); /* 0x3803B250: mov eax, dword ptr [edx + 4] */ 255 ecx = MEM32(ebp + (-0x4)); /* 0x3803B253: mov ecx, dword ptr [ebp - 4] */ 256 MEM8(eax + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B256: mov byte ptr [eax + 0x20], bl */ 257 eax = MEM32(ebp + 0x8); /* 0x3803B259: mov eax, dword ptr [ebp + 8] */ 258 edi = POP32_VAL(esp); /* 0x3803B25C: pop edi */ 259 esi = POP32_VAL(esp); /* 0x3803B25D: pop esi */ 260 MEM32(eax) = ecx; /* 0x3803B25E: mov dword ptr [eax], ecx */ 261 ebx = POP32_VAL(esp); /* 0x3803B260: pop ebx */ 262 esp = ebp; /* 0x3803B261: mov esp, ebp */ 263 ebp = POP32_VAL(esp); /* 0x3803B263: pop ebp */ 264 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3803B264: ret 0x10 */ 265 RECOMP_REGS_OUT(); 266 } 267 268 void sub_3803B23C(void) { 269 int _fpu_cmp = 0; 270 uint32_t _cf = 0; 271 int _df = 1; 272 uint32_t _flag_k = FK_NONE; 273 uint32_t _flag_a = 0, _flag_b = 0; 274 uint32_t _itail_tgt = 0; 275 RECOMP_REGS_LOCALS 276 RECOMP_ENTER(0x3803B23Cu); 277 278 goto L_3803B23C; 279 L_3803B0CD: 280 ecx = MEM32(eax + 0x4); /* 0x3803B0CD: mov ecx, dword ptr [eax + 4] */ 281 SET_LO8(edx, MEM8(ecx + 0x20)); /* 0x3803B0D0: mov dl, byte ptr [ecx + 0x20] */ 282 /* test LO8(edx), LO8(edx) */ /* 0x3803B0D3: test dl, dl */ 283 _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24; 284 _cf = 0; 285 _flag_k = FK_NARROW(FK_TEST, 24); 286 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803B24D; /* 0x3803B0D5: jne 0x3803b24d */ 287 L_3803B0DB: 288 edi = MEM32(ecx + 0x4); /* 0x3803B0DB: mov edi, dword ptr [ecx + 4] */ 289 edx = MEM32(edi); /* 0x3803B0DE: mov edx, dword ptr [edi] */ 290 /* cmp ecx, edx */ /* 0x3803B0E0: cmp ecx, edx */ 291 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 292 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 293 _flag_k = FK_CMP; 294 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1A9; /* 0x3803B0E2: jne 0x3803b1a9 */ 295 L_3803B0E8: 296 edx = MEM32(edi + 0x8); /* 0x3803B0E8: mov edx, dword ptr [edi + 8] */ 297 /* cmp MEM8(edx + 0x20), 0 */ /* 0x3803B0EB: cmp byte ptr [edx + 0x20], 0 */ 298 _flag_a = (uint32_t)(MEM8(edx + 0x20)) << 24; _flag_b = (uint32_t)(0) << 24; 299 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 300 _flag_k = FK_NARROW(FK_CMP, 24); 301 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B10C; /* 0x3803B0EF: jne 0x3803b10c */ 302 L_3803B0F1: 303 MEM8(ecx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B0F1: mov byte ptr [ecx + 0x20], bl */ 304 MEM8(edx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B0F4: mov byte ptr [edx + 0x20], bl */ 305 ecx = MEM32(eax + 0x4); /* 0x3803B0F7: mov ecx, dword ptr [eax + 4] */ 306 edx = MEM32(ecx + 0x4); /* 0x3803B0FA: mov edx, dword ptr [ecx + 4] */ 307 MEM8(edx + 0x20) = (uint8_t)(0); /* 0x3803B0FD: mov byte ptr [edx + 0x20], 0 */ 308 eax = MEM32(eax + 0x4); /* 0x3803B101: mov eax, dword ptr [eax + 4] */ 309 eax = MEM32(eax + 0x4); /* 0x3803B104: mov eax, dword ptr [eax + 4] */ 310 goto L_3803B241; /* 0x3803B107: jmp 0x3803b241 */ 311 L_3803B10C: 312 /* cmp eax, MEM32(ecx + 0x8) */ /* 0x3803B10C: cmp eax, dword ptr [ecx + 8] */ 313 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8)); 314 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 315 _flag_k = FK_CMP; 316 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B14B; /* 0x3803B10F: jne 0x3803b14b */ 317 L_3803B111: 318 eax = ecx; /* 0x3803B111: mov eax, ecx */ 319 ecx = MEM32(eax + 0x8); /* 0x3803B113: mov ecx, dword ptr [eax + 8] */ 320 edx = MEM32(ecx); /* 0x3803B116: mov edx, dword ptr [ecx] */ 321 MEM32(eax + 0x8) = edx; /* 0x3803B118: mov dword ptr [eax + 8], edx */ 322 edx = MEM32(ecx); /* 0x3803B11B: mov edx, dword ptr [ecx] */ 323 /* cmp edx, MEM32(esi + 0x8) */ /* 0x3803B11D: cmp edx, dword ptr [esi + 8] */ 324 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 325 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 326 _flag_k = FK_CMP; 327 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B125; /* 0x3803B120: je 0x3803b125 */ 328 L_3803B122: 329 MEM32(edx + 0x4) = eax; /* 0x3803B122: mov dword ptr [edx + 4], eax */ 330 L_3803B125: 331 edx = MEM32(eax + 0x4); /* 0x3803B125: mov edx, dword ptr [eax + 4] */ 332 MEM32(ecx + 0x4) = edx; /* 0x3803B128: mov dword ptr [ecx + 4], edx */ 333 edx = MEM32(esi + 0x4); /* 0x3803B12B: mov edx, dword ptr [esi + 4] */ 334 /* cmp eax, MEM32(edx + 0x4) */ /* 0x3803B12E: cmp eax, dword ptr [edx + 4] */ 335 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4)); 336 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 337 _flag_k = FK_CMP; 338 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B138; /* 0x3803B131: jne 0x3803b138 */ 339 L_3803B133: 340 MEM32(edx + 0x4) = ecx; /* 0x3803B133: mov dword ptr [edx + 4], ecx */ 341 goto L_3803B146; /* 0x3803B136: jmp 0x3803b146 */ 342 L_3803B138: 343 edx = MEM32(eax + 0x4); /* 0x3803B138: mov edx, dword ptr [eax + 4] */ 344 /* cmp eax, MEM32(edx) */ /* 0x3803B13B: cmp eax, dword ptr [edx] */ 345 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx)); 346 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 347 _flag_k = FK_CMP; 348 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B143; /* 0x3803B13D: jne 0x3803b143 */ 349 L_3803B13F: 350 MEM32(edx) = ecx; /* 0x3803B13F: mov dword ptr [edx], ecx */ 351 goto L_3803B146; /* 0x3803B141: jmp 0x3803b146 */ 352 L_3803B143: 353 MEM32(edx + 0x8) = ecx; /* 0x3803B143: mov dword ptr [edx + 8], ecx */ 354 L_3803B146: 355 MEM32(ecx) = eax; /* 0x3803B146: mov dword ptr [ecx], eax */ 356 MEM32(eax + 0x4) = ecx; /* 0x3803B148: mov dword ptr [eax + 4], ecx */ 357 L_3803B14B: 358 ecx = MEM32(eax + 0x4); /* 0x3803B14B: mov ecx, dword ptr [eax + 4] */ 359 MEM8(ecx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B14E: mov byte ptr [ecx + 0x20], bl */ 360 edx = MEM32(eax + 0x4); /* 0x3803B151: mov edx, dword ptr [eax + 4] */ 361 ecx = MEM32(edx + 0x4); /* 0x3803B154: mov ecx, dword ptr [edx + 4] */ 362 MEM8(ecx + 0x20) = (uint8_t)(0); /* 0x3803B157: mov byte ptr [ecx + 0x20], 0 */ 363 edx = MEM32(eax + 0x4); /* 0x3803B15B: mov edx, dword ptr [eax + 4] */ 364 ecx = MEM32(edx + 0x4); /* 0x3803B15E: mov ecx, dword ptr [edx + 4] */ 365 edx = MEM32(ecx); /* 0x3803B161: mov edx, dword ptr [ecx] */ 366 edi = MEM32(edx + 0x8); /* 0x3803B163: mov edi, dword ptr [edx + 8] */ 367 MEM32(ecx) = edi; /* 0x3803B166: mov dword ptr [ecx], edi */ 368 edi = MEM32(edx + 0x8); /* 0x3803B168: mov edi, dword ptr [edx + 8] */ 369 /* cmp edi, MEM32(esi + 0x8) */ /* 0x3803B16B: cmp edi, dword ptr [esi + 8] */ 370 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 371 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 372 _flag_k = FK_CMP; 373 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B173; /* 0x3803B16E: je 0x3803b173 */ 374 L_3803B170: 375 MEM32(edi + 0x4) = ecx; /* 0x3803B170: mov dword ptr [edi + 4], ecx */ 376 L_3803B173: 377 edi = MEM32(ecx + 0x4); /* 0x3803B173: mov edi, dword ptr [ecx + 4] */ 378 MEM32(edx + 0x4) = edi; /* 0x3803B176: mov dword ptr [edx + 4], edi */ 379 edi = MEM32(esi + 0x4); /* 0x3803B179: mov edi, dword ptr [esi + 4] */ 380 /* cmp ecx, MEM32(edi + 0x4) */ /* 0x3803B17C: cmp ecx, dword ptr [edi + 4] */ 381 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x4)); 382 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 383 _flag_k = FK_CMP; 384 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B18C; /* 0x3803B17F: jne 0x3803b18c */ 385 L_3803B181: 386 MEM32(edi + 0x4) = edx; /* 0x3803B181: mov dword ptr [edi + 4], edx */ 387 MEM32(edx + 0x8) = ecx; /* 0x3803B184: mov dword ptr [edx + 8], ecx */ 388 goto L_3803B23E; /* 0x3803B187: jmp 0x3803b23e */ 389 L_3803B18C: 390 edi = MEM32(ecx + 0x4); /* 0x3803B18C: mov edi, dword ptr [ecx + 4] */ 391 /* cmp ecx, MEM32(edi + 0x8) */ /* 0x3803B18F: cmp ecx, dword ptr [edi + 8] */ 392 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x8)); 393 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 394 _flag_k = FK_CMP; 395 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B19F; /* 0x3803B192: jne 0x3803b19f */ 396 L_3803B194: 397 MEM32(edi + 0x8) = edx; /* 0x3803B194: mov dword ptr [edi + 8], edx */ 398 MEM32(edx + 0x8) = ecx; /* 0x3803B197: mov dword ptr [edx + 8], ecx */ 399 goto L_3803B23E; /* 0x3803B19A: jmp 0x3803b23e */ 400 L_3803B19F: 401 MEM32(edi) = edx; /* 0x3803B19F: mov dword ptr [edi], edx */ 402 MEM32(edx + 0x8) = ecx; /* 0x3803B1A1: mov dword ptr [edx + 8], ecx */ 403 goto L_3803B23E; /* 0x3803B1A4: jmp 0x3803b23e */ 404 L_3803B1A9: 405 /* cmp MEM8(edx + 0x20), 0 */ /* 0x3803B1A9: cmp byte ptr [edx + 0x20], 0 */ 406 _flag_a = (uint32_t)(MEM8(edx + 0x20)) << 24; _flag_b = (uint32_t)(0) << 24; 407 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 408 _flag_k = FK_NARROW(FK_CMP, 24); 409 RECOMP_BACKEDGE(); 410 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B0F1; /* 0x3803B1AD: je 0x3803b0f1 */ 411 L_3803B1B3: 412 /* cmp eax, MEM32(ecx) */ /* 0x3803B1B3: cmp eax, dword ptr [ecx] */ 413 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx)); 414 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 415 _flag_k = FK_CMP; 416 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1F3; /* 0x3803B1B5: jne 0x3803b1f3 */ 417 L_3803B1B7: 418 eax = ecx; /* 0x3803B1B7: mov eax, ecx */ 419 ecx = MEM32(eax); /* 0x3803B1B9: mov ecx, dword ptr [eax] */ 420 edx = MEM32(ecx + 0x8); /* 0x3803B1BB: mov edx, dword ptr [ecx + 8] */ 421 MEM32(eax) = edx; /* 0x3803B1BE: mov dword ptr [eax], edx */ 422 edx = MEM32(ecx + 0x8); /* 0x3803B1C0: mov edx, dword ptr [ecx + 8] */ 423 /* cmp edx, MEM32(esi + 0x8) */ /* 0x3803B1C3: cmp edx, dword ptr [esi + 8] */ 424 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 425 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 426 _flag_k = FK_CMP; 427 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B1CB; /* 0x3803B1C6: je 0x3803b1cb */ 428 L_3803B1C8: 429 MEM32(edx + 0x4) = eax; /* 0x3803B1C8: mov dword ptr [edx + 4], eax */ 430 L_3803B1CB: 431 edx = MEM32(eax + 0x4); /* 0x3803B1CB: mov edx, dword ptr [eax + 4] */ 432 MEM32(ecx + 0x4) = edx; /* 0x3803B1CE: mov dword ptr [ecx + 4], edx */ 433 edx = MEM32(esi + 0x4); /* 0x3803B1D1: mov edx, dword ptr [esi + 4] */ 434 /* cmp eax, MEM32(edx + 0x4) */ /* 0x3803B1D4: cmp eax, dword ptr [edx + 4] */ 435 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4)); 436 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 437 _flag_k = FK_CMP; 438 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1DE; /* 0x3803B1D7: jne 0x3803b1de */ 439 L_3803B1D9: 440 MEM32(edx + 0x4) = ecx; /* 0x3803B1D9: mov dword ptr [edx + 4], ecx */ 441 goto L_3803B1ED; /* 0x3803B1DC: jmp 0x3803b1ed */ 442 L_3803B1DE: 443 edx = MEM32(eax + 0x4); /* 0x3803B1DE: mov edx, dword ptr [eax + 4] */ 444 /* cmp eax, MEM32(edx + 0x8) */ /* 0x3803B1E1: cmp eax, dword ptr [edx + 8] */ 445 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x8)); 446 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 447 _flag_k = FK_CMP; 448 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1EB; /* 0x3803B1E4: jne 0x3803b1eb */ 449 L_3803B1E6: 450 MEM32(edx + 0x8) = ecx; /* 0x3803B1E6: mov dword ptr [edx + 8], ecx */ 451 goto L_3803B1ED; /* 0x3803B1E9: jmp 0x3803b1ed */ 452 L_3803B1EB: 453 MEM32(edx) = ecx; /* 0x3803B1EB: mov dword ptr [edx], ecx */ 454 L_3803B1ED: 455 MEM32(ecx + 0x8) = eax; /* 0x3803B1ED: mov dword ptr [ecx + 8], eax */ 456 MEM32(eax + 0x4) = ecx; /* 0x3803B1F0: mov dword ptr [eax + 4], ecx */ 457 L_3803B1F3: 458 ecx = MEM32(eax + 0x4); /* 0x3803B1F3: mov ecx, dword ptr [eax + 4] */ 459 MEM8(ecx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B1F6: mov byte ptr [ecx + 0x20], bl */ 460 edx = MEM32(eax + 0x4); /* 0x3803B1F9: mov edx, dword ptr [eax + 4] */ 461 ecx = MEM32(edx + 0x4); /* 0x3803B1FC: mov ecx, dword ptr [edx + 4] */ 462 MEM8(ecx + 0x20) = (uint8_t)(0); /* 0x3803B1FF: mov byte ptr [ecx + 0x20], 0 */ 463 edx = MEM32(eax + 0x4); /* 0x3803B203: mov edx, dword ptr [eax + 4] */ 464 ecx = MEM32(edx + 0x4); /* 0x3803B206: mov ecx, dword ptr [edx + 4] */ 465 edx = MEM32(ecx + 0x8); /* 0x3803B209: mov edx, dword ptr [ecx + 8] */ 466 edi = MEM32(edx); /* 0x3803B20C: mov edi, dword ptr [edx] */ 467 MEM32(ecx + 0x8) = edi; /* 0x3803B20E: mov dword ptr [ecx + 8], edi */ 468 edi = MEM32(edx); /* 0x3803B211: mov edi, dword ptr [edx] */ 469 /* cmp edi, MEM32(esi + 0x8) */ /* 0x3803B213: cmp edi, dword ptr [esi + 8] */ 470 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 471 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 472 _flag_k = FK_CMP; 473 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B21B; /* 0x3803B216: je 0x3803b21b */ 474 L_3803B218: 475 MEM32(edi + 0x4) = ecx; /* 0x3803B218: mov dword ptr [edi + 4], ecx */ 476 L_3803B21B: 477 edi = MEM32(ecx + 0x4); /* 0x3803B21B: mov edi, dword ptr [ecx + 4] */ 478 MEM32(edx + 0x4) = edi; /* 0x3803B21E: mov dword ptr [edx + 4], edi */ 479 edi = MEM32(esi + 0x4); /* 0x3803B221: mov edi, dword ptr [esi + 4] */ 480 /* cmp ecx, MEM32(edi + 0x4) */ /* 0x3803B224: cmp ecx, dword ptr [edi + 4] */ 481 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x4)); 482 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 483 _flag_k = FK_CMP; 484 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B22E; /* 0x3803B227: jne 0x3803b22e */ 485 L_3803B229: 486 MEM32(edi + 0x4) = edx; /* 0x3803B229: mov dword ptr [edi + 4], edx */ 487 goto L_3803B23C; /* 0x3803B22C: jmp 0x3803b23c */ 488 L_3803B22E: 489 edi = MEM32(ecx + 0x4); /* 0x3803B22E: mov edi, dword ptr [ecx + 4] */ 490 /* cmp ecx, MEM32(edi) */ /* 0x3803B231: cmp ecx, dword ptr [edi] */ 491 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi)); 492 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 493 _flag_k = FK_CMP; 494 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B239; /* 0x3803B233: jne 0x3803b239 */ 495 L_3803B235: 496 MEM32(edi) = edx; /* 0x3803B235: mov dword ptr [edi], edx */ 497 goto L_3803B23C; /* 0x3803B237: jmp 0x3803b23c */ 498 L_3803B239: 499 MEM32(edi + 0x8) = edx; /* 0x3803B239: mov dword ptr [edi + 8], edx */ 500 L_3803B23C: 501 MEM32(edx) = ecx; /* 0x3803B23C: mov dword ptr [edx], ecx */ 502 L_3803B23E: 503 MEM32(ecx + 0x4) = edx; /* 0x3803B23E: mov dword ptr [ecx + 4], edx */ 504 L_3803B241: 505 ecx = MEM32(esi + 0x4); /* 0x3803B241: mov ecx, dword ptr [esi + 4] */ 506 /* cmp eax, MEM32(ecx + 0x4) */ /* 0x3803B244: cmp eax, dword ptr [ecx + 4] */ 507 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4)); 508 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 509 _flag_k = FK_CMP; 510 RECOMP_BACKEDGE(); 511 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B0CD; /* 0x3803B247: jne 0x3803b0cd */ 512 L_3803B24D: 513 edx = MEM32(esi + 0x4); /* 0x3803B24D: mov edx, dword ptr [esi + 4] */ 514 eax = MEM32(edx + 0x4); /* 0x3803B250: mov eax, dword ptr [edx + 4] */ 515 ecx = MEM32(ebp + (-0x4)); /* 0x3803B253: mov ecx, dword ptr [ebp - 4] */ 516 MEM8(eax + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B256: mov byte ptr [eax + 0x20], bl */ 517 eax = MEM32(ebp + 0x8); /* 0x3803B259: mov eax, dword ptr [ebp + 8] */ 518 edi = POP32_VAL(esp); /* 0x3803B25C: pop edi */ 519 esi = POP32_VAL(esp); /* 0x3803B25D: pop esi */ 520 MEM32(eax) = ecx; /* 0x3803B25E: mov dword ptr [eax], ecx */ 521 ebx = POP32_VAL(esp); /* 0x3803B260: pop ebx */ 522 esp = ebp; /* 0x3803B261: mov esp, ebp */ 523 ebp = POP32_VAL(esp); /* 0x3803B263: pop ebp */ 524 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3803B264: ret 0x10 */ 525 RECOMP_REGS_OUT(); 526 } 527 528 void sub_3803B23E(void) { 529 int _fpu_cmp = 0; 530 uint32_t _cf = 0; 531 int _df = 1; 532 uint32_t _flag_k = FK_NONE; 533 uint32_t _flag_a = 0, _flag_b = 0; 534 uint32_t _itail_tgt = 0; 535 RECOMP_REGS_LOCALS 536 RECOMP_ENTER(0x3803B23Eu); 537 538 goto L_3803B23E; 539 L_3803B0CD: 540 ecx = MEM32(eax + 0x4); /* 0x3803B0CD: mov ecx, dword ptr [eax + 4] */ 541 SET_LO8(edx, MEM8(ecx + 0x20)); /* 0x3803B0D0: mov dl, byte ptr [ecx + 0x20] */ 542 /* test LO8(edx), LO8(edx) */ /* 0x3803B0D3: test dl, dl */ 543 _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24; 544 _cf = 0; 545 _flag_k = FK_NARROW(FK_TEST, 24); 546 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803B24D; /* 0x3803B0D5: jne 0x3803b24d */ 547 L_3803B0DB: 548 edi = MEM32(ecx + 0x4); /* 0x3803B0DB: mov edi, dword ptr [ecx + 4] */ 549 edx = MEM32(edi); /* 0x3803B0DE: mov edx, dword ptr [edi] */ 550 /* cmp ecx, edx */ /* 0x3803B0E0: cmp ecx, edx */ 551 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 552 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 553 _flag_k = FK_CMP; 554 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1A9; /* 0x3803B0E2: jne 0x3803b1a9 */ 555 L_3803B0E8: 556 edx = MEM32(edi + 0x8); /* 0x3803B0E8: mov edx, dword ptr [edi + 8] */ 557 /* cmp MEM8(edx + 0x20), 0 */ /* 0x3803B0EB: cmp byte ptr [edx + 0x20], 0 */ 558 _flag_a = (uint32_t)(MEM8(edx + 0x20)) << 24; _flag_b = (uint32_t)(0) << 24; 559 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 560 _flag_k = FK_NARROW(FK_CMP, 24); 561 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B10C; /* 0x3803B0EF: jne 0x3803b10c */ 562 L_3803B0F1: 563 MEM8(ecx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B0F1: mov byte ptr [ecx + 0x20], bl */ 564 MEM8(edx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B0F4: mov byte ptr [edx + 0x20], bl */ 565 ecx = MEM32(eax + 0x4); /* 0x3803B0F7: mov ecx, dword ptr [eax + 4] */ 566 edx = MEM32(ecx + 0x4); /* 0x3803B0FA: mov edx, dword ptr [ecx + 4] */ 567 MEM8(edx + 0x20) = (uint8_t)(0); /* 0x3803B0FD: mov byte ptr [edx + 0x20], 0 */ 568 eax = MEM32(eax + 0x4); /* 0x3803B101: mov eax, dword ptr [eax + 4] */ 569 eax = MEM32(eax + 0x4); /* 0x3803B104: mov eax, dword ptr [eax + 4] */ 570 goto L_3803B241; /* 0x3803B107: jmp 0x3803b241 */ 571 L_3803B10C: 572 /* cmp eax, MEM32(ecx + 0x8) */ /* 0x3803B10C: cmp eax, dword ptr [ecx + 8] */ 573 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8)); 574 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 575 _flag_k = FK_CMP; 576 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B14B; /* 0x3803B10F: jne 0x3803b14b */ 577 L_3803B111: 578 eax = ecx; /* 0x3803B111: mov eax, ecx */ 579 ecx = MEM32(eax + 0x8); /* 0x3803B113: mov ecx, dword ptr [eax + 8] */ 580 edx = MEM32(ecx); /* 0x3803B116: mov edx, dword ptr [ecx] */ 581 MEM32(eax + 0x8) = edx; /* 0x3803B118: mov dword ptr [eax + 8], edx */ 582 edx = MEM32(ecx); /* 0x3803B11B: mov edx, dword ptr [ecx] */ 583 /* cmp edx, MEM32(esi + 0x8) */ /* 0x3803B11D: cmp edx, dword ptr [esi + 8] */ 584 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 585 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 586 _flag_k = FK_CMP; 587 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B125; /* 0x3803B120: je 0x3803b125 */ 588 L_3803B122: 589 MEM32(edx + 0x4) = eax; /* 0x3803B122: mov dword ptr [edx + 4], eax */ 590 L_3803B125: 591 edx = MEM32(eax + 0x4); /* 0x3803B125: mov edx, dword ptr [eax + 4] */ 592 MEM32(ecx + 0x4) = edx; /* 0x3803B128: mov dword ptr [ecx + 4], edx */ 593 edx = MEM32(esi + 0x4); /* 0x3803B12B: mov edx, dword ptr [esi + 4] */ 594 /* cmp eax, MEM32(edx + 0x4) */ /* 0x3803B12E: cmp eax, dword ptr [edx + 4] */ 595 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4)); 596 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 597 _flag_k = FK_CMP; 598 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B138; /* 0x3803B131: jne 0x3803b138 */ 599 L_3803B133: 600 MEM32(edx + 0x4) = ecx; /* 0x3803B133: mov dword ptr [edx + 4], ecx */ 601 goto L_3803B146; /* 0x3803B136: jmp 0x3803b146 */ 602 L_3803B138: 603 edx = MEM32(eax + 0x4); /* 0x3803B138: mov edx, dword ptr [eax + 4] */ 604 /* cmp eax, MEM32(edx) */ /* 0x3803B13B: cmp eax, dword ptr [edx] */ 605 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx)); 606 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 607 _flag_k = FK_CMP; 608 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B143; /* 0x3803B13D: jne 0x3803b143 */ 609 L_3803B13F: 610 MEM32(edx) = ecx; /* 0x3803B13F: mov dword ptr [edx], ecx */ 611 goto L_3803B146; /* 0x3803B141: jmp 0x3803b146 */ 612 L_3803B143: 613 MEM32(edx + 0x8) = ecx; /* 0x3803B143: mov dword ptr [edx + 8], ecx */ 614 L_3803B146: 615 MEM32(ecx) = eax; /* 0x3803B146: mov dword ptr [ecx], eax */ 616 MEM32(eax + 0x4) = ecx; /* 0x3803B148: mov dword ptr [eax + 4], ecx */ 617 L_3803B14B: 618 ecx = MEM32(eax + 0x4); /* 0x3803B14B: mov ecx, dword ptr [eax + 4] */ 619 MEM8(ecx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B14E: mov byte ptr [ecx + 0x20], bl */ 620 edx = MEM32(eax + 0x4); /* 0x3803B151: mov edx, dword ptr [eax + 4] */ 621 ecx = MEM32(edx + 0x4); /* 0x3803B154: mov ecx, dword ptr [edx + 4] */ 622 MEM8(ecx + 0x20) = (uint8_t)(0); /* 0x3803B157: mov byte ptr [ecx + 0x20], 0 */ 623 edx = MEM32(eax + 0x4); /* 0x3803B15B: mov edx, dword ptr [eax + 4] */ 624 ecx = MEM32(edx + 0x4); /* 0x3803B15E: mov ecx, dword ptr [edx + 4] */ 625 edx = MEM32(ecx); /* 0x3803B161: mov edx, dword ptr [ecx] */ 626 edi = MEM32(edx + 0x8); /* 0x3803B163: mov edi, dword ptr [edx + 8] */ 627 MEM32(ecx) = edi; /* 0x3803B166: mov dword ptr [ecx], edi */ 628 edi = MEM32(edx + 0x8); /* 0x3803B168: mov edi, dword ptr [edx + 8] */ 629 /* cmp edi, MEM32(esi + 0x8) */ /* 0x3803B16B: cmp edi, dword ptr [esi + 8] */ 630 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 631 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 632 _flag_k = FK_CMP; 633 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B173; /* 0x3803B16E: je 0x3803b173 */ 634 L_3803B170: 635 MEM32(edi + 0x4) = ecx; /* 0x3803B170: mov dword ptr [edi + 4], ecx */ 636 L_3803B173: 637 edi = MEM32(ecx + 0x4); /* 0x3803B173: mov edi, dword ptr [ecx + 4] */ 638 MEM32(edx + 0x4) = edi; /* 0x3803B176: mov dword ptr [edx + 4], edi */ 639 edi = MEM32(esi + 0x4); /* 0x3803B179: mov edi, dword ptr [esi + 4] */ 640 /* cmp ecx, MEM32(edi + 0x4) */ /* 0x3803B17C: cmp ecx, dword ptr [edi + 4] */ 641 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x4)); 642 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 643 _flag_k = FK_CMP; 644 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B18C; /* 0x3803B17F: jne 0x3803b18c */ 645 L_3803B181: 646 MEM32(edi + 0x4) = edx; /* 0x3803B181: mov dword ptr [edi + 4], edx */ 647 MEM32(edx + 0x8) = ecx; /* 0x3803B184: mov dword ptr [edx + 8], ecx */ 648 goto L_3803B23E; /* 0x3803B187: jmp 0x3803b23e */ 649 L_3803B18C: 650 edi = MEM32(ecx + 0x4); /* 0x3803B18C: mov edi, dword ptr [ecx + 4] */ 651 /* cmp ecx, MEM32(edi + 0x8) */ /* 0x3803B18F: cmp ecx, dword ptr [edi + 8] */ 652 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x8)); 653 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 654 _flag_k = FK_CMP; 655 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B19F; /* 0x3803B192: jne 0x3803b19f */ 656 L_3803B194: 657 MEM32(edi + 0x8) = edx; /* 0x3803B194: mov dword ptr [edi + 8], edx */ 658 MEM32(edx + 0x8) = ecx; /* 0x3803B197: mov dword ptr [edx + 8], ecx */ 659 goto L_3803B23E; /* 0x3803B19A: jmp 0x3803b23e */ 660 L_3803B19F: 661 MEM32(edi) = edx; /* 0x3803B19F: mov dword ptr [edi], edx */ 662 MEM32(edx + 0x8) = ecx; /* 0x3803B1A1: mov dword ptr [edx + 8], ecx */ 663 goto L_3803B23E; /* 0x3803B1A4: jmp 0x3803b23e */ 664 L_3803B1A9: 665 /* cmp MEM8(edx + 0x20), 0 */ /* 0x3803B1A9: cmp byte ptr [edx + 0x20], 0 */ 666 _flag_a = (uint32_t)(MEM8(edx + 0x20)) << 24; _flag_b = (uint32_t)(0) << 24; 667 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 668 _flag_k = FK_NARROW(FK_CMP, 24); 669 RECOMP_BACKEDGE(); 670 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B0F1; /* 0x3803B1AD: je 0x3803b0f1 */ 671 L_3803B1B3: 672 /* cmp eax, MEM32(ecx) */ /* 0x3803B1B3: cmp eax, dword ptr [ecx] */ 673 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx)); 674 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 675 _flag_k = FK_CMP; 676 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1F3; /* 0x3803B1B5: jne 0x3803b1f3 */ 677 L_3803B1B7: 678 eax = ecx; /* 0x3803B1B7: mov eax, ecx */ 679 ecx = MEM32(eax); /* 0x3803B1B9: mov ecx, dword ptr [eax] */ 680 edx = MEM32(ecx + 0x8); /* 0x3803B1BB: mov edx, dword ptr [ecx + 8] */ 681 MEM32(eax) = edx; /* 0x3803B1BE: mov dword ptr [eax], edx */ 682 edx = MEM32(ecx + 0x8); /* 0x3803B1C0: mov edx, dword ptr [ecx + 8] */ 683 /* cmp edx, MEM32(esi + 0x8) */ /* 0x3803B1C3: cmp edx, dword ptr [esi + 8] */ 684 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 685 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 686 _flag_k = FK_CMP; 687 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B1CB; /* 0x3803B1C6: je 0x3803b1cb */ 688 L_3803B1C8: 689 MEM32(edx + 0x4) = eax; /* 0x3803B1C8: mov dword ptr [edx + 4], eax */ 690 L_3803B1CB: 691 edx = MEM32(eax + 0x4); /* 0x3803B1CB: mov edx, dword ptr [eax + 4] */ 692 MEM32(ecx + 0x4) = edx; /* 0x3803B1CE: mov dword ptr [ecx + 4], edx */ 693 edx = MEM32(esi + 0x4); /* 0x3803B1D1: mov edx, dword ptr [esi + 4] */ 694 /* cmp eax, MEM32(edx + 0x4) */ /* 0x3803B1D4: cmp eax, dword ptr [edx + 4] */ 695 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4)); 696 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 697 _flag_k = FK_CMP; 698 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1DE; /* 0x3803B1D7: jne 0x3803b1de */ 699 L_3803B1D9: 700 MEM32(edx + 0x4) = ecx; /* 0x3803B1D9: mov dword ptr [edx + 4], ecx */ 701 goto L_3803B1ED; /* 0x3803B1DC: jmp 0x3803b1ed */ 702 L_3803B1DE: 703 edx = MEM32(eax + 0x4); /* 0x3803B1DE: mov edx, dword ptr [eax + 4] */ 704 /* cmp eax, MEM32(edx + 0x8) */ /* 0x3803B1E1: cmp eax, dword ptr [edx + 8] */ 705 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x8)); 706 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 707 _flag_k = FK_CMP; 708 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1EB; /* 0x3803B1E4: jne 0x3803b1eb */ 709 L_3803B1E6: 710 MEM32(edx + 0x8) = ecx; /* 0x3803B1E6: mov dword ptr [edx + 8], ecx */ 711 goto L_3803B1ED; /* 0x3803B1E9: jmp 0x3803b1ed */ 712 L_3803B1EB: 713 MEM32(edx) = ecx; /* 0x3803B1EB: mov dword ptr [edx], ecx */ 714 L_3803B1ED: 715 MEM32(ecx + 0x8) = eax; /* 0x3803B1ED: mov dword ptr [ecx + 8], eax */ 716 MEM32(eax + 0x4) = ecx; /* 0x3803B1F0: mov dword ptr [eax + 4], ecx */ 717 L_3803B1F3: 718 ecx = MEM32(eax + 0x4); /* 0x3803B1F3: mov ecx, dword ptr [eax + 4] */ 719 MEM8(ecx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B1F6: mov byte ptr [ecx + 0x20], bl */ 720 edx = MEM32(eax + 0x4); /* 0x3803B1F9: mov edx, dword ptr [eax + 4] */ 721 ecx = MEM32(edx + 0x4); /* 0x3803B1FC: mov ecx, dword ptr [edx + 4] */ 722 MEM8(ecx + 0x20) = (uint8_t)(0); /* 0x3803B1FF: mov byte ptr [ecx + 0x20], 0 */ 723 edx = MEM32(eax + 0x4); /* 0x3803B203: mov edx, dword ptr [eax + 4] */ 724 ecx = MEM32(edx + 0x4); /* 0x3803B206: mov ecx, dword ptr [edx + 4] */ 725 edx = MEM32(ecx + 0x8); /* 0x3803B209: mov edx, dword ptr [ecx + 8] */ 726 edi = MEM32(edx); /* 0x3803B20C: mov edi, dword ptr [edx] */ 727 MEM32(ecx + 0x8) = edi; /* 0x3803B20E: mov dword ptr [ecx + 8], edi */ 728 edi = MEM32(edx); /* 0x3803B211: mov edi, dword ptr [edx] */ 729 /* cmp edi, MEM32(esi + 0x8) */ /* 0x3803B213: cmp edi, dword ptr [esi + 8] */ 730 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 731 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 732 _flag_k = FK_CMP; 733 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B21B; /* 0x3803B216: je 0x3803b21b */ 734 L_3803B218: 735 MEM32(edi + 0x4) = ecx; /* 0x3803B218: mov dword ptr [edi + 4], ecx */ 736 L_3803B21B: 737 edi = MEM32(ecx + 0x4); /* 0x3803B21B: mov edi, dword ptr [ecx + 4] */ 738 MEM32(edx + 0x4) = edi; /* 0x3803B21E: mov dword ptr [edx + 4], edi */ 739 edi = MEM32(esi + 0x4); /* 0x3803B221: mov edi, dword ptr [esi + 4] */ 740 /* cmp ecx, MEM32(edi + 0x4) */ /* 0x3803B224: cmp ecx, dword ptr [edi + 4] */ 741 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x4)); 742 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 743 _flag_k = FK_CMP; 744 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B22E; /* 0x3803B227: jne 0x3803b22e */ 745 L_3803B229: 746 MEM32(edi + 0x4) = edx; /* 0x3803B229: mov dword ptr [edi + 4], edx */ 747 goto L_3803B23C; /* 0x3803B22C: jmp 0x3803b23c */ 748 L_3803B22E: 749 edi = MEM32(ecx + 0x4); /* 0x3803B22E: mov edi, dword ptr [ecx + 4] */ 750 /* cmp ecx, MEM32(edi) */ /* 0x3803B231: cmp ecx, dword ptr [edi] */ 751 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi)); 752 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 753 _flag_k = FK_CMP; 754 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B239; /* 0x3803B233: jne 0x3803b239 */ 755 L_3803B235: 756 MEM32(edi) = edx; /* 0x3803B235: mov dword ptr [edi], edx */ 757 goto L_3803B23C; /* 0x3803B237: jmp 0x3803b23c */ 758 L_3803B239: 759 MEM32(edi + 0x8) = edx; /* 0x3803B239: mov dword ptr [edi + 8], edx */ 760 L_3803B23C: 761 MEM32(edx) = ecx; /* 0x3803B23C: mov dword ptr [edx], ecx */ 762 L_3803B23E: 763 MEM32(ecx + 0x4) = edx; /* 0x3803B23E: mov dword ptr [ecx + 4], edx */ 764 L_3803B241: 765 ecx = MEM32(esi + 0x4); /* 0x3803B241: mov ecx, dword ptr [esi + 4] */ 766 /* cmp eax, MEM32(ecx + 0x4) */ /* 0x3803B244: cmp eax, dword ptr [ecx + 4] */ 767 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4)); 768 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 769 _flag_k = FK_CMP; 770 RECOMP_BACKEDGE(); 771 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B0CD; /* 0x3803B247: jne 0x3803b0cd */ 772 L_3803B24D: 773 edx = MEM32(esi + 0x4); /* 0x3803B24D: mov edx, dword ptr [esi + 4] */ 774 eax = MEM32(edx + 0x4); /* 0x3803B250: mov eax, dword ptr [edx + 4] */ 775 ecx = MEM32(ebp + (-0x4)); /* 0x3803B253: mov ecx, dword ptr [ebp - 4] */ 776 MEM8(eax + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B256: mov byte ptr [eax + 0x20], bl */ 777 eax = MEM32(ebp + 0x8); /* 0x3803B259: mov eax, dword ptr [ebp + 8] */ 778 edi = POP32_VAL(esp); /* 0x3803B25C: pop edi */ 779 esi = POP32_VAL(esp); /* 0x3803B25D: pop esi */ 780 MEM32(eax) = ecx; /* 0x3803B25E: mov dword ptr [eax], ecx */ 781 ebx = POP32_VAL(esp); /* 0x3803B260: pop ebx */ 782 esp = ebp; /* 0x3803B261: mov esp, ebp */ 783 ebp = POP32_VAL(esp); /* 0x3803B263: pop ebp */ 784 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3803B264: ret 0x10 */ 785 RECOMP_REGS_OUT(); 786 } 787 788 void sub_3803B241(void) { 789 int _fpu_cmp = 0; 790 uint32_t _cf = 0; 791 int _df = 1; 792 uint32_t _flag_k = FK_NONE; 793 uint32_t _flag_a = 0, _flag_b = 0; 794 uint32_t _itail_tgt = 0; 795 RECOMP_REGS_LOCALS 796 RECOMP_ENTER(0x3803B241u); 797 798 goto L_3803B241; 799 L_3803B0CD: 800 ecx = MEM32(eax + 0x4); /* 0x3803B0CD: mov ecx, dword ptr [eax + 4] */ 801 SET_LO8(edx, MEM8(ecx + 0x20)); /* 0x3803B0D0: mov dl, byte ptr [ecx + 0x20] */ 802 /* test LO8(edx), LO8(edx) */ /* 0x3803B0D3: test dl, dl */ 803 _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24; 804 _cf = 0; 805 _flag_k = FK_NARROW(FK_TEST, 24); 806 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803B24D; /* 0x3803B0D5: jne 0x3803b24d */ 807 L_3803B0DB: 808 edi = MEM32(ecx + 0x4); /* 0x3803B0DB: mov edi, dword ptr [ecx + 4] */ 809 edx = MEM32(edi); /* 0x3803B0DE: mov edx, dword ptr [edi] */ 810 /* cmp ecx, edx */ /* 0x3803B0E0: cmp ecx, edx */ 811 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 812 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 813 _flag_k = FK_CMP; 814 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1A9; /* 0x3803B0E2: jne 0x3803b1a9 */ 815 L_3803B0E8: 816 edx = MEM32(edi + 0x8); /* 0x3803B0E8: mov edx, dword ptr [edi + 8] */ 817 /* cmp MEM8(edx + 0x20), 0 */ /* 0x3803B0EB: cmp byte ptr [edx + 0x20], 0 */ 818 _flag_a = (uint32_t)(MEM8(edx + 0x20)) << 24; _flag_b = (uint32_t)(0) << 24; 819 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 820 _flag_k = FK_NARROW(FK_CMP, 24); 821 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B10C; /* 0x3803B0EF: jne 0x3803b10c */ 822 L_3803B0F1: 823 MEM8(ecx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B0F1: mov byte ptr [ecx + 0x20], bl */ 824 MEM8(edx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B0F4: mov byte ptr [edx + 0x20], bl */ 825 ecx = MEM32(eax + 0x4); /* 0x3803B0F7: mov ecx, dword ptr [eax + 4] */ 826 edx = MEM32(ecx + 0x4); /* 0x3803B0FA: mov edx, dword ptr [ecx + 4] */ 827 MEM8(edx + 0x20) = (uint8_t)(0); /* 0x3803B0FD: mov byte ptr [edx + 0x20], 0 */ 828 eax = MEM32(eax + 0x4); /* 0x3803B101: mov eax, dword ptr [eax + 4] */ 829 eax = MEM32(eax + 0x4); /* 0x3803B104: mov eax, dword ptr [eax + 4] */ 830 goto L_3803B241; /* 0x3803B107: jmp 0x3803b241 */ 831 L_3803B10C: 832 /* cmp eax, MEM32(ecx + 0x8) */ /* 0x3803B10C: cmp eax, dword ptr [ecx + 8] */ 833 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8)); 834 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 835 _flag_k = FK_CMP; 836 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B14B; /* 0x3803B10F: jne 0x3803b14b */ 837 L_3803B111: 838 eax = ecx; /* 0x3803B111: mov eax, ecx */ 839 ecx = MEM32(eax + 0x8); /* 0x3803B113: mov ecx, dword ptr [eax + 8] */ 840 edx = MEM32(ecx); /* 0x3803B116: mov edx, dword ptr [ecx] */ 841 MEM32(eax + 0x8) = edx; /* 0x3803B118: mov dword ptr [eax + 8], edx */ 842 edx = MEM32(ecx); /* 0x3803B11B: mov edx, dword ptr [ecx] */ 843 /* cmp edx, MEM32(esi + 0x8) */ /* 0x3803B11D: cmp edx, dword ptr [esi + 8] */ 844 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 845 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 846 _flag_k = FK_CMP; 847 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B125; /* 0x3803B120: je 0x3803b125 */ 848 L_3803B122: 849 MEM32(edx + 0x4) = eax; /* 0x3803B122: mov dword ptr [edx + 4], eax */ 850 L_3803B125: 851 edx = MEM32(eax + 0x4); /* 0x3803B125: mov edx, dword ptr [eax + 4] */ 852 MEM32(ecx + 0x4) = edx; /* 0x3803B128: mov dword ptr [ecx + 4], edx */ 853 edx = MEM32(esi + 0x4); /* 0x3803B12B: mov edx, dword ptr [esi + 4] */ 854 /* cmp eax, MEM32(edx + 0x4) */ /* 0x3803B12E: cmp eax, dword ptr [edx + 4] */ 855 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4)); 856 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 857 _flag_k = FK_CMP; 858 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B138; /* 0x3803B131: jne 0x3803b138 */ 859 L_3803B133: 860 MEM32(edx + 0x4) = ecx; /* 0x3803B133: mov dword ptr [edx + 4], ecx */ 861 goto L_3803B146; /* 0x3803B136: jmp 0x3803b146 */ 862 L_3803B138: 863 edx = MEM32(eax + 0x4); /* 0x3803B138: mov edx, dword ptr [eax + 4] */ 864 /* cmp eax, MEM32(edx) */ /* 0x3803B13B: cmp eax, dword ptr [edx] */ 865 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx)); 866 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 867 _flag_k = FK_CMP; 868 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B143; /* 0x3803B13D: jne 0x3803b143 */ 869 L_3803B13F: 870 MEM32(edx) = ecx; /* 0x3803B13F: mov dword ptr [edx], ecx */ 871 goto L_3803B146; /* 0x3803B141: jmp 0x3803b146 */ 872 L_3803B143: 873 MEM32(edx + 0x8) = ecx; /* 0x3803B143: mov dword ptr [edx + 8], ecx */ 874 L_3803B146: 875 MEM32(ecx) = eax; /* 0x3803B146: mov dword ptr [ecx], eax */ 876 MEM32(eax + 0x4) = ecx; /* 0x3803B148: mov dword ptr [eax + 4], ecx */ 877 L_3803B14B: 878 ecx = MEM32(eax + 0x4); /* 0x3803B14B: mov ecx, dword ptr [eax + 4] */ 879 MEM8(ecx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B14E: mov byte ptr [ecx + 0x20], bl */ 880 edx = MEM32(eax + 0x4); /* 0x3803B151: mov edx, dword ptr [eax + 4] */ 881 ecx = MEM32(edx + 0x4); /* 0x3803B154: mov ecx, dword ptr [edx + 4] */ 882 MEM8(ecx + 0x20) = (uint8_t)(0); /* 0x3803B157: mov byte ptr [ecx + 0x20], 0 */ 883 edx = MEM32(eax + 0x4); /* 0x3803B15B: mov edx, dword ptr [eax + 4] */ 884 ecx = MEM32(edx + 0x4); /* 0x3803B15E: mov ecx, dword ptr [edx + 4] */ 885 edx = MEM32(ecx); /* 0x3803B161: mov edx, dword ptr [ecx] */ 886 edi = MEM32(edx + 0x8); /* 0x3803B163: mov edi, dword ptr [edx + 8] */ 887 MEM32(ecx) = edi; /* 0x3803B166: mov dword ptr [ecx], edi */ 888 edi = MEM32(edx + 0x8); /* 0x3803B168: mov edi, dword ptr [edx + 8] */ 889 /* cmp edi, MEM32(esi + 0x8) */ /* 0x3803B16B: cmp edi, dword ptr [esi + 8] */ 890 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 891 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 892 _flag_k = FK_CMP; 893 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B173; /* 0x3803B16E: je 0x3803b173 */ 894 L_3803B170: 895 MEM32(edi + 0x4) = ecx; /* 0x3803B170: mov dword ptr [edi + 4], ecx */ 896 L_3803B173: 897 edi = MEM32(ecx + 0x4); /* 0x3803B173: mov edi, dword ptr [ecx + 4] */ 898 MEM32(edx + 0x4) = edi; /* 0x3803B176: mov dword ptr [edx + 4], edi */ 899 edi = MEM32(esi + 0x4); /* 0x3803B179: mov edi, dword ptr [esi + 4] */ 900 /* cmp ecx, MEM32(edi + 0x4) */ /* 0x3803B17C: cmp ecx, dword ptr [edi + 4] */ 901 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x4)); 902 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 903 _flag_k = FK_CMP; 904 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B18C; /* 0x3803B17F: jne 0x3803b18c */ 905 L_3803B181: 906 MEM32(edi + 0x4) = edx; /* 0x3803B181: mov dword ptr [edi + 4], edx */ 907 MEM32(edx + 0x8) = ecx; /* 0x3803B184: mov dword ptr [edx + 8], ecx */ 908 goto L_3803B23E; /* 0x3803B187: jmp 0x3803b23e */ 909 L_3803B18C: 910 edi = MEM32(ecx + 0x4); /* 0x3803B18C: mov edi, dword ptr [ecx + 4] */ 911 /* cmp ecx, MEM32(edi + 0x8) */ /* 0x3803B18F: cmp ecx, dword ptr [edi + 8] */ 912 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x8)); 913 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 914 _flag_k = FK_CMP; 915 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B19F; /* 0x3803B192: jne 0x3803b19f */ 916 L_3803B194: 917 MEM32(edi + 0x8) = edx; /* 0x3803B194: mov dword ptr [edi + 8], edx */ 918 MEM32(edx + 0x8) = ecx; /* 0x3803B197: mov dword ptr [edx + 8], ecx */ 919 goto L_3803B23E; /* 0x3803B19A: jmp 0x3803b23e */ 920 L_3803B19F: 921 MEM32(edi) = edx; /* 0x3803B19F: mov dword ptr [edi], edx */ 922 MEM32(edx + 0x8) = ecx; /* 0x3803B1A1: mov dword ptr [edx + 8], ecx */ 923 goto L_3803B23E; /* 0x3803B1A4: jmp 0x3803b23e */ 924 L_3803B1A9: 925 /* cmp MEM8(edx + 0x20), 0 */ /* 0x3803B1A9: cmp byte ptr [edx + 0x20], 0 */ 926 _flag_a = (uint32_t)(MEM8(edx + 0x20)) << 24; _flag_b = (uint32_t)(0) << 24; 927 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 928 _flag_k = FK_NARROW(FK_CMP, 24); 929 RECOMP_BACKEDGE(); 930 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B0F1; /* 0x3803B1AD: je 0x3803b0f1 */ 931 L_3803B1B3: 932 /* cmp eax, MEM32(ecx) */ /* 0x3803B1B3: cmp eax, dword ptr [ecx] */ 933 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx)); 934 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 935 _flag_k = FK_CMP; 936 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1F3; /* 0x3803B1B5: jne 0x3803b1f3 */ 937 L_3803B1B7: 938 eax = ecx; /* 0x3803B1B7: mov eax, ecx */ 939 ecx = MEM32(eax); /* 0x3803B1B9: mov ecx, dword ptr [eax] */ 940 edx = MEM32(ecx + 0x8); /* 0x3803B1BB: mov edx, dword ptr [ecx + 8] */ 941 MEM32(eax) = edx; /* 0x3803B1BE: mov dword ptr [eax], edx */ 942 edx = MEM32(ecx + 0x8); /* 0x3803B1C0: mov edx, dword ptr [ecx + 8] */ 943 /* cmp edx, MEM32(esi + 0x8) */ /* 0x3803B1C3: cmp edx, dword ptr [esi + 8] */ 944 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 945 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 946 _flag_k = FK_CMP; 947 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B1CB; /* 0x3803B1C6: je 0x3803b1cb */ 948 L_3803B1C8: 949 MEM32(edx + 0x4) = eax; /* 0x3803B1C8: mov dword ptr [edx + 4], eax */ 950 L_3803B1CB: 951 edx = MEM32(eax + 0x4); /* 0x3803B1CB: mov edx, dword ptr [eax + 4] */ 952 MEM32(ecx + 0x4) = edx; /* 0x3803B1CE: mov dword ptr [ecx + 4], edx */ 953 edx = MEM32(esi + 0x4); /* 0x3803B1D1: mov edx, dword ptr [esi + 4] */ 954 /* cmp eax, MEM32(edx + 0x4) */ /* 0x3803B1D4: cmp eax, dword ptr [edx + 4] */ 955 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4)); 956 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 957 _flag_k = FK_CMP; 958 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1DE; /* 0x3803B1D7: jne 0x3803b1de */ 959 L_3803B1D9: 960 MEM32(edx + 0x4) = ecx; /* 0x3803B1D9: mov dword ptr [edx + 4], ecx */ 961 goto L_3803B1ED; /* 0x3803B1DC: jmp 0x3803b1ed */ 962 L_3803B1DE: 963 edx = MEM32(eax + 0x4); /* 0x3803B1DE: mov edx, dword ptr [eax + 4] */ 964 /* cmp eax, MEM32(edx + 0x8) */ /* 0x3803B1E1: cmp eax, dword ptr [edx + 8] */ 965 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x8)); 966 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 967 _flag_k = FK_CMP; 968 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B1EB; /* 0x3803B1E4: jne 0x3803b1eb */ 969 L_3803B1E6: 970 MEM32(edx + 0x8) = ecx; /* 0x3803B1E6: mov dword ptr [edx + 8], ecx */ 971 goto L_3803B1ED; /* 0x3803B1E9: jmp 0x3803b1ed */ 972 L_3803B1EB: 973 MEM32(edx) = ecx; /* 0x3803B1EB: mov dword ptr [edx], ecx */ 974 L_3803B1ED: 975 MEM32(ecx + 0x8) = eax; /* 0x3803B1ED: mov dword ptr [ecx + 8], eax */ 976 MEM32(eax + 0x4) = ecx; /* 0x3803B1F0: mov dword ptr [eax + 4], ecx */ 977 L_3803B1F3: 978 ecx = MEM32(eax + 0x4); /* 0x3803B1F3: mov ecx, dword ptr [eax + 4] */ 979 MEM8(ecx + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B1F6: mov byte ptr [ecx + 0x20], bl */ 980 edx = MEM32(eax + 0x4); /* 0x3803B1F9: mov edx, dword ptr [eax + 4] */ 981 ecx = MEM32(edx + 0x4); /* 0x3803B1FC: mov ecx, dword ptr [edx + 4] */ 982 MEM8(ecx + 0x20) = (uint8_t)(0); /* 0x3803B1FF: mov byte ptr [ecx + 0x20], 0 */ 983 edx = MEM32(eax + 0x4); /* 0x3803B203: mov edx, dword ptr [eax + 4] */ 984 ecx = MEM32(edx + 0x4); /* 0x3803B206: mov ecx, dword ptr [edx + 4] */ 985 edx = MEM32(ecx + 0x8); /* 0x3803B209: mov edx, dword ptr [ecx + 8] */ 986 edi = MEM32(edx); /* 0x3803B20C: mov edi, dword ptr [edx] */ 987 MEM32(ecx + 0x8) = edi; /* 0x3803B20E: mov dword ptr [ecx + 8], edi */ 988 edi = MEM32(edx); /* 0x3803B211: mov edi, dword ptr [edx] */ 989 /* cmp edi, MEM32(esi + 0x8) */ /* 0x3803B213: cmp edi, dword ptr [esi + 8] */ 990 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x8)); 991 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 992 _flag_k = FK_CMP; 993 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B21B; /* 0x3803B216: je 0x3803b21b */ 994 L_3803B218: 995 MEM32(edi + 0x4) = ecx; /* 0x3803B218: mov dword ptr [edi + 4], ecx */ 996 L_3803B21B: 997 edi = MEM32(ecx + 0x4); /* 0x3803B21B: mov edi, dword ptr [ecx + 4] */ 998 MEM32(edx + 0x4) = edi; /* 0x3803B21E: mov dword ptr [edx + 4], edi */ 999 edi = MEM32(esi + 0x4); /* 0x3803B221: mov edi, dword ptr [esi + 4] */ 1000 /* cmp ecx, MEM32(edi + 0x4) */ /* 0x3803B224: cmp ecx, dword ptr [edi + 4] */ 1001 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x4)); 1002 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1003 _flag_k = FK_CMP; 1004 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B22E; /* 0x3803B227: jne 0x3803b22e */ 1005 L_3803B229: 1006 MEM32(edi + 0x4) = edx; /* 0x3803B229: mov dword ptr [edi + 4], edx */ 1007 goto L_3803B23C; /* 0x3803B22C: jmp 0x3803b23c */ 1008 L_3803B22E: 1009 edi = MEM32(ecx + 0x4); /* 0x3803B22E: mov edi, dword ptr [ecx + 4] */ 1010 /* cmp ecx, MEM32(edi) */ /* 0x3803B231: cmp ecx, dword ptr [edi] */ 1011 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi)); 1012 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1013 _flag_k = FK_CMP; 1014 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B239; /* 0x3803B233: jne 0x3803b239 */ 1015 L_3803B235: 1016 MEM32(edi) = edx; /* 0x3803B235: mov dword ptr [edi], edx */ 1017 goto L_3803B23C; /* 0x3803B237: jmp 0x3803b23c */ 1018 L_3803B239: 1019 MEM32(edi + 0x8) = edx; /* 0x3803B239: mov dword ptr [edi + 8], edx */ 1020 L_3803B23C: 1021 MEM32(edx) = ecx; /* 0x3803B23C: mov dword ptr [edx], ecx */ 1022 L_3803B23E: 1023 MEM32(ecx + 0x4) = edx; /* 0x3803B23E: mov dword ptr [ecx + 4], edx */ 1024 L_3803B241: 1025 ecx = MEM32(esi + 0x4); /* 0x3803B241: mov ecx, dword ptr [esi + 4] */ 1026 /* cmp eax, MEM32(ecx + 0x4) */ /* 0x3803B244: cmp eax, dword ptr [ecx + 4] */ 1027 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4)); 1028 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1029 _flag_k = FK_CMP; 1030 RECOMP_BACKEDGE(); 1031 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B0CD; /* 0x3803B247: jne 0x3803b0cd */ 1032 L_3803B24D: 1033 edx = MEM32(esi + 0x4); /* 0x3803B24D: mov edx, dword ptr [esi + 4] */ 1034 eax = MEM32(edx + 0x4); /* 0x3803B250: mov eax, dword ptr [edx + 4] */ 1035 ecx = MEM32(ebp + (-0x4)); /* 0x3803B253: mov ecx, dword ptr [ebp - 4] */ 1036 MEM8(eax + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B256: mov byte ptr [eax + 0x20], bl */ 1037 eax = MEM32(ebp + 0x8); /* 0x3803B259: mov eax, dword ptr [ebp + 8] */ 1038 edi = POP32_VAL(esp); /* 0x3803B25C: pop edi */ 1039 esi = POP32_VAL(esp); /* 0x3803B25D: pop esi */ 1040 MEM32(eax) = ecx; /* 0x3803B25E: mov dword ptr [eax], ecx */ 1041 ebx = POP32_VAL(esp); /* 0x3803B260: pop ebx */ 1042 esp = ebp; /* 0x3803B261: mov esp, ebp */ 1043 ebp = POP32_VAL(esp); /* 0x3803B263: pop ebp */ 1044 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3803B264: ret 0x10 */ 1045 RECOMP_REGS_OUT(); 1046 } 1047 1048 void sub_3803B24D(void) { 1049 int _fpu_cmp = 0; 1050 uint32_t _cf = 0; 1051 int _df = 1; 1052 uint32_t _flag_k = FK_NONE; 1053 uint32_t _flag_a = 0, _flag_b = 0; 1054 uint32_t _itail_tgt = 0; 1055 RECOMP_REGS_LOCALS 1056 RECOMP_ENTER(0x3803B24Du); 1057 1058 L_3803B24D: 1059 edx = MEM32(esi + 0x4); /* 0x3803B24D: mov edx, dword ptr [esi + 4] */ 1060 eax = MEM32(edx + 0x4); /* 0x3803B250: mov eax, dword ptr [edx + 4] */ 1061 ecx = MEM32(ebp + (-0x4)); /* 0x3803B253: mov ecx, dword ptr [ebp - 4] */ 1062 MEM8(eax + 0x20) = (uint8_t)(LO8(ebx)); /* 0x3803B256: mov byte ptr [eax + 0x20], bl */ 1063 eax = MEM32(ebp + 0x8); /* 0x3803B259: mov eax, dword ptr [ebp + 8] */ 1064 edi = POP32_VAL(esp); /* 0x3803B25C: pop edi */ 1065 esi = POP32_VAL(esp); /* 0x3803B25D: pop esi */ 1066 MEM32(eax) = ecx; /* 0x3803B25E: mov dword ptr [eax], ecx */ 1067 ebx = POP32_VAL(esp); /* 0x3803B260: pop ebx */ 1068 esp = ebp; /* 0x3803B261: mov esp, ebp */ 1069 ebp = POP32_VAL(esp); /* 0x3803B263: pop ebp */ 1070 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3803B264: ret 0x10 */ 1071 RECOMP_REGS_OUT(); 1072 } 1073 1074 void sub_3803B270(void) { 1075 int _fpu_cmp = 0; 1076 uint32_t _cf = 0; 1077 int _df = 1; 1078 uint32_t _flag_k = FK_NONE; 1079 uint32_t _flag_a = 0, _flag_b = 0; 1080 uint32_t _itail_tgt = 0; 1081 RECOMP_REGS_LOCALS 1082 RECOMP_ENTER(0x3803B270u); 1083 1084 L_3803B270: 1085 PUSH32(esp, ebp); /* 0x3803B270: push ebp */ 1086 ebp = esp; /* 0x3803B271: mov ebp, esp */ 1087 edx = MEM32(ebp + 0x8); /* 0x3803B273: mov edx, dword ptr [ebp + 8] */ 1088 eax = MEM32(edx + 0x8); /* 0x3803B276: mov eax, dword ptr [edx + 8] */ 1089 PUSH32(esp, esi); /* 0x3803B279: push esi */ 1090 esi = MEM32(eax); /* 0x3803B27A: mov esi, dword ptr [eax] */ 1091 MEM32(edx + 0x8) = esi; /* 0x3803B27C: mov dword ptr [edx + 8], esi */ 1092 esi = MEM32(eax); /* 0x3803B27F: mov esi, dword ptr [eax] */ 1093 /* cmp esi, MEM32(ecx + 0x8) */ /* 0x3803B281: cmp esi, dword ptr [ecx + 8] */ 1094 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(ecx + 0x8)); 1095 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1096 _flag_k = FK_CMP; 1097 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B289; /* 0x3803B284: je 0x3803b289 */ 1098 L_3803B286: 1099 MEM32(esi + 0x4) = edx; /* 0x3803B286: mov dword ptr [esi + 4], edx */ 1100 L_3803B289: 1101 esi = MEM32(edx + 0x4); /* 0x3803B289: mov esi, dword ptr [edx + 4] */ 1102 MEM32(eax + 0x4) = esi; /* 0x3803B28C: mov dword ptr [eax + 4], esi */ 1103 ecx = MEM32(ecx + 0x4); /* 0x3803B28F: mov ecx, dword ptr [ecx + 4] */ 1104 /* cmp edx, MEM32(ecx + 0x4) */ /* 0x3803B292: cmp edx, dword ptr [ecx + 4] */ 1105 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(ecx + 0x4)); 1106 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1107 _flag_k = FK_CMP; 1108 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B2A4; /* 0x3803B295: jne 0x3803b2a4 */ 1109 L_3803B297: 1110 MEM32(ecx + 0x4) = eax; /* 0x3803B297: mov dword ptr [ecx + 4], eax */ 1111 MEM32(eax) = edx; /* 0x3803B29A: mov dword ptr [eax], edx */ 1112 MEM32(edx + 0x4) = eax; /* 0x3803B29C: mov dword ptr [edx + 4], eax */ 1113 esi = POP32_VAL(esp); /* 0x3803B29F: pop esi */ 1114 ebp = POP32_VAL(esp); /* 0x3803B2A0: pop ebp */ 1115 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803B2A1: ret 4 */ 1116 L_3803B2A4: 1117 ecx = MEM32(edx + 0x4); /* 0x3803B2A4: mov ecx, dword ptr [edx + 4] */ 1118 /* cmp edx, MEM32(ecx) */ /* 0x3803B2A7: cmp edx, dword ptr [ecx] */ 1119 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(ecx)); 1120 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1121 _flag_k = FK_CMP; 1122 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B2B7; /* 0x3803B2A9: jne 0x3803b2b7 */ 1123 L_3803B2AB: 1124 MEM32(ecx) = eax; /* 0x3803B2AB: mov dword ptr [ecx], eax */ 1125 MEM32(eax) = edx; /* 0x3803B2AD: mov dword ptr [eax], edx */ 1126 MEM32(edx + 0x4) = eax; /* 0x3803B2AF: mov dword ptr [edx + 4], eax */ 1127 esi = POP32_VAL(esp); /* 0x3803B2B2: pop esi */ 1128 ebp = POP32_VAL(esp); /* 0x3803B2B3: pop ebp */ 1129 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803B2B4: ret 4 */ 1130 L_3803B2B7: 1131 MEM32(ecx + 0x8) = eax; /* 0x3803B2B7: mov dword ptr [ecx + 8], eax */ 1132 MEM32(eax) = edx; /* 0x3803B2BA: mov dword ptr [eax], edx */ 1133 MEM32(edx + 0x4) = eax; /* 0x3803B2BC: mov dword ptr [edx + 4], eax */ 1134 esi = POP32_VAL(esp); /* 0x3803B2BF: pop esi */ 1135 ebp = POP32_VAL(esp); /* 0x3803B2C0: pop ebp */ 1136 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803B2C1: ret 4 */ 1137 RECOMP_REGS_OUT(); 1138 } 1139 1140 void sub_3803B2D0(void) { 1141 int _fpu_cmp = 0; 1142 uint32_t _cf = 0; 1143 int _df = 1; 1144 uint32_t _flag_k = FK_NONE; 1145 uint32_t _flag_a = 0, _flag_b = 0; 1146 uint32_t _itail_tgt = 0; 1147 RECOMP_REGS_LOCALS 1148 RECOMP_ENTER(0x3803B2D0u); 1149 1150 L_3803B2D0: 1151 eax = MEM32(ecx); /* 0x3803B2D0: mov eax, dword ptr [ecx] */ 1152 SET_LO8(edx, MEM8(eax + 0x20)); /* 0x3803B2D2: mov dl, byte ptr [eax + 0x20] */ 1153 /* test LO8(edx), LO8(edx) */ /* 0x3803B2D5: test dl, dl */ 1154 _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24; 1155 _cf = 0; 1156 _flag_k = FK_NARROW(FK_TEST, 24); 1157 PUSH32(esp, ebx); /* 0x3803B2D7: push ebx */ 1158 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803B2E9; /* 0x3803B2D8: jne 0x3803b2e9 */ 1159 L_3803B2DA: 1160 edx = MEM32(eax + 0x4); /* 0x3803B2DA: mov edx, dword ptr [eax + 4] */ 1161 /* cmp MEM32(edx + 0x4), eax */ /* 0x3803B2DD: cmp dword ptr [edx + 4], eax */ 1162 _flag_a = (uint32_t)(MEM32(edx + 0x4)); _flag_b = (uint32_t)(eax); 1163 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1164 _flag_k = FK_CMP; 1165 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B2E9; /* 0x3803B2E0: jne 0x3803b2e9 */ 1166 L_3803B2E2: 1167 eax = MEM32(eax + 0x8); /* 0x3803B2E2: mov eax, dword ptr [eax + 8] */ 1168 MEM32(ecx) = eax; /* 0x3803B2E5: mov dword ptr [ecx], eax */ 1169 ebx = POP32_VAL(esp); /* 0x3803B2E7: pop ebx */ 1170 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B2E8: ret */ 1171 L_3803B2E9: 1172 edx = MEM32(eax); /* 0x3803B2E9: mov edx, dword ptr [eax] */ 1173 SET_LO8(ebx, MEM8(edx + 0x21)); /* 0x3803B2EB: mov bl, byte ptr [edx + 0x21] */ 1174 /* test LO8(ebx), LO8(ebx) */ /* 0x3803B2EE: test bl, bl */ 1175 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 1176 _cf = 0; 1177 _flag_k = FK_NARROW(FK_TEST, 24); 1178 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803B30C; /* 0x3803B2F0: jne 0x3803b30c */ 1179 L_3803B2F2: 1180 eax = MEM32(edx + 0x8); /* 0x3803B2F2: mov eax, dword ptr [edx + 8] */ 1181 SET_LO8(ebx, MEM8(eax + 0x21)); /* 0x3803B2F5: mov bl, byte ptr [eax + 0x21] */ 1182 /* test LO8(ebx), LO8(ebx) */ /* 0x3803B2F8: test bl, bl */ 1183 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 1184 _cf = 0; 1185 _flag_k = FK_NARROW(FK_TEST, 24); 1186 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803B308; /* 0x3803B2FA: jne 0x3803b308 */ 1187 L_3803B2FC: 1188 edx = eax; /* 0x3803B2FC: mov edx, eax */ 1189 eax = MEM32(edx + 0x8); /* 0x3803B2FE: mov eax, dword ptr [edx + 8] */ 1190 SET_LO8(ebx, MEM8(eax + 0x21)); /* 0x3803B301: mov bl, byte ptr [eax + 0x21] */ 1191 /* test LO8(ebx), LO8(ebx) */ /* 0x3803B304: test bl, bl */ 1192 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 1193 _cf = 0; 1194 _flag_k = FK_NARROW(FK_TEST, 24); 1195 RECOMP_BACKEDGE(); 1196 if (TEST_Z(_flag_a, _flag_b)) goto L_3803B2FC; /* 0x3803B306: je 0x3803b2fc */ 1197 L_3803B308: 1198 MEM32(ecx) = edx; /* 0x3803B308: mov dword ptr [ecx], edx */ 1199 ebx = POP32_VAL(esp); /* 0x3803B30A: pop ebx */ 1200 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B30B: ret */ 1201 L_3803B30C: 1202 eax = MEM32(eax + 0x4); /* 0x3803B30C: mov eax, dword ptr [eax + 4] */ 1203 edx = MEM32(ecx); /* 0x3803B30F: mov edx, dword ptr [ecx] */ 1204 /* cmp edx, MEM32(eax) */ /* 0x3803B311: cmp edx, dword ptr [eax] */ 1205 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(eax)); 1206 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1207 _flag_k = FK_CMP; 1208 if (CMP_NE(_flag_a, _flag_b)) goto L_3803B320; /* 0x3803B313: jne 0x3803b320 */ 1209 L_3803B315: 1210 MEM32(ecx) = eax; /* 0x3803B315: mov dword ptr [ecx], eax */ 1211 eax = MEM32(eax + 0x4); /* 0x3803B317: mov eax, dword ptr [eax + 4] */ 1212 edx = MEM32(ecx); /* 0x3803B31A: mov edx, dword ptr [ecx] */ 1213 /* cmp edx, MEM32(eax) */ /* 0x3803B31C: cmp edx, dword ptr [eax] */ 1214 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(eax)); 1215 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1216 _flag_k = FK_CMP; 1217 RECOMP_BACKEDGE(); 1218 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B315; /* 0x3803B31E: je 0x3803b315 */ 1219 L_3803B320: 1220 MEM32(ecx) = eax; /* 0x3803B320: mov dword ptr [ecx], eax */ 1221 ebx = POP32_VAL(esp); /* 0x3803B322: pop ebx */ 1222 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B323: ret */ 1223 RECOMP_REGS_OUT(); 1224 } 1225 1226 void sub_3803B330(void) { 1227 int _fpu_cmp = 0; 1228 uint32_t _cf = 0; 1229 int _df = 1; 1230 uint32_t _flag_k = FK_NONE; 1231 uint32_t _flag_a = 0, _flag_b = 0; 1232 uint32_t _itail_tgt = 0; 1233 RECOMP_REGS_LOCALS 1234 RECOMP_ENTER(0x3803B330u); 1235 1236 L_3803B330: 1237 RECOMP_ICALL(0x3803B340u); /* 0x3803B330: call 0x3803b340 */ /* not lifted */ 1238 RECOMP_FLAGS_IN(); 1239 goto L_3803B350; /* 0x3803B335: jmp 0x3803b350 */ 1240 L_3803B350: 1241 PUSH32(esp, 0x3803B360u); /* 0x3803B350: push 0x3803b360 */ 1242 RECOMP_ICALL(0x3804B54Cu); /* 0x3803B355: call 0x3804b54c */ /* not lifted */ 1243 RECOMP_FLAGS_IN(); 1244 ecx = POP32_VAL(esp); /* 0x3803B35A: pop ecx */ 1245 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B35B: ret */ 1246 RECOMP_REGS_OUT(); 1247 } 1248 1249 void sub_3803B340(void) { 1250 int _fpu_cmp = 0; 1251 uint32_t _cf = 0; 1252 int _df = 1; 1253 uint32_t _flag_k = FK_NONE; 1254 uint32_t _flag_a = 0, _flag_b = 0; 1255 uint32_t _itail_tgt = 0; 1256 RECOMP_REGS_LOCALS 1257 RECOMP_ENTER(0x3803B340u); 1258 1259 L_3803B340: 1260 ecx = 0x3806F035u; /* 0x3803B340: mov ecx, 0x3806f035 */ 1261 L_3803B345: 1262 { _itail_tgt = (uint32_t)(MEM32(0x3804E060)); goto _ljump; } 1263 { RECOMP_REGS_OUT(); return; } /* end of function */ 1264 _ljump: 1265 switch (_itail_tgt) { 1266 case 0x3803B340u: goto L_3803B340; 1267 case 0x3803B345u: goto L_3803B345; 1268 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1269 } 1270 RECOMP_REGS_OUT(); 1271 } 1272 1273 void sub_3803B350(void) { 1274 int _fpu_cmp = 0; 1275 uint32_t _cf = 0; 1276 int _df = 1; 1277 uint32_t _flag_k = FK_NONE; 1278 uint32_t _flag_a = 0, _flag_b = 0; 1279 uint32_t _itail_tgt = 0; 1280 RECOMP_REGS_LOCALS 1281 RECOMP_ENTER(0x3803B350u); 1282 1283 L_3803B350: 1284 PUSH32(esp, 0x3803B360u); /* 0x3803B350: push 0x3803b360 */ 1285 RECOMP_ICALL(0x3804B54Cu); /* 0x3803B355: call 0x3804b54c */ /* not lifted */ 1286 RECOMP_FLAGS_IN(); 1287 ecx = POP32_VAL(esp); /* 0x3803B35A: pop ecx */ 1288 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B35B: ret */ 1289 RECOMP_REGS_OUT(); 1290 } 1291 1292 void sub_3803B360(void) { 1293 int _fpu_cmp = 0; 1294 uint32_t _cf = 0; 1295 int _df = 1; 1296 uint32_t _flag_k = FK_NONE; 1297 uint32_t _flag_a = 0, _flag_b = 0; 1298 uint32_t _itail_tgt = 0; 1299 RECOMP_REGS_LOCALS 1300 RECOMP_ENTER(0x3803B360u); 1301 1302 L_3803B360: 1303 ecx = 0x3806F035u; /* 0x3803B360: mov ecx, 0x3806f035 */ 1304 L_3803B365: 1305 { _itail_tgt = (uint32_t)(MEM32(0x3804E064)); goto _ljump; } 1306 { RECOMP_REGS_OUT(); return; } /* end of function */ 1307 _ljump: 1308 switch (_itail_tgt) { 1309 case 0x3803B360u: goto L_3803B360; 1310 case 0x3803B365u: goto L_3803B365; 1311 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1312 } 1313 RECOMP_REGS_OUT(); 1314 } 1315 1316 void sub_3803B370(void) { 1317 int _fpu_cmp = 0; 1318 uint32_t _cf = 0; 1319 int _df = 1; 1320 uint32_t _flag_k = FK_NONE; 1321 uint32_t _flag_a = 0, _flag_b = 0; 1322 uint32_t _itail_tgt = 0; 1323 RECOMP_REGS_LOCALS 1324 RECOMP_ENTER(0x3803B370u); 1325 1326 L_3803B370: 1327 RECOMP_ICALL(0x3803B380u); /* 0x3803B370: call 0x3803b380 */ /* not lifted */ 1328 RECOMP_FLAGS_IN(); 1329 goto L_3803B390; /* 0x3803B375: jmp 0x3803b390 */ 1330 L_3803B390: 1331 PUSH32(esp, 0x3803B3A0u); /* 0x3803B390: push 0x3803b3a0 */ 1332 RECOMP_ICALL(0x3804B54Cu); /* 0x3803B395: call 0x3804b54c */ /* not lifted */ 1333 RECOMP_FLAGS_IN(); 1334 ecx = POP32_VAL(esp); /* 0x3803B39A: pop ecx */ 1335 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B39B: ret */ 1336 RECOMP_REGS_OUT(); 1337 } 1338 1339 void sub_3803B380(void) { 1340 int _fpu_cmp = 0; 1341 uint32_t _cf = 0; 1342 int _df = 1; 1343 uint32_t _flag_k = FK_NONE; 1344 uint32_t _flag_a = 0, _flag_b = 0; 1345 uint32_t _itail_tgt = 0; 1346 RECOMP_REGS_LOCALS 1347 RECOMP_ENTER(0x3803B380u); 1348 1349 L_3803B380: 1350 ecx = 0x3806F034u; /* 0x3803B380: mov ecx, 0x3806f034 */ 1351 L_3803B385: 1352 { _itail_tgt = (uint32_t)(MEM32(0x3804E068)); goto _ljump; } 1353 { RECOMP_REGS_OUT(); return; } /* end of function */ 1354 _ljump: 1355 switch (_itail_tgt) { 1356 case 0x3803B380u: goto L_3803B380; 1357 case 0x3803B385u: goto L_3803B385; 1358 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1359 } 1360 RECOMP_REGS_OUT(); 1361 } 1362 1363 void sub_3803B390(void) { 1364 int _fpu_cmp = 0; 1365 uint32_t _cf = 0; 1366 int _df = 1; 1367 uint32_t _flag_k = FK_NONE; 1368 uint32_t _flag_a = 0, _flag_b = 0; 1369 uint32_t _itail_tgt = 0; 1370 RECOMP_REGS_LOCALS 1371 RECOMP_ENTER(0x3803B390u); 1372 1373 L_3803B390: 1374 PUSH32(esp, 0x3803B3A0u); /* 0x3803B390: push 0x3803b3a0 */ 1375 RECOMP_ICALL(0x3804B54Cu); /* 0x3803B395: call 0x3804b54c */ /* not lifted */ 1376 RECOMP_FLAGS_IN(); 1377 ecx = POP32_VAL(esp); /* 0x3803B39A: pop ecx */ 1378 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B39B: ret */ 1379 RECOMP_REGS_OUT(); 1380 } 1381 1382 void sub_3803B3A0(void) { 1383 int _fpu_cmp = 0; 1384 uint32_t _cf = 0; 1385 int _df = 1; 1386 uint32_t _flag_k = FK_NONE; 1387 uint32_t _flag_a = 0, _flag_b = 0; 1388 uint32_t _itail_tgt = 0; 1389 RECOMP_REGS_LOCALS 1390 RECOMP_ENTER(0x3803B3A0u); 1391 1392 L_3803B3A0: 1393 ecx = 0x3806F034u; /* 0x3803B3A0: mov ecx, 0x3806f034 */ 1394 L_3803B3A5: 1395 { _itail_tgt = (uint32_t)(MEM32(0x3804E06C)); goto _ljump; } 1396 { RECOMP_REGS_OUT(); return; } /* end of function */ 1397 _ljump: 1398 switch (_itail_tgt) { 1399 case 0x3803B3A0u: goto L_3803B3A0; 1400 case 0x3803B3A5u: goto L_3803B3A5; 1401 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 1402 } 1403 RECOMP_REGS_OUT(); 1404 } 1405 1406 void sub_3803B3B0(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(0x3803B3B0u); 1415 1416 L_3803B3B0: 1417 goto L_3803B3C0; /* 0x3803B3B0: jmp 0x3803b3c0 */ 1418 L_3803B3C0: 1419 MEM32(0x3806F028) = 0; /* 0x3803B3C0: mov dword ptr [0x3806f028], 0 */ 1420 MEM32(0x3806F02C) = 0; /* 0x3803B3CA: mov dword ptr [0x3806f02c], 0 */ 1421 MEM32(0x3806F030) = 0; /* 0x3803B3D4: mov dword ptr [0x3806f030], 0 */ 1422 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B3DE: ret */ 1423 RECOMP_REGS_OUT(); 1424 } 1425 1426 void sub_3803B3C0(void) { 1427 int _fpu_cmp = 0; 1428 uint32_t _cf = 0; 1429 int _df = 1; 1430 uint32_t _flag_k = FK_NONE; 1431 uint32_t _flag_a = 0, _flag_b = 0; 1432 uint32_t _itail_tgt = 0; 1433 RECOMP_REGS_LOCALS 1434 RECOMP_ENTER(0x3803B3C0u); 1435 1436 L_3803B3C0: 1437 MEM32(0x3806F028) = 0; /* 0x3803B3C0: mov dword ptr [0x3806f028], 0 */ 1438 MEM32(0x3806F02C) = 0; /* 0x3803B3CA: mov dword ptr [0x3806f02c], 0 */ 1439 MEM32(0x3806F030) = 0; /* 0x3803B3D4: mov dword ptr [0x3806f030], 0 */ 1440 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B3DE: ret */ 1441 RECOMP_REGS_OUT(); 1442 } 1443 1444 void sub_3803B3E0(void) { 1445 int _fpu_cmp = 0; 1446 uint32_t _cf = 0; 1447 int _df = 1; 1448 uint32_t _flag_k = FK_NONE; 1449 uint32_t _flag_a = 0, _flag_b = 0; 1450 uint32_t _itail_tgt = 0; 1451 RECOMP_REGS_LOCALS 1452 RECOMP_ENTER(0x3803B3E0u); 1453 1454 L_3803B3E0: 1455 goto L_3803B3F0; /* 0x3803B3E0: jmp 0x3803b3f0 */ 1456 L_3803B3F0: 1457 MEM32(0x3806F008) = 0; /* 0x3803B3F0: mov dword ptr [0x3806f008], 0 */ 1458 MEM32(0x3806F00C) = 0; /* 0x3803B3FA: mov dword ptr [0x3806f00c], 0 */ 1459 MEM32(0x3806F010) = 0; /* 0x3803B404: mov dword ptr [0x3806f010], 0 */ 1460 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B40E: ret */ 1461 RECOMP_REGS_OUT(); 1462 } 1463 1464 void sub_3803B3F0(void) { 1465 int _fpu_cmp = 0; 1466 uint32_t _cf = 0; 1467 int _df = 1; 1468 uint32_t _flag_k = FK_NONE; 1469 uint32_t _flag_a = 0, _flag_b = 0; 1470 uint32_t _itail_tgt = 0; 1471 RECOMP_REGS_LOCALS 1472 RECOMP_ENTER(0x3803B3F0u); 1473 1474 L_3803B3F0: 1475 MEM32(0x3806F008) = 0; /* 0x3803B3F0: mov dword ptr [0x3806f008], 0 */ 1476 MEM32(0x3806F00C) = 0; /* 0x3803B3FA: mov dword ptr [0x3806f00c], 0 */ 1477 MEM32(0x3806F010) = 0; /* 0x3803B404: mov dword ptr [0x3806f010], 0 */ 1478 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B40E: ret */ 1479 RECOMP_REGS_OUT(); 1480 } 1481 1482 void sub_3803B410(void) { 1483 int _fpu_cmp = 0; 1484 uint32_t _cf = 0; 1485 int _df = 1; 1486 uint32_t _flag_k = FK_NONE; 1487 uint32_t _flag_a = 0, _flag_b = 0; 1488 uint32_t _itail_tgt = 0; 1489 RECOMP_REGS_LOCALS 1490 RECOMP_ENTER(0x3803B410u); 1491 1492 L_3803B410: 1493 goto L_3803B420; /* 0x3803B410: jmp 0x3803b420 */ 1494 L_3803B420: 1495 MEM32(0x3806F018) = 0; /* 0x3803B420: mov dword ptr [0x3806f018], 0 */ 1496 MEM32(0x3806F01C) = 0; /* 0x3803B42A: mov dword ptr [0x3806f01c], 0 */ 1497 MEM32(0x3806F020) = 0; /* 0x3803B434: mov dword ptr [0x3806f020], 0 */ 1498 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B43E: ret */ 1499 RECOMP_REGS_OUT(); 1500 } 1501 1502 void sub_3803B420(void) { 1503 int _fpu_cmp = 0; 1504 uint32_t _cf = 0; 1505 int _df = 1; 1506 uint32_t _flag_k = FK_NONE; 1507 uint32_t _flag_a = 0, _flag_b = 0; 1508 uint32_t _itail_tgt = 0; 1509 RECOMP_REGS_LOCALS 1510 RECOMP_ENTER(0x3803B420u); 1511 1512 L_3803B420: 1513 MEM32(0x3806F018) = 0; /* 0x3803B420: mov dword ptr [0x3806f018], 0 */ 1514 MEM32(0x3806F01C) = 0; /* 0x3803B42A: mov dword ptr [0x3806f01c], 0 */ 1515 MEM32(0x3806F020) = 0; /* 0x3803B434: mov dword ptr [0x3806f020], 0 */ 1516 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B43E: ret */ 1517 RECOMP_REGS_OUT(); 1518 } 1519 1520 void sub_3803B440(void) { 1521 int _fpu_cmp = 0; 1522 uint32_t _cf = 0; 1523 int _df = 1; 1524 uint32_t _flag_k = FK_NONE; 1525 uint32_t _flag_a = 0, _flag_b = 0; 1526 uint32_t _itail_tgt = 0; 1527 RECOMP_REGS_LOCALS 1528 RECOMP_ENTER(0x3803B440u); 1529 1530 L_3803B440: 1531 goto L_3803B450; /* 0x3803B440: jmp 0x3803b450 */ 1532 L_3803B450: 1533 PUSH32(esp, ebp); /* 0x3803B450: push ebp */ 1534 ebp = esp; /* 0x3803B451: mov ebp, esp */ 1535 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 1536 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1537 esp = esp - 0x14u; /* 0x3803B453: sub esp, 0x14 */ 1538 _flag_k = FK_CMP; 1539 fp_push(*(double*)ADDR(0x3804E928)); /* 0x3803B456: fld qword ptr [0x3804e928] */ 1540 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x3803B45C: fsin */ 1541 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x3803B45E: fld dword ptr [0x3804e8e4] */ 1542 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3803B464: fst dword ptr [ebp - 4] */ 1543 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3803B467: fstp dword ptr [ebp - 0x14] */ 1544 eax = MEM32(ebp + (-0x4)); /* 0x3803B46A: mov eax, dword ptr [ebp - 4] */ 1545 ecx = MEM32(ebp + (-0x14)); /* 0x3803B46D: mov ecx, dword ptr [ebp - 0x14] */ 1546 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x3803B470: fstp dword ptr [ebp - 0x10] */ 1547 edx = MEM32(ebp + (-0x10)); /* 0x3803B473: mov edx, dword ptr [ebp - 0x10] */ 1548 fp_push(*(double*)ADDR(0x3804E928)); /* 0x3803B476: fld qword ptr [0x3804e928] */ 1549 MEM32(0x3806F048) = ecx; /* 0x3803B47C: mov dword ptr [0x3806f048], ecx */ 1550 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x3803B482: fcos */ 1551 MEM32(ebp + (-0xC)) = eax; /* 0x3803B484: mov dword ptr [ebp - 0xc], eax */ 1552 MEM32(0x3806F04C) = edx; /* 0x3803B487: mov dword ptr [0x3806f04c], edx */ 1553 MEM32(0x3806F050) = eax; /* 0x3803B48D: mov dword ptr [0x3806f050], eax */ 1554 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x3803B492: fstp dword ptr [ebp - 8] */ 1555 fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x3803B495: fld qword ptr [0x3804ebd8] */ 1556 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x3803B49B: fsin */ 1557 ecx = MEM32(ebp + (-0x8)); /* 0x3803B49D: mov ecx, dword ptr [ebp - 8] */ 1558 MEM32(0x3806F054) = ecx; /* 0x3803B4A0: mov dword ptr [0x3806f054], ecx */ 1559 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x3803B4A6: fld dword ptr [0x3804e8e4] */ 1560 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3803B4AC: fst dword ptr [ebp - 4] */ 1561 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3803B4AF: fstp dword ptr [ebp - 0x14] */ 1562 edx = MEM32(ebp + (-0x4)); /* 0x3803B4B2: mov edx, dword ptr [ebp - 4] */ 1563 eax = MEM32(ebp + (-0x14)); /* 0x3803B4B5: mov eax, dword ptr [ebp - 0x14] */ 1564 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x3803B4B8: fstp dword ptr [ebp - 0x10] */ 1565 ecx = MEM32(ebp + (-0x10)); /* 0x3803B4BB: mov ecx, dword ptr [ebp - 0x10] */ 1566 fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x3803B4BE: fld qword ptr [0x3804ebd8] */ 1567 MEM32(0x3806F058) = eax; /* 0x3803B4C4: mov dword ptr [0x3806f058], eax */ 1568 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x3803B4C9: fcos */ 1569 MEM32(ebp + (-0xC)) = edx; /* 0x3803B4CB: mov dword ptr [ebp - 0xc], edx */ 1570 MEM32(0x3806F05C) = ecx; /* 0x3803B4CE: mov dword ptr [0x3806f05c], ecx */ 1571 MEM32(0x3806F060) = edx; /* 0x3803B4D4: mov dword ptr [0x3806f060], edx */ 1572 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x3803B4DA: fstp dword ptr [ebp - 8] */ 1573 fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x3803B4DD: fld qword ptr [0x3804ebd0] */ 1574 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x3803B4E3: fsin */ 1575 eax = MEM32(ebp + (-0x8)); /* 0x3803B4E5: mov eax, dword ptr [ebp - 8] */ 1576 MEM32(0x3806F064) = eax; /* 0x3803B4E8: mov dword ptr [0x3806f064], eax */ 1577 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x3803B4ED: fld dword ptr [0x3804e8e4] */ 1578 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3803B4F3: fst dword ptr [ebp - 4] */ 1579 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3803B4F6: fstp dword ptr [ebp - 0x14] */ 1580 ecx = MEM32(ebp + (-0x4)); /* 0x3803B4F9: mov ecx, dword ptr [ebp - 4] */ 1581 edx = MEM32(ebp + (-0x14)); /* 0x3803B4FC: mov edx, dword ptr [ebp - 0x14] */ 1582 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x3803B4FF: fstp dword ptr [ebp - 0x10] */ 1583 eax = MEM32(ebp + (-0x10)); /* 0x3803B502: mov eax, dword ptr [ebp - 0x10] */ 1584 fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x3803B505: fld qword ptr [0x3804ebd0] */ 1585 MEM32(ebp + (-0xC)) = ecx; /* 0x3803B50B: mov dword ptr [ebp - 0xc], ecx */ 1586 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x3803B50E: fcos */ 1587 MEM32(0x3806F068) = edx; /* 0x3803B510: mov dword ptr [0x3806f068], edx */ 1588 MEM32(0x3806F070) = ecx; /* 0x3803B516: mov dword ptr [0x3806f070], ecx */ 1589 MEM32(0x3806F06C) = eax; /* 0x3803B51C: mov dword ptr [0x3806f06c], eax */ 1590 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x3803B521: fstp dword ptr [ebp - 8] */ 1591 fp_push(*(double*)ADDR(0x3804EBC8)); /* 0x3803B524: fld qword ptr [0x3804ebc8] */ 1592 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x3803B52A: fsin */ 1593 edx = MEM32(ebp + (-0x8)); /* 0x3803B52C: mov edx, dword ptr [ebp - 8] */ 1594 MEM32(0x3806F074) = edx; /* 0x3803B52F: mov dword ptr [0x3806f074], edx */ 1595 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x3803B535: fld dword ptr [0x3804e8e4] */ 1596 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3803B53B: fst dword ptr [ebp - 4] */ 1597 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3803B53E: fstp dword ptr [ebp - 0x14] */ 1598 ecx = MEM32(ebp + (-0x14)); /* 0x3803B541: mov ecx, dword ptr [ebp - 0x14] */ 1599 eax = MEM32(ebp + (-0x4)); /* 0x3803B544: mov eax, dword ptr [ebp - 4] */ 1600 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x3803B547: fstp dword ptr [ebp - 0x10] */ 1601 edx = MEM32(ebp + (-0x10)); /* 0x3803B54A: mov edx, dword ptr [ebp - 0x10] */ 1602 fp_push(*(double*)ADDR(0x3804EBC8)); /* 0x3803B54D: fld qword ptr [0x3804ebc8] */ 1603 MEM32(0x3806F078) = ecx; /* 0x3803B553: mov dword ptr [0x3806f078], ecx */ 1604 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x3803B559: fcos */ 1605 MEM32(ebp + (-0xC)) = eax; /* 0x3803B55B: mov dword ptr [ebp - 0xc], eax */ 1606 MEM32(0x3806F07C) = edx; /* 0x3803B55E: mov dword ptr [0x3806f07c], edx */ 1607 MEM32(0x3806F080) = eax; /* 0x3803B564: mov dword ptr [0x3806f080], eax */ 1608 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x3803B569: fstp dword ptr [ebp - 8] */ 1609 ecx = MEM32(ebp + (-0x8)); /* 0x3803B56C: mov ecx, dword ptr [ebp - 8] */ 1610 MEM32(0x3806F084) = ecx; /* 0x3803B56F: mov dword ptr [0x3806f084], ecx */ 1611 esp = ebp; /* 0x3803B575: mov esp, ebp */ 1612 ebp = POP32_VAL(esp); /* 0x3803B577: pop ebp */ 1613 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B578: ret */ 1614 RECOMP_REGS_OUT(); 1615 } 1616 1617 void sub_3803B450(void) { 1618 int _fpu_cmp = 0; 1619 uint32_t _cf = 0; 1620 int _df = 1; 1621 uint32_t _flag_k = FK_NONE; 1622 uint32_t _flag_a = 0, _flag_b = 0; 1623 uint32_t _itail_tgt = 0; 1624 RECOMP_REGS_LOCALS 1625 RECOMP_ENTER(0x3803B450u); 1626 1627 L_3803B450: 1628 PUSH32(esp, ebp); /* 0x3803B450: push ebp */ 1629 ebp = esp; /* 0x3803B451: mov ebp, esp */ 1630 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 1631 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1632 esp = esp - 0x14u; /* 0x3803B453: sub esp, 0x14 */ 1633 _flag_k = FK_CMP; 1634 fp_push(*(double*)ADDR(0x3804E928)); /* 0x3803B456: fld qword ptr [0x3804e928] */ 1635 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x3803B45C: fsin */ 1636 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x3803B45E: fld dword ptr [0x3804e8e4] */ 1637 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3803B464: fst dword ptr [ebp - 4] */ 1638 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3803B467: fstp dword ptr [ebp - 0x14] */ 1639 eax = MEM32(ebp + (-0x4)); /* 0x3803B46A: mov eax, dword ptr [ebp - 4] */ 1640 ecx = MEM32(ebp + (-0x14)); /* 0x3803B46D: mov ecx, dword ptr [ebp - 0x14] */ 1641 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x3803B470: fstp dword ptr [ebp - 0x10] */ 1642 edx = MEM32(ebp + (-0x10)); /* 0x3803B473: mov edx, dword ptr [ebp - 0x10] */ 1643 fp_push(*(double*)ADDR(0x3804E928)); /* 0x3803B476: fld qword ptr [0x3804e928] */ 1644 MEM32(0x3806F048) = ecx; /* 0x3803B47C: mov dword ptr [0x3806f048], ecx */ 1645 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x3803B482: fcos */ 1646 MEM32(ebp + (-0xC)) = eax; /* 0x3803B484: mov dword ptr [ebp - 0xc], eax */ 1647 MEM32(0x3806F04C) = edx; /* 0x3803B487: mov dword ptr [0x3806f04c], edx */ 1648 MEM32(0x3806F050) = eax; /* 0x3803B48D: mov dword ptr [0x3806f050], eax */ 1649 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x3803B492: fstp dword ptr [ebp - 8] */ 1650 fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x3803B495: fld qword ptr [0x3804ebd8] */ 1651 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x3803B49B: fsin */ 1652 ecx = MEM32(ebp + (-0x8)); /* 0x3803B49D: mov ecx, dword ptr [ebp - 8] */ 1653 MEM32(0x3806F054) = ecx; /* 0x3803B4A0: mov dword ptr [0x3806f054], ecx */ 1654 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x3803B4A6: fld dword ptr [0x3804e8e4] */ 1655 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3803B4AC: fst dword ptr [ebp - 4] */ 1656 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3803B4AF: fstp dword ptr [ebp - 0x14] */ 1657 edx = MEM32(ebp + (-0x4)); /* 0x3803B4B2: mov edx, dword ptr [ebp - 4] */ 1658 eax = MEM32(ebp + (-0x14)); /* 0x3803B4B5: mov eax, dword ptr [ebp - 0x14] */ 1659 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x3803B4B8: fstp dword ptr [ebp - 0x10] */ 1660 ecx = MEM32(ebp + (-0x10)); /* 0x3803B4BB: mov ecx, dword ptr [ebp - 0x10] */ 1661 fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x3803B4BE: fld qword ptr [0x3804ebd8] */ 1662 MEM32(0x3806F058) = eax; /* 0x3803B4C4: mov dword ptr [0x3806f058], eax */ 1663 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x3803B4C9: fcos */ 1664 MEM32(ebp + (-0xC)) = edx; /* 0x3803B4CB: mov dword ptr [ebp - 0xc], edx */ 1665 MEM32(0x3806F05C) = ecx; /* 0x3803B4CE: mov dword ptr [0x3806f05c], ecx */ 1666 MEM32(0x3806F060) = edx; /* 0x3803B4D4: mov dword ptr [0x3806f060], edx */ 1667 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x3803B4DA: fstp dword ptr [ebp - 8] */ 1668 fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x3803B4DD: fld qword ptr [0x3804ebd0] */ 1669 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x3803B4E3: fsin */ 1670 eax = MEM32(ebp + (-0x8)); /* 0x3803B4E5: mov eax, dword ptr [ebp - 8] */ 1671 MEM32(0x3806F064) = eax; /* 0x3803B4E8: mov dword ptr [0x3806f064], eax */ 1672 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x3803B4ED: fld dword ptr [0x3804e8e4] */ 1673 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3803B4F3: fst dword ptr [ebp - 4] */ 1674 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3803B4F6: fstp dword ptr [ebp - 0x14] */ 1675 ecx = MEM32(ebp + (-0x4)); /* 0x3803B4F9: mov ecx, dword ptr [ebp - 4] */ 1676 edx = MEM32(ebp + (-0x14)); /* 0x3803B4FC: mov edx, dword ptr [ebp - 0x14] */ 1677 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x3803B4FF: fstp dword ptr [ebp - 0x10] */ 1678 eax = MEM32(ebp + (-0x10)); /* 0x3803B502: mov eax, dword ptr [ebp - 0x10] */ 1679 fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x3803B505: fld qword ptr [0x3804ebd0] */ 1680 MEM32(ebp + (-0xC)) = ecx; /* 0x3803B50B: mov dword ptr [ebp - 0xc], ecx */ 1681 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x3803B50E: fcos */ 1682 MEM32(0x3806F068) = edx; /* 0x3803B510: mov dword ptr [0x3806f068], edx */ 1683 MEM32(0x3806F070) = ecx; /* 0x3803B516: mov dword ptr [0x3806f070], ecx */ 1684 MEM32(0x3806F06C) = eax; /* 0x3803B51C: mov dword ptr [0x3806f06c], eax */ 1685 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x3803B521: fstp dword ptr [ebp - 8] */ 1686 fp_push(*(double*)ADDR(0x3804EBC8)); /* 0x3803B524: fld qword ptr [0x3804ebc8] */ 1687 _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x3803B52A: fsin */ 1688 edx = MEM32(ebp + (-0x8)); /* 0x3803B52C: mov edx, dword ptr [ebp - 8] */ 1689 MEM32(0x3806F074) = edx; /* 0x3803B52F: mov dword ptr [0x3806f074], edx */ 1690 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x3803B535: fld dword ptr [0x3804e8e4] */ 1691 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3803B53B: fst dword ptr [ebp - 4] */ 1692 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3803B53E: fstp dword ptr [ebp - 0x14] */ 1693 ecx = MEM32(ebp + (-0x14)); /* 0x3803B541: mov ecx, dword ptr [ebp - 0x14] */ 1694 eax = MEM32(ebp + (-0x4)); /* 0x3803B544: mov eax, dword ptr [ebp - 4] */ 1695 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x3803B547: fstp dword ptr [ebp - 0x10] */ 1696 edx = MEM32(ebp + (-0x10)); /* 0x3803B54A: mov edx, dword ptr [ebp - 0x10] */ 1697 fp_push(*(double*)ADDR(0x3804EBC8)); /* 0x3803B54D: fld qword ptr [0x3804ebc8] */ 1698 MEM32(0x3806F078) = ecx; /* 0x3803B553: mov dword ptr [0x3806f078], ecx */ 1699 _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x3803B559: fcos */ 1700 MEM32(ebp + (-0xC)) = eax; /* 0x3803B55B: mov dword ptr [ebp - 0xc], eax */ 1701 MEM32(0x3806F07C) = edx; /* 0x3803B55E: mov dword ptr [0x3806f07c], edx */ 1702 MEM32(0x3806F080) = eax; /* 0x3803B564: mov dword ptr [0x3806f080], eax */ 1703 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x3803B569: fstp dword ptr [ebp - 8] */ 1704 ecx = MEM32(ebp + (-0x8)); /* 0x3803B56C: mov ecx, dword ptr [ebp - 8] */ 1705 MEM32(0x3806F084) = ecx; /* 0x3803B56F: mov dword ptr [0x3806f084], ecx */ 1706 esp = ebp; /* 0x3803B575: mov esp, ebp */ 1707 ebp = POP32_VAL(esp); /* 0x3803B577: pop ebp */ 1708 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B578: ret */ 1709 RECOMP_REGS_OUT(); 1710 } 1711 1712 void sub_3803B580(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(0x3803B580u); 1721 1722 L_3803B580: 1723 PUSH32(esp, ebp); /* 0x3803B580: push ebp */ 1724 ebp = esp; /* 0x3803B581: mov ebp, esp */ 1725 PUSH32(esp, 0xFFFFFFFFu); /* 0x3803B583: push -1 */ 1726 PUSH32(esp, 0x3804CE69u); /* 0x3803B585: push 0x3804ce69 */ 1727 eax = MEM32(FS_BASE + (0)); /* 0x3803B58A: mov eax, dword ptr fs:[0] */ 1728 PUSH32(esp, eax); /* 0x3803B590: push eax */ 1729 MEM32(FS_BASE + (0)) = esp; /* 0x3803B591: mov dword ptr fs:[0], esp */ 1730 PUSH32(esp, ecx); /* 0x3803B598: push ecx */ 1731 PUSH32(esp, esi); /* 0x3803B599: push esi */ 1732 esi = ecx; /* 0x3803B59A: mov esi, ecx */ 1733 PUSH32(esp, edi); /* 0x3803B59C: push edi */ 1734 MEM32(ebp + (-0x10)) = esi; /* 0x3803B59D: mov dword ptr [ebp - 0x10], esi */ 1735 MEM32(esi) = 0x3804EEF8u; /* 0x3803B5A0: mov dword ptr [esi], 0x3804eef8 */ 1736 ecx = MEM32(esi + 0xC); /* 0x3803B5A6: mov ecx, dword ptr [esi + 0xc] */ 1737 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1738 edi = 0; /* 0x3803B5A9: xor edi, edi */ 1739 _cf = 0; 1740 _flag_k = FK_TEST; 1741 /* cmp ecx, edi */ /* 0x3803B5AB: cmp ecx, edi */ 1742 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 1743 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1744 _flag_k = FK_CMP; 1745 MEM32(ebp + (-0x4)) = edi; /* 0x3803B5AD: mov dword ptr [ebp - 4], edi */ 1746 MEM32(esi + 0x4) = edi; /* 0x3803B5B0: mov dword ptr [esi + 4], edi */ 1747 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B5D6; /* 0x3803B5B3: je 0x3803b5d6 */ 1748 L_3803B5B5: 1749 eax = MEM32(ecx); /* 0x3803B5B5: mov eax, dword ptr [ecx] */ 1750 PUSH32(esp, 1); /* 0x3803B5B7: push 1 */ 1751 RECOMP_ICALL(MEM32(eax)); /* 0x3803B5B9: call dword ptr [eax] */ 1752 RECOMP_FLAGS_IN(); 1753 MEM32(esi + 0xC) = edi; /* 0x3803B5BB: mov dword ptr [esi + 0xc], edi */ 1754 ecx = MEM32(0x3804E7AC); /* 0x3803B5BE: mov ecx, dword ptr [0x3804e7ac] */ 1755 edi = POP32_VAL(esp); /* 0x3803B5C4: pop edi */ 1756 MEM32(esi) = ecx; /* 0x3803B5C5: mov dword ptr [esi], ecx */ 1757 esi = POP32_VAL(esp); /* 0x3803B5C7: pop esi */ 1758 ecx = MEM32(ebp + (-0xC)); /* 0x3803B5C8: mov ecx, dword ptr [ebp - 0xc] */ 1759 MEM32(FS_BASE + (0)) = ecx; /* 0x3803B5CB: mov dword ptr fs:[0], ecx */ 1760 esp = ebp; /* 0x3803B5D2: mov esp, ebp */ 1761 ebp = POP32_VAL(esp); /* 0x3803B5D4: pop ebp */ 1762 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B5D5: ret */ 1763 L_3803B5D6: 1764 ecx = MEM32(ebp + (-0xC)); /* 0x3803B5D6: mov ecx, dword ptr [ebp - 0xc] */ 1765 MEM32(esi + 0xC) = edi; /* 0x3803B5D9: mov dword ptr [esi + 0xc], edi */ 1766 edx = MEM32(0x3804E7AC); /* 0x3803B5DC: mov edx, dword ptr [0x3804e7ac] */ 1767 MEM32(esi) = edx; /* 0x3803B5E2: mov dword ptr [esi], edx */ 1768 edi = POP32_VAL(esp); /* 0x3803B5E4: pop edi */ 1769 esi = POP32_VAL(esp); /* 0x3803B5E5: pop esi */ 1770 MEM32(FS_BASE + (0)) = ecx; /* 0x3803B5E6: mov dword ptr fs:[0], ecx */ 1771 esp = ebp; /* 0x3803B5ED: mov esp, ebp */ 1772 ebp = POP32_VAL(esp); /* 0x3803B5EF: pop ebp */ 1773 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B5F0: ret */ 1774 RECOMP_REGS_OUT(); 1775 } 1776 1777 void sub_3803B600(void) { 1778 int _fpu_cmp = 0; 1779 uint32_t _cf = 0; 1780 int _df = 1; 1781 uint32_t _flag_k = FK_NONE; 1782 uint32_t _flag_a = 0, _flag_b = 0; 1783 uint32_t _itail_tgt = 0; 1784 RECOMP_REGS_LOCALS 1785 RECOMP_ENTER(0x3803B600u); 1786 1787 L_3803B600: 1788 PUSH32(esp, ebp); /* 0x3803B600: push ebp */ 1789 ebp = esp; /* 0x3803B601: mov ebp, esp */ 1790 eax = MEM32(FS_BASE + (0)); /* 0x3803B603: mov eax, dword ptr fs:[0] */ 1791 PUSH32(esp, 0xFFFFFFFFu); /* 0x3803B609: push -1 */ 1792 PUSH32(esp, 0x3804CE8Bu); /* 0x3803B60B: push 0x3804ce8b */ 1793 PUSH32(esp, eax); /* 0x3803B610: push eax */ 1794 MEM32(FS_BASE + (0)) = esp; /* 0x3803B611: mov dword ptr fs:[0], esp */ 1795 PUSH32(esp, ebx); /* 0x3803B618: push ebx */ 1796 ebx = MEM32(ebp + 0x8); /* 0x3803B619: mov ebx, dword ptr [ebp + 8] */ 1797 PUSH32(esp, esi); /* 0x3803B61C: push esi */ 1798 esi = ecx; /* 0x3803B61D: mov esi, ecx */ 1799 PUSH32(esp, edi); /* 0x3803B61F: push edi */ 1800 edi = MEM32(ebp + 0xC); /* 0x3803B620: mov edi, dword ptr [ebp + 0xc] */ 1801 MEM32(esi + 0x4) = ebx; /* 0x3803B623: mov dword ptr [esi + 4], ebx */ 1802 MEM32(esi + 0x8) = edi; /* 0x3803B626: mov dword ptr [esi + 8], edi */ 1803 eax = MEM32(edi); /* 0x3803B629: mov eax, dword ptr [edi] */ 1804 ecx = edi; /* 0x3803B62B: mov ecx, edi */ 1805 RECOMP_ICALL(MEM32(eax + 0x44)); /* 0x3803B62D: call dword ptr [eax + 0x44] */ 1806 RECOMP_FLAGS_IN(); 1807 MEM32(ebp + 0x8) = eax; /* 0x3803B630: mov dword ptr [ebp + 8], eax */ 1808 fp_push((double)(int32_t)MEM32(ebp + 0x8)); /* 0x3803B633: fild dword ptr [ebp + 8] */ 1809 ecx = edi; /* 0x3803B636: mov ecx, edi */ 1810 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x10) = _v; } /* 0x3803B638: fstp dword ptr [esi + 0x10] */ 1811 edx = MEM32(edi); /* 0x3803B63B: mov edx, dword ptr [edi] */ 1812 RECOMP_ICALL(MEM32(edx + 0x48)); /* 0x3803B63D: call dword ptr [edx + 0x48] */ 1813 RECOMP_FLAGS_IN(); 1814 MEM32(ebp + 0x8) = eax; /* 0x3803B640: mov dword ptr [ebp + 8], eax */ 1815 fp_push((double)(int32_t)MEM32(ebp + 0x8)); /* 0x3803B643: fild dword ptr [ebp + 8] */ 1816 PUSH32(esp, 0x38u); /* 0x3803B646: push 0x38 */ 1817 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x14) = _v; } /* 0x3803B648: fstp dword ptr [esi + 0x14] */ 1818 RECOMP_ICALL(0x3804B676u); /* 0x3803B64B: call 0x3804b676 */ /* not lifted */ 1819 RECOMP_FLAGS_IN(); 1820 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1821 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1822 esp = esp + 4; /* 0x3803B650: add esp, 4 */ 1823 _flag_k = FK_ADD; 1824 MEM32(ebp + 0x8) = eax; /* 0x3803B653: mov dword ptr [ebp + 8], eax */ 1825 /* test eax, eax */ /* 0x3803B656: test eax, eax */ 1826 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1827 _cf = 0; 1828 _flag_k = FK_TEST; 1829 MEM32(ebp + (-0x4)) = 0; /* 0x3803B658: mov dword ptr [ebp - 4], 0 */ 1830 if (TEST_Z(_flag_a, _flag_b)) goto L_3803B66C; /* 0x3803B65F: je 0x3803b66c */ 1831 L_3803B661: 1832 PUSH32(esp, edi); /* 0x3803B661: push edi */ 1833 PUSH32(esp, ebx); /* 0x3803B662: push ebx */ 1834 ecx = eax; /* 0x3803B663: mov ecx, eax */ 1835 RECOMP_ICALL(0x38016000u); /* 0x3803B665: call 0x38016000 */ /* not lifted */ 1836 RECOMP_FLAGS_IN(); 1837 goto L_3803B66E; /* 0x3803B66A: jmp 0x3803b66e */ 1838 L_3803B66C: 1839 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 1840 eax = 0; /* 0x3803B66C: xor eax, eax */ 1841 _cf = 0; 1842 _flag_k = FK_TEST; 1843 L_3803B66E: 1844 ecx = MEM32(ebp + (-0xC)); /* 0x3803B66E: mov ecx, dword ptr [ebp - 0xc] */ 1845 edi = POP32_VAL(esp); /* 0x3803B671: pop edi */ 1846 MEM32(esi + 0xC) = eax; /* 0x3803B672: mov dword ptr [esi + 0xc], eax */ 1847 esi = POP32_VAL(esp); /* 0x3803B675: pop esi */ 1848 MEM32(FS_BASE + (0)) = ecx; /* 0x3803B676: mov dword ptr fs:[0], ecx */ 1849 ebx = POP32_VAL(esp); /* 0x3803B67D: pop ebx */ 1850 esp = ebp; /* 0x3803B67E: mov esp, ebp */ 1851 ebp = POP32_VAL(esp); /* 0x3803B680: pop ebp */ 1852 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3803B681: ret 8 */ 1853 RECOMP_REGS_OUT(); 1854 } 1855 1856 void sub_3803B690(void) { 1857 int _fpu_cmp = 0; 1858 uint32_t _cf = 0; 1859 int _df = 1; 1860 uint32_t _flag_k = FK_NONE; 1861 uint32_t _flag_a = 0, _flag_b = 0; 1862 uint32_t _itail_tgt = 0; 1863 RECOMP_REGS_LOCALS 1864 RECOMP_ENTER(0x3803B690u); 1865 1866 L_3803B690: 1867 PUSH32(esp, ebp); /* 0x3803B690: push ebp */ 1868 ebp = esp; /* 0x3803B691: mov ebp, esp */ 1869 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 1870 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1871 esp = esp - 0xCu; /* 0x3803B693: sub esp, 0xc */ 1872 _flag_k = FK_CMP; 1873 PUSH32(esp, ebx); /* 0x3803B696: push ebx */ 1874 ebx = ecx; /* 0x3803B697: mov ebx, ecx */ 1875 eax = MEM32(ebx + 0x4); /* 0x3803B699: mov eax, dword ptr [ebx + 4] */ 1876 /* test eax, eax */ /* 0x3803B69C: test eax, eax */ 1877 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1878 _cf = 0; 1879 _flag_k = FK_TEST; 1880 PUSH32(esp, esi); /* 0x3803B69E: push esi */ 1881 PUSH32(esp, edi); /* 0x3803B69F: push edi */ 1882 if (TEST_Z(_flag_a, _flag_b)) goto L_3803B8DD; /* 0x3803B6A0: je 0x3803b8dd */ 1883 L_3803B6A6: 1884 edi = MEM32(ebp + 0x8); /* 0x3803B6A6: mov edi, dword ptr [ebp + 8] */ 1885 PUSH32(esp, edi); /* 0x3803B6A9: push edi */ 1886 RECOMP_ICALL(0x3803CB20u); /* 0x3803B6AA: call 0x3803cb20 */ /* not lifted */ 1887 RECOMP_FLAGS_IN(); 1888 esi = eax; /* 0x3803B6AF: mov esi, eax */ 1889 /* cmp esi, 0xFFFFFFFFu */ /* 0x3803B6B1: cmp esi, -1 */ 1890 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0xFFFFFFFFu); 1891 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 1892 _flag_k = FK_CMP; 1893 MEM32(ebp + (-0x8)) = esi; /* 0x3803B6B4: mov dword ptr [ebp - 8], esi */ 1894 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803B8DD; /* 0x3803B6B7: je 0x3803b8dd */ 1895 L_3803B6BD: 1896 eax = MEM32(ebp + 0x10); /* 0x3803B6BD: mov eax, dword ptr [ebp + 0x10] */ 1897 ecx = MEM32(ebx + 0x4); /* 0x3803B6C0: mov ecx, dword ptr [ebx + 4] */ 1898 PUSH32(esp, eax); /* 0x3803B6C3: push eax */ 1899 PUSH32(esp, edi); /* 0x3803B6C4: push edi */ 1900 RECOMP_ICALL(0x380385E0u); /* 0x3803B6C5: call 0x380385e0 */ /* not lifted */ 1901 RECOMP_FLAGS_IN(); 1902 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x3803B6CA: fstp dword ptr [ebp + 8] */ 1903 fp_push(*(float*)&MEM32(edi + 0x4)); /* 0x3803B6CD: fld dword ptr [edi + 4] */ 1904 _st[0] -= (double)*(float*)ADDR(ebp + 0x8); /* 0x3803B6D0: fsub dword ptr [ebp + 8] */ 1905 { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3803B6D3: fst dword ptr [ebp - 4] */ 1906 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803B6D6: fcomp dword ptr [0x3804e8e4] */ 1907 fp_pop(); 1908 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803B6DC: fnstsw ax */ 1909 /* test HI8(eax), 1 */ /* 0x3803B6DE: test ah, 1 */ 1910 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 1911 _cf = 0; 1912 _flag_k = FK_NARROW(FK_TEST, 24); 1913 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803B7F2; /* 0x3803B6E1: jne 0x3803b7f2 */ 1914 L_3803B6E7: 1915 SET_LO8(ecx, MEM8(0x3806F044)); /* 0x3803B6E7: mov cl, byte ptr [0x3806f044] */ 1916 SET_LO8(eax, 1); /* 0x3803B6ED: mov al, 1 */ 1917 /* test LO8(eax), LO8(ecx) */ /* 0x3803B6EF: test al, cl */ 1918 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24; 1919 _cf = 0; 1920 _flag_k = FK_NARROW(FK_TEST, 24); 1921 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803B728; /* 0x3803B6F1: jne 0x3803b728 */ 1922 L_3803B6F3: 1923 SET_LO8(edx, LO8(ecx)); /* 0x3803B6F3: mov dl, cl */ 1924 _flag_a = (uint32_t)((LO8(edx) | LO8(eax))) << 24; _flag_b = (uint32_t)((LO8(edx) | LO8(eax))) << 24; 1925 SET_LO8(edx, LO8(edx) | LO8(eax)); /* 0x3803B6F5: or dl, al */ 1926 _cf = 0; 1927 _flag_k = FK_NARROW(FK_TEST, 24); 1928 PUSH32(esp, 0x3803B910u); /* 0x3803B6F7: push 0x3803b910 */ 1929 MEM8(0x3806F044) = (uint8_t)(LO8(edx)); /* 0x3803B6FC: mov byte ptr [0x3806f044], dl */ 1930 MEM32(0x3806F038) = 0; /* 0x3803B702: mov dword ptr [0x3806f038], 0 */ 1931 MEM32(0x3806F03C) = 0; /* 0x3803B70C: mov dword ptr [0x3806f03c], 0 */ 1932 MEM32(0x3806F040) = 0; /* 0x3803B716: mov dword ptr [0x3806f040], 0 */ 1933 RECOMP_ICALL(0x3804B54Cu); /* 0x3803B720: call 0x3804b54c */ /* not lifted */ 1934 RECOMP_FLAGS_IN(); 1935 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1936 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1937 esp = esp + 4; /* 0x3803B725: add esp, 4 */ 1938 _flag_k = FK_ADD; 1939 L_3803B728: 1940 SET_LO8(ecx, MEM8(0x3806F044)); /* 0x3803B728: mov cl, byte ptr [0x3806f044] */ 1941 SET_LO8(eax, 2); /* 0x3803B72E: mov al, 2 */ 1942 /* test LO8(eax), LO8(ecx) */ /* 0x3803B730: test al, cl */ 1943 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24; 1944 _cf = 0; 1945 _flag_k = FK_NARROW(FK_TEST, 24); 1946 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803B769; /* 0x3803B732: jne 0x3803b769 */ 1947 L_3803B734: 1948 SET_LO8(edx, LO8(ecx)); /* 0x3803B734: mov dl, cl */ 1949 _flag_a = (uint32_t)((LO8(edx) | LO8(eax))) << 24; _flag_b = (uint32_t)((LO8(edx) | LO8(eax))) << 24; 1950 SET_LO8(edx, LO8(edx) | LO8(eax)); /* 0x3803B736: or dl, al */ 1951 _cf = 0; 1952 _flag_k = FK_NARROW(FK_TEST, 24); 1953 PUSH32(esp, 0x3803B900u); /* 0x3803B738: push 0x3803b900 */ 1954 MEM8(0x3806F044) = (uint8_t)(LO8(edx)); /* 0x3803B73D: mov byte ptr [0x3806f044], dl */ 1955 MEM32(0x3806F088) = 0; /* 0x3803B743: mov dword ptr [0x3806f088], 0 */ 1956 MEM32(0x3806F08C) = 0; /* 0x3803B74D: mov dword ptr [0x3806f08c], 0 */ 1957 MEM32(0x3806F090) = 0; /* 0x3803B757: mov dword ptr [0x3806f090], 0 */ 1958 RECOMP_ICALL(0x3804B54Cu); /* 0x3803B761: call 0x3804b54c */ /* not lifted */ 1959 RECOMP_FLAGS_IN(); 1960 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 1961 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 1962 esp = esp + 4; /* 0x3803B766: add esp, 4 */ 1963 _flag_k = FK_ADD; 1964 L_3803B769: 1965 PUSH32(esp, esi); /* 0x3803B769: push esi */ 1966 ecx = ebx; /* 0x3803B76A: mov ecx, ebx */ 1967 RECOMP_ICALL(0x3803CCC0u); /* 0x3803B76C: call 0x3803ccc0 */ /* not lifted */ 1968 RECOMP_FLAGS_IN(); 1969 /* test eax, eax */ /* 0x3803B771: test eax, eax */ 1970 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 1971 _cf = 0; 1972 _flag_k = FK_TEST; 1973 if (TEST_Z(_flag_a, _flag_b)) goto L_3803B79C; /* 0x3803B773: je 0x3803b79c */ 1974 L_3803B775: 1975 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x3803B775: fld dword ptr [ebp - 4] */ 1976 PUSH32(esp, 0); /* 0x3803B778: push 0 */ 1977 _st[0] += (double)*(float*)ADDR(0x3804EBC0); /* 0x3803B77A: fadd dword ptr [0x3804ebc0] */ 1978 PUSH32(esp, 0); /* 0x3803B780: push 0 */ 1979 PUSH32(esp, 0x3806F088u); /* 0x3803B782: push 0x3806f088 */ 1980 PUSH32(esp, 0x3806F038u); /* 0x3803B787: push 0x3806f038 */ 1981 { float _v = (float)fp_pop(); *(float*)ADDR(0x3806F08C) = _v; } /* 0x3803B78C: fstp dword ptr [0x3806f08c] */ 1982 edx = MEM32(eax); /* 0x3803B792: mov edx, dword ptr [eax] */ 1983 PUSH32(esp, edi); /* 0x3803B794: push edi */ 1984 ecx = eax; /* 0x3803B795: mov ecx, eax */ 1985 RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x3803B797: call dword ptr [edx + 4] */ 1986 RECOMP_FLAGS_IN(); 1987 goto L_3803B7A6; /* 0x3803B79A: jmp 0x3803b7a6 */ 1988 L_3803B79C: 1989 MEM32(0x3806F03C) = 0xC61C3C00u; /* 0x3803B79C: mov dword ptr [0x3806f03c], 0xc61c3c00 */ 1990 L_3803B7A6: 1991 fp_push(*(float*)&MEM32(0x3806F03C)); /* 0x3803B7A6: fld dword ptr [0x3806f03c] */ 1992 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0x8)); /* 0x3803B7AC: fcomp dword ptr [ebp + 8] */ 1993 fp_pop(); 1994 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803B7AF: fnstsw ax */ 1995 /* test HI8(eax), 0x41u */ /* 0x3803B7B1: test ah, 0x41 */ 1996 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 1997 _cf = 0; 1998 _flag_k = FK_NARROW(FK_TEST, 24); 1999 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803B7F2; /* 0x3803B7B4: jne 0x3803b7f2 */ 2000 L_3803B7B6: 2001 ecx = MEM32(0x3806F038); /* 0x3803B7B6: mov ecx, dword ptr [0x3806f038] */ 2002 esi = MEM32(ebp + 0xC); /* 0x3803B7BC: mov esi, dword ptr [ebp + 0xc] */ 2003 eax = esi; /* 0x3803B7BF: mov eax, esi */ 2004 MEM32(eax) = ecx; /* 0x3803B7C1: mov dword ptr [eax], ecx */ 2005 edx = MEM32(0x3806F03C); /* 0x3803B7C3: mov edx, dword ptr [0x3806f03c] */ 2006 MEM32(eax + 0x4) = edx; /* 0x3803B7C9: mov dword ptr [eax + 4], edx */ 2007 ecx = MEM32(0x3806F040); /* 0x3803B7CC: mov ecx, dword ptr [0x3806f040] */ 2008 edx = MEM32(ebp + 0x10); /* 0x3803B7D2: mov edx, dword ptr [ebp + 0x10] */ 2009 MEM32(eax + 0x8) = ecx; /* 0x3803B7D5: mov dword ptr [eax + 8], ecx */ 2010 eax = MEM32(0x3806F088); /* 0x3803B7D8: mov eax, dword ptr [0x3806f088] */ 2011 MEM32(edx) = eax; /* 0x3803B7DD: mov dword ptr [edx], eax */ 2012 ecx = MEM32(0x3806F08C); /* 0x3803B7DF: mov ecx, dword ptr [0x3806f08c] */ 2013 MEM32(edx + 0x4) = ecx; /* 0x3803B7E5: mov dword ptr [edx + 4], ecx */ 2014 eax = MEM32(0x3806F090); /* 0x3803B7E8: mov eax, dword ptr [0x3806f090] */ 2015 MEM32(edx + 0x8) = eax; /* 0x3803B7ED: mov dword ptr [edx + 8], eax */ 2016 goto L_3803B80F; /* 0x3803B7F0: jmp 0x3803b80f */ 2017 L_3803B7F2: 2018 esi = MEM32(ebp + 0xC); /* 0x3803B7F2: mov esi, dword ptr [ebp + 0xc] */ 2019 ecx = edi; /* 0x3803B7F5: mov ecx, edi */ 2020 eax = MEM32(ecx); /* 0x3803B7F7: mov eax, dword ptr [ecx] */ 2021 edx = esi; /* 0x3803B7F9: mov edx, esi */ 2022 MEM32(edx) = eax; /* 0x3803B7FB: mov dword ptr [edx], eax */ 2023 eax = MEM32(ecx + 0x4); /* 0x3803B7FD: mov eax, dword ptr [ecx + 4] */ 2024 MEM32(edx + 0x4) = eax; /* 0x3803B800: mov dword ptr [edx + 4], eax */ 2025 ecx = MEM32(ecx + 0x8); /* 0x3803B803: mov ecx, dword ptr [ecx + 8] */ 2026 MEM32(edx + 0x8) = ecx; /* 0x3803B806: mov dword ptr [edx + 8], ecx */ 2027 edx = MEM32(ebp + 0x8); /* 0x3803B809: mov edx, dword ptr [ebp + 8] */ 2028 MEM32(esi + 0x4) = edx; /* 0x3803B80C: mov dword ptr [esi + 4], edx */ 2029 L_3803B80F: 2030 SET_LO8(ecx, MEM8(0x3806F044)); /* 0x3803B80F: mov cl, byte ptr [0x3806f044] */ 2031 SET_LO8(eax, 4); /* 0x3803B815: mov al, 4 */ 2032 /* test LO8(eax), LO8(ecx) */ /* 0x3803B817: test al, cl */ 2033 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24; 2034 _cf = 0; 2035 _flag_k = FK_NARROW(FK_TEST, 24); 2036 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803B850; /* 0x3803B819: jne 0x3803b850 */ 2037 L_3803B81B: 2038 SET_LO8(edx, LO8(ecx)); /* 0x3803B81B: mov dl, cl */ 2039 _flag_a = (uint32_t)((LO8(edx) | LO8(eax))) << 24; _flag_b = (uint32_t)((LO8(edx) | LO8(eax))) << 24; 2040 SET_LO8(edx, LO8(edx) | LO8(eax)); /* 0x3803B81D: or dl, al */ 2041 _cf = 0; 2042 _flag_k = FK_NARROW(FK_TEST, 24); 2043 PUSH32(esp, 0x3803B8F0u); /* 0x3803B81F: push 0x3803b8f0 */ 2044 MEM8(0x3806F044) = (uint8_t)(LO8(edx)); /* 0x3803B824: mov byte ptr [0x3806f044], dl */ 2045 MEM32(0x3806EFF8) = 0; /* 0x3803B82A: mov dword ptr [0x3806eff8], 0 */ 2046 MEM32(0x3806EFFC) = 0; /* 0x3803B834: mov dword ptr [0x3806effc], 0 */ 2047 MEM32(0x3806F000) = 0; /* 0x3803B83E: mov dword ptr [0x3806f000], 0 */ 2048 RECOMP_ICALL(0x3804B54Cu); /* 0x3803B848: call 0x3804b54c */ /* not lifted */ 2049 RECOMP_FLAGS_IN(); 2050 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 2051 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2052 esp = esp + 4; /* 0x3803B84D: add esp, 4 */ 2053 _flag_k = FK_ADD; 2054 L_3803B850: 2055 eax = MEM32(ebp + (-0x8)); /* 0x3803B850: mov eax, dword ptr [ebp - 8] */ 2056 ecx = MEM32(edi + 0x4); /* 0x3803B853: mov ecx, dword ptr [edi + 4] */ 2057 PUSH32(esp, eax); /* 0x3803B856: push eax */ 2058 PUSH32(esp, ecx); /* 0x3803B857: push ecx */ 2059 ecx = MEM32(ebx + 0x8); /* 0x3803B858: mov ecx, dword ptr [ebx + 8] */ 2060 edx = ebp + (-0xC); /* 0x3803B85B: lea edx, [ebp - 0xc] */ 2061 PUSH32(esp, edx); /* 0x3803B85E: push edx */ 2062 PUSH32(esp, 0x3806EFF8u); /* 0x3803B85F: push 0x3806eff8 */ 2063 PUSH32(esp, esi); /* 0x3803B864: push esi */ 2064 RECOMP_ICALL(0x3802D2B0u); /* 0x3803B865: call 0x3802d2b0 */ /* not lifted */ 2065 RECOMP_FLAGS_IN(); 2066 fp_push(_st[0]); /* 0x3803B86A: fld st(0) */ 2067 _st[0] -= (double)*(float*)ADDR(0x3804F6A8); /* 0x3803B86C: fsub dword ptr [0x3804f6a8] */ 2068 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(esi + 0x4)); /* 0x3803B872: fcom dword ptr [esi + 4] */ 2069 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803B875: fnstsw ax */ 2070 /* test HI8(eax), 0x41u */ /* 0x3803B877: test ah, 0x41 */ 2071 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 2072 _cf = 0; 2073 _flag_k = FK_NARROW(FK_TEST, 24); 2074 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803B89E; /* 0x3803B87A: jne 0x3803b89e */ 2075 L_3803B87C: 2076 ecx = MEM32(0x3806EFF8); /* 0x3803B87C: mov ecx, dword ptr [0x3806eff8] */ 2077 eax = MEM32(ebp + 0x10); /* 0x3803B882: mov eax, dword ptr [ebp + 0x10] */ 2078 MEM32(eax) = ecx; /* 0x3803B885: mov dword ptr [eax], ecx */ 2079 edx = MEM32(0x3806EFFC); /* 0x3803B887: mov edx, dword ptr [0x3806effc] */ 2080 MEM32(eax + 0x4) = edx; /* 0x3803B88D: mov dword ptr [eax + 4], edx */ 2081 ecx = MEM32(0x3806F000); /* 0x3803B890: mov ecx, dword ptr [0x3806f000] */ 2082 MEM32(eax + 0x8) = ecx; /* 0x3803B896: mov dword ptr [eax + 8], ecx */ 2083 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x4) = _v; } /* 0x3803B899: fstp dword ptr [esi + 4] */ 2084 goto L_3803B8A0; /* 0x3803B89C: jmp 0x3803b8a0 */ 2085 L_3803B89E: 2086 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803B89E: fstp st(0) */ 2087 L_3803B8A0: 2088 eax = MEM32(ebp + 0x14); /* 0x3803B8A0: mov eax, dword ptr [ebp + 0x14] */ 2089 /* test eax, eax */ /* 0x3803B8A3: test eax, eax */ 2090 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 2091 _cf = 0; 2092 _flag_k = FK_TEST; 2093 if (TEST_Z(_flag_a, _flag_b)) goto L_3803B8DB; /* 0x3803B8A5: je 0x3803b8db */ 2094 L_3803B8A7: 2095 edx = MEM32(0x3804E79C); /* 0x3803B8A7: mov edx, dword ptr [0x3804e79c] */ 2096 { float _v = (float)fp_pop(); *(float*)ADDR(edx) = _v; } /* 0x3803B8AD: fstp dword ptr [edx] */ 2097 edx = MEM32(0x3806EFF8); /* 0x3803B8AF: mov edx, dword ptr [0x3806eff8] */ 2098 ecx = eax + 0xC; /* 0x3803B8B5: lea ecx, [eax + 0xc] */ 2099 MEM32(ecx) = edx; /* 0x3803B8B8: mov dword ptr [ecx], edx */ 2100 edx = MEM32(0x3806EFFC); /* 0x3803B8BA: mov edx, dword ptr [0x3806effc] */ 2101 MEM32(ecx + 0x4) = edx; /* 0x3803B8C0: mov dword ptr [ecx + 4], edx */ 2102 edx = MEM32(0x3806F000); /* 0x3803B8C3: mov edx, dword ptr [0x3806f000] */ 2103 edi = POP32_VAL(esp); /* 0x3803B8C9: pop edi */ 2104 MEM32(ecx + 0x8) = edx; /* 0x3803B8CA: mov dword ptr [ecx + 8], edx */ 2105 ecx = MEM32(ebp + (-0xC)); /* 0x3803B8CD: mov ecx, dword ptr [ebp - 0xc] */ 2106 esi = POP32_VAL(esp); /* 0x3803B8D0: pop esi */ 2107 MEM32(eax + 0x8) = ecx; /* 0x3803B8D1: mov dword ptr [eax + 8], ecx */ 2108 ebx = POP32_VAL(esp); /* 0x3803B8D4: pop ebx */ 2109 esp = ebp; /* 0x3803B8D5: mov esp, ebp */ 2110 ebp = POP32_VAL(esp); /* 0x3803B8D7: pop ebp */ 2111 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x3803B8D8: ret 0x14 */ 2112 L_3803B8DB: 2113 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803B8DB: fstp st(0) */ 2114 L_3803B8DD: 2115 edi = POP32_VAL(esp); /* 0x3803B8DD: pop edi */ 2116 esi = POP32_VAL(esp); /* 0x3803B8DE: pop esi */ 2117 ebx = POP32_VAL(esp); /* 0x3803B8DF: pop ebx */ 2118 esp = ebp; /* 0x3803B8E0: mov esp, ebp */ 2119 ebp = POP32_VAL(esp); /* 0x3803B8E2: pop ebp */ 2120 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x3803B8E3: ret 0x14 */ 2121 RECOMP_REGS_OUT(); 2122 } 2123 2124 void sub_3803B8F0(void) { 2125 int _fpu_cmp = 0; 2126 uint32_t _cf = 0; 2127 int _df = 1; 2128 uint32_t _flag_k = FK_NONE; 2129 uint32_t _flag_a = 0, _flag_b = 0; 2130 uint32_t _itail_tgt = 0; 2131 RECOMP_REGS_LOCALS 2132 RECOMP_ENTER(0x3803B8F0u); 2133 2134 L_3803B8F0: 2135 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B8F0: ret */ 2136 RECOMP_REGS_OUT(); 2137 } 2138 2139 void sub_3803B900(void) { 2140 int _fpu_cmp = 0; 2141 uint32_t _cf = 0; 2142 int _df = 1; 2143 uint32_t _flag_k = FK_NONE; 2144 uint32_t _flag_a = 0, _flag_b = 0; 2145 uint32_t _itail_tgt = 0; 2146 RECOMP_REGS_LOCALS 2147 RECOMP_ENTER(0x3803B900u); 2148 2149 L_3803B900: 2150 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B900: ret */ 2151 RECOMP_REGS_OUT(); 2152 } 2153 2154 void sub_3803B910(void) { 2155 int _fpu_cmp = 0; 2156 uint32_t _cf = 0; 2157 int _df = 1; 2158 uint32_t _flag_k = FK_NONE; 2159 uint32_t _flag_a = 0, _flag_b = 0; 2160 uint32_t _itail_tgt = 0; 2161 RECOMP_REGS_LOCALS 2162 RECOMP_ENTER(0x3803B910u); 2163 2164 L_3803B910: 2165 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803B910: ret */ 2166 RECOMP_REGS_OUT(); 2167 } 2168 2169 void sub_3803B920(void) { 2170 int _fpu_cmp = 0; 2171 uint32_t _cf = 0; 2172 int _df = 1; 2173 uint32_t _flag_k = FK_NONE; 2174 uint32_t _flag_a = 0, _flag_b = 0; 2175 uint32_t _itail_tgt = 0; 2176 RECOMP_REGS_LOCALS 2177 RECOMP_ENTER(0x3803B920u); 2178 2179 L_3803B920: 2180 PUSH32(esp, ebp); /* 0x3803B920: push ebp */ 2181 ebp = esp; /* 0x3803B921: mov ebp, esp */ 2182 fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x3803B923: fld dword ptr [ebp + 8] */ 2183 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803B926: fcomp dword ptr [0x3804e8e4] */ 2184 fp_pop(); 2185 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803B92C: fnstsw ax */ 2186 /* test HI8(eax), 1 */ /* 0x3803B92E: test ah, 1 */ 2187 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 2188 _cf = 0; 2189 _flag_k = FK_NARROW(FK_TEST, 24); 2190 if (TEST_Z(_flag_a, _flag_b)) goto L_3803B93D; /* 0x3803B931: je 0x3803b93d */ 2191 L_3803B933: 2192 fp_push(*(float*)&MEM32(0x3804E8E0)); /* 0x3803B933: fld dword ptr [0x3804e8e0] */ 2193 ebp = POP32_VAL(esp); /* 0x3803B939: pop ebp */ 2194 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803B93A: ret 4 */ 2195 L_3803B93D: 2196 fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x3803B93D: fld dword ptr [ebp + 8] */ 2197 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803B940: fcomp dword ptr [0x3804e8e4] */ 2198 fp_pop(); 2199 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803B946: fnstsw ax */ 2200 /* test HI8(eax), 0x41u */ /* 0x3803B948: test ah, 0x41 */ 2201 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 2202 _cf = 0; 2203 _flag_k = FK_NARROW(FK_TEST, 24); 2204 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803B957; /* 0x3803B94B: jne 0x3803b957 */ 2205 L_3803B94D: 2206 fp_push(*(float*)&MEM32(0x3804E8CC)); /* 0x3803B94D: fld dword ptr [0x3804e8cc] */ 2207 ebp = POP32_VAL(esp); /* 0x3803B953: pop ebp */ 2208 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803B954: ret 4 */ 2209 L_3803B957: 2210 fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x3803B957: fld dword ptr [0x3804e8e4] */ 2211 ebp = POP32_VAL(esp); /* 0x3803B95D: pop ebp */ 2212 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803B95E: ret 4 */ 2213 RECOMP_REGS_OUT(); 2214 } 2215 2216 void sub_3803B970(void) { 2217 int _fpu_cmp = 0; 2218 uint32_t _cf = 0; 2219 int _df = 1; 2220 uint32_t _flag_k = FK_NONE; 2221 uint32_t _flag_a = 0, _flag_b = 0; 2222 uint32_t _itail_tgt = 0; 2223 RECOMP_REGS_LOCALS 2224 RECOMP_ENTER(0x3803B970u); 2225 2226 L_3803B970: 2227 PUSH32(esp, ebp); /* 0x3803B970: push ebp */ 2228 ebp = esp; /* 0x3803B971: mov ebp, esp */ 2229 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x6Cu); 2230 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2231 esp = esp - 0x6Cu; /* 0x3803B973: sub esp, 0x6c */ 2232 _flag_k = FK_CMP; 2233 eax = MEM32(ebp + 0x8); /* 0x3803B976: mov eax, dword ptr [ebp + 8] */ 2234 PUSH32(esp, ebx); /* 0x3803B979: push ebx */ 2235 PUSH32(esp, esi); /* 0x3803B97A: push esi */ 2236 PUSH32(esp, edi); /* 0x3803B97B: push edi */ 2237 edi = ecx; /* 0x3803B97C: mov edi, ecx */ 2238 ecx = MEM32(eax); /* 0x3803B97E: mov ecx, dword ptr [eax] */ 2239 MEM32(0x3806F028) = ecx; /* 0x3803B980: mov dword ptr [0x3806f028], ecx */ 2240 edx = MEM32(eax + 0x4); /* 0x3803B986: mov edx, dword ptr [eax + 4] */ 2241 MEM32(0x3806F02C) = edx; /* 0x3803B989: mov dword ptr [0x3806f02c], edx */ 2242 eax = MEM32(eax + 0x8); /* 0x3803B98F: mov eax, dword ptr [eax + 8] */ 2243 MEM32(0x3806F030) = eax; /* 0x3803B992: mov dword ptr [0x3806f030], eax */ 2244 eax = MEM32(ebp + 0xC); /* 0x3803B997: mov eax, dword ptr [ebp + 0xc] */ 2245 ecx = eax; /* 0x3803B99A: mov ecx, eax */ 2246 edx = MEM32(ecx); /* 0x3803B99C: mov edx, dword ptr [ecx] */ 2247 MEM32(0x3806F008) = edx; /* 0x3803B99E: mov dword ptr [0x3806f008], edx */ 2248 edx = MEM32(ecx + 0x4); /* 0x3803B9A4: mov edx, dword ptr [ecx + 4] */ 2249 MEM32(0x3806F00C) = edx; /* 0x3803B9A7: mov dword ptr [0x3806f00c], edx */ 2250 ecx = MEM32(ecx + 0x8); /* 0x3803B9AD: mov ecx, dword ptr [ecx + 8] */ 2251 MEM32(0x3806F010) = ecx; /* 0x3803B9B0: mov dword ptr [0x3806f010], ecx */ 2252 edx = MEM32(eax); /* 0x3803B9B6: mov edx, dword ptr [eax] */ 2253 ecx = MEM32(eax + 0x4); /* 0x3803B9B8: mov ecx, dword ptr [eax + 4] */ 2254 MEM32(ebp + (-0x3C)) = edx; /* 0x3803B9BB: mov dword ptr [ebp - 0x3c], edx */ 2255 fp_push(*(float*)&MEM32(ebp + (-0x3C))); /* 0x3803B9BE: fld dword ptr [ebp - 0x3c] */ 2256 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803B9C1: fsub dword ptr [0x3806f028] */ 2257 edx = MEM32(eax + 0x8); /* 0x3803B9C7: mov edx, dword ptr [eax + 8] */ 2258 MEM32(ebp + (-0x38)) = ecx; /* 0x3803B9CA: mov dword ptr [ebp - 0x38], ecx */ 2259 MEM32(ebp + (-0x34)) = edx; /* 0x3803B9CD: mov dword ptr [ebp - 0x34], edx */ 2260 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x3C)) = _v; } /* 0x3803B9D0: fstp dword ptr [ebp - 0x3c] */ 2261 eax = MEM32(ebp + (-0x3C)); /* 0x3803B9D3: mov eax, dword ptr [ebp - 0x3c] */ 2262 fp_push(*(float*)&MEM32(ebp + (-0x38))); /* 0x3803B9D6: fld dword ptr [ebp - 0x38] */ 2263 MEM32(0x3806F018) = eax; /* 0x3803B9D9: mov dword ptr [0x3806f018], eax */ 2264 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803B9DE: fsub dword ptr [0x3806f02c] */ 2265 MEM32(ebp + (-0x1C)) = edi; /* 0x3803B9E4: mov dword ptr [ebp - 0x1c], edi */ 2266 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x38)) = _v; } /* 0x3803B9E7: fstp dword ptr [ebp - 0x38] */ 2267 ecx = MEM32(ebp + (-0x38)); /* 0x3803B9EA: mov ecx, dword ptr [ebp - 0x38] */ 2268 fp_push(*(float*)&MEM32(ebp + (-0x34))); /* 0x3803B9ED: fld dword ptr [ebp - 0x34] */ 2269 MEM32(0x3806F01C) = ecx; /* 0x3803B9F0: mov dword ptr [0x3806f01c], ecx */ 2270 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803B9F6: fsub dword ptr [0x3806f030] */ 2271 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x34)) = _v; } /* 0x3803B9FC: fstp dword ptr [ebp - 0x34] */ 2272 edx = MEM32(ebp + (-0x34)); /* 0x3803B9FF: mov edx, dword ptr [ebp - 0x34] */ 2273 MEM32(0x3806F020) = edx; /* 0x3803BA02: mov dword ptr [0x3806f020], edx */ 2274 ecx = MEM32(edi + 0x4); /* 0x3803BA08: mov ecx, dword ptr [edi + 4] */ 2275 eax = MEM32(ecx + 0xC); /* 0x3803BA0B: mov eax, dword ptr [ecx + 0xc] */ 2276 fp_push(*(float*)&MEM32(eax + 0x8264)); /* 0x3803BA0E: fld dword ptr [eax + 0x8264] */ 2277 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3803BA14: fstp dword ptr [ebp - 4] */ 2278 RECOMP_ICALL(0x38039DA0u); /* 0x3803BA17: call 0x38039da0 */ /* not lifted */ 2279 RECOMP_FLAGS_IN(); 2280 ecx = MEM32(edi + 0x4); /* 0x3803BA1C: mov ecx, dword ptr [edi + 4] */ 2281 MEM32(ebp + (-0x14)) = eax; /* 0x3803BA1F: mov dword ptr [ebp - 0x14], eax */ 2282 RECOMP_ICALL(0x38039DB0u); /* 0x3803BA22: call 0x38039db0 */ /* not lifted */ 2283 RECOMP_FLAGS_IN(); 2284 ebx = MEM32(ebp + 0x18); /* 0x3803BA27: mov ebx, dword ptr [ebp + 0x18] */ 2285 /* test LO8(ebx), LO8(ebx) */ /* 0x3803BA2A: test bl, bl */ 2286 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 2287 _cf = 0; 2288 _flag_k = FK_NARROW(FK_TEST, 24); 2289 MEM32(ebp + (-0x18)) = eax; /* 0x3803BA2C: mov dword ptr [ebp - 0x18], eax */ 2290 if (TEST_Z(_flag_a, _flag_b)) goto L_3803BD01; /* 0x3803BA2F: je 0x3803bd01 */ 2291 L_3803BA35: 2292 ecx = MEM32(edi + 0x10); /* 0x3803BA35: mov ecx, dword ptr [edi + 0x10] */ 2293 edx = MEM32(edi + 0x14); /* 0x3803BA38: mov edx, dword ptr [edi + 0x14] */ 2294 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2295 esi = 0; /* 0x3803BA3B: xor esi, esi */ 2296 _cf = 0; 2297 _flag_k = FK_TEST; 2298 MEM32(ebp + (-0x64)) = ecx; /* 0x3803BA3D: mov dword ptr [ebp - 0x64], ecx */ 2299 ecx = ebp + (-0x30); /* 0x3803BA40: lea ecx, [ebp - 0x30] */ 2300 MEM32(ebp + (-0x6C)) = 0; /* 0x3803BA43: mov dword ptr [ebp - 0x6c], 0 */ 2301 MEM32(ebp + (-0x68)) = 0; /* 0x3803BA4A: mov dword ptr [ebp - 0x68], 0 */ 2302 MEM32(ebp + (-0x60)) = edx; /* 0x3803BA51: mov dword ptr [ebp - 0x60], edx */ 2303 MEM32(ebp + (-0x5C)) = esi; /* 0x3803BA54: mov dword ptr [ebp - 0x5c], esi */ 2304 MEM32(ebp + (-0x58)) = esi; /* 0x3803BA57: mov dword ptr [ebp - 0x58], esi */ 2305 MEM32(ebp + (-0x54)) = esi; /* 0x3803BA5A: mov dword ptr [ebp - 0x54], esi */ 2306 MEM32(ebp + (-0x50)) = esi; /* 0x3803BA5D: mov dword ptr [ebp - 0x50], esi */ 2307 MEM32(ebp + (-0x4C)) = esi; /* 0x3803BA60: mov dword ptr [ebp - 0x4c], esi */ 2308 RECOMP_ICALL(0x3803C130u); /* 0x3803BA63: call 0x3803c130 */ /* not lifted */ 2309 RECOMP_FLAGS_IN(); 2310 ecx = MEM32(0x3806F030); /* 0x3803BA68: mov ecx, dword ptr [0x3806f030] */ 2311 edx = MEM32(0x3806F028); /* 0x3803BA6E: mov edx, dword ptr [0x3806f028] */ 2312 eax = ebp + (-0x6C); /* 0x3803BA74: lea eax, [ebp - 0x6c] */ 2313 PUSH32(esp, eax); /* 0x3803BA77: push eax */ 2314 PUSH32(esp, ecx); /* 0x3803BA78: push ecx */ 2315 PUSH32(esp, edx); /* 0x3803BA79: push edx */ 2316 eax = ebp + (-0x5C); /* 0x3803BA7A: lea eax, [ebp - 0x5c] */ 2317 PUSH32(esp, eax); /* 0x3803BA7D: push eax */ 2318 MEM32(ebp + 0xC) = esi; /* 0x3803BA7E: mov dword ptr [ebp + 0xc], esi */ 2319 MEM32(ebp + 0x18) = esi; /* 0x3803BA81: mov dword ptr [ebp + 0x18], esi */ 2320 MEM32(ebp + 0x8) = esi; /* 0x3803BA84: mov dword ptr [ebp + 8], esi */ 2321 RECOMP_ICALL(0x3803C150u); /* 0x3803BA87: call 0x3803c150 */ /* not lifted */ 2322 RECOMP_FLAGS_IN(); 2323 edx = MEM32(0x3806F010); /* 0x3803BA8C: mov edx, dword ptr [0x3806f010] */ 2324 eax = MEM32(0x3806F008); /* 0x3803BA92: mov eax, dword ptr [0x3806f008] */ 2325 ecx = ebp + (-0x6C); /* 0x3803BA97: lea ecx, [ebp - 0x6c] */ 2326 PUSH32(esp, ecx); /* 0x3803BA9A: push ecx */ 2327 PUSH32(esp, edx); /* 0x3803BA9B: push edx */ 2328 PUSH32(esp, eax); /* 0x3803BA9C: push eax */ 2329 ecx = ebp + (-0x30); /* 0x3803BA9D: lea ecx, [ebp - 0x30] */ 2330 PUSH32(esp, ecx); /* 0x3803BAA0: push ecx */ 2331 RECOMP_ICALL(0x3803C150u); /* 0x3803BAA1: call 0x3803c150 */ /* not lifted */ 2332 RECOMP_FLAGS_IN(); 2333 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x20u); 2334 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2335 esp = esp + 0x20u; /* 0x3803BAA6: add esp, 0x20 */ 2336 _flag_k = FK_ADD; 2337 L_3803BAA9: 2338 edx = MEM32(ebp + (-0x4C)); /* 0x3803BAA9: mov edx, dword ptr [ebp - 0x4c] */ 2339 /* cmp edx, esi */ /* 0x3803BAAC: cmp edx, esi */ 2340 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(esi); 2341 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2342 _flag_k = FK_CMP; 2343 eax = MEM32(ebp + (-0x20)); /* 0x3803BAAE: mov eax, dword ptr [ebp - 0x20] */ 2344 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BABB; /* 0x3803BAB1: jne 0x3803babb */ 2345 L_3803BAB3: 2346 /* cmp eax, esi */ /* 0x3803BAB3: cmp eax, esi */ 2347 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 2348 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2349 _flag_k = FK_CMP; 2350 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BD03; /* 0x3803BAB5: je 0x3803bd03 */ 2351 L_3803BABB: 2352 /* test edx, eax */ /* 0x3803BABB: test edx, eax */ 2353 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 2354 _cf = 0; 2355 _flag_k = FK_TEST; 2356 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C11A; /* 0x3803BABD: jne 0x3803c11a */ 2357 L_3803BAC3: 2358 /* cmp edx, esi */ /* 0x3803BAC3: cmp edx, esi */ 2359 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(esi); 2360 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2361 _flag_k = FK_CMP; 2362 ecx = ebp + (-0x5C); /* 0x3803BAC5: lea ecx, [ebp - 0x5c] */ 2363 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BACD; /* 0x3803BAC8: jne 0x3803bacd */ 2364 L_3803BACA: 2365 ecx = ebp + (-0x30); /* 0x3803BACA: lea ecx, [ebp - 0x30] */ 2366 L_3803BACD: 2367 /* cmp MEM32(ecx), esi */ /* 0x3803BACD: cmp dword ptr [ecx], esi */ 2368 _flag_a = (uint32_t)(MEM32(ecx)); _flag_b = (uint32_t)(esi); 2369 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2370 _flag_k = FK_CMP; 2371 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BB42; /* 0x3803BACF: je 0x3803bb42 */ 2372 L_3803BAD1: 2373 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BAD1: fld dword ptr [0x3806f010] */ 2374 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BAD7: fsub dword ptr [0x3806f030] */ 2375 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BADD: fcomp dword ptr [0x3804e8e4] */ 2376 fp_pop(); 2377 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BAE3: fnstsw ax */ 2378 /* test HI8(eax), 0x40u */ /* 0x3803BAE5: test ah, 0x40 */ 2379 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 2380 _cf = 0; 2381 _flag_k = FK_NARROW(FK_TEST, 24); 2382 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BB31; /* 0x3803BAE8: jne 0x3803bb31 */ 2383 L_3803BAEA: 2384 fp_push(*(float*)&MEM32(ebp + (-0x60))); /* 0x3803BAEA: fld dword ptr [ebp - 0x60] */ 2385 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BAED: fsub dword ptr [0x3806f030] */ 2386 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BAF3: fld dword ptr [0x3806f010] */ 2387 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BAF9: fsub dword ptr [0x3806f030] */ 2388 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x3803BAFF: fdivp st(1) */ 2389 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BB01: fld dword ptr [0x3806f008] */ 2390 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BB07: fsub dword ptr [0x3806f028] */ 2391 _st[0] *= _st[1]; /* 0x3803BB0D: fmul st(1) */ 2392 _st[0] += (double)*(float*)ADDR(0x3806F028); /* 0x3803BB0F: fadd dword ptr [0x3806f028] */ 2393 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BB15: fstp dword ptr [ebp + 0xc] */ 2394 fp_push(*(float*)&MEM32(0x3806F00C)); /* 0x3803BB18: fld dword ptr [0x3806f00c] */ 2395 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BB1E: fsub dword ptr [0x3806f02c] */ 2396 _st[0] *= _st[1]; /* 0x3803BB24: fmul st(1) */ 2397 _st[0] += (double)*(float*)ADDR(0x3806F02C); /* 0x3803BB26: fadd dword ptr [0x3806f02c] */ 2398 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BB2C: fstp dword ptr [ebp + 0x18] */ 2399 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BB2F: fstp st(0) */ 2400 L_3803BB31: 2401 fp_push(*(float*)&MEM32(ebp + (-0x60))); /* 0x3803BB31: fld dword ptr [ebp - 0x60] */ 2402 _st[0] -= (double)*(float*)ADDR(0x3804EA94); /* 0x3803BB34: fsub dword ptr [0x3804ea94] */ 2403 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x3803BB3A: fstp dword ptr [ebp + 8] */ 2404 goto L_3803BC90; /* 0x3803BB3D: jmp 0x3803bc90 */ 2405 L_3803BB42: 2406 /* cmp MEM32(ecx + 0x4), esi */ /* 0x3803BB42: cmp dword ptr [ecx + 4], esi */ 2407 _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(esi); 2408 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2409 _flag_k = FK_CMP; 2410 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BBB2; /* 0x3803BB45: je 0x3803bbb2 */ 2411 L_3803BB47: 2412 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BB47: fld dword ptr [0x3806f010] */ 2413 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BB4D: fsub dword ptr [0x3806f030] */ 2414 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BB53: fcomp dword ptr [0x3804e8e4] */ 2415 fp_pop(); 2416 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BB59: fnstsw ax */ 2417 /* test HI8(eax), 0x40u */ /* 0x3803BB5B: test ah, 0x40 */ 2418 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 2419 _cf = 0; 2420 _flag_k = FK_NARROW(FK_TEST, 24); 2421 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BBA7; /* 0x3803BB5E: jne 0x3803bba7 */ 2422 L_3803BB60: 2423 fp_push(*(float*)&MEM32(ebp + (-0x68))); /* 0x3803BB60: fld dword ptr [ebp - 0x68] */ 2424 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BB63: fsub dword ptr [0x3806f030] */ 2425 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BB69: fld dword ptr [0x3806f010] */ 2426 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BB6F: fsub dword ptr [0x3806f030] */ 2427 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x3803BB75: fdivp st(1) */ 2428 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BB77: fld dword ptr [0x3806f008] */ 2429 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BB7D: fsub dword ptr [0x3806f028] */ 2430 _st[0] *= _st[1]; /* 0x3803BB83: fmul st(1) */ 2431 _st[0] += (double)*(float*)ADDR(0x3806F028); /* 0x3803BB85: fadd dword ptr [0x3806f028] */ 2432 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BB8B: fstp dword ptr [ebp + 0xc] */ 2433 fp_push(*(float*)&MEM32(0x3806F00C)); /* 0x3803BB8E: fld dword ptr [0x3806f00c] */ 2434 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BB94: fsub dword ptr [0x3806f02c] */ 2435 _st[0] *= _st[1]; /* 0x3803BB9A: fmul st(1) */ 2436 _st[0] += (double)*(float*)ADDR(0x3806F02C); /* 0x3803BB9C: fadd dword ptr [0x3806f02c] */ 2437 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BBA2: fstp dword ptr [ebp + 0x18] */ 2438 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BBA5: fstp st(0) */ 2439 L_3803BBA7: 2440 eax = MEM32(ebp + (-0x68)); /* 0x3803BBA7: mov eax, dword ptr [ebp - 0x68] */ 2441 MEM32(ebp + 0x8) = eax; /* 0x3803BBAA: mov dword ptr [ebp + 8], eax */ 2442 goto L_3803BC90; /* 0x3803BBAD: jmp 0x3803bc90 */ 2443 L_3803BBB2: 2444 /* cmp MEM32(ecx + 0x8), esi */ /* 0x3803BBB2: cmp dword ptr [ecx + 8], esi */ 2445 _flag_a = (uint32_t)(MEM32(ecx + 0x8)); _flag_b = (uint32_t)(esi); 2446 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2447 _flag_k = FK_CMP; 2448 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BC25; /* 0x3803BBB5: je 0x3803bc25 */ 2449 L_3803BBB7: 2450 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BBB7: fld dword ptr [0x3806f008] */ 2451 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BBBD: fsub dword ptr [0x3806f028] */ 2452 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BBC3: fcomp dword ptr [0x3804e8e4] */ 2453 fp_pop(); 2454 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BBC9: fnstsw ax */ 2455 /* test HI8(eax), 0x40u */ /* 0x3803BBCB: test ah, 0x40 */ 2456 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 2457 _cf = 0; 2458 _flag_k = FK_NARROW(FK_TEST, 24); 2459 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BC17; /* 0x3803BBCE: jne 0x3803bc17 */ 2460 L_3803BBD0: 2461 fp_push(*(float*)&MEM32(ebp + (-0x64))); /* 0x3803BBD0: fld dword ptr [ebp - 0x64] */ 2462 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BBD3: fsub dword ptr [0x3806f028] */ 2463 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BBD9: fld dword ptr [0x3806f008] */ 2464 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BBDF: fsub dword ptr [0x3806f028] */ 2465 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x3803BBE5: fdivp st(1) */ 2466 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BBE7: fld dword ptr [0x3806f010] */ 2467 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BBED: fsub dword ptr [0x3806f030] */ 2468 _st[0] *= _st[1]; /* 0x3803BBF3: fmul st(1) */ 2469 _st[0] += (double)*(float*)ADDR(0x3806F030); /* 0x3803BBF5: fadd dword ptr [0x3806f030] */ 2470 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x3803BBFB: fstp dword ptr [ebp + 8] */ 2471 fp_push(*(float*)&MEM32(0x3806F00C)); /* 0x3803BBFE: fld dword ptr [0x3806f00c] */ 2472 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BC04: fsub dword ptr [0x3806f02c] */ 2473 _st[0] *= _st[1]; /* 0x3803BC0A: fmul st(1) */ 2474 _st[0] += (double)*(float*)ADDR(0x3806F02C); /* 0x3803BC0C: fadd dword ptr [0x3806f02c] */ 2475 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BC12: fstp dword ptr [ebp + 0x18] */ 2476 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BC15: fstp st(0) */ 2477 L_3803BC17: 2478 fp_push(*(float*)&MEM32(ebp + (-0x64))); /* 0x3803BC17: fld dword ptr [ebp - 0x64] */ 2479 _st[0] -= (double)*(float*)ADDR(0x3804EA94); /* 0x3803BC1A: fsub dword ptr [0x3804ea94] */ 2480 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BC20: fstp dword ptr [ebp + 0xc] */ 2481 goto L_3803BC90; /* 0x3803BC23: jmp 0x3803bc90 */ 2482 L_3803BC25: 2483 /* cmp MEM32(ecx + 0xC), esi */ /* 0x3803BC25: cmp dword ptr [ecx + 0xc], esi */ 2484 _flag_a = (uint32_t)(MEM32(ecx + 0xC)); _flag_b = (uint32_t)(esi); 2485 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2486 _flag_k = FK_CMP; 2487 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BC90; /* 0x3803BC28: je 0x3803bc90 */ 2488 L_3803BC2A: 2489 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BC2A: fld dword ptr [0x3806f008] */ 2490 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BC30: fsub dword ptr [0x3806f028] */ 2491 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BC36: fcomp dword ptr [0x3804e8e4] */ 2492 fp_pop(); 2493 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BC3C: fnstsw ax */ 2494 /* test HI8(eax), 0x40u */ /* 0x3803BC3E: test ah, 0x40 */ 2495 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 2496 _cf = 0; 2497 _flag_k = FK_NARROW(FK_TEST, 24); 2498 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BC8A; /* 0x3803BC41: jne 0x3803bc8a */ 2499 L_3803BC43: 2500 fp_push(*(float*)&MEM32(ebp + (-0x6C))); /* 0x3803BC43: fld dword ptr [ebp - 0x6c] */ 2501 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BC46: fsub dword ptr [0x3806f028] */ 2502 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BC4C: fld dword ptr [0x3806f008] */ 2503 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BC52: fsub dword ptr [0x3806f028] */ 2504 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x3803BC58: fdivp st(1) */ 2505 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BC5A: fld dword ptr [0x3806f010] */ 2506 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BC60: fsub dword ptr [0x3806f030] */ 2507 _st[0] *= _st[1]; /* 0x3803BC66: fmul st(1) */ 2508 _st[0] += (double)*(float*)ADDR(0x3806F030); /* 0x3803BC68: fadd dword ptr [0x3806f030] */ 2509 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x3803BC6E: fstp dword ptr [ebp + 8] */ 2510 fp_push(*(float*)&MEM32(0x3806F00C)); /* 0x3803BC71: fld dword ptr [0x3806f00c] */ 2511 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BC77: fsub dword ptr [0x3806f02c] */ 2512 _st[0] *= _st[1]; /* 0x3803BC7D: fmul st(1) */ 2513 _st[0] += (double)*(float*)ADDR(0x3806F02C); /* 0x3803BC7F: fadd dword ptr [0x3806f02c] */ 2514 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BC85: fstp dword ptr [ebp + 0x18] */ 2515 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BC88: fstp st(0) */ 2516 L_3803BC8A: 2517 eax = MEM32(ebp + (-0x6C)); /* 0x3803BC8A: mov eax, dword ptr [ebp - 0x6c] */ 2518 MEM32(ebp + 0xC) = eax; /* 0x3803BC8D: mov dword ptr [ebp + 0xc], eax */ 2519 L_3803BC90: 2520 /* cmp MEM32(ecx + 0x10), edx */ /* 0x3803BC90: cmp dword ptr [ecx + 0x10], edx */ 2521 _flag_a = (uint32_t)(MEM32(ecx + 0x10)); _flag_b = (uint32_t)(edx); 2522 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2523 _flag_k = FK_CMP; 2524 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BCCB; /* 0x3803BC93: jne 0x3803bccb */ 2525 L_3803BC95: 2526 ecx = MEM32(ebp + 0xC); /* 0x3803BC95: mov ecx, dword ptr [ebp + 0xc] */ 2527 edx = MEM32(ebp + 0x18); /* 0x3803BC98: mov edx, dword ptr [ebp + 0x18] */ 2528 eax = MEM32(ebp + 0x8); /* 0x3803BC9B: mov eax, dword ptr [ebp + 8] */ 2529 MEM32(0x3806F028) = ecx; /* 0x3803BC9E: mov dword ptr [0x3806f028], ecx */ 2530 ecx = ebp + (-0x6C); /* 0x3803BCA4: lea ecx, [ebp - 0x6c] */ 2531 PUSH32(esp, ecx); /* 0x3803BCA7: push ecx */ 2532 MEM32(0x3806F02C) = edx; /* 0x3803BCA8: mov dword ptr [0x3806f02c], edx */ 2533 edx = eax; /* 0x3803BCAE: mov edx, eax */ 2534 MEM32(0x3806F030) = eax; /* 0x3803BCB0: mov dword ptr [0x3806f030], eax */ 2535 eax = MEM32(ebp + 0xC); /* 0x3803BCB5: mov eax, dword ptr [ebp + 0xc] */ 2536 PUSH32(esp, edx); /* 0x3803BCB8: push edx */ 2537 PUSH32(esp, eax); /* 0x3803BCB9: push eax */ 2538 ecx = ebp + (-0x5C); /* 0x3803BCBA: lea ecx, [ebp - 0x5c] */ 2539 PUSH32(esp, ecx); /* 0x3803BCBD: push ecx */ 2540 RECOMP_ICALL(0x3803C150u); /* 0x3803BCBE: call 0x3803c150 */ /* not lifted */ 2541 RECOMP_FLAGS_IN(); 2542 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 2543 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2544 esp = esp + 0x10u; /* 0x3803BCC3: add esp, 0x10 */ 2545 _flag_k = FK_ADD; 2546 RECOMP_BACKEDGE(); 2547 goto L_3803BAA9; /* 0x3803BCC6: jmp 0x3803baa9 */ 2548 L_3803BCCB: 2549 edx = MEM32(ebp + 0xC); /* 0x3803BCCB: mov edx, dword ptr [ebp + 0xc] */ 2550 eax = MEM32(ebp + 0x18); /* 0x3803BCCE: mov eax, dword ptr [ebp + 0x18] */ 2551 ecx = MEM32(ebp + 0x8); /* 0x3803BCD1: mov ecx, dword ptr [ebp + 8] */ 2552 MEM32(0x3806F008) = edx; /* 0x3803BCD4: mov dword ptr [0x3806f008], edx */ 2553 edx = ebp + (-0x6C); /* 0x3803BCDA: lea edx, [ebp - 0x6c] */ 2554 PUSH32(esp, edx); /* 0x3803BCDD: push edx */ 2555 MEM32(0x3806F00C) = eax; /* 0x3803BCDE: mov dword ptr [0x3806f00c], eax */ 2556 eax = ecx; /* 0x3803BCE3: mov eax, ecx */ 2557 MEM32(0x3806F010) = ecx; /* 0x3803BCE5: mov dword ptr [0x3806f010], ecx */ 2558 ecx = MEM32(ebp + 0xC); /* 0x3803BCEB: mov ecx, dword ptr [ebp + 0xc] */ 2559 PUSH32(esp, eax); /* 0x3803BCEE: push eax */ 2560 PUSH32(esp, ecx); /* 0x3803BCEF: push ecx */ 2561 edx = ebp + (-0x30); /* 0x3803BCF0: lea edx, [ebp - 0x30] */ 2562 PUSH32(esp, edx); /* 0x3803BCF3: push edx */ 2563 RECOMP_ICALL(0x3803C150u); /* 0x3803BCF4: call 0x3803c150 */ /* not lifted */ 2564 RECOMP_FLAGS_IN(); 2565 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 2566 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 2567 esp = esp + 0x10u; /* 0x3803BCF9: add esp, 0x10 */ 2568 _flag_k = FK_ADD; 2569 RECOMP_BACKEDGE(); 2570 goto L_3803BAA9; /* 0x3803BCFC: jmp 0x3803baa9 */ 2571 L_3803BD01: 2572 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 2573 esi = 0; /* 0x3803BD01: xor esi, esi */ 2574 _cf = 0; 2575 _flag_k = FK_TEST; 2576 L_3803BD03: 2577 ecx = MEM32(edi + 0xC); /* 0x3803BD03: mov ecx, dword ptr [edi + 0xc] */ 2578 /* cmp ecx, esi */ /* 0x3803BD06: cmp ecx, esi */ 2579 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi); 2580 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2581 _flag_k = FK_CMP; 2582 MEM32(ebp + (-0x3C)) = 0; /* 0x3803BD08: mov dword ptr [ebp - 0x3c], 0 */ 2583 MEM32(ebp + (-0x38)) = 0; /* 0x3803BD0F: mov dword ptr [ebp - 0x38], 0 */ 2584 MEM32(ebp + (-0x34)) = 0; /* 0x3803BD16: mov dword ptr [ebp - 0x34], 0 */ 2585 MEM32(ebp + (-0x48)) = 0; /* 0x3803BD1D: mov dword ptr [ebp - 0x48], 0 */ 2586 MEM32(ebp + (-0x44)) = 0; /* 0x3803BD24: mov dword ptr [ebp - 0x44], 0 */ 2587 MEM32(ebp + (-0x40)) = 0; /* 0x3803BD2B: mov dword ptr [ebp - 0x40], 0 */ 2588 MEM8(ebp + 0xB) = (uint8_t)(0); /* 0x3803BD32: mov byte ptr [ebp + 0xb], 0 */ 2589 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BD57; /* 0x3803BD36: je 0x3803bd57 */ 2590 L_3803BD38: 2591 edx = MEM32(ebp + 0x1C); /* 0x3803BD38: mov edx, dword ptr [ebp + 0x1c] */ 2592 eax = MEM32(ecx); /* 0x3803BD3B: mov eax, dword ptr [ecx] */ 2593 PUSH32(esp, edx); /* 0x3803BD3D: push edx */ 2594 PUSH32(esp, ebx); /* 0x3803BD3E: push ebx */ 2595 edx = ebp + (-0x48); /* 0x3803BD3F: lea edx, [ebp - 0x48] */ 2596 PUSH32(esp, edx); /* 0x3803BD42: push edx */ 2597 edx = ebp + (-0x3C); /* 0x3803BD43: lea edx, [ebp - 0x3c] */ 2598 PUSH32(esp, edx); /* 0x3803BD46: push edx */ 2599 PUSH32(esp, 0x3806F008u); /* 0x3803BD47: push 0x3806f008 */ 2600 PUSH32(esp, 0x3806F028u); /* 0x3803BD4C: push 0x3806f028 */ 2601 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x3803BD51: call dword ptr [eax + 0x10] */ 2602 RECOMP_FLAGS_IN(); 2603 MEM8(ebp + 0xB) = (uint8_t)(LO8(eax)); /* 0x3803BD54: mov byte ptr [ebp + 0xb], al */ 2604 L_3803BD57: 2605 { 2606 /* Keep the original float spills: the far X coordinate stays double. */ 2607 double spacing = *(float *)ADDR(ebp - 4); 2608 float start_x = (float)((double)*(float *)ADDR(0x3806F028) / spacing); 2609 float start_z = (float)((double)*(float *)ADDR(0x3806F030) / spacing); 2610 double end_x = (double)*(float *)ADDR(0x3806F008) / spacing; 2611 float end_z = (float)((double)*(float *)ADDR(0x3806F010) / spacing); 2612 edi = (uint32_t)fp_st0_to_i64(start_x, 0, 0x0c7f); 2613 esi = (uint32_t)fp_st0_to_i64(start_z, 0, 0x0c7f); 2614 uint32_t end_ix = (uint32_t)fp_st0_to_i64(end_x, 0, 0x0c7f); 2615 uint32_t end_iz = (uint32_t)fp_st0_to_i64(end_z, 0, 0x0c7f); 2616 2617 /* Distance to the first cell boundary and each following boundary. */ 2618 double dx = end_x - start_x; 2619 float dz = (float)((double)end_z - start_z); 2620 int negative_x = !(dx >= 0.0), negative_z = !(dz >= 0.0); 2621 float interval_x = (float)((negative_x ? -100.0 : 100.0) / dx); 2622 float interval_z = (float)((negative_z ? -100.0 : 100.0) / dz); 2623 double first_x = negative_x ? (double)start_x - floor(start_x) 2624 : (floor(start_x) + 1.0) - start_x; 2625 double first_z = negative_z ? (double)start_z - floor(start_z) 2626 : (floor(start_z) + 1.0) - start_z; 2627 *(float *)ADDR(ebp - 4) = interval_x; 2628 *(float *)ADDR(ebp + 12) = interval_z; 2629 *(float *)ADDR(ebp + 24) = (float)(first_x * interval_x); 2630 *(float *)ADDR(ebp + 28) = (float)(first_z * interval_z); 2631 MEM32(ebp - 8) = negative_x ? UINT32_MAX : 1; 2632 MEM32(ebp - 12) = negative_z ? UINT32_MAX : 1; 2633 memset(_st + 6, 0, 2 * sizeof(*_st)); 2634 memset(g_st_i64 + 6, 0, 2 * sizeof(*g_st_i64)); 2635 2636 /* Use wrapping guest arithmetic for the inclusive Manhattan cell count. */ 2637 uint32_t distance_x = end_ix - edi, distance_z = end_iz - esi; 2638 edx = (int32_t)distance_x < 0 ? UINT32_MAX : 0; 2639 eax = (distance_x ^ edx) - edx; 2640 uint32_t sign_z = (int32_t)distance_z < 0 ? UINT32_MAX : 0; 2641 ecx = (distance_z ^ sign_z) - sign_z; 2642 _flag_a = ecx; _flag_b = eax; _flag_k = FK_ADD; 2643 _cf = ecx + eax < ecx; 2644 ecx += eax; 2645 MEM32(ebp - 16) = ecx; 2646 ebx = MEM32(ebp + 16); 2647 if ((int32_t)ecx < 0) goto L_3803BFD9; 2648 } 2649 L_3803BEBB: 2650 /* test edi, edi */ /* 0x3803BEBB: test edi, edi */ 2651 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 2652 _cf = 0; 2653 _flag_k = FK_TEST; 2654 if (TEST_S(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BEBD: jl 0x3803bfa4 */ 2655 L_3803BEC3: 2656 /* cmp edi, MEM32(ebp + (-0x14)) */ /* 0x3803BEC3: cmp edi, dword ptr [ebp - 0x14] */ 2657 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebp + (-0x14))); 2658 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2659 _flag_k = FK_CMP; 2660 if (CMP_GE(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BEC6: jge 0x3803bfa4 */ 2661 L_3803BECC: 2662 /* test esi, esi */ /* 0x3803BECC: test esi, esi */ 2663 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 2664 _cf = 0; 2665 _flag_k = FK_TEST; 2666 if (TEST_S(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BECE: jl 0x3803bfa4 */ 2667 L_3803BED4: 2668 /* cmp esi, MEM32(ebp + (-0x18)) */ /* 0x3803BED4: cmp esi, dword ptr [ebp - 0x18] */ 2669 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(ebp + (-0x18))); 2670 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2671 _flag_k = FK_CMP; 2672 if (CMP_GE(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BED7: jge 0x3803bfa4 */ 2673 L_3803BEDD: 2674 edx = MEM32(ebp + 0x14); /* 0x3803BEDD: mov edx, dword ptr [ebp + 0x14] */ 2675 ecx = MEM32(ebp + (-0x1C)); /* 0x3803BEE0: mov ecx, dword ptr [ebp - 0x1c] */ 2676 PUSH32(esp, edx); /* 0x3803BEE3: push edx */ 2677 PUSH32(esp, ebx); /* 0x3803BEE4: push ebx */ 2678 PUSH32(esp, esi); /* 0x3803BEE5: push esi */ 2679 PUSH32(esp, edi); /* 0x3803BEE6: push edi */ 2680 RECOMP_ICALL(0x3803C220u); /* 0x3803BEE7: call 0x3803c220 */ /* not lifted */ 2681 RECOMP_FLAGS_IN(); 2682 /* cmp LO8(eax), 1 */ /* 0x3803BEEC: cmp al, 1 */ 2683 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 2684 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2685 _flag_k = FK_NARROW(FK_CMP, 24); 2686 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BFA1; /* 0x3803BEEE: jne 0x3803bfa1 */ 2687 L_3803BEF4: 2688 eax = ebx; /* 0x3803BEF4: mov eax, ebx */ 2689 ecx = MEM32(eax); /* 0x3803BEF6: mov ecx, dword ptr [eax] */ 2690 edx = MEM32(eax + 0x4); /* 0x3803BEF8: mov edx, dword ptr [eax + 4] */ 2691 eax = MEM32(eax + 0x8); /* 0x3803BEFB: mov eax, dword ptr [eax + 8] */ 2692 MEM32(ebp + (-0x28)) = ecx; /* 0x3803BEFE: mov dword ptr [ebp - 0x28], ecx */ 2693 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803BF01: fld dword ptr [ebp - 0x28] */ 2694 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BF04: fsub dword ptr [0x3806f028] */ 2695 ecx = MEM32(0x3806F008); /* 0x3803BF0A: mov ecx, dword ptr [0x3806f008] */ 2696 MEM32(ebp + (-0x24)) = edx; /* 0x3803BF10: mov dword ptr [ebp - 0x24], edx */ 2697 edx = MEM32(0x3806F00C); /* 0x3803BF13: mov edx, dword ptr [0x3806f00c] */ 2698 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3803BF19: fstp dword ptr [ebp - 0x28] */ 2699 MEM32(ebp + (-0x20)) = eax; /* 0x3803BF1C: mov dword ptr [ebp - 0x20], eax */ 2700 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803BF1F: fld dword ptr [ebp - 0x24] */ 2701 eax = MEM32(0x3806F010); /* 0x3803BF22: mov eax, dword ptr [0x3806f010] */ 2702 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BF27: fsub dword ptr [0x3806f02c] */ 2703 MEM32(ebp + (-0x68)) = ecx; /* 0x3803BF2D: mov dword ptr [ebp - 0x68], ecx */ 2704 PUSH32(esp, 0x3806F028u); /* 0x3803BF30: push 0x3806f028 */ 2705 ecx = ebp + (-0x68); /* 0x3803BF35: lea ecx, [ebp - 0x68] */ 2706 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803BF38: fstp dword ptr [ebp - 0x24] */ 2707 MEM32(ebp + (-0x64)) = edx; /* 0x3803BF3B: mov dword ptr [ebp - 0x64], edx */ 2708 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803BF3E: fld dword ptr [ebp - 0x20] */ 2709 MEM32(ebp + (-0x60)) = eax; /* 0x3803BF41: mov dword ptr [ebp - 0x60], eax */ 2710 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BF44: fsub dword ptr [0x3806f030] */ 2711 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3803BF4A: fstp dword ptr [ebp - 0x20] */ 2712 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803BF4D: call dword ptr [0x3804e4f4] */ 2713 RECOMP_FLAGS_IN(); 2714 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803BF53: fld dword ptr [ebp - 0x20] */ 2715 ecx = MEM32(eax); /* 0x3803BF56: mov ecx, dword ptr [eax] */ 2716 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3803BF58: fmul dword ptr [ebp - 0x20] */ 2717 edx = MEM32(eax + 0x4); /* 0x3803BF5B: mov edx, dword ptr [eax + 4] */ 2718 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803BF5E: fld dword ptr [ebp - 0x24] */ 2719 eax = MEM32(eax + 0x8); /* 0x3803BF61: mov eax, dword ptr [eax + 8] */ 2720 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x3803BF64: fmul dword ptr [ebp - 0x24] */ 2721 MEM32(ebp + (-0x4C)) = eax; /* 0x3803BF67: mov dword ptr [ebp - 0x4c], eax */ 2722 MEM32(ebp + (-0x50)) = edx; /* 0x3803BF6A: mov dword ptr [ebp - 0x50], edx */ 2723 MEM32(ebp + (-0x54)) = ecx; /* 0x3803BF6D: mov dword ptr [ebp - 0x54], ecx */ 2724 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF70: faddp st(1) */ 2725 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803BF72: fld dword ptr [ebp - 0x28] */ 2726 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x3803BF75: fmul dword ptr [ebp - 0x28] */ 2727 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF78: faddp st(1) */ 2728 _st[0] = sqrt(_st[0]); /* 0x3803BF7A: fsqrt */ 2729 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3803BF7C: fld dword ptr [ebp - 0x4c] */ 2730 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x3803BF7F: fmul dword ptr [ebp - 0x4c] */ 2731 fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x3803BF82: fld dword ptr [ebp - 0x50] */ 2732 _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x3803BF85: fmul dword ptr [ebp - 0x50] */ 2733 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF88: faddp st(1) */ 2734 fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x3803BF8A: fld dword ptr [ebp - 0x54] */ 2735 _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x3803BF8D: fmul dword ptr [ebp - 0x54] */ 2736 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF90: faddp st(1) */ 2737 _st[0] = sqrt(_st[0]); /* 0x3803BF92: fsqrt */ 2738 fp_xch(1); /* 0x3803BF94: fxch st(1) */ 2739 fp_xch(1); /* 0x3803BF96: fxch st(1) */ 2740 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803BF98: fcompp */ 2741 fp_pop(); fp_pop(); 2742 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BF9A: fnstsw ax */ 2743 /* test HI8(eax), 0x41u */ /* 0x3803BF9C: test ah, 0x41 */ 2744 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 2745 _cf = 0; 2746 _flag_k = FK_NARROW(FK_TEST, 24); 2747 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C014; /* 0x3803BF9F: je 0x3803c014 */ 2748 L_3803BFA1: 2749 ecx = MEM32(ebp + (-0x10)); /* 0x3803BFA1: mov ecx, dword ptr [ebp - 0x10] */ 2750 L_3803BFA4: 2751 { 2752 /* Equal boundary distances step Z; unordered comparisons step X. */ 2753 float next_x = *(float *)ADDR(ebp + 24); 2754 float next_z = *(float *)ADDR(ebp + 28); 2755 if (!(next_x >= next_z)) { 2756 eax = MEM32(ebp - 8); 2757 _flag_a = edi; _flag_b = eax; 2758 _cf = edi + eax < edi; 2759 edi += eax; 2760 *(float *)ADDR(ebp + 24) = (float)((double)next_x + *(float *)ADDR(ebp - 4)); 2761 } else { 2762 eax = MEM32(ebp - 12); 2763 _flag_a = esi; _flag_b = eax; 2764 _cf = esi + eax < esi; 2765 esi += eax; 2766 *(float *)ADDR(ebp + 28) = (float)((double)next_z + *(float *)ADDR(ebp + 12)); 2767 } 2768 _flag_k = FK_ADD; 2769 _st[7] = 0; g_st_i64[7] = 0; 2770 } 2771 L_3803BFCF: 2772 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 2773 ecx = ecx - 1; /* 0x3803BFCF: dec ecx */ 2774 _flag_k = FK_DEC; 2775 MEM32(ebp + (-0x10)) = ecx; /* 0x3803BFD0: mov dword ptr [ebp - 0x10], ecx */ 2776 RECOMP_BACKEDGE(); 2777 if (/* dec result */ CMP_NS(_flag_a, _flag_b)) goto L_3803BEBB; /* 0x3803BFD3: jns 0x3803bebb */ 2778 L_3803BFD9: 2779 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803BFD9: mov al, byte ptr [ebp + 0xb] */ 2780 /* test LO8(eax), LO8(eax) */ /* 0x3803BFDC: test al, al */ 2781 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2782 _cf = 0; 2783 _flag_k = FK_NARROW(FK_TEST, 24); 2784 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C0F4; /* 0x3803BFDE: je 0x3803c0f4 */ 2785 L_3803BFE4: 2786 edx = MEM32(ebp + (-0x3C)); /* 0x3803BFE4: mov edx, dword ptr [ebp - 0x3c] */ 2787 eax = MEM32(ebp + (-0x38)); /* 0x3803BFE7: mov eax, dword ptr [ebp - 0x38] */ 2788 ecx = MEM32(ebp + (-0x34)); /* 0x3803BFEA: mov ecx, dword ptr [ebp - 0x34] */ 2789 MEM32(ebx) = edx; /* 0x3803BFED: mov dword ptr [ebx], edx */ 2790 edx = MEM32(ebp + (-0x48)); /* 0x3803BFEF: mov edx, dword ptr [ebp - 0x48] */ 2791 MEM32(ebx + 0x4) = eax; /* 0x3803BFF2: mov dword ptr [ebx + 4], eax */ 2792 eax = MEM32(ebp + 0x14); /* 0x3803BFF5: mov eax, dword ptr [ebp + 0x14] */ 2793 MEM32(ebx + 0x8) = ecx; /* 0x3803BFF8: mov dword ptr [ebx + 8], ecx */ 2794 ecx = MEM32(ebp + (-0x44)); /* 0x3803BFFB: mov ecx, dword ptr [ebp - 0x44] */ 2795 MEM32(eax) = edx; /* 0x3803BFFE: mov dword ptr [eax], edx */ 2796 edx = MEM32(ebp + (-0x40)); /* 0x3803C000: mov edx, dword ptr [ebp - 0x40] */ 2797 edi = POP32_VAL(esp); /* 0x3803C003: pop edi */ 2798 MEM32(eax + 0x4) = ecx; /* 0x3803C004: mov dword ptr [eax + 4], ecx */ 2799 esi = POP32_VAL(esp); /* 0x3803C007: pop esi */ 2800 MEM32(eax + 0x8) = edx; /* 0x3803C008: mov dword ptr [eax + 8], edx */ 2801 SET_LO8(eax, 1); /* 0x3803C00B: mov al, 1 */ 2802 ebx = POP32_VAL(esp); /* 0x3803C00D: pop ebx */ 2803 esp = ebp; /* 0x3803C00E: mov esp, ebp */ 2804 ebp = POP32_VAL(esp); /* 0x3803C010: pop ebp */ 2805 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C011: ret 0x18 */ 2806 L_3803C014: 2807 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803C014: mov al, byte ptr [ebp + 0xb] */ 2808 /* test LO8(eax), LO8(eax) */ /* 0x3803C017: test al, al */ 2809 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 2810 _cf = 0; 2811 _flag_k = FK_NARROW(FK_TEST, 24); 2812 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C019: je 0x3803c0e9 */ 2813 L_3803C01F: 2814 fp_push(*(float*)&MEM32(ebp + (-0x3C))); /* 0x3803C01F: fld dword ptr [ebp - 0x3c] */ 2815 ecx = MEM32(ebp + (-0x3C)); /* 0x3803C022: mov ecx, dword ptr [ebp - 0x3c] */ 2816 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803C025: fsub dword ptr [0x3806f028] */ 2817 edx = MEM32(ebp + (-0x38)); /* 0x3803C02B: mov edx, dword ptr [ebp - 0x38] */ 2818 eax = MEM32(ebp + (-0x34)); /* 0x3803C02E: mov eax, dword ptr [ebp - 0x34] */ 2819 MEM32(ebp + (-0x28)) = ecx; /* 0x3803C031: mov dword ptr [ebp - 0x28], ecx */ 2820 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3803C034: fstp dword ptr [ebp - 0x28] */ 2821 MEM32(ebp + (-0x24)) = edx; /* 0x3803C037: mov dword ptr [ebp - 0x24], edx */ 2822 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C03A: fld dword ptr [ebp - 0x24] */ 2823 MEM32(ebp + (-0x20)) = eax; /* 0x3803C03D: mov dword ptr [ebp - 0x20], eax */ 2824 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803C040: fsub dword ptr [0x3806f02c] */ 2825 ecx = ebx; /* 0x3803C046: mov ecx, ebx */ 2826 edx = MEM32(ecx); /* 0x3803C048: mov edx, dword ptr [ecx] */ 2827 eax = MEM32(ecx + 0x4); /* 0x3803C04A: mov eax, dword ptr [ecx + 4] */ 2828 ecx = MEM32(ecx + 0x8); /* 0x3803C04D: mov ecx, dword ptr [ecx + 8] */ 2829 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803C050: fstp dword ptr [ebp - 0x24] */ 2830 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C053: fld dword ptr [ebp - 0x20] */ 2831 MEM32(ebp + (-0x60)) = ecx; /* 0x3803C056: mov dword ptr [ebp - 0x60], ecx */ 2832 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803C059: fsub dword ptr [0x3806f030] */ 2833 PUSH32(esp, 0x3806F028u); /* 0x3803C05F: push 0x3806f028 */ 2834 ecx = ebp + (-0x68); /* 0x3803C064: lea ecx, [ebp - 0x68] */ 2835 MEM32(ebp + (-0x68)) = edx; /* 0x3803C067: mov dword ptr [ebp - 0x68], edx */ 2836 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3803C06A: fstp dword ptr [ebp - 0x20] */ 2837 MEM32(ebp + (-0x64)) = eax; /* 0x3803C06D: mov dword ptr [ebp - 0x64], eax */ 2838 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803C070: call dword ptr [0x3804e4f4] */ 2839 RECOMP_FLAGS_IN(); 2840 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C076: fld dword ptr [ebp - 0x20] */ 2841 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3803C079: fmul dword ptr [ebp - 0x20] */ 2842 edx = MEM32(eax); /* 0x3803C07C: mov edx, dword ptr [eax] */ 2843 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C07E: fld dword ptr [ebp - 0x24] */ 2844 ecx = MEM32(eax + 0x4); /* 0x3803C081: mov ecx, dword ptr [eax + 4] */ 2845 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x3803C084: fmul dword ptr [ebp - 0x24] */ 2846 MEM32(ebp + (-0x54)) = edx; /* 0x3803C087: mov dword ptr [ebp - 0x54], edx */ 2847 edx = MEM32(eax + 0x8); /* 0x3803C08A: mov edx, dword ptr [eax + 8] */ 2848 MEM32(ebp + (-0x4C)) = edx; /* 0x3803C08D: mov dword ptr [ebp - 0x4c], edx */ 2849 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C090: faddp st(1) */ 2850 MEM32(ebp + (-0x50)) = ecx; /* 0x3803C092: mov dword ptr [ebp - 0x50], ecx */ 2851 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803C095: fld dword ptr [ebp - 0x28] */ 2852 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x3803C098: fmul dword ptr [ebp - 0x28] */ 2853 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C09B: faddp st(1) */ 2854 _st[0] = sqrt(_st[0]); /* 0x3803C09D: fsqrt */ 2855 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3803C09F: fld dword ptr [ebp - 0x4c] */ 2856 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x3803C0A2: fmul dword ptr [ebp - 0x4c] */ 2857 fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x3803C0A5: fld dword ptr [ebp - 0x50] */ 2858 _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x3803C0A8: fmul dword ptr [ebp - 0x50] */ 2859 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0AB: faddp st(1) */ 2860 fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x3803C0AD: fld dword ptr [ebp - 0x54] */ 2861 _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x3803C0B0: fmul dword ptr [ebp - 0x54] */ 2862 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0B3: faddp st(1) */ 2863 _st[0] = sqrt(_st[0]); /* 0x3803C0B5: fsqrt */ 2864 fp_xch(1); /* 0x3803C0B7: fxch st(1) */ 2865 fp_xch(1); /* 0x3803C0B9: fxch st(1) */ 2866 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803C0BB: fcompp */ 2867 fp_pop(); fp_pop(); 2868 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C0BD: fnstsw ax */ 2869 /* test HI8(eax), 0x41u */ /* 0x3803C0BF: test ah, 0x41 */ 2870 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 2871 _cf = 0; 2872 _flag_k = FK_NARROW(FK_TEST, 24); 2873 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C0C2: jne 0x3803c0e9 */ 2874 L_3803C0C4: 2875 eax = MEM32(ebp + (-0x3C)); /* 0x3803C0C4: mov eax, dword ptr [ebp - 0x3c] */ 2876 ecx = MEM32(ebp + (-0x38)); /* 0x3803C0C7: mov ecx, dword ptr [ebp - 0x38] */ 2877 edx = MEM32(ebp + (-0x34)); /* 0x3803C0CA: mov edx, dword ptr [ebp - 0x34] */ 2878 MEM32(ebx) = eax; /* 0x3803C0CD: mov dword ptr [ebx], eax */ 2879 eax = MEM32(ebp + 0x14); /* 0x3803C0CF: mov eax, dword ptr [ebp + 0x14] */ 2880 MEM32(ebx + 0x4) = ecx; /* 0x3803C0D2: mov dword ptr [ebx + 4], ecx */ 2881 ecx = MEM32(ebp + (-0x48)); /* 0x3803C0D5: mov ecx, dword ptr [ebp - 0x48] */ 2882 MEM32(ebx + 0x8) = edx; /* 0x3803C0D8: mov dword ptr [ebx + 8], edx */ 2883 edx = MEM32(ebp + (-0x44)); /* 0x3803C0DB: mov edx, dword ptr [ebp - 0x44] */ 2884 MEM32(eax) = ecx; /* 0x3803C0DE: mov dword ptr [eax], ecx */ 2885 ecx = MEM32(ebp + (-0x40)); /* 0x3803C0E0: mov ecx, dword ptr [ebp - 0x40] */ 2886 MEM32(eax + 0x4) = edx; /* 0x3803C0E3: mov dword ptr [eax + 4], edx */ 2887 MEM32(eax + 0x8) = ecx; /* 0x3803C0E6: mov dword ptr [eax + 8], ecx */ 2888 L_3803C0E9: 2889 edi = POP32_VAL(esp); /* 0x3803C0E9: pop edi */ 2890 esi = POP32_VAL(esp); /* 0x3803C0EA: pop esi */ 2891 SET_LO8(eax, 1); /* 0x3803C0EB: mov al, 1 */ 2892 ebx = POP32_VAL(esp); /* 0x3803C0ED: pop ebx */ 2893 esp = ebp; /* 0x3803C0EE: mov esp, ebp */ 2894 ebp = POP32_VAL(esp); /* 0x3803C0F0: pop ebp */ 2895 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C0F1: ret 0x18 */ 2896 L_3803C0F4: 2897 MEM32(ebp + (-0x54)) = 0xBF800000u; /* 0x3803C0F4: mov dword ptr [ebp - 0x54], 0xbf800000 */ 2898 eax = MEM32(ebp + (-0x54)); /* 0x3803C0FB: mov eax, dword ptr [ebp - 0x54] */ 2899 MEM32(ebp + (-0x50)) = 0xBF800000u; /* 0x3803C0FE: mov dword ptr [ebp - 0x50], 0xbf800000 */ 2900 ecx = MEM32(ebp + (-0x50)); /* 0x3803C105: mov ecx, dword ptr [ebp - 0x50] */ 2901 MEM32(ebp + (-0x4C)) = 0xBF800000u; /* 0x3803C108: mov dword ptr [ebp - 0x4c], 0xbf800000 */ 2902 edx = MEM32(ebp + (-0x4C)); /* 0x3803C10F: mov edx, dword ptr [ebp - 0x4c] */ 2903 MEM32(ebx) = eax; /* 0x3803C112: mov dword ptr [ebx], eax */ 2904 MEM32(ebx + 0x4) = ecx; /* 0x3803C114: mov dword ptr [ebx + 4], ecx */ 2905 MEM32(ebx + 0x8) = edx; /* 0x3803C117: mov dword ptr [ebx + 8], edx */ 2906 L_3803C11A: 2907 edi = POP32_VAL(esp); /* 0x3803C11A: pop edi */ 2908 esi = POP32_VAL(esp); /* 0x3803C11B: pop esi */ 2909 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 2910 SET_LO8(eax, 0); /* 0x3803C11C: xor al, al */ 2911 _cf = 0; 2912 _flag_k = FK_NARROW(FK_TEST, 24); 2913 ebx = POP32_VAL(esp); /* 0x3803C11E: pop ebx */ 2914 esp = ebp; /* 0x3803C11F: mov esp, ebp */ 2915 ebp = POP32_VAL(esp); /* 0x3803C121: pop ebp */ 2916 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C122: ret 0x18 */ 2917 RECOMP_REGS_OUT(); 2918 } 2919 2920 void sub_3803BAA9(void) { 2921 int _fpu_cmp = 0; 2922 uint32_t _cf = 0; 2923 int _df = 1; 2924 uint32_t _flag_k = FK_NONE; 2925 uint32_t _flag_a = 0, _flag_b = 0; 2926 uint32_t _itail_tgt = 0; 2927 RECOMP_REGS_LOCALS 2928 RECOMP_ENTER(0x3803BAA9u); 2929 2930 L_3803BAA9: 2931 edx = MEM32(ebp + (-0x4C)); /* 0x3803BAA9: mov edx, dword ptr [ebp - 0x4c] */ 2932 /* cmp edx, esi */ /* 0x3803BAAC: cmp edx, esi */ 2933 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(esi); 2934 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2935 _flag_k = FK_CMP; 2936 eax = MEM32(ebp + (-0x20)); /* 0x3803BAAE: mov eax, dword ptr [ebp - 0x20] */ 2937 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BABB; /* 0x3803BAB1: jne 0x3803babb */ 2938 L_3803BAB3: 2939 /* cmp eax, esi */ /* 0x3803BAB3: cmp eax, esi */ 2940 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 2941 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2942 _flag_k = FK_CMP; 2943 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BD03; /* 0x3803BAB5: je 0x3803bd03 */ 2944 L_3803BABB: 2945 /* test edx, eax */ /* 0x3803BABB: test edx, eax */ 2946 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 2947 _cf = 0; 2948 _flag_k = FK_TEST; 2949 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C11A; /* 0x3803BABD: jne 0x3803c11a */ 2950 L_3803BAC3: 2951 /* cmp edx, esi */ /* 0x3803BAC3: cmp edx, esi */ 2952 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(esi); 2953 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2954 _flag_k = FK_CMP; 2955 ecx = ebp + (-0x5C); /* 0x3803BAC5: lea ecx, [ebp - 0x5c] */ 2956 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BACD; /* 0x3803BAC8: jne 0x3803bacd */ 2957 L_3803BACA: 2958 ecx = ebp + (-0x30); /* 0x3803BACA: lea ecx, [ebp - 0x30] */ 2959 L_3803BACD: 2960 /* cmp MEM32(ecx), esi */ /* 0x3803BACD: cmp dword ptr [ecx], esi */ 2961 _flag_a = (uint32_t)(MEM32(ecx)); _flag_b = (uint32_t)(esi); 2962 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 2963 _flag_k = FK_CMP; 2964 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BB42; /* 0x3803BACF: je 0x3803bb42 */ 2965 L_3803BAD1: 2966 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BAD1: fld dword ptr [0x3806f010] */ 2967 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BAD7: fsub dword ptr [0x3806f030] */ 2968 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BADD: fcomp dword ptr [0x3804e8e4] */ 2969 fp_pop(); 2970 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BAE3: fnstsw ax */ 2971 /* test HI8(eax), 0x40u */ /* 0x3803BAE5: test ah, 0x40 */ 2972 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 2973 _cf = 0; 2974 _flag_k = FK_NARROW(FK_TEST, 24); 2975 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BB31; /* 0x3803BAE8: jne 0x3803bb31 */ 2976 L_3803BAEA: 2977 fp_push(*(float*)&MEM32(ebp + (-0x60))); /* 0x3803BAEA: fld dword ptr [ebp - 0x60] */ 2978 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BAED: fsub dword ptr [0x3806f030] */ 2979 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BAF3: fld dword ptr [0x3806f010] */ 2980 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BAF9: fsub dword ptr [0x3806f030] */ 2981 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x3803BAFF: fdivp st(1) */ 2982 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BB01: fld dword ptr [0x3806f008] */ 2983 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BB07: fsub dword ptr [0x3806f028] */ 2984 _st[0] *= _st[1]; /* 0x3803BB0D: fmul st(1) */ 2985 _st[0] += (double)*(float*)ADDR(0x3806F028); /* 0x3803BB0F: fadd dword ptr [0x3806f028] */ 2986 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BB15: fstp dword ptr [ebp + 0xc] */ 2987 fp_push(*(float*)&MEM32(0x3806F00C)); /* 0x3803BB18: fld dword ptr [0x3806f00c] */ 2988 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BB1E: fsub dword ptr [0x3806f02c] */ 2989 _st[0] *= _st[1]; /* 0x3803BB24: fmul st(1) */ 2990 _st[0] += (double)*(float*)ADDR(0x3806F02C); /* 0x3803BB26: fadd dword ptr [0x3806f02c] */ 2991 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BB2C: fstp dword ptr [ebp + 0x18] */ 2992 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BB2F: fstp st(0) */ 2993 L_3803BB31: 2994 fp_push(*(float*)&MEM32(ebp + (-0x60))); /* 0x3803BB31: fld dword ptr [ebp - 0x60] */ 2995 _st[0] -= (double)*(float*)ADDR(0x3804EA94); /* 0x3803BB34: fsub dword ptr [0x3804ea94] */ 2996 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x3803BB3A: fstp dword ptr [ebp + 8] */ 2997 goto L_3803BC90; /* 0x3803BB3D: jmp 0x3803bc90 */ 2998 L_3803BB42: 2999 /* cmp MEM32(ecx + 0x4), esi */ /* 0x3803BB42: cmp dword ptr [ecx + 4], esi */ 3000 _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(esi); 3001 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3002 _flag_k = FK_CMP; 3003 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BBB2; /* 0x3803BB45: je 0x3803bbb2 */ 3004 L_3803BB47: 3005 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BB47: fld dword ptr [0x3806f010] */ 3006 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BB4D: fsub dword ptr [0x3806f030] */ 3007 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BB53: fcomp dword ptr [0x3804e8e4] */ 3008 fp_pop(); 3009 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BB59: fnstsw ax */ 3010 /* test HI8(eax), 0x40u */ /* 0x3803BB5B: test ah, 0x40 */ 3011 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 3012 _cf = 0; 3013 _flag_k = FK_NARROW(FK_TEST, 24); 3014 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BBA7; /* 0x3803BB5E: jne 0x3803bba7 */ 3015 L_3803BB60: 3016 fp_push(*(float*)&MEM32(ebp + (-0x68))); /* 0x3803BB60: fld dword ptr [ebp - 0x68] */ 3017 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BB63: fsub dword ptr [0x3806f030] */ 3018 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BB69: fld dword ptr [0x3806f010] */ 3019 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BB6F: fsub dword ptr [0x3806f030] */ 3020 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x3803BB75: fdivp st(1) */ 3021 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BB77: fld dword ptr [0x3806f008] */ 3022 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BB7D: fsub dword ptr [0x3806f028] */ 3023 _st[0] *= _st[1]; /* 0x3803BB83: fmul st(1) */ 3024 _st[0] += (double)*(float*)ADDR(0x3806F028); /* 0x3803BB85: fadd dword ptr [0x3806f028] */ 3025 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BB8B: fstp dword ptr [ebp + 0xc] */ 3026 fp_push(*(float*)&MEM32(0x3806F00C)); /* 0x3803BB8E: fld dword ptr [0x3806f00c] */ 3027 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BB94: fsub dword ptr [0x3806f02c] */ 3028 _st[0] *= _st[1]; /* 0x3803BB9A: fmul st(1) */ 3029 _st[0] += (double)*(float*)ADDR(0x3806F02C); /* 0x3803BB9C: fadd dword ptr [0x3806f02c] */ 3030 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BBA2: fstp dword ptr [ebp + 0x18] */ 3031 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BBA5: fstp st(0) */ 3032 L_3803BBA7: 3033 eax = MEM32(ebp + (-0x68)); /* 0x3803BBA7: mov eax, dword ptr [ebp - 0x68] */ 3034 MEM32(ebp + 0x8) = eax; /* 0x3803BBAA: mov dword ptr [ebp + 8], eax */ 3035 goto L_3803BC90; /* 0x3803BBAD: jmp 0x3803bc90 */ 3036 L_3803BBB2: 3037 /* cmp MEM32(ecx + 0x8), esi */ /* 0x3803BBB2: cmp dword ptr [ecx + 8], esi */ 3038 _flag_a = (uint32_t)(MEM32(ecx + 0x8)); _flag_b = (uint32_t)(esi); 3039 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3040 _flag_k = FK_CMP; 3041 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BC25; /* 0x3803BBB5: je 0x3803bc25 */ 3042 L_3803BBB7: 3043 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BBB7: fld dword ptr [0x3806f008] */ 3044 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BBBD: fsub dword ptr [0x3806f028] */ 3045 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BBC3: fcomp dword ptr [0x3804e8e4] */ 3046 fp_pop(); 3047 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BBC9: fnstsw ax */ 3048 /* test HI8(eax), 0x40u */ /* 0x3803BBCB: test ah, 0x40 */ 3049 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 3050 _cf = 0; 3051 _flag_k = FK_NARROW(FK_TEST, 24); 3052 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BC17; /* 0x3803BBCE: jne 0x3803bc17 */ 3053 L_3803BBD0: 3054 fp_push(*(float*)&MEM32(ebp + (-0x64))); /* 0x3803BBD0: fld dword ptr [ebp - 0x64] */ 3055 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BBD3: fsub dword ptr [0x3806f028] */ 3056 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BBD9: fld dword ptr [0x3806f008] */ 3057 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BBDF: fsub dword ptr [0x3806f028] */ 3058 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x3803BBE5: fdivp st(1) */ 3059 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BBE7: fld dword ptr [0x3806f010] */ 3060 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BBED: fsub dword ptr [0x3806f030] */ 3061 _st[0] *= _st[1]; /* 0x3803BBF3: fmul st(1) */ 3062 _st[0] += (double)*(float*)ADDR(0x3806F030); /* 0x3803BBF5: fadd dword ptr [0x3806f030] */ 3063 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x3803BBFB: fstp dword ptr [ebp + 8] */ 3064 fp_push(*(float*)&MEM32(0x3806F00C)); /* 0x3803BBFE: fld dword ptr [0x3806f00c] */ 3065 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BC04: fsub dword ptr [0x3806f02c] */ 3066 _st[0] *= _st[1]; /* 0x3803BC0A: fmul st(1) */ 3067 _st[0] += (double)*(float*)ADDR(0x3806F02C); /* 0x3803BC0C: fadd dword ptr [0x3806f02c] */ 3068 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BC12: fstp dword ptr [ebp + 0x18] */ 3069 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BC15: fstp st(0) */ 3070 L_3803BC17: 3071 fp_push(*(float*)&MEM32(ebp + (-0x64))); /* 0x3803BC17: fld dword ptr [ebp - 0x64] */ 3072 _st[0] -= (double)*(float*)ADDR(0x3804EA94); /* 0x3803BC1A: fsub dword ptr [0x3804ea94] */ 3073 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BC20: fstp dword ptr [ebp + 0xc] */ 3074 goto L_3803BC90; /* 0x3803BC23: jmp 0x3803bc90 */ 3075 L_3803BC25: 3076 /* cmp MEM32(ecx + 0xC), esi */ /* 0x3803BC25: cmp dword ptr [ecx + 0xc], esi */ 3077 _flag_a = (uint32_t)(MEM32(ecx + 0xC)); _flag_b = (uint32_t)(esi); 3078 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3079 _flag_k = FK_CMP; 3080 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BC90; /* 0x3803BC28: je 0x3803bc90 */ 3081 L_3803BC2A: 3082 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BC2A: fld dword ptr [0x3806f008] */ 3083 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BC30: fsub dword ptr [0x3806f028] */ 3084 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BC36: fcomp dword ptr [0x3804e8e4] */ 3085 fp_pop(); 3086 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BC3C: fnstsw ax */ 3087 /* test HI8(eax), 0x40u */ /* 0x3803BC3E: test ah, 0x40 */ 3088 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 3089 _cf = 0; 3090 _flag_k = FK_NARROW(FK_TEST, 24); 3091 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BC8A; /* 0x3803BC41: jne 0x3803bc8a */ 3092 L_3803BC43: 3093 fp_push(*(float*)&MEM32(ebp + (-0x6C))); /* 0x3803BC43: fld dword ptr [ebp - 0x6c] */ 3094 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BC46: fsub dword ptr [0x3806f028] */ 3095 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BC4C: fld dword ptr [0x3806f008] */ 3096 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BC52: fsub dword ptr [0x3806f028] */ 3097 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x3803BC58: fdivp st(1) */ 3098 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BC5A: fld dword ptr [0x3806f010] */ 3099 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BC60: fsub dword ptr [0x3806f030] */ 3100 _st[0] *= _st[1]; /* 0x3803BC66: fmul st(1) */ 3101 _st[0] += (double)*(float*)ADDR(0x3806F030); /* 0x3803BC68: fadd dword ptr [0x3806f030] */ 3102 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x3803BC6E: fstp dword ptr [ebp + 8] */ 3103 fp_push(*(float*)&MEM32(0x3806F00C)); /* 0x3803BC71: fld dword ptr [0x3806f00c] */ 3104 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BC77: fsub dword ptr [0x3806f02c] */ 3105 _st[0] *= _st[1]; /* 0x3803BC7D: fmul st(1) */ 3106 _st[0] += (double)*(float*)ADDR(0x3806F02C); /* 0x3803BC7F: fadd dword ptr [0x3806f02c] */ 3107 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BC85: fstp dword ptr [ebp + 0x18] */ 3108 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BC88: fstp st(0) */ 3109 L_3803BC8A: 3110 eax = MEM32(ebp + (-0x6C)); /* 0x3803BC8A: mov eax, dword ptr [ebp - 0x6c] */ 3111 MEM32(ebp + 0xC) = eax; /* 0x3803BC8D: mov dword ptr [ebp + 0xc], eax */ 3112 L_3803BC90: 3113 /* cmp MEM32(ecx + 0x10), edx */ /* 0x3803BC90: cmp dword ptr [ecx + 0x10], edx */ 3114 _flag_a = (uint32_t)(MEM32(ecx + 0x10)); _flag_b = (uint32_t)(edx); 3115 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3116 _flag_k = FK_CMP; 3117 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BCCB; /* 0x3803BC93: jne 0x3803bccb */ 3118 L_3803BC95: 3119 ecx = MEM32(ebp + 0xC); /* 0x3803BC95: mov ecx, dword ptr [ebp + 0xc] */ 3120 edx = MEM32(ebp + 0x18); /* 0x3803BC98: mov edx, dword ptr [ebp + 0x18] */ 3121 eax = MEM32(ebp + 0x8); /* 0x3803BC9B: mov eax, dword ptr [ebp + 8] */ 3122 MEM32(0x3806F028) = ecx; /* 0x3803BC9E: mov dword ptr [0x3806f028], ecx */ 3123 ecx = ebp + (-0x6C); /* 0x3803BCA4: lea ecx, [ebp - 0x6c] */ 3124 PUSH32(esp, ecx); /* 0x3803BCA7: push ecx */ 3125 MEM32(0x3806F02C) = edx; /* 0x3803BCA8: mov dword ptr [0x3806f02c], edx */ 3126 edx = eax; /* 0x3803BCAE: mov edx, eax */ 3127 MEM32(0x3806F030) = eax; /* 0x3803BCB0: mov dword ptr [0x3806f030], eax */ 3128 eax = MEM32(ebp + 0xC); /* 0x3803BCB5: mov eax, dword ptr [ebp + 0xc] */ 3129 PUSH32(esp, edx); /* 0x3803BCB8: push edx */ 3130 PUSH32(esp, eax); /* 0x3803BCB9: push eax */ 3131 ecx = ebp + (-0x5C); /* 0x3803BCBA: lea ecx, [ebp - 0x5c] */ 3132 PUSH32(esp, ecx); /* 0x3803BCBD: push ecx */ 3133 RECOMP_ICALL(0x3803C150u); /* 0x3803BCBE: call 0x3803c150 */ /* not lifted */ 3134 RECOMP_FLAGS_IN(); 3135 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 3136 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3137 esp = esp + 0x10u; /* 0x3803BCC3: add esp, 0x10 */ 3138 _flag_k = FK_ADD; 3139 RECOMP_BACKEDGE(); 3140 goto L_3803BAA9; /* 0x3803BCC6: jmp 0x3803baa9 */ 3141 L_3803BCCB: 3142 edx = MEM32(ebp + 0xC); /* 0x3803BCCB: mov edx, dword ptr [ebp + 0xc] */ 3143 eax = MEM32(ebp + 0x18); /* 0x3803BCCE: mov eax, dword ptr [ebp + 0x18] */ 3144 ecx = MEM32(ebp + 0x8); /* 0x3803BCD1: mov ecx, dword ptr [ebp + 8] */ 3145 MEM32(0x3806F008) = edx; /* 0x3803BCD4: mov dword ptr [0x3806f008], edx */ 3146 edx = ebp + (-0x6C); /* 0x3803BCDA: lea edx, [ebp - 0x6c] */ 3147 PUSH32(esp, edx); /* 0x3803BCDD: push edx */ 3148 MEM32(0x3806F00C) = eax; /* 0x3803BCDE: mov dword ptr [0x3806f00c], eax */ 3149 eax = ecx; /* 0x3803BCE3: mov eax, ecx */ 3150 MEM32(0x3806F010) = ecx; /* 0x3803BCE5: mov dword ptr [0x3806f010], ecx */ 3151 ecx = MEM32(ebp + 0xC); /* 0x3803BCEB: mov ecx, dword ptr [ebp + 0xc] */ 3152 PUSH32(esp, eax); /* 0x3803BCEE: push eax */ 3153 PUSH32(esp, ecx); /* 0x3803BCEF: push ecx */ 3154 edx = ebp + (-0x30); /* 0x3803BCF0: lea edx, [ebp - 0x30] */ 3155 PUSH32(esp, edx); /* 0x3803BCF3: push edx */ 3156 RECOMP_ICALL(0x3803C150u); /* 0x3803BCF4: call 0x3803c150 */ /* not lifted */ 3157 RECOMP_FLAGS_IN(); 3158 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 3159 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3160 esp = esp + 0x10u; /* 0x3803BCF9: add esp, 0x10 */ 3161 _flag_k = FK_ADD; 3162 RECOMP_BACKEDGE(); 3163 goto L_3803BAA9; /* 0x3803BCFC: jmp 0x3803baa9 */ 3164 L_3803BD03: 3165 ecx = MEM32(edi + 0xC); /* 0x3803BD03: mov ecx, dword ptr [edi + 0xc] */ 3166 /* cmp ecx, esi */ /* 0x3803BD06: cmp ecx, esi */ 3167 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi); 3168 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3169 _flag_k = FK_CMP; 3170 MEM32(ebp + (-0x3C)) = 0; /* 0x3803BD08: mov dword ptr [ebp - 0x3c], 0 */ 3171 MEM32(ebp + (-0x38)) = 0; /* 0x3803BD0F: mov dword ptr [ebp - 0x38], 0 */ 3172 MEM32(ebp + (-0x34)) = 0; /* 0x3803BD16: mov dword ptr [ebp - 0x34], 0 */ 3173 MEM32(ebp + (-0x48)) = 0; /* 0x3803BD1D: mov dword ptr [ebp - 0x48], 0 */ 3174 MEM32(ebp + (-0x44)) = 0; /* 0x3803BD24: mov dword ptr [ebp - 0x44], 0 */ 3175 MEM32(ebp + (-0x40)) = 0; /* 0x3803BD2B: mov dword ptr [ebp - 0x40], 0 */ 3176 MEM8(ebp + 0xB) = (uint8_t)(0); /* 0x3803BD32: mov byte ptr [ebp + 0xb], 0 */ 3177 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BD57; /* 0x3803BD36: je 0x3803bd57 */ 3178 L_3803BD38: 3179 edx = MEM32(ebp + 0x1C); /* 0x3803BD38: mov edx, dword ptr [ebp + 0x1c] */ 3180 eax = MEM32(ecx); /* 0x3803BD3B: mov eax, dword ptr [ecx] */ 3181 PUSH32(esp, edx); /* 0x3803BD3D: push edx */ 3182 PUSH32(esp, ebx); /* 0x3803BD3E: push ebx */ 3183 edx = ebp + (-0x48); /* 0x3803BD3F: lea edx, [ebp - 0x48] */ 3184 PUSH32(esp, edx); /* 0x3803BD42: push edx */ 3185 edx = ebp + (-0x3C); /* 0x3803BD43: lea edx, [ebp - 0x3c] */ 3186 PUSH32(esp, edx); /* 0x3803BD46: push edx */ 3187 PUSH32(esp, 0x3806F008u); /* 0x3803BD47: push 0x3806f008 */ 3188 PUSH32(esp, 0x3806F028u); /* 0x3803BD4C: push 0x3806f028 */ 3189 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x3803BD51: call dword ptr [eax + 0x10] */ 3190 RECOMP_FLAGS_IN(); 3191 MEM8(ebp + 0xB) = (uint8_t)(LO8(eax)); /* 0x3803BD54: mov byte ptr [ebp + 0xb], al */ 3192 L_3803BD57: 3193 fp_push(*(float*)&MEM32(0x3806F028)); /* 0x3803BD57: fld dword ptr [0x3806f028] */ 3194 _st[0] /= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BD5D: fdiv dword ptr [ebp - 4] */ 3195 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BD60: fstp dword ptr [ebp + 0x18] */ 3196 fp_push(*(float*)&MEM32(0x3806F030)); /* 0x3803BD63: fld dword ptr [0x3806f030] */ 3197 _st[0] /= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BD69: fdiv dword ptr [ebp - 4] */ 3198 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x1C) = _v; } /* 0x3803BD6C: fstp dword ptr [ebp + 0x1c] */ 3199 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BD6F: fld dword ptr [0x3806f008] */ 3200 _st[0] /= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BD75: fdiv dword ptr [ebp - 4] */ 3201 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BD78: fld dword ptr [0x3806f010] */ 3202 _st[0] /= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BD7E: fdiv dword ptr [ebp - 4] */ 3203 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BD81: fstp dword ptr [ebp + 0xc] */ 3204 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BD84: fld dword ptr [ebp + 0x18] */ 3205 RECOMP_ICALL(0x3804B688u); /* 0x3803BD87: call 0x3804b688 */ /* not lifted */ 3206 RECOMP_FLAGS_IN(); 3207 fp_push(*(float*)&MEM32(ebp + 0x1C)); /* 0x3803BD8C: fld dword ptr [ebp + 0x1c] */ 3208 edi = eax; /* 0x3803BD8F: mov edi, eax */ 3209 RECOMP_ICALL(0x3804B688u); /* 0x3803BD91: call 0x3804b688 */ /* not lifted */ 3210 RECOMP_FLAGS_IN(); 3211 fp_push(_st[0]); /* 0x3803BD96: fld st(0) */ 3212 esi = eax; /* 0x3803BD98: mov esi, eax */ 3213 RECOMP_ICALL(0x3804B688u); /* 0x3803BD9A: call 0x3804b688 */ /* not lifted */ 3214 RECOMP_FLAGS_IN(); 3215 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x3803BD9F: fld dword ptr [ebp + 0xc] */ 3216 ebx = eax; /* 0x3803BDA2: mov ebx, eax */ 3217 RECOMP_ICALL(0x3804B688u); /* 0x3803BDA4: call 0x3804b688 */ /* not lifted */ 3218 RECOMP_FLAGS_IN(); 3219 _st[0] -= (double)*(float*)ADDR(ebp + 0x18); /* 0x3803BDA9: fsub dword ptr [ebp + 0x18] */ 3220 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x3803BDAC: fld dword ptr [ebp + 0xc] */ 3221 MEM32(ebp + (-0x10)) = eax; /* 0x3803BDAF: mov dword ptr [ebp - 0x10], eax */ 3222 _st[0] -= (double)*(float*)ADDR(ebp + 0x1C); /* 0x3803BDB2: fsub dword ptr [ebp + 0x1c] */ 3223 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BDB5: fstp dword ptr [ebp + 0xc] */ 3224 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BDB8: fcom dword ptr [0x3804e8e4] */ 3225 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BDBE: fnstsw ax */ 3226 /* test HI8(eax), 1 */ /* 0x3803BDC0: test ah, 1 */ 3227 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 3228 _cf = 0; 3229 _flag_k = FK_NARROW(FK_TEST, 24); 3230 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BDF6; /* 0x3803BDC3: jne 0x3803bdf6 */ 3231 L_3803BDC5: 3232 fp_push(*(float*)&MEM32(0x3804EABC)); /* 0x3803BDC5: fld dword ptr [0x3804eabc] */ 3233 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3234 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3235 esp = esp - 8; /* 0x3803BDCB: sub esp, 8 */ 3236 _flag_k = FK_CMP; 3237 _st[0] /= _st[1]; /* 0x3803BDCE: fdiv st(1) */ 3238 MEM32(ebp + (-0x8)) = 1; /* 0x3803BDD0: mov dword ptr [ebp - 8], 1 */ 3239 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3803BDD7: fstp dword ptr [ebp - 4] */ 3240 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BDDA: fstp st(0) */ 3241 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BDDC: fld dword ptr [ebp + 0x18] */ 3242 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x3803BDDF: fstp qword ptr [esp] */ 3243 RECOMP_ICALL(MEM32(0x3804E0AC)); /* 0x3803BDE2: call dword ptr [0x3804e0ac] */ 3244 RECOMP_FLAGS_IN(); 3245 _st[0] += (double)*(float*)ADDR(0x3804E8CC); /* 0x3803BDE8: fadd dword ptr [0x3804e8cc] */ 3246 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3247 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3248 esp = esp + 8; /* 0x3803BDEE: add esp, 8 */ 3249 _flag_k = FK_ADD; 3250 _st[0] -= (double)*(float*)ADDR(ebp + 0x18); /* 0x3803BDF1: fsub dword ptr [ebp + 0x18] */ 3251 goto L_3803BE1F; /* 0x3803BDF4: jmp 0x3803be1f */ 3252 L_3803BDF6: 3253 fp_push(*(float*)&MEM32(0x3804F7A0)); /* 0x3803BDF6: fld dword ptr [0x3804f7a0] */ 3254 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3255 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3256 esp = esp - 8; /* 0x3803BDFC: sub esp, 8 */ 3257 _flag_k = FK_CMP; 3258 _st[0] /= _st[1]; /* 0x3803BDFF: fdiv st(1) */ 3259 MEM32(ebp + (-0x8)) = 0xFFFFFFFFu; /* 0x3803BE01: mov dword ptr [ebp - 8], 0xffffffff */ 3260 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3803BE08: fstp dword ptr [ebp - 4] */ 3261 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BE0B: fstp st(0) */ 3262 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BE0D: fld dword ptr [ebp + 0x18] */ 3263 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x3803BE10: fstp qword ptr [esp] */ 3264 RECOMP_ICALL(MEM32(0x3804E0AC)); /* 0x3803BE13: call dword ptr [0x3804e0ac] */ 3265 RECOMP_FLAGS_IN(); 3266 _st[0] = (double)*(float*)ADDR(ebp + 0x18) - _st[0]; /* 0x3803BE19: fsubr dword ptr [ebp + 0x18] */ 3267 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3268 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3269 esp = esp + 8; /* 0x3803BE1C: add esp, 8 */ 3270 _flag_k = FK_ADD; 3271 L_3803BE1F: 3272 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BE1F: fmul dword ptr [ebp - 4] */ 3273 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BE22: fstp dword ptr [ebp + 0x18] */ 3274 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x3803BE25: fld dword ptr [ebp + 0xc] */ 3275 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BE28: fcomp dword ptr [0x3804e8e4] */ 3276 fp_pop(); 3277 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BE2E: fnstsw ax */ 3278 /* test HI8(eax), 1 */ /* 0x3803BE30: test ah, 1 */ 3279 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 3280 _cf = 0; 3281 _flag_k = FK_NARROW(FK_TEST, 24); 3282 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BE65; /* 0x3803BE33: jne 0x3803be65 */ 3283 L_3803BE35: 3284 fp_push(*(float*)&MEM32(0x3804EABC)); /* 0x3803BE35: fld dword ptr [0x3804eabc] */ 3285 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3286 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3287 esp = esp - 8; /* 0x3803BE3B: sub esp, 8 */ 3288 _flag_k = FK_CMP; 3289 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BE3E: fdiv dword ptr [ebp + 0xc] */ 3290 MEM32(ebp + (-0xC)) = 1; /* 0x3803BE41: mov dword ptr [ebp - 0xc], 1 */ 3291 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BE48: fstp dword ptr [ebp + 0xc] */ 3292 fp_push(*(float*)&MEM32(ebp + 0x1C)); /* 0x3803BE4B: fld dword ptr [ebp + 0x1c] */ 3293 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x3803BE4E: fstp qword ptr [esp] */ 3294 RECOMP_ICALL(MEM32(0x3804E0AC)); /* 0x3803BE51: call dword ptr [0x3804e0ac] */ 3295 RECOMP_FLAGS_IN(); 3296 _st[0] += (double)*(float*)ADDR(0x3804E8CC); /* 0x3803BE57: fadd dword ptr [0x3804e8cc] */ 3297 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3298 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3299 esp = esp + 8; /* 0x3803BE5D: add esp, 8 */ 3300 _flag_k = FK_ADD; 3301 _st[0] -= (double)*(float*)ADDR(ebp + 0x1C); /* 0x3803BE60: fsub dword ptr [ebp + 0x1c] */ 3302 goto L_3803BE92; /* 0x3803BE63: jmp 0x3803be92 */ 3303 L_3803BE65: 3304 fp_push(*(float*)&MEM32(0x3804F7A0)); /* 0x3803BE65: fld dword ptr [0x3804f7a0] */ 3305 MEM32(ebp + (-0xC)) = 0xFFFFFFFFu; /* 0x3803BE6B: mov dword ptr [ebp - 0xc], 0xffffffff */ 3306 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BE72: fdiv dword ptr [ebp + 0xc] */ 3307 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BE75: fstp dword ptr [ebp + 0xc] */ 3308 fp_push(*(float*)&MEM32(ebp + 0x1C)); /* 0x3803BE78: fld dword ptr [ebp + 0x1c] */ 3309 { double _v = fp_pop(); *(double*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803BE7B: fstp qword ptr [ebp - 0x24] */ 3310 eax = MEM32(ebp + (-0x20)); /* 0x3803BE7E: mov eax, dword ptr [ebp - 0x20] */ 3311 ecx = MEM32(ebp + (-0x24)); /* 0x3803BE81: mov ecx, dword ptr [ebp - 0x24] */ 3312 PUSH32(esp, eax); /* 0x3803BE84: push eax */ 3313 PUSH32(esp, ecx); /* 0x3803BE85: push ecx */ 3314 RECOMP_ICALL(MEM32(0x3804E0AC)); /* 0x3803BE86: call dword ptr [0x3804e0ac] */ 3315 RECOMP_FLAGS_IN(); 3316 _st[0] = *(double*)ADDR(ebp + (-0x24)) - _st[0]; /* 0x3803BE8C: fsubr qword ptr [ebp - 0x24] */ 3317 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3318 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3319 esp = esp + 8; /* 0x3803BE8F: add esp, 8 */ 3320 _flag_k = FK_ADD; 3321 L_3803BE92: 3322 eax = MEM32(ebp + (-0x10)); /* 0x3803BE92: mov eax, dword ptr [ebp - 0x10] */ 3323 _st[0] *= (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BE95: fmul dword ptr [ebp + 0xc] */ 3324 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 3325 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3326 eax = eax - esi; /* 0x3803BE98: sub eax, esi */ 3327 _flag_k = FK_CMP; 3328 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x3803BE9A: cdq */ 3329 ecx = eax; /* 0x3803BE9B: mov ecx, eax */ 3330 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x1C) = _v; } /* 0x3803BE9D: fstp dword ptr [ebp + 0x1c] */ 3331 _flag_a = (uint32_t)((ecx ^ edx)); _flag_b = (uint32_t)((ecx ^ edx)); 3332 ecx = ecx ^ edx; /* 0x3803BEA0: xor ecx, edx */ 3333 _cf = 0; 3334 _flag_k = FK_TEST; 3335 eax = ebx; /* 0x3803BEA2: mov eax, ebx */ 3336 ebx = MEM32(ebp + 0x10); /* 0x3803BEA4: mov ebx, dword ptr [ebp + 0x10] */ 3337 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 3338 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3339 eax = eax - edi; /* 0x3803BEA7: sub eax, edi */ 3340 _flag_k = FK_CMP; 3341 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 3342 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3343 ecx = ecx - edx; /* 0x3803BEA9: sub ecx, edx */ 3344 _flag_k = FK_CMP; 3345 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x3803BEAB: cdq */ 3346 _flag_a = (uint32_t)((eax ^ edx)); _flag_b = (uint32_t)((eax ^ edx)); 3347 eax = eax ^ edx; /* 0x3803BEAC: xor eax, edx */ 3348 _cf = 0; 3349 _flag_k = FK_TEST; 3350 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 3351 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3352 eax = eax - edx; /* 0x3803BEAE: sub eax, edx */ 3353 _flag_k = FK_CMP; 3354 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 3355 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3356 ecx = ecx + eax; /* 0x3803BEB0: add ecx, eax */ 3357 _flag_k = FK_ADD; 3358 MEM32(ebp + (-0x10)) = ecx; /* 0x3803BEB2: mov dword ptr [ebp - 0x10], ecx */ 3359 if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_S)) goto L_3803BFD9; /* 0x3803BEB5: js 0x3803bfd9 */ 3360 L_3803BEBB: 3361 /* test edi, edi */ /* 0x3803BEBB: test edi, edi */ 3362 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 3363 _cf = 0; 3364 _flag_k = FK_TEST; 3365 if (TEST_S(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BEBD: jl 0x3803bfa4 */ 3366 L_3803BEC3: 3367 /* cmp edi, MEM32(ebp + (-0x14)) */ /* 0x3803BEC3: cmp edi, dword ptr [ebp - 0x14] */ 3368 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebp + (-0x14))); 3369 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3370 _flag_k = FK_CMP; 3371 if (CMP_GE(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BEC6: jge 0x3803bfa4 */ 3372 L_3803BECC: 3373 /* test esi, esi */ /* 0x3803BECC: test esi, esi */ 3374 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 3375 _cf = 0; 3376 _flag_k = FK_TEST; 3377 if (TEST_S(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BECE: jl 0x3803bfa4 */ 3378 L_3803BED4: 3379 /* cmp esi, MEM32(ebp + (-0x18)) */ /* 0x3803BED4: cmp esi, dword ptr [ebp - 0x18] */ 3380 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(ebp + (-0x18))); 3381 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3382 _flag_k = FK_CMP; 3383 if (CMP_GE(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BED7: jge 0x3803bfa4 */ 3384 L_3803BEDD: 3385 edx = MEM32(ebp + 0x14); /* 0x3803BEDD: mov edx, dword ptr [ebp + 0x14] */ 3386 ecx = MEM32(ebp + (-0x1C)); /* 0x3803BEE0: mov ecx, dword ptr [ebp - 0x1c] */ 3387 PUSH32(esp, edx); /* 0x3803BEE3: push edx */ 3388 PUSH32(esp, ebx); /* 0x3803BEE4: push ebx */ 3389 PUSH32(esp, esi); /* 0x3803BEE5: push esi */ 3390 PUSH32(esp, edi); /* 0x3803BEE6: push edi */ 3391 RECOMP_ICALL(0x3803C220u); /* 0x3803BEE7: call 0x3803c220 */ /* not lifted */ 3392 RECOMP_FLAGS_IN(); 3393 /* cmp LO8(eax), 1 */ /* 0x3803BEEC: cmp al, 1 */ 3394 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 3395 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3396 _flag_k = FK_NARROW(FK_CMP, 24); 3397 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BFA1; /* 0x3803BEEE: jne 0x3803bfa1 */ 3398 L_3803BEF4: 3399 eax = ebx; /* 0x3803BEF4: mov eax, ebx */ 3400 ecx = MEM32(eax); /* 0x3803BEF6: mov ecx, dword ptr [eax] */ 3401 edx = MEM32(eax + 0x4); /* 0x3803BEF8: mov edx, dword ptr [eax + 4] */ 3402 eax = MEM32(eax + 0x8); /* 0x3803BEFB: mov eax, dword ptr [eax + 8] */ 3403 MEM32(ebp + (-0x28)) = ecx; /* 0x3803BEFE: mov dword ptr [ebp - 0x28], ecx */ 3404 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803BF01: fld dword ptr [ebp - 0x28] */ 3405 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BF04: fsub dword ptr [0x3806f028] */ 3406 ecx = MEM32(0x3806F008); /* 0x3803BF0A: mov ecx, dword ptr [0x3806f008] */ 3407 MEM32(ebp + (-0x24)) = edx; /* 0x3803BF10: mov dword ptr [ebp - 0x24], edx */ 3408 edx = MEM32(0x3806F00C); /* 0x3803BF13: mov edx, dword ptr [0x3806f00c] */ 3409 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3803BF19: fstp dword ptr [ebp - 0x28] */ 3410 MEM32(ebp + (-0x20)) = eax; /* 0x3803BF1C: mov dword ptr [ebp - 0x20], eax */ 3411 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803BF1F: fld dword ptr [ebp - 0x24] */ 3412 eax = MEM32(0x3806F010); /* 0x3803BF22: mov eax, dword ptr [0x3806f010] */ 3413 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BF27: fsub dword ptr [0x3806f02c] */ 3414 MEM32(ebp + (-0x68)) = ecx; /* 0x3803BF2D: mov dword ptr [ebp - 0x68], ecx */ 3415 PUSH32(esp, 0x3806F028u); /* 0x3803BF30: push 0x3806f028 */ 3416 ecx = ebp + (-0x68); /* 0x3803BF35: lea ecx, [ebp - 0x68] */ 3417 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803BF38: fstp dword ptr [ebp - 0x24] */ 3418 MEM32(ebp + (-0x64)) = edx; /* 0x3803BF3B: mov dword ptr [ebp - 0x64], edx */ 3419 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803BF3E: fld dword ptr [ebp - 0x20] */ 3420 MEM32(ebp + (-0x60)) = eax; /* 0x3803BF41: mov dword ptr [ebp - 0x60], eax */ 3421 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BF44: fsub dword ptr [0x3806f030] */ 3422 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3803BF4A: fstp dword ptr [ebp - 0x20] */ 3423 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803BF4D: call dword ptr [0x3804e4f4] */ 3424 RECOMP_FLAGS_IN(); 3425 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803BF53: fld dword ptr [ebp - 0x20] */ 3426 ecx = MEM32(eax); /* 0x3803BF56: mov ecx, dword ptr [eax] */ 3427 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3803BF58: fmul dword ptr [ebp - 0x20] */ 3428 edx = MEM32(eax + 0x4); /* 0x3803BF5B: mov edx, dword ptr [eax + 4] */ 3429 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803BF5E: fld dword ptr [ebp - 0x24] */ 3430 eax = MEM32(eax + 0x8); /* 0x3803BF61: mov eax, dword ptr [eax + 8] */ 3431 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x3803BF64: fmul dword ptr [ebp - 0x24] */ 3432 MEM32(ebp + (-0x4C)) = eax; /* 0x3803BF67: mov dword ptr [ebp - 0x4c], eax */ 3433 MEM32(ebp + (-0x50)) = edx; /* 0x3803BF6A: mov dword ptr [ebp - 0x50], edx */ 3434 MEM32(ebp + (-0x54)) = ecx; /* 0x3803BF6D: mov dword ptr [ebp - 0x54], ecx */ 3435 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF70: faddp st(1) */ 3436 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803BF72: fld dword ptr [ebp - 0x28] */ 3437 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x3803BF75: fmul dword ptr [ebp - 0x28] */ 3438 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF78: faddp st(1) */ 3439 _st[0] = sqrt(_st[0]); /* 0x3803BF7A: fsqrt */ 3440 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3803BF7C: fld dword ptr [ebp - 0x4c] */ 3441 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x3803BF7F: fmul dword ptr [ebp - 0x4c] */ 3442 fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x3803BF82: fld dword ptr [ebp - 0x50] */ 3443 _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x3803BF85: fmul dword ptr [ebp - 0x50] */ 3444 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF88: faddp st(1) */ 3445 fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x3803BF8A: fld dword ptr [ebp - 0x54] */ 3446 _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x3803BF8D: fmul dword ptr [ebp - 0x54] */ 3447 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF90: faddp st(1) */ 3448 _st[0] = sqrt(_st[0]); /* 0x3803BF92: fsqrt */ 3449 fp_xch(1); /* 0x3803BF94: fxch st(1) */ 3450 fp_xch(1); /* 0x3803BF96: fxch st(1) */ 3451 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803BF98: fcompp */ 3452 fp_pop(); fp_pop(); 3453 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BF9A: fnstsw ax */ 3454 /* test HI8(eax), 0x41u */ /* 0x3803BF9C: test ah, 0x41 */ 3455 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 3456 _cf = 0; 3457 _flag_k = FK_NARROW(FK_TEST, 24); 3458 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C014; /* 0x3803BF9F: je 0x3803c014 */ 3459 L_3803BFA1: 3460 ecx = MEM32(ebp + (-0x10)); /* 0x3803BFA1: mov ecx, dword ptr [ebp - 0x10] */ 3461 L_3803BFA4: 3462 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BFA4: fld dword ptr [ebp + 0x18] */ 3463 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0x1C)); /* 0x3803BFA7: fcomp dword ptr [ebp + 0x1c] */ 3464 fp_pop(); 3465 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BFAA: fnstsw ax */ 3466 /* test HI8(eax), 1 */ /* 0x3803BFAC: test ah, 1 */ 3467 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 3468 _cf = 0; 3469 _flag_k = FK_NARROW(FK_TEST, 24); 3470 if (TEST_Z(_flag_a, _flag_b)) goto L_3803BFC1; /* 0x3803BFAF: je 0x3803bfc1 */ 3471 L_3803BFB1: 3472 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BFB1: fld dword ptr [ebp + 0x18] */ 3473 eax = MEM32(ebp + (-0x8)); /* 0x3803BFB4: mov eax, dword ptr [ebp - 8] */ 3474 _st[0] += (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BFB7: fadd dword ptr [ebp - 4] */ 3475 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 3476 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3477 edi = edi + eax; /* 0x3803BFBA: add edi, eax */ 3478 _flag_k = FK_ADD; 3479 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BFBC: fstp dword ptr [ebp + 0x18] */ 3480 goto L_3803BFCF; /* 0x3803BFBF: jmp 0x3803bfcf */ 3481 L_3803BFC1: 3482 fp_push(*(float*)&MEM32(ebp + 0x1C)); /* 0x3803BFC1: fld dword ptr [ebp + 0x1c] */ 3483 eax = MEM32(ebp + (-0xC)); /* 0x3803BFC4: mov eax, dword ptr [ebp - 0xc] */ 3484 _st[0] += (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BFC7: fadd dword ptr [ebp + 0xc] */ 3485 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 3486 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3487 esi = esi + eax; /* 0x3803BFCA: add esi, eax */ 3488 _flag_k = FK_ADD; 3489 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x1C) = _v; } /* 0x3803BFCC: fstp dword ptr [ebp + 0x1c] */ 3490 L_3803BFCF: 3491 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 3492 ecx = ecx - 1; /* 0x3803BFCF: dec ecx */ 3493 _flag_k = FK_DEC; 3494 MEM32(ebp + (-0x10)) = ecx; /* 0x3803BFD0: mov dword ptr [ebp - 0x10], ecx */ 3495 RECOMP_BACKEDGE(); 3496 if (/* dec result */ CMP_NS(_flag_a, _flag_b)) goto L_3803BEBB; /* 0x3803BFD3: jns 0x3803bebb */ 3497 L_3803BFD9: 3498 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803BFD9: mov al, byte ptr [ebp + 0xb] */ 3499 /* test LO8(eax), LO8(eax) */ /* 0x3803BFDC: test al, al */ 3500 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3501 _cf = 0; 3502 _flag_k = FK_NARROW(FK_TEST, 24); 3503 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C0F4; /* 0x3803BFDE: je 0x3803c0f4 */ 3504 L_3803BFE4: 3505 edx = MEM32(ebp + (-0x3C)); /* 0x3803BFE4: mov edx, dword ptr [ebp - 0x3c] */ 3506 eax = MEM32(ebp + (-0x38)); /* 0x3803BFE7: mov eax, dword ptr [ebp - 0x38] */ 3507 ecx = MEM32(ebp + (-0x34)); /* 0x3803BFEA: mov ecx, dword ptr [ebp - 0x34] */ 3508 MEM32(ebx) = edx; /* 0x3803BFED: mov dword ptr [ebx], edx */ 3509 edx = MEM32(ebp + (-0x48)); /* 0x3803BFEF: mov edx, dword ptr [ebp - 0x48] */ 3510 MEM32(ebx + 0x4) = eax; /* 0x3803BFF2: mov dword ptr [ebx + 4], eax */ 3511 eax = MEM32(ebp + 0x14); /* 0x3803BFF5: mov eax, dword ptr [ebp + 0x14] */ 3512 MEM32(ebx + 0x8) = ecx; /* 0x3803BFF8: mov dword ptr [ebx + 8], ecx */ 3513 ecx = MEM32(ebp + (-0x44)); /* 0x3803BFFB: mov ecx, dword ptr [ebp - 0x44] */ 3514 MEM32(eax) = edx; /* 0x3803BFFE: mov dword ptr [eax], edx */ 3515 edx = MEM32(ebp + (-0x40)); /* 0x3803C000: mov edx, dword ptr [ebp - 0x40] */ 3516 edi = POP32_VAL(esp); /* 0x3803C003: pop edi */ 3517 MEM32(eax + 0x4) = ecx; /* 0x3803C004: mov dword ptr [eax + 4], ecx */ 3518 esi = POP32_VAL(esp); /* 0x3803C007: pop esi */ 3519 MEM32(eax + 0x8) = edx; /* 0x3803C008: mov dword ptr [eax + 8], edx */ 3520 SET_LO8(eax, 1); /* 0x3803C00B: mov al, 1 */ 3521 ebx = POP32_VAL(esp); /* 0x3803C00D: pop ebx */ 3522 esp = ebp; /* 0x3803C00E: mov esp, ebp */ 3523 ebp = POP32_VAL(esp); /* 0x3803C010: pop ebp */ 3524 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C011: ret 0x18 */ 3525 L_3803C014: 3526 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803C014: mov al, byte ptr [ebp + 0xb] */ 3527 /* test LO8(eax), LO8(eax) */ /* 0x3803C017: test al, al */ 3528 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 3529 _cf = 0; 3530 _flag_k = FK_NARROW(FK_TEST, 24); 3531 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C019: je 0x3803c0e9 */ 3532 L_3803C01F: 3533 fp_push(*(float*)&MEM32(ebp + (-0x3C))); /* 0x3803C01F: fld dword ptr [ebp - 0x3c] */ 3534 ecx = MEM32(ebp + (-0x3C)); /* 0x3803C022: mov ecx, dword ptr [ebp - 0x3c] */ 3535 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803C025: fsub dword ptr [0x3806f028] */ 3536 edx = MEM32(ebp + (-0x38)); /* 0x3803C02B: mov edx, dword ptr [ebp - 0x38] */ 3537 eax = MEM32(ebp + (-0x34)); /* 0x3803C02E: mov eax, dword ptr [ebp - 0x34] */ 3538 MEM32(ebp + (-0x28)) = ecx; /* 0x3803C031: mov dword ptr [ebp - 0x28], ecx */ 3539 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3803C034: fstp dword ptr [ebp - 0x28] */ 3540 MEM32(ebp + (-0x24)) = edx; /* 0x3803C037: mov dword ptr [ebp - 0x24], edx */ 3541 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C03A: fld dword ptr [ebp - 0x24] */ 3542 MEM32(ebp + (-0x20)) = eax; /* 0x3803C03D: mov dword ptr [ebp - 0x20], eax */ 3543 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803C040: fsub dword ptr [0x3806f02c] */ 3544 ecx = ebx; /* 0x3803C046: mov ecx, ebx */ 3545 edx = MEM32(ecx); /* 0x3803C048: mov edx, dword ptr [ecx] */ 3546 eax = MEM32(ecx + 0x4); /* 0x3803C04A: mov eax, dword ptr [ecx + 4] */ 3547 ecx = MEM32(ecx + 0x8); /* 0x3803C04D: mov ecx, dword ptr [ecx + 8] */ 3548 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803C050: fstp dword ptr [ebp - 0x24] */ 3549 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C053: fld dword ptr [ebp - 0x20] */ 3550 MEM32(ebp + (-0x60)) = ecx; /* 0x3803C056: mov dword ptr [ebp - 0x60], ecx */ 3551 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803C059: fsub dword ptr [0x3806f030] */ 3552 PUSH32(esp, 0x3806F028u); /* 0x3803C05F: push 0x3806f028 */ 3553 ecx = ebp + (-0x68); /* 0x3803C064: lea ecx, [ebp - 0x68] */ 3554 MEM32(ebp + (-0x68)) = edx; /* 0x3803C067: mov dword ptr [ebp - 0x68], edx */ 3555 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3803C06A: fstp dword ptr [ebp - 0x20] */ 3556 MEM32(ebp + (-0x64)) = eax; /* 0x3803C06D: mov dword ptr [ebp - 0x64], eax */ 3557 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803C070: call dword ptr [0x3804e4f4] */ 3558 RECOMP_FLAGS_IN(); 3559 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C076: fld dword ptr [ebp - 0x20] */ 3560 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3803C079: fmul dword ptr [ebp - 0x20] */ 3561 edx = MEM32(eax); /* 0x3803C07C: mov edx, dword ptr [eax] */ 3562 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C07E: fld dword ptr [ebp - 0x24] */ 3563 ecx = MEM32(eax + 0x4); /* 0x3803C081: mov ecx, dword ptr [eax + 4] */ 3564 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x3803C084: fmul dword ptr [ebp - 0x24] */ 3565 MEM32(ebp + (-0x54)) = edx; /* 0x3803C087: mov dword ptr [ebp - 0x54], edx */ 3566 edx = MEM32(eax + 0x8); /* 0x3803C08A: mov edx, dword ptr [eax + 8] */ 3567 MEM32(ebp + (-0x4C)) = edx; /* 0x3803C08D: mov dword ptr [ebp - 0x4c], edx */ 3568 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C090: faddp st(1) */ 3569 MEM32(ebp + (-0x50)) = ecx; /* 0x3803C092: mov dword ptr [ebp - 0x50], ecx */ 3570 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803C095: fld dword ptr [ebp - 0x28] */ 3571 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x3803C098: fmul dword ptr [ebp - 0x28] */ 3572 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C09B: faddp st(1) */ 3573 _st[0] = sqrt(_st[0]); /* 0x3803C09D: fsqrt */ 3574 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3803C09F: fld dword ptr [ebp - 0x4c] */ 3575 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x3803C0A2: fmul dword ptr [ebp - 0x4c] */ 3576 fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x3803C0A5: fld dword ptr [ebp - 0x50] */ 3577 _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x3803C0A8: fmul dword ptr [ebp - 0x50] */ 3578 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0AB: faddp st(1) */ 3579 fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x3803C0AD: fld dword ptr [ebp - 0x54] */ 3580 _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x3803C0B0: fmul dword ptr [ebp - 0x54] */ 3581 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0B3: faddp st(1) */ 3582 _st[0] = sqrt(_st[0]); /* 0x3803C0B5: fsqrt */ 3583 fp_xch(1); /* 0x3803C0B7: fxch st(1) */ 3584 fp_xch(1); /* 0x3803C0B9: fxch st(1) */ 3585 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803C0BB: fcompp */ 3586 fp_pop(); fp_pop(); 3587 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C0BD: fnstsw ax */ 3588 /* test HI8(eax), 0x41u */ /* 0x3803C0BF: test ah, 0x41 */ 3589 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 3590 _cf = 0; 3591 _flag_k = FK_NARROW(FK_TEST, 24); 3592 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C0C2: jne 0x3803c0e9 */ 3593 L_3803C0C4: 3594 eax = MEM32(ebp + (-0x3C)); /* 0x3803C0C4: mov eax, dword ptr [ebp - 0x3c] */ 3595 ecx = MEM32(ebp + (-0x38)); /* 0x3803C0C7: mov ecx, dword ptr [ebp - 0x38] */ 3596 edx = MEM32(ebp + (-0x34)); /* 0x3803C0CA: mov edx, dword ptr [ebp - 0x34] */ 3597 MEM32(ebx) = eax; /* 0x3803C0CD: mov dword ptr [ebx], eax */ 3598 eax = MEM32(ebp + 0x14); /* 0x3803C0CF: mov eax, dword ptr [ebp + 0x14] */ 3599 MEM32(ebx + 0x4) = ecx; /* 0x3803C0D2: mov dword ptr [ebx + 4], ecx */ 3600 ecx = MEM32(ebp + (-0x48)); /* 0x3803C0D5: mov ecx, dword ptr [ebp - 0x48] */ 3601 MEM32(ebx + 0x8) = edx; /* 0x3803C0D8: mov dword ptr [ebx + 8], edx */ 3602 edx = MEM32(ebp + (-0x44)); /* 0x3803C0DB: mov edx, dword ptr [ebp - 0x44] */ 3603 MEM32(eax) = ecx; /* 0x3803C0DE: mov dword ptr [eax], ecx */ 3604 ecx = MEM32(ebp + (-0x40)); /* 0x3803C0E0: mov ecx, dword ptr [ebp - 0x40] */ 3605 MEM32(eax + 0x4) = edx; /* 0x3803C0E3: mov dword ptr [eax + 4], edx */ 3606 MEM32(eax + 0x8) = ecx; /* 0x3803C0E6: mov dword ptr [eax + 8], ecx */ 3607 L_3803C0E9: 3608 edi = POP32_VAL(esp); /* 0x3803C0E9: pop edi */ 3609 esi = POP32_VAL(esp); /* 0x3803C0EA: pop esi */ 3610 SET_LO8(eax, 1); /* 0x3803C0EB: mov al, 1 */ 3611 ebx = POP32_VAL(esp); /* 0x3803C0ED: pop ebx */ 3612 esp = ebp; /* 0x3803C0EE: mov esp, ebp */ 3613 ebp = POP32_VAL(esp); /* 0x3803C0F0: pop ebp */ 3614 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C0F1: ret 0x18 */ 3615 L_3803C0F4: 3616 MEM32(ebp + (-0x54)) = 0xBF800000u; /* 0x3803C0F4: mov dword ptr [ebp - 0x54], 0xbf800000 */ 3617 eax = MEM32(ebp + (-0x54)); /* 0x3803C0FB: mov eax, dword ptr [ebp - 0x54] */ 3618 MEM32(ebp + (-0x50)) = 0xBF800000u; /* 0x3803C0FE: mov dword ptr [ebp - 0x50], 0xbf800000 */ 3619 ecx = MEM32(ebp + (-0x50)); /* 0x3803C105: mov ecx, dword ptr [ebp - 0x50] */ 3620 MEM32(ebp + (-0x4C)) = 0xBF800000u; /* 0x3803C108: mov dword ptr [ebp - 0x4c], 0xbf800000 */ 3621 edx = MEM32(ebp + (-0x4C)); /* 0x3803C10F: mov edx, dword ptr [ebp - 0x4c] */ 3622 MEM32(ebx) = eax; /* 0x3803C112: mov dword ptr [ebx], eax */ 3623 MEM32(ebx + 0x4) = ecx; /* 0x3803C114: mov dword ptr [ebx + 4], ecx */ 3624 MEM32(ebx + 0x8) = edx; /* 0x3803C117: mov dword ptr [ebx + 8], edx */ 3625 L_3803C11A: 3626 edi = POP32_VAL(esp); /* 0x3803C11A: pop edi */ 3627 esi = POP32_VAL(esp); /* 0x3803C11B: pop esi */ 3628 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 3629 SET_LO8(eax, 0); /* 0x3803C11C: xor al, al */ 3630 _cf = 0; 3631 _flag_k = FK_NARROW(FK_TEST, 24); 3632 ebx = POP32_VAL(esp); /* 0x3803C11E: pop ebx */ 3633 esp = ebp; /* 0x3803C11F: mov esp, ebp */ 3634 ebp = POP32_VAL(esp); /* 0x3803C121: pop ebp */ 3635 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C122: ret 0x18 */ 3636 RECOMP_REGS_OUT(); 3637 } 3638 3639 void sub_3803BC90(void) { 3640 int _fpu_cmp = 0; 3641 uint32_t _cf = 0; 3642 int _df = 1; 3643 uint32_t _flag_k = FK_NONE; 3644 uint32_t _flag_a = 0, _flag_b = 0; 3645 uint32_t _itail_tgt = 0; 3646 RECOMP_REGS_LOCALS 3647 RECOMP_ENTER(0x3803BC90u); 3648 3649 goto L_3803BC90; 3650 L_3803BAA9: 3651 edx = MEM32(ebp + (-0x4C)); /* 0x3803BAA9: mov edx, dword ptr [ebp - 0x4c] */ 3652 /* cmp edx, esi */ /* 0x3803BAAC: cmp edx, esi */ 3653 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(esi); 3654 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3655 _flag_k = FK_CMP; 3656 eax = MEM32(ebp + (-0x20)); /* 0x3803BAAE: mov eax, dword ptr [ebp - 0x20] */ 3657 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BABB; /* 0x3803BAB1: jne 0x3803babb */ 3658 L_3803BAB3: 3659 /* cmp eax, esi */ /* 0x3803BAB3: cmp eax, esi */ 3660 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 3661 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3662 _flag_k = FK_CMP; 3663 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BD03; /* 0x3803BAB5: je 0x3803bd03 */ 3664 L_3803BABB: 3665 /* test edx, eax */ /* 0x3803BABB: test edx, eax */ 3666 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 3667 _cf = 0; 3668 _flag_k = FK_TEST; 3669 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C11A; /* 0x3803BABD: jne 0x3803c11a */ 3670 L_3803BAC3: 3671 /* cmp edx, esi */ /* 0x3803BAC3: cmp edx, esi */ 3672 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(esi); 3673 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3674 _flag_k = FK_CMP; 3675 ecx = ebp + (-0x5C); /* 0x3803BAC5: lea ecx, [ebp - 0x5c] */ 3676 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BACD; /* 0x3803BAC8: jne 0x3803bacd */ 3677 L_3803BACA: 3678 ecx = ebp + (-0x30); /* 0x3803BACA: lea ecx, [ebp - 0x30] */ 3679 L_3803BACD: 3680 /* cmp MEM32(ecx), esi */ /* 0x3803BACD: cmp dword ptr [ecx], esi */ 3681 _flag_a = (uint32_t)(MEM32(ecx)); _flag_b = (uint32_t)(esi); 3682 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3683 _flag_k = FK_CMP; 3684 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BB42; /* 0x3803BACF: je 0x3803bb42 */ 3685 L_3803BAD1: 3686 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BAD1: fld dword ptr [0x3806f010] */ 3687 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BAD7: fsub dword ptr [0x3806f030] */ 3688 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BADD: fcomp dword ptr [0x3804e8e4] */ 3689 fp_pop(); 3690 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BAE3: fnstsw ax */ 3691 /* test HI8(eax), 0x40u */ /* 0x3803BAE5: test ah, 0x40 */ 3692 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 3693 _cf = 0; 3694 _flag_k = FK_NARROW(FK_TEST, 24); 3695 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BB31; /* 0x3803BAE8: jne 0x3803bb31 */ 3696 L_3803BAEA: 3697 fp_push(*(float*)&MEM32(ebp + (-0x60))); /* 0x3803BAEA: fld dword ptr [ebp - 0x60] */ 3698 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BAED: fsub dword ptr [0x3806f030] */ 3699 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BAF3: fld dword ptr [0x3806f010] */ 3700 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BAF9: fsub dword ptr [0x3806f030] */ 3701 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x3803BAFF: fdivp st(1) */ 3702 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BB01: fld dword ptr [0x3806f008] */ 3703 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BB07: fsub dword ptr [0x3806f028] */ 3704 _st[0] *= _st[1]; /* 0x3803BB0D: fmul st(1) */ 3705 _st[0] += (double)*(float*)ADDR(0x3806F028); /* 0x3803BB0F: fadd dword ptr [0x3806f028] */ 3706 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BB15: fstp dword ptr [ebp + 0xc] */ 3707 fp_push(*(float*)&MEM32(0x3806F00C)); /* 0x3803BB18: fld dword ptr [0x3806f00c] */ 3708 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BB1E: fsub dword ptr [0x3806f02c] */ 3709 _st[0] *= _st[1]; /* 0x3803BB24: fmul st(1) */ 3710 _st[0] += (double)*(float*)ADDR(0x3806F02C); /* 0x3803BB26: fadd dword ptr [0x3806f02c] */ 3711 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BB2C: fstp dword ptr [ebp + 0x18] */ 3712 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BB2F: fstp st(0) */ 3713 L_3803BB31: 3714 fp_push(*(float*)&MEM32(ebp + (-0x60))); /* 0x3803BB31: fld dword ptr [ebp - 0x60] */ 3715 _st[0] -= (double)*(float*)ADDR(0x3804EA94); /* 0x3803BB34: fsub dword ptr [0x3804ea94] */ 3716 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x3803BB3A: fstp dword ptr [ebp + 8] */ 3717 goto L_3803BC90; /* 0x3803BB3D: jmp 0x3803bc90 */ 3718 L_3803BB42: 3719 /* cmp MEM32(ecx + 0x4), esi */ /* 0x3803BB42: cmp dword ptr [ecx + 4], esi */ 3720 _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(esi); 3721 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3722 _flag_k = FK_CMP; 3723 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BBB2; /* 0x3803BB45: je 0x3803bbb2 */ 3724 L_3803BB47: 3725 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BB47: fld dword ptr [0x3806f010] */ 3726 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BB4D: fsub dword ptr [0x3806f030] */ 3727 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BB53: fcomp dword ptr [0x3804e8e4] */ 3728 fp_pop(); 3729 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BB59: fnstsw ax */ 3730 /* test HI8(eax), 0x40u */ /* 0x3803BB5B: test ah, 0x40 */ 3731 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 3732 _cf = 0; 3733 _flag_k = FK_NARROW(FK_TEST, 24); 3734 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BBA7; /* 0x3803BB5E: jne 0x3803bba7 */ 3735 L_3803BB60: 3736 fp_push(*(float*)&MEM32(ebp + (-0x68))); /* 0x3803BB60: fld dword ptr [ebp - 0x68] */ 3737 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BB63: fsub dword ptr [0x3806f030] */ 3738 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BB69: fld dword ptr [0x3806f010] */ 3739 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BB6F: fsub dword ptr [0x3806f030] */ 3740 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x3803BB75: fdivp st(1) */ 3741 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BB77: fld dword ptr [0x3806f008] */ 3742 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BB7D: fsub dword ptr [0x3806f028] */ 3743 _st[0] *= _st[1]; /* 0x3803BB83: fmul st(1) */ 3744 _st[0] += (double)*(float*)ADDR(0x3806F028); /* 0x3803BB85: fadd dword ptr [0x3806f028] */ 3745 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BB8B: fstp dword ptr [ebp + 0xc] */ 3746 fp_push(*(float*)&MEM32(0x3806F00C)); /* 0x3803BB8E: fld dword ptr [0x3806f00c] */ 3747 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BB94: fsub dword ptr [0x3806f02c] */ 3748 _st[0] *= _st[1]; /* 0x3803BB9A: fmul st(1) */ 3749 _st[0] += (double)*(float*)ADDR(0x3806F02C); /* 0x3803BB9C: fadd dword ptr [0x3806f02c] */ 3750 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BBA2: fstp dword ptr [ebp + 0x18] */ 3751 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BBA5: fstp st(0) */ 3752 L_3803BBA7: 3753 eax = MEM32(ebp + (-0x68)); /* 0x3803BBA7: mov eax, dword ptr [ebp - 0x68] */ 3754 MEM32(ebp + 0x8) = eax; /* 0x3803BBAA: mov dword ptr [ebp + 8], eax */ 3755 goto L_3803BC90; /* 0x3803BBAD: jmp 0x3803bc90 */ 3756 L_3803BBB2: 3757 /* cmp MEM32(ecx + 0x8), esi */ /* 0x3803BBB2: cmp dword ptr [ecx + 8], esi */ 3758 _flag_a = (uint32_t)(MEM32(ecx + 0x8)); _flag_b = (uint32_t)(esi); 3759 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3760 _flag_k = FK_CMP; 3761 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BC25; /* 0x3803BBB5: je 0x3803bc25 */ 3762 L_3803BBB7: 3763 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BBB7: fld dword ptr [0x3806f008] */ 3764 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BBBD: fsub dword ptr [0x3806f028] */ 3765 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BBC3: fcomp dword ptr [0x3804e8e4] */ 3766 fp_pop(); 3767 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BBC9: fnstsw ax */ 3768 /* test HI8(eax), 0x40u */ /* 0x3803BBCB: test ah, 0x40 */ 3769 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 3770 _cf = 0; 3771 _flag_k = FK_NARROW(FK_TEST, 24); 3772 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BC17; /* 0x3803BBCE: jne 0x3803bc17 */ 3773 L_3803BBD0: 3774 fp_push(*(float*)&MEM32(ebp + (-0x64))); /* 0x3803BBD0: fld dword ptr [ebp - 0x64] */ 3775 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BBD3: fsub dword ptr [0x3806f028] */ 3776 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BBD9: fld dword ptr [0x3806f008] */ 3777 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BBDF: fsub dword ptr [0x3806f028] */ 3778 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x3803BBE5: fdivp st(1) */ 3779 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BBE7: fld dword ptr [0x3806f010] */ 3780 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BBED: fsub dword ptr [0x3806f030] */ 3781 _st[0] *= _st[1]; /* 0x3803BBF3: fmul st(1) */ 3782 _st[0] += (double)*(float*)ADDR(0x3806F030); /* 0x3803BBF5: fadd dword ptr [0x3806f030] */ 3783 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x3803BBFB: fstp dword ptr [ebp + 8] */ 3784 fp_push(*(float*)&MEM32(0x3806F00C)); /* 0x3803BBFE: fld dword ptr [0x3806f00c] */ 3785 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BC04: fsub dword ptr [0x3806f02c] */ 3786 _st[0] *= _st[1]; /* 0x3803BC0A: fmul st(1) */ 3787 _st[0] += (double)*(float*)ADDR(0x3806F02C); /* 0x3803BC0C: fadd dword ptr [0x3806f02c] */ 3788 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BC12: fstp dword ptr [ebp + 0x18] */ 3789 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BC15: fstp st(0) */ 3790 L_3803BC17: 3791 fp_push(*(float*)&MEM32(ebp + (-0x64))); /* 0x3803BC17: fld dword ptr [ebp - 0x64] */ 3792 _st[0] -= (double)*(float*)ADDR(0x3804EA94); /* 0x3803BC1A: fsub dword ptr [0x3804ea94] */ 3793 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BC20: fstp dword ptr [ebp + 0xc] */ 3794 goto L_3803BC90; /* 0x3803BC23: jmp 0x3803bc90 */ 3795 L_3803BC25: 3796 /* cmp MEM32(ecx + 0xC), esi */ /* 0x3803BC25: cmp dword ptr [ecx + 0xc], esi */ 3797 _flag_a = (uint32_t)(MEM32(ecx + 0xC)); _flag_b = (uint32_t)(esi); 3798 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3799 _flag_k = FK_CMP; 3800 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BC90; /* 0x3803BC28: je 0x3803bc90 */ 3801 L_3803BC2A: 3802 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BC2A: fld dword ptr [0x3806f008] */ 3803 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BC30: fsub dword ptr [0x3806f028] */ 3804 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BC36: fcomp dword ptr [0x3804e8e4] */ 3805 fp_pop(); 3806 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BC3C: fnstsw ax */ 3807 /* test HI8(eax), 0x40u */ /* 0x3803BC3E: test ah, 0x40 */ 3808 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x40u) << 24; 3809 _cf = 0; 3810 _flag_k = FK_NARROW(FK_TEST, 24); 3811 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BC8A; /* 0x3803BC41: jne 0x3803bc8a */ 3812 L_3803BC43: 3813 fp_push(*(float*)&MEM32(ebp + (-0x6C))); /* 0x3803BC43: fld dword ptr [ebp - 0x6c] */ 3814 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BC46: fsub dword ptr [0x3806f028] */ 3815 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BC4C: fld dword ptr [0x3806f008] */ 3816 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BC52: fsub dword ptr [0x3806f028] */ 3817 { double _v = fp_pop(); _st[0] = _v == 0.0 ? _st[0] : _st[0] / _v; } /* 0x3803BC58: fdivp st(1) */ 3818 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BC5A: fld dword ptr [0x3806f010] */ 3819 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BC60: fsub dword ptr [0x3806f030] */ 3820 _st[0] *= _st[1]; /* 0x3803BC66: fmul st(1) */ 3821 _st[0] += (double)*(float*)ADDR(0x3806F030); /* 0x3803BC68: fadd dword ptr [0x3806f030] */ 3822 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x3803BC6E: fstp dword ptr [ebp + 8] */ 3823 fp_push(*(float*)&MEM32(0x3806F00C)); /* 0x3803BC71: fld dword ptr [0x3806f00c] */ 3824 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BC77: fsub dword ptr [0x3806f02c] */ 3825 _st[0] *= _st[1]; /* 0x3803BC7D: fmul st(1) */ 3826 _st[0] += (double)*(float*)ADDR(0x3806F02C); /* 0x3803BC7F: fadd dword ptr [0x3806f02c] */ 3827 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BC85: fstp dword ptr [ebp + 0x18] */ 3828 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BC88: fstp st(0) */ 3829 L_3803BC8A: 3830 eax = MEM32(ebp + (-0x6C)); /* 0x3803BC8A: mov eax, dword ptr [ebp - 0x6c] */ 3831 MEM32(ebp + 0xC) = eax; /* 0x3803BC8D: mov dword ptr [ebp + 0xc], eax */ 3832 L_3803BC90: 3833 /* cmp MEM32(ecx + 0x10), edx */ /* 0x3803BC90: cmp dword ptr [ecx + 0x10], edx */ 3834 _flag_a = (uint32_t)(MEM32(ecx + 0x10)); _flag_b = (uint32_t)(edx); 3835 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3836 _flag_k = FK_CMP; 3837 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BCCB; /* 0x3803BC93: jne 0x3803bccb */ 3838 L_3803BC95: 3839 ecx = MEM32(ebp + 0xC); /* 0x3803BC95: mov ecx, dword ptr [ebp + 0xc] */ 3840 edx = MEM32(ebp + 0x18); /* 0x3803BC98: mov edx, dword ptr [ebp + 0x18] */ 3841 eax = MEM32(ebp + 0x8); /* 0x3803BC9B: mov eax, dword ptr [ebp + 8] */ 3842 MEM32(0x3806F028) = ecx; /* 0x3803BC9E: mov dword ptr [0x3806f028], ecx */ 3843 ecx = ebp + (-0x6C); /* 0x3803BCA4: lea ecx, [ebp - 0x6c] */ 3844 PUSH32(esp, ecx); /* 0x3803BCA7: push ecx */ 3845 MEM32(0x3806F02C) = edx; /* 0x3803BCA8: mov dword ptr [0x3806f02c], edx */ 3846 edx = eax; /* 0x3803BCAE: mov edx, eax */ 3847 MEM32(0x3806F030) = eax; /* 0x3803BCB0: mov dword ptr [0x3806f030], eax */ 3848 eax = MEM32(ebp + 0xC); /* 0x3803BCB5: mov eax, dword ptr [ebp + 0xc] */ 3849 PUSH32(esp, edx); /* 0x3803BCB8: push edx */ 3850 PUSH32(esp, eax); /* 0x3803BCB9: push eax */ 3851 ecx = ebp + (-0x5C); /* 0x3803BCBA: lea ecx, [ebp - 0x5c] */ 3852 PUSH32(esp, ecx); /* 0x3803BCBD: push ecx */ 3853 RECOMP_ICALL(0x3803C150u); /* 0x3803BCBE: call 0x3803c150 */ /* not lifted */ 3854 RECOMP_FLAGS_IN(); 3855 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 3856 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3857 esp = esp + 0x10u; /* 0x3803BCC3: add esp, 0x10 */ 3858 _flag_k = FK_ADD; 3859 RECOMP_BACKEDGE(); 3860 goto L_3803BAA9; /* 0x3803BCC6: jmp 0x3803baa9 */ 3861 L_3803BCCB: 3862 edx = MEM32(ebp + 0xC); /* 0x3803BCCB: mov edx, dword ptr [ebp + 0xc] */ 3863 eax = MEM32(ebp + 0x18); /* 0x3803BCCE: mov eax, dword ptr [ebp + 0x18] */ 3864 ecx = MEM32(ebp + 0x8); /* 0x3803BCD1: mov ecx, dword ptr [ebp + 8] */ 3865 MEM32(0x3806F008) = edx; /* 0x3803BCD4: mov dword ptr [0x3806f008], edx */ 3866 edx = ebp + (-0x6C); /* 0x3803BCDA: lea edx, [ebp - 0x6c] */ 3867 PUSH32(esp, edx); /* 0x3803BCDD: push edx */ 3868 MEM32(0x3806F00C) = eax; /* 0x3803BCDE: mov dword ptr [0x3806f00c], eax */ 3869 eax = ecx; /* 0x3803BCE3: mov eax, ecx */ 3870 MEM32(0x3806F010) = ecx; /* 0x3803BCE5: mov dword ptr [0x3806f010], ecx */ 3871 ecx = MEM32(ebp + 0xC); /* 0x3803BCEB: mov ecx, dword ptr [ebp + 0xc] */ 3872 PUSH32(esp, eax); /* 0x3803BCEE: push eax */ 3873 PUSH32(esp, ecx); /* 0x3803BCEF: push ecx */ 3874 edx = ebp + (-0x30); /* 0x3803BCF0: lea edx, [ebp - 0x30] */ 3875 PUSH32(esp, edx); /* 0x3803BCF3: push edx */ 3876 RECOMP_ICALL(0x3803C150u); /* 0x3803BCF4: call 0x3803c150 */ /* not lifted */ 3877 RECOMP_FLAGS_IN(); 3878 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u); 3879 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3880 esp = esp + 0x10u; /* 0x3803BCF9: add esp, 0x10 */ 3881 _flag_k = FK_ADD; 3882 RECOMP_BACKEDGE(); 3883 goto L_3803BAA9; /* 0x3803BCFC: jmp 0x3803baa9 */ 3884 L_3803BD03: 3885 ecx = MEM32(edi + 0xC); /* 0x3803BD03: mov ecx, dword ptr [edi + 0xc] */ 3886 /* cmp ecx, esi */ /* 0x3803BD06: cmp ecx, esi */ 3887 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi); 3888 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3889 _flag_k = FK_CMP; 3890 MEM32(ebp + (-0x3C)) = 0; /* 0x3803BD08: mov dword ptr [ebp - 0x3c], 0 */ 3891 MEM32(ebp + (-0x38)) = 0; /* 0x3803BD0F: mov dword ptr [ebp - 0x38], 0 */ 3892 MEM32(ebp + (-0x34)) = 0; /* 0x3803BD16: mov dword ptr [ebp - 0x34], 0 */ 3893 MEM32(ebp + (-0x48)) = 0; /* 0x3803BD1D: mov dword ptr [ebp - 0x48], 0 */ 3894 MEM32(ebp + (-0x44)) = 0; /* 0x3803BD24: mov dword ptr [ebp - 0x44], 0 */ 3895 MEM32(ebp + (-0x40)) = 0; /* 0x3803BD2B: mov dword ptr [ebp - 0x40], 0 */ 3896 MEM8(ebp + 0xB) = (uint8_t)(0); /* 0x3803BD32: mov byte ptr [ebp + 0xb], 0 */ 3897 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803BD57; /* 0x3803BD36: je 0x3803bd57 */ 3898 L_3803BD38: 3899 edx = MEM32(ebp + 0x1C); /* 0x3803BD38: mov edx, dword ptr [ebp + 0x1c] */ 3900 eax = MEM32(ecx); /* 0x3803BD3B: mov eax, dword ptr [ecx] */ 3901 PUSH32(esp, edx); /* 0x3803BD3D: push edx */ 3902 PUSH32(esp, ebx); /* 0x3803BD3E: push ebx */ 3903 edx = ebp + (-0x48); /* 0x3803BD3F: lea edx, [ebp - 0x48] */ 3904 PUSH32(esp, edx); /* 0x3803BD42: push edx */ 3905 edx = ebp + (-0x3C); /* 0x3803BD43: lea edx, [ebp - 0x3c] */ 3906 PUSH32(esp, edx); /* 0x3803BD46: push edx */ 3907 PUSH32(esp, 0x3806F008u); /* 0x3803BD47: push 0x3806f008 */ 3908 PUSH32(esp, 0x3806F028u); /* 0x3803BD4C: push 0x3806f028 */ 3909 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x3803BD51: call dword ptr [eax + 0x10] */ 3910 RECOMP_FLAGS_IN(); 3911 MEM8(ebp + 0xB) = (uint8_t)(LO8(eax)); /* 0x3803BD54: mov byte ptr [ebp + 0xb], al */ 3912 L_3803BD57: 3913 fp_push(*(float*)&MEM32(0x3806F028)); /* 0x3803BD57: fld dword ptr [0x3806f028] */ 3914 _st[0] /= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BD5D: fdiv dword ptr [ebp - 4] */ 3915 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BD60: fstp dword ptr [ebp + 0x18] */ 3916 fp_push(*(float*)&MEM32(0x3806F030)); /* 0x3803BD63: fld dword ptr [0x3806f030] */ 3917 _st[0] /= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BD69: fdiv dword ptr [ebp - 4] */ 3918 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x1C) = _v; } /* 0x3803BD6C: fstp dword ptr [ebp + 0x1c] */ 3919 fp_push(*(float*)&MEM32(0x3806F008)); /* 0x3803BD6F: fld dword ptr [0x3806f008] */ 3920 _st[0] /= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BD75: fdiv dword ptr [ebp - 4] */ 3921 fp_push(*(float*)&MEM32(0x3806F010)); /* 0x3803BD78: fld dword ptr [0x3806f010] */ 3922 _st[0] /= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BD7E: fdiv dword ptr [ebp - 4] */ 3923 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BD81: fstp dword ptr [ebp + 0xc] */ 3924 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BD84: fld dword ptr [ebp + 0x18] */ 3925 RECOMP_ICALL(0x3804B688u); /* 0x3803BD87: call 0x3804b688 */ /* not lifted */ 3926 RECOMP_FLAGS_IN(); 3927 fp_push(*(float*)&MEM32(ebp + 0x1C)); /* 0x3803BD8C: fld dword ptr [ebp + 0x1c] */ 3928 edi = eax; /* 0x3803BD8F: mov edi, eax */ 3929 RECOMP_ICALL(0x3804B688u); /* 0x3803BD91: call 0x3804b688 */ /* not lifted */ 3930 RECOMP_FLAGS_IN(); 3931 fp_push(_st[0]); /* 0x3803BD96: fld st(0) */ 3932 esi = eax; /* 0x3803BD98: mov esi, eax */ 3933 RECOMP_ICALL(0x3804B688u); /* 0x3803BD9A: call 0x3804b688 */ /* not lifted */ 3934 RECOMP_FLAGS_IN(); 3935 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x3803BD9F: fld dword ptr [ebp + 0xc] */ 3936 ebx = eax; /* 0x3803BDA2: mov ebx, eax */ 3937 RECOMP_ICALL(0x3804B688u); /* 0x3803BDA4: call 0x3804b688 */ /* not lifted */ 3938 RECOMP_FLAGS_IN(); 3939 _st[0] -= (double)*(float*)ADDR(ebp + 0x18); /* 0x3803BDA9: fsub dword ptr [ebp + 0x18] */ 3940 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x3803BDAC: fld dword ptr [ebp + 0xc] */ 3941 MEM32(ebp + (-0x10)) = eax; /* 0x3803BDAF: mov dword ptr [ebp - 0x10], eax */ 3942 _st[0] -= (double)*(float*)ADDR(ebp + 0x1C); /* 0x3803BDB2: fsub dword ptr [ebp + 0x1c] */ 3943 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BDB5: fstp dword ptr [ebp + 0xc] */ 3944 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BDB8: fcom dword ptr [0x3804e8e4] */ 3945 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BDBE: fnstsw ax */ 3946 /* test HI8(eax), 1 */ /* 0x3803BDC0: test ah, 1 */ 3947 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 3948 _cf = 0; 3949 _flag_k = FK_NARROW(FK_TEST, 24); 3950 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BDF6; /* 0x3803BDC3: jne 0x3803bdf6 */ 3951 L_3803BDC5: 3952 fp_push(*(float*)&MEM32(0x3804EABC)); /* 0x3803BDC5: fld dword ptr [0x3804eabc] */ 3953 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3954 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3955 esp = esp - 8; /* 0x3803BDCB: sub esp, 8 */ 3956 _flag_k = FK_CMP; 3957 _st[0] /= _st[1]; /* 0x3803BDCE: fdiv st(1) */ 3958 MEM32(ebp + (-0x8)) = 1; /* 0x3803BDD0: mov dword ptr [ebp - 8], 1 */ 3959 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3803BDD7: fstp dword ptr [ebp - 4] */ 3960 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BDDA: fstp st(0) */ 3961 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BDDC: fld dword ptr [ebp + 0x18] */ 3962 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x3803BDDF: fstp qword ptr [esp] */ 3963 RECOMP_ICALL(MEM32(0x3804E0AC)); /* 0x3803BDE2: call dword ptr [0x3804e0ac] */ 3964 RECOMP_FLAGS_IN(); 3965 _st[0] += (double)*(float*)ADDR(0x3804E8CC); /* 0x3803BDE8: fadd dword ptr [0x3804e8cc] */ 3966 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3967 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3968 esp = esp + 8; /* 0x3803BDEE: add esp, 8 */ 3969 _flag_k = FK_ADD; 3970 _st[0] -= (double)*(float*)ADDR(ebp + 0x18); /* 0x3803BDF1: fsub dword ptr [ebp + 0x18] */ 3971 goto L_3803BE1F; /* 0x3803BDF4: jmp 0x3803be1f */ 3972 L_3803BDF6: 3973 fp_push(*(float*)&MEM32(0x3804F7A0)); /* 0x3803BDF6: fld dword ptr [0x3804f7a0] */ 3974 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3975 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 3976 esp = esp - 8; /* 0x3803BDFC: sub esp, 8 */ 3977 _flag_k = FK_CMP; 3978 _st[0] /= _st[1]; /* 0x3803BDFF: fdiv st(1) */ 3979 MEM32(ebp + (-0x8)) = 0xFFFFFFFFu; /* 0x3803BE01: mov dword ptr [ebp - 8], 0xffffffff */ 3980 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3803BE08: fstp dword ptr [ebp - 4] */ 3981 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803BE0B: fstp st(0) */ 3982 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BE0D: fld dword ptr [ebp + 0x18] */ 3983 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x3803BE10: fstp qword ptr [esp] */ 3984 RECOMP_ICALL(MEM32(0x3804E0AC)); /* 0x3803BE13: call dword ptr [0x3804e0ac] */ 3985 RECOMP_FLAGS_IN(); 3986 _st[0] = (double)*(float*)ADDR(ebp + 0x18) - _st[0]; /* 0x3803BE19: fsubr dword ptr [ebp + 0x18] */ 3987 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 3988 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 3989 esp = esp + 8; /* 0x3803BE1C: add esp, 8 */ 3990 _flag_k = FK_ADD; 3991 L_3803BE1F: 3992 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BE1F: fmul dword ptr [ebp - 4] */ 3993 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BE22: fstp dword ptr [ebp + 0x18] */ 3994 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x3803BE25: fld dword ptr [ebp + 0xc] */ 3995 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BE28: fcomp dword ptr [0x3804e8e4] */ 3996 fp_pop(); 3997 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BE2E: fnstsw ax */ 3998 /* test HI8(eax), 1 */ /* 0x3803BE30: test ah, 1 */ 3999 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 4000 _cf = 0; 4001 _flag_k = FK_NARROW(FK_TEST, 24); 4002 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BE65; /* 0x3803BE33: jne 0x3803be65 */ 4003 L_3803BE35: 4004 fp_push(*(float*)&MEM32(0x3804EABC)); /* 0x3803BE35: fld dword ptr [0x3804eabc] */ 4005 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4006 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4007 esp = esp - 8; /* 0x3803BE3B: sub esp, 8 */ 4008 _flag_k = FK_CMP; 4009 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BE3E: fdiv dword ptr [ebp + 0xc] */ 4010 MEM32(ebp + (-0xC)) = 1; /* 0x3803BE41: mov dword ptr [ebp - 0xc], 1 */ 4011 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BE48: fstp dword ptr [ebp + 0xc] */ 4012 fp_push(*(float*)&MEM32(ebp + 0x1C)); /* 0x3803BE4B: fld dword ptr [ebp + 0x1c] */ 4013 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x3803BE4E: fstp qword ptr [esp] */ 4014 RECOMP_ICALL(MEM32(0x3804E0AC)); /* 0x3803BE51: call dword ptr [0x3804e0ac] */ 4015 RECOMP_FLAGS_IN(); 4016 _st[0] += (double)*(float*)ADDR(0x3804E8CC); /* 0x3803BE57: fadd dword ptr [0x3804e8cc] */ 4017 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4018 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4019 esp = esp + 8; /* 0x3803BE5D: add esp, 8 */ 4020 _flag_k = FK_ADD; 4021 _st[0] -= (double)*(float*)ADDR(ebp + 0x1C); /* 0x3803BE60: fsub dword ptr [ebp + 0x1c] */ 4022 goto L_3803BE92; /* 0x3803BE63: jmp 0x3803be92 */ 4023 L_3803BE65: 4024 fp_push(*(float*)&MEM32(0x3804F7A0)); /* 0x3803BE65: fld dword ptr [0x3804f7a0] */ 4025 MEM32(ebp + (-0xC)) = 0xFFFFFFFFu; /* 0x3803BE6B: mov dword ptr [ebp - 0xc], 0xffffffff */ 4026 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BE72: fdiv dword ptr [ebp + 0xc] */ 4027 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BE75: fstp dword ptr [ebp + 0xc] */ 4028 fp_push(*(float*)&MEM32(ebp + 0x1C)); /* 0x3803BE78: fld dword ptr [ebp + 0x1c] */ 4029 { double _v = fp_pop(); *(double*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803BE7B: fstp qword ptr [ebp - 0x24] */ 4030 eax = MEM32(ebp + (-0x20)); /* 0x3803BE7E: mov eax, dword ptr [ebp - 0x20] */ 4031 ecx = MEM32(ebp + (-0x24)); /* 0x3803BE81: mov ecx, dword ptr [ebp - 0x24] */ 4032 PUSH32(esp, eax); /* 0x3803BE84: push eax */ 4033 PUSH32(esp, ecx); /* 0x3803BE85: push ecx */ 4034 RECOMP_ICALL(MEM32(0x3804E0AC)); /* 0x3803BE86: call dword ptr [0x3804e0ac] */ 4035 RECOMP_FLAGS_IN(); 4036 _st[0] = *(double*)ADDR(ebp + (-0x24)) - _st[0]; /* 0x3803BE8C: fsubr qword ptr [ebp - 0x24] */ 4037 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4038 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4039 esp = esp + 8; /* 0x3803BE8F: add esp, 8 */ 4040 _flag_k = FK_ADD; 4041 L_3803BE92: 4042 eax = MEM32(ebp + (-0x10)); /* 0x3803BE92: mov eax, dword ptr [ebp - 0x10] */ 4043 _st[0] *= (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BE95: fmul dword ptr [ebp + 0xc] */ 4044 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 4045 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4046 eax = eax - esi; /* 0x3803BE98: sub eax, esi */ 4047 _flag_k = FK_CMP; 4048 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x3803BE9A: cdq */ 4049 ecx = eax; /* 0x3803BE9B: mov ecx, eax */ 4050 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x1C) = _v; } /* 0x3803BE9D: fstp dword ptr [ebp + 0x1c] */ 4051 _flag_a = (uint32_t)((ecx ^ edx)); _flag_b = (uint32_t)((ecx ^ edx)); 4052 ecx = ecx ^ edx; /* 0x3803BEA0: xor ecx, edx */ 4053 _cf = 0; 4054 _flag_k = FK_TEST; 4055 eax = ebx; /* 0x3803BEA2: mov eax, ebx */ 4056 ebx = MEM32(ebp + 0x10); /* 0x3803BEA4: mov ebx, dword ptr [ebp + 0x10] */ 4057 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 4058 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4059 eax = eax - edi; /* 0x3803BEA7: sub eax, edi */ 4060 _flag_k = FK_CMP; 4061 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 4062 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4063 ecx = ecx - edx; /* 0x3803BEA9: sub ecx, edx */ 4064 _flag_k = FK_CMP; 4065 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x3803BEAB: cdq */ 4066 _flag_a = (uint32_t)((eax ^ edx)); _flag_b = (uint32_t)((eax ^ edx)); 4067 eax = eax ^ edx; /* 0x3803BEAC: xor eax, edx */ 4068 _cf = 0; 4069 _flag_k = FK_TEST; 4070 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 4071 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4072 eax = eax - edx; /* 0x3803BEAE: sub eax, edx */ 4073 _flag_k = FK_CMP; 4074 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 4075 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4076 ecx = ecx + eax; /* 0x3803BEB0: add ecx, eax */ 4077 _flag_k = FK_ADD; 4078 MEM32(ebp + (-0x10)) = ecx; /* 0x3803BEB2: mov dword ptr [ebp - 0x10], ecx */ 4079 if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_S)) goto L_3803BFD9; /* 0x3803BEB5: js 0x3803bfd9 */ 4080 L_3803BEBB: 4081 /* test edi, edi */ /* 0x3803BEBB: test edi, edi */ 4082 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 4083 _cf = 0; 4084 _flag_k = FK_TEST; 4085 if (TEST_S(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BEBD: jl 0x3803bfa4 */ 4086 L_3803BEC3: 4087 /* cmp edi, MEM32(ebp + (-0x14)) */ /* 0x3803BEC3: cmp edi, dword ptr [ebp - 0x14] */ 4088 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebp + (-0x14))); 4089 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4090 _flag_k = FK_CMP; 4091 if (CMP_GE(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BEC6: jge 0x3803bfa4 */ 4092 L_3803BECC: 4093 /* test esi, esi */ /* 0x3803BECC: test esi, esi */ 4094 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 4095 _cf = 0; 4096 _flag_k = FK_TEST; 4097 if (TEST_S(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BECE: jl 0x3803bfa4 */ 4098 L_3803BED4: 4099 /* cmp esi, MEM32(ebp + (-0x18)) */ /* 0x3803BED4: cmp esi, dword ptr [ebp - 0x18] */ 4100 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(ebp + (-0x18))); 4101 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4102 _flag_k = FK_CMP; 4103 if (CMP_GE(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BED7: jge 0x3803bfa4 */ 4104 L_3803BEDD: 4105 edx = MEM32(ebp + 0x14); /* 0x3803BEDD: mov edx, dword ptr [ebp + 0x14] */ 4106 ecx = MEM32(ebp + (-0x1C)); /* 0x3803BEE0: mov ecx, dword ptr [ebp - 0x1c] */ 4107 PUSH32(esp, edx); /* 0x3803BEE3: push edx */ 4108 PUSH32(esp, ebx); /* 0x3803BEE4: push ebx */ 4109 PUSH32(esp, esi); /* 0x3803BEE5: push esi */ 4110 PUSH32(esp, edi); /* 0x3803BEE6: push edi */ 4111 RECOMP_ICALL(0x3803C220u); /* 0x3803BEE7: call 0x3803c220 */ /* not lifted */ 4112 RECOMP_FLAGS_IN(); 4113 /* cmp LO8(eax), 1 */ /* 0x3803BEEC: cmp al, 1 */ 4114 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 4115 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4116 _flag_k = FK_NARROW(FK_CMP, 24); 4117 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BFA1; /* 0x3803BEEE: jne 0x3803bfa1 */ 4118 L_3803BEF4: 4119 eax = ebx; /* 0x3803BEF4: mov eax, ebx */ 4120 ecx = MEM32(eax); /* 0x3803BEF6: mov ecx, dword ptr [eax] */ 4121 edx = MEM32(eax + 0x4); /* 0x3803BEF8: mov edx, dword ptr [eax + 4] */ 4122 eax = MEM32(eax + 0x8); /* 0x3803BEFB: mov eax, dword ptr [eax + 8] */ 4123 MEM32(ebp + (-0x28)) = ecx; /* 0x3803BEFE: mov dword ptr [ebp - 0x28], ecx */ 4124 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803BF01: fld dword ptr [ebp - 0x28] */ 4125 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BF04: fsub dword ptr [0x3806f028] */ 4126 ecx = MEM32(0x3806F008); /* 0x3803BF0A: mov ecx, dword ptr [0x3806f008] */ 4127 MEM32(ebp + (-0x24)) = edx; /* 0x3803BF10: mov dword ptr [ebp - 0x24], edx */ 4128 edx = MEM32(0x3806F00C); /* 0x3803BF13: mov edx, dword ptr [0x3806f00c] */ 4129 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3803BF19: fstp dword ptr [ebp - 0x28] */ 4130 MEM32(ebp + (-0x20)) = eax; /* 0x3803BF1C: mov dword ptr [ebp - 0x20], eax */ 4131 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803BF1F: fld dword ptr [ebp - 0x24] */ 4132 eax = MEM32(0x3806F010); /* 0x3803BF22: mov eax, dword ptr [0x3806f010] */ 4133 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BF27: fsub dword ptr [0x3806f02c] */ 4134 MEM32(ebp + (-0x68)) = ecx; /* 0x3803BF2D: mov dword ptr [ebp - 0x68], ecx */ 4135 PUSH32(esp, 0x3806F028u); /* 0x3803BF30: push 0x3806f028 */ 4136 ecx = ebp + (-0x68); /* 0x3803BF35: lea ecx, [ebp - 0x68] */ 4137 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803BF38: fstp dword ptr [ebp - 0x24] */ 4138 MEM32(ebp + (-0x64)) = edx; /* 0x3803BF3B: mov dword ptr [ebp - 0x64], edx */ 4139 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803BF3E: fld dword ptr [ebp - 0x20] */ 4140 MEM32(ebp + (-0x60)) = eax; /* 0x3803BF41: mov dword ptr [ebp - 0x60], eax */ 4141 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BF44: fsub dword ptr [0x3806f030] */ 4142 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3803BF4A: fstp dword ptr [ebp - 0x20] */ 4143 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803BF4D: call dword ptr [0x3804e4f4] */ 4144 RECOMP_FLAGS_IN(); 4145 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803BF53: fld dword ptr [ebp - 0x20] */ 4146 ecx = MEM32(eax); /* 0x3803BF56: mov ecx, dword ptr [eax] */ 4147 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3803BF58: fmul dword ptr [ebp - 0x20] */ 4148 edx = MEM32(eax + 0x4); /* 0x3803BF5B: mov edx, dword ptr [eax + 4] */ 4149 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803BF5E: fld dword ptr [ebp - 0x24] */ 4150 eax = MEM32(eax + 0x8); /* 0x3803BF61: mov eax, dword ptr [eax + 8] */ 4151 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x3803BF64: fmul dword ptr [ebp - 0x24] */ 4152 MEM32(ebp + (-0x4C)) = eax; /* 0x3803BF67: mov dword ptr [ebp - 0x4c], eax */ 4153 MEM32(ebp + (-0x50)) = edx; /* 0x3803BF6A: mov dword ptr [ebp - 0x50], edx */ 4154 MEM32(ebp + (-0x54)) = ecx; /* 0x3803BF6D: mov dword ptr [ebp - 0x54], ecx */ 4155 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF70: faddp st(1) */ 4156 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803BF72: fld dword ptr [ebp - 0x28] */ 4157 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x3803BF75: fmul dword ptr [ebp - 0x28] */ 4158 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF78: faddp st(1) */ 4159 _st[0] = sqrt(_st[0]); /* 0x3803BF7A: fsqrt */ 4160 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3803BF7C: fld dword ptr [ebp - 0x4c] */ 4161 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x3803BF7F: fmul dword ptr [ebp - 0x4c] */ 4162 fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x3803BF82: fld dword ptr [ebp - 0x50] */ 4163 _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x3803BF85: fmul dword ptr [ebp - 0x50] */ 4164 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF88: faddp st(1) */ 4165 fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x3803BF8A: fld dword ptr [ebp - 0x54] */ 4166 _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x3803BF8D: fmul dword ptr [ebp - 0x54] */ 4167 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF90: faddp st(1) */ 4168 _st[0] = sqrt(_st[0]); /* 0x3803BF92: fsqrt */ 4169 fp_xch(1); /* 0x3803BF94: fxch st(1) */ 4170 fp_xch(1); /* 0x3803BF96: fxch st(1) */ 4171 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803BF98: fcompp */ 4172 fp_pop(); fp_pop(); 4173 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BF9A: fnstsw ax */ 4174 /* test HI8(eax), 0x41u */ /* 0x3803BF9C: test ah, 0x41 */ 4175 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 4176 _cf = 0; 4177 _flag_k = FK_NARROW(FK_TEST, 24); 4178 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C014; /* 0x3803BF9F: je 0x3803c014 */ 4179 L_3803BFA1: 4180 ecx = MEM32(ebp + (-0x10)); /* 0x3803BFA1: mov ecx, dword ptr [ebp - 0x10] */ 4181 L_3803BFA4: 4182 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BFA4: fld dword ptr [ebp + 0x18] */ 4183 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0x1C)); /* 0x3803BFA7: fcomp dword ptr [ebp + 0x1c] */ 4184 fp_pop(); 4185 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BFAA: fnstsw ax */ 4186 /* test HI8(eax), 1 */ /* 0x3803BFAC: test ah, 1 */ 4187 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 4188 _cf = 0; 4189 _flag_k = FK_NARROW(FK_TEST, 24); 4190 if (TEST_Z(_flag_a, _flag_b)) goto L_3803BFC1; /* 0x3803BFAF: je 0x3803bfc1 */ 4191 L_3803BFB1: 4192 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BFB1: fld dword ptr [ebp + 0x18] */ 4193 eax = MEM32(ebp + (-0x8)); /* 0x3803BFB4: mov eax, dword ptr [ebp - 8] */ 4194 _st[0] += (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BFB7: fadd dword ptr [ebp - 4] */ 4195 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 4196 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4197 edi = edi + eax; /* 0x3803BFBA: add edi, eax */ 4198 _flag_k = FK_ADD; 4199 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BFBC: fstp dword ptr [ebp + 0x18] */ 4200 goto L_3803BFCF; /* 0x3803BFBF: jmp 0x3803bfcf */ 4201 L_3803BFC1: 4202 fp_push(*(float*)&MEM32(ebp + 0x1C)); /* 0x3803BFC1: fld dword ptr [ebp + 0x1c] */ 4203 eax = MEM32(ebp + (-0xC)); /* 0x3803BFC4: mov eax, dword ptr [ebp - 0xc] */ 4204 _st[0] += (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BFC7: fadd dword ptr [ebp + 0xc] */ 4205 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 4206 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4207 esi = esi + eax; /* 0x3803BFCA: add esi, eax */ 4208 _flag_k = FK_ADD; 4209 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x1C) = _v; } /* 0x3803BFCC: fstp dword ptr [ebp + 0x1c] */ 4210 L_3803BFCF: 4211 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4212 ecx = ecx - 1; /* 0x3803BFCF: dec ecx */ 4213 _flag_k = FK_DEC; 4214 MEM32(ebp + (-0x10)) = ecx; /* 0x3803BFD0: mov dword ptr [ebp - 0x10], ecx */ 4215 RECOMP_BACKEDGE(); 4216 if (/* dec result */ CMP_NS(_flag_a, _flag_b)) goto L_3803BEBB; /* 0x3803BFD3: jns 0x3803bebb */ 4217 L_3803BFD9: 4218 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803BFD9: mov al, byte ptr [ebp + 0xb] */ 4219 /* test LO8(eax), LO8(eax) */ /* 0x3803BFDC: test al, al */ 4220 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4221 _cf = 0; 4222 _flag_k = FK_NARROW(FK_TEST, 24); 4223 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C0F4; /* 0x3803BFDE: je 0x3803c0f4 */ 4224 L_3803BFE4: 4225 edx = MEM32(ebp + (-0x3C)); /* 0x3803BFE4: mov edx, dword ptr [ebp - 0x3c] */ 4226 eax = MEM32(ebp + (-0x38)); /* 0x3803BFE7: mov eax, dword ptr [ebp - 0x38] */ 4227 ecx = MEM32(ebp + (-0x34)); /* 0x3803BFEA: mov ecx, dword ptr [ebp - 0x34] */ 4228 MEM32(ebx) = edx; /* 0x3803BFED: mov dword ptr [ebx], edx */ 4229 edx = MEM32(ebp + (-0x48)); /* 0x3803BFEF: mov edx, dword ptr [ebp - 0x48] */ 4230 MEM32(ebx + 0x4) = eax; /* 0x3803BFF2: mov dword ptr [ebx + 4], eax */ 4231 eax = MEM32(ebp + 0x14); /* 0x3803BFF5: mov eax, dword ptr [ebp + 0x14] */ 4232 MEM32(ebx + 0x8) = ecx; /* 0x3803BFF8: mov dword ptr [ebx + 8], ecx */ 4233 ecx = MEM32(ebp + (-0x44)); /* 0x3803BFFB: mov ecx, dword ptr [ebp - 0x44] */ 4234 MEM32(eax) = edx; /* 0x3803BFFE: mov dword ptr [eax], edx */ 4235 edx = MEM32(ebp + (-0x40)); /* 0x3803C000: mov edx, dword ptr [ebp - 0x40] */ 4236 edi = POP32_VAL(esp); /* 0x3803C003: pop edi */ 4237 MEM32(eax + 0x4) = ecx; /* 0x3803C004: mov dword ptr [eax + 4], ecx */ 4238 esi = POP32_VAL(esp); /* 0x3803C007: pop esi */ 4239 MEM32(eax + 0x8) = edx; /* 0x3803C008: mov dword ptr [eax + 8], edx */ 4240 SET_LO8(eax, 1); /* 0x3803C00B: mov al, 1 */ 4241 ebx = POP32_VAL(esp); /* 0x3803C00D: pop ebx */ 4242 esp = ebp; /* 0x3803C00E: mov esp, ebp */ 4243 ebp = POP32_VAL(esp); /* 0x3803C010: pop ebp */ 4244 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C011: ret 0x18 */ 4245 L_3803C014: 4246 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803C014: mov al, byte ptr [ebp + 0xb] */ 4247 /* test LO8(eax), LO8(eax) */ /* 0x3803C017: test al, al */ 4248 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4249 _cf = 0; 4250 _flag_k = FK_NARROW(FK_TEST, 24); 4251 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C019: je 0x3803c0e9 */ 4252 L_3803C01F: 4253 fp_push(*(float*)&MEM32(ebp + (-0x3C))); /* 0x3803C01F: fld dword ptr [ebp - 0x3c] */ 4254 ecx = MEM32(ebp + (-0x3C)); /* 0x3803C022: mov ecx, dword ptr [ebp - 0x3c] */ 4255 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803C025: fsub dword ptr [0x3806f028] */ 4256 edx = MEM32(ebp + (-0x38)); /* 0x3803C02B: mov edx, dword ptr [ebp - 0x38] */ 4257 eax = MEM32(ebp + (-0x34)); /* 0x3803C02E: mov eax, dword ptr [ebp - 0x34] */ 4258 MEM32(ebp + (-0x28)) = ecx; /* 0x3803C031: mov dword ptr [ebp - 0x28], ecx */ 4259 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3803C034: fstp dword ptr [ebp - 0x28] */ 4260 MEM32(ebp + (-0x24)) = edx; /* 0x3803C037: mov dword ptr [ebp - 0x24], edx */ 4261 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C03A: fld dword ptr [ebp - 0x24] */ 4262 MEM32(ebp + (-0x20)) = eax; /* 0x3803C03D: mov dword ptr [ebp - 0x20], eax */ 4263 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803C040: fsub dword ptr [0x3806f02c] */ 4264 ecx = ebx; /* 0x3803C046: mov ecx, ebx */ 4265 edx = MEM32(ecx); /* 0x3803C048: mov edx, dword ptr [ecx] */ 4266 eax = MEM32(ecx + 0x4); /* 0x3803C04A: mov eax, dword ptr [ecx + 4] */ 4267 ecx = MEM32(ecx + 0x8); /* 0x3803C04D: mov ecx, dword ptr [ecx + 8] */ 4268 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803C050: fstp dword ptr [ebp - 0x24] */ 4269 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C053: fld dword ptr [ebp - 0x20] */ 4270 MEM32(ebp + (-0x60)) = ecx; /* 0x3803C056: mov dword ptr [ebp - 0x60], ecx */ 4271 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803C059: fsub dword ptr [0x3806f030] */ 4272 PUSH32(esp, 0x3806F028u); /* 0x3803C05F: push 0x3806f028 */ 4273 ecx = ebp + (-0x68); /* 0x3803C064: lea ecx, [ebp - 0x68] */ 4274 MEM32(ebp + (-0x68)) = edx; /* 0x3803C067: mov dword ptr [ebp - 0x68], edx */ 4275 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3803C06A: fstp dword ptr [ebp - 0x20] */ 4276 MEM32(ebp + (-0x64)) = eax; /* 0x3803C06D: mov dword ptr [ebp - 0x64], eax */ 4277 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803C070: call dword ptr [0x3804e4f4] */ 4278 RECOMP_FLAGS_IN(); 4279 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C076: fld dword ptr [ebp - 0x20] */ 4280 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3803C079: fmul dword ptr [ebp - 0x20] */ 4281 edx = MEM32(eax); /* 0x3803C07C: mov edx, dword ptr [eax] */ 4282 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C07E: fld dword ptr [ebp - 0x24] */ 4283 ecx = MEM32(eax + 0x4); /* 0x3803C081: mov ecx, dword ptr [eax + 4] */ 4284 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x3803C084: fmul dword ptr [ebp - 0x24] */ 4285 MEM32(ebp + (-0x54)) = edx; /* 0x3803C087: mov dword ptr [ebp - 0x54], edx */ 4286 edx = MEM32(eax + 0x8); /* 0x3803C08A: mov edx, dword ptr [eax + 8] */ 4287 MEM32(ebp + (-0x4C)) = edx; /* 0x3803C08D: mov dword ptr [ebp - 0x4c], edx */ 4288 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C090: faddp st(1) */ 4289 MEM32(ebp + (-0x50)) = ecx; /* 0x3803C092: mov dword ptr [ebp - 0x50], ecx */ 4290 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803C095: fld dword ptr [ebp - 0x28] */ 4291 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x3803C098: fmul dword ptr [ebp - 0x28] */ 4292 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C09B: faddp st(1) */ 4293 _st[0] = sqrt(_st[0]); /* 0x3803C09D: fsqrt */ 4294 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3803C09F: fld dword ptr [ebp - 0x4c] */ 4295 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x3803C0A2: fmul dword ptr [ebp - 0x4c] */ 4296 fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x3803C0A5: fld dword ptr [ebp - 0x50] */ 4297 _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x3803C0A8: fmul dword ptr [ebp - 0x50] */ 4298 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0AB: faddp st(1) */ 4299 fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x3803C0AD: fld dword ptr [ebp - 0x54] */ 4300 _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x3803C0B0: fmul dword ptr [ebp - 0x54] */ 4301 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0B3: faddp st(1) */ 4302 _st[0] = sqrt(_st[0]); /* 0x3803C0B5: fsqrt */ 4303 fp_xch(1); /* 0x3803C0B7: fxch st(1) */ 4304 fp_xch(1); /* 0x3803C0B9: fxch st(1) */ 4305 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803C0BB: fcompp */ 4306 fp_pop(); fp_pop(); 4307 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C0BD: fnstsw ax */ 4308 /* test HI8(eax), 0x41u */ /* 0x3803C0BF: test ah, 0x41 */ 4309 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 4310 _cf = 0; 4311 _flag_k = FK_NARROW(FK_TEST, 24); 4312 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C0C2: jne 0x3803c0e9 */ 4313 L_3803C0C4: 4314 eax = MEM32(ebp + (-0x3C)); /* 0x3803C0C4: mov eax, dword ptr [ebp - 0x3c] */ 4315 ecx = MEM32(ebp + (-0x38)); /* 0x3803C0C7: mov ecx, dword ptr [ebp - 0x38] */ 4316 edx = MEM32(ebp + (-0x34)); /* 0x3803C0CA: mov edx, dword ptr [ebp - 0x34] */ 4317 MEM32(ebx) = eax; /* 0x3803C0CD: mov dword ptr [ebx], eax */ 4318 eax = MEM32(ebp + 0x14); /* 0x3803C0CF: mov eax, dword ptr [ebp + 0x14] */ 4319 MEM32(ebx + 0x4) = ecx; /* 0x3803C0D2: mov dword ptr [ebx + 4], ecx */ 4320 ecx = MEM32(ebp + (-0x48)); /* 0x3803C0D5: mov ecx, dword ptr [ebp - 0x48] */ 4321 MEM32(ebx + 0x8) = edx; /* 0x3803C0D8: mov dword ptr [ebx + 8], edx */ 4322 edx = MEM32(ebp + (-0x44)); /* 0x3803C0DB: mov edx, dword ptr [ebp - 0x44] */ 4323 MEM32(eax) = ecx; /* 0x3803C0DE: mov dword ptr [eax], ecx */ 4324 ecx = MEM32(ebp + (-0x40)); /* 0x3803C0E0: mov ecx, dword ptr [ebp - 0x40] */ 4325 MEM32(eax + 0x4) = edx; /* 0x3803C0E3: mov dword ptr [eax + 4], edx */ 4326 MEM32(eax + 0x8) = ecx; /* 0x3803C0E6: mov dword ptr [eax + 8], ecx */ 4327 L_3803C0E9: 4328 edi = POP32_VAL(esp); /* 0x3803C0E9: pop edi */ 4329 esi = POP32_VAL(esp); /* 0x3803C0EA: pop esi */ 4330 SET_LO8(eax, 1); /* 0x3803C0EB: mov al, 1 */ 4331 ebx = POP32_VAL(esp); /* 0x3803C0ED: pop ebx */ 4332 esp = ebp; /* 0x3803C0EE: mov esp, ebp */ 4333 ebp = POP32_VAL(esp); /* 0x3803C0F0: pop ebp */ 4334 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C0F1: ret 0x18 */ 4335 L_3803C0F4: 4336 MEM32(ebp + (-0x54)) = 0xBF800000u; /* 0x3803C0F4: mov dword ptr [ebp - 0x54], 0xbf800000 */ 4337 eax = MEM32(ebp + (-0x54)); /* 0x3803C0FB: mov eax, dword ptr [ebp - 0x54] */ 4338 MEM32(ebp + (-0x50)) = 0xBF800000u; /* 0x3803C0FE: mov dword ptr [ebp - 0x50], 0xbf800000 */ 4339 ecx = MEM32(ebp + (-0x50)); /* 0x3803C105: mov ecx, dword ptr [ebp - 0x50] */ 4340 MEM32(ebp + (-0x4C)) = 0xBF800000u; /* 0x3803C108: mov dword ptr [ebp - 0x4c], 0xbf800000 */ 4341 edx = MEM32(ebp + (-0x4C)); /* 0x3803C10F: mov edx, dword ptr [ebp - 0x4c] */ 4342 MEM32(ebx) = eax; /* 0x3803C112: mov dword ptr [ebx], eax */ 4343 MEM32(ebx + 0x4) = ecx; /* 0x3803C114: mov dword ptr [ebx + 4], ecx */ 4344 MEM32(ebx + 0x8) = edx; /* 0x3803C117: mov dword ptr [ebx + 8], edx */ 4345 L_3803C11A: 4346 edi = POP32_VAL(esp); /* 0x3803C11A: pop edi */ 4347 esi = POP32_VAL(esp); /* 0x3803C11B: pop esi */ 4348 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 4349 SET_LO8(eax, 0); /* 0x3803C11C: xor al, al */ 4350 _cf = 0; 4351 _flag_k = FK_NARROW(FK_TEST, 24); 4352 ebx = POP32_VAL(esp); /* 0x3803C11E: pop ebx */ 4353 esp = ebp; /* 0x3803C11F: mov esp, ebp */ 4354 ebp = POP32_VAL(esp); /* 0x3803C121: pop ebp */ 4355 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C122: ret 0x18 */ 4356 RECOMP_REGS_OUT(); 4357 } 4358 4359 void sub_3803BE1F(void) { 4360 int _fpu_cmp = 0; 4361 uint32_t _cf = 0; 4362 int _df = 1; 4363 uint32_t _flag_k = FK_NONE; 4364 uint32_t _flag_a = 0, _flag_b = 0; 4365 uint32_t _itail_tgt = 0; 4366 RECOMP_REGS_LOCALS 4367 RECOMP_ENTER(0x3803BE1Fu); 4368 4369 L_3803BE1F: 4370 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BE1F: fmul dword ptr [ebp - 4] */ 4371 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BE22: fstp dword ptr [ebp + 0x18] */ 4372 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x3803BE25: fld dword ptr [ebp + 0xc] */ 4373 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803BE28: fcomp dword ptr [0x3804e8e4] */ 4374 fp_pop(); 4375 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BE2E: fnstsw ax */ 4376 /* test HI8(eax), 1 */ /* 0x3803BE30: test ah, 1 */ 4377 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 4378 _cf = 0; 4379 _flag_k = FK_NARROW(FK_TEST, 24); 4380 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803BE65; /* 0x3803BE33: jne 0x3803be65 */ 4381 L_3803BE35: 4382 fp_push(*(float*)&MEM32(0x3804EABC)); /* 0x3803BE35: fld dword ptr [0x3804eabc] */ 4383 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4384 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4385 esp = esp - 8; /* 0x3803BE3B: sub esp, 8 */ 4386 _flag_k = FK_CMP; 4387 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BE3E: fdiv dword ptr [ebp + 0xc] */ 4388 MEM32(ebp + (-0xC)) = 1; /* 0x3803BE41: mov dword ptr [ebp - 0xc], 1 */ 4389 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BE48: fstp dword ptr [ebp + 0xc] */ 4390 fp_push(*(float*)&MEM32(ebp + 0x1C)); /* 0x3803BE4B: fld dword ptr [ebp + 0x1c] */ 4391 { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x3803BE4E: fstp qword ptr [esp] */ 4392 RECOMP_ICALL(MEM32(0x3804E0AC)); /* 0x3803BE51: call dword ptr [0x3804e0ac] */ 4393 RECOMP_FLAGS_IN(); 4394 _st[0] += (double)*(float*)ADDR(0x3804E8CC); /* 0x3803BE57: fadd dword ptr [0x3804e8cc] */ 4395 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4396 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4397 esp = esp + 8; /* 0x3803BE5D: add esp, 8 */ 4398 _flag_k = FK_ADD; 4399 _st[0] -= (double)*(float*)ADDR(ebp + 0x1C); /* 0x3803BE60: fsub dword ptr [ebp + 0x1c] */ 4400 goto L_3803BE92; /* 0x3803BE63: jmp 0x3803be92 */ 4401 L_3803BE65: 4402 fp_push(*(float*)&MEM32(0x3804F7A0)); /* 0x3803BE65: fld dword ptr [0x3804f7a0] */ 4403 MEM32(ebp + (-0xC)) = 0xFFFFFFFFu; /* 0x3803BE6B: mov dword ptr [ebp - 0xc], 0xffffffff */ 4404 _st[0] /= (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BE72: fdiv dword ptr [ebp + 0xc] */ 4405 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0xC) = _v; } /* 0x3803BE75: fstp dword ptr [ebp + 0xc] */ 4406 fp_push(*(float*)&MEM32(ebp + 0x1C)); /* 0x3803BE78: fld dword ptr [ebp + 0x1c] */ 4407 { double _v = fp_pop(); *(double*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803BE7B: fstp qword ptr [ebp - 0x24] */ 4408 eax = MEM32(ebp + (-0x20)); /* 0x3803BE7E: mov eax, dword ptr [ebp - 0x20] */ 4409 ecx = MEM32(ebp + (-0x24)); /* 0x3803BE81: mov ecx, dword ptr [ebp - 0x24] */ 4410 PUSH32(esp, eax); /* 0x3803BE84: push eax */ 4411 PUSH32(esp, ecx); /* 0x3803BE85: push ecx */ 4412 RECOMP_ICALL(MEM32(0x3804E0AC)); /* 0x3803BE86: call dword ptr [0x3804e0ac] */ 4413 RECOMP_FLAGS_IN(); 4414 _st[0] = *(double*)ADDR(ebp + (-0x24)) - _st[0]; /* 0x3803BE8C: fsubr qword ptr [ebp - 0x24] */ 4415 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 4416 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4417 esp = esp + 8; /* 0x3803BE8F: add esp, 8 */ 4418 _flag_k = FK_ADD; 4419 L_3803BE92: 4420 eax = MEM32(ebp + (-0x10)); /* 0x3803BE92: mov eax, dword ptr [ebp - 0x10] */ 4421 _st[0] *= (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BE95: fmul dword ptr [ebp + 0xc] */ 4422 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 4423 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4424 eax = eax - esi; /* 0x3803BE98: sub eax, esi */ 4425 _flag_k = FK_CMP; 4426 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x3803BE9A: cdq */ 4427 ecx = eax; /* 0x3803BE9B: mov ecx, eax */ 4428 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x1C) = _v; } /* 0x3803BE9D: fstp dword ptr [ebp + 0x1c] */ 4429 _flag_a = (uint32_t)((ecx ^ edx)); _flag_b = (uint32_t)((ecx ^ edx)); 4430 ecx = ecx ^ edx; /* 0x3803BEA0: xor ecx, edx */ 4431 _cf = 0; 4432 _flag_k = FK_TEST; 4433 eax = ebx; /* 0x3803BEA2: mov eax, ebx */ 4434 ebx = MEM32(ebp + 0x10); /* 0x3803BEA4: mov ebx, dword ptr [ebp + 0x10] */ 4435 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 4436 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4437 eax = eax - edi; /* 0x3803BEA7: sub eax, edi */ 4438 _flag_k = FK_CMP; 4439 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 4440 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4441 ecx = ecx - edx; /* 0x3803BEA9: sub ecx, edx */ 4442 _flag_k = FK_CMP; 4443 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x3803BEAB: cdq */ 4444 _flag_a = (uint32_t)((eax ^ edx)); _flag_b = (uint32_t)((eax ^ edx)); 4445 eax = eax ^ edx; /* 0x3803BEAC: xor eax, edx */ 4446 _cf = 0; 4447 _flag_k = FK_TEST; 4448 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 4449 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4450 eax = eax - edx; /* 0x3803BEAE: sub eax, edx */ 4451 _flag_k = FK_CMP; 4452 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 4453 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4454 ecx = ecx + eax; /* 0x3803BEB0: add ecx, eax */ 4455 _flag_k = FK_ADD; 4456 MEM32(ebp + (-0x10)) = ecx; /* 0x3803BEB2: mov dword ptr [ebp - 0x10], ecx */ 4457 if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_S)) goto L_3803BFD9; /* 0x3803BEB5: js 0x3803bfd9 */ 4458 L_3803BEBB: 4459 /* test edi, edi */ /* 0x3803BEBB: test edi, edi */ 4460 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 4461 _cf = 0; 4462 _flag_k = FK_TEST; 4463 if (TEST_S(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BEBD: jl 0x3803bfa4 */ 4464 L_3803BEC3: 4465 /* cmp edi, MEM32(ebp + (-0x14)) */ /* 0x3803BEC3: cmp edi, dword ptr [ebp - 0x14] */ 4466 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebp + (-0x14))); 4467 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4468 _flag_k = FK_CMP; 4469 if (CMP_GE(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BEC6: jge 0x3803bfa4 */ 4470 L_3803BECC: 4471 /* test esi, esi */ /* 0x3803BECC: test esi, esi */ 4472 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 4473 _cf = 0; 4474 _flag_k = FK_TEST; 4475 if (TEST_S(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BECE: jl 0x3803bfa4 */ 4476 L_3803BED4: 4477 /* cmp esi, MEM32(ebp + (-0x18)) */ /* 0x3803BED4: cmp esi, dword ptr [ebp - 0x18] */ 4478 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(ebp + (-0x18))); 4479 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4480 _flag_k = FK_CMP; 4481 if (CMP_GE(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BED7: jge 0x3803bfa4 */ 4482 L_3803BEDD: 4483 edx = MEM32(ebp + 0x14); /* 0x3803BEDD: mov edx, dword ptr [ebp + 0x14] */ 4484 ecx = MEM32(ebp + (-0x1C)); /* 0x3803BEE0: mov ecx, dword ptr [ebp - 0x1c] */ 4485 PUSH32(esp, edx); /* 0x3803BEE3: push edx */ 4486 PUSH32(esp, ebx); /* 0x3803BEE4: push ebx */ 4487 PUSH32(esp, esi); /* 0x3803BEE5: push esi */ 4488 PUSH32(esp, edi); /* 0x3803BEE6: push edi */ 4489 RECOMP_ICALL(0x3803C220u); /* 0x3803BEE7: call 0x3803c220 */ /* not lifted */ 4490 RECOMP_FLAGS_IN(); 4491 /* cmp LO8(eax), 1 */ /* 0x3803BEEC: cmp al, 1 */ 4492 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 4493 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4494 _flag_k = FK_NARROW(FK_CMP, 24); 4495 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BFA1; /* 0x3803BEEE: jne 0x3803bfa1 */ 4496 L_3803BEF4: 4497 eax = ebx; /* 0x3803BEF4: mov eax, ebx */ 4498 ecx = MEM32(eax); /* 0x3803BEF6: mov ecx, dword ptr [eax] */ 4499 edx = MEM32(eax + 0x4); /* 0x3803BEF8: mov edx, dword ptr [eax + 4] */ 4500 eax = MEM32(eax + 0x8); /* 0x3803BEFB: mov eax, dword ptr [eax + 8] */ 4501 MEM32(ebp + (-0x28)) = ecx; /* 0x3803BEFE: mov dword ptr [ebp - 0x28], ecx */ 4502 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803BF01: fld dword ptr [ebp - 0x28] */ 4503 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BF04: fsub dword ptr [0x3806f028] */ 4504 ecx = MEM32(0x3806F008); /* 0x3803BF0A: mov ecx, dword ptr [0x3806f008] */ 4505 MEM32(ebp + (-0x24)) = edx; /* 0x3803BF10: mov dword ptr [ebp - 0x24], edx */ 4506 edx = MEM32(0x3806F00C); /* 0x3803BF13: mov edx, dword ptr [0x3806f00c] */ 4507 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3803BF19: fstp dword ptr [ebp - 0x28] */ 4508 MEM32(ebp + (-0x20)) = eax; /* 0x3803BF1C: mov dword ptr [ebp - 0x20], eax */ 4509 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803BF1F: fld dword ptr [ebp - 0x24] */ 4510 eax = MEM32(0x3806F010); /* 0x3803BF22: mov eax, dword ptr [0x3806f010] */ 4511 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BF27: fsub dword ptr [0x3806f02c] */ 4512 MEM32(ebp + (-0x68)) = ecx; /* 0x3803BF2D: mov dword ptr [ebp - 0x68], ecx */ 4513 PUSH32(esp, 0x3806F028u); /* 0x3803BF30: push 0x3806f028 */ 4514 ecx = ebp + (-0x68); /* 0x3803BF35: lea ecx, [ebp - 0x68] */ 4515 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803BF38: fstp dword ptr [ebp - 0x24] */ 4516 MEM32(ebp + (-0x64)) = edx; /* 0x3803BF3B: mov dword ptr [ebp - 0x64], edx */ 4517 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803BF3E: fld dword ptr [ebp - 0x20] */ 4518 MEM32(ebp + (-0x60)) = eax; /* 0x3803BF41: mov dword ptr [ebp - 0x60], eax */ 4519 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BF44: fsub dword ptr [0x3806f030] */ 4520 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3803BF4A: fstp dword ptr [ebp - 0x20] */ 4521 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803BF4D: call dword ptr [0x3804e4f4] */ 4522 RECOMP_FLAGS_IN(); 4523 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803BF53: fld dword ptr [ebp - 0x20] */ 4524 ecx = MEM32(eax); /* 0x3803BF56: mov ecx, dword ptr [eax] */ 4525 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3803BF58: fmul dword ptr [ebp - 0x20] */ 4526 edx = MEM32(eax + 0x4); /* 0x3803BF5B: mov edx, dword ptr [eax + 4] */ 4527 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803BF5E: fld dword ptr [ebp - 0x24] */ 4528 eax = MEM32(eax + 0x8); /* 0x3803BF61: mov eax, dword ptr [eax + 8] */ 4529 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x3803BF64: fmul dword ptr [ebp - 0x24] */ 4530 MEM32(ebp + (-0x4C)) = eax; /* 0x3803BF67: mov dword ptr [ebp - 0x4c], eax */ 4531 MEM32(ebp + (-0x50)) = edx; /* 0x3803BF6A: mov dword ptr [ebp - 0x50], edx */ 4532 MEM32(ebp + (-0x54)) = ecx; /* 0x3803BF6D: mov dword ptr [ebp - 0x54], ecx */ 4533 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF70: faddp st(1) */ 4534 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803BF72: fld dword ptr [ebp - 0x28] */ 4535 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x3803BF75: fmul dword ptr [ebp - 0x28] */ 4536 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF78: faddp st(1) */ 4537 _st[0] = sqrt(_st[0]); /* 0x3803BF7A: fsqrt */ 4538 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3803BF7C: fld dword ptr [ebp - 0x4c] */ 4539 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x3803BF7F: fmul dword ptr [ebp - 0x4c] */ 4540 fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x3803BF82: fld dword ptr [ebp - 0x50] */ 4541 _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x3803BF85: fmul dword ptr [ebp - 0x50] */ 4542 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF88: faddp st(1) */ 4543 fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x3803BF8A: fld dword ptr [ebp - 0x54] */ 4544 _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x3803BF8D: fmul dword ptr [ebp - 0x54] */ 4545 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF90: faddp st(1) */ 4546 _st[0] = sqrt(_st[0]); /* 0x3803BF92: fsqrt */ 4547 fp_xch(1); /* 0x3803BF94: fxch st(1) */ 4548 fp_xch(1); /* 0x3803BF96: fxch st(1) */ 4549 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803BF98: fcompp */ 4550 fp_pop(); fp_pop(); 4551 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BF9A: fnstsw ax */ 4552 /* test HI8(eax), 0x41u */ /* 0x3803BF9C: test ah, 0x41 */ 4553 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 4554 _cf = 0; 4555 _flag_k = FK_NARROW(FK_TEST, 24); 4556 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C014; /* 0x3803BF9F: je 0x3803c014 */ 4557 L_3803BFA1: 4558 ecx = MEM32(ebp + (-0x10)); /* 0x3803BFA1: mov ecx, dword ptr [ebp - 0x10] */ 4559 L_3803BFA4: 4560 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BFA4: fld dword ptr [ebp + 0x18] */ 4561 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0x1C)); /* 0x3803BFA7: fcomp dword ptr [ebp + 0x1c] */ 4562 fp_pop(); 4563 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BFAA: fnstsw ax */ 4564 /* test HI8(eax), 1 */ /* 0x3803BFAC: test ah, 1 */ 4565 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 4566 _cf = 0; 4567 _flag_k = FK_NARROW(FK_TEST, 24); 4568 if (TEST_Z(_flag_a, _flag_b)) goto L_3803BFC1; /* 0x3803BFAF: je 0x3803bfc1 */ 4569 L_3803BFB1: 4570 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BFB1: fld dword ptr [ebp + 0x18] */ 4571 eax = MEM32(ebp + (-0x8)); /* 0x3803BFB4: mov eax, dword ptr [ebp - 8] */ 4572 _st[0] += (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BFB7: fadd dword ptr [ebp - 4] */ 4573 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 4574 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4575 edi = edi + eax; /* 0x3803BFBA: add edi, eax */ 4576 _flag_k = FK_ADD; 4577 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BFBC: fstp dword ptr [ebp + 0x18] */ 4578 goto L_3803BFCF; /* 0x3803BFBF: jmp 0x3803bfcf */ 4579 L_3803BFC1: 4580 fp_push(*(float*)&MEM32(ebp + 0x1C)); /* 0x3803BFC1: fld dword ptr [ebp + 0x1c] */ 4581 eax = MEM32(ebp + (-0xC)); /* 0x3803BFC4: mov eax, dword ptr [ebp - 0xc] */ 4582 _st[0] += (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BFC7: fadd dword ptr [ebp + 0xc] */ 4583 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 4584 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4585 esi = esi + eax; /* 0x3803BFCA: add esi, eax */ 4586 _flag_k = FK_ADD; 4587 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x1C) = _v; } /* 0x3803BFCC: fstp dword ptr [ebp + 0x1c] */ 4588 L_3803BFCF: 4589 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4590 ecx = ecx - 1; /* 0x3803BFCF: dec ecx */ 4591 _flag_k = FK_DEC; 4592 MEM32(ebp + (-0x10)) = ecx; /* 0x3803BFD0: mov dword ptr [ebp - 0x10], ecx */ 4593 RECOMP_BACKEDGE(); 4594 if (/* dec result */ CMP_NS(_flag_a, _flag_b)) goto L_3803BEBB; /* 0x3803BFD3: jns 0x3803bebb */ 4595 L_3803BFD9: 4596 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803BFD9: mov al, byte ptr [ebp + 0xb] */ 4597 /* test LO8(eax), LO8(eax) */ /* 0x3803BFDC: test al, al */ 4598 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4599 _cf = 0; 4600 _flag_k = FK_NARROW(FK_TEST, 24); 4601 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C0F4; /* 0x3803BFDE: je 0x3803c0f4 */ 4602 L_3803BFE4: 4603 edx = MEM32(ebp + (-0x3C)); /* 0x3803BFE4: mov edx, dword ptr [ebp - 0x3c] */ 4604 eax = MEM32(ebp + (-0x38)); /* 0x3803BFE7: mov eax, dword ptr [ebp - 0x38] */ 4605 ecx = MEM32(ebp + (-0x34)); /* 0x3803BFEA: mov ecx, dword ptr [ebp - 0x34] */ 4606 MEM32(ebx) = edx; /* 0x3803BFED: mov dword ptr [ebx], edx */ 4607 edx = MEM32(ebp + (-0x48)); /* 0x3803BFEF: mov edx, dword ptr [ebp - 0x48] */ 4608 MEM32(ebx + 0x4) = eax; /* 0x3803BFF2: mov dword ptr [ebx + 4], eax */ 4609 eax = MEM32(ebp + 0x14); /* 0x3803BFF5: mov eax, dword ptr [ebp + 0x14] */ 4610 MEM32(ebx + 0x8) = ecx; /* 0x3803BFF8: mov dword ptr [ebx + 8], ecx */ 4611 ecx = MEM32(ebp + (-0x44)); /* 0x3803BFFB: mov ecx, dword ptr [ebp - 0x44] */ 4612 MEM32(eax) = edx; /* 0x3803BFFE: mov dword ptr [eax], edx */ 4613 edx = MEM32(ebp + (-0x40)); /* 0x3803C000: mov edx, dword ptr [ebp - 0x40] */ 4614 edi = POP32_VAL(esp); /* 0x3803C003: pop edi */ 4615 MEM32(eax + 0x4) = ecx; /* 0x3803C004: mov dword ptr [eax + 4], ecx */ 4616 esi = POP32_VAL(esp); /* 0x3803C007: pop esi */ 4617 MEM32(eax + 0x8) = edx; /* 0x3803C008: mov dword ptr [eax + 8], edx */ 4618 SET_LO8(eax, 1); /* 0x3803C00B: mov al, 1 */ 4619 ebx = POP32_VAL(esp); /* 0x3803C00D: pop ebx */ 4620 esp = ebp; /* 0x3803C00E: mov esp, ebp */ 4621 ebp = POP32_VAL(esp); /* 0x3803C010: pop ebp */ 4622 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C011: ret 0x18 */ 4623 L_3803C014: 4624 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803C014: mov al, byte ptr [ebp + 0xb] */ 4625 /* test LO8(eax), LO8(eax) */ /* 0x3803C017: test al, al */ 4626 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4627 _cf = 0; 4628 _flag_k = FK_NARROW(FK_TEST, 24); 4629 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C019: je 0x3803c0e9 */ 4630 L_3803C01F: 4631 fp_push(*(float*)&MEM32(ebp + (-0x3C))); /* 0x3803C01F: fld dword ptr [ebp - 0x3c] */ 4632 ecx = MEM32(ebp + (-0x3C)); /* 0x3803C022: mov ecx, dword ptr [ebp - 0x3c] */ 4633 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803C025: fsub dword ptr [0x3806f028] */ 4634 edx = MEM32(ebp + (-0x38)); /* 0x3803C02B: mov edx, dword ptr [ebp - 0x38] */ 4635 eax = MEM32(ebp + (-0x34)); /* 0x3803C02E: mov eax, dword ptr [ebp - 0x34] */ 4636 MEM32(ebp + (-0x28)) = ecx; /* 0x3803C031: mov dword ptr [ebp - 0x28], ecx */ 4637 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3803C034: fstp dword ptr [ebp - 0x28] */ 4638 MEM32(ebp + (-0x24)) = edx; /* 0x3803C037: mov dword ptr [ebp - 0x24], edx */ 4639 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C03A: fld dword ptr [ebp - 0x24] */ 4640 MEM32(ebp + (-0x20)) = eax; /* 0x3803C03D: mov dword ptr [ebp - 0x20], eax */ 4641 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803C040: fsub dword ptr [0x3806f02c] */ 4642 ecx = ebx; /* 0x3803C046: mov ecx, ebx */ 4643 edx = MEM32(ecx); /* 0x3803C048: mov edx, dword ptr [ecx] */ 4644 eax = MEM32(ecx + 0x4); /* 0x3803C04A: mov eax, dword ptr [ecx + 4] */ 4645 ecx = MEM32(ecx + 0x8); /* 0x3803C04D: mov ecx, dword ptr [ecx + 8] */ 4646 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803C050: fstp dword ptr [ebp - 0x24] */ 4647 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C053: fld dword ptr [ebp - 0x20] */ 4648 MEM32(ebp + (-0x60)) = ecx; /* 0x3803C056: mov dword ptr [ebp - 0x60], ecx */ 4649 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803C059: fsub dword ptr [0x3806f030] */ 4650 PUSH32(esp, 0x3806F028u); /* 0x3803C05F: push 0x3806f028 */ 4651 ecx = ebp + (-0x68); /* 0x3803C064: lea ecx, [ebp - 0x68] */ 4652 MEM32(ebp + (-0x68)) = edx; /* 0x3803C067: mov dword ptr [ebp - 0x68], edx */ 4653 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3803C06A: fstp dword ptr [ebp - 0x20] */ 4654 MEM32(ebp + (-0x64)) = eax; /* 0x3803C06D: mov dword ptr [ebp - 0x64], eax */ 4655 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803C070: call dword ptr [0x3804e4f4] */ 4656 RECOMP_FLAGS_IN(); 4657 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C076: fld dword ptr [ebp - 0x20] */ 4658 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3803C079: fmul dword ptr [ebp - 0x20] */ 4659 edx = MEM32(eax); /* 0x3803C07C: mov edx, dword ptr [eax] */ 4660 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C07E: fld dword ptr [ebp - 0x24] */ 4661 ecx = MEM32(eax + 0x4); /* 0x3803C081: mov ecx, dword ptr [eax + 4] */ 4662 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x3803C084: fmul dword ptr [ebp - 0x24] */ 4663 MEM32(ebp + (-0x54)) = edx; /* 0x3803C087: mov dword ptr [ebp - 0x54], edx */ 4664 edx = MEM32(eax + 0x8); /* 0x3803C08A: mov edx, dword ptr [eax + 8] */ 4665 MEM32(ebp + (-0x4C)) = edx; /* 0x3803C08D: mov dword ptr [ebp - 0x4c], edx */ 4666 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C090: faddp st(1) */ 4667 MEM32(ebp + (-0x50)) = ecx; /* 0x3803C092: mov dword ptr [ebp - 0x50], ecx */ 4668 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803C095: fld dword ptr [ebp - 0x28] */ 4669 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x3803C098: fmul dword ptr [ebp - 0x28] */ 4670 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C09B: faddp st(1) */ 4671 _st[0] = sqrt(_st[0]); /* 0x3803C09D: fsqrt */ 4672 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3803C09F: fld dword ptr [ebp - 0x4c] */ 4673 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x3803C0A2: fmul dword ptr [ebp - 0x4c] */ 4674 fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x3803C0A5: fld dword ptr [ebp - 0x50] */ 4675 _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x3803C0A8: fmul dword ptr [ebp - 0x50] */ 4676 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0AB: faddp st(1) */ 4677 fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x3803C0AD: fld dword ptr [ebp - 0x54] */ 4678 _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x3803C0B0: fmul dword ptr [ebp - 0x54] */ 4679 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0B3: faddp st(1) */ 4680 _st[0] = sqrt(_st[0]); /* 0x3803C0B5: fsqrt */ 4681 fp_xch(1); /* 0x3803C0B7: fxch st(1) */ 4682 fp_xch(1); /* 0x3803C0B9: fxch st(1) */ 4683 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803C0BB: fcompp */ 4684 fp_pop(); fp_pop(); 4685 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C0BD: fnstsw ax */ 4686 /* test HI8(eax), 0x41u */ /* 0x3803C0BF: test ah, 0x41 */ 4687 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 4688 _cf = 0; 4689 _flag_k = FK_NARROW(FK_TEST, 24); 4690 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C0C2: jne 0x3803c0e9 */ 4691 L_3803C0C4: 4692 eax = MEM32(ebp + (-0x3C)); /* 0x3803C0C4: mov eax, dword ptr [ebp - 0x3c] */ 4693 ecx = MEM32(ebp + (-0x38)); /* 0x3803C0C7: mov ecx, dword ptr [ebp - 0x38] */ 4694 edx = MEM32(ebp + (-0x34)); /* 0x3803C0CA: mov edx, dword ptr [ebp - 0x34] */ 4695 MEM32(ebx) = eax; /* 0x3803C0CD: mov dword ptr [ebx], eax */ 4696 eax = MEM32(ebp + 0x14); /* 0x3803C0CF: mov eax, dword ptr [ebp + 0x14] */ 4697 MEM32(ebx + 0x4) = ecx; /* 0x3803C0D2: mov dword ptr [ebx + 4], ecx */ 4698 ecx = MEM32(ebp + (-0x48)); /* 0x3803C0D5: mov ecx, dword ptr [ebp - 0x48] */ 4699 MEM32(ebx + 0x8) = edx; /* 0x3803C0D8: mov dword ptr [ebx + 8], edx */ 4700 edx = MEM32(ebp + (-0x44)); /* 0x3803C0DB: mov edx, dword ptr [ebp - 0x44] */ 4701 MEM32(eax) = ecx; /* 0x3803C0DE: mov dword ptr [eax], ecx */ 4702 ecx = MEM32(ebp + (-0x40)); /* 0x3803C0E0: mov ecx, dword ptr [ebp - 0x40] */ 4703 MEM32(eax + 0x4) = edx; /* 0x3803C0E3: mov dword ptr [eax + 4], edx */ 4704 MEM32(eax + 0x8) = ecx; /* 0x3803C0E6: mov dword ptr [eax + 8], ecx */ 4705 L_3803C0E9: 4706 edi = POP32_VAL(esp); /* 0x3803C0E9: pop edi */ 4707 esi = POP32_VAL(esp); /* 0x3803C0EA: pop esi */ 4708 SET_LO8(eax, 1); /* 0x3803C0EB: mov al, 1 */ 4709 ebx = POP32_VAL(esp); /* 0x3803C0ED: pop ebx */ 4710 esp = ebp; /* 0x3803C0EE: mov esp, ebp */ 4711 ebp = POP32_VAL(esp); /* 0x3803C0F0: pop ebp */ 4712 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C0F1: ret 0x18 */ 4713 L_3803C0F4: 4714 MEM32(ebp + (-0x54)) = 0xBF800000u; /* 0x3803C0F4: mov dword ptr [ebp - 0x54], 0xbf800000 */ 4715 eax = MEM32(ebp + (-0x54)); /* 0x3803C0FB: mov eax, dword ptr [ebp - 0x54] */ 4716 MEM32(ebp + (-0x50)) = 0xBF800000u; /* 0x3803C0FE: mov dword ptr [ebp - 0x50], 0xbf800000 */ 4717 ecx = MEM32(ebp + (-0x50)); /* 0x3803C105: mov ecx, dword ptr [ebp - 0x50] */ 4718 MEM32(ebp + (-0x4C)) = 0xBF800000u; /* 0x3803C108: mov dword ptr [ebp - 0x4c], 0xbf800000 */ 4719 edx = MEM32(ebp + (-0x4C)); /* 0x3803C10F: mov edx, dword ptr [ebp - 0x4c] */ 4720 MEM32(ebx) = eax; /* 0x3803C112: mov dword ptr [ebx], eax */ 4721 MEM32(ebx + 0x4) = ecx; /* 0x3803C114: mov dword ptr [ebx + 4], ecx */ 4722 MEM32(ebx + 0x8) = edx; /* 0x3803C117: mov dword ptr [ebx + 8], edx */ 4723 edi = POP32_VAL(esp); /* 0x3803C11A: pop edi */ 4724 esi = POP32_VAL(esp); /* 0x3803C11B: pop esi */ 4725 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 4726 SET_LO8(eax, 0); /* 0x3803C11C: xor al, al */ 4727 _cf = 0; 4728 _flag_k = FK_NARROW(FK_TEST, 24); 4729 ebx = POP32_VAL(esp); /* 0x3803C11E: pop ebx */ 4730 esp = ebp; /* 0x3803C11F: mov esp, ebp */ 4731 ebp = POP32_VAL(esp); /* 0x3803C121: pop ebp */ 4732 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C122: ret 0x18 */ 4733 RECOMP_REGS_OUT(); 4734 } 4735 4736 void sub_3803BE92(void) { 4737 int _fpu_cmp = 0; 4738 uint32_t _cf = 0; 4739 int _df = 1; 4740 uint32_t _flag_k = FK_NONE; 4741 uint32_t _flag_a = 0, _flag_b = 0; 4742 uint32_t _itail_tgt = 0; 4743 RECOMP_REGS_LOCALS 4744 RECOMP_ENTER(0x3803BE92u); 4745 4746 L_3803BE92: 4747 eax = MEM32(ebp + (-0x10)); /* 0x3803BE92: mov eax, dword ptr [ebp - 0x10] */ 4748 _st[0] *= (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BE95: fmul dword ptr [ebp + 0xc] */ 4749 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi); 4750 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4751 eax = eax - esi; /* 0x3803BE98: sub eax, esi */ 4752 _flag_k = FK_CMP; 4753 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x3803BE9A: cdq */ 4754 ecx = eax; /* 0x3803BE9B: mov ecx, eax */ 4755 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x1C) = _v; } /* 0x3803BE9D: fstp dword ptr [ebp + 0x1c] */ 4756 _flag_a = (uint32_t)((ecx ^ edx)); _flag_b = (uint32_t)((ecx ^ edx)); 4757 ecx = ecx ^ edx; /* 0x3803BEA0: xor ecx, edx */ 4758 _cf = 0; 4759 _flag_k = FK_TEST; 4760 eax = ebx; /* 0x3803BEA2: mov eax, ebx */ 4761 ebx = MEM32(ebp + 0x10); /* 0x3803BEA4: mov ebx, dword ptr [ebp + 0x10] */ 4762 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 4763 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4764 eax = eax - edi; /* 0x3803BEA7: sub eax, edi */ 4765 _flag_k = FK_CMP; 4766 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx); 4767 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4768 ecx = ecx - edx; /* 0x3803BEA9: sub ecx, edx */ 4769 _flag_k = FK_CMP; 4770 edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x3803BEAB: cdq */ 4771 _flag_a = (uint32_t)((eax ^ edx)); _flag_b = (uint32_t)((eax ^ edx)); 4772 eax = eax ^ edx; /* 0x3803BEAC: xor eax, edx */ 4773 _cf = 0; 4774 _flag_k = FK_TEST; 4775 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx); 4776 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4777 eax = eax - edx; /* 0x3803BEAE: sub eax, edx */ 4778 _flag_k = FK_CMP; 4779 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 4780 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4781 ecx = ecx + eax; /* 0x3803BEB0: add ecx, eax */ 4782 _flag_k = FK_ADD; 4783 MEM32(ebp + (-0x10)) = ecx; /* 0x3803BEB2: mov dword ptr [ebp - 0x10], ecx */ 4784 if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_S)) goto L_3803BFD9; /* 0x3803BEB5: js 0x3803bfd9 */ 4785 L_3803BEBB: 4786 /* test edi, edi */ /* 0x3803BEBB: test edi, edi */ 4787 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 4788 _cf = 0; 4789 _flag_k = FK_TEST; 4790 if (TEST_S(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BEBD: jl 0x3803bfa4 */ 4791 L_3803BEC3: 4792 /* cmp edi, MEM32(ebp + (-0x14)) */ /* 0x3803BEC3: cmp edi, dword ptr [ebp - 0x14] */ 4793 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebp + (-0x14))); 4794 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4795 _flag_k = FK_CMP; 4796 if (CMP_GE(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BEC6: jge 0x3803bfa4 */ 4797 L_3803BECC: 4798 /* test esi, esi */ /* 0x3803BECC: test esi, esi */ 4799 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 4800 _cf = 0; 4801 _flag_k = FK_TEST; 4802 if (TEST_S(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BECE: jl 0x3803bfa4 */ 4803 L_3803BED4: 4804 /* cmp esi, MEM32(ebp + (-0x18)) */ /* 0x3803BED4: cmp esi, dword ptr [ebp - 0x18] */ 4805 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(ebp + (-0x18))); 4806 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4807 _flag_k = FK_CMP; 4808 if (CMP_GE(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BED7: jge 0x3803bfa4 */ 4809 L_3803BEDD: 4810 edx = MEM32(ebp + 0x14); /* 0x3803BEDD: mov edx, dword ptr [ebp + 0x14] */ 4811 ecx = MEM32(ebp + (-0x1C)); /* 0x3803BEE0: mov ecx, dword ptr [ebp - 0x1c] */ 4812 PUSH32(esp, edx); /* 0x3803BEE3: push edx */ 4813 PUSH32(esp, ebx); /* 0x3803BEE4: push ebx */ 4814 PUSH32(esp, esi); /* 0x3803BEE5: push esi */ 4815 PUSH32(esp, edi); /* 0x3803BEE6: push edi */ 4816 RECOMP_ICALL(0x3803C220u); /* 0x3803BEE7: call 0x3803c220 */ /* not lifted */ 4817 RECOMP_FLAGS_IN(); 4818 /* cmp LO8(eax), 1 */ /* 0x3803BEEC: cmp al, 1 */ 4819 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 4820 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 4821 _flag_k = FK_NARROW(FK_CMP, 24); 4822 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BFA1; /* 0x3803BEEE: jne 0x3803bfa1 */ 4823 L_3803BEF4: 4824 eax = ebx; /* 0x3803BEF4: mov eax, ebx */ 4825 ecx = MEM32(eax); /* 0x3803BEF6: mov ecx, dword ptr [eax] */ 4826 edx = MEM32(eax + 0x4); /* 0x3803BEF8: mov edx, dword ptr [eax + 4] */ 4827 eax = MEM32(eax + 0x8); /* 0x3803BEFB: mov eax, dword ptr [eax + 8] */ 4828 MEM32(ebp + (-0x28)) = ecx; /* 0x3803BEFE: mov dword ptr [ebp - 0x28], ecx */ 4829 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803BF01: fld dword ptr [ebp - 0x28] */ 4830 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BF04: fsub dword ptr [0x3806f028] */ 4831 ecx = MEM32(0x3806F008); /* 0x3803BF0A: mov ecx, dword ptr [0x3806f008] */ 4832 MEM32(ebp + (-0x24)) = edx; /* 0x3803BF10: mov dword ptr [ebp - 0x24], edx */ 4833 edx = MEM32(0x3806F00C); /* 0x3803BF13: mov edx, dword ptr [0x3806f00c] */ 4834 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3803BF19: fstp dword ptr [ebp - 0x28] */ 4835 MEM32(ebp + (-0x20)) = eax; /* 0x3803BF1C: mov dword ptr [ebp - 0x20], eax */ 4836 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803BF1F: fld dword ptr [ebp - 0x24] */ 4837 eax = MEM32(0x3806F010); /* 0x3803BF22: mov eax, dword ptr [0x3806f010] */ 4838 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BF27: fsub dword ptr [0x3806f02c] */ 4839 MEM32(ebp + (-0x68)) = ecx; /* 0x3803BF2D: mov dword ptr [ebp - 0x68], ecx */ 4840 PUSH32(esp, 0x3806F028u); /* 0x3803BF30: push 0x3806f028 */ 4841 ecx = ebp + (-0x68); /* 0x3803BF35: lea ecx, [ebp - 0x68] */ 4842 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803BF38: fstp dword ptr [ebp - 0x24] */ 4843 MEM32(ebp + (-0x64)) = edx; /* 0x3803BF3B: mov dword ptr [ebp - 0x64], edx */ 4844 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803BF3E: fld dword ptr [ebp - 0x20] */ 4845 MEM32(ebp + (-0x60)) = eax; /* 0x3803BF41: mov dword ptr [ebp - 0x60], eax */ 4846 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BF44: fsub dword ptr [0x3806f030] */ 4847 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3803BF4A: fstp dword ptr [ebp - 0x20] */ 4848 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803BF4D: call dword ptr [0x3804e4f4] */ 4849 RECOMP_FLAGS_IN(); 4850 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803BF53: fld dword ptr [ebp - 0x20] */ 4851 ecx = MEM32(eax); /* 0x3803BF56: mov ecx, dword ptr [eax] */ 4852 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3803BF58: fmul dword ptr [ebp - 0x20] */ 4853 edx = MEM32(eax + 0x4); /* 0x3803BF5B: mov edx, dword ptr [eax + 4] */ 4854 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803BF5E: fld dword ptr [ebp - 0x24] */ 4855 eax = MEM32(eax + 0x8); /* 0x3803BF61: mov eax, dword ptr [eax + 8] */ 4856 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x3803BF64: fmul dword ptr [ebp - 0x24] */ 4857 MEM32(ebp + (-0x4C)) = eax; /* 0x3803BF67: mov dword ptr [ebp - 0x4c], eax */ 4858 MEM32(ebp + (-0x50)) = edx; /* 0x3803BF6A: mov dword ptr [ebp - 0x50], edx */ 4859 MEM32(ebp + (-0x54)) = ecx; /* 0x3803BF6D: mov dword ptr [ebp - 0x54], ecx */ 4860 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF70: faddp st(1) */ 4861 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803BF72: fld dword ptr [ebp - 0x28] */ 4862 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x3803BF75: fmul dword ptr [ebp - 0x28] */ 4863 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF78: faddp st(1) */ 4864 _st[0] = sqrt(_st[0]); /* 0x3803BF7A: fsqrt */ 4865 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3803BF7C: fld dword ptr [ebp - 0x4c] */ 4866 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x3803BF7F: fmul dword ptr [ebp - 0x4c] */ 4867 fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x3803BF82: fld dword ptr [ebp - 0x50] */ 4868 _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x3803BF85: fmul dword ptr [ebp - 0x50] */ 4869 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF88: faddp st(1) */ 4870 fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x3803BF8A: fld dword ptr [ebp - 0x54] */ 4871 _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x3803BF8D: fmul dword ptr [ebp - 0x54] */ 4872 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF90: faddp st(1) */ 4873 _st[0] = sqrt(_st[0]); /* 0x3803BF92: fsqrt */ 4874 fp_xch(1); /* 0x3803BF94: fxch st(1) */ 4875 fp_xch(1); /* 0x3803BF96: fxch st(1) */ 4876 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803BF98: fcompp */ 4877 fp_pop(); fp_pop(); 4878 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BF9A: fnstsw ax */ 4879 /* test HI8(eax), 0x41u */ /* 0x3803BF9C: test ah, 0x41 */ 4880 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 4881 _cf = 0; 4882 _flag_k = FK_NARROW(FK_TEST, 24); 4883 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C014; /* 0x3803BF9F: je 0x3803c014 */ 4884 L_3803BFA1: 4885 ecx = MEM32(ebp + (-0x10)); /* 0x3803BFA1: mov ecx, dword ptr [ebp - 0x10] */ 4886 L_3803BFA4: 4887 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BFA4: fld dword ptr [ebp + 0x18] */ 4888 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0x1C)); /* 0x3803BFA7: fcomp dword ptr [ebp + 0x1c] */ 4889 fp_pop(); 4890 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BFAA: fnstsw ax */ 4891 /* test HI8(eax), 1 */ /* 0x3803BFAC: test ah, 1 */ 4892 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 4893 _cf = 0; 4894 _flag_k = FK_NARROW(FK_TEST, 24); 4895 if (TEST_Z(_flag_a, _flag_b)) goto L_3803BFC1; /* 0x3803BFAF: je 0x3803bfc1 */ 4896 L_3803BFB1: 4897 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BFB1: fld dword ptr [ebp + 0x18] */ 4898 eax = MEM32(ebp + (-0x8)); /* 0x3803BFB4: mov eax, dword ptr [ebp - 8] */ 4899 _st[0] += (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BFB7: fadd dword ptr [ebp - 4] */ 4900 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 4901 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4902 edi = edi + eax; /* 0x3803BFBA: add edi, eax */ 4903 _flag_k = FK_ADD; 4904 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BFBC: fstp dword ptr [ebp + 0x18] */ 4905 goto L_3803BFCF; /* 0x3803BFBF: jmp 0x3803bfcf */ 4906 L_3803BFC1: 4907 fp_push(*(float*)&MEM32(ebp + 0x1C)); /* 0x3803BFC1: fld dword ptr [ebp + 0x1c] */ 4908 eax = MEM32(ebp + (-0xC)); /* 0x3803BFC4: mov eax, dword ptr [ebp - 0xc] */ 4909 _st[0] += (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BFC7: fadd dword ptr [ebp + 0xc] */ 4910 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 4911 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 4912 esi = esi + eax; /* 0x3803BFCA: add esi, eax */ 4913 _flag_k = FK_ADD; 4914 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x1C) = _v; } /* 0x3803BFCC: fstp dword ptr [ebp + 0x1c] */ 4915 L_3803BFCF: 4916 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 4917 ecx = ecx - 1; /* 0x3803BFCF: dec ecx */ 4918 _flag_k = FK_DEC; 4919 MEM32(ebp + (-0x10)) = ecx; /* 0x3803BFD0: mov dword ptr [ebp - 0x10], ecx */ 4920 RECOMP_BACKEDGE(); 4921 if (/* dec result */ CMP_NS(_flag_a, _flag_b)) goto L_3803BEBB; /* 0x3803BFD3: jns 0x3803bebb */ 4922 L_3803BFD9: 4923 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803BFD9: mov al, byte ptr [ebp + 0xb] */ 4924 /* test LO8(eax), LO8(eax) */ /* 0x3803BFDC: test al, al */ 4925 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4926 _cf = 0; 4927 _flag_k = FK_NARROW(FK_TEST, 24); 4928 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C0F4; /* 0x3803BFDE: je 0x3803c0f4 */ 4929 L_3803BFE4: 4930 edx = MEM32(ebp + (-0x3C)); /* 0x3803BFE4: mov edx, dword ptr [ebp - 0x3c] */ 4931 eax = MEM32(ebp + (-0x38)); /* 0x3803BFE7: mov eax, dword ptr [ebp - 0x38] */ 4932 ecx = MEM32(ebp + (-0x34)); /* 0x3803BFEA: mov ecx, dword ptr [ebp - 0x34] */ 4933 MEM32(ebx) = edx; /* 0x3803BFED: mov dword ptr [ebx], edx */ 4934 edx = MEM32(ebp + (-0x48)); /* 0x3803BFEF: mov edx, dword ptr [ebp - 0x48] */ 4935 MEM32(ebx + 0x4) = eax; /* 0x3803BFF2: mov dword ptr [ebx + 4], eax */ 4936 eax = MEM32(ebp + 0x14); /* 0x3803BFF5: mov eax, dword ptr [ebp + 0x14] */ 4937 MEM32(ebx + 0x8) = ecx; /* 0x3803BFF8: mov dword ptr [ebx + 8], ecx */ 4938 ecx = MEM32(ebp + (-0x44)); /* 0x3803BFFB: mov ecx, dword ptr [ebp - 0x44] */ 4939 MEM32(eax) = edx; /* 0x3803BFFE: mov dword ptr [eax], edx */ 4940 edx = MEM32(ebp + (-0x40)); /* 0x3803C000: mov edx, dword ptr [ebp - 0x40] */ 4941 edi = POP32_VAL(esp); /* 0x3803C003: pop edi */ 4942 MEM32(eax + 0x4) = ecx; /* 0x3803C004: mov dword ptr [eax + 4], ecx */ 4943 esi = POP32_VAL(esp); /* 0x3803C007: pop esi */ 4944 MEM32(eax + 0x8) = edx; /* 0x3803C008: mov dword ptr [eax + 8], edx */ 4945 SET_LO8(eax, 1); /* 0x3803C00B: mov al, 1 */ 4946 ebx = POP32_VAL(esp); /* 0x3803C00D: pop ebx */ 4947 esp = ebp; /* 0x3803C00E: mov esp, ebp */ 4948 ebp = POP32_VAL(esp); /* 0x3803C010: pop ebp */ 4949 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C011: ret 0x18 */ 4950 L_3803C014: 4951 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803C014: mov al, byte ptr [ebp + 0xb] */ 4952 /* test LO8(eax), LO8(eax) */ /* 0x3803C017: test al, al */ 4953 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 4954 _cf = 0; 4955 _flag_k = FK_NARROW(FK_TEST, 24); 4956 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C019: je 0x3803c0e9 */ 4957 L_3803C01F: 4958 fp_push(*(float*)&MEM32(ebp + (-0x3C))); /* 0x3803C01F: fld dword ptr [ebp - 0x3c] */ 4959 ecx = MEM32(ebp + (-0x3C)); /* 0x3803C022: mov ecx, dword ptr [ebp - 0x3c] */ 4960 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803C025: fsub dword ptr [0x3806f028] */ 4961 edx = MEM32(ebp + (-0x38)); /* 0x3803C02B: mov edx, dword ptr [ebp - 0x38] */ 4962 eax = MEM32(ebp + (-0x34)); /* 0x3803C02E: mov eax, dword ptr [ebp - 0x34] */ 4963 MEM32(ebp + (-0x28)) = ecx; /* 0x3803C031: mov dword ptr [ebp - 0x28], ecx */ 4964 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3803C034: fstp dword ptr [ebp - 0x28] */ 4965 MEM32(ebp + (-0x24)) = edx; /* 0x3803C037: mov dword ptr [ebp - 0x24], edx */ 4966 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C03A: fld dword ptr [ebp - 0x24] */ 4967 MEM32(ebp + (-0x20)) = eax; /* 0x3803C03D: mov dword ptr [ebp - 0x20], eax */ 4968 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803C040: fsub dword ptr [0x3806f02c] */ 4969 ecx = ebx; /* 0x3803C046: mov ecx, ebx */ 4970 edx = MEM32(ecx); /* 0x3803C048: mov edx, dword ptr [ecx] */ 4971 eax = MEM32(ecx + 0x4); /* 0x3803C04A: mov eax, dword ptr [ecx + 4] */ 4972 ecx = MEM32(ecx + 0x8); /* 0x3803C04D: mov ecx, dword ptr [ecx + 8] */ 4973 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803C050: fstp dword ptr [ebp - 0x24] */ 4974 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C053: fld dword ptr [ebp - 0x20] */ 4975 MEM32(ebp + (-0x60)) = ecx; /* 0x3803C056: mov dword ptr [ebp - 0x60], ecx */ 4976 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803C059: fsub dword ptr [0x3806f030] */ 4977 PUSH32(esp, 0x3806F028u); /* 0x3803C05F: push 0x3806f028 */ 4978 ecx = ebp + (-0x68); /* 0x3803C064: lea ecx, [ebp - 0x68] */ 4979 MEM32(ebp + (-0x68)) = edx; /* 0x3803C067: mov dword ptr [ebp - 0x68], edx */ 4980 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3803C06A: fstp dword ptr [ebp - 0x20] */ 4981 MEM32(ebp + (-0x64)) = eax; /* 0x3803C06D: mov dword ptr [ebp - 0x64], eax */ 4982 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803C070: call dword ptr [0x3804e4f4] */ 4983 RECOMP_FLAGS_IN(); 4984 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C076: fld dword ptr [ebp - 0x20] */ 4985 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3803C079: fmul dword ptr [ebp - 0x20] */ 4986 edx = MEM32(eax); /* 0x3803C07C: mov edx, dword ptr [eax] */ 4987 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C07E: fld dword ptr [ebp - 0x24] */ 4988 ecx = MEM32(eax + 0x4); /* 0x3803C081: mov ecx, dword ptr [eax + 4] */ 4989 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x3803C084: fmul dword ptr [ebp - 0x24] */ 4990 MEM32(ebp + (-0x54)) = edx; /* 0x3803C087: mov dword ptr [ebp - 0x54], edx */ 4991 edx = MEM32(eax + 0x8); /* 0x3803C08A: mov edx, dword ptr [eax + 8] */ 4992 MEM32(ebp + (-0x4C)) = edx; /* 0x3803C08D: mov dword ptr [ebp - 0x4c], edx */ 4993 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C090: faddp st(1) */ 4994 MEM32(ebp + (-0x50)) = ecx; /* 0x3803C092: mov dword ptr [ebp - 0x50], ecx */ 4995 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803C095: fld dword ptr [ebp - 0x28] */ 4996 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x3803C098: fmul dword ptr [ebp - 0x28] */ 4997 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C09B: faddp st(1) */ 4998 _st[0] = sqrt(_st[0]); /* 0x3803C09D: fsqrt */ 4999 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3803C09F: fld dword ptr [ebp - 0x4c] */ 5000 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x3803C0A2: fmul dword ptr [ebp - 0x4c] */ 5001 fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x3803C0A5: fld dword ptr [ebp - 0x50] */ 5002 _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x3803C0A8: fmul dword ptr [ebp - 0x50] */ 5003 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0AB: faddp st(1) */ 5004 fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x3803C0AD: fld dword ptr [ebp - 0x54] */ 5005 _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x3803C0B0: fmul dword ptr [ebp - 0x54] */ 5006 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0B3: faddp st(1) */ 5007 _st[0] = sqrt(_st[0]); /* 0x3803C0B5: fsqrt */ 5008 fp_xch(1); /* 0x3803C0B7: fxch st(1) */ 5009 fp_xch(1); /* 0x3803C0B9: fxch st(1) */ 5010 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803C0BB: fcompp */ 5011 fp_pop(); fp_pop(); 5012 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C0BD: fnstsw ax */ 5013 /* test HI8(eax), 0x41u */ /* 0x3803C0BF: test ah, 0x41 */ 5014 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 5015 _cf = 0; 5016 _flag_k = FK_NARROW(FK_TEST, 24); 5017 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C0C2: jne 0x3803c0e9 */ 5018 L_3803C0C4: 5019 eax = MEM32(ebp + (-0x3C)); /* 0x3803C0C4: mov eax, dword ptr [ebp - 0x3c] */ 5020 ecx = MEM32(ebp + (-0x38)); /* 0x3803C0C7: mov ecx, dword ptr [ebp - 0x38] */ 5021 edx = MEM32(ebp + (-0x34)); /* 0x3803C0CA: mov edx, dword ptr [ebp - 0x34] */ 5022 MEM32(ebx) = eax; /* 0x3803C0CD: mov dword ptr [ebx], eax */ 5023 eax = MEM32(ebp + 0x14); /* 0x3803C0CF: mov eax, dword ptr [ebp + 0x14] */ 5024 MEM32(ebx + 0x4) = ecx; /* 0x3803C0D2: mov dword ptr [ebx + 4], ecx */ 5025 ecx = MEM32(ebp + (-0x48)); /* 0x3803C0D5: mov ecx, dword ptr [ebp - 0x48] */ 5026 MEM32(ebx + 0x8) = edx; /* 0x3803C0D8: mov dword ptr [ebx + 8], edx */ 5027 edx = MEM32(ebp + (-0x44)); /* 0x3803C0DB: mov edx, dword ptr [ebp - 0x44] */ 5028 MEM32(eax) = ecx; /* 0x3803C0DE: mov dword ptr [eax], ecx */ 5029 ecx = MEM32(ebp + (-0x40)); /* 0x3803C0E0: mov ecx, dword ptr [ebp - 0x40] */ 5030 MEM32(eax + 0x4) = edx; /* 0x3803C0E3: mov dword ptr [eax + 4], edx */ 5031 MEM32(eax + 0x8) = ecx; /* 0x3803C0E6: mov dword ptr [eax + 8], ecx */ 5032 L_3803C0E9: 5033 edi = POP32_VAL(esp); /* 0x3803C0E9: pop edi */ 5034 esi = POP32_VAL(esp); /* 0x3803C0EA: pop esi */ 5035 SET_LO8(eax, 1); /* 0x3803C0EB: mov al, 1 */ 5036 ebx = POP32_VAL(esp); /* 0x3803C0ED: pop ebx */ 5037 esp = ebp; /* 0x3803C0EE: mov esp, ebp */ 5038 ebp = POP32_VAL(esp); /* 0x3803C0F0: pop ebp */ 5039 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C0F1: ret 0x18 */ 5040 L_3803C0F4: 5041 MEM32(ebp + (-0x54)) = 0xBF800000u; /* 0x3803C0F4: mov dword ptr [ebp - 0x54], 0xbf800000 */ 5042 eax = MEM32(ebp + (-0x54)); /* 0x3803C0FB: mov eax, dword ptr [ebp - 0x54] */ 5043 MEM32(ebp + (-0x50)) = 0xBF800000u; /* 0x3803C0FE: mov dword ptr [ebp - 0x50], 0xbf800000 */ 5044 ecx = MEM32(ebp + (-0x50)); /* 0x3803C105: mov ecx, dword ptr [ebp - 0x50] */ 5045 MEM32(ebp + (-0x4C)) = 0xBF800000u; /* 0x3803C108: mov dword ptr [ebp - 0x4c], 0xbf800000 */ 5046 edx = MEM32(ebp + (-0x4C)); /* 0x3803C10F: mov edx, dword ptr [ebp - 0x4c] */ 5047 MEM32(ebx) = eax; /* 0x3803C112: mov dword ptr [ebx], eax */ 5048 MEM32(ebx + 0x4) = ecx; /* 0x3803C114: mov dword ptr [ebx + 4], ecx */ 5049 MEM32(ebx + 0x8) = edx; /* 0x3803C117: mov dword ptr [ebx + 8], edx */ 5050 edi = POP32_VAL(esp); /* 0x3803C11A: pop edi */ 5051 esi = POP32_VAL(esp); /* 0x3803C11B: pop esi */ 5052 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 5053 SET_LO8(eax, 0); /* 0x3803C11C: xor al, al */ 5054 _cf = 0; 5055 _flag_k = FK_NARROW(FK_TEST, 24); 5056 ebx = POP32_VAL(esp); /* 0x3803C11E: pop ebx */ 5057 esp = ebp; /* 0x3803C11F: mov esp, ebp */ 5058 ebp = POP32_VAL(esp); /* 0x3803C121: pop ebp */ 5059 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C122: ret 0x18 */ 5060 RECOMP_REGS_OUT(); 5061 } 5062 5063 void sub_3803BEBB(void) { 5064 int _fpu_cmp = 0; 5065 uint32_t _cf = 0; 5066 int _df = 1; 5067 uint32_t _flag_k = FK_NONE; 5068 uint32_t _flag_a = 0, _flag_b = 0; 5069 uint32_t _itail_tgt = 0; 5070 RECOMP_REGS_LOCALS 5071 RECOMP_ENTER(0x3803BEBBu); 5072 5073 L_3803BEBB: 5074 /* test edi, edi */ /* 0x3803BEBB: test edi, edi */ 5075 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 5076 _cf = 0; 5077 _flag_k = FK_TEST; 5078 if (TEST_S(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BEBD: jl 0x3803bfa4 */ 5079 L_3803BEC3: 5080 /* cmp edi, MEM32(ebp + (-0x14)) */ /* 0x3803BEC3: cmp edi, dword ptr [ebp - 0x14] */ 5081 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebp + (-0x14))); 5082 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5083 _flag_k = FK_CMP; 5084 if (CMP_GE(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BEC6: jge 0x3803bfa4 */ 5085 L_3803BECC: 5086 /* test esi, esi */ /* 0x3803BECC: test esi, esi */ 5087 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 5088 _cf = 0; 5089 _flag_k = FK_TEST; 5090 if (TEST_S(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BECE: jl 0x3803bfa4 */ 5091 L_3803BED4: 5092 /* cmp esi, MEM32(ebp + (-0x18)) */ /* 0x3803BED4: cmp esi, dword ptr [ebp - 0x18] */ 5093 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(ebp + (-0x18))); 5094 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5095 _flag_k = FK_CMP; 5096 if (CMP_GE(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BED7: jge 0x3803bfa4 */ 5097 L_3803BEDD: 5098 edx = MEM32(ebp + 0x14); /* 0x3803BEDD: mov edx, dword ptr [ebp + 0x14] */ 5099 ecx = MEM32(ebp + (-0x1C)); /* 0x3803BEE0: mov ecx, dword ptr [ebp - 0x1c] */ 5100 PUSH32(esp, edx); /* 0x3803BEE3: push edx */ 5101 PUSH32(esp, ebx); /* 0x3803BEE4: push ebx */ 5102 PUSH32(esp, esi); /* 0x3803BEE5: push esi */ 5103 PUSH32(esp, edi); /* 0x3803BEE6: push edi */ 5104 RECOMP_ICALL(0x3803C220u); /* 0x3803BEE7: call 0x3803c220 */ /* not lifted */ 5105 RECOMP_FLAGS_IN(); 5106 /* cmp LO8(eax), 1 */ /* 0x3803BEEC: cmp al, 1 */ 5107 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5108 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5109 _flag_k = FK_NARROW(FK_CMP, 24); 5110 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BFA1; /* 0x3803BEEE: jne 0x3803bfa1 */ 5111 L_3803BEF4: 5112 eax = ebx; /* 0x3803BEF4: mov eax, ebx */ 5113 ecx = MEM32(eax); /* 0x3803BEF6: mov ecx, dword ptr [eax] */ 5114 edx = MEM32(eax + 0x4); /* 0x3803BEF8: mov edx, dword ptr [eax + 4] */ 5115 eax = MEM32(eax + 0x8); /* 0x3803BEFB: mov eax, dword ptr [eax + 8] */ 5116 MEM32(ebp + (-0x28)) = ecx; /* 0x3803BEFE: mov dword ptr [ebp - 0x28], ecx */ 5117 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803BF01: fld dword ptr [ebp - 0x28] */ 5118 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BF04: fsub dword ptr [0x3806f028] */ 5119 ecx = MEM32(0x3806F008); /* 0x3803BF0A: mov ecx, dword ptr [0x3806f008] */ 5120 MEM32(ebp + (-0x24)) = edx; /* 0x3803BF10: mov dword ptr [ebp - 0x24], edx */ 5121 edx = MEM32(0x3806F00C); /* 0x3803BF13: mov edx, dword ptr [0x3806f00c] */ 5122 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3803BF19: fstp dword ptr [ebp - 0x28] */ 5123 MEM32(ebp + (-0x20)) = eax; /* 0x3803BF1C: mov dword ptr [ebp - 0x20], eax */ 5124 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803BF1F: fld dword ptr [ebp - 0x24] */ 5125 eax = MEM32(0x3806F010); /* 0x3803BF22: mov eax, dword ptr [0x3806f010] */ 5126 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BF27: fsub dword ptr [0x3806f02c] */ 5127 MEM32(ebp + (-0x68)) = ecx; /* 0x3803BF2D: mov dword ptr [ebp - 0x68], ecx */ 5128 PUSH32(esp, 0x3806F028u); /* 0x3803BF30: push 0x3806f028 */ 5129 ecx = ebp + (-0x68); /* 0x3803BF35: lea ecx, [ebp - 0x68] */ 5130 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803BF38: fstp dword ptr [ebp - 0x24] */ 5131 MEM32(ebp + (-0x64)) = edx; /* 0x3803BF3B: mov dword ptr [ebp - 0x64], edx */ 5132 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803BF3E: fld dword ptr [ebp - 0x20] */ 5133 MEM32(ebp + (-0x60)) = eax; /* 0x3803BF41: mov dword ptr [ebp - 0x60], eax */ 5134 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BF44: fsub dword ptr [0x3806f030] */ 5135 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3803BF4A: fstp dword ptr [ebp - 0x20] */ 5136 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803BF4D: call dword ptr [0x3804e4f4] */ 5137 RECOMP_FLAGS_IN(); 5138 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803BF53: fld dword ptr [ebp - 0x20] */ 5139 ecx = MEM32(eax); /* 0x3803BF56: mov ecx, dword ptr [eax] */ 5140 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3803BF58: fmul dword ptr [ebp - 0x20] */ 5141 edx = MEM32(eax + 0x4); /* 0x3803BF5B: mov edx, dword ptr [eax + 4] */ 5142 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803BF5E: fld dword ptr [ebp - 0x24] */ 5143 eax = MEM32(eax + 0x8); /* 0x3803BF61: mov eax, dword ptr [eax + 8] */ 5144 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x3803BF64: fmul dword ptr [ebp - 0x24] */ 5145 MEM32(ebp + (-0x4C)) = eax; /* 0x3803BF67: mov dword ptr [ebp - 0x4c], eax */ 5146 MEM32(ebp + (-0x50)) = edx; /* 0x3803BF6A: mov dword ptr [ebp - 0x50], edx */ 5147 MEM32(ebp + (-0x54)) = ecx; /* 0x3803BF6D: mov dword ptr [ebp - 0x54], ecx */ 5148 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF70: faddp st(1) */ 5149 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803BF72: fld dword ptr [ebp - 0x28] */ 5150 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x3803BF75: fmul dword ptr [ebp - 0x28] */ 5151 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF78: faddp st(1) */ 5152 _st[0] = sqrt(_st[0]); /* 0x3803BF7A: fsqrt */ 5153 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3803BF7C: fld dword ptr [ebp - 0x4c] */ 5154 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x3803BF7F: fmul dword ptr [ebp - 0x4c] */ 5155 fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x3803BF82: fld dword ptr [ebp - 0x50] */ 5156 _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x3803BF85: fmul dword ptr [ebp - 0x50] */ 5157 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF88: faddp st(1) */ 5158 fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x3803BF8A: fld dword ptr [ebp - 0x54] */ 5159 _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x3803BF8D: fmul dword ptr [ebp - 0x54] */ 5160 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF90: faddp st(1) */ 5161 _st[0] = sqrt(_st[0]); /* 0x3803BF92: fsqrt */ 5162 fp_xch(1); /* 0x3803BF94: fxch st(1) */ 5163 fp_xch(1); /* 0x3803BF96: fxch st(1) */ 5164 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803BF98: fcompp */ 5165 fp_pop(); fp_pop(); 5166 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BF9A: fnstsw ax */ 5167 /* test HI8(eax), 0x41u */ /* 0x3803BF9C: test ah, 0x41 */ 5168 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 5169 _cf = 0; 5170 _flag_k = FK_NARROW(FK_TEST, 24); 5171 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C014; /* 0x3803BF9F: je 0x3803c014 */ 5172 L_3803BFA1: 5173 ecx = MEM32(ebp + (-0x10)); /* 0x3803BFA1: mov ecx, dword ptr [ebp - 0x10] */ 5174 L_3803BFA4: 5175 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BFA4: fld dword ptr [ebp + 0x18] */ 5176 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0x1C)); /* 0x3803BFA7: fcomp dword ptr [ebp + 0x1c] */ 5177 fp_pop(); 5178 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BFAA: fnstsw ax */ 5179 /* test HI8(eax), 1 */ /* 0x3803BFAC: test ah, 1 */ 5180 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5181 _cf = 0; 5182 _flag_k = FK_NARROW(FK_TEST, 24); 5183 if (TEST_Z(_flag_a, _flag_b)) goto L_3803BFC1; /* 0x3803BFAF: je 0x3803bfc1 */ 5184 L_3803BFB1: 5185 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BFB1: fld dword ptr [ebp + 0x18] */ 5186 eax = MEM32(ebp + (-0x8)); /* 0x3803BFB4: mov eax, dword ptr [ebp - 8] */ 5187 _st[0] += (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BFB7: fadd dword ptr [ebp - 4] */ 5188 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 5189 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5190 edi = edi + eax; /* 0x3803BFBA: add edi, eax */ 5191 _flag_k = FK_ADD; 5192 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BFBC: fstp dword ptr [ebp + 0x18] */ 5193 goto L_3803BFCF; /* 0x3803BFBF: jmp 0x3803bfcf */ 5194 L_3803BFC1: 5195 fp_push(*(float*)&MEM32(ebp + 0x1C)); /* 0x3803BFC1: fld dword ptr [ebp + 0x1c] */ 5196 eax = MEM32(ebp + (-0xC)); /* 0x3803BFC4: mov eax, dword ptr [ebp - 0xc] */ 5197 _st[0] += (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BFC7: fadd dword ptr [ebp + 0xc] */ 5198 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 5199 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5200 esi = esi + eax; /* 0x3803BFCA: add esi, eax */ 5201 _flag_k = FK_ADD; 5202 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x1C) = _v; } /* 0x3803BFCC: fstp dword ptr [ebp + 0x1c] */ 5203 L_3803BFCF: 5204 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 5205 ecx = ecx - 1; /* 0x3803BFCF: dec ecx */ 5206 _flag_k = FK_DEC; 5207 MEM32(ebp + (-0x10)) = ecx; /* 0x3803BFD0: mov dword ptr [ebp - 0x10], ecx */ 5208 RECOMP_BACKEDGE(); 5209 if (/* dec result */ CMP_NS(_flag_a, _flag_b)) goto L_3803BEBB; /* 0x3803BFD3: jns 0x3803bebb */ 5210 L_3803BFD9: 5211 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803BFD9: mov al, byte ptr [ebp + 0xb] */ 5212 /* test LO8(eax), LO8(eax) */ /* 0x3803BFDC: test al, al */ 5213 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5214 _cf = 0; 5215 _flag_k = FK_NARROW(FK_TEST, 24); 5216 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C0F4; /* 0x3803BFDE: je 0x3803c0f4 */ 5217 L_3803BFE4: 5218 edx = MEM32(ebp + (-0x3C)); /* 0x3803BFE4: mov edx, dword ptr [ebp - 0x3c] */ 5219 eax = MEM32(ebp + (-0x38)); /* 0x3803BFE7: mov eax, dword ptr [ebp - 0x38] */ 5220 ecx = MEM32(ebp + (-0x34)); /* 0x3803BFEA: mov ecx, dword ptr [ebp - 0x34] */ 5221 MEM32(ebx) = edx; /* 0x3803BFED: mov dword ptr [ebx], edx */ 5222 edx = MEM32(ebp + (-0x48)); /* 0x3803BFEF: mov edx, dword ptr [ebp - 0x48] */ 5223 MEM32(ebx + 0x4) = eax; /* 0x3803BFF2: mov dword ptr [ebx + 4], eax */ 5224 eax = MEM32(ebp + 0x14); /* 0x3803BFF5: mov eax, dword ptr [ebp + 0x14] */ 5225 MEM32(ebx + 0x8) = ecx; /* 0x3803BFF8: mov dword ptr [ebx + 8], ecx */ 5226 ecx = MEM32(ebp + (-0x44)); /* 0x3803BFFB: mov ecx, dword ptr [ebp - 0x44] */ 5227 MEM32(eax) = edx; /* 0x3803BFFE: mov dword ptr [eax], edx */ 5228 edx = MEM32(ebp + (-0x40)); /* 0x3803C000: mov edx, dword ptr [ebp - 0x40] */ 5229 edi = POP32_VAL(esp); /* 0x3803C003: pop edi */ 5230 MEM32(eax + 0x4) = ecx; /* 0x3803C004: mov dword ptr [eax + 4], ecx */ 5231 esi = POP32_VAL(esp); /* 0x3803C007: pop esi */ 5232 MEM32(eax + 0x8) = edx; /* 0x3803C008: mov dword ptr [eax + 8], edx */ 5233 SET_LO8(eax, 1); /* 0x3803C00B: mov al, 1 */ 5234 ebx = POP32_VAL(esp); /* 0x3803C00D: pop ebx */ 5235 esp = ebp; /* 0x3803C00E: mov esp, ebp */ 5236 ebp = POP32_VAL(esp); /* 0x3803C010: pop ebp */ 5237 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C011: ret 0x18 */ 5238 L_3803C014: 5239 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803C014: mov al, byte ptr [ebp + 0xb] */ 5240 /* test LO8(eax), LO8(eax) */ /* 0x3803C017: test al, al */ 5241 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5242 _cf = 0; 5243 _flag_k = FK_NARROW(FK_TEST, 24); 5244 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C019: je 0x3803c0e9 */ 5245 L_3803C01F: 5246 fp_push(*(float*)&MEM32(ebp + (-0x3C))); /* 0x3803C01F: fld dword ptr [ebp - 0x3c] */ 5247 ecx = MEM32(ebp + (-0x3C)); /* 0x3803C022: mov ecx, dword ptr [ebp - 0x3c] */ 5248 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803C025: fsub dword ptr [0x3806f028] */ 5249 edx = MEM32(ebp + (-0x38)); /* 0x3803C02B: mov edx, dword ptr [ebp - 0x38] */ 5250 eax = MEM32(ebp + (-0x34)); /* 0x3803C02E: mov eax, dword ptr [ebp - 0x34] */ 5251 MEM32(ebp + (-0x28)) = ecx; /* 0x3803C031: mov dword ptr [ebp - 0x28], ecx */ 5252 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3803C034: fstp dword ptr [ebp - 0x28] */ 5253 MEM32(ebp + (-0x24)) = edx; /* 0x3803C037: mov dword ptr [ebp - 0x24], edx */ 5254 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C03A: fld dword ptr [ebp - 0x24] */ 5255 MEM32(ebp + (-0x20)) = eax; /* 0x3803C03D: mov dword ptr [ebp - 0x20], eax */ 5256 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803C040: fsub dword ptr [0x3806f02c] */ 5257 ecx = ebx; /* 0x3803C046: mov ecx, ebx */ 5258 edx = MEM32(ecx); /* 0x3803C048: mov edx, dword ptr [ecx] */ 5259 eax = MEM32(ecx + 0x4); /* 0x3803C04A: mov eax, dword ptr [ecx + 4] */ 5260 ecx = MEM32(ecx + 0x8); /* 0x3803C04D: mov ecx, dword ptr [ecx + 8] */ 5261 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803C050: fstp dword ptr [ebp - 0x24] */ 5262 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C053: fld dword ptr [ebp - 0x20] */ 5263 MEM32(ebp + (-0x60)) = ecx; /* 0x3803C056: mov dword ptr [ebp - 0x60], ecx */ 5264 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803C059: fsub dword ptr [0x3806f030] */ 5265 PUSH32(esp, 0x3806F028u); /* 0x3803C05F: push 0x3806f028 */ 5266 ecx = ebp + (-0x68); /* 0x3803C064: lea ecx, [ebp - 0x68] */ 5267 MEM32(ebp + (-0x68)) = edx; /* 0x3803C067: mov dword ptr [ebp - 0x68], edx */ 5268 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3803C06A: fstp dword ptr [ebp - 0x20] */ 5269 MEM32(ebp + (-0x64)) = eax; /* 0x3803C06D: mov dword ptr [ebp - 0x64], eax */ 5270 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803C070: call dword ptr [0x3804e4f4] */ 5271 RECOMP_FLAGS_IN(); 5272 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C076: fld dword ptr [ebp - 0x20] */ 5273 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3803C079: fmul dword ptr [ebp - 0x20] */ 5274 edx = MEM32(eax); /* 0x3803C07C: mov edx, dword ptr [eax] */ 5275 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C07E: fld dword ptr [ebp - 0x24] */ 5276 ecx = MEM32(eax + 0x4); /* 0x3803C081: mov ecx, dword ptr [eax + 4] */ 5277 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x3803C084: fmul dword ptr [ebp - 0x24] */ 5278 MEM32(ebp + (-0x54)) = edx; /* 0x3803C087: mov dword ptr [ebp - 0x54], edx */ 5279 edx = MEM32(eax + 0x8); /* 0x3803C08A: mov edx, dword ptr [eax + 8] */ 5280 MEM32(ebp + (-0x4C)) = edx; /* 0x3803C08D: mov dword ptr [ebp - 0x4c], edx */ 5281 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C090: faddp st(1) */ 5282 MEM32(ebp + (-0x50)) = ecx; /* 0x3803C092: mov dword ptr [ebp - 0x50], ecx */ 5283 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803C095: fld dword ptr [ebp - 0x28] */ 5284 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x3803C098: fmul dword ptr [ebp - 0x28] */ 5285 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C09B: faddp st(1) */ 5286 _st[0] = sqrt(_st[0]); /* 0x3803C09D: fsqrt */ 5287 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3803C09F: fld dword ptr [ebp - 0x4c] */ 5288 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x3803C0A2: fmul dword ptr [ebp - 0x4c] */ 5289 fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x3803C0A5: fld dword ptr [ebp - 0x50] */ 5290 _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x3803C0A8: fmul dword ptr [ebp - 0x50] */ 5291 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0AB: faddp st(1) */ 5292 fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x3803C0AD: fld dword ptr [ebp - 0x54] */ 5293 _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x3803C0B0: fmul dword ptr [ebp - 0x54] */ 5294 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0B3: faddp st(1) */ 5295 _st[0] = sqrt(_st[0]); /* 0x3803C0B5: fsqrt */ 5296 fp_xch(1); /* 0x3803C0B7: fxch st(1) */ 5297 fp_xch(1); /* 0x3803C0B9: fxch st(1) */ 5298 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803C0BB: fcompp */ 5299 fp_pop(); fp_pop(); 5300 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C0BD: fnstsw ax */ 5301 /* test HI8(eax), 0x41u */ /* 0x3803C0BF: test ah, 0x41 */ 5302 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 5303 _cf = 0; 5304 _flag_k = FK_NARROW(FK_TEST, 24); 5305 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C0C2: jne 0x3803c0e9 */ 5306 L_3803C0C4: 5307 eax = MEM32(ebp + (-0x3C)); /* 0x3803C0C4: mov eax, dword ptr [ebp - 0x3c] */ 5308 ecx = MEM32(ebp + (-0x38)); /* 0x3803C0C7: mov ecx, dword ptr [ebp - 0x38] */ 5309 edx = MEM32(ebp + (-0x34)); /* 0x3803C0CA: mov edx, dword ptr [ebp - 0x34] */ 5310 MEM32(ebx) = eax; /* 0x3803C0CD: mov dword ptr [ebx], eax */ 5311 eax = MEM32(ebp + 0x14); /* 0x3803C0CF: mov eax, dword ptr [ebp + 0x14] */ 5312 MEM32(ebx + 0x4) = ecx; /* 0x3803C0D2: mov dword ptr [ebx + 4], ecx */ 5313 ecx = MEM32(ebp + (-0x48)); /* 0x3803C0D5: mov ecx, dword ptr [ebp - 0x48] */ 5314 MEM32(ebx + 0x8) = edx; /* 0x3803C0D8: mov dword ptr [ebx + 8], edx */ 5315 edx = MEM32(ebp + (-0x44)); /* 0x3803C0DB: mov edx, dword ptr [ebp - 0x44] */ 5316 MEM32(eax) = ecx; /* 0x3803C0DE: mov dword ptr [eax], ecx */ 5317 ecx = MEM32(ebp + (-0x40)); /* 0x3803C0E0: mov ecx, dword ptr [ebp - 0x40] */ 5318 MEM32(eax + 0x4) = edx; /* 0x3803C0E3: mov dword ptr [eax + 4], edx */ 5319 MEM32(eax + 0x8) = ecx; /* 0x3803C0E6: mov dword ptr [eax + 8], ecx */ 5320 L_3803C0E9: 5321 edi = POP32_VAL(esp); /* 0x3803C0E9: pop edi */ 5322 esi = POP32_VAL(esp); /* 0x3803C0EA: pop esi */ 5323 SET_LO8(eax, 1); /* 0x3803C0EB: mov al, 1 */ 5324 ebx = POP32_VAL(esp); /* 0x3803C0ED: pop ebx */ 5325 esp = ebp; /* 0x3803C0EE: mov esp, ebp */ 5326 ebp = POP32_VAL(esp); /* 0x3803C0F0: pop ebp */ 5327 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C0F1: ret 0x18 */ 5328 L_3803C0F4: 5329 MEM32(ebp + (-0x54)) = 0xBF800000u; /* 0x3803C0F4: mov dword ptr [ebp - 0x54], 0xbf800000 */ 5330 eax = MEM32(ebp + (-0x54)); /* 0x3803C0FB: mov eax, dword ptr [ebp - 0x54] */ 5331 MEM32(ebp + (-0x50)) = 0xBF800000u; /* 0x3803C0FE: mov dword ptr [ebp - 0x50], 0xbf800000 */ 5332 ecx = MEM32(ebp + (-0x50)); /* 0x3803C105: mov ecx, dword ptr [ebp - 0x50] */ 5333 MEM32(ebp + (-0x4C)) = 0xBF800000u; /* 0x3803C108: mov dword ptr [ebp - 0x4c], 0xbf800000 */ 5334 edx = MEM32(ebp + (-0x4C)); /* 0x3803C10F: mov edx, dword ptr [ebp - 0x4c] */ 5335 MEM32(ebx) = eax; /* 0x3803C112: mov dword ptr [ebx], eax */ 5336 MEM32(ebx + 0x4) = ecx; /* 0x3803C114: mov dword ptr [ebx + 4], ecx */ 5337 MEM32(ebx + 0x8) = edx; /* 0x3803C117: mov dword ptr [ebx + 8], edx */ 5338 edi = POP32_VAL(esp); /* 0x3803C11A: pop edi */ 5339 esi = POP32_VAL(esp); /* 0x3803C11B: pop esi */ 5340 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 5341 SET_LO8(eax, 0); /* 0x3803C11C: xor al, al */ 5342 _cf = 0; 5343 _flag_k = FK_NARROW(FK_TEST, 24); 5344 ebx = POP32_VAL(esp); /* 0x3803C11E: pop ebx */ 5345 esp = ebp; /* 0x3803C11F: mov esp, ebp */ 5346 ebp = POP32_VAL(esp); /* 0x3803C121: pop ebp */ 5347 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C122: ret 0x18 */ 5348 RECOMP_REGS_OUT(); 5349 } 5350 5351 void sub_3803BFCF(void) { 5352 int _fpu_cmp = 0; 5353 uint32_t _cf = 0; 5354 int _df = 1; 5355 uint32_t _flag_k = FK_NONE; 5356 uint32_t _flag_a = 0, _flag_b = 0; 5357 uint32_t _itail_tgt = 0; 5358 RECOMP_REGS_LOCALS 5359 RECOMP_ENTER(0x3803BFCFu); 5360 5361 goto L_3803BFCF; 5362 L_3803BEBB: 5363 /* test edi, edi */ /* 0x3803BEBB: test edi, edi */ 5364 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 5365 _cf = 0; 5366 _flag_k = FK_TEST; 5367 if (TEST_S(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BEBD: jl 0x3803bfa4 */ 5368 L_3803BEC3: 5369 /* cmp edi, MEM32(ebp + (-0x14)) */ /* 0x3803BEC3: cmp edi, dword ptr [ebp - 0x14] */ 5370 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebp + (-0x14))); 5371 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5372 _flag_k = FK_CMP; 5373 if (CMP_GE(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BEC6: jge 0x3803bfa4 */ 5374 L_3803BECC: 5375 /* test esi, esi */ /* 0x3803BECC: test esi, esi */ 5376 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi); 5377 _cf = 0; 5378 _flag_k = FK_TEST; 5379 if (TEST_S(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BECE: jl 0x3803bfa4 */ 5380 L_3803BED4: 5381 /* cmp esi, MEM32(ebp + (-0x18)) */ /* 0x3803BED4: cmp esi, dword ptr [ebp - 0x18] */ 5382 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(ebp + (-0x18))); 5383 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5384 _flag_k = FK_CMP; 5385 if (CMP_GE(_flag_a, _flag_b)) goto L_3803BFA4; /* 0x3803BED7: jge 0x3803bfa4 */ 5386 L_3803BEDD: 5387 edx = MEM32(ebp + 0x14); /* 0x3803BEDD: mov edx, dword ptr [ebp + 0x14] */ 5388 ecx = MEM32(ebp + (-0x1C)); /* 0x3803BEE0: mov ecx, dword ptr [ebp - 0x1c] */ 5389 PUSH32(esp, edx); /* 0x3803BEE3: push edx */ 5390 PUSH32(esp, ebx); /* 0x3803BEE4: push ebx */ 5391 PUSH32(esp, esi); /* 0x3803BEE5: push esi */ 5392 PUSH32(esp, edi); /* 0x3803BEE6: push edi */ 5393 RECOMP_ICALL(0x3803C220u); /* 0x3803BEE7: call 0x3803c220 */ /* not lifted */ 5394 RECOMP_FLAGS_IN(); 5395 /* cmp LO8(eax), 1 */ /* 0x3803BEEC: cmp al, 1 */ 5396 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5397 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5398 _flag_k = FK_NARROW(FK_CMP, 24); 5399 if (CMP_NE(_flag_a, _flag_b)) goto L_3803BFA1; /* 0x3803BEEE: jne 0x3803bfa1 */ 5400 L_3803BEF4: 5401 eax = ebx; /* 0x3803BEF4: mov eax, ebx */ 5402 ecx = MEM32(eax); /* 0x3803BEF6: mov ecx, dword ptr [eax] */ 5403 edx = MEM32(eax + 0x4); /* 0x3803BEF8: mov edx, dword ptr [eax + 4] */ 5404 eax = MEM32(eax + 0x8); /* 0x3803BEFB: mov eax, dword ptr [eax + 8] */ 5405 MEM32(ebp + (-0x28)) = ecx; /* 0x3803BEFE: mov dword ptr [ebp - 0x28], ecx */ 5406 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803BF01: fld dword ptr [ebp - 0x28] */ 5407 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803BF04: fsub dword ptr [0x3806f028] */ 5408 ecx = MEM32(0x3806F008); /* 0x3803BF0A: mov ecx, dword ptr [0x3806f008] */ 5409 MEM32(ebp + (-0x24)) = edx; /* 0x3803BF10: mov dword ptr [ebp - 0x24], edx */ 5410 edx = MEM32(0x3806F00C); /* 0x3803BF13: mov edx, dword ptr [0x3806f00c] */ 5411 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3803BF19: fstp dword ptr [ebp - 0x28] */ 5412 MEM32(ebp + (-0x20)) = eax; /* 0x3803BF1C: mov dword ptr [ebp - 0x20], eax */ 5413 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803BF1F: fld dword ptr [ebp - 0x24] */ 5414 eax = MEM32(0x3806F010); /* 0x3803BF22: mov eax, dword ptr [0x3806f010] */ 5415 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803BF27: fsub dword ptr [0x3806f02c] */ 5416 MEM32(ebp + (-0x68)) = ecx; /* 0x3803BF2D: mov dword ptr [ebp - 0x68], ecx */ 5417 PUSH32(esp, 0x3806F028u); /* 0x3803BF30: push 0x3806f028 */ 5418 ecx = ebp + (-0x68); /* 0x3803BF35: lea ecx, [ebp - 0x68] */ 5419 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803BF38: fstp dword ptr [ebp - 0x24] */ 5420 MEM32(ebp + (-0x64)) = edx; /* 0x3803BF3B: mov dword ptr [ebp - 0x64], edx */ 5421 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803BF3E: fld dword ptr [ebp - 0x20] */ 5422 MEM32(ebp + (-0x60)) = eax; /* 0x3803BF41: mov dword ptr [ebp - 0x60], eax */ 5423 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803BF44: fsub dword ptr [0x3806f030] */ 5424 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3803BF4A: fstp dword ptr [ebp - 0x20] */ 5425 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803BF4D: call dword ptr [0x3804e4f4] */ 5426 RECOMP_FLAGS_IN(); 5427 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803BF53: fld dword ptr [ebp - 0x20] */ 5428 ecx = MEM32(eax); /* 0x3803BF56: mov ecx, dword ptr [eax] */ 5429 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3803BF58: fmul dword ptr [ebp - 0x20] */ 5430 edx = MEM32(eax + 0x4); /* 0x3803BF5B: mov edx, dword ptr [eax + 4] */ 5431 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803BF5E: fld dword ptr [ebp - 0x24] */ 5432 eax = MEM32(eax + 0x8); /* 0x3803BF61: mov eax, dword ptr [eax + 8] */ 5433 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x3803BF64: fmul dword ptr [ebp - 0x24] */ 5434 MEM32(ebp + (-0x4C)) = eax; /* 0x3803BF67: mov dword ptr [ebp - 0x4c], eax */ 5435 MEM32(ebp + (-0x50)) = edx; /* 0x3803BF6A: mov dword ptr [ebp - 0x50], edx */ 5436 MEM32(ebp + (-0x54)) = ecx; /* 0x3803BF6D: mov dword ptr [ebp - 0x54], ecx */ 5437 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF70: faddp st(1) */ 5438 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803BF72: fld dword ptr [ebp - 0x28] */ 5439 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x3803BF75: fmul dword ptr [ebp - 0x28] */ 5440 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF78: faddp st(1) */ 5441 _st[0] = sqrt(_st[0]); /* 0x3803BF7A: fsqrt */ 5442 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3803BF7C: fld dword ptr [ebp - 0x4c] */ 5443 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x3803BF7F: fmul dword ptr [ebp - 0x4c] */ 5444 fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x3803BF82: fld dword ptr [ebp - 0x50] */ 5445 _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x3803BF85: fmul dword ptr [ebp - 0x50] */ 5446 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF88: faddp st(1) */ 5447 fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x3803BF8A: fld dword ptr [ebp - 0x54] */ 5448 _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x3803BF8D: fmul dword ptr [ebp - 0x54] */ 5449 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803BF90: faddp st(1) */ 5450 _st[0] = sqrt(_st[0]); /* 0x3803BF92: fsqrt */ 5451 fp_xch(1); /* 0x3803BF94: fxch st(1) */ 5452 fp_xch(1); /* 0x3803BF96: fxch st(1) */ 5453 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803BF98: fcompp */ 5454 fp_pop(); fp_pop(); 5455 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BF9A: fnstsw ax */ 5456 /* test HI8(eax), 0x41u */ /* 0x3803BF9C: test ah, 0x41 */ 5457 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 5458 _cf = 0; 5459 _flag_k = FK_NARROW(FK_TEST, 24); 5460 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C014; /* 0x3803BF9F: je 0x3803c014 */ 5461 L_3803BFA1: 5462 ecx = MEM32(ebp + (-0x10)); /* 0x3803BFA1: mov ecx, dword ptr [ebp - 0x10] */ 5463 L_3803BFA4: 5464 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BFA4: fld dword ptr [ebp + 0x18] */ 5465 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + 0x1C)); /* 0x3803BFA7: fcomp dword ptr [ebp + 0x1c] */ 5466 fp_pop(); 5467 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803BFAA: fnstsw ax */ 5468 /* test HI8(eax), 1 */ /* 0x3803BFAC: test ah, 1 */ 5469 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5470 _cf = 0; 5471 _flag_k = FK_NARROW(FK_TEST, 24); 5472 if (TEST_Z(_flag_a, _flag_b)) goto L_3803BFC1; /* 0x3803BFAF: je 0x3803bfc1 */ 5473 L_3803BFB1: 5474 fp_push(*(float*)&MEM32(ebp + 0x18)); /* 0x3803BFB1: fld dword ptr [ebp + 0x18] */ 5475 eax = MEM32(ebp + (-0x8)); /* 0x3803BFB4: mov eax, dword ptr [ebp - 8] */ 5476 _st[0] += (double)*(float*)ADDR(ebp + (-0x4)); /* 0x3803BFB7: fadd dword ptr [ebp - 4] */ 5477 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax); 5478 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5479 edi = edi + eax; /* 0x3803BFBA: add edi, eax */ 5480 _flag_k = FK_ADD; 5481 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x18) = _v; } /* 0x3803BFBC: fstp dword ptr [ebp + 0x18] */ 5482 goto L_3803BFCF; /* 0x3803BFBF: jmp 0x3803bfcf */ 5483 L_3803BFC1: 5484 fp_push(*(float*)&MEM32(ebp + 0x1C)); /* 0x3803BFC1: fld dword ptr [ebp + 0x1c] */ 5485 eax = MEM32(ebp + (-0xC)); /* 0x3803BFC4: mov eax, dword ptr [ebp - 0xc] */ 5486 _st[0] += (double)*(float*)ADDR(ebp + 0xC); /* 0x3803BFC7: fadd dword ptr [ebp + 0xc] */ 5487 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 5488 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 5489 esi = esi + eax; /* 0x3803BFCA: add esi, eax */ 5490 _flag_k = FK_ADD; 5491 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x1C) = _v; } /* 0x3803BFCC: fstp dword ptr [ebp + 0x1c] */ 5492 L_3803BFCF: 5493 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1); 5494 ecx = ecx - 1; /* 0x3803BFCF: dec ecx */ 5495 _flag_k = FK_DEC; 5496 MEM32(ebp + (-0x10)) = ecx; /* 0x3803BFD0: mov dword ptr [ebp - 0x10], ecx */ 5497 RECOMP_BACKEDGE(); 5498 if (/* dec result */ CMP_NS(_flag_a, _flag_b)) goto L_3803BEBB; /* 0x3803BFD3: jns 0x3803bebb */ 5499 L_3803BFD9: 5500 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803BFD9: mov al, byte ptr [ebp + 0xb] */ 5501 /* test LO8(eax), LO8(eax) */ /* 0x3803BFDC: test al, al */ 5502 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5503 _cf = 0; 5504 _flag_k = FK_NARROW(FK_TEST, 24); 5505 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C0F4; /* 0x3803BFDE: je 0x3803c0f4 */ 5506 L_3803BFE4: 5507 edx = MEM32(ebp + (-0x3C)); /* 0x3803BFE4: mov edx, dword ptr [ebp - 0x3c] */ 5508 eax = MEM32(ebp + (-0x38)); /* 0x3803BFE7: mov eax, dword ptr [ebp - 0x38] */ 5509 ecx = MEM32(ebp + (-0x34)); /* 0x3803BFEA: mov ecx, dword ptr [ebp - 0x34] */ 5510 MEM32(ebx) = edx; /* 0x3803BFED: mov dword ptr [ebx], edx */ 5511 edx = MEM32(ebp + (-0x48)); /* 0x3803BFEF: mov edx, dword ptr [ebp - 0x48] */ 5512 MEM32(ebx + 0x4) = eax; /* 0x3803BFF2: mov dword ptr [ebx + 4], eax */ 5513 eax = MEM32(ebp + 0x14); /* 0x3803BFF5: mov eax, dword ptr [ebp + 0x14] */ 5514 MEM32(ebx + 0x8) = ecx; /* 0x3803BFF8: mov dword ptr [ebx + 8], ecx */ 5515 ecx = MEM32(ebp + (-0x44)); /* 0x3803BFFB: mov ecx, dword ptr [ebp - 0x44] */ 5516 MEM32(eax) = edx; /* 0x3803BFFE: mov dword ptr [eax], edx */ 5517 edx = MEM32(ebp + (-0x40)); /* 0x3803C000: mov edx, dword ptr [ebp - 0x40] */ 5518 edi = POP32_VAL(esp); /* 0x3803C003: pop edi */ 5519 MEM32(eax + 0x4) = ecx; /* 0x3803C004: mov dword ptr [eax + 4], ecx */ 5520 esi = POP32_VAL(esp); /* 0x3803C007: pop esi */ 5521 MEM32(eax + 0x8) = edx; /* 0x3803C008: mov dword ptr [eax + 8], edx */ 5522 SET_LO8(eax, 1); /* 0x3803C00B: mov al, 1 */ 5523 ebx = POP32_VAL(esp); /* 0x3803C00D: pop ebx */ 5524 esp = ebp; /* 0x3803C00E: mov esp, ebp */ 5525 ebp = POP32_VAL(esp); /* 0x3803C010: pop ebp */ 5526 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C011: ret 0x18 */ 5527 L_3803C014: 5528 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803C014: mov al, byte ptr [ebp + 0xb] */ 5529 /* test LO8(eax), LO8(eax) */ /* 0x3803C017: test al, al */ 5530 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5531 _cf = 0; 5532 _flag_k = FK_NARROW(FK_TEST, 24); 5533 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C019: je 0x3803c0e9 */ 5534 L_3803C01F: 5535 fp_push(*(float*)&MEM32(ebp + (-0x3C))); /* 0x3803C01F: fld dword ptr [ebp - 0x3c] */ 5536 ecx = MEM32(ebp + (-0x3C)); /* 0x3803C022: mov ecx, dword ptr [ebp - 0x3c] */ 5537 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803C025: fsub dword ptr [0x3806f028] */ 5538 edx = MEM32(ebp + (-0x38)); /* 0x3803C02B: mov edx, dword ptr [ebp - 0x38] */ 5539 eax = MEM32(ebp + (-0x34)); /* 0x3803C02E: mov eax, dword ptr [ebp - 0x34] */ 5540 MEM32(ebp + (-0x28)) = ecx; /* 0x3803C031: mov dword ptr [ebp - 0x28], ecx */ 5541 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3803C034: fstp dword ptr [ebp - 0x28] */ 5542 MEM32(ebp + (-0x24)) = edx; /* 0x3803C037: mov dword ptr [ebp - 0x24], edx */ 5543 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C03A: fld dword ptr [ebp - 0x24] */ 5544 MEM32(ebp + (-0x20)) = eax; /* 0x3803C03D: mov dword ptr [ebp - 0x20], eax */ 5545 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803C040: fsub dword ptr [0x3806f02c] */ 5546 ecx = ebx; /* 0x3803C046: mov ecx, ebx */ 5547 edx = MEM32(ecx); /* 0x3803C048: mov edx, dword ptr [ecx] */ 5548 eax = MEM32(ecx + 0x4); /* 0x3803C04A: mov eax, dword ptr [ecx + 4] */ 5549 ecx = MEM32(ecx + 0x8); /* 0x3803C04D: mov ecx, dword ptr [ecx + 8] */ 5550 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803C050: fstp dword ptr [ebp - 0x24] */ 5551 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C053: fld dword ptr [ebp - 0x20] */ 5552 MEM32(ebp + (-0x60)) = ecx; /* 0x3803C056: mov dword ptr [ebp - 0x60], ecx */ 5553 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803C059: fsub dword ptr [0x3806f030] */ 5554 PUSH32(esp, 0x3806F028u); /* 0x3803C05F: push 0x3806f028 */ 5555 ecx = ebp + (-0x68); /* 0x3803C064: lea ecx, [ebp - 0x68] */ 5556 MEM32(ebp + (-0x68)) = edx; /* 0x3803C067: mov dword ptr [ebp - 0x68], edx */ 5557 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3803C06A: fstp dword ptr [ebp - 0x20] */ 5558 MEM32(ebp + (-0x64)) = eax; /* 0x3803C06D: mov dword ptr [ebp - 0x64], eax */ 5559 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803C070: call dword ptr [0x3804e4f4] */ 5560 RECOMP_FLAGS_IN(); 5561 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C076: fld dword ptr [ebp - 0x20] */ 5562 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3803C079: fmul dword ptr [ebp - 0x20] */ 5563 edx = MEM32(eax); /* 0x3803C07C: mov edx, dword ptr [eax] */ 5564 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C07E: fld dword ptr [ebp - 0x24] */ 5565 ecx = MEM32(eax + 0x4); /* 0x3803C081: mov ecx, dword ptr [eax + 4] */ 5566 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x3803C084: fmul dword ptr [ebp - 0x24] */ 5567 MEM32(ebp + (-0x54)) = edx; /* 0x3803C087: mov dword ptr [ebp - 0x54], edx */ 5568 edx = MEM32(eax + 0x8); /* 0x3803C08A: mov edx, dword ptr [eax + 8] */ 5569 MEM32(ebp + (-0x4C)) = edx; /* 0x3803C08D: mov dword ptr [ebp - 0x4c], edx */ 5570 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C090: faddp st(1) */ 5571 MEM32(ebp + (-0x50)) = ecx; /* 0x3803C092: mov dword ptr [ebp - 0x50], ecx */ 5572 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803C095: fld dword ptr [ebp - 0x28] */ 5573 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x3803C098: fmul dword ptr [ebp - 0x28] */ 5574 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C09B: faddp st(1) */ 5575 _st[0] = sqrt(_st[0]); /* 0x3803C09D: fsqrt */ 5576 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3803C09F: fld dword ptr [ebp - 0x4c] */ 5577 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x3803C0A2: fmul dword ptr [ebp - 0x4c] */ 5578 fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x3803C0A5: fld dword ptr [ebp - 0x50] */ 5579 _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x3803C0A8: fmul dword ptr [ebp - 0x50] */ 5580 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0AB: faddp st(1) */ 5581 fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x3803C0AD: fld dword ptr [ebp - 0x54] */ 5582 _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x3803C0B0: fmul dword ptr [ebp - 0x54] */ 5583 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0B3: faddp st(1) */ 5584 _st[0] = sqrt(_st[0]); /* 0x3803C0B5: fsqrt */ 5585 fp_xch(1); /* 0x3803C0B7: fxch st(1) */ 5586 fp_xch(1); /* 0x3803C0B9: fxch st(1) */ 5587 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803C0BB: fcompp */ 5588 fp_pop(); fp_pop(); 5589 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C0BD: fnstsw ax */ 5590 /* test HI8(eax), 0x41u */ /* 0x3803C0BF: test ah, 0x41 */ 5591 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 5592 _cf = 0; 5593 _flag_k = FK_NARROW(FK_TEST, 24); 5594 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C0C2: jne 0x3803c0e9 */ 5595 L_3803C0C4: 5596 eax = MEM32(ebp + (-0x3C)); /* 0x3803C0C4: mov eax, dword ptr [ebp - 0x3c] */ 5597 ecx = MEM32(ebp + (-0x38)); /* 0x3803C0C7: mov ecx, dword ptr [ebp - 0x38] */ 5598 edx = MEM32(ebp + (-0x34)); /* 0x3803C0CA: mov edx, dword ptr [ebp - 0x34] */ 5599 MEM32(ebx) = eax; /* 0x3803C0CD: mov dword ptr [ebx], eax */ 5600 eax = MEM32(ebp + 0x14); /* 0x3803C0CF: mov eax, dword ptr [ebp + 0x14] */ 5601 MEM32(ebx + 0x4) = ecx; /* 0x3803C0D2: mov dword ptr [ebx + 4], ecx */ 5602 ecx = MEM32(ebp + (-0x48)); /* 0x3803C0D5: mov ecx, dword ptr [ebp - 0x48] */ 5603 MEM32(ebx + 0x8) = edx; /* 0x3803C0D8: mov dword ptr [ebx + 8], edx */ 5604 edx = MEM32(ebp + (-0x44)); /* 0x3803C0DB: mov edx, dword ptr [ebp - 0x44] */ 5605 MEM32(eax) = ecx; /* 0x3803C0DE: mov dword ptr [eax], ecx */ 5606 ecx = MEM32(ebp + (-0x40)); /* 0x3803C0E0: mov ecx, dword ptr [ebp - 0x40] */ 5607 MEM32(eax + 0x4) = edx; /* 0x3803C0E3: mov dword ptr [eax + 4], edx */ 5608 MEM32(eax + 0x8) = ecx; /* 0x3803C0E6: mov dword ptr [eax + 8], ecx */ 5609 L_3803C0E9: 5610 edi = POP32_VAL(esp); /* 0x3803C0E9: pop edi */ 5611 esi = POP32_VAL(esp); /* 0x3803C0EA: pop esi */ 5612 SET_LO8(eax, 1); /* 0x3803C0EB: mov al, 1 */ 5613 ebx = POP32_VAL(esp); /* 0x3803C0ED: pop ebx */ 5614 esp = ebp; /* 0x3803C0EE: mov esp, ebp */ 5615 ebp = POP32_VAL(esp); /* 0x3803C0F0: pop ebp */ 5616 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C0F1: ret 0x18 */ 5617 L_3803C0F4: 5618 MEM32(ebp + (-0x54)) = 0xBF800000u; /* 0x3803C0F4: mov dword ptr [ebp - 0x54], 0xbf800000 */ 5619 eax = MEM32(ebp + (-0x54)); /* 0x3803C0FB: mov eax, dword ptr [ebp - 0x54] */ 5620 MEM32(ebp + (-0x50)) = 0xBF800000u; /* 0x3803C0FE: mov dword ptr [ebp - 0x50], 0xbf800000 */ 5621 ecx = MEM32(ebp + (-0x50)); /* 0x3803C105: mov ecx, dword ptr [ebp - 0x50] */ 5622 MEM32(ebp + (-0x4C)) = 0xBF800000u; /* 0x3803C108: mov dword ptr [ebp - 0x4c], 0xbf800000 */ 5623 edx = MEM32(ebp + (-0x4C)); /* 0x3803C10F: mov edx, dword ptr [ebp - 0x4c] */ 5624 MEM32(ebx) = eax; /* 0x3803C112: mov dword ptr [ebx], eax */ 5625 MEM32(ebx + 0x4) = ecx; /* 0x3803C114: mov dword ptr [ebx + 4], ecx */ 5626 MEM32(ebx + 0x8) = edx; /* 0x3803C117: mov dword ptr [ebx + 8], edx */ 5627 edi = POP32_VAL(esp); /* 0x3803C11A: pop edi */ 5628 esi = POP32_VAL(esp); /* 0x3803C11B: pop esi */ 5629 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 5630 SET_LO8(eax, 0); /* 0x3803C11C: xor al, al */ 5631 _cf = 0; 5632 _flag_k = FK_NARROW(FK_TEST, 24); 5633 ebx = POP32_VAL(esp); /* 0x3803C11E: pop ebx */ 5634 esp = ebp; /* 0x3803C11F: mov esp, ebp */ 5635 ebp = POP32_VAL(esp); /* 0x3803C121: pop ebp */ 5636 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C122: ret 0x18 */ 5637 RECOMP_REGS_OUT(); 5638 } 5639 5640 void sub_3803C014(void) { 5641 int _fpu_cmp = 0; 5642 uint32_t _cf = 0; 5643 int _df = 1; 5644 uint32_t _flag_k = FK_NONE; 5645 uint32_t _flag_a = 0, _flag_b = 0; 5646 uint32_t _itail_tgt = 0; 5647 RECOMP_REGS_LOCALS 5648 RECOMP_ENTER(0x3803C014u); 5649 5650 L_3803C014: 5651 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803C014: mov al, byte ptr [ebp + 0xb] */ 5652 /* test LO8(eax), LO8(eax) */ /* 0x3803C017: test al, al */ 5653 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 5654 _cf = 0; 5655 _flag_k = FK_NARROW(FK_TEST, 24); 5656 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C019: je 0x3803c0e9 */ 5657 L_3803C01F: 5658 fp_push(*(float*)&MEM32(ebp + (-0x3C))); /* 0x3803C01F: fld dword ptr [ebp - 0x3c] */ 5659 ecx = MEM32(ebp + (-0x3C)); /* 0x3803C022: mov ecx, dword ptr [ebp - 0x3c] */ 5660 _st[0] -= (double)*(float*)ADDR(0x3806F028); /* 0x3803C025: fsub dword ptr [0x3806f028] */ 5661 edx = MEM32(ebp + (-0x38)); /* 0x3803C02B: mov edx, dword ptr [ebp - 0x38] */ 5662 eax = MEM32(ebp + (-0x34)); /* 0x3803C02E: mov eax, dword ptr [ebp - 0x34] */ 5663 MEM32(ebp + (-0x28)) = ecx; /* 0x3803C031: mov dword ptr [ebp - 0x28], ecx */ 5664 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x28)) = _v; } /* 0x3803C034: fstp dword ptr [ebp - 0x28] */ 5665 MEM32(ebp + (-0x24)) = edx; /* 0x3803C037: mov dword ptr [ebp - 0x24], edx */ 5666 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C03A: fld dword ptr [ebp - 0x24] */ 5667 MEM32(ebp + (-0x20)) = eax; /* 0x3803C03D: mov dword ptr [ebp - 0x20], eax */ 5668 _st[0] -= (double)*(float*)ADDR(0x3806F02C); /* 0x3803C040: fsub dword ptr [0x3806f02c] */ 5669 ecx = ebx; /* 0x3803C046: mov ecx, ebx */ 5670 edx = MEM32(ecx); /* 0x3803C048: mov edx, dword ptr [ecx] */ 5671 eax = MEM32(ecx + 0x4); /* 0x3803C04A: mov eax, dword ptr [ecx + 4] */ 5672 ecx = MEM32(ecx + 0x8); /* 0x3803C04D: mov ecx, dword ptr [ecx + 8] */ 5673 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x3803C050: fstp dword ptr [ebp - 0x24] */ 5674 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C053: fld dword ptr [ebp - 0x20] */ 5675 MEM32(ebp + (-0x60)) = ecx; /* 0x3803C056: mov dword ptr [ebp - 0x60], ecx */ 5676 _st[0] -= (double)*(float*)ADDR(0x3806F030); /* 0x3803C059: fsub dword ptr [0x3806f030] */ 5677 PUSH32(esp, 0x3806F028u); /* 0x3803C05F: push 0x3806f028 */ 5678 ecx = ebp + (-0x68); /* 0x3803C064: lea ecx, [ebp - 0x68] */ 5679 MEM32(ebp + (-0x68)) = edx; /* 0x3803C067: mov dword ptr [ebp - 0x68], edx */ 5680 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x3803C06A: fstp dword ptr [ebp - 0x20] */ 5681 MEM32(ebp + (-0x64)) = eax; /* 0x3803C06D: mov dword ptr [ebp - 0x64], eax */ 5682 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803C070: call dword ptr [0x3804e4f4] */ 5683 RECOMP_FLAGS_IN(); 5684 fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3803C076: fld dword ptr [ebp - 0x20] */ 5685 _st[0] *= (double)*(float*)ADDR(ebp + (-0x20)); /* 0x3803C079: fmul dword ptr [ebp - 0x20] */ 5686 edx = MEM32(eax); /* 0x3803C07C: mov edx, dword ptr [eax] */ 5687 fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x3803C07E: fld dword ptr [ebp - 0x24] */ 5688 ecx = MEM32(eax + 0x4); /* 0x3803C081: mov ecx, dword ptr [eax + 4] */ 5689 _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x3803C084: fmul dword ptr [ebp - 0x24] */ 5690 MEM32(ebp + (-0x54)) = edx; /* 0x3803C087: mov dword ptr [ebp - 0x54], edx */ 5691 edx = MEM32(eax + 0x8); /* 0x3803C08A: mov edx, dword ptr [eax + 8] */ 5692 MEM32(ebp + (-0x4C)) = edx; /* 0x3803C08D: mov dword ptr [ebp - 0x4c], edx */ 5693 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C090: faddp st(1) */ 5694 MEM32(ebp + (-0x50)) = ecx; /* 0x3803C092: mov dword ptr [ebp - 0x50], ecx */ 5695 fp_push(*(float*)&MEM32(ebp + (-0x28))); /* 0x3803C095: fld dword ptr [ebp - 0x28] */ 5696 _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x3803C098: fmul dword ptr [ebp - 0x28] */ 5697 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C09B: faddp st(1) */ 5698 _st[0] = sqrt(_st[0]); /* 0x3803C09D: fsqrt */ 5699 fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3803C09F: fld dword ptr [ebp - 0x4c] */ 5700 _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x3803C0A2: fmul dword ptr [ebp - 0x4c] */ 5701 fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x3803C0A5: fld dword ptr [ebp - 0x50] */ 5702 _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x3803C0A8: fmul dword ptr [ebp - 0x50] */ 5703 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0AB: faddp st(1) */ 5704 fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x3803C0AD: fld dword ptr [ebp - 0x54] */ 5705 _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x3803C0B0: fmul dword ptr [ebp - 0x54] */ 5706 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C0B3: faddp st(1) */ 5707 _st[0] = sqrt(_st[0]); /* 0x3803C0B5: fsqrt */ 5708 fp_xch(1); /* 0x3803C0B7: fxch st(1) */ 5709 fp_xch(1); /* 0x3803C0B9: fxch st(1) */ 5710 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803C0BB: fcompp */ 5711 fp_pop(); fp_pop(); 5712 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C0BD: fnstsw ax */ 5713 /* test HI8(eax), 0x41u */ /* 0x3803C0BF: test ah, 0x41 */ 5714 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 5715 _cf = 0; 5716 _flag_k = FK_NARROW(FK_TEST, 24); 5717 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C0E9; /* 0x3803C0C2: jne 0x3803c0e9 */ 5718 L_3803C0C4: 5719 eax = MEM32(ebp + (-0x3C)); /* 0x3803C0C4: mov eax, dword ptr [ebp - 0x3c] */ 5720 ecx = MEM32(ebp + (-0x38)); /* 0x3803C0C7: mov ecx, dword ptr [ebp - 0x38] */ 5721 edx = MEM32(ebp + (-0x34)); /* 0x3803C0CA: mov edx, dword ptr [ebp - 0x34] */ 5722 MEM32(ebx) = eax; /* 0x3803C0CD: mov dword ptr [ebx], eax */ 5723 eax = MEM32(ebp + 0x14); /* 0x3803C0CF: mov eax, dword ptr [ebp + 0x14] */ 5724 MEM32(ebx + 0x4) = ecx; /* 0x3803C0D2: mov dword ptr [ebx + 4], ecx */ 5725 ecx = MEM32(ebp + (-0x48)); /* 0x3803C0D5: mov ecx, dword ptr [ebp - 0x48] */ 5726 MEM32(ebx + 0x8) = edx; /* 0x3803C0D8: mov dword ptr [ebx + 8], edx */ 5727 edx = MEM32(ebp + (-0x44)); /* 0x3803C0DB: mov edx, dword ptr [ebp - 0x44] */ 5728 MEM32(eax) = ecx; /* 0x3803C0DE: mov dword ptr [eax], ecx */ 5729 ecx = MEM32(ebp + (-0x40)); /* 0x3803C0E0: mov ecx, dword ptr [ebp - 0x40] */ 5730 MEM32(eax + 0x4) = edx; /* 0x3803C0E3: mov dword ptr [eax + 4], edx */ 5731 MEM32(eax + 0x8) = ecx; /* 0x3803C0E6: mov dword ptr [eax + 8], ecx */ 5732 L_3803C0E9: 5733 edi = POP32_VAL(esp); /* 0x3803C0E9: pop edi */ 5734 esi = POP32_VAL(esp); /* 0x3803C0EA: pop esi */ 5735 SET_LO8(eax, 1); /* 0x3803C0EB: mov al, 1 */ 5736 ebx = POP32_VAL(esp); /* 0x3803C0ED: pop ebx */ 5737 esp = ebp; /* 0x3803C0EE: mov esp, ebp */ 5738 ebp = POP32_VAL(esp); /* 0x3803C0F0: pop ebp */ 5739 RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x3803C0F1: ret 0x18 */ 5740 RECOMP_REGS_OUT(); 5741 } 5742 5743 void sub_3803C130(void) { 5744 int _fpu_cmp = 0; 5745 uint32_t _cf = 0; 5746 int _df = 1; 5747 uint32_t _flag_k = FK_NONE; 5748 uint32_t _flag_a = 0, _flag_b = 0; 5749 uint32_t _itail_tgt = 0; 5750 RECOMP_REGS_LOCALS 5751 RECOMP_ENTER(0x3803C130u); 5752 5753 L_3803C130: 5754 eax = ecx; /* 0x3803C130: mov eax, ecx */ 5755 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5756 ecx = 0; /* 0x3803C132: xor ecx, ecx */ 5757 _cf = 0; 5758 _flag_k = FK_TEST; 5759 MEM32(eax) = ecx; /* 0x3803C134: mov dword ptr [eax], ecx */ 5760 MEM32(eax + 0x4) = ecx; /* 0x3803C136: mov dword ptr [eax + 4], ecx */ 5761 MEM32(eax + 0x8) = ecx; /* 0x3803C139: mov dword ptr [eax + 8], ecx */ 5762 MEM32(eax + 0xC) = ecx; /* 0x3803C13C: mov dword ptr [eax + 0xc], ecx */ 5763 MEM32(eax + 0x10) = ecx; /* 0x3803C13F: mov dword ptr [eax + 0x10], ecx */ 5764 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803C142: ret */ 5765 RECOMP_REGS_OUT(); 5766 } 5767 5768 void sub_3803C150(void) { 5769 int _fpu_cmp = 0; 5770 uint32_t _cf = 0; 5771 int _df = 1; 5772 uint32_t _flag_k = FK_NONE; 5773 uint32_t _flag_a = 0, _flag_b = 0; 5774 uint32_t _itail_tgt = 0; 5775 RECOMP_REGS_LOCALS 5776 RECOMP_ENTER(0x3803C150u); 5777 5778 L_3803C150: 5779 PUSH32(esp, ebp); /* 0x3803C150: push ebp */ 5780 ebp = esp; /* 0x3803C151: mov ebp, esp */ 5781 ecx = MEM32(ebp + 0x8); /* 0x3803C153: mov ecx, dword ptr [ebp + 8] */ 5782 fp_push(*(float*)&MEM32(ebp + 0x10)); /* 0x3803C156: fld dword ptr [ebp + 0x10] */ 5783 edx = MEM32(ebp + 0x14); /* 0x3803C159: mov edx, dword ptr [ebp + 0x14] */ 5784 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 5785 eax = 0; /* 0x3803C15C: xor eax, eax */ 5786 _cf = 0; 5787 _flag_k = FK_TEST; 5788 MEM32(ecx + 0x10) = eax; /* 0x3803C15E: mov dword ptr [ecx + 0x10], eax */ 5789 MEM32(ecx + 0xC) = eax; /* 0x3803C161: mov dword ptr [ecx + 0xc], eax */ 5790 MEM32(ecx + 0x8) = eax; /* 0x3803C164: mov dword ptr [ecx + 8], eax */ 5791 MEM32(ecx + 0x4) = eax; /* 0x3803C167: mov dword ptr [ecx + 4], eax */ 5792 MEM32(ecx) = eax; /* 0x3803C16A: mov dword ptr [ecx], eax */ 5793 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edx + 0xC)); /* 0x3803C16C: fcomp dword ptr [edx + 0xc] */ 5794 fp_pop(); 5795 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C16F: fnstsw ax */ 5796 /* test HI8(eax), 1 */ /* 0x3803C171: test ah, 1 */ 5797 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5798 _cf = 0; 5799 _flag_k = FK_NARROW(FK_TEST, 24); 5800 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C185; /* 0x3803C174: jne 0x3803c185 */ 5801 L_3803C176: 5802 MEM32(ecx) = 8; /* 0x3803C176: mov dword ptr [ecx], 8 */ 5803 MEM32(ecx + 0x10) = 8; /* 0x3803C17C: mov dword ptr [ecx + 0x10], 8 */ 5804 goto L_3803C19D; /* 0x3803C183: jmp 0x3803c19d */ 5805 L_3803C185: 5806 fp_push(*(float*)&MEM32(ebp + 0x10)); /* 0x3803C185: fld dword ptr [ebp + 0x10] */ 5807 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edx + 0x4)); /* 0x3803C188: fcomp dword ptr [edx + 4] */ 5808 fp_pop(); 5809 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C18B: fnstsw ax */ 5810 /* test HI8(eax), 1 */ /* 0x3803C18D: test ah, 1 */ 5811 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5812 _cf = 0; 5813 _flag_k = FK_NARROW(FK_TEST, 24); 5814 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C19D; /* 0x3803C190: je 0x3803c19d */ 5815 L_3803C192: 5816 eax = 4; /* 0x3803C192: mov eax, 4 */ 5817 MEM32(ecx + 0x4) = eax; /* 0x3803C197: mov dword ptr [ecx + 4], eax */ 5818 MEM32(ecx + 0x10) = eax; /* 0x3803C19A: mov dword ptr [ecx + 0x10], eax */ 5819 L_3803C19D: 5820 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x3803C19D: fld dword ptr [ebp + 0xc] */ 5821 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edx + 0x8)); /* 0x3803C1A0: fcomp dword ptr [edx + 8] */ 5822 fp_pop(); 5823 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C1A3: fnstsw ax */ 5824 /* test HI8(eax), 1 */ /* 0x3803C1A5: test ah, 1 */ 5825 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5826 _cf = 0; 5827 _flag_k = FK_NARROW(FK_TEST, 24); 5828 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C1BC; /* 0x3803C1A8: jne 0x3803c1bc */ 5829 L_3803C1AA: 5830 edx = MEM32(ecx + 0x10); /* 0x3803C1AA: mov edx, dword ptr [ecx + 0x10] */ 5831 eax = 2; /* 0x3803C1AD: mov eax, 2 */ 5832 _flag_a = (uint32_t)((edx | eax)); _flag_b = (uint32_t)((edx | eax)); 5833 edx = edx | eax; /* 0x3803C1B2: or edx, eax */ 5834 _cf = 0; 5835 _flag_k = FK_TEST; 5836 MEM32(ecx + 0x8) = eax; /* 0x3803C1B4: mov dword ptr [ecx + 8], eax */ 5837 MEM32(ecx + 0x10) = edx; /* 0x3803C1B7: mov dword ptr [ecx + 0x10], edx */ 5838 ebp = POP32_VAL(esp); /* 0x3803C1BA: pop ebp */ 5839 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803C1BB: ret */ 5840 L_3803C1BC: 5841 fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x3803C1BC: fld dword ptr [ebp + 0xc] */ 5842 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edx)); /* 0x3803C1BF: fcomp dword ptr [edx] */ 5843 fp_pop(); 5844 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C1C1: fnstsw ax */ 5845 /* test HI8(eax), 1 */ /* 0x3803C1C3: test ah, 1 */ 5846 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 5847 _cf = 0; 5848 _flag_k = FK_NARROW(FK_TEST, 24); 5849 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C1D8; /* 0x3803C1C6: je 0x3803c1d8 */ 5850 L_3803C1C8: 5851 edx = MEM32(ecx + 0x10); /* 0x3803C1C8: mov edx, dword ptr [ecx + 0x10] */ 5852 eax = 1; /* 0x3803C1CB: mov eax, 1 */ 5853 _flag_a = (uint32_t)((edx | eax)); _flag_b = (uint32_t)((edx | eax)); 5854 edx = edx | eax; /* 0x3803C1D0: or edx, eax */ 5855 _cf = 0; 5856 _flag_k = FK_TEST; 5857 MEM32(ecx + 0xC) = eax; /* 0x3803C1D2: mov dword ptr [ecx + 0xc], eax */ 5858 MEM32(ecx + 0x10) = edx; /* 0x3803C1D5: mov dword ptr [ecx + 0x10], edx */ 5859 L_3803C1D8: 5860 ebp = POP32_VAL(esp); /* 0x3803C1D8: pop ebp */ 5861 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803C1D9: ret */ 5862 RECOMP_REGS_OUT(); 5863 } 5864 5865 void sub_3803C1E0(void) { 5866 int _fpu_cmp = 0; 5867 uint32_t _cf = 0; 5868 int _df = 1; 5869 uint32_t _flag_k = FK_NONE; 5870 uint32_t _flag_a = 0, _flag_b = 0; 5871 uint32_t _itail_tgt = 0; 5872 RECOMP_REGS_LOCALS 5873 RECOMP_ENTER(0x3803C1E0u); 5874 5875 L_3803C1E0: 5876 PUSH32(esp, ebp); /* 0x3803C1E0: push ebp */ 5877 ebp = esp; /* 0x3803C1E1: mov ebp, esp */ 5878 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu); 5879 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5880 esp = esp - 0xCu; /* 0x3803C1E3: sub esp, 0xc */ 5881 _flag_k = FK_CMP; 5882 edx = MEM32(ebp + 0x18); /* 0x3803C1E6: mov edx, dword ptr [ebp + 0x18] */ 5883 eax = MEM32(ecx); /* 0x3803C1E9: mov eax, dword ptr [ecx] */ 5884 PUSH32(esp, edx); /* 0x3803C1EB: push edx */ 5885 edx = MEM32(ebp + 0x14); /* 0x3803C1EC: mov edx, dword ptr [ebp + 0x14] */ 5886 PUSH32(esp, edx); /* 0x3803C1EF: push edx */ 5887 edx = ebp + (-0xC); /* 0x3803C1F0: lea edx, [ebp - 0xc] */ 5888 PUSH32(esp, edx); /* 0x3803C1F3: push edx */ 5889 edx = MEM32(ebp + 0x10); /* 0x3803C1F4: mov edx, dword ptr [ebp + 0x10] */ 5890 PUSH32(esp, edx); /* 0x3803C1F7: push edx */ 5891 edx = MEM32(ebp + 0xC); /* 0x3803C1F8: mov edx, dword ptr [ebp + 0xc] */ 5892 PUSH32(esp, edx); /* 0x3803C1FB: push edx */ 5893 edx = MEM32(ebp + 0x8); /* 0x3803C1FC: mov edx, dword ptr [ebp + 8] */ 5894 PUSH32(esp, edx); /* 0x3803C1FF: push edx */ 5895 MEM32(ebp + (-0xC)) = 0; /* 0x3803C200: mov dword ptr [ebp - 0xc], 0 */ 5896 MEM32(ebp + (-0x8)) = 0x3F800000u; /* 0x3803C207: mov dword ptr [ebp - 8], 0x3f800000 */ 5897 MEM32(ebp + (-0x4)) = 0; /* 0x3803C20E: mov dword ptr [ebp - 4], 0 */ 5898 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x3803C215: call dword ptr [eax + 0x10] */ 5899 RECOMP_FLAGS_IN(); 5900 esp = ebp; /* 0x3803C218: mov esp, ebp */ 5901 ebp = POP32_VAL(esp); /* 0x3803C21A: pop ebp */ 5902 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x3803C21B: ret 0x14 */ 5903 RECOMP_REGS_OUT(); 5904 } 5905 5906 void sub_3803C220(void) { 5907 int _fpu_cmp = 0; 5908 uint32_t _cf = 0; 5909 int _df = 1; 5910 uint32_t _flag_k = FK_NONE; 5911 uint32_t _flag_a = 0, _flag_b = 0; 5912 uint32_t _itail_tgt = 0; 5913 RECOMP_REGS_LOCALS 5914 RECOMP_ENTER(0x3803C220u); 5915 5916 L_3803C220: 5917 PUSH32(esp, ebp); /* 0x3803C220: push ebp */ 5918 ebp = esp; /* 0x3803C221: mov ebp, esp */ 5919 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xFCu); 5920 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 5921 esp = esp - 0xFCu; /* 0x3803C223: sub esp, 0xfc */ 5922 _flag_k = FK_CMP; 5923 ecx = MEM32(ecx + 0x4); /* 0x3803C229: mov ecx, dword ptr [ecx + 4] */ 5924 PUSH32(esp, ebx); /* 0x3803C22C: push ebx */ 5925 PUSH32(esp, esi); /* 0x3803C22D: push esi */ 5926 PUSH32(esp, edi); /* 0x3803C22E: push edi */ 5927 /* Reject rays above a resident outdoor tile before constructing its corners. 5928 * bbr.dll!AnarchyGroundData_t::{PatchHandle,RawHeight,Height} supplies 5929 * the same four samples. Boundary and cold patches use the general path. */ 5930 if (MEM32(0x3804E24C) == 0x25040C80u && 5931 MEM32(0x3804E248) == 0x25040CB0u && MEM32(0x3804E244) == 0x25040840u) { 5932 uint32_t data = MEM32(ecx + 12); 5933 uint32_t x = MEM32(ebp + 8), z = MEM32(ebp + 12); 5934 if (!MEM32(data + 0x18) && (int32_t)x >= 0 && (int32_t)z >= 0 && 5935 (int32_t)x < (int32_t)MEM32(data + 0x825c) - 2 && 5936 (int32_t)z < (int32_t)MEM32(data + 0x8260) - 2) { 5937 uint32_t ground = MEM32(data + 0x8258); 5938 unsigned shift = MEM32(ground + 0x3c) & 31; 5939 if ((x >> shift) == ((x + 1) >> shift) && 5940 (z >> shift) == ((z + 1) >> shift)) { 5941 uint32_t patch_index = (z >> shift) * MEM32(ground + 0x48) + (x >> shift); 5942 uint32_t patch = MEM32(ground + 0x50) + patch_index * 0x54; 5943 uint32_t samples = MEM32(patch + 0x1c); 5944 if (samples) { 5945 uint32_t mask = MEM32(ground + 0x40), stride = MEM32(ground + 0x38) + 1; 5946 uint32_t offsets[4] = { 5947 stride * (z & mask) + (x & mask), 5948 stride * (z & mask) + ((x + 1) & mask), 5949 stride * ((z + 1) & mask) + ((x + 1) & mask), 5950 stride * ((z + 1) & mask) + (x & mask)}; 5951 unsigned height_shift = MEM8(ground + 0x29) ? 0 : 8; 5952 double scale = *(float *)ADDR(data + 0x1c); 5953 float heights[4]; 5954 for (unsigned i = 0; i < 4; ++i) 5955 heights[i] = (float)((double)(MEM16(samples + offsets[i] * 2) >> height_shift) * scale); 5956 float first = heights[0] > heights[1] ? heights[0] : heights[1]; 5957 float second = heights[2] > heights[3] ? heights[2] : heights[3]; 5958 float maximum = first > second ? first : second; 5959 if (*(float *)ADDR(0x3806f02c) > maximum && 5960 *(float *)ADDR(0x3806f00c) > maximum) { 5961 MEM32(patch + 0x18) = MEM32(ground + 0x24); 5962 goto L_3803C2F7; 5963 } 5964 } 5965 } 5966 } 5967 } 5968 eax = ebp + (-0x30); /* 0x3803C22F: lea eax, [ebp - 0x30] */ 5969 PUSH32(esp, eax); /* 0x3803C232: push eax */ 5970 edx = ebp + (-0x18); /* 0x3803C233: lea edx, [ebp - 0x18] */ 5971 PUSH32(esp, edx); /* 0x3803C236: push edx */ 5972 eax = ebp + (-0x24); /* 0x3803C237: lea eax, [ebp - 0x24] */ 5973 PUSH32(esp, eax); /* 0x3803C23A: push eax */ 5974 eax = MEM32(ebp + 0xC); /* 0x3803C23B: mov eax, dword ptr [ebp + 0xc] */ 5975 edx = ebp + (-0xC); /* 0x3803C23E: lea edx, [ebp - 0xc] */ 5976 PUSH32(esp, edx); /* 0x3803C241: push edx */ 5977 edx = MEM32(ebp + 0x8); /* 0x3803C242: mov edx, dword ptr [ebp + 8] */ 5978 PUSH32(esp, eax); /* 0x3803C245: push eax */ 5979 PUSH32(esp, edx); /* 0x3803C246: push edx */ 5980 MEM32(ebp + (-0xC)) = 0; /* 0x3803C247: mov dword ptr [ebp - 0xc], 0 */ 5981 MEM32(ebp + (-0x8)) = 0; /* 0x3803C24E: mov dword ptr [ebp - 8], 0 */ 5982 MEM32(ebp + (-0x4)) = 0; /* 0x3803C255: mov dword ptr [ebp - 4], 0 */ 5983 MEM32(ebp + (-0x24)) = 0; /* 0x3803C25C: mov dword ptr [ebp - 0x24], 0 */ 5984 MEM32(ebp + (-0x20)) = 0; /* 0x3803C263: mov dword ptr [ebp - 0x20], 0 */ 5985 MEM32(ebp + (-0x1C)) = 0; /* 0x3803C26A: mov dword ptr [ebp - 0x1c], 0 */ 5986 MEM32(ebp + (-0x18)) = 0; /* 0x3803C271: mov dword ptr [ebp - 0x18], 0 */ 5987 MEM32(ebp + (-0x14)) = 0; /* 0x3803C278: mov dword ptr [ebp - 0x14], 0 */ 5988 MEM32(ebp + (-0x10)) = 0; /* 0x3803C27F: mov dword ptr [ebp - 0x10], 0 */ 5989 MEM32(ebp + (-0x30)) = 0; /* 0x3803C286: mov dword ptr [ebp - 0x30], 0 */ 5990 MEM32(ebp + (-0x2C)) = 0; /* 0x3803C28D: mov dword ptr [ebp - 0x2c], 0 */ 5991 MEM32(ebp + (-0x28)) = 0; /* 0x3803C294: mov dword ptr [ebp - 0x28], 0 */ 5992 RECOMP_ICALL(0x38038370u); /* 0x3803C29B: call 0x38038370 */ /* not lifted */ 5993 RECOMP_FLAGS_IN(); 5994 /* llr.dll!n3Tilemap_t::Intersect_Tile: reject a tile below both ray 5995 * endpoints. Keep the original selection order for equal/NaN heights. */ 5996 SET_LO8(ebx, LO8(eax)); 5997 edx = *(float *)ADDR(ebp - 20) > *(float *)ADDR(ebp - 44) ? ebp - 20 : ebp - 44; 5998 ecx = *(float *)ADDR(ebp - 8) > *(float *)ADDR(ebp - 32) ? ebp - 8 : ebp - 32; 5999 if (!(*(float *)ADDR(ecx) > *(float *)ADDR(edx))) ecx = edx; 6000 double maximum_height = *(float *)ADDR(ecx); 6001 _fpu_cmp = FPU_CMP((double)*(float *)ADDR(0x3806f02c), maximum_height); 6002 if (_fpu_cmp == 1) 6003 _fpu_cmp = FPU_CMP((double)*(float *)ADDR(0x3806f00c), maximum_height); 6004 6005 /* Retain the comparison status and the emptied x87 scratch slots. */ 6006 eax = (eax & 0xffff0000u) | (_fpu_cmp == 2 ? 0x4500u : 6007 _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0); 6008 _st[6] = _st[7] = 0; 6009 g_st_i64[6] = g_st_i64[7] = 0; 6010 _flag_a = (uint32_t)HI8(eax) << 24; _flag_b = 0x41000000u; 6011 _flag_k = FK_NARROW(FK_TEST, 24); _cf = 0; 6012 if (_fpu_cmp == 1) goto L_3803C2F7; 6013 goto L_3803C304; 6014 L_3803C2F7: 6015 edi = POP32_VAL(esp); /* 0x3803C2F7: pop edi */ 6016 esi = POP32_VAL(esp); /* 0x3803C2F8: pop esi */ 6017 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 6018 SET_LO8(eax, 0); /* 0x3803C2F9: xor al, al */ 6019 _cf = 0; 6020 _flag_k = FK_NARROW(FK_TEST, 24); 6021 ebx = POP32_VAL(esp); /* 0x3803C2FB: pop ebx */ 6022 esp = ebp; /* 0x3803C2FC: mov esp, ebp */ 6023 ebp = POP32_VAL(esp); /* 0x3803C2FE: pop ebp */ 6024 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3803C2FF: ret 0x10 */ 6025 L_3803C304: 6026 /* test LO8(ebx), LO8(ebx) */ /* 0x3803C304: test bl, bl */ 6027 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 6028 _cf = 0; 6029 _flag_k = FK_NARROW(FK_TEST, 24); 6030 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C5D8; /* 0x3803C306: je 0x3803c5d8 */ 6031 L_3803C30C: 6032 SET_LO8(eax, MEM8(0x3806F26C)); /* 0x3803C30C: mov al, byte ptr [0x3806f26c] */ 6033 SET_LO8(ebx, 1); /* 0x3803C311: mov bl, 1 */ 6034 /* test LO8(ebx), LO8(eax) */ /* 0x3803C313: test bl, al */ 6035 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 6036 _cf = 0; 6037 _flag_k = FK_NARROW(FK_TEST, 24); 6038 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C34C; /* 0x3803C315: jne 0x3803c34c */ 6039 L_3803C317: 6040 SET_LO8(edx, LO8(eax)); /* 0x3803C317: mov dl, al */ 6041 _flag_a = (uint32_t)((LO8(edx) | LO8(ebx))) << 24; _flag_b = (uint32_t)((LO8(edx) | LO8(ebx))) << 24; 6042 SET_LO8(edx, LO8(edx) | LO8(ebx)); /* 0x3803C319: or dl, bl */ 6043 _cf = 0; 6044 _flag_k = FK_NARROW(FK_TEST, 24); 6045 PUSH32(esp, 0x380018B0u); /* 0x3803C31B: push 0x380018b0 */ 6046 MEM8(0x3806F26C) = (uint8_t)(LO8(edx)); /* 0x3803C320: mov byte ptr [0x3806f26c], dl */ 6047 MEM32(0x3806F270) = 0; /* 0x3803C326: mov dword ptr [0x3806f270], 0 */ 6048 MEM32(0x3806F274) = 0; /* 0x3803C330: mov dword ptr [0x3806f274], 0 */ 6049 MEM32(0x3806F278) = 0; /* 0x3803C33A: mov dword ptr [0x3806f278], 0 */ 6050 RECOMP_ICALL(0x3804B54Cu); /* 0x3803C344: call 0x3804b54c */ /* not lifted */ 6051 RECOMP_FLAGS_IN(); 6052 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6053 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6054 esp = esp + 4; /* 0x3803C349: add esp, 4 */ 6055 _flag_k = FK_ADD; 6056 L_3803C34C: 6057 SET_LO8(ecx, MEM8(0x3806F26C)); /* 0x3803C34C: mov cl, byte ptr [0x3806f26c] */ 6058 SET_LO8(eax, 2); /* 0x3803C352: mov al, 2 */ 6059 /* test LO8(eax), LO8(ecx) */ /* 0x3803C354: test al, cl */ 6060 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24; 6061 _cf = 0; 6062 _flag_k = FK_NARROW(FK_TEST, 24); 6063 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C37A; /* 0x3803C356: jne 0x3803c37a */ 6064 L_3803C358: 6065 SET_LO8(edx, LO8(ecx)); /* 0x3803C358: mov dl, cl */ 6066 _flag_a = (uint32_t)((LO8(edx) | LO8(eax))) << 24; _flag_b = (uint32_t)((LO8(edx) | LO8(eax))) << 24; 6067 SET_LO8(edx, LO8(edx) | LO8(eax)); /* 0x3803C35A: or dl, al */ 6068 _cf = 0; 6069 _flag_k = FK_NARROW(FK_TEST, 24); 6070 ecx = 0x3806F280u; /* 0x3803C35C: mov ecx, 0x3806f280 */ 6071 MEM8(0x3806F26C) = (uint8_t)(LO8(edx)); /* 0x3803C361: mov byte ptr [0x3806f26c], dl */ 6072 RECOMP_ICALL(MEM32(0x3804E51C)); /* 0x3803C367: call dword ptr [0x3804e51c] */ 6073 RECOMP_FLAGS_IN(); 6074 PUSH32(esp, 0x380018B0u); /* 0x3803C36D: push 0x380018b0 */ 6075 RECOMP_ICALL(0x3804B54Cu); /* 0x3803C372: call 0x3804b54c */ /* not lifted */ 6076 RECOMP_FLAGS_IN(); 6077 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6078 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6079 esp = esp + 4; /* 0x3803C377: add esp, 4 */ 6080 _flag_k = FK_ADD; 6081 L_3803C37A: 6082 eax = ebp + (-0xC); /* 0x3803C37A: lea eax, [ebp - 0xc] */ 6083 PUSH32(esp, eax); /* 0x3803C37D: push eax */ 6084 ecx = ebp + (-0x90); /* 0x3803C37E: lea ecx, [ebp - 0x90] */ 6085 PUSH32(esp, ecx); /* 0x3803C384: push ecx */ 6086 ecx = ebp + (-0x24); /* 0x3803C385: lea ecx, [ebp - 0x24] */ 6087 RECOMP_ICALL(MEM32(0x3804E4E0)); /* 0x3803C388: call dword ptr [0x3804e4e0] */ 6088 RECOMP_FLAGS_IN(); 6089 edx = MEM32(eax); /* 0x3803C38E: mov edx, dword ptr [eax] */ 6090 MEM32(0x3806F270) = edx; /* 0x3803C390: mov dword ptr [0x3806f270], edx */ 6091 ecx = MEM32(eax + 0x4); /* 0x3803C396: mov ecx, dword ptr [eax + 4] */ 6092 MEM32(0x3806F274) = ecx; /* 0x3803C399: mov dword ptr [0x3806f274], ecx */ 6093 edx = MEM32(eax + 0x8); /* 0x3803C39F: mov edx, dword ptr [eax + 8] */ 6094 eax = ebp + (-0xC); /* 0x3803C3A2: lea eax, [ebp - 0xc] */ 6095 PUSH32(esp, eax); /* 0x3803C3A5: push eax */ 6096 ecx = ebp + (-0x78); /* 0x3803C3A6: lea ecx, [ebp - 0x78] */ 6097 PUSH32(esp, ecx); /* 0x3803C3A9: push ecx */ 6098 ecx = ebp + (-0x18); /* 0x3803C3AA: lea ecx, [ebp - 0x18] */ 6099 MEM32(0x3806F278) = edx; /* 0x3803C3AD: mov dword ptr [0x3806f278], edx */ 6100 RECOMP_ICALL(MEM32(0x3804E4E0)); /* 0x3803C3B3: call dword ptr [0x3804e4e0] */ 6101 RECOMP_FLAGS_IN(); 6102 edx = MEM32(eax); /* 0x3803C3B9: mov edx, dword ptr [eax] */ 6103 MEM32(0x3806F280) = edx; /* 0x3803C3BB: mov dword ptr [0x3806f280], edx */ 6104 ecx = MEM32(eax + 0x4); /* 0x3803C3C1: mov ecx, dword ptr [eax + 4] */ 6105 MEM32(0x3806F284) = ecx; /* 0x3803C3C4: mov dword ptr [0x3806f284], ecx */ 6106 edx = MEM32(eax + 0x8); /* 0x3803C3CA: mov edx, dword ptr [eax + 8] */ 6107 PUSH32(esp, 0x3806F280u); /* 0x3803C3CD: push 0x3806f280 */ 6108 eax = ebp + (-0xC0); /* 0x3803C3D2: lea eax, [ebp - 0xc0] */ 6109 PUSH32(esp, eax); /* 0x3803C3D8: push eax */ 6110 ecx = 0x3806F270u; /* 0x3803C3D9: mov ecx, 0x3806f270 */ 6111 MEM32(0x3806F288) = edx; /* 0x3803C3DE: mov dword ptr [0x3806f288], edx */ 6112 RECOMP_ICALL(MEM32(0x3804E4FC)); /* 0x3803C3E4: call dword ptr [0x3804e4fc] */ 6113 RECOMP_FLAGS_IN(); 6114 edx = MEM32(eax); /* 0x3803C3EA: mov edx, dword ptr [eax] */ 6115 esi = MEM32(ebp + 0x14); /* 0x3803C3EC: mov esi, dword ptr [ebp + 0x14] */ 6116 ecx = esi; /* 0x3803C3EF: mov ecx, esi */ 6117 MEM32(ecx) = edx; /* 0x3803C3F1: mov dword ptr [ecx], edx */ 6118 edx = MEM32(eax + 0x4); /* 0x3803C3F3: mov edx, dword ptr [eax + 4] */ 6119 MEM32(ecx + 0x4) = edx; /* 0x3803C3F6: mov dword ptr [ecx + 4], edx */ 6120 eax = MEM32(eax + 0x8); /* 0x3803C3F9: mov eax, dword ptr [eax + 8] */ 6121 MEM32(ecx + 0x8) = eax; /* 0x3803C3FC: mov dword ptr [ecx + 8], eax */ 6122 PUSH32(esp, esi); /* 0x3803C3FF: push esi */ 6123 ecx = 0x3806F018u; /* 0x3803C400: mov ecx, 0x3806f018 */ 6124 RECOMP_ICALL(MEM32(0x3804E4D0)); /* 0x3803C405: call dword ptr [0x3804e4d0] */ 6125 RECOMP_FLAGS_IN(); 6126 { float _v = (float)_st[0]; *(float*)ADDR(ebp + 0x14) = _v; } /* 0x3803C40B: fst dword ptr [ebp + 0x14] */ 6127 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803C40E: fcomp dword ptr [0x3804e8e4] */ 6128 fp_pop(); 6129 edi = MEM32(ebp + 0x10); /* 0x3803C414: mov edi, dword ptr [ebp + 0x10] */ 6130 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C417: fnstsw ax */ 6131 /* test HI8(eax), 0x41u */ /* 0x3803C419: test ah, 0x41 */ 6132 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 6133 _cf = 0; 6134 _flag_k = FK_NARROW(FK_TEST, 24); 6135 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C589; /* 0x3803C41C: jne 0x3803c589 */ 6136 L_3803C422: 6137 PUSH32(esp, esi); /* 0x3803C422: push esi */ 6138 PUSH32(esp, 0x3806F028u); /* 0x3803C423: push 0x3806f028 */ 6139 ecx = ebp + (-0x60); /* 0x3803C428: lea ecx, [ebp - 0x60] */ 6140 PUSH32(esp, ecx); /* 0x3803C42B: push ecx */ 6141 ecx = ebp + (-0xC); /* 0x3803C42C: lea ecx, [ebp - 0xc] */ 6142 RECOMP_ICALL(MEM32(0x3804E4E0)); /* 0x3803C42F: call dword ptr [0x3804e4e0] */ 6143 RECOMP_FLAGS_IN(); 6144 ecx = eax; /* 0x3803C435: mov ecx, eax */ 6145 RECOMP_ICALL(MEM32(0x3804E4D0)); /* 0x3803C437: call dword ptr [0x3804e4d0] */ 6146 RECOMP_FLAGS_IN(); 6147 _st[0] /= (double)*(float*)ADDR(ebp + 0x14); /* 0x3803C43D: fdiv dword ptr [ebp + 0x14] */ 6148 eax = ebp + (-0xF0); /* 0x3803C440: lea eax, [ebp - 0xf0] */ 6149 ecx = 0x3806F018u; /* 0x3803C446: mov ecx, 0x3806f018 */ 6150 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x14) = _v; } /* 0x3803C44B: fstp dword ptr [ebp + 0x14] */ 6151 edx = MEM32(ebp + 0x14); /* 0x3803C44E: mov edx, dword ptr [ebp + 0x14] */ 6152 PUSH32(esp, edx); /* 0x3803C451: push edx */ 6153 PUSH32(esp, eax); /* 0x3803C452: push eax */ 6154 RECOMP_ICALL(MEM32(0x3804E508)); /* 0x3803C453: call dword ptr [0x3804e508] */ 6155 RECOMP_FLAGS_IN(); 6156 PUSH32(esp, eax); /* 0x3803C459: push eax */ 6157 ecx = ebp + (-0xA8); /* 0x3803C45A: lea ecx, [ebp - 0xa8] */ 6158 PUSH32(esp, ecx); /* 0x3803C460: push ecx */ 6159 ecx = 0x3806F028u; /* 0x3803C461: mov ecx, 0x3806f028 */ 6160 RECOMP_ICALL(MEM32(0x3804E504)); /* 0x3803C466: call dword ptr [0x3804e504] */ 6161 RECOMP_FLAGS_IN(); 6162 ecx = MEM32(eax); /* 0x3803C46C: mov ecx, dword ptr [eax] */ 6163 edx = edi; /* 0x3803C46E: mov edx, edi */ 6164 MEM32(edx) = ecx; /* 0x3803C470: mov dword ptr [edx], ecx */ 6165 ecx = MEM32(eax + 0x4); /* 0x3803C472: mov ecx, dword ptr [eax + 4] */ 6166 MEM32(edx + 0x4) = ecx; /* 0x3803C475: mov dword ptr [edx + 4], ecx */ 6167 eax = MEM32(eax + 0x8); /* 0x3803C478: mov eax, dword ptr [eax + 8] */ 6168 ecx = ebp + (-0xC); /* 0x3803C47B: lea ecx, [ebp - 0xc] */ 6169 MEM32(edx + 0x8) = eax; /* 0x3803C47E: mov dword ptr [edx + 8], eax */ 6170 PUSH32(esp, ecx); /* 0x3803C481: push ecx */ 6171 edx = ebp + (-0xD8); /* 0x3803C482: lea edx, [ebp - 0xd8] */ 6172 PUSH32(esp, edx); /* 0x3803C488: push edx */ 6173 ecx = edi; /* 0x3803C489: mov ecx, edi */ 6174 RECOMP_ICALL(MEM32(0x3804E4E0)); /* 0x3803C48B: call dword ptr [0x3804e4e0] */ 6175 RECOMP_FLAGS_IN(); 6176 PUSH32(esp, eax); /* 0x3803C491: push eax */ 6177 eax = ebp + (-0x6C); /* 0x3803C492: lea eax, [ebp - 0x6c] */ 6178 PUSH32(esp, eax); /* 0x3803C495: push eax */ 6179 ecx = 0x3806F270u; /* 0x3803C496: mov ecx, 0x3806f270 */ 6180 RECOMP_ICALL(MEM32(0x3804E4FC)); /* 0x3803C49B: call dword ptr [0x3804e4fc] */ 6181 RECOMP_FLAGS_IN(); 6182 ecx = MEM32(eax); /* 0x3803C4A1: mov ecx, dword ptr [eax] */ 6183 MEM32(ebp + (-0x3C)) = ecx; /* 0x3803C4A3: mov dword ptr [ebp - 0x3c], ecx */ 6184 edx = MEM32(eax + 0x4); /* 0x3803C4A6: mov edx, dword ptr [eax + 4] */ 6185 MEM32(ebp + (-0x38)) = edx; /* 0x3803C4A9: mov dword ptr [ebp - 0x38], edx */ 6186 eax = MEM32(eax + 0x8); /* 0x3803C4AC: mov eax, dword ptr [eax + 8] */ 6187 ecx = ebp + (-0x24); /* 0x3803C4AF: lea ecx, [ebp - 0x24] */ 6188 PUSH32(esp, ecx); /* 0x3803C4B2: push ecx */ 6189 edx = ebp + (-0x84); /* 0x3803C4B3: lea edx, [ebp - 0x84] */ 6190 PUSH32(esp, edx); /* 0x3803C4B9: push edx */ 6191 ecx = edi; /* 0x3803C4BA: mov ecx, edi */ 6192 MEM32(ebp + (-0x34)) = eax; /* 0x3803C4BC: mov dword ptr [ebp - 0x34], eax */ 6193 RECOMP_ICALL(MEM32(0x3804E4E0)); /* 0x3803C4BF: call dword ptr [0x3804e4e0] */ 6194 RECOMP_FLAGS_IN(); 6195 PUSH32(esp, eax); /* 0x3803C4C5: push eax */ 6196 eax = ebp + (-0x9C); /* 0x3803C4C6: lea eax, [ebp - 0x9c] */ 6197 PUSH32(esp, eax); /* 0x3803C4CC: push eax */ 6198 ecx = ebp + (-0x24); /* 0x3803C4CD: lea ecx, [ebp - 0x24] */ 6199 PUSH32(esp, ecx); /* 0x3803C4D0: push ecx */ 6200 edx = ebp + (-0xB4); /* 0x3803C4D1: lea edx, [ebp - 0xb4] */ 6201 PUSH32(esp, edx); /* 0x3803C4D7: push edx */ 6202 ecx = ebp + (-0x18); /* 0x3803C4D8: lea ecx, [ebp - 0x18] */ 6203 RECOMP_ICALL(MEM32(0x3804E4E0)); /* 0x3803C4DB: call dword ptr [0x3804e4e0] */ 6204 RECOMP_FLAGS_IN(); 6205 ecx = eax; /* 0x3803C4E1: mov ecx, eax */ 6206 RECOMP_ICALL(MEM32(0x3804E4FC)); /* 0x3803C4E3: call dword ptr [0x3804e4fc] */ 6207 RECOMP_FLAGS_IN(); 6208 ecx = MEM32(eax); /* 0x3803C4E9: mov ecx, dword ptr [eax] */ 6209 MEM32(ebp + (-0x48)) = ecx; /* 0x3803C4EB: mov dword ptr [ebp - 0x48], ecx */ 6210 edx = MEM32(eax + 0x4); /* 0x3803C4EE: mov edx, dword ptr [eax + 4] */ 6211 ecx = ebp + (-0x48); /* 0x3803C4F1: lea ecx, [ebp - 0x48] */ 6212 MEM32(ebp + (-0x44)) = edx; /* 0x3803C4F4: mov dword ptr [ebp - 0x44], edx */ 6213 eax = MEM32(eax + 0x8); /* 0x3803C4F7: mov eax, dword ptr [eax + 8] */ 6214 PUSH32(esp, ecx); /* 0x3803C4FA: push ecx */ 6215 ecx = ebp + (-0x3C); /* 0x3803C4FB: lea ecx, [ebp - 0x3c] */ 6216 MEM32(ebp + (-0x40)) = eax; /* 0x3803C4FE: mov dword ptr [ebp - 0x40], eax */ 6217 RECOMP_ICALL(MEM32(0x3804E4D0)); /* 0x3803C501: call dword ptr [0x3804e4d0] */ 6218 RECOMP_FLAGS_IN(); 6219 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804F7A4)); /* 0x3803C507: fcomp dword ptr [0x3804f7a4] */ 6220 fp_pop(); 6221 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C50D: fnstsw ax */ 6222 /* test HI8(eax), 1 */ /* 0x3803C50F: test ah, 1 */ 6223 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 6224 _cf = 0; 6225 _flag_k = FK_NARROW(FK_TEST, 24); 6226 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C589; /* 0x3803C512: jne 0x3803c589 */ 6227 L_3803C514: 6228 PUSH32(esp, 0x3806F280u); /* 0x3803C514: push 0x3806f280 */ 6229 edx = ebp + (-0xCC); /* 0x3803C519: lea edx, [ebp - 0xcc] */ 6230 PUSH32(esp, edx); /* 0x3803C51F: push edx */ 6231 eax = ebp + (-0x18); /* 0x3803C520: lea eax, [ebp - 0x18] */ 6232 PUSH32(esp, eax); /* 0x3803C523: push eax */ 6233 ecx = ebp + (-0xE4); /* 0x3803C524: lea ecx, [ebp - 0xe4] */ 6234 PUSH32(esp, ecx); /* 0x3803C52A: push ecx */ 6235 ecx = edi; /* 0x3803C52B: mov ecx, edi */ 6236 RECOMP_ICALL(MEM32(0x3804E4E0)); /* 0x3803C52D: call dword ptr [0x3804e4e0] */ 6237 RECOMP_FLAGS_IN(); 6238 ecx = eax; /* 0x3803C533: mov ecx, eax */ 6239 RECOMP_ICALL(MEM32(0x3804E4FC)); /* 0x3803C535: call dword ptr [0x3804e4fc] */ 6240 RECOMP_FLAGS_IN(); 6241 edx = MEM32(eax); /* 0x3803C53B: mov edx, dword ptr [eax] */ 6242 MEM32(ebp + (-0x54)) = edx; /* 0x3803C53D: mov dword ptr [ebp - 0x54], edx */ 6243 ecx = MEM32(eax + 0x4); /* 0x3803C540: mov ecx, dword ptr [eax + 4] */ 6244 MEM32(ebp + (-0x50)) = ecx; /* 0x3803C543: mov dword ptr [ebp - 0x50], ecx */ 6245 edx = MEM32(eax + 0x8); /* 0x3803C546: mov edx, dword ptr [eax + 8] */ 6246 eax = ebp + (-0x54); /* 0x3803C549: lea eax, [ebp - 0x54] */ 6247 PUSH32(esp, eax); /* 0x3803C54C: push eax */ 6248 ecx = ebp + (-0x3C); /* 0x3803C54D: lea ecx, [ebp - 0x3c] */ 6249 MEM32(ebp + (-0x4C)) = edx; /* 0x3803C550: mov dword ptr [ebp - 0x4c], edx */ 6250 RECOMP_ICALL(MEM32(0x3804E4D0)); /* 0x3803C553: call dword ptr [0x3804e4d0] */ 6251 RECOMP_FLAGS_IN(); 6252 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804F7A4)); /* 0x3803C559: fcomp dword ptr [0x3804f7a4] */ 6253 fp_pop(); 6254 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C55F: fnstsw ax */ 6255 /* test HI8(eax), 1 */ /* 0x3803C561: test ah, 1 */ 6256 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 6257 _cf = 0; 6258 _flag_k = FK_NARROW(FK_TEST, 24); 6259 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C589; /* 0x3803C564: jne 0x3803c589 */ 6260 L_3803C566: 6261 ecx = ebp + (-0xFC); /* 0x3803C566: lea ecx, [ebp - 0xfc] */ 6262 PUSH32(esp, ecx); /* 0x3803C56C: push ecx */ 6263 ecx = esi; /* 0x3803C56D: mov ecx, esi */ 6264 RECOMP_ICALL(MEM32(0x3804E528)); /* 0x3803C56F: call dword ptr [0x3804e528] */ 6265 RECOMP_FLAGS_IN(); 6266 ecx = MEM32(eax); /* 0x3803C575: mov ecx, dword ptr [eax] */ 6267 edx = esi; /* 0x3803C577: mov edx, esi */ 6268 MEM32(edx) = ecx; /* 0x3803C579: mov dword ptr [edx], ecx */ 6269 ecx = MEM32(eax + 0x4); /* 0x3803C57B: mov ecx, dword ptr [eax + 4] */ 6270 MEM32(edx + 0x4) = ecx; /* 0x3803C57E: mov dword ptr [edx + 4], ecx */ 6271 eax = MEM32(eax + 0x8); /* 0x3803C581: mov eax, dword ptr [eax + 8] */ 6272 MEM32(edx + 0x8) = eax; /* 0x3803C584: mov dword ptr [edx + 8], eax */ 6273 goto L_3803C5B1; /* 0x3803C587: jmp 0x3803c5b1 */ 6274 L_3803C589: 6275 PUSH32(esp, esi); /* 0x3803C589: push esi */ 6276 PUSH32(esp, edi); /* 0x3803C58A: push edi */ 6277 ecx = ebp + (-0xC); /* 0x3803C58B: lea ecx, [ebp - 0xc] */ 6278 PUSH32(esp, ecx); /* 0x3803C58E: push ecx */ 6279 edx = ebp + (-0x30); /* 0x3803C58F: lea edx, [ebp - 0x30] */ 6280 PUSH32(esp, edx); /* 0x3803C592: push edx */ 6281 eax = ebp + (-0x18); /* 0x3803C593: lea eax, [ebp - 0x18] */ 6282 PUSH32(esp, eax); /* 0x3803C596: push eax */ 6283 PUSH32(esp, 0x3806F018u); /* 0x3803C597: push 0x3806f018 */ 6284 PUSH32(esp, 0x3806F028u); /* 0x3803C59C: push 0x3806f028 */ 6285 RECOMP_ICALL(0x3803C6B0u); /* 0x3803C5A1: call 0x3803c6b0 */ /* not lifted */ 6286 RECOMP_FLAGS_IN(); 6287 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu); 6288 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6289 esp = esp + 0x1Cu; /* 0x3803C5A6: add esp, 0x1c */ 6290 _flag_k = FK_ADD; 6291 /* test LO8(eax), LO8(eax) */ /* 0x3803C5A9: test al, al */ 6292 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 6293 _cf = 0; 6294 _flag_k = FK_NARROW(FK_TEST, 24); 6295 RECOMP_BACKEDGE(); 6296 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C2F7; /* 0x3803C5AB: je 0x3803c2f7 */ 6297 L_3803C5B1: 6298 ecx = esi; /* 0x3803C5B1: mov ecx, esi */ 6299 RECOMP_ICALL(MEM32(0x3804E4EC)); /* 0x3803C5B3: call dword ptr [0x3804e4ec] */ 6300 RECOMP_FLAGS_IN(); 6301 fp_push(_st[0]); /* 0x3803C5B9: fld st(0) */ 6302 _st[0] *= (double)*(float*)ADDR(esi); /* 0x3803C5BB: fmul dword ptr [esi] */ 6303 edi = POP32_VAL(esp); /* 0x3803C5BD: pop edi */ 6304 SET_LO8(eax, LO8(ebx)); /* 0x3803C5BE: mov al, bl */ 6305 { float _v = (float)fp_pop(); *(float*)ADDR(esi) = _v; } /* 0x3803C5C0: fstp dword ptr [esi] */ 6306 fp_push(_st[0]); /* 0x3803C5C2: fld st(0) */ 6307 _st[0] *= (double)*(float*)ADDR(esi + 0x4); /* 0x3803C5C4: fmul dword ptr [esi + 4] */ 6308 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x4) = _v; } /* 0x3803C5C7: fstp dword ptr [esi + 4] */ 6309 _st[0] *= (double)*(float*)ADDR(esi + 0x8); /* 0x3803C5CA: fmul dword ptr [esi + 8] */ 6310 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x8) = _v; } /* 0x3803C5CD: fstp dword ptr [esi + 8] */ 6311 esi = POP32_VAL(esp); /* 0x3803C5D0: pop esi */ 6312 ebx = POP32_VAL(esp); /* 0x3803C5D1: pop ebx */ 6313 esp = ebp; /* 0x3803C5D2: mov esp, ebp */ 6314 ebp = POP32_VAL(esp); /* 0x3803C5D4: pop ebp */ 6315 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3803C5D5: ret 0x10 */ 6316 L_3803C5D8: 6317 esi = MEM32(ebp + 0x14); /* 0x3803C5D8: mov esi, dword ptr [ebp + 0x14] */ 6318 edi = MEM32(ebp + 0x10); /* 0x3803C5DB: mov edi, dword ptr [ebp + 0x10] */ 6319 PUSH32(esp, esi); /* 0x3803C5DE: push esi */ 6320 PUSH32(esp, edi); /* 0x3803C5DF: push edi */ 6321 ecx = ebp + (-0x30); /* 0x3803C5E0: lea ecx, [ebp - 0x30] */ 6322 PUSH32(esp, ecx); /* 0x3803C5E3: push ecx */ 6323 edx = ebp + (-0x24); /* 0x3803C5E4: lea edx, [ebp - 0x24] */ 6324 PUSH32(esp, edx); /* 0x3803C5E7: push edx */ 6325 eax = ebp + (-0xC); /* 0x3803C5E8: lea eax, [ebp - 0xc] */ 6326 PUSH32(esp, eax); /* 0x3803C5EB: push eax */ 6327 PUSH32(esp, 0x3806F018u); /* 0x3803C5EC: push 0x3806f018 */ 6328 PUSH32(esp, 0x3806F028u); /* 0x3803C5F1: push 0x3806f028 */ 6329 RECOMP_ICALL(0x3803C6B0u); /* 0x3803C5F6: call 0x3803c6b0 */ /* not lifted */ 6330 RECOMP_FLAGS_IN(); 6331 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu); 6332 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6333 esp = esp + 0x1Cu; /* 0x3803C5FB: add esp, 0x1c */ 6334 _flag_k = FK_ADD; 6335 /* test LO8(eax), LO8(eax) */ /* 0x3803C5FE: test al, al */ 6336 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 6337 _cf = 0; 6338 _flag_k = FK_NARROW(FK_TEST, 24); 6339 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C641; /* 0x3803C600: je 0x3803c641 */ 6340 L_3803C602: 6341 fp_push(*(float*)&MEM32(esi + 0x8)); /* 0x3803C602: fld dword ptr [esi + 8] */ 6342 PUSH32(esp, ecx); /* 0x3803C605: push ecx */ 6343 fp_push(*(float*)&MEM32(esi + 0x4)); /* 0x3803C606: fld dword ptr [esi + 4] */ 6344 ecx = esi; /* 0x3803C609: mov ecx, esi */ 6345 fp_push(*(float*)&MEM32(esi)); /* 0x3803C60B: fld dword ptr [esi] */ 6346 fp_push(_st[2]); /* 0x3803C60D: fld st(2) */ 6347 { double _v = fp_pop(); _st[2] *= _v; } /* 0x3803C60F: fmulp st(3) */ 6348 fp_push(_st[1]); /* 0x3803C611: fld st(1) */ 6349 _st[0] *= _st[2]; /* 0x3803C613: fmul st(2) */ 6350 { double _v = fp_pop(); _st[2] += _v; } /* 0x3803C615: faddp st(3) */ 6351 fp_push(_st[0]); /* 0x3803C617: fld st(0) */ 6352 _st[0] *= _st[1]; /* 0x3803C619: fmul st(1) */ 6353 { double _v = fp_pop(); _st[2] += _v; } /* 0x3803C61B: faddp st(3) */ 6354 fp_xch(2); /* 0x3803C61D: fxch st(2) */ 6355 _st[0] = sqrt(_st[0]); /* 0x3803C61F: fsqrt */ 6356 fp_xch(2); /* 0x3803C621: fxch st(2) */ 6357 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803C623: fstp st(0) */ 6358 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803C625: fstp st(0) */ 6359 _st[0] = (double)*(float*)ADDR(0x3804E8CC) / _st[0]; /* 0x3803C627: fdivr dword ptr [0x3804e8cc] */ 6360 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x3803C62D: fstp dword ptr [esp] */ 6361 RECOMP_ICALL(MEM32(0x3804E4D4)); /* 0x3803C630: call dword ptr [0x3804e4d4] */ 6362 RECOMP_FLAGS_IN(); 6363 edi = POP32_VAL(esp); /* 0x3803C636: pop edi */ 6364 esi = POP32_VAL(esp); /* 0x3803C637: pop esi */ 6365 SET_LO8(eax, 1); /* 0x3803C638: mov al, 1 */ 6366 ebx = POP32_VAL(esp); /* 0x3803C63A: pop ebx */ 6367 esp = ebp; /* 0x3803C63B: mov esp, ebp */ 6368 ebp = POP32_VAL(esp); /* 0x3803C63D: pop ebp */ 6369 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3803C63E: ret 0x10 */ 6370 L_3803C641: 6371 PUSH32(esp, esi); /* 0x3803C641: push esi */ 6372 PUSH32(esp, edi); /* 0x3803C642: push edi */ 6373 ecx = ebp + (-0x30); /* 0x3803C643: lea ecx, [ebp - 0x30] */ 6374 PUSH32(esp, ecx); /* 0x3803C646: push ecx */ 6375 edx = ebp + (-0x18); /* 0x3803C647: lea edx, [ebp - 0x18] */ 6376 PUSH32(esp, edx); /* 0x3803C64A: push edx */ 6377 eax = ebp + (-0x24); /* 0x3803C64B: lea eax, [ebp - 0x24] */ 6378 PUSH32(esp, eax); /* 0x3803C64E: push eax */ 6379 PUSH32(esp, 0x3806F018u); /* 0x3803C64F: push 0x3806f018 */ 6380 PUSH32(esp, 0x3806F028u); /* 0x3803C654: push 0x3806f028 */ 6381 RECOMP_ICALL(0x3803C6B0u); /* 0x3803C659: call 0x3803c6b0 */ /* not lifted */ 6382 RECOMP_FLAGS_IN(); 6383 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu); 6384 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6385 esp = esp + 0x1Cu; /* 0x3803C65E: add esp, 0x1c */ 6386 _flag_k = FK_ADD; 6387 /* test LO8(eax), LO8(eax) */ /* 0x3803C661: test al, al */ 6388 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 6389 _cf = 0; 6390 _flag_k = FK_NARROW(FK_TEST, 24); 6391 RECOMP_BACKEDGE(); 6392 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C2F7; /* 0x3803C663: je 0x3803c2f7 */ 6393 L_3803C669: 6394 fp_push(*(float*)&MEM32(esi + 0x8)); /* 0x3803C669: fld dword ptr [esi + 8] */ 6395 edi = POP32_VAL(esp); /* 0x3803C66C: pop edi */ 6396 fp_push(*(float*)&MEM32(esi + 0x4)); /* 0x3803C66D: fld dword ptr [esi + 4] */ 6397 SET_LO8(eax, 1); /* 0x3803C670: mov al, 1 */ 6398 fp_push(*(float*)&MEM32(esi)); /* 0x3803C672: fld dword ptr [esi] */ 6399 fp_push(_st[2]); /* 0x3803C674: fld st(2) */ 6400 { double _v = fp_pop(); _st[2] *= _v; } /* 0x3803C676: fmulp st(3) */ 6401 fp_push(_st[1]); /* 0x3803C678: fld st(1) */ 6402 _st[0] *= _st[2]; /* 0x3803C67A: fmul st(2) */ 6403 { double _v = fp_pop(); _st[2] += _v; } /* 0x3803C67C: faddp st(3) */ 6404 fp_push(_st[0]); /* 0x3803C67E: fld st(0) */ 6405 _st[0] *= _st[1]; /* 0x3803C680: fmul st(1) */ 6406 { double _v = fp_pop(); _st[2] += _v; } /* 0x3803C682: faddp st(3) */ 6407 fp_xch(2); /* 0x3803C684: fxch st(2) */ 6408 _st[0] = sqrt(_st[0]); /* 0x3803C686: fsqrt */ 6409 fp_xch(2); /* 0x3803C688: fxch st(2) */ 6410 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803C68A: fstp st(0) */ 6411 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803C68C: fstp st(0) */ 6412 _st[0] = (double)*(float*)ADDR(0x3804E8CC) / _st[0]; /* 0x3803C68E: fdivr dword ptr [0x3804e8cc] */ 6413 fp_push(_st[0]); /* 0x3803C694: fld st(0) */ 6414 _st[0] *= (double)*(float*)ADDR(esi); /* 0x3803C696: fmul dword ptr [esi] */ 6415 { float _v = (float)fp_pop(); *(float*)ADDR(esi) = _v; } /* 0x3803C698: fstp dword ptr [esi] */ 6416 fp_push(_st[0]); /* 0x3803C69A: fld st(0) */ 6417 _st[0] *= (double)*(float*)ADDR(esi + 0x4); /* 0x3803C69C: fmul dword ptr [esi + 4] */ 6418 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x4) = _v; } /* 0x3803C69F: fstp dword ptr [esi + 4] */ 6419 _st[0] *= (double)*(float*)ADDR(esi + 0x8); /* 0x3803C6A2: fmul dword ptr [esi + 8] */ 6420 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x8) = _v; } /* 0x3803C6A5: fstp dword ptr [esi + 8] */ 6421 esi = POP32_VAL(esp); /* 0x3803C6A8: pop esi */ 6422 ebx = POP32_VAL(esp); /* 0x3803C6A9: pop ebx */ 6423 esp = ebp; /* 0x3803C6AA: mov esp, ebp */ 6424 ebp = POP32_VAL(esp); /* 0x3803C6AC: pop ebp */ 6425 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3803C6AD: ret 0x10 */ 6426 RECOMP_REGS_OUT(); 6427 } 6428 6429 void sub_3803C278(void) { 6430 int _fpu_cmp = 0; 6431 uint32_t _cf = 0; 6432 int _df = 1; 6433 uint32_t _flag_k = FK_NONE; 6434 uint32_t _flag_a = 0, _flag_b = 0; 6435 uint32_t _itail_tgt = 0; 6436 RECOMP_REGS_LOCALS 6437 RECOMP_ENTER(0x3803C278u); 6438 6439 L_3803C278: 6440 MEM32(ebp + (-0x14)) = 0; /* 0x3803C278: mov dword ptr [ebp - 0x14], 0 */ 6441 MEM32(ebp + (-0x10)) = 0; /* 0x3803C27F: mov dword ptr [ebp - 0x10], 0 */ 6442 MEM32(ebp + (-0x30)) = 0; /* 0x3803C286: mov dword ptr [ebp - 0x30], 0 */ 6443 MEM32(ebp + (-0x2C)) = 0; /* 0x3803C28D: mov dword ptr [ebp - 0x2c], 0 */ 6444 MEM32(ebp + (-0x28)) = 0; /* 0x3803C294: mov dword ptr [ebp - 0x28], 0 */ 6445 RECOMP_ICALL(0x38038370u); /* 0x3803C29B: call 0x38038370 */ /* not lifted */ 6446 RECOMP_FLAGS_IN(); 6447 fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x3803C2A0: fld dword ptr [ebp - 0x14] */ 6448 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + (-0x2C))); /* 0x3803C2A3: fcomp dword ptr [ebp - 0x2c] */ 6449 fp_pop(); 6450 SET_LO8(ebx, LO8(eax)); /* 0x3803C2A6: mov bl, al */ 6451 edx = ebp + (-0x14); /* 0x3803C2A8: lea edx, [ebp - 0x14] */ 6452 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C2AB: fnstsw ax */ 6453 /* test HI8(eax), 0x41u */ /* 0x3803C2AD: test ah, 0x41 */ 6454 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 6455 _cf = 0; 6456 _flag_k = FK_NARROW(FK_TEST, 24); 6457 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C2B5; /* 0x3803C2B0: je 0x3803c2b5 */ 6458 L_3803C2B2: 6459 edx = ebp + (-0x2C); /* 0x3803C2B2: lea edx, [ebp - 0x2c] */ 6460 L_3803C2B5: 6461 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x3803C2B5: fld dword ptr [ebp - 8] */ 6462 ecx = ebp + (-0x8); /* 0x3803C2B8: lea ecx, [ebp - 8] */ 6463 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ebp + (-0x20))); /* 0x3803C2BB: fcomp dword ptr [ebp - 0x20] */ 6464 fp_pop(); 6465 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C2BE: fnstsw ax */ 6466 /* test HI8(eax), 0x41u */ /* 0x3803C2C0: test ah, 0x41 */ 6467 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 6468 _cf = 0; 6469 _flag_k = FK_NARROW(FK_TEST, 24); 6470 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C2C8; /* 0x3803C2C3: je 0x3803c2c8 */ 6471 L_3803C2C5: 6472 ecx = ebp + (-0x20); /* 0x3803C2C5: lea ecx, [ebp - 0x20] */ 6473 L_3803C2C8: 6474 fp_push(*(float*)&MEM32(ecx)); /* 0x3803C2C8: fld dword ptr [ecx] */ 6475 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edx)); /* 0x3803C2CA: fcomp dword ptr [edx] */ 6476 fp_pop(); 6477 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C2CC: fnstsw ax */ 6478 /* test HI8(eax), 0x41u */ /* 0x3803C2CE: test ah, 0x41 */ 6479 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 6480 _cf = 0; 6481 _flag_k = FK_NARROW(FK_TEST, 24); 6482 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C2D5; /* 0x3803C2D1: je 0x3803c2d5 */ 6483 L_3803C2D3: 6484 ecx = edx; /* 0x3803C2D3: mov ecx, edx */ 6485 L_3803C2D5: 6486 fp_push(*(float*)&MEM32(ecx)); /* 0x3803C2D5: fld dword ptr [ecx] */ 6487 fp_push(*(float*)&MEM32(0x3806F02C)); /* 0x3803C2D7: fld dword ptr [0x3806f02c] */ 6488 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803C2DD: fcomp st(1) */ 6489 fp_pop(); 6490 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C2DF: fnstsw ax */ 6491 /* test HI8(eax), 0x41u */ /* 0x3803C2E1: test ah, 0x41 */ 6492 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 6493 _cf = 0; 6494 _flag_k = FK_NARROW(FK_TEST, 24); 6495 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C302; /* 0x3803C2E4: jne 0x3803c302 */ 6496 L_3803C2E6: 6497 fp_push(*(float*)&MEM32(0x3806F00C)); /* 0x3803C2E6: fld dword ptr [0x3806f00c] */ 6498 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803C2EC: fcomp st(1) */ 6499 fp_pop(); 6500 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C2EE: fnstsw ax */ 6501 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803C2F0: fstp st(0) */ 6502 /* test HI8(eax), 0x41u */ /* 0x3803C2F2: test ah, 0x41 */ 6503 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 6504 _cf = 0; 6505 _flag_k = FK_NARROW(FK_TEST, 24); 6506 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C304; /* 0x3803C2F5: jne 0x3803c304 */ 6507 L_3803C2F7: 6508 edi = POP32_VAL(esp); /* 0x3803C2F7: pop edi */ 6509 esi = POP32_VAL(esp); /* 0x3803C2F8: pop esi */ 6510 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 6511 SET_LO8(eax, 0); /* 0x3803C2F9: xor al, al */ 6512 _cf = 0; 6513 _flag_k = FK_NARROW(FK_TEST, 24); 6514 ebx = POP32_VAL(esp); /* 0x3803C2FB: pop ebx */ 6515 esp = ebp; /* 0x3803C2FC: mov esp, ebp */ 6516 ebp = POP32_VAL(esp); /* 0x3803C2FE: pop ebp */ 6517 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3803C2FF: ret 0x10 */ 6518 L_3803C302: 6519 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803C302: fstp st(0) */ 6520 L_3803C304: 6521 /* test LO8(ebx), LO8(ebx) */ /* 0x3803C304: test bl, bl */ 6522 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24; 6523 _cf = 0; 6524 _flag_k = FK_NARROW(FK_TEST, 24); 6525 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C5D8; /* 0x3803C306: je 0x3803c5d8 */ 6526 L_3803C30C: 6527 SET_LO8(eax, MEM8(0x3806F26C)); /* 0x3803C30C: mov al, byte ptr [0x3806f26c] */ 6528 SET_LO8(ebx, 1); /* 0x3803C311: mov bl, 1 */ 6529 /* test LO8(ebx), LO8(eax) */ /* 0x3803C313: test bl, al */ 6530 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 6531 _cf = 0; 6532 _flag_k = FK_NARROW(FK_TEST, 24); 6533 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C34C; /* 0x3803C315: jne 0x3803c34c */ 6534 L_3803C317: 6535 SET_LO8(edx, LO8(eax)); /* 0x3803C317: mov dl, al */ 6536 _flag_a = (uint32_t)((LO8(edx) | LO8(ebx))) << 24; _flag_b = (uint32_t)((LO8(edx) | LO8(ebx))) << 24; 6537 SET_LO8(edx, LO8(edx) | LO8(ebx)); /* 0x3803C319: or dl, bl */ 6538 _cf = 0; 6539 _flag_k = FK_NARROW(FK_TEST, 24); 6540 PUSH32(esp, 0x380018B0u); /* 0x3803C31B: push 0x380018b0 */ 6541 MEM8(0x3806F26C) = (uint8_t)(LO8(edx)); /* 0x3803C320: mov byte ptr [0x3806f26c], dl */ 6542 MEM32(0x3806F270) = 0; /* 0x3803C326: mov dword ptr [0x3806f270], 0 */ 6543 MEM32(0x3806F274) = 0; /* 0x3803C330: mov dword ptr [0x3806f274], 0 */ 6544 MEM32(0x3806F278) = 0; /* 0x3803C33A: mov dword ptr [0x3806f278], 0 */ 6545 RECOMP_ICALL(0x3804B54Cu); /* 0x3803C344: call 0x3804b54c */ /* not lifted */ 6546 RECOMP_FLAGS_IN(); 6547 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6548 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6549 esp = esp + 4; /* 0x3803C349: add esp, 4 */ 6550 _flag_k = FK_ADD; 6551 L_3803C34C: 6552 SET_LO8(ecx, MEM8(0x3806F26C)); /* 0x3803C34C: mov cl, byte ptr [0x3806f26c] */ 6553 SET_LO8(eax, 2); /* 0x3803C352: mov al, 2 */ 6554 /* test LO8(eax), LO8(ecx) */ /* 0x3803C354: test al, cl */ 6555 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24; 6556 _cf = 0; 6557 _flag_k = FK_NARROW(FK_TEST, 24); 6558 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C37A; /* 0x3803C356: jne 0x3803c37a */ 6559 L_3803C358: 6560 SET_LO8(edx, LO8(ecx)); /* 0x3803C358: mov dl, cl */ 6561 _flag_a = (uint32_t)((LO8(edx) | LO8(eax))) << 24; _flag_b = (uint32_t)((LO8(edx) | LO8(eax))) << 24; 6562 SET_LO8(edx, LO8(edx) | LO8(eax)); /* 0x3803C35A: or dl, al */ 6563 _cf = 0; 6564 _flag_k = FK_NARROW(FK_TEST, 24); 6565 ecx = 0x3806F280u; /* 0x3803C35C: mov ecx, 0x3806f280 */ 6566 MEM8(0x3806F26C) = (uint8_t)(LO8(edx)); /* 0x3803C361: mov byte ptr [0x3806f26c], dl */ 6567 RECOMP_ICALL(MEM32(0x3804E51C)); /* 0x3803C367: call dword ptr [0x3804e51c] */ 6568 RECOMP_FLAGS_IN(); 6569 PUSH32(esp, 0x380018B0u); /* 0x3803C36D: push 0x380018b0 */ 6570 RECOMP_ICALL(0x3804B54Cu); /* 0x3803C372: call 0x3804b54c */ /* not lifted */ 6571 RECOMP_FLAGS_IN(); 6572 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6573 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6574 esp = esp + 4; /* 0x3803C377: add esp, 4 */ 6575 _flag_k = FK_ADD; 6576 L_3803C37A: 6577 eax = ebp + (-0xC); /* 0x3803C37A: lea eax, [ebp - 0xc] */ 6578 PUSH32(esp, eax); /* 0x3803C37D: push eax */ 6579 ecx = ebp + (-0x90); /* 0x3803C37E: lea ecx, [ebp - 0x90] */ 6580 PUSH32(esp, ecx); /* 0x3803C384: push ecx */ 6581 ecx = ebp + (-0x24); /* 0x3803C385: lea ecx, [ebp - 0x24] */ 6582 RECOMP_ICALL(MEM32(0x3804E4E0)); /* 0x3803C388: call dword ptr [0x3804e4e0] */ 6583 RECOMP_FLAGS_IN(); 6584 edx = MEM32(eax); /* 0x3803C38E: mov edx, dword ptr [eax] */ 6585 MEM32(0x3806F270) = edx; /* 0x3803C390: mov dword ptr [0x3806f270], edx */ 6586 ecx = MEM32(eax + 0x4); /* 0x3803C396: mov ecx, dword ptr [eax + 4] */ 6587 MEM32(0x3806F274) = ecx; /* 0x3803C399: mov dword ptr [0x3806f274], ecx */ 6588 edx = MEM32(eax + 0x8); /* 0x3803C39F: mov edx, dword ptr [eax + 8] */ 6589 eax = ebp + (-0xC); /* 0x3803C3A2: lea eax, [ebp - 0xc] */ 6590 PUSH32(esp, eax); /* 0x3803C3A5: push eax */ 6591 ecx = ebp + (-0x78); /* 0x3803C3A6: lea ecx, [ebp - 0x78] */ 6592 PUSH32(esp, ecx); /* 0x3803C3A9: push ecx */ 6593 ecx = ebp + (-0x18); /* 0x3803C3AA: lea ecx, [ebp - 0x18] */ 6594 MEM32(0x3806F278) = edx; /* 0x3803C3AD: mov dword ptr [0x3806f278], edx */ 6595 RECOMP_ICALL(MEM32(0x3804E4E0)); /* 0x3803C3B3: call dword ptr [0x3804e4e0] */ 6596 RECOMP_FLAGS_IN(); 6597 edx = MEM32(eax); /* 0x3803C3B9: mov edx, dword ptr [eax] */ 6598 MEM32(0x3806F280) = edx; /* 0x3803C3BB: mov dword ptr [0x3806f280], edx */ 6599 ecx = MEM32(eax + 0x4); /* 0x3803C3C1: mov ecx, dword ptr [eax + 4] */ 6600 MEM32(0x3806F284) = ecx; /* 0x3803C3C4: mov dword ptr [0x3806f284], ecx */ 6601 edx = MEM32(eax + 0x8); /* 0x3803C3CA: mov edx, dword ptr [eax + 8] */ 6602 PUSH32(esp, 0x3806F280u); /* 0x3803C3CD: push 0x3806f280 */ 6603 eax = ebp + (-0xC0); /* 0x3803C3D2: lea eax, [ebp - 0xc0] */ 6604 PUSH32(esp, eax); /* 0x3803C3D8: push eax */ 6605 ecx = 0x3806F270u; /* 0x3803C3D9: mov ecx, 0x3806f270 */ 6606 MEM32(0x3806F288) = edx; /* 0x3803C3DE: mov dword ptr [0x3806f288], edx */ 6607 RECOMP_ICALL(MEM32(0x3804E4FC)); /* 0x3803C3E4: call dword ptr [0x3804e4fc] */ 6608 RECOMP_FLAGS_IN(); 6609 edx = MEM32(eax); /* 0x3803C3EA: mov edx, dword ptr [eax] */ 6610 esi = MEM32(ebp + 0x14); /* 0x3803C3EC: mov esi, dword ptr [ebp + 0x14] */ 6611 ecx = esi; /* 0x3803C3EF: mov ecx, esi */ 6612 MEM32(ecx) = edx; /* 0x3803C3F1: mov dword ptr [ecx], edx */ 6613 edx = MEM32(eax + 0x4); /* 0x3803C3F3: mov edx, dword ptr [eax + 4] */ 6614 MEM32(ecx + 0x4) = edx; /* 0x3803C3F6: mov dword ptr [ecx + 4], edx */ 6615 eax = MEM32(eax + 0x8); /* 0x3803C3F9: mov eax, dword ptr [eax + 8] */ 6616 MEM32(ecx + 0x8) = eax; /* 0x3803C3FC: mov dword ptr [ecx + 8], eax */ 6617 PUSH32(esp, esi); /* 0x3803C3FF: push esi */ 6618 ecx = 0x3806F018u; /* 0x3803C400: mov ecx, 0x3806f018 */ 6619 RECOMP_ICALL(MEM32(0x3804E4D0)); /* 0x3803C405: call dword ptr [0x3804e4d0] */ 6620 RECOMP_FLAGS_IN(); 6621 { float _v = (float)_st[0]; *(float*)ADDR(ebp + 0x14) = _v; } /* 0x3803C40B: fst dword ptr [ebp + 0x14] */ 6622 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803C40E: fcomp dword ptr [0x3804e8e4] */ 6623 fp_pop(); 6624 edi = MEM32(ebp + 0x10); /* 0x3803C414: mov edi, dword ptr [ebp + 0x10] */ 6625 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C417: fnstsw ax */ 6626 /* test HI8(eax), 0x41u */ /* 0x3803C419: test ah, 0x41 */ 6627 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 6628 _cf = 0; 6629 _flag_k = FK_NARROW(FK_TEST, 24); 6630 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C589; /* 0x3803C41C: jne 0x3803c589 */ 6631 L_3803C422: 6632 PUSH32(esp, esi); /* 0x3803C422: push esi */ 6633 PUSH32(esp, 0x3806F028u); /* 0x3803C423: push 0x3806f028 */ 6634 ecx = ebp + (-0x60); /* 0x3803C428: lea ecx, [ebp - 0x60] */ 6635 PUSH32(esp, ecx); /* 0x3803C42B: push ecx */ 6636 ecx = ebp + (-0xC); /* 0x3803C42C: lea ecx, [ebp - 0xc] */ 6637 RECOMP_ICALL(MEM32(0x3804E4E0)); /* 0x3803C42F: call dword ptr [0x3804e4e0] */ 6638 RECOMP_FLAGS_IN(); 6639 ecx = eax; /* 0x3803C435: mov ecx, eax */ 6640 RECOMP_ICALL(MEM32(0x3804E4D0)); /* 0x3803C437: call dword ptr [0x3804e4d0] */ 6641 RECOMP_FLAGS_IN(); 6642 _st[0] /= (double)*(float*)ADDR(ebp + 0x14); /* 0x3803C43D: fdiv dword ptr [ebp + 0x14] */ 6643 eax = ebp + (-0xF0); /* 0x3803C440: lea eax, [ebp - 0xf0] */ 6644 ecx = 0x3806F018u; /* 0x3803C446: mov ecx, 0x3806f018 */ 6645 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x14) = _v; } /* 0x3803C44B: fstp dword ptr [ebp + 0x14] */ 6646 edx = MEM32(ebp + 0x14); /* 0x3803C44E: mov edx, dword ptr [ebp + 0x14] */ 6647 PUSH32(esp, edx); /* 0x3803C451: push edx */ 6648 PUSH32(esp, eax); /* 0x3803C452: push eax */ 6649 RECOMP_ICALL(MEM32(0x3804E508)); /* 0x3803C453: call dword ptr [0x3804e508] */ 6650 RECOMP_FLAGS_IN(); 6651 PUSH32(esp, eax); /* 0x3803C459: push eax */ 6652 ecx = ebp + (-0xA8); /* 0x3803C45A: lea ecx, [ebp - 0xa8] */ 6653 PUSH32(esp, ecx); /* 0x3803C460: push ecx */ 6654 ecx = 0x3806F028u; /* 0x3803C461: mov ecx, 0x3806f028 */ 6655 RECOMP_ICALL(MEM32(0x3804E504)); /* 0x3803C466: call dword ptr [0x3804e504] */ 6656 RECOMP_FLAGS_IN(); 6657 ecx = MEM32(eax); /* 0x3803C46C: mov ecx, dword ptr [eax] */ 6658 edx = edi; /* 0x3803C46E: mov edx, edi */ 6659 MEM32(edx) = ecx; /* 0x3803C470: mov dword ptr [edx], ecx */ 6660 ecx = MEM32(eax + 0x4); /* 0x3803C472: mov ecx, dword ptr [eax + 4] */ 6661 MEM32(edx + 0x4) = ecx; /* 0x3803C475: mov dword ptr [edx + 4], ecx */ 6662 eax = MEM32(eax + 0x8); /* 0x3803C478: mov eax, dword ptr [eax + 8] */ 6663 ecx = ebp + (-0xC); /* 0x3803C47B: lea ecx, [ebp - 0xc] */ 6664 MEM32(edx + 0x8) = eax; /* 0x3803C47E: mov dword ptr [edx + 8], eax */ 6665 PUSH32(esp, ecx); /* 0x3803C481: push ecx */ 6666 edx = ebp + (-0xD8); /* 0x3803C482: lea edx, [ebp - 0xd8] */ 6667 PUSH32(esp, edx); /* 0x3803C488: push edx */ 6668 ecx = edi; /* 0x3803C489: mov ecx, edi */ 6669 RECOMP_ICALL(MEM32(0x3804E4E0)); /* 0x3803C48B: call dword ptr [0x3804e4e0] */ 6670 RECOMP_FLAGS_IN(); 6671 PUSH32(esp, eax); /* 0x3803C491: push eax */ 6672 eax = ebp + (-0x6C); /* 0x3803C492: lea eax, [ebp - 0x6c] */ 6673 PUSH32(esp, eax); /* 0x3803C495: push eax */ 6674 ecx = 0x3806F270u; /* 0x3803C496: mov ecx, 0x3806f270 */ 6675 RECOMP_ICALL(MEM32(0x3804E4FC)); /* 0x3803C49B: call dword ptr [0x3804e4fc] */ 6676 RECOMP_FLAGS_IN(); 6677 ecx = MEM32(eax); /* 0x3803C4A1: mov ecx, dword ptr [eax] */ 6678 MEM32(ebp + (-0x3C)) = ecx; /* 0x3803C4A3: mov dword ptr [ebp - 0x3c], ecx */ 6679 edx = MEM32(eax + 0x4); /* 0x3803C4A6: mov edx, dword ptr [eax + 4] */ 6680 MEM32(ebp + (-0x38)) = edx; /* 0x3803C4A9: mov dword ptr [ebp - 0x38], edx */ 6681 eax = MEM32(eax + 0x8); /* 0x3803C4AC: mov eax, dword ptr [eax + 8] */ 6682 ecx = ebp + (-0x24); /* 0x3803C4AF: lea ecx, [ebp - 0x24] */ 6683 PUSH32(esp, ecx); /* 0x3803C4B2: push ecx */ 6684 edx = ebp + (-0x84); /* 0x3803C4B3: lea edx, [ebp - 0x84] */ 6685 PUSH32(esp, edx); /* 0x3803C4B9: push edx */ 6686 ecx = edi; /* 0x3803C4BA: mov ecx, edi */ 6687 MEM32(ebp + (-0x34)) = eax; /* 0x3803C4BC: mov dword ptr [ebp - 0x34], eax */ 6688 RECOMP_ICALL(MEM32(0x3804E4E0)); /* 0x3803C4BF: call dword ptr [0x3804e4e0] */ 6689 RECOMP_FLAGS_IN(); 6690 PUSH32(esp, eax); /* 0x3803C4C5: push eax */ 6691 eax = ebp + (-0x9C); /* 0x3803C4C6: lea eax, [ebp - 0x9c] */ 6692 PUSH32(esp, eax); /* 0x3803C4CC: push eax */ 6693 ecx = ebp + (-0x24); /* 0x3803C4CD: lea ecx, [ebp - 0x24] */ 6694 PUSH32(esp, ecx); /* 0x3803C4D0: push ecx */ 6695 edx = ebp + (-0xB4); /* 0x3803C4D1: lea edx, [ebp - 0xb4] */ 6696 PUSH32(esp, edx); /* 0x3803C4D7: push edx */ 6697 ecx = ebp + (-0x18); /* 0x3803C4D8: lea ecx, [ebp - 0x18] */ 6698 RECOMP_ICALL(MEM32(0x3804E4E0)); /* 0x3803C4DB: call dword ptr [0x3804e4e0] */ 6699 RECOMP_FLAGS_IN(); 6700 ecx = eax; /* 0x3803C4E1: mov ecx, eax */ 6701 RECOMP_ICALL(MEM32(0x3804E4FC)); /* 0x3803C4E3: call dword ptr [0x3804e4fc] */ 6702 RECOMP_FLAGS_IN(); 6703 ecx = MEM32(eax); /* 0x3803C4E9: mov ecx, dword ptr [eax] */ 6704 MEM32(ebp + (-0x48)) = ecx; /* 0x3803C4EB: mov dword ptr [ebp - 0x48], ecx */ 6705 edx = MEM32(eax + 0x4); /* 0x3803C4EE: mov edx, dword ptr [eax + 4] */ 6706 ecx = ebp + (-0x48); /* 0x3803C4F1: lea ecx, [ebp - 0x48] */ 6707 MEM32(ebp + (-0x44)) = edx; /* 0x3803C4F4: mov dword ptr [ebp - 0x44], edx */ 6708 eax = MEM32(eax + 0x8); /* 0x3803C4F7: mov eax, dword ptr [eax + 8] */ 6709 PUSH32(esp, ecx); /* 0x3803C4FA: push ecx */ 6710 ecx = ebp + (-0x3C); /* 0x3803C4FB: lea ecx, [ebp - 0x3c] */ 6711 MEM32(ebp + (-0x40)) = eax; /* 0x3803C4FE: mov dword ptr [ebp - 0x40], eax */ 6712 RECOMP_ICALL(MEM32(0x3804E4D0)); /* 0x3803C501: call dword ptr [0x3804e4d0] */ 6713 RECOMP_FLAGS_IN(); 6714 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804F7A4)); /* 0x3803C507: fcomp dword ptr [0x3804f7a4] */ 6715 fp_pop(); 6716 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C50D: fnstsw ax */ 6717 /* test HI8(eax), 1 */ /* 0x3803C50F: test ah, 1 */ 6718 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 6719 _cf = 0; 6720 _flag_k = FK_NARROW(FK_TEST, 24); 6721 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C589; /* 0x3803C512: jne 0x3803c589 */ 6722 L_3803C514: 6723 PUSH32(esp, 0x3806F280u); /* 0x3803C514: push 0x3806f280 */ 6724 edx = ebp + (-0xCC); /* 0x3803C519: lea edx, [ebp - 0xcc] */ 6725 PUSH32(esp, edx); /* 0x3803C51F: push edx */ 6726 eax = ebp + (-0x18); /* 0x3803C520: lea eax, [ebp - 0x18] */ 6727 PUSH32(esp, eax); /* 0x3803C523: push eax */ 6728 ecx = ebp + (-0xE4); /* 0x3803C524: lea ecx, [ebp - 0xe4] */ 6729 PUSH32(esp, ecx); /* 0x3803C52A: push ecx */ 6730 ecx = edi; /* 0x3803C52B: mov ecx, edi */ 6731 RECOMP_ICALL(MEM32(0x3804E4E0)); /* 0x3803C52D: call dword ptr [0x3804e4e0] */ 6732 RECOMP_FLAGS_IN(); 6733 ecx = eax; /* 0x3803C533: mov ecx, eax */ 6734 RECOMP_ICALL(MEM32(0x3804E4FC)); /* 0x3803C535: call dword ptr [0x3804e4fc] */ 6735 RECOMP_FLAGS_IN(); 6736 edx = MEM32(eax); /* 0x3803C53B: mov edx, dword ptr [eax] */ 6737 MEM32(ebp + (-0x54)) = edx; /* 0x3803C53D: mov dword ptr [ebp - 0x54], edx */ 6738 ecx = MEM32(eax + 0x4); /* 0x3803C540: mov ecx, dword ptr [eax + 4] */ 6739 MEM32(ebp + (-0x50)) = ecx; /* 0x3803C543: mov dword ptr [ebp - 0x50], ecx */ 6740 edx = MEM32(eax + 0x8); /* 0x3803C546: mov edx, dword ptr [eax + 8] */ 6741 eax = ebp + (-0x54); /* 0x3803C549: lea eax, [ebp - 0x54] */ 6742 PUSH32(esp, eax); /* 0x3803C54C: push eax */ 6743 ecx = ebp + (-0x3C); /* 0x3803C54D: lea ecx, [ebp - 0x3c] */ 6744 MEM32(ebp + (-0x4C)) = edx; /* 0x3803C550: mov dword ptr [ebp - 0x4c], edx */ 6745 RECOMP_ICALL(MEM32(0x3804E4D0)); /* 0x3803C553: call dword ptr [0x3804e4d0] */ 6746 RECOMP_FLAGS_IN(); 6747 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804F7A4)); /* 0x3803C559: fcomp dword ptr [0x3804f7a4] */ 6748 fp_pop(); 6749 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C55F: fnstsw ax */ 6750 /* test HI8(eax), 1 */ /* 0x3803C561: test ah, 1 */ 6751 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 6752 _cf = 0; 6753 _flag_k = FK_NARROW(FK_TEST, 24); 6754 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C589; /* 0x3803C564: jne 0x3803c589 */ 6755 L_3803C566: 6756 ecx = ebp + (-0xFC); /* 0x3803C566: lea ecx, [ebp - 0xfc] */ 6757 PUSH32(esp, ecx); /* 0x3803C56C: push ecx */ 6758 ecx = esi; /* 0x3803C56D: mov ecx, esi */ 6759 RECOMP_ICALL(MEM32(0x3804E528)); /* 0x3803C56F: call dword ptr [0x3804e528] */ 6760 RECOMP_FLAGS_IN(); 6761 ecx = MEM32(eax); /* 0x3803C575: mov ecx, dword ptr [eax] */ 6762 edx = esi; /* 0x3803C577: mov edx, esi */ 6763 MEM32(edx) = ecx; /* 0x3803C579: mov dword ptr [edx], ecx */ 6764 ecx = MEM32(eax + 0x4); /* 0x3803C57B: mov ecx, dword ptr [eax + 4] */ 6765 MEM32(edx + 0x4) = ecx; /* 0x3803C57E: mov dword ptr [edx + 4], ecx */ 6766 eax = MEM32(eax + 0x8); /* 0x3803C581: mov eax, dword ptr [eax + 8] */ 6767 MEM32(edx + 0x8) = eax; /* 0x3803C584: mov dword ptr [edx + 8], eax */ 6768 goto L_3803C5B1; /* 0x3803C587: jmp 0x3803c5b1 */ 6769 L_3803C589: 6770 PUSH32(esp, esi); /* 0x3803C589: push esi */ 6771 PUSH32(esp, edi); /* 0x3803C58A: push edi */ 6772 ecx = ebp + (-0xC); /* 0x3803C58B: lea ecx, [ebp - 0xc] */ 6773 PUSH32(esp, ecx); /* 0x3803C58E: push ecx */ 6774 edx = ebp + (-0x30); /* 0x3803C58F: lea edx, [ebp - 0x30] */ 6775 PUSH32(esp, edx); /* 0x3803C592: push edx */ 6776 eax = ebp + (-0x18); /* 0x3803C593: lea eax, [ebp - 0x18] */ 6777 PUSH32(esp, eax); /* 0x3803C596: push eax */ 6778 PUSH32(esp, 0x3806F018u); /* 0x3803C597: push 0x3806f018 */ 6779 PUSH32(esp, 0x3806F028u); /* 0x3803C59C: push 0x3806f028 */ 6780 RECOMP_ICALL(0x3803C6B0u); /* 0x3803C5A1: call 0x3803c6b0 */ /* not lifted */ 6781 RECOMP_FLAGS_IN(); 6782 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu); 6783 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6784 esp = esp + 0x1Cu; /* 0x3803C5A6: add esp, 0x1c */ 6785 _flag_k = FK_ADD; 6786 /* test LO8(eax), LO8(eax) */ /* 0x3803C5A9: test al, al */ 6787 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 6788 _cf = 0; 6789 _flag_k = FK_NARROW(FK_TEST, 24); 6790 RECOMP_BACKEDGE(); 6791 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C2F7; /* 0x3803C5AB: je 0x3803c2f7 */ 6792 L_3803C5B1: 6793 ecx = esi; /* 0x3803C5B1: mov ecx, esi */ 6794 RECOMP_ICALL(MEM32(0x3804E4EC)); /* 0x3803C5B3: call dword ptr [0x3804e4ec] */ 6795 RECOMP_FLAGS_IN(); 6796 fp_push(_st[0]); /* 0x3803C5B9: fld st(0) */ 6797 _st[0] *= (double)*(float*)ADDR(esi); /* 0x3803C5BB: fmul dword ptr [esi] */ 6798 edi = POP32_VAL(esp); /* 0x3803C5BD: pop edi */ 6799 SET_LO8(eax, LO8(ebx)); /* 0x3803C5BE: mov al, bl */ 6800 { float _v = (float)fp_pop(); *(float*)ADDR(esi) = _v; } /* 0x3803C5C0: fstp dword ptr [esi] */ 6801 fp_push(_st[0]); /* 0x3803C5C2: fld st(0) */ 6802 _st[0] *= (double)*(float*)ADDR(esi + 0x4); /* 0x3803C5C4: fmul dword ptr [esi + 4] */ 6803 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x4) = _v; } /* 0x3803C5C7: fstp dword ptr [esi + 4] */ 6804 _st[0] *= (double)*(float*)ADDR(esi + 0x8); /* 0x3803C5CA: fmul dword ptr [esi + 8] */ 6805 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x8) = _v; } /* 0x3803C5CD: fstp dword ptr [esi + 8] */ 6806 esi = POP32_VAL(esp); /* 0x3803C5D0: pop esi */ 6807 ebx = POP32_VAL(esp); /* 0x3803C5D1: pop ebx */ 6808 esp = ebp; /* 0x3803C5D2: mov esp, ebp */ 6809 ebp = POP32_VAL(esp); /* 0x3803C5D4: pop ebp */ 6810 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3803C5D5: ret 0x10 */ 6811 L_3803C5D8: 6812 esi = MEM32(ebp + 0x14); /* 0x3803C5D8: mov esi, dword ptr [ebp + 0x14] */ 6813 edi = MEM32(ebp + 0x10); /* 0x3803C5DB: mov edi, dword ptr [ebp + 0x10] */ 6814 PUSH32(esp, esi); /* 0x3803C5DE: push esi */ 6815 PUSH32(esp, edi); /* 0x3803C5DF: push edi */ 6816 ecx = ebp + (-0x30); /* 0x3803C5E0: lea ecx, [ebp - 0x30] */ 6817 PUSH32(esp, ecx); /* 0x3803C5E3: push ecx */ 6818 edx = ebp + (-0x24); /* 0x3803C5E4: lea edx, [ebp - 0x24] */ 6819 PUSH32(esp, edx); /* 0x3803C5E7: push edx */ 6820 eax = ebp + (-0xC); /* 0x3803C5E8: lea eax, [ebp - 0xc] */ 6821 PUSH32(esp, eax); /* 0x3803C5EB: push eax */ 6822 PUSH32(esp, 0x3806F018u); /* 0x3803C5EC: push 0x3806f018 */ 6823 PUSH32(esp, 0x3806F028u); /* 0x3803C5F1: push 0x3806f028 */ 6824 RECOMP_ICALL(0x3803C6B0u); /* 0x3803C5F6: call 0x3803c6b0 */ /* not lifted */ 6825 RECOMP_FLAGS_IN(); 6826 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu); 6827 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6828 esp = esp + 0x1Cu; /* 0x3803C5FB: add esp, 0x1c */ 6829 _flag_k = FK_ADD; 6830 /* test LO8(eax), LO8(eax) */ /* 0x3803C5FE: test al, al */ 6831 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 6832 _cf = 0; 6833 _flag_k = FK_NARROW(FK_TEST, 24); 6834 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C641; /* 0x3803C600: je 0x3803c641 */ 6835 L_3803C602: 6836 fp_push(*(float*)&MEM32(esi + 0x8)); /* 0x3803C602: fld dword ptr [esi + 8] */ 6837 PUSH32(esp, ecx); /* 0x3803C605: push ecx */ 6838 fp_push(*(float*)&MEM32(esi + 0x4)); /* 0x3803C606: fld dword ptr [esi + 4] */ 6839 ecx = esi; /* 0x3803C609: mov ecx, esi */ 6840 fp_push(*(float*)&MEM32(esi)); /* 0x3803C60B: fld dword ptr [esi] */ 6841 fp_push(_st[2]); /* 0x3803C60D: fld st(2) */ 6842 { double _v = fp_pop(); _st[2] *= _v; } /* 0x3803C60F: fmulp st(3) */ 6843 fp_push(_st[1]); /* 0x3803C611: fld st(1) */ 6844 _st[0] *= _st[2]; /* 0x3803C613: fmul st(2) */ 6845 { double _v = fp_pop(); _st[2] += _v; } /* 0x3803C615: faddp st(3) */ 6846 fp_push(_st[0]); /* 0x3803C617: fld st(0) */ 6847 _st[0] *= _st[1]; /* 0x3803C619: fmul st(1) */ 6848 { double _v = fp_pop(); _st[2] += _v; } /* 0x3803C61B: faddp st(3) */ 6849 fp_xch(2); /* 0x3803C61D: fxch st(2) */ 6850 _st[0] = sqrt(_st[0]); /* 0x3803C61F: fsqrt */ 6851 fp_xch(2); /* 0x3803C621: fxch st(2) */ 6852 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803C623: fstp st(0) */ 6853 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803C625: fstp st(0) */ 6854 _st[0] = (double)*(float*)ADDR(0x3804E8CC) / _st[0]; /* 0x3803C627: fdivr dword ptr [0x3804e8cc] */ 6855 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x3803C62D: fstp dword ptr [esp] */ 6856 RECOMP_ICALL(MEM32(0x3804E4D4)); /* 0x3803C630: call dword ptr [0x3804e4d4] */ 6857 RECOMP_FLAGS_IN(); 6858 edi = POP32_VAL(esp); /* 0x3803C636: pop edi */ 6859 esi = POP32_VAL(esp); /* 0x3803C637: pop esi */ 6860 SET_LO8(eax, 1); /* 0x3803C638: mov al, 1 */ 6861 ebx = POP32_VAL(esp); /* 0x3803C63A: pop ebx */ 6862 esp = ebp; /* 0x3803C63B: mov esp, ebp */ 6863 ebp = POP32_VAL(esp); /* 0x3803C63D: pop ebp */ 6864 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3803C63E: ret 0x10 */ 6865 L_3803C641: 6866 PUSH32(esp, esi); /* 0x3803C641: push esi */ 6867 PUSH32(esp, edi); /* 0x3803C642: push edi */ 6868 ecx = ebp + (-0x30); /* 0x3803C643: lea ecx, [ebp - 0x30] */ 6869 PUSH32(esp, ecx); /* 0x3803C646: push ecx */ 6870 edx = ebp + (-0x18); /* 0x3803C647: lea edx, [ebp - 0x18] */ 6871 PUSH32(esp, edx); /* 0x3803C64A: push edx */ 6872 eax = ebp + (-0x24); /* 0x3803C64B: lea eax, [ebp - 0x24] */ 6873 PUSH32(esp, eax); /* 0x3803C64E: push eax */ 6874 PUSH32(esp, 0x3806F018u); /* 0x3803C64F: push 0x3806f018 */ 6875 PUSH32(esp, 0x3806F028u); /* 0x3803C654: push 0x3806f028 */ 6876 RECOMP_ICALL(0x3803C6B0u); /* 0x3803C659: call 0x3803c6b0 */ /* not lifted */ 6877 RECOMP_FLAGS_IN(); 6878 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu); 6879 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6880 esp = esp + 0x1Cu; /* 0x3803C65E: add esp, 0x1c */ 6881 _flag_k = FK_ADD; 6882 /* test LO8(eax), LO8(eax) */ /* 0x3803C661: test al, al */ 6883 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 6884 _cf = 0; 6885 _flag_k = FK_NARROW(FK_TEST, 24); 6886 RECOMP_BACKEDGE(); 6887 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C2F7; /* 0x3803C663: je 0x3803c2f7 */ 6888 L_3803C669: 6889 fp_push(*(float*)&MEM32(esi + 0x8)); /* 0x3803C669: fld dword ptr [esi + 8] */ 6890 edi = POP32_VAL(esp); /* 0x3803C66C: pop edi */ 6891 fp_push(*(float*)&MEM32(esi + 0x4)); /* 0x3803C66D: fld dword ptr [esi + 4] */ 6892 SET_LO8(eax, 1); /* 0x3803C670: mov al, 1 */ 6893 fp_push(*(float*)&MEM32(esi)); /* 0x3803C672: fld dword ptr [esi] */ 6894 fp_push(_st[2]); /* 0x3803C674: fld st(2) */ 6895 { double _v = fp_pop(); _st[2] *= _v; } /* 0x3803C676: fmulp st(3) */ 6896 fp_push(_st[1]); /* 0x3803C678: fld st(1) */ 6897 _st[0] *= _st[2]; /* 0x3803C67A: fmul st(2) */ 6898 { double _v = fp_pop(); _st[2] += _v; } /* 0x3803C67C: faddp st(3) */ 6899 fp_push(_st[0]); /* 0x3803C67E: fld st(0) */ 6900 _st[0] *= _st[1]; /* 0x3803C680: fmul st(1) */ 6901 { double _v = fp_pop(); _st[2] += _v; } /* 0x3803C682: faddp st(3) */ 6902 fp_xch(2); /* 0x3803C684: fxch st(2) */ 6903 _st[0] = sqrt(_st[0]); /* 0x3803C686: fsqrt */ 6904 fp_xch(2); /* 0x3803C688: fxch st(2) */ 6905 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803C68A: fstp st(0) */ 6906 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803C68C: fstp st(0) */ 6907 _st[0] = (double)*(float*)ADDR(0x3804E8CC) / _st[0]; /* 0x3803C68E: fdivr dword ptr [0x3804e8cc] */ 6908 fp_push(_st[0]); /* 0x3803C694: fld st(0) */ 6909 _st[0] *= (double)*(float*)ADDR(esi); /* 0x3803C696: fmul dword ptr [esi] */ 6910 { float _v = (float)fp_pop(); *(float*)ADDR(esi) = _v; } /* 0x3803C698: fstp dword ptr [esi] */ 6911 fp_push(_st[0]); /* 0x3803C69A: fld st(0) */ 6912 _st[0] *= (double)*(float*)ADDR(esi + 0x4); /* 0x3803C69C: fmul dword ptr [esi + 4] */ 6913 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x4) = _v; } /* 0x3803C69F: fstp dword ptr [esi + 4] */ 6914 _st[0] *= (double)*(float*)ADDR(esi + 0x8); /* 0x3803C6A2: fmul dword ptr [esi + 8] */ 6915 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x8) = _v; } /* 0x3803C6A5: fstp dword ptr [esi + 8] */ 6916 esi = POP32_VAL(esp); /* 0x3803C6A8: pop esi */ 6917 ebx = POP32_VAL(esp); /* 0x3803C6A9: pop ebx */ 6918 esp = ebp; /* 0x3803C6AA: mov esp, ebp */ 6919 ebp = POP32_VAL(esp); /* 0x3803C6AC: pop ebp */ 6920 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3803C6AD: ret 0x10 */ 6921 RECOMP_REGS_OUT(); 6922 } 6923 6924 void sub_3803C5B1(void) { 6925 int _fpu_cmp = 0; 6926 uint32_t _cf = 0; 6927 int _df = 1; 6928 uint32_t _flag_k = FK_NONE; 6929 uint32_t _flag_a = 0, _flag_b = 0; 6930 uint32_t _itail_tgt = 0; 6931 RECOMP_REGS_LOCALS 6932 RECOMP_ENTER(0x3803C5B1u); 6933 6934 L_3803C5B1: 6935 ecx = esi; /* 0x3803C5B1: mov ecx, esi */ 6936 RECOMP_ICALL(MEM32(0x3804E4EC)); /* 0x3803C5B3: call dword ptr [0x3804e4ec] */ 6937 RECOMP_FLAGS_IN(); 6938 fp_push(_st[0]); /* 0x3803C5B9: fld st(0) */ 6939 _st[0] *= (double)*(float*)ADDR(esi); /* 0x3803C5BB: fmul dword ptr [esi] */ 6940 edi = POP32_VAL(esp); /* 0x3803C5BD: pop edi */ 6941 SET_LO8(eax, LO8(ebx)); /* 0x3803C5BE: mov al, bl */ 6942 { float _v = (float)fp_pop(); *(float*)ADDR(esi) = _v; } /* 0x3803C5C0: fstp dword ptr [esi] */ 6943 fp_push(_st[0]); /* 0x3803C5C2: fld st(0) */ 6944 _st[0] *= (double)*(float*)ADDR(esi + 0x4); /* 0x3803C5C4: fmul dword ptr [esi + 4] */ 6945 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x4) = _v; } /* 0x3803C5C7: fstp dword ptr [esi + 4] */ 6946 _st[0] *= (double)*(float*)ADDR(esi + 0x8); /* 0x3803C5CA: fmul dword ptr [esi + 8] */ 6947 { float _v = (float)fp_pop(); *(float*)ADDR(esi + 0x8) = _v; } /* 0x3803C5CD: fstp dword ptr [esi + 8] */ 6948 esi = POP32_VAL(esp); /* 0x3803C5D0: pop esi */ 6949 ebx = POP32_VAL(esp); /* 0x3803C5D1: pop ebx */ 6950 esp = ebp; /* 0x3803C5D2: mov esp, ebp */ 6951 ebp = POP32_VAL(esp); /* 0x3803C5D4: pop ebp */ 6952 RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3803C5D5: ret 0x10 */ 6953 RECOMP_REGS_OUT(); 6954 } 6955 6956 void sub_3803C6B0(void) { 6957 int _fpu_cmp = 0; 6958 uint32_t _cf = 0; 6959 int _df = 1; 6960 uint32_t _flag_k = FK_NONE; 6961 uint32_t _flag_a = 0, _flag_b = 0; 6962 uint32_t _itail_tgt = 0; 6963 RECOMP_REGS_LOCALS 6964 RECOMP_ENTER(0x3803C6B0u); 6965 6966 L_3803C6B0: 6967 PUSH32(esp, ebp); /* 0x3803C6B0: push ebp */ 6968 ebp = esp; /* 0x3803C6B1: mov ebp, esp */ 6969 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x48u); 6970 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 6971 esp = esp - 0x48u; /* 0x3803C6B3: sub esp, 0x48 */ 6972 _flag_k = FK_CMP; 6973 SET_LO8(eax, MEM8(0x3806F26C)); /* 0x3803C6B6: mov al, byte ptr [0x3806f26c] */ 6974 /* test LO8(eax), 1 */ /* 0x3803C6BB: test al, 1 */ 6975 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 6976 _cf = 0; 6977 _flag_k = FK_NARROW(FK_TEST, 24); 6978 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C6F5; /* 0x3803C6BD: jne 0x3803c6f5 */ 6979 L_3803C6BF: 6980 SET_LO8(edx, LO8(eax)); /* 0x3803C6BF: mov dl, al */ 6981 _flag_a = (uint32_t)((LO8(edx) | 1)) << 24; _flag_b = (uint32_t)((LO8(edx) | 1)) << 24; 6982 SET_LO8(edx, LO8(edx) | 1); /* 0x3803C6C1: or dl, 1 */ 6983 _cf = 0; 6984 _flag_k = FK_NARROW(FK_TEST, 24); 6985 PUSH32(esp, 0x380018B0u); /* 0x3803C6C4: push 0x380018b0 */ 6986 MEM8(0x3806F26C) = (uint8_t)(LO8(edx)); /* 0x3803C6C9: mov byte ptr [0x3806f26c], dl */ 6987 MEM32(0x3806F270) = 0; /* 0x3803C6CF: mov dword ptr [0x3806f270], 0 */ 6988 MEM32(0x3806F274) = 0; /* 0x3803C6D9: mov dword ptr [0x3806f274], 0 */ 6989 MEM32(0x3806F278) = 0; /* 0x3803C6E3: mov dword ptr [0x3806f278], 0 */ 6990 RECOMP_ICALL(0x3804B54Cu); /* 0x3803C6ED: call 0x3804b54c */ /* not lifted */ 6991 RECOMP_FLAGS_IN(); 6992 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 6993 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 6994 esp = esp + 4; /* 0x3803C6F2: add esp, 4 */ 6995 _flag_k = FK_ADD; 6996 L_3803C6F5: 6997 SET_LO8(ecx, MEM8(0x3806F26C)); /* 0x3803C6F5: mov cl, byte ptr [0x3806f26c] */ 6998 SET_LO8(eax, 2); /* 0x3803C6FB: mov al, 2 */ 6999 /* test LO8(eax), LO8(ecx) */ /* 0x3803C6FD: test al, cl */ 7000 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24; 7001 _cf = 0; 7002 _flag_k = FK_NARROW(FK_TEST, 24); 7003 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803C736; /* 0x3803C6FF: jne 0x3803c736 */ 7004 L_3803C701: 7005 SET_LO8(edx, LO8(ecx)); /* 0x3803C701: mov dl, cl */ 7006 _flag_a = (uint32_t)((LO8(edx) | LO8(eax))) << 24; _flag_b = (uint32_t)((LO8(edx) | LO8(eax))) << 24; 7007 SET_LO8(edx, LO8(edx) | LO8(eax)); /* 0x3803C703: or dl, al */ 7008 _cf = 0; 7009 _flag_k = FK_NARROW(FK_TEST, 24); 7010 PUSH32(esp, 0x380018B0u); /* 0x3803C705: push 0x380018b0 */ 7011 MEM8(0x3806F26C) = (uint8_t)(LO8(edx)); /* 0x3803C70A: mov byte ptr [0x3806f26c], dl */ 7012 MEM32(0x3806F280) = 0; /* 0x3803C710: mov dword ptr [0x3806f280], 0 */ 7013 MEM32(0x3806F284) = 0; /* 0x3803C71A: mov dword ptr [0x3806f284], 0 */ 7014 MEM32(0x3806F288) = 0; /* 0x3803C724: mov dword ptr [0x3806f288], 0 */ 7015 RECOMP_ICALL(0x3804B54Cu); /* 0x3803C72E: call 0x3804b54c */ /* not lifted */ 7016 RECOMP_FLAGS_IN(); 7017 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 7018 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7019 esp = esp + 4; /* 0x3803C733: add esp, 4 */ 7020 _flag_k = FK_ADD; 7021 L_3803C736: 7022 eax = MEM32(ebp + 0x14); /* 0x3803C736: mov eax, dword ptr [ebp + 0x14] */ 7023 ecx = MEM32(eax); /* 0x3803C739: mov ecx, dword ptr [eax] */ 7024 edx = MEM32(eax + 0x4); /* 0x3803C73B: mov edx, dword ptr [eax + 4] */ 7025 eax = MEM32(eax + 0x8); /* 0x3803C73E: mov eax, dword ptr [eax + 8] */ 7026 PUSH32(esp, ebx); /* 0x3803C741: push ebx */ 7027 ebx = MEM32(ebp + 0x10); /* 0x3803C742: mov ebx, dword ptr [ebp + 0x10] */ 7028 PUSH32(esp, esi); /* 0x3803C745: push esi */ 7029 PUSH32(esp, edi); /* 0x3803C746: push edi */ 7030 MEM32(ebp + (-0x18)) = ecx; /* 0x3803C747: mov dword ptr [ebp - 0x18], ecx */ 7031 PUSH32(esp, ebx); /* 0x3803C74A: push ebx */ 7032 ecx = ebp + (-0x18); /* 0x3803C74B: lea ecx, [ebp - 0x18] */ 7033 MEM32(ebp + (-0x14)) = edx; /* 0x3803C74E: mov dword ptr [ebp - 0x14], edx */ 7034 MEM32(ebp + (-0x10)) = eax; /* 0x3803C751: mov dword ptr [ebp - 0x10], eax */ 7035 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803C754: call dword ptr [0x3804e4f4] */ 7036 RECOMP_FLAGS_IN(); 7037 ecx = MEM32(eax); /* 0x3803C75A: mov ecx, dword ptr [eax] */ 7038 MEM32(0x3806F270) = ecx; /* 0x3803C75C: mov dword ptr [0x3806f270], ecx */ 7039 edx = MEM32(eax + 0x4); /* 0x3803C762: mov edx, dword ptr [eax + 4] */ 7040 ecx = MEM32(ebp + 0x18); /* 0x3803C765: mov ecx, dword ptr [ebp + 0x18] */ 7041 MEM32(0x3806F274) = edx; /* 0x3803C768: mov dword ptr [0x3806f274], edx */ 7042 eax = MEM32(eax + 0x8); /* 0x3803C76E: mov eax, dword ptr [eax + 8] */ 7043 MEM32(0x3806F278) = eax; /* 0x3803C771: mov dword ptr [0x3806f278], eax */ 7044 edx = MEM32(ecx); /* 0x3803C776: mov edx, dword ptr [ecx] */ 7045 eax = MEM32(ecx + 0x4); /* 0x3803C778: mov eax, dword ptr [ecx + 4] */ 7046 ecx = MEM32(ecx + 0x8); /* 0x3803C77B: mov ecx, dword ptr [ecx + 8] */ 7047 MEM32(ebp + (-0x10)) = ecx; /* 0x3803C77E: mov dword ptr [ebp - 0x10], ecx */ 7048 PUSH32(esp, ebx); /* 0x3803C781: push ebx */ 7049 ecx = ebp + (-0x18); /* 0x3803C782: lea ecx, [ebp - 0x18] */ 7050 MEM32(ebp + (-0x18)) = edx; /* 0x3803C785: mov dword ptr [ebp - 0x18], edx */ 7051 MEM32(ebp + (-0x14)) = eax; /* 0x3803C788: mov dword ptr [ebp - 0x14], eax */ 7052 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803C78B: call dword ptr [0x3804e4f4] */ 7053 RECOMP_FLAGS_IN(); 7054 edx = MEM32(eax); /* 0x3803C791: mov edx, dword ptr [eax] */ 7055 MEM32(0x3806F280) = edx; /* 0x3803C793: mov dword ptr [0x3806f280], edx */ 7056 ecx = MEM32(eax + 0x4); /* 0x3803C799: mov ecx, dword ptr [eax + 4] */ 7057 MEM32(0x3806F284) = ecx; /* 0x3803C79C: mov dword ptr [0x3806f284], ecx */ 7058 edx = MEM32(eax + 0x8); /* 0x3803C7A2: mov edx, dword ptr [eax + 8] */ 7059 ecx = MEM32(0x3806F274); /* 0x3803C7A5: mov ecx, dword ptr [0x3806f274] */ 7060 eax = MEM32(0x3806F270); /* 0x3803C7AB: mov eax, dword ptr [0x3806f270] */ 7061 MEM32(0x3806F288) = edx; /* 0x3803C7B0: mov dword ptr [0x3806f288], edx */ 7062 edx = MEM32(0x3806F278); /* 0x3803C7B6: mov edx, dword ptr [0x3806f278] */ 7063 MEM32(ebp + (-0x14)) = ecx; /* 0x3803C7BC: mov dword ptr [ebp - 0x14], ecx */ 7064 PUSH32(esp, 0x3806F280u); /* 0x3803C7BF: push 0x3806f280 */ 7065 ecx = ebp + (-0x18); /* 0x3803C7C4: lea ecx, [ebp - 0x18] */ 7066 MEM32(ebp + (-0x18)) = eax; /* 0x3803C7C7: mov dword ptr [ebp - 0x18], eax */ 7067 MEM32(ebp + (-0x10)) = edx; /* 0x3803C7CA: mov dword ptr [ebp - 0x10], edx */ 7068 RECOMP_ICALL(MEM32(0x3804E4C8)); /* 0x3803C7CD: call dword ptr [0x3804e4c8] */ 7069 RECOMP_FLAGS_IN(); 7070 esi = MEM32(ebp + 0x20); /* 0x3803C7D3: mov esi, dword ptr [ebp + 0x20] */ 7071 edx = MEM32(eax); /* 0x3803C7D6: mov edx, dword ptr [eax] */ 7072 edi = MEM32(ebp + 0xC); /* 0x3803C7D8: mov edi, dword ptr [ebp + 0xc] */ 7073 ecx = esi; /* 0x3803C7DB: mov ecx, esi */ 7074 MEM32(ecx) = edx; /* 0x3803C7DD: mov dword ptr [ecx], edx */ 7075 edx = MEM32(eax + 0x4); /* 0x3803C7DF: mov edx, dword ptr [eax + 4] */ 7076 MEM32(ecx + 0x4) = edx; /* 0x3803C7E2: mov dword ptr [ecx + 4], edx */ 7077 eax = MEM32(eax + 0x8); /* 0x3803C7E5: mov eax, dword ptr [eax + 8] */ 7078 MEM32(ecx + 0x8) = eax; /* 0x3803C7E8: mov dword ptr [ecx + 8], eax */ 7079 fp_push(*(float*)&MEM32(edi + 0x4)); /* 0x3803C7EB: fld dword ptr [edi + 4] */ 7080 _st[0] *= (double)*(float*)ADDR(esi + 0x4); /* 0x3803C7EE: fmul dword ptr [esi + 4] */ 7081 fp_push(*(float*)&MEM32(edi + 0x8)); /* 0x3803C7F1: fld dword ptr [edi + 8] */ 7082 _st[0] *= (double)*(float*)ADDR(esi + 0x8); /* 0x3803C7F4: fmul dword ptr [esi + 8] */ 7083 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C7F7: faddp st(1) */ 7084 fp_push(*(float*)&MEM32(edi)); /* 0x3803C7F9: fld dword ptr [edi] */ 7085 _st[0] *= (double)*(float*)ADDR(esi); /* 0x3803C7FB: fmul dword ptr [esi] */ 7086 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C7FD: faddp st(1) */ 7087 { float _v = (float)_st[0]; *(float*)ADDR(ebp + 0x20) = _v; } /* 0x3803C7FF: fst dword ptr [ebp + 0x20] */ 7088 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803C802: fcomp dword ptr [0x3804e8e4] */ 7089 fp_pop(); 7090 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C808: fnstsw ax */ 7091 /* test HI8(eax), 0x41u */ /* 0x3803C80A: test ah, 0x41 */ 7092 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 7093 _cf = 0; 7094 _flag_k = FK_NARROW(FK_TEST, 24); 7095 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C818; /* 0x3803C80D: je 0x3803c818 */ 7096 L_3803C80F: 7097 edi = POP32_VAL(esp); /* 0x3803C80F: pop edi */ 7098 esi = POP32_VAL(esp); /* 0x3803C810: pop esi */ 7099 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 7100 SET_LO8(eax, 0); /* 0x3803C811: xor al, al */ 7101 _cf = 0; 7102 _flag_k = FK_NARROW(FK_TEST, 24); 7103 ebx = POP32_VAL(esp); /* 0x3803C813: pop ebx */ 7104 esp = ebp; /* 0x3803C814: mov esp, ebp */ 7105 ebp = POP32_VAL(esp); /* 0x3803C816: pop ebp */ 7106 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803C817: ret */ 7107 L_3803C818: 7108 ecx = MEM32(ebx); /* 0x3803C818: mov ecx, dword ptr [ebx] */ 7109 edx = MEM32(ebx + 0x4); /* 0x3803C81A: mov edx, dword ptr [ebx + 4] */ 7110 eax = MEM32(ebx + 0x8); /* 0x3803C81D: mov eax, dword ptr [ebx + 8] */ 7111 ebx = MEM32(ebp + 0x8); /* 0x3803C820: mov ebx, dword ptr [ebp + 8] */ 7112 MEM32(ebp + (-0x18)) = ecx; /* 0x3803C823: mov dword ptr [ebp - 0x18], ecx */ 7113 PUSH32(esp, ebx); /* 0x3803C826: push ebx */ 7114 ecx = ebp + (-0x18); /* 0x3803C827: lea ecx, [ebp - 0x18] */ 7115 MEM32(ebp + (-0x14)) = edx; /* 0x3803C82A: mov dword ptr [ebp - 0x14], edx */ 7116 MEM32(ebp + (-0x10)) = eax; /* 0x3803C82D: mov dword ptr [ebp - 0x10], eax */ 7117 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803C830: call dword ptr [0x3804e4f4] */ 7118 RECOMP_FLAGS_IN(); 7119 ecx = MEM32(eax); /* 0x3803C836: mov ecx, dword ptr [eax] */ 7120 edx = MEM32(eax + 0x4); /* 0x3803C838: mov edx, dword ptr [eax + 4] */ 7121 eax = MEM32(eax + 0x8); /* 0x3803C83B: mov eax, dword ptr [eax + 8] */ 7122 MEM32(ebp + (-0x4)) = eax; /* 0x3803C83E: mov dword ptr [ebp - 4], eax */ 7123 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x3803C841: fld dword ptr [ebp - 4] */ 7124 _st[0] *= (double)*(float*)ADDR(esi + 0x8); /* 0x3803C844: fmul dword ptr [esi + 8] */ 7125 MEM32(ebp + (-0x8)) = edx; /* 0x3803C847: mov dword ptr [ebp - 8], edx */ 7126 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x3803C84A: fld dword ptr [ebp - 8] */ 7127 MEM32(ebp + (-0xC)) = ecx; /* 0x3803C84D: mov dword ptr [ebp - 0xc], ecx */ 7128 _st[0] *= (double)*(float*)ADDR(esi + 0x4); /* 0x3803C850: fmul dword ptr [esi + 4] */ 7129 ecx = MEM32(edi); /* 0x3803C853: mov ecx, dword ptr [edi] */ 7130 edx = MEM32(edi + 0x4); /* 0x3803C855: mov edx, dword ptr [edi + 4] */ 7131 eax = MEM32(edi + 0x8); /* 0x3803C858: mov eax, dword ptr [edi + 8] */ 7132 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C85B: faddp st(1) */ 7133 MEM32(ebp + (-0x8)) = edx; /* 0x3803C85D: mov dword ptr [ebp - 8], edx */ 7134 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x3803C860: fld dword ptr [ebp - 0xc] */ 7135 MEM32(ebp + (-0xC)) = ecx; /* 0x3803C863: mov dword ptr [ebp - 0xc], ecx */ 7136 _st[0] *= (double)*(float*)ADDR(esi); /* 0x3803C866: fmul dword ptr [esi] */ 7137 MEM32(ebp + (-0x4)) = eax; /* 0x3803C868: mov dword ptr [ebp - 4], eax */ 7138 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C86B: faddp st(1) */ 7139 _st[0] /= (double)*(float*)ADDR(ebp + 0x20); /* 0x3803C86D: fdiv dword ptr [ebp + 0x20] */ 7140 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x3803C870: fld dword ptr [ebp - 0xc] */ 7141 _st[0] *= _st[1]; /* 0x3803C873: fmul st(1) */ 7142 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x3803C875: fstp dword ptr [ebp - 0xc] */ 7143 ecx = MEM32(ebp + (-0xC)); /* 0x3803C878: mov ecx, dword ptr [ebp - 0xc] */ 7144 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x3803C87B: fld dword ptr [ebp - 8] */ 7145 MEM32(ebp + (-0x18)) = ecx; /* 0x3803C87E: mov dword ptr [ebp - 0x18], ecx */ 7146 ecx = MEM32(ebx); /* 0x3803C881: mov ecx, dword ptr [ebx] */ 7147 _st[0] *= _st[1]; /* 0x3803C883: fmul st(1) */ 7148 MEM32(ebp + (-0xC)) = ecx; /* 0x3803C885: mov dword ptr [ebp - 0xc], ecx */ 7149 ecx = ebp + (-0x18); /* 0x3803C888: lea ecx, [ebp - 0x18] */ 7150 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x3803C88B: fstp dword ptr [ebp - 8] */ 7151 edx = MEM32(ebp + (-0x8)); /* 0x3803C88E: mov edx, dword ptr [ebp - 8] */ 7152 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x3803C891: fld dword ptr [ebp - 4] */ 7153 MEM32(ebp + (-0x14)) = edx; /* 0x3803C894: mov dword ptr [ebp - 0x14], edx */ 7154 edx = MEM32(ebx + 0x4); /* 0x3803C897: mov edx, dword ptr [ebx + 4] */ 7155 _st[0] *= _st[1]; /* 0x3803C89A: fmul st(1) */ 7156 PUSH32(esp, ecx); /* 0x3803C89C: push ecx */ 7157 ecx = ebp + (-0xC); /* 0x3803C89D: lea ecx, [ebp - 0xc] */ 7158 { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3803C8A0: fstp dword ptr [ebp - 4] */ 7159 eax = MEM32(ebp + (-0x4)); /* 0x3803C8A3: mov eax, dword ptr [ebp - 4] */ 7160 MEM32(ebp + (-0x10)) = eax; /* 0x3803C8A6: mov dword ptr [ebp - 0x10], eax */ 7161 eax = MEM32(ebx + 0x8); /* 0x3803C8A9: mov eax, dword ptr [ebx + 8] */ 7162 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803C8AC: fstp st(0) */ 7163 MEM32(ebp + (-0x8)) = edx; /* 0x3803C8AE: mov dword ptr [ebp - 8], edx */ 7164 MEM32(ebp + (-0x4)) = eax; /* 0x3803C8B1: mov dword ptr [ebp - 4], eax */ 7165 RECOMP_ICALL(MEM32(0x3804E4E8)); /* 0x3803C8B4: call dword ptr [0x3804e4e8] */ 7166 RECOMP_FLAGS_IN(); 7167 edi = MEM32(ebp + 0x1C); /* 0x3803C8BA: mov edi, dword ptr [ebp + 0x1c] */ 7168 edx = eax; /* 0x3803C8BD: mov edx, eax */ 7169 ebx = MEM32(edx); /* 0x3803C8BF: mov ebx, dword ptr [edx] */ 7170 ecx = edi; /* 0x3803C8C1: mov ecx, edi */ 7171 MEM32(ecx) = ebx; /* 0x3803C8C3: mov dword ptr [ecx], ebx */ 7172 ebx = MEM32(edx + 0x4); /* 0x3803C8C5: mov ebx, dword ptr [edx + 4] */ 7173 MEM32(ecx + 0x4) = ebx; /* 0x3803C8C8: mov dword ptr [ecx + 4], ebx */ 7174 edx = MEM32(edx + 0x8); /* 0x3803C8CB: mov edx, dword ptr [edx + 8] */ 7175 MEM32(ecx + 0x8) = edx; /* 0x3803C8CE: mov dword ptr [ecx + 8], edx */ 7176 ecx = MEM32(eax); /* 0x3803C8D1: mov ecx, dword ptr [eax] */ 7177 edx = MEM32(eax + 0x4); /* 0x3803C8D3: mov edx, dword ptr [eax + 4] */ 7178 eax = MEM32(eax + 0x8); /* 0x3803C8D6: mov eax, dword ptr [eax + 8] */ 7179 MEM32(ebp + (-0x24)) = ecx; /* 0x3803C8D9: mov dword ptr [ebp - 0x24], ecx */ 7180 ecx = MEM32(ebp + 0x10); /* 0x3803C8DC: mov ecx, dword ptr [ebp + 0x10] */ 7181 PUSH32(esp, ecx); /* 0x3803C8DF: push ecx */ 7182 ecx = ebp + (-0x24); /* 0x3803C8E0: lea ecx, [ebp - 0x24] */ 7183 MEM32(ebp + (-0x20)) = edx; /* 0x3803C8E3: mov dword ptr [ebp - 0x20], edx */ 7184 MEM32(ebp + (-0x1C)) = eax; /* 0x3803C8E6: mov dword ptr [ebp - 0x1c], eax */ 7185 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803C8E9: call dword ptr [0x3804e4f4] */ 7186 RECOMP_FLAGS_IN(); 7187 edx = MEM32(eax); /* 0x3803C8EF: mov edx, dword ptr [eax] */ 7188 MEM32(ebp + (-0x18)) = edx; /* 0x3803C8F1: mov dword ptr [ebp - 0x18], edx */ 7189 ecx = MEM32(eax + 0x4); /* 0x3803C8F4: mov ecx, dword ptr [eax + 4] */ 7190 MEM32(ebp + (-0x14)) = ecx; /* 0x3803C8F7: mov dword ptr [ebp - 0x14], ecx */ 7191 edx = MEM32(eax + 0x8); /* 0x3803C8FA: mov edx, dword ptr [eax + 8] */ 7192 eax = MEM32(0x3806F270); /* 0x3803C8FD: mov eax, dword ptr [0x3806f270] */ 7193 ecx = MEM32(0x3806F274); /* 0x3803C902: mov ecx, dword ptr [0x3806f274] */ 7194 MEM32(ebp + (-0x30)) = eax; /* 0x3803C908: mov dword ptr [ebp - 0x30], eax */ 7195 MEM32(ebp + (-0x10)) = edx; /* 0x3803C90B: mov dword ptr [ebp - 0x10], edx */ 7196 edx = MEM32(0x3806F278); /* 0x3803C90E: mov edx, dword ptr [0x3806f278] */ 7197 eax = ebp + (-0x18); /* 0x3803C914: lea eax, [ebp - 0x18] */ 7198 MEM32(ebp + (-0x2C)) = ecx; /* 0x3803C917: mov dword ptr [ebp - 0x2c], ecx */ 7199 PUSH32(esp, eax); /* 0x3803C91A: push eax */ 7200 ecx = ebp + (-0x30); /* 0x3803C91B: lea ecx, [ebp - 0x30] */ 7201 MEM32(ebp + (-0x28)) = edx; /* 0x3803C91E: mov dword ptr [ebp - 0x28], edx */ 7202 RECOMP_ICALL(MEM32(0x3804E4C8)); /* 0x3803C921: call dword ptr [0x3804e4c8] */ 7203 RECOMP_FLAGS_IN(); 7204 ecx = MEM32(eax); /* 0x3803C927: mov ecx, dword ptr [eax] */ 7205 edx = MEM32(eax + 0x4); /* 0x3803C929: mov edx, dword ptr [eax + 4] */ 7206 eax = MEM32(eax + 0x8); /* 0x3803C92C: mov eax, dword ptr [eax + 8] */ 7207 ebx = MEM32(ebp + 0x14); /* 0x3803C92F: mov ebx, dword ptr [ebp + 0x14] */ 7208 MEM32(ebp + (-0xC)) = ecx; /* 0x3803C932: mov dword ptr [ebp - 0xc], ecx */ 7209 MEM32(ebp + (-0x8)) = edx; /* 0x3803C935: mov dword ptr [ebp - 8], edx */ 7210 ecx = edi; /* 0x3803C938: mov ecx, edi */ 7211 edx = MEM32(ecx); /* 0x3803C93A: mov edx, dword ptr [ecx] */ 7212 MEM32(ebp + (-0x4)) = eax; /* 0x3803C93C: mov dword ptr [ebp - 4], eax */ 7213 eax = MEM32(ecx + 0x4); /* 0x3803C93F: mov eax, dword ptr [ecx + 4] */ 7214 ecx = MEM32(ecx + 0x8); /* 0x3803C942: mov ecx, dword ptr [ecx + 8] */ 7215 MEM32(ebp + (-0x28)) = ecx; /* 0x3803C945: mov dword ptr [ebp - 0x28], ecx */ 7216 PUSH32(esp, ebx); /* 0x3803C948: push ebx */ 7217 ecx = ebp + (-0x30); /* 0x3803C949: lea ecx, [ebp - 0x30] */ 7218 MEM32(ebp + (-0x30)) = edx; /* 0x3803C94C: mov dword ptr [ebp - 0x30], edx */ 7219 MEM32(ebp + (-0x2C)) = eax; /* 0x3803C94F: mov dword ptr [ebp - 0x2c], eax */ 7220 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803C952: call dword ptr [0x3804e4f4] */ 7221 RECOMP_FLAGS_IN(); 7222 edx = MEM32(eax); /* 0x3803C958: mov edx, dword ptr [eax] */ 7223 MEM32(ebp + (-0x3C)) = edx; /* 0x3803C95A: mov dword ptr [ebp - 0x3c], edx */ 7224 ecx = MEM32(eax + 0x4); /* 0x3803C95D: mov ecx, dword ptr [eax + 4] */ 7225 MEM32(ebp + (-0x38)) = ecx; /* 0x3803C960: mov dword ptr [ebp - 0x38], ecx */ 7226 edx = MEM32(eax + 0x8); /* 0x3803C963: mov edx, dword ptr [eax + 8] */ 7227 eax = MEM32(ebp + 0x18); /* 0x3803C966: mov eax, dword ptr [ebp + 0x18] */ 7228 ecx = MEM32(eax); /* 0x3803C969: mov ecx, dword ptr [eax] */ 7229 MEM32(ebp + (-0x34)) = edx; /* 0x3803C96B: mov dword ptr [ebp - 0x34], edx */ 7230 edx = MEM32(eax + 0x4); /* 0x3803C96E: mov edx, dword ptr [eax + 4] */ 7231 eax = MEM32(eax + 0x8); /* 0x3803C971: mov eax, dword ptr [eax + 8] */ 7232 MEM32(ebp + (-0x24)) = ecx; /* 0x3803C974: mov dword ptr [ebp - 0x24], ecx */ 7233 PUSH32(esp, ebx); /* 0x3803C977: push ebx */ 7234 ecx = ebp + (-0x24); /* 0x3803C978: lea ecx, [ebp - 0x24] */ 7235 MEM32(ebp + (-0x20)) = edx; /* 0x3803C97B: mov dword ptr [ebp - 0x20], edx */ 7236 MEM32(ebp + (-0x1C)) = eax; /* 0x3803C97E: mov dword ptr [ebp - 0x1c], eax */ 7237 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803C981: call dword ptr [0x3804e4f4] */ 7238 RECOMP_FLAGS_IN(); 7239 ecx = MEM32(eax); /* 0x3803C987: mov ecx, dword ptr [eax] */ 7240 edx = MEM32(eax + 0x4); /* 0x3803C989: mov edx, dword ptr [eax + 4] */ 7241 eax = MEM32(eax + 0x8); /* 0x3803C98C: mov eax, dword ptr [eax + 8] */ 7242 MEM32(ebp + (-0x48)) = ecx; /* 0x3803C98F: mov dword ptr [ebp - 0x48], ecx */ 7243 ecx = ebp + (-0x3C); /* 0x3803C992: lea ecx, [ebp - 0x3c] */ 7244 PUSH32(esp, ecx); /* 0x3803C995: push ecx */ 7245 ecx = ebp + (-0x48); /* 0x3803C996: lea ecx, [ebp - 0x48] */ 7246 MEM32(ebp + (-0x44)) = edx; /* 0x3803C999: mov dword ptr [ebp - 0x44], edx */ 7247 MEM32(ebp + (-0x40)) = eax; /* 0x3803C99C: mov dword ptr [ebp - 0x40], eax */ 7248 RECOMP_ICALL(MEM32(0x3804E4C8)); /* 0x3803C99F: call dword ptr [0x3804e4c8] */ 7249 RECOMP_FLAGS_IN(); 7250 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x3803C9A5: fld dword ptr [ebp - 4] */ 7251 edx = MEM32(eax); /* 0x3803C9A8: mov edx, dword ptr [eax] */ 7252 ecx = MEM32(eax + 0x4); /* 0x3803C9AA: mov ecx, dword ptr [eax + 4] */ 7253 MEM32(ebp + (-0x18)) = edx; /* 0x3803C9AD: mov dword ptr [ebp - 0x18], edx */ 7254 edx = MEM32(eax + 0x8); /* 0x3803C9B0: mov edx, dword ptr [eax + 8] */ 7255 MEM32(ebp + (-0x10)) = edx; /* 0x3803C9B3: mov dword ptr [ebp - 0x10], edx */ 7256 _st[0] *= (double)*(float*)ADDR(ebp + (-0x10)); /* 0x3803C9B6: fmul dword ptr [ebp - 0x10] */ 7257 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x3803C9B9: fld dword ptr [ebp - 8] */ 7258 MEM32(ebp + (-0x14)) = ecx; /* 0x3803C9BC: mov dword ptr [ebp - 0x14], ecx */ 7259 _st[0] *= (double)*(float*)ADDR(ebp + (-0x14)); /* 0x3803C9BF: fmul dword ptr [ebp - 0x14] */ 7260 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C9C2: faddp st(1) */ 7261 fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x3803C9C4: fld dword ptr [ebp - 0x18] */ 7262 _st[0] *= (double)*(float*)ADDR(ebp + (-0xC)); /* 0x3803C9C7: fmul dword ptr [ebp - 0xc] */ 7263 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803C9CA: faddp st(1) */ 7264 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804F7A4)); /* 0x3803C9CC: fcomp dword ptr [0x3804f7a4] */ 7265 fp_pop(); 7266 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803C9D2: fnstsw ax */ 7267 /* test HI8(eax), 1 */ /* 0x3803C9D4: test ah, 1 */ 7268 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 7269 _cf = 0; 7270 _flag_k = FK_NARROW(FK_TEST, 24); 7271 if (TEST_Z(_flag_a, _flag_b)) goto L_3803C9E2; /* 0x3803C9D7: je 0x3803c9e2 */ 7272 L_3803C9D9: 7273 edi = POP32_VAL(esp); /* 0x3803C9D9: pop edi */ 7274 esi = POP32_VAL(esp); /* 0x3803C9DA: pop esi */ 7275 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 7276 SET_LO8(eax, 0); /* 0x3803C9DB: xor al, al */ 7277 _cf = 0; 7278 _flag_k = FK_NARROW(FK_TEST, 24); 7279 ebx = POP32_VAL(esp); /* 0x3803C9DD: pop ebx */ 7280 esp = ebp; /* 0x3803C9DE: mov esp, ebp */ 7281 ebp = POP32_VAL(esp); /* 0x3803C9E0: pop ebp */ 7282 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803C9E1: ret */ 7283 L_3803C9E2: 7284 eax = MEM32(edi); /* 0x3803C9E2: mov eax, dword ptr [edi] */ 7285 ecx = MEM32(edi + 0x4); /* 0x3803C9E4: mov ecx, dword ptr [edi + 4] */ 7286 edx = MEM32(edi + 0x8); /* 0x3803C9E7: mov edx, dword ptr [edi + 8] */ 7287 MEM32(ebp + (-0x48)) = eax; /* 0x3803C9EA: mov dword ptr [ebp - 0x48], eax */ 7288 eax = MEM32(ebp + 0x18); /* 0x3803C9ED: mov eax, dword ptr [ebp + 0x18] */ 7289 MEM32(ebp + (-0x44)) = ecx; /* 0x3803C9F0: mov dword ptr [ebp - 0x44], ecx */ 7290 PUSH32(esp, eax); /* 0x3803C9F3: push eax */ 7291 ecx = ebp + (-0x48); /* 0x3803C9F4: lea ecx, [ebp - 0x48] */ 7292 MEM32(ebp + (-0x40)) = edx; /* 0x3803C9F7: mov dword ptr [ebp - 0x40], edx */ 7293 RECOMP_ICALL(MEM32(0x3804E4F4)); /* 0x3803C9FA: call dword ptr [0x3804e4f4] */ 7294 RECOMP_FLAGS_IN(); 7295 ecx = MEM32(eax); /* 0x3803CA00: mov ecx, dword ptr [eax] */ 7296 edx = MEM32(eax + 0x4); /* 0x3803CA02: mov edx, dword ptr [eax + 4] */ 7297 eax = MEM32(eax + 0x8); /* 0x3803CA05: mov eax, dword ptr [eax + 8] */ 7298 MEM32(ebp + (-0x3C)) = ecx; /* 0x3803CA08: mov dword ptr [ebp - 0x3c], ecx */ 7299 PUSH32(esp, 0x3806F280u); /* 0x3803CA0B: push 0x3806f280 */ 7300 ecx = ebp + (-0x3C); /* 0x3803CA10: lea ecx, [ebp - 0x3c] */ 7301 MEM32(ebp + (-0x38)) = edx; /* 0x3803CA13: mov dword ptr [ebp - 0x38], edx */ 7302 MEM32(ebp + (-0x34)) = eax; /* 0x3803CA16: mov dword ptr [ebp - 0x34], eax */ 7303 RECOMP_ICALL(MEM32(0x3804E4C8)); /* 0x3803CA19: call dword ptr [0x3804e4c8] */ 7304 RECOMP_FLAGS_IN(); 7305 fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x3803CA1F: fld dword ptr [ebp - 4] */ 7306 ecx = MEM32(eax); /* 0x3803CA22: mov ecx, dword ptr [eax] */ 7307 edx = MEM32(eax + 0x4); /* 0x3803CA24: mov edx, dword ptr [eax + 4] */ 7308 eax = MEM32(eax + 0x8); /* 0x3803CA27: mov eax, dword ptr [eax + 8] */ 7309 MEM32(ebp + (-0x10)) = eax; /* 0x3803CA2A: mov dword ptr [ebp - 0x10], eax */ 7310 _st[0] *= (double)*(float*)ADDR(ebp + (-0x10)); /* 0x3803CA2D: fmul dword ptr [ebp - 0x10] */ 7311 fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x3803CA30: fld dword ptr [ebp - 8] */ 7312 MEM32(ebp + (-0x14)) = edx; /* 0x3803CA33: mov dword ptr [ebp - 0x14], edx */ 7313 _st[0] *= (double)*(float*)ADDR(ebp + (-0x14)); /* 0x3803CA36: fmul dword ptr [ebp - 0x14] */ 7314 MEM32(ebp + (-0x18)) = ecx; /* 0x3803CA39: mov dword ptr [ebp - 0x18], ecx */ 7315 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803CA3C: faddp st(1) */ 7316 fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x3803CA3E: fld dword ptr [ebp - 0xc] */ 7317 _st[0] *= (double)*(float*)ADDR(ebp + (-0x18)); /* 0x3803CA41: fmul dword ptr [ebp - 0x18] */ 7318 { double _v = fp_pop(); _st[0] += _v; } /* 0x3803CA44: faddp st(1) */ 7319 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804F7A4)); /* 0x3803CA46: fcomp dword ptr [0x3804f7a4] */ 7320 fp_pop(); 7321 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803CA4C: fnstsw ax */ 7322 /* test HI8(eax), 1 */ /* 0x3803CA4E: test ah, 1 */ 7323 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 7324 _cf = 0; 7325 _flag_k = FK_NARROW(FK_TEST, 24); 7326 if (TEST_Z(_flag_a, _flag_b)) goto L_3803CA5C; /* 0x3803CA51: je 0x3803ca5c */ 7327 L_3803CA53: 7328 edi = POP32_VAL(esp); /* 0x3803CA53: pop edi */ 7329 esi = POP32_VAL(esp); /* 0x3803CA54: pop esi */ 7330 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 7331 SET_LO8(eax, 0); /* 0x3803CA55: xor al, al */ 7332 _cf = 0; 7333 _flag_k = FK_NARROW(FK_TEST, 24); 7334 ebx = POP32_VAL(esp); /* 0x3803CA57: pop ebx */ 7335 esp = ebp; /* 0x3803CA58: mov esp, ebp */ 7336 ebp = POP32_VAL(esp); /* 0x3803CA5A: pop ebp */ 7337 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CA5B: ret */ 7338 L_3803CA5C: 7339 fp_push(*(float*)&MEM32(esi + 0x8)); /* 0x3803CA5C: fld dword ptr [esi + 8] */ 7340 PUSH32(esp, ecx); /* 0x3803CA5F: push ecx */ 7341 _st[0] = -_st[0]; /* 0x3803CA60: fchs */ 7342 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x3803CA62: fstp dword ptr [esp] */ 7343 PUSH32(esp, ecx); /* 0x3803CA65: push ecx */ 7344 fp_push(*(float*)&MEM32(esi + 0x4)); /* 0x3803CA66: fld dword ptr [esi + 4] */ 7345 _st[0] = -_st[0]; /* 0x3803CA69: fchs */ 7346 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x3803CA6B: fstp dword ptr [esp] */ 7347 PUSH32(esp, ecx); /* 0x3803CA6E: push ecx */ 7348 fp_push(*(float*)&MEM32(esi)); /* 0x3803CA6F: fld dword ptr [esi] */ 7349 ecx = ebp + (-0x48); /* 0x3803CA71: lea ecx, [ebp - 0x48] */ 7350 _st[0] = -_st[0]; /* 0x3803CA74: fchs */ 7351 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x3803CA76: fstp dword ptr [esp] */ 7352 RECOMP_ICALL(MEM32(0x3804E4D8)); /* 0x3803CA79: call dword ptr [0x3804e4d8] */ 7353 RECOMP_FLAGS_IN(); 7354 ecx = MEM32(eax); /* 0x3803CA7F: mov ecx, dword ptr [eax] */ 7355 MEM32(esi) = ecx; /* 0x3803CA81: mov dword ptr [esi], ecx */ 7356 edx = MEM32(eax + 0x4); /* 0x3803CA83: mov edx, dword ptr [eax + 4] */ 7357 MEM32(esi + 0x4) = edx; /* 0x3803CA86: mov dword ptr [esi + 4], edx */ 7358 eax = MEM32(eax + 0x8); /* 0x3803CA89: mov eax, dword ptr [eax + 8] */ 7359 edi = POP32_VAL(esp); /* 0x3803CA8C: pop edi */ 7360 MEM32(esi + 0x8) = eax; /* 0x3803CA8D: mov dword ptr [esi + 8], eax */ 7361 esi = POP32_VAL(esp); /* 0x3803CA90: pop esi */ 7362 SET_LO8(eax, 1); /* 0x3803CA91: mov al, 1 */ 7363 ebx = POP32_VAL(esp); /* 0x3803CA93: pop ebx */ 7364 esp = ebp; /* 0x3803CA94: mov esp, ebp */ 7365 ebp = POP32_VAL(esp); /* 0x3803CA96: pop ebp */ 7366 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CA97: ret */ 7367 RECOMP_REGS_OUT(); 7368 } 7369 7370 void sub_3803CAA0(void) { 7371 int _fpu_cmp = 0; 7372 uint32_t _cf = 0; 7373 int _df = 1; 7374 uint32_t _flag_k = FK_NONE; 7375 uint32_t _flag_a = 0, _flag_b = 0; 7376 uint32_t _itail_tgt = 0; 7377 RECOMP_REGS_LOCALS 7378 RECOMP_ENTER(0x3803CAA0u); 7379 7380 L_3803CAA0: 7381 PUSH32(esp, ebp); /* 0x3803CAA0: push ebp */ 7382 ebp = esp; /* 0x3803CAA1: mov ebp, esp */ 7383 PUSH32(esp, esi); /* 0x3803CAA3: push esi */ 7384 esi = ecx; /* 0x3803CAA4: mov esi, ecx */ 7385 ecx = MEM32(esi + 0x4); /* 0x3803CAA6: mov ecx, dword ptr [esi + 4] */ 7386 /* test ecx, ecx */ /* 0x3803CAA9: test ecx, ecx */ 7387 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx); 7388 _cf = 0; 7389 _flag_k = FK_TEST; 7390 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803CAB4; /* 0x3803CAAB: jne 0x3803cab4 */ 7391 L_3803CAAD: 7392 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 7393 SET_LO8(eax, 0); /* 0x3803CAAD: xor al, al */ 7394 _cf = 0; 7395 _flag_k = FK_NARROW(FK_TEST, 24); 7396 esi = POP32_VAL(esp); /* 0x3803CAAF: pop esi */ 7397 ebp = POP32_VAL(esp); /* 0x3803CAB0: pop ebp */ 7398 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x3803CAB1: ret 0x14 */ 7399 L_3803CAB4: 7400 RECOMP_ICALL(0x38039DD0u); /* 0x3803CAB4: call 0x38039dd0 */ /* not lifted */ 7401 RECOMP_FLAGS_IN(); 7402 /* test LO8(eax), LO8(eax) */ /* 0x3803CAB9: test al, al */ 7403 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 7404 _cf = 0; 7405 _flag_k = FK_NARROW(FK_TEST, 24); 7406 if (TEST_Z(_flag_a, _flag_b)) goto L_3803CAC4; /* 0x3803CABB: je 0x3803cac4 */ 7407 L_3803CABD: 7408 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 7409 SET_LO8(eax, 0); /* 0x3803CABD: xor al, al */ 7410 _cf = 0; 7411 _flag_k = FK_NARROW(FK_TEST, 24); 7412 esi = POP32_VAL(esp); /* 0x3803CABF: pop esi */ 7413 ebp = POP32_VAL(esp); /* 0x3803CAC0: pop ebp */ 7414 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x3803CAC1: ret 0x14 */ 7415 L_3803CAC4: 7416 edx = MEM32(ebp + 0x18); /* 0x3803CAC4: mov edx, dword ptr [ebp + 0x18] */ 7417 ecx = MEM32(esi + 0xC); /* 0x3803CAC7: mov ecx, dword ptr [esi + 0xc] */ 7418 eax = MEM32(ecx); /* 0x3803CACA: mov eax, dword ptr [ecx] */ 7419 PUSH32(esp, edx); /* 0x3803CACC: push edx */ 7420 edx = MEM32(ebp + 0x14); /* 0x3803CACD: mov edx, dword ptr [ebp + 0x14] */ 7421 PUSH32(esp, edx); /* 0x3803CAD0: push edx */ 7422 edx = MEM32(ebp + 0x10); /* 0x3803CAD1: mov edx, dword ptr [ebp + 0x10] */ 7423 PUSH32(esp, edx); /* 0x3803CAD4: push edx */ 7424 edx = MEM32(ebp + 0xC); /* 0x3803CAD5: mov edx, dword ptr [ebp + 0xc] */ 7425 PUSH32(esp, edx); /* 0x3803CAD8: push edx */ 7426 edx = MEM32(ebp + 0x8); /* 0x3803CAD9: mov edx, dword ptr [ebp + 8] */ 7427 PUSH32(esp, edx); /* 0x3803CADC: push edx */ 7428 RECOMP_ICALL(MEM32(eax + 0x18)); /* 0x3803CADD: call dword ptr [eax + 0x18] */ 7429 RECOMP_FLAGS_IN(); 7430 /* test LO8(eax), LO8(eax) */ /* 0x3803CAE0: test al, al */ 7431 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 7432 _cf = 0; 7433 _flag_k = FK_NARROW(FK_TEST, 24); 7434 SET_LO8(eax, (TEST_NZ(_flag_a, _flag_b)) ? 1 : 0); /* 0x3803CAE2: setne al */ 7435 esi = POP32_VAL(esp); /* 0x3803CAE5: pop esi */ 7436 ebp = POP32_VAL(esp); /* 0x3803CAE6: pop ebp */ 7437 RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x3803CAE7: ret 0x14 */ 7438 RECOMP_REGS_OUT(); 7439 } 7440 7441 void sub_3803CAF0(void) { 7442 int _fpu_cmp = 0; 7443 uint32_t _cf = 0; 7444 int _df = 1; 7445 uint32_t _flag_k = FK_NONE; 7446 uint32_t _flag_a = 0, _flag_b = 0; 7447 uint32_t _itail_tgt = 0; 7448 RECOMP_REGS_LOCALS 7449 RECOMP_ENTER(0x3803CAF0u); 7450 7451 L_3803CAF0: 7452 SET_LO8(eax, 1); /* 0x3803CAF0: mov al, 1 */ 7453 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x3803CAF2: ret 0xc */ 7454 RECOMP_REGS_OUT(); 7455 } 7456 7457 void sub_3803CB00(void) { 7458 int _fpu_cmp = 0; 7459 uint32_t _cf = 0; 7460 int _df = 1; 7461 uint32_t _flag_k = FK_NONE; 7462 uint32_t _flag_a = 0, _flag_b = 0; 7463 uint32_t _itail_tgt = 0; 7464 RECOMP_REGS_LOCALS 7465 RECOMP_ENTER(0x3803CB00u); 7466 7467 L_3803CB00: 7468 PUSH32(esp, ebp); /* 0x3803CB00: push ebp */ 7469 ebp = esp; /* 0x3803CB01: mov ebp, esp */ 7470 edx = MEM32(ebp + 0xC); /* 0x3803CB03: mov edx, dword ptr [ebp + 0xc] */ 7471 ecx = MEM32(ecx + 0xC); /* 0x3803CB06: mov ecx, dword ptr [ecx + 0xc] */ 7472 eax = MEM32(ecx); /* 0x3803CB09: mov eax, dword ptr [ecx] */ 7473 PUSH32(esp, edx); /* 0x3803CB0B: push edx */ 7474 edx = MEM32(ebp + 0x8); /* 0x3803CB0C: mov edx, dword ptr [ebp + 8] */ 7475 PUSH32(esp, edx); /* 0x3803CB0F: push edx */ 7476 RECOMP_ICALL(MEM32(eax + 0x1C)); /* 0x3803CB10: call dword ptr [eax + 0x1c] */ 7477 RECOMP_FLAGS_IN(); 7478 ebp = POP32_VAL(esp); /* 0x3803CB13: pop ebp */ 7479 RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3803CB14: ret 8 */ 7480 RECOMP_REGS_OUT(); 7481 } 7482 7483 void sub_3803CB20(void) { 7484 int _fpu_cmp = 0; 7485 uint32_t _cf = 0; 7486 int _df = 1; 7487 uint32_t _flag_k = FK_NONE; 7488 uint32_t _flag_a = 0, _flag_b = 0; 7489 uint32_t _itail_tgt = 0; 7490 RECOMP_REGS_LOCALS 7491 RECOMP_ENTER(0x3803CB20u); 7492 7493 L_3803CB20: 7494 PUSH32(esp, ebp); /* 0x3803CB20: push ebp */ 7495 ebp = esp; /* 0x3803CB21: mov ebp, esp */ 7496 PUSH32(esp, ebx); /* 0x3803CB23: push ebx */ 7497 ebx = MEM32(ebp + 0x8); /* 0x3803CB24: mov ebx, dword ptr [ebp + 8] */ 7498 fp_push(*(float*)&MEM32(ebx)); /* 0x3803CB27: fld dword ptr [ebx] */ 7499 PUSH32(esp, esi); /* 0x3803CB29: push esi */ 7500 esi = MEM32(ecx + 0xC); /* 0x3803CB2A: mov esi, dword ptr [ecx + 0xc] */ 7501 _st[0] /= (double)*(float*)ADDR(esi + 0x24); /* 0x3803CB2D: fdiv dword ptr [esi + 0x24] */ 7502 PUSH32(esp, edi); /* 0x3803CB30: push edi */ 7503 RECOMP_ICALL(0x3804B688u); /* 0x3803CB31: call 0x3804b688 */ /* not lifted */ 7504 RECOMP_FLAGS_IN(); 7505 fp_push(*(float*)&MEM32(ebx + 0x8)); /* 0x3803CB36: fld dword ptr [ebx + 8] */ 7506 _st[0] /= (double)*(float*)ADDR(esi + 0x28); /* 0x3803CB39: fdiv dword ptr [esi + 0x28] */ 7507 edi = eax; /* 0x3803CB3C: mov edi, eax */ 7508 RECOMP_ICALL(0x3804B688u); /* 0x3803CB3E: call 0x3804b688 */ /* not lifted */ 7509 RECOMP_FLAGS_IN(); 7510 /* test edi, edi */ /* 0x3803CB43: test edi, edi */ 7511 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 7512 _cf = 0; 7513 _flag_k = FK_TEST; 7514 if (TEST_S(_flag_a, _flag_b)) goto L_3803CB65; /* 0x3803CB45: jl 0x3803cb65 */ 7515 L_3803CB47: 7516 ecx = MEM32(esi + 0x14); /* 0x3803CB47: mov ecx, dword ptr [esi + 0x14] */ 7517 /* cmp edi, ecx */ /* 0x3803CB4A: cmp edi, ecx */ 7518 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx); 7519 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7520 _flag_k = FK_CMP; 7521 if (CMP_GE(_flag_a, _flag_b)) goto L_3803CB65; /* 0x3803CB4C: jge 0x3803cb65 */ 7522 L_3803CB4E: 7523 /* test eax, eax */ /* 0x3803CB4E: test eax, eax */ 7524 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7525 _cf = 0; 7526 _flag_k = FK_TEST; 7527 if (TEST_S(_flag_a, _flag_b)) goto L_3803CB65; /* 0x3803CB50: jl 0x3803cb65 */ 7528 L_3803CB52: 7529 /* cmp eax, MEM32(esi + 0x18) */ /* 0x3803CB52: cmp eax, dword ptr [esi + 0x18] */ 7530 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(esi + 0x18)); 7531 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 7532 _flag_k = FK_CMP; 7533 if (CMP_GE(_flag_a, _flag_b)) goto L_3803CB65; /* 0x3803CB55: jge 0x3803cb65 */ 7534 L_3803CB57: 7535 ecx = (uint32_t)((int32_t)ecx * (int32_t)eax); /* 0x3803CB57: imul ecx, eax */ 7536 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 7537 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 7538 ecx = ecx + edi; /* 0x3803CB5A: add ecx, edi */ 7539 _flag_k = FK_ADD; 7540 edi = POP32_VAL(esp); /* 0x3803CB5C: pop edi */ 7541 esi = POP32_VAL(esp); /* 0x3803CB5D: pop esi */ 7542 eax = ecx; /* 0x3803CB5E: mov eax, ecx */ 7543 ebx = POP32_VAL(esp); /* 0x3803CB60: pop ebx */ 7544 ebp = POP32_VAL(esp); /* 0x3803CB61: pop ebp */ 7545 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803CB62: ret 4 */ 7546 L_3803CB65: 7547 edi = POP32_VAL(esp); /* 0x3803CB65: pop edi */ 7548 esi = POP32_VAL(esp); /* 0x3803CB66: pop esi */ 7549 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 7550 eax = eax | 0xFFFFFFFFu; /* 0x3803CB67: or eax, 0xffffffff */ 7551 _cf = 0; 7552 _flag_k = FK_TEST; 7553 ebx = POP32_VAL(esp); /* 0x3803CB6A: pop ebx */ 7554 ebp = POP32_VAL(esp); /* 0x3803CB6B: pop ebp */ 7555 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803CB6C: ret 4 */ 7556 RECOMP_REGS_OUT(); 7557 } 7558 7559 void sub_3803CB70(void) { 7560 int _fpu_cmp = 0; 7561 uint32_t _cf = 0; 7562 int _df = 1; 7563 uint32_t _flag_k = FK_NONE; 7564 uint32_t _flag_a = 0, _flag_b = 0; 7565 uint32_t _itail_tgt = 0; 7566 RECOMP_REGS_LOCALS 7567 RECOMP_ENTER(0x3803CB70u); 7568 7569 L_3803CB70: 7570 PUSH32(esp, ebp); /* 0x3803CB70: push ebp */ 7571 ebp = esp; /* 0x3803CB71: mov ebp, esp */ 7572 edx = MEM32(ebp + 0x8); /* 0x3803CB73: mov edx, dword ptr [ebp + 8] */ 7573 fp_push(*(float*)&MEM32(edx)); /* 0x3803CB76: fld dword ptr [edx] */ 7574 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803CB78: fcomp dword ptr [0x3804e8e4] */ 7575 fp_pop(); 7576 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803CB7E: fnstsw ax */ 7577 /* test HI8(eax), 1 */ /* 0x3803CB80: test ah, 1 */ 7578 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 7579 _cf = 0; 7580 _flag_k = FK_NARROW(FK_TEST, 24); 7581 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803CBD4; /* 0x3803CB83: jne 0x3803cbd4 */ 7582 L_3803CB85: 7583 fp_push(*(float*)&MEM32(edx)); /* 0x3803CB85: fld dword ptr [edx] */ 7584 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ecx + 0x10)); /* 0x3803CB87: fcomp dword ptr [ecx + 0x10] */ 7585 fp_pop(); 7586 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803CB8A: fnstsw ax */ 7587 /* test HI8(eax), 1 */ /* 0x3803CB8C: test ah, 1 */ 7588 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 7589 _cf = 0; 7590 _flag_k = FK_NARROW(FK_TEST, 24); 7591 if (TEST_Z(_flag_a, _flag_b)) goto L_3803CBD4; /* 0x3803CB8F: je 0x3803cbd4 */ 7592 L_3803CB91: 7593 fp_push(*(float*)&MEM32(edx + 0x8)); /* 0x3803CB91: fld dword ptr [edx + 8] */ 7594 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804E8E4)); /* 0x3803CB94: fcomp dword ptr [0x3804e8e4] */ 7595 fp_pop(); 7596 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803CB9A: fnstsw ax */ 7597 /* test HI8(eax), 1 */ /* 0x3803CB9C: test ah, 1 */ 7598 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 7599 _cf = 0; 7600 _flag_k = FK_NARROW(FK_TEST, 24); 7601 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803CBD4; /* 0x3803CB9F: jne 0x3803cbd4 */ 7602 L_3803CBA1: 7603 fp_push(*(float*)&MEM32(edx + 0x8)); /* 0x3803CBA1: fld dword ptr [edx + 8] */ 7604 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ecx + 0x14)); /* 0x3803CBA4: fcomp dword ptr [ecx + 0x14] */ 7605 fp_pop(); 7606 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803CBA7: fnstsw ax */ 7607 /* test HI8(eax), 1 */ /* 0x3803CBA9: test ah, 1 */ 7608 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 7609 _cf = 0; 7610 _flag_k = FK_NARROW(FK_TEST, 24); 7611 if (TEST_Z(_flag_a, _flag_b)) goto L_3803CBD4; /* 0x3803CBAC: je 0x3803cbd4 */ 7612 L_3803CBAE: 7613 fp_push(*(float*)&MEM32(edx + 0x4)); /* 0x3803CBAE: fld dword ptr [edx + 4] */ 7614 _fpu_cmp = FPU_CMP(_st[0], *(double*)ADDR(0x3804E928)); /* 0x3803CBB1: fcomp qword ptr [0x3804e928] */ 7615 fp_pop(); 7616 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803CBB7: fnstsw ax */ 7617 /* test HI8(eax), 1 */ /* 0x3803CBB9: test ah, 1 */ 7618 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 7619 _cf = 0; 7620 _flag_k = FK_NARROW(FK_TEST, 24); 7621 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803CBD4; /* 0x3803CBBC: jne 0x3803cbd4 */ 7622 L_3803CBBE: 7623 fp_push(*(float*)&MEM32(edx + 0x4)); /* 0x3803CBBE: fld dword ptr [edx + 4] */ 7624 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804F7A8)); /* 0x3803CBC1: fcomp dword ptr [0x3804f7a8] */ 7625 fp_pop(); 7626 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803CBC7: fnstsw ax */ 7627 /* test HI8(eax), 1 */ /* 0x3803CBC9: test ah, 1 */ 7628 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 7629 _cf = 0; 7630 _flag_k = FK_NARROW(FK_TEST, 24); 7631 if (TEST_Z(_flag_a, _flag_b)) goto L_3803CBD4; /* 0x3803CBCC: je 0x3803cbd4 */ 7632 L_3803CBCE: 7633 _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24; 7634 SET_LO8(eax, 0); /* 0x3803CBCE: xor al, al */ 7635 _cf = 0; 7636 _flag_k = FK_NARROW(FK_TEST, 24); 7637 ebp = POP32_VAL(esp); /* 0x3803CBD0: pop ebp */ 7638 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x3803CBD1: ret 0xc */ 7639 L_3803CBD4: 7640 eax = MEM32(ebp + 0x10); /* 0x3803CBD4: mov eax, dword ptr [ebp + 0x10] */ 7641 /* test eax, eax */ /* 0x3803CBD7: test eax, eax */ 7642 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 7643 _cf = 0; 7644 _flag_k = FK_TEST; 7645 if (TEST_Z(_flag_a, _flag_b)) goto L_3803CBF1; /* 0x3803CBD9: je 0x3803cbf1 */ 7646 L_3803CBDB: 7647 PUSH32(esp, esi); /* 0x3803CBDB: push esi */ 7648 PUSH32(esp, edi); /* 0x3803CBDC: push edi */ 7649 edi = MEM32(eax); /* 0x3803CBDD: mov edi, dword ptr [eax] */ 7650 esi = edx; /* 0x3803CBDF: mov esi, edx */ 7651 MEM32(esi) = edi; /* 0x3803CBE1: mov dword ptr [esi], edi */ 7652 edi = MEM32(eax + 0x4); /* 0x3803CBE3: mov edi, dword ptr [eax + 4] */ 7653 MEM32(esi + 0x4) = edi; /* 0x3803CBE6: mov dword ptr [esi + 4], edi */ 7654 eax = MEM32(eax + 0x8); /* 0x3803CBE9: mov eax, dword ptr [eax + 8] */ 7655 edi = POP32_VAL(esp); /* 0x3803CBEC: pop edi */ 7656 MEM32(esi + 0x8) = eax; /* 0x3803CBED: mov dword ptr [esi + 8], eax */ 7657 esi = POP32_VAL(esp); /* 0x3803CBF0: pop esi */ 7658 L_3803CBF1: 7659 eax = MEM32(edx); /* 0x3803CBF1: mov eax, dword ptr [edx] */ 7660 fp_push(*(float*)&MEM32(ecx + 0x10)); /* 0x3803CBF3: fld dword ptr [ecx + 0x10] */ 7661 _st[0] -= (double)*(float*)ADDR(0x3804EA94); /* 0x3803CBF6: fsub dword ptr [0x3804ea94] */ 7662 MEM32(ebp + 0x8) = eax; /* 0x3803CBFC: mov dword ptr [ebp + 8], eax */ 7663 fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x3803CBFF: fld dword ptr [ebp + 8] */ 7664 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804EA94)); /* 0x3803CC02: fcomp dword ptr [0x3804ea94] */ 7665 fp_pop(); 7666 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803CC08: fnstsw ax */ 7667 /* test HI8(eax), 0x41u */ /* 0x3803CC0A: test ah, 0x41 */ 7668 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 7669 _cf = 0; 7670 _flag_k = FK_NARROW(FK_TEST, 24); 7671 if (TEST_Z(_flag_a, _flag_b)) goto L_3803CC19; /* 0x3803CC0D: je 0x3803cc19 */ 7672 L_3803CC0F: 7673 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803CC0F: fstp st(0) */ 7674 fp_push(*(float*)&MEM32(0x3804EA94)); /* 0x3803CC11: fld dword ptr [0x3804ea94] */ 7675 goto L_3803CC2A; /* 0x3803CC17: jmp 0x3803cc2a */ 7676 L_3803CC19: 7677 fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x3803CC19: fld dword ptr [ebp + 8] */ 7678 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803CC1C: fcomp st(1) */ 7679 fp_pop(); 7680 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803CC1E: fnstsw ax */ 7681 /* test HI8(eax), 1 */ /* 0x3803CC20: test ah, 1 */ 7682 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 7683 _cf = 0; 7684 _flag_k = FK_NARROW(FK_TEST, 24); 7685 if (TEST_Z(_flag_a, _flag_b)) goto L_3803CC2A; /* 0x3803CC23: je 0x3803cc2a */ 7686 L_3803CC25: 7687 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803CC25: fstp st(0) */ 7688 fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x3803CC27: fld dword ptr [ebp + 8] */ 7689 L_3803CC2A: 7690 { float _v = (float)fp_pop(); *(float*)ADDR(edx) = _v; } /* 0x3803CC2A: fstp dword ptr [edx] */ 7691 fp_push(*(float*)&MEM32(ecx + 0x14)); /* 0x3803CC2C: fld dword ptr [ecx + 0x14] */ 7692 ecx = MEM32(edx + 0x8); /* 0x3803CC2F: mov ecx, dword ptr [edx + 8] */ 7693 _st[0] -= (double)*(float*)ADDR(0x3804EA94); /* 0x3803CC32: fsub dword ptr [0x3804ea94] */ 7694 MEM32(ebp + 0x8) = ecx; /* 0x3803CC38: mov dword ptr [ebp + 8], ecx */ 7695 fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x3803CC3B: fld dword ptr [ebp + 8] */ 7696 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804EA94)); /* 0x3803CC3E: fcomp dword ptr [0x3804ea94] */ 7697 fp_pop(); 7698 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803CC44: fnstsw ax */ 7699 /* test HI8(eax), 0x41u */ /* 0x3803CC46: test ah, 0x41 */ 7700 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 7701 _cf = 0; 7702 _flag_k = FK_NARROW(FK_TEST, 24); 7703 if (TEST_Z(_flag_a, _flag_b)) goto L_3803CC55; /* 0x3803CC49: je 0x3803cc55 */ 7704 L_3803CC4B: 7705 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803CC4B: fstp st(0) */ 7706 fp_push(*(float*)&MEM32(0x3804EA94)); /* 0x3803CC4D: fld dword ptr [0x3804ea94] */ 7707 goto L_3803CC66; /* 0x3803CC53: jmp 0x3803cc66 */ 7708 L_3803CC55: 7709 fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x3803CC55: fld dword ptr [ebp + 8] */ 7710 _fpu_cmp = FPU_CMP(_st[0], _st[1]); /* 0x3803CC58: fcomp st(1) */ 7711 fp_pop(); 7712 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803CC5A: fnstsw ax */ 7713 /* test HI8(eax), 1 */ /* 0x3803CC5C: test ah, 1 */ 7714 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 7715 _cf = 0; 7716 _flag_k = FK_NARROW(FK_TEST, 24); 7717 if (TEST_Z(_flag_a, _flag_b)) goto L_3803CC66; /* 0x3803CC5F: je 0x3803cc66 */ 7718 L_3803CC61: 7719 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803CC61: fstp st(0) */ 7720 fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x3803CC63: fld dword ptr [ebp + 8] */ 7721 L_3803CC66: 7722 { float _v = (float)fp_pop(); *(float*)ADDR(edx + 0x8) = _v; } /* 0x3803CC66: fstp dword ptr [edx + 8] */ 7723 fp_push(*(float*)&MEM32(edx + 0x4)); /* 0x3803CC69: fld dword ptr [edx + 4] */ 7724 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804EC00)); /* 0x3803CC6C: fcom dword ptr [0x3804ec00] */ 7725 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803CC72: fnstsw ax */ 7726 /* test HI8(eax), 0x41u */ /* 0x3803CC74: test ah, 0x41 */ 7727 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24; 7728 _cf = 0; 7729 _flag_k = FK_NARROW(FK_TEST, 24); 7730 if (TEST_Z(_flag_a, _flag_b)) goto L_3803CC8A; /* 0x3803CC77: je 0x3803cc8a */ 7731 L_3803CC79: 7732 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803CC79: fstp st(0) */ 7733 SET_LO8(eax, 1); /* 0x3803CC7B: mov al, 1 */ 7734 fp_push(*(float*)&MEM32(0x3804EC00)); /* 0x3803CC7D: fld dword ptr [0x3804ec00] */ 7735 { float _v = (float)fp_pop(); *(float*)ADDR(edx + 0x4) = _v; } /* 0x3803CC83: fstp dword ptr [edx + 4] */ 7736 ebp = POP32_VAL(esp); /* 0x3803CC86: pop ebp */ 7737 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x3803CC87: ret 0xc */ 7738 L_3803CC8A: 7739 _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(0x3804F6F8)); /* 0x3803CC8A: fcom dword ptr [0x3804f6f8] */ 7740 eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3803CC90: fnstsw ax */ 7741 /* test HI8(eax), 1 */ /* 0x3803CC92: test ah, 1 */ 7742 _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24; 7743 _cf = 0; 7744 _flag_k = FK_NARROW(FK_TEST, 24); 7745 if (TEST_NZ(_flag_a, _flag_b)) goto L_3803CC9F; /* 0x3803CC95: jne 0x3803cc9f */ 7746 L_3803CC97: 7747 { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x3803CC97: fstp st(0) */ 7748 fp_push(*(float*)&MEM32(0x3804F6F8)); /* 0x3803CC99: fld dword ptr [0x3804f6f8] */ 7749 L_3803CC9F: 7750 { float _v = (float)fp_pop(); *(float*)ADDR(edx + 0x4) = _v; } /* 0x3803CC9F: fstp dword ptr [edx + 4] */ 7751 SET_LO8(eax, 1); /* 0x3803CCA2: mov al, 1 */ 7752 ebp = POP32_VAL(esp); /* 0x3803CCA4: pop ebp */ 7753 RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x3803CCA5: ret 0xc */ 7754 RECOMP_REGS_OUT(); 7755 } 7756 7757 void sub_3803CCB0(void) { 7758 int _fpu_cmp = 0; 7759 uint32_t _cf = 0; 7760 int _df = 1; 7761 uint32_t _flag_k = FK_NONE; 7762 uint32_t _flag_a = 0, _flag_b = 0; 7763 uint32_t _itail_tgt = 0; 7764 RECOMP_REGS_LOCALS 7765 RECOMP_ENTER(0x3803CCB0u); 7766 7767 L_3803CCB0: 7768 eax = MEM32(ecx + 0xC); /* 0x3803CCB0: mov eax, dword ptr [ecx + 0xc] */ 7769 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CCB3: ret */ 7770 RECOMP_REGS_OUT(); 7771 } 7772 7773 void sub_3803CCC0(void) { 7774 int _fpu_cmp = 0; 7775 uint32_t _cf = 0; 7776 int _df = 1; 7777 uint32_t _flag_k = FK_NONE; 7778 uint32_t _flag_a = 0, _flag_b = 0; 7779 uint32_t _itail_tgt = 0; 7780 RECOMP_REGS_LOCALS 7781 RECOMP_ENTER(0x3803CCC0u); 7782 7783 L_3803CCC0: 7784 PUSH32(esp, ebp); /* 0x3803CCC0: push ebp */ 7785 ebp = esp; /* 0x3803CCC1: mov ebp, esp */ 7786 ecx = MEM32(ecx + 0xC); /* 0x3803CCC3: mov ecx, dword ptr [ecx + 0xc] */ 7787 edx = MEM32(ebp + 0x8); /* 0x3803CCC6: mov edx, dword ptr [ebp + 8] */ 7788 eax = MEM32(ecx); /* 0x3803CCC9: mov eax, dword ptr [ecx] */ 7789 PUSH32(esp, edx); /* 0x3803CCCB: push edx */ 7790 RECOMP_ICALL(MEM32(eax + 0x24)); /* 0x3803CCCC: call dword ptr [eax + 0x24] */ 7791 RECOMP_FLAGS_IN(); 7792 ebp = POP32_VAL(esp); /* 0x3803CCCF: pop ebp */ 7793 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803CCD0: ret 4 */ 7794 RECOMP_REGS_OUT(); 7795 } 7796 7797 void sub_3803CCE0(void) { 7798 int _fpu_cmp = 0; 7799 uint32_t _cf = 0; 7800 int _df = 1; 7801 uint32_t _flag_k = FK_NONE; 7802 uint32_t _flag_a = 0, _flag_b = 0; 7803 uint32_t _itail_tgt = 0; 7804 RECOMP_REGS_LOCALS 7805 RECOMP_ENTER(0x3803CCE0u); 7806 7807 L_3803CCE0: 7808 RECOMP_ICALL(0x3803CCF0u); /* 0x3803CCE0: call 0x3803ccf0 */ /* not lifted */ 7809 RECOMP_FLAGS_IN(); 7810 goto L_3803CD00; /* 0x3803CCE5: jmp 0x3803cd00 */ 7811 L_3803CD00: 7812 PUSH32(esp, 0x3803CD10u); /* 0x3803CD00: push 0x3803cd10 */ 7813 RECOMP_ICALL(0x3804B54Cu); /* 0x3803CD05: call 0x3804b54c */ /* not lifted */ 7814 RECOMP_FLAGS_IN(); 7815 ecx = POP32_VAL(esp); /* 0x3803CD0A: pop ecx */ 7816 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CD0B: ret */ 7817 RECOMP_REGS_OUT(); 7818 } 7819 7820 void sub_3803CCF0(void) { 7821 int _fpu_cmp = 0; 7822 uint32_t _cf = 0; 7823 int _df = 1; 7824 uint32_t _flag_k = FK_NONE; 7825 uint32_t _flag_a = 0, _flag_b = 0; 7826 uint32_t _itail_tgt = 0; 7827 RECOMP_REGS_LOCALS 7828 RECOMP_ENTER(0x3803CCF0u); 7829 7830 L_3803CCF0: 7831 ecx = 0x3806F0D5u; /* 0x3803CCF0: mov ecx, 0x3806f0d5 */ 7832 L_3803CCF5: 7833 { _itail_tgt = (uint32_t)(MEM32(0x3804E060)); goto _ljump; } 7834 { RECOMP_REGS_OUT(); return; } /* end of function */ 7835 _ljump: 7836 switch (_itail_tgt) { 7837 case 0x3803CCF0u: goto L_3803CCF0; 7838 case 0x3803CCF5u: goto L_3803CCF5; 7839 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 7840 } 7841 RECOMP_REGS_OUT(); 7842 } 7843 7844 void sub_3803CD00(void) { 7845 int _fpu_cmp = 0; 7846 uint32_t _cf = 0; 7847 int _df = 1; 7848 uint32_t _flag_k = FK_NONE; 7849 uint32_t _flag_a = 0, _flag_b = 0; 7850 uint32_t _itail_tgt = 0; 7851 RECOMP_REGS_LOCALS 7852 RECOMP_ENTER(0x3803CD00u); 7853 7854 L_3803CD00: 7855 PUSH32(esp, 0x3803CD10u); /* 0x3803CD00: push 0x3803cd10 */ 7856 RECOMP_ICALL(0x3804B54Cu); /* 0x3803CD05: call 0x3804b54c */ /* not lifted */ 7857 RECOMP_FLAGS_IN(); 7858 ecx = POP32_VAL(esp); /* 0x3803CD0A: pop ecx */ 7859 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CD0B: ret */ 7860 RECOMP_REGS_OUT(); 7861 } 7862 7863 void sub_3803CD10(void) { 7864 int _fpu_cmp = 0; 7865 uint32_t _cf = 0; 7866 int _df = 1; 7867 uint32_t _flag_k = FK_NONE; 7868 uint32_t _flag_a = 0, _flag_b = 0; 7869 uint32_t _itail_tgt = 0; 7870 RECOMP_REGS_LOCALS 7871 RECOMP_ENTER(0x3803CD10u); 7872 7873 L_3803CD10: 7874 ecx = 0x3806F0D5u; /* 0x3803CD10: mov ecx, 0x3806f0d5 */ 7875 L_3803CD15: 7876 { _itail_tgt = (uint32_t)(MEM32(0x3804E064)); goto _ljump; } 7877 { RECOMP_REGS_OUT(); return; } /* end of function */ 7878 _ljump: 7879 switch (_itail_tgt) { 7880 case 0x3803CD10u: goto L_3803CD10; 7881 case 0x3803CD15u: goto L_3803CD15; 7882 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 7883 } 7884 RECOMP_REGS_OUT(); 7885 } 7886 7887 void sub_3803CD20(void) { 7888 int _fpu_cmp = 0; 7889 uint32_t _cf = 0; 7890 int _df = 1; 7891 uint32_t _flag_k = FK_NONE; 7892 uint32_t _flag_a = 0, _flag_b = 0; 7893 uint32_t _itail_tgt = 0; 7894 RECOMP_REGS_LOCALS 7895 RECOMP_ENTER(0x3803CD20u); 7896 7897 L_3803CD20: 7898 RECOMP_ICALL(0x3803CD30u); /* 0x3803CD20: call 0x3803cd30 */ /* not lifted */ 7899 RECOMP_FLAGS_IN(); 7900 goto L_3803CD40; /* 0x3803CD25: jmp 0x3803cd40 */ 7901 L_3803CD40: 7902 PUSH32(esp, 0x3803CD50u); /* 0x3803CD40: push 0x3803cd50 */ 7903 RECOMP_ICALL(0x3804B54Cu); /* 0x3803CD45: call 0x3804b54c */ /* not lifted */ 7904 RECOMP_FLAGS_IN(); 7905 ecx = POP32_VAL(esp); /* 0x3803CD4A: pop ecx */ 7906 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CD4B: ret */ 7907 RECOMP_REGS_OUT(); 7908 } 7909 7910 void sub_3803CD30(void) { 7911 int _fpu_cmp = 0; 7912 uint32_t _cf = 0; 7913 int _df = 1; 7914 uint32_t _flag_k = FK_NONE; 7915 uint32_t _flag_a = 0, _flag_b = 0; 7916 uint32_t _itail_tgt = 0; 7917 RECOMP_REGS_LOCALS 7918 RECOMP_ENTER(0x3803CD30u); 7919 7920 L_3803CD30: 7921 ecx = 0x3806F0D4u; /* 0x3803CD30: mov ecx, 0x3806f0d4 */ 7922 L_3803CD35: 7923 { _itail_tgt = (uint32_t)(MEM32(0x3804E068)); goto _ljump; } 7924 { RECOMP_REGS_OUT(); return; } /* end of function */ 7925 _ljump: 7926 switch (_itail_tgt) { 7927 case 0x3803CD30u: goto L_3803CD30; 7928 case 0x3803CD35u: goto L_3803CD35; 7929 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 7930 } 7931 RECOMP_REGS_OUT(); 7932 } 7933 7934 void sub_3803CD40(void) { 7935 int _fpu_cmp = 0; 7936 uint32_t _cf = 0; 7937 int _df = 1; 7938 uint32_t _flag_k = FK_NONE; 7939 uint32_t _flag_a = 0, _flag_b = 0; 7940 uint32_t _itail_tgt = 0; 7941 RECOMP_REGS_LOCALS 7942 RECOMP_ENTER(0x3803CD40u); 7943 7944 L_3803CD40: 7945 PUSH32(esp, 0x3803CD50u); /* 0x3803CD40: push 0x3803cd50 */ 7946 RECOMP_ICALL(0x3804B54Cu); /* 0x3803CD45: call 0x3804b54c */ /* not lifted */ 7947 RECOMP_FLAGS_IN(); 7948 ecx = POP32_VAL(esp); /* 0x3803CD4A: pop ecx */ 7949 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CD4B: ret */ 7950 RECOMP_REGS_OUT(); 7951 } 7952 7953 void sub_3803CD50(void) { 7954 int _fpu_cmp = 0; 7955 uint32_t _cf = 0; 7956 int _df = 1; 7957 uint32_t _flag_k = FK_NONE; 7958 uint32_t _flag_a = 0, _flag_b = 0; 7959 uint32_t _itail_tgt = 0; 7960 RECOMP_REGS_LOCALS 7961 RECOMP_ENTER(0x3803CD50u); 7962 7963 L_3803CD50: 7964 ecx = 0x3806F0D4u; /* 0x3803CD50: mov ecx, 0x3806f0d4 */ 7965 L_3803CD55: 7966 { _itail_tgt = (uint32_t)(MEM32(0x3804E06C)); goto _ljump; } 7967 { RECOMP_REGS_OUT(); return; } /* end of function */ 7968 _ljump: 7969 switch (_itail_tgt) { 7970 case 0x3803CD50u: goto L_3803CD50; 7971 case 0x3803CD55u: goto L_3803CD55; 7972 default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; } 7973 } 7974 RECOMP_REGS_OUT(); 7975 } 7976 7977 void sub_3803CD60(void) { 7978 int _fpu_cmp = 0; 7979 uint32_t _cf = 0; 7980 int _df = 1; 7981 uint32_t _flag_k = FK_NONE; 7982 uint32_t _flag_a = 0, _flag_b = 0; 7983 uint32_t _itail_tgt = 0; 7984 RECOMP_REGS_LOCALS 7985 RECOMP_ENTER(0x3803CD60u); 7986 7987 L_3803CD60: 7988 goto L_3803CD70; /* 0x3803CD60: jmp 0x3803cd70 */ 7989 L_3803CD70: 7990 MEM32(0x3806F0D0) = 0x3806B9CCu; /* 0x3803CD70: mov dword ptr [0x3806f0d0], 0x3806b9cc */ 7991 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CD7A: ret */ 7992 RECOMP_REGS_OUT(); 7993 } 7994 7995 void sub_3803CD70(void) { 7996 int _fpu_cmp = 0; 7997 uint32_t _cf = 0; 7998 int _df = 1; 7999 uint32_t _flag_k = FK_NONE; 8000 uint32_t _flag_a = 0, _flag_b = 0; 8001 uint32_t _itail_tgt = 0; 8002 RECOMP_REGS_LOCALS 8003 RECOMP_ENTER(0x3803CD70u); 8004 8005 L_3803CD70: 8006 MEM32(0x3806F0D0) = 0x3806B9CCu; /* 0x3803CD70: mov dword ptr [0x3806f0d0], 0x3806b9cc */ 8007 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CD7A: ret */ 8008 RECOMP_REGS_OUT(); 8009 } 8010 8011 void sub_3803CD80(void) { 8012 int _fpu_cmp = 0; 8013 uint32_t _cf = 0; 8014 int _df = 1; 8015 uint32_t _flag_k = FK_NONE; 8016 uint32_t _flag_a = 0, _flag_b = 0; 8017 uint32_t _itail_tgt = 0; 8018 RECOMP_REGS_LOCALS 8019 RECOMP_ENTER(0x3803CD80u); 8020 8021 L_3803CD80: 8022 goto L_3803CD90; /* 0x3803CD80: jmp 0x3803cd90 */ 8023 L_3803CD90: 8024 MEM32(0x3806F0CC) = 0x3806BA00u; /* 0x3803CD90: mov dword ptr [0x3806f0cc], 0x3806ba00 */ 8025 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CD9A: ret */ 8026 RECOMP_REGS_OUT(); 8027 } 8028 8029 void sub_3803CD90(void) { 8030 int _fpu_cmp = 0; 8031 uint32_t _cf = 0; 8032 int _df = 1; 8033 uint32_t _flag_k = FK_NONE; 8034 uint32_t _flag_a = 0, _flag_b = 0; 8035 uint32_t _itail_tgt = 0; 8036 RECOMP_REGS_LOCALS 8037 RECOMP_ENTER(0x3803CD90u); 8038 8039 L_3803CD90: 8040 MEM32(0x3806F0CC) = 0x3806BA00u; /* 0x3803CD90: mov dword ptr [0x3806f0cc], 0x3806ba00 */ 8041 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CD9A: ret */ 8042 RECOMP_REGS_OUT(); 8043 } 8044 8045 void sub_3803CDA0(void) { 8046 int _fpu_cmp = 0; 8047 uint32_t _cf = 0; 8048 int _df = 1; 8049 uint32_t _flag_k = FK_NONE; 8050 uint32_t _flag_a = 0, _flag_b = 0; 8051 uint32_t _itail_tgt = 0; 8052 RECOMP_REGS_LOCALS 8053 RECOMP_ENTER(0x3803CDA0u); 8054 8055 L_3803CDA0: 8056 goto L_3803CDB0; /* 0x3803CDA0: jmp 0x3803cdb0 */ 8057 L_3803CDB0: 8058 MEM32(0x3806F0C8) = 0x3806BA3Cu; /* 0x3803CDB0: mov dword ptr [0x3806f0c8], 0x3806ba3c */ 8059 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CDBA: ret */ 8060 RECOMP_REGS_OUT(); 8061 } 8062 8063 void sub_3803CDB0(void) { 8064 int _fpu_cmp = 0; 8065 uint32_t _cf = 0; 8066 int _df = 1; 8067 uint32_t _flag_k = FK_NONE; 8068 uint32_t _flag_a = 0, _flag_b = 0; 8069 uint32_t _itail_tgt = 0; 8070 RECOMP_REGS_LOCALS 8071 RECOMP_ENTER(0x3803CDB0u); 8072 8073 L_3803CDB0: 8074 MEM32(0x3806F0C8) = 0x3806BA3Cu; /* 0x3803CDB0: mov dword ptr [0x3806f0c8], 0x3806ba3c */ 8075 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CDBA: ret */ 8076 RECOMP_REGS_OUT(); 8077 } 8078 8079 void sub_3803CDC0(void) { 8080 int _fpu_cmp = 0; 8081 uint32_t _cf = 0; 8082 int _df = 1; 8083 uint32_t _flag_k = FK_NONE; 8084 uint32_t _flag_a = 0, _flag_b = 0; 8085 uint32_t _itail_tgt = 0; 8086 RECOMP_REGS_LOCALS 8087 RECOMP_ENTER(0x3803CDC0u); 8088 8089 L_3803CDC0: 8090 goto L_3803CDD0; /* 0x3803CDC0: jmp 0x3803cdd0 */ 8091 L_3803CDD0: 8092 MEM32(0x3806F0C4) = 0x3806BA70u; /* 0x3803CDD0: mov dword ptr [0x3806f0c4], 0x3806ba70 */ 8093 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CDDA: ret */ 8094 RECOMP_REGS_OUT(); 8095 } 8096 8097 void sub_3803CDD0(void) { 8098 int _fpu_cmp = 0; 8099 uint32_t _cf = 0; 8100 int _df = 1; 8101 uint32_t _flag_k = FK_NONE; 8102 uint32_t _flag_a = 0, _flag_b = 0; 8103 uint32_t _itail_tgt = 0; 8104 RECOMP_REGS_LOCALS 8105 RECOMP_ENTER(0x3803CDD0u); 8106 8107 L_3803CDD0: 8108 MEM32(0x3806F0C4) = 0x3806BA70u; /* 0x3803CDD0: mov dword ptr [0x3806f0c4], 0x3806ba70 */ 8109 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CDDA: ret */ 8110 RECOMP_REGS_OUT(); 8111 } 8112 8113 void sub_3803CDE0(void) { 8114 int _fpu_cmp = 0; 8115 uint32_t _cf = 0; 8116 int _df = 1; 8117 uint32_t _flag_k = FK_NONE; 8118 uint32_t _flag_a = 0, _flag_b = 0; 8119 uint32_t _itail_tgt = 0; 8120 RECOMP_REGS_LOCALS 8121 RECOMP_ENTER(0x3803CDE0u); 8122 8123 L_3803CDE0: 8124 goto L_3803CDF0; /* 0x3803CDE0: jmp 0x3803cdf0 */ 8125 L_3803CDF0: 8126 MEM32(0x3806F0C0) = 0x3806BAA4u; /* 0x3803CDF0: mov dword ptr [0x3806f0c0], 0x3806baa4 */ 8127 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CDFA: ret */ 8128 RECOMP_REGS_OUT(); 8129 } 8130 8131 void sub_3803CDF0(void) { 8132 int _fpu_cmp = 0; 8133 uint32_t _cf = 0; 8134 int _df = 1; 8135 uint32_t _flag_k = FK_NONE; 8136 uint32_t _flag_a = 0, _flag_b = 0; 8137 uint32_t _itail_tgt = 0; 8138 RECOMP_REGS_LOCALS 8139 RECOMP_ENTER(0x3803CDF0u); 8140 8141 L_3803CDF0: 8142 MEM32(0x3806F0C0) = 0x3806BAA4u; /* 0x3803CDF0: mov dword ptr [0x3806f0c0], 0x3806baa4 */ 8143 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CDFA: ret */ 8144 RECOMP_REGS_OUT(); 8145 } 8146 8147 void sub_3803CE00(void) { 8148 int _fpu_cmp = 0; 8149 uint32_t _cf = 0; 8150 int _df = 1; 8151 uint32_t _flag_k = FK_NONE; 8152 uint32_t _flag_a = 0, _flag_b = 0; 8153 uint32_t _itail_tgt = 0; 8154 RECOMP_REGS_LOCALS 8155 RECOMP_ENTER(0x3803CE00u); 8156 8157 L_3803CE00: 8158 goto L_3803CE10; /* 0x3803CE00: jmp 0x3803ce10 */ 8159 L_3803CE10: 8160 MEM32(0x3806F0BC) = 0x3806BAD8u; /* 0x3803CE10: mov dword ptr [0x3806f0bc], 0x3806bad8 */ 8161 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CE1A: ret */ 8162 RECOMP_REGS_OUT(); 8163 } 8164 8165 void sub_3803CE10(void) { 8166 int _fpu_cmp = 0; 8167 uint32_t _cf = 0; 8168 int _df = 1; 8169 uint32_t _flag_k = FK_NONE; 8170 uint32_t _flag_a = 0, _flag_b = 0; 8171 uint32_t _itail_tgt = 0; 8172 RECOMP_REGS_LOCALS 8173 RECOMP_ENTER(0x3803CE10u); 8174 8175 L_3803CE10: 8176 MEM32(0x3806F0BC) = 0x3806BAD8u; /* 0x3803CE10: mov dword ptr [0x3806f0bc], 0x3806bad8 */ 8177 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CE1A: ret */ 8178 RECOMP_REGS_OUT(); 8179 } 8180 8181 void sub_3803CE20(void) { 8182 int _fpu_cmp = 0; 8183 uint32_t _cf = 0; 8184 int _df = 1; 8185 uint32_t _flag_k = FK_NONE; 8186 uint32_t _flag_a = 0, _flag_b = 0; 8187 uint32_t _itail_tgt = 0; 8188 RECOMP_REGS_LOCALS 8189 RECOMP_ENTER(0x3803CE20u); 8190 8191 L_3803CE20: 8192 goto L_3803CE30; /* 0x3803CE20: jmp 0x3803ce30 */ 8193 L_3803CE30: 8194 MEM32(0x3806F0B8) = 0x3806BB10u; /* 0x3803CE30: mov dword ptr [0x3806f0b8], 0x3806bb10 */ 8195 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CE3A: ret */ 8196 RECOMP_REGS_OUT(); 8197 } 8198 8199 void sub_3803CE30(void) { 8200 int _fpu_cmp = 0; 8201 uint32_t _cf = 0; 8202 int _df = 1; 8203 uint32_t _flag_k = FK_NONE; 8204 uint32_t _flag_a = 0, _flag_b = 0; 8205 uint32_t _itail_tgt = 0; 8206 RECOMP_REGS_LOCALS 8207 RECOMP_ENTER(0x3803CE30u); 8208 8209 L_3803CE30: 8210 MEM32(0x3806F0B8) = 0x3806BB10u; /* 0x3803CE30: mov dword ptr [0x3806f0b8], 0x3806bb10 */ 8211 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CE3A: ret */ 8212 RECOMP_REGS_OUT(); 8213 } 8214 8215 void sub_3803CE40(void) { 8216 int _fpu_cmp = 0; 8217 uint32_t _cf = 0; 8218 int _df = 1; 8219 uint32_t _flag_k = FK_NONE; 8220 uint32_t _flag_a = 0, _flag_b = 0; 8221 uint32_t _itail_tgt = 0; 8222 RECOMP_REGS_LOCALS 8223 RECOMP_ENTER(0x3803CE40u); 8224 8225 L_3803CE40: 8226 goto L_3803CE50; /* 0x3803CE40: jmp 0x3803ce50 */ 8227 L_3803CE50: 8228 MEM32(0x3806F0B4) = 0x3806BB4Cu; /* 0x3803CE50: mov dword ptr [0x3806f0b4], 0x3806bb4c */ 8229 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CE5A: ret */ 8230 RECOMP_REGS_OUT(); 8231 } 8232 8233 void sub_3803CE50(void) { 8234 int _fpu_cmp = 0; 8235 uint32_t _cf = 0; 8236 int _df = 1; 8237 uint32_t _flag_k = FK_NONE; 8238 uint32_t _flag_a = 0, _flag_b = 0; 8239 uint32_t _itail_tgt = 0; 8240 RECOMP_REGS_LOCALS 8241 RECOMP_ENTER(0x3803CE50u); 8242 8243 L_3803CE50: 8244 MEM32(0x3806F0B4) = 0x3806BB4Cu; /* 0x3803CE50: mov dword ptr [0x3806f0b4], 0x3806bb4c */ 8245 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CE5A: ret */ 8246 RECOMP_REGS_OUT(); 8247 } 8248 8249 void sub_3803CE60(void) { 8250 int _fpu_cmp = 0; 8251 uint32_t _cf = 0; 8252 int _df = 1; 8253 uint32_t _flag_k = FK_NONE; 8254 uint32_t _flag_a = 0, _flag_b = 0; 8255 uint32_t _itail_tgt = 0; 8256 RECOMP_REGS_LOCALS 8257 RECOMP_ENTER(0x3803CE60u); 8258 8259 L_3803CE60: 8260 goto L_3803CE70; /* 0x3803CE60: jmp 0x3803ce70 */ 8261 L_3803CE70: 8262 MEM32(0x3806F0B0) = 0x3806BB84u; /* 0x3803CE70: mov dword ptr [0x3806f0b0], 0x3806bb84 */ 8263 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CE7A: ret */ 8264 RECOMP_REGS_OUT(); 8265 } 8266 8267 void sub_3803CE70(void) { 8268 int _fpu_cmp = 0; 8269 uint32_t _cf = 0; 8270 int _df = 1; 8271 uint32_t _flag_k = FK_NONE; 8272 uint32_t _flag_a = 0, _flag_b = 0; 8273 uint32_t _itail_tgt = 0; 8274 RECOMP_REGS_LOCALS 8275 RECOMP_ENTER(0x3803CE70u); 8276 8277 L_3803CE70: 8278 MEM32(0x3806F0B0) = 0x3806BB84u; /* 0x3803CE70: mov dword ptr [0x3806f0b0], 0x3806bb84 */ 8279 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CE7A: ret */ 8280 RECOMP_REGS_OUT(); 8281 } 8282 8283 void sub_3803CE80(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(0x3803CE80u); 8292 8293 L_3803CE80: 8294 goto L_3803CE90; /* 0x3803CE80: jmp 0x3803ce90 */ 8295 L_3803CE90: 8296 MEM32(0x3806F0AC) = 0x3806BBB8u; /* 0x3803CE90: mov dword ptr [0x3806f0ac], 0x3806bbb8 */ 8297 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CE9A: ret */ 8298 RECOMP_REGS_OUT(); 8299 } 8300 8301 void sub_3803CE90(void) { 8302 int _fpu_cmp = 0; 8303 uint32_t _cf = 0; 8304 int _df = 1; 8305 uint32_t _flag_k = FK_NONE; 8306 uint32_t _flag_a = 0, _flag_b = 0; 8307 uint32_t _itail_tgt = 0; 8308 RECOMP_REGS_LOCALS 8309 RECOMP_ENTER(0x3803CE90u); 8310 8311 L_3803CE90: 8312 MEM32(0x3806F0AC) = 0x3806BBB8u; /* 0x3803CE90: mov dword ptr [0x3806f0ac], 0x3806bbb8 */ 8313 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CE9A: ret */ 8314 RECOMP_REGS_OUT(); 8315 } 8316 8317 void sub_3803CEA0(void) { 8318 int _fpu_cmp = 0; 8319 uint32_t _cf = 0; 8320 int _df = 1; 8321 uint32_t _flag_k = FK_NONE; 8322 uint32_t _flag_a = 0, _flag_b = 0; 8323 uint32_t _itail_tgt = 0; 8324 RECOMP_REGS_LOCALS 8325 RECOMP_ENTER(0x3803CEA0u); 8326 8327 L_3803CEA0: 8328 goto L_3803CEB0; /* 0x3803CEA0: jmp 0x3803ceb0 */ 8329 L_3803CEB0: 8330 MEM32(0x3806F0A8) = 0x3806BBF4u; /* 0x3803CEB0: mov dword ptr [0x3806f0a8], 0x3806bbf4 */ 8331 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CEBA: ret */ 8332 RECOMP_REGS_OUT(); 8333 } 8334 8335 void sub_3803CEB0(void) { 8336 int _fpu_cmp = 0; 8337 uint32_t _cf = 0; 8338 int _df = 1; 8339 uint32_t _flag_k = FK_NONE; 8340 uint32_t _flag_a = 0, _flag_b = 0; 8341 uint32_t _itail_tgt = 0; 8342 RECOMP_REGS_LOCALS 8343 RECOMP_ENTER(0x3803CEB0u); 8344 8345 L_3803CEB0: 8346 MEM32(0x3806F0A8) = 0x3806BBF4u; /* 0x3803CEB0: mov dword ptr [0x3806f0a8], 0x3806bbf4 */ 8347 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CEBA: ret */ 8348 RECOMP_REGS_OUT(); 8349 } 8350 8351 void sub_3803CEC0(void) { 8352 int _fpu_cmp = 0; 8353 uint32_t _cf = 0; 8354 int _df = 1; 8355 uint32_t _flag_k = FK_NONE; 8356 uint32_t _flag_a = 0, _flag_b = 0; 8357 uint32_t _itail_tgt = 0; 8358 RECOMP_REGS_LOCALS 8359 RECOMP_ENTER(0x3803CEC0u); 8360 8361 L_3803CEC0: 8362 goto L_3803CED0; /* 0x3803CEC0: jmp 0x3803ced0 */ 8363 L_3803CED0: 8364 MEM32(0x3806F0A4) = 0x3806BC2Cu; /* 0x3803CED0: mov dword ptr [0x3806f0a4], 0x3806bc2c */ 8365 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CEDA: ret */ 8366 RECOMP_REGS_OUT(); 8367 } 8368 8369 void sub_3803CED0(void) { 8370 int _fpu_cmp = 0; 8371 uint32_t _cf = 0; 8372 int _df = 1; 8373 uint32_t _flag_k = FK_NONE; 8374 uint32_t _flag_a = 0, _flag_b = 0; 8375 uint32_t _itail_tgt = 0; 8376 RECOMP_REGS_LOCALS 8377 RECOMP_ENTER(0x3803CED0u); 8378 8379 L_3803CED0: 8380 MEM32(0x3806F0A4) = 0x3806BC2Cu; /* 0x3803CED0: mov dword ptr [0x3806f0a4], 0x3806bc2c */ 8381 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CEDA: ret */ 8382 RECOMP_REGS_OUT(); 8383 } 8384 8385 void sub_3803CEE0(void) { 8386 int _fpu_cmp = 0; 8387 uint32_t _cf = 0; 8388 int _df = 1; 8389 uint32_t _flag_k = FK_NONE; 8390 uint32_t _flag_a = 0, _flag_b = 0; 8391 uint32_t _itail_tgt = 0; 8392 RECOMP_REGS_LOCALS 8393 RECOMP_ENTER(0x3803CEE0u); 8394 8395 L_3803CEE0: 8396 goto L_3803CEF0; /* 0x3803CEE0: jmp 0x3803cef0 */ 8397 L_3803CEF0: 8398 MEM32(0x3806F0A0) = 0x3806BC68u; /* 0x3803CEF0: mov dword ptr [0x3806f0a0], 0x3806bc68 */ 8399 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CEFA: ret */ 8400 RECOMP_REGS_OUT(); 8401 } 8402 8403 void sub_3803CEF0(void) { 8404 int _fpu_cmp = 0; 8405 uint32_t _cf = 0; 8406 int _df = 1; 8407 uint32_t _flag_k = FK_NONE; 8408 uint32_t _flag_a = 0, _flag_b = 0; 8409 uint32_t _itail_tgt = 0; 8410 RECOMP_REGS_LOCALS 8411 RECOMP_ENTER(0x3803CEF0u); 8412 8413 L_3803CEF0: 8414 MEM32(0x3806F0A0) = 0x3806BC68u; /* 0x3803CEF0: mov dword ptr [0x3806f0a0], 0x3806bc68 */ 8415 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CEFA: ret */ 8416 RECOMP_REGS_OUT(); 8417 } 8418 8419 void sub_3803CF00(void) { 8420 int _fpu_cmp = 0; 8421 uint32_t _cf = 0; 8422 int _df = 1; 8423 uint32_t _flag_k = FK_NONE; 8424 uint32_t _flag_a = 0, _flag_b = 0; 8425 uint32_t _itail_tgt = 0; 8426 RECOMP_REGS_LOCALS 8427 RECOMP_ENTER(0x3803CF00u); 8428 8429 L_3803CF00: 8430 goto L_3803CF10; /* 0x3803CF00: jmp 0x3803cf10 */ 8431 L_3803CF10: 8432 MEM32(0x3806F09C) = 0x3806BCA4u; /* 0x3803CF10: mov dword ptr [0x3806f09c], 0x3806bca4 */ 8433 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CF1A: ret */ 8434 RECOMP_REGS_OUT(); 8435 } 8436 8437 void sub_3803CF10(void) { 8438 int _fpu_cmp = 0; 8439 uint32_t _cf = 0; 8440 int _df = 1; 8441 uint32_t _flag_k = FK_NONE; 8442 uint32_t _flag_a = 0, _flag_b = 0; 8443 uint32_t _itail_tgt = 0; 8444 RECOMP_REGS_LOCALS 8445 RECOMP_ENTER(0x3803CF10u); 8446 8447 L_3803CF10: 8448 MEM32(0x3806F09C) = 0x3806BCA4u; /* 0x3803CF10: mov dword ptr [0x3806f09c], 0x3806bca4 */ 8449 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CF1A: ret */ 8450 RECOMP_REGS_OUT(); 8451 } 8452 8453 void sub_3803CF20(void) { 8454 int _fpu_cmp = 0; 8455 uint32_t _cf = 0; 8456 int _df = 1; 8457 uint32_t _flag_k = FK_NONE; 8458 uint32_t _flag_a = 0, _flag_b = 0; 8459 uint32_t _itail_tgt = 0; 8460 RECOMP_REGS_LOCALS 8461 RECOMP_ENTER(0x3803CF20u); 8462 8463 L_3803CF20: 8464 goto L_3803CF30; /* 0x3803CF20: jmp 0x3803cf30 */ 8465 L_3803CF30: 8466 MEM32(0x3806F098) = 0x3806BCD8u; /* 0x3803CF30: mov dword ptr [0x3806f098], 0x3806bcd8 */ 8467 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CF3A: ret */ 8468 RECOMP_REGS_OUT(); 8469 } 8470 8471 void sub_3803CF30(void) { 8472 int _fpu_cmp = 0; 8473 uint32_t _cf = 0; 8474 int _df = 1; 8475 uint32_t _flag_k = FK_NONE; 8476 uint32_t _flag_a = 0, _flag_b = 0; 8477 uint32_t _itail_tgt = 0; 8478 RECOMP_REGS_LOCALS 8479 RECOMP_ENTER(0x3803CF30u); 8480 8481 L_3803CF30: 8482 MEM32(0x3806F098) = 0x3806BCD8u; /* 0x3803CF30: mov dword ptr [0x3806f098], 0x3806bcd8 */ 8483 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CF3A: ret */ 8484 RECOMP_REGS_OUT(); 8485 } 8486 8487 void sub_3803CF40(void) { 8488 int _fpu_cmp = 0; 8489 uint32_t _cf = 0; 8490 int _df = 1; 8491 uint32_t _flag_k = FK_NONE; 8492 uint32_t _flag_a = 0, _flag_b = 0; 8493 uint32_t _itail_tgt = 0; 8494 RECOMP_REGS_LOCALS 8495 RECOMP_ENTER(0x3803CF40u); 8496 8497 L_3803CF40: 8498 goto L_3803CF50; /* 0x3803CF40: jmp 0x3803cf50 */ 8499 L_3803CF50: 8500 MEM32(0x3806F094) = 0x3806BD0Cu; /* 0x3803CF50: mov dword ptr [0x3806f094], 0x3806bd0c */ 8501 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CF5A: ret */ 8502 RECOMP_REGS_OUT(); 8503 } 8504 8505 void sub_3803CF50(void) { 8506 int _fpu_cmp = 0; 8507 uint32_t _cf = 0; 8508 int _df = 1; 8509 uint32_t _flag_k = FK_NONE; 8510 uint32_t _flag_a = 0, _flag_b = 0; 8511 uint32_t _itail_tgt = 0; 8512 RECOMP_REGS_LOCALS 8513 RECOMP_ENTER(0x3803CF50u); 8514 8515 L_3803CF50: 8516 MEM32(0x3806F094) = 0x3806BD0Cu; /* 0x3803CF50: mov dword ptr [0x3806f094], 0x3806bd0c */ 8517 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803CF5A: ret */ 8518 RECOMP_REGS_OUT(); 8519 } 8520 8521 void sub_3803CF60(void) { 8522 int _fpu_cmp = 0; 8523 uint32_t _cf = 0; 8524 int _df = 1; 8525 uint32_t _flag_k = FK_NONE; 8526 uint32_t _flag_a = 0, _flag_b = 0; 8527 uint32_t _itail_tgt = 0; 8528 RECOMP_REGS_LOCALS 8529 RECOMP_ENTER(0x3803CF60u); 8530 8531 L_3803CF60: 8532 PUSH32(esp, ebp); /* 0x3803CF60: push ebp */ 8533 ebp = esp; /* 0x3803CF61: mov ebp, esp */ 8534 eax = MEM32(ebp + 0x8); /* 0x3803CF63: mov eax, dword ptr [ebp + 8] */ 8535 PUSH32(esp, esi); /* 0x3803CF66: push esi */ 8536 PUSH32(esp, 0); /* 0x3803CF67: push 0 */ 8537 PUSH32(esp, 0x3806B910u); /* 0x3803CF69: push 0x3806b910 */ 8538 PUSH32(esp, 0x3806B8F0u); /* 0x3803CF6E: push 0x3806b8f0 */ 8539 PUSH32(esp, 0); /* 0x3803CF73: push 0 */ 8540 PUSH32(esp, eax); /* 0x3803CF75: push eax */ 8541 esi = ecx; /* 0x3803CF76: mov esi, ecx */ 8542 RECOMP_ICALL(0x3804B682u); /* 0x3803CF78: call 0x3804b682 */ /* not lifted */ 8543 RECOMP_FLAGS_IN(); 8544 ecx = MEM32(esi + 0x4); /* 0x3803CF7D: mov ecx, dword ptr [esi + 4] */ 8545 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 8546 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8547 esp = esp + 0x14u; /* 0x3803CF80: add esp, 0x14 */ 8548 _flag_k = FK_ADD; 8549 PUSH32(esp, eax); /* 0x3803CF83: push eax */ 8550 RECOMP_ICALL(0x3803E3B0u); /* 0x3803CF84: call 0x3803e3b0 */ /* not lifted */ 8551 RECOMP_FLAGS_IN(); 8552 esi = POP32_VAL(esp); /* 0x3803CF89: pop esi */ 8553 ebp = POP32_VAL(esp); /* 0x3803CF8A: pop ebp */ 8554 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803CF8B: ret 4 */ 8555 RECOMP_REGS_OUT(); 8556 } 8557 8558 void sub_3803CF90(void) { 8559 int _fpu_cmp = 0; 8560 uint32_t _cf = 0; 8561 int _df = 1; 8562 uint32_t _flag_k = FK_NONE; 8563 uint32_t _flag_a = 0, _flag_b = 0; 8564 uint32_t _itail_tgt = 0; 8565 RECOMP_REGS_LOCALS 8566 RECOMP_ENTER(0x3803CF90u); 8567 8568 L_3803CF90: 8569 PUSH32(esp, ebp); /* 0x3803CF90: push ebp */ 8570 ebp = esp; /* 0x3803CF91: mov ebp, esp */ 8571 eax = MEM32(ebp + 0x8); /* 0x3803CF93: mov eax, dword ptr [ebp + 8] */ 8572 PUSH32(esp, esi); /* 0x3803CF96: push esi */ 8573 PUSH32(esp, 0); /* 0x3803CF97: push 0 */ 8574 PUSH32(esp, 0x3806B910u); /* 0x3803CF99: push 0x3806b910 */ 8575 PUSH32(esp, 0x3806B8F0u); /* 0x3803CF9E: push 0x3806b8f0 */ 8576 PUSH32(esp, 0); /* 0x3803CFA3: push 0 */ 8577 PUSH32(esp, eax); /* 0x3803CFA5: push eax */ 8578 esi = ecx; /* 0x3803CFA6: mov esi, ecx */ 8579 RECOMP_ICALL(0x3804B682u); /* 0x3803CFA8: call 0x3804b682 */ /* not lifted */ 8580 RECOMP_FLAGS_IN(); 8581 ecx = MEM32(esi + 0x4); /* 0x3803CFAD: mov ecx, dword ptr [esi + 4] */ 8582 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u); 8583 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8584 esp = esp + 0x14u; /* 0x3803CFB0: add esp, 0x14 */ 8585 _flag_k = FK_ADD; 8586 PUSH32(esp, eax); /* 0x3803CFB3: push eax */ 8587 RECOMP_ICALL(0x38043880u); /* 0x3803CFB4: call 0x38043880 */ /* not lifted */ 8588 RECOMP_FLAGS_IN(); 8589 esi = POP32_VAL(esp); /* 0x3803CFB9: pop esi */ 8590 ebp = POP32_VAL(esp); /* 0x3803CFBA: pop ebp */ 8591 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803CFBB: ret 4 */ 8592 RECOMP_REGS_OUT(); 8593 } 8594 8595 void sub_3803CFC0(void) { 8596 int _fpu_cmp = 0; 8597 uint32_t _cf = 0; 8598 int _df = 1; 8599 uint32_t _flag_k = FK_NONE; 8600 uint32_t _flag_a = 0, _flag_b = 0; 8601 uint32_t _itail_tgt = 0; 8602 RECOMP_REGS_LOCALS 8603 RECOMP_ENTER(0x3803CFC0u); 8604 8605 L_3803CFC0: 8606 PUSH32(esp, ebp); /* 0x3803CFC0: push ebp */ 8607 ebp = esp; /* 0x3803CFC1: mov ebp, esp */ 8608 PUSH32(esp, 0xFFFFFFFFu); /* 0x3803CFC3: push -1 */ 8609 PUSH32(esp, 0x3804CEA8u); /* 0x3803CFC5: push 0x3804cea8 */ 8610 eax = MEM32(FS_BASE + (0)); /* 0x3803CFCA: mov eax, dword ptr fs:[0] */ 8611 PUSH32(esp, eax); /* 0x3803CFD0: push eax */ 8612 MEM32(FS_BASE + (0)) = esp; /* 0x3803CFD1: mov dword ptr fs:[0], esp */ 8613 PUSH32(esp, ecx); /* 0x3803CFD8: push ecx */ 8614 eax = MEM32(ebp + 0x8); /* 0x3803CFD9: mov eax, dword ptr [ebp + 8] */ 8615 PUSH32(esp, esi); /* 0x3803CFDC: push esi */ 8616 esi = ecx; /* 0x3803CFDD: mov esi, ecx */ 8617 PUSH32(esp, eax); /* 0x3803CFDF: push eax */ 8618 MEM32(ebp + (-0x10)) = esi; /* 0x3803CFE0: mov dword ptr [ebp - 0x10], esi */ 8619 RECOMP_ICALL(0x38017660u); /* 0x3803CFE3: call 0x38017660 */ /* not lifted */ 8620 RECOMP_FLAGS_IN(); 8621 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 8622 eax = 0; /* 0x3803CFE8: xor eax, eax */ 8623 _cf = 0; 8624 _flag_k = FK_TEST; 8625 MEM32(esi + 0xB4) = eax; /* 0x3803CFEA: mov dword ptr [esi + 0xb4], eax */ 8626 MEM32(esi + 0xB8) = eax; /* 0x3803CFF0: mov dword ptr [esi + 0xb8], eax */ 8627 MEM32(esi + 0xBC) = eax; /* 0x3803CFF6: mov dword ptr [esi + 0xbc], eax */ 8628 MEM32(esi + 0xC0) = eax; /* 0x3803CFFC: mov dword ptr [esi + 0xc0], eax */ 8629 ecx = esi; /* 0x3803D002: mov ecx, esi */ 8630 MEM32(ebp + (-0x4)) = eax; /* 0x3803D004: mov dword ptr [ebp - 4], eax */ 8631 MEM32(esi + 0xC4) = eax; /* 0x3803D007: mov dword ptr [esi + 0xc4], eax */ 8632 MEM32(esi + 0xC8) = eax; /* 0x3803D00D: mov dword ptr [esi + 0xc8], eax */ 8633 MEM32(esi + 0xCC) = 0x3F800000u; /* 0x3803D013: mov dword ptr [esi + 0xcc], 0x3f800000 */ 8634 MEM32(esi + 0xD0) = eax; /* 0x3803D01D: mov dword ptr [esi + 0xd0], eax */ 8635 MEM32(esi) = 0x3804F7D0u; /* 0x3803D023: mov dword ptr [esi], 0x3804f7d0 */ 8636 MEM32(esi + 0x1C) = 0x3804F7B8u; /* 0x3803D029: mov dword ptr [esi + 0x1c], 0x3804f7b8 */ 8637 MEM32(esi + 0x20) = 0x3804F7B0u; /* 0x3803D030: mov dword ptr [esi + 0x20], 0x3804f7b0 */ 8638 RECOMP_ICALL(0x38017CD0u); /* 0x3803D037: call 0x38017cd0 */ /* not lifted */ 8639 RECOMP_FLAGS_IN(); 8640 ecx = MEM32(ebp + (-0xC)); /* 0x3803D03C: mov ecx, dword ptr [ebp - 0xc] */ 8641 MEM8(esi + 0xD4) = (uint8_t)(LO8(eax)); /* 0x3803D03F: mov byte ptr [esi + 0xd4], al */ 8642 eax = esi; /* 0x3803D045: mov eax, esi */ 8643 esi = POP32_VAL(esp); /* 0x3803D047: pop esi */ 8644 MEM32(FS_BASE + (0)) = ecx; /* 0x3803D048: mov dword ptr fs:[0], ecx */ 8645 esp = ebp; /* 0x3803D04F: mov esp, ebp */ 8646 ebp = POP32_VAL(esp); /* 0x3803D051: pop ebp */ 8647 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803D052: ret 4 */ 8648 RECOMP_REGS_OUT(); 8649 } 8650 8651 void sub_3803D060(void) { 8652 int _fpu_cmp = 0; 8653 uint32_t _cf = 0; 8654 int _df = 1; 8655 uint32_t _flag_k = FK_NONE; 8656 uint32_t _flag_a = 0, _flag_b = 0; 8657 uint32_t _itail_tgt = 0; 8658 RECOMP_REGS_LOCALS 8659 RECOMP_ENTER(0x3803D060u); 8660 8661 L_3803D060: 8662 PUSH32(esp, ebp); /* 0x3803D060: push ebp */ 8663 ebp = esp; /* 0x3803D061: mov ebp, esp */ 8664 PUSH32(esp, ebx); /* 0x3803D063: push ebx */ 8665 SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x3803D064: mov bl, byte ptr [ebp + 8] */ 8666 /* test LO8(ebx), 2 */ /* 0x3803D067: test bl, 2 */ 8667 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24; 8668 _cf = 0; 8669 _flag_k = FK_NARROW(FK_TEST, 24); 8670 PUSH32(esp, esi); /* 0x3803D06A: push esi */ 8671 esi = ecx; /* 0x3803D06B: mov esi, ecx */ 8672 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D09E; /* 0x3803D06D: je 0x3803d09e */ 8673 L_3803D06F: 8674 eax = MEM32(esi + (-0x4)); /* 0x3803D06F: mov eax, dword ptr [esi - 4] */ 8675 PUSH32(esp, edi); /* 0x3803D072: push edi */ 8676 PUSH32(esp, 0x3803D0C0u); /* 0x3803D073: push 0x3803d0c0 */ 8677 edi = esi + (-0x4); /* 0x3803D078: lea edi, [esi - 4] */ 8678 PUSH32(esp, eax); /* 0x3803D07B: push eax */ 8679 PUSH32(esp, 0xD8u); /* 0x3803D07C: push 0xd8 */ 8680 PUSH32(esp, esi); /* 0x3803D081: push esi */ 8681 RECOMP_ICALL(0x3804B582u); /* 0x3803D082: call 0x3804b582 */ /* not lifted */ 8682 RECOMP_FLAGS_IN(); 8683 /* test LO8(ebx), 1 */ /* 0x3803D087: test bl, 1 */ 8684 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 8685 _cf = 0; 8686 _flag_k = FK_NARROW(FK_TEST, 24); 8687 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D095; /* 0x3803D08A: je 0x3803d095 */ 8688 L_3803D08C: 8689 PUSH32(esp, edi); /* 0x3803D08C: push edi */ 8690 RECOMP_ICALL(0x3804B4F6u); /* 0x3803D08D: call 0x3804b4f6 */ /* not lifted */ 8691 RECOMP_FLAGS_IN(); 8692 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8693 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8694 esp = esp + 4; /* 0x3803D092: add esp, 4 */ 8695 _flag_k = FK_ADD; 8696 L_3803D095: 8697 eax = edi; /* 0x3803D095: mov eax, edi */ 8698 edi = POP32_VAL(esp); /* 0x3803D097: pop edi */ 8699 esi = POP32_VAL(esp); /* 0x3803D098: pop esi */ 8700 ebx = POP32_VAL(esp); /* 0x3803D099: pop ebx */ 8701 ebp = POP32_VAL(esp); /* 0x3803D09A: pop ebp */ 8702 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803D09B: ret 4 */ 8703 L_3803D09E: 8704 ecx = esi; /* 0x3803D09E: mov ecx, esi */ 8705 RECOMP_ICALL(0x3803D0C0u); /* 0x3803D0A0: call 0x3803d0c0 */ /* not lifted */ 8706 RECOMP_FLAGS_IN(); 8707 /* test LO8(ebx), 1 */ /* 0x3803D0A5: test bl, 1 */ 8708 _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24; 8709 _cf = 0; 8710 _flag_k = FK_NARROW(FK_TEST, 24); 8711 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D0B3; /* 0x3803D0A8: je 0x3803d0b3 */ 8712 L_3803D0AA: 8713 PUSH32(esp, esi); /* 0x3803D0AA: push esi */ 8714 RECOMP_ICALL(0x3804B4F6u); /* 0x3803D0AB: call 0x3804b4f6 */ /* not lifted */ 8715 RECOMP_FLAGS_IN(); 8716 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8717 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8718 esp = esp + 4; /* 0x3803D0B0: add esp, 4 */ 8719 _flag_k = FK_ADD; 8720 L_3803D0B3: 8721 eax = esi; /* 0x3803D0B3: mov eax, esi */ 8722 esi = POP32_VAL(esp); /* 0x3803D0B5: pop esi */ 8723 ebx = POP32_VAL(esp); /* 0x3803D0B6: pop ebx */ 8724 ebp = POP32_VAL(esp); /* 0x3803D0B7: pop ebp */ 8725 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803D0B8: ret 4 */ 8726 RECOMP_REGS_OUT(); 8727 } 8728 8729 void sub_3803D0C0(void) { 8730 int _fpu_cmp = 0; 8731 uint32_t _cf = 0; 8732 int _df = 1; 8733 uint32_t _flag_k = FK_NONE; 8734 uint32_t _flag_a = 0, _flag_b = 0; 8735 uint32_t _itail_tgt = 0; 8736 RECOMP_REGS_LOCALS 8737 RECOMP_ENTER(0x3803D0C0u); 8738 8739 L_3803D0C0: 8740 PUSH32(esp, ebp); /* 0x3803D0C0: push ebp */ 8741 ebp = esp; /* 0x3803D0C1: mov ebp, esp */ 8742 PUSH32(esp, 0xFFFFFFFFu); /* 0x3803D0C3: push -1 */ 8743 PUSH32(esp, 0x3804CEC8u); /* 0x3803D0C5: push 0x3804cec8 */ 8744 eax = MEM32(FS_BASE + (0)); /* 0x3803D0CA: mov eax, dword ptr fs:[0] */ 8745 PUSH32(esp, eax); /* 0x3803D0D0: push eax */ 8746 MEM32(FS_BASE + (0)) = esp; /* 0x3803D0D1: mov dword ptr fs:[0], esp */ 8747 PUSH32(esp, ecx); /* 0x3803D0D8: push ecx */ 8748 PUSH32(esp, ebx); /* 0x3803D0D9: push ebx */ 8749 PUSH32(esp, esi); /* 0x3803D0DA: push esi */ 8750 PUSH32(esp, edi); /* 0x3803D0DB: push edi */ 8751 edi = ecx; /* 0x3803D0DC: mov edi, ecx */ 8752 MEM32(ebp + (-0x10)) = edi; /* 0x3803D0DE: mov dword ptr [ebp - 0x10], edi */ 8753 MEM32(edi) = 0x3804F7D0u; /* 0x3803D0E1: mov dword ptr [edi], 0x3804f7d0 */ 8754 MEM32(edi + 0x1C) = 0x3804F7B8u; /* 0x3803D0E7: mov dword ptr [edi + 0x1c], 0x3804f7b8 */ 8755 MEM32(edi + 0x20) = 0x3804F7B0u; /* 0x3803D0EE: mov dword ptr [edi + 0x20], 0x3804f7b0 */ 8756 ecx = MEM32(edi + 0xC8); /* 0x3803D0F5: mov ecx, dword ptr [edi + 0xc8] */ 8757 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 8758 ebx = 0; /* 0x3803D0FB: xor ebx, ebx */ 8759 _cf = 0; 8760 _flag_k = FK_TEST; 8761 /* cmp ecx, ebx */ /* 0x3803D0FD: cmp ecx, ebx */ 8762 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx); 8763 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8764 _flag_k = FK_CMP; 8765 MEM32(ebp + (-0x4)) = ebx; /* 0x3803D0FF: mov dword ptr [ebp - 4], ebx */ 8766 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803D10B; /* 0x3803D102: je 0x3803d10b */ 8767 L_3803D104: 8768 eax = MEM32(ecx); /* 0x3803D104: mov eax, dword ptr [ecx] */ 8769 PUSH32(esp, 1); /* 0x3803D106: push 1 */ 8770 RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x3803D108: call dword ptr [eax + 0x10] */ 8771 RECOMP_FLAGS_IN(); 8772 L_3803D10B: 8773 ecx = MEM32(edi + 0xC4); /* 0x3803D10B: mov ecx, dword ptr [edi + 0xc4] */ 8774 /* cmp ecx, ebx */ /* 0x3803D111: cmp ecx, ebx */ 8775 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx); 8776 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8777 _flag_k = FK_CMP; 8778 MEM32(edi + 0xC8) = ebx; /* 0x3803D113: mov dword ptr [edi + 0xc8], ebx */ 8779 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803D121; /* 0x3803D119: je 0x3803d121 */ 8780 L_3803D11B: 8781 edx = MEM32(ecx); /* 0x3803D11B: mov edx, dword ptr [ecx] */ 8782 PUSH32(esp, 1); /* 0x3803D11D: push 1 */ 8783 RECOMP_ICALL(MEM32(edx)); /* 0x3803D11F: call dword ptr [edx] */ 8784 RECOMP_FLAGS_IN(); 8785 L_3803D121: 8786 ecx = MEM32(edi + 0xB4); /* 0x3803D121: mov ecx, dword ptr [edi + 0xb4] */ 8787 /* cmp ecx, ebx */ /* 0x3803D127: cmp ecx, ebx */ 8788 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx); 8789 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8790 _flag_k = FK_CMP; 8791 MEM32(edi + 0xC4) = ebx; /* 0x3803D129: mov dword ptr [edi + 0xc4], ebx */ 8792 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803D137; /* 0x3803D12F: je 0x3803d137 */ 8793 L_3803D131: 8794 eax = MEM32(ecx); /* 0x3803D131: mov eax, dword ptr [ecx] */ 8795 PUSH32(esp, 1); /* 0x3803D133: push 1 */ 8796 RECOMP_ICALL(MEM32(eax)); /* 0x3803D135: call dword ptr [eax] */ 8797 RECOMP_FLAGS_IN(); 8798 L_3803D137: 8799 esi = MEM32(edi + 0xD0); /* 0x3803D137: mov esi, dword ptr [edi + 0xd0] */ 8800 /* cmp esi, ebx */ /* 0x3803D13D: cmp esi, ebx */ 8801 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx); 8802 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8803 _flag_k = FK_CMP; 8804 MEM32(edi + 0xB4) = ebx; /* 0x3803D13F: mov dword ptr [edi + 0xb4], ebx */ 8805 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803D189; /* 0x3803D145: je 0x3803d189 */ 8806 L_3803D147: 8807 eax = MEM32(esi + 0x4); /* 0x3803D147: mov eax, dword ptr [esi + 4] */ 8808 /* test eax, eax */ /* 0x3803D14A: test eax, eax */ 8809 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 8810 _cf = 0; 8811 _flag_k = FK_TEST; 8812 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D169; /* 0x3803D14C: je 0x3803d169 */ 8813 L_3803D14E: 8814 ecx = MEM32(esi + 0x8); /* 0x3803D14E: mov ecx, dword ptr [esi + 8] */ 8815 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 8816 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8817 ecx = ecx - eax; /* 0x3803D151: sub ecx, eax */ 8818 _flag_k = FK_CMP; 8819 if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x3803D153: sar ecx, 2 */ 8820 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 8821 ecx = (uint32_t)((int32_t)ecx >> 2u); 8822 /* cmp ebx, ecx */ /* 0x3803D156: cmp ebx, ecx */ 8823 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ecx); 8824 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8825 _flag_k = FK_CMP; 8826 if (CMP_AE(_flag_a, _flag_b)) goto L_3803D169; /* 0x3803D158: jae 0x3803d169 */ 8827 L_3803D15A: 8828 edx = MEM32(eax + ebx * 4); /* 0x3803D15A: mov edx, dword ptr [eax + ebx*4] */ 8829 PUSH32(esp, edx); /* 0x3803D15D: push edx */ 8830 RECOMP_ICALL(0x3804B4F6u); /* 0x3803D15E: call 0x3804b4f6 */ /* not lifted */ 8831 RECOMP_FLAGS_IN(); 8832 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8833 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8834 esp = esp + 4; /* 0x3803D163: add esp, 4 */ 8835 _flag_k = FK_ADD; 8836 _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(1); 8837 ebx = ebx + 1; /* 0x3803D166: inc ebx */ 8838 _flag_k = FK_INC; 8839 RECOMP_BACKEDGE(); 8840 goto L_3803D147; /* 0x3803D167: jmp 0x3803d147 */ 8841 L_3803D169: 8842 eax = MEM32(esi + 0x4); /* 0x3803D169: mov eax, dword ptr [esi + 4] */ 8843 PUSH32(esp, eax); /* 0x3803D16C: push eax */ 8844 MEM32(ebp + (-0x10)) = eax; /* 0x3803D16D: mov dword ptr [ebp - 0x10], eax */ 8845 RECOMP_ICALL(0x3804B4F6u); /* 0x3803D170: call 0x3804b4f6 */ /* not lifted */ 8846 RECOMP_FLAGS_IN(); 8847 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 8848 eax = 0; /* 0x3803D175: xor eax, eax */ 8849 _cf = 0; 8850 _flag_k = FK_TEST; 8851 PUSH32(esp, esi); /* 0x3803D177: push esi */ 8852 MEM32(esi + 0x4) = eax; /* 0x3803D178: mov dword ptr [esi + 4], eax */ 8853 MEM32(esi + 0x8) = eax; /* 0x3803D17B: mov dword ptr [esi + 8], eax */ 8854 MEM32(esi + 0xC) = eax; /* 0x3803D17E: mov dword ptr [esi + 0xc], eax */ 8855 RECOMP_ICALL(0x3804B4F6u); /* 0x3803D181: call 0x3804b4f6 */ /* not lifted */ 8856 RECOMP_FLAGS_IN(); 8857 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8); 8858 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8859 esp = esp + 8; /* 0x3803D186: add esp, 8 */ 8860 _flag_k = FK_ADD; 8861 L_3803D189: 8862 ecx = edi; /* 0x3803D189: mov ecx, edi */ 8863 MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3803D18B: mov dword ptr [ebp - 4], 0xffffffff */ 8864 RECOMP_ICALL(0x38017A20u); /* 0x3803D192: call 0x38017a20 */ /* not lifted */ 8865 RECOMP_FLAGS_IN(); 8866 ecx = MEM32(ebp + (-0xC)); /* 0x3803D197: mov ecx, dword ptr [ebp - 0xc] */ 8867 edi = POP32_VAL(esp); /* 0x3803D19A: pop edi */ 8868 esi = POP32_VAL(esp); /* 0x3803D19B: pop esi */ 8869 ebx = POP32_VAL(esp); /* 0x3803D19C: pop ebx */ 8870 MEM32(FS_BASE + (0)) = ecx; /* 0x3803D19D: mov dword ptr fs:[0], ecx */ 8871 esp = ebp; /* 0x3803D1A4: mov esp, ebp */ 8872 ebp = POP32_VAL(esp); /* 0x3803D1A6: pop ebp */ 8873 RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3803D1A7: ret */ 8874 RECOMP_REGS_OUT(); 8875 } 8876 8877 void sub_3803D1B0(void) { 8878 int _fpu_cmp = 0; 8879 uint32_t _cf = 0; 8880 int _df = 1; 8881 uint32_t _flag_k = FK_NONE; 8882 uint32_t _flag_a = 0, _flag_b = 0; 8883 uint32_t _itail_tgt = 0; 8884 RECOMP_REGS_LOCALS 8885 RECOMP_ENTER(0x3803D1B0u); 8886 8887 L_3803D1B0: 8888 PUSH32(esp, ebp); /* 0x3803D1B0: push ebp */ 8889 ebp = esp; /* 0x3803D1B1: mov ebp, esp */ 8890 PUSH32(esp, 0xFFFFFFFFu); /* 0x3803D1B3: push -1 */ 8891 PUSH32(esp, 0x3804CEE8u); /* 0x3803D1B5: push 0x3804cee8 */ 8892 eax = MEM32(FS_BASE + (0)); /* 0x3803D1BA: mov eax, dword ptr fs:[0] */ 8893 PUSH32(esp, eax); /* 0x3803D1C0: push eax */ 8894 MEM32(FS_BASE + (0)) = esp; /* 0x3803D1C1: mov dword ptr fs:[0], esp */ 8895 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x34u); 8896 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8897 esp = esp - 0x34u; /* 0x3803D1C8: sub esp, 0x34 */ 8898 _flag_k = FK_CMP; 8899 PUSH32(esp, ebx); /* 0x3803D1CB: push ebx */ 8900 PUSH32(esp, esi); /* 0x3803D1CC: push esi */ 8901 esi = ecx; /* 0x3803D1CD: mov esi, ecx */ 8902 eax = MEM32(esi + 0x78); /* 0x3803D1CF: mov eax, dword ptr [esi + 0x78] */ 8903 PUSH32(esp, edi); /* 0x3803D1D2: push edi */ 8904 PUSH32(esp, eax); /* 0x3803D1D3: push eax */ 8905 RECOMP_ICALL(0x380295A0u); /* 0x3803D1D4: call 0x380295a0 */ /* not lifted */ 8906 RECOMP_FLAGS_IN(); 8907 ebx = eax; /* 0x3803D1D9: mov ebx, eax */ 8908 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 8909 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 8910 esp = esp + 4; /* 0x3803D1DB: add esp, 4 */ 8911 _flag_k = FK_ADD; 8912 ecx = ebx; /* 0x3803D1DE: mov ecx, ebx */ 8913 MEM32(ebp + (-0x24)) = ebx; /* 0x3803D1E0: mov dword ptr [ebp - 0x24], ebx */ 8914 RECOMP_ICALL(0x38029E80u); /* 0x3803D1E3: call 0x38029e80 */ /* not lifted */ 8915 RECOMP_FLAGS_IN(); 8916 ecx = eax; /* 0x3803D1E8: mov ecx, eax */ 8917 RECOMP_ICALL(0x38039DD0u); /* 0x3803D1EA: call 0x38039dd0 */ /* not lifted */ 8918 RECOMP_FLAGS_IN(); 8919 /* test LO8(eax), LO8(eax) */ /* 0x3803D1EF: test al, al */ 8920 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 8921 _cf = 0; 8922 _flag_k = FK_NARROW(FK_TEST, 24); 8923 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D4E6; /* 0x3803D1F1: je 0x3803d4e6 */ 8924 L_3803D1F7: 8925 eax = MEM32(ebp + 0x8); /* 0x3803D1F7: mov eax, dword ptr [ebp + 8] */ 8926 PUSH32(esp, eax); /* 0x3803D1FA: push eax */ 8927 ecx = ebx; /* 0x3803D1FB: mov ecx, ebx */ 8928 RECOMP_ICALL(0x3802B990u); /* 0x3803D1FD: call 0x3802b990 */ /* not lifted */ 8929 RECOMP_FLAGS_IN(); 8930 edi = eax; /* 0x3803D202: mov edi, eax */ 8931 /* test edi, edi */ /* 0x3803D204: test edi, edi */ 8932 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi); 8933 _cf = 0; 8934 _flag_k = FK_TEST; 8935 MEM32(ebp + (-0x10)) = edi; /* 0x3803D206: mov dword ptr [ebp - 0x10], edi */ 8936 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D4E6; /* 0x3803D209: je 0x3803d4e6 */ 8937 L_3803D20F: 8938 eax = MEM32(esi + 0xC8); /* 0x3803D20F: mov eax, dword ptr [esi + 0xc8] */ 8939 /* test eax, eax */ /* 0x3803D215: test eax, eax */ 8940 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 8941 _cf = 0; 8942 _flag_k = FK_TEST; 8943 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D231; /* 0x3803D217: je 0x3803d231 */ 8944 L_3803D219: 8945 ecx = MEM32(edi + 0x78); /* 0x3803D219: mov ecx, dword ptr [edi + 0x78] */ 8946 edx = 3; /* 0x3803D21C: mov edx, 3 */ 8947 if (((LO8(ecx)) & 31)) _cf = ((((LO8(ecx)) & 31)) <= 32 ? (((edx) >> (32 - (((LO8(ecx)) & 31)))) & 1u) : 0u); /* 0x3803D221: shl edx, cl */ 8948 if (((LO8(ecx)) & 31)) { _flag_a = recomp_flags_pack((edx << ((LO8(ecx)) & 31)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 8949 edx = edx << ((LO8(ecx)) & 31); /* 0x3803D221: shl edx, cl */ 8950 ecx = eax; /* 0x3803D223: mov ecx, eax */ 8951 PUSH32(esp, edx); /* 0x3803D225: push edx */ 8952 RECOMP_ICALL(MEM32(0x3804E208)); /* 0x3803D226: call dword ptr [0x3804e208] */ 8953 RECOMP_FLAGS_IN(); 8954 goto L_3803D33B; /* 0x3803D22C: jmp 0x3803d33b */ 8955 L_3803D231: 8956 eax = MEM32(esi + 0xC4); /* 0x3803D231: mov eax, dword ptr [esi + 0xc4] */ 8957 /* test eax, eax */ /* 0x3803D237: test eax, eax */ 8958 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 8959 _cf = 0; 8960 _flag_k = FK_TEST; 8961 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D33B; /* 0x3803D239: je 0x3803d33b */ 8962 L_3803D23F: 8963 /* cmp MEM32(esi + 0x4), 0xC748u */ /* 0x3803D23F: cmp dword ptr [esi + 4], 0xc748 */ 8964 _flag_a = (uint32_t)(MEM32(esi + 0x4)); _flag_b = (uint32_t)(0xC748u); 8965 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 8966 _flag_k = FK_CMP; 8967 if (CMP_NE(_flag_a, _flag_b)) goto L_3803D328; /* 0x3803D246: jne 0x3803d328 */ 8968 L_3803D24C: 8969 _flag_a = (uint32_t)((eax | 0xFFFFFFFFu)); _flag_b = (uint32_t)((eax | 0xFFFFFFFFu)); 8970 eax = eax | 0xFFFFFFFFu; /* 0x3803D24C: or eax, 0xffffffff */ 8971 _cf = 0; 8972 _flag_k = FK_TEST; 8973 ecx = esi; /* 0x3803D24F: mov ecx, esi */ 8974 MEM32(ebp + (-0x18)) = eax; /* 0x3803D251: mov dword ptr [ebp - 0x18], eax */ 8975 MEM32(ebp + (-0x14)) = eax; /* 0x3803D254: mov dword ptr [ebp - 0x14], eax */ 8976 RECOMP_ICALL(0x38017F50u); /* 0x3803D257: call 0x38017f50 */ /* not lifted */ 8977 RECOMP_FLAGS_IN(); 8978 ecx = MEM32(eax); /* 0x3803D25C: mov ecx, dword ptr [eax] */ 8979 MEM32(ebp + (-0x30)) = ecx; /* 0x3803D25E: mov dword ptr [ebp - 0x30], ecx */ 8980 edx = MEM32(eax + 0x4); /* 0x3803D261: mov edx, dword ptr [eax + 4] */ 8981 MEM32(ebp + (-0x2C)) = edx; /* 0x3803D264: mov dword ptr [ebp - 0x2c], edx */ 8982 eax = MEM32(eax + 0x8); /* 0x3803D267: mov eax, dword ptr [eax + 8] */ 8983 ecx = ebp + (-0x14); /* 0x3803D26A: lea ecx, [ebp - 0x14] */ 8984 PUSH32(esp, ecx); /* 0x3803D26D: push ecx */ 8985 edi = esi + 0x1C; /* 0x3803D26E: lea edi, [esi + 0x1c] */ 8986 edx = ebp + (-0x18); /* 0x3803D271: lea edx, [ebp - 0x18] */ 8987 MEM32(ebp + (-0x28)) = eax; /* 0x3803D274: mov dword ptr [ebp - 0x28], eax */ 8988 eax = MEM32(edi); /* 0x3803D277: mov eax, dword ptr [edi] */ 8989 PUSH32(esp, edx); /* 0x3803D279: push edx */ 8990 ecx = edi; /* 0x3803D27A: mov ecx, edi */ 8991 RECOMP_ICALL(MEM32(eax + 0xC)); /* 0x3803D27C: call dword ptr [eax + 0xc] */ 8992 RECOMP_FLAGS_IN(); 8993 PUSH32(esp, ecx); /* 0x3803D27F: push ecx */ 8994 ecx = ebp + (-0x30); /* 0x3803D280: lea ecx, [ebp - 0x30] */ 8995 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x3803D283: fstp dword ptr [esp] */ 8996 PUSH32(esp, ecx); /* 0x3803D286: push ecx */ 8997 ecx = ebx; /* 0x3803D287: mov ecx, ebx */ 8998 RECOMP_ICALL(0x38029E80u); /* 0x3803D289: call 0x38029e80 */ /* not lifted */ 8999 RECOMP_FLAGS_IN(); 9000 ecx = MEM32(ebp + (-0x10)); /* 0x3803D28E: mov ecx, dword ptr [ebp - 0x10] */ 9001 PUSH32(esp, eax); /* 0x3803D291: push eax */ 9002 RECOMP_ICALL(0x38032160u); /* 0x3803D292: call 0x38032160 */ /* not lifted */ 9003 RECOMP_FLAGS_IN(); 9004 eax = MEM32(ebp + (-0x14)); /* 0x3803D297: mov eax, dword ptr [ebp - 0x14] */ 9005 /* cmp LO16(eax), 0xFFFFu */ /* 0x3803D29A: cmp ax, 0xffff */ 9006 _flag_a = (uint32_t)(LO16(eax)) << 16; _flag_b = (uint32_t)(0xFFFFu) << 16; 9007 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9008 _flag_k = FK_NARROW(FK_CMP, 16); 9009 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803D2D1; /* 0x3803D29E: je 0x3803d2d1 */ 9010 L_3803D2A0: 9011 edx = (int32_t)(int16_t)LO16(eax); /* 0x3803D2A0: movsx edx, ax */ 9012 PUSH32(esp, edx); /* 0x3803D2A3: push edx */ 9013 ecx = ebx; /* 0x3803D2A4: mov ecx, ebx */ 9014 RECOMP_ICALL(0x3802B990u); /* 0x3803D2A6: call 0x3802b990 */ /* not lifted */ 9015 RECOMP_FLAGS_IN(); 9016 /* test eax, eax */ /* 0x3803D2AB: test eax, eax */ 9017 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 9018 _cf = 0; 9019 _flag_k = FK_TEST; 9020 MEM32(ebp + (-0x1C)) = eax; /* 0x3803D2AD: mov dword ptr [ebp - 0x1c], eax */ 9021 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D2D1; /* 0x3803D2B0: je 0x3803d2d1 */ 9022 L_3803D2B2: 9023 eax = MEM32(edi); /* 0x3803D2B2: mov eax, dword ptr [edi] */ 9024 ecx = edi; /* 0x3803D2B4: mov ecx, edi */ 9025 RECOMP_ICALL(MEM32(eax + 0xC)); /* 0x3803D2B6: call dword ptr [eax + 0xc] */ 9026 RECOMP_FLAGS_IN(); 9027 PUSH32(esp, ecx); /* 0x3803D2B9: push ecx */ 9028 ecx = ebp + (-0x30); /* 0x3803D2BA: lea ecx, [ebp - 0x30] */ 9029 { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x3803D2BD: fstp dword ptr [esp] */ 9030 PUSH32(esp, ecx); /* 0x3803D2C0: push ecx */ 9031 ecx = ebx; /* 0x3803D2C1: mov ecx, ebx */ 9032 RECOMP_ICALL(0x38029E80u); /* 0x3803D2C3: call 0x38029e80 */ /* not lifted */ 9033 RECOMP_FLAGS_IN(); 9034 ecx = MEM32(ebp + (-0x1C)); /* 0x3803D2C8: mov ecx, dword ptr [ebp - 0x1c] */ 9035 PUSH32(esp, eax); /* 0x3803D2CB: push eax */ 9036 RECOMP_ICALL(0x38031E10u); /* 0x3803D2CC: call 0x38031e10 */ /* not lifted */ 9037 RECOMP_FLAGS_IN(); 9038 L_3803D2D1: 9039 ecx = (int32_t)(int16_t)MEM16(ebp + (-0x14)); /* 0x3803D2D1: movsx ecx, word ptr [ebp - 0x14] */ 9040 /* cmp ecx, 0xFFFFFFFFu */ /* 0x3803D2D5: cmp ecx, -1 */ 9041 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xFFFFFFFFu); 9042 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9043 _flag_k = FK_CMP; 9044 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803D319; /* 0x3803D2D8: je 0x3803d319 */ 9045 L_3803D2DA: 9046 eax = MEM32(esi + 0x78); /* 0x3803D2DA: mov eax, dword ptr [esi + 0x78] */ 9047 PUSH32(esp, ecx); /* 0x3803D2DD: push ecx */ 9048 PUSH32(esp, eax); /* 0x3803D2DE: push eax */ 9049 RECOMP_ICALL(0x380295A0u); /* 0x3803D2DF: call 0x380295a0 */ /* not lifted */ 9050 RECOMP_FLAGS_IN(); 9051 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 9052 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9053 esp = esp + 4; /* 0x3803D2E4: add esp, 4 */ 9054 _flag_k = FK_ADD; 9055 ecx = eax; /* 0x3803D2E7: mov ecx, eax */ 9056 RECOMP_ICALL(0x3802B990u); /* 0x3803D2E9: call 0x3802b990 */ /* not lifted */ 9057 RECOMP_FLAGS_IN(); 9058 ecx = MEM32(eax + 0x78); /* 0x3803D2EE: mov ecx, dword ptr [eax + 0x78] */ 9059 edx = 3; /* 0x3803D2F1: mov edx, 3 */ 9060 if (((LO8(ecx)) & 31)) _cf = ((((LO8(ecx)) & 31)) <= 32 ? (((edx) >> (32 - (((LO8(ecx)) & 31)))) & 1u) : 0u); /* 0x3803D2F6: shl edx, cl */ 9061 if (((LO8(ecx)) & 31)) { _flag_a = recomp_flags_pack((edx << ((LO8(ecx)) & 31)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9062 edx = edx << ((LO8(ecx)) & 31); /* 0x3803D2F6: shl edx, cl */ 9063 ecx = MEM32(ebp + (-0x10)); /* 0x3803D2F8: mov ecx, dword ptr [ebp - 0x10] */ 9064 ecx = MEM32(ecx + 0x78); /* 0x3803D2FB: mov ecx, dword ptr [ecx + 0x78] */ 9065 eax = 3; /* 0x3803D2FE: mov eax, 3 */ 9066 if (((LO8(ecx)) & 31)) _cf = ((((LO8(ecx)) & 31)) <= 32 ? (((eax) >> (32 - (((LO8(ecx)) & 31)))) & 1u) : 0u); /* 0x3803D303: shl eax, cl */ 9067 if (((LO8(ecx)) & 31)) { _flag_a = recomp_flags_pack((eax << ((LO8(ecx)) & 31)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9068 eax = eax << ((LO8(ecx)) & 31); /* 0x3803D303: shl eax, cl */ 9069 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax); 9070 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9071 edx = edx + eax; /* 0x3803D305: add edx, eax */ 9072 _flag_k = FK_ADD; 9073 L_3803D307: 9074 ecx = MEM32(esi + 0xC4); /* 0x3803D307: mov ecx, dword ptr [esi + 0xc4] */ 9075 PUSH32(esp, edx); /* 0x3803D30D: push edx */ 9076 RECOMP_ICALL(MEM32(0x3804E26C)); /* 0x3803D30E: call dword ptr [0x3804e26c] */ 9077 RECOMP_FLAGS_IN(); 9078 edi = MEM32(ebp + (-0x10)); /* 0x3803D314: mov edi, dword ptr [ebp - 0x10] */ 9079 goto L_3803D33B; /* 0x3803D317: jmp 0x3803d33b */ 9080 L_3803D319: 9081 eax = MEM32(ebp + (-0x10)); /* 0x3803D319: mov eax, dword ptr [ebp - 0x10] */ 9082 ecx = MEM32(eax + 0x78); /* 0x3803D31C: mov ecx, dword ptr [eax + 0x78] */ 9083 edx = 3; /* 0x3803D31F: mov edx, 3 */ 9084 if (((LO8(ecx)) & 31)) _cf = ((((LO8(ecx)) & 31)) <= 32 ? (((edx) >> (32 - (((LO8(ecx)) & 31)))) & 1u) : 0u); /* 0x3803D324: shl edx, cl */ 9085 if (((LO8(ecx)) & 31)) { _flag_a = recomp_flags_pack((edx << ((LO8(ecx)) & 31)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9086 edx = edx << ((LO8(ecx)) & 31); /* 0x3803D324: shl edx, cl */ 9087 RECOMP_BACKEDGE(); 9088 goto L_3803D307; /* 0x3803D326: jmp 0x3803d307 */ 9089 L_3803D328: 9090 ecx = MEM32(edi + 0x78); /* 0x3803D328: mov ecx, dword ptr [edi + 0x78] */ 9091 edx = 3; /* 0x3803D32B: mov edx, 3 */ 9092 if (((LO8(ecx)) & 31)) _cf = ((((LO8(ecx)) & 31)) <= 32 ? (((edx) >> (32 - (((LO8(ecx)) & 31)))) & 1u) : 0u); /* 0x3803D330: shl edx, cl */ 9093 if (((LO8(ecx)) & 31)) { _flag_a = recomp_flags_pack((edx << ((LO8(ecx)) & 31)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9094 edx = edx << ((LO8(ecx)) & 31); /* 0x3803D330: shl edx, cl */ 9095 ecx = eax; /* 0x3803D332: mov ecx, eax */ 9096 PUSH32(esp, edx); /* 0x3803D334: push edx */ 9097 RECOMP_ICALL(MEM32(0x3804E26C)); /* 0x3803D335: call dword ptr [0x3804e26c] */ 9098 RECOMP_FLAGS_IN(); 9099 L_3803D33B: 9100 ecx = esi; /* 0x3803D33B: mov ecx, esi */ 9101 RECOMP_ICALL(0x38017CD0u); /* 0x3803D33D: call 0x38017cd0 */ /* not lifted */ 9102 RECOMP_FLAGS_IN(); 9103 /* test LO8(eax), LO8(eax) */ /* 0x3803D342: test al, al */ 9104 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 9105 _cf = 0; 9106 _flag_k = FK_NARROW(FK_TEST, 24); 9107 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D4E6; /* 0x3803D344: je 0x3803d4e6 */ 9108 L_3803D34A: 9109 ecx = edi; /* 0x3803D34A: mov ecx, edi */ 9110 RECOMP_ICALL(0x38031710u); /* 0x3803D34C: call 0x38031710 */ /* not lifted */ 9111 RECOMP_FLAGS_IN(); 9112 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803D351: mov al, byte ptr [ebp + 0xb] */ 9113 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9114 edi = 0; /* 0x3803D354: xor edi, edi */ 9115 _cf = 0; 9116 _flag_k = FK_TEST; 9117 MEM8(ebp + (-0x40)) = (uint8_t)(LO8(eax)); /* 0x3803D356: mov byte ptr [ebp - 0x40], al */ 9118 MEM32(ebp + (-0x3C)) = edi; /* 0x3803D359: mov dword ptr [ebp - 0x3c], edi */ 9119 MEM32(ebp + (-0x38)) = edi; /* 0x3803D35C: mov dword ptr [ebp - 0x38], edi */ 9120 MEM32(ebp + (-0x34)) = edi; /* 0x3803D35F: mov dword ptr [ebp - 0x34], edi */ 9121 PUSH32(esp, 0x40u); /* 0x3803D362: push 0x40 */ 9122 MEM32(ebp + (-0x4)) = edi; /* 0x3803D364: mov dword ptr [ebp - 4], edi */ 9123 RECOMP_ICALL(0x3804B676u); /* 0x3803D367: call 0x3804b676 */ /* not lifted */ 9124 RECOMP_FLAGS_IN(); 9125 ecx = MEM32(ebp + (-0x38)); /* 0x3803D36C: mov ecx, dword ptr [ebp - 0x38] */ 9126 edx = MEM32(ebp + (-0x3C)); /* 0x3803D36F: mov edx, dword ptr [ebp - 0x3c] */ 9127 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 9128 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9129 esp = esp + 4; /* 0x3803D372: add esp, 4 */ 9130 _flag_k = FK_ADD; 9131 esi = eax; /* 0x3803D375: mov esi, eax */ 9132 PUSH32(esp, esi); /* 0x3803D377: push esi */ 9133 PUSH32(esp, ecx); /* 0x3803D378: push ecx */ 9134 PUSH32(esp, edx); /* 0x3803D379: push edx */ 9135 ecx = ebp + (-0x40); /* 0x3803D37A: lea ecx, [ebp - 0x40] */ 9136 RECOMP_ICALL(0x3800A100u); /* 0x3803D37D: call 0x3800a100 */ /* not lifted */ 9137 RECOMP_FLAGS_IN(); 9138 eax = MEM32(ebp + (-0x38)); /* 0x3803D382: mov eax, dword ptr [ebp - 0x38] */ 9139 ecx = MEM32(ebp + (-0x3C)); /* 0x3803D385: mov ecx, dword ptr [ebp - 0x3c] */ 9140 PUSH32(esp, eax); /* 0x3803D388: push eax */ 9141 PUSH32(esp, ecx); /* 0x3803D389: push ecx */ 9142 ecx = ebp + (-0x40); /* 0x3803D38A: lea ecx, [ebp - 0x40] */ 9143 RECOMP_ICALL(0x38042760u); /* 0x3803D38D: call 0x38042760 */ /* not lifted */ 9144 RECOMP_FLAGS_IN(); 9145 edx = MEM32(ebp + (-0x3C)); /* 0x3803D392: mov edx, dword ptr [ebp - 0x3c] */ 9146 PUSH32(esp, edx); /* 0x3803D395: push edx */ 9147 RECOMP_ICALL(0x3804B4F6u); /* 0x3803D396: call 0x3804b4f6 */ /* not lifted */ 9148 RECOMP_FLAGS_IN(); 9149 ecx = MEM32(ebp + (-0x3C)); /* 0x3803D39B: mov ecx, dword ptr [ebp - 0x3c] */ 9150 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 9151 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9152 esp = esp + 4; /* 0x3803D39E: add esp, 4 */ 9153 _flag_k = FK_ADD; 9154 /* cmp ecx, edi */ /* 0x3803D3A1: cmp ecx, edi */ 9155 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 9156 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9157 _flag_k = FK_CMP; 9158 eax = esi + 0x40; /* 0x3803D3A3: lea eax, [esi + 0x40] */ 9159 MEM32(ebp + (-0x34)) = eax; /* 0x3803D3A6: mov dword ptr [ebp - 0x34], eax */ 9160 if (CMP_NE(_flag_a, _flag_b)) goto L_3803D3AF; /* 0x3803D3A9: jne 0x3803d3af */ 9161 L_3803D3AB: 9162 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9163 eax = 0; /* 0x3803D3AB: xor eax, eax */ 9164 _cf = 0; 9165 _flag_k = FK_TEST; 9166 goto L_3803D3B7; /* 0x3803D3AD: jmp 0x3803d3b7 */ 9167 L_3803D3AF: 9168 eax = MEM32(ebp + (-0x38)); /* 0x3803D3AF: mov eax, dword ptr [ebp - 0x38] */ 9169 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 9170 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9171 eax = eax - ecx; /* 0x3803D3B2: sub eax, ecx */ 9172 _flag_k = FK_CMP; 9173 if (2u) _cf = (((eax) >> 1) & 1u); /* 0x3803D3B4: sar eax, 2 */ 9174 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9175 eax = (uint32_t)((int32_t)eax >> 2u); 9176 L_3803D3B7: 9177 edx = esi + eax * 4; /* 0x3803D3B7: lea edx, [esi + eax*4] */ 9178 ecx = esi; /* 0x3803D3BA: mov ecx, esi */ 9179 esi = MEM32(ebx + 0x48); /* 0x3803D3BC: mov esi, dword ptr [ebx + 0x48] */ 9180 MEM32(ebp + (-0x38)) = edx; /* 0x3803D3BF: mov dword ptr [ebp - 0x38], edx */ 9181 MEM32(ebp + (-0x3C)) = ecx; /* 0x3803D3C2: mov dword ptr [ebp - 0x3c], ecx */ 9182 eax = MEM32(esi + 0x4); /* 0x3803D3C5: mov eax, dword ptr [esi + 4] */ 9183 eax = MEM32(eax); /* 0x3803D3C8: mov eax, dword ptr [eax] */ 9184 MEM32(ebp + (-0x10)) = eax; /* 0x3803D3CA: mov dword ptr [ebp - 0x10], eax */ 9185 /* cmp eax, MEM32(esi + 0x4) */ /* 0x3803D3CD: cmp eax, dword ptr [esi + 4] */ 9186 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(esi + 0x4)); 9187 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9188 _flag_k = FK_CMP; 9189 MEM32(ebp + (-0x18)) = esi; /* 0x3803D3D0: mov dword ptr [ebp - 0x18], esi */ 9190 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803D477; /* 0x3803D3D3: je 0x3803d477 */ 9191 L_3803D3D9: 9192 ebx = MEM32(eax + 0x10); /* 0x3803D3D9: mov ebx, dword ptr [eax + 0x10] */ 9193 eax = MEM32(eax + 0xC); /* 0x3803D3DC: mov eax, dword ptr [eax + 0xc] */ 9194 /* cmp eax, MEM32(ebp + 0x8) */ /* 0x3803D3DF: cmp eax, dword ptr [ebp + 8] */ 9195 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ebp + 0x8)); 9196 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9197 _flag_k = FK_CMP; 9198 MEM32(ebp + (-0x20)) = eax; /* 0x3803D3E2: mov dword ptr [ebp - 0x20], eax */ 9199 if (CMP_NE(_flag_a, _flag_b)) goto L_3803D41C; /* 0x3803D3E5: jne 0x3803d41c */ 9200 L_3803D3E7: 9201 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9202 esi = 0; /* 0x3803D3E7: xor esi, esi */ 9203 _cf = 0; 9204 _flag_k = FK_TEST; 9205 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9206 edi = 0; /* 0x3803D3E9: xor edi, edi */ 9207 _cf = 0; 9208 _flag_k = FK_TEST; 9209 L_3803D3EB: 9210 eax = MEM32(ebx + 0x4); /* 0x3803D3EB: mov eax, dword ptr [ebx + 4] */ 9211 /* test eax, eax */ /* 0x3803D3EE: test eax, eax */ 9212 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 9213 _cf = 0; 9214 _flag_k = FK_TEST; 9215 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D453; /* 0x3803D3F0: je 0x3803d453 */ 9216 L_3803D3F2: 9217 ecx = MEM32(ebx + 0x8); /* 0x3803D3F2: mov ecx, dword ptr [ebx + 8] */ 9218 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 9219 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9220 ecx = ecx - eax; /* 0x3803D3F5: sub ecx, eax */ 9221 _flag_k = FK_CMP; 9222 if (4u) _cf = (((ecx) >> 3) & 1u); /* 0x3803D3F7: sar ecx, 4 */ 9223 if (4u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 4u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9224 ecx = (uint32_t)((int32_t)ecx >> 4u); 9225 /* cmp esi, ecx */ /* 0x3803D3FA: cmp esi, ecx */ 9226 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 9227 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9228 _flag_k = FK_CMP; 9229 if (CMP_AE(_flag_a, _flag_b)) goto L_3803D453; /* 0x3803D3FC: jae 0x3803d453 */ 9230 L_3803D3FE: 9231 eax = MEM32(edi + eax); /* 0x3803D3FE: mov eax, dword ptr [edi + eax] */ 9232 ecx = ebp + (-0x1C); /* 0x3803D401: lea ecx, [ebp - 0x1c] */ 9233 PUSH32(esp, ecx); /* 0x3803D404: push ecx */ 9234 PUSH32(esp, 1); /* 0x3803D405: push 1 */ 9235 PUSH32(esp, edx); /* 0x3803D407: push edx */ 9236 ecx = ebp + (-0x40); /* 0x3803D408: lea ecx, [ebp - 0x40] */ 9237 MEM32(ebp + (-0x1C)) = eax; /* 0x3803D40B: mov dword ptr [ebp - 0x1c], eax */ 9238 RECOMP_ICALL(0x38009C60u); /* 0x3803D40E: call 0x38009c60 */ /* not lifted */ 9239 RECOMP_FLAGS_IN(); 9240 edx = MEM32(ebp + (-0x38)); /* 0x3803D413: mov edx, dword ptr [ebp - 0x38] */ 9241 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 9242 esi = esi + 1; /* 0x3803D416: inc esi */ 9243 _flag_k = FK_INC; 9244 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x10u); 9245 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9246 edi = edi + 0x10u; /* 0x3803D417: add edi, 0x10 */ 9247 _flag_k = FK_ADD; 9248 RECOMP_BACKEDGE(); 9249 goto L_3803D3EB; /* 0x3803D41A: jmp 0x3803d3eb */ 9250 L_3803D41C: 9251 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9252 esi = 0; /* 0x3803D41C: xor esi, esi */ 9253 _cf = 0; 9254 _flag_k = FK_TEST; 9255 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9256 edi = 0; /* 0x3803D41E: xor edi, edi */ 9257 _cf = 0; 9258 _flag_k = FK_TEST; 9259 L_3803D420: 9260 eax = MEM32(ebx + 0x4); /* 0x3803D420: mov eax, dword ptr [ebx + 4] */ 9261 /* test eax, eax */ /* 0x3803D423: test eax, eax */ 9262 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 9263 _cf = 0; 9264 _flag_k = FK_TEST; 9265 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D453; /* 0x3803D425: je 0x3803d453 */ 9266 L_3803D427: 9267 ecx = MEM32(ebx + 0x8); /* 0x3803D427: mov ecx, dword ptr [ebx + 8] */ 9268 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 9269 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9270 ecx = ecx - eax; /* 0x3803D42A: sub ecx, eax */ 9271 _flag_k = FK_CMP; 9272 if (4u) _cf = (((ecx) >> 3) & 1u); /* 0x3803D42C: sar ecx, 4 */ 9273 if (4u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 4u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9274 ecx = (uint32_t)((int32_t)ecx >> 4u); 9275 /* cmp esi, ecx */ /* 0x3803D42F: cmp esi, ecx */ 9276 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 9277 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9278 _flag_k = FK_CMP; 9279 if (CMP_AE(_flag_a, _flag_b)) goto L_3803D453; /* 0x3803D431: jae 0x3803d453 */ 9280 L_3803D433: 9281 ecx = MEM32(ebp + 0x8); /* 0x3803D433: mov ecx, dword ptr [ebp + 8] */ 9282 /* cmp MEM32(edi + eax), ecx */ /* 0x3803D436: cmp dword ptr [edi + eax], ecx */ 9283 _flag_a = (uint32_t)(MEM32(edi + eax)); _flag_b = (uint32_t)(ecx); 9284 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9285 _flag_k = FK_CMP; 9286 if (CMP_NE(_flag_a, _flag_b)) goto L_3803D44D; /* 0x3803D439: jne 0x3803d44d */ 9287 L_3803D43B: 9288 eax = ebp + (-0x20); /* 0x3803D43B: lea eax, [ebp - 0x20] */ 9289 PUSH32(esp, eax); /* 0x3803D43E: push eax */ 9290 PUSH32(esp, 1); /* 0x3803D43F: push 1 */ 9291 PUSH32(esp, edx); /* 0x3803D441: push edx */ 9292 ecx = ebp + (-0x40); /* 0x3803D442: lea ecx, [ebp - 0x40] */ 9293 RECOMP_ICALL(0x38009C60u); /* 0x3803D445: call 0x38009c60 */ /* not lifted */ 9294 RECOMP_FLAGS_IN(); 9295 edx = MEM32(ebp + (-0x38)); /* 0x3803D44A: mov edx, dword ptr [ebp - 0x38] */ 9296 L_3803D44D: 9297 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 9298 esi = esi + 1; /* 0x3803D44D: inc esi */ 9299 _flag_k = FK_INC; 9300 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x10u); 9301 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9302 edi = edi + 0x10u; /* 0x3803D44E: add edi, 0x10 */ 9303 _flag_k = FK_ADD; 9304 RECOMP_BACKEDGE(); 9305 goto L_3803D420; /* 0x3803D451: jmp 0x3803d420 */ 9306 L_3803D453: 9307 ecx = ebp + (-0x10); /* 0x3803D453: lea ecx, [ebp - 0x10] */ 9308 RECOMP_ICALL(0x38035590u); /* 0x3803D456: call 0x38035590 */ /* not lifted */ 9309 RECOMP_FLAGS_IN(); 9310 ecx = MEM32(ebp + (-0x18)); /* 0x3803D45B: mov ecx, dword ptr [ebp - 0x18] */ 9311 ecx = MEM32(ecx + 0x4); /* 0x3803D45E: mov ecx, dword ptr [ecx + 4] */ 9312 eax = MEM32(ebp + (-0x10)); /* 0x3803D461: mov eax, dword ptr [ebp - 0x10] */ 9313 /* cmp eax, ecx */ /* 0x3803D464: cmp eax, ecx */ 9314 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 9315 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9316 _flag_k = FK_CMP; 9317 edx = MEM32(ebp + (-0x38)); /* 0x3803D466: mov edx, dword ptr [ebp - 0x38] */ 9318 RECOMP_BACKEDGE(); 9319 if (CMP_NE(_flag_a, _flag_b)) goto L_3803D3D9; /* 0x3803D469: jne 0x3803d3d9 */ 9320 L_3803D46F: 9321 ecx = MEM32(ebp + (-0x3C)); /* 0x3803D46F: mov ecx, dword ptr [ebp - 0x3c] */ 9322 ebx = MEM32(ebp + (-0x24)); /* 0x3803D472: mov ebx, dword ptr [ebp - 0x24] */ 9323 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9324 edi = 0; /* 0x3803D475: xor edi, edi */ 9325 _cf = 0; 9326 _flag_k = FK_TEST; 9327 L_3803D477: 9328 /* cmp ecx, edi */ /* 0x3803D477: cmp ecx, edi */ 9329 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 9330 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9331 _flag_k = FK_CMP; 9332 if (CMP_NE(_flag_a, _flag_b)) goto L_3803D480; /* 0x3803D479: jne 0x3803d480 */ 9333 L_3803D47B: 9334 MEM32(ebp + (-0x14)) = edi; /* 0x3803D47B: mov dword ptr [ebp - 0x14], edi */ 9335 goto L_3803D488; /* 0x3803D47E: jmp 0x3803d488 */ 9336 L_3803D480: 9337 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx); 9338 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9339 edx = edx - ecx; /* 0x3803D480: sub edx, ecx */ 9340 _flag_k = FK_CMP; 9341 if (2u) _cf = (((edx) >> 1) & 1u); /* 0x3803D482: sar edx, 2 */ 9342 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9343 edx = (uint32_t)((int32_t)edx >> 2u); 9344 MEM32(ebp + (-0x14)) = edx; /* 0x3803D485: mov dword ptr [ebp - 0x14], edx */ 9345 L_3803D488: 9346 eax = MEM32(ebp + (-0x14)); /* 0x3803D488: mov eax, dword ptr [ebp - 0x14] */ 9347 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9348 esi = 0; /* 0x3803D48B: xor esi, esi */ 9349 _cf = 0; 9350 _flag_k = FK_TEST; 9351 /* cmp eax, edi */ /* 0x3803D48D: cmp eax, edi */ 9352 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 9353 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9354 _flag_k = FK_CMP; 9355 if (CMP_LE(_flag_a, _flag_b)) goto L_3803D4BE; /* 0x3803D48F: jle 0x3803d4be */ 9356 L_3803D491: 9357 goto L_3803D496; /* 0x3803D491: jmp 0x3803d496 */ 9358 L_3803D493: 9359 ecx = MEM32(ebp + (-0x3C)); /* 0x3803D493: mov ecx, dword ptr [ebp - 0x3c] */ 9360 L_3803D496: 9361 eax = MEM32(ecx + esi * 4); /* 0x3803D496: mov eax, dword ptr [ecx + esi*4] */ 9362 PUSH32(esp, eax); /* 0x3803D499: push eax */ 9363 ecx = ebx; /* 0x3803D49A: mov ecx, ebx */ 9364 RECOMP_ICALL(0x3802B990u); /* 0x3803D49C: call 0x3802b990 */ /* not lifted */ 9365 RECOMP_FLAGS_IN(); 9366 edx = MEM32(ebp + 0x8); /* 0x3803D4A1: mov edx, dword ptr [ebp + 8] */ 9367 PUSH32(esp, edx); /* 0x3803D4A4: push edx */ 9368 ecx = ebx; /* 0x3803D4A5: mov ecx, ebx */ 9369 edi = eax; /* 0x3803D4A7: mov edi, eax */ 9370 RECOMP_ICALL(0x38029E80u); /* 0x3803D4A9: call 0x38029e80 */ /* not lifted */ 9371 RECOMP_FLAGS_IN(); 9372 PUSH32(esp, eax); /* 0x3803D4AE: push eax */ 9373 ecx = edi; /* 0x3803D4AF: mov ecx, edi */ 9374 RECOMP_ICALL(0x38030DE0u); /* 0x3803D4B1: call 0x38030de0 */ /* not lifted */ 9375 RECOMP_FLAGS_IN(); 9376 eax = MEM32(ebp + (-0x14)); /* 0x3803D4B6: mov eax, dword ptr [ebp - 0x14] */ 9377 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 9378 esi = esi + 1; /* 0x3803D4B9: inc esi */ 9379 _flag_k = FK_INC; 9380 /* cmp esi, eax */ /* 0x3803D4BA: cmp esi, eax */ 9381 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 9382 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9383 _flag_k = FK_CMP; 9384 RECOMP_BACKEDGE(); 9385 if (CMP_L(_flag_a, _flag_b)) goto L_3803D493; /* 0x3803D4BC: jl 0x3803d493 */ 9386 L_3803D4BE: 9387 eax = MEM32(ebp + 0x8); /* 0x3803D4BE: mov eax, dword ptr [ebp + 8] */ 9388 PUSH32(esp, eax); /* 0x3803D4C1: push eax */ 9389 ecx = ebx; /* 0x3803D4C2: mov ecx, ebx */ 9390 RECOMP_ICALL(0x3802B990u); /* 0x3803D4C4: call 0x3802b990 */ /* not lifted */ 9391 RECOMP_FLAGS_IN(); 9392 ecx = ebx; /* 0x3803D4C9: mov ecx, ebx */ 9393 esi = eax; /* 0x3803D4CB: mov esi, eax */ 9394 RECOMP_ICALL(0x38029E80u); /* 0x3803D4CD: call 0x38029e80 */ /* not lifted */ 9395 RECOMP_FLAGS_IN(); 9396 PUSH32(esp, eax); /* 0x3803D4D2: push eax */ 9397 ecx = esi; /* 0x3803D4D3: mov ecx, esi */ 9398 RECOMP_ICALL(0x380304D0u); /* 0x3803D4D5: call 0x380304d0 */ /* not lifted */ 9399 RECOMP_FLAGS_IN(); 9400 ecx = MEM32(ebp + (-0x3C)); /* 0x3803D4DA: mov ecx, dword ptr [ebp - 0x3c] */ 9401 PUSH32(esp, ecx); /* 0x3803D4DD: push ecx */ 9402 RECOMP_ICALL(0x3804B4F6u); /* 0x3803D4DE: call 0x3804b4f6 */ /* not lifted */ 9403 RECOMP_FLAGS_IN(); 9404 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 9405 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9406 esp = esp + 4; /* 0x3803D4E3: add esp, 4 */ 9407 _flag_k = FK_ADD; 9408 L_3803D4E6: 9409 ecx = MEM32(ebp + (-0xC)); /* 0x3803D4E6: mov ecx, dword ptr [ebp - 0xc] */ 9410 edi = POP32_VAL(esp); /* 0x3803D4E9: pop edi */ 9411 esi = POP32_VAL(esp); /* 0x3803D4EA: pop esi */ 9412 ebx = POP32_VAL(esp); /* 0x3803D4EB: pop ebx */ 9413 MEM32(FS_BASE + (0)) = ecx; /* 0x3803D4EC: mov dword ptr fs:[0], ecx */ 9414 esp = ebp; /* 0x3803D4F3: mov esp, ebp */ 9415 ebp = POP32_VAL(esp); /* 0x3803D4F5: pop ebp */ 9416 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803D4F6: ret 4 */ 9417 RECOMP_REGS_OUT(); 9418 } 9419 9420 void sub_3803D33B(void) { 9421 int _fpu_cmp = 0; 9422 uint32_t _cf = 0; 9423 int _df = 1; 9424 uint32_t _flag_k = FK_NONE; 9425 uint32_t _flag_a = 0, _flag_b = 0; 9426 uint32_t _itail_tgt = 0; 9427 RECOMP_REGS_LOCALS 9428 RECOMP_ENTER(0x3803D33Bu); 9429 9430 L_3803D33B: 9431 ecx = esi; /* 0x3803D33B: mov ecx, esi */ 9432 RECOMP_ICALL(0x38017CD0u); /* 0x3803D33D: call 0x38017cd0 */ /* not lifted */ 9433 RECOMP_FLAGS_IN(); 9434 /* test LO8(eax), LO8(eax) */ /* 0x3803D342: test al, al */ 9435 _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24; 9436 _cf = 0; 9437 _flag_k = FK_NARROW(FK_TEST, 24); 9438 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D4E6; /* 0x3803D344: je 0x3803d4e6 */ 9439 L_3803D34A: 9440 ecx = edi; /* 0x3803D34A: mov ecx, edi */ 9441 RECOMP_ICALL(0x38031710u); /* 0x3803D34C: call 0x38031710 */ /* not lifted */ 9442 RECOMP_FLAGS_IN(); 9443 SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x3803D351: mov al, byte ptr [ebp + 0xb] */ 9444 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9445 edi = 0; /* 0x3803D354: xor edi, edi */ 9446 _cf = 0; 9447 _flag_k = FK_TEST; 9448 MEM8(ebp + (-0x40)) = (uint8_t)(LO8(eax)); /* 0x3803D356: mov byte ptr [ebp - 0x40], al */ 9449 MEM32(ebp + (-0x3C)) = edi; /* 0x3803D359: mov dword ptr [ebp - 0x3c], edi */ 9450 MEM32(ebp + (-0x38)) = edi; /* 0x3803D35C: mov dword ptr [ebp - 0x38], edi */ 9451 MEM32(ebp + (-0x34)) = edi; /* 0x3803D35F: mov dword ptr [ebp - 0x34], edi */ 9452 PUSH32(esp, 0x40u); /* 0x3803D362: push 0x40 */ 9453 MEM32(ebp + (-0x4)) = edi; /* 0x3803D364: mov dword ptr [ebp - 4], edi */ 9454 RECOMP_ICALL(0x3804B676u); /* 0x3803D367: call 0x3804b676 */ /* not lifted */ 9455 RECOMP_FLAGS_IN(); 9456 ecx = MEM32(ebp + (-0x38)); /* 0x3803D36C: mov ecx, dword ptr [ebp - 0x38] */ 9457 edx = MEM32(ebp + (-0x3C)); /* 0x3803D36F: mov edx, dword ptr [ebp - 0x3c] */ 9458 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 9459 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9460 esp = esp + 4; /* 0x3803D372: add esp, 4 */ 9461 _flag_k = FK_ADD; 9462 esi = eax; /* 0x3803D375: mov esi, eax */ 9463 PUSH32(esp, esi); /* 0x3803D377: push esi */ 9464 PUSH32(esp, ecx); /* 0x3803D378: push ecx */ 9465 PUSH32(esp, edx); /* 0x3803D379: push edx */ 9466 ecx = ebp + (-0x40); /* 0x3803D37A: lea ecx, [ebp - 0x40] */ 9467 RECOMP_ICALL(0x3800A100u); /* 0x3803D37D: call 0x3800a100 */ /* not lifted */ 9468 RECOMP_FLAGS_IN(); 9469 eax = MEM32(ebp + (-0x38)); /* 0x3803D382: mov eax, dword ptr [ebp - 0x38] */ 9470 ecx = MEM32(ebp + (-0x3C)); /* 0x3803D385: mov ecx, dword ptr [ebp - 0x3c] */ 9471 PUSH32(esp, eax); /* 0x3803D388: push eax */ 9472 PUSH32(esp, ecx); /* 0x3803D389: push ecx */ 9473 ecx = ebp + (-0x40); /* 0x3803D38A: lea ecx, [ebp - 0x40] */ 9474 RECOMP_ICALL(0x38042760u); /* 0x3803D38D: call 0x38042760 */ /* not lifted */ 9475 RECOMP_FLAGS_IN(); 9476 edx = MEM32(ebp + (-0x3C)); /* 0x3803D392: mov edx, dword ptr [ebp - 0x3c] */ 9477 PUSH32(esp, edx); /* 0x3803D395: push edx */ 9478 RECOMP_ICALL(0x3804B4F6u); /* 0x3803D396: call 0x3804b4f6 */ /* not lifted */ 9479 RECOMP_FLAGS_IN(); 9480 ecx = MEM32(ebp + (-0x3C)); /* 0x3803D39B: mov ecx, dword ptr [ebp - 0x3c] */ 9481 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 9482 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9483 esp = esp + 4; /* 0x3803D39E: add esp, 4 */ 9484 _flag_k = FK_ADD; 9485 /* cmp ecx, edi */ /* 0x3803D3A1: cmp ecx, edi */ 9486 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 9487 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9488 _flag_k = FK_CMP; 9489 eax = esi + 0x40; /* 0x3803D3A3: lea eax, [esi + 0x40] */ 9490 MEM32(ebp + (-0x34)) = eax; /* 0x3803D3A6: mov dword ptr [ebp - 0x34], eax */ 9491 if (CMP_NE(_flag_a, _flag_b)) goto L_3803D3AF; /* 0x3803D3A9: jne 0x3803d3af */ 9492 L_3803D3AB: 9493 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9494 eax = 0; /* 0x3803D3AB: xor eax, eax */ 9495 _cf = 0; 9496 _flag_k = FK_TEST; 9497 goto L_3803D3B7; /* 0x3803D3AD: jmp 0x3803d3b7 */ 9498 L_3803D3AF: 9499 eax = MEM32(ebp + (-0x38)); /* 0x3803D3AF: mov eax, dword ptr [ebp - 0x38] */ 9500 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 9501 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9502 eax = eax - ecx; /* 0x3803D3B2: sub eax, ecx */ 9503 _flag_k = FK_CMP; 9504 if (2u) _cf = (((eax) >> 1) & 1u); /* 0x3803D3B4: sar eax, 2 */ 9505 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9506 eax = (uint32_t)((int32_t)eax >> 2u); 9507 L_3803D3B7: 9508 edx = esi + eax * 4; /* 0x3803D3B7: lea edx, [esi + eax*4] */ 9509 ecx = esi; /* 0x3803D3BA: mov ecx, esi */ 9510 esi = MEM32(ebx + 0x48); /* 0x3803D3BC: mov esi, dword ptr [ebx + 0x48] */ 9511 MEM32(ebp + (-0x38)) = edx; /* 0x3803D3BF: mov dword ptr [ebp - 0x38], edx */ 9512 MEM32(ebp + (-0x3C)) = ecx; /* 0x3803D3C2: mov dword ptr [ebp - 0x3c], ecx */ 9513 eax = MEM32(esi + 0x4); /* 0x3803D3C5: mov eax, dword ptr [esi + 4] */ 9514 eax = MEM32(eax); /* 0x3803D3C8: mov eax, dword ptr [eax] */ 9515 MEM32(ebp + (-0x10)) = eax; /* 0x3803D3CA: mov dword ptr [ebp - 0x10], eax */ 9516 /* cmp eax, MEM32(esi + 0x4) */ /* 0x3803D3CD: cmp eax, dword ptr [esi + 4] */ 9517 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(esi + 0x4)); 9518 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9519 _flag_k = FK_CMP; 9520 MEM32(ebp + (-0x18)) = esi; /* 0x3803D3D0: mov dword ptr [ebp - 0x18], esi */ 9521 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803D477; /* 0x3803D3D3: je 0x3803d477 */ 9522 L_3803D3D9: 9523 ebx = MEM32(eax + 0x10); /* 0x3803D3D9: mov ebx, dword ptr [eax + 0x10] */ 9524 eax = MEM32(eax + 0xC); /* 0x3803D3DC: mov eax, dword ptr [eax + 0xc] */ 9525 /* cmp eax, MEM32(ebp + 0x8) */ /* 0x3803D3DF: cmp eax, dword ptr [ebp + 8] */ 9526 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ebp + 0x8)); 9527 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9528 _flag_k = FK_CMP; 9529 MEM32(ebp + (-0x20)) = eax; /* 0x3803D3E2: mov dword ptr [ebp - 0x20], eax */ 9530 if (CMP_NE(_flag_a, _flag_b)) goto L_3803D41C; /* 0x3803D3E5: jne 0x3803d41c */ 9531 L_3803D3E7: 9532 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9533 esi = 0; /* 0x3803D3E7: xor esi, esi */ 9534 _cf = 0; 9535 _flag_k = FK_TEST; 9536 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9537 edi = 0; /* 0x3803D3E9: xor edi, edi */ 9538 _cf = 0; 9539 _flag_k = FK_TEST; 9540 L_3803D3EB: 9541 eax = MEM32(ebx + 0x4); /* 0x3803D3EB: mov eax, dword ptr [ebx + 4] */ 9542 /* test eax, eax */ /* 0x3803D3EE: test eax, eax */ 9543 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 9544 _cf = 0; 9545 _flag_k = FK_TEST; 9546 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D453; /* 0x3803D3F0: je 0x3803d453 */ 9547 L_3803D3F2: 9548 ecx = MEM32(ebx + 0x8); /* 0x3803D3F2: mov ecx, dword ptr [ebx + 8] */ 9549 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 9550 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9551 ecx = ecx - eax; /* 0x3803D3F5: sub ecx, eax */ 9552 _flag_k = FK_CMP; 9553 if (4u) _cf = (((ecx) >> 3) & 1u); /* 0x3803D3F7: sar ecx, 4 */ 9554 if (4u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 4u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9555 ecx = (uint32_t)((int32_t)ecx >> 4u); 9556 /* cmp esi, ecx */ /* 0x3803D3FA: cmp esi, ecx */ 9557 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 9558 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9559 _flag_k = FK_CMP; 9560 if (CMP_AE(_flag_a, _flag_b)) goto L_3803D453; /* 0x3803D3FC: jae 0x3803d453 */ 9561 L_3803D3FE: 9562 eax = MEM32(edi + eax); /* 0x3803D3FE: mov eax, dword ptr [edi + eax] */ 9563 ecx = ebp + (-0x1C); /* 0x3803D401: lea ecx, [ebp - 0x1c] */ 9564 PUSH32(esp, ecx); /* 0x3803D404: push ecx */ 9565 PUSH32(esp, 1); /* 0x3803D405: push 1 */ 9566 PUSH32(esp, edx); /* 0x3803D407: push edx */ 9567 ecx = ebp + (-0x40); /* 0x3803D408: lea ecx, [ebp - 0x40] */ 9568 MEM32(ebp + (-0x1C)) = eax; /* 0x3803D40B: mov dword ptr [ebp - 0x1c], eax */ 9569 RECOMP_ICALL(0x38009C60u); /* 0x3803D40E: call 0x38009c60 */ /* not lifted */ 9570 RECOMP_FLAGS_IN(); 9571 edx = MEM32(ebp + (-0x38)); /* 0x3803D413: mov edx, dword ptr [ebp - 0x38] */ 9572 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 9573 esi = esi + 1; /* 0x3803D416: inc esi */ 9574 _flag_k = FK_INC; 9575 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x10u); 9576 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9577 edi = edi + 0x10u; /* 0x3803D417: add edi, 0x10 */ 9578 _flag_k = FK_ADD; 9579 RECOMP_BACKEDGE(); 9580 goto L_3803D3EB; /* 0x3803D41A: jmp 0x3803d3eb */ 9581 L_3803D41C: 9582 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9583 esi = 0; /* 0x3803D41C: xor esi, esi */ 9584 _cf = 0; 9585 _flag_k = FK_TEST; 9586 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9587 edi = 0; /* 0x3803D41E: xor edi, edi */ 9588 _cf = 0; 9589 _flag_k = FK_TEST; 9590 L_3803D420: 9591 eax = MEM32(ebx + 0x4); /* 0x3803D420: mov eax, dword ptr [ebx + 4] */ 9592 /* test eax, eax */ /* 0x3803D423: test eax, eax */ 9593 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 9594 _cf = 0; 9595 _flag_k = FK_TEST; 9596 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D453; /* 0x3803D425: je 0x3803d453 */ 9597 L_3803D427: 9598 ecx = MEM32(ebx + 0x8); /* 0x3803D427: mov ecx, dword ptr [ebx + 8] */ 9599 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 9600 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9601 ecx = ecx - eax; /* 0x3803D42A: sub ecx, eax */ 9602 _flag_k = FK_CMP; 9603 if (4u) _cf = (((ecx) >> 3) & 1u); /* 0x3803D42C: sar ecx, 4 */ 9604 if (4u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 4u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9605 ecx = (uint32_t)((int32_t)ecx >> 4u); 9606 /* cmp esi, ecx */ /* 0x3803D42F: cmp esi, ecx */ 9607 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 9608 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9609 _flag_k = FK_CMP; 9610 if (CMP_AE(_flag_a, _flag_b)) goto L_3803D453; /* 0x3803D431: jae 0x3803d453 */ 9611 L_3803D433: 9612 ecx = MEM32(ebp + 0x8); /* 0x3803D433: mov ecx, dword ptr [ebp + 8] */ 9613 /* cmp MEM32(edi + eax), ecx */ /* 0x3803D436: cmp dword ptr [edi + eax], ecx */ 9614 _flag_a = (uint32_t)(MEM32(edi + eax)); _flag_b = (uint32_t)(ecx); 9615 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9616 _flag_k = FK_CMP; 9617 if (CMP_NE(_flag_a, _flag_b)) goto L_3803D44D; /* 0x3803D439: jne 0x3803d44d */ 9618 L_3803D43B: 9619 eax = ebp + (-0x20); /* 0x3803D43B: lea eax, [ebp - 0x20] */ 9620 PUSH32(esp, eax); /* 0x3803D43E: push eax */ 9621 PUSH32(esp, 1); /* 0x3803D43F: push 1 */ 9622 PUSH32(esp, edx); /* 0x3803D441: push edx */ 9623 ecx = ebp + (-0x40); /* 0x3803D442: lea ecx, [ebp - 0x40] */ 9624 RECOMP_ICALL(0x38009C60u); /* 0x3803D445: call 0x38009c60 */ /* not lifted */ 9625 RECOMP_FLAGS_IN(); 9626 edx = MEM32(ebp + (-0x38)); /* 0x3803D44A: mov edx, dword ptr [ebp - 0x38] */ 9627 L_3803D44D: 9628 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 9629 esi = esi + 1; /* 0x3803D44D: inc esi */ 9630 _flag_k = FK_INC; 9631 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x10u); 9632 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9633 edi = edi + 0x10u; /* 0x3803D44E: add edi, 0x10 */ 9634 _flag_k = FK_ADD; 9635 RECOMP_BACKEDGE(); 9636 goto L_3803D420; /* 0x3803D451: jmp 0x3803d420 */ 9637 L_3803D453: 9638 ecx = ebp + (-0x10); /* 0x3803D453: lea ecx, [ebp - 0x10] */ 9639 RECOMP_ICALL(0x38035590u); /* 0x3803D456: call 0x38035590 */ /* not lifted */ 9640 RECOMP_FLAGS_IN(); 9641 ecx = MEM32(ebp + (-0x18)); /* 0x3803D45B: mov ecx, dword ptr [ebp - 0x18] */ 9642 ecx = MEM32(ecx + 0x4); /* 0x3803D45E: mov ecx, dword ptr [ecx + 4] */ 9643 eax = MEM32(ebp + (-0x10)); /* 0x3803D461: mov eax, dword ptr [ebp - 0x10] */ 9644 /* cmp eax, ecx */ /* 0x3803D464: cmp eax, ecx */ 9645 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 9646 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9647 _flag_k = FK_CMP; 9648 edx = MEM32(ebp + (-0x38)); /* 0x3803D466: mov edx, dword ptr [ebp - 0x38] */ 9649 RECOMP_BACKEDGE(); 9650 if (CMP_NE(_flag_a, _flag_b)) goto L_3803D3D9; /* 0x3803D469: jne 0x3803d3d9 */ 9651 L_3803D46F: 9652 ecx = MEM32(ebp + (-0x3C)); /* 0x3803D46F: mov ecx, dword ptr [ebp - 0x3c] */ 9653 ebx = MEM32(ebp + (-0x24)); /* 0x3803D472: mov ebx, dword ptr [ebp - 0x24] */ 9654 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9655 edi = 0; /* 0x3803D475: xor edi, edi */ 9656 _cf = 0; 9657 _flag_k = FK_TEST; 9658 L_3803D477: 9659 /* cmp ecx, edi */ /* 0x3803D477: cmp ecx, edi */ 9660 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 9661 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9662 _flag_k = FK_CMP; 9663 if (CMP_NE(_flag_a, _flag_b)) goto L_3803D480; /* 0x3803D479: jne 0x3803d480 */ 9664 L_3803D47B: 9665 MEM32(ebp + (-0x14)) = edi; /* 0x3803D47B: mov dword ptr [ebp - 0x14], edi */ 9666 goto L_3803D488; /* 0x3803D47E: jmp 0x3803d488 */ 9667 L_3803D480: 9668 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx); 9669 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9670 edx = edx - ecx; /* 0x3803D480: sub edx, ecx */ 9671 _flag_k = FK_CMP; 9672 if (2u) _cf = (((edx) >> 1) & 1u); /* 0x3803D482: sar edx, 2 */ 9673 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9674 edx = (uint32_t)((int32_t)edx >> 2u); 9675 MEM32(ebp + (-0x14)) = edx; /* 0x3803D485: mov dword ptr [ebp - 0x14], edx */ 9676 L_3803D488: 9677 eax = MEM32(ebp + (-0x14)); /* 0x3803D488: mov eax, dword ptr [ebp - 0x14] */ 9678 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9679 esi = 0; /* 0x3803D48B: xor esi, esi */ 9680 _cf = 0; 9681 _flag_k = FK_TEST; 9682 /* cmp eax, edi */ /* 0x3803D48D: cmp eax, edi */ 9683 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 9684 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9685 _flag_k = FK_CMP; 9686 if (CMP_LE(_flag_a, _flag_b)) goto L_3803D4BE; /* 0x3803D48F: jle 0x3803d4be */ 9687 L_3803D491: 9688 goto L_3803D496; /* 0x3803D491: jmp 0x3803d496 */ 9689 L_3803D493: 9690 ecx = MEM32(ebp + (-0x3C)); /* 0x3803D493: mov ecx, dword ptr [ebp - 0x3c] */ 9691 L_3803D496: 9692 eax = MEM32(ecx + esi * 4); /* 0x3803D496: mov eax, dword ptr [ecx + esi*4] */ 9693 PUSH32(esp, eax); /* 0x3803D499: push eax */ 9694 ecx = ebx; /* 0x3803D49A: mov ecx, ebx */ 9695 RECOMP_ICALL(0x3802B990u); /* 0x3803D49C: call 0x3802b990 */ /* not lifted */ 9696 RECOMP_FLAGS_IN(); 9697 edx = MEM32(ebp + 0x8); /* 0x3803D4A1: mov edx, dword ptr [ebp + 8] */ 9698 PUSH32(esp, edx); /* 0x3803D4A4: push edx */ 9699 ecx = ebx; /* 0x3803D4A5: mov ecx, ebx */ 9700 edi = eax; /* 0x3803D4A7: mov edi, eax */ 9701 RECOMP_ICALL(0x38029E80u); /* 0x3803D4A9: call 0x38029e80 */ /* not lifted */ 9702 RECOMP_FLAGS_IN(); 9703 PUSH32(esp, eax); /* 0x3803D4AE: push eax */ 9704 ecx = edi; /* 0x3803D4AF: mov ecx, edi */ 9705 RECOMP_ICALL(0x38030DE0u); /* 0x3803D4B1: call 0x38030de0 */ /* not lifted */ 9706 RECOMP_FLAGS_IN(); 9707 eax = MEM32(ebp + (-0x14)); /* 0x3803D4B6: mov eax, dword ptr [ebp - 0x14] */ 9708 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 9709 esi = esi + 1; /* 0x3803D4B9: inc esi */ 9710 _flag_k = FK_INC; 9711 /* cmp esi, eax */ /* 0x3803D4BA: cmp esi, eax */ 9712 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 9713 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9714 _flag_k = FK_CMP; 9715 RECOMP_BACKEDGE(); 9716 if (CMP_L(_flag_a, _flag_b)) goto L_3803D493; /* 0x3803D4BC: jl 0x3803d493 */ 9717 L_3803D4BE: 9718 eax = MEM32(ebp + 0x8); /* 0x3803D4BE: mov eax, dword ptr [ebp + 8] */ 9719 PUSH32(esp, eax); /* 0x3803D4C1: push eax */ 9720 ecx = ebx; /* 0x3803D4C2: mov ecx, ebx */ 9721 RECOMP_ICALL(0x3802B990u); /* 0x3803D4C4: call 0x3802b990 */ /* not lifted */ 9722 RECOMP_FLAGS_IN(); 9723 ecx = ebx; /* 0x3803D4C9: mov ecx, ebx */ 9724 esi = eax; /* 0x3803D4CB: mov esi, eax */ 9725 RECOMP_ICALL(0x38029E80u); /* 0x3803D4CD: call 0x38029e80 */ /* not lifted */ 9726 RECOMP_FLAGS_IN(); 9727 PUSH32(esp, eax); /* 0x3803D4D2: push eax */ 9728 ecx = esi; /* 0x3803D4D3: mov ecx, esi */ 9729 RECOMP_ICALL(0x380304D0u); /* 0x3803D4D5: call 0x380304d0 */ /* not lifted */ 9730 RECOMP_FLAGS_IN(); 9731 ecx = MEM32(ebp + (-0x3C)); /* 0x3803D4DA: mov ecx, dword ptr [ebp - 0x3c] */ 9732 PUSH32(esp, ecx); /* 0x3803D4DD: push ecx */ 9733 RECOMP_ICALL(0x3804B4F6u); /* 0x3803D4DE: call 0x3804b4f6 */ /* not lifted */ 9734 RECOMP_FLAGS_IN(); 9735 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 9736 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9737 esp = esp + 4; /* 0x3803D4E3: add esp, 4 */ 9738 _flag_k = FK_ADD; 9739 L_3803D4E6: 9740 ecx = MEM32(ebp + (-0xC)); /* 0x3803D4E6: mov ecx, dword ptr [ebp - 0xc] */ 9741 edi = POP32_VAL(esp); /* 0x3803D4E9: pop edi */ 9742 esi = POP32_VAL(esp); /* 0x3803D4EA: pop esi */ 9743 ebx = POP32_VAL(esp); /* 0x3803D4EB: pop ebx */ 9744 MEM32(FS_BASE + (0)) = ecx; /* 0x3803D4EC: mov dword ptr fs:[0], ecx */ 9745 esp = ebp; /* 0x3803D4F3: mov esp, ebp */ 9746 ebp = POP32_VAL(esp); /* 0x3803D4F5: pop ebp */ 9747 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803D4F6: ret 4 */ 9748 RECOMP_REGS_OUT(); 9749 } 9750 9751 void sub_3803D3B7(void) { 9752 int _fpu_cmp = 0; 9753 uint32_t _cf = 0; 9754 int _df = 1; 9755 uint32_t _flag_k = FK_NONE; 9756 uint32_t _flag_a = 0, _flag_b = 0; 9757 uint32_t _itail_tgt = 0; 9758 RECOMP_REGS_LOCALS 9759 RECOMP_ENTER(0x3803D3B7u); 9760 9761 L_3803D3B7: 9762 edx = esi + eax * 4; /* 0x3803D3B7: lea edx, [esi + eax*4] */ 9763 ecx = esi; /* 0x3803D3BA: mov ecx, esi */ 9764 esi = MEM32(ebx + 0x48); /* 0x3803D3BC: mov esi, dword ptr [ebx + 0x48] */ 9765 MEM32(ebp + (-0x38)) = edx; /* 0x3803D3BF: mov dword ptr [ebp - 0x38], edx */ 9766 MEM32(ebp + (-0x3C)) = ecx; /* 0x3803D3C2: mov dword ptr [ebp - 0x3c], ecx */ 9767 eax = MEM32(esi + 0x4); /* 0x3803D3C5: mov eax, dword ptr [esi + 4] */ 9768 eax = MEM32(eax); /* 0x3803D3C8: mov eax, dword ptr [eax] */ 9769 MEM32(ebp + (-0x10)) = eax; /* 0x3803D3CA: mov dword ptr [ebp - 0x10], eax */ 9770 /* cmp eax, MEM32(esi + 0x4) */ /* 0x3803D3CD: cmp eax, dword ptr [esi + 4] */ 9771 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(esi + 0x4)); 9772 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9773 _flag_k = FK_CMP; 9774 MEM32(ebp + (-0x18)) = esi; /* 0x3803D3D0: mov dword ptr [ebp - 0x18], esi */ 9775 if (CMP_EQ(_flag_a, _flag_b)) goto L_3803D477; /* 0x3803D3D3: je 0x3803d477 */ 9776 L_3803D3D9: 9777 ebx = MEM32(eax + 0x10); /* 0x3803D3D9: mov ebx, dword ptr [eax + 0x10] */ 9778 eax = MEM32(eax + 0xC); /* 0x3803D3DC: mov eax, dword ptr [eax + 0xc] */ 9779 /* cmp eax, MEM32(ebp + 0x8) */ /* 0x3803D3DF: cmp eax, dword ptr [ebp + 8] */ 9780 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ebp + 0x8)); 9781 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9782 _flag_k = FK_CMP; 9783 MEM32(ebp + (-0x20)) = eax; /* 0x3803D3E2: mov dword ptr [ebp - 0x20], eax */ 9784 if (CMP_NE(_flag_a, _flag_b)) goto L_3803D41C; /* 0x3803D3E5: jne 0x3803d41c */ 9785 L_3803D3E7: 9786 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9787 esi = 0; /* 0x3803D3E7: xor esi, esi */ 9788 _cf = 0; 9789 _flag_k = FK_TEST; 9790 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9791 edi = 0; /* 0x3803D3E9: xor edi, edi */ 9792 _cf = 0; 9793 _flag_k = FK_TEST; 9794 L_3803D3EB: 9795 eax = MEM32(ebx + 0x4); /* 0x3803D3EB: mov eax, dword ptr [ebx + 4] */ 9796 /* test eax, eax */ /* 0x3803D3EE: test eax, eax */ 9797 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 9798 _cf = 0; 9799 _flag_k = FK_TEST; 9800 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D453; /* 0x3803D3F0: je 0x3803d453 */ 9801 L_3803D3F2: 9802 ecx = MEM32(ebx + 0x8); /* 0x3803D3F2: mov ecx, dword ptr [ebx + 8] */ 9803 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 9804 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9805 ecx = ecx - eax; /* 0x3803D3F5: sub ecx, eax */ 9806 _flag_k = FK_CMP; 9807 if (4u) _cf = (((ecx) >> 3) & 1u); /* 0x3803D3F7: sar ecx, 4 */ 9808 if (4u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 4u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9809 ecx = (uint32_t)((int32_t)ecx >> 4u); 9810 /* cmp esi, ecx */ /* 0x3803D3FA: cmp esi, ecx */ 9811 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 9812 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9813 _flag_k = FK_CMP; 9814 if (CMP_AE(_flag_a, _flag_b)) goto L_3803D453; /* 0x3803D3FC: jae 0x3803d453 */ 9815 L_3803D3FE: 9816 eax = MEM32(edi + eax); /* 0x3803D3FE: mov eax, dword ptr [edi + eax] */ 9817 ecx = ebp + (-0x1C); /* 0x3803D401: lea ecx, [ebp - 0x1c] */ 9818 PUSH32(esp, ecx); /* 0x3803D404: push ecx */ 9819 PUSH32(esp, 1); /* 0x3803D405: push 1 */ 9820 PUSH32(esp, edx); /* 0x3803D407: push edx */ 9821 ecx = ebp + (-0x40); /* 0x3803D408: lea ecx, [ebp - 0x40] */ 9822 MEM32(ebp + (-0x1C)) = eax; /* 0x3803D40B: mov dword ptr [ebp - 0x1c], eax */ 9823 RECOMP_ICALL(0x38009C60u); /* 0x3803D40E: call 0x38009c60 */ /* not lifted */ 9824 RECOMP_FLAGS_IN(); 9825 edx = MEM32(ebp + (-0x38)); /* 0x3803D413: mov edx, dword ptr [ebp - 0x38] */ 9826 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 9827 esi = esi + 1; /* 0x3803D416: inc esi */ 9828 _flag_k = FK_INC; 9829 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x10u); 9830 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9831 edi = edi + 0x10u; /* 0x3803D417: add edi, 0x10 */ 9832 _flag_k = FK_ADD; 9833 RECOMP_BACKEDGE(); 9834 goto L_3803D3EB; /* 0x3803D41A: jmp 0x3803d3eb */ 9835 L_3803D41C: 9836 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9837 esi = 0; /* 0x3803D41C: xor esi, esi */ 9838 _cf = 0; 9839 _flag_k = FK_TEST; 9840 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9841 edi = 0; /* 0x3803D41E: xor edi, edi */ 9842 _cf = 0; 9843 _flag_k = FK_TEST; 9844 L_3803D420: 9845 eax = MEM32(ebx + 0x4); /* 0x3803D420: mov eax, dword ptr [ebx + 4] */ 9846 /* test eax, eax */ /* 0x3803D423: test eax, eax */ 9847 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax); 9848 _cf = 0; 9849 _flag_k = FK_TEST; 9850 if (TEST_Z(_flag_a, _flag_b)) goto L_3803D453; /* 0x3803D425: je 0x3803d453 */ 9851 L_3803D427: 9852 ecx = MEM32(ebx + 0x8); /* 0x3803D427: mov ecx, dword ptr [ebx + 8] */ 9853 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax); 9854 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9855 ecx = ecx - eax; /* 0x3803D42A: sub ecx, eax */ 9856 _flag_k = FK_CMP; 9857 if (4u) _cf = (((ecx) >> 3) & 1u); /* 0x3803D42C: sar ecx, 4 */ 9858 if (4u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 4u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9859 ecx = (uint32_t)((int32_t)ecx >> 4u); 9860 /* cmp esi, ecx */ /* 0x3803D42F: cmp esi, ecx */ 9861 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx); 9862 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9863 _flag_k = FK_CMP; 9864 if (CMP_AE(_flag_a, _flag_b)) goto L_3803D453; /* 0x3803D431: jae 0x3803d453 */ 9865 L_3803D433: 9866 ecx = MEM32(ebp + 0x8); /* 0x3803D433: mov ecx, dword ptr [ebp + 8] */ 9867 /* cmp MEM32(edi + eax), ecx */ /* 0x3803D436: cmp dword ptr [edi + eax], ecx */ 9868 _flag_a = (uint32_t)(MEM32(edi + eax)); _flag_b = (uint32_t)(ecx); 9869 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9870 _flag_k = FK_CMP; 9871 if (CMP_NE(_flag_a, _flag_b)) goto L_3803D44D; /* 0x3803D439: jne 0x3803d44d */ 9872 L_3803D43B: 9873 eax = ebp + (-0x20); /* 0x3803D43B: lea eax, [ebp - 0x20] */ 9874 PUSH32(esp, eax); /* 0x3803D43E: push eax */ 9875 PUSH32(esp, 1); /* 0x3803D43F: push 1 */ 9876 PUSH32(esp, edx); /* 0x3803D441: push edx */ 9877 ecx = ebp + (-0x40); /* 0x3803D442: lea ecx, [ebp - 0x40] */ 9878 RECOMP_ICALL(0x38009C60u); /* 0x3803D445: call 0x38009c60 */ /* not lifted */ 9879 RECOMP_FLAGS_IN(); 9880 edx = MEM32(ebp + (-0x38)); /* 0x3803D44A: mov edx, dword ptr [ebp - 0x38] */ 9881 L_3803D44D: 9882 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 9883 esi = esi + 1; /* 0x3803D44D: inc esi */ 9884 _flag_k = FK_INC; 9885 _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x10u); 9886 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9887 edi = edi + 0x10u; /* 0x3803D44E: add edi, 0x10 */ 9888 _flag_k = FK_ADD; 9889 RECOMP_BACKEDGE(); 9890 goto L_3803D420; /* 0x3803D451: jmp 0x3803d420 */ 9891 L_3803D453: 9892 ecx = ebp + (-0x10); /* 0x3803D453: lea ecx, [ebp - 0x10] */ 9893 RECOMP_ICALL(0x38035590u); /* 0x3803D456: call 0x38035590 */ /* not lifted */ 9894 RECOMP_FLAGS_IN(); 9895 ecx = MEM32(ebp + (-0x18)); /* 0x3803D45B: mov ecx, dword ptr [ebp - 0x18] */ 9896 ecx = MEM32(ecx + 0x4); /* 0x3803D45E: mov ecx, dword ptr [ecx + 4] */ 9897 eax = MEM32(ebp + (-0x10)); /* 0x3803D461: mov eax, dword ptr [ebp - 0x10] */ 9898 /* cmp eax, ecx */ /* 0x3803D464: cmp eax, ecx */ 9899 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx); 9900 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9901 _flag_k = FK_CMP; 9902 edx = MEM32(ebp + (-0x38)); /* 0x3803D466: mov edx, dword ptr [ebp - 0x38] */ 9903 RECOMP_BACKEDGE(); 9904 if (CMP_NE(_flag_a, _flag_b)) goto L_3803D3D9; /* 0x3803D469: jne 0x3803d3d9 */ 9905 L_3803D46F: 9906 ecx = MEM32(ebp + (-0x3C)); /* 0x3803D46F: mov ecx, dword ptr [ebp - 0x3c] */ 9907 ebx = MEM32(ebp + (-0x24)); /* 0x3803D472: mov ebx, dword ptr [ebp - 0x24] */ 9908 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9909 edi = 0; /* 0x3803D475: xor edi, edi */ 9910 _cf = 0; 9911 _flag_k = FK_TEST; 9912 L_3803D477: 9913 /* cmp ecx, edi */ /* 0x3803D477: cmp ecx, edi */ 9914 _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi); 9915 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9916 _flag_k = FK_CMP; 9917 if (CMP_NE(_flag_a, _flag_b)) goto L_3803D480; /* 0x3803D479: jne 0x3803d480 */ 9918 L_3803D47B: 9919 MEM32(ebp + (-0x14)) = edi; /* 0x3803D47B: mov dword ptr [ebp - 0x14], edi */ 9920 goto L_3803D488; /* 0x3803D47E: jmp 0x3803d488 */ 9921 L_3803D480: 9922 _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx); 9923 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9924 edx = edx - ecx; /* 0x3803D480: sub edx, ecx */ 9925 _flag_k = FK_CMP; 9926 if (2u) _cf = (((edx) >> 1) & 1u); /* 0x3803D482: sar edx, 2 */ 9927 if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; } 9928 edx = (uint32_t)((int32_t)edx >> 2u); 9929 MEM32(ebp + (-0x14)) = edx; /* 0x3803D485: mov dword ptr [ebp - 0x14], edx */ 9930 L_3803D488: 9931 eax = MEM32(ebp + (-0x14)); /* 0x3803D488: mov eax, dword ptr [ebp - 0x14] */ 9932 _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0); 9933 esi = 0; /* 0x3803D48B: xor esi, esi */ 9934 _cf = 0; 9935 _flag_k = FK_TEST; 9936 /* cmp eax, edi */ /* 0x3803D48D: cmp eax, edi */ 9937 _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi); 9938 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9939 _flag_k = FK_CMP; 9940 if (CMP_LE(_flag_a, _flag_b)) goto L_3803D4BE; /* 0x3803D48F: jle 0x3803d4be */ 9941 L_3803D491: 9942 goto L_3803D496; /* 0x3803D491: jmp 0x3803d496 */ 9943 L_3803D493: 9944 ecx = MEM32(ebp + (-0x3C)); /* 0x3803D493: mov ecx, dword ptr [ebp - 0x3c] */ 9945 L_3803D496: 9946 eax = MEM32(ecx + esi * 4); /* 0x3803D496: mov eax, dword ptr [ecx + esi*4] */ 9947 PUSH32(esp, eax); /* 0x3803D499: push eax */ 9948 ecx = ebx; /* 0x3803D49A: mov ecx, ebx */ 9949 RECOMP_ICALL(0x3802B990u); /* 0x3803D49C: call 0x3802b990 */ /* not lifted */ 9950 RECOMP_FLAGS_IN(); 9951 edx = MEM32(ebp + 0x8); /* 0x3803D4A1: mov edx, dword ptr [ebp + 8] */ 9952 PUSH32(esp, edx); /* 0x3803D4A4: push edx */ 9953 ecx = ebx; /* 0x3803D4A5: mov ecx, ebx */ 9954 edi = eax; /* 0x3803D4A7: mov edi, eax */ 9955 RECOMP_ICALL(0x38029E80u); /* 0x3803D4A9: call 0x38029e80 */ /* not lifted */ 9956 RECOMP_FLAGS_IN(); 9957 PUSH32(esp, eax); /* 0x3803D4AE: push eax */ 9958 ecx = edi; /* 0x3803D4AF: mov ecx, edi */ 9959 RECOMP_ICALL(0x38030DE0u); /* 0x3803D4B1: call 0x38030de0 */ /* not lifted */ 9960 RECOMP_FLAGS_IN(); 9961 eax = MEM32(ebp + (-0x14)); /* 0x3803D4B6: mov eax, dword ptr [ebp - 0x14] */ 9962 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1); 9963 esi = esi + 1; /* 0x3803D4B9: inc esi */ 9964 _flag_k = FK_INC; 9965 /* cmp esi, eax */ /* 0x3803D4BA: cmp esi, eax */ 9966 _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax); 9967 _cf = (uint32_t)CMP_B(_flag_a, _flag_b); 9968 _flag_k = FK_CMP; 9969 RECOMP_BACKEDGE(); 9970 if (CMP_L(_flag_a, _flag_b)) goto L_3803D493; /* 0x3803D4BC: jl 0x3803d493 */ 9971 L_3803D4BE: 9972 eax = MEM32(ebp + 0x8); /* 0x3803D4BE: mov eax, dword ptr [ebp + 8] */ 9973 PUSH32(esp, eax); /* 0x3803D4C1: push eax */ 9974 ecx = ebx; /* 0x3803D4C2: mov ecx, ebx */ 9975 RECOMP_ICALL(0x3802B990u); /* 0x3803D4C4: call 0x3802b990 */ /* not lifted */ 9976 RECOMP_FLAGS_IN(); 9977 ecx = ebx; /* 0x3803D4C9: mov ecx, ebx */ 9978 esi = eax; /* 0x3803D4CB: mov esi, eax */ 9979 RECOMP_ICALL(0x38029E80u); /* 0x3803D4CD: call 0x38029e80 */ /* not lifted */ 9980 RECOMP_FLAGS_IN(); 9981 PUSH32(esp, eax); /* 0x3803D4D2: push eax */ 9982 ecx = esi; /* 0x3803D4D3: mov ecx, esi */ 9983 RECOMP_ICALL(0x380304D0u); /* 0x3803D4D5: call 0x380304d0 */ /* not lifted */ 9984 RECOMP_FLAGS_IN(); 9985 ecx = MEM32(ebp + (-0x3C)); /* 0x3803D4DA: mov ecx, dword ptr [ebp - 0x3c] */ 9986 PUSH32(esp, ecx); /* 0x3803D4DD: push ecx */ 9987 RECOMP_ICALL(0x3804B4F6u); /* 0x3803D4DE: call 0x3804b4f6 */ /* not lifted */ 9988 RECOMP_FLAGS_IN(); 9989 _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4); 9990 _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a); 9991 esp = esp + 4; /* 0x3803D4E3: add esp, 4 */ 9992 _flag_k = FK_ADD; 9993 ecx = MEM32(ebp + (-0xC)); /* 0x3803D4E6: mov ecx, dword ptr [ebp - 0xc] */ 9994 edi = POP32_VAL(esp); /* 0x3803D4E9: pop edi */ 9995 esi = POP32_VAL(esp); /* 0x3803D4EA: pop esi */ 9996 ebx = POP32_VAL(esp); /* 0x3803D4EB: pop ebx */ 9997 MEM32(FS_BASE + (0)) = ecx; /* 0x3803D4EC: mov dword ptr fs:[0], ecx */ 9998 esp = ebp; /* 0x3803D4F3: mov esp, ebp */ 9999 ebp = POP32_VAL(esp); /* 0x3803D4F5: pop ebp */ 10000 RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3803D4F6: ret 4 */ 10001 RECOMP_REGS_OUT(); 10002 }