//
// sub_100178F14 from 0x100178f14 to 0x10017904c (312 bytes)
//
// 9 xrefs:
// > sub_1001776EC @ 0x1001778d0
// > sub_1001776EC @ 0x100177984
// > sub_1001776EC @ 0x1001779e8
// > sub_1001776EC @ 0x1001779fc
// > sub_1001776EC @ 0x100177a4c
// > sub_1001776EC @ 0x100177a60
// > sub_100177E64 @ 0x100178240
// > sub_100177E64 @ 0x100178264
// > sub_100177E64 @ 0x100178288
//
// 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_100178F14(__int64 a1, __int64 a2, unsigned __int64 *a3)
{
__int64 v6; // x22
__int64 v7; // x23
__int64 v8; // x24
__int64 v9; // x25
__int64 v10; // x26
__int64 v11; // x27
unsigned __int64 v12; // x8
__int64 result; // x0
unsigned __int64 v14; // x22
unsigned int v15; // [xsp+Ch] [xbp-54h] BYREF
v15 = 0;
if ( (unsigned int)sub_1001790C4(a1, a2, &v15)
|| (v6 = (int)v15, (unsigned int)sub_1001790C4(a1, a2, &v15))
|| (v7 = (int)v15, (unsigned int)sub_1001790C4(a1, a2, &v15))
|| (v8 = (int)v15, (unsigned int)sub_1001790C4(a1, a2, &v15))
|| (v9 = (int)v15, (unsigned int)sub_1001790C4(a1, a2, &v15))
|| (v10 = (int)v15, (unsigned int)sub_1001790C4(a1, a2, &v15))
|| (v11 = v15, (unsigned int)sub_1001790C4(a1, a2, &v15)) )
{
v12 = 0;
result = 0xFFFFFFFFLL;
}
else
{
v14 = v6 | (v7 << 8) | (v8 << 16) | (v9 << 24) | (v10 << 32) | (v11 << 40) | ((unsigned __int64)v15 << 48);
result = sub_1001790C4(a1, a2, &v15);
v12 = v14 | ((unsigned __int64)v15 << 56);
if ( (_DWORD)result )
v12 = 0;
}
*a3 = v12;
return result;
}