{"type": "func", "start": 3655336, "end": 3655488, "name": "EditorUI::getSimpleButton", "pseudocode": "// \n// EditorUI::getSimpleButton from 0x37c6a8 to 0x37c740 (152 bytes)\n// \n// 0 xrefs:\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        unsigned int a1,\n        const char **a2,\n        unsigned int a3,\n        int a4,\n        int a5)\n{\n  cocos2d::CCSprite *v6; // r4\n  void (__fastcall *setScale)(cocos2d::CCSprite *__hidden, float); // r7\n  float width; // s17\n  int v9; // r0\n  const cocos2d::CCSize *(__fastcall *getContentSize)(const cocos2d::CCNode *__hidden); // r3\n  float height; // s15\n  CCMenuItemSpriteExtra *v12; // r4\n\n  v6 = cocos2d::CCSprite::createWithSpriteFrameName(*a2);\n  setScale = v6->setScale;\n  width = v6->getContentSize(v6)->width;\n  v9 = (int)v6->getContentSize(v6);\n  getContentSize = v6->getContentSize;\n  if ( (float)(18.0 / width) <= (float)(18.0 / *(float *)(v9 + 4)) )\n    height = getContentSize(v6)->width;\n  else\n    height = getContentSize(v6)->height;\n  ((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))setScale)(v6, 18.0 / height);\n  v12 = CCMenuItemSpriteExtra::create(v6, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(a3, a1));\n  if ( a5 )\n    (*(void (__fastcall **)(int, CCMenuItemSpriteExtra *))(*(_DWORD *)a5 + 220))(a5, v12);\n  return v12;\n}", "assembly": "; \n; EditorUI::getSimpleButton from 0x37c6a8 to 0x37c740 (152 bytes)\n; \n; 0 xrefs:\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\nPUSH            {R4-R7,LR}                                             ; +0x0, 0x37c6a8\nMOV             R6, R0                                                 ; +0x2, 0x37c6aa\nVPUSH           {D8}                                                   ; +0x4, 0x37c6ac\nVMOV.F32        S16, #18.0                                             ; +0x8, 0x37c6b0\nSUB             SP, SP, #0x14                                          ; +0xc, 0x37c6b4\nADD             R0, SP, #0x14+var_4                                    ; +0xe, 0x37c6b6\nLDR             R5, [SP,#0x14+arg_0]                                   ; +0x10, 0x37c6b8\nSTMDB.W         R0, {R2,R3}                                            ; +0x12, 0x37c6ba\nLDR             R0, [R1]; this                                         ; +0x16, 0x37c6be\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0x18, 0x37c6c0\nLDR             R3, [R0]                                               ; +0x1c, 0x37c6c4\nMOV             R4, R0                                                 ; +0x1e, 0x37c6c6\nLDR             R7, [R3,#0x50]                                         ; +0x20, 0x37c6c8\nLDR.W           R3, [R3,#0x9C]                                         ; +0x22, 0x37c6ca\nBLX             R3                                                     ; +0x26, 0x37c6ce\nLDR             R3, [R4]                                               ; +0x28, 0x37c6d0\nLDR.W           R3, [R3,#0x9C]                                         ; +0x2a, 0x37c6d2\nVLDR            S17, [R0]                                              ; +0x2e, 0x37c6d6\nMOV             R0, R4                                                 ; +0x32, 0x37c6da\nBLX             R3                                                     ; +0x34, 0x37c6dc\nLDR             R3, [R4]                                               ; +0x36, 0x37c6de\nVDIV.F32        S17, S16, S17                                          ; +0x38, 0x37c6e0\nLDR.W           R3, [R3,#0x9C]                                         ; +0x3c, 0x37c6e4\nVLDR            S15, [R0,#4]                                           ; +0x40, 0x37c6e8\nMOV             R0, R4                                                 ; +0x44, 0x37c6ec\nVDIV.F32        S15, S16, S15                                          ; +0x46, 0x37c6ee\nVCMPE.F32       S17, S15                                               ; +0x4a, 0x37c6f2\nVMRS            APSR_nzcv, FPSCR                                       ; +0x4e, 0x37c6f6\nBLE             loc_37C704                                             ; +0x52, 0x37c6fa\nBLX             R3                                                     ; +0x54, 0x37c6fc\nVLDR            S15, [R0,#4]                                           ; +0x56, 0x37c6fe\nB               loc_37C70A                                             ; +0x5a, 0x37c702\nBLX             R3                                                     ; +0x5c, 0x37c704\nVLDR            S15, [R0]                                              ; +0x5e, 0x37c706\nMOV             R0, R4                                                 ; +0x62, 0x37c70a\nVDIV.F32        S16, S16, S15                                          ; +0x64, 0x37c70c\nVMOV            R1, S16                                                ; +0x68, 0x37c710\nBLX             R7                                                     ; +0x6c, 0x37c714\nLDR             R3, [SP,#0x14+var_8]                                   ; +0x6e, 0x37c716\nMOV             R0, R4                                                 ; +0x70, 0x37c718\nMOVS            R1, #0                                                 ; +0x72, 0x37c71a\nMOV             R2, R6                                                 ; +0x74, 0x37c71c\nSTR             R3, [SP,#0x14+var_14]                                  ; +0x76, 0x37c71e\nLDR             R3, [SP,#0x14+var_C]                                   ; +0x78, 0x37c720\nBL              _ZN21CCMenuItemSpriteExtra6createEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CCMenuItemSpriteExtra::create(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0x7a, 0x37c722\nMOV             R4, R0                                                 ; +0x7e, 0x37c726\nCBZ             R5, loc_37C736                                         ; +0x80, 0x37c728\nLDR             R3, [R5]                                               ; +0x82, 0x37c72a\nMOV             R0, R5                                                 ; +0x84, 0x37c72c\nMOV             R1, R4                                                 ; +0x86, 0x37c72e\nLDR.W           R3, [R3,#0xDC]                                         ; +0x88, 0x37c730\nBLX             R3                                                     ; +0x8c, 0x37c734\nMOV             R0, R4                                                 ; +0x8e, 0x37c736\nADD             SP, SP, #0x14                                          ; +0x90, 0x37c738\nVPOP            {D8}                                                   ; +0x92, 0x37c73a\nPOP             {R4-R7,PC}                                             ; +0x96, 0x37c73e", "xrefs": [], "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"}