// // EditorSFXManager::decodeSound from 0x1004c92e4 to 0x1004c96e4 (1024 bytes) // // 1 xrefs: // > EditorSFXManager::deserializeAll @ 0x1004c7c74 // // This function is hookable on this platform (idp: arm, 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 11:06:24 +0000 // _DWORD *__fastcall EditorSFXManager::decodeSound(__int64 a1, int a2) { _DWORD *v3; // x0 _DWORD *v4; // x19 std::string::size_type v5; // x8 std::string::size_type v6; // x26 void **v7; // x27 const char *v8; // x0 const char *p_p; // x0 const char *v10; // x0 const char *v11; // x0 float v12; // s0 const char *v13; // x0 _BYTE *v14; // x8 const char *v15; // x0 const char *v16; // x0 _BYTE *v17; // x8 const char *v18; // x0 const char *v19; // x0 const char *v20; // x0 float v21; // s0 const char *v22; // x0 _BYTE *v23; // x8 const char *v24; // x0 const char *v25; // x0 const char *v26; // x0 float v27; // s0 bool v28; // w8 bool v29; // w8 bool v30; // w8 void **v31; // x1 std::string::size_type v32; // x2 const std::string::value_type *v33; // x1 std::string::size_type v34; // x2 void *__p; // [xsp+8h] [xbp-88h] BYREF std::string::size_type v37; // [xsp+10h] [xbp-80h] __int64 v38; // [xsp+18h] [xbp-78h] void *v39; // [xsp+20h] [xbp-70h] BYREF std::string::size_type v40; // [xsp+28h] [xbp-68h] __int64 v41; // [xsp+30h] [xbp-60h] __int64 v42; // [xsp+38h] [xbp-58h] BYREF v3 = sub_1004326CC((__int64)"GJ_sfxIcon_001.png"); v4 = v3; if ( !v3 ) return v4; v3[466] = 0; v3[471] = 1065353216; *(_QWORD *)(v3 + 469) = 0; *((_BYTE *)v3 + 1906) = 0; v3[487] = 0; *((_OWORD *)v3 + 118) = 0u; *((_BYTE *)v3 + 1904) = 0; v41 = 0; v42 = 0; v39 = nullptr; v40 = 0; __p = nullptr; v37 = 0; v38 = 0; while ( (unsigned int)sub_1004C9710(a2, (int)&v42, (int)&v39, 44) ) { v5 = HIBYTE(v41); if ( v41 < 0 ) v5 = v40; if ( v5 ) { if ( !(unsigned int)sub_1004C9710(a2, (int)&v42, (int)&__p, 44) ) break; v6 = HIBYTE(v41); v7 = (void **)v39; if ( v41 >= 0 ) v8 = (const char *)&v39; else v8 = (const char *)v39; switch ( atoi(v8) ) { case 1: if ( v38 >= 0 ) p_p = (const char *)&__p; else p_p = (const char *)__p; v4[466] = atoi(p_p); continue; case 2: if ( v38 >= 0 ) v20 = (const char *)&__p; else v20 = (const char *)__p; v21 = atof(v20); *((float *)v4 + 471) = v21; continue; case 3: if ( v38 >= 0 ) v16 = (const char *)&__p; else v16 = (const char *)__p; v4[469] = atoi(v16); continue; case 4: if ( v38 >= 0 ) v18 = (const char *)&__p; else v18 = (const char *)__p; v4[470] = atoi(v18); continue; case 5: if ( v38 >= 0 ) v13 = (const char *)&__p; else v13 = (const char *)__p; v4[472] = atoi(v13); continue; case 6: if ( v38 >= 0 ) v22 = (const char *)&__p; else v22 = (const char *)__p; v4[474] = atoi(v22); continue; case 7: if ( v38 >= 0 ) v24 = (const char *)&__p; else v24 = (const char *)__p; v4[473] = atoi(v24); continue; case 8: if ( v38 >= 0 ) v19 = (const char *)&__p; else v19 = (const char *)__p; v4[475] = atoi(v19); continue; case 9: if ( v38 >= 0 ) v26 = (const char *)&__p; else v26 = (const char *)__p; v27 = atof(v26); *((float *)v4 + 487) = v27; continue; case 10: if ( v38 >= 0 ) v15 = (const char *)&__p; else v15 = (const char *)__p; v4[496] = atoi(v15); continue; case 11: if ( v38 >= 0 ) v25 = (const char *)&__p; else v25 = (const char *)__p; v4[497] = atoi(v25); continue; case 12: if ( v38 >= 0 ) v11 = (const char *)&__p; else v11 = (const char *)__p; v12 = atof(v11); *((float *)v4 + 498) = v12; continue; case 13: if ( SHIBYTE(v38) < 0 ) { if ( v37 == 1 ) { v14 = __p; goto LABEL_78; } } else if ( SHIBYTE(v38) == 1 ) { v14 = &__p; LABEL_78: v28 = *v14 == 49; goto LABEL_80; } v28 = 0; LABEL_80: *((_BYTE *)v4 + 1996) = v28; break; case 14: if ( SHIBYTE(v38) < 0 ) { if ( v37 == 1 ) { v23 = __p; goto LABEL_88; } } else if ( SHIBYTE(v38) == 1 ) { v23 = &__p; LABEL_88: v30 = *v23 == 49; goto LABEL_90; } v30 = 0; LABEL_90: *((_BYTE *)v4 + 1905) = v30; continue; case 15: if ( v38 >= 0 ) v10 = (const char *)&__p; else v10 = (const char *)__p; v4[467] = atoi(v10); continue; case 16: if ( SHIBYTE(v38) < 0 ) { if ( v37 == 1 ) { v17 = __p; goto LABEL_83; } } else if ( SHIBYTE(v38) == 1 ) { v17 = &__p; LABEL_83: v29 = *v17 == 49; goto LABEL_85; } v29 = 0; LABEL_85: *((_BYTE *)v4 + 1904) = v29; continue; default: if ( (*((char *)v4 + 2023) & 0x8000000000000000LL) != 0 ) { if ( !*((_QWORD *)v4 + 251) ) goto LABEL_93; } else if ( !*((_BYTE *)v4 + 2023) ) { goto LABEL_93; } std::string::push_back((std::string *)(v4 + 500), 44); v6 = HIBYTE(v41); v7 = (void **)v39; LABEL_93: if ( (v6 & 0x80u) == 0LL ) v31 = &v39; else v31 = v7; if ( (v6 & 0x80u) == 0LL ) v32 = v6; else v32 = v40; std::string::append((std::string *)(v4 + 500), (const std::string::value_type *)v31, v32); std::string::push_back((std::string *)(v4 + 500), 44); if ( v38 >= 0 ) v33 = (const std::string::value_type *)&__p; else v33 = (const std::string::value_type *)__p; if ( v38 >= 0 ) v34 = HIBYTE(v38); else v34 = v37; std::string::append((std::string *)(v4 + 500), v33, v34); continue; } } } if ( SHIBYTE(v38) < 0 ) operator delete(__p); if ( SHIBYTE(v41) < 0 ) operator delete(v39); return v4; }