//
// EndLevelLayer::getCoinString from 0x535ab4 to 0x535c22 (366 bytes)
//
// 1 xrefs:
// > EndLevelLayer::customSetup @ 0x536c90
//
// 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:52:07 +0000
//
EndLevelLayer *__fastcall EndLevelLayer::getCoinString(EndLevelLayer *this, int a2, char *a3, int a4)
{
int *v6; // r6
int v7; // r3
int v8; // r0
cocos2d::CCString *v9; // r0
int v10; // r1
_BOOL4 v11; // r10
_BOOL4 v12; // r6
_BOOL4 v13; // r8
const char *CString; // r0
const char *v15; // r6
size_t v16; // r0
int v17; // r3
EndLevelLayer *v19; // [sp+0h] [bp-10h] BYREF
int v20; // [sp+4h] [bp-Ch]
char *v21; // [sp+8h] [bp-8h]
int v22; // [sp+Ch] [bp-4h]
v19 = this;
v20 = a2;
v21 = a3;
v22 = a4;
if ( !*(_DWORD *)(a2 + 480) )
{
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
*((_DWORD *)this + 2) = 0;
std::string::__init((int *)this, &unk_B6B226, 0);
return this;
}
v19 = nullptr;
v20 = 0;
v21 = nullptr;
std::string::__init((int *)&v19, "all coins", 0x11u);
v6 = *(int **)(*(_DWORD *)(a2 + 480) + 1408);
v7 = v6[214];
v8 = v6[215];
if ( v6[197] > 1 )
{
v10 = v6[208] - v6[209] - 1;
v11 = v6[208] - v6[209] == 1;
v12 = v6[211] - v6[212] == 1;
v13 = v7 - v8 == 1;
if ( !v10 || v12 || v7 - v8 == 1 )
{
std::string::assign((int *)&v19, "coin ");
if ( v11 )
{
if ( v12 )
{
v17 = 1;
goto LABEL_18;
}
}
else
{
std::string::append(&v19, "1");
if ( v12 )
goto LABEL_16;
std::string::append(&v19, ", ");
}
std::string::append(&v19, "2");
LABEL_16:
v17 = 0;
LABEL_18:
if ( !v13 && *(int *)(*(_DWORD *)(*(_DWORD *)(a2 + 480) + 1408) + 788) > 2 )
{
if ( !v17 )
std::string::append(&v19, ", ");
std::string::append(&v19, "3");
}
}
}
if ( ((unsigned __int8)v19 & 1) != 0 )
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"You need to collect %s to verify the level!",
v21);
else
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"You need to collect %s to verify the level!",
(const char *)&v19 + 1);
CString = (const char *)cocos2d::CCString::getCString(v9);
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
v15 = CString;
*((_DWORD *)this + 2) = 0;
v16 = strlen(CString);
std::string::__init((int *)this, v15, v16);
std::string::~string((int)&v19);
return this;
}