{"type": "func", "start": 5369269456, "end": 5369269737, "name": "CharacterColorPage::toggleShip", "pseudocode": "// \n// CharacterColorPage::toggleShip from 0x140088cd0 to 0x140088de9 (281 bytes)\n// \n// 2 xrefs:\n// > CharacterColorPage::init @ 0x140088682\n// > <???> @ 0x1406c6cd8\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\n// Hidden C++ exception states: #wind=2\nvoid CharacterColorPage::toggleShip(CharacterColorPage *a1, cocos2d::CCObject *a2)\n{\n  SimplePlayer *v3; // rsi\n  __int64 v4; // rcx\n  int v5; // edx\n  IconType v6; // ebx\n  __int64 v7; // rax\n  void *v8; // [rsp+48h] [rbp+10h]\n  void *v9; // [rsp+48h] [rbp+10h]\n\n  v3 = (SimplePlayer *)((__int64 (__fastcall *)(cocos2d::CCObject *))a2->__vftable[13].copyWithZone)(a2);\n  if ( a2->getTag(a2) == 1 )\n  {\n    v4 = qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v8 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(v8);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v4 = qword_1406C2ED8;\n    }\n    v5 = *(_DWORD *)(v4 + 876) - *(_DWORD *)(v4 + 880);\n    v6 = Jetpack;\n  }\n  else\n  {\n    v7 = qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v9 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(v9);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v7 = qword_1406C2ED8;\n    }\n    v5 = *(_DWORD *)(v7 + 720) - *(_DWORD *)(v7 + 724);\n    v6 = Ship;\n  }\n  SimplePlayer::updatePlayerFrame(v3, v5, v6);\n  ((void (__fastcall *)(SimplePlayer *))v3->setScale_0)(v3);\n  a2->setTag(a2, v6);\n}", "assembly": "; \n; CharacterColorPage::toggleShip from 0x140088cd0 to 0x140088de9 (281 bytes)\n; \n; 2 xrefs:\n; > CharacterColorPage::init @ 0x140088682\n; > <???> @ 0x1406c6cd8\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, 0x140088cd0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x140088cd5\npush    rdi                                                            ; +0xa, 0x140088cda\nsub     rsp, 30h                                                       ; +0xb, 0x140088cdb\nmovaps  [rsp+38h+var_18], xmm6                                         ; +0xf, 0x140088cdf\nmov     rdi, rdx                                                       ; +0x14, 0x140088ce4\nmov     rax, [rdx]                                                     ; +0x17, 0x140088ce7\nmov     rcx, rdx                                                       ; +0x1a, 0x140088cea\ncall    qword ptr [rax+3A8h]                                           ; +0x1d, 0x140088ced\nmov     rsi, rax                                                       ; +0x23, 0x140088cf3\nmovss   xmm6, cs:dword_140622C70                                       ; +0x26, 0x140088cf6\nmov     r8, [rdi]                                                      ; +0x2e, 0x140088cfe\nmov     rcx, rdi                                                       ; +0x31, 0x140088d01\ncall    qword ptr [r8+38h]                                             ; +0x34, 0x140088d04\ncmp     eax, 1                                                         ; +0x38, 0x140088d08\njnz     short loc_140088D63                                            ; +0x3b, 0x140088d0b\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x3d, 0x140088d0d\ntest    rcx, rcx                                                       ; +0x44, 0x140088d14\njnz     short loc_140088D48                                            ; +0x47, 0x140088d17\nmov     ecx, 668h; Size                                                ; +0x49, 0x140088d19\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x4e, 0x140088d1e\nmov     [rsp+38h+arg_8], rax                                           ; +0x53, 0x140088d23\nmov     rcx, rax                                                       ; +0x58, 0x140088d28\ncall    sub_14017AB00                                                  ; +0x5b, 0x140088d2b\nnop                                                                    ; +0x60, 0x140088d30\nmov     cs:qword_1406C2ED8, rax                                        ; +0x61, 0x140088d31\nmov     rdx, [rax]                                                     ; +0x68, 0x140088d38\nmov     rcx, rax                                                       ; +0x6b, 0x140088d3b\ncall    qword ptr [rdx+48h]                                            ; +0x6e, 0x140088d3e\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x71, 0x140088d41\nmov     edx, [rcx+36Ch]                                                ; +0x78, 0x140088d48\nsub     edx, [rcx+370h]                                                ; +0x7e, 0x140088d4e\nmov     ebx, 8                                                         ; +0x84, 0x140088d54\nmovss   xmm6, cs:dword_140622C48                                       ; +0x89, 0x140088d59\njmp     short loc_140088DAF                                            ; +0x91, 0x140088d61\nmov     rax, cs:qword_1406C2ED8                                        ; +0x93, 0x140088d63\ntest    rax, rax                                                       ; +0x9a, 0x140088d6a\njnz     short loc_140088D9E                                            ; +0x9d, 0x140088d6d\nmov     ecx, 668h; Size                                                ; +0x9f, 0x140088d6f\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xa4, 0x140088d74\nmov     [rsp+38h+arg_8], rax                                           ; +0xa9, 0x140088d79\nmov     rcx, rax                                                       ; +0xae, 0x140088d7e\ncall    sub_14017AB00                                                  ; +0xb1, 0x140088d81\nnop                                                                    ; +0xb6, 0x140088d86\nmov     cs:qword_1406C2ED8, rax                                        ; +0xb7, 0x140088d87\nmov     rdx, [rax]                                                     ; +0xbe, 0x140088d8e\nmov     rcx, rax                                                       ; +0xc1, 0x140088d91\ncall    qword ptr [rdx+48h]                                            ; +0xc4, 0x140088d94\nmov     rax, cs:qword_1406C2ED8                                        ; +0xc7, 0x140088d97\nmov     edx, [rax+2D0h]                                                ; +0xce, 0x140088d9e\nsub     edx, [rax+2D4h]                                                ; +0xd4, 0x140088da4\nmov     ebx, 1                                                         ; +0xda, 0x140088daa\nmov     r8d, ebx                                                       ; +0xdf, 0x140088daf\nmov     rcx, rsi                                                       ; +0xe2, 0x140088db2\ncall    SimplePlayer__updatePlayerFrame                                ; +0xe5, 0x140088db5\nmov     rax, [rsi]                                                     ; +0xea, 0x140088dba\nmovaps  xmm1, xmm6                                                     ; +0xed, 0x140088dbd\nmov     rcx, rsi                                                       ; +0xf0, 0x140088dc0\ncall    qword ptr [rax+0A0h]                                           ; +0xf3, 0x140088dc3\nmov     rax, [rdi]                                                     ; +0xf9, 0x140088dc9\nmov     edx, ebx                                                       ; +0xfc, 0x140088dcc\nmov     rcx, rdi                                                       ; +0xfe, 0x140088dce\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x101, 0x140088dd1\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x106, 0x140088dd6\nmovaps  xmm6, [rsp+38h+var_18]                                         ; +0x10b, 0x140088ddb\nadd     rsp, 30h                                                       ; +0x110, 0x140088de0\npop     rdi                                                            ; +0x114, 0x140088de4\njmp     qword ptr [rax+40h]                                            ; +0x115, 0x140088de5", "xrefs": ["CharacterColorPage::init @ 0x140088682", "<???> @ 0x1406c6cd8"], "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"}