{"type": "func", "start": 4296908752, "end": 4296908950, "name": "CustomizeObjectLayer::onUpdateCustomColor", "pseudocode": "// \n// CustomizeObjectLayer::onUpdateCustomColor from 0x1001d9fd0 to 0x1001da096 (198 bytes)\n// \n// 1 xrefs:\n// > CustomizeObjectLayer::init @ 0x1001d8596\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:25 +0000\n// \n\n__int64 __fastcall CustomizeObjectLayer::onUpdateCustomColor(__int64 a1, __int64 a2, double a3)\n{\n  char v3; // al\n  int v4; // eax\n  int v5; // ecx\n  int v6; // eax\n  int v7; // esi\n  __int64 CString; // rax\n  __int64 v9; // rax\n  const std::string::value_type *v10; // rsi\n  char v12; // [rsp-8h] [rbp-10h]\n\n  v12 = v3;\n  *(_BYTE *)(a1 + 922) = 1;\n  v4 = *(_DWORD *)(a1 + 748) + 2 * ((*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 1) - 1;\n  v5 = 10;\n  if ( v4 >= 11 )\n    v5 = v4;\n  v6 = 999;\n  if ( v5 < 999 )\n    v6 = v5;\n  *(_DWORD *)(a1 + 748) = v6;\n  CustomizeObjectLayer::updateCustomColorLabels(a1, a3);\n  CustomizeObjectLayer::updateSelected(a1, *(unsigned int *)(a1 + 748));\n  *(_BYTE *)(a1 + 922) = 0;\n  CustomizeObjectLayer::updateColorSprite(a1);\n  v7 = *(_DWORD *)(a1 + 748);\n  if ( v7 < 1000 )\n  {\n    if ( v7 <= 0 )\n    {\n      v10 = \" \";\n      return (*(__int64 (__fastcall **)(_QWORD, const std::string::value_type *))(**(_QWORD **)(a1 + 808) + 928LL))(\n               *(_QWORD *)(a1 + 808),\n               v10);\n    }\n    v9 = sub_10088E820(\"%i\", v12);\n    CString = cocos2d::CCString::getCString(v9);\n  }\n  else\n  {\n    CString = GJSpecialColorSelect::textForColorIdx((unsigned int)v7);\n  }\n  v10 = (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           v10);\n}", "assembly": "; \n; CustomizeObjectLayer::onUpdateCustomColor from 0x1001d9fd0 to 0x1001da096 (198 bytes)\n; \n; 1 xrefs:\n; > CustomizeObjectLayer::init @ 0x1001d8596\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:25 +0000\n; \npush    rbp                                                            ; +0x0, 0x1001d9fd0\nmov     rbp, rsp                                                       ; +0x1, 0x1001d9fd1\npush    rbx                                                            ; +0x4, 0x1001d9fd4\npush    rax; char                                                      ; +0x5, 0x1001d9fd5\nmov     rbx, rdi                                                       ; +0x6, 0x1001d9fd6\nmov     byte ptr [rdi+39Ah], 1                                         ; +0x9, 0x1001d9fd9\nmov     rax, [rsi]                                                     ; +0x10, 0x1001d9fe0\nmov     rdi, rsi                                                       ; +0x13, 0x1001d9fe3\ncall    qword ptr [rax+40h]                                            ; +0x16, 0x1001d9fe6\nxor     ecx, ecx                                                       ; +0x19, 0x1001d9fe9\ncmp     eax, 1                                                         ; +0x1b, 0x1001d9feb\nsetz    cl                                                             ; +0x1e, 0x1001d9fee\nmov     eax, [rbx+2ECh]                                                ; +0x21, 0x1001d9ff1\nlea     eax, [rax+rcx*2]                                               ; +0x27, 0x1001d9ff7\ndec     eax                                                            ; +0x2a, 0x1001d9ffa\ncmp     eax, 0Bh                                                       ; +0x2c, 0x1001d9ffc\nmov     ecx, 0Ah                                                       ; +0x2f, 0x1001d9fff\ncmovge  ecx, eax                                                       ; +0x34, 0x1001da004\ncmp     ecx, 3E7h                                                      ; +0x37, 0x1001da007\nmov     eax, 3E7h                                                      ; +0x3d, 0x1001da00d\ncmovl   eax, ecx                                                       ; +0x42, 0x1001da012\nmov     [rbx+2ECh], eax                                                ; +0x45, 0x1001da015\nmov     rdi, rbx                                                       ; +0x4b, 0x1001da01b\ncall    CustomizeObjectLayer__updateCustomColorLabels                  ; +0x4e, 0x1001da01e\nmov     esi, [rbx+2ECh]                                                ; +0x53, 0x1001da023\nmov     rdi, rbx                                                       ; +0x59, 0x1001da029\ncall    CustomizeObjectLayer__updateSelected                           ; +0x5c, 0x1001da02c\nmov     byte ptr [rbx+39Ah], 0                                         ; +0x61, 0x1001da031\nmov     rdi, rbx                                                       ; +0x68, 0x1001da038\ncall    CustomizeObjectLayer__updateColorSprite                        ; +0x6b, 0x1001da03b\nmov     esi, [rbx+2ECh]                                                ; +0x70, 0x1001da040\ncmp     esi, 3E8h                                                      ; +0x76, 0x1001da046\njl      short loc_1001DA057                                            ; +0x7c, 0x1001da04c\nmov     edi, esi                                                       ; +0x7e, 0x1001da04e\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0x80, 0x1001da050\njmp     short loc_1001DA071                                            ; +0x85, 0x1001da055\ntest    esi, esi                                                       ; +0x87, 0x1001da057\njle     short loc_1001DA08D                                            ; +0x89, 0x1001da059\nlea     rdi, aI_14; \"%i\"                                               ; +0x8b, 0x1001da05b\nxor     eax, eax                                                       ; +0x92, 0x1001da062\ncall    sub_10088E820                                                  ; +0x94, 0x1001da064\nmov     rdi, rax                                                       ; +0x99, 0x1001da069\ncall    cocos2d__CCString__getCString                                  ; +0x9c, 0x1001da06c\nmov     rsi, rax                                                       ; +0xa1, 0x1001da071\nmov     rdi, [rbx+328h]                                                ; +0xa4, 0x1001da074\nmov     rax, [rdi]                                                     ; +0xab, 0x1001da07b\nmov     rax, [rax+3A0h]                                                ; +0xae, 0x1001da07e\nadd     rsp, 8                                                         ; +0xb5, 0x1001da085\npop     rbx                                                            ; +0xb9, 0x1001da089\npop     rbp                                                            ; +0xba, 0x1001da08a\njmp     rax                                                            ; +0xbb, 0x1001da08b\nlea     rsi, asc_100A41844; \" \"                                        ; +0xbd, 0x1001da08d\njmp     short loc_1001DA074                                            ; +0xc4, 0x1001da094", "xrefs": ["CustomizeObjectLayer::init @ 0x1001d8596"], "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"}