//
// sub_7DB40 from 0x7db40 to 0x7dbc4 (132 bytes)
//
// 3 xrefs:
// > sub_7DBC4 @ 0x7dcc0
// > sub_7DBC4 @ 0x7dd24
// > sub_7DD9C @ 0x7dda0
//
// 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_7DB40(__int64 a1, unsigned int a2, _WORD *a3, _WORD *a4)
{
unsigned int v6; // w0
unsigned int v7; // w8
bool v8; // zf
__int64 result; // x0
__int64 v10; // [xsp+0h] [xbp-20h] BYREF
__int64 v11; // [xsp+8h] [xbp-18h] BYREF
*a3 = 0;
*a4 = 0;
v11 = 0;
v6 = sub_77B68(*(_QWORD *)(a1 + 40), a2, &v11);
if ( v6 )
{
v7 = v6;
v8 = v6 == 9;
result = 0;
if ( !v8 )
return v7;
}
else
{
v10 = 0;
result = sub_A7D00(v11, (char *)&v10 + 4, &v10);
if ( !(_DWORD)result )
{
*a3 = WORD2(v10);
*a4 = v10;
}
}
return result;
}