{"type": "func", "start": 4296355972, "end": 4296356168, "name": "CharacterColorPage::toggleShip", "pseudocode": "// \n// CharacterColorPage::toggleShip from 0x100153084 to 0x100153148 (196 bytes)\n// \n// 1 xrefs:\n// > CharacterColorPage::init @ 0x100152a10\n// \n// This function is hookable on this platform (idp: arm, 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 10:59:40 +0000\n// \n\n__int64 __fastcall CharacterColorPage::toggleShip(__int64 a1, __int64 a2)\n{\n  __int64 v3; // x20\n  __int64 v4; // x0\n  int v5; // w21\n  _DWORD *v6; // x0\n  __int64 v7; // x1\n  __int64 v8; // x21\n  float v9; // s8\n\n  v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1072LL))(a2);\n  v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);\n  v5 = v4;\n  v6 = (_DWORD *)GameManager::sharedState(v4);\n  if ( v5 == 1 )\n  {\n    v7 = (unsigned int)(v6[221] - v6[222]);\n    v8 = 8;\n    v9 = 1.05;\n  }\n  else\n  {\n    v7 = (unsigned int)(v6[182] - v6[183]);\n    v8 = 1;\n    v9 = 1.15;\n  }\n  SimplePlayer::updatePlayerFrame(v3, v7, v8);\n  (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v3 + 160LL))(v3, v9);\n  return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a2 + 72LL))(a2, v8);\n}", "assembly": "; \n; CharacterColorPage::toggleShip from 0x100153084 to 0x100153148 (196 bytes)\n; \n; 1 xrefs:\n; > CharacterColorPage::init @ 0x100152a10\n; \n; This function is hookable on this platform (idp: arm, 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 10:59:40 +0000\n; \nSTP             D9, D8, [SP,#-0x10+var_30]!                            ; +0x0, 0x100153084\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x100153088\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x10015308c\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x100153090\nADD             X29, SP, #0x30                                         ; +0x10, 0x100153094\nMOV             X19, X1                                                ; +0x14, 0x100153098\nLDR             X8, [X1]                                               ; +0x18, 0x10015309c\nLDR             X8, [X8,#0x430]                                        ; +0x1c, 0x1001530a0\nMOV             X0, X1                                                 ; +0x20, 0x1001530a4\nBLR             X8                                                     ; +0x24, 0x1001530a8\nMOV             X20, X0                                                ; +0x28, 0x1001530ac\nLDR             X8, [X19]                                              ; +0x2c, 0x1001530b0\nLDR             X8, [X8,#0x40]                                         ; +0x30, 0x1001530b4\nMOV             X0, X19                                                ; +0x34, 0x1001530b8\nBLR             X8                                                     ; +0x38, 0x1001530bc\nMOV             X21, X0                                                ; +0x3c, 0x1001530c0\nBL              GameManager__sharedState                               ; +0x40, 0x1001530c4\nCMP             W21, #1                                                ; +0x44, 0x1001530c8\nB.NE            loc_1001530EC                                          ; +0x48, 0x1001530cc\nLDR             W8, [X0,#0x374]                                        ; +0x4c, 0x1001530d0\nLDR             W9, [X0,#0x378]                                        ; +0x50, 0x1001530d4\nSUB             W1, W8, W9                                             ; +0x54, 0x1001530d8\nMOV             W21, #8                                                ; +0x58, 0x1001530dc\nADRP            X8, #dword_10075E3B0@PAGE                              ; +0x5c, 0x1001530e0\nLDR             S8, [X8,#dword_10075E3B0@PAGEOFF]                      ; +0x60, 0x1001530e4\nB               loc_100153104                                          ; +0x64, 0x1001530e8\nLDR             W8, [X0,#0x2D8]                                        ; +0x68, 0x1001530ec\nLDR             W9, [X0,#0x2DC]                                        ; +0x6c, 0x1001530f0\nSUB             W1, W8, W9                                             ; +0x70, 0x1001530f4\nMOV             W21, #1                                                ; +0x74, 0x1001530f8\nADRP            X8, #dword_10075CA98@PAGE                              ; +0x78, 0x1001530fc\nLDR             S8, [X8,#dword_10075CA98@PAGEOFF]                      ; +0x7c, 0x100153100\nMOV             X0, X20                                                ; +0x80, 0x100153104\nMOV             X2, X21                                                ; +0x84, 0x100153108\nBL              SimplePlayer__updatePlayerFrame                        ; +0x88, 0x10015310c\nLDR             X8, [X20]                                              ; +0x8c, 0x100153110\nLDR             X8, [X8,#0xA0]                                         ; +0x90, 0x100153114\nMOV             X0, X20                                                ; +0x94, 0x100153118\nFMOV            S0, S8                                                 ; +0x98, 0x10015311c\nBLR             X8                                                     ; +0x9c, 0x100153120\nLDR             X8, [X19]                                              ; +0xa0, 0x100153124\nLDR             X2, [X8,#0x48]                                         ; +0xa4, 0x100153128\nMOV             X0, X19                                                ; +0xa8, 0x10015312c\nMOV             X1, X21                                                ; +0xac, 0x100153130\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xb0, 0x100153134\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xb4, 0x100153138\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0xb8, 0x10015313c\nLDP             D9, D8, [SP+0x30+var_30],#0x40                         ; +0xbc, 0x100153140\nBR              X2                                                     ; +0xc0, 0x100153144", "xrefs": ["CharacterColorPage::init @ 0x100152a10"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}