//
// sub_1800D4CA0 from 0x1800d4ca0 to 0x1800d4d33 (147 bytes)
//
// 2 xrefs:
// > sub_18001CFD0 @ 0x18001f7c5
// > ??> @ 0x1801fee68
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_1800D4CA0(__int64 *a1)
{
__int64 v2; // rcx
__int64 v3; // rcx
__int64 v4; // r8
_QWORD *v5; // rcx
__int64 v6; // rax
char v8; // [rsp+30h] [rbp+8h] BYREF
v8 = 0;
v2 = a1[4];
if ( !v2 || ((*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v2 + 168LL))(v2, &v8), !v8) )
{
v3 = a1[4];
if ( v3 )
{
sub_1800CFDB0(v3, 128);
v4 = *(_QWORD *)(a1[6] + 1520);
if ( v4 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1[4] + 280LL))(
a1[4],
*(_QWORD *)(v4 + 8LL * *(int *)(a1[4] + 464)));
}
v5 = (_QWORD *)a1[1];
v6 = *a1;
*((_BYTE *)a1 + 60) = 0;
*v5 = v6;
*(_QWORD *)(*a1 + 8) = a1[1];
a1[1] = (__int64)a1;
*a1 = (__int64)a1;
*((_BYTE *)a1 + 28) = 0;
}
return 0;
}