//
// sub_180090C40 from 0x180090c40 to 0x180090d7a (314 bytes)
//
// 2 xrefs:
// > sub_180090FD0 @ 0x180090fe8
// > ??> @ 0x1801fa758
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:53:44 +0000
//
__int64 __fastcall sub_180090C40(__int64 *a1, int a2, _DWORD *a3, _DWORD *a4)
{
__int64 v4; // rdi
__int64 v7; // r10
v4 = *a1;
if ( a2 == 8 )
{
v7 = *(_QWORD *)(v4 + 552);
if ( (*(_BYTE *)(v7 + 56) & 1) != 0 )
{
(*(void (__fastcall **)(__int64, _QWORD, _QWORD, _QWORD, _DWORD *, _DWORD))(v7 + 8))(
v7,
15 - (unsigned int)(a4 != nullptr),
0,
0,
a3,
0);
*(_BYTE *)(v4 + 544) = a4 != nullptr;
return 0;
}
}
else if ( a2 == 32 )
{
if ( a3 || a4 )
{
(*(void (__fastcall **)(_QWORD, __int64, _QWORD))(*(_QWORD *)(v4 + 552) + 8LL))(*(_QWORD *)(v4 + 552), 13, 0);
if ( a3 )
*a3 = MEMORY[6] - MEMORY[2];
if ( a4 )
{
*a4 = MEMORY[4] - MEMORY[0];
return 0;
}
}
}
else if ( a2 == 4 && *(_BYTE *)(v4 + 544) )
{
(*(void (__fastcall **)(_QWORD, __int64, _QWORD))(*(_QWORD *)(v4 + 552) + 8LL))(*(_QWORD *)(v4 + 552), 19, 0);
}
return 0;
}