{"type": "func", "start": 4303395760, "end": 4303395889, "name": "ColorSelectPopup::updateCustomColorIdx", "pseudocode": "// \n// ColorSelectPopup::updateCustomColorIdx from 0x100809bb0 to 0x100809c31 (129 bytes)\n// \n// 0 xrefs:\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 12:36:41 +0000\n// \n\n__int64 __fastcall ColorSelectPopup::updateCustomColorIdx(__int64 a1)\n{\n  int v1; // ecx\n  __int64 result; // rax\n  __int64 v3; // rcx\n  __int64 v5; // rdi\n  unsigned int v6; // r14d\n\n  v1 = *(_DWORD *)(a1 + 1168);\n  result = 1;\n  if ( v1 >= 2 )\n    result = (unsigned int)v1;\n  *(_DWORD *)(a1 + 1168) = result;\n  v3 = *(_QWORD *)(a1 + 680);\n  if ( v3 )\n  {\n    *(_DWORD *)(v3 + 1024) = result;\n  }\n  else\n  {\n    v5 = *(_QWORD *)(a1 + 688);\n    if ( v5 )\n    {\n      result = sub_1007FEF90(v5);\n      if ( (_DWORD)result )\n      {\n        v6 = 0;\n        do\n        {\n          *(_DWORD *)(sub_1007FEFE0(*(_QWORD *)(a1 + 688), v6++) + 1024) = *(_DWORD *)(a1 + 1168);\n          result = sub_1007FEF90(*(_QWORD *)(a1 + 688));\n        }\n        while ( v6 < (unsigned int)result );\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; ColorSelectPopup::updateCustomColorIdx from 0x100809bb0 to 0x100809c31 (129 bytes)\n; \n; 0 xrefs:\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 12:36:41 +0000\n; \npush    rbp                                                            ; +0x0, 0x100809bb0\nmov     rbp, rsp                                                       ; +0x1, 0x100809bb1\npush    r14                                                            ; +0x4, 0x100809bb4\npush    rbx                                                            ; +0x6, 0x100809bb6\nmov     ecx, [rdi+490h]                                                ; +0x7, 0x100809bb7\ncmp     ecx, 2                                                         ; +0xd, 0x100809bbd\nmov     eax, 1                                                         ; +0x10, 0x100809bc0\ncmovge  eax, ecx                                                       ; +0x15, 0x100809bc5\nmov     [rdi+490h], eax                                                ; +0x18, 0x100809bc8\nmov     rcx, [rdi+2A8h]                                                ; +0x1e, 0x100809bce\ntest    rcx, rcx                                                       ; +0x25, 0x100809bd5\njz      short loc_100809BE5                                            ; +0x28, 0x100809bd8\nmov     [rcx+400h], eax                                                ; +0x2a, 0x100809bda\npop     rbx                                                            ; +0x30, 0x100809be0\npop     r14                                                            ; +0x31, 0x100809be1\npop     rbp                                                            ; +0x33, 0x100809be3\nretn                                                                   ; +0x34, 0x100809be4\nmov     rbx, rdi                                                       ; +0x35, 0x100809be5\nmov     rdi, [rdi+2B0h]                                                ; +0x38, 0x100809be8\ntest    rdi, rdi                                                       ; +0x3f, 0x100809bef\njz      short loc_100809BE0                                            ; +0x42, 0x100809bf2\ncall    sub_1007FEF90                                                  ; +0x44, 0x100809bf4\ntest    eax, eax                                                       ; +0x49, 0x100809bf9\njz      short loc_100809BE0                                            ; +0x4b, 0x100809bfb\nxor     r14d, r14d                                                     ; +0x4d, 0x100809bfd\nmov     rdi, [rbx+2B0h]                                                ; +0x50, 0x100809c00\nmov     esi, r14d                                                      ; +0x57, 0x100809c07\ncall    sub_1007FEFE0                                                  ; +0x5a, 0x100809c0a\nmov     ecx, [rbx+490h]                                                ; +0x5f, 0x100809c0f\nmov     [rax+400h], ecx                                                ; +0x65, 0x100809c15\ninc     r14d                                                           ; +0x6b, 0x100809c1b\nmov     rdi, [rbx+2B0h]                                                ; +0x6e, 0x100809c1e\ncall    sub_1007FEF90                                                  ; +0x75, 0x100809c25\ncmp     r14d, eax                                                      ; +0x7a, 0x100809c2a\njb      short loc_100809C00                                            ; +0x7d, 0x100809c2d\njmp     short loc_100809BE0                                            ; +0x7f, 0x100809c2f", "xrefs": [], "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"}