//
// sub_100614788 from 0x100614788 to 0x100614938 (432 bytes)
//
// 1 xrefs:
// > sub_1006140EC @ 0x10061442c
//
// 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_100614788(__int64 a1)
{
unsigned int v2; // w0
char *v3; // x0
__int64 v4; // x20
_BYTE *v5; // x8
int v7; // w4
__int64 v8; // [xsp+8h] [xbp-58h] BYREF
void *v9; // [xsp+10h] [xbp-50h] BYREF
__int64 *v10; // [xsp+18h] [xbp-48h] BYREF
_QWORD v11[6]; // [xsp+20h] [xbp-40h] BYREF
v9 = nullptr;
v2 = sub_10058AE10(**(_QWORD **)(a1 + 16));
v3 = sub_10058AC68(v2);
v4 = sub_1005E8060((__int64)v3);
if ( !v4 )
return 0;
sub_1005E2DF4(v11);
if ( (int)sub_1005ED324((__int64)v11, (__int64)&v10, v4, 0, *(_QWORD *)(a1 + 56)) < 1 )
goto LABEL_13;
if ( (int)sub_1005EC7FC(v10, -1, 8) <= 0 )
{
v7 = 930;
goto LABEL_12;
}
sub_1005F6170(*(_QWORD *)(a1 + 24), &v9, (__int64)&unk_100842858);
if ( v9 )
{
if ( (int)sub_1005E303C((__int64)v11) < 1 )
goto LABEL_13;
sub_100588C44(v9);
v9 = nullptr;
if ( (int)sub_1005ED4F8((__int64)v11, 0, &v8) < 1 )
goto LABEL_13;
v5 = sub_100588710((unsigned int)v8, (__int64)"pk7_doit.c", 944);
v9 = v5;
if ( v5 )
{
if ( (int)sub_1005ED4F8((__int64)v11, (__int64)v5, &v8) < 1 )
goto LABEL_13;
if ( (int)sub_1005EC7FC(v10, -1, 8) > 0 )
{
sub_1005E31A4((__int64)v11);
sub_1005FBABC(*(_QWORD *)(a1 + 40), (__int64)v9, v8);
return 1;
}
v7 = 952;
LABEL_12:
sub_1005E0E48(33, 139, 152, (__int64)"pk7_doit.c", v7);
LABEL_13:
if ( v9 )
sub_100588C44(v9);
}
}
sub_1005E31A4((__int64)v11);
return 0;
}