//
// DeathStatsPopup::onFetch from 0xca7624 to 0xca7778 (340 bytes)
//
// 3 xrefs:
// > ??> @ 0x91000
// > DeathStatsPopup::init @ 0xca7e98
// > ??> @ 0x1543e18
//
// This function is hookable on this platform (idp: arm, 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 13:06:03 +0000
//
__int64 __fastcall DeathStatsPopup::onFetch(DeathStatsPopup *this, cocos2d::CCObject *a2)
{
CCTextInputNode *v3; // x0
int v4; // w21
CCTextInputNode *v5; // x0
char *v6; // x23
unsigned int v7; // w22
GameLevelManager *v8; // x0
char *v10; // x23
__int64 v11[2]; // [xsp+40h] [xbp+40h] BYREF
char *v12; // [xsp+50h] [xbp+50h]
v3 = *((CCTextInputNode **)this + 128);
if ( !v3 )
goto LABEL_12;
CCTextInputNode::getString(v3, v11);
if ( (v11[0] & 1) != 0 )
{
v10 = v12;
v4 = atoi(v12);
operator delete(v10);
}
else
{
v4 = atoi((const char *)v11 + 1);
}
if ( v4 > 0 )
{
v5 = *((CCTextInputNode **)this + 129);
if ( v5 )
{
CCTextInputNode::getString(v5, v11);
if ( (v11[0] & 1) != 0 )
{
v6 = v12;
v7 = atoi(v12);
operator delete(v6);
}
else
{
v5 = (CCTextInputNode *)atoi((const char *)v11 + 1);
v7 = (unsigned int)v5;
}
}
else
{
v7 = 0;
}
v8 = (GameLevelManager *)GameLevelManager::sharedState(v5);
GameLevelManager::forceDeathDataRefetch(v8, v4, v7);
*((_DWORD *)this + 262) = v4;
*((_DWORD *)this + 263) = v7;
*((_DWORD *)this + 264) = 0;
DeathStatsPopup::setStatus(this, "Fetching...");
cocos2d::CCNode::unschedule(this, DeathStatsPopup::pollFetch, 0);
cocos2d::CCNode::schedule(this, DeathStatsPopup::pollFetch, 0, 0.15);
}
else
{
LABEL_12:
DeathStatsPopup::setStatus(this, "Enter a valid level ID.");
}
return _stack_chk_guard;
}