//
// DeathTrackerPopup::onPanelButton from 0x14010de50 to 0x14010dfa9 (345 bytes)
//
// 3 xrefs:
// > DeathTrackerPopup::init @ 0x140105925
// > ??> @ 0x140915b24
// > ??> @ 0x140915b30
//
// 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 11:26:48 +0000
//
void __fastcall DeathTrackerPopup::onPanelButton(__int64 a1, __int64 a2)
{
int v3; // r9d
__int64 v4; // rdx
int v5; // r9d
__int64 v6; // rdx
int v7; // eax
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
v4 = (unsigned int)(v3 / 10);
v5 = v3 % 10;
if ( *(_BYTE *)(a1 + 920) )
{
if ( !(_DWORD)v4 && v5 <= 1 && *(_BYTE *)(a1 + 977) != (v5 == 1) )
{
*(_BYTE *)(a1 + 977) = v5 == 1;
DeathTrackerPopup::refreshView(a1, v4);
}
}
else if ( (_DWORD)v4 )
{
v7 = *(_DWORD *)(a1 + 728);
if ( (_DWORD)v4 == 1 )
{
if ( v7 != 3 && (v7 != 2 || !*(_BYTE *)(a1 + 986)) )
{
*(_DWORD *)(a1 + 740) = v5;
if ( v5 )
*(_BYTE *)(a1 + 744) = 0;
*(_BYTE *)(a1 + 745) = 1;
DeathTrackerPopup::refreshView(a1, v4);
}
}
else if ( v7 )
{
if ( v7 == 2 && v5 <= 1 && *(_BYTE *)(a1 + 986) != (v5 == 0) )
{
*(_BYTE *)(a1 + 986) = v5 == 0;
DeathTrackerPopup::setView(a1, 2);
}
}
else
{
*(_BYTE *)(a1 + 745) = 1;
*(_BYTE *)(a1 + 744) = v5 == 1;
DeathTrackerPopup::refreshView(a1, v4);
}
}
else
{
DeathTrackerPopup::setView(a1, dword_140702E78[v5]);
DeathTrackerPopup::refreshView(a1, v6);
}
}