{"type": "func", "start": 4296164640, "end": 4296164808, "name": "GJBaseGameLayer::switchToRobotMode", "pseudocode": "// \n// GJBaseGameLayer::switchToRobotMode from 0x100124520 to 0x1001245c8 (168 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::collisionCheckObjects @ 0x1001271a3\n// > PlayerObject::loadFromCheckpoint @ 0x10041d03b\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 GJBaseGameLayer::switchToRobotMode(\n        GJBaseGameLayer *a1,\n        PlayerObject *a2,\n        GameObject *m_lastActivatedPortal2,\n        bool a4)\n{\n  bool m_hasNoEffects; // al\n  _BYTE v6[40]; // [rsp+8h] [rbp-28h] BYREF\n\n  PlayerObject::switchedToMode(a2, RobotPortal);\n  if ( m_lastActivatedPortal2 )\n  {\n    ((void (__fastcall *)(GameObject *))m_lastActivatedPortal2->getPosition)(m_lastActivatedPortal2);\n    sub_10028CC60(v6);\n    sub_10028CC90();\n    a2->m_lastActivatedPortal = m_lastActivatedPortal2;\n  }\n  if ( a1->m_gameState.m_isDualMode && a1->m_gameState.m_lastActivatedPortal2 )\n    m_lastActivatedPortal2 = a1->m_gameState.m_lastActivatedPortal2;\n  if ( m_lastActivatedPortal2 )\n  {\n    a1->m_gameState.m_lastActivatedPortal1 = m_lastActivatedPortal2;\n    m_hasNoEffects = m_lastActivatedPortal2->m_hasNoEffects;\n  }\n  else\n  {\n    m_hasNoEffects = 0;\n  }\n  PlayerObject::toggleRobotMode(a2, 1, m_hasNoEffects);\n}", "assembly": "; \n; GJBaseGameLayer::switchToRobotMode from 0x100124520 to 0x1001245c8 (168 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::collisionCheckObjects @ 0x1001271a3\n; > PlayerObject::loadFromCheckpoint @ 0x10041d03b\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\npush    rbp                                                            ; +0x0, 0x100124520\nmov     rbp, rsp                                                       ; +0x1, 0x100124521\npush    r15                                                            ; +0x4, 0x100124524\npush    r14                                                            ; +0x6, 0x100124526\npush    r12                                                            ; +0x8, 0x100124528\npush    rbx                                                            ; +0xa, 0x10012452a\nsub     rsp, 10h                                                       ; +0xb, 0x10012452b\nmov     r14, rdx                                                       ; +0xf, 0x10012452f\nmov     rbx, rsi                                                       ; +0x12, 0x100124532\nmov     r15, rdi                                                       ; +0x15, 0x100124535\nmov     rdi, rsi                                                       ; +0x18, 0x100124538\nmov     esi, 1Bh                                                       ; +0x1b, 0x10012453b\ncall    PlayerObject__switchedToMode                                   ; +0x20, 0x100124540\ntest    r14, r14                                                       ; +0x25, 0x100124545\njz      short loc_10012457B                                            ; +0x28, 0x100124548\nmov     rax, [r14]                                                     ; +0x2a, 0x10012454a\nmov     rdi, r14                                                       ; +0x2d, 0x10012454d\ncall    qword ptr [rax+0C0h]                                           ; +0x30, 0x100124550\nlea     r12, [rbp+var_28]                                              ; +0x36, 0x100124556\nmov     rdi, r12                                                       ; +0x3a, 0x10012455a\nmov     rsi, rax                                                       ; +0x3d, 0x10012455d\ncall    sub_10028CC60                                                  ; +0x40, 0x100124560\nlea     rdi, [rbx+9B0h]                                                ; +0x45, 0x100124565\nmov     rsi, r12                                                       ; +0x4c, 0x10012456c\ncall    sub_10028CC90                                                  ; +0x4f, 0x10012456f\nmov     [rbx+0A18h], r14                                               ; +0x54, 0x100124574\ncmp     byte ptr [r15+3F2h], 1                                         ; +0x5b, 0x10012457b\njnz     short loc_100124593                                            ; +0x63, 0x100124583\nmov     rax, [r15+3D8h]                                                ; +0x65, 0x100124585\ntest    rax, rax                                                       ; +0x6c, 0x10012458c\ncmovnz  r14, rax                                                       ; +0x6f, 0x10012458f\ntest    r14, r14                                                       ; +0x73, 0x100124593\njz      short loc_1001245A9                                            ; +0x76, 0x100124596\nmov     [r15+3D0h], r14                                                ; +0x78, 0x100124598\nmovzx   eax, byte ptr [r14+414h]                                       ; +0x7f, 0x10012459f\njmp     short loc_1001245AB                                            ; +0x87, 0x1001245a7\nxor     eax, eax                                                       ; +0x89, 0x1001245a9\nmovzx   edx, al                                                        ; +0x8b, 0x1001245ab\nmov     rdi, rbx                                                       ; +0x8e, 0x1001245ae\nmov     esi, 1                                                         ; +0x91, 0x1001245b1\ncall    PlayerObject__toggleRobotMode                                  ; +0x96, 0x1001245b6\nadd     rsp, 10h                                                       ; +0x9b, 0x1001245bb\npop     rbx                                                            ; +0x9f, 0x1001245bf\npop     r12                                                            ; +0xa0, 0x1001245c0\npop     r14                                                            ; +0xa2, 0x1001245c2\npop     r15                                                            ; +0xa4, 0x1001245c4\npop     rbp                                                            ; +0xa6, 0x1001245c6\nretn                                                                   ; +0xa7, 0x1001245c7", "xrefs": ["GJBaseGameLayer::collisionCheckObjects @ 0x1001271a3", "PlayerObject::loadFromCheckpoint @ 0x10041d03b"], "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"}