//
// sub_1800B5970 from 0x1800b5970 to 0x1800b5ace (350 bytes)
//
// 4 xrefs:
// > ??> @ 0x18016b228
// > ??> @ 0x180189578
// > ??> @ 0x180189588
// > ??> @ 0x1801fcfa8
//
// 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:58 +0000
//
__int64 __fastcall sub_1800B5970(__int64 a1, __int64 a2, _DWORD *a3)
{
__int64 result; // rax
unsigned int v7; // edi
_BYTE v8[16]; // [rsp+50h] [rbp-848h] BYREF
_BYTE v9[2048]; // [rsp+60h] [rbp-838h] BYREF
v8[0] = 0;
result = sub_1800B7640();
if ( !(_DWORD)result )
{
*a3 = -1;
memset((void *)(a1 + 4736), 0, 0x1000u);
sub_1800B7D20(a1 + 608, a2, 2048);
result = sub_1800B5550(
a1,
a1 + 608,
a1 + 2656,
2047,
a1 + 4736,
0x1000u,
(__int16 *)(a1 + 8832),
(__int64)v9,
2047,
v8);
if ( !(_DWORD)result )
{
if ( v8[0] )
{
v7 = 68;
}
else
{
v7 = sub_1800B4680(
a1,
a1 + 608,
(const CHAR *)(a1 + 2656),
(__int64)v9,
(_BYTE *)(a1 + 4736),
*(_WORD *)(a1 + 8832),
(__int64)a3,
0);
if ( !v7 )
return v7;
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 40LL))(a1);
return v7;
}
}
return result;
}