//
// EndLevelLayer::getCoinString from 0x8fbcc0 to 0x8fbf00 (576 bytes)
//
// 2 xrefs:
// > EndLevelLayer::customSetup @ 0x8fd810
// > ??> @ 0xebe40
//
// 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 12:57:03 +0000
//
__int64 *__usercall EndLevelLayer::getCoinString@(EndLevelLayer *this@, __int64 *a2@)
{
_DWORD *v4; // x0
__int64 v5; // x3
bool v6; // cc
__int64 v7; // x5
__int64 v8; // x2
__int64 v9; // x4
int v10; // w1
int v11; // w0
_BOOL4 v12; // w24
_BOOL4 v13; // w23
_BOOL4 v14; // w25
cocos2d::CCString *v15; // x0
const char *CString; // x0
size_t v17; // x0
int v19; // w0
char *v20; // [xsp+58h] [xbp+58h]
__int64 v21[2]; // [xsp+60h] [xbp+60h] BYREF
void *v22; // [xsp+70h] [xbp+70h]
if ( !*((_QWORD *)this + 76) )
{
*a2 = 0;
a2[1] = 0;
a2[2] = 0;
std::string::__init(a2, &byte_11B8890, 0);
return a2;
}
v21[0] = 0;
v21[1] = 0;
v22 = nullptr;
std::string::__init(v21, "all coins", 0x11u);
v4 = *(_DWORD **)(*((_QWORD *)this + 76) + 1936LL);
v5 = (unsigned int)v4[252];
v6 = v4[241] <= 1;
v7 = (unsigned int)v4[253];
v8 = (unsigned int)v4[255];
v9 = (unsigned int)v4[256];
v10 = v4[258];
v11 = v4[259];
if ( v6 )
goto LABEL_5;
v5 = (unsigned int)(v5 - v7);
v8 = (unsigned int)(v8 - v9);
v12 = v5 == 1;
v13 = v8 == 1;
v14 = v10 - v11 == 1;
if ( !v13 && !v12 && v10 - v11 != 1 )
goto LABEL_5;
std::string::assign(v21, "coin ");
if ( !v12 )
{
std::string::append((__int64)v21, "1", 9u);
if ( v13 )
{
LABEL_23:
v19 = 0;
goto LABEL_14;
}
std::string::append((__int64)v21, ", ", 2u);
LABEL_22:
std::string::append((__int64)v21, "2", 9u);
goto LABEL_23;
}
if ( !v13 )
goto LABEL_22;
v19 = 1;
LABEL_14:
if ( !v14 && *(int *)(*(_QWORD *)(*((_QWORD *)this + 76) + 1936LL) + 964LL) > 2 )
{
if ( !v19 )
std::string::append((__int64)v21, ", ", 2u);
std::string::append((__int64)v21, "3", 9u);
if ( (v21[0] & 1) == 0 )
goto LABEL_6;
goto LABEL_10;
}
LABEL_5:
if ( (v21[0] & 1) == 0 )
{
LABEL_6:
v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"You need to collect %s to verify the level!",
(const char *)v21 + 1,
v8,
v5,
v9,
v7);
goto LABEL_7;
}
LABEL_10:
v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"You need to collect %s to verify the level!",
(const char *)v22,
v8,
v5,
v9,
v7);
LABEL_7:
CString = (const char *)cocos2d::CCString::getCString(v15);
*a2 = 0;
a2[1] = 0;
a2[2] = 0;
v20 = (char *)CString;
v17 = strlen(CString);
std::string::__init(a2, v20, v17);
if ( (v21[0] & 1) != 0 )
operator delete(v22);
return a2;
}