//
// sub_180046810 from 0x180046810 to 0x180046a5b (587 bytes)
//
// 2 xrefs:
// > sub_180045B60 @ 0x180045c24
// > ??> @ 0x1801f8214
//
// 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:13 +0000
//
_BOOL8 __fastcall sub_180046810(__int64 a1, __int64 a2, int a3, int a4)
{
_BOOL8 result; // rax
unsigned int v8; // [rsp+50h] [rbp+18h] BYREF
*(_DWORD *)(*(_QWORD *)(a2 + 8) + 480LL) = 0;
*(_DWORD *)(*(_QWORD *)(a2 + 8) + 484LL) = a3;
*(_DWORD *)(*(_QWORD *)(a2 + 8) + 488LL) = a4;
result = false;
if ( (unsigned int)sub_180041D20(a1, *(_QWORD *)(*(_QWORD *)(a2 + 8) + 120LL), &v8, 0x10u) )
{
*(_DWORD *)(*(_QWORD *)(a2 + 8) + 496LL) = v8;
if ( (unsigned int)sub_180041D20(a1, *(_QWORD *)(*(_QWORD *)(a2 + 8) + 120LL), &v8, 0x10u) )
{
*(_DWORD *)(*(_QWORD *)(a2 + 8) + 500LL) = v8;
if ( (unsigned int)sub_180041D20(a1, *(_QWORD *)(*(_QWORD *)(a2 + 8) + 120LL), &v8, 0x18u) )
{
*(_DWORD *)(*(_QWORD *)(a2 + 8) + 504LL) = v8;
if ( (unsigned int)sub_180041D20(a1, *(_QWORD *)(*(_QWORD *)(a2 + 8) + 120LL), &v8, 0x18u) )
{
*(_DWORD *)(*(_QWORD *)(a2 + 8) + 508LL) = v8;
if ( (unsigned int)sub_180041D20(a1, *(_QWORD *)(*(_QWORD *)(a2 + 8) + 120LL), &v8, 0x14u) )
{
*(_DWORD *)(*(_QWORD *)(a2 + 8) + 512LL) = v8;
if ( (unsigned int)sub_180041D20(a1, *(_QWORD *)(*(_QWORD *)(a2 + 8) + 120LL), &v8, 3u) )
{
*(_DWORD *)(*(_QWORD *)(a2 + 8) + 516LL) = v8 + 1;
if ( (unsigned int)sub_180041D20(a1, *(_QWORD *)(*(_QWORD *)(a2 + 8) + 120LL), &v8, 5u) )
{
*(_DWORD *)(*(_QWORD *)(a2 + 8) + 520LL) = v8 + 1;
if ( (unsigned int)sub_180041EA0(
a1,
*(_QWORD *)(*(_QWORD *)(a2 + 8) + 120LL),
(unsigned __int64 *)(*(_QWORD *)(a2 + 8) + 528LL),
0x24u) )
{
if ( (unsigned int)sub_180041BB0(
a1,
*(_QWORD *)(*(_QWORD *)(a2 + 8) + 120LL),
(_BYTE *)(*(_QWORD *)(a2 + 8) + 536LL),
0x10u)
&& (unsigned int)sub_180042920(a1, *(_DWORD **)(*(_QWORD *)(a2 + 8) + 120LL), a4 - 34) )
{
return true;
}
}
}
}
}
}
}
}
}
return result;
}