//
// sub_1800E07E0 from 0x1800e07e0 to 0x1800e0874 (148 bytes)
//
// 2 xrefs:
// > sub_1800DD230 @ 0x1800dd4ef
// > ??> @ 0x1801ff8a0
//
// 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_1800E07E0(__int64 a1, unsigned int a2, unsigned int a3)
{
__int64 v5; // rcx
__int64 result; // rax
void (__fastcall *v7)(_QWORD, _QWORD, _QWORD, __int64); // rax
int v8; // [rsp+30h] [rbp+8h] BYREF
v5 = *(_QWORD *)(a1 + 96);
if ( !*(_QWORD *)(v5 + 368) && (*(_DWORD *)(v5 + 44) & 0x400) == 0 )
return 14;
*(_DWORD *)(a1 + 64) = a3;
result = sub_180012B90(v5, a2, a3, 2u);
if ( !(_DWORD)result )
{
if ( !(unsigned int)sub_180012510(*(_QWORD *)(a1 + 96), &v8, 2) )
*(_DWORD *)(a1 + 64) = v8;
v7 = *(void (__fastcall **)(_QWORD, _QWORD, _QWORD, __int64))(a1 + 336);
if ( v7 )
v7(*(_QWORD *)(a1 + 344), a2, *(unsigned int *)(a1 + 64), 2);
return 0;
}
return result;
}