//
// sub_D20820 from 0xd20820 to 0xd208b8 (152 bytes)
//
// 0 xrefs:
//
// 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
//
void *__fastcall sub_D20820(__int64 a1, __int64 a2, __int64 a3, char a4, __int64 a5)
{
__int64 v6; // x0
void *result; // x0
*(_DWORD *)(a1 + 8) = a5 != 0;
v6 = a3;
*(_QWORD *)(a1 + 32) = 0;
*(_BYTE *)(a1 + 24) = a4 & (a3 != 0);
*(_QWORD *)a1 = off_121EE00;
*(_QWORD *)(a1 + 40) = 0;
if ( !a3 )
v6 = ctype_ + 1LL;
*(_QWORD *)(a1 + 48) = v6;
memset((void *)(a1 + 57), 0, 0x100u);
*(_BYTE *)(a1 + 56) = 0;
result = memset((void *)(a1 + 313), 0, 0x100u);
*(_BYTE *)(a1 + 569) = 0;
return result;
}