{"type": "func", "start": 4596244, "end": 4596590, "name": "CustomizeObjectLayer::onSelectMode", "pseudocode": "// \n// CustomizeObjectLayer::onSelectMode from 0x462214 to 0x46236e (346 bytes)\n// \n// 1 xrefs:\n// > CustomizeObjectLayer::init @ 0x463b96\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  ButtonSprite *v3; // r0\n  const char *v4; // r1\n  ButtonSprite *v5; // r0\n  const char *v6; // r1\n  CCMenuItemSpriteExtra *m_textButton; // r0\n  ButtonSprite *v8; // r0\n  const char *v9; // r1\n  int ActiveMode; // r1\n\n  a1->m_selectedMode = a2->getTag(a2);\n  ((void (*)(void))a1->m_titleLabel->setString)();\n  v3 = (ButtonSprite *)a1->m_baseButton->getNormalImage(a1->m_baseButton);\n  if ( a1->m_selectedMode == 1 )\n    v4 = \"GJ_button_03.png\";\n  else\n    v4 = \"GJ_button_04.png\";\n  ButtonSprite::updateBGImage(v3, v4);\n  v5 = (ButtonSprite *)a1->m_detailButton->getNormalImage(a1->m_detailButton);\n  if ( a1->m_selectedMode == 2 )\n    v6 = \"GJ_button_03.png\";\n  else\n    v6 = \"GJ_button_04.png\";\n  ButtonSprite::updateBGImage(v5, v6);\n  m_textButton = a1->m_textButton;\n  if ( m_textButton )\n  {\n    v8 = (ButtonSprite *)m_textButton->getNormalImage(m_textButton);\n    if ( a1->m_selectedMode == 3 )\n      v9 = \"GJ_button_03.png\";\n    else\n      v9 = \"GJ_button_04.png\";\n    ButtonSprite::updateBGImage(v8, v9);\n  }\n  CustomizeObjectLayer::toggleVisible(a1);\n  a1->m_baseColorHSV->setVisible(a1->m_baseColorHSV, a1->m_selectedMode == 1);\n  a1->m_baseColorHSV->setEnabled(a1->m_baseColorHSV, a1->m_selectedMode == 1);\n  a1->m_detailColorHSV->setVisible(a1->m_detailColorHSV, a1->m_selectedMode == 2);\n  a1->m_detailColorHSV->setEnabled(a1->m_detailColorHSV, a1->m_selectedMode == 2);\n  a1->m_liveSelectButton->setVisible(a1->m_liveSelectButton, a1->m_selectedMode != 3);\n  a1->m_liveSelectButton->setEnabled(a1->m_liveSelectButton, a1->m_selectedMode != 3);\n  CustomizeObjectLayer::updateHSVButtons(a1);\n  CustomizeObjectLayer::updateColorSprite(a1);\n  ActiveMode = CustomizeObjectLayer::getActiveMode(a1, 1);\n  CustomizeObjectLayer::updateChannelLabel(a1, ActiveMode);\n}", "assembly": "; \n; CustomizeObjectLayer::onSelectMode from 0x462214 to 0x46236e (346 bytes)\n; \n; 1 xrefs:\n; > CustomizeObjectLayer::init @ 0x463b96\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\nLDR             R3, [R1]                                               ; +0x0, 0x462214\nPUSH            {R4,LR}                                                ; +0x2, 0x462216\nMOV             R4, R0                                                 ; +0x4, 0x462218\nLDR             R3, [R3,#0x20]                                         ; +0x6, 0x46221a\nMOV             R0, R1                                                 ; +0x8, 0x46221c\nBLX             R3                                                     ; +0xa, 0x46221e\nCMP             R0, #1                                                 ; +0xc, 0x462220\nMOV             R3, R0                                                 ; +0xe, 0x462222\nSTR.W           R0, [R4,#0x21C]                                        ; +0x10, 0x462224\nLDR.W           R0, [R4,#0x23C]                                        ; +0x14, 0x462228\nBNE             loc_46223A                                             ; +0x18, 0x46222c\nLDR             R3, [R0]                                               ; +0x1a, 0x46222e\nLDR             R1, =(aBaseColor - 0x46223A); \"Base Color\"             ; +0x1c, 0x462230\nLDR.W           R3, [R3,#0x1C8]                                        ; +0x1e, 0x462232\nADD             R1, PC; \"Base Color\"                                   ; +0x22, 0x462236\nB               loc_46224E                                             ; +0x24, 0x462238\nCMP             R3, #2                                                 ; +0x26, 0x46223a\nLDR             R3, [R0]                                               ; +0x28, 0x46223c\nLDR.W           R3, [R3,#0x1C8]                                        ; +0x2a, 0x46223e\nBNE             loc_46224A                                             ; +0x2e, 0x462242\nLDR             R1, =(aDetailColor - 0x46224A); \"Detail Color\"         ; +0x30, 0x462244\nADD             R1, PC; \"Detail Color\"                                 ; +0x32, 0x462246\nB               loc_46224E                                             ; +0x34, 0x462248\nLDR             R1, =(aInsertText - 0x462250); \"Insert Text\"           ; +0x36, 0x46224a\nADD             R1, PC; \"Insert Text\"                                  ; +0x38, 0x46224c\nBLX             R3                                                     ; +0x3a, 0x46224e\nLDR.W           R0, [R4,#0x228]                                        ; +0x3c, 0x462250\nLDR             R3, [R0]                                               ; +0x40, 0x462254\nLDR.W           R3, [R3,#0x210]                                        ; +0x42, 0x462256\nBLX             R3                                                     ; +0x46, 0x46225a\nLDR.W           R3, [R4,#0x21C]                                        ; +0x48, 0x46225c\nCMP             R3, #1                                                 ; +0x4c, 0x462260\nBEQ             loc_46226A                                             ; +0x4e, 0x462262\nLDR             R1, =(aGjButton04Png - 0x46226A); \"GJ_button_04.png\"   ; +0x50, 0x462264\nADD             R1, PC; \"GJ_button_04.png\"                             ; +0x52, 0x462266\nB               loc_46226E                                             ; +0x54, 0x462268\nLDR             R1, =(aGjButton03Png - 0x462270); \"GJ_button_03.png\"   ; +0x56, 0x46226a\nADD             R1, PC; \"GJ_button_03.png\"                             ; +0x58, 0x46226c\nBL              _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0x5a, 0x46226e\nLDR.W           R0, [R4,#0x22C]                                        ; +0x5e, 0x462272\nLDR             R3, [R0]                                               ; +0x62, 0x462276\nLDR.W           R3, [R3,#0x210]                                        ; +0x64, 0x462278\nBLX             R3                                                     ; +0x68, 0x46227c\nLDR.W           R3, [R4,#0x21C]                                        ; +0x6a, 0x46227e\nCMP             R3, #2                                                 ; +0x6e, 0x462282\nBEQ             loc_46228C                                             ; +0x70, 0x462284\nLDR             R1, =(aGjButton04Png - 0x46228C); \"GJ_button_04.png\"   ; +0x72, 0x462286\nADD             R1, PC; \"GJ_button_04.png\"                             ; +0x74, 0x462288\nB               loc_462290                                             ; +0x76, 0x46228a\nLDR             R1, =(aGjButton03Png - 0x462292); \"GJ_button_03.png\"   ; +0x78, 0x46228c\nADD             R1, PC; \"GJ_button_03.png\"                             ; +0x7a, 0x46228e\nBL              _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0x7c, 0x462290\nLDR.W           R0, [R4,#0x230]                                        ; +0x80, 0x462294\nCBZ             R0, loc_4622B8                                         ; +0x84, 0x462298\nLDR             R3, [R0]                                               ; +0x86, 0x46229a\nLDR.W           R3, [R3,#0x210]                                        ; +0x88, 0x46229c\nBLX             R3                                                     ; +0x8c, 0x4622a0\nLDR.W           R3, [R4,#0x21C]                                        ; +0x8e, 0x4622a2\nCMP             R3, #3                                                 ; +0x92, 0x4622a6\nBEQ             loc_4622B0                                             ; +0x94, 0x4622a8\nLDR             R1, =(aGjButton04Png - 0x4622B0); \"GJ_button_04.png\"   ; +0x96, 0x4622aa\nADD             R1, PC; \"GJ_button_04.png\"                             ; +0x98, 0x4622ac\nB               loc_4622B4                                             ; +0x9a, 0x4622ae\nLDR             R1, =(aGjButton03Png - 0x4622B6); \"GJ_button_03.png\"   ; +0x9c, 0x4622b0\nADD             R1, PC; \"GJ_button_03.png\"                             ; +0x9e, 0x4622b2\nBL              _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0xa0, 0x4622b4\nMOV             R0, R4; this                                           ; +0xa4, 0x4622b8\nBL              _ZN20CustomizeObjectLayer13toggleVisibleEv; CustomizeObjectLayer::toggleVisible(void) ; +0xa6, 0x4622ba\nLDR.W           R0, [R4,#0x234]                                        ; +0xaa, 0x4622be\nLDR.W           R1, [R4,#0x21C]                                        ; +0xae, 0x4622c2\nLDR             R3, [R0]                                               ; +0xb2, 0x4622c6\nSUBS            R2, R1, #1                                             ; +0xb4, 0x4622c8\nNEGS            R1, R2                                                 ; +0xb6, 0x4622ca\nADCS            R1, R2                                                 ; +0xb8, 0x4622cc\nLDR.W           R3, [R3,#0xA4]                                         ; +0xba, 0x4622ce\nBLX             R3                                                     ; +0xbe, 0x4622d2\nLDR.W           R0, [R4,#0x234]                                        ; +0xc0, 0x4622d4\nLDR.W           R1, [R4,#0x21C]                                        ; +0xc4, 0x4622d8\nLDR             R3, [R0]                                               ; +0xc8, 0x4622dc\nADD.W           LR, R1, #0xFFFFFFFF                                    ; +0xca, 0x4622de\nRSBS.W          R1, LR, #0                                             ; +0xce, 0x4622e2\nADC.W           R1, R1, LR                                             ; +0xd2, 0x4622e6\nLDR.W           R3, [R3,#0x208]                                        ; +0xd6, 0x4622ea\nBLX             R3                                                     ; +0xda, 0x4622ee\nLDR.W           R0, [R4,#0x238]                                        ; +0xdc, 0x4622f0\nLDR.W           R1, [R4,#0x21C]                                        ; +0xe0, 0x4622f4\nLDR             R3, [R0]                                               ; +0xe4, 0x4622f8\nSUB.W           R12, R1, #2                                            ; +0xe6, 0x4622fa\nRSBS.W          R1, R12, #0                                            ; +0xea, 0x4622fe\nADC.W           R1, R1, R12                                            ; +0xee, 0x462302\nLDR.W           R3, [R3,#0xA4]                                         ; +0xf2, 0x462306\nBLX             R3                                                     ; +0xf6, 0x46230a\nLDR.W           R0, [R4,#0x238]                                        ; +0xf8, 0x46230c\nLDR.W           R1, [R4,#0x21C]                                        ; +0xfc, 0x462310\nLDR             R3, [R0]                                               ; +0x100, 0x462314\nSUBS            R2, R1, #2                                             ; +0x102, 0x462316\nNEGS            R1, R2                                                 ; +0x104, 0x462318\nADCS            R1, R2                                                 ; +0x106, 0x46231a\nLDR.W           R3, [R3,#0x208]                                        ; +0x108, 0x46231c\nBLX             R3                                                     ; +0x10c, 0x462320\nLDR.W           R0, [R4,#0x274]                                        ; +0x10e, 0x462322\nLDR.W           R1, [R4,#0x21C]                                        ; +0x112, 0x462326\nLDR             R3, [R0]                                               ; +0x116, 0x46232a\nSUBS            R1, #3                                                 ; +0x118, 0x46232c\nIT NE                                                                  ; +0x11a, 0x46232e\nMOVNE           R1, #1                                                 ; +0x11c, 0x462330\nLDR.W           R3, [R3,#0xA4]                                         ; +0x11e, 0x462332\nBLX             R3                                                     ; +0x122, 0x462336\nLDR.W           R0, [R4,#0x274]                                        ; +0x124, 0x462338\nLDR.W           R1, [R4,#0x21C]                                        ; +0x128, 0x46233c\nLDR             R3, [R0]                                               ; +0x12c, 0x462340\nSUBS            R1, #3                                                 ; +0x12e, 0x462342\nIT NE                                                                  ; +0x130, 0x462344\nMOVNE           R1, #1                                                 ; +0x132, 0x462346\nLDR.W           R3, [R3,#0x208]                                        ; +0x134, 0x462348\nBLX             R3                                                     ; +0x138, 0x46234c\nMOV             R0, R4; this                                           ; +0x13a, 0x46234e\nBL              _ZN20CustomizeObjectLayer16updateHSVButtonsEv; CustomizeObjectLayer::updateHSVButtons(void) ; +0x13c, 0x462350\nMOV             R0, R4; this                                           ; +0x140, 0x462354\nBL              _ZN20CustomizeObjectLayer17updateColorSpriteEv; CustomizeObjectLayer::updateColorSprite(void) ; +0x142, 0x462356\nMOV             R0, R4; this                                           ; +0x146, 0x46235a\nMOVS            R1, #1; bool                                           ; +0x148, 0x46235c\nBL              _ZN20CustomizeObjectLayer13getActiveModeEb; CustomizeObjectLayer::getActiveMode(bool) ; +0x14a, 0x46235e\nMOV             R1, R0; GJSpecialColorSelect *                         ; +0x14e, 0x462362\nMOV             R0, R4; this                                           ; +0x150, 0x462364\nPOP.W           {R4,LR}                                                ; +0x152, 0x462366\nB.W             _ZN20CustomizeObjectLayer18updateChannelLabelEi; CustomizeObjectLayer::updateChannelLabel(int) ; +0x156, 0x46236a", "xrefs": ["CustomizeObjectLayer::init @ 0x463b96"], "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"}