{"type": "func", "start": 5372594448, "end": 5372595096, "name": "PlayLayer::processCheckpoints", "pseudocode": "// \n// PlayLayer::processCheckpoints from 0x1403b4910 to 0x1403b4b98 (648 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1405c9d08\n// > <???> @ 0x1406d6ee4\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 PlayLayer::processCheckpoints(PlayLayer *a1)\n{\n  GameManager *v2; // rcx\n  CheckpointObject *v3; // rbp\n  CheckpointGameObject *m_activatedCheckpoint; // rdx\n  const cocos2d::CCPoint *v5; // rax\n  int m_centerGroupID; // edx\n  GameObject *MainObject; // rax\n  __int64 *m_physicalCheckpointObject; // rbx\n  __int64 v9; // rdi\n  __int64 v10; // rax\n  PlayerCheckpoint *m_player1Checkpoint; // rbx\n  __int64 v12; // rax\n  GameObject *v13; // rax\n  __int64 m_targetGroupID; // rdx\n  void *v15; // [rsp+80h] [rbp+8h] BYREF\n  cocos2d::CCPoint v16; // [rsp+88h] [rbp+10h] BYREF\n\n  if ( a1->m_tryPlaceCheckpoint )\n  {\n    a1->m_tryPlaceCheckpoint = 0;\n    PlayLayer::markCheckpoint(a1);\n  }\n  if ( a1->m_activatedCheckpoint )\n  {\n    v2 = (GameManager *)qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v15 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00((__int64)v15);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v2 = (GameManager *)qword_1406C2ED8;\n    }\n    if ( GameManager::getGameVariable(v2, \"0146\") )\n      goto LABEL_15;\n    v3 = PlayLayer::markCheckpoint(a1);\n    if ( !v3 )\n      goto LABEL_15;\n    ((void (__fastcall *)(CheckpointGameObject *, void **))a1->m_activatedCheckpoint->getRealPosition)(\n      a1->m_activatedCheckpoint,\n      &v15);\n    m_activatedCheckpoint = a1->m_activatedCheckpoint;\n    if ( m_activatedCheckpoint->m_targetPlayer1 )\n    {\n      v5 = a1->m_player1->getPosition_0(a1->m_player1);\n    }\n    else\n    {\n      m_centerGroupID = m_activatedCheckpoint->m_centerGroupID;\n      if ( m_centerGroupID <= 0 )\n        goto LABEL_14;\n      MainObject = GJBaseGameLayer::tryGetMainObject(a1, m_centerGroupID);\n      if ( !MainObject )\n        goto LABEL_14;\n      v5 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(GameObject *, cocos2d::CCPoint *))MainObject->getRealPosition)(\n                                       MainObject,\n                                       &v16);\n    }\n    cocos2d::CCPoint::operator=(&v15, v5);\nLABEL_14:\n    m_physicalCheckpointObject = (__int64 *)v3->m_physicalCheckpointObject;\n    v9 = *m_physicalCheckpointObject;\n    cocos2d::CCPoint::CCPoint(&v16);\n    (*(void (__fastcall **)(__int64 *, __int64))(v9 + 1200))(m_physicalCheckpointObject, v10);\n    m_player1Checkpoint = v3->m_player1Checkpoint;\n    cocos2d::CCPoint::CCPoint(&v16);\n    cocos2d::CCPoint::operator=(&m_player1Checkpoint->m_position, v12);\n    v3->m_player1Checkpoint->m_platformerCheckpoint = 1;\n    v13 = v3->m_physicalCheckpointObject;\n    v13->m_isDisabled2 = 1;\n    v13->m_isInvisible = 1;\n    v13->setOpacity(&v13->cocos2d::CCRGBAProtocol, 0);\n    v3->m_uniqueID = a1->m_activatedCheckpoint->m_uniqueID;\n    v3->m_respawnID = a1->m_activatedCheckpoint->m_respawnID;\nLABEL_15:\n    m_targetGroupID = (unsigned int)a1->m_activatedCheckpoint->m_targetGroupID;\n    if ( (int)m_targetGroupID > 0 )\n      ((void (__fastcall *)(TriggerEffectDelegate *, __int64, _QWORD))a1->spawnGroup)(\n        &a1->TriggerEffectDelegate,\n        m_targetGroupID,\n        0);\n    GJBaseGameLayer::gameEventTriggered(a1, Checkpoint, 0, 0);\n    a1->m_activatedCheckpoint = nullptr;\n  }\n}", "assembly": "; \n; PlayLayer::processCheckpoints from 0x1403b4910 to 0x1403b4b98 (648 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1405c9d08\n; > <???> @ 0x1406d6ee4\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_10], rbx                                              ; +0x0, 0x1403b4910\npush    rbp                                                            ; +0x5, 0x1403b4915\npush    rsi                                                            ; +0x6, 0x1403b4916\npush    rdi                                                            ; +0x7, 0x1403b4917\nsub     rsp, 60h                                                       ; +0x8, 0x1403b4918\nmov     rsi, rcx                                                       ; +0xc, 0x1403b491c\ncmp     byte ptr [rcx+3A64h], 0                                        ; +0xf, 0x1403b491f\njz      short loc_1403B4934                                            ; +0x16, 0x1403b4926\nmov     byte ptr [rcx+3A64h], 0                                        ; +0x18, 0x1403b4928\ncall    PlayLayer__markCheckpoint                                      ; +0x1f, 0x1403b492f\ncmp     qword ptr [rsi+3A68h], 0                                       ; +0x24, 0x1403b4934\njz      loc_1403B4B88                                                  ; +0x2c, 0x1403b493c\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x32, 0x1403b4942\ntest    rcx, rcx                                                       ; +0x39, 0x1403b4949\njnz     short loc_1403B4980                                            ; +0x3c, 0x1403b494c\nmov     ecx, 668h; Size                                                ; +0x3e, 0x1403b494e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x43, 0x1403b4953\nmov     [rsp+78h+arg_0], rax                                           ; +0x48, 0x1403b4958\nmov     rcx, rax                                                       ; +0x50, 0x1403b4960\ncall    sub_14017AB00                                                  ; +0x53, 0x1403b4963\nnop                                                                    ; +0x58, 0x1403b4968\nmov     cs:qword_1406C2ED8, rax                                        ; +0x59, 0x1403b4969\nmov     rdx, [rax]                                                     ; +0x60, 0x1403b4970\nmov     rcx, rax                                                       ; +0x63, 0x1403b4973\ncall    qword ptr [rdx+48h]                                            ; +0x66, 0x1403b4976\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x69, 0x1403b4979\nlea     rdx, a0146; \"0146\"                                             ; +0x70, 0x1403b4980\ncall    GameManager__getGameVariable                                   ; +0x77, 0x1403b4987\ntest    al, al                                                         ; +0x7c, 0x1403b498c\njnz     loc_1403B4AD1                                                  ; +0x7e, 0x1403b498e\nmov     rcx, rsi                                                       ; +0x84, 0x1403b4994\ncall    PlayLayer__markCheckpoint                                      ; +0x87, 0x1403b4997\nmov     rbp, rax                                                       ; +0x8c, 0x1403b499c\ntest    rax, rax                                                       ; +0x8f, 0x1403b499f\njz      loc_1403B4AD1                                                  ; +0x92, 0x1403b49a2\nmov     rcx, [rsi+3A68h]                                               ; +0x98, 0x1403b49a8\nmov     r8, [rcx]                                                      ; +0x9f, 0x1403b49af\nlea     rdx, [rsp+78h+arg_0]                                           ; +0xa2, 0x1403b49b2\ncall    qword ptr [r8+4A8h]                                            ; +0xaa, 0x1403b49ba\nmov     rdx, [rsi+3A68h]                                               ; +0xb1, 0x1403b49c1\ncmp     byte ptr [rdx+6A4h], 0                                         ; +0xb8, 0x1403b49c8\njz      short loc_1403B49E3                                            ; +0xbf, 0x1403b49cf\nmov     rcx, [rsi+0DA0h]                                               ; +0xc1, 0x1403b49d1\nmov     rax, [rcx]                                                     ; +0xc8, 0x1403b49d8\ncall    qword ptr [rax+0C8h]                                           ; +0xcb, 0x1403b49db\njmp     short loc_1403B4A0F                                            ; +0xd1, 0x1403b49e1\nmov     edx, [rdx+5CCh]                                                ; +0xd3, 0x1403b49e3\ntest    edx, edx                                                       ; +0xd9, 0x1403b49e9\njle     short loc_1403B4A20                                            ; +0xdb, 0x1403b49eb\nmov     rcx, rsi                                                       ; +0xdd, 0x1403b49ed\ncall    GJBaseGameLayer__tryGetMainObject                              ; +0xe0, 0x1403b49f0\ntest    rax, rax                                                       ; +0xe5, 0x1403b49f5\njz      short loc_1403B4A20                                            ; +0xe8, 0x1403b49f8\nmov     r8, [rax]                                                      ; +0xea, 0x1403b49fa\nlea     rdx, [rsp+78h+arg_8]                                           ; +0xed, 0x1403b49fd\nmov     rcx, rax                                                       ; +0xf5, 0x1403b4a05\ncall    qword ptr [r8+4A8h]                                            ; +0xf8, 0x1403b4a08\nmov     rdx, rax                                                       ; +0xff, 0x1403b4a0f\nlea     rcx, [rsp+78h+arg_0]                                           ; +0x102, 0x1403b4a12\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x10a, 0x1403b4a1a\nmov     rbx, [rbp+0E58h]                                               ; +0x110, 0x1403b4a20\nmov     rdi, [rbx]                                                     ; +0x117, 0x1403b4a27\nlea     rdx, [rsp+78h+arg_0]                                           ; +0x11a, 0x1403b4a2a\nlea     rcx, [rsp+78h+arg_8]                                           ; +0x122, 0x1403b4a32\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x12a, 0x1403b4a3a\nmov     rdx, rax                                                       ; +0x130, 0x1403b4a40\nmov     rcx, rbx                                                       ; +0x133, 0x1403b4a43\ncall    qword ptr [rdi+4B0h]                                           ; +0x136, 0x1403b4a46\nmov     rbx, [rbp+0E60h]                                               ; +0x13c, 0x1403b4a4c\nlea     rdx, [rsp+78h+arg_0]                                           ; +0x143, 0x1403b4a53\nlea     rcx, [rsp+78h+arg_8]                                           ; +0x14b, 0x1403b4a5b\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x153, 0x1403b4a63\nlea     rcx, [rbx+140h]                                                ; +0x159, 0x1403b4a69\nmov     rdx, rax                                                       ; +0x160, 0x1403b4a70\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x163, 0x1403b4a73\nmov     rax, [rbp+0E60h]                                               ; +0x169, 0x1403b4a79\nmov     byte ptr [rax+1B0h], 1                                         ; +0x170, 0x1403b4a80\nmov     rax, [rbp+0E58h]                                               ; +0x177, 0x1403b4a87\nmov     byte ptr [rax+306h], 1                                         ; +0x17e, 0x1403b4a8e\nmov     byte ptr [rax+3EFh], 1                                         ; +0x185, 0x1403b4a95\nlea     rcx, [rax+140h]                                                ; +0x18c, 0x1403b4a9c\nmov     rax, [rcx]                                                     ; +0x193, 0x1403b4aa3\nxor     edx, edx                                                       ; +0x196, 0x1403b4aa6\ncall    qword ptr [rax+28h]                                            ; +0x198, 0x1403b4aa8\nmov     rax, [rsi+3A68h]                                               ; +0x19b, 0x1403b4aab\nmov     ecx, [rax+39Ch]                                                ; +0x1a2, 0x1403b4ab2\nmov     [rbp+0E80h], ecx                                               ; +0x1a8, 0x1403b4ab8\nmov     rax, [rsi+3A68h]                                               ; +0x1ae, 0x1403b4abe\nmov     ecx, [rax+744h]                                                ; +0x1b5, 0x1403b4ac5\nmov     [rbp+0E84h], ecx                                               ; +0x1bb, 0x1403b4acb\nmov     r8, [rsi+3A68h]                                                ; +0x1c1, 0x1403b4ad1\nmov     edx, [r8+5C8h]                                                 ; +0x1c8, 0x1403b4ad8\nxor     ebx, ebx                                                       ; +0x1cf, 0x1403b4adf\ntest    edx, edx                                                       ; +0x1d1, 0x1403b4ae1\njle     loc_1403B4B6F                                                  ; +0x1d3, 0x1403b4ae3\nxorps   xmm0, xmm0                                                     ; +0x1d9, 0x1403b4ae9\nmovdqu  xmmword ptr [rsp+78h+Block], xmm0                              ; +0x1dc, 0x1403b4aec\nmov     [rsp+78h+var_28], rbx                                          ; +0x1e2, 0x1403b4af2\nlea     rcx, [rsi+198h]                                                ; +0x1e7, 0x1403b4af7\nmov     r9, [rcx]                                                      ; +0x1ee, 0x1403b4afe\nmov     eax, [r8+698h]                                                 ; +0x1f1, 0x1403b4b01\nmov     [rsp+78h+var_48], eax                                          ; +0x1f8, 0x1403b4b08\nmov     eax, [r8+39Ch]                                                 ; +0x1fc, 0x1403b4b0c\nmov     [rsp+78h+var_50], eax                                          ; +0x203, 0x1403b4b13\nlea     rax, [rsp+78h+Block]                                           ; +0x207, 0x1403b4b17\nmov     [rsp+78h+var_58], rax                                          ; +0x20c, 0x1403b4b1c\nxorps   xmm3, xmm3                                                     ; +0x211, 0x1403b4b21\nxor     r8d, r8d                                                       ; +0x214, 0x1403b4b24\ncall    qword ptr [r9+8]                                               ; +0x217, 0x1403b4b27\nnop                                                                    ; +0x21b, 0x1403b4b2b\nmov     rcx, [rsp+78h+Block]; Block                                    ; +0x21c, 0x1403b4b2c\ntest    rcx, rcx                                                       ; +0x221, 0x1403b4b31\njz      short loc_1403B4B6F                                            ; +0x224, 0x1403b4b34\nmov     rdx, [rsp+78h+var_28]                                          ; +0x226, 0x1403b4b36\nsub     rdx, rcx                                                       ; +0x22b, 0x1403b4b3b\nand     rdx, 0FFFFFFFFFFFFFFFCh                                        ; +0x22e, 0x1403b4b3e\nmov     rax, rcx                                                       ; +0x232, 0x1403b4b42\ncmp     rdx, 1000h                                                     ; +0x235, 0x1403b4b45\njb      short loc_1403B4B6A                                            ; +0x23c, 0x1403b4b4c\nadd     rdx, 27h ; '''                                                 ; +0x23e, 0x1403b4b4e\nmov     rcx, [rcx-8]                                                   ; +0x242, 0x1403b4b52\nsub     rax, rcx                                                       ; +0x246, 0x1403b4b56\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x249, 0x1403b4b59\ncmp     rax, 1Fh                                                       ; +0x24d, 0x1403b4b5d\njbe     short loc_1403B4B6A                                            ; +0x251, 0x1403b4b61\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x253, 0x1403b4b63\nalign 2                                                                ; +0x259, 0x1403b4b69\ncall    j_j_free                                                       ; +0x25a, 0x1403b4b6a\nxor     r9d, r9d                                                       ; +0x25f, 0x1403b4b6f\nxor     r8d, r8d                                                       ; +0x262, 0x1403b4b72\nlea     edx, [r9+3Ch]                                                  ; +0x265, 0x1403b4b75\nmov     rcx, rsi                                                       ; +0x269, 0x1403b4b79\ncall    GJBaseGameLayer__gameEventTriggered                            ; +0x26c, 0x1403b4b7c\nmov     [rsi+3A68h], rbx                                               ; +0x271, 0x1403b4b81\nmov     rbx, [rsp+78h+arg_10]                                          ; +0x278, 0x1403b4b88\nadd     rsp, 60h                                                       ; +0x280, 0x1403b4b90\npop     rdi                                                            ; +0x284, 0x1403b4b94\npop     rsi                                                            ; +0x285, 0x1403b4b95\npop     rbp                                                            ; +0x286, 0x1403b4b96\nretn                                                                   ; +0x287, 0x1403b4b97", "xrefs": ["<???> @ 0x1405c9d08", "<???> @ 0x1406d6ee4"], "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"}