{"type": "func", "start": 7898220, "end": 7898472, "name": "EditorSoundConfigInfoLayer::missingSFXIDs", "pseudocode": "// \n// EditorSoundConfigInfoLayer::missingSFXIDs from 0x78846c to 0x788568 (252 bytes)\n// \n// 2 xrefs:\n// > EditorSoundConfigInfoLayer::onDownloadSFX @ 0x788586\n// > EditorSoundConfigInfoLayer::downloadMissingSFX @ 0x7886de\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:59:34 +0000\n// \n\nEditorSoundConfigInfoLayer *__fastcall EditorSoundConfigInfoLayer::missingSFXIDs(\n        EditorSoundConfigInfoLayer *this,\n        int a2)\n{\n  int v3; // r1\n  char *v4; // r0\n  unsigned int i; // r6\n  int v6; // r9\n  unsigned int j; // r7\n  char *v8; // r2\n  MusicDownloadManager *v9; // r0\n  unsigned int v10; // r2\n  int *v11; // r3\n  int v13; // [sp+0h] [bp-20h] BYREF\n  char **v14[3]; // [sp+4h] [bp-1Ch] BYREF\n  int v15[3]; // [sp+10h] [bp-10h] BYREF\n\n  *(_DWORD *)this = 0;\n  *((_DWORD *)this + 1) = 0;\n  *((_DWORD *)this + 2) = 0;\n  v3 = *(_DWORD *)(a2 + 748);\n  if ( v3 && *(_BYTE *)(v3 + 384) )\n  {\n    std::string::basic_string(v15, v3 + 372);\n    EditorSFXManager::summarizeBlob((int)v14, (unsigned __int8 *)v15);\n    v4 = (char *)std::string::~string((int)v15);\n    for ( i = 0; i < ((char *)v14[1] - (char *)v14[0]) >> 4; ++i )\n    {\n      v6 = 4 * i;\n      for ( j = 0; ; ++j )\n      {\n        v8 = v14[0][v6 + 1];\n        if ( j >= (v14[0][v6 + 2] - v8) >> 2 )\n          break;\n        v13 = *(_DWORD *)&v8[4 * j];\n        if ( v13 > 0 )\n        {\n          v9 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)v4);\n          v4 = (char *)MusicDownloadManager::isSFXDownloaded(v9, v13, v10);\n          if ( !v4 )\n          {\n            v11 = *((int **)this + 1);\n            while ( v4 != (char *)(((int)v11 - *(_DWORD *)this) >> 2) )\n            {\n              if ( *(_DWORD *)(*(_DWORD *)this + 4 * (_DWORD)v4) == v13 )\n                goto LABEL_17;\n              ++v4;\n            }\n            if ( v11 == *((int **)this + 2) )\n            {\n              std::vector<int>::__push_back_slow_path<int const&>((int)this, &v13);\n            }\n            else\n            {\n              if ( v11 )\n                *v11 = v13;\n              *((_DWORD *)this + 1) += 4;\n            }\n          }\n        }\nLABEL_17:\n        ;\n      }\n    }\n    std::__vector_base<std::pair<int,std::vector<int>>>::~__vector_base(v14);\n  }\n  return this;\n}", "assembly": "; \n; EditorSoundConfigInfoLayer::missingSFXIDs from 0x78846c to 0x788568 (252 bytes)\n; \n; 2 xrefs:\n; > EditorSoundConfigInfoLayer::onDownloadSFX @ 0x788586\n; > EditorSoundConfigInfoLayer::downloadMissingSFX @ 0x7886de\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:59:34 +0000\n; \nPUSH.W          {R4-R10,LR}                                            ; +0x0, 0x78846c\nSUB             SP, SP, #0x20                                          ; +0x4, 0x788470\nLDR             R5, =(__stack_chk_guard_ptr - 0x78847A)                ; +0x6, 0x788472\nMOV             R4, R0                                                 ; +0x8, 0x788474\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0xa, 0x788476\nLDR             R5, [R5]; __stack_chk_guard                            ; +0xc, 0x788478\nLDR             R3, [R5]                                               ; +0xe, 0x78847a\nSTR             R3, [SP,#0x20+var_4]                                   ; +0x10, 0x78847c\nMOVS            R3, #0                                                 ; +0x12, 0x78847e\nSTR             R3, [R0]                                               ; +0x14, 0x788480\nSTR             R3, [R0,#4]                                            ; +0x16, 0x788482\nSTR             R3, [R0,#8]                                            ; +0x18, 0x788484\nLDR.W           R1, [R1,#0x2EC]                                        ; +0x1a, 0x788486\nCMP             R1, #0                                                 ; +0x1e, 0x78848a\nBEQ             loc_788554                                             ; +0x20, 0x78848c\nLDRB.W          R3, [R1,#0x180]                                        ; +0x22, 0x78848e\nCMP             R3, #0                                                 ; +0x26, 0x788492\nBEQ             loc_788554                                             ; +0x28, 0x788494\nADD             R6, SP, #0x20+var_10                                   ; +0x2a, 0x788496\nADD.W           R1, R1, #0x174                                         ; +0x2c, 0x788498\nMOV             R0, R6                                                 ; +0x30, 0x78849c\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x32, 0x78849e\nADD.W           R8, SP, #0x20+var_1C                                   ; +0x36, 0x7884a2\nMOV             R1, R6                                                 ; +0x3a, 0x7884a6\nMOV             R0, R8                                                 ; +0x3c, 0x7884a8\nBL              _ZN16EditorSFXManager13summarizeBlobERKNSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; EditorSFXManager::summarizeBlob(std::string const&) ; +0x3e, 0x7884aa\nMOV             R0, R6                                                 ; +0x42, 0x7884ae\nMOV             R10, SP                                                ; +0x44, 0x7884b0\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x46, 0x7884b2\nMOVS            R6, #0                                                 ; +0x4a, 0x7884b6\nLDR             R2, [SP,#0x20+var_1C]                                  ; +0x4c, 0x7884b8\nLDR             R3, [SP,#0x20+var_18]                                  ; +0x4e, 0x7884ba\nSUBS            R3, R3, R2                                             ; +0x50, 0x7884bc\nCMP.W           R6, R3,ASR#4                                           ; +0x52, 0x7884be\nBCS             loc_788528                                             ; +0x56, 0x7884c2\nMOV.W           R9, R6,LSL#4                                           ; +0x58, 0x7884c4\nMOVS            R7, #0                                                 ; +0x5c, 0x7884c8\nLDR             R3, [SP,#0x20+var_1C]                                  ; +0x5e, 0x7884ca\nADD             R3, R9                                                 ; +0x60, 0x7884cc\nLDR             R2, [R3,#4]                                            ; +0x62, 0x7884ce\nLDR             R3, [R3,#8]                                            ; +0x64, 0x7884d0\nSUBS            R3, R3, R2                                             ; +0x66, 0x7884d2\nCMP.W           R7, R3,ASR#2                                           ; +0x68, 0x7884d4\nBCS             loc_788524                                             ; +0x6c, 0x7884d8\nLDR.W           R3, [R2,R7,LSL#2]                                      ; +0x6e, 0x7884da\nCMP             R3, #0                                                 ; +0x72, 0x7884de\nSTR             R3, [SP,#0x20+var_20]                                  ; +0x74, 0x7884e0\nBLE             loc_788520                                             ; +0x76, 0x7884e2\nBL              _ZN20MusicDownloadManager11sharedStateEv; MusicDownloadManager::sharedState(void) ; +0x78, 0x7884e4\nLDR             R1, [SP,#0x20+var_20]; int                             ; +0x7c, 0x7884e8\nBL              _ZN20MusicDownloadManager15isSFXDownloadedEi; MusicDownloadManager::isSFXDownloaded(int) ; +0x7e, 0x7884ea\nCBNZ            R0, loc_788520                                         ; +0x82, 0x7884ee\nLDR             R3, [R4,#4]                                            ; +0x84, 0x7884f0\nLDR.W           LR, [R4]                                               ; +0x86, 0x7884f2\nLDR             R1, [SP,#0x20+var_20]                                  ; +0x8a, 0x7884f6\nRSB.W           R2, LR, R3                                             ; +0x8c, 0x7884f8\nMOV.W           R12, R2,ASR#2                                          ; +0x90, 0x7884fc\nCMP             R0, R12                                                ; +0x94, 0x788500\nBEQ             loc_788510                                             ; +0x96, 0x788502\nLDR.W           R2, [LR,R0,LSL#2]                                      ; +0x98, 0x788504\nCMP             R2, R1                                                 ; +0x9c, 0x788508\nBEQ             loc_788520                                             ; +0x9e, 0x78850a\nADDS            R0, #1                                                 ; +0xa0, 0x78850c\nB               loc_788500                                             ; +0xa2, 0x78850e\nLDR             R2, [R4,#8]                                            ; +0xa4, 0x788510\nCMP             R3, R2                                                 ; +0xa6, 0x788512\nBEQ             loc_78854A                                             ; +0xa8, 0x788514\nCBZ             R3, loc_78851A                                         ; +0xaa, 0x788516\nSTR             R1, [R3]                                               ; +0xac, 0x788518\nLDR             R3, [R4,#4]                                            ; +0xae, 0x78851a\nADDS            R3, #4                                                 ; +0xb0, 0x78851c\nSTR             R3, [R4,#4]                                            ; +0xb2, 0x78851e\nADDS            R7, #1                                                 ; +0xb4, 0x788520\nB               loc_7884CA                                             ; +0xb6, 0x788522\nADDS            R6, #1                                                 ; +0xb8, 0x788524\nB               loc_7884B8                                             ; +0xba, 0x788526\nMOV             R0, R8                                                 ; +0xbc, 0x788528\nBL              _ZNSt6__ndk113__vector_baseINS_4pairIiNS_6vectorIiNS_9allocatorIiEEEEEENS3_IS6_EEED2Ev; std::__vector_base<std::pair<int,std::vector<int>>>::~__vector_base() ; +0xbe, 0x78852a\nB               loc_788554                                             ; +0xc2, 0x78852e\nMOV             R0, R6                                                 ; +0xc4, 0x788530\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xc6, 0x788532\nB               loc_788540                                             ; +0xca, 0x788536\nMOV             R0, R8                                                 ; +0xcc, 0x788538\nBL              _ZNSt6__ndk113__vector_baseINS_4pairIiNS_6vectorIiNS_9allocatorIiEEEEEENS3_IS6_EEED2Ev; std::__vector_base<std::pair<int,std::vector<int>>>::~__vector_base() ; +0xce, 0x78853a\nB               loc_788540                                             ; +0xd2, 0x78853e\nMOV             R0, R4                                                 ; +0xd4, 0x788540\nBL              _ZNSt6__ndk113__vector_baseIiNS_9allocatorIiEEED2Ev; std::__vector_base<int>::~__vector_base() ; +0xd6, 0x788542\nBL              __cxa_end_cleanup                                      ; +0xda, 0x788546\nMOV             R0, R4                                                 ; +0xde, 0x78854a\nMOV             R1, R10                                                ; +0xe0, 0x78854c\nBL              _ZNSt6__ndk16vectorIiNS_9allocatorIiEEE21__push_back_slow_pathIRKiEEvOT_; std::vector<int>::__push_back_slow_path<int const&>(int const&) ; +0xe2, 0x78854e\nB               loc_788520                                             ; +0xe6, 0x788552\nLDR             R2, [SP,#0x20+var_4]                                   ; +0xe8, 0x788554\nMOV             R0, R4                                                 ; +0xea, 0x788556\nLDR             R3, [R5]                                               ; +0xec, 0x788558\nCMP             R2, R3                                                 ; +0xee, 0x78855a\nBEQ             loc_788562                                             ; +0xf0, 0x78855c\nBLX             __stack_chk_fail                                       ; +0xf2, 0x78855e\nADD             SP, SP, #0x20 ; ' '                                    ; +0xf6, 0x788562\nPOP.W           {R4-R10,PC}                                            ; +0xf8, 0x788564", "xrefs": ["EditorSoundConfigInfoLayer::onDownloadSFX @ 0x788586", "EditorSoundConfigInfoLayer::downloadMissingSFX @ 0x7886de"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}