{"type": "func", "start": 5370033888, "end": 5370034091, "name": "CustomizeObjectLayer::onUpdateCustomColor", "pseudocode": "// \n// CustomizeObjectLayer::onUpdateCustomColor from 0x1401436e0 to 0x1401437ab (203 bytes)\n// \n// 2 xrefs:\n// > CustomizeObjectLayer::init @ 0x1401408ec\n// > <???> @ 0x140917408\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:10 +0000\n// \n\n__int64 __fastcall CustomizeObjectLayer::onUpdateCustomColor(__int64 a1, __int64 a2)\n{\n  int v3; // eax\n  int v4; // edx\n  int v5; // ecx\n  int v6; // eax\n  __int64 v7; // rdx\n  int v8; // edx\n  const char *CString; // rdx\n  cocos2d::CCString *v10; // rax\n\n  *(_BYTE *)(a1 + 922) = 1;\n  v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  v4 = 1;\n  if ( v3 != 1 )\n    v4 = -1;\n  v5 = v4 + *(_DWORD *)(a1 + 748);\n  if ( v5 >= 10 )\n  {\n    v6 = 999;\n    if ( v5 > 999 )\n      goto LABEL_7;\n  }\n  else\n  {\n    v5 = 10;\n  }\n  v6 = v5;\nLABEL_7:\n  *(_DWORD *)(a1 + 748) = v6;\n  CustomizeObjectLayer::updateCustomColorLabels(a1);\n  CustomizeObjectLayer::updateSelected(a1);\n  *(_BYTE *)(a1 + 922) = 0;\n  CustomizeObjectLayer::updateColorSprite(a1, v7);\n  v8 = *(_DWORD *)(a1 + 748);\n  if ( v8 < 1000 )\n  {\n    if ( v8 <= 0 )\n    {\n      CString = \" \";\n    }\n    else\n    {\n      v10 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8);\n      CString = cocos2d::CCString::getCString(v10);\n    }\n  }\n  else\n  {\n    CString = (const char *)GJSpecialColorSelect::textForColorIdx((unsigned int)v8);\n  }\n  return (**(__int64 (__fastcall ***)(__int64, const char *))(*(_QWORD *)(a1 + 808) + 360LL))(\n           *(_QWORD *)(a1 + 808) + 360LL,\n           CString);\n}", "assembly": "; \n; CustomizeObjectLayer::onUpdateCustomColor from 0x1401436e0 to 0x1401437ab (203 bytes)\n; \n; 2 xrefs:\n; > CustomizeObjectLayer::init @ 0x1401408ec\n; > <???> @ 0x140917408\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:10 +0000\n; \npush    rbx                                                            ; +0x0, 0x1401436e0\nsub     rsp, 20h                                                       ; +0x2, 0x1401436e2\nmov     byte ptr [rcx+39Ah], 1                                         ; +0x6, 0x1401436e6\nmov     rbx, rcx                                                       ; +0xd, 0x1401436ed\nmov     rax, [rdx]                                                     ; +0x10, 0x1401436f0\nmov     rcx, rdx                                                       ; +0x13, 0x1401436f3\ncall    qword ptr [rax+38h]                                            ; +0x16, 0x1401436f6\nmov     edx, 1                                                         ; +0x19, 0x1401436f9\nmov     ecx, 0FFFFFFFFh                                                ; +0x1e, 0x1401436fe\ncmp     eax, edx                                                       ; +0x23, 0x140143703\ncmovnz  edx, ecx                                                       ; +0x25, 0x140143705\nmov     ecx, [rbx+2ECh]                                                ; +0x28, 0x140143708\nadd     ecx, edx                                                       ; +0x2e, 0x14014370e\ncmp     ecx, 0Ah                                                       ; +0x30, 0x140143710\njge     short loc_14014371C                                            ; +0x33, 0x140143713\nmov     ecx, 0Ah                                                       ; +0x35, 0x140143715\njmp     short loc_140143725                                            ; +0x3a, 0x14014371a\nmov     eax, 3E7h                                                      ; +0x3c, 0x14014371c\ncmp     ecx, eax                                                       ; +0x41, 0x140143721\njg      short loc_140143727                                            ; +0x43, 0x140143723\nmov     eax, ecx                                                       ; +0x45, 0x140143725\nmov     rcx, rbx                                                       ; +0x47, 0x140143727\nmov     [rbx+2ECh], eax                                                ; +0x4a, 0x14014372a\ncall    CustomizeObjectLayer__updateCustomColorLabels                  ; +0x50, 0x140143730\nmov     edx, [rbx+2ECh]                                                ; +0x55, 0x140143735\nmov     rcx, rbx                                                       ; +0x5b, 0x14014373b\ncall    CustomizeObjectLayer__updateSelected                           ; +0x5e, 0x14014373e\nmov     rcx, rbx                                                       ; +0x63, 0x140143743\nmov     byte ptr [rbx+39Ah], 0                                         ; +0x66, 0x140143746\ncall    CustomizeObjectLayer__updateColorSprite                        ; +0x6d, 0x14014374d\nmov     edx, [rbx+2ECh]                                                ; +0x72, 0x140143752\ncmp     edx, 3E8h                                                      ; +0x78, 0x140143758\njl      short loc_14014376C                                            ; +0x7e, 0x14014375e\nmov     ecx, edx                                                       ; +0x80, 0x140143760\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0x82, 0x140143762\nmov     rdx, rax                                                       ; +0x87, 0x140143767\njmp     short loc_140143792                                            ; +0x8a, 0x14014376a\ntest    edx, edx                                                       ; +0x8c, 0x14014376c\njle     short loc_14014378B                                            ; +0x8e, 0x14014376e\nlea     rcx, word_1406ED6F8                                            ; +0x90, 0x140143770\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x97, 0x140143777\nmov     rcx, rax                                                       ; +0x9d, 0x14014377d\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xa0, 0x140143780\nmov     rdx, rax                                                       ; +0xa6, 0x140143786\njmp     short loc_140143792                                            ; +0xa9, 0x140143789\nlea     rdx, asc_1406ED6E4; \" \"                                        ; +0xab, 0x14014378b\nmov     rcx, [rbx+328h]                                                ; +0xb2, 0x140143792\nadd     rcx, 168h                                                      ; +0xb9, 0x140143799\nmov     rax, [rcx]                                                     ; +0xc0, 0x1401437a0\nadd     rsp, 20h                                                       ; +0xc3, 0x1401437a3\npop     rbx                                                            ; +0xc7, 0x1401437a7\njmp     qword ptr [rax]                                                ; +0xc8, 0x1401437a8", "xrefs": ["CustomizeObjectLayer::init @ 0x1401408ec", "<???> @ 0x140917408"], "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"}