{"type": "func", "start": 5372608256, "end": 5372608564, "name": "PlayLayer::removeCheckpoint", "pseudocode": "// \n// PlayLayer::removeCheckpoint from 0x1403b7f00 to 0x1403b8034 (308 bytes)\n// \n// 8 xrefs:\n// > GJBaseGameLayer::checkCollisions @ 0x140214746\n// > PlayLayer::removeAllCheckpoints @ 0x1403b8065\n// > UILayer::handleKeypress @ 0x1404cdd63\n// > UILayer::onDeleteCheck @ 0x1404ce13a\n// > <???> @ 0x140699f40\n// > <???> @ 0x140699f54\n// > <???> @ 0x140699f64\n// > <???> @ 0x1406d6fec\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 PlayLayer::removeCheckpoint(PlayLayer *a1, bool a2)\n{\n  cocos2d::CCArray *m_checkpointArray; // rcx\n  struct cocos2d::CCObject *Object; // rax\n  GameObject *v6; // rbx\n  cocos2d::CCObject *m_glowSprite; // rcx\n  cocos2d::CCArray *v8; // rcx\n  struct cocos2d::CCObject *v9; // rax\n  __int64 v10; // rdx\n  struct cocos2d::CCObject *v11; // rbx\n  __int64 v12; // rcx\n\n  if ( cocos2d::CCArray::count(a1->m_checkpointArray) )\n  {\n    m_checkpointArray = a1->m_checkpointArray;\n    if ( a2 )\n      Object = cocos2d::CCArray::objectAtIndex(m_checkpointArray, 0);\n    else\n      Object = cocos2d::CCArray::lastObject(m_checkpointArray);\n    v6 = *(GameObject **)&Object[65].m_uIndexInArray;\n    GJBaseGameLayer::removeObjectFromSection(a1, v6);\n    m_glowSprite = v6->m_glowSprite;\n    if ( m_glowSprite )\n    {\n      cocos2d::CCObject::release(m_glowSprite);\n      v6->m_glowSprite->removeMeAndCleanup(v6->m_glowSprite);\n      v6->m_glowSprite = nullptr;\n    }\n    v6->removeMeAndCleanup(v6);\n    v8 = a1->m_checkpointArray;\n    if ( a2 )\n    {\n      cocos2d::CCArray::removeObjectAtIndex(v8, 0, 1);\n    }\n    else\n    {\n      cocos2d::CCArray::removeLastObject(v8, 1);\n      if ( a1->m_isPlatformer && a1->m_isPracticeMode )\n      {\n        if ( cocos2d::CCArray::count(a1->m_checkpointArray) )\n        {\n          v9 = cocos2d::CCArray::lastObject(a1->m_checkpointArray);\n          LOBYTE(v10) = -1;\n          v11 = v9;\n          v12 = *(_QWORD *)&v9[65].m_uIndexInArray;\n          *(_BYTE *)(v12 + 774) = 0;\n          *(_BYTE *)(v12 + 1007) = 0;\n          (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(v12 + 320) + 40LL))(v12 + 320, v10);\n          v11[83].m_uOrderOfArrival = a1->m_gameState.m_commandIndex;\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; PlayLayer::removeCheckpoint from 0x1403b7f00 to 0x1403b8034 (308 bytes)\n; \n; 8 xrefs:\n; > GJBaseGameLayer::checkCollisions @ 0x140214746\n; > PlayLayer::removeAllCheckpoints @ 0x1403b8065\n; > UILayer::handleKeypress @ 0x1404cdd63\n; > UILayer::onDeleteCheck @ 0x1404ce13a\n; > <???> @ 0x140699f40\n; > <???> @ 0x140699f54\n; > <???> @ 0x140699f64\n; > <???> @ 0x1406d6fec\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], rsi                                               ; +0x0, 0x1403b7f00\npush    rdi                                                            ; +0x5, 0x1403b7f05\nsub     rsp, 20h                                                       ; +0x6, 0x1403b7f06\nmov     rdi, rcx                                                       ; +0xa, 0x1403b7f0a\nmovzx   esi, dl                                                        ; +0xd, 0x1403b7f0d\nmov     rcx, [rcx+3888h]                                               ; +0x10, 0x1403b7f10\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x17, 0x1403b7f17\ntest    eax, eax                                                       ; +0x1d, 0x1403b7f1d\njz      loc_1403B8029                                                  ; +0x1f, 0x1403b7f1f\nmov     rcx, [rdi+3888h]                                               ; +0x25, 0x1403b7f25\nmov     [rsp+28h+arg_0], rbx                                           ; +0x2c, 0x1403b7f2c\ntest    sil, sil                                                       ; +0x31, 0x1403b7f31\njz      short loc_1403B7F40                                            ; +0x34, 0x1403b7f34\nxor     edx, edx                                                       ; +0x36, 0x1403b7f36\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x38, 0x1403b7f38\njmp     short loc_1403B7F46                                            ; +0x3e, 0x1403b7f3e\ncall    cs:?lastObject@CCArray@cocos2d@@QEAAPEAVCCObject@2@XZ; cocos2d::CCArray::lastObject(void) ; +0x40, 0x1403b7f40\nmov     rbx, [rax+0E58h]                                               ; +0x46, 0x1403b7f46\nmov     rcx, rdi                                                       ; +0x4d, 0x1403b7f4d\nmov     rdx, rbx                                                       ; +0x50, 0x1403b7f50\ncall    GJBaseGameLayer__removeObjectFromSection                       ; +0x53, 0x1403b7f53\nmov     rcx, [rbx+2F0h]                                                ; +0x58, 0x1403b7f58\ntest    rcx, rcx                                                       ; +0x5f, 0x1403b7f5f\njz      short loc_1403B7F85                                            ; +0x62, 0x1403b7f62\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x64, 0x1403b7f64\nmov     rcx, [rbx+2F0h]                                                ; +0x6a, 0x1403b7f6a\nmov     rax, [rcx]                                                     ; +0x71, 0x1403b7f71\ncall    qword ptr [rax+200h]                                           ; +0x74, 0x1403b7f74\nmov     qword ptr [rbx+2F0h], 0                                        ; +0x7a, 0x1403b7f7a\nmov     rax, [rbx]                                                     ; +0x85, 0x1403b7f85\nmov     rcx, rbx                                                       ; +0x88, 0x1403b7f88\ncall    qword ptr [rax+200h]                                           ; +0x8b, 0x1403b7f8b\nmov     rcx, [rdi+3888h]                                               ; +0x91, 0x1403b7f91\ntest    sil, sil                                                       ; +0x98, 0x1403b7f98\njz      short loc_1403B7FB8                                            ; +0x9b, 0x1403b7f9b\nmov     r8b, 1                                                         ; +0x9d, 0x1403b7f9d\nxor     edx, edx                                                       ; +0xa0, 0x1403b7fa0\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xa2, 0x1403b7fa2\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xa7, 0x1403b7fa7\nadd     rsp, 20h                                                       ; +0xac, 0x1403b7fac\npop     rdi                                                            ; +0xb0, 0x1403b7fb0\njmp     cs:?removeObjectAtIndex@CCArray@cocos2d@@QEAAXI_N@Z; cocos2d::CCArray::removeObjectAtIndex(uint,bool) ; +0xb1, 0x1403b7fb1\nmov     dl, 1                                                          ; +0xb8, 0x1403b7fb8\ncall    cs:?removeLastObject@CCArray@cocos2d@@QEAAX_N@Z; cocos2d::CCArray::removeLastObject(bool) ; +0xba, 0x1403b7fba\ncmp     byte ptr [rdi+309Eh], 0                                        ; +0xc0, 0x1403b7fc0\njz      short loc_1403B8024                                            ; +0xc7, 0x1403b7fc7\ncmp     byte ptr [rdi+31F0h], 0                                        ; +0xc9, 0x1403b7fc9\njz      short loc_1403B8024                                            ; +0xd0, 0x1403b7fd0\nmov     rcx, [rdi+3888h]                                               ; +0xd2, 0x1403b7fd2\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xd9, 0x1403b7fd9\ntest    eax, eax                                                       ; +0xdf, 0x1403b7fdf\njz      short loc_1403B8024                                            ; +0xe1, 0x1403b7fe1\nmov     rcx, [rdi+3888h]                                               ; +0xe3, 0x1403b7fe3\ncall    cs:?lastObject@CCArray@cocos2d@@QEAAPEAVCCObject@2@XZ; cocos2d::CCArray::lastObject(void) ; +0xea, 0x1403b7fea\nmov     dl, 0FFh                                                       ; +0xf0, 0x1403b7ff0\nmov     rbx, rax                                                       ; +0xf2, 0x1403b7ff2\nmov     rcx, [rax+0E58h]                                               ; +0xf5, 0x1403b7ff5\nmov     byte ptr [rcx+306h], 0                                         ; +0xfc, 0x1403b7ffc\nmov     byte ptr [rcx+3EFh], 0                                         ; +0x103, 0x1403b8003\nadd     rcx, 140h                                                      ; +0x10a, 0x1403b800a\nmov     r8, [rcx]                                                      ; +0x111, 0x1403b8011\ncall    qword ptr [r8+28h]                                             ; +0x114, 0x1403b8014\nmov     ecx, [rdi+3E0h]                                                ; +0x118, 0x1403b8018\nmov     [rbx+1258h], ecx                                               ; +0x11e, 0x1403b801e\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x124, 0x1403b8024\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x129, 0x1403b8029\nadd     rsp, 20h                                                       ; +0x12e, 0x1403b802e\npop     rdi                                                            ; +0x132, 0x1403b8032\nretn                                                                   ; +0x133, 0x1403b8033", "xrefs": ["GJBaseGameLayer::checkCollisions @ 0x140214746", "PlayLayer::removeAllCheckpoints @ 0x1403b8065", "UILayer::handleKeypress @ 0x1404cdd63", "UILayer::onDeleteCheck @ 0x1404ce13a", "<???> @ 0x140699f40", "<???> @ 0x140699f54", "<???> @ 0x140699f64", "<???> @ 0x1406d6fec"], "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"}