//
// sub_D892A8 from 0xd892a8 to 0xd89320 (120 bytes)
//
// 3 xrefs:
// > ??> @ 0x1122df8
// > ??> @ 0x1122e20
// > ??> @ 0x1122e48
//
// 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_D892A8(__int64 a1, __int64 *a2)
{
unsigned int v2; // w19
bool v3; // zf
__int64 result; // x0
__int64 v5; // x0
v2 = a1;
if ( (_DWORD)a1 )
{
v3 = (_DWORD)a1 == 2;
result = 1;
if ( v3 )
{
DSA_free(*a2);
*a2 = 0;
return v2;
}
}
else
{
v5 = DSA_new(a1);
*a2 = v5;
if ( v5 )
return 2;
else
return 0;
}
return result;
}