{"type": "func", "start": 5374769744, "end": 5374770307, "name": "CreateParticlePopup::onPage", "pseudocode": "// \n// CreateParticlePopup::onPage from 0x1405c7a50 to 0x1405c7c83 (563 bytes)\n// \n// 3 xrefs:\n// > CreateParticlePopup::init @ 0x1405c5ecc\n// > CreateParticlePopup::init @ 0x1405c27ce\n// > <???> @ 0x14092e304\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:34:51 +0000\n// \n\nunsigned int __fastcall CreateParticlePopup::onPage(__int64 a1, __int64 a2)\n{\n  int *v2; // r14\n  signed int i; // ebp\n  int v5; // ebx\n  struct cocos2d::CCObject *v6; // rax\n  __int64 v7; // rdx\n  int v8; // edi\n  struct cocos2d::CCObject *v9; // rax\n  const char *v10; // rbx\n  __int64 v11; // rax\n  struct cocos2d::CCObject *v12; // rax\n  __int64 v13; // rdx\n  __int64 v14; // rbx\n  __int64 j; // rdi\n  __int64 v16; // rbx\n  struct cocos2d::CCObject *v17; // rax\n  __int64 v18; // rdx\n  __int64 v19; // rcx\n  __int64 k; // rbx\n  cocos2d::CCArray *v21; // rdi\n  unsigned int v22; // ebx\n  unsigned int result; // eax\n  struct cocos2d::CCObject *v24; // rax\n  __int64 v25; // rdx\n  __int64 v26; // rdx\n\n  v2 = (int *)(a1 + 996);\n  if ( a2 )\n    *v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  for ( i = 1; i <= 4; ++i )\n  {\n    v5 = *v2;\n    v6 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 760), i - 1);\n    LOBYTE(v7) = v5 == i;\n    (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v6 + 336LL))(v6, v7);\n    v8 = *v2;\n    v9 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 768), i - 1);\n    v10 = \"GJ_button_04.png\";\n    if ( v8 == i )\n      v10 = \"GJ_button_01.png\";\n    v11 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v9 + 952LL))(v9);\n    ButtonSprite::updateBGImage(v11, v10);\n    v12 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 744), i);\n    if ( v12 )\n    {\n      v14 = *((_QWORD *)v12 + 7);\n      if ( v14 )\n      {\n        for ( j = *(_QWORD *)(v14 + 288); ; j = *(_QWORD *)(j + 288) )\n        {\n          v16 = *(_QWORD *)(v14 + 264);\n          LOBYTE(v13) = *v2 == i;\n          (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v16 + 920LL))(v16, v13);\n          if ( *v2 != i )\n            (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v16 + 1032LL))(v16, 0);\n          v14 = j;\n          if ( !j )\n            break;\n        }\n      }\n    }\n    v17 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 752), i);\n    if ( v17 )\n    {\n      v19 = *((_QWORD *)v17 + 7);\n      if ( v19 )\n      {\n        for ( k = *(_QWORD *)(v19 + 288); ; k = *(_QWORD *)(k + 288) )\n        {\n          LOBYTE(v18) = *v2 == i;\n          (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v19 + 264) + 920LL))(*(_QWORD *)(v19 + 264), v18);\n          v19 = k;\n          if ( !k )\n            break;\n        }\n      }\n    }\n    v21 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 784), i - 1);\n    v22 = 0;\n    result = cocos2d::CCArray::count(v21);\n    if ( result )\n    {\n      do\n      {\n        v24 = cocos2d::CCArray::objectAtIndex(v21, v22);\n        LOBYTE(v25) = *v2 == i;\n        (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v24 + 336LL))(v24, v25);\n        ++v22;\n        result = cocos2d::CCArray::count(v21);\n      }\n      while ( v22 < result );\n    }\n  }\n  if ( *(_DWORD *)(a1 + 996) == 1 )\n  {\n    LOBYTE(v26) = (*(unsigned int (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 712) + 1552LL))(*(_QWORD *)(a1 + 712)) == 0;\n    result = CreateParticlePopup::toggleGravityMode(a1, v26);\n  }\n  if ( *(_DWORD *)(a1 + 996) == 4 )\n    return CreateParticlePopup::applyTexturePage(a1);\n  return result;\n}", "assembly": "; \n; CreateParticlePopup::onPage from 0x1405c7a50 to 0x1405c7c83 (563 bytes)\n; \n; 3 xrefs:\n; > CreateParticlePopup::init @ 0x1405c5ecc\n; > CreateParticlePopup::init @ 0x1405c27ce\n; > <???> @ 0x14092e304\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:34:51 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1405c7a50\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1405c7a55\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1405c7a5a\nmov     [rsp+arg_18], rdi                                              ; +0xf, 0x1405c7a5f\npush    r12                                                            ; +0x14, 0x1405c7a64\npush    r14                                                            ; +0x16, 0x1405c7a66\npush    r15                                                            ; +0x18, 0x1405c7a68\nsub     rsp, 20h                                                       ; +0x1a, 0x1405c7a6a\nlea     r14, [rcx+3E4h]                                                ; +0x1e, 0x1405c7a6e\nmov     r15, rcx                                                       ; +0x25, 0x1405c7a75\ntest    rdx, rdx                                                       ; +0x28, 0x1405c7a78\njz      short loc_1405C7A89                                            ; +0x2b, 0x1405c7a7b\nmov     rax, [rdx]                                                     ; +0x2d, 0x1405c7a7d\nmov     rcx, rdx                                                       ; +0x30, 0x1405c7a80\ncall    qword ptr [rax+38h]                                            ; +0x33, 0x1405c7a83\nmov     [r14], eax                                                     ; +0x36, 0x1405c7a86\nmov     ebp, 1                                                         ; +0x39, 0x1405c7a89\nlea     r12, aGjButton01Png; \"GJ_button_01.png\"                        ; +0x3e, 0x1405c7a8e\nnop     word ptr [rax+rax+00000000h]                                   ; +0x45, 0x1405c7a95\nmov     rcx, [r15+2F8h]                                                ; +0x50, 0x1405c7aa0\nlea     edx, [rbp-1]                                                   ; +0x57, 0x1405c7aa7\nmov     ebx, [r14]                                                     ; +0x5a, 0x1405c7aaa\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x5d, 0x1405c7aad\ncmp     ebx, ebp                                                       ; +0x63, 0x1405c7ab3\nsetz    dl                                                             ; +0x65, 0x1405c7ab5\nmov     rcx, [rax]                                                     ; +0x68, 0x1405c7ab8\nmov     r8, [rcx+150h]                                                 ; +0x6b, 0x1405c7abb\nmov     rcx, rax                                                       ; +0x72, 0x1405c7ac2\ncall    r8                                                             ; +0x75, 0x1405c7ac5\nmov     rcx, [r15+300h]                                                ; +0x78, 0x1405c7ac8\nlea     edx, [rbp-1]                                                   ; +0x7f, 0x1405c7acf\nmov     edi, [r14]                                                     ; +0x82, 0x1405c7ad2\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x85, 0x1405c7ad5\ncmp     edi, ebp                                                       ; +0x8b, 0x1405c7adb\nlea     rbx, aGjButton04Png; \"GJ_button_04.png\"                        ; +0x8d, 0x1405c7add\ncmovz   rbx, r12                                                       ; +0x94, 0x1405c7ae4\nmov     rcx, [rax]                                                     ; +0x98, 0x1405c7ae8\nmov     r8, [rcx+3B8h]                                                 ; +0x9b, 0x1405c7aeb\nmov     rcx, rax                                                       ; +0xa2, 0x1405c7af2\ncall    r8                                                             ; +0xa5, 0x1405c7af5\nmov     rcx, rax                                                       ; +0xa8, 0x1405c7af8\nmov     rdx, rbx                                                       ; +0xab, 0x1405c7afb\ncall    ButtonSprite__updateBGImage                                    ; +0xae, 0x1405c7afe\nmov     rcx, [r15+2E8h]                                                ; +0xb3, 0x1405c7b03\nmov     edx, ebp                                                       ; +0xba, 0x1405c7b0a\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xbc, 0x1405c7b0c\ntest    rax, rax                                                       ; +0xc2, 0x1405c7b12\njz      short loc_1405C7B6D                                            ; +0xc5, 0x1405c7b15\nmov     rbx, [rax+38h]                                                 ; +0xc7, 0x1405c7b17\ntest    rbx, rbx                                                       ; +0xcb, 0x1405c7b1b\njz      short loc_1405C7B6D                                            ; +0xce, 0x1405c7b1e\nmov     rdi, [rbx+120h]                                                ; +0xd0, 0x1405c7b20\nnop     word ptr [rax+rax+00000000h]                                   ; +0xd7, 0x1405c7b27\nmov     rbx, [rbx+108h]                                                ; +0xe0, 0x1405c7b30\ncmp     [r14], ebp                                                     ; +0xe7, 0x1405c7b37\nmov     rcx, rbx                                                       ; +0xea, 0x1405c7b3a\nsetz    dl                                                             ; +0xed, 0x1405c7b3d\nmov     rax, [rbx]                                                     ; +0xf0, 0x1405c7b40\ncall    qword ptr [rax+398h]                                           ; +0xf3, 0x1405c7b43\ncmp     [r14], ebp                                                     ; +0xf9, 0x1405c7b49\njz      short loc_1405C7B5C                                            ; +0xfc, 0x1405c7b4c\nmov     rax, [rbx]                                                     ; +0xfe, 0x1405c7b4e\nxor     edx, edx                                                       ; +0x101, 0x1405c7b51\nmov     rcx, rbx                                                       ; +0x103, 0x1405c7b53\ncall    qword ptr [rax+408h]                                           ; +0x106, 0x1405c7b56\nmov     rbx, rdi                                                       ; +0x10c, 0x1405c7b5c\ntest    rdi, rdi                                                       ; +0x10f, 0x1405c7b5f\njz      short loc_1405C7B6D                                            ; +0x112, 0x1405c7b62\nmov     rdi, [rdi+120h]                                                ; +0x114, 0x1405c7b64\njmp     short loc_1405C7B30                                            ; +0x11b, 0x1405c7b6b\nmov     rcx, [r15+2F0h]                                                ; +0x11d, 0x1405c7b6d\nmov     edx, ebp                                                       ; +0x124, 0x1405c7b74\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x126, 0x1405c7b76\ntest    rax, rax                                                       ; +0x12c, 0x1405c7b7c\njz      short loc_1405C7BC7                                            ; +0x12f, 0x1405c7b7f\nmov     rcx, [rax+38h]                                                 ; +0x131, 0x1405c7b81\ntest    rcx, rcx                                                       ; +0x135, 0x1405c7b85\njz      short loc_1405C7BC7                                            ; +0x138, 0x1405c7b88\nmov     rbx, [rcx+120h]                                                ; +0x13a, 0x1405c7b8a\nnop     dword ptr [rax+00h]                                            ; +0x141, 0x1405c7b91\nnop     word ptr [rax+rax+00000000h]                                   ; +0x145, 0x1405c7b95\nmov     rcx, [rcx+108h]                                                ; +0x150, 0x1405c7ba0\ncmp     [r14], ebp                                                     ; +0x157, 0x1405c7ba7\nsetz    dl                                                             ; +0x15a, 0x1405c7baa\nmov     rax, [rcx]                                                     ; +0x15d, 0x1405c7bad\ncall    qword ptr [rax+398h]                                           ; +0x160, 0x1405c7bb0\nmov     rcx, rbx                                                       ; +0x166, 0x1405c7bb6\ntest    rbx, rbx                                                       ; +0x169, 0x1405c7bb9\njz      short loc_1405C7BC7                                            ; +0x16c, 0x1405c7bbc\nmov     rbx, [rbx+120h]                                                ; +0x16e, 0x1405c7bbe\njmp     short loc_1405C7BA0                                            ; +0x175, 0x1405c7bc5\nmov     rcx, [r15+310h]                                                ; +0x177, 0x1405c7bc7\nlea     edx, [rbp-1]                                                   ; +0x17e, 0x1405c7bce\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x181, 0x1405c7bd1\nmov     rcx, rax                                                       ; +0x187, 0x1405c7bd7\nmov     rdi, rax                                                       ; +0x18a, 0x1405c7bda\nxor     ebx, ebx                                                       ; +0x18d, 0x1405c7bdd\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x18f, 0x1405c7bdf\ntest    eax, eax                                                       ; +0x195, 0x1405c7be5\njz      short loc_1405C7C20                                            ; +0x197, 0x1405c7be7\nnop     dword ptr [rax+00000000h]                                      ; +0x199, 0x1405c7be9\nmov     edx, ebx                                                       ; +0x1a0, 0x1405c7bf0\nmov     rcx, rdi                                                       ; +0x1a2, 0x1405c7bf2\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x1a5, 0x1405c7bf5\ncmp     [r14], ebp                                                     ; +0x1ab, 0x1405c7bfb\nsetz    dl                                                             ; +0x1ae, 0x1405c7bfe\nmov     rcx, [rax]                                                     ; +0x1b1, 0x1405c7c01\nmov     r8, [rcx+150h]                                                 ; +0x1b4, 0x1405c7c04\nmov     rcx, rax                                                       ; +0x1bb, 0x1405c7c0b\ncall    r8                                                             ; +0x1be, 0x1405c7c0e\nmov     rcx, rdi                                                       ; +0x1c1, 0x1405c7c11\ninc     ebx                                                            ; +0x1c4, 0x1405c7c14\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1c6, 0x1405c7c16\ncmp     ebx, eax                                                       ; +0x1cc, 0x1405c7c1c\njb      short loc_1405C7BF0                                            ; +0x1ce, 0x1405c7c1e\ninc     ebp                                                            ; +0x1d0, 0x1405c7c20\ncmp     ebp, 4                                                         ; +0x1d2, 0x1405c7c22\njle     loc_1405C7AA0                                                  ; +0x1d5, 0x1405c7c25\ncmp     dword ptr [r15+3E4h], 1                                        ; +0x1db, 0x1405c7c2b\njnz     short loc_1405C7C52                                            ; +0x1e3, 0x1405c7c33\nmov     rcx, [r15+2C8h]                                                ; +0x1e5, 0x1405c7c35\nmov     rax, [rcx]                                                     ; +0x1ec, 0x1405c7c3c\ncall    qword ptr [rax+610h]                                           ; +0x1ef, 0x1405c7c3f\ntest    eax, eax                                                       ; +0x1f5, 0x1405c7c45\nmov     rcx, r15                                                       ; +0x1f7, 0x1405c7c47\nsetz    dl                                                             ; +0x1fa, 0x1405c7c4a\ncall    CreateParticlePopup__toggleGravityMode                         ; +0x1fd, 0x1405c7c4d\ncmp     dword ptr [r15+3E4h], 4                                        ; +0x202, 0x1405c7c52\njnz     short loc_1405C7C64                                            ; +0x20a, 0x1405c7c5a\nmov     rcx, r15                                                       ; +0x20c, 0x1405c7c5c\ncall    CreateParticlePopup__applyTexturePage                          ; +0x20f, 0x1405c7c5f\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x214, 0x1405c7c64\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x219, 0x1405c7c69\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x21e, 0x1405c7c6e\nmov     rdi, [rsp+38h+arg_18]                                          ; +0x223, 0x1405c7c73\nadd     rsp, 20h                                                       ; +0x228, 0x1405c7c78\npop     r15                                                            ; +0x22c, 0x1405c7c7c\npop     r14                                                            ; +0x22e, 0x1405c7c7e\npop     r12                                                            ; +0x230, 0x1405c7c80\nretn                                                                   ; +0x232, 0x1405c7c82", "xrefs": ["CreateParticlePopup::init @ 0x1405c5ecc", "CreateParticlePopup::init @ 0x1405c27ce", "<???> @ 0x14092e304"], "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"}