//
// sub_1003D9080 from 0x1003d9080 to 0x1003d9135 (181 bytes)
//
// 1 xrefs:
// > sub_1003D8A10 @ 0x1003d8ae7
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:29:42 +0000
//
__int64 __fastcall sub_1003D9080(__int64 *a1, int *a2)
{
char *v3; // r15
int v4; // r13d
_QWORD *v5; // rdi
v3 = (char *)operator new(0xD0u);
*(_OWORD *)v3 = 0;
v4 = *a2;
*((_DWORD *)v3 + 4) = *a2;
v5 = v3 + 24;
if ( (a2[2] & 1) != 0 )
{
sub_10001AD30(v5, *((const void **)a2 + 3), *((_QWORD *)a2 + 2));
v4 = *((_DWORD *)v3 + 4);
}
else
{
*((_QWORD *)v3 + 5) = *((_QWORD *)a2 + 3);
*(_OWORD *)v5 = *(_OWORD *)(a2 + 2);
}
memcpy(v3 + 48, a2 + 8, 0x9Du);
*((_QWORD *)v3 + 1) = v4;
return sub_1003D8B40(a1, (__int64)v3);
}