// // GameToolbox::stringSetupToDict from 0x1004ed7a0 to 0x1004edcf2 (1362 bytes) // // 3 xrefs: // > LevelEditorLayer::createObjectsFromSetup @ 0x1000abce6 // > LevelSettingsObject::objectFromString @ 0x1000aea6b // > StartPosObject::loadSettingsFromString @ 0x10019e177 // // 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:23 +0000 // _QWORD *__fastcall GameToolbox::stringSetupToDict(__int64 a1, char *a2) { char *v2; // r13 const char *v3; // r14 const char *v4; // rdi size_t v5; // rax size_t v6; // rbx char *v7; // r12 size_t v8; // r13 char *v9; // rbx size_t v10; // r14 size_t v11; // rax __int64 v12; // r15 char *v13; // rcx char *v14; // rdx __int64 v15; // rdi size_t v16; // r14 size_t v17; // r13 char *v18; // rbx size_t v19; // r13 char *v20; // r12 char v21; // al char *v22; // r13 __int64 v23; // rbx const char *v24; // rbx size_t v25; // r15 size_t v26; // r14 size_t v27; // rax size_t v28; // r13 char *v29; // r12 size_t v30; // r15 size_t v31; // r14 __int64 v32; // rax char *v33; // r12 unsigned __int64 v34; // rbx size_t v35; // rax char *v36; // rcx char *v37; // rbx __int64 v38; // rsi __int64 v39; // r14 unsigned int v40; // r13d unsigned int v41; // ebx __int64 v42; // rax const char *CString; // rax const char *v44; // r12 __int64 v45; // r14 size_t v46; // rax size_t v47; // rbx char *v48; // r15 __int64 v49; // rax size_t v50; // r14 _QWORD v52[2]; // [rsp+8h] [rbp-98h] BYREF void *__p; // [rsp+18h] [rbp-88h] size_t v54; // [rsp+20h] [rbp-80h] __int64 v55; // [rsp+28h] [rbp-78h] _QWORD *v56; // [rsp+30h] [rbp-70h] char *v57; // [rsp+38h] [rbp-68h] size_t __dst; // [rsp+40h] [rbp-60h] BYREF size_t v59; // [rsp+48h] [rbp-58h] void *v60; // [rsp+50h] [rbp-50h] char __s[8]; // [rsp+58h] [rbp-48h] BYREF size_t v62; // [rsp+60h] [rbp-40h] void *v63; // [rsp+68h] [rbp-38h] __int64 v64; // [rsp+70h] [rbp-30h] v2 = a2; v56 = cocos2d::CCDictionary::create(); if ( (*(_BYTE *)a1 & 1) != 0 ) v3 = *(const char **)(a1 + 16); else v3 = (const char *)(a1 + 1); v4 = v3; v5 = strlen(v3); if ( v5 >= 0xFFFFFFFFFFFFFFF8LL ) LABEL_97: sub_100003630(); v6 = v5; v57 = a2; if ( v5 >= 0x17 ) { v8 = 26; if ( (v5 | 7) != 0x17 ) v8 = (v5 | 7) + 1; v7 = (char *)operator new(v8); v60 = v7; __dst = v8 + 1; v2 = v57; v59 = v6; } else { LOBYTE(__dst) = 2 * v5; v7 = (char *)&__dst + 1; if ( !v5 ) goto LABEL_12; } v4 = v7; memmove(v7, v3, v6); LABEL_12: v7[v6] = 0; v9 = (char *)&__dst + 1; v55 = sub_1007FE900(v4); if ( (__dst & 1) != 0 ) { v9 = (char *)v60; v10 = v59; } else { v10 = (unsigned __int8)__dst >> 1; } v11 = strlen(v2); v54 = v10; v12 = -1; if ( v10 != 0 && v11 != 0 ) { v13 = &v9[v54]; v14 = v9; LABEL_17: v15 = 0; while ( *v14 != v2[v15] ) { if ( v11 == ++v15 ) { if ( ++v14 != v13 ) goto LABEL_17; v14 = &v9[v54]; break; } } v12 = -1; if ( v14 != v13 ) v12 = v14 - v9; } v16 = 0; do { if ( (__dst & 1) != 0 ) { v17 = v59; if ( v59 < v16 ) LABEL_94: sub_100056810(); v18 = (char *)v60; } else { v17 = (unsigned __int8)__dst >> 1; v18 = (char *)&__dst + 1; if ( v16 > v17 ) goto LABEL_94; } v19 = v17 - v16; if ( v19 >= v12 - v16 ) v19 = v12 - v16; if ( v19 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v64 = v12; if ( v19 >= 0x17 ) { v25 = v16; v26 = (v19 | 7) + 1; if ( (v19 | 7) == 0x17 ) v26 = 26; v20 = (char *)operator new(v26); v63 = v20; *(_QWORD *)__s = v26 | 1; v62 = v19; v16 = v25; } else { __s[0] = 2 * v19; v20 = &__s[1]; if ( !v19 ) { __s[1] = 0; v21 = __s[0]; if ( (__s[0] & 1) == 0 ) goto LABEL_37; goto LABEL_44; } } memmove(v20, &v18[v16], v19); v20[v19] = 0; v21 = __s[0]; if ( (__s[0] & 1) == 0 ) { LABEL_37: v22 = v57; v23 = v64; if ( !v21 && v16 == v54 ) goto LABEL_57; v24 = &__s[1]; goto LABEL_47; } LABEL_44: v22 = v57; v23 = v64; if ( !v62 && v16 == v54 ) goto LABEL_57; v24 = (const char *)v63; LABEL_47: v27 = strlen(v24); if ( v27 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v28 = v27; if ( v27 >= 0x17 ) { v30 = v16; v31 = (v27 | 7) + 1; if ( (v27 | 7) == 0x17 ) v31 = 26; v29 = (char *)operator new(v31); __p = v29; v52[0] = v31 | 1; v52[1] = v28; v16 = v30; LABEL_54: memmove(v29, v24, v28); goto LABEL_55; } LOBYTE(v52[0]) = 2 * v27; v29 = (char *)v52 + 1; if ( v27 ) goto LABEL_54; LABEL_55: v29[v28] = 0; v32 = sub_10088E600(v52); sub_1007FEBF0(v55, v32); v22 = v57; v23 = v64; if ( (v52[0] & 1) != 0 ) operator delete(__p); LABEL_57: v12 = -1; if ( v23 == -1 ) { if ( (__s[0] & 1) == 0 ) continue; LABEL_73: operator delete(v63); continue; } if ( (__dst & 1) != 0 ) { v33 = (char *)v60; v34 = v59; } else { v34 = (unsigned __int8)__dst >> 1; v33 = (char *)&__dst + 1; } v16 = v64 + 1; v35 = strlen(v22); if ( v34 > v64 + 1 && v35 != 0 ) { v36 = &v33[v16]; v37 = &v33[v34]; LABEL_65: v38 = 0; while ( *v36 != v22[v38] ) { if ( v35 == ++v38 ) { if ( ++v36 != v37 ) goto LABEL_65; v36 = v37; break; } } v12 = v36 - v33; if ( v36 == v37 ) v12 = -1; } v23 = v64; if ( (__s[0] & 1) != 0 ) goto LABEL_73; } while ( v23 != -1 ); if ( (__dst & 1) != 0 ) operator delete(v60); v39 = v55; if ( (unsigned int)sub_1007FEF90(v55) ) { v40 = 0; while ( 1 ) { v41 = v40; v40 += 2; if ( (unsigned int)sub_1007FEF90(v39) < v40 ) return nullptr; v42 = sub_1007FEFE0(v39, v41); CString = (const char *)cocos2d::CCString::getCString(v42); if ( CString ) { v44 = CString; if ( *CString ) break; } LABEL_78: if ( v40 >= (unsigned int)sub_1007FEF90(v39) ) return v56; } v45 = sub_1007FEFE0(v39, v41 + 1); v46 = strlen(v44); if ( v46 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_97; v47 = v46; if ( v46 >= 0x17 ) { v64 = v45; v49 = v46 | 7; v50 = 26; if ( (v47 | 7) != 0x17 ) v50 = v49 + 1; v48 = (char *)operator new(v50); v63 = v48; *(_QWORD *)__s = v50 + 1; v62 = v47; v45 = v64; } else { __s[0] = 2 * v46; v48 = &__s[1]; if ( !v46 ) { LABEL_90: v48[v47] = 0; cocos2d::CCDictionary::setObject((__int64)v56, v45, __s); v39 = v55; if ( (__s[0] & 1) != 0 ) operator delete(v63); goto LABEL_78; } } memmove(v48, v44, v47); goto LABEL_90; } return v56; }
GD Web Decomp Icon

GD Web Decomp

Raw Source