{"type": "func", "start": 4296187296, "end": 4296187826, "name": "GJBaseGameLayer::activatePlayerControlTrigger", "pseudocode": "// \n// GJBaseGameLayer::activatePlayerControlTrigger from 0x100129da0 to 0x100129fb2 (530 bytes)\n// \n// 1 xrefs:\n// > EffectGameObject::triggerObject @ 0x1001ba0e0\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::activatePlayerControlTrigger(GJBaseGameLayer *a1, PlayerControlGameObject *a2)\n{\n  bool m_targetPlayer1; // r15\n  bool m_targetPlayer2; // r13\n  bool m_stopJump; // cl\n  bool m_stopMove; // r12\n  bool v6; // r15\n  bool v7; // r15\n  bool m_stopRotation; // [rsp+0h] [rbp-2Ah]\n  bool v9; // [rsp+1h] [rbp-29h]\n\n  m_targetPlayer1 = a2->m_targetPlayer1;\n  m_targetPlayer2 = a2->m_targetPlayer2;\n  m_stopJump = a2->m_stopJump;\n  m_stopMove = a2->m_stopMove;\n  m_stopRotation = a2->m_stopRotation;\n  if ( !m_targetPlayer1 && m_targetPlayer2 )\n    goto LABEL_12;\n  v9 = a2->m_stopJump;\n  if ( m_stopJump )\n  {\n    PlayerObject::releaseButton(a1->m_player1, Jump);\n    m_stopJump = v9;\n    if ( !m_stopMove || !a1->m_isPlatformer )\n    {\nLABEL_4:\n      v6 = !m_targetPlayer1;\n      if ( !m_stopRotation )\n        goto LABEL_5;\n      goto LABEL_10;\n    }\n  }\n  else if ( !m_stopMove || !a1->m_isPlatformer )\n  {\n    goto LABEL_4;\n  }\n  PlayerObject::releaseButton(a1->m_player1, (PlayerButton)5);\n  PlayerObject::releaseButton(a1->m_player1, (PlayerButton)2);\n  PlayerObject::releaseButton(a1->m_player1, (PlayerButton)3);\n  m_stopJump = v9;\n  v6 = !m_targetPlayer1;\n  if ( !m_stopRotation )\n  {\nLABEL_5:\n    v7 = m_targetPlayer2 || v6;\n    if ( !a2->m_stopSlide )\n      goto LABEL_6;\n    goto LABEL_11;\n  }\nLABEL_10:\n  PlayerObject::stopRotation(a1->m_player1, 1, 0);\n  m_stopJump = v9;\n  v7 = m_targetPlayer2 || v6;\n  if ( a2->m_stopSlide )\n  {\nLABEL_11:\n    PlayerObject::handlePlayerCommand(a1->m_player1, 543);\n    m_stopJump = v9;\n    if ( !v7 )\n      return;\nLABEL_12:\n    if ( m_stopJump )\n    {\n      PlayerObject::releaseButton(a1->m_player2, Jump);\n      if ( !a1->m_isPlatformer || !m_stopMove )\n      {\nLABEL_14:\n        if ( !m_stopRotation )\n          goto LABEL_15;\n        goto LABEL_19;\n      }\n    }\n    else if ( !a1->m_isPlatformer || !m_stopMove )\n    {\n      goto LABEL_14;\n    }\n    PlayerObject::releaseButton(a1->m_player2, (PlayerButton)5);\n    PlayerObject::releaseButton(a1->m_player2, (PlayerButton)2);\n    PlayerObject::releaseButton(a1->m_player2, (PlayerButton)3);\n    if ( !m_stopRotation )\n    {\nLABEL_15:\n      if ( !a2->m_stopSlide )\n        return;\n      goto LABEL_16;\n    }\nLABEL_19:\n    PlayerObject::stopRotation(a1->m_player2, 1, 0);\n    if ( !a2->m_stopSlide )\n      return;\nLABEL_16:\n    PlayerObject::handlePlayerCommand(a1->m_player2, 543);\n    return;\n  }\nLABEL_6:\n  if ( v7 )\n    goto LABEL_12;\n}", "assembly": "; \n; GJBaseGameLayer::activatePlayerControlTrigger from 0x100129da0 to 0x100129fb2 (530 bytes)\n; \n; 1 xrefs:\n; > EffectGameObject::triggerObject @ 0x1001ba0e0\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, 0x100129da0\nmov     rbp, rsp                                                       ; +0x1, 0x100129da1\npush    r15                                                            ; +0x4, 0x100129da4\npush    r14                                                            ; +0x6, 0x100129da6\npush    r13                                                            ; +0x8, 0x100129da8\npush    r12                                                            ; +0xa, 0x100129daa\npush    rbx                                                            ; +0xc, 0x100129dac\npush    rax                                                            ; +0xd, 0x100129dad\nmov     r14, rsi                                                       ; +0xe, 0x100129dae\nmov     rbx, rdi                                                       ; +0x11, 0x100129db1\nmovzx   r15d, byte ptr [rsi+694h]                                      ; +0x14, 0x100129db4\nmovzx   r13d, byte ptr [rsi+695h]                                      ; +0x1c, 0x100129dbc\nmovzx   ecx, byte ptr [rsi+72Ch]                                       ; +0x24, 0x100129dc4\nmovzx   r12d, byte ptr [rsi+72Dh]                                      ; +0x2b, 0x100129dcb\nmovzx   eax, byte ptr [rsi+72Eh]                                       ; +0x33, 0x100129dd3\nmov     [rbp+var_2A], al                                               ; +0x3a, 0x100129dda\nmov     eax, r13d                                                      ; +0x3d, 0x100129ddd\nnot     al                                                             ; +0x40, 0x100129de0\nor      al, r15b                                                       ; +0x42, 0x100129de2\ntest    al, 1                                                          ; +0x45, 0x100129de5\njz      loc_100129EDF                                                  ; +0x47, 0x100129de7\ntest    cl, cl                                                         ; +0x4d, 0x100129ded\nmov     [rbp+var_29], cl                                               ; +0x4f, 0x100129def\njnz     short loc_100129E30                                            ; +0x52, 0x100129df2\nmovzx   eax, byte ptr [rbx+2F36h]                                      ; +0x54, 0x100129df4\nand     al, r12b                                                       ; +0x5b, 0x100129dfb\ncmp     al, 1                                                          ; +0x5e, 0x100129dfe\njz      short loc_100129E53                                            ; +0x60, 0x100129e00\nxor     r15b, 1                                                        ; +0x62, 0x100129e02\ncmp     [rbp+var_2A], 0                                                ; +0x66, 0x100129e06\njnz     loc_100129E98                                                  ; +0x6a, 0x100129e0a\nor      r15b, r13b                                                     ; +0x70, 0x100129e10\ncmp     byte ptr [r14+72Fh], 1                                         ; +0x73, 0x100129e13\njz      loc_100129EC0                                                  ; +0x7b, 0x100129e1b\ntest    r15b, 1                                                        ; +0x81, 0x100129e21\njnz     loc_100129EDF                                                  ; +0x85, 0x100129e25\njmp     loc_100129FA3                                                  ; +0x8b, 0x100129e2b\nmov     rdi, [rbx+0CA0h]                                               ; +0x90, 0x100129e30\nmov     esi, 1                                                         ; +0x97, 0x100129e37\ncall    PlayerObject__releaseButton                                    ; +0x9c, 0x100129e3c\nmovzx   ecx, [rbp+var_29]                                              ; +0xa1, 0x100129e41\nmovzx   eax, byte ptr [rbx+2F36h]                                      ; +0xa5, 0x100129e45\nand     al, r12b                                                       ; +0xac, 0x100129e4c\ncmp     al, 1                                                          ; +0xaf, 0x100129e4f\njnz     short loc_100129E02                                            ; +0xb1, 0x100129e51\nmov     rdi, [rbx+0CA0h]                                               ; +0xb3, 0x100129e53\nmov     esi, 5                                                         ; +0xba, 0x100129e5a\ncall    PlayerObject__releaseButton                                    ; +0xbf, 0x100129e5f\nmov     rdi, [rbx+0CA0h]                                               ; +0xc4, 0x100129e64\nmov     esi, 2                                                         ; +0xcb, 0x100129e6b\ncall    PlayerObject__releaseButton                                    ; +0xd0, 0x100129e70\nmov     rdi, [rbx+0CA0h]                                               ; +0xd5, 0x100129e75\nmov     esi, 3                                                         ; +0xdc, 0x100129e7c\ncall    PlayerObject__releaseButton                                    ; +0xe1, 0x100129e81\nmovzx   ecx, [rbp+var_29]                                              ; +0xe6, 0x100129e86\nxor     r15b, 1                                                        ; +0xea, 0x100129e8a\ncmp     [rbp+var_2A], 0                                                ; +0xee, 0x100129e8e\njz      loc_100129E10                                                  ; +0xf2, 0x100129e92\nmov     rdi, [rbx+0CA0h]                                               ; +0xf8, 0x100129e98\nmov     esi, 1                                                         ; +0xff, 0x100129e9f\nxor     edx, edx                                                       ; +0x104, 0x100129ea4\ncall    PlayerObject__stopRotation                                     ; +0x106, 0x100129ea6\nmovzx   ecx, [rbp+var_29]                                              ; +0x10b, 0x100129eab\nor      r15b, r13b                                                     ; +0x10f, 0x100129eaf\ncmp     byte ptr [r14+72Fh], 1                                         ; +0x112, 0x100129eb2\njnz     loc_100129E21                                                  ; +0x11a, 0x100129eba\nmov     rdi, [rbx+0CA0h]                                               ; +0x120, 0x100129ec0\nmov     esi, 21Fh                                                      ; +0x127, 0x100129ec7\ncall    PlayerObject__handlePlayerCommand                              ; +0x12c, 0x100129ecc\nmovzx   ecx, [rbp+var_29]                                              ; +0x131, 0x100129ed1\ntest    r15b, 1                                                        ; +0x135, 0x100129ed5\njz      loc_100129FA3                                                  ; +0x139, 0x100129ed9\ntest    cl, cl                                                         ; +0x13f, 0x100129edf\njnz     short loc_100129F27                                            ; +0x141, 0x100129ee1\nand     r12b, [rbx+2F36h]                                              ; +0x143, 0x100129ee3\ncmp     r12b, 1                                                        ; +0x14a, 0x100129eea\njz      short loc_100129F45                                            ; +0x14e, 0x100129eee\ncmp     [rbp+var_2A], 0                                                ; +0x150, 0x100129ef0\njnz     loc_100129F82                                                  ; +0x154, 0x100129ef4\ncmp     byte ptr [r14+72Fh], 1                                         ; +0x15a, 0x100129efa\njnz     loc_100129FA3                                                  ; +0x162, 0x100129f02\nmov     rdi, [rbx+0CA8h]                                               ; +0x168, 0x100129f08\nmov     esi, 21Fh                                                      ; +0x16f, 0x100129f0f\nadd     rsp, 8                                                         ; +0x174, 0x100129f14\npop     rbx                                                            ; +0x178, 0x100129f18\npop     r12                                                            ; +0x179, 0x100129f19\npop     r13                                                            ; +0x17b, 0x100129f1b\npop     r14                                                            ; +0x17d, 0x100129f1d\npop     r15                                                            ; +0x17f, 0x100129f1f\npop     rbp                                                            ; +0x181, 0x100129f21\njmp     PlayerObject__handlePlayerCommand                              ; +0x182, 0x100129f22\nmov     rdi, [rbx+0CA8h]                                               ; +0x187, 0x100129f27\nmov     esi, 1                                                         ; +0x18e, 0x100129f2e\ncall    PlayerObject__releaseButton                                    ; +0x193, 0x100129f33\nand     r12b, [rbx+2F36h]                                              ; +0x198, 0x100129f38\ncmp     r12b, 1                                                        ; +0x19f, 0x100129f3f\njnz     short loc_100129EF0                                            ; +0x1a3, 0x100129f43\nmov     rdi, [rbx+0CA8h]                                               ; +0x1a5, 0x100129f45\nmov     esi, 5                                                         ; +0x1ac, 0x100129f4c\ncall    PlayerObject__releaseButton                                    ; +0x1b1, 0x100129f51\nmov     rdi, [rbx+0CA8h]                                               ; +0x1b6, 0x100129f56\nmov     esi, 2                                                         ; +0x1bd, 0x100129f5d\ncall    PlayerObject__releaseButton                                    ; +0x1c2, 0x100129f62\nmov     rdi, [rbx+0CA8h]                                               ; +0x1c7, 0x100129f67\nmov     esi, 3                                                         ; +0x1ce, 0x100129f6e\ncall    PlayerObject__releaseButton                                    ; +0x1d3, 0x100129f73\ncmp     [rbp+var_2A], 0                                                ; +0x1d8, 0x100129f78\njz      loc_100129EFA                                                  ; +0x1dc, 0x100129f7c\nmov     rdi, [rbx+0CA8h]                                               ; +0x1e2, 0x100129f82\nmov     esi, 1                                                         ; +0x1e9, 0x100129f89\nxor     edx, edx                                                       ; +0x1ee, 0x100129f8e\ncall    PlayerObject__stopRotation                                     ; +0x1f0, 0x100129f90\ncmp     byte ptr [r14+72Fh], 1                                         ; +0x1f5, 0x100129f95\njz      loc_100129F08                                                  ; +0x1fd, 0x100129f9d\nadd     rsp, 8                                                         ; +0x203, 0x100129fa3\npop     rbx                                                            ; +0x207, 0x100129fa7\npop     r12                                                            ; +0x208, 0x100129fa8\npop     r13                                                            ; +0x20a, 0x100129faa\npop     r14                                                            ; +0x20c, 0x100129fac\npop     r15                                                            ; +0x20e, 0x100129fae\npop     rbp                                                            ; +0x210, 0x100129fb0\nretn                                                                   ; +0x211, 0x100129fb1", "xrefs": ["EffectGameObject::triggerObject @ 0x1001ba0e0"], "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"}