//
// sub_1008D8A60 from 0x1008d8a60 to 0x1008d8b31 (209 bytes)
//
// 11 xrefs:
// > sub_1008CDF10 @ 0x1008ce6b6
// > sub_1008CDF10 @ 0x1008ce8f0
// > sub_1008CDF10 @ 0x1008ceb1e
// > sub_1008CDF10 @ 0x1008cecce
// > sub_1008CDF10 @ 0x1008cee57
// > sub_1008CDF10 @ 0x1008cf00c
// > sub_1008CDF10 @ 0x1008cf293
// > DeathTrackerPopup::refreshGlobal @ 0x1008d08be
// > DeathTrackerPopup::refreshGlobal @ 0x1008d0d91
// > DeathTrackerPopup::refreshGlobal @ 0x1008d105b
// > DeathTrackerPopup::refreshGlobal @ 0x1008d1277
//
// 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:37:42 +0000
//
void *__fastcall sub_1008D8A60(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, int a6)
{
_QWORD *v10; // rdi
_QWORD *v11; // r13
_QWORD *v12; // rdi
void *result; // rax
*(_QWORD *)a1 = a2;
v10 = (_QWORD *)(a1 + 8);
if ( (*(_BYTE *)a3 & 1) == 0 )
{
v10[2] = *(_QWORD *)(a3 + 16);
*(_OWORD *)v10 = *(_OWORD *)a3;
v11 = (_QWORD *)(a1 + 32);
if ( (*(_BYTE *)a4 & 1) != 0 )
goto LABEL_3;
LABEL_6:
v11[2] = *(_QWORD *)(a4 + 16);
*(_OWORD *)v11 = *(_OWORD *)a4;
v12 = (_QWORD *)(a1 + 56);
if ( (*(_BYTE *)a5 & 1) == 0 )
goto LABEL_4;
LABEL_7:
result = sub_10001AD30(v12, *(const void **)(a5 + 16), *(_QWORD *)(a5 + 8));
goto LABEL_8;
}
sub_10001AD30(v10, *(const void **)(a3 + 16), *(_QWORD *)(a3 + 8));
v11 = (_QWORD *)(a1 + 32);
if ( (*(_BYTE *)a4 & 1) == 0 )
goto LABEL_6;
LABEL_3:
sub_10001AD30(v11, *(const void **)(a4 + 16), *(_QWORD *)(a4 + 8));
v12 = (_QWORD *)(a1 + 56);
if ( (*(_BYTE *)a5 & 1) != 0 )
goto LABEL_7;
LABEL_4:
result = *(void **)(a5 + 16);
v12[2] = result;
*(_OWORD *)v12 = *(_OWORD *)a5;
LABEL_8:
*(_WORD *)(a1 + 80) = a6;
*(_BYTE *)(a1 + 82) = BYTE2(a6);
return result;
}