{"type": "func", "start": 4296908576, "end": 4296908744, "name": "CustomizeObjectLayer::onSelectColor", "pseudocode": "// \n// CustomizeObjectLayer::onSelectColor from 0x1001d9f20 to 0x1001d9fc8 (168 bytes)\n// \n// 2 xrefs:\n// > CustomizeObjectLayer::init @ 0x1001d7e1a\n// > CustomizeObjectLayer::init @ 0x1001d81b7\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::onSelectColor(__int64 a1, __int64 a2)\n{\n  unsigned int v2; // eax\n  __int64 v3; // rax\n  int ActiveMode; // eax\n  __int64 CString; // rax\n  __int64 v6; // rax\n  const std::string::value_type *v7; // rsi\n  char v9; // [rsp+0h] [rbp-10h]\n\n  v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);\n  if ( v2 == 1008 )\n    v2 = *(_DWORD *)(a1 + 748);\n  CustomizeObjectLayer::updateSelected(a1, v2);\n  v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1072LL))(a2);\n  CustomizeObjectLayer::highlightSelected(a1, v3);\n  CustomizeObjectLayer::updateColorSprite(a1);\n  ActiveMode = CustomizeObjectLayer::getActiveMode(a1, 1);\n  if ( ActiveMode < 1000 )\n  {\n    if ( ActiveMode <= 0 )\n    {\n      v7 = \" \";\n      return (*(__int64 (__fastcall **)(_QWORD, const std::string::value_type *))(**(_QWORD **)(a1 + 808) + 928LL))(\n               *(_QWORD *)(a1 + 808),\n               v7);\n    }\n    v6 = sub_10088E820(\"%i\", v9);\n    CString = cocos2d::CCString::getCString(v6);\n  }\n  else\n  {\n    CString = GJSpecialColorSelect::textForColorIdx((unsigned int)ActiveMode);\n  }\n  v7 = (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           v7);\n}", "assembly": "; \n; CustomizeObjectLayer::onSelectColor from 0x1001d9f20 to 0x1001d9fc8 (168 bytes)\n; \n; 2 xrefs:\n; > CustomizeObjectLayer::init @ 0x1001d7e1a\n; > CustomizeObjectLayer::init @ 0x1001d81b7\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, 0x1001d9f20\nmov     rbp, rsp                                                       ; +0x1, 0x1001d9f21\npush    r14                                                            ; +0x4, 0x1001d9f24\npush    rbx; char                                                      ; +0x6, 0x1001d9f26\nmov     r14, rsi                                                       ; +0x7, 0x1001d9f27\nmov     rbx, rdi                                                       ; +0xa, 0x1001d9f2a\nmov     rax, [rsi]                                                     ; +0xd, 0x1001d9f2d\nmov     rdi, rsi                                                       ; +0x10, 0x1001d9f30\ncall    qword ptr [rax+40h]                                            ; +0x13, 0x1001d9f33\ncmp     eax, 3F0h                                                      ; +0x16, 0x1001d9f36\njnz     short loc_1001D9F43                                            ; +0x1b, 0x1001d9f3b\nmov     eax, [rbx+2ECh]                                                ; +0x1d, 0x1001d9f3d\nmov     rdi, rbx                                                       ; +0x23, 0x1001d9f43\nmov     esi, eax                                                       ; +0x26, 0x1001d9f46\ncall    CustomizeObjectLayer__updateSelected                           ; +0x28, 0x1001d9f48\nmov     rax, [r14]                                                     ; +0x2d, 0x1001d9f4d\nmov     rdi, r14                                                       ; +0x30, 0x1001d9f50\ncall    qword ptr [rax+430h]                                           ; +0x33, 0x1001d9f53\nmov     rdi, rbx                                                       ; +0x39, 0x1001d9f59\nmov     rsi, rax                                                       ; +0x3c, 0x1001d9f5c\ncall    CustomizeObjectLayer__highlightSelected                        ; +0x3f, 0x1001d9f5f\nmov     rdi, rbx                                                       ; +0x44, 0x1001d9f64\ncall    CustomizeObjectLayer__updateColorSprite                        ; +0x47, 0x1001d9f67\nmov     rdi, rbx                                                       ; +0x4c, 0x1001d9f6c\nmov     esi, 1                                                         ; +0x4f, 0x1001d9f6f\ncall    CustomizeObjectLayer__getActiveMode                            ; +0x54, 0x1001d9f74\ncmp     eax, 3E8h                                                      ; +0x59, 0x1001d9f79\njl      short loc_1001D9F89                                            ; +0x5e, 0x1001d9f7e\nmov     edi, eax                                                       ; +0x60, 0x1001d9f80\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0x62, 0x1001d9f82\njmp     short loc_1001D9FA5                                            ; +0x67, 0x1001d9f87\ntest    eax, eax                                                       ; +0x69, 0x1001d9f89\njle     short loc_1001D9FBF                                            ; +0x6b, 0x1001d9f8b\nlea     rdi, aI_14; \"%i\"                                               ; +0x6d, 0x1001d9f8d\nmov     esi, eax                                                       ; +0x74, 0x1001d9f94\nxor     eax, eax                                                       ; +0x76, 0x1001d9f96\ncall    sub_10088E820                                                  ; +0x78, 0x1001d9f98\nmov     rdi, rax                                                       ; +0x7d, 0x1001d9f9d\ncall    cocos2d__CCString__getCString                                  ; +0x80, 0x1001d9fa0\nmov     rsi, rax                                                       ; +0x85, 0x1001d9fa5\nmov     rdi, [rbx+328h]                                                ; +0x88, 0x1001d9fa8\nmov     rax, [rdi]                                                     ; +0x8f, 0x1001d9faf\nmov     rax, [rax+3A0h]                                                ; +0x92, 0x1001d9fb2\npop     rbx                                                            ; +0x99, 0x1001d9fb9\npop     r14                                                            ; +0x9a, 0x1001d9fba\npop     rbp                                                            ; +0x9c, 0x1001d9fbc\njmp     rax                                                            ; +0x9d, 0x1001d9fbd\nlea     rsi, asc_100A41844; \" \"                                        ; +0x9f, 0x1001d9fbf\njmp     short loc_1001D9FA8                                            ; +0xa6, 0x1001d9fc6", "xrefs": ["CustomizeObjectLayer::init @ 0x1001d7e1a", "CustomizeObjectLayer::init @ 0x1001d81b7"], "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"}