//
// DeathStatsPopup::onFetch from 0x76f1a0 to 0x76f276 (214 bytes)
//
// 0 xrefs:
//
// 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:14 +0000
//
int __fastcall DeathStatsPopup::onFetch(DeathStatsPopup *this, cocos2d::CCObject *a2)
{
int v2; // r1
const char *v5; // r0
int v6; // r8
GameLevelManager *v7; // r0
int v8; // r1
char *v9; // r0
int v10; // r5
GameLevelManager *v11; // r0
char v12; // [sp+10h] [bp-10h] BYREF
_BYTE v13[7]; // [sp+11h] [bp-Fh] BYREF
char *v14; // [sp+18h] [bp-8h]
v2 = *((_DWORD *)this + 179);
if ( !v2 )
return DeathStatsPopup::setStatus(this, "Enter a valid level ID.");
CCTextInputNode::getString((CCTextInputNode *)&v12, v2);
v5 = (v12 & 1) != 0 ? v14 : v13;
v6 = atoi(v5);
v7 = (GameLevelManager *)std::string::~string((int)&v12);
if ( v6 <= 0 )
return DeathStatsPopup::setStatus(this, "Enter a valid level ID.");
v8 = *((_DWORD *)this + 180);
if ( v8 )
{
CCTextInputNode::getString((CCTextInputNode *)&v12, v8);
if ( (v12 & 1) != 0 )
v9 = v14;
else
v9 = v13;
v10 = atoi(v9);
v7 = (GameLevelManager *)std::string::~string((int)&v12);
}
else
{
v10 = 0;
}
v11 = (GameLevelManager *)GameLevelManager::sharedState(v7);
GameLevelManager::forceDeathDataRefetch(v11, v6, v10);
*((_DWORD *)this + 183) = v10;
*((_DWORD *)this + 184) = 0;
*((_DWORD *)this + 182) = v6;
DeathStatsPopup::setStatus(this, "Fetching...");
cocos2d::CCNode::unschedule(this, DeathStatsPopup::pollFetch, 0);
return cocos2d::CCNode::schedule(this, DeathStatsPopup::pollFetch, 0, 1041865114);
}