//
// sub_100901E30 from 0x100901e30 to 0x100901f0b (219 bytes)
//
// 5 xrefs:
// > ??> @ 0x100bb3960
// > ??> @ 0x100bb8cc0
// > ??> @ 0x100bbdfe8
// > ??> @ 0x100bbf7c0
// > ??> @ 0x100bd59a0
//
// 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 12:38:03 +0000
//
__int64 *__fastcall sub_100901E30(__int64 a1, int a2, __int64 a3, unsigned int a4)
{
__int64 v4; // rbx
__int64 *result; // rax
__int64 v6; // rdi
__int64 v7; // r14
v4 = a1 - 344;
if ( *(_BYTE *)(a1 + 751)
|| (result = (__int64 *)qword_100BE7A80) != nullptr
&& (result = (__int64 *)sub_100495310(a1 - 344, qword_100BE7A80, a3, a4), (_BYTE)result) )
{
*(_BYTE *)(a1 + 751) = 0;
if ( a2 == 27 )
{
result = &qword_100BE7A80;
v7 = qword_100BE7A80;
if ( qword_100BE7A80 )
{
result = (__int64 *)sub_100495310(v4, qword_100BE7A80, a3, a4);
if ( (_BYTE)result )
return (__int64 *)(*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 1160LL))(v7, 0);
}
}
else if ( a2 == 13 )
{
return (__int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 1528LL))(a1 - 344);
}
}
else
{
v6 = *(_QWORD *)(a1 + 672);
if ( v6 )
return (__int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 1128LL))(v6);
}
return result;
}