{"type": "func", "start": 7898476, "end": 7898784, "name": "EditorSoundConfigInfoLayer::onDownloadSFX", "pseudocode": "// \n// EditorSoundConfigInfoLayer::onDownloadSFX from 0x78856c to 0x7886a0 (308 bytes)\n// \n// 0 xrefs:\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\nint __fastcall EditorSoundConfigInfoLayer::onDownloadSFX(EditorSoundConfigInfoLayer *this, cocos2d::CCObject *a2)\n{\n  int v3; // r4\n  int v4; // r4\n  void (__fastcall *v5)(EditorSoundConfigInfoLayer *, cocos2d::CCNode *, int); // r9\n  cocos2d::CCNode *v6; // r0\n  char *v7; // r8\n  cocos2d::CCString *v8; // r0\n  const char *CString; // r0\n  char *v10; // r9\n  size_t v11; // r0\n  size_t v12; // r0\n  int *v13; // r4\n  char *v15[3]; // [sp+8h] [bp-2Ch] BYREF\n  int v16; // [sp+14h] [bp-20h] BYREF\n  int v17; // [sp+18h] [bp-1Ch]\n  char *v18; // [sp+1Ch] [bp-18h]\n  int v19; // [sp+20h] [bp-14h] BYREF\n  int v20; // [sp+24h] [bp-10h]\n  int v21; // [sp+28h] [bp-Ch]\n\n  EditorSoundConfigInfoLayer::missingSFXIDs((EditorSoundConfigInfoLayer *)v15, (int)this);\n  v3 = v15[1] - v15[0];\n  std::__vector_base<int>::~__vector_base(v15);\n  v4 = v3 >> 2;\n  if ( v4 )\n  {\n    v7 = (char *)this + 720;\n    v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                (cocos2d::CCString *)\"Download <cy>%i</c> SFX from this pack?\",\n                                (const char *)v4);\n    CString = (const char *)cocos2d::CCString::getCString(v8);\n    v16 = 0;\n    v17 = 0;\n    v18 = nullptr;\n    v10 = (char *)CString;\n    v11 = strlen(CString);\n    std::string::__init(&v16, v10, v11);\n    v19 = 0;\n    v20 = 0;\n    if ( (v16 & 1) == 0 )\n      v10 = (char *)&v16 + 1;\n    v21 = 0;\n    if ( (v16 & 1) != 0 )\n      v10 = v18;\n    v12 = strlen(v10);\n    std::string::__init(&v19, v10, v12);\n    v13 = FLAlertLayer::create(\n            (int)v7,\n            (cocos2d::CCLabelBMFont *)\"Download SFX\",\n            (int)&v19,\n            (ButtonSprite *)\"Cancel\",\n            (ButtonSprite *)\"Download\",\n            300.0);\n    std::string::~string((int)&v19);\n    (*(void (__fastcall **)(int *, int))(*v13 + 36))(v13, 7007);\n    (*(void (__fastcall **)(int *))(*v13 + 656))(v13);\n  }\n  else\n  {\n    v5 = *(void (__fastcall **)(EditorSoundConfigInfoLayer *, cocos2d::CCNode *, int))(*(_DWORD *)this + 232);\n    v16 = 0;\n    v17 = 0;\n    v18 = nullptr;\n    std::string::__init(&v16, \"All SFX downloaded\", 0x12u);\n    v19 = 0;\n    v20 = 0;\n    v21 = 0;\n    std::string::__init(&v19, &unk_B6B226, 0);\n    v6 = TextAlertPopup::create((int)&v16, (cocos2d::CCDelayTime *)0x3F000000, 0.6, 150, (int)&v19);\n    v5(this, v6, 100);\n    std::string::~string((int)&v19);\n  }\n  return std::string::~string((int)&v16);\n}", "assembly": "; \n; EditorSoundConfigInfoLayer::onDownloadSFX from 0x78856c to 0x7886a0 (308 bytes)\n; \n; 0 xrefs:\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-R9,LR}                                             ; +0x0, 0x78856c\nSUB             SP, SP, #0x34                                          ; +0x4, 0x788570\nLDR             R7, =(__stack_chk_guard_ptr - 0x78857E)                ; +0x6, 0x788572\nADD             R5, SP, #0x34+var_2C                                   ; +0x8, 0x788574\nMOV             R8, R0                                                 ; +0xa, 0x788576\nADD             R6, SP, #0x34+var_20                                   ; +0xc, 0x788578\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xe, 0x78857a\nLDR             R7, [R7]; __stack_chk_guard                            ; +0x10, 0x78857c\nMOV             R0, R5; this                                           ; +0x12, 0x78857e\nMOV             R1, R8                                                 ; +0x14, 0x788580\nLDR             R3, [R7]                                               ; +0x16, 0x788582\nSTR             R3, [SP,#0x34+var_8]                                   ; +0x18, 0x788584\nBL              _ZN26EditorSoundConfigInfoLayer13missingSFXIDsEv; EditorSoundConfigInfoLayer::missingSFXIDs(void) ; +0x1a, 0x788586\nLDR             R3, [SP,#0x34+var_2C]                                  ; +0x1e, 0x78858a\nMOV             R0, R5                                                 ; +0x20, 0x78858c\nLDR             R4, [SP,#0x34+var_28]                                  ; +0x22, 0x78858e\nADD             R5, SP, #0x34+var_14                                   ; +0x24, 0x788590\nSUBS            R4, R4, R3                                             ; +0x26, 0x788592\nBL              _ZNSt6__ndk113__vector_baseIiNS_9allocatorIiEEED2Ev; std::__vector_base<int>::~__vector_base() ; +0x28, 0x788594\nASRS            R4, R4, #2                                             ; +0x2c, 0x788598\nCBNZ            R4, loc_7885E8                                         ; +0x2e, 0x78859a\nLDR.W           R3, [R8]                                               ; +0x30, 0x78859c\nMOV             R0, R6                                                 ; +0x34, 0x7885a0\nLDR             R1, =(aAllSfxDownload - 0x7885AA); \"All SFX downloaded\" ; +0x36, 0x7885a2\nMOVS            R2, #0x12                                              ; +0x38, 0x7885a4\nADD             R1, PC; \"All SFX downloaded\"                           ; +0x3a, 0x7885a6\nLDR.W           R9, [R3,#0xE8]                                         ; +0x3c, 0x7885a8\nSTR             R4, [SP,#0x34+var_20]                                  ; +0x40, 0x7885ac\nSTR             R4, [SP,#0x34+var_1C]                                  ; +0x42, 0x7885ae\nSTR             R4, [SP,#0x34+var_18]                                  ; +0x44, 0x7885b0\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x46, 0x7885b2\nLDR             R1, =(unk_B6B226 - 0x7885C2)                           ; +0x4a, 0x7885b6\nMOV             R0, R5                                                 ; +0x4c, 0x7885b8\nMOV             R2, R4                                                 ; +0x4e, 0x7885ba\nSTR             R4, [SP,#0x34+var_14]                                  ; +0x50, 0x7885bc\nADD             R1, PC; unk_B6B226                                     ; +0x52, 0x7885be\nSTR             R4, [SP,#0x34+var_10]                                  ; +0x54, 0x7885c0\nSTR             R4, [SP,#0x34+var_C]                                   ; +0x56, 0x7885c2\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x58, 0x7885c4\nSTR             R5, [SP,#0x34+var_34]                                  ; +0x5c, 0x7885c8\nMOV             R0, R6                                                 ; +0x5e, 0x7885ca\nMOV.W           R1, #0x3F000000                                        ; +0x60, 0x7885cc\nLDR             R2, =0x3F19999A                                        ; +0x64, 0x7885d0\nMOVS            R3, #0x96                                              ; +0x66, 0x7885d2\nBL              _ZN14TextAlertPopup6createENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEffiS6_; TextAlertPopup::create(std::string,float,float,int,std::string) ; +0x68, 0x7885d4\nMOV             R1, R0                                                 ; +0x6c, 0x7885d8\nMOVS            R2, #0x64 ; 'd'                                        ; +0x6e, 0x7885da\nMOV             R0, R8                                                 ; +0x70, 0x7885dc\nBLX             R9                                                     ; +0x72, 0x7885de\nMOV             R0, R5                                                 ; +0x74, 0x7885e0\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x76, 0x7885e2\nB               loc_788672                                             ; +0x7a, 0x7885e6\nLDR             R0, =(aDownloadCyICSf - 0x7885F6); \"Download <cy>%i</c> SFX from this pack?\" ; +0x7c, 0x7885e8\nMOV             R1, R4; char *                                         ; +0x7e, 0x7885ea\nMOVS            R4, #0                                                 ; +0x80, 0x7885ec\nADD.W           R8, R8, #0x2D0                                         ; +0x82, 0x7885ee\nADD             R0, PC; \"Download <cy>%i</c> SFX from this pack?\"      ; +0x86, 0x7885f2\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x88, 0x7885f4\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x8c, 0x7885f8\nSTR             R4, [SP,#0x34+var_20]                                  ; +0x90, 0x7885fc\nSTR             R4, [SP,#0x34+var_1C]                                  ; +0x92, 0x7885fe\nSTR             R4, [SP,#0x34+var_18]                                  ; +0x94, 0x788600\nMOV             R9, R0                                                 ; +0x96, 0x788602\nBLX             strlen                                                 ; +0x98, 0x788604\nMOV             R1, R9                                                 ; +0x9c, 0x788608\nMOV             R2, R0                                                 ; +0x9e, 0x78860a\nMOV             R0, R6                                                 ; +0xa0, 0x78860c\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0xa2, 0x78860e\nLDRB.W          R3, [SP,#0x34+var_20]                                  ; +0xa6, 0x788612\nSTR             R4, [SP,#0x34+var_14]                                  ; +0xaa, 0x788616\nLSLS            R3, R3, #0x1F                                          ; +0xac, 0x788618\nSTR             R4, [SP,#0x34+var_10]                                  ; +0xae, 0x78861a\nIT PL                                                                  ; +0xb0, 0x78861c\nADDPL.W         R9, SP, #0x34+var_20+1                                 ; +0xb2, 0x78861e\nSTR             R4, [SP,#0x34+var_C]                                   ; +0xb6, 0x788622\nIT MI                                                                  ; +0xb8, 0x788624\nLDRMI.W         R9, [SP,#0x34+var_18]                                  ; +0xba, 0x788626\nMOV             R0, R9; char *                                         ; +0xbe, 0x78862a\nBLX             strlen                                                 ; +0xc0, 0x78862c\nMOV             R1, R9                                                 ; +0xc4, 0x788630\nMOV             R2, R0                                                 ; +0xc6, 0x788632\nMOV             R0, R5                                                 ; +0xc8, 0x788634\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0xca, 0x788636\nLDR             R3, =(aDownload_0 - 0x788646); \"Download\"              ; +0xce, 0x78863a\nMOV             R0, R8; int                                            ; +0xd0, 0x78863c\nLDR             R1, =(aDownloadSfx - 0x78864C); \"Download SFX\"         ; +0xd2, 0x78863e\nMOV             R2, R5; int                                            ; +0xd4, 0x788640\nADD             R3, PC; \"Download\"                                     ; +0xd6, 0x788642\nSTR             R3, [SP,#0x34+var_34]; int                             ; +0xd8, 0x788644\nLDR             R3, flt_7886A4                                         ; +0xda, 0x788646\nADD             R1, PC; \"Download SFX\"                                 ; +0xdc, 0x788648\nSTR             R3, [SP,#0x34+var_30]; float                           ; +0xde, 0x78864a\nLDR             R3, =(aCancel - 0x788652); \"Cancel\"                    ; +0xe0, 0x78864c\nADD             R3, PC; \"Cancel\"                                       ; +0xe2, 0x78864e\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcNSt6__ndk112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEES3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0xe4, 0x788650\nMOV             R4, R0                                                 ; +0xe8, 0x788654\nMOV             R0, R5                                                 ; +0xea, 0x788656\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xec, 0x788658\nLDR             R3, [R4]                                               ; +0xf0, 0x78865c\nMOV             R0, R4                                                 ; +0xf2, 0x78865e\nMOVW            R1, #0x1B5F                                            ; +0xf4, 0x788660\nLDR             R3, [R3,#0x24]                                         ; +0xf8, 0x788664\nBLX             R3                                                     ; +0xfa, 0x788666\nLDR             R3, [R4]                                               ; +0xfc, 0x788668\nMOV             R0, R4                                                 ; +0xfe, 0x78866a\nLDR.W           R3, [R3,#0x290]                                        ; +0x100, 0x78866c\nBLX             R3                                                     ; +0x104, 0x788670\nMOV             R0, R6                                                 ; +0x106, 0x788672\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x108, 0x788674\nLDR             R2, [SP,#0x34+var_8]                                   ; +0x10c, 0x788678\nLDR             R3, [R7]                                               ; +0x10e, 0x78867a\nCMP             R2, R3                                                 ; +0x110, 0x78867c\nBEQ             loc_78869A                                             ; +0x112, 0x78867e\nBLX             __stack_chk_fail                                       ; +0x114, 0x788680\nB               loc_788688                                             ; +0x118, 0x788684\nB               loc_788690                                             ; +0x11a, 0x788686\nMOV             R0, R5                                                 ; +0x11c, 0x788688\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x11e, 0x78868a\nB               loc_788690                                             ; +0x122, 0x78868e\nMOV             R0, R6                                                 ; +0x124, 0x788690\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x126, 0x788692\nBL              __cxa_end_cleanup                                      ; +0x12a, 0x788696\nADD             SP, SP, #0x34 ; '4'                                    ; +0x12e, 0x78869a\nPOP.W           {R4-R9,PC}                                             ; +0x130, 0x78869c", "xrefs": [], "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"}