{"type": "func", "start": 5369401328, "end": 5369401846, "name": "CustomizeObjectLayer::onSelectMode", "pseudocode": "// \n// CustomizeObjectLayer::onSelectMode from 0x1400a8ff0 to 0x1400a91f6 (518 bytes)\n// \n// 4 xrefs:\n// > CustomizeObjectLayer::init @ 0x1400a7ca3\n// > CustomizeObjectLayer::init @ 0x1400a5a06\n// > CustomizeObjectLayer::init @ 0x1400a6e3f\n// > <???> @ 0x1406c7800\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 CustomizeObjectLayer::onSelectMode(CustomizeObjectLayer *a1, cocos2d::CCObject *a2)\n{\n  int v3; // eax\n  cocos2d::CCLabelBMFont *m_titleLabel; // rcx\n  const char *v5; // rdx\n  const char *v6; // rsi\n  const char *v7; // rbx\n  ButtonSprite *v8; // rax\n  const char *v9; // rbx\n  ButtonSprite *v10; // rax\n  CCMenuItemSpriteExtra *m_textButton; // rcx\n  ButtonSprite *v12; // rax\n  _BOOL8 v13; // rdx\n  _BOOL8 v14; // rdx\n  _BOOL8 v15; // rdx\n  _BOOL8 v16; // rdx\n  _BOOL8 v17; // rdx\n  _BOOL8 v18; // rdx\n  int ActiveMode; // eax\n  const char *CString; // rdx\n  cocos2d::CCString *v21; // rax\n\n  v3 = a2->getTag(a2);\n  m_titleLabel = a1->m_titleLabel;\n  a1->m_selectedMode = v3;\n  if ( v3 == 1 )\n  {\n    v5 = \"Base Color\";\n  }\n  else\n  {\n    v5 = \"Detail Color\";\n    if ( v3 != 2 )\n      v5 = \"Insert Text\";\n  }\n  m_titleLabel->setString(&m_titleLabel->cocos2d::CCLabelProtocol, v5);\n  v6 = \"GJ_button_04.png\";\n  v7 = \"GJ_button_04.png\";\n  if ( a1->m_selectedMode == 1 )\n    v7 = \"GJ_button_03.png\";\n  v8 = (ButtonSprite *)a1->m_baseButton->getNormalImage(a1->m_baseButton);\n  ButtonSprite::updateBGImage(v8, v7);\n  v9 = \"GJ_button_04.png\";\n  if ( a1->m_selectedMode == 2 )\n    v9 = \"GJ_button_03.png\";\n  v10 = (ButtonSprite *)a1->m_detailButton->getNormalImage(a1->m_detailButton);\n  ButtonSprite::updateBGImage(v10, v9);\n  m_textButton = a1->m_textButton;\n  if ( m_textButton )\n  {\n    if ( a1->m_selectedMode == 3 )\n      v6 = \"GJ_button_03.png\";\n    v12 = (ButtonSprite *)m_textButton->getNormalImage(m_textButton);\n    ButtonSprite::updateBGImage(v12, v6);\n  }\n  CustomizeObjectLayer::toggleVisible(a1);\n  LOBYTE(v13) = a1->m_selectedMode == 1;\n  a1->m_baseColorHSV->setVisible(a1->m_baseColorHSV, v13);\n  LOBYTE(v14) = a1->m_selectedMode == 1;\n  a1->m_baseColorHSV->setEnabled(a1->m_baseColorHSV, v14);\n  LOBYTE(v15) = a1->m_selectedMode == 2;\n  a1->m_detailColorHSV->setVisible(a1->m_detailColorHSV, v15);\n  LOBYTE(v16) = a1->m_selectedMode == 2;\n  a1->m_detailColorHSV->setEnabled(a1->m_detailColorHSV, v16);\n  LOBYTE(v17) = a1->m_selectedMode != 3;\n  a1->m_liveSelectButton->setVisible(a1->m_liveSelectButton, v17);\n  LOBYTE(v18) = a1->m_selectedMode != 3;\n  a1->m_liveSelectButton->setEnabled(a1->m_liveSelectButton, v18);\n  CustomizeObjectLayer::updateHSVButtons(a1);\n  CustomizeObjectLayer::updateColorSprite(a1);\n  ActiveMode = CustomizeObjectLayer::getActiveMode(a1, 1);\n  if ( ActiveMode < 1000 )\n  {\n    if ( ActiveMode <= 0 )\n    {\n      CString = \" \";\n    }\n    else\n    {\n      v21 = cocos2d::CCString::createWithFormat(\"%i\", ActiveMode);\n      CString = cocos2d::CCString::getCString(v21);\n    }\n  }\n  else\n  {\n    CString = GJSpecialColorSelect::textForColorIdx(ActiveMode);\n  }\n  a1->m_selectedColorLabel->setString(&a1->m_selectedColorLabel->cocos2d::CCLabelProtocol, CString);\n}", "assembly": "; \n; CustomizeObjectLayer::onSelectMode from 0x1400a8ff0 to 0x1400a91f6 (518 bytes)\n; \n; 4 xrefs:\n; > CustomizeObjectLayer::init @ 0x1400a7ca3\n; > CustomizeObjectLayer::init @ 0x1400a5a06\n; > CustomizeObjectLayer::init @ 0x1400a6e3f\n; > <???> @ 0x1406c7800\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1400a8ff0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1400a8ff5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1400a8ffa\npush    rdi                                                            ; +0xf, 0x1400a8fff\nsub     rsp, 20h                                                       ; +0x10, 0x1400a9000\nmov     rax, [rdx]                                                     ; +0x14, 0x1400a9004\nmov     rdi, rcx                                                       ; +0x17, 0x1400a9007\nmov     rcx, rdx                                                       ; +0x1a, 0x1400a900a\ncall    qword ptr [rax+38h]                                            ; +0x1d, 0x1400a900d\nmov     rcx, [rdi+308h]                                                ; +0x20, 0x1400a9010\nmov     [rdi+2D0h], eax                                                ; +0x27, 0x1400a9017\ncmp     eax, 1                                                         ; +0x2d, 0x1400a901d\njnz     short loc_1400A902B                                            ; +0x30, 0x1400a9020\nlea     rdx, aBaseColor; \"Base Color\"                                  ; +0x32, 0x1400a9022\njmp     short loc_1400A903E                                            ; +0x39, 0x1400a9029\nlea     rdx, aDetailColor; \"Detail Color\"                              ; +0x3b, 0x1400a902b\ncmp     eax, 2                                                         ; +0x42, 0x1400a9032\njz      short loc_1400A903E                                            ; +0x45, 0x1400a9035\nlea     rdx, aInsertText; \"Insert Text\"                                ; +0x47, 0x1400a9037\nadd     rcx, 168h                                                      ; +0x4e, 0x1400a903e\nmov     rax, [rcx]                                                     ; +0x55, 0x1400a9045\ncall    qword ptr [rax]                                                ; +0x58, 0x1400a9048\nmov     rcx, [rdi+2E0h]                                                ; +0x5a, 0x1400a904a\nlea     rsi, aGjButton04Png; \"GJ_button_04.png\"                        ; +0x61, 0x1400a9051\ncmp     dword ptr [rdi+2D0h], 1                                        ; +0x68, 0x1400a9058\nlea     rbp, aGjButton03Png; \"GJ_button_03.png\"                        ; +0x6f, 0x1400a905f\nmov     rbx, rsi                                                       ; +0x76, 0x1400a9066\ncmovz   rbx, rbp                                                       ; +0x79, 0x1400a9069\nmov     rax, [rcx]                                                     ; +0x7d, 0x1400a906d\ncall    qword ptr [rax+3A8h]                                           ; +0x80, 0x1400a9070\nmov     rcx, rax                                                       ; +0x86, 0x1400a9076\nmov     rdx, rbx                                                       ; +0x89, 0x1400a9079\ncall    ButtonSprite__updateBGImage                                    ; +0x8c, 0x1400a907c\nmov     rcx, [rdi+2E8h]                                                ; +0x91, 0x1400a9081\nmov     rbx, rsi                                                       ; +0x98, 0x1400a9088\ncmp     dword ptr [rdi+2D0h], 2                                        ; +0x9b, 0x1400a908b\ncmovz   rbx, rbp                                                       ; +0xa2, 0x1400a9092\nmov     rax, [rcx]                                                     ; +0xa6, 0x1400a9096\ncall    qword ptr [rax+3A8h]                                           ; +0xa9, 0x1400a9099\nmov     rcx, rax                                                       ; +0xaf, 0x1400a909f\nmov     rdx, rbx                                                       ; +0xb2, 0x1400a90a2\ncall    ButtonSprite__updateBGImage                                    ; +0xb5, 0x1400a90a5\nmov     rcx, [rdi+2F0h]                                                ; +0xba, 0x1400a90aa\ntest    rcx, rcx                                                       ; +0xc1, 0x1400a90b1\njz      short loc_1400A90D5                                            ; +0xc4, 0x1400a90b4\ncmp     dword ptr [rdi+2D0h], 3                                        ; +0xc6, 0x1400a90b6\nmov     rax, [rcx]                                                     ; +0xcd, 0x1400a90bd\ncmovz   rsi, rbp                                                       ; +0xd0, 0x1400a90c0\ncall    qword ptr [rax+3A8h]                                           ; +0xd4, 0x1400a90c4\nmov     rcx, rax                                                       ; +0xda, 0x1400a90ca\nmov     rdx, rsi                                                       ; +0xdd, 0x1400a90cd\ncall    ButtonSprite__updateBGImage                                    ; +0xe0, 0x1400a90d0\nmov     rcx, rdi                                                       ; +0xe5, 0x1400a90d5\ncall    CustomizeObjectLayer__toggleVisible                            ; +0xe8, 0x1400a90d8\nmov     rcx, [rdi+2F8h]                                                ; +0xed, 0x1400a90dd\ncmp     dword ptr [rdi+2D0h], 1                                        ; +0xf4, 0x1400a90e4\nsetz    dl                                                             ; +0xfb, 0x1400a90eb\nmov     rax, [rcx]                                                     ; +0xfe, 0x1400a90ee\ncall    qword ptr [rax+140h]                                           ; +0x101, 0x1400a90f1\nmov     rcx, [rdi+2F8h]                                                ; +0x107, 0x1400a90f7\ncmp     dword ptr [rdi+2D0h], 1                                        ; +0x10e, 0x1400a90fe\nsetz    dl                                                             ; +0x115, 0x1400a9105\nmov     rax, [rcx]                                                     ; +0x118, 0x1400a9108\ncall    qword ptr [rax+398h]                                           ; +0x11b, 0x1400a910b\nmov     rcx, [rdi+300h]                                                ; +0x121, 0x1400a9111\ncmp     dword ptr [rdi+2D0h], 2                                        ; +0x128, 0x1400a9118\nsetz    dl                                                             ; +0x12f, 0x1400a911f\nmov     rax, [rcx]                                                     ; +0x132, 0x1400a9122\ncall    qword ptr [rax+140h]                                           ; +0x135, 0x1400a9125\nmov     rcx, [rdi+300h]                                                ; +0x13b, 0x1400a912b\ncmp     dword ptr [rdi+2D0h], 2                                        ; +0x142, 0x1400a9132\nsetz    dl                                                             ; +0x149, 0x1400a9139\nmov     rax, [rcx]                                                     ; +0x14c, 0x1400a913c\ncall    qword ptr [rax+398h]                                           ; +0x14f, 0x1400a913f\nmov     rcx, [rdi+378h]                                                ; +0x155, 0x1400a9145\ncmp     dword ptr [rdi+2D0h], 3                                        ; +0x15c, 0x1400a914c\nsetnz   dl                                                             ; +0x163, 0x1400a9153\nmov     rax, [rcx]                                                     ; +0x166, 0x1400a9156\ncall    qword ptr [rax+140h]                                           ; +0x169, 0x1400a9159\nmov     rcx, [rdi+378h]                                                ; +0x16f, 0x1400a915f\ncmp     dword ptr [rdi+2D0h], 3                                        ; +0x176, 0x1400a9166\nsetnz   dl                                                             ; +0x17d, 0x1400a916d\nmov     rax, [rcx]                                                     ; +0x180, 0x1400a9170\ncall    qword ptr [rax+398h]                                           ; +0x183, 0x1400a9173\nmov     rcx, rdi                                                       ; +0x189, 0x1400a9179\ncall    CustomizeObjectLayer__updateHSVButtons                         ; +0x18c, 0x1400a917c\nmov     rcx, rdi                                                       ; +0x191, 0x1400a9181\ncall    CustomizeObjectLayer__updateColorSprite                        ; +0x194, 0x1400a9184\nmov     dl, 1                                                          ; +0x199, 0x1400a9189\nmov     rcx, rdi                                                       ; +0x19b, 0x1400a918b\ncall    CustomizeObjectLayer__getActiveMode                            ; +0x19e, 0x1400a918e\ncmp     eax, 3E8h                                                      ; +0x1a3, 0x1400a9193\njl      short loc_1400A91A6                                            ; +0x1a8, 0x1400a9198\nmov     ecx, eax                                                       ; +0x1aa, 0x1400a919a\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0x1ac, 0x1400a919c\nmov     rdx, rax                                                       ; +0x1b1, 0x1400a91a1\njmp     short loc_1400A91CE                                            ; +0x1b4, 0x1400a91a4\ntest    eax, eax                                                       ; +0x1b6, 0x1400a91a6\njle     short loc_1400A91C7                                            ; +0x1b8, 0x1400a91a8\nmov     edx, eax                                                       ; +0x1ba, 0x1400a91aa\nlea     rcx, aI_11; \"%i\"                                               ; +0x1bc, 0x1400a91ac\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x1c3, 0x1400a91b3\nmov     rcx, rax                                                       ; +0x1c9, 0x1400a91b9\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x1cc, 0x1400a91bc\nmov     rdx, rax                                                       ; +0x1d2, 0x1400a91c2\njmp     short loc_1400A91CE                                            ; +0x1d5, 0x1400a91c5\nlea     rdx, asc_140518984; \" \"                                        ; +0x1d7, 0x1400a91c7\nmov     rcx, [rdi+310h]                                                ; +0x1de, 0x1400a91ce\nadd     rcx, 168h                                                      ; +0x1e5, 0x1400a91d5\nmov     rax, [rcx]                                                     ; +0x1ec, 0x1400a91dc\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1ef, 0x1400a91df\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x1f4, 0x1400a91e4\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x1f9, 0x1400a91e9\nadd     rsp, 20h                                                       ; +0x1fe, 0x1400a91ee\npop     rdi                                                            ; +0x202, 0x1400a91f2\njmp     qword ptr [rax]                                                ; +0x203, 0x1400a91f3", "xrefs": ["CustomizeObjectLayer::init @ 0x1400a7ca3", "CustomizeObjectLayer::init @ 0x1400a5a06", "CustomizeObjectLayer::init @ 0x1400a6e3f", "<???> @ 0x1406c7800"], "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"}