{"type": "func", "start": 5370469824, "end": 5370470398, "name": "EditorUI::getSpriteButton", "pseudocode": "// \n// EditorUI::getSpriteButton from 0x1401addc0 to 0x1401adffe (574 bytes)\n// \n// 26 xrefs:\n// > EditorUI::init @ 0x1401aa616\n// > EditorUI::getSpriteButton_1 @ 0x1401adda6\n// > EditorUI::createMoveMenu @ 0x1401f2476\n// > EditorUI::createMoveMenu @ 0x1401f24f7\n// > EditorUI::createMoveMenu @ 0x1401f2578\n// > EditorUI::createMoveMenu @ 0x1401f25f9\n// > EditorUI::createMoveMenu @ 0x1401f267a\n// > EditorUI::createMoveMenu @ 0x1401f27b3\n// > EditorUI::createMoveMenu @ 0x1401f28e4\n// > EditorUI::createMoveMenu @ 0x1401f2a14\n// > EditorUI::createMoveMenu @ 0x1401f2b44\n// > EditorUI::createMoveMenu @ 0x1401f2c74\n// > EditorUI::createMoveMenu @ 0x1401f2d60\n// > EditorUI::createDpadMoveMenu @ 0x1401f3c29\n// > EditorUI::setupDeleteMenu @ 0x1401f43fc\n// > EditorUI::setupDeleteMenu @ 0x1401f45a8\n// > EditorUI::setupDeleteMenu @ 0x1401f46d0\n// > EditorUI::setupDeleteMenu @ 0x1401f47c7\n// > EditorUI::setupDeleteMenu @ 0x1401f4881\n// > EditorUI::setupDeleteMenu @ 0x1401f4919\n// > EditorUI::setupDeleteMenu @ 0x1401f4a2c\n// > EditorUI::setupDeleteMenu @ 0x1401f4fb6\n// > EditorUI::setupDeleteMenu @ 0x1401f5069\n// > EditorUI::createViewButton @ 0x1401f8010\n// > <???> @ 0x140919d78\n// > <???> @ 0x140919d84\n// \n// This function is hookable on this platform (idp: pc, 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 11:27:54 +0000\n// \n\n// Hidden C++ exception states: #wind=1\ncocos2d::CCObject *__fastcall EditorUI::getSpriteButton(\n        int a1,\n        __int64 a2,\n        __int64 a3,\n        __int64 a4,\n        int a5,\n        int a6,\n        const struct cocos2d::CCPoint *a7,\n        float a8)\n{\n  const char *v12; // rdi\n  float v13; // xmm6_4\n  const struct cocos2d::CCSize *v14; // rax\n  __int64 v15; // r8\n  float v16; // xmm1_4\n  int v17; // xmm0_4\n  cocos2d::CCObject *v18; // rbx\n  __int64 *v19; // rax\n  __int64 v20; // r9\n  cocos2d::CCObject *v21; // rdi\n  int v22; // xmm6_4\n  __int64 v23; // rax\n  __int64 v25; // [rsp+30h] [rbp-68h]\n  _BYTE v26[16]; // [rsp+50h] [rbp-48h] BYREF\n  void *v27; // [rsp+B8h] [rbp+20h] BYREF\n\n  switch ( a6 )\n  {\n    case 2:\n      v12 = \"GJ_button_02.png\";\n      break;\n    case 3:\n      v12 = \"GJ_button_03.png\";\n      break;\n    case 4:\n      v12 = \"GJ_button_04.png\";\n      break;\n    case 5:\n      v12 = \"GJ_button_05.png\";\n      break;\n    case 6:\n      v12 = \"GJ_button_06.png\";\n      break;\n    default:\n      v12 = \"GJ_button_01.png\";\n      break;\n  }\n  v13 = a8;\n  if ( a8 <= 0.0 )\n  {\n    v27 = operator new(0x2C8u);\n    v19 = (__int64 *)ButtonSprite::ButtonSprite((__int64)v27);\n    v18 = (cocos2d::CCObject *)v19;\n    if ( v19 )\n    {\n      if ( ButtonSprite::init(v19, a2, 32, v20, 32.0, 1065353216, v25, v12, 1, 0) )\n      {\n        cocos2d::CCObject::autorelease(v18);\n      }\n      else\n      {\n        (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v18 + 8LL))(v18, 1);\n        v18 = nullptr;\n      }\n    }\n  }\n  else\n  {\n    v14 = (const struct cocos2d::CCSize *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 320LL))(a2);\n    cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v27, v14);\n    v16 = fminf(32.0 / *(float *)&v27, 32.0 / *((float *)&v27 + 1));\n    v17 = 1065353216;\n    if ( v16 <= 1.0 )\n      v17 = LODWORD(v16);\n    v18 = ButtonSprite::create(a2, (int)(float)(v13 - 8.0), v15, 32.0, v17);\n  }\n  v21 = CCMenuItemSpriteExtra::create((int)v18, 0, a1, a3);\n  v22 = a5;\n  (*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v21 + 160LL))(v21);\n  *((_DWORD *)v21 + 101) = v22;\n  if ( a4 )\n    (*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)a4 + 464LL))(a4, v21);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v26, a7);\n  cocos2d::CCPoint::operator=((char *)v18 + 672, v23);\n  ButtonSprite::updateSpriteBGSize((__int64 *)v18);\n  return v21;\n}", "assembly": "; \n; EditorUI::getSpriteButton from 0x1401addc0 to 0x1401adffe (574 bytes)\n; \n; 26 xrefs:\n; > EditorUI::init @ 0x1401aa616\n; > EditorUI::getSpriteButton_1 @ 0x1401adda6\n; > EditorUI::createMoveMenu @ 0x1401f2476\n; > EditorUI::createMoveMenu @ 0x1401f24f7\n; > EditorUI::createMoveMenu @ 0x1401f2578\n; > EditorUI::createMoveMenu @ 0x1401f25f9\n; > EditorUI::createMoveMenu @ 0x1401f267a\n; > EditorUI::createMoveMenu @ 0x1401f27b3\n; > EditorUI::createMoveMenu @ 0x1401f28e4\n; > EditorUI::createMoveMenu @ 0x1401f2a14\n; > EditorUI::createMoveMenu @ 0x1401f2b44\n; > EditorUI::createMoveMenu @ 0x1401f2c74\n; > EditorUI::createMoveMenu @ 0x1401f2d60\n; > EditorUI::createDpadMoveMenu @ 0x1401f3c29\n; > EditorUI::setupDeleteMenu @ 0x1401f43fc\n; > EditorUI::setupDeleteMenu @ 0x1401f45a8\n; > EditorUI::setupDeleteMenu @ 0x1401f46d0\n; > EditorUI::setupDeleteMenu @ 0x1401f47c7\n; > EditorUI::setupDeleteMenu @ 0x1401f4881\n; > EditorUI::setupDeleteMenu @ 0x1401f4919\n; > EditorUI::setupDeleteMenu @ 0x1401f4a2c\n; > EditorUI::setupDeleteMenu @ 0x1401f4fb6\n; > EditorUI::setupDeleteMenu @ 0x1401f5069\n; > EditorUI::createViewButton @ 0x1401f8010\n; > <???> @ 0x140919d78\n; > <???> @ 0x140919d84\n; \n; This function is hookable on this platform (idp: pc, 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 11:27:54 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1401addc0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1401addc5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1401addca\npush    rdi                                                            ; +0xf, 0x1401addcf\npush    r14                                                            ; +0x10, 0x1401addd0\npush    r15                                                            ; +0x12, 0x1401addd2\nsub     rsp, 80h                                                       ; +0x14, 0x1401addd4\nmovaps  [rsp+98h+var_28], xmm6                                         ; +0x1b, 0x1401adddb\nmovaps  [rsp+98h+var_38], xmm7                                         ; +0x20, 0x1401adde0\nmov     rsi, r9                                                        ; +0x25, 0x1401adde5\nmov     rbp, r8                                                        ; +0x28, 0x1401adde8\nmov     r14, rdx                                                       ; +0x2b, 0x1401addeb\nmov     r15, rcx                                                       ; +0x2e, 0x1401addee\nmov     r10d, [rsp+98h+arg_28]                                         ; +0x31, 0x1401addf1\nsub     r10d, 2                                                        ; +0x39, 0x1401addf9\njz      short loc_1401ADE44                                            ; +0x3d, 0x1401addfd\nsub     r10d, 1                                                        ; +0x3f, 0x1401addff\njz      short loc_1401ADE3B                                            ; +0x43, 0x1401ade03\nsub     r10d, 1                                                        ; +0x45, 0x1401ade05\njz      short loc_1401ADE32                                            ; +0x49, 0x1401ade09\nsub     r10d, 1                                                        ; +0x4b, 0x1401ade0b\njz      short loc_1401ADE29                                            ; +0x4f, 0x1401ade0f\ncmp     r10d, 1                                                        ; +0x51, 0x1401ade11\njz      short loc_1401ADE20                                            ; +0x55, 0x1401ade15\nlea     rdi, aGjButton01Png; \"GJ_button_01.png\"                        ; +0x57, 0x1401ade17\njmp     short loc_1401ADE4B                                            ; +0x5e, 0x1401ade1e\nlea     rdi, aGjButton06Png; \"GJ_button_06.png\"                        ; +0x60, 0x1401ade20\njmp     short loc_1401ADE4B                                            ; +0x67, 0x1401ade27\nlea     rdi, aGjButton05Png; \"GJ_button_05.png\"                        ; +0x69, 0x1401ade29\njmp     short loc_1401ADE4B                                            ; +0x70, 0x1401ade30\nlea     rdi, aGjButton04Png; \"GJ_button_04.png\"                        ; +0x72, 0x1401ade32\njmp     short loc_1401ADE4B                                            ; +0x79, 0x1401ade39\nlea     rdi, aGjButton03Png; \"GJ_button_03.png\"                        ; +0x7b, 0x1401ade3b\njmp     short loc_1401ADE4B                                            ; +0x82, 0x1401ade42\nlea     rdi, aGjButton02Png; \"GJ_button_02.png\"                        ; +0x84, 0x1401ade44\nxorps   xmm7, xmm7                                                     ; +0x8b, 0x1401ade4b\nmovss   xmm6, [rsp+98h+arg_38]                                         ; +0x8e, 0x1401ade4e\ncomiss  xmm6, xmm7                                                     ; +0x97, 0x1401ade57\njbe     loc_1401ADEE0                                                  ; +0x9a, 0x1401ade5a\nmov     rax, [rdx]                                                     ; +0xa0, 0x1401ade60\nmov     rcx, r14                                                       ; +0xa3, 0x1401ade63\ncall    qword ptr [rax+140h]                                           ; +0xa6, 0x1401ade66\nmov     rdx, rax                                                       ; +0xac, 0x1401ade6c\nlea     rcx, [rsp+98h+arg_18]                                          ; +0xaf, 0x1401ade6f\ncall    cs:??0CCSize@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCSize::CCSize(cocos2d::CCSize const &) ; +0xb7, 0x1401ade77\nmovss   xmm3, cs:dword_140835640                                       ; +0xbd, 0x1401ade7d\nmovaps  xmm1, xmm3                                                     ; +0xc5, 0x1401ade85\ndivss   xmm1, dword ptr [rsp+98h+arg_18]                               ; +0xc8, 0x1401ade88\nmovaps  xmm0, xmm3                                                     ; +0xd1, 0x1401ade91\ndivss   xmm0, dword ptr [rsp+98h+arg_18+4]                             ; +0xd4, 0x1401ade94\nminss   xmm1, xmm0                                                     ; +0xdd, 0x1401ade9d\nmovss   xmm0, cs:flt_140835080                                         ; +0xe1, 0x1401adea1\ncomiss  xmm1, xmm0                                                     ; +0xe9, 0x1401adea9\nja      short loc_1401ADEB1                                            ; +0xec, 0x1401adeac\nmovaps  xmm0, xmm1                                                     ; +0xee, 0x1401adeae\nsubss   xmm6, cs:dword_1408354D4                                       ; +0xf1, 0x1401adeb1\ncvttss2si edx, xmm6                                                    ; +0xf9, 0x1401adeb9\nmovss   [rsp+98h+var_58], xmm7                                         ; +0xfd, 0x1401adebd\nmov     byte ptr [rsp+98h+var_60], 0                                   ; +0x103, 0x1401adec3\nmov     [rsp+98h+var_68], rdi                                          ; +0x108, 0x1401adec8\nmovss   [rsp+98h+var_78], xmm0                                         ; +0x10d, 0x1401adecd\nmov     rcx, r14                                                       ; +0x113, 0x1401aded3\ncall    ButtonSprite__create                                           ; +0x116, 0x1401aded6\nmov     rbx, rax                                                       ; +0x11b, 0x1401adedb\njmp     short loc_1401ADF5B                                            ; +0x11e, 0x1401adede\nmov     ecx, 2C8h; Size                                                ; +0x120, 0x1401adee0\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x125, 0x1401adee5\nmov     [rsp+98h+arg_18], rax                                          ; +0x12a, 0x1401adeea\nmov     rcx, rax                                                       ; +0x132, 0x1401adef2\ncall    ButtonSprite__ButtonSprite                                     ; +0x135, 0x1401adef5\nmov     rbx, rax                                                       ; +0x13a, 0x1401adefa\ntest    rax, rax                                                       ; +0x13d, 0x1401adefd\njz      short loc_1401ADF5B                                            ; +0x140, 0x1401adf00\nmovss   [rsp+98h+var_50], xmm7                                         ; +0x142, 0x1401adf02\nmov     byte ptr [rsp+98h+var_58], 1                                   ; +0x148, 0x1401adf08\nmov     [rsp+98h+var_60], rdi                                          ; +0x14d, 0x1401adf0d\nmovss   xmm0, cs:flt_140835080                                         ; +0x152, 0x1401adf12\nmovss   [rsp+98h+var_70], xmm0                                         ; +0x15a, 0x1401adf1a\nmovss   xmm1, cs:dword_140835640                                       ; +0x160, 0x1401adf20\nmovss   [rsp+98h+var_78], xmm1                                         ; +0x168, 0x1401adf28\nmov     r8d, 20h ; ' '                                                 ; +0x16e, 0x1401adf2e\nmov     rdx, r14                                                       ; +0x174, 0x1401adf34\nmov     rcx, rax                                                       ; +0x177, 0x1401adf37\ncall    ButtonSprite__init                                             ; +0x17a, 0x1401adf3a\nmov     rcx, rbx                                                       ; +0x17f, 0x1401adf3f\ntest    al, al                                                         ; +0x182, 0x1401adf42\njz      short loc_1401ADF4E                                            ; +0x184, 0x1401adf44\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x186, 0x1401adf46\njmp     short loc_1401ADF5B                                            ; +0x18c, 0x1401adf4c\nmov     rax, [rbx]                                                     ; +0x18e, 0x1401adf4e\nmov     edx, 1                                                         ; +0x191, 0x1401adf51\ncall    qword ptr [rax+8]                                              ; +0x196, 0x1401adf56\nxor     ebx, ebx                                                       ; +0x199, 0x1401adf59\nmov     r9, rbp                                                        ; +0x19b, 0x1401adf5b\nmov     r8, r15                                                        ; +0x19e, 0x1401adf5e\nxor     edx, edx                                                       ; +0x1a1, 0x1401adf61\nmov     rcx, rbx                                                       ; +0x1a3, 0x1401adf63\ncall    CCMenuItemSpriteExtra__create                                  ; +0x1a6, 0x1401adf66\nmov     rdi, rax                                                       ; +0x1ab, 0x1401adf6b\nmov     rcx, [rax]                                                     ; +0x1ae, 0x1401adf6e\nmov     rdx, [rcx+0A0h]                                                ; +0x1b1, 0x1401adf71\nmovss   xmm6, [rsp+98h+arg_20]                                         ; +0x1b8, 0x1401adf78\nmovaps  xmm1, xmm6                                                     ; +0x1c1, 0x1401adf81\nmov     rcx, rax                                                       ; +0x1c4, 0x1401adf84\ncall    rdx                                                            ; +0x1c7, 0x1401adf87\nmovss   dword ptr [rdi+194h], xmm6                                     ; +0x1c9, 0x1401adf89\ntest    rsi, rsi                                                       ; +0x1d1, 0x1401adf91\njz      short loc_1401ADFA9                                            ; +0x1d4, 0x1401adf94\nmov     rcx, [rsi]                                                     ; +0x1d6, 0x1401adf96\nmov     r8, [rcx+1D0h]                                                 ; +0x1d9, 0x1401adf99\nmov     rdx, rdi                                                       ; +0x1e0, 0x1401adfa0\nmov     rcx, rsi                                                       ; +0x1e3, 0x1401adfa3\ncall    r8                                                             ; +0x1e6, 0x1401adfa6\nmov     rdx, [rsp+98h+arg_30]                                          ; +0x1e9, 0x1401adfa9\nlea     rcx, [rsp+98h+var_48]                                          ; +0x1f1, 0x1401adfb1\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x1f6, 0x1401adfb6\nlea     rcx, [rbx+2A0h]                                                ; +0x1fc, 0x1401adfbc\nmov     rdx, rax                                                       ; +0x203, 0x1401adfc3\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x206, 0x1401adfc6\nmov     rcx, rbx                                                       ; +0x20c, 0x1401adfcc\ncall    ButtonSprite__updateSpriteBGSize                               ; +0x20f, 0x1401adfcf\nmov     rax, rdi                                                       ; +0x214, 0x1401adfd4\nlea     r11, [rsp+98h+var_18]                                          ; +0x217, 0x1401adfd7\nmov     rbx, [r11+20h]                                                 ; +0x21f, 0x1401adfdf\nmov     rbp, [r11+28h]                                                 ; +0x223, 0x1401adfe3\nmov     rsi, [r11+30h]                                                 ; +0x227, 0x1401adfe7\nmovaps  xmm6, [rsp+98h+var_28]                                         ; +0x22b, 0x1401adfeb\nmovaps  xmm7, [rsp+98h+var_38]                                         ; +0x230, 0x1401adff0\nmov     rsp, r11                                                       ; +0x235, 0x1401adff5\npop     r15                                                            ; +0x238, 0x1401adff8\npop     r14                                                            ; +0x23a, 0x1401adffa\npop     rdi                                                            ; +0x23c, 0x1401adffc\nretn                                                                   ; +0x23d, 0x1401adffd", "xrefs": ["EditorUI::init @ 0x1401aa616", "EditorUI::getSpriteButton_1 @ 0x1401adda6", "EditorUI::createMoveMenu @ 0x1401f2476", "EditorUI::createMoveMenu @ 0x1401f24f7", "EditorUI::createMoveMenu @ 0x1401f2578", "EditorUI::createMoveMenu @ 0x1401f25f9", "EditorUI::createMoveMenu @ 0x1401f267a", "EditorUI::createMoveMenu @ 0x1401f27b3", "EditorUI::createMoveMenu @ 0x1401f28e4", "EditorUI::createMoveMenu @ 0x1401f2a14", "EditorUI::createMoveMenu @ 0x1401f2b44", "EditorUI::createMoveMenu @ 0x1401f2c74", "EditorUI::createMoveMenu @ 0x1401f2d60", "EditorUI::createDpadMoveMenu @ 0x1401f3c29", "EditorUI::setupDeleteMenu @ 0x1401f43fc", "EditorUI::setupDeleteMenu @ 0x1401f45a8", "EditorUI::setupDeleteMenu @ 0x1401f46d0", "EditorUI::setupDeleteMenu @ 0x1401f47c7", "EditorUI::setupDeleteMenu @ 0x1401f4881", "EditorUI::setupDeleteMenu @ 0x1401f4919", "EditorUI::setupDeleteMenu @ 0x1401f4a2c", "EditorUI::setupDeleteMenu @ 0x1401f4fb6", "EditorUI::setupDeleteMenu @ 0x1401f5069", "EditorUI::createViewButton @ 0x1401f8010", "<???> @ 0x140919d78", "<???> @ 0x140919d84"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}