{"type": "func", "start": 7877684, "end": 7878004, "name": "EditorSoundBrowserLayer::onSelectMode", "pseudocode": "// \n// EditorSoundBrowserLayer::onSelectMode from 0x783434 to 0x783574 (320 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:30 +0000\n// \n\nchar *__fastcall EditorSoundBrowserLayer::onSelectMode(EditorSoundBrowserLayer *this, cocos2d::CCObject *a2)\n{\n  char *result; // r0\n  FLAlertLayer *v4; // r7\n  int v5; // r8\n  int v6; // r0\n  int v7; // r3\n  int v8[3]; // [sp+1Ch] [bp-34h] BYREF\n  int v9[3]; // [sp+28h] [bp-28h] BYREF\n  int v10[3]; // [sp+34h] [bp-1Ch] BYREF\n  int v11; // [sp+40h] [bp-10h] BYREF\n  int v12; // [sp+44h] [bp-Ch]\n  int v13; // [sp+48h] [bp-8h]\n\n  result = (char *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);\n  if ( (unsigned int)result <= 9 )\n  {\n    if ( result == byte_9 )\n    {\n      *((_DWORD *)this + 200) = 2;\n      std::string::basic_string(v8, (int)this + 768);\n      memset(v9, 0, sizeof(v9));\n      std::string::__init(v9, \"Name or ID...\", 0xDu);\n      memset(v10, 0, sizeof(v10));\n      std::string::__init(v10, \"Search Sound Packs\", 0x12u);\n      v11 = 0;\n      v12 = 0;\n      v13 = 0;\n      std::string::__init(&v11, \"Search\", 6u);\n      v4 = SetTextPopup::create((int)v8, (int)v9, COERCE_FLOAT(60), (int)v10, (int)&v11, 0, 0.0, 0, 1, 0);\n      std::string::~string((int)&v11);\n      std::string::~string((int)v10);\n      std::string::~string((int)v9);\n      std::string::~string((int)v8);\n      v5 = *((_DWORD *)v4 + 131);\n      if ( v5 )\n      {\n        v11 = 0;\n        v12 = 0;\n        v13 = 0;\n        std::string::__init(&v11, \" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\", 0x3Fu);\n        CCTextInputNode::setAllowedChars(v5, (unsigned __int8 *)&v11);\n        std::string::~string((int)&v11);\n      }\n      *((_DWORD *)v4 + 142) = (char *)this + 724;\n      v6 = (*(int (__fastcall **)(EditorSoundBrowserLayer *))(*(_DWORD *)this + 52))(this);\n      v7 = *(_DWORD *)v4;\n      *((_DWORD *)v4 + 116) = v6 + 1;\n      return (char *)(*(int (__fastcall **)(FLAlertLayer *))(v7 + 656))(v4);\n    }\n    else\n    {\n      return (char *)EditorSoundBrowserLayer::setMode(this, (int)result);\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorSoundBrowserLayer::onSelectMode from 0x783434 to 0x783574 (320 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:30 +0000\n; \nPUSH.W          {R4-R10,LR}                                            ; +0x0, 0x783434\nSUB             SP, SP, #0x50                                          ; +0x4, 0x783438\nLDR             R5, =(__stack_chk_guard_ptr - 0x783444)                ; +0x6, 0x78343a\nMOV             R6, R0                                                 ; +0x8, 0x78343c\nMOV             R0, R1                                                 ; +0xa, 0x78343e\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0xc, 0x783440\nLDR             R5, [R5]; __stack_chk_guard                            ; +0xe, 0x783442\nLDR             R3, [R5]                                               ; +0x10, 0x783444\nSTR             R3, [SP,#0x50+var_4]                                   ; +0x12, 0x783446\nLDR             R3, [R1]                                               ; +0x14, 0x783448\nLDR             R3, [R3,#0x20]                                         ; +0x16, 0x78344a\nBLX             R3                                                     ; +0x18, 0x78344c\nCMP             R0, #9                                                 ; +0x1a, 0x78344e\nMOV             R1, R0                                                 ; +0x1c, 0x783450\nBHI.W           loc_783562                                             ; +0x1e, 0x783452\nBNE             loc_783534                                             ; +0x22, 0x783456\nADD.W           R8, SP, #0x50+var_34                                   ; +0x24, 0x783458\nMOVS            R3, #2                                                 ; +0x28, 0x78345c\nADD.W           R1, R6, #0x300                                         ; +0x2a, 0x78345e\nSTR.W           R3, [R6,#0x320]                                        ; +0x2e, 0x783462\nMOV             R0, R8                                                 ; +0x32, 0x783466\nADD.W           R9, SP, #0x50+var_28                                   ; +0x34, 0x783468\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x38, 0x78346c\nLDR             R1, =(aNameOrId - 0x78347A); \"Name or ID...\"           ; +0x3c, 0x783470\nMOV             R0, R9                                                 ; +0x3e, 0x783472\nMOVS            R2, #0xD                                               ; +0x40, 0x783474\nADD             R1, PC; \"Name or ID...\"                                ; +0x42, 0x783476\nMOVS            R4, #0                                                 ; +0x44, 0x783478\nSTR             R4, [SP,#0x50+var_28]                                  ; +0x46, 0x78347a\nSTR             R4, [SP,#0x50+var_24]                                  ; +0x48, 0x78347c\nSTR             R4, [SP,#0x50+var_20]                                  ; +0x4a, 0x78347e\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x4c, 0x783480\nADD.W           R10, SP, #0x50+var_1C                                  ; +0x50, 0x783484\nLDR             R1, =(aSearchSoundPac - 0x783494); \"Search Sound Packs\" ; +0x54, 0x783488\nMOVS            R2, #0x12                                              ; +0x56, 0x78348a\nSTR             R4, [SP,#0x50+var_1C]                                  ; +0x58, 0x78348c\nMOV             R0, R10                                                ; +0x5a, 0x78348e\nADD             R1, PC; \"Search Sound Packs\"                           ; +0x5c, 0x783490\nSTR             R4, [SP,#0x50+var_18]                                  ; +0x5e, 0x783492\nSTR             R4, [SP,#0x50+var_14]                                  ; +0x60, 0x783494\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x62, 0x783496\nSTR             R4, [SP,#0x50+var_10]                                  ; +0x66, 0x78349a\nMOVS            R2, #6                                                 ; +0x68, 0x78349c\nSTR             R4, [SP,#0x50+var_C]                                   ; +0x6a, 0x78349e\nSTR             R4, [SP,#0x50+var_8]                                   ; +0x6c, 0x7834a0\nADD             R4, SP, #0x50+var_10                                   ; +0x6e, 0x7834a2\nLDR             R1, =(aSearch - 0x7834AC); \"Search\"                    ; +0x70, 0x7834a4\nMOV             R0, R4                                                 ; +0x72, 0x7834a6\nADD             R1, PC; \"Search\"                                       ; +0x74, 0x7834a8\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x76, 0x7834aa\nMOVS            R3, #0                                                 ; +0x7a, 0x7834ae\nMOVS            R2, #0                                                 ; +0x7c, 0x7834b0\nSTR             R3, [SP,#0x50+var_4C]; char                            ; +0x7e, 0x7834b2\nMOV             R0, R8; int                                            ; +0x80, 0x7834b4\nSTR             R2, [SP,#0x50+var_48]; float                           ; +0x82, 0x7834b6\nMOV             R1, R9; int                                            ; +0x84, 0x7834b8\nMOVS            R2, #1                                                 ; +0x86, 0x7834ba\nSTR             R3, [SP,#0x50+var_44]; char                            ; +0x88, 0x7834bc\nSTR             R2, [SP,#0x50+var_40]; int                             ; +0x8a, 0x7834be\nMOVS            R2, #0x3C ; '<'; int                                   ; +0x8c, 0x7834c0\nSTR             R3, [SP,#0x50+var_3C]; int                             ; +0x8e, 0x7834c2\nMOV             R3, R10; int                                           ; +0x90, 0x7834c4\nSTR             R4, [SP,#0x50+var_50]; int                             ; +0x92, 0x7834c6\nBL              _ZN12SetTextPopup6createENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES6_iS6_S6_bfbii; SetTextPopup::create(std::string,std::string,int,std::string,std::string,bool,float,bool,int,int) ; +0x94, 0x7834c8\nMOV             R7, R0                                                 ; +0x98, 0x7834cc\nMOV             R0, R4                                                 ; +0x9a, 0x7834ce\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x9c, 0x7834d0\nMOV             R0, R10                                                ; +0xa0, 0x7834d4\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xa2, 0x7834d6\nMOV             R0, R9                                                 ; +0xa6, 0x7834da\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xa8, 0x7834dc\nMOV             R0, R8                                                 ; +0xac, 0x7834e0\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xae, 0x7834e2\nLDR.W           R8, [R7,#0x20C]                                        ; +0xb2, 0x7834e6\nCMP.W           R8, #0                                                 ; +0xb6, 0x7834ea\nBEQ             loc_783512                                             ; +0xba, 0x7834ee\nLDR             R1, =(aAbcdefghijklmn - 0x7834FC); \" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL\"... ; +0xbc, 0x7834f0\nMOV             R0, R4                                                 ; +0xbe, 0x7834f2\nMOVS            R2, #0x3F ; '?'                                        ; +0xc0, 0x7834f4\nMOVS            R3, #0                                                 ; +0xc2, 0x7834f6\nADD             R1, PC; \" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL\"...   ; +0xc4, 0x7834f8\nSTR             R3, [SP,#0x50+var_10]                                  ; +0xc6, 0x7834fa\nSTR             R3, [SP,#0x50+var_C]                                   ; +0xc8, 0x7834fc\nSTR             R3, [SP,#0x50+var_8]                                   ; +0xca, 0x7834fe\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0xcc, 0x783500\nMOV             R0, R8                                                 ; +0xd0, 0x783504\nMOV             R1, R4                                                 ; +0xd2, 0x783506\nBL              _ZN15CCTextInputNode15setAllowedCharsENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; CCTextInputNode::setAllowedChars(std::string) ; +0xd4, 0x783508\nMOV             R0, R4                                                 ; +0xd8, 0x78350c\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xda, 0x78350e\nADD.W           R3, R6, #0x2D4                                         ; +0xde, 0x783512\nSTR.W           R3, [R7,#0x238]                                        ; +0xe2, 0x783516\nLDR             R3, [R6]                                               ; +0xe6, 0x78351a\nMOV             R0, R6                                                 ; +0xe8, 0x78351c\nLDR             R3, [R3,#0x34]                                         ; +0xea, 0x78351e\nBLX             R3                                                     ; +0xec, 0x783520\nLDR             R3, [R7]                                               ; +0xee, 0x783522\nADDS            R0, #1                                                 ; +0xf0, 0x783524\nSTR.W           R0, [R7,#0x1D0]                                        ; +0xf2, 0x783526\nMOV             R0, R7                                                 ; +0xf6, 0x78352a\nLDR.W           R3, [R3,#0x290]                                        ; +0xf8, 0x78352c\nBLX             R3                                                     ; +0xfc, 0x783530\nB               loc_783562                                             ; +0xfe, 0x783532\nMOV             R0, R6; this                                           ; +0x100, 0x783534\nBL              _ZN23EditorSoundBrowserLayer7setModeE21EditorSoundBrowseMode; EditorSoundBrowserLayer::setMode(EditorSoundBrowseMode) ; +0x102, 0x783536\nB               loc_783562                                             ; +0x106, 0x78353a\nMOV             R0, R4                                                 ; +0x108, 0x78353c\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x10a, 0x78353e\nB               loc_783544                                             ; +0x10e, 0x783542\nMOV             R0, R10                                                ; +0x110, 0x783544\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x112, 0x783546\nB               loc_78354C                                             ; +0x116, 0x78354a\nMOV             R0, R9                                                 ; +0x118, 0x78354c\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x11a, 0x78354e\nB               loc_783554                                             ; +0x11e, 0x783552\nMOV             R0, R8                                                 ; +0x120, 0x783554\nB               loc_78355A                                             ; +0x122, 0x783556\nMOV             R0, R4                                                 ; +0x124, 0x783558\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x126, 0x78355a\nBL              __cxa_end_cleanup                                      ; +0x12a, 0x78355e\nLDR             R2, [SP,#0x50+var_4]                                   ; +0x12e, 0x783562\nLDR             R3, [R5]                                               ; +0x130, 0x783564\nCMP             R2, R3                                                 ; +0x132, 0x783566\nBEQ             loc_78356E                                             ; +0x134, 0x783568\nBLX             __stack_chk_fail                                       ; +0x136, 0x78356a\nADD             SP, SP, #0x50 ; 'P'                                    ; +0x13a, 0x78356e\nPOP.W           {R4-R10,PC}                                            ; +0x13c, 0x783570", "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"}