{"type": "func", "start": 5370883104, "end": 5370883340, "name": "GJBaseGameLayer::switchToRobotMode", "pseudocode": "// \n// GJBaseGameLayer::switchToRobotMode from 0x140212c20 to 0x140212d0c (236 bytes)\n// \n// 2 xrefs:\n// > PlayerObject::loadFromCheckpoint @ 0x1403a3052\n// > <???> @ 0x1406cd020\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 GJBaseGameLayer::switchToRobotMode(\n        GJBaseGameLayer *a1,\n        PlayerObject *a2,\n        GameObject *m_lastActivatedPortal2,\n        bool a4)\n{\n  __int64 v7; // rax\n  bool v8; // r8\n  cocos2d::CCPoint v9; // [rsp+30h] [rbp+8h] BYREF\n\n  PlayerObject::toggleFlyMode(a2, 0, 0);\n  PlayerObject::toggleBirdMode(a2, 0, 0);\n  PlayerObject::toggleRollMode(a2, 0, 0);\n  PlayerObject::toggleDartMode(a2, 0, 0);\n  PlayerObject::toggleSpiderMode(a2, 0, 0);\n  PlayerObject::toggleSwingMode(a2, 0, 0);\n  if ( m_lastActivatedPortal2 )\n  {\n    m_lastActivatedPortal2->getPosition_0(m_lastActivatedPortal2);\n    cocos2d::CCPoint::CCPoint(&v9);\n    cocos2d::CCPoint::operator=(&a2->m_lastPortalPos, v7);\n    a2->m_lastActivatedPortal = m_lastActivatedPortal2;\n  }\n  if ( a1->m_gameState.m_isDualMode && a1->m_gameState.m_lastActivatedPortal2 )\n  {\n    m_lastActivatedPortal2 = a1->m_gameState.m_lastActivatedPortal2;\n  }\n  else if ( !m_lastActivatedPortal2 )\n  {\nLABEL_9:\n    v8 = 0;\n    goto LABEL_10;\n  }\n  a1->m_gameState.m_lastActivatedPortal1 = m_lastActivatedPortal2;\n  if ( !m_lastActivatedPortal2->m_hasNoEffects )\n    goto LABEL_9;\n  v8 = 1;\nLABEL_10:\n  PlayerObject::toggleRobotMode(a2, 1, v8);\n}", "assembly": "; \n; GJBaseGameLayer::switchToRobotMode from 0x140212c20 to 0x140212d0c (236 bytes)\n; \n; 2 xrefs:\n; > PlayerObject::loadFromCheckpoint @ 0x1403a3052\n; > <???> @ 0x1406cd020\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_8], rbx                                               ; +0x0, 0x140212c20\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x140212c25\npush    rdi                                                            ; +0xa, 0x140212c2a\nsub     rsp, 20h                                                       ; +0xb, 0x140212c2b\nmov     rdi, rdx                                                       ; +0xf, 0x140212c2f\nmov     rbx, r8                                                        ; +0x12, 0x140212c32\nmov     rsi, rcx                                                       ; +0x15, 0x140212c35\nxor     r8d, r8d                                                       ; +0x18, 0x140212c38\nmov     rcx, rdi                                                       ; +0x1b, 0x140212c3b\nxor     edx, edx                                                       ; +0x1e, 0x140212c3e\ncall    PlayerObject__toggleFlyMode                                    ; +0x20, 0x140212c40\nxor     r8d, r8d                                                       ; +0x25, 0x140212c45\nxor     edx, edx                                                       ; +0x28, 0x140212c48\nmov     rcx, rdi                                                       ; +0x2a, 0x140212c4a\ncall    PlayerObject__toggleBirdMode                                   ; +0x2d, 0x140212c4d\nxor     r8d, r8d                                                       ; +0x32, 0x140212c52\nxor     edx, edx                                                       ; +0x35, 0x140212c55\nmov     rcx, rdi                                                       ; +0x37, 0x140212c57\ncall    PlayerObject__toggleRollMode                                   ; +0x3a, 0x140212c5a\nxor     r8d, r8d                                                       ; +0x3f, 0x140212c5f\nxor     edx, edx                                                       ; +0x42, 0x140212c62\nmov     rcx, rdi                                                       ; +0x44, 0x140212c64\ncall    PlayerObject__toggleDartMode                                   ; +0x47, 0x140212c67\nxor     r8d, r8d                                                       ; +0x4c, 0x140212c6c\nxor     edx, edx                                                       ; +0x4f, 0x140212c6f\nmov     rcx, rdi                                                       ; +0x51, 0x140212c71\ncall    PlayerObject__toggleSpiderMode                                 ; +0x54, 0x140212c74\nxor     r8d, r8d                                                       ; +0x59, 0x140212c79\nxor     edx, edx                                                       ; +0x5c, 0x140212c7c\nmov     rcx, rdi                                                       ; +0x5e, 0x140212c7e\ncall    PlayerObject__toggleSwingMode                                  ; +0x61, 0x140212c81\ntest    rbx, rbx                                                       ; +0x66, 0x140212c86\njz      short loc_140212CBC                                            ; +0x69, 0x140212c89\nmov     rax, [rbx]                                                     ; +0x6b, 0x140212c8b\nmov     rcx, rbx                                                       ; +0x6e, 0x140212c8e\ncall    qword ptr [rax+0C8h]                                           ; +0x71, 0x140212c91\nmov     rdx, rax                                                       ; +0x77, 0x140212c97\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x7a, 0x140212c9a\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x7f, 0x140212c9f\nmov     rdx, rax                                                       ; +0x85, 0x140212ca5\nlea     rcx, [rdi+0A00h]                                               ; +0x88, 0x140212ca8\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x8f, 0x140212caf\nmov     [rdi+0A80h], rbx                                               ; +0x95, 0x140212cb5\ncmp     byte ptr [rsi+422h], 0                                         ; +0x9c, 0x140212cbc\njz      short loc_140212CD6                                            ; +0xa3, 0x140212cc3\nmov     rax, [rsi+408h]                                                ; +0xa5, 0x140212cc5\ntest    rax, rax                                                       ; +0xac, 0x140212ccc\njz      short loc_140212CD6                                            ; +0xaf, 0x140212ccf\nmov     rbx, rax                                                       ; +0xb1, 0x140212cd1\njmp     short loc_140212CDB                                            ; +0xb4, 0x140212cd4\ntest    rbx, rbx                                                       ; +0xb6, 0x140212cd6\njz      short loc_140212CF0                                            ; +0xb9, 0x140212cd9\nmov     [rsi+400h], rbx                                                ; +0xbb, 0x140212cdb\ncmp     byte ptr [rbx+41Ch], 0                                         ; +0xc2, 0x140212ce2\njz      short loc_140212CF0                                            ; +0xc9, 0x140212ce9\nmov     r8b, 1                                                         ; +0xcb, 0x140212ceb\njmp     short loc_140212CF3                                            ; +0xce, 0x140212cee\nxor     r8d, r8d                                                       ; +0xd0, 0x140212cf0\nmov     dl, 1                                                          ; +0xd3, 0x140212cf3\nmov     rcx, rdi                                                       ; +0xd5, 0x140212cf5\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xd8, 0x140212cf8\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xdd, 0x140212cfd\nadd     rsp, 20h                                                       ; +0xe2, 0x140212d02\npop     rdi                                                            ; +0xe6, 0x140212d06\njmp     PlayerObject__toggleRobotMode                                  ; +0xe7, 0x140212d07", "xrefs": ["PlayerObject::loadFromCheckpoint @ 0x1403a3052", "<???> @ 0x1406cd020"], "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"}