//
// InfoLayer::onOriginal from 0x1007b0610 to 0x1007b073d (301 bytes)
//
// 1 xrefs:
// > InfoLayer::init @ 0x1007af0d8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall InfoLayer::onOriginal(InfoLayer *a1, cocos2d::CCObject *a2)
{
double v2; // xmm0_8
InfoLayer *v3; // rbx
cocos2d::CCDirector *v4; // r14
char *v5; // rax
const char *CString; // r12
size_t v7; // rax
size_t v8; // r15
char *v9; // r13
cocos2d::CCDirector *v10; // rbx
size_t v11; // r14
char *v12; // rax
cocos2d::CCScene *v13; // rax
cocos2d::CCTransitionFade *v14; // rax
_QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF
void *__p; // [rsp+20h] [rbp-30h]
v3 = a1;
v4 = cocos2d::CCDirector::sharedDirector();
v5 = sub_1007AB580("%i", a1->m_level->m_originalLevel.random - a1->m_level->m_originalLevel.seed);
CString = cocos2d::CCString::getCString((cocos2d::CCString *)v5);
v7 = strlen(CString);
if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v2);
v8 = v7;
if ( v7 >= 0x17 )
{
v10 = v4;
v11 = 26;
if ( (v7 | 7) != 0x17 )
v11 = (v7 | 7) + 1;
v9 = (char *)operator new(v11);
__p = v9;
__dst[0] = v11 + 1;
v4 = v10;
v3 = a1;
__dst[1] = v8;
goto LABEL_8;
}
LOBYTE(__dst[0]) = 2 * v7;
v9 = (char *)__dst + 1;
if ( v7 )
LABEL_8:
memmove(v9, CString, v8);
v9[v8] = 0;
v12 = GJSearchObject::create_1(0, (__int64)__dst, v2);
v13 = LevelBrowserLayer::scene((GJSearchObject *)v12);
v14 = cocos2d::CCTransitionFade::create_1(0.5, v13);
cocos2d::CCDirector::replaceScene(v4, v14);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
((void (__fastcall *)(cocos2d::CCMenu *, _QWORD))v3->m_buttonMenu->setEnabled)(v3->m_buttonMenu, 0);
}