|
1240 | 1240 | {1, 0xE8}, GAP(4), // call _exit
|
1241 | 1241 | };
|
1242 | 1242 |
|
| 1243 | +static AsmFootPrint const SDK109Target104X86 = { |
| 1244 | + // start |
| 1245 | + { 2, 0x6A, 0x00 }, // push 0 |
| 1246 | + { 2, 0x89, 0xE5 }, // mov ebp, esp |
| 1247 | + { 3, 0x83, 0xE4, 0xF0 }, // and esp, 0FFFFFFF0h |
| 1248 | + { 3, 0x83, 0xEC, 0x10 }, // sub esp, 10h |
| 1249 | + { 3, 0x8B, 0x5D, 0x04 }, // mov ebx, [ebp+4] |
| 1250 | + { 3, 0x89, 0x1C, 0x24 }, // mov [esp+14h+var_14], ebx |
| 1251 | + { 3, 0x8D, 0x4D, 0x08 }, // lea ecx, [ebp+8] |
| 1252 | + { 4, 0x89, 0x4C, 0x24, 0x04 }, // mov [esp+14h+var_10], ecx |
| 1253 | + { 3, 0x83, 0xC3, 0x01 }, // add ebx, 1 |
| 1254 | + { 3, 0xC1, 0xE3, 0x02 }, // shl ebx, 2 |
| 1255 | + { 2, 0x01, 0xCB }, // add ebx, ecx |
| 1256 | + { 4, 0x89, 0x5C, 0x24, 0x08 }, // mov [esp+14h+var_C], ebx |
| 1257 | + { 5, 0xE8, 0x01, 0x00, 0x00, 0x00 }, // call __start |
| 1258 | + { 1, 0xF4 }, // hlt |
| 1259 | + |
| 1260 | + // __start |
| 1261 | + { 1, 0x55 }, // push ebp |
| 1262 | + { 2, 0x89, 0xE5 }, // mov ebp, esp |
| 1263 | + { 1, 0x53 }, // push ebx |
| 1264 | + { 1, 0x57 }, // push edi |
| 1265 | + { 1, 0x56 }, // push esi |
| 1266 | + { 3, 0x83, 0xEC, 0x1C }, // sub esp, 1Ch |
| 1267 | + { 3, 0x8B, 0x45, 0x08 }, // mov eax, [ebp+arg_ |
| 1268 | + { 1, 0xA3 }, GAP(4), // mov ds:_NXArgc, eax |
| 1269 | + { 3, 0x8B, 0x7D, 0x0C }, // mov edi, [ebp+arg_4] |
| 1270 | + { 2, 0x89, 0x3D }, GAP(4), // mov ds:_NXArgv, edi |
| 1271 | + { 3, 0x8B, 0x75, 0x10 }, // mov esi, [ebp+arg_8] |
| 1272 | + { 2, 0x89, 0x35 }, GAP(4), // mov ds:_environ, esi |
| 1273 | + { 2, 0x8B, 0x07 }, // mov eax, [edi] |
| 1274 | + { 1, 0xB9 }, GAP(4), // mov ecx, 12EB30h |
| 1275 | + { 2, 0x85, 0xC0 }, // test eax, eax |
| 1276 | + { 2, 0x74, 0x1A }, // jz short loc_2551 |
| 1277 | + { 2, 0xEB, 0x02 }, // jmp short loc_253B |
| 1278 | + |
| 1279 | + // loc_2539: |
| 1280 | + { 2, 0x89, 0xC8 }, // mov eax, ecx |
| 1281 | + |
| 1282 | + // loc_253B: |
| 1283 | + { 3, 0x8D, 0x48, 0x01 }, // lea ecx, [eax+1] |
| 1284 | + { 2, 0xEB, 0x01 }, // jmp short loc_2541 |
| 1285 | + |
| 1286 | + // loc_2540: |
| 1287 | + { 1, 0x41 }, // inc ecx |
| 1288 | + |
| 1289 | + // loc_2541: |
| 1290 | + { 3, 0x8A, 0x51, 0xFF }, // mov dl, [ecx-1] |
| 1291 | + { 2, 0x84, 0xD2 }, // test dl, dl |
| 1292 | + { 2, 0x74, 0x07 }, // jz short loc_254F |
| 1293 | + { 3, 0x80, 0xFA, 0x2F }, // cmp dl, 2Fh |
| 1294 | + { 2, 0x75, 0xF3 }, // jnz short loc_2540 |
| 1295 | + { 2, 0xEB, 0xEA }, // jmp short loc_2539 |
| 1296 | + |
| 1297 | + // loc_254F: |
| 1298 | + { 3, 0x89, 0xC1, 0x89 }, // mov ecx, eax |
| 1299 | + |
| 1300 | + // loc_2551: |
| 1301 | + { 1, 0x0D }, GAP(4), // mov ds:___progname, ecx |
| 1302 | + { 2, 0x89, 0xF3 }, // mov ebx, esi |
| 1303 | + |
| 1304 | + // loc_2559: |
| 1305 | + { 3, 0x83, 0x3B, 0x00 }, // cmp dword ptr [ebx], 0 |
| 1306 | + { 3, 0x8D, 0x5B, 0x04 }, // lea ebx, [ebx+4] |
| 1307 | + { 2, 0x75, 0xF8 }, // jnz short loc_2559 |
| 1308 | + { 1, 0xA1 }, GAP(4), // mov eax, ds:_mach_init_routine_ptr |
| 1309 | + { 2, 0x8B, 0x00 }, // mov eax, [eax] |
| 1310 | + { 2, 0x85, 0xC0 }, // test eax, eax |
| 1311 | + { 2, 0x74, 0x02 }, // jz short loc_256E |
| 1312 | + { 2, 0xFF, 0xD0 }, // call eax |
| 1313 | + |
| 1314 | + |
| 1315 | + // loc_256E: |
| 1316 | + { 1, 0xA1 }, GAP(4), // mov eax, ds:__cthread_init_routine_ptr |
| 1317 | + { 2, 0x8B, 0x00 }, // mov eax, [eax] |
| 1318 | + { 2, 0x85, 0xC0 }, // test eax, eax |
| 1319 | + { 2, 0x74, 0x02 }, // jz short loc_257B |
| 1320 | + { 2, 0xFF, 0xD0 }, // call eax |
| 1321 | + |
| 1322 | + // loc_257B: |
| 1323 | + { 1, 0xE8 }, GAP(4), // call ___keymgr_dwarf2_register_sections |
| 1324 | + { 3, 0x8D, 0x45, 0xEC }, // lea eax, [ebp+var_14] |
| 1325 | + { 4, 0x89, 0x44, 0x24, 0x04 }, // mov [esp+4], eax |
| 1326 | + { 3, 0xC7, 0x04, 0x24 }, GAP(4), // mov dword ptr [esp], offset a__dyld_make_de ; |
| 1327 | + { 1, 0xE8 }, GAP(4), // call __dyld_func_lookup |
| 1328 | + { 3, 0xFF, 0x55, 0xEC }, // call [ebp+var_14] |
| 1329 | + { 3, 0x8D, 0x45, 0xF0 }, // lea eax, [ebp+var_10] |
| 1330 | + { 4, 0x89, 0x44, 0x24, 0x04 }, // mov [esp+4], eax |
| 1331 | + { 3, 0xC7, 0x04, 0x24 }, GAP(4), // mov dword ptr [esp], offset a__dyld_mod_ter ; |
| 1332 | + { 1, 0xE8 }, GAP(4), // call __dyld_func_lookup |
| 1333 | + { 3, 0x8B, 0x45, 0xF0 }, // mov eax, [ebp+var_10] |
| 1334 | + { 2, 0x85, 0xC0 }, // test eax, eax |
| 1335 | + { 2, 0x74, 0x08 }, // jz short loc_25B8 |
| 1336 | + { 3, 0x89, 0x04, 0x24 }, // mov [esp], eax ; void (*)(void) |
| 1337 | + { 1, 0xE8 }, GAP(4), // call _atexit |
| 1338 | + |
| 1339 | + // loc_25B8: |
| 1340 | + { 1, 0xA1 }, GAP(4), // mov eax, ds:_errno_ptr |
| 1341 | + { 6, 0xC7, 0x00, 0x00, 0x00, 0x00, 0x00 }, // mov dword ptr [eax], 0 |
| 1342 | + { 4, 0x89, 0x5C, 0x24, 0x0C }, // mov [esp+0Ch], ebx |
| 1343 | + { 4, 0x89, 0x74, 0x24, 0x08 }, // mov [esp+8], esi |
| 1344 | + { 4, 0x89, 0x7C, 0x24, 0x04 }, // mov [esp+4], edi |
| 1345 | + { 3, 0x8B, 0x45, 0x08 }, // mov eax, [ebp+arg_0] |
| 1346 | + { 3, 0x89, 0x04, 0x24 }, // mov [esp], eax |
| 1347 | + { 1, 0xE8 }, GAP(4), // call _main |
| 1348 | + { 3, 0x89, 0x04, 0x24 }, // mov [esp], eax |
| 1349 | + { 1, 0xE8 }, GAP(4) // call _exit |
| 1350 | +}; |
| 1351 | + |
1243 | 1352 |
|
1244 | 1353 | // SDK106Target105X86_64 == SDK105Target105X86_64;
|
1245 | 1354 |
|
@@ -1371,6 +1480,13 @@ - (void) determineRuntimeVersion
|
1371 | 1480 | rootNode.caption = [rootNode.caption stringByAppendingString:@" [SDK10.6 Target10.5]"];
|
1372 | 1481 | return;
|
1373 | 1482 | }
|
| 1483 | + else if (MATCHASM (SDK109Target104X86)) |
| 1484 | + { |
| 1485 | + NSLog(@"SDK109Target104X86 matched"); |
| 1486 | + |
| 1487 | + rootNode.caption = [rootNode.caption stringByAppendingString:@" [SDK10.9 Target10.4]"]; |
| 1488 | + return; |
| 1489 | + } |
1374 | 1490 | }
|
1375 | 1491 | else
|
1376 | 1492 | {
|
|
0 commit comments