{"type": "func", "start": 4296185428, "end": 4296185624, "name": "CharacterColorPage::toggleShip", "pseudocode": "// \n// CharacterColorPage::toggleShip from 0x100129654 to 0x100129718 (196 bytes)\n// \n// 1 xrefs:\n// > CharacterColorPage::init @ 0x100128fe0\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 CharacterColorPage::toggleShip(CharacterColorPage *a1, cocos2d::CCObject *a2)\n{\n  SimplePlayer *v3; // x20\n  int v4; // w21\n  GameManager *v5; // x0\n  int v6; // w1\n  __int64 v7; // x21\n  float v8; // s8\n\n  v3 = (SimplePlayer *)((__int64 (__fastcall *)(cocos2d::CCObject *))a2->__vftable[13].~CCObject_0)(a2);\n  v4 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);\n  v5 = GameManager::sharedState();\n  if ( v4 == 1 )\n  {\n    v6 = v5->m_playerJetpack.random - v5->m_playerJetpack.seed;\n    v7 = 8;\n    v8 = 1.05;\n  }\n  else\n  {\n    v6 = v5->m_playerShip.random - v5->m_playerShip.seed;\n    v7 = 1;\n    v8 = 1.15;\n  }\n  SimplePlayer::updatePlayerFrame(v3, v6, (IconType)v7);\n  ((void (__fastcall *)(SimplePlayer *, float))v3->setScale)(v3, v8);\n  ((void (__fastcall *)(cocos2d::CCObject *, __int64))a2->setTag)(a2, v7);\n}", "assembly": "; \n; CharacterColorPage::toggleShip from 0x100129654 to 0x100129718 (196 bytes)\n; \n; 1 xrefs:\n; > CharacterColorPage::init @ 0x100128fe0\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\nSTP             D9, D8, [SP,#-0x10+var_30]!                            ; +0x0, 0x100129654\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x100129658\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x10012965c\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x100129660\nADD             X29, SP, #0x30                                         ; +0x10, 0x100129664\nMOV             X19, X1                                                ; +0x14, 0x100129668\nLDR             X8, [X1]                                               ; +0x18, 0x10012966c\nLDR             X8, [X8,#0x420]                                        ; +0x1c, 0x100129670\nMOV             X0, X1                                                 ; +0x20, 0x100129674\nBLR             X8                                                     ; +0x24, 0x100129678\nMOV             X20, X0                                                ; +0x28, 0x10012967c\nLDR             X8, [X19]                                              ; +0x2c, 0x100129680\nLDR             X8, [X8,#0x40]                                         ; +0x30, 0x100129684\nMOV             X0, X19                                                ; +0x34, 0x100129688\nBLR             X8                                                     ; +0x38, 0x10012968c\nMOV             X21, X0                                                ; +0x3c, 0x100129690\nBL              GameManager__sharedState                               ; +0x40, 0x100129694\nCMP             W21, #1                                                ; +0x44, 0x100129698\nB.NE            loc_1001296BC                                          ; +0x48, 0x10012969c\nLDR             W8, [X0,#0x34C]                                        ; +0x4c, 0x1001296a0\nLDR             W9, [X0,#0x350]                                        ; +0x50, 0x1001296a4\nSUB             W1, W8, W9                                             ; +0x54, 0x1001296a8\nMOV             W21, #8                                                ; +0x58, 0x1001296ac\nADRP            X8, #dword_100637068@PAGE                              ; +0x5c, 0x1001296b0\nLDR             S8, [X8,#dword_100637068@PAGEOFF]                      ; +0x60, 0x1001296b4\nB               loc_1001296D4                                          ; +0x64, 0x1001296b8\nLDR             W8, [X0,#0x2B0]                                        ; +0x68, 0x1001296bc\nLDR             W9, [X0,#0x2B4]                                        ; +0x6c, 0x1001296c0\nSUB             W1, W8, W9                                             ; +0x70, 0x1001296c4\nMOV             W21, #1                                                ; +0x74, 0x1001296c8\nADRP            X8, #dword_100636F18@PAGE                              ; +0x78, 0x1001296cc\nLDR             S8, [X8,#dword_100636F18@PAGEOFF]                      ; +0x7c, 0x1001296d0\nMOV             X0, X20                                                ; +0x80, 0x1001296d4\nMOV             X2, X21                                                ; +0x84, 0x1001296d8\nBL              SimplePlayer__updatePlayerFrame                        ; +0x88, 0x1001296dc\nLDR             X8, [X20]                                              ; +0x8c, 0x1001296e0\nLDR             X8, [X8,#0xA0]                                         ; +0x90, 0x1001296e4\nMOV             X0, X20                                                ; +0x94, 0x1001296e8\nFMOV            S0, S8                                                 ; +0x98, 0x1001296ec\nBLR             X8                                                     ; +0x9c, 0x1001296f0\nLDR             X8, [X19]                                              ; +0xa0, 0x1001296f4\nLDR             X2, [X8,#0x48]                                         ; +0xa4, 0x1001296f8\nMOV             X0, X19                                                ; +0xa8, 0x1001296fc\nMOV             X1, X21                                                ; +0xac, 0x100129700\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xb0, 0x100129704\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xb4, 0x100129708\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0xb8, 0x10012970c\nLDP             D9, D8, [SP+0x30+var_30],#0x40                         ; +0xbc, 0x100129710\nBR              X2                                                     ; +0xc0, 0x100129714", "xrefs": ["CharacterColorPage::init @ 0x100128fe0"], "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"}