// // sub_100536210 from 0x100536210 to 0x100536cae (2718 bytes) // // 1 xrefs: // > GameLevelManager::handleIt @ 0x10051f991 // // 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:31:53 +0000 // char __fastcall sub_100536210(__int64 a1, unsigned __int8 *a2, const std::string *a3) { const char *data; // rdi size_t v6; // rax size_t v7; // rbx _BYTE *v8; // r14 size_t v9; // r13 __int64 v10; // r14 std::string::size_type v11; // rax std::string::pointer v12; // r15 __int64 v13; // r15 unsigned int v14; // eax unsigned __int64 v15; // rax const void *v16; // r12 size_t v17; // rdx bool v18; // bl unsigned int v19; // eax __int64 v20; // rdi __int64 v21; // rax const char *CString; // r12 size_t v23; // rax std::string::size_type v24; // r13 char *v25; // rbx size_t v26; // r14 __int64 v27; // rax __int64 v28; // rax __int64 v29; // rax __int64 v30; // rax __int64 v31; // rax const std::string::value_type *v32; // rax __int64 v33; // rax const char *v34; // r12 size_t v35; // rax std::string::size_type v36; // r13 char *v37; // rbx size_t v38; // r14 __int64 v39; // rax const std::string::value_type *v40; // rax __int64 v41; // rax __int64 v42; // rax __int64 v43; // rax __int64 v44; // rax __int64 v45; // rax __int64 v46; // rax __int64 v47; // rax __int64 v48; // rax __int64 v49; // rax __int64 v50; // rax __int64 v51; // rax __int64 v52; // rax __int64 v53; // rax __int64 v54; // rax __int64 v55; // rax const std::string::value_type *v56; // rax __int64 v57; // rax const std::string::value_type *v58; // rax __int64 v59; // rax __int64 v60; // rax const char *v61; // r12 size_t v62; // rax std::string::size_type v63; // r13 char *v64; // rbx size_t v65; // r14 __int64 v66; // rax const std::string::value_type *v67; // rax __int64 v68; // rax const char *v69; // r12 size_t v70; // rax std::string::size_type v71; // r13 char *v72; // rbx size_t v73; // r14 __int64 v74; // r14 __int64 v75; // rax const std::string::value_type *v76; // rax __int64 v77; // rax __int64 v78; // rax __int64 v79; // rax __int64 v80; // rax __int64 v81; // rax unsigned int v82; // ebx __int64 v83; // rdi _BYTE __dst[28]; // [rsp+10h] [rbp-230h] BYREF int v86; // [rsp+2Ch] [rbp-214h] _QWORD v87[4]; // [rsp+30h] [rbp-210h] BYREF __int128 v88; // [rsp+50h] [rbp-1F0h] void *v89[4]; // [rsp+60h] [rbp-1E0h] BYREF int v90; // [rsp+80h] [rbp-1C0h] __int128 v91; // [rsp+84h] [rbp-1BCh] int v92; // [rsp+94h] [rbp-1ACh] __int128 v93; // [rsp+98h] [rbp-1A8h] __int128 v94; // [rsp+A8h] [rbp-198h] std::string v95[2]; // [rsp+B8h] [rbp-188h] BYREF int v96; // [rsp+E8h] [rbp-158h] __int128 v97; // [rsp+F0h] [rbp-150h] void *v98[4]; // [rsp+100h] [rbp-140h] BYREF int v99; // [rsp+120h] [rbp-120h] __int128 v100; // [rsp+128h] [rbp-118h] void *v101[4]; // [rsp+138h] [rbp-108h] BYREF __int128 v102; // [rsp+158h] [rbp-E8h] __int128 v103; // [rsp+170h] [rbp-D0h] BYREF void *v104; // [rsp+180h] [rbp-C0h] __int64 v105; // [rsp+190h] [rbp-B0h] std::string v106; // [rsp+198h] [rbp-A8h] BYREF std::string v107; // [rsp+1B0h] [rbp-90h] BYREF std::string v108; // [rsp+1C8h] [rbp-78h] BYREF std::string v109; // [rsp+1E0h] [rbp-60h] BYREF __int64 v110; // [rsp+1F8h] [rbp-48h] std::string v111[2]; // [rsp+200h] [rbp-40h] BYREF if ( (*(_BYTE *)&a3->__r_.__value_.__s.0 & 1) != 0 ) data = a3->__r_.__value_.__l.__data_; else data = a3->__r_.__value_.__s.__data_; v6 = strlen(data); if ( v6 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v7 = v6; v110 = *(_QWORD *)(a1 + 1088); v105 = a1; if ( v6 >= 0x17 ) { v9 = 26; if ( (v6 | 7) != 0x17 ) v9 = (v6 | 7) + 1; v8 = operator new(v9); *(_QWORD *)&__dst[16] = v8; *(_QWORD *)__dst = v9 + 1; a1 = v105; *(_QWORD *)&__dst[8] = v7; goto LABEL_11; } v8 = &__dst[1]; __dst[0] = 2 * v6; if ( v6 ) LABEL_11: memmove(v8, data, v7); v8[v7] = 0; cocos2d::CCDictionary::removeObjectForKey(v110, __dst); if ( (__dst[0] & 1) != 0 ) operator delete(*(void **)&__dst[16]); v10 = 0; v11 = std::string::find(a3, 95, 0); if ( v11 != -1 ) { if ( (*(_BYTE *)&a3->__r_.__value_.__s.0 & 1) != 0 ) v12 = a3->__r_.__value_.__l.__data_; else v12 = a3->__r_.__value_.__s.__data_; v10 = (unsigned int)atoi(&v12[v11 + 1]); } v13 = sub_10053FBE0(a2, ":"); __dst[0] = 4; strcpy(&__dst[1], "-1"); v14 = *a2; if ( (v14 & 1) != 0 ) { v15 = *((_QWORD *)a2 + 1); v16 = *((const void **)a2 + 2); } else { v15 = v14 >> 1; v16 = a2 + 1; } v17 = 2; if ( v15 < 2 ) v17 = v15; v18 = v15 == 2; LOBYTE(v19) = memcmp(v16, &__dst[1], v17) == 0; if ( (v18 & (unsigned __int8)v19) != 0 || (v19 = sub_1007FEF90(v13), v19 < 0x1E) ) { v20 = *(_QWORD *)(a1 + 1256); if ( v20 ) LOBYTE(v19) = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v20 + 328LL))(v20, (unsigned int)v10); return v19; } v110 = v10; memset(__dst, 0, sizeof(__dst)); v86 = -1; memset(v87, 0, sizeof(v87)); v88 = 0; memset(v89, 0, sizeof(v89)); v90 = -1; v91 = 0; v92 = -1; v93 = 0; v94 = 0; memset(v95, 0, sizeof(v95)); v96 = 0; memset(v98, 0, sizeof(v98)); v97 = 0; v99 = 0; v102 = 0; memset(v101, 0, sizeof(v101)); v100 = 0; v21 = cocos2d::CCArray::stringAtIndex(v13, 0); CString = (const char *)cocos2d::CCString::getCString(v21); v23 = strlen(CString); if ( v23 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v24 = v23; if ( v23 >= 0x17 ) { v26 = 26; if ( (v23 | 7) != 0x17 ) v26 = (v23 | 7) + 1; v25 = (char *)operator new(v26); v106.__r_.__value_.__r.__words[2] = (std::string::size_type)v25; v106.__r_.__value_.__r.__words[0] = v26 | 1; v106.__r_.__value_.__l.__size_ = v24; goto LABEL_35; } v106.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v23); v25 = v106.__r_.__value_.__s.__data_; if ( v23 ) LABEL_35: memmove(v25, CString, v24); v25[v24] = 0; LevelTools::base64DecodeString(v111, &v106); if ( (__dst[0] & 1) != 0 ) operator delete(*(void **)&__dst[16]); *(std::string *)__dst = v111[0]; *(_WORD *)&v111[0].__r_.__value_.__l.0 = 0; if ( (*(_BYTE *)&v106.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v106.__r_.__value_.__l.__data_); v27 = cocos2d::CCArray::stringAtIndex(v13, 1); *(_DWORD *)&__dst[24] = cocos2d::CCString::intValue(v27); v28 = cocos2d::CCArray::stringAtIndex(v13, 2); v86 = cocos2d::CCString::intValue(v28); v29 = cocos2d::CCArray::stringAtIndex(v13, 3); LODWORD(v87[0]) = cocos2d::CCString::intValue(v29); v30 = cocos2d::CCArray::stringAtIndex(v13, 4); HIDWORD(v87[0]) = cocos2d::CCString::intValue(v30); v31 = cocos2d::CCArray::stringAtIndex(v13, 5); v32 = (const std::string::value_type *)cocos2d::CCString::getCString(v31); std::string::assign((std::string *)&v87[1], v32); v33 = cocos2d::CCArray::stringAtIndex(v13, 6); v34 = (const char *)cocos2d::CCString::getCString(v33); v35 = strlen(v34); if ( v35 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v36 = v35; if ( v35 >= 0x17 ) { v38 = 26; if ( (v35 | 7) != 0x17 ) v38 = (v35 | 7) + 1; v37 = (char *)operator new(v38); v107.__r_.__value_.__r.__words[2] = (std::string::size_type)v37; v107.__r_.__value_.__r.__words[0] = v38 | 1; v107.__r_.__value_.__l.__size_ = v36; goto LABEL_47; } v107.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v35); v37 = v107.__r_.__value_.__s.__data_; if ( v35 ) LABEL_47: memmove(v37, v34, v36); v37[v36] = 0; LevelTools::base64DecodeString(v111, &v107); if ( (v88 & 1) != 0 ) operator delete(v89[0]); v89[0] = v111[0].__r_.__value_.__l.__data_; v88 = *(_OWORD *)&v111[0].__r_.__value_.__l.0; *(_WORD *)&v111[0].__r_.__value_.__l.0 = 0; if ( (*(_BYTE *)&v107.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v107.__r_.__value_.__l.__data_); v39 = cocos2d::CCArray::stringAtIndex(v13, 7); v40 = (const std::string::value_type *)cocos2d::CCString::getCString(v39); std::string::assign((std::string *)&v89[1], v40); v41 = cocos2d::CCArray::stringAtIndex(v13, 8); v90 = cocos2d::CCString::intValue(v41); v42 = cocos2d::CCArray::stringAtIndex(v13, 9); LODWORD(v91) = cocos2d::CCString::intValue(v42); v43 = cocos2d::CCArray::stringAtIndex(v13, 10); DWORD1(v91) = cocos2d::CCString::intValue(v43); v44 = cocos2d::CCArray::stringAtIndex(v13, 11); DWORD2(v91) = cocos2d::CCString::intValue(v44); v45 = cocos2d::CCArray::stringAtIndex(v13, 12); HIDWORD(v91) = cocos2d::CCString::intValue(v45); v46 = cocos2d::CCArray::stringAtIndex(v13, 13); v92 = cocos2d::CCString::intValue(v46); v47 = cocos2d::CCArray::stringAtIndex(v13, 14); LODWORD(v93) = cocos2d::CCString::intValue(v47); v48 = cocos2d::CCArray::stringAtIndex(v13, 15); DWORD1(v93) = cocos2d::CCString::intValue(v48); v49 = cocos2d::CCArray::stringAtIndex(v13, 16); DWORD2(v93) = cocos2d::CCString::intValue(v49); v50 = cocos2d::CCArray::stringAtIndex(v13, 17); HIDWORD(v93) = cocos2d::CCString::intValue(v50); v51 = cocos2d::CCArray::stringAtIndex(v13, 18); LODWORD(v94) = cocos2d::CCString::intValue(v51); v52 = cocos2d::CCArray::stringAtIndex(v13, 19); DWORD1(v94) = cocos2d::CCString::intValue(v52); v53 = cocos2d::CCArray::stringAtIndex(v13, 20); DWORD2(v94) = cocos2d::CCString::intValue(v53); v54 = cocos2d::CCArray::stringAtIndex(v13, 21); HIDWORD(v94) = cocos2d::CCString::intValue(v54); v55 = cocos2d::CCArray::stringAtIndex(v13, 22); v56 = (const std::string::value_type *)cocos2d::CCString::getCString(v55); std::string::assign(v95, v56); v57 = cocos2d::CCArray::stringAtIndex(v13, 23); v58 = (const std::string::value_type *)cocos2d::CCString::getCString(v57); std::string::assign(&v95[1], v58); v59 = cocos2d::CCArray::stringAtIndex(v13, 24); v96 = cocos2d::CCString::intValue(v59); v60 = cocos2d::CCArray::stringAtIndex(v13, 25); v61 = (const char *)cocos2d::CCString::getCString(v60); v62 = strlen(v61); if ( v62 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v63 = v62; if ( v62 >= 0x17 ) { v65 = 26; if ( (v62 | 7) != 0x17 ) v65 = (v62 | 7) + 1; v64 = (char *)operator new(v65); v108.__r_.__value_.__r.__words[2] = (std::string::size_type)v64; v108.__r_.__value_.__r.__words[0] = v65 | 1; v108.__r_.__value_.__l.__size_ = v63; goto LABEL_59; } v108.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v62); v64 = v108.__r_.__value_.__s.__data_; if ( v62 ) LABEL_59: memmove(v64, v61, v63); v64[v63] = 0; LevelTools::base64DecodeString(v111, &v108); if ( (v97 & 1) != 0 ) operator delete(v98[0]); v98[0] = v111[0].__r_.__value_.__l.__data_; v97 = *(_OWORD *)&v111[0].__r_.__value_.__l.0; *(_WORD *)&v111[0].__r_.__value_.__l.0 = 0; if ( (*(_BYTE *)&v108.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v108.__r_.__value_.__l.__data_); v66 = cocos2d::CCArray::stringAtIndex(v13, 26); v67 = (const std::string::value_type *)cocos2d::CCString::getCString(v66); std::string::assign((std::string *)&v98[1], v67); v68 = cocos2d::CCArray::stringAtIndex(v13, 27); v69 = (const char *)cocos2d::CCString::getCString(v68); v70 = strlen(v69); if ( v70 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v71 = v70; if ( v70 >= 0x17 ) { v73 = 26; if ( (v70 | 7) != 0x17 ) v73 = (v70 | 7) + 1; v72 = (char *)operator new(v73); v109.__r_.__value_.__r.__words[2] = (std::string::size_type)v72; v109.__r_.__value_.__r.__words[0] = v73 | 1; v109.__r_.__value_.__l.__size_ = v71; goto LABEL_71; } v109.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v70); v72 = v109.__r_.__value_.__s.__data_; if ( v70 ) LABEL_71: memmove(v72, v69, v71); v72[v71] = 0; LevelTools::base64DecodeString(v111, &v109); v74 = v105; if ( (v100 & 1) != 0 ) operator delete(v101[0]); v101[0] = v111[0].__r_.__value_.__l.__data_; v100 = *(_OWORD *)&v111[0].__r_.__value_.__l.0; *(_WORD *)&v111[0].__r_.__value_.__l.0 = 0; if ( (*(_BYTE *)&v109.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v109.__r_.__value_.__l.__data_); v75 = cocos2d::CCArray::stringAtIndex(v13, 28); v76 = (const std::string::value_type *)cocos2d::CCString::getCString(v75); std::string::assign((std::string *)&v101[1], v76); v77 = cocos2d::CCArray::stringAtIndex(v13, 29); v99 = cocos2d::CCString::intValue(v77); if ( (unsigned int)sub_1007FEF90(v13) >= 0x1F ) { v78 = cocos2d::CCArray::stringAtIndex(v13, 30); LODWORD(v102) = cocos2d::CCString::intValue(v78); } if ( (unsigned int)sub_1007FEF90(v13) >= 0x20 ) { v79 = cocos2d::CCArray::stringAtIndex(v13, 31); DWORD1(v102) = cocos2d::CCString::intValue(v79); } if ( (unsigned int)sub_1007FEF90(v13) >= 0x21 ) { v80 = cocos2d::CCArray::stringAtIndex(v13, 32); DWORD2(v102) = cocos2d::CCString::intValue(v80); } if ( (unsigned int)sub_1007FEF90(v13) >= 0x22 ) { v81 = cocos2d::CCArray::stringAtIndex(v13, 33); HIDWORD(v102) = cocos2d::CCString::intValue(v81); } if ( (__dst[0] & 1) != 0 ) { if ( *(_QWORD *)&__dst[8] ) { v82 = *(_DWORD *)&__dst[24]; sub_10001AD30(&v103, *(const void **)&__dst[16], *(unsigned __int64 *)&__dst[8]); LABEL_89: GameLevelManager::storeUserName(v74, v82, v110, &v103); if ( (v103 & 1) != 0 ) operator delete(v104); } } else if ( __dst[0] ) { v82 = *(_DWORD *)&__dst[24]; v103 = *(_OWORD *)__dst; v104 = *(void **)&__dst[16]; goto LABEL_89; } v83 = *(_QWORD *)(v74 + 1256); if ( v83 ) (*(void (__fastcall **)(__int64, __int64, _BYTE *))(*(_QWORD *)v83 + 320LL))(v83, v110, __dst); LOBYTE(v19) = sub_100590AA0(__dst); return v19; }
GD Web Decomp Icon

GD Web Decomp

Raw Source