//
// sub_10059E2E4 from 0x10059e2e4 to 0x10059e3bc (216 bytes)
//
// 1 xrefs:
// > sub_1005E5808 @ 0x1005e584c
//
// 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
//
unsigned __int64 *__fastcall sub_10059E2E4(unsigned __int8 *a1, _BYTE *a2, unsigned int *a3)
{
unsigned __int64 *result; // x0
int v5; // w8
int v6; // w8
unsigned __int64 v7; // [xsp+8h] [xbp-28h] BYREF
unsigned __int64 v8; // [xsp+10h] [xbp-20h]
v7 = ((unsigned __int64)*a1 << 24) | ((unsigned __int64)a1[1] << 16) | ((unsigned __int64)a1[2] << 8) | a1[3];
v8 = ((unsigned __int64)a1[4] << 24) | ((unsigned __int64)a1[5] << 16) | ((unsigned __int64)a1[6] << 8) | a1[7];
result = sub_10059D890(&v7, a3);
v5 = v7;
*a2 = BYTE3(v7);
a2[1] = BYTE2(v5);
a2[2] = BYTE1(v5);
a2[3] = v5;
v6 = v8;
a2[4] = BYTE3(v8);
a2[5] = BYTE2(v6);
a2[6] = BYTE1(v6);
a2[7] = v6;
return result;
}