//
// sub_100458E3C from 0x100458e3c to 0x100458ef0 (180 bytes)
//
// 1 xrefs:
// > sub_100458AC0 @ 0x100458d08
//
// 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_100458E3C(_QWORD *a1, __int64 a2, __int64 a3, unsigned __int64 a4)
{
int v4; // w22
unsigned __int64 v8; // x24
__int64 v9; // x21
__int64 v10; // x9
__int64 v11; // x8
_QWORD *v12; // x8
__int64 result; // x0
v4 = a4;
v8 = HIDWORD(a4);
v9 = a1[45];
sub_1004B5C70(v9);
atomic_store(7u, (unsigned int *)(a3 + 272));
v10 = *(_QWORD *)(a3 + 184);
if ( v10 )
atomic_store(7u, (unsigned int *)(v10 + 272));
v11 = *(_QWORD *)(a3 + 264);
*(_DWORD *)(v11 + 284) = v4;
*(_DWORD *)(v11 + 288) = v8;
v12 = *(_QWORD **)(a2 + 264);
v12[3] = a1 + 42;
v12 += 3;
v12[1] = a1[43];
v12[2] = a2;
a1[43] = v12;
*(_QWORD *)v12[1] = v12;
sub_1004B5CA0(v9);
result = a1[37];
if ( result )
return sub_1004B5DD4(result);
return result;
}