{"type": "func", "start": 6899280, "end": 6899640, "name": "EditorUI::getCreateMenuItemButton", "pseudocode": "// \n// EditorUI::getCreateMenuItemButton from 0x694650 to 0x6947b8 (360 bytes)\n// \n// 5 xrefs:\n// > EditorUI::createCustomItems @ 0x697770\n// > EditorUI::createCustomItems @ 0x6977c8\n// > EditorUI::createCustomItems @ 0x697820\n// > EditorUI::createCustomItems @ 0x697878\n// > <???> @ 0x8dc00\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nCreateMenuItem *EditorUI::getCreateMenuItemButton(\n        EditorUI *a1,\n        cocos2d::CCSprite *a2,\n        cocos2d::SEL_MenuHandler a3,\n        cocos2d::CCMenu *a4,\n        float a5,\n        int a6,\n        cocos2d::CCPoint a7)\n{\n  const cocos2d::CCPoint *v7; // x6\n  size_t adj; // x23\n  void (__cdecl *ptr)(cocos2d::CCObject *); // x22\n  const cocos2d::CCPoint *v12; // x24\n  char *v14; // x4\n  ButtonSprite *v15; // x26\n  CreateMenuItem *v16; // x21\n  cocos2d::CCPoint v18; // [xsp+60h] [xbp+60h] BYREF\n  cocos2d::SEL_MenuHandler v19; // 0:x3.16\n  cocos2d::CCPoint v20; // 0:s0.4,4:s1.4\n\n  adj = a3.adj;\n  ptr = a3.ptr;\n  v12 = v7;\n  switch ( a6 )\n  {\n    case 2:\n      v14 = \"GJ_button_02.png\";\n      break;\n    case 3:\n      v14 = \"GJ_button_03.png\";\n      break;\n    case 4:\n      v14 = \"GJ_button_04.png\";\n      break;\n    case 5:\n      v14 = \"GJ_button_05.png\";\n      break;\n    case 6:\n      v14 = \"GJ_button_06.png\";\n      break;\n    default:\n      v14 = \"GJ_button_01.png\";\n      break;\n  }\n  v15 = (ButtonSprite *)ButtonSprite::create(\n                          (ButtonSprite *)a2,\n                          (cocos2d::CCSprite *)&qword_20,\n                          0,\n                          (bool)&dword_0 + 1,\n                          32.0,\n                          1.0,\n                          (cocos2d::CCSprite *)v14,\n                          (const char *)&dword_0 + 1);\n  v19.ptr = ptr;\n  v19.adj = adj;\n  v16 = CreateMenuItem::create(v15, nullptr, a1, v19);\n  v16->setScale(v16, a5);\n  v16->m_baseScale = a5;\n  if ( a4 )\n    a4->addChild(a4, v16);\n  cocos2d::CCPoint::CCPoint(&v18, v12);\n  ButtonSprite::updateSpriteOffset(v15, v20);\n  return v16;\n}", "assembly": "; \n; EditorUI::getCreateMenuItemButton from 0x694650 to 0x6947b8 (360 bytes)\n; \n; 5 xrefs:\n; > EditorUI::createCustomItems @ 0x697770\n; > EditorUI::createCustomItems @ 0x6977c8\n; > EditorUI::createCustomItems @ 0x697820\n; > EditorUI::createCustomItems @ 0x697878\n; > <???> @ 0x8dc00\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSTP             X29, X30, [SP,#var_70]!                                ; +0x0, 0x694650\nSUB             W5, W5, #2; switch 5 cases                             ; +0x4, 0x694654\nMOV             X29, SP                                                ; +0x8, 0x694658\nSTP             X19, X20, [SP,#0x70+var_60]                            ; +0xc, 0x69465c\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x694660\nMOV             X19, X0                                                ; +0x14, 0x694664\nMOV             X0, X1; this                                           ; +0x18, 0x694668\nCMP             W5, #4                                                 ; +0x1c, 0x69466c\nSTP             X23, X24, [SP,#0x70+var_40]                            ; +0x20, 0x694670\nLDR             X1, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x694674\nMOV             X23, X3                                                ; +0x28, 0x694678\nSTP             X21, X22, [SP,#0x70+var_50]                            ; +0x2c, 0x69467c\nSTP             X25, X26, [SP,#0x70+var_30]                            ; +0x30, 0x694680\nLDR             X1, [X1]                                               ; +0x34, 0x694684\nMOV             X22, X2                                                ; +0x38, 0x694688\nSTR             X1, [X29,#0x70+var_8]                                  ; +0x3c, 0x69468c\nMOV             X25, X4                                                ; +0x40, 0x694690\nSTR             D8, [SP,#0x70+var_20]                                  ; +0x44, 0x694694\nMOV             X24, X6                                                ; +0x48, 0x694698\nFMOV            S8, S0                                                 ; +0x4c, 0x69469c\nB.LS            loc_694760                                             ; +0x50, 0x6946a0\nADRL            X4, aGjButton01Png; jumptable 0000000000694774 default case ; +0x54, 0x6946a4\nLDR             S0, flt_6947B8; float                                  ; +0x5c, 0x6946ac\nMOV             W3, #(dword_0+1); int                                  ; +0x60, 0x6946b0\nMOV             W5, W3; char *                                         ; +0x64, 0x6946b4\nMOV             W1, #qword_20; cocos2d::CCSprite *                     ; +0x68, 0x6946b8\nFMOV            S1, #1.0; float                                        ; +0x6c, 0x6946bc\nMOV             W2, #0; int                                            ; +0x70, 0x6946c0\nBL              _ZN12ButtonSprite6createEPN7cocos2d8CCSpriteEiiffbPKcb; ButtonSprite::create(cocos2d::CCSprite *,int,int,float,float,bool,char const*,bool) ; +0x74, 0x6946c4\nMOV             X26, X0                                                ; +0x78, 0x6946c8\nMOV             X1, #0                                                 ; +0x7c, 0x6946cc\nMOV             X2, X19                                                ; +0x80, 0x6946d0\nMOV             X3, X22                                                ; +0x84, 0x6946d4\nMOV             X4, X23                                                ; +0x88, 0x6946d8\nBL              _ZN14CreateMenuItem6createEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CreateMenuItem::create(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0x8c, 0x6946dc\nLDR             X1, [X0]                                               ; +0x90, 0x6946e0\nFMOV            S0, S8                                                 ; +0x94, 0x6946e4\nMOV             X21, X0                                                ; +0x98, 0x6946e8\nLDR             X1, [X1,#0xA0]                                         ; +0x9c, 0x6946ec\nBLR             X1                                                     ; +0xa0, 0x6946f0\nSTR             S8, [X21,#0x194]                                       ; +0xa4, 0x6946f4\nCBZ             X25, loc_694710                                        ; +0xa8, 0x6946f8\nLDR             X2, [X25]                                              ; +0xac, 0x6946fc\nMOV             X0, X25                                                ; +0xb0, 0x694700\nMOV             X1, X21                                                ; +0xb4, 0x694704\nLDR             X2, [X2,#0x1B8]                                        ; +0xb8, 0x694708\nBLR             X2                                                     ; +0xbc, 0x69470c\nADD             X19, X29, #0x70+var_10                                 ; +0xc0, 0x694710\nMOV             X1, X24; cocos2d::CCPoint *                            ; +0xc4, 0x694714\nMOV             X0, X19; this                                          ; +0xc8, 0x694718\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xcc, 0x69471c\nMOV             X0, X26                                                ; +0xd0, 0x694720\nMOV             X1, X19                                                ; +0xd4, 0x694724\nBL              _ZN12ButtonSprite18updateSpriteOffsetEN7cocos2d7CCPointE; ButtonSprite::updateSpriteOffset(cocos2d::CCPoint) ; +0xd8, 0x694728\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xdc, 0x69472c\nLDR             X2, [X29,#0x70+var_8]                                  ; +0xe0, 0x694730\nMOV             X0, X21                                                ; +0xe4, 0x694734\nLDR             X1, [X20]                                              ; +0xe8, 0x694738\nCMP             X2, X1                                                 ; +0xec, 0x69473c\nB.NE            loc_6947B4                                             ; +0xf0, 0x694740\nLDP             X19, X20, [SP,#0x70+var_60]                            ; +0xf4, 0x694744\nLDP             X21, X22, [SP,#0x70+var_50]                            ; +0xf8, 0x694748\nLDP             X23, X24, [SP,#0x70+var_40]                            ; +0xfc, 0x69474c\nLDP             X25, X26, [SP,#0x70+var_30]                            ; +0x100, 0x694750\nLDR             D8, [SP,#0x70+var_20]                                  ; +0x104, 0x694754\nLDP             X29, X30, [SP+0x70+var_70],#0x70                       ; +0x108, 0x694758\nRET                                                                    ; +0x10c, 0x69475c\nADRL            X1, jpt_694774                                         ; +0x110, 0x694760\nLDRB            W1, [X1,W5,UXTW]                                       ; +0x118, 0x694768\nADR             X2, loc_694778; jumptable 0000000000694774 case 2      ; +0x11c, 0x69476c\nADD             X1, X2, W1,SXTB#2                                      ; +0x120, 0x694770\nBR              X1; switch jump                                        ; +0x124, 0x694774\nADRL            X4, aGjButton02Png; jumptable 0000000000694774 case 2  ; +0x128, 0x694778\nB               loc_6946AC                                             ; +0x130, 0x694780\nADRL            X4, aGjButton06Png; jumptable 0000000000694774 case 6  ; +0x134, 0x694784\nB               loc_6946AC                                             ; +0x13c, 0x69478c\nADRL            X4, aGjButton03Png; jumptable 0000000000694774 case 3  ; +0x140, 0x694790\nB               loc_6946AC                                             ; +0x148, 0x694798\nADRL            X4, aGjButton04Png; jumptable 0000000000694774 case 4  ; +0x14c, 0x69479c\nB               loc_6946AC                                             ; +0x154, 0x6947a4\nADRL            X4, aGjButton05Png; jumptable 0000000000694774 case 5  ; +0x158, 0x6947a8\nB               loc_6946AC                                             ; +0x160, 0x6947b0\nBL              .__stack_chk_fail                                      ; +0x164, 0x6947b4", "xrefs": ["EditorUI::createCustomItems @ 0x697770", "EditorUI::createCustomItems @ 0x6977c8", "EditorUI::createCustomItems @ 0x697820", "EditorUI::createCustomItems @ 0x697878", "<???> @ 0x8dc00"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}