{"type": "func", "start": 4724556, "end": 4724762, "name": "EditorUI::getCreateMenuItemButton", "pseudocode": "// \n// EditorUI::getCreateMenuItemButton from 0x48174c to 0x48181a (206 bytes)\n// \n// 4 xrefs:\n// > EditorUI::createCustomItems @ 0x6f66e2\n// > EditorUI::createCustomItems @ 0x6f6720\n// > EditorUI::createCustomItems @ 0x6f675c\n// > EditorUI::createCustomItems @ 0x6f679a\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:49:22 +0000\n// \n\n_DWORD *__fastcall EditorUI::getCreateMenuItemButton(\n        int a1,\n        ButtonSprite *this,\n        int a3,\n        int a4,\n        int a5,\n        int a6,\n        int a7,\n        const cocos2d::CCPoint *a8)\n{\n  char *v9; // r3\n  ButtonSprite *v10; // r10\n  _DWORD *v11; // r4\n  float v13; // [sp+14h] [bp-1Ch]\n  _BYTE v16[8]; // [sp+24h] [bp-Ch] BYREF\n\n  switch ( a7 )\n  {\n    case 2:\n      v9 = \"GJ_button_02.png\";\n      break;\n    case 3:\n      v9 = \"GJ_button_03.png\";\n      break;\n    case 4:\n      v9 = \"GJ_button_04.png\";\n      break;\n    case 5:\n      v9 = \"GJ_button_05.png\";\n      break;\n    case 6:\n      v9 = \"GJ_button_06.png\";\n      break;\n    default:\n      v9 = \"GJ_button_01.png\";\n      break;\n  }\n  v10 = ButtonSprite::create(\n          this,\n          (cocos2d::CCSprite *)&dword_20,\n          0,\n          32.0,\n          1.0,\n          (_BOOL4)&dword_0 + 1,\n          v9,\n          (const char *)&dword_0 + 1,\n          0.0,\n          v13);\n  v11 = (_DWORD *)CreateMenuItem::create(v10, 0, a1, a3, a4);\n  (*(void (__fastcall **)(_DWORD *, int))(*v11 + 80))(v11, a6);\n  v11[79] = a6;\n  if ( a5 )\n    (*(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)a5 + 228))(a5, v11);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, a8);\n  ButtonSprite::updateSpriteOffset(v10, (int)v16);\n  return v11;\n}", "assembly": "; \n; EditorUI::getCreateMenuItemButton from 0x48174c to 0x48181a (206 bytes)\n; \n; 4 xrefs:\n; > EditorUI::createCustomItems @ 0x6f66e2\n; > EditorUI::createCustomItems @ 0x6f6720\n; > EditorUI::createCustomItems @ 0x6f675c\n; > EditorUI::createCustomItems @ 0x6f679a\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:49:22 +0000\n; \nPUSH.W          {R4-R10,LR}                                            ; +0x0, 0x48174c\nSUB             SP, SP, #0x30                                          ; +0x4, 0x481750\nADD             R4, SP, #0x30+var_18                                   ; +0x6, 0x481752\nMOV             R9, R0                                                 ; +0x8, 0x481754\nLDR.W           R8, [SP,#0x30+arg_0]                                   ; +0xa, 0x481756\nSTM.W           R4, {R2,R3}                                            ; +0xe, 0x48175a\nLDR             R2, =(__stack_chk_guard_ptr - 0x481766)                ; +0x12, 0x48175e\nLDR             R4, [SP,#0x30+arg_8]                                   ; +0x14, 0x481760\nADD             R2, PC; __stack_chk_guard_ptr                          ; +0x16, 0x481762\nLDR             R2, [R2]; __stack_chk_guard                            ; +0x18, 0x481764\nLDR             R6, [SP,#0x30+arg_4]                                   ; +0x1a, 0x481766\nLDR             R7, [SP,#0x30+arg_C]                                   ; +0x1c, 0x481768\nLDR             R3, [R2]                                               ; +0x1e, 0x48176a\nMOV             R5, R2                                                 ; +0x20, 0x48176c\nSTR             R3, [SP,#0x30+var_4]                                   ; +0x22, 0x48176e\nSUBS            R3, R4, #2; switch 5 cases                             ; +0x24, 0x481770\nCMP             R3, #4                                                 ; +0x26, 0x481772\nBHI             def_481776; jumptable 00481776 default case            ; +0x28, 0x481774\nTBB.W           [PC,R3]; switch jump                                   ; +0x2a, 0x481776\nDCB 0x12; jump table for switch statement                              ; +0x2e, 0x48177a\nDCB 3                                                                  ; +0x2f, 0x48177b\nDCB 6                                                                  ; +0x30, 0x48177c\nDCB 9                                                                  ; +0x31, 0x48177d\nDCB 0xC                                                                ; +0x32, 0x48177e\nALIGN 2                                                                ; +0x33, 0x48177f\nLDR             R3, =(aGjButton03Png - 0x481786); jumptable 00481776 case 3 ; +0x34, 0x481780\nADD             R3, PC; \"GJ_button_03.png\"                             ; +0x36, 0x481782\nB               loc_4817A2                                             ; +0x38, 0x481784\nLDR             R3, =(aGjButton04Png - 0x48178C); jumptable 00481776 case 4 ; +0x3a, 0x481786\nADD             R3, PC; \"GJ_button_04.png\"                             ; +0x3c, 0x481788\nB               loc_4817A2                                             ; +0x3e, 0x48178a\nLDR             R3, =(aGjButton05Png - 0x481792); jumptable 00481776 case 5 ; +0x40, 0x48178c\nADD             R3, PC; \"GJ_button_05.png\"                             ; +0x42, 0x48178e\nB               loc_4817A2                                             ; +0x44, 0x481790\nLDR             R3, =(aGjButton06Png - 0x481798); jumptable 00481776 case 6 ; +0x46, 0x481792\nADD             R3, PC; \"GJ_button_06.png\"                             ; +0x48, 0x481794\nB               loc_4817A2                                             ; +0x4a, 0x481796\nLDR             R3, =(aGjButton01Png - 0x48179E); jumptable 00481776 default case ; +0x4c, 0x481798\nADD             R3, PC; \"GJ_button_01.png\"                             ; +0x4e, 0x48179a\nB               loc_4817A2                                             ; +0x50, 0x48179c\nLDR             R3, =(aGjButton02Png - 0x4817A4); jumptable 00481776 case 2 ; +0x52, 0x48179e\nADD             R3, PC; \"GJ_button_02.png\"                             ; +0x54, 0x4817a0\nMOV.W           R2, #0x3F800000                                        ; +0x56, 0x4817a2\nSTR             R3, [SP,#0x30+var_28]; char *                          ; +0x5a, 0x4817a6\nSTR             R2, [SP,#0x30+var_30]; float                           ; +0x5c, 0x4817a8\nMOVS            R3, #0                                                 ; +0x5e, 0x4817aa\nMOVS            R2, #(dword_0+1)                                       ; +0x60, 0x4817ac\nSTR             R3, [SP,#0x30+var_20]; float                           ; +0x62, 0x4817ae\nSTR             R2, [SP,#0x30+var_2C]; float                           ; +0x64, 0x4817b0\nMOV             R0, R1; this                                           ; +0x66, 0x4817b2\nSTR             R2, [SP,#0x30+var_24]; char *                          ; +0x68, 0x4817b4\nMOVS            R1, #dword_20; cocos2d::CCSprite *                     ; +0x6a, 0x4817b6\nMOVS            R2, #0; int                                            ; +0x6c, 0x4817b8\nMOV.W           R3, #0x42000000; int                                   ; +0x6e, 0x4817ba\nBL              _ZN12ButtonSprite6createEPN7cocos2d8CCSpriteEiiffbPKcbf; ButtonSprite::create(cocos2d::CCSprite *,int,int,float,float,bool,char const*,bool,float) ; +0x72, 0x4817be\nLDR             R3, [SP,#0x30+var_14]                                  ; +0x76, 0x4817c2\nMOVS            R1, #0                                                 ; +0x78, 0x4817c4\nMOV             R2, R9                                                 ; +0x7a, 0x4817c6\nSTR             R3, [SP,#0x30+var_30]                                  ; +0x7c, 0x4817c8\nLDR             R3, [SP,#0x30+var_18]                                  ; +0x7e, 0x4817ca\nMOV             R10, R0                                                ; +0x80, 0x4817cc\nBL              _ZN14CreateMenuItem6createEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CreateMenuItem::create(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0x82, 0x4817ce\nMOV             R1, R6                                                 ; +0x86, 0x4817d2\nLDR             R3, [R0]                                               ; +0x88, 0x4817d4\nMOV             R4, R0                                                 ; +0x8a, 0x4817d6\nLDR             R3, [R3,#0x50]                                         ; +0x8c, 0x4817d8\nBLX             R3                                                     ; +0x8e, 0x4817da\nSTR.W           R6, [R4,#0x13C]                                        ; +0x90, 0x4817dc\nCMP.W           R8, #0                                                 ; +0x94, 0x4817e0\nBEQ             loc_4817F4                                             ; +0x98, 0x4817e4\nLDR.W           R3, [R8]                                               ; +0x9a, 0x4817e6\nMOV             R0, R8                                                 ; +0x9e, 0x4817ea\nMOV             R1, R4                                                 ; +0xa0, 0x4817ec\nLDR.W           R3, [R3,#0xE4]                                         ; +0xa2, 0x4817ee\nBLX             R3                                                     ; +0xa6, 0x4817f2\nADD             R6, SP, #0x30+var_C                                    ; +0xa8, 0x4817f4\nMOV             R1, R7; cocos2d::CCPoint *                             ; +0xaa, 0x4817f6\nMOV             R0, R6; this                                           ; +0xac, 0x4817f8\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xae, 0x4817fa\nMOV             R0, R10                                                ; +0xb2, 0x4817fe\nMOV             R1, R6                                                 ; +0xb4, 0x481800\nBL              _ZN12ButtonSprite18updateSpriteOffsetEN7cocos2d7CCPointE; ButtonSprite::updateSpriteOffset(cocos2d::CCPoint) ; +0xb6, 0x481802\nLDR             R2, [SP,#0x30+var_4]                                   ; +0xba, 0x481806\nLDR             R3, [R5]                                               ; +0xbc, 0x481808\nMOV             R0, R4                                                 ; +0xbe, 0x48180a\nCMP             R2, R3                                                 ; +0xc0, 0x48180c\nBEQ             loc_481814                                             ; +0xc2, 0x48180e\nBLX             __stack_chk_fail                                       ; +0xc4, 0x481810\nADD             SP, SP, #0x30 ; '0'                                    ; +0xc8, 0x481814\nPOP.W           {R4-R10,PC}                                            ; +0xca, 0x481816", "xrefs": ["EditorUI::createCustomItems @ 0x6f66e2", "EditorUI::createCustomItems @ 0x6f6720", "EditorUI::createCustomItems @ 0x6f675c", "EditorUI::createCustomItems @ 0x6f679a"], "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"}