// // GameLevelManager::acceptFriendRequest from 0x100554ea0 to 0x1005552c1 (1057 bytes) // // 1 xrefs: // > FriendRequestPopup::onAccept @ 0x1002a5ebb // // 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 // bool __fastcall GameLevelManager::acceptFriendRequest(GameLevelManager *a1, int a2, int a3) { __m128 v3; // xmm0 GameLevelManager *v5; // r15 cocos2d::CCString *v6; // rax const char *CString; // r12 size_t v8; // rax std::string::size_type v9; // rbx char *data; // r14 size_t v11; // r15 __int64 v12; // rbx __int64 v14; // r13 cocos2d::CCNode *v15; // r14 size_t v16; // rax std::string::size_type v17; // rbx char *v18; // r14 size_t v19; // r15 cocos2d::CCString *v20; // rax cocos2d::CCString *v21; // rax const char *v22; // rax const char *v23; // r13 const char *v24; // r15 size_t v25; // rax size_t v26; // r12 char *v27; // rbx size_t v28; // r14 size_t v29; // rax size_t v30; // r15 char *v31; // rbx size_t v32; // r14 char v33; // [rsp+0h] [rbp-B0h] char v34; // [rsp+0h] [rbp-B0h] cocos2d::CCObject *v35; // [rsp+10h] [rbp-A0h] std::string v36; // [rsp+18h] [rbp-98h] BYREF _QWORD v37[2]; // [rsp+30h] [rbp-80h] BYREF void *v38; // [rsp+40h] [rbp-70h] _QWORD v39[2]; // [rsp+48h] [rbp-68h] BYREF void *v40; // [rsp+58h] [rbp-58h] int v41; // [rsp+60h] [rbp-50h] int v42; // [rsp+64h] [rbp-4Ch] cocos2d::CCDictionary *m_friendReqAndUserBlocks; // [rsp+68h] [rbp-48h] std::string __dst[2]; // [rsp+70h] [rbp-40h] BYREF if ( a2 <= 0 || a3 <= 0 ) return 0; v5 = a1; v6 = (cocos2d::CCString *)sub_1007AB580("accFriendReq_%i_%i", v33); CString = cocos2d::CCString::getCString(v6); m_friendReqAndUserBlocks = a1->m_friendReqAndUserBlocks; v8 = strlen(CString); if ( v8 >= 0xFFFFFFFFFFFFFFF8LL ) LABEL_53: sub_100006BF0(*(double *)v3.i64); v9 = v8; v41 = a3; v42 = a2; if ( v8 >= 0x17 ) { v11 = 26; if ( (v8 | 7) != 0x17 ) v11 = (v8 | 7) + 1; data = (char *)operator new(v11); __dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)data; __dst[0].__r_.__value_.__r.__words[0] = v11 + 1; v5 = a1; __dst[0].__r_.__value_.__l.__size_ = v9; goto LABEL_9; } __dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v8); data = __dst[0].__r_.__value_.__s.__data_; if ( v8 ) LABEL_9: memmove(data, CString, v9); data[v9] = 0; v12 = cocos2d::CCDictionary::objectForKey_1((__int64)m_friendReqAndUserBlocks, (char *)__dst); if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) operator delete(__dst[0].__r_.__value_.__l.__data_); if ( v12 ) return 0; v14 = (__int64)v5->m_friendReqAndUserBlocks; v15 = cocos2d::CCNode::create(); v16 = strlen(CString); if ( v16 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_53; v17 = v16; m_friendReqAndUserBlocks = (cocos2d::CCDictionary *)v15; v35 = v5; if ( v16 >= 0x17 ) { v19 = 26; if ( (v16 | 7) != 0x17 ) v19 = (v16 | 7) + 1; v18 = (char *)operator new(v19); __dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v18; __dst[0].__r_.__value_.__r.__words[0] = v19 + 1; __dst[0].__r_.__value_.__l.__size_ = v17; goto LABEL_21; } __dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v16); v18 = __dst[0].__r_.__value_.__s.__data_; if ( v16 ) LABEL_21: memmove(v18, CString, v17); v18[v17] = 0; cocos2d::CCDictionary::setObject_1(v14, m_friendReqAndUserBlocks, (char *)__dst); if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) operator delete(__dst[0].__r_.__value_.__l.__data_); GameLevelManager::getBasePostString(__dst, v3); v20 = (cocos2d::CCString *)sub_1007AB580("%c%s%s%c%c%s", (char)"7"); cocos2d::CCString::getCString(v20); v21 = (cocos2d::CCString *)sub_1007AB580("&targetAccountID=%i&requestID=%i&secret=%s", v34); v22 = cocos2d::CCString::getCString(v21); std::string::append(__dst, v22); v36.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x40u); v36.__r_.__value_.__r.__words[0] = 65; v36.__r_.__value_.__l.__size_ = 62; strcpy(v36.__r_.__value_.__l.__data_, "https://www.boomlings.com/database/acceptGJFriendRequest20.php"); v23 = CString; if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) v24 = __dst[0].__r_.__value_.__l.__data_; else v24 = __dst[0].__r_.__value_.__s.__data_; v25 = strlen(v24); if ( v25 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(2.057594829120962e-81); v26 = v25; if ( v25 >= 0x17 ) { v28 = 26; if ( (v25 | 7) != 0x17 ) v28 = (v25 | 7) + 1; v27 = (char *)operator new(v28); v38 = v27; v37[0] = v28 | 1; v37[1] = v26; goto LABEL_34; } LOBYTE(v37[0]) = 2 * v25; v27 = (char *)v37 + 1; if ( v25 ) LABEL_34: memmove(v27, v24, v26); v27[v26] = 0; v29 = strlen(v23); if ( v29 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(2.057594829120962e-81); v30 = v29; if ( v29 >= 0x17 ) { v32 = 26; if ( (v29 | 7) != 0x17 ) v32 = (v29 | 7) + 1; v31 = (char *)operator new(v32); v40 = v31; v39[0] = v32 | 1; v39[1] = v30; goto LABEL_42; } LOBYTE(v39[0]) = 2 * v29; v31 = (char *)v39 + 1; if ( v29 ) LABEL_42: memmove(v31, v23, v30); v31[v30] = 0; GameLevelManager::ProcessHttpRequest(v35, &v36, (__int64)v37, (__int64)v39, 31); if ( (v39[0] & 1) != 0 ) { operator delete(v40); if ( (v37[0] & 1) == 0 ) { LABEL_45: if ( (*(_BYTE *)&v36.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_46; LABEL_51: operator delete(v36.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) == 0 ) return 1; goto LABEL_47; } } else if ( (v37[0] & 1) == 0 ) { goto LABEL_45; } operator delete(v38); if ( (*(_BYTE *)&v36.__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_51; LABEL_46: if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 ) LABEL_47: operator delete(__dst[0].__r_.__value_.__l.__data_); return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source