{"type": "func", "start": 6442819504, "end": 6442820056, "name": "cocos2d::CCMenu::alignItemsHorizontallyWithPadding", "pseudocode": "// \n// cocos2d::CCMenu::alignItemsHorizontallyWithPadding from 0x180059fb0 to 0x18005a1d8 (552 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCMenu::alignItemsHorizontally @ 0x180059fa8\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bccb8\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:21:48 +0000\n// \n\nvoid __fastcall cocos2d::CCMenu::alignItemsHorizontallyWithPadding(cocos2d::CCMenu *this, float a2)\n{\n  cocos2d::CCArray *v3; // rcx\n  float v4; // xmm7_4\n  __int64 v5; // rax\n  unsigned int *v6; // rbx\n  __int64 v7; // rax\n  _QWORD *v8; // rbx\n  _QWORD *i; // rsi\n  __int64 v10; // rax\n  __int64 v11; // rdi\n  float v12; // xmm6_4\n  cocos2d::CCArray *v13; // rcx\n  float v14; // xmm7_4\n  __int64 v15; // rax\n  unsigned int *v16; // rdi\n  __int64 v17; // rax\n  _QWORD *v18; // rdi\n  _QWORD *j; // rbp\n  __int64 v20; // rax\n  __int64 v21; // rsi\n  float *v22; // rax\n  __int64 v23; // rbx\n  float v24; // xmm6_4\n  double v25; // xmm0_8\n  float *v26; // rax\n  float v27; // xmm6_4\n  float v28; // [rsp+90h] [rbp+8h] BYREF\n\n  v3 = *((cocos2d::CCArray **)this + 26);\n  v4 = -a2;\n  if ( v3 )\n  {\n    if ( (unsigned int)cocos2d::CCArray::count(v3) )\n    {\n      v5 = *((_QWORD *)this + 26);\n      if ( v5 )\n      {\n        v6 = *(unsigned int **)(v5 + 56);\n        v7 = *v6;\n        if ( (_DWORD)v7 )\n        {\n          v8 = *((_QWORD **)v6 + 2);\n          for ( i = &v8[v7 - 1]; v8 <= i; ++v8 )\n          {\n            if ( !*v8 )\n              break;\n            v10 = _RTDynamicCast(\n                    *v8,\n                    0,\n                    &cocos2d::CCObject `RTTI Type Descriptor',\n                    &cocos2d::CCNode `RTTI Type Descriptor',\n                    0);\n            v11 = v10;\n            if ( v10 )\n            {\n              v12 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 320LL))(v10);\n              v4 = v4 + (float)((float)((*(float (__fastcall **)(__int64))(*(_QWORD *)v11 + 128LL))(v11) * v12) + a2);\n            }\n          }\n        }\n      }\n    }\n  }\n  v13 = *((cocos2d::CCArray **)this + 26);\n  v14 = (float)-v4 * 0.5;\n  if ( v13 )\n  {\n    if ( (unsigned int)cocos2d::CCArray::count(v13) )\n    {\n      v15 = *((_QWORD *)this + 26);\n      if ( v15 )\n      {\n        v16 = *(unsigned int **)(v15 + 56);\n        v17 = *v16;\n        if ( (_DWORD)v17 )\n        {\n          v18 = *((_QWORD **)v16 + 2);\n          for ( j = &v18[v17 - 1]; v18 <= j; ++v18 )\n          {\n            if ( !*v18 )\n              break;\n            v20 = _RTDynamicCast(\n                    *v18,\n                    0,\n                    &cocos2d::CCObject `RTTI Type Descriptor',\n                    &cocos2d::CCNode `RTTI Type Descriptor',\n                    0);\n            v21 = v20;\n            if ( v20 )\n            {\n              v22 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v20 + 320LL))(v20);\n              v23 = *(_QWORD *)v21;\n              v24 = *v22;\n              v25 = (*(double (__fastcall **)(__int64))(*(_QWORD *)v21 + 128LL))(v21);\n              v26 = kmVec2Fill(&v28, (float)((float)(*(float *)&v25 * v24) * 0.5) + v14, 0.0);\n              (*(void (__fastcall **)(__int64, float *))(v23 + 184))(v21, v26);\n              v27 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v21 + 320LL))(v21);\n              v14 = v14 + (float)((float)((*(float (__fastcall **)(__int64))(*(_QWORD *)v21 + 128LL))(v21) * v27) + a2);\n            }\n          }\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCMenu::alignItemsHorizontallyWithPadding from 0x180059fb0 to 0x18005a1d8 (552 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCMenu::alignItemsHorizontally @ 0x180059fa8\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bccb8\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:21:48 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x180059fb0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x180059fb5\npush    rsi                                                            ; +0xa, 0x180059fba\npush    rdi                                                            ; +0xb, 0x180059fbb\npush    r14                                                            ; +0xc, 0x180059fbc\nsub     rsp, 70h                                                       ; +0xe, 0x180059fbe\nmovaps  [rsp+88h+var_28], xmm6                                         ; +0x12, 0x180059fc2\nmov     rbp, rcx                                                       ; +0x17, 0x180059fc7\nmov     rcx, [rcx+0D0h]; this                                          ; +0x1a, 0x180059fca\nxor     r14d, r14d                                                     ; +0x21, 0x180059fd1\nmovaps  [rsp+88h+var_38], xmm7                                         ; +0x24, 0x180059fd4\nmovaps  xmm7, xmm1                                                     ; +0x29, 0x180059fd9\nmovaps  [rsp+88h+var_48], xmm8                                         ; +0x2c, 0x180059fdc\nmovaps  xmm8, xmm1                                                     ; +0x32, 0x180059fe2\nmovaps  [rsp+88h+var_58], xmm9                                         ; +0x36, 0x180059fe6\nmovss   xmm9, dword ptr cs:xmmword_1800EC220                           ; +0x3c, 0x180059fec\nxorps   xmm7, xmm9                                                     ; +0x45, 0x180059ff5\ntest    rcx, rcx                                                       ; +0x49, 0x180059ff9\njz      loc_18005A098                                                  ; +0x4c, 0x180059ffc\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x52, 0x18005a002\ntest    eax, eax                                                       ; +0x57, 0x18005a007\njz      loc_18005A098                                                  ; +0x59, 0x18005a009\nmov     rax, [rbp+0D0h]                                                ; +0x5f, 0x18005a00f\ntest    rax, rax                                                       ; +0x66, 0x18005a016\njz      short loc_18005A098                                            ; +0x69, 0x18005a019\nmov     rbx, [rax+38h]                                                 ; +0x6b, 0x18005a01b\nmov     eax, [rbx]                                                     ; +0x6f, 0x18005a01f\ntest    eax, eax                                                       ; +0x71, 0x18005a021\njz      short loc_18005A098                                            ; +0x73, 0x18005a023\nmov     rbx, [rbx+10h]                                                 ; +0x75, 0x18005a025\nlea     rsi, [rax-1]                                                   ; +0x79, 0x18005a029\nlea     rsi, [rbx+rsi*8]                                               ; +0x7d, 0x18005a02d\ncmp     rbx, rsi                                                       ; +0x81, 0x18005a031\nja      short loc_18005A098                                            ; +0x84, 0x18005a034\nmov     rcx, [rbx]                                                     ; +0x86, 0x18005a036\ntest    rcx, rcx                                                       ; +0x89, 0x18005a039\njz      short loc_18005A098                                            ; +0x8c, 0x18005a03c\nlea     r9, ??_R0?AVCCNode@cocos2d@@@8; cocos2d::CCNode `RTTI Type Descriptor' ; +0x8e, 0x18005a03e\nmov     [rsp+88h+var_68], r14d                                         ; +0x95, 0x18005a045\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x9a, 0x18005a04a\nxor     edx, edx                                                       ; +0xa1, 0x18005a051\ncall    __RTDynamicCast                                                ; +0xa3, 0x18005a053\nmov     rdi, rax                                                       ; +0xa8, 0x18005a058\ntest    rax, rax                                                       ; +0xab, 0x18005a05b\njz      short loc_18005A08F                                            ; +0xae, 0x18005a05e\nmov     rcx, [rax]                                                     ; +0xb0, 0x18005a060\nmov     rdx, [rcx+140h]                                                ; +0xb3, 0x18005a063\nmov     rcx, rax                                                       ; +0xba, 0x18005a06a\ncall    rdx                                                            ; +0xbd, 0x18005a06d\nmov     rcx, [rdi]                                                     ; +0xbf, 0x18005a06f\nmovss   xmm6, dword ptr [rax]                                          ; +0xc2, 0x18005a072\nmov     rdx, [rcx+80h]                                                 ; +0xc6, 0x18005a076\nmov     rcx, rdi                                                       ; +0xcd, 0x18005a07d\ncall    rdx                                                            ; +0xd0, 0x18005a080\nmulss   xmm0, xmm6                                                     ; +0xd2, 0x18005a082\naddss   xmm0, xmm8                                                     ; +0xd6, 0x18005a086\naddss   xmm7, xmm0                                                     ; +0xdb, 0x18005a08b\nadd     rbx, 8                                                         ; +0xdf, 0x18005a08f\ncmp     rbx, rsi                                                       ; +0xe3, 0x18005a093\njbe     short loc_18005A036                                            ; +0xe6, 0x18005a096\nmov     rcx, [rbp+0D0h]; this                                          ; +0xe8, 0x18005a098\nxorps   xmm7, xmm9                                                     ; +0xef, 0x18005a09f\nmovss   xmm9, cs:dword_1800EC358                                       ; +0xf3, 0x18005a0a3\nmulss   xmm7, xmm9                                                     ; +0xfc, 0x18005a0ac\ntest    rcx, rcx                                                       ; +0x101, 0x18005a0b1\njz      loc_18005A1AF                                                  ; +0x104, 0x18005a0b4\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x10a, 0x18005a0ba\ntest    eax, eax                                                       ; +0x10f, 0x18005a0bf\njz      loc_18005A1AF                                                  ; +0x111, 0x18005a0c1\nmov     rax, [rbp+0D0h]                                                ; +0x117, 0x18005a0c7\ntest    rax, rax                                                       ; +0x11e, 0x18005a0ce\njz      loc_18005A1AF                                                  ; +0x121, 0x18005a0d1\nmov     rdi, [rax+38h]                                                 ; +0x127, 0x18005a0d7\nmov     eax, [rdi]                                                     ; +0x12b, 0x18005a0db\ntest    eax, eax                                                       ; +0x12d, 0x18005a0dd\njz      loc_18005A1AF                                                  ; +0x12f, 0x18005a0df\nmov     rdi, [rdi+10h]                                                 ; +0x135, 0x18005a0e5\nlea     rbp, [rax-1]                                                   ; +0x139, 0x18005a0e9\nlea     rbp, [rdi+rbp*8]                                               ; +0x13d, 0x18005a0ed\ncmp     rdi, rbp                                                       ; +0x141, 0x18005a0f1\nja      loc_18005A1AF                                                  ; +0x144, 0x18005a0f4\nnop     word ptr [rax+rax+00h]                                         ; +0x14a, 0x18005a0fa\nmov     rcx, [rdi]                                                     ; +0x150, 0x18005a100\ntest    rcx, rcx                                                       ; +0x153, 0x18005a103\njz      loc_18005A1AF                                                  ; +0x156, 0x18005a106\nlea     r9, ??_R0?AVCCNode@cocos2d@@@8; cocos2d::CCNode `RTTI Type Descriptor' ; +0x15c, 0x18005a10c\nmov     [rsp+88h+var_68], r14d                                         ; +0x163, 0x18005a113\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x168, 0x18005a118\nxor     edx, edx                                                       ; +0x16f, 0x18005a11f\ncall    __RTDynamicCast                                                ; +0x171, 0x18005a121\nmov     rsi, rax                                                       ; +0x176, 0x18005a126\ntest    rax, rax                                                       ; +0x179, 0x18005a129\njz      short loc_18005A1A2                                            ; +0x17c, 0x18005a12c\nmov     rcx, [rax]                                                     ; +0x17e, 0x18005a12e\nmov     rdx, [rcx+140h]                                                ; +0x181, 0x18005a131\nmov     rcx, rax                                                       ; +0x188, 0x18005a138\ncall    rdx                                                            ; +0x18b, 0x18005a13b\nmov     rbx, [rsi]                                                     ; +0x18d, 0x18005a13d\nmov     rcx, rsi                                                       ; +0x190, 0x18005a140\nmovss   xmm6, dword ptr [rax]                                          ; +0x193, 0x18005a143\ncall    qword ptr [rbx+80h]                                            ; +0x197, 0x18005a147\nmulss   xmm0, xmm6                                                     ; +0x19d, 0x18005a14d\nxorps   xmm2, xmm2                                                     ; +0x1a1, 0x18005a151\nlea     rcx, [rsp+88h+arg_0]                                           ; +0x1a4, 0x18005a154\nmulss   xmm0, xmm9                                                     ; +0x1ac, 0x18005a15c\naddss   xmm0, xmm7                                                     ; +0x1b1, 0x18005a161\nmovaps  xmm1, xmm0                                                     ; +0x1b5, 0x18005a165\ncall    kmVec2Fill                                                     ; +0x1b8, 0x18005a168\nmov     rdx, rax                                                       ; +0x1bd, 0x18005a16d\nmov     rcx, rsi                                                       ; +0x1c0, 0x18005a170\ncall    qword ptr [rbx+0B8h]                                           ; +0x1c3, 0x18005a173\nmov     rax, [rsi]                                                     ; +0x1c9, 0x18005a179\nmov     rcx, rsi                                                       ; +0x1cc, 0x18005a17c\ncall    qword ptr [rax+140h]                                           ; +0x1cf, 0x18005a17f\nmov     rcx, rsi                                                       ; +0x1d5, 0x18005a185\nmovss   xmm6, dword ptr [rax]                                          ; +0x1d8, 0x18005a188\nmov     rax, [rsi]                                                     ; +0x1dc, 0x18005a18c\ncall    qword ptr [rax+80h]                                            ; +0x1df, 0x18005a18f\nmulss   xmm0, xmm6                                                     ; +0x1e5, 0x18005a195\naddss   xmm0, xmm8                                                     ; +0x1e9, 0x18005a199\naddss   xmm7, xmm0                                                     ; +0x1ee, 0x18005a19e\nadd     rdi, 8                                                         ; +0x1f2, 0x18005a1a2\ncmp     rdi, rbp                                                       ; +0x1f6, 0x18005a1a6\njbe     loc_18005A100                                                  ; +0x1f9, 0x18005a1a9\nmovaps  xmm6, [rsp+88h+var_28]                                         ; +0x1ff, 0x18005a1af\nlea     r11, [rsp+88h+var_18]                                          ; +0x204, 0x18005a1b4\nmov     rbx, [r11+28h]                                                 ; +0x209, 0x18005a1b9\nmov     rbp, [r11+30h]                                                 ; +0x20d, 0x18005a1bd\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x211, 0x18005a1c1\nmovaps  xmm9, xmmword ptr [r11-40h]                                    ; +0x216, 0x18005a1c6\nmovaps  xmm7, [rsp+88h+var_38]                                         ; +0x21b, 0x18005a1cb\nmov     rsp, r11                                                       ; +0x220, 0x18005a1d0\npop     r14                                                            ; +0x223, 0x18005a1d3\npop     rdi                                                            ; +0x225, 0x18005a1d5\npop     rsi                                                            ; +0x226, 0x18005a1d6\nretn                                                                   ; +0x227, 0x18005a1d7", "xrefs": ["cocos2d::CCMenu::alignItemsHorizontally @ 0x180059fa8", "<???> @ 0x18014cf68", "<???> @ 0x1801bccb8"], "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"}