[saco] Implement/match the 0x100B45xx-0x100B47xx GetModelInfo wrapper band; the store-then-reload of the returned pointer is the _asm mov <local>, reg fingerprint

This commit is contained in:
ricardoofnl
2026-09-05 10:24:54 +07:00
parent 0ffc91b7fd
commit 78cf6daf38
2 changed files with 119 additions and 0 deletions
+111
View File
@@ -1544,3 +1544,114 @@ void FUNC_100B5720()
_asm pop edx
_asm popad
}
//-----------------------------------------------------------
BOOL __stdcall FUNC_100B4570(int iModel)
{
DWORD *pModelInfo = GetModelInfo(iModel);
// retail tests the sum, so a compare against -20 emits the wrong shape
if(pModelInfo && *pModelInfo + 20 != 0)
{
return TRUE;
}
return FALSE;
}
//-----------------------------------------------------------
DWORD __stdcall FUNC_100B45A0(int iModel)
{
DWORD *pModelInfo = GetModelInfo(iModel);
DWORD dwRet = 0;
_asm mov eax, pModelInfo
_asm mov edx, [eax+0x1C]
_asm mov dwRet, edx
return dwRet;
}
//-----------------------------------------------------------
void __stdcall FUNC_100B45D0(int iModel, int a2)
{
DWORD *pModelInfo = GetModelInfo(iModel);
_asm mov ecx, pModelInfo
_asm mov edx, a2
_asm mov [ecx+0x1C], edx
_asm push a2
_asm mov edx, [ecx]
_asm call dword ptr [edx+0x40]
}
//-----------------------------------------------------------
void __stdcall FUNC_100B4600(int iModel, int a2)
{
DWORD *pModelInfo = GetModelInfo(iModel);
_asm mov ecx, pModelInfo
_asm mov edx, a2
_asm mov [ecx+0x1C], edx
_asm push a2
_asm mov edx, [ecx]
_asm call dword ptr [edx+0x3C]
}
//-----------------------------------------------------------
void __stdcall FUNC_100B4630(int iModel, int a2)
{
DWORD *pModelInfo = GetModelInfo(iModel);
_asm mov ecx, pModelInfo
_asm push 0
_asm push a2
_asm mov edx, 0x4C4BC0
_asm call edx
}
//-----------------------------------------------------------
DWORD __stdcall FUNC_100B46D0(int iModel)
{
DWORD *pModelInfo = GetModelInfo(iModel);
DWORD dwRet = 0;
_asm mov eax, pModelInfo
_asm mov edx, [eax+0x14]
_asm mov dwRet, edx
return dwRet;
}
//-----------------------------------------------------------
WORD __stdcall FUNC_100B4700(int iModel)
{
DWORD *pModelInfo = GetModelInfo(iModel);
WORD wRet = 0;
_asm mov edx, pModelInfo
_asm mov bx, [edx+8]
_asm mov wRet, bx
return wRet;
}
//-----------------------------------------------------------
void __stdcall FUNC_100B4730(int iModel, WORD wValue)
{
DWORD *pModelInfo = GetModelInfo(iModel);
if(pModelInfo)
{
_asm mov edx, pModelInfo
_asm mov bx, wValue
_asm mov [edx+8], bx
}
}
+8
View File
@@ -132,6 +132,14 @@ void FUNC_100B46C0(DWORD dwValue); // .text:100B46C0
float FUNC_100B4FE0(float x, float y, float z); // .text:100B4FE0
int FUNC_100B56D0(int a1, int a2, int a3); // .text:100B56D0
void FUNC_100B5720(); // .text:100B5720
BOOL __stdcall FUNC_100B4570(int iModel); // .text:100B4570
DWORD __stdcall FUNC_100B45A0(int iModel); // .text:100B45A0
void __stdcall FUNC_100B45D0(int iModel, int a2); // .text:100B45D0
void __stdcall FUNC_100B4600(int iModel, int a2); // .text:100B4600
void __stdcall FUNC_100B4630(int iModel, int a2); // .text:100B4630
DWORD __stdcall FUNC_100B46D0(int iModel); // .text:100B46D0
WORD __stdcall FUNC_100B4700(int iModel); // .text:100B4700
void __stdcall FUNC_100B4730(int iModel, WORD wValue); // .text:100B4730
void FUNC_100B5210(int a1, void *a2); // .text:100B5210, __cdecl: the caller's
// stack cleanup is folded into the next call's argument setup