{"type": "func", "start": 4295158992, "end": 4295159334, "name": "EditorUI::getCreateMenuItemButton", "pseudocode": "// \n// EditorUI::getCreateMenuItemButton from 0x10002ecd0 to 0x10002ee26 (342 bytes)\n// \n// 4 xrefs:\n// > EditorUI::createCustomItems @ 0x10003187e\n// > EditorUI::createCustomItems @ 0x1000318d1\n// > EditorUI::createCustomItems @ 0x100031924\n// > EditorUI::createCustomItems @ 0x10003197b\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 *__fastcall 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  void (__cdecl *ptr)(cocos2d::CCObject *); // r13\n  unsigned int v9; // r9d\n  const char *v10; // r8\n  ButtonSprite *v11; // r15\n  char *v12; // r14\n  cocos2d::SEL_MenuHandler v13; // r8\n  cocos2d::CCPoint v14; // xmm0_8\n  char v16[8]; // [rsp+0h] [rbp-40h] BYREF\n  size_t adj; // [rsp+8h] [rbp-38h]\n  float v18; // [rsp+14h] [rbp-2Ch]\n  __int64 v19; // [rsp+50h] [rbp+10h]\n\n  v18 = a5;\n  adj = a3.adj;\n  ptr = a3.ptr;\n  v9 = a6 - 2;\n  if ( v9 > 4 )\n    v10 = \"GJ_button_01.png\";\n  else\n    v10 = off_1008B1FC0[v9];\n  v11 = ButtonSprite::create(a2, 32, 0, 32.0, 1.0, 1, v10, 1);\n  v12 = (char *)operator new(0x220u);\n  CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((CCMenuItemSpriteExtra *)v12);\n  *(_QWORD *)v12 = off_1008B1AB8;\n  *((_QWORD *)v12 + 40) = off_1008B1F20;\n  *(_OWORD *)(v12 + 504) = 0;\n  *((_QWORD *)v12 + 65) = 0;\n  *(_QWORD *)(v12 + 532) = 0;\n  v13.ptr = ptr;\n  v13.adj = adj;\n  if ( CCMenuItemSpriteExtra::init((CCMenuItemSpriteExtra *)v12, v11, nullptr, a1, v13) )\n  {\n    cocos2d::CCObject::autorelease((cocos2d::CCObject *)v12);\n  }\n  else\n  {\n    (*(void (__fastcall **)(char *))(*(_QWORD *)v12 + 16LL))(v12);\n    v12 = nullptr;\n  }\n  (*(void (__fastcall **)(char *, float))(*(_QWORD *)v12 + 160LL))(v12, v18);\n  *((float *)v12 + 101) = v18;\n  if ( a4 )\n    ((void (__fastcall *)(cocos2d::CCMenu *, char *))a4->addChild)(a4, v12);\n  *(double *)&v14 = sub_10028CC60(v16, v19);\n  ButtonSprite::updateSpriteOffset(v11, v14);\n  return (CreateMenuItem *)v12;\n}", "assembly": "; \n; EditorUI::getCreateMenuItemButton from 0x10002ecd0 to 0x10002ee26 (342 bytes)\n; \n; 4 xrefs:\n; > EditorUI::createCustomItems @ 0x10003187e\n; > EditorUI::createCustomItems @ 0x1000318d1\n; > EditorUI::createCustomItems @ 0x100031924\n; > EditorUI::createCustomItems @ 0x10003197b\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    rbp                                                            ; +0x0, 0x10002ecd0\nmov     rbp, rsp                                                       ; +0x1, 0x10002ecd1\npush    r15                                                            ; +0x4, 0x10002ecd4\npush    r14                                                            ; +0x6, 0x10002ecd6\npush    r13                                                            ; +0x8, 0x10002ecd8\npush    r12                                                            ; +0xa, 0x10002ecda\npush    rbx                                                            ; +0xc, 0x10002ecdc\nsub     rsp, 18h                                                       ; +0xd, 0x10002ecdd\nmovss   [rbp+var_2C], xmm0                                             ; +0x11, 0x10002ece1\nmov     rbx, r8                                                        ; +0x16, 0x10002ece6\nmov     [rbp+var_38], rcx                                              ; +0x19, 0x10002ece9\nmov     r13, rdx                                                       ; +0x1d, 0x10002eced\nmov     r12, rdi                                                       ; +0x20, 0x10002ecf0\nadd     r9d, 0FFFFFFFEh                                                ; +0x23, 0x10002ecf3\ncmp     r9d, 4                                                         ; +0x27, 0x10002ecf7\nja      short loc_10002ED0D                                            ; +0x2b, 0x10002ecfb\nmov     eax, r9d                                                       ; +0x2d, 0x10002ecfd\nlea     rcx, off_1008B1FC0; \"GJ_button_02.png\"                         ; +0x30, 0x10002ed00\nmov     r8, [rcx+rax*8]                                                ; +0x37, 0x10002ed07\njmp     short loc_10002ED14                                            ; +0x3b, 0x10002ed0b\nlea     r8, aGjButton01Png; \"GJ_button_01.png\"                         ; +0x3d, 0x10002ed0d\nmovss   xmm0, cs:dword_100815220                                       ; +0x44, 0x10002ed14\nmovss   xmm1, cs:alpha                                                 ; +0x4c, 0x10002ed1c\nmov     rdi, rsi                                                       ; +0x54, 0x10002ed24\nmov     esi, 20h ; ' '                                                 ; +0x57, 0x10002ed27\nxor     edx, edx                                                       ; +0x5c, 0x10002ed2c\nmov     ecx, 1                                                         ; +0x5e, 0x10002ed2e\nmov     r9d, 1                                                         ; +0x63, 0x10002ed33\ncall    ButtonSprite__create                                           ; +0x69, 0x10002ed39\nmov     r15, rax                                                       ; +0x6e, 0x10002ed3e\nmov     edi, 220h; __sz                                                ; +0x71, 0x10002ed41\ncall    __Znwm; operator new(ulong)                                    ; +0x76, 0x10002ed46\nmov     r14, rax                                                       ; +0x7b, 0x10002ed4b\nmov     rdi, rax                                                       ; +0x7e, 0x10002ed4e\ncall    CCMenuItemSpriteExtra__CCMenuItemSpriteExtra                   ; +0x81, 0x10002ed51\nlea     rax, _ZTV14CreateMenuItem; `vtable for'CreateMenuItem          ; +0x86, 0x10002ed56\nlea     rcx, [rax+10h]                                                 ; +0x8d, 0x10002ed5d\nmov     [r14], rcx                                                     ; +0x91, 0x10002ed61\nadd     rax, 478h                                                      ; +0x94, 0x10002ed64\nmov     [r14+140h], rax                                                ; +0x9a, 0x10002ed6a\nxorps   xmm0, xmm0                                                     ; +0xa1, 0x10002ed71\nmovups  xmmword ptr [r14+1F8h], xmm0                                   ; +0xa4, 0x10002ed74\nmov     qword ptr [r14+208h], 0                                        ; +0xac, 0x10002ed7c\nmov     qword ptr [r14+214h], 0                                        ; +0xb7, 0x10002ed87\nmov     rdi, r14                                                       ; +0xc2, 0x10002ed92\nmov     rsi, r15                                                       ; +0xc5, 0x10002ed95\nxor     edx, edx                                                       ; +0xc8, 0x10002ed98\nmov     rcx, r12                                                       ; +0xca, 0x10002ed9a\nmov     r8, r13                                                        ; +0xcd, 0x10002ed9d\nmov     r9, [rbp+var_38]                                               ; +0xd0, 0x10002eda0\ncall    CCMenuItemSpriteExtra__init                                    ; +0xd4, 0x10002eda4\ntest    al, al                                                         ; +0xd9, 0x10002eda9\njz      short loc_10002EDB7                                            ; +0xdb, 0x10002edab\nmov     rdi, r14                                                       ; +0xdd, 0x10002edad\ncall    cocos2d__CCObject__autorelease                                 ; +0xe0, 0x10002edb0\njmp     short loc_10002EDC3                                            ; +0xe5, 0x10002edb5\nmov     rax, [r14]                                                     ; +0xe7, 0x10002edb7\nmov     rdi, r14                                                       ; +0xea, 0x10002edba\ncall    qword ptr [rax+10h]                                            ; +0xed, 0x10002edbd\nxor     r14d, r14d                                                     ; +0xf0, 0x10002edc0\nmov     r12, [rbp+arg_0]                                               ; +0xf3, 0x10002edc3\nmov     rax, [r14]                                                     ; +0xf7, 0x10002edc7\nmov     rdi, r14                                                       ; +0xfa, 0x10002edca\nmovss   xmm0, [rbp+var_2C]                                             ; +0xfd, 0x10002edcd\ncall    qword ptr [rax+0A0h]                                           ; +0x102, 0x10002edd2\nmovss   xmm0, [rbp+var_2C]                                             ; +0x108, 0x10002edd8\nmovss   dword ptr [r14+194h], xmm0                                     ; +0x10d, 0x10002eddd\ntest    rbx, rbx                                                       ; +0x116, 0x10002ede6\njz      short loc_10002EDFA                                            ; +0x119, 0x10002ede9\nmov     rax, [rbx]                                                     ; +0x11b, 0x10002edeb\nmov     rdi, rbx                                                       ; +0x11e, 0x10002edee\nmov     rsi, r14                                                       ; +0x121, 0x10002edf1\ncall    qword ptr [rax+1B8h]                                           ; +0x124, 0x10002edf4\nlea     rbx, [rbp+var_40]                                              ; +0x12a, 0x10002edfa\nmov     rdi, rbx                                                       ; +0x12e, 0x10002edfe\nmov     rsi, r12                                                       ; +0x131, 0x10002ee01\ncall    sub_10028CC60                                                  ; +0x134, 0x10002ee04\nmov     rdi, r15                                                       ; +0x139, 0x10002ee09\nmov     rsi, rbx                                                       ; +0x13c, 0x10002ee0c\ncall    ButtonSprite__updateSpriteOffset                               ; +0x13f, 0x10002ee0f\nmov     rax, r14                                                       ; +0x144, 0x10002ee14\nadd     rsp, 18h                                                       ; +0x147, 0x10002ee17\npop     rbx                                                            ; +0x14b, 0x10002ee1b\npop     r12                                                            ; +0x14c, 0x10002ee1c\npop     r13                                                            ; +0x14e, 0x10002ee1e\npop     r14                                                            ; +0x150, 0x10002ee20\npop     r15                                                            ; +0x152, 0x10002ee22\npop     rbp                                                            ; +0x154, 0x10002ee24\nretn                                                                   ; +0x155, 0x10002ee25", "xrefs": ["EditorUI::createCustomItems @ 0x10003187e", "EditorUI::createCustomItems @ 0x1000318d1", "EditorUI::createCustomItems @ 0x100031924", "EditorUI::createCustomItems @ 0x10003197b"], "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"}