{"type": "func", "start": 6846052, "end": 6846292, "name": "EditorUI::getSimpleButton", "pseudocode": "// \n// EditorUI::getSimpleButton from 0x687664 to 0x687754 (240 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x6a710\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\nCCMenuItemSpriteExtra *__fastcall EditorUI::getSimpleButton(\n        void (__cdecl *a1)(cocos2d::CCObject *),\n        const char **a2,\n        size_t a3,\n        __int64 a4,\n        __int64 a5)\n{\n  cocos2d::CCSprite *v8; // x19\n  void (__fastcall *setScale)(cocos2d::CCSprite *__hidden, float); // x24\n  float v10; // s9\n  float height; // s0\n  const cocos2d::CCSize *(__fastcall *getContentSize)(const cocos2d::CCNode *__hidden); // x1\n  long double v13; // q0\n  CCMenuItemSpriteExtra *v14; // x19\n  cocos2d::SEL_MenuHandler v16; // 0:x2.16\n\n  v8 = cocos2d::CCSprite::createWithSpriteFrameName(*a2);\n  setScale = v8->setScale;\n  v10 = 18.0 / v8->getContentSize(v8)->width;\n  height = v8->getContentSize(v8)->height;\n  getContentSize = v8->getContentSize;\n  if ( v10 <= (float)(18.0 / height) )\n    *(float *)&v13 = 18.0 / getContentSize(v8)->width;\n  else\n    *(float *)&v13 = 18.0 / getContentSize(v8)->height;\n  setScale(v8, v13);\n  v16.ptr = a1;\n  v16.adj = a3;\n  v14 = CCMenuItemSpriteExtra::create(v8, nullptr, v16);\n  if ( a5 )\n    (*(void (__fastcall **)(__int64, CCMenuItemSpriteExtra *))(*(_QWORD *)a5 + 440LL))(a5, v14);\n  return v14;\n}", "assembly": "; \n; EditorUI::getSimpleButton from 0x687664 to 0x687754 (240 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x6a710\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,#-0x50+var_s0]!                          ; +0x0, 0x687664\nMOV             X29, SP                                                ; +0x4, 0x687668\nSTP             X23, X24, [SP,#var_s30]                                ; +0x8, 0x68766c\nSTP             D8, D9, [SP,#var_s40]                                  ; +0xc, 0x687670\nMOV             X23, X0                                                ; +0x10, 0x687674\nLDR             X0, [X1]; this                                         ; +0x14, 0x687678\nFMOV            S8, #18.0                                              ; +0x18, 0x68767c\nSTP             X19, X20, [SP,#var_s10]                                ; +0x1c, 0x687680\nSTP             X21, X22, [SP,#var_s20]                                ; +0x20, 0x687684\nMOV             X20, X2                                                ; +0x24, 0x687688\nMOV             X21, X3                                                ; +0x28, 0x68768c\nMOV             X22, X4                                                ; +0x2c, 0x687690\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0x30, 0x687694\nLDR             X1, [X0]                                               ; +0x34, 0x687698\nMOV             X19, X0                                                ; +0x38, 0x68769c\nLDR             X2, [X1,#0x138]                                        ; +0x3c, 0x6876a0\nLDR             X24, [X1,#0xA0]                                        ; +0x40, 0x6876a4\nBLR             X2                                                     ; +0x44, 0x6876a8\nLDR             S9, [X0]                                               ; +0x48, 0x6876ac\nLDR             X1, [X19]                                              ; +0x4c, 0x6876b0\nMOV             X0, X19                                                ; +0x50, 0x6876b4\nFDIV            S9, S8, S9                                             ; +0x54, 0x6876b8\nLDR             X1, [X1,#0x138]                                        ; +0x58, 0x6876bc\nBLR             X1                                                     ; +0x5c, 0x6876c0\nLDR             S0, [X0,#4]                                            ; +0x60, 0x6876c4\nLDR             X1, [X19]                                              ; +0x64, 0x6876c8\nMOV             X0, X19                                                ; +0x68, 0x6876cc\nFDIV            S0, S8, S0                                             ; +0x6c, 0x6876d0\nLDR             X1, [X1,#0x138]                                        ; +0x70, 0x6876d4\nFCMPE           S9, S0                                                 ; +0x74, 0x6876d8\nB.LE            loc_687744                                             ; +0x78, 0x6876dc\nBLR             X1                                                     ; +0x7c, 0x6876e0\nLDR             S0, [X0,#4]                                            ; +0x80, 0x6876e4\nFDIV            S0, S8, S0                                             ; +0x84, 0x6876e8\nMOV             X0, X19                                                ; +0x88, 0x6876ec\nBLR             X24                                                    ; +0x8c, 0x6876f0\nMOV             X0, X19                                                ; +0x90, 0x6876f4\nMOV             X1, #0                                                 ; +0x94, 0x6876f8\nMOV             X2, X23                                                ; +0x98, 0x6876fc\nMOV             X3, X20                                                ; +0x9c, 0x687700\nMOV             X4, X21                                                ; +0xa0, 0x687704\nBL              _ZN21CCMenuItemSpriteExtra6createEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CCMenuItemSpriteExtra::create(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0xa4, 0x687708\nMOV             X19, X0                                                ; +0xa8, 0x68770c\nCBZ             X22, loc_687728                                        ; +0xac, 0x687710\nLDR             X2, [X22]                                              ; +0xb0, 0x687714\nMOV             X0, X22                                                ; +0xb4, 0x687718\nMOV             X1, X19                                                ; +0xb8, 0x68771c\nLDR             X2, [X2,#0x1B8]                                        ; +0xbc, 0x687720\nBLR             X2                                                     ; +0xc0, 0x687724\nMOV             X0, X19                                                ; +0xc4, 0x687728\nLDP             D8, D9, [SP,#var_s40]                                  ; +0xc8, 0x68772c\nLDP             X19, X20, [SP,#var_s10]                                ; +0xcc, 0x687730\nLDP             X21, X22, [SP,#var_s20]                                ; +0xd0, 0x687734\nLDP             X23, X24, [SP,#var_s30]                                ; +0xd4, 0x687738\nLDP             X29, X30, [SP+var_s0],#0x50                            ; +0xd8, 0x68773c\nRET                                                                    ; +0xdc, 0x687740\nBLR             X1                                                     ; +0xe0, 0x687744\nLDR             S0, [X0]                                               ; +0xe4, 0x687748\nFDIV            S0, S8, S0                                             ; +0xe8, 0x68774c\nB               loc_6876EC                                             ; +0xec, 0x687750", "xrefs": ["<???> @ 0x6a710"], "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"}