//
// sub_180099420 from 0x180099420 to 0x18009952e (270 bytes)
//
// 2 xrefs:
// > sub_1800FC980 @ 0x1800fcd91
// > ??> @ 0x1801faaf4
//
// 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:48 +0000
//
__int64 __fastcall sub_180099420(_QWORD *a1)
{
__int64 v1; // rdi
char v2; // bp
__int64 v4; // rax
__int64 v5; // rcx
__int64 v6; // rsi
__int64 v7; // rax
v1 = a1[21];
v2 = 0;
if ( v1 )
{
sub_1801021C0(a1[21], 7);
v2 = 1;
}
v4 = a1[67];
if ( v4 && *(_BYTE *)(v4 + 530) )
{
v5 = a1[67];
goto LABEL_7;
}
v5 = 0;
if ( v4 )
{
LABEL_7:
v6 = v4 + 532;
if ( *(_BYTE *)(v4 + 1062) )
goto LABEL_9;
}
v6 = 0;
LABEL_9:
if ( v5 )
{
*(_DWORD *)(v5 + 524) = 0;
*(_WORD *)(v5 + 528) = 0;
memset((void *)v5, 0, 0x208u);
}
if ( v6 )
{
*(_DWORD *)(v6 + 524) = 0;
*(_WORD *)(v6 + 528) = 0;
memset((void *)v6, 0, 0x208u);
}
if ( v2 && v1 )
sub_180102300(v1, 7);
v7 = a1[29];
if ( !v7 || !*(_QWORD *)(v7 + 64) )
return 0;
a1[22] = a1;
return (*(__int64 (**)(void))(v7 + 64))();
}