//
// InfoLayer::onOriginal from 0x100893910 to 0x100893a3d (301 bytes)
//
// 1 xrefs:
// > InfoLayer::init @ 0x1008922ba
//
// This function is hookable on this platform (idp: pc, 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:37:05 +0000
//
__int64 __fastcall InfoLayer::onOriginal(__int64 a1)
{
__int64 v1; // rbx
__int64 v2; // r14
char *v3; // rax
const char *CString; // r12
size_t v5; // rax
std::string::size_type v6; // r15
char *data; // r13
__int64 v8; // rbx
size_t v9; // r14
char *v10; // rax
_BYTE *v11; // rax
char *v12; // rax
std::string __dst[2]; // [rsp+10h] [rbp-40h] BYREF
v1 = a1;
v2 = cocos2d::CCDirector::sharedDirector();
v3 = sub_10088E820("%i", *(_DWORD *)(*(_QWORD *)(a1 + 696) + 988LL) - *(_DWORD *)(*(_QWORD *)(a1 + 696) + 992LL));
CString = (const char *)cocos2d::CCString::getCString((__int64)v3);
v5 = strlen(CString);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v6 = v5;
if ( v5 >= 0x17 )
{
v8 = v2;
v9 = 26;
if ( (v5 | 7) != 0x17 )
v9 = (v5 | 7) + 1;
data = (char *)operator new(v9);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)data;
__dst[0].__r_.__value_.__r.__words[0] = v9 + 1;
v2 = v8;
v1 = a1;
__dst[0].__r_.__value_.__l.__size_ = v6;
goto LABEL_8;
}
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v5);
data = __dst[0].__r_.__value_.__s.__data_;
if ( v5 )
LABEL_8:
memmove(data, CString, v6);
data[v6] = 0;
v10 = GJSearchObject::create_1(0, __dst);
v11 = LevelBrowserLayer::scene((__int64)v10, (__int64)__dst);
v12 = cocos2d::CCTransitionFade::create_1((__int64)v11, 0.5);
cocos2d::CCDirector::replaceScene(v2, v12);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
return (*(__int64 (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v1 + 552) + 1272LL))(*(_QWORD *)(v1 + 552), 0);
}