//
// sub_100163858 from 0x100163858 to 0x100163908 (176 bytes)
//
// 1 xrefs:
// > ??> @ 0x10079bc28
//
// 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
//
__n128 __usercall sub_100163858@(FILE **a1@, __n128 *a2@, __int64 a3@)
{
__n128 result; // q0
__n128 v7; // q1
__n128 v8; // q1
__n128 v9; // q0
if ( !a1[15] || ((unsigned int (__fastcall *)(FILE **))(*a1)->_cookie)(a1) || fseeko(a1[15], a2[8].n128_i64[0], 0) )
{
result.n128_u64[0] = 0;
*(_OWORD *)(a3 + 96) = 0u;
*(_OWORD *)(a3 + 112) = 0u;
*(_OWORD *)(a3 + 64) = 0u;
*(_OWORD *)(a3 + 80) = 0u;
*(_OWORD *)(a3 + 32) = 0u;
*(_OWORD *)(a3 + 48) = 0u;
*(_OWORD *)a3 = 0u;
*(_OWORD *)(a3 + 16) = 0u;
*(_QWORD *)(a3 + 128) = -1;
}
else
{
memmove(a1 + 17, a2, 0x80u);
v7 = a2[7];
*(__n128 *)(a3 + 96) = a2[6];
*(__n128 *)(a3 + 112) = v7;
*(_QWORD *)(a3 + 128) = a2[8].n128_u64[0];
v8 = a2[3];
*(__n128 *)(a3 + 32) = a2[2];
*(__n128 *)(a3 + 48) = v8;
v9 = a2[5];
*(__n128 *)(a3 + 64) = a2[4];
*(__n128 *)(a3 + 80) = v9;
result = a2[1];
*(__n128 *)a3 = *a2;
*(__n128 *)(a3 + 16) = result;
}
return result;
}