//
// LevelSearchLayer::checkDiff from 0x7de754 to 0x7de870 (284 bytes)
//
// 10 xrefs:
// > LevelSearchLayer::getSearchDiffKey @ 0x7de89c
// > LevelSearchLayer::getSearchDiffKey @ 0x7de8ac
// > LevelSearchLayer::getSearchDiffKey @ 0x7de8c0
// > LevelSearchLayer::getSearchDiffKey @ 0x7de8d4
// > LevelSearchLayer::getSearchDiffKey @ 0x7de8e8
// > LevelSearchLayer::getSearchDiffKey @ 0x7de8fc
// > LevelSearchLayer::getSearchDiffKey @ 0x7de910
// > LevelSearchLayer::getSearchDiffKey @ 0x7de924
// > LevelSearchLayer::toggleDifficulty @ 0x7df770
// > ??> @ 0xf5f68
//
// 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:54:25 +0000
//
__int64 __fastcall LevelSearchLayer::checkDiff(LevelSearchLayer *this, const char *a2)
{
__int64 v2; // x23
const char *DiffKey; // x24
size_t v4; // x0
size_t v5; // x19
unsigned __int64 v6; // x0
char *v7; // x3
cocos2d::CCString *v8; // x0
unsigned int v9; // w19
__int64 v11; // [xsp+40h] [xbp+40h] BYREF
size_t v12; // [xsp+48h] [xbp+48h]
void *v13; // [xsp+50h] [xbp+50h]
v2 = *((_QWORD *)this + 60);
v11 = 0;
DiffKey = (const char *)LevelSearchLayer::getDiffKey(this, a2);
v12 = 0;
v13 = nullptr;
v4 = strlen(DiffKey);
v5 = v4;
if ( v4 > 0xFFFFFFFFFFFFFFEFLL )
sub_62C5BC();
if ( v4 > 0x16 )
{
v6 = (v4 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v11 = v6 | 1;
v7 = (char *)operator new(v6);
v13 = v7;
v12 = v5;
LABEL_4:
v7 = (char *)memcpy(v7, DiffKey, v5);
goto LABEL_5;
}
LOBYTE(v11) = 2 * v4;
v7 = (char *)&v11 + 1;
if ( v4 )
goto LABEL_4;
LABEL_5:
v7[v5] = 0;
v8 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v2, &v11);
v9 = cocos2d::CCString::boolValue(v8);
if ( (v11 & 1) != 0 )
operator delete(v13);
return v9;
}