//
// sub_1800922A0 from 0x1800922a0 to 0x180092396 (246 bytes)
//
// 2 xrefs:
// > sub_1800933C0 @ 0x180093471
// > ??> @ 0x1801fa830
//
// 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_1800922A0(__int64 *a1, unsigned int a2, __int64 a3, __int64 a4, unsigned int a5, int a6)
{
__int64 v6; // rsi
unsigned int v7; // r10d
int v10; // ebp
int v11; // edi
__int64 v12; // rax
__int64 (__fastcall *v13)(__int64 *, _QWORD, _QWORD, _QWORD, int, int); // r11
_DWORD *v14; // rax
int v15; // ecx
int v16; // eax
__int64 result; // rax
__int64 (__fastcall *v18)(__int64 *, _QWORD, _QWORD, _QWORD, int, int *); // r11
_QWORD *v19; // rdx
_QWORD *v20; // r8
v6 = *a1;
v7 = 0;
if ( a3 )
{
v10 = *(_DWORD *)(a3 + 32);
v11 = **(_DWORD **)(a3 + 8);
}
else
{
v10 = 0;
v11 = 0;
}
v12 = *(_QWORD *)(v6 + 232);
if ( a6 == 1 )
{
v13 = *(__int64 (__fastcall **)(__int64 *, _QWORD, _QWORD, _QWORD, int, int))(v12 + 176);
if ( v13 )
v7 = v13(a1, a5, a2, 0, v11, v10);
if ( a4 )
{
v14 = *(_DWORD **)(a4 + 8);
if ( v14 )
{
v15 = *(unsigned __int16 *)(v6 + 280);
if ( !(_WORD)v15 )
v15 = v11;
*v14 = v15;
}
v16 = *(_DWORD *)(v6 + 196);
if ( !v16 )
v16 = v10;
*(_DWORD *)(a4 + 32) = v16;
}
return v7;
}
v18 = *(__int64 (__fastcall **)(__int64 *, _QWORD, _QWORD, _QWORD, int, int *))(v12 + 72);
if ( !v18 )
return v7;
v19 = *(_QWORD **)(a3 + 24);
v20 = *(_QWORD **)(a4 + 24);
a6 = v11;
result = v18(a1, *v19, *v20, a2, v11, &a6);
**(_DWORD **)(a4 + 8) = a6;
return result;
}