//
// sub_1005D4640 from 0x1005d4640 to 0x1005d46ab (107 bytes)
//
// 1 xrefs:
// > ??> @ 0x100973830
//
// 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_1005D4640(__int64 a1)
{
__int64 v1; // rbx
char *v2; // rax
_QWORD *v3; // rdi
v1 = a1 - 336;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(a1 - 336) + 1056LL))(a1 - 336, 0);
if ( *(_BYTE *)(a1 + 320) == 1 )
{
v2 = *(char **)(a1 + 328);
v3 = (_QWORD *)(*(_QWORD *)(a1 + 336) + *(_QWORD *)(a1 + 216));
if ( ((unsigned __int8)v2 & 1) != 0 )
v2 = *(char **)&v2[*v3 - 1];
((void (__fastcall *)(_QWORD *, __int64))v2)(v3, v1);
}
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v1 + 512LL))(v1, 1);
}