{"type": "func", "start": 5369201584, "end": 5369202288, "name": "ListButtonPage::create", "pseudocode": "// \n// ListButtonPage::create from 0x1400783b0 to 0x140078670 (704 bytes)\n// \n// 2 xrefs:\n// > ListButtonBar::init @ 0x140077f9e\n// > <???> @ 0x140911c84\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:25:52 +0000\n// \n\n// Hidden C++ exception states: #wind=1\ncocos2d::CCLayer *__fastcall ListButtonPage::create(\n        cocos2d::CCArray *a1,\n        const struct cocos2d::CCPoint *a2,\n        int a3,\n        int a4,\n        float a5,\n        float a6,\n        float a7)\n{\n  cocos2d::CCLayer *v11; // r14\n  float *v12; // rax\n  float *v13; // rbx\n  float v15; // xmm6_4\n  float v16; // xmm9_4\n  int v17; // edi\n  unsigned int v18; // esi\n  __int64 v19; // r14\n  int v20; // ebx\n  int v21; // r13d\n  struct cocos2d::CCObject *v22; // r15\n  __int64 v23; // rbx\n  __int64 v24; // rax\n  __int64 v25; // [rsp+20h] [rbp-B8h] BYREF\n  cocos2d::CCLayer *v26; // [rsp+28h] [rbp-B0h]\n  char v27[8]; // [rsp+30h] [rbp-A8h] BYREF\n  char v28[8]; // [rsp+38h] [rbp-A0h] BYREF\n\n  v11 = (cocos2d::CCLayer *)operator new(0x198u);\n  v26 = v11;\n  cocos2d::CCLayer::CCLayer(v11);\n  *(_QWORD *)v11 = &ListButtonPage::`vftable';\n  *((_QWORD *)v11 + 40) = &ListButtonPage::`vftable';\n  *((_QWORD *)v11 + 41) = &ListButtonPage::`vftable';\n  *((_QWORD *)v11 + 42) = &ListButtonPage::`vftable';\n  *((_QWORD *)v11 + 43) = &ListButtonPage::`vftable';\n  *((_QWORD *)v11 + 44) = &ListButtonPage::`vftable';\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v27, a2);\n  v13 = v12;\n  if ( cocos2d::CCLayer::init(v11) )\n  {\n    v25 = cocos2d::CCMenu::create();\n    (*(void (__fastcall **)(cocos2d::CCLayer *, __int64))(*(_QWORD *)v11 + 464LL))(v11, v25);\n    v15 = (float)((float)((float)(a4 - 1) * 0.5) * (float)(a6 + a7)) + v13[1];\n    v16 = (float)(*v13 - (float)((float)((float)a3 * 0.5) * a7)) - (float)((float)((float)(a3 - 1) * 0.5) * a5);\n    v17 = 0;\n    v18 = 0;\n    if ( cocos2d::CCArray::count(a1) )\n    {\n      v19 = v25;\n      do\n      {\n        v20 = v17 % a3;\n        v21 = (int)floorf((float)v17 / (float)a3);\n        v22 = cocos2d::CCArray::objectAtIndex(a1, v18);\n        if ( (*(unsigned int (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v22 + 56LL))(v22) == -2 )\n        {\n          v17 += a3 - v20;\n        }\n        else\n        {\n          (*(void (__fastcall **)(__int64, struct cocos2d::CCObject *))(*(_QWORD *)v19 + 464LL))(v19, v22);\n          cocos2d::CCPoint::CCPoint(\n            (cocos2d::CCPoint *)&v25,\n            (float)((float)(a5 + a7) * (float)v20) + (float)((float)(a7 * 0.5) + v16),\n            v15 - (float)((float)v21 * (float)(a6 + a7)));\n          v23 = *(_QWORD *)v22;\n          cocos2d::CCNode::convertToNodeSpace(v19, v28, &v25);\n          (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v23 + 184))(v22, v24);\n          ++v17;\n        }\n        ++v18;\n      }\n      while ( v18 < cocos2d::CCArray::count(a1) );\n      v11 = v26;\n    }\n    cocos2d::CCObject::autorelease(v11);\n    return v11;\n  }\n  else\n  {\n    (*(void (__fastcall **)(cocos2d::CCLayer *, __int64))(*(_QWORD *)v11 + 8LL))(v11, 1);\n    return nullptr;\n  }\n}", "assembly": "; \n; ListButtonPage::create from 0x1400783b0 to 0x140078670 (704 bytes)\n; \n; 2 xrefs:\n; > ListButtonBar::init @ 0x140077f9e\n; > <???> @ 0x140911c84\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:25:52 +0000\n; \nmov     rax, rsp                                                       ; +0x0, 0x1400783b0\nmov     [rax+8], rbx                                                   ; +0x3, 0x1400783b3\nmov     [rax+10h], rbp                                                 ; +0x7, 0x1400783b7\nmov     [rax+18h], rsi                                                 ; +0xb, 0x1400783bb\npush    rdi                                                            ; +0xf, 0x1400783bf\npush    r12                                                            ; +0x10, 0x1400783c0\npush    r13                                                            ; +0x12, 0x1400783c2\npush    r14                                                            ; +0x14, 0x1400783c4\npush    r15                                                            ; +0x16, 0x1400783c6\nsub     rsp, 0B0h                                                      ; +0x18, 0x1400783c8\nmovaps  xmmword ptr [rax-38h], xmm6                                    ; +0x1f, 0x1400783cf\nmovaps  xmmword ptr [rax-48h], xmm7                                    ; +0x23, 0x1400783d3\nmovaps  xmmword ptr [rax-58h], xmm8                                    ; +0x27, 0x1400783d7\nmovaps  xmmword ptr [rax-68h], xmm9                                    ; +0x2c, 0x1400783dc\nmovaps  xmmword ptr [rax-78h], xmm10                                   ; +0x31, 0x1400783e1\nmovaps  [rsp+0D8h+var_88], xmm11                                       ; +0x36, 0x1400783e6\nmovaps  [rsp+0D8h+var_98], xmm12                                       ; +0x3c, 0x1400783ec\nmov     edi, r9d                                                       ; +0x42, 0x1400783f2\nmov     ebp, r8d                                                       ; +0x45, 0x1400783f5\nmov     rbx, rdx                                                       ; +0x48, 0x1400783f8\nmov     r12, rcx                                                       ; +0x4b, 0x1400783fb\nmov     ecx, 198h; Size                                                ; +0x4e, 0x1400783fe\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x53, 0x140078403\nmov     r14, rax                                                       ; +0x58, 0x140078408\nmov     [rsp+0D8h+var_B0], rax                                         ; +0x5b, 0x14007840b\nmov     rcx, rax                                                       ; +0x60, 0x140078410\ncall    cs:??0CCLayer@cocos2d@@QEAA@XZ; cocos2d::CCLayer::CCLayer(void) ; +0x63, 0x140078413\nlea     rax, ??_7ListButtonPage@@6B@; const ListButtonPage::`vftable'  ; +0x69, 0x140078419\nmov     [r14], rax                                                     ; +0x70, 0x140078420\nlea     rax, ??_7ListButtonPage@@6B@_0; const ListButtonPage::`vftable' ; +0x73, 0x140078423\nmov     [r14+140h], rax                                                ; +0x7a, 0x14007842a\nlea     rax, ??_7ListButtonPage@@6B@_1; const ListButtonPage::`vftable' ; +0x81, 0x140078431\nmov     [r14+148h], rax                                                ; +0x88, 0x140078438\nlea     rax, ??_7ListButtonPage@@6B@_2; const ListButtonPage::`vftable' ; +0x8f, 0x14007843f\nmov     [r14+150h], rax                                                ; +0x96, 0x140078446\nlea     rax, ??_7ListButtonPage@@6B@_3; const ListButtonPage::`vftable' ; +0x9d, 0x14007844d\nmov     [r14+158h], rax                                                ; +0xa4, 0x140078454\nlea     rax, ??_7ListButtonPage@@6B@_4; const ListButtonPage::`vftable' ; +0xab, 0x14007845b\nmov     [r14+160h], rax                                                ; +0xb2, 0x140078462\nmov     rdx, rbx                                                       ; +0xb9, 0x140078469\nlea     rcx, [rsp+0D8h+var_A8]                                         ; +0xbc, 0x14007846c\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xc1, 0x140078471\nmov     rbx, rax                                                       ; +0xc7, 0x140078477\nmov     rcx, r14                                                       ; +0xca, 0x14007847a\ncall    cs:__imp_?init@CCLayer@cocos2d@@UEAA_NXZ; cocos2d::CCLayer::init(void) ; +0xcd, 0x14007847d\ntest    al, al                                                         ; +0xd3, 0x140078483\njnz     short loc_14007849E                                            ; +0xd5, 0x140078485\nmov     rax, [r14]                                                     ; +0xd7, 0x140078487\nmov     edx, 1                                                         ; +0xda, 0x14007848a\nmov     rcx, r14                                                       ; +0xdf, 0x14007848f\ncall    qword ptr [rax+8]                                              ; +0xe2, 0x140078492\nxor     edi, edi                                                       ; +0xe5, 0x140078495\nmov     eax, edi                                                       ; +0xe7, 0x140078497\njmp     loc_14007862C                                                  ; +0xe9, 0x140078499\ncall    cs:?create@CCMenu@cocos2d@@SAPEAV12@XZ; cocos2d::CCMenu::create(void) ; +0xee, 0x14007849e\nmov     rdx, rax                                                       ; +0xf4, 0x1400784a4\nmov     [rsp+0D8h+var_B8], rax                                         ; +0xf7, 0x1400784a7\nmov     rax, [r14]                                                     ; +0xfc, 0x1400784ac\nmov     rcx, r14                                                       ; +0xff, 0x1400784af\ncall    qword ptr [rax+1D0h]                                           ; +0x102, 0x1400784b2\nmovss   xmm10, [rsp+0D8h+arg_28]                                       ; +0x108, 0x1400784b8\nmovss   xmm8, [rsp+0D8h+arg_30]                                        ; +0x112, 0x1400784c2\naddss   xmm10, xmm8                                                    ; +0x11c, 0x1400784cc\nlea     eax, [rdi-1]                                                   ; +0x121, 0x1400784d1\nmovd    xmm6, eax                                                      ; +0x124, 0x1400784d4\ncvtdq2ps xmm6, xmm6                                                    ; +0x128, 0x1400784d8\nmovss   xmm11, cs:dword_140834F20                                      ; +0x12b, 0x1400784db\nmulss   xmm6, xmm11                                                    ; +0x134, 0x1400784e4\nmulss   xmm6, xmm10                                                    ; +0x139, 0x1400784e9\naddss   xmm6, dword ptr [rbx+4]                                        ; +0x13e, 0x1400784ee\nmovd    xmm7, ebp                                                      ; +0x143, 0x1400784f3\ncvtdq2ps xmm7, xmm7                                                    ; +0x147, 0x1400784f7\nmovaps  xmm0, xmm7                                                     ; +0x14a, 0x1400784fa\nmulss   xmm0, xmm11                                                    ; +0x14d, 0x1400784fd\nmulss   xmm0, xmm8                                                     ; +0x152, 0x140078502\nmovss   xmm9, dword ptr [rbx]                                          ; +0x157, 0x140078507\nsubss   xmm9, xmm0                                                     ; +0x15c, 0x14007850c\nlea     eax, [rbp-1]                                                   ; +0x161, 0x140078511\nmovd    xmm1, eax                                                      ; +0x164, 0x140078514\ncvtdq2ps xmm1, xmm1                                                    ; +0x168, 0x140078518\nmulss   xmm1, xmm11                                                    ; +0x16b, 0x14007851b\nmovss   xmm12, [rsp+0D8h+arg_20]                                       ; +0x170, 0x140078520\nmulss   xmm1, xmm12                                                    ; +0x17a, 0x14007852a\nsubss   xmm9, xmm1                                                     ; +0x17f, 0x14007852f\nxor     edi, edi                                                       ; +0x184, 0x140078534\nmov     esi, edi                                                       ; +0x186, 0x140078536\nmov     rcx, r12                                                       ; +0x188, 0x140078538\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x18b, 0x14007853b\ntest    eax, eax                                                       ; +0x191, 0x140078541\njz      loc_140078620                                                  ; +0x193, 0x140078543\nmov     r14, [rsp+0D8h+var_B8]                                         ; +0x199, 0x140078549\nxchg    ax, ax                                                         ; +0x19e, 0x14007854e\nmov     eax, edi                                                       ; +0x1a0, 0x140078550\ncdq                                                                    ; +0x1a2, 0x140078552\nidiv    ebp                                                            ; +0x1a3, 0x140078553\nmov     ebx, edx                                                       ; +0x1a5, 0x140078555\nmovd    xmm0, edi                                                      ; +0x1a7, 0x140078557\ncvtdq2ps xmm0, xmm0                                                    ; +0x1ab, 0x14007855b\ndivss   xmm0, xmm7; X                                                  ; +0x1ae, 0x14007855e\ncall    floorf                                                         ; +0x1b2, 0x140078562\ncvttss2si r13d, xmm0                                                   ; +0x1b7, 0x140078567\nmov     edx, esi                                                       ; +0x1bc, 0x14007856c\nmov     rcx, r12                                                       ; +0x1be, 0x14007856e\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x1c1, 0x140078571\nmov     r15, rax                                                       ; +0x1c7, 0x140078577\nmov     rax, [rax]                                                     ; +0x1ca, 0x14007857a\nmov     rcx, r15                                                       ; +0x1cd, 0x14007857d\ncall    qword ptr [rax+38h]                                            ; +0x1d0, 0x140078580\ncmp     eax, 0FFFFFFFEh                                                ; +0x1d3, 0x140078583\njnz     short loc_140078590                                            ; +0x1d6, 0x140078586\nmov     eax, ebp                                                       ; +0x1d8, 0x140078588\nsub     eax, ebx                                                       ; +0x1da, 0x14007858a\nadd     edi, eax                                                       ; +0x1dc, 0x14007858c\njmp     short loc_140078608                                            ; +0x1de, 0x14007858e\nmov     rax, [r14]                                                     ; +0x1e0, 0x140078590\nmov     rdx, r15                                                       ; +0x1e3, 0x140078593\nmov     rcx, r14                                                       ; +0x1e6, 0x140078596\ncall    qword ptr [rax+1D0h]                                           ; +0x1e9, 0x140078599\nmovd    xmm0, r13d                                                     ; +0x1ef, 0x14007859f\ncvtdq2ps xmm0, xmm0                                                    ; +0x1f4, 0x1400785a4\nmulss   xmm0, xmm10                                                    ; +0x1f7, 0x1400785a7\nmovaps  xmm2, xmm6                                                     ; +0x1fc, 0x1400785ac\nsubss   xmm2, xmm0                                                     ; +0x1ff, 0x1400785af\nmovaps  xmm1, xmm12                                                    ; +0x203, 0x1400785b3\naddss   xmm1, xmm8                                                     ; +0x207, 0x1400785b7\nmovd    xmm0, ebx                                                      ; +0x20c, 0x1400785bc\ncvtdq2ps xmm0, xmm0                                                    ; +0x210, 0x1400785c0\nmulss   xmm1, xmm0                                                     ; +0x213, 0x1400785c3\nmovaps  xmm3, xmm8                                                     ; +0x217, 0x1400785c7\nmulss   xmm3, xmm11                                                    ; +0x21b, 0x1400785cb\naddss   xmm3, xmm9                                                     ; +0x220, 0x1400785d0\naddss   xmm1, xmm3                                                     ; +0x225, 0x1400785d5\nlea     rcx, [rsp+0D8h+var_B8]                                         ; +0x229, 0x1400785d9\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x22e, 0x1400785de\nmov     rbx, [r15]                                                     ; +0x234, 0x1400785e4\nlea     r8, [rsp+0D8h+var_B8]                                          ; +0x237, 0x1400785e7\nlea     rdx, [rsp+0D8h+var_A0]                                         ; +0x23c, 0x1400785ec\nmov     rcx, r14                                                       ; +0x241, 0x1400785f1\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x244, 0x1400785f4\nmov     rdx, rax                                                       ; +0x24a, 0x1400785fa\nmov     rcx, r15                                                       ; +0x24d, 0x1400785fd\ncall    qword ptr [rbx+0B8h]                                           ; +0x250, 0x140078600\ninc     edi                                                            ; +0x256, 0x140078606\ninc     esi                                                            ; +0x258, 0x140078608\nmov     rcx, r12                                                       ; +0x25a, 0x14007860a\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x25d, 0x14007860d\ncmp     esi, eax                                                       ; +0x263, 0x140078613\njb      loc_140078550                                                  ; +0x265, 0x140078615\nmov     r14, [rsp+0D8h+var_B0]                                         ; +0x26b, 0x14007861b\nmov     rcx, r14                                                       ; +0x270, 0x140078620\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x273, 0x140078623\nmov     rax, r14                                                       ; +0x279, 0x140078629\nlea     r11, [rsp+0D8h+var_28]                                         ; +0x27c, 0x14007862c\nmov     rbx, [r11+30h]                                                 ; +0x284, 0x140078634\nmov     rbp, [r11+38h]                                                 ; +0x288, 0x140078638\nmov     rsi, [r11+40h]                                                 ; +0x28c, 0x14007863c\nmovaps  xmm6, xmmword ptr [r11-10h]                                    ; +0x290, 0x140078640\nmovaps  xmm7, xmmword ptr [r11-20h]                                    ; +0x295, 0x140078645\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x29a, 0x14007864a\nmovaps  xmm9, xmmword ptr [r11-40h]                                    ; +0x29f, 0x14007864f\nmovaps  xmm10, xmmword ptr [r11-50h]                                   ; +0x2a4, 0x140078654\nmovaps  xmm11, xmmword ptr [r11-60h]                                   ; +0x2a9, 0x140078659\nmovaps  xmm12, xmmword ptr [r11-70h]                                   ; +0x2ae, 0x14007865e\nmov     rsp, r11                                                       ; +0x2b3, 0x140078663\npop     r15                                                            ; +0x2b6, 0x140078666\npop     r14                                                            ; +0x2b8, 0x140078668\npop     r13                                                            ; +0x2ba, 0x14007866a\npop     r12                                                            ; +0x2bc, 0x14007866c\npop     rdi                                                            ; +0x2be, 0x14007866e\nretn                                                                   ; +0x2bf, 0x14007866f", "xrefs": ["ListButtonBar::init @ 0x140077f9e", "<???> @ 0x140911c84"], "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"}