{"type": "func", "start": 5370248256, "end": 5370248635, "name": "EditButtonBar::updateDotState", "pseudocode": "// \n// EditButtonBar::updateDotState from 0x140177c40 to 0x140177dbb (379 bytes)\n// \n// 5 xrefs:\n// > EditButtonBar::goToPage @ 0x140177aff\n// > EditorUI::updateCreateMenu @ 0x1401b2425\n// > <???> @ 0x14089d640\n// > <???> @ 0x14089d67c\n// > <???> @ 0x14091862c\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:27:33 +0000\n// \n\nvoid __fastcall EditButtonBar::updateDotState(__int64 a1)\n{\n  __int64 v2; // rcx\n  int v3; // ebp\n  cocos2d::CCArray *v4; // rcx\n  signed int v5; // ecx\n  _QWORD *v6; // rsi\n  __int64 v7; // rbx\n  unsigned __int64 i; // r14\n  __int64 v9; // rbx\n  __int64 v10; // rdi\n  int v11; // eax\n  void (__fastcall **v12)(__int64, __int16 *); // r8\n  __int16 *v13; // rdx\n  __int16 v14; // [rsp+40h] [rbp+8h] BYREF\n  char v15; // [rsp+42h] [rbp+Ah]\n  __int16 v16; // [rsp+48h] [rbp+10h] BYREF\n  char v17; // [rsp+4Ah] [rbp+12h]\n\n  if ( *(_QWORD *)(a1 + 360) )\n  {\n    v2 = *(_QWORD *)(a1 + 344);\n    if ( v2 )\n    {\n      v3 = *(_DWORD *)(v2 + 588);\n      if ( *(_BYTE *)(v2 + 456) )\n        v4 = *(cocos2d::CCArray **)(v2 + 448);\n      else\n        v4 = *(cocos2d::CCArray **)(v2 + 480);\n      v5 = cocos2d::CCArray::count(v4);\n      if ( v3 <= 0 )\n      {\n        for ( ; v3 < 0; v3 += v5 )\n          ;\n      }\n      else\n      {\n        v3 %= v5;\n      }\n      if ( (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 360) + 480LL))(*(_QWORD *)(a1 + 360)) )\n      {\n        if ( **(_DWORD **)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 360) + 480LL))(*(_QWORD *)(a1 + 360))\n                         + 56) )\n        {\n          v6 = *(_QWORD **)(*(_QWORD *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 360) + 480LL))(*(_QWORD *)(a1 + 360))\n                                      + 56)\n                          + 16LL);\n          v7 = *(_QWORD *)(*(_QWORD *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 360) + 480LL))(*(_QWORD *)(a1 + 360))\n                                     + 56)\n                         + 16LL);\n          for ( i = v7\n                  + 8\n                  * (**(unsigned int **)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 360) + 480LL))(*(_QWORD *)(a1 + 360))\n                                       + 56)\n                   - 1LL); (unsigned __int64)v6 <= i; ++v6 )\n          {\n            v9 = *v6;\n            if ( !*v6 )\n              break;\n            v10 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v9 + 952LL))(*v6);\n            v11 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 56LL))(v9);\n            v12 = *(void (__fastcall ***)(__int64, __int16 *))(v10 + 320);\n            if ( v11 == v3 )\n            {\n              v14 = -1;\n              v13 = &v14;\n              v15 = -1;\n            }\n            else\n            {\n              v16 = -26986;\n              v13 = &v16;\n              v17 = -106;\n            }\n            (*v12)(v10 + 320, v13);\n          }\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; EditButtonBar::updateDotState from 0x140177c40 to 0x140177dbb (379 bytes)\n; \n; 5 xrefs:\n; > EditButtonBar::goToPage @ 0x140177aff\n; > EditorUI::updateCreateMenu @ 0x1401b2425\n; > <???> @ 0x14089d640\n; > <???> @ 0x14089d67c\n; > <???> @ 0x14091862c\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:27:33 +0000\n; \npush    rdi                                                            ; +0x0, 0x140177c40\nsub     rsp, 30h                                                       ; +0x2, 0x140177c42\ncmp     qword ptr [rcx+168h], 0                                        ; +0x6, 0x140177c46\nmov     rdi, rcx                                                       ; +0xe, 0x140177c4e\njz      loc_140177DB5                                                  ; +0x11, 0x140177c51\nmov     rcx, [rcx+158h]                                                ; +0x17, 0x140177c57\ntest    rcx, rcx                                                       ; +0x1e, 0x140177c5e\njz      loc_140177DB5                                                  ; +0x21, 0x140177c61\ncmp     byte ptr [rcx+1C8h], 0                                         ; +0x27, 0x140177c67\nmov     [rsp+38h+arg_18], rbp                                          ; +0x2e, 0x140177c6e\nmov     ebp, [rcx+24Ch]                                                ; +0x33, 0x140177c73\njz      short loc_140177C84                                            ; +0x39, 0x140177c79\nmov     rcx, [rcx+1C0h]                                                ; +0x3b, 0x140177c7b\njmp     short loc_140177C8B                                            ; +0x42, 0x140177c82\nmov     rcx, [rcx+1E0h]                                                ; +0x44, 0x140177c84\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x4b, 0x140177c8b\nmov     ecx, eax                                                       ; +0x51, 0x140177c91\ntest    ebp, ebp                                                       ; +0x53, 0x140177c93\njle     short loc_140177CA0                                            ; +0x55, 0x140177c95\nmov     eax, ebp                                                       ; +0x57, 0x140177c97\ncdq                                                                    ; +0x59, 0x140177c99\nidiv    ecx                                                            ; +0x5a, 0x140177c9a\nmov     ebp, edx                                                       ; +0x5c, 0x140177c9c\njmp     short loc_140177CA6                                            ; +0x5e, 0x140177c9e\njns     short loc_140177CA6                                            ; +0x60, 0x140177ca0\nadd     ebp, ecx                                                       ; +0x62, 0x140177ca2\njs      short loc_140177CA2                                            ; +0x64, 0x140177ca4\nmov     rcx, [rdi+168h]                                                ; +0x66, 0x140177ca6\nmov     rax, [rcx]                                                     ; +0x6d, 0x140177cad\ncall    qword ptr [rax+1E0h]                                           ; +0x70, 0x140177cb0\ntest    rax, rax                                                       ; +0x76, 0x140177cb6\njz      loc_140177DB0                                                  ; +0x79, 0x140177cb9\nmov     rcx, [rdi+168h]                                                ; +0x7f, 0x140177cbf\nmov     rax, [rcx]                                                     ; +0x86, 0x140177cc6\ncall    qword ptr [rax+1E0h]                                           ; +0x89, 0x140177cc9\nmov     rcx, [rax+38h]                                                 ; +0x8f, 0x140177ccf\ncmp     dword ptr [rcx], 0                                             ; +0x93, 0x140177cd3\njbe     loc_140177DB0                                                  ; +0x96, 0x140177cd6\nmov     rcx, [rdi+168h]                                                ; +0x9c, 0x140177cdc\nmov     [rsp+38h+arg_10], rbx                                          ; +0xa3, 0x140177ce3\nmov     [rsp+38h+var_10], rsi                                          ; +0xa8, 0x140177ce8\nmov     [rsp+38h+var_18], r14                                          ; +0xad, 0x140177ced\nmov     rax, [rcx]                                                     ; +0xb2, 0x140177cf2\ncall    qword ptr [rax+1E0h]                                           ; +0xb5, 0x140177cf5\nmov     rcx, [rax+38h]                                                 ; +0xbb, 0x140177cfb\nmov     rsi, [rcx+10h]                                                 ; +0xbf, 0x140177cff\nmov     rcx, [rdi+168h]                                                ; +0xc3, 0x140177d03\nmov     rax, [rcx]                                                     ; +0xca, 0x140177d0a\ncall    qword ptr [rax+1E0h]                                           ; +0xcd, 0x140177d0d\nmov     rcx, [rax+38h]                                                 ; +0xd3, 0x140177d13\nmov     rbx, [rcx+10h]                                                 ; +0xd7, 0x140177d17\nmov     rcx, [rdi+168h]                                                ; +0xdb, 0x140177d1b\nmov     rax, [rcx]                                                     ; +0xe2, 0x140177d22\ncall    qword ptr [rax+1E0h]                                           ; +0xe5, 0x140177d25\nmov     rcx, [rax+38h]                                                 ; +0xeb, 0x140177d2b\nmov     r14d, [rcx]                                                    ; +0xef, 0x140177d2f\ndec     r14                                                            ; +0xf2, 0x140177d32\nlea     r14, [rbx+r14*8]                                               ; +0xf5, 0x140177d35\ncmp     rsi, r14                                                       ; +0xf9, 0x140177d39\nja      short loc_140177DA1                                            ; +0xfc, 0x140177d3c\nxchg    ax, ax                                                         ; +0xfe, 0x140177d3e\nmov     rbx, [rsi]                                                     ; +0x100, 0x140177d40\ntest    rbx, rbx                                                       ; +0x103, 0x140177d43\njz      short loc_140177DA1                                            ; +0x106, 0x140177d46\nmov     rax, [rbx]                                                     ; +0x108, 0x140177d48\nmov     rcx, rbx                                                       ; +0x10b, 0x140177d4b\ncall    qword ptr [rax+3B8h]                                           ; +0x10e, 0x140177d4e\nmov     rcx, [rbx]                                                     ; +0x114, 0x140177d54\nmov     rdi, rax                                                       ; +0x117, 0x140177d57\nmov     rdx, [rcx+38h]                                                 ; +0x11a, 0x140177d5a\nmov     rcx, rbx                                                       ; +0x11e, 0x140177d5e\ncall    rdx                                                            ; +0x121, 0x140177d61\nlea     rcx, [rdi+140h]                                                ; +0x123, 0x140177d63\nmov     r8, [rcx]                                                      ; +0x12a, 0x140177d6a\ncmp     eax, ebp                                                       ; +0x12d, 0x140177d6d\njnz     short loc_140177D84                                            ; +0x12f, 0x140177d6f\nmov     [rsp+38h+arg_0], 0FFFFh                                        ; +0x131, 0x140177d71\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x138, 0x140177d78\nmov     [rsp+38h+arg_2], 0FFh                                          ; +0x13d, 0x140177d7d\njmp     short loc_140177D95                                            ; +0x142, 0x140177d82\nmov     [rsp+38h+arg_8], 9696h                                         ; +0x144, 0x140177d84\nlea     rdx, [rsp+38h+arg_8]                                           ; +0x14b, 0x140177d8b\nmov     [rsp+38h+arg_A], 96h                                           ; +0x150, 0x140177d90\ncall    qword ptr [r8]                                                 ; +0x155, 0x140177d95\nadd     rsi, 8                                                         ; +0x158, 0x140177d98\ncmp     rsi, r14                                                       ; +0x15c, 0x140177d9c\njbe     short loc_140177D40                                            ; +0x15f, 0x140177d9f\nmov     rsi, [rsp+38h+var_10]                                          ; +0x161, 0x140177da1\nmov     rbx, [rsp+38h+arg_10]                                          ; +0x166, 0x140177da6\nmov     r14, [rsp+38h+var_18]                                          ; +0x16b, 0x140177dab\nmov     rbp, [rsp+38h+arg_18]                                          ; +0x170, 0x140177db0\nadd     rsp, 30h                                                       ; +0x175, 0x140177db5\npop     rdi                                                            ; +0x179, 0x140177db9\nretn                                                                   ; +0x17a, 0x140177dba", "xrefs": ["EditButtonBar::goToPage @ 0x140177aff", "EditorUI::updateCreateMenu @ 0x1401b2425", "<???> @ 0x14089d640", "<???> @ 0x14089d67c", "<???> @ 0x14091862c"], "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"}