{"type": "func", "start": 11866552, "end": 11866744, "name": "CharacterColorPage::toggleShip", "pseudocode": "// \n// CharacterColorPage::toggleShip from 0xb511b8 to 0xb51278 (192 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x4c0a8\n// > CharacterColorPage::init @ 0xb52c10\n// > <???> @ 0x1541878\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 13:01:59 +0000\n// \n\n__int64 __fastcall CharacterColorPage::toggleShip(CharacterColorPage *this, cocos2d::CCObject *a2)\n{\n  __int64 v3; // x20\n  GameManager *v4; // x0\n  __int64 v5; // x0\n  long double v6; // q0\n  unsigned int v7; // w21\n  int v8; // w2\n  int v9; // w1\n  __int64 v11; // x0\n  long double v12; // [xsp+30h] [xbp+30h]\n\n  v3 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 1072LL))(a2);\n  v4 = (GameManager *)(*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);\n  if ( (_DWORD)v4 == 1 )\n  {\n    v11 = GameManager::sharedState(v4);\n    v7 = 8;\n    LODWORD(v6) = 1065772646;\n    v8 = 8;\n    v9 = *(_DWORD *)(v11 + 884) - *(_DWORD *)(v11 + 888);\n  }\n  else\n  {\n    v5 = GameManager::sharedState(v4);\n    LODWORD(v6) = 1066611507;\n    v7 = 1;\n    v8 = 1;\n    v9 = *(_DWORD *)(v5 + 728) - *(_DWORD *)(v5 + 732);\n  }\n  v12 = v6;\n  SimplePlayer::updatePlayerFrame(v3, v9, v8);\n  (*(void (__fastcall **)(__int64, long double))(*(_QWORD *)v3 + 160LL))(v3, v12);\n  return (*(__int64 (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)a2 + 72LL))(a2, v7);\n}", "assembly": "; \n; CharacterColorPage::toggleShip from 0xb511b8 to 0xb51278 (192 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x4c0a8\n; > CharacterColorPage::init @ 0xb52c10\n; > <???> @ 0x1541878\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 13:01:59 +0000\n; \nSTP             X29, X30, [SP,#var_40]!                                ; +0x0, 0xb511b8\nMOV             X0, X1                                                 ; +0x4, 0xb511bc\nMOV             X29, SP                                                ; +0x8, 0xb511c0\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0xc, 0xb511c4\nSTR             X21, [SP,#0x40+var_20]                                 ; +0x10, 0xb511c8\nMOV             X19, X1                                                ; +0x14, 0xb511cc\nLDR             X1, [X1]                                               ; +0x18, 0xb511d0\nLDR             X1, [X1,#0x430]                                        ; +0x1c, 0xb511d4\nBLR             X1                                                     ; +0x20, 0xb511d8\nMOV             X20, X0                                                ; +0x24, 0xb511dc\nLDR             X1, [X19]                                              ; +0x28, 0xb511e0\nMOV             X0, X19                                                ; +0x2c, 0xb511e4\nLDR             X1, [X1,#0x40]                                         ; +0x30, 0xb511e8\nBLR             X1                                                     ; +0x34, 0xb511ec\nCMP             W0, #1                                                 ; +0x38, 0xb511f0\nB.EQ            loc_B51258                                             ; +0x3c, 0xb511f4\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x40, 0xb511f8\nLDR             W1, [X0,#0x2D8]                                        ; +0x44, 0xb511fc\nLDR             S0, =0x3F933333                                        ; +0x48, 0xb51200\nLDR             W0, [X0,#0x2DC]                                        ; +0x4c, 0xb51204\nMOV             W21, #1                                                ; +0x50, 0xb51208\nMOV             W2, W21                                                ; +0x54, 0xb5120c\nSUB             W1, W1, W0                                             ; +0x58, 0xb51210\nMOV             X0, X20                                                ; +0x5c, 0xb51214\nSTR             Q0, [X29,#0x40+var_10]                                 ; +0x60, 0xb51218\nBL              _ZN12SimplePlayer17updatePlayerFrameEi8IconType; SimplePlayer::updatePlayerFrame(int,IconType) ; +0x64, 0xb5121c\nLDR             X1, [X20]                                              ; +0x68, 0xb51220\nMOV             X0, X20                                                ; +0x6c, 0xb51224\nLDR             Q0, [X29,#0x40+var_10]                                 ; +0x70, 0xb51228\nLDR             X1, [X1,#0xA0]                                         ; +0x74, 0xb5122c\nBLR             X1                                                     ; +0x78, 0xb51230\nLDR             X2, [X19]                                              ; +0x7c, 0xb51234\nMOV             X0, X19                                                ; +0x80, 0xb51238\nMOV             W1, W21                                                ; +0x84, 0xb5123c\nLDR             X2, [X2,#0x48]                                         ; +0x88, 0xb51240\nBLR             X2                                                     ; +0x8c, 0xb51244\nLDR             X21, [SP,#0x40+var_20]                                 ; +0x90, 0xb51248\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x94, 0xb5124c\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x98, 0xb51250\nRET                                                                    ; +0x9c, 0xb51254\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0xa0, 0xb51258\nLDR             W1, [X0,#0x374]                                        ; +0xa4, 0xb5125c\nLDR             W0, [X0,#0x378]                                        ; +0xa8, 0xb51260\nMOV             W21, #8                                                ; +0xac, 0xb51264\nLDR             S0, =0x3F866666                                        ; +0xb0, 0xb51268\nMOV             W2, W21                                                ; +0xb4, 0xb5126c\nSUB             W1, W1, W0                                             ; +0xb8, 0xb51270\nB               loc_B51214                                             ; +0xbc, 0xb51274", "xrefs": ["<???> @ 0x4c0a8", "CharacterColorPage::init @ 0xb52c10", "<???> @ 0x1541878"], "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"}