{"type": "func", "start": 5370035776, "end": 5370035954, "name": "CustomizeObjectLayer::onSelectColor", "pseudocode": "// \n// CustomizeObjectLayer::onSelectColor from 0x140143e40 to 0x140143ef2 (178 bytes)\n// \n// 4 xrefs:\n// > CustomizeObjectLayer::init @ 0x14013fff5\n// > CustomizeObjectLayer::init @ 0x14014029c\n// > CustomizeObjectLayer::init @ 0x1401404b2\n// > <???> @ 0x14091745c\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::onSelectColor(__int64 a1, __int64 a2)\n{\n  __int64 v4; // rax\n  __int64 v5; // rdx\n  int ActiveMode; // eax\n  const char *CString; // rdx\n  cocos2d::CCString *v8; // rax\n\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  CustomizeObjectLayer::updateSelected(a1);\n  v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 952LL))(a2);\n  CustomizeObjectLayer::highlightSelected(a1, v4);\n  CustomizeObjectLayer::updateColorSprite(a1, v5);\n  ActiveMode = CustomizeObjectLayer::getActiveMode(a1, 1);\n  if ( ActiveMode < 1000 )\n  {\n    if ( ActiveMode <= 0 )\n    {\n      CString = \" \";\n    }\n    else\n    {\n      v8 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)ActiveMode);\n      CString = cocos2d::CCString::getCString(v8);\n    }\n  }\n  else\n  {\n    CString = (const char *)GJSpecialColorSelect::textForColorIdx((unsigned int)ActiveMode);\n  }\n  return (**(__int64 (__fastcall ***)(__int64, const char *))(*(_QWORD *)(a1 + 808) + 360LL))(\n           *(_QWORD *)(a1 + 808) + 360LL,\n           CString);\n}", "assembly": "; \n; CustomizeObjectLayer::onSelectColor from 0x140143e40 to 0x140143ef2 (178 bytes)\n; \n; 4 xrefs:\n; > CustomizeObjectLayer::init @ 0x14013fff5\n; > CustomizeObjectLayer::init @ 0x14014029c\n; > CustomizeObjectLayer::init @ 0x1401404b2\n; > <???> @ 0x14091745c\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; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140143e40\npush    rdi                                                            ; +0x5, 0x140143e45\nsub     rsp, 20h                                                       ; +0x6, 0x140143e46\nmov     rax, [rdx]                                                     ; +0xa, 0x140143e4a\nmov     rbx, rcx                                                       ; +0xd, 0x140143e4d\nmov     rcx, rdx                                                       ; +0x10, 0x140143e50\nmov     rdi, rdx                                                       ; +0x13, 0x140143e53\ncall    qword ptr [rax+38h]                                            ; +0x16, 0x140143e56\ncmp     eax, 3F0h                                                      ; +0x19, 0x140143e59\njnz     short loc_140143E66                                            ; +0x1e, 0x140143e5e\nmov     eax, [rbx+2ECh]                                                ; +0x20, 0x140143e60\nmov     edx, eax                                                       ; +0x26, 0x140143e66\nmov     rcx, rbx                                                       ; +0x28, 0x140143e68\ncall    CustomizeObjectLayer__updateSelected                           ; +0x2b, 0x140143e6b\nmov     rax, [rdi]                                                     ; +0x30, 0x140143e70\nmov     rcx, rdi                                                       ; +0x33, 0x140143e73\ncall    qword ptr [rax+3B8h]                                           ; +0x36, 0x140143e76\nmov     rdx, rax                                                       ; +0x3c, 0x140143e7c\nmov     rcx, rbx                                                       ; +0x3f, 0x140143e7f\ncall    CustomizeObjectLayer__highlightSelected                        ; +0x42, 0x140143e82\nmov     rcx, rbx                                                       ; +0x47, 0x140143e87\ncall    CustomizeObjectLayer__updateColorSprite                        ; +0x4a, 0x140143e8a\nmov     dl, 1                                                          ; +0x4f, 0x140143e8f\nmov     rcx, rbx                                                       ; +0x51, 0x140143e91\ncall    CustomizeObjectLayer__getActiveMode                            ; +0x54, 0x140143e94\ncmp     eax, 3E8h                                                      ; +0x59, 0x140143e99\njl      short loc_140143EAC                                            ; +0x5e, 0x140143e9e\nmov     ecx, eax                                                       ; +0x60, 0x140143ea0\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0x62, 0x140143ea2\nmov     rdx, rax                                                       ; +0x67, 0x140143ea7\njmp     short loc_140143ED4                                            ; +0x6a, 0x140143eaa\ntest    eax, eax                                                       ; +0x6c, 0x140143eac\njle     short loc_140143ECD                                            ; +0x6e, 0x140143eae\nmov     edx, eax                                                       ; +0x70, 0x140143eb0\nlea     rcx, word_1406ED6F8                                            ; +0x72, 0x140143eb2\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x79, 0x140143eb9\nmov     rcx, rax                                                       ; +0x7f, 0x140143ebf\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x82, 0x140143ec2\nmov     rdx, rax                                                       ; +0x88, 0x140143ec8\njmp     short loc_140143ED4                                            ; +0x8b, 0x140143ecb\nlea     rdx, asc_1406ED6E4; \" \"                                        ; +0x8d, 0x140143ecd\nmov     rcx, [rbx+328h]                                                ; +0x94, 0x140143ed4\nadd     rcx, 168h                                                      ; +0x9b, 0x140143edb\nmov     rax, [rcx]                                                     ; +0xa2, 0x140143ee2\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xa5, 0x140143ee5\nadd     rsp, 20h                                                       ; +0xaa, 0x140143eea\npop     rdi                                                            ; +0xae, 0x140143eee\njmp     qword ptr [rax]                                                ; +0xaf, 0x140143eef", "xrefs": ["CustomizeObjectLayer::init @ 0x14013fff5", "CustomizeObjectLayer::init @ 0x14014029c", "CustomizeObjectLayer::init @ 0x1401404b2", "<???> @ 0x14091745c"], "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"}