{"type": "func", "start": 8129820, "end": 8130384, "name": "EditorUI::getSpriteButton", "pseudocode": "// \n// EditorUI::getSpriteButton from 0x7c0d1c to 0x7c0f50 (564 bytes)\n// \n// 6 xrefs:\n// > EditorUI::getSpriteButton @ 0x7c0fd0\n// > EditorUI::setupDeleteMenu @ 0xbdea54\n// > EditorUI::setupDeleteMenu @ 0xbdeb6c\n// > EditorUI::setupDeleteMenu @ 0xbdee3c\n// > EditorUI::createDpadMoveMenu @ 0xbe0e00\n// > <???> @ 0x8fa88\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 12:54:06 +0000\n// \n\nfloat *__fastcall EditorUI::getSpriteButton(\n        __int64 a1,\n        ButtonSprite *this,\n        __int64 a3,\n        __int64 a4,\n        __int64 a5,\n        int a6,\n        const cocos2d::CCPoint *a7,\n        float a8,\n        float a9)\n{\n  char *v16; // x4\n  const cocos2d::CCSize *v17; // x0\n  float v18; // s3\n  float v19; // s2\n  ButtonSprite *v20; // x26\n  float *v21; // x20\n  cocos2d::CCSprite *v23; // [xsp+68h] [xbp+68h]\n  float v24; // [xsp+70h] [xbp+70h]\n  float v25; // [xsp+80h] [xbp+80h] BYREF\n  float v26; // [xsp+84h] [xbp+84h]\n\n  switch ( a6 )\n  {\n    case 2:\n      v24 = a9;\n      v16 = \"GJ_button_02.png\";\n      if ( a9 > 0.0 )\n        goto LABEL_4;\n      goto LABEL_16;\n    case 3:\n      v16 = \"GJ_button_03.png\";\n      break;\n    case 4:\n      v16 = \"GJ_button_04.png\";\n      break;\n    case 5:\n      v16 = \"GJ_button_05.png\";\n      break;\n    case 6:\n      v16 = \"GJ_button_06.png\";\n      break;\n    default:\n      v16 = \"GJ_button_01.png\";\n      break;\n  }\n  v24 = a9;\n  if ( a9 > 0.0 )\n  {\nLABEL_4:\n    v23 = (cocos2d::CCSprite *)v16;\n    v17 = (const cocos2d::CCSize *)(*(__int64 (__fastcall **)(ButtonSprite *))(*(_QWORD *)this + 328LL))(this);\n    cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v25, v17);\n    v18 = 32.0 / v25;\n    v19 = 32.0 / v26;\n    if ( (float)(32.0 / v25) <= (float)(32.0 / v26) )\n    {\n      if ( v18 < 1.0 )\n      {\nLABEL_6:\n        if ( v18 <= v19 )\n          v19 = 32.0 / v25;\n        goto LABEL_8;\n      }\n    }\n    else if ( v19 < 1.0 )\n    {\n      goto LABEL_6;\n    }\n    v19 = 1.0;\nLABEL_8:\n    v20 = (ButtonSprite *)ButtonSprite::create(\n                            this,\n                            (cocos2d::CCSprite *)(unsigned int)(int)(float)(v24 - 8.0),\n                            0,\n                            1,\n                            32.0,\n                            v19,\n                            v23,\n                            nullptr,\n                            0.0);\n    goto LABEL_9;\n  }\nLABEL_16:\n  v20 = (ButtonSprite *)ButtonSprite::create(\n                          this,\n                          (cocos2d::CCSprite *)&qword_20,\n                          0,\n                          (char)&dword_0 + 1,\n                          32.0,\n                          1.0,\n                          (cocos2d::CCSprite *)v16,\n                          (const char *)&dword_0 + 1,\n                          0.0);\nLABEL_9:\n  v21 = (float *)CCMenuItemSpriteExtra::create((__int64)v20, 0, a1, a3, a4);\n  (*(void (__fastcall **)(float *, float))(*(_QWORD *)v21 + 160LL))(v21, a8);\n  v21[101] = a8;\n  if ( a5 )\n    (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)a5 + 456LL))(a5, v21);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, a7);\n  ButtonSprite::updateSpriteOffset(v20, (__int64)&v25);\n  return v21;\n}", "assembly": "; \n; EditorUI::getSpriteButton from 0x7c0d1c to 0x7c0f50 (564 bytes)\n; \n; 6 xrefs:\n; > EditorUI::getSpriteButton @ 0x7c0fd0\n; > EditorUI::setupDeleteMenu @ 0xbdea54\n; > EditorUI::setupDeleteMenu @ 0xbdeb6c\n; > EditorUI::setupDeleteMenu @ 0xbdee3c\n; > EditorUI::createDpadMoveMenu @ 0xbe0e00\n; > <???> @ 0x8fa88\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 12:54:06 +0000\n; \nSTP             X29, X30, [SP,#var_90]!                                ; +0x0, 0x7c0d1c\nSUB             W5, W5, #2; switch 5 cases                             ; +0x4, 0x7c0d20\nMOV             X29, SP                                                ; +0x8, 0x7c0d24\nSTP             X19, X20, [SP,#0x90+var_80]                            ; +0xc, 0x7c0d28\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x7c0d2c\nCMP             W5, #4                                                 ; +0x14, 0x7c0d30\nSTP             X25, X26, [SP,#0x90+var_50]                            ; +0x18, 0x7c0d34\nMOV             X25, X0                                                ; +0x1c, 0x7c0d38\nMOV             X26, X1                                                ; +0x20, 0x7c0d3c\nLDR             X0, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x7c0d40\nMOV             X20, X2                                                ; +0x28, 0x7c0d44\nSTP             X23, X24, [SP,#0x90+var_60]                            ; +0x2c, 0x7c0d48\nSTP             X21, X22, [SP,#0x90+var_70]                            ; +0x30, 0x7c0d4c\nSTR             D8, [SP,#0x90+var_40]                                  ; +0x34, 0x7c0d50\nMOV             X21, X3                                                ; +0x38, 0x7c0d54\nLDR             X0, [X0]                                               ; +0x3c, 0x7c0d58\nMOV             X23, X4                                                ; +0x40, 0x7c0d5c\nSTR             X0, [X29,#0x90+var_8]                                  ; +0x44, 0x7c0d60\nMOV             X24, X6                                                ; +0x48, 0x7c0d64\nFMOV            S8, S0                                                 ; +0x4c, 0x7c0d68\nB.LS            loc_7C0EA4                                             ; +0x50, 0x7c0d6c\nADRL            X4, aGjButton01Png; jumptable 00000000007C0EB8 default case ; +0x54, 0x7c0d70\nFCMPE           S1, #0.0                                               ; +0x5c, 0x7c0d78\nSTR             Q1, [X29,#0x90+var_20]                                 ; +0x60, 0x7c0d7c\nB.LE            loc_7C0EE4                                             ; +0x64, 0x7c0d80\nLDR             X1, [X26]                                              ; +0x68, 0x7c0d84\nMOV             X0, X26                                                ; +0x6c, 0x7c0d88\nSTR             X4, [X29,#0x90+var_28]                                 ; +0x70, 0x7c0d8c\nADD             X22, X29, #0x90+var_10                                 ; +0x74, 0x7c0d90\nLDR             X1, [X1,#0x148]                                        ; +0x78, 0x7c0d94\nBLR             X1                                                     ; +0x7c, 0x7c0d98\nMOV             X1, X0; cocos2d::CCSize *                              ; +0x80, 0x7c0d9c\nMOV             X0, X22; this                                          ; +0x84, 0x7c0da0\nBL              _ZN7cocos2d6CCSizeC1ERKS0_; cocos2d::CCSize::CCSize(cocos2d::CCSize const&) ; +0x88, 0x7c0da4\nLDR             S0, flt_7C0F50; float                                  ; +0x8c, 0x7c0da8\nLDR             X4, [X29,#0x90+var_28]; bool                           ; +0x90, 0x7c0dac\nLDR             S3, [X29,#0x90+var_10]                                 ; +0x94, 0x7c0db0\nLDR             S2, [X29,#0x90+var_C]                                  ; +0x98, 0x7c0db4\nFDIV            S3, S0, S3                                             ; +0x9c, 0x7c0db8\nFMOV            S4, #1.0                                               ; +0xa0, 0x7c0dbc\nLDR             Q1, [X29,#0x90+var_20]                                 ; +0xa4, 0x7c0dc0\nFDIV            S2, S0, S2                                             ; +0xa8, 0x7c0dc4\nFCMPE           S3, S2                                                 ; +0xac, 0x7c0dc8\nB.LE            loc_7C0EBC                                             ; +0xb0, 0x7c0dcc\nFCMPE           S2, S4                                                 ; +0xb4, 0x7c0dd0\nCSET            W0, MI                                                 ; +0xb8, 0x7c0dd4\nCBZ             W0, loc_7C0EC8                                         ; +0xbc, 0x7c0dd8\nFCMPE           S3, S2                                                 ; +0xc0, 0x7c0ddc\nB.LE            loc_7C0F14                                             ; +0xc4, 0x7c0de0\nFMOV            S3, #8.0                                               ; +0xc8, 0x7c0de4\nMOV             X0, X26; this                                          ; +0xcc, 0x7c0de8\nMOV             W2, #0; int                                            ; +0xd0, 0x7c0dec\nMOV             W3, #1; int                                            ; +0xd4, 0x7c0df0\nFSUB            S3, S1, S3                                             ; +0xd8, 0x7c0df4\nMOV             W5, #0; char *                                         ; +0xdc, 0x7c0df8\nFMOV            S1, S2; float                                          ; +0xe0, 0x7c0dfc\nFMOV            S2, WZR; float                                         ; +0xe4, 0x7c0e00\nFCVTZS          W1, S3; cocos2d::CCSprite *                            ; +0xe8, 0x7c0e04\nBL              _ZN12ButtonSprite6createEPN7cocos2d8CCSpriteEiiffbPKcbf; ButtonSprite::create(cocos2d::CCSprite *,int,int,float,float,bool,char const*,bool,float) ; +0xec, 0x7c0e08\nMOV             X26, X0                                                ; +0xf0, 0x7c0e0c\nMOV             X3, X20                                                ; +0xf4, 0x7c0e10\nMOV             X1, #0                                                 ; +0xf8, 0x7c0e14\nMOV             X2, X25                                                ; +0xfc, 0x7c0e18\nMOV             X4, X21                                                ; +0x100, 0x7c0e1c\nMOV             X0, X26                                                ; +0x104, 0x7c0e20\nBL              _ZN21CCMenuItemSpriteExtra6createEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CCMenuItemSpriteExtra::create(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0x108, 0x7c0e24\nLDR             X1, [X0]                                               ; +0x10c, 0x7c0e28\nFMOV            S0, S8                                                 ; +0x110, 0x7c0e2c\nMOV             X20, X0                                                ; +0x114, 0x7c0e30\nLDR             X1, [X1,#0xA0]                                         ; +0x118, 0x7c0e34\nBLR             X1                                                     ; +0x11c, 0x7c0e38\nSTR             S8, [X20,#0x194]                                       ; +0x120, 0x7c0e3c\nCBZ             X23, loc_7C0E58                                        ; +0x124, 0x7c0e40\nLDR             X2, [X23]                                              ; +0x128, 0x7c0e44\nMOV             X0, X23                                                ; +0x12c, 0x7c0e48\nMOV             X1, X20                                                ; +0x130, 0x7c0e4c\nLDR             X2, [X2,#0x1C8]                                        ; +0x134, 0x7c0e50\nBLR             X2                                                     ; +0x138, 0x7c0e54\nMOV             X0, X22; this                                          ; +0x13c, 0x7c0e58\nMOV             X1, X24; cocos2d::CCPoint *                            ; +0x140, 0x7c0e5c\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x144, 0x7c0e60\nMOV             X0, X26                                                ; +0x148, 0x7c0e64\nMOV             X1, X22                                                ; +0x14c, 0x7c0e68\nBL              _ZN12ButtonSprite18updateSpriteOffsetEN7cocos2d7CCPointE; ButtonSprite::updateSpriteOffset(cocos2d::CCPoint) ; +0x150, 0x7c0e6c\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x154, 0x7c0e70\nLDR             X2, [X29,#0x90+var_8]                                  ; +0x158, 0x7c0e74\nMOV             X0, X20                                                ; +0x15c, 0x7c0e78\nLDR             X1, [X19]                                              ; +0x160, 0x7c0e7c\nCMP             X2, X1                                                 ; +0x164, 0x7c0e80\nB.NE            loc_7C0F4C                                             ; +0x168, 0x7c0e84\nLDP             X19, X20, [SP,#0x90+var_80]                            ; +0x16c, 0x7c0e88\nLDP             X21, X22, [SP,#0x90+var_70]                            ; +0x170, 0x7c0e8c\nLDP             X23, X24, [SP,#0x90+var_60]                            ; +0x174, 0x7c0e90\nLDP             X25, X26, [SP,#0x90+var_50]                            ; +0x178, 0x7c0e94\nLDR             D8, [SP,#0x90+var_40]                                  ; +0x17c, 0x7c0e98\nLDP             X29, X30, [SP+0x90+var_90],#0x90                       ; +0x180, 0x7c0e9c\nRET                                                                    ; +0x184, 0x7c0ea0\nADRL            X0, jpt_7C0EB8                                         ; +0x188, 0x7c0ea4\nLDRB            W0, [X0,W5,UXTW]                                       ; +0x190, 0x7c0eac\nADR             X1, loc_7C0EBC                                         ; +0x194, 0x7c0eb0\nADD             X0, X1, W0,SXTB#2                                      ; +0x198, 0x7c0eb4\nBR              X0; switch jump                                        ; +0x19c, 0x7c0eb8\nFCMPE           S3, S4                                                 ; +0x1a0, 0x7c0ebc\nCSET            W0, MI                                                 ; +0x1a4, 0x7c0ec0\nCBNZ            W0, loc_7C0DDC                                         ; +0x1a8, 0x7c0ec4\nFMOV            S2, #1.0                                               ; +0x1ac, 0x7c0ec8\nB               loc_7C0DE4                                             ; +0x1b0, 0x7c0ecc\nFCMPE           S1, #0.0; jumptable 00000000007C0EB8 case 2            ; +0x1b4, 0x7c0ed0\nADRP            X4, #aGjButton02Png@PAGE; \"GJ_button_02.png\"           ; +0x1b8, 0x7c0ed4\nSTR             Q1, [X29,#0x90+var_20]                                 ; +0x1bc, 0x7c0ed8\nADD             X4, X4, #aGjButton02Png@PAGEOFF; \"GJ_button_02.png\"    ; +0x1c0, 0x7c0edc\nB.GT            loc_7C0D84                                             ; +0x1c4, 0x7c0ee0\nLDR             S0, flt_7C0F50; float                                  ; +0x1c8, 0x7c0ee4\nMOV             W3, #(dword_0+1); int                                  ; +0x1cc, 0x7c0ee8\nFMOV            S2, WZR; float                                         ; +0x1d0, 0x7c0eec\nMOV             X0, X26; this                                          ; +0x1d4, 0x7c0ef0\nMOV             W1, #qword_20; cocos2d::CCSprite *                     ; +0x1d8, 0x7c0ef4\nMOV             W2, #0; int                                            ; +0x1dc, 0x7c0ef8\nFMOV            S1, #1.0; float                                        ; +0x1e0, 0x7c0efc\nMOV             W5, W3; char *                                         ; +0x1e4, 0x7c0f00\nADD             X22, X29, #0x90+var_10                                 ; +0x1e8, 0x7c0f04\nBL              _ZN12ButtonSprite6createEPN7cocos2d8CCSpriteEiiffbPKcbf; ButtonSprite::create(cocos2d::CCSprite *,int,int,float,float,bool,char const*,bool,float) ; +0x1ec, 0x7c0f08\nMOV             X26, X0                                                ; +0x1f0, 0x7c0f0c\nB               loc_7C0E10                                             ; +0x1f4, 0x7c0f10\nFMOV            S2, S3                                                 ; +0x1f8, 0x7c0f14\nB               loc_7C0DE4                                             ; +0x1fc, 0x7c0f18\nADRL            X4, aGjButton03Png; jumptable 00000000007C0EB8 case 3  ; +0x200, 0x7c0f1c\nB               loc_7C0D78                                             ; +0x208, 0x7c0f24\nADRL            X4, aGjButton04Png; jumptable 00000000007C0EB8 case 4  ; +0x20c, 0x7c0f28\nB               loc_7C0D78                                             ; +0x214, 0x7c0f30\nADRL            X4, aGjButton06Png; jumptable 00000000007C0EB8 case 6  ; +0x218, 0x7c0f34\nB               loc_7C0D78                                             ; +0x220, 0x7c0f3c\nADRL            X4, aGjButton05Png; jumptable 00000000007C0EB8 case 5  ; +0x224, 0x7c0f40\nB               loc_7C0D78                                             ; +0x22c, 0x7c0f48\nBL              .__stack_chk_fail                                      ; +0x230, 0x7c0f4c", "xrefs": ["EditorUI::getSpriteButton @ 0x7c0fd0", "EditorUI::setupDeleteMenu @ 0xbdea54", "EditorUI::setupDeleteMenu @ 0xbdeb6c", "EditorUI::setupDeleteMenu @ 0xbdee3c", "EditorUI::createDpadMoveMenu @ 0xbe0e00", "<???> @ 0x8fa88"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}