{"type": "func", "start": 4297030160, "end": 4297030328, "name": "CustomizeObjectLayer::onSelectColor", "pseudocode": "// \n// CustomizeObjectLayer::onSelectColor from 0x1001f7a10 to 0x1001f7ab8 (168 bytes)\n// \n// 2 xrefs:\n// > CustomizeObjectLayer::init @ 0x1001f5a6a\n// > CustomizeObjectLayer::init @ 0x1001f5e07\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::onSelectColor(CustomizeObjectLayer *a1, cocos2d::CCObject *a2)\n{\n  int m_customColorChannel; // eax\n  ButtonSprite *v3; // rax\n  int ActiveMode; // eax\n  const char *CString; // rax\n  cocos2d::CCString *v6; // rax\n  const std::string::value_type *v7; // rsi\n  char v8; // [rsp+0h] [rbp-10h]\n\n  m_customColorChannel = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);\n  if ( m_customColorChannel == 1008 )\n    m_customColorChannel = a1->m_customColorChannel;\n  CustomizeObjectLayer::updateSelected(a1, m_customColorChannel);\n  v3 = (ButtonSprite *)((__int64 (__fastcall *)(cocos2d::CCObject *))a2->__vftable[13].~CCObject_0)(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      goto LABEL_8;\n    }\n    v6 = (cocos2d::CCString *)sub_1007AB580(\"%i\", v8);\n    CString = cocos2d::CCString::getCString(v6);\n  }\n  else\n  {\n    CString = GJSpecialColorSelect::textForColorIdx(ActiveMode);\n  }\n  v7 = CString;\nLABEL_8:\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const std::string::value_type *))a1->m_selectedColorLabel->setString)(\n    a1->m_selectedColorLabel,\n    v7);\n}", "assembly": "; \n; CustomizeObjectLayer::onSelectColor from 0x1001f7a10 to 0x1001f7ab8 (168 bytes)\n; \n; 2 xrefs:\n; > CustomizeObjectLayer::init @ 0x1001f5a6a\n; > CustomizeObjectLayer::init @ 0x1001f5e07\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, 0x1001f7a10\nmov     rbp, rsp                                                       ; +0x1, 0x1001f7a11\npush    r14                                                            ; +0x4, 0x1001f7a14\npush    rbx; char                                                      ; +0x6, 0x1001f7a16\nmov     r14, rsi                                                       ; +0x7, 0x1001f7a17\nmov     rbx, rdi                                                       ; +0xa, 0x1001f7a1a\nmov     rax, [rsi]                                                     ; +0xd, 0x1001f7a1d\nmov     rdi, rsi                                                       ; +0x10, 0x1001f7a20\ncall    qword ptr [rax+40h]                                            ; +0x13, 0x1001f7a23\ncmp     eax, 3F0h                                                      ; +0x16, 0x1001f7a26\njnz     short loc_1001F7A33                                            ; +0x1b, 0x1001f7a2b\nmov     eax, [rbx+2D4h]                                                ; +0x1d, 0x1001f7a2d\nmov     rdi, rbx                                                       ; +0x23, 0x1001f7a33\nmov     esi, eax                                                       ; +0x26, 0x1001f7a36\ncall    CustomizeObjectLayer__updateSelected                           ; +0x28, 0x1001f7a38\nmov     rax, [r14]                                                     ; +0x2d, 0x1001f7a3d\nmov     rdi, r14                                                       ; +0x30, 0x1001f7a40\ncall    qword ptr [rax+420h]                                           ; +0x33, 0x1001f7a43\nmov     rdi, rbx                                                       ; +0x39, 0x1001f7a49\nmov     rsi, rax                                                       ; +0x3c, 0x1001f7a4c\ncall    CustomizeObjectLayer__highlightSelected                        ; +0x3f, 0x1001f7a4f\nmov     rdi, rbx                                                       ; +0x44, 0x1001f7a54\ncall    CustomizeObjectLayer__updateColorSprite                        ; +0x47, 0x1001f7a57\nmov     rdi, rbx                                                       ; +0x4c, 0x1001f7a5c\nmov     esi, 1                                                         ; +0x4f, 0x1001f7a5f\ncall    CustomizeObjectLayer__getActiveMode                            ; +0x54, 0x1001f7a64\ncmp     eax, 3E8h                                                      ; +0x59, 0x1001f7a69\njl      short loc_1001F7A79                                            ; +0x5e, 0x1001f7a6e\nmov     edi, eax                                                       ; +0x60, 0x1001f7a70\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0x62, 0x1001f7a72\njmp     short loc_1001F7A95                                            ; +0x67, 0x1001f7a77\ntest    eax, eax                                                       ; +0x69, 0x1001f7a79\njle     short loc_1001F7AAF                                            ; +0x6b, 0x1001f7a7b\nlea     rdi, aI; \"%i\"                                                  ; +0x6d, 0x1001f7a7d\nmov     esi, eax                                                       ; +0x74, 0x1001f7a84\nxor     eax, eax                                                       ; +0x76, 0x1001f7a86\ncall    sub_1007AB580                                                  ; +0x78, 0x1001f7a88\nmov     rdi, rax                                                       ; +0x7d, 0x1001f7a8d\ncall    cocos2d__CCString__getCString                                  ; +0x80, 0x1001f7a90\nmov     rsi, rax                                                       ; +0x85, 0x1001f7a95\nmov     rdi, [rbx+310h]                                                ; +0x88, 0x1001f7a98\nmov     rax, [rdi]                                                     ; +0x8f, 0x1001f7a9f\nmov     rax, [rax+390h]                                                ; +0x92, 0x1001f7aa2\npop     rbx                                                            ; +0x99, 0x1001f7aa9\npop     r14                                                            ; +0x9a, 0x1001f7aaa\npop     rbp                                                            ; +0x9c, 0x1001f7aac\njmp     rax                                                            ; +0x9d, 0x1001f7aad\nlea     rsi, asc_100823F54; \" \"                                        ; +0x9f, 0x1001f7aaf\njmp     short loc_1001F7A98                                            ; +0xa6, 0x1001f7ab6", "xrefs": ["CustomizeObjectLayer::init @ 0x1001f5a6a", "CustomizeObjectLayer::init @ 0x1001f5e07"], "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"}