// // LevelBrowserLayer::setupPageInfo from 0x1402cc5a0 to 0x1402cc819 (633 bytes) // // 3 xrefs: // > @ 0x140585258 // > @ 0x14058a2c8 // > @ 0x1406d2cc0 // // 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 // // Hidden C++ exception states: #wind=2 void __fastcall LevelBrowserLayer::setupPageInfo(__int64 a1, _QWORD *a2, const char *a3) { LevelBrowserLayer *v5; // rbp _BYTE *v6; // rdx size_t v7; // r8 cocos2d::CCArray *v8; // rsi void *v9; // rcx cocos2d::CCString *v10; // rax cocos2d::CCString *v11; // rax cocos2d::CCString *v12; // rax __int64 v13; // rdx __int64 v14; // rdx int m_pageStartIdx; // edx int v16; // r8d int m_itemCount; // r9d cocos2d::CCString *v18; // rax const char *CString; // rax __int64 v20; // rcx __int64 v21; // rdx void *Block[2]; // [rsp+28h] [rbp-40h] BYREF __m128i si128; // [rsp+38h] [rbp-30h] if ( !*(_BYTE *)(a1 + 220) ) { v5 = (LevelBrowserLayer *)(a1 - 544); if ( LevelBrowserLayer::isCorrect((LevelBrowserLayer *)(a1 - 544), a3) ) { v6 = a2; if ( a2[3] > 0xFu ) v6 = (_BYTE *)*a2; *(_OWORD *)Block = 0; si128 = 0; v7 = -1; do ++v7; while ( v6[v7] ); sub_14003A930(Block, v6, v7); v8 = sub_14013D520((__int64 *)Block); if ( si128.m128i_i64[1] > 0xFuLL ) { v9 = Block[0]; if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 ) { v9 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v9); } si128 = _mm_load_si128((const __m128i *)&xmmword_140623F30); LOBYTE(Block[0]) = 0; if ( cocos2d::CCArray::count(v8) >= 3 ) { v10 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v8, 0); *(_DWORD *)(a1 + 176) = cocos2d::CCString::intValue(v10); v11 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v8, 1u); *(_DWORD *)(a1 + 180) = cocos2d::CCString::intValue(v11); v12 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v8, 2u); *(_DWORD *)(a1 + 184) = cocos2d::CCString::intValue(v12); if ( *(_DWORD *)(a1 + 180) ) LOBYTE(v13) = 1; else v13 = 0; (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 80) + 320LL))(*(_QWORD *)(a1 + 80), v13); if ( *(_DWORD *)(a1 + 180) + *(_DWORD *)(a1 + 184) < *(_DWORD *)(a1 + 176) ) LOBYTE(v14) = 1; else v14 = 0; (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 72) + 320LL))(*(_QWORD *)(a1 + 72), v14); m_pageStartIdx = v5->m_pageStartIdx; v16 = m_pageStartIdx + v5->m_pageEndIdx; m_itemCount = v5->m_itemCount; if ( v16 >= m_itemCount ) v16 = v5->m_itemCount; v18 = cocos2d::CCString::createWithFormat("%i to %i of %i", m_pageStartIdx + 1, v16, m_itemCount); CString = cocos2d::CCString::getCString(v18); v5->m_countText->setString(&v5->m_countText->cocos2d::CCLabelProtocol, CString); cocos2d::CCLabelBMFont::limitLabelWidth(v5->m_countText, 100.0, 0.60000002, 0.0); LevelBrowserLayer::updatePageLabel(v5); v20 = *(_QWORD *)(a1 + 120); if ( v20 ) *(_DWORD *)(v20 + 432) = *(_DWORD *)(a1 + 176); if ( (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 72) + 328LL))(*(_QWORD *)(a1 + 72)) || (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 80) + 328LL))(*(_QWORD *)(a1 + 80)) ) { LOBYTE(v21) = 1; } else { v21 = 0; } (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 144) + 320LL))(*(_QWORD *)(a1 + 144), v21); } } } sub_14003A830((__int64)a2); }
GD Web Decomp Icon

GD Web Decomp

Raw Source