//
// DeathTrackerPopup::onClose from 0x772290 to 0x772380 (240 bytes)
//
// 2 xrefs:
// > DeathTrackerOptionsPopup::FLAlert_Clicked @ 0x7706f2
// > DeathTrackerPopup::keyBackClicked @ 0x77239a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:59:16 +0000
//
int __fastcall DeathTrackerPopup::onClose(DeathTrackerPopup *this, cocos2d::CCObject *a2)
{
char v3; // r1
int v4; // r3
char v5; // r0
GJGameLevel *v6; // r0
int v7; // r3
int NormalPercent; // r0
int v9; // r3
int v10; // r7
unsigned __int8 v12[12]; // [sp+0h] [bp-14h] BYREF
v3 = *((_BYTE *)this + 664);
if ( v3 )
v4 = *((_DWORD *)this + 175);
else
v4 = *((_DWORD *)this + 140);
v5 = *((_BYTE *)this + 564);
dword_D1E2C0 = v4;
byte_D1E2C5 = v3;
byte_D2E148 = v5;
dword_D2E14C = *((_DWORD *)this + 143);
byte_D2E150 = *((_BYTE *)this + 576);
v6 = *((GJGameLevel **)this + 132);
byte_D1E2C4 = *((_BYTE *)this + 706);
if ( v6 )
v7 = *((_DWORD *)v6 + 67) - *((_DWORD *)v6 + 68);
else
v7 = 0;
dword_D2E154 = v7;
byte_D2E158 = *((_BYTE *)this + 697);
if ( v6 )
NormalPercent = GJGameLevel::getNormalPercent(v6);
else
NormalPercent = -1;
dword_D1E2C8 = NormalPercent;
v9 = *((_DWORD *)this + 132);
if ( v9 )
v9 = *(_DWORD *)(v9 + 268) - *(_DWORD *)(v9 + 272);
v10 = *((_DWORD *)this + 138);
dword_D2E15C = v9;
if ( v10 && !*((_BYTE *)this + 664) && (*((_DWORD *)this + 140) != 2 || !*((_BYTE *)this + 706)) )
{
DeathTrackerPopup::dtScrollKey((DeathTrackerPopup *)v12, (int)this);
DeathHistogram::persistScroll(v10, v12);
std::string::~string((int)v12);
}
(*(void (__fastcall **)(DeathTrackerPopup *, _DWORD))(*(_DWORD *)this + 536))(this, 0);
return (*(int (__fastcall **)(DeathTrackerPopup *, int))(*(_DWORD *)this + 264))(this, 1);
}