{"type": "func", "start": 4296912352, "end": 4296912617, "name": "CustomizeObjectLayer::colorSetupClosed", "pseudocode": "// \n// CustomizeObjectLayer::colorSetupClosed from 0x1001dade0 to 0x1001daee9 (265 bytes)\n// \n// 2 xrefs:\n// > sub_1001DB230 @ 0x1001db23c\n// > <???> @ 0x100add9f0\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:26:26 +0000\n// \n\n__int64 __fastcall CustomizeObjectLayer::colorSetupClosed(__int64 a1, __int64 a2, double a3)\n{\n  char v3; // al\n  int v4; // r14d\n  int v5; // r15d\n  __int64 v6; // rsi\n  unsigned int v7; // r12d\n  __int64 v8; // r13\n  __int64 CString; // rax\n  __int64 v10; // rax\n  const std::string::value_type *v11; // rsi\n  char v13; // [rsp-8h] [rbp-30h]\n\n  v13 = v3;\n  v4 = a2;\n  CustomizeObjectLayer::updateSelected(a1, a2);\n  v5 = a2;\n  if ( (unsigned int)(a2 - 10) <= 0x3DD )\n  {\n    *(_DWORD *)(a1 + 748) = a2;\n    *(_BYTE *)(a1 + 922) = 1;\n    CustomizeObjectLayer::updateCustomColorLabels(a1);\n    *(_BYTE *)(a1 + 922) = 0;\n    v5 = 1008;\n  }\n  v6 = 0;\n  if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 704)) )\n  {\n    v7 = 0;\n    while ( 1 )\n    {\n      v8 = sub_1007FEFE0(*(_QWORD *)(a1 + 704), v7);\n      if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v8 + 64LL))(v8) == v5 )\n        break;\n      if ( ++v7 >= (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 704)) )\n      {\n        v6 = 0;\n        goto LABEL_9;\n      }\n    }\n    v6 = v8;\n  }\nLABEL_9:\n  CustomizeObjectLayer::highlightSelected(a1, v6);\n  CustomizeObjectLayer::updateColorSprite(a1, a3);\n  if ( v4 < 1000 )\n  {\n    if ( v4 <= 0 )\n    {\n      v11 = \" \";\n      return (*(__int64 (__fastcall **)(_QWORD, const std::string::value_type *))(**(_QWORD **)(a1 + 808) + 928LL))(\n               *(_QWORD *)(a1 + 808),\n               v11);\n    }\n    v10 = sub_10088E820(\"%i\", v13);\n    CString = cocos2d::CCString::getCString(v10);\n  }\n  else\n  {\n    CString = GJSpecialColorSelect::textForColorIdx((unsigned int)v4);\n  }\n  v11 = (const std::string::value_type *)CString;\n  return (*(__int64 (__fastcall **)(_QWORD, const std::string::value_type *))(**(_QWORD **)(a1 + 808) + 928LL))(\n           *(_QWORD *)(a1 + 808),\n           v11);\n}", "assembly": "; \n; CustomizeObjectLayer::colorSetupClosed from 0x1001dade0 to 0x1001daee9 (265 bytes)\n; \n; 2 xrefs:\n; > sub_1001DB230 @ 0x1001db23c\n; > <???> @ 0x100add9f0\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:26:26 +0000\n; \npush    rbp                                                            ; +0x0, 0x1001dade0\nmov     rbp, rsp                                                       ; +0x1, 0x1001dade1\npush    r15                                                            ; +0x4, 0x1001dade4\npush    r14                                                            ; +0x6, 0x1001dade6\npush    r13                                                            ; +0x8, 0x1001dade8\npush    r12                                                            ; +0xa, 0x1001dadea\npush    rbx                                                            ; +0xc, 0x1001dadec\npush    rax; char                                                      ; +0xd, 0x1001daded\nmov     r14d, esi                                                      ; +0xe, 0x1001dadee\nmov     rbx, rdi                                                       ; +0x11, 0x1001dadf1\ncall    CustomizeObjectLayer__updateSelected                           ; +0x14, 0x1001dadf4\nlea     eax, [r14-0Ah]                                                 ; +0x19, 0x1001dadf9\nmov     r15d, r14d                                                     ; +0x1d, 0x1001dadfd\ncmp     eax, 3DDh                                                      ; +0x20, 0x1001dae00\nja      short loc_1001DAE2A                                            ; +0x25, 0x1001dae05\nmov     [rbx+2ECh], r14d                                               ; +0x27, 0x1001dae07\nmov     byte ptr [rbx+39Ah], 1                                         ; +0x2e, 0x1001dae0e\nmov     rdi, rbx                                                       ; +0x35, 0x1001dae15\ncall    CustomizeObjectLayer__updateCustomColorLabels                  ; +0x38, 0x1001dae18\nmov     byte ptr [rbx+39Ah], 0                                         ; +0x3d, 0x1001dae1d\nmov     r15d, 3F0h                                                     ; +0x44, 0x1001dae24\nmov     rdi, [rbx+2C0h]                                                ; +0x4a, 0x1001dae2a\ncall    sub_1007FEF90                                                  ; +0x51, 0x1001dae31\nxor     esi, esi                                                       ; +0x56, 0x1001dae36\ntest    eax, eax                                                       ; +0x58, 0x1001dae38\njz      short loc_1001DAE7B                                            ; +0x5a, 0x1001dae3a\nxor     r12d, r12d                                                     ; +0x5c, 0x1001dae3c\nnop                                                                    ; +0x5f, 0x1001dae3f\nmov     rdi, [rbx+2C0h]                                                ; +0x60, 0x1001dae40\nmov     esi, r12d                                                      ; +0x67, 0x1001dae47\ncall    sub_1007FEFE0                                                  ; +0x6a, 0x1001dae4a\nmov     r13, rax                                                       ; +0x6f, 0x1001dae4f\nmov     rax, [rax]                                                     ; +0x72, 0x1001dae52\nmov     rdi, r13                                                       ; +0x75, 0x1001dae55\ncall    qword ptr [rax+40h]                                            ; +0x78, 0x1001dae58\ncmp     eax, r15d                                                      ; +0x7b, 0x1001dae5b\njz      short loc_1001DAE78                                            ; +0x7e, 0x1001dae5e\ninc     r12d                                                           ; +0x80, 0x1001dae60\nmov     rdi, [rbx+2C0h]                                                ; +0x83, 0x1001dae63\ncall    sub_1007FEF90                                                  ; +0x8a, 0x1001dae6a\ncmp     r12d, eax                                                      ; +0x8f, 0x1001dae6f\njb      short loc_1001DAE40                                            ; +0x92, 0x1001dae72\nxor     esi, esi                                                       ; +0x94, 0x1001dae74\njmp     short loc_1001DAE7B                                            ; +0x96, 0x1001dae76\nmov     rsi, r13                                                       ; +0x98, 0x1001dae78\nmov     rdi, rbx                                                       ; +0x9b, 0x1001dae7b\ncall    CustomizeObjectLayer__highlightSelected                        ; +0x9e, 0x1001dae7e\nmov     rdi, rbx                                                       ; +0xa3, 0x1001dae83\ncall    CustomizeObjectLayer__updateColorSprite                        ; +0xa6, 0x1001dae86\ncmp     r14d, 3E8h                                                     ; +0xab, 0x1001dae8b\njl      short loc_1001DAE9E                                            ; +0xb2, 0x1001dae92\nmov     edi, r14d                                                      ; +0xb4, 0x1001dae94\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0xb7, 0x1001dae97\njmp     short loc_1001DAEBC                                            ; +0xbc, 0x1001dae9c\ntest    r14d, r14d                                                     ; +0xbe, 0x1001dae9e\njle     short loc_1001DAEE0                                            ; +0xc1, 0x1001daea1\nlea     rdi, aI_14; \"%i\"                                               ; +0xc3, 0x1001daea3\nmov     esi, r14d                                                      ; +0xca, 0x1001daeaa\nxor     eax, eax                                                       ; +0xcd, 0x1001daead\ncall    sub_10088E820                                                  ; +0xcf, 0x1001daeaf\nmov     rdi, rax                                                       ; +0xd4, 0x1001daeb4\ncall    cocos2d__CCString__getCString                                  ; +0xd7, 0x1001daeb7\nmov     rsi, rax                                                       ; +0xdc, 0x1001daebc\nmov     rdi, [rbx+328h]                                                ; +0xdf, 0x1001daebf\nmov     rax, [rdi]                                                     ; +0xe6, 0x1001daec6\nmov     rax, [rax+3A0h]                                                ; +0xe9, 0x1001daec9\nadd     rsp, 8                                                         ; +0xf0, 0x1001daed0\npop     rbx                                                            ; +0xf4, 0x1001daed4\npop     r12                                                            ; +0xf5, 0x1001daed5\npop     r13                                                            ; +0xf7, 0x1001daed7\npop     r14                                                            ; +0xf9, 0x1001daed9\npop     r15                                                            ; +0xfb, 0x1001daedb\npop     rbp                                                            ; +0xfd, 0x1001daedd\njmp     rax                                                            ; +0xfe, 0x1001daede\nlea     rsi, asc_100A41844; \" \"                                        ; +0x100, 0x1001daee0\njmp     short loc_1001DAEBF                                            ; +0x107, 0x1001daee7", "xrefs": ["sub_1001DB230 @ 0x1001db23c", "<???> @ 0x100add9f0"], "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"}