// // GameLevelManager::onGetUserListCompleted from 0x100523e60 to 0x1005243f8 (1432 bytes) // // 1 xrefs: // > GameLevelManager::handleIt @ 0x10051c2b8 // // 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 GameLevelManager::onGetUserListCompleted( GameLevelManager *a1, unsigned __int8 *a2, __int64 a3, __m128 a4) { void *v4; // rdx size_t v5; // rax size_t v6; // rbx char *v7; // r14 size_t v8; // r12 char v9; // r14 void *v10; // rbx unsigned __int64 v11; // rax char *v12; // rdi size_t v13; // rdx unsigned __int8 v14; // r12 GameLevelManager *v15; // r13 const char *v16; // r12 unsigned __int64 v17; // rcx const void *v18; // rbx size_t v19; // rdx UserListDelegate *m_userListDelegate; // rdi size_t v21; // rax size_t v22; // rbx char *v23; // r14 UserListDelegate *v24; // rdi size_t v25; // r15 __int64 v26; // r15 unsigned int v27; // r13d cocos2d::CCString *v28; // rax const char *CString; // r14 size_t v30; // rax size_t v31; // rbx char *v32; // r12 char v33; // r15 __int64 v34; // rax size_t v35; // r15 cocos2d::CCDictionary *v36; // rax GJUserScore *v37; // rbx unsigned int m_userID; // r14d unsigned int m_accountID; // r12d std::string *p_m_userName; // rbx GameLevelManager *v41; // r13 cocos2d::CCDictionary *m_storedLevels; // r15 size_t v43; // rax size_t v44; // rbx char *v45; // r14 UserListDelegate *v46; // rdi size_t v47; // r12 UserListDelegate *v48; // rdi _QWORD __s2[2]; // [rsp+1h] [rbp-BFh] BYREF __int64 v50; // [rsp+18h] [rbp-A8h] __int128 v51; // [rsp+20h] [rbp-A0h] BYREF void *v52; // [rsp+30h] [rbp-90h] __m128 v53; // [rsp+40h] [rbp-80h] BYREF void *longStorage; // [rsp+50h] [rbp-70h] int v55; // [rsp+5Ch] [rbp-64h] GameLevelManager *v56; // [rsp+60h] [rbp-60h] cocos2d::CCObject *v57; // [rsp+68h] [rbp-58h] void *__src; // [rsp+70h] [rbp-50h] __int64 v59; // [rsp+78h] [rbp-48h] __int128 __dst; // [rsp+80h] [rbp-40h] BYREF void *__p; // [rsp+90h] [rbp-30h] if ( (*(_BYTE *)a3 & 1) != 0 ) v4 = *(void **)(a3 + 16); else v4 = (void *)(a3 + 1); __src = v4; v5 = strlen((const char *)v4); if ( v5 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_82; v6 = v5; if ( v5 >= 0x17 ) { v8 = 26; if ( (v5 | 7) != 0x17 ) v8 = (v5 | 7) + 1; v7 = (char *)operator new(v8); __p = v7; *(_QWORD *)&__dst = v8 + 1; *((_QWORD *)&__dst + 1) = v6; goto LABEL_11; } LOBYTE(__dst) = 2 * v5; v7 = (char *)&__dst + 1; if ( v5 ) LABEL_11: memmove(v7, __src, v6); v7[v6] = 0; strcpy((char *)__s2, "get_friends"); v9 = __dst; v10 = __p; v56 = a1; if ( (__dst & 1) != 0 ) { v11 = *((_QWORD *)&__dst + 1); v12 = (char *)__p; } else { v12 = (char *)&__dst + 1; v11 = (unsigned __int8)__dst >> 1; } v13 = 11; if ( v11 < 0xB ) v13 = v11; v14 = (v11 != 11) | (memcmp(v12, __s2, v13) != 0); if ( (v9 & 1) != 0 ) operator delete(v10); v59 = v14; v15 = v56; GameLevelManager::removeDLFromActive(v56, (const char *)__src); *(_WORD *)((char *)&__dst + 1) = 12589; BYTE3(__dst) = 0; v16 = (const char *)(a2 + 1); v17 = *a2 >> 1; v18 = *((const void **)a2 + 2); if ( (*a2 & 1) != 0 ) v17 = *((_QWORD *)a2 + 1); else v18 = a2 + 1; v19 = 2; if ( v17 < 2 ) v19 = v17; if ( !((v17 != 2) | (memcmp(v18, (char *)&__dst + 1, v19) != 0)) ) { m_userListDelegate = v15->m_userListDelegate; if ( m_userListDelegate ) ((void (__fastcall *)(UserListDelegate *, __int64, __int64))m_userListDelegate->getUserListFailed)( m_userListDelegate, v59, 0xFFFFFFFFLL); return; } if ( atoi((const char *)v18) < 0 ) { v24 = v15->m_userListDelegate; if ( v24 ) ((void (__fastcall *)(UserListDelegate *, __int64, __int64))v24->getUserListFailed)(v24, v59, 4294967294LL); return; } v57 = (cocos2d::CCObject *)sub_10071F9E0(v18, (char *)&__dst + 1); if ( (*a2 & 1) != 0 ) v16 = *((const char **)a2 + 2); v21 = strlen(v16); if ( v21 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_82; v22 = v21; if ( v21 >= 0x17 ) { v25 = 26; if ( (v21 | 7) != 0x17 ) v25 = (v21 | 7) + 1; v23 = (char *)operator new(v25); __p = v23; *(_QWORD *)&__dst = v25 + 1; *((_QWORD *)&__dst + 1) = v22; } else { LOBYTE(__dst) = 2 * v21; v23 = (char *)&__dst + 1; if ( !v21 ) goto LABEL_40; } memmove(v23, v16, v22); LABEL_40: v23[v22] = 0; v26 = sub_10052DD30(&__dst, "|"); if ( (__dst & 1) != 0 ) operator delete(__p); if ( (unsigned int)sub_100720070(v26) ) { v55 = v59 + 1; v27 = 0; v50 = v26; do { v28 = (cocos2d::CCString *)sub_1007200C0(v26, v27); CString = cocos2d::CCString::getCString(v28); v30 = strlen(CString); if ( v30 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_82; v31 = v30; if ( v30 >= 0x17 ) { v34 = v30 | 7; v35 = 26; if ( (v31 | 7) != 0x17 ) v35 = v34 + 1; v32 = (char *)operator new(v35); __p = v32; *(_QWORD *)&__dst = v35 + 1; *((_QWORD *)&__dst + 1) = v31; } else { LOBYTE(__dst) = 2 * v30; v32 = (char *)&__dst + 1; if ( !v30 ) { BYTE1(__dst) = 0; v33 = __dst; if ( (__dst & 1) != 0 ) goto LABEL_54; goto LABEL_49; } } memmove(v32, CString, v31); v32[v31] = 0; v33 = __dst; if ( (__dst & 1) != 0 ) { LABEL_54: sub_100006B70(&v51, __p, *((unsigned __int64 *)&__dst + 1), *(double *)a4.i64); goto LABEL_55; } LABEL_49: v52 = __p; a4.i64[0] = __dst; v51 = __dst; LABEL_55: v36 = (cocos2d::CCDictionary *)GameLevelManager::responseToDict(&v51, 0); v37 = GJUserScore::create(v36); if ( (v51 & 1) != 0 ) operator delete(v52); v37->m_friendReqStatus = v55; if ( v37->m_accountID > 0 && v37->m_userID > 0 ) { sub_10071FCD0(v57, v37); m_userID = v37->m_userID; m_accountID = v37->m_accountID; if ( (v37->m_userName.m_data.m_short.sizex2 & 1) != 0 ) { sub_100006B70( &v53, v37->m_userName.m_data.m_long.longStorage, v37->m_userName.m_data.m_long.size, *(double *)a4.i64); } else { p_m_userName = &v37->m_userName; longStorage = p_m_userName->m_data.m_long.longStorage; a4 = *(__m128 *)&p_m_userName->m_data.m_short.sizex2; v53 = *(__m128 *)&p_m_userName->m_data.m_short.sizex2; } GameLevelManager::storeUserName(v56, m_userID, m_accountID, &v53); if ( (v53.i8[0] & 1) != 0 ) operator delete(longStorage); } if ( (v33 & 1) != 0 ) operator delete(__p); ++v27; v26 = v50; } while ( v27 < (unsigned int)sub_100720070(v50) ); } if ( (unsigned int)sub_100720070(v57) ) { v41 = v56; m_storedLevels = v56->m_storedLevels; v43 = strlen((const char *)__src); if ( v43 < 0xFFFFFFFFFFFFFFF8LL ) { v44 = v43; if ( v43 >= 0x17 ) { v47 = 26; if ( (v43 | 7) != 0x17 ) v47 = (v43 | 7) + 1; v45 = (char *)operator new(v47); __p = v45; *(_QWORD *)&__dst = v47 + 1; *((_QWORD *)&__dst + 1) = v44; } else { LOBYTE(__dst) = 2 * v43; v45 = (char *)&__dst + 1; if ( !v43 ) goto LABEL_77; } memmove(v45, __src, v44); LABEL_77: v45[v44] = 0; cocos2d::CCDictionary::setObject_1((__int64)m_storedLevels, v57, (char *)&__dst); if ( (__dst & 1) != 0 ) operator delete(__p); v48 = v41->m_userListDelegate; if ( v48 ) ((void (__fastcall *)(UserListDelegate *, cocos2d::CCObject *, __int64))v48->getUserListFinished)(v48, v57, v59); return; } LABEL_82: sub_100006BF0(*(double *)a4.i64); } v46 = v56->m_userListDelegate; if ( v46 ) ((void (__fastcall *)(UserListDelegate *, __int64, __int64))v46->getUserListFailed)(v46, v59, 0xFFFFFFFFLL); }
GD Web Decomp Icon

GD Web Decomp

Raw Source