{"type": "func", "start": 4297550880, "end": 4297551181, "name": "CCMenuItemSpriteExtra::init", "pseudocode": "// \n// CCMenuItemSpriteExtra::init from 0x100276c20 to 0x100276d4d (301 bytes)\n// \n// 8 xrefs:\n// > EditorUI::getCreateMenuItemButton @ 0x10002eda4\n// > CreateMenuItem::create @ 0x10002eec1\n// > EditorUI::menuItemFromObjectString @ 0x100031bb1\n// > EditorUI::getCreateBtn @ 0x100033ad7\n// > CreateMenuItem::init @ 0x100051905\n// > CCMenuItemSpriteExtra::create @ 0x100276bd6\n// > InfoAlertButton::create @ 0x100575c44\n// > InfoAlertButton::init @ 0x100575d7d\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\nbool __fastcall CCMenuItemSpriteExtra::init(\n        CCMenuItemSpriteExtra *a1,\n        cocos2d::CCNode *a2,\n        cocos2d::CCNode *a3,\n        cocos2d::CCObject *a4,\n        cocos2d::SEL_MenuHandler a5)\n{\n  bool result; // al\n  bool v6; // r12\n  float v7; // xmm0_4\n  float v8; // xmm0_4\n  const cocos2d::CCPoint *v9; // rax\n  cocos2d::SEL_MenuHandler v10; // [rsp+18h] [rbp-38h] BYREF\n  float v11; // [rsp+28h] [rbp-28h]\n  float v12; // [rsp+2Ch] [rbp-24h]\n  double v13; // 0:xmm0_8.8\n\n  v10 = a5;\n  result = cocos2d::CCMenuItemSprite::initWithNormalSprite(a1, a2, a3, nullptr, a4, a5);\n  if ( result )\n  {\n    a1->m_baseScale = 1.0;\n    v6 = result;\n    sub_10028CBE0(&v10, 0.5, 0.5);\n    ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::SEL_MenuHandler *))a2->setAnchorPoint)(a2, &v10);\n    v12 = *(float *)((__int64 (__fastcall *)(cocos2d::CCNode *))a2->getContentSize)(a2);\n    v7 = ((float (__fastcall *)(cocos2d::CCNode *))a2->getScaleX)(a2);\n    v12 = v7 * v12;\n    v11 = *(float *)(((__int64 (__fastcall *)(cocos2d::CCNode *))a2->getContentSize)(a2) + 4);\n    v8 = ((float (__fastcall *)(cocos2d::CCNode *))a2->getScaleY)(a2);\n    sub_10028CBF0(&v10, v12, v11 * v8);\n    ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::SEL_MenuHandler *))a1->setContentSize)(a1, &v10);\n    v9 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(cocos2d::CCNode *))a2->getParent)(a2);\n    *(cocos2d::CCPoint *)&v13 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v10, v9);\n    ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::SEL_MenuHandler *, double))a2->setPosition)(a2, &v10, v13);\n    a1->m_animationEnabled = 1;\n    a1->m_scaleMultiplier = 1.26;\n    return v6;\n  }\n  return result;\n}", "assembly": "; \n; CCMenuItemSpriteExtra::init from 0x100276c20 to 0x100276d4d (301 bytes)\n; \n; 8 xrefs:\n; > EditorUI::getCreateMenuItemButton @ 0x10002eda4\n; > CreateMenuItem::create @ 0x10002eec1\n; > EditorUI::menuItemFromObjectString @ 0x100031bb1\n; > EditorUI::getCreateBtn @ 0x100033ad7\n; > CreateMenuItem::init @ 0x100051905\n; > CCMenuItemSpriteExtra::create @ 0x100276bd6\n; > InfoAlertButton::create @ 0x100575c44\n; > InfoAlertButton::init @ 0x100575d7d\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, 0x100276c20\nmov     rbp, rsp                                                       ; +0x1, 0x100276c21\npush    r15                                                            ; +0x4, 0x100276c24\npush    r14                                                            ; +0x6, 0x100276c26\npush    r12                                                            ; +0x8, 0x100276c28\npush    rbx                                                            ; +0xa, 0x100276c2a\nsub     rsp, 30h                                                       ; +0xb, 0x100276c2b\nmov     rax, rcx                                                       ; +0xf, 0x100276c2f\nmov     r14, rsi                                                       ; +0x12, 0x100276c32\nmov     rbx, rdi                                                       ; +0x15, 0x100276c35\nmov     qword ptr [rbp+var_38], r8                                     ; +0x18, 0x100276c38\nmov     qword ptr [rbp+var_38+8], r9                                   ; +0x1c, 0x100276c3c\nmovups  xmm0, [rbp+var_38]                                             ; +0x20, 0x100276c40\nmovups  [rsp+50h+var_50], xmm0                                         ; +0x24, 0x100276c44\nxor     ecx, ecx                                                       ; +0x28, 0x100276c48\nmov     r8, rax                                                        ; +0x2a, 0x100276c4a\ncall    cocos2d__CCMenuItemSprite__initWithNormalSprite                ; +0x2d, 0x100276c4d\ntest    al, al                                                         ; +0x32, 0x100276c52\njz      loc_100276D40                                                  ; +0x34, 0x100276c54\nmov     dword ptr [rbx+194h], 3F800000h                                ; +0x3a, 0x100276c5a\nlea     r15, [rbp+var_38]                                              ; +0x44, 0x100276c64\nmovss   xmm0, cs:dword_100814FA8                                       ; +0x48, 0x100276c68\nmov     rdi, r15                                                       ; +0x50, 0x100276c70\nmovaps  xmm1, xmm0                                                     ; +0x53, 0x100276c73\nmov     r12d, eax                                                      ; +0x56, 0x100276c76\ncall    sub_10028CBE0                                                  ; +0x59, 0x100276c79\nmov     rax, [r14]                                                     ; +0x5e, 0x100276c7e\nmov     rdi, r14                                                       ; +0x61, 0x100276c81\nmov     rsi, r15                                                       ; +0x64, 0x100276c84\ncall    qword ptr [rax+118h]                                           ; +0x67, 0x100276c87\nmov     rax, [r14]                                                     ; +0x6d, 0x100276c8d\nmov     rdi, r14                                                       ; +0x70, 0x100276c90\ncall    qword ptr [rax+138h]                                           ; +0x73, 0x100276c93\nmovss   xmm0, dword ptr [rax]                                          ; +0x79, 0x100276c99\nmovss   [rbp+var_24], xmm0                                             ; +0x7d, 0x100276c9d\nmov     rax, [r14]                                                     ; +0x82, 0x100276ca2\nmov     rdi, r14                                                       ; +0x85, 0x100276ca5\ncall    qword ptr [rax+88h]                                            ; +0x88, 0x100276ca8\nmulss   xmm0, [rbp+var_24]                                             ; +0x8e, 0x100276cae\nmovss   [rbp+var_24], xmm0                                             ; +0x93, 0x100276cb3\nmov     rax, [r14]                                                     ; +0x98, 0x100276cb8\nmov     rdi, r14                                                       ; +0x9b, 0x100276cbb\ncall    qword ptr [rax+138h]                                           ; +0x9e, 0x100276cbe\nmovss   xmm0, dword ptr [rax+4]                                        ; +0xa4, 0x100276cc4\nmovss   [rbp+var_28], xmm0                                             ; +0xa9, 0x100276cc9\nmov     rax, [r14]                                                     ; +0xae, 0x100276cce\nmov     rdi, r14                                                       ; +0xb1, 0x100276cd1\ncall    qword ptr [rax+98h]                                            ; +0xb4, 0x100276cd4\nmovss   xmm1, [rbp+var_28]                                             ; +0xba, 0x100276cda\nmulss   xmm1, xmm0                                                     ; +0xbf, 0x100276cdf\nmov     rdi, r15                                                       ; +0xc3, 0x100276ce3\nmovss   xmm0, [rbp+var_24]                                             ; +0xc6, 0x100276ce6\ncall    sub_10028CBF0                                                  ; +0xcb, 0x100276ceb\nmov     rax, [rbx]                                                     ; +0xd0, 0x100276cf0\nmov     rdi, rbx                                                       ; +0xd3, 0x100276cf3\nmov     rsi, r15                                                       ; +0xd6, 0x100276cf6\ncall    qword ptr [rax+130h]                                           ; +0xd9, 0x100276cf9\nmov     rax, [r14]                                                     ; +0xdf, 0x100276cff\nmov     rdi, r14                                                       ; +0xe2, 0x100276d02\ncall    qword ptr [rax+1F0h]                                           ; +0xe5, 0x100276d05\nlea     rdx, unk_10099F6B8                                             ; +0xeb, 0x100276d0b\nmov     rdi, r15                                                       ; +0xf2, 0x100276d12\nmov     rsi, rax                                                       ; +0xf5, 0x100276d15\ncall    cocos2d__CCNode__convertToNodeSpace                            ; +0xf8, 0x100276d18\nmov     rax, [r14]                                                     ; +0xfd, 0x100276d1d\nmov     rdi, r14                                                       ; +0x100, 0x100276d20\nmov     rsi, r15                                                       ; +0x103, 0x100276d23\ncall    qword ptr [rax+0B8h]                                           ; +0x106, 0x100276d26\nmov     eax, r12d                                                      ; +0x10c, 0x100276d2c\nmov     byte ptr [rbx+198h], 1                                         ; +0x10f, 0x100276d2f\nmov     dword ptr [rbx+190h], 3FA147AEh                                ; +0x116, 0x100276d36\nadd     rsp, 30h                                                       ; +0x120, 0x100276d40\npop     rbx                                                            ; +0x124, 0x100276d44\npop     r12                                                            ; +0x125, 0x100276d45\npop     r14                                                            ; +0x127, 0x100276d47\npop     r15                                                            ; +0x129, 0x100276d49\npop     rbp                                                            ; +0x12b, 0x100276d4b\nretn                                                                   ; +0x12c, 0x100276d4c", "xrefs": ["EditorUI::getCreateMenuItemButton @ 0x10002eda4", "CreateMenuItem::create @ 0x10002eec1", "EditorUI::menuItemFromObjectString @ 0x100031bb1", "EditorUI::getCreateBtn @ 0x100033ad7", "CreateMenuItem::init @ 0x100051905", "CCMenuItemSpriteExtra::create @ 0x100276bd6", "InfoAlertButton::create @ 0x100575c44", "InfoAlertButton::init @ 0x100575d7d"], "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"}