{"type": "func", "start": 4297030336, "end": 4297030534, "name": "CustomizeObjectLayer::onUpdateCustomColor", "pseudocode": "// \n// CustomizeObjectLayer::onUpdateCustomColor from 0x1001f7ac0 to 0x1001f7b86 (198 bytes)\n// \n// 1 xrefs:\n// > CustomizeObjectLayer::init @ 0x1001f61e6\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall CustomizeObjectLayer::onUpdateCustomColor(CustomizeObjectLayer *a1, cocos2d::CCObject *a2)\n{\n  char v2; // al\n  int v3; // eax\n  int v4; // ecx\n  int v5; // eax\n  int m_customColorChannel; // esi\n  const char *CString; // rax\n  cocos2d::CCString *v8; // rax\n  const std::string::value_type *v9; // rsi\n  char v10; // [rsp-8h] [rbp-10h]\n\n  v10 = v2;\n  a1->m_disableTextDelegate = 1;\n  v3 = a1->m_customColorChannel + 2 * (((unsigned int (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2) == 1) - 1;\n  v4 = 10;\n  if ( v3 >= 11 )\n    v4 = v3;\n  v5 = 999;\n  if ( v4 < 999 )\n    v5 = v4;\n  a1->m_customColorChannel = v5;\n  CustomizeObjectLayer::updateCustomColorLabels(a1);\n  CustomizeObjectLayer::updateSelected(a1, a1->m_customColorChannel);\n  a1->m_disableTextDelegate = 0;\n  CustomizeObjectLayer::updateColorSprite(a1);\n  m_customColorChannel = a1->m_customColorChannel;\n  if ( m_customColorChannel < 1000 )\n  {\n    if ( m_customColorChannel <= 0 )\n    {\n      v9 = \" \";\n      goto LABEL_10;\n    }\n    v8 = (cocos2d::CCString *)sub_1007AB580(\"%i\", v10);\n    CString = cocos2d::CCString::getCString(v8);\n  }\n  else\n  {\n    CString = GJSpecialColorSelect::textForColorIdx(m_customColorChannel);\n  }\n  v9 = CString;\nLABEL_10:\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const std::string::value_type *))a1->m_selectedColorLabel->setString)(\n    a1->m_selectedColorLabel,\n    v9);\n}", "assembly": "; \n; CustomizeObjectLayer::onUpdateCustomColor from 0x1001f7ac0 to 0x1001f7b86 (198 bytes)\n; \n; 1 xrefs:\n; > CustomizeObjectLayer::init @ 0x1001f61e6\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rbp                                                            ; +0x0, 0x1001f7ac0\nmov     rbp, rsp                                                       ; +0x1, 0x1001f7ac1\npush    rbx                                                            ; +0x4, 0x1001f7ac4\npush    rax; char                                                      ; +0x5, 0x1001f7ac5\nmov     rbx, rdi                                                       ; +0x6, 0x1001f7ac6\nmov     byte ptr [rdi+382h], 1                                         ; +0x9, 0x1001f7ac9\nmov     rax, [rsi]                                                     ; +0x10, 0x1001f7ad0\nmov     rdi, rsi                                                       ; +0x13, 0x1001f7ad3\ncall    qword ptr [rax+40h]                                            ; +0x16, 0x1001f7ad6\nxor     ecx, ecx                                                       ; +0x19, 0x1001f7ad9\ncmp     eax, 1                                                         ; +0x1b, 0x1001f7adb\nsetz    cl                                                             ; +0x1e, 0x1001f7ade\nmov     eax, [rbx+2D4h]                                                ; +0x21, 0x1001f7ae1\nlea     eax, [rax+rcx*2]                                               ; +0x27, 0x1001f7ae7\ndec     eax                                                            ; +0x2a, 0x1001f7aea\ncmp     eax, 0Bh                                                       ; +0x2c, 0x1001f7aec\nmov     ecx, 0Ah                                                       ; +0x2f, 0x1001f7aef\ncmovge  ecx, eax                                                       ; +0x34, 0x1001f7af4\ncmp     ecx, 3E7h                                                      ; +0x37, 0x1001f7af7\nmov     eax, 3E7h                                                      ; +0x3d, 0x1001f7afd\ncmovl   eax, ecx                                                       ; +0x42, 0x1001f7b02\nmov     [rbx+2D4h], eax                                                ; +0x45, 0x1001f7b05\nmov     rdi, rbx                                                       ; +0x4b, 0x1001f7b0b\ncall    CustomizeObjectLayer__updateCustomColorLabels                  ; +0x4e, 0x1001f7b0e\nmov     esi, [rbx+2D4h]                                                ; +0x53, 0x1001f7b13\nmov     rdi, rbx                                                       ; +0x59, 0x1001f7b19\ncall    CustomizeObjectLayer__updateSelected                           ; +0x5c, 0x1001f7b1c\nmov     byte ptr [rbx+382h], 0                                         ; +0x61, 0x1001f7b21\nmov     rdi, rbx                                                       ; +0x68, 0x1001f7b28\ncall    CustomizeObjectLayer__updateColorSprite                        ; +0x6b, 0x1001f7b2b\nmov     esi, [rbx+2D4h]                                                ; +0x70, 0x1001f7b30\ncmp     esi, 3E8h                                                      ; +0x76, 0x1001f7b36\njl      short loc_1001F7B47                                            ; +0x7c, 0x1001f7b3c\nmov     edi, esi                                                       ; +0x7e, 0x1001f7b3e\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0x80, 0x1001f7b40\njmp     short loc_1001F7B61                                            ; +0x85, 0x1001f7b45\ntest    esi, esi                                                       ; +0x87, 0x1001f7b47\njle     short loc_1001F7B7D                                            ; +0x89, 0x1001f7b49\nlea     rdi, aI; \"%i\"                                                  ; +0x8b, 0x1001f7b4b\nxor     eax, eax                                                       ; +0x92, 0x1001f7b52\ncall    sub_1007AB580                                                  ; +0x94, 0x1001f7b54\nmov     rdi, rax                                                       ; +0x99, 0x1001f7b59\ncall    cocos2d__CCString__getCString                                  ; +0x9c, 0x1001f7b5c\nmov     rsi, rax                                                       ; +0xa1, 0x1001f7b61\nmov     rdi, [rbx+310h]                                                ; +0xa4, 0x1001f7b64\nmov     rax, [rdi]                                                     ; +0xab, 0x1001f7b6b\nmov     rax, [rax+390h]                                                ; +0xae, 0x1001f7b6e\nadd     rsp, 8                                                         ; +0xb5, 0x1001f7b75\npop     rbx                                                            ; +0xb9, 0x1001f7b79\npop     rbp                                                            ; +0xba, 0x1001f7b7a\njmp     rax                                                            ; +0xbb, 0x1001f7b7b\nlea     rsi, asc_100823F54; \" \"                                        ; +0xbd, 0x1001f7b7d\njmp     short loc_1001F7B64                                            ; +0xc4, 0x1001f7b84", "xrefs": ["CustomizeObjectLayer::init @ 0x1001f61e6"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}