{"type": "func", "start": 7889488, "end": 7889738, "name": "EditorSoundConfigInfoLayer::downloadEditorSoundFinished", "pseudocode": "// \n// EditorSoundConfigInfoLayer::downloadEditorSoundFinished from 0x786250 to 0x78634a (250 bytes)\n// \n// 1 xrefs:\n// > `non-virtual thunk to'EditorSoundConfigInfoLayer::downloadEditorSoundFinished @ 0x786360\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:32 +0000\n// \n\nvoid __fastcall EditorSoundConfigInfoLayer::downloadEditorSoundFinished(\n        EditorSoundConfigInfoLayer *this,\n        GJEditorSoundConfig *a2)\n{\n  void *v2; // r2\n  int v5; // r3\n  cocos2d::CCNode **v6; // r0\n  int *v7; // r0\n  GJEditorSoundConfig *v8; // r0\n  EditorSFXManager *v9; // r0\n  int v10; // r3\n  EditorSFXManager *v11; // r0\n  cocos2d::CCArray **v12; // r0\n  GJEditorSoundConfig *FavoriteConfig; // r0\n  int v14[3]; // [sp+8h] [bp-14h] BYREF\n\n  v2 = &_stack_chk_guard;\n  if ( !a2 || (v5 = *((_DWORD *)this + 187)) == 0 || (v2 = *((void **)a2 + 66), v2 == *(void **)(v5 + 264)) )\n  {\n    v6 = *((cocos2d::CCNode ***)this + 190);\n    *((_BYTE *)this + 764) = 0;\n    if ( v6 )\n      LoadingCircle::fadeAndRemove(v6, (int)a2, (int)v2);\n    *((_DWORD *)this + 190) = 0;\n    if ( a2 )\n    {\n      v8 = *((GJEditorSoundConfig **)this + 187);\n      if ( v8 )\n      {\n        v9 = (EditorSFXManager *)GJEditorSoundConfig::copyServerFields(v8, a2);\n        v10 = *((_DWORD *)this + 187);\n        if ( *(_BYTE *)(v10 + 272) )\n          *(_DWORD *)(v10 + 280) = *(_DWORD *)(v10 + 276);\n        v11 = (EditorSFXManager *)EditorSFXManager::sharedState(v9);\n        if ( v11 )\n        {\n          v12 = (cocos2d::CCArray **)EditorSFXManager::sharedState(v11);\n          FavoriteConfig = (GJEditorSoundConfig *)EditorSFXManager::getFavoriteConfig(\n                                                    v12,\n                                                    *(_DWORD *)(*((_DWORD *)this + 187) + 264));\n          if ( FavoriteConfig )\n          {\n            if ( FavoriteConfig != *((GJEditorSoundConfig **)this + 187) )\n              GJEditorSoundConfig::copyServerFields(FavoriteConfig, a2);\n          }\n        }\n      }\n      EditorSoundConfigInfoLayer::refreshActionButtons(this);\n      EditorSoundConfigInfoLayer::buildSummary(this);\n      if ( *((_BYTE *)this + 765) )\n      {\n        *((_BYTE *)this + 765) = 0;\n        EditorSoundConfigInfoLayer::onFavorite(this, nullptr);\n      }\n    }\n    else\n    {\n      memset(v14, 0, sizeof(v14));\n      std::string::__init(v14, \"Download failed.\", 0x10u);\n      v7 = FLAlertLayer::create(0, (cocos2d::CCLabelBMFont *)\"Error\", (int)v14, (ButtonSprite *)\"OK\", nullptr);\n      (*(void (__fastcall **)(int *))(*v7 + 656))(v7);\n      std::string::~string((int)v14);\n      EditorSoundConfigInfoLayer::refreshActionButtons(this);\n    }\n  }\n}", "assembly": "; \n; EditorSoundConfigInfoLayer::downloadEditorSoundFinished from 0x786250 to 0x78634a (250 bytes)\n; \n; 1 xrefs:\n; > `non-virtual thunk to'EditorSoundConfigInfoLayer::downloadEditorSoundFinished @ 0x786360\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:32 +0000\n; \nLDR             R2, =(__stack_chk_guard_ptr - 0x786258)                ; +0x0, 0x786250\nPUSH            {R4-R7,LR}                                             ; +0x2, 0x786252\nADD             R2, PC; __stack_chk_guard_ptr                          ; +0x4, 0x786254\nLDR             R2, [R2]; __stack_chk_guard                            ; +0x6, 0x786256\nSUB             SP, SP, #0x1C                                          ; +0x8, 0x786258\nMOV             R4, R0                                                 ; +0xa, 0x78625a\nLDR             R3, [R2]                                               ; +0xc, 0x78625c\nMOV             R5, R1                                                 ; +0xe, 0x78625e\nMOV             R7, R2                                                 ; +0x10, 0x786260\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x12, 0x786262\nCBZ             R1, loc_786278                                         ; +0x14, 0x786264\nLDR.W           R3, [R0,#0x2EC]                                        ; +0x16, 0x786266\nCBZ             R3, loc_786278                                         ; +0x1a, 0x78626a\nLDR.W           R2, [R1,#0x108]                                        ; +0x1c, 0x78626c\nLDR.W           R3, [R3,#0x108]                                        ; +0x20, 0x786270\nCMP             R2, R3                                                 ; +0x24, 0x786274\nBNE             loc_78633A                                             ; +0x26, 0x786276\nLDR.W           R0, [R4,#0x2F8]; this                                  ; +0x28, 0x786278\nMOVS            R3, #0                                                 ; +0x2c, 0x78627c\nMOV             R6, R3                                                 ; +0x2e, 0x78627e\nSTRB.W          R3, [R4,#0x2FC]                                        ; +0x30, 0x786280\nCBZ             R0, loc_78628A                                         ; +0x34, 0x786284\nBL              _ZN13LoadingCircle13fadeAndRemoveEv; LoadingCircle::fadeAndRemove(void) ; +0x36, 0x786286\nSTR.W           R6, [R4,#0x2F8]                                        ; +0x3a, 0x78628a\nCBNZ            R5, loc_7862CC                                         ; +0x3e, 0x78628e\nADD             R6, SP, #0x1C+var_14                                   ; +0x40, 0x786290\nLDR             R1, =(aDownloadFailed_3 - 0x78629E); \"Download failed.\" ; +0x42, 0x786292\nMOVS            R2, #0x10                                              ; +0x44, 0x786294\nSTR             R5, [SP,#0x1C+var_14]                                  ; +0x46, 0x786296\nMOV             R0, R6                                                 ; +0x48, 0x786298\nADD             R1, PC; \"Download failed.\"                             ; +0x4a, 0x78629a\nSTR             R5, [SP,#0x1C+var_10]                                  ; +0x4c, 0x78629c\nSTR             R5, [SP,#0x1C+var_C]                                   ; +0x4e, 0x78629e\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x50, 0x7862a0\nLDR             R1, =(aError - 0x7862B2); \"Error\"                      ; +0x54, 0x7862a4\nMOV             R0, R5                                                 ; +0x56, 0x7862a6\nLDR             R3, =(aOk - 0x7862B4); \"OK\"                            ; +0x58, 0x7862a8\nMOV             R2, R6                                                 ; +0x5a, 0x7862aa\nSTR             R5, [SP,#0x1C+var_1C]                                  ; +0x5c, 0x7862ac\nADD             R1, PC; \"Error\"                                        ; +0x5e, 0x7862ae\nADD             R3, PC; \"OK\"                                           ; +0x60, 0x7862b0\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcNSt6__ndk112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEES3_S3_; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*) ; +0x62, 0x7862b2\nLDR             R3, [R0]                                               ; +0x66, 0x7862b6\nLDR.W           R3, [R3,#0x290]                                        ; +0x68, 0x7862b8\nBLX             R3                                                     ; +0x6c, 0x7862bc\nMOV             R0, R6                                                 ; +0x6e, 0x7862be\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x70, 0x7862c0\nMOV             R0, R4; this                                           ; +0x74, 0x7862c4\nBL              _ZN26EditorSoundConfigInfoLayer20refreshActionButtonsEv; EditorSoundConfigInfoLayer::refreshActionButtons(void) ; +0x76, 0x7862c6\nB               loc_78633A                                             ; +0x7a, 0x7862ca\nLDR.W           R0, [R4,#0x2EC]; this                                  ; +0x7c, 0x7862cc\nCBZ             R0, loc_786310                                         ; +0x80, 0x7862d0\nMOV             R1, R5; GJEditorSoundConfig *                          ; +0x82, 0x7862d2\nBL              _ZN19GJEditorSoundConfig16copyServerFieldsEPS_; GJEditorSoundConfig::copyServerFields(GJEditorSoundConfig*) ; +0x84, 0x7862d4\nLDR.W           R3, [R4,#0x2EC]                                        ; +0x88, 0x7862d8\nLDRB.W          R2, [R3,#0x110]                                        ; +0x8c, 0x7862dc\nCBZ             R2, loc_7862EA                                         ; +0x90, 0x7862e0\nLDR.W           R2, [R3,#0x114]                                        ; +0x92, 0x7862e2\nSTR.W           R2, [R3,#0x118]                                        ; +0x96, 0x7862e6\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x9a, 0x7862ea\nCBZ             R0, loc_786310                                         ; +0x9e, 0x7862ee\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0xa0, 0x7862f0\nLDR.W           R3, [R4,#0x2EC]                                        ; +0xa4, 0x7862f4\nLDR.W           R1, [R3,#0x108]; int                                   ; +0xa8, 0x7862f8\nBL              _ZN16EditorSFXManager17getFavoriteConfigEi; EditorSFXManager::getFavoriteConfig(int) ; +0xac, 0x7862fc\nCBZ             R0, loc_786310                                         ; +0xb0, 0x786300\nLDR.W           R3, [R4,#0x2EC]                                        ; +0xb2, 0x786302\nCMP             R0, R3                                                 ; +0xb6, 0x786306\nBEQ             loc_786310                                             ; +0xb8, 0x786308\nMOV             R1, R5; GJEditorSoundConfig *                          ; +0xba, 0x78630a\nBL              _ZN19GJEditorSoundConfig16copyServerFieldsEPS_; GJEditorSoundConfig::copyServerFields(GJEditorSoundConfig*) ; +0xbc, 0x78630c\nMOV             R0, R4; this                                           ; +0xc0, 0x786310\nBL              _ZN26EditorSoundConfigInfoLayer20refreshActionButtonsEv; EditorSoundConfigInfoLayer::refreshActionButtons(void) ; +0xc2, 0x786312\nMOV             R0, R4; this                                           ; +0xc6, 0x786316\nBL              _ZN26EditorSoundConfigInfoLayer12buildSummaryEv; EditorSoundConfigInfoLayer::buildSummary(void) ; +0xc8, 0x786318\nLDRB.W          R3, [R4,#0x2FD]                                        ; +0xcc, 0x78631c\nCBZ             R3, loc_78633A                                         ; +0xd0, 0x786320\nMOVS            R1, #0; cocos2d::CCObject *                            ; +0xd2, 0x786322\nMOV             R0, R4; this                                           ; +0xd4, 0x786324\nSTRB.W          R1, [R4,#0x2FD]                                        ; +0xd6, 0x786326\nBL              _ZN26EditorSoundConfigInfoLayer10onFavoriteEPN7cocos2d8CCObjectE; EditorSoundConfigInfoLayer::onFavorite(cocos2d::CCObject *) ; +0xda, 0x78632a\nB               loc_78633A                                             ; +0xde, 0x78632e\nMOV             R0, R6                                                 ; +0xe0, 0x786330\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xe2, 0x786332\nBL              __cxa_end_cleanup                                      ; +0xe6, 0x786336\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0xea, 0x78633a\nLDR             R3, [R7]                                               ; +0xec, 0x78633c\nCMP             R2, R3                                                 ; +0xee, 0x78633e\nBEQ             loc_786346                                             ; +0xf0, 0x786340\nBLX             __stack_chk_fail                                       ; +0xf2, 0x786342\nADD             SP, SP, #0x1C                                          ; +0xf6, 0x786346\nPOP             {R4-R7,PC}                                             ; +0xf8, 0x786348", "xrefs": ["`non-virtual thunk to'EditorSoundConfigInfoLayer::downloadEditorSoundFinished @ 0x786360"], "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"}