// // ProfilePage::setupPageInfo from 0x1007c0740 to 0x1007c0bd0 (1168 bytes) // // 2 xrefs: // > sub_1007C0C40 @ 0x1007c0c4c // > @ 0x1009942d8 // // 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 // char __fastcall ProfilePage::setupPageInfo(ProfilePage *a1, __int64 a2, const char *a3, double a4) { unsigned int v4; // eax const char *v5; // r14 size_t v6; // rax size_t v7; // r15 char *v8; // rbx size_t v9; // r12 char *v10; // rax unsigned __int64 v11; // r15 __int64 v12; // r14 unsigned __int64 v13; // rsi char *v14; // rdx unsigned __int64 v15; // rcx bool v16; // zf unsigned __int64 v17; // r12 char *v18; // r13 size_t v19; // r12 char *v20; // rbx char v21; // al const char *v22; // r12 size_t v23; // r15 size_t v24; // rax size_t v25; // r13 char *v26; // rbx size_t v27; // r15 cocos2d::CCObject *v28; // rax __int64 v29; // rbx char *v30; // rax unsigned __int64 v31; // rsi __int64 v32; // r8 char *v33; // rdx unsigned __int64 v34; // rdi cocos2d::CCString *v35; // rax ProfilePage *v36; // rbx cocos2d::CCString *v37; // rax cocos2d::CCString *v38; // rax unsigned __int64 v41; // [rsp+8h] [rbp-88h] cocos2d::CCObject *v42; // [rsp+10h] [rbp-80h] _QWORD v43[2]; // [rsp+18h] [rbp-78h] BYREF void *__p; // [rsp+28h] [rbp-68h] char __s[8]; // [rsp+30h] [rbp-60h] BYREF size_t v46; // [rsp+38h] [rbp-58h] void *v47; // [rsp+40h] [rbp-50h] __int64 v48; // [rsp+48h] [rbp-48h] size_t __dst; // [rsp+50h] [rbp-40h] BYREF unsigned __int64 v50; // [rsp+58h] [rbp-38h] void *v51; // [rsp+60h] [rbp-30h] LOBYTE(v4) = ProfilePage::isCorrect(a1, a3); if ( !(_BYTE)v4 ) return v4; if ( (*(_BYTE *)a2 & 1) != 0 ) v5 = *(const char **)(a2 + 16); else v5 = (const char *)(a2 + 1); v6 = strlen(v5); if ( v6 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(a4); v7 = v6; if ( v6 >= 0x17 ) { v9 = 26; if ( (v6 | 7) != 0x17 ) v9 = (v6 | 7) + 1; v8 = (char *)operator new(v9); v51 = v8; __dst = v9 + 1; v50 = v7; goto LABEL_12; } LOBYTE(__dst) = 2 * v6; v8 = (char *)&__dst + 1; if ( v6 ) LABEL_12: memmove(v8, v5, v7); v8[v7] = 0; v42 = sub_10071F9E0(); if ( (__dst & 1) != 0 ) { v10 = (char *)v51; v11 = v50; v12 = -1; if ( !v50 ) goto LABEL_23; LABEL_17: v13 = v11; v14 = v10; while ( *v14 != 58 ) { ++v14; if ( !--v13 ) { v14 = &v10[v11]; break; } } v12 = -1; if ( v14 != &v10[v11] ) v12 = v14 - v10; goto LABEL_23; } v11 = (unsigned __int8)__dst >> 1; v10 = (char *)&__dst + 1; v12 = -1; if ( (unsigned __int8)__dst >> 1 ) goto LABEL_17; LABEL_23: v15 = 0; v41 = v11; do { if ( (__dst & 1) != 0 ) { v17 = v50; if ( v50 < v15 ) LABEL_75: sub_1000547C0(); v18 = (char *)v51; } else { v17 = (unsigned __int8)__dst >> 1; v18 = (char *)&__dst + 1; if ( v15 > v17 ) goto LABEL_75; } v19 = v17 - v15; if ( v19 >= v12 - v15 ) v19 = v12 - v15; if ( v19 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(a4); v48 = v15; if ( v19 >= 0x17 ) { v23 = (v19 | 7) + 1; if ( (v19 | 7) == 0x17 ) v23 = 26; v20 = (char *)operator new(v23); v47 = v20; *(_QWORD *)__s = v23 | 1; v46 = v19; v11 = v41; } else { __s[0] = 2 * v19; v20 = &__s[1]; if ( !v19 ) { __s[1] = 0; v21 = __s[0]; if ( (__s[0] & 1) == 0 ) goto LABEL_36; goto LABEL_43; } } memmove(v20, &v18[v48], v19); v20[v19] = 0; v21 = __s[0]; if ( (__s[0] & 1) == 0 ) { LABEL_36: if ( !v21 && v48 == v11 ) goto LABEL_56; v22 = &__s[1]; goto LABEL_46; } LABEL_43: if ( !v46 && v48 == v11 ) goto LABEL_56; v22 = (const char *)v47; LABEL_46: v24 = strlen(v22); if ( v24 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(a4); v25 = v24; if ( v24 >= 0x17 ) { v27 = (v24 | 7) + 1; if ( (v24 | 7) == 0x17 ) v27 = 26; v26 = (char *)operator new(v27); __p = v26; v43[0] = v27 | 1; v43[1] = v25; v11 = v41; LABEL_53: memmove(v26, v22, v25); goto LABEL_54; } LOBYTE(v43[0]) = 2 * v24; v26 = (char *)v43 + 1; if ( v24 ) goto LABEL_53; LABEL_54: v26[v25] = 0; v28 = sub_1007AB360((__int64)v43, a4); sub_10071FCD0((__int64)v42, v28); if ( (v43[0] & 1) != 0 ) operator delete(__p); LABEL_56: v29 = -1; if ( v12 == -1 ) goto LABEL_57; if ( (__dst & 1) != 0 ) { v30 = (char *)v51; v31 = v50; v32 = v12 + 1; v48 = v12 + 1; if ( v50 <= v12 + 1 ) goto LABEL_57; } else { v31 = (unsigned __int8)__dst >> 1; v30 = (char *)&__dst + 1; v32 = v12 + 1; v48 = v12 + 1; if ( v31 <= v12 + 1 ) goto LABEL_57; } v33 = &v30[v32]; v34 = v31 + ~v12; while ( *v33 != 58 ) { ++v33; if ( !--v34 ) { v33 = &v30[v31]; break; } } v29 = v33 - v30; if ( v33 == &v30[v31] ) v29 = -1; LABEL_57: if ( (__s[0] & 1) != 0 ) operator delete(v47); v16 = v12 == -1; v12 = v29; v15 = v48; } while ( !v16 ); if ( (__dst & 1) != 0 ) operator delete(v51); v4 = sub_100720070((__int64)v42); if ( v4 >= 3 ) { v35 = (cocos2d::CCString *)sub_1007200C0((__int64)v42, 0); v36 = a1; a1->m_itemCount = cocos2d::CCString::intValue(v35); v37 = (cocos2d::CCString *)sub_1007200C0((__int64)v42, 1u); a1->m_pageStartIdx = cocos2d::CCString::intValue(v37); v38 = (cocos2d::CCString *)sub_1007200C0((__int64)v42, 2u); a1->m_pageEndIdx = cocos2d::CCString::intValue(v38); ((void (__fastcall *)(CCMenuItemSpriteExtra *, bool))v36->m_leftArrow->setVisible)( v36->m_leftArrow, v36->m_pageStartIdx != 0); LOBYTE(v4) = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *, bool))v36->m_rightArrow->setVisible)( v36->m_rightArrow, v36->m_pageStartIdx + v36->m_pageEndIdx < v36->m_itemCount); } return v4; }
GD Web Decomp Icon

GD Web Decomp

Raw Source