// // sub_1005CF190 from 0x1005cf190 to 0x1005cfd6e (3038 bytes) // // 1 xrefs: // > processFMODAudioState @ 0x1005ef8e4 // // 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:32:52 +0000 // void __fastcall sub_1005CF190(__int64 *a1, __int64 a2) { __int64 v2; // rax __int64 v3; // rcx __int64 v4; // rdx void **v5; // r12 int v6; // eax char *v7; // rdi const char *v8; // rdi bool v9; // zf int v10; // r14d void **v11; // r15 _QWORD *v12; // rbx __int64 v13; // rsi signed int v14; // esi void **v15; // rbx void **v16; // rbx signed int v17; // ecx float *v18; // rbx char *v19; // rdi const char *v20; // rdi const std::string *v21; // rsi std::string *v22; // rdi char *v23; // r15 __int64 v24; // rax __int64 v25; // rax std::string::pointer data; // rdx signed int v27; // r14d char *v28; // rbx signed int v29; // r12d __int64 v30; // rax char *v31; // rdi const char *v32; // rdi float v33; // xmm0_4 signed int v34; // r15d char *v35; // rdi const char *v36; // rdi signed int v37; // r14d char *v38; // r15 signed int v39; // eax signed int v40; // r15d char *v41; // rdi const char *v42; // rdi float v43; // xmm0_4 char *v44; // rdi const char *v45; // rdi int v46; // eax signed int v47; // r14d char *v48; // rdi const char *v49; // rdi float v50; // xmm0_4 char *v51; // rcx _BYTE *v52; // rcx char *v53; // r15 signed int v54; // r15d char *v55; // rdi const char *v56; // rdi signed int v57; // r14d signed int v58; // r15d float v59; // xmm0_4 char *v60; // rdi const char *v61; // rdi char *v62; // r15 float v63; // xmm0_4 char *v64; // rdi const char *v65; // rdi float v66; // xmm0_4 char *v67; // rdi const char *v68; // rdi char *v69; // rbx float v70; // xmm0_4 char *v71; // r15 signed int v72; // r14d char *v73; // rbx signed int v74; // r13d int v75; // r12d __int64 v76; // rax char *v77; // rdi signed int v78; // r15d char *v79; // rdi const char *v80; // rdi int v81; // eax char *v82; // rdi const char *v83; // rdi char *v84; // r15 signed int v85; // r14d signed int v86; // r13d __int64 v87; // rax char *v88; // rdi signed int v89; // r15d char *v90; // rdi const char *v91; // rdi signed int v92; // r14d signed int v93; // r15d signed int v94; // eax char *v95; // r15 signed int v96; // ecx char *v97; // rax _BYTE *v98; // rax int v99; // eax char *v100; // rdi const char *v101; // rdi signed int v102; // r14d signed int v103; // eax signed int v104; // r14d char *v105; // rdi char *v106; // r15 char *v107; // rdi const char *v108; // rdi float v109; // xmm0_4 char *v110; // rcx _BYTE *v111; // rcx char *v112; // rdi char *v113; // rcx _BYTE *v114; // rcx char *v115; // rcx _BYTE *v116; // rcx int v117; // eax int v118; // eax void **v119; // rbx void *v120; // rdi __int128 v121; // [rsp+8h] [rbp-B8h] BYREF __int64 v122; // [rsp+18h] [rbp-A8h] std::string v123; // [rsp+20h] [rbp-A0h] BYREF _QWORD *v124; // [rsp+38h] [rbp-88h] std::string v125; // [rsp+40h] [rbp-80h] BYREF int v126; // [rsp+5Ch] [rbp-64h] BYREF void *__p; // [rsp+60h] [rbp-60h] BYREF void **v128; // [rsp+68h] [rbp-58h] signed int v129; // [rsp+78h] [rbp-48h] int v130; // [rsp+8Ch] [rbp-34h] char *v131; // [rsp+90h] [rbp-30h] memset(&v123, 0, sizeof(v123)); v2 = *((int *)a1 + 6); v3 = *a1; if ( (int)v2 < (int)(-1431655765 * ((unsigned __int64)(a1[1] - *a1) >> 3)) ) { *((_DWORD *)a1 + 6) = v2 + 1; std::string::operator=(&v123, (const std::string *)(v3 + 24 * v2)); } sub_1005C67B0((__int64)&__p, (unsigned __int8 *)&v123, ":", a1[4]); v4 = v129; v5 = (void **)__p; v6 = 0; if ( v129 < (int)(-1431655765 * ((unsigned __int64)((char *)v128 - (_BYTE *)__p) >> 3)) ) { ++v129; v7 = (char *)__p + 24 * v4; if ( (*v7 & 1) != 0 ) v8 = *((const char **)v7 + 2); else v8 = v7 + 1; v6 = atoi(v8); } v9 = *(_QWORD *)(a2 + 24) == 0; v124 = (_QWORD *)a2; if ( !v9 ) { v10 = v6; v11 = *(void ***)(a2 + 16); if ( v11 ) { do { v16 = (void **)*v11; if ( ((_BYTE)v11[3] & 1) != 0 ) operator delete(v11[5]); operator delete(v11); v11 = v16; } while ( v16 ); } v12 = v124; v124[2] = 0; v13 = v12[1]; if ( v13 ) __bzero(*v12, 8 * v13); v12[3] = 0; v5 = (void **)__p; v6 = v10; } if ( v6 > 0 ) { v14 = v129; v15 = v128; while ( 1 ) { v130 = v6; v126 = 0; v17 = -1431655765 * ((unsigned __int64)((char *)v15 - (char *)v5) >> 3); v18 = (float *)v124; if ( v14 < v17 ) { v129 = v14 + 1; v19 = (char *)&v5[3 * v14]; if ( (*v19 & 1) != 0 ) v20 = *((const char **)v19 + 2); else v20 = v19 + 1; v126 = atoi(v20); } v21 = (const std::string *)&v126; v125.__r_.__value_.__r.__words[0] = (std::string::size_type)&v126; v22 = (std::string *)v18; v23 = sub_1003D9150(v18, &v126, (__int64)&unk_100A0D5BE, &v125); memset(&v125, 0, sizeof(v125)); v24 = v129; if ( v129 < (int)(-1431655765 * ((unsigned __int64)((char *)v128 - (_BYTE *)__p) >> 3)) ) { ++v129; v21 = (const std::string *)((char *)__p + 24 * v24); v22 = &v125; std::string::operator=(&v125, v21); } v25 = cocos2d::CCFileUtils::sharedFileUtils(v22, v21); data = v125.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&v125.__r_.__value_.__s.0 & 1) != 0 ) data = v125.__r_.__value_.__l.__data_; (*(void (__fastcall **)(__int128 *, __int64, std::string::pointer, _QWORD))(*(_QWORD *)v25 + 48LL))( &v121, v25, data, 0); if ( (v23[24] & 1) != 0 ) operator delete(*((void **)v23 + 5)); *((_QWORD *)v23 + 5) = v122; *(_OWORD *)(v23 + 24) = v121; if ( (*(_BYTE *)&v125.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v125.__r_.__value_.__l.__data_); v27 = v129; v28 = (char *)__p; v29 = -1431655765 * ((unsigned __int64)((char *)v128 - (_BYTE *)__p) >> 3); if ( v129 < v29 ) { v30 = v129; v27 = ++v129; v31 = (char *)__p + 24 * v30; if ( (*v31 & 1) != 0 ) v32 = *((const char **)v31 + 2); else v32 = v31 + 1; v33 = atof(v32); *((float *)v23 + 12) = v33; } v131 = v23; if ( v27 >= v29 ) break; v34 = v27 + 1; v129 = v27 + 1; v35 = &v28[24 * v27]; if ( (*v35 & 1) != 0 ) v36 = *((const char **)v35 + 2); else v36 = v35 + 1; v43 = atof(v36); *((float *)v131 + 13) = v43; if ( v34 >= v29 ) goto LABEL_41; v37 = v27 + 2; v129 = v34 + 1; v44 = &v28[24 * v34]; if ( (*v44 & 1) != 0 ) v45 = *((const char **)v44 + 2); else v45 = v44 + 1; v38 = v131; v50 = atof(v45); *((float *)v38 + 14) = v50; if ( v37 >= v29 ) { LABEL_42: v39 = v37; if ( v37 >= v29 ) goto LABEL_65; goto LABEL_43; } LABEL_55: v39 = v37 + 1; v129 = v37 + 1; v51 = &v28[24 * v37]; if ( (*v51 & 1) != 0 ) { if ( *((_QWORD *)v51 + 1) == 1 ) { v52 = *((_BYTE **)v51 + 2); LABEL_64: v38[60] = *v52 == 49; if ( v39 >= v29 ) goto LABEL_65; goto LABEL_43; } } else if ( *v51 == 2 ) { v52 = v51 + 1; goto LABEL_64; } v38[60] = 0; if ( v39 >= v29 ) { LABEL_65: v40 = v39; if ( v39 >= v29 ) goto LABEL_66; goto LABEL_51; } LABEL_43: v40 = v39 + 1; v129 = v39 + 1; v41 = &v28[24 * v39]; if ( (*v41 & 1) != 0 ) v42 = *((const char **)v41 + 2); else v42 = v41 + 1; v46 = atoi(v42); *((_DWORD *)v131 + 16) = v46; if ( v40 >= v29 ) { LABEL_66: v47 = v40; *((_DWORD *)v131 + 18) = 0; if ( v40 >= v29 ) goto LABEL_67; goto LABEL_60; } LABEL_51: v47 = v40 + 1; v129 = v40 + 1; v48 = &v28[24 * v40]; if ( (*v48 & 1) != 0 ) v49 = *((const char **)v48 + 2); else v49 = v48 + 1; v53 = v131; *((_DWORD *)v53 + 18) = atoi(v49); if ( v47 >= v29 ) { LABEL_67: v54 = v47; if ( v47 >= v29 ) goto LABEL_68; goto LABEL_73; } LABEL_60: v54 = v47 + 1; v129 = v47 + 1; v55 = &v28[24 * v47]; if ( (*v55 & 1) != 0 ) v56 = *((const char **)v55 + 2); else v56 = v55 + 1; v59 = atof(v56); *((float *)v131 + 19) = v59; if ( v54 >= v29 ) { LABEL_68: v57 = v54; if ( v54 >= v29 ) goto LABEL_69; goto LABEL_77; } LABEL_73: v57 = v54 + 1; v129 = v54 + 1; v60 = &v28[24 * v54]; if ( (*v60 & 1) != 0 ) v61 = *((const char **)v60 + 2); else v61 = v60 + 1; v62 = v131; v63 = atof(v61); *((float *)v62 + 20) = v63; if ( v57 >= v29 ) { LABEL_69: v58 = v57; if ( v57 >= v29 ) goto LABEL_85; LABEL_81: v129 = v58 + 1; v67 = &v28[24 * v58]; if ( (*v67 & 1) != 0 ) v68 = *((const char **)v67 + 2); else v68 = v67 + 1; v69 = v131; v70 = atof(v68); *((float *)v69 + 22) = v70; goto LABEL_85; } LABEL_77: v58 = v57 + 1; v129 = v57 + 1; v64 = &v28[24 * v57]; if ( (*v64 & 1) != 0 ) v65 = *((const char **)v64 + 2); else v65 = v64 + 1; v66 = atof(v65); *((float *)v131 + 21) = v66; if ( v58 < v29 ) goto LABEL_81; LABEL_85: v71 = v131; sub_1005C6CE0((__int64 *)&__p, (unsigned __int64 *)v131 + 12); sub_1005C6CE0((__int64 *)&__p, (unsigned __int64 *)v71 + 13); sub_1005C6CE0((__int64 *)&__p, (unsigned __int64 *)v71 + 14); sub_1005C6CE0((__int64 *)&__p, (unsigned __int64 *)v71 + 15); sub_1005C6CE0((__int64 *)&__p, (unsigned __int64 *)v71 + 16); v72 = v129; v73 = (char *)__p; v74 = -1431655765 * ((unsigned __int64)((char *)v128 - (_BYTE *)__p) >> 3); v75 = 0; if ( v129 >= v74 ) { *((_DWORD *)v71 + 34) = 0; LABEL_95: v78 = v72; goto LABEL_98; } v76 = v129; v72 = ++v129; v77 = (char *)__p + 24 * v76; if ( (*v77 & 1) != 0 ) { *((_DWORD *)v71 + 34) = atoi(*((const char **)v77 + 2)); if ( v72 >= v74 ) goto LABEL_95; } else { *((_DWORD *)v71 + 34) = atoi(v77 + 1); if ( v72 >= v74 ) goto LABEL_95; } v78 = v72 + 1; v129 = v72 + 1; v79 = &v73[24 * v72]; if ( (*v79 & 1) != 0 ) v80 = *((const char **)v79 + 2); else v80 = v79 + 1; v75 = atoi(v80); LABEL_98: *((_DWORD *)v131 + 35) = v75; v81 = 0; if ( v78 < v74 ) { v129 = v78 + 1; v82 = &v73[24 * v78]; if ( (*v82 & 1) != 0 ) v83 = *((const char **)v82 + 2); else v83 = v82 + 1; v81 = atoi(v83); } v84 = v131; *((_DWORD *)v131 + 36) = v81; sub_1005C6CE0((__int64 *)&__p, (unsigned __int64 *)v84 + 19); sub_1005C6CE0((__int64 *)&__p, (unsigned __int64 *)v84 + 20); v85 = v129; v5 = (void **)__p; v15 = v128; v86 = -1431655765 * ((unsigned __int64)((char *)v128 - (_BYTE *)__p) >> 3); if ( v129 >= v86 ) { *((_DWORD *)v84 + 42) = *((_DWORD *)v84 + 42); LABEL_111: v89 = v85; if ( v85 >= v86 ) goto LABEL_112; goto LABEL_120; } v87 = v129; v85 = ++v129; v88 = (char *)__p + 24 * v87; if ( (*v88 & 1) != 0 ) { *((_DWORD *)v84 + 42) = atoi(*((const char **)v88 + 2)); if ( v85 >= v86 ) goto LABEL_111; } else { *((_DWORD *)v84 + 42) = atoi(v88 + 1); if ( v85 >= v86 ) goto LABEL_111; } v89 = v85 + 1; v129 = v85 + 1; v90 = (char *)&v5[3 * v85]; if ( (*v90 & 1) != 0 ) v91 = *((const char **)v90 + 2); else v91 = v90 + 1; v99 = atoi(v91); *((_DWORD *)v131 + 44) = v99; if ( v89 >= v86 ) { LABEL_112: v92 = v89; if ( v89 >= v86 ) goto LABEL_113; goto LABEL_132; } LABEL_120: v92 = v89 + 1; v129 = v89 + 1; v100 = (char *)&v5[3 * v89]; if ( (*v100 & 1) != 0 ) v101 = *((const char **)v100 + 2); else v101 = v100 + 1; v106 = v131; *((_DWORD *)v106 + 45) = atoi(v101); if ( v92 >= v86 ) { LABEL_113: v93 = v92; if ( v92 >= v86 ) goto LABEL_114; goto LABEL_138; } LABEL_132: v93 = v92 + 1; v129 = v92 + 1; v107 = (char *)&v5[3 * v92]; if ( (*v107 & 1) != 0 ) v108 = *((const char **)v107 + 2); else v108 = v107 + 1; v109 = atof(v108); *((float *)v131 + 46) = v109; if ( v93 >= v86 ) { LABEL_114: v94 = v93; v95 = v131; if ( v94 >= v86 ) goto LABEL_144; goto LABEL_115; } LABEL_138: v94 = v93 + 1; v129 = v93 + 1; v110 = (char *)&v5[3 * v93]; if ( (*v110 & 1) != 0 ) { v95 = v131; if ( *((_QWORD *)v110 + 1) == 1 ) { v111 = *((_BYTE **)v110 + 2); LABEL_143: v95[188] = *v111 == 49; if ( v94 >= v86 ) goto LABEL_144; goto LABEL_115; } } else { v95 = v131; if ( *v110 == 2 ) { v111 = v110 + 1; goto LABEL_143; } } v95[188] = 0; if ( v94 >= v86 ) { LABEL_144: v96 = v94; if ( v94 < v86 ) goto LABEL_145; goto LABEL_125; } LABEL_115: v96 = v94 + 1; v129 = v94 + 1; v97 = (char *)&v5[3 * v94]; if ( (*v97 & 1) != 0 ) { if ( *((_QWORD *)v97 + 1) == 1 ) { v98 = *((_BYTE **)v97 + 2); LABEL_124: v95[189] = *v98 == 49; if ( v96 < v86 ) goto LABEL_145; goto LABEL_125; } } else if ( *v97 == 2 ) { v98 = v97 + 1; goto LABEL_124; } v95[189] = 0; if ( v96 < v86 ) { LABEL_145: v102 = v96 + 1; v129 = v96 + 1; v112 = (char *)&v5[3 * v96]; if ( (*v112 & 1) != 0 ) { *((_DWORD *)v95 + 48) = atoi(*((const char **)v112 + 2)); if ( v102 >= v86 ) { LABEL_126: v103 = v102; if ( v102 >= v86 ) goto LABEL_155; goto LABEL_127; } } else { *((_DWORD *)v95 + 48) = atoi(v112 + 1); if ( v102 >= v86 ) goto LABEL_126; } goto LABEL_149; } LABEL_125: v102 = v96; if ( v96 >= v86 ) goto LABEL_126; LABEL_149: v103 = v102 + 1; v129 = v102 + 1; v113 = (char *)&v5[3 * v102]; if ( (*v113 & 1) != 0 ) { if ( *((_QWORD *)v113 + 1) != 1 ) goto LABEL_169; v114 = *((_BYTE **)v113 + 2); LABEL_154: v95[196] = *v114 == 49; if ( v103 >= v86 ) goto LABEL_155; LABEL_127: v104 = v103 + 1; v129 = v103 + 1; v105 = (char *)&v5[3 * v103]; if ( (*v105 & 1) != 0 ) { *((_DWORD *)v95 + 50) = atoi(*((const char **)v105 + 2)); if ( v104 < v86 ) goto LABEL_156; } else { *((_DWORD *)v95 + 50) = atoi(v105 + 1); if ( v104 < v86 ) goto LABEL_156; } LABEL_18: v14 = v104; v6 = v130 - 1; if ( v130 == 1 ) goto LABEL_171; } else { if ( *v113 == 2 ) { v114 = v113 + 1; goto LABEL_154; } LABEL_169: v95[196] = 0; if ( v103 < v86 ) goto LABEL_127; LABEL_155: v104 = v103; if ( v103 >= v86 ) goto LABEL_18; LABEL_156: v14 = v104 + 1; v129 = v104 + 1; v115 = (char *)&v5[3 * v104]; if ( (*v115 & 1) != 0 ) { if ( *((_QWORD *)v115 + 1) == 1 ) { v116 = *((_BYTE **)v115 + 2); goto LABEL_161; } LABEL_163: v118 = v130; v95[204] = 0; v6 = v118 - 1; if ( !v6 ) goto LABEL_171; } else { if ( *v115 != 2 ) goto LABEL_163; v116 = v115 + 1; LABEL_161: v117 = v130; v95[204] = *v116 == 49; v6 = v117 - 1; if ( !v6 ) goto LABEL_171; } } } v34 = v27; LABEL_41: v37 = v34; v38 = v131; if ( v37 >= v29 ) goto LABEL_42; goto LABEL_55; } LABEL_171: if ( v5 ) { v119 = v128; v120 = v5; if ( v128 != v5 ) { do { if ( (*(_BYTE *)(v119 - 3) & 1) != 0 ) operator delete(*(v119 - 1)); v119 -= 3; } while ( v119 != v5 ); v120 = __p; } v128 = v5; operator delete(v120); } if ( (*(_BYTE *)&v123.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v123.__r_.__value_.__l.__data_); }
GD Web Decomp Icon

GD Web Decomp

Raw Source