{"type": "func", "start": 4303385152, "end": 4303385361, "name": "ColorSelectPopup::onUpdateCustomColor", "pseudocode": "// \n// ColorSelectPopup::onUpdateCustomColor from 0x100807240 to 0x100807311 (209 bytes)\n// \n// 1 xrefs:\n// > ColorSelectPopup::init @ 0x10080554a\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:40 +0000\n// \n\n__int64 __fastcall ColorSelectPopup::onUpdateCustomColor(__int64 a1, __int64 a2)\n{\n  int v3; // eax\n  int v4; // ecx\n  int v5; // eax\n  int v6; // eax\n  __int64 v7; // rcx\n  __int64 v9; // rdi\n  unsigned int v10; // r14d\n\n  if ( *(int *)(a1 + 1168) >= 1000 )\n    *(_DWORD *)(a1 + 1168) = 0;\n  v3 = *(_DWORD *)(a1 + 1168) + 2 * ((*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 1) - 1;\n  v4 = 0;\n  if ( v3 > 0 )\n    v4 = v3;\n  v5 = 999;\n  if ( v4 < 999 )\n    v5 = v4;\n  v6 = (v5 == 0) + v5;\n  *(_DWORD *)(a1 + 1168) = v6;\n  v7 = *(_QWORD *)(a1 + 680);\n  if ( v7 )\n  {\n    *(_DWORD *)(v7 + 1024) = v6;\n  }\n  else\n  {\n    v9 = *(_QWORD *)(a1 + 688);\n    if ( v9 && (unsigned int)sub_1007FEF90(v9) )\n    {\n      v10 = 0;\n      do\n        *(_DWORD *)(sub_1007FEFE0(*(_QWORD *)(a1 + 688), v10++) + 1024) = *(_DWORD *)(a1 + 1168);\n      while ( v10 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 688)) );\n    }\n  }\n  SetupTriggerPopup::updateEditorLabel(a1);\n  return ColorSelectPopup::updateTextInputLabel(a1);\n}", "assembly": "; \n; ColorSelectPopup::onUpdateCustomColor from 0x100807240 to 0x100807311 (209 bytes)\n; \n; 1 xrefs:\n; > ColorSelectPopup::init @ 0x10080554a\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:40 +0000\n; \npush    rbp                                                            ; +0x0, 0x100807240\nmov     rbp, rsp                                                       ; +0x1, 0x100807241\npush    r14                                                            ; +0x4, 0x100807244\npush    rbx                                                            ; +0x6, 0x100807246\nmov     rbx, rdi                                                       ; +0x7, 0x100807247\ncmp     dword ptr [rdi+490h], 3E8h                                     ; +0xa, 0x10080724a\njl      short loc_100807260                                            ; +0x14, 0x100807254\nmov     dword ptr [rbx+490h], 0                                        ; +0x16, 0x100807256\nmov     rax, [rsi]                                                     ; +0x20, 0x100807260\nmov     rdi, rsi                                                       ; +0x23, 0x100807263\ncall    qword ptr [rax+40h]                                            ; +0x26, 0x100807266\nxor     ecx, ecx                                                       ; +0x29, 0x100807269\ncmp     eax, 1                                                         ; +0x2b, 0x10080726b\nsetz    cl                                                             ; +0x2e, 0x10080726e\nmov     eax, [rbx+490h]                                                ; +0x31, 0x100807271\nlea     eax, [rax+rcx*2]                                               ; +0x37, 0x100807277\ndec     eax                                                            ; +0x3a, 0x10080727a\nxor     ecx, ecx                                                       ; +0x3c, 0x10080727c\ntest    eax, eax                                                       ; +0x3e, 0x10080727e\ncmovg   ecx, eax                                                       ; +0x40, 0x100807280\ncmp     ecx, 3E7h                                                      ; +0x43, 0x100807283\nmov     eax, 3E7h                                                      ; +0x49, 0x100807289\ncmovl   eax, ecx                                                       ; +0x4e, 0x10080728e\ncmp     eax, 1                                                         ; +0x51, 0x100807291\nadc     eax, 0                                                         ; +0x54, 0x100807294\nmov     [rbx+490h], eax                                                ; +0x57, 0x100807297\nmov     rcx, [rbx+2A8h]                                                ; +0x5d, 0x10080729d\ntest    rcx, rcx                                                       ; +0x64, 0x1008072a4\njz      short loc_1008072C3                                            ; +0x67, 0x1008072a7\nmov     [rcx+400h], eax                                                ; +0x69, 0x1008072a9\nmov     rdi, rbx                                                       ; +0x6f, 0x1008072af\ncall    SetupTriggerPopup__updateEditorLabel                           ; +0x72, 0x1008072b2\nmov     rdi, rbx                                                       ; +0x77, 0x1008072b7\npop     rbx                                                            ; +0x7a, 0x1008072ba\npop     r14                                                            ; +0x7b, 0x1008072bb\npop     rbp                                                            ; +0x7d, 0x1008072bd\njmp     ColorSelectPopup__updateTextInputLabel                         ; +0x7e, 0x1008072be\nmov     rdi, [rbx+2B0h]                                                ; +0x83, 0x1008072c3\ntest    rdi, rdi                                                       ; +0x8a, 0x1008072ca\njz      short loc_1008072AF                                            ; +0x8d, 0x1008072cd\ncall    sub_1007FEF90                                                  ; +0x8f, 0x1008072cf\ntest    eax, eax                                                       ; +0x94, 0x1008072d4\njz      short loc_1008072AF                                            ; +0x96, 0x1008072d6\nxor     r14d, r14d                                                     ; +0x98, 0x1008072d8\nnop     dword ptr [rax+rax+00h]                                        ; +0x9b, 0x1008072db\nmov     rdi, [rbx+2B0h]                                                ; +0xa0, 0x1008072e0\nmov     esi, r14d                                                      ; +0xa7, 0x1008072e7\ncall    sub_1007FEFE0                                                  ; +0xaa, 0x1008072ea\nmov     ecx, [rbx+490h]                                                ; +0xaf, 0x1008072ef\nmov     [rax+400h], ecx                                                ; +0xb5, 0x1008072f5\ninc     r14d                                                           ; +0xbb, 0x1008072fb\nmov     rdi, [rbx+2B0h]                                                ; +0xbe, 0x1008072fe\ncall    sub_1007FEF90                                                  ; +0xc5, 0x100807305\ncmp     r14d, eax                                                      ; +0xca, 0x10080730a\njb      short loc_1008072E0                                            ; +0xcd, 0x10080730d\njmp     short loc_1008072AF                                            ; +0xcf, 0x10080730f", "xrefs": ["ColorSelectPopup::init @ 0x10080554a"], "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"}