{"type": "func", "start": 7898820, "end": 7899032, "name": "EditorSoundConfigInfoLayer::downloadMissingSFX", "pseudocode": "// \n// EditorSoundConfigInfoLayer::downloadMissingSFX from 0x7886c4 to 0x788798 (212 bytes)\n// \n// 2 xrefs:\n// > EditorSoundConfigInfoLayer::startSFXDownload @ 0x7887e4\n// > EditorSoundConfigInfoLayer::musicActionFinished @ 0x788bc0\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\nchar **__fastcall EditorSoundConfigInfoLayer::downloadMissingSFX(EditorSoundConfigInfoLayer *this)\n{\n  unsigned int v2; // r4\n  MusicDownloadManager *i; // r0\n  unsigned int v4; // r1\n  int v5; // r0\n  cocos2d::CCString *v6; // r0\n  const char *CString; // r0\n  int v8; // r3\n  const char *v9; // r10\n  void (__fastcall *v10)(EditorSoundConfigInfoLayer *, cocos2d::CCNode *, int); // r9\n  size_t v11; // r0\n  cocos2d::CCNode *v12; // r0\n  char *v14[3]; // [sp+8h] [bp-28h] BYREF\n  int v15[3]; // [sp+14h] [bp-1Ch] BYREF\n  int v16[3]; // [sp+20h] [bp-10h] BYREF\n\n  v2 = 0;\n  for ( i = EditorSoundConfigInfoLayer::missingSFXIDs((EditorSoundConfigInfoLayer *)v14, (int)this);\n        ;\n        i = (MusicDownloadManager *)MusicDownloadManager::downloadSFX(v5, *(const char **)&v14[0][4 * v2++]) )\n  {\n    v4 = (v14[1] - v14[0]) >> 2;\n    if ( v2 >= v4 )\n      break;\n    v5 = MusicDownloadManager::sharedState(i);\n  }\n  v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                              (cocos2d::CCString *)\"Downloading %i SFX\",\n                              (const char *)v4);\n  CString = (const char *)cocos2d::CCString::getCString(v6);\n  v8 = *(_DWORD *)this;\n  v9 = CString;\n  memset(v15, 0, sizeof(v15));\n  v10 = *(void (__fastcall **)(EditorSoundConfigInfoLayer *, cocos2d::CCNode *, int))(v8 + 232);\n  v11 = strlen(CString);\n  std::string::__init(v15, v9, v11);\n  memset(v16, 0, sizeof(v16));\n  std::string::__init(v16, &unk_B6B226, 0);\n  v12 = TextAlertPopup::create((int)v15, (cocos2d::CCDelayTime *)0x3F000000, 0.6, 150, (int)v16);\n  v10(this, v12, 100);\n  std::string::~string((int)v16);\n  std::string::~string((int)v15);\n  return std::__vector_base<int>::~__vector_base(v14);\n}", "assembly": "; \n; EditorSoundConfigInfoLayer::downloadMissingSFX from 0x7886c4 to 0x788798 (212 bytes)\n; \n; 2 xrefs:\n; > EditorSoundConfigInfoLayer::startSFXDownload @ 0x7887e4\n; > EditorSoundConfigInfoLayer::musicActionFinished @ 0x788bc0\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, 0x7886c4\nSUB             SP, SP, #0x30                                          ; +0x4, 0x7886c8\nLDR             R5, =(__stack_chk_guard_ptr - 0x7886D6)                ; +0x6, 0x7886ca\nADD             R6, SP, #0x30+var_28                                   ; +0x8, 0x7886cc\nMOV             R7, R0                                                 ; +0xa, 0x7886ce\nMOVS            R4, #0                                                 ; +0xc, 0x7886d0\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0xe, 0x7886d2\nLDR             R5, [R5]; __stack_chk_guard                            ; +0x10, 0x7886d4\nMOV             R0, R6; this                                           ; +0x12, 0x7886d6\nMOV             R1, R7                                                 ; +0x14, 0x7886d8\nLDR             R3, [R5]                                               ; +0x16, 0x7886da\nSTR             R3, [SP,#0x30+var_4]                                   ; +0x18, 0x7886dc\nBL              _ZN26EditorSoundConfigInfoLayer13missingSFXIDsEv; EditorSoundConfigInfoLayer::missingSFXIDs(void) ; +0x1a, 0x7886de\nLDR             R1, [SP,#0x30+var_28]                                  ; +0x1e, 0x7886e2\nLDR             R3, [SP,#0x30+var_24]                                  ; +0x20, 0x7886e4\nSUBS            R1, R3, R1                                             ; +0x22, 0x7886e6\nASRS            R1, R1, #2; char *                                     ; +0x24, 0x7886e8\nCMP             R4, R1                                                 ; +0x26, 0x7886ea\nBCS             loc_788700                                             ; +0x28, 0x7886ec\nBL              _ZN20MusicDownloadManager11sharedStateEv; MusicDownloadManager::sharedState(void) ; +0x2a, 0x7886ee\nLDR             R3, [SP,#0x30+var_28]                                  ; +0x2e, 0x7886f2\nLDR.W           R1, [R3,R4,LSL#2]; int                                 ; +0x30, 0x7886f4\nBL              _ZN20MusicDownloadManager11downloadSFXEi; MusicDownloadManager::downloadSFX(int) ; +0x34, 0x7886f8\nADDS            R4, #1                                                 ; +0x38, 0x7886fc\nB               loc_7886E2                                             ; +0x3a, 0x7886fe\nLDR             R0, =(aDownloadingISf - 0x788706); \"Downloading %i SFX\" ; +0x3c, 0x788700\nADD             R0, PC; \"Downloading %i SFX\"                           ; +0x3e, 0x788702\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x40, 0x788704\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x44, 0x788708\nLDR             R3, [R7]                                               ; +0x48, 0x78870c\nMOVS            R4, #0                                                 ; +0x4a, 0x78870e\nMOV             R10, R0                                                ; +0x4c, 0x788710\nSTR             R4, [SP,#0x30+var_1C]                                  ; +0x4e, 0x788712\nSTR             R4, [SP,#0x30+var_18]                                  ; +0x50, 0x788714\nADD.W           R8, SP, #0x30+var_1C                                   ; +0x52, 0x788716\nLDR.W           R9, [R3,#0xE8]                                         ; +0x56, 0x78871a\nSTR             R4, [SP,#0x30+var_14]                                  ; +0x5a, 0x78871e\nBLX             strlen                                                 ; +0x5c, 0x788720\nMOV             R1, R10                                                ; +0x60, 0x788724\nMOV             R2, R0                                                 ; +0x62, 0x788726\nMOV             R0, R8                                                 ; +0x64, 0x788728\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x66, 0x78872a\nSTR             R4, [SP,#0x30+var_10]                                  ; +0x6a, 0x78872e\nMOVS            R2, #0                                                 ; +0x6c, 0x788730\nSTR             R4, [SP,#0x30+var_C]                                   ; +0x6e, 0x788732\nSTR             R4, [SP,#0x30+var_8]                                   ; +0x70, 0x788734\nADD             R4, SP, #0x30+var_10                                   ; +0x72, 0x788736\nLDR             R1, =(unk_B6B226 - 0x788740)                           ; +0x74, 0x788738\nMOV             R0, R4                                                 ; +0x76, 0x78873a\nADD             R1, PC; unk_B6B226                                     ; +0x78, 0x78873c\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x7a, 0x78873e\nSTR             R4, [SP,#0x30+var_30]                                  ; +0x7e, 0x788742\nMOV             R0, R8                                                 ; +0x80, 0x788744\nMOV.W           R1, #0x3F000000                                        ; +0x82, 0x788746\nLDR             R2, =0x3F19999A                                        ; +0x86, 0x78874a\nMOVS            R3, #0x96                                              ; +0x88, 0x78874c\nBL              _ZN14TextAlertPopup6createENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEffiS6_; TextAlertPopup::create(std::string,float,float,int,std::string) ; +0x8a, 0x78874e\nMOV             R1, R0                                                 ; +0x8e, 0x788752\nMOVS            R2, #0x64 ; 'd'                                        ; +0x90, 0x788754\nMOV             R0, R7                                                 ; +0x92, 0x788756\nBLX             R9                                                     ; +0x94, 0x788758\nMOV             R0, R4                                                 ; +0x96, 0x78875a\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x98, 0x78875c\nMOV             R0, R8                                                 ; +0x9c, 0x788760\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x9e, 0x788762\nMOV             R0, R6                                                 ; +0xa2, 0x788766\nBL              _ZNSt6__ndk113__vector_baseIiNS_9allocatorIiEEED2Ev; std::__vector_base<int>::~__vector_base() ; +0xa4, 0x788768\nLDR             R2, [SP,#0x30+var_4]                                   ; +0xa8, 0x78876c\nLDR             R3, [R5]                                               ; +0xaa, 0x78876e\nCMP             R2, R3                                                 ; +0xac, 0x788770\nBEQ             loc_788792                                             ; +0xae, 0x788772\nBLX             __stack_chk_fail                                       ; +0xb0, 0x788774\nMOV             R0, R4                                                 ; +0xb4, 0x788778\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xb6, 0x78877a\nB               loc_788780                                             ; +0xba, 0x78877e\nMOV             R0, R8                                                 ; +0xbc, 0x788780\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xbe, 0x788782\nB               loc_788788                                             ; +0xc2, 0x788786\nMOV             R0, R6                                                 ; +0xc4, 0x788788\nBL              _ZNSt6__ndk113__vector_baseIiNS_9allocatorIiEEED2Ev; std::__vector_base<int>::~__vector_base() ; +0xc6, 0x78878a\nBL              __cxa_end_cleanup                                      ; +0xca, 0x78878e\nADD             SP, SP, #0x30 ; '0'                                    ; +0xce, 0x788792\nPOP.W           {R4-R10,PC}                                            ; +0xd0, 0x788794", "xrefs": ["EditorSoundConfigInfoLayer::startSFXDownload @ 0x7887e4", "EditorSoundConfigInfoLayer::musicActionFinished @ 0x788bc0"], "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"}