新生 Final Fantasy XIV は Windows 2000で動くか?その2
新生 Final Fantasy が Windows 2000で何も表示が出ずに落ちる原因が分かったのでさらに追跡調査。
GetProcAddress(0x77E50000 [KERNEL32.dll], "GetLogicalProcessorInformation") called from "ffxiv.exe" at address 0x00B2A728 and returned 0x77EA5D66. Second chance exception 0xC0000094 (Integer Divide by Zero) occurred in "ffxiv.exe" at address 0x00B2DDBC. Exited "ffxiv.exe" (process 0x878) with code 128 (0x80). |
L00B2DD4C: lea edx,[esp+10h] push edx mov [edi+00000250h],ebx call SUB_L00B2A6E0 mov eax,[esp+14h] //Buffer add esp,00000004h //Buffer + 4 mov [esp+14h],eax test ebx,ebx jle L00B2DDEE push ebp //Buffer mov dword ptr [esp+10h],00000000h mov ebp,00000001h lea esi,[edi+30h] L00B2DD80: lea eax,[edi+00000248h] lea ecx,[esi-28h] mov [ecx],eax mov eax,[esp+20h] //Buffer+1ch mov [esi-10h],ebp mov dword ptr [esi],00000000h mov dword ptr [esi+04h],00000000h mov byte ptr [esi-08h],00h mov byte ptr [esi-07h],00h cmp dword ptr [eax+10h],00000000h jle L00B2DDB9 mov edx,[eax+0Ch] //// Buffer mov eax,[esp+10h] mov edx,[eax+edx] jmp L00B2DDC0 L00B2DDB9: mov eax,ebp cdq ///PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer +4 idiv [esp+18h] L00B2DDC0: |
落ちてるのはここ。
[ESP+18h]が 格納されてるのは直前の青字の関数のようだ。
SUB_L00B2A6E0: sub esp,00000C28h lea eax,[esp+04h] push eax call [KERNEL32.dll!GetSystemInfo] mov eax,[esp+18h] cmp eax,0000000Ch jl L00B2A6FF mov eax,0000000Ch L00B2A6FF: push ebx mov ebx,[esp+00000C30h] push edi push SSZ00EB6758_kernel32_dll mov [ebx],eax call [KERNEL32.dll!LoadLibraryA] mov edi,eax test edi,edi jz L00B2A77A push esi push SSZ00F7FBE0_GetLogicalProcessorInformation push edi call [KERNEL32.dll!GetProcAddress] mov esi,eax test esi,esi jz L00B2A772 lea ecx,[esp+0Ch] push ecx push 00000000h mov dword ptr [esp+14h],00000000h call esi cmp dword ptr [esp+0Ch],00000C00h ja L00B2A772 lea edx,[esp+0Ch] push edx lea eax,[esp+38h] //// PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer push eax call esi mov ecx,[esp+0Ch] xor eax,eax xor edx,edx test ecx,ecx jbe L00B2A770 L00B2A761: cmp dword ptr [esp+eax+38h],00000000h //// PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer + 4 jnz L00B2A769 inc edx L00B2A769: add eax,00000018h cmp eax,ecx jc L00B2A761 L00B2A770: mov [ebx],edx L00B2A772: push edi call [KERNEL32.dll!FreeLibrary] pop esi L00B2A77A: pop edi pop ebx add esp,00000C28h retn |
どうやら、RelationProcessorCore の数を返しているらしい。
残念ながら、拡張カーネルはGetLogicalProcessorInformationで エラーを返すのだが…
この関数は、GetLogicalProcessorInformation のエラーチェックをせず、値を取りに行っているので、
コアの数 0が返る ・ω・;
というわけで、GetLogicalProcessorInformation をちゃんと実装しないと動かないことが判明
(つづく?)
Comments