{"type": "func", "start": 5372186096, "end": 5372186669, "name": "GJBaseGameLayer::checkpointActivated", "pseudocode": "// \n// GJBaseGameLayer::checkpointActivated from 0x140350df0 to 0x14035102d (573 bytes)\n// \n// 4 xrefs:\n// > LevelEditorLayer::checkpointActivated @ 0x1404008a7\n// > PlayLayer::checkpointActivated @ 0x140514190\n// > <???> @ 0x14076b8b8\n// > <???> @ 0x1409202dc\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:30:47 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall GJBaseGameLayer::checkpointActivated(__int64 a1, __int64 a2)\n{\n  __int64 v4; // rcx\n  __int64 v5; // rax\n  float v6; // xmm7_4\n  float v7; // xmm6_4\n  float v8; // xmm9_4\n  float v9; // xmm6_4\n  float v10; // xmm6_4\n  __int64 v11; // rax\n  __int64 v12; // rax\n  __int64 v13; // rbx\n  __int64 v14; // rax\n  __int64 v15; // rsi\n  __int64 v16; // rcx\n  const struct cocos2d::CCPoint *v17; // rax\n  const struct cocos2d::CCPoint *v18; // rbx\n  const struct cocos2d::CCPoint *v19; // rax\n  cocos2d::CCObject *v20; // rbx\n  _BYTE v21[8]; // [rsp+20h] [rbp-78h] BYREF\n  _BYTE v22[8]; // [rsp+28h] [rbp-70h] BYREF\n  _BYTE v23[8]; // [rsp+30h] [rbp-68h] BYREF\n  _BYTE v24[8]; // [rsp+38h] [rbp-60h] BYREF\n  void *v25; // [rsp+40h] [rbp-58h] BYREF\n  _BYTE v26[8]; // [rsp+48h] [rbp-50h] BYREF\n  float v27; // [rsp+A8h] [rbp+10h] BYREF\n  __int16 v28; // [rsp+B0h] [rbp+18h] BYREF\n  char v29; // [rsp+B2h] [rbp+1Ah]\n  char v30; // [rsp+B8h] [rbp+20h] BYREF\n  float v31; // [rsp+BCh] [rbp+24h]\n\n  if ( !*(_BYTE *)(a2 + 1052) )\n  {\n    (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)a2 + 1208LL))(a2, &v27);\n    v5 = cocos2d::CCDirector::sharedDirector(v4);\n    cocos2d::CCDirector::getWinSize(v5, &v30);\n    v6 = v27 - 50.0;\n    v7 = v27 + 100.0;\n    v8 = (float)((float)((float)rand() / 32767.0) * (float)(v7 - v6)) + v6;\n    v9 = v31 + 50.0;\n    v10 = (float)(v9 / (*(float (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 4296) + 168LL))(*(_QWORD *)(a1 + 4296)))\n        + *(float *)(a1 + 1044);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, v8, v10);\n    v11 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(*(_QWORD *)(a2 + 896) + 320LL) + 8LL))(*(_QWORD *)(a2 + 896) + 320LL);\n    v28 = *(_WORD *)v11;\n    v29 = *(_BYTE *)(v11 + 2);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, (const struct cocos2d::CCPoint *)&v27);\n    v13 = v12;\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, (const struct cocos2d::CCPoint *)v21);\n    v15 = v14;\n    cocos2d::CCPoint::operator-(v13, v22, v14);\n    v16 = qword_14090BFD0;\n    if ( !qword_14090BFD0 )\n    {\n      v25 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager((__int64)v25);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v16 = qword_14090BFD0;\n    }\n    if ( !*(_BYTE *)(v16 + 957) )\n    {\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, (const struct cocos2d::CCPoint *)&dword_14090AA70);\n      v18 = v17;\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v26, (const struct cocos2d::CCPoint *)v22);\n      v20 = cocos2d::CCLightning::lightningWithStrikePoint(v19, v18);\n      (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v20 + 184LL))(v20, v15);\n      (**((void (__fastcall ***)(__int64, __int16 *))v20 + 40))((__int64)v20 + 320, &v28);\n      *((_DWORD *)v20 + 92) = 1084227584;\n      *((_WORD *)v20 + 186) = 257;\n      *((_DWORD *)v20 + 95) = 1065353216;\n      (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *, _QWORD))(**(_QWORD **)(a1 + 4296) + 456LL))(\n        *(_QWORD *)(a1 + 4296),\n        v20,\n        0);\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::checkpointActivated from 0x140350df0 to 0x14035102d (573 bytes)\n; \n; 4 xrefs:\n; > LevelEditorLayer::checkpointActivated @ 0x1404008a7\n; > PlayLayer::checkpointActivated @ 0x140514190\n; > <???> @ 0x14076b8b8\n; > <???> @ 0x1409202dc\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:30:47 +0000\n; \npush    rbx                                                            ; +0x0, 0x140350df0\npush    rsi                                                            ; +0x2, 0x140350df2\npush    rdi                                                            ; +0x3, 0x140350df3\nsub     rsp, 80h                                                       ; +0x4, 0x140350df4\nmovaps  [rsp+98h+var_28], xmm6                                         ; +0xb, 0x140350dfb\nmovaps  [rsp+98h+var_38], xmm7                                         ; +0x10, 0x140350e00\nmovaps  [rsp+98h+var_48], xmm9                                         ; +0x15, 0x140350e05\nmov     rbx, rdx                                                       ; +0x1b, 0x140350e0b\nmov     rdi, rcx                                                       ; +0x1e, 0x140350e0e\ncmp     byte ptr [rdx+41Ch], 0                                         ; +0x21, 0x140350e11\njnz     loc_140351012                                                  ; +0x28, 0x140350e18\nmov     rax, [rdx]                                                     ; +0x2e, 0x140350e1e\nlea     rdx, [rsp+98h+arg_8]                                           ; +0x31, 0x140350e21\nmov     rcx, rbx                                                       ; +0x39, 0x140350e29\ncall    qword ptr [rax+4B8h]                                           ; +0x3c, 0x140350e2c\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x42, 0x140350e32\nmov     rcx, rax                                                       ; +0x48, 0x140350e38\nlea     rdx, [rsp+98h+arg_18]                                          ; +0x4b, 0x140350e3b\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x53, 0x140350e43\nmovss   xmm6, [rsp+98h+arg_8]                                          ; +0x59, 0x140350e49\nmovaps  xmm7, xmm6                                                     ; +0x62, 0x140350e52\nsubss   xmm7, cs:dword_1408356B0                                       ; +0x65, 0x140350e55\naddss   xmm6, cs:dword_1408357B0                                       ; +0x6d, 0x140350e5d\ncall    cs:rand                                                        ; +0x75, 0x140350e65\nmovd    xmm9, eax                                                      ; +0x7b, 0x140350e6b\ncvtdq2ps xmm9, xmm9                                                    ; +0x80, 0x140350e70\ndivss   xmm9, cs:dword_140835BDC                                       ; +0x84, 0x140350e74\nsubss   xmm6, xmm7                                                     ; +0x8d, 0x140350e7d\nmulss   xmm9, xmm6                                                     ; +0x91, 0x140350e81\naddss   xmm9, xmm7                                                     ; +0x96, 0x140350e86\nmovss   xmm6, [rsp+98h+arg_1C]                                         ; +0x9b, 0x140350e8b\naddss   xmm6, cs:dword_1408356B0                                       ; +0xa4, 0x140350e94\nmov     rcx, [rdi+10C8h]                                               ; +0xac, 0x140350e9c\nmov     rax, [rcx]                                                     ; +0xb3, 0x140350ea3\ncall    qword ptr [rax+0A8h]                                           ; +0xb6, 0x140350ea6\ndivss   xmm6, xmm0                                                     ; +0xbc, 0x140350eac\naddss   xmm6, dword ptr [rdi+414h]                                     ; +0xc0, 0x140350eb0\nmovaps  xmm2, xmm6                                                     ; +0xc8, 0x140350eb8\nmovaps  xmm1, xmm9                                                     ; +0xcb, 0x140350ebb\nlea     rcx, [rsp+98h+var_78]                                          ; +0xcf, 0x140350ebf\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xd4, 0x140350ec4\nmov     rcx, [rbx+380h]                                                ; +0xda, 0x140350eca\nadd     rcx, 140h                                                      ; +0xe1, 0x140350ed1\nmov     rax, [rcx]                                                     ; +0xe8, 0x140350ed8\ncall    qword ptr [rax+8]                                              ; +0xeb, 0x140350edb\nmovzx   ecx, word ptr [rax]                                            ; +0xee, 0x140350ede\nmov     [rsp+98h+arg_10], cx                                           ; +0xf1, 0x140350ee1\nmovzx   eax, byte ptr [rax+2]                                          ; +0xf9, 0x140350ee9\nmov     [rsp+98h+arg_12], al                                           ; +0xfd, 0x140350eed\nlea     rdx, [rsp+98h+arg_8]                                           ; +0x104, 0x140350ef4\nlea     rcx, [rsp+98h+var_68]                                          ; +0x10c, 0x140350efc\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x111, 0x140350f01\nmov     rbx, rax                                                       ; +0x117, 0x140350f07\nlea     rdx, [rsp+98h+var_78]                                          ; +0x11a, 0x140350f0a\nlea     rcx, [rsp+98h+var_60]                                          ; +0x11f, 0x140350f0f\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x124, 0x140350f14\nmov     rsi, rax                                                       ; +0x12a, 0x140350f1a\nmov     r8, rax                                                        ; +0x12d, 0x140350f1d\nlea     rdx, [rsp+98h+var_70]                                          ; +0x130, 0x140350f20\nmov     rcx, rbx                                                       ; +0x135, 0x140350f25\ncall    cs:??GCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator-(cocos2d::CCPoint const &) ; +0x138, 0x140350f28\nmov     rcx, cs:qword_14090BFD0                                        ; +0x13e, 0x140350f2e\ntest    rcx, rcx                                                       ; +0x145, 0x140350f35\njnz     short loc_140350F6C                                            ; +0x148, 0x140350f38\nmov     ecx, 6E8h; Size                                                ; +0x14a, 0x140350f3a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x14f, 0x140350f3f\nmov     [rsp+98h+var_58], rax                                          ; +0x154, 0x140350f44\nmov     rcx, rax                                                       ; +0x159, 0x140350f49\ncall    GameManager__GameManager                                       ; +0x15c, 0x140350f4c\nnop                                                                    ; +0x161, 0x140350f51\nmov     cs:qword_14090BFD0, rax                                        ; +0x162, 0x140350f52\nmov     rcx, [rax]                                                     ; +0x169, 0x140350f59\nmov     rdx, [rcx+48h]                                                 ; +0x16c, 0x140350f5c\nmov     rcx, rax                                                       ; +0x170, 0x140350f60\ncall    rdx                                                            ; +0x173, 0x140350f63\nmov     rcx, cs:qword_14090BFD0                                        ; +0x175, 0x140350f65\ncmp     byte ptr [rcx+3BDh], 0                                         ; +0x17c, 0x140350f6c\njnz     loc_140351012                                                  ; +0x183, 0x140350f73\nlea     rdx, dword_14090AA70                                           ; +0x189, 0x140350f79\nlea     rcx, [rsp+98h+var_58]                                          ; +0x190, 0x140350f80\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x195, 0x140350f85\nmov     rbx, rax                                                       ; +0x19b, 0x140350f8b\nlea     rdx, [rsp+98h+var_70]                                          ; +0x19e, 0x140350f8e\nlea     rcx, [rsp+98h+var_50]                                          ; +0x1a3, 0x140350f93\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x1a8, 0x140350f98\nmov     rcx, rax                                                       ; +0x1ae, 0x140350f9e\nmovss   xmm2, cs:dword_140834F20                                       ; +0x1b1, 0x140350fa1\nmov     rdx, rbx                                                       ; +0x1b9, 0x140350fa9\ncall    cocos2d__CCLightning__lightningWithStrikePoint                 ; +0x1bc, 0x140350fac\nmov     rbx, rax                                                       ; +0x1c1, 0x140350fb1\nmov     rcx, [rax]                                                     ; +0x1c4, 0x140350fb4\nmov     r8, [rcx+0B8h]                                                 ; +0x1c7, 0x140350fb7\nmov     rdx, rsi                                                       ; +0x1ce, 0x140350fbe\nmov     rcx, rax                                                       ; +0x1d1, 0x140350fc1\ncall    r8                                                             ; +0x1d4, 0x140350fc4\nlea     rcx, [rbx+140h]                                                ; +0x1d7, 0x140350fc7\nmov     rdx, [rcx]                                                     ; +0x1de, 0x140350fce\nmov     r8, [rdx]                                                      ; +0x1e1, 0x140350fd1\nlea     rdx, [rsp+98h+arg_10]                                          ; +0x1e4, 0x140350fd4\ncall    r8                                                             ; +0x1ec, 0x140350fdc\nmov     dword ptr [rbx+170h], 40A00000h                                ; +0x1ef, 0x140350fdf\nmov     word ptr [rbx+174h], 101h                                      ; +0x1f9, 0x140350fe9\nmov     dword ptr [rbx+17Ch], 3F800000h                                ; +0x202, 0x140350ff2\nmov     rcx, [rdi+10C8h]                                               ; +0x20c, 0x140350ffc\nmov     rax, [rcx]                                                     ; +0x213, 0x140351003\nxor     r8d, r8d                                                       ; +0x216, 0x140351006\nmov     rdx, rbx                                                       ; +0x219, 0x140351009\ncall    qword ptr [rax+1C8h]                                           ; +0x21c, 0x14035100c\nmovaps  xmm6, [rsp+98h+var_28]                                         ; +0x222, 0x140351012\nmovaps  xmm7, [rsp+98h+var_38]                                         ; +0x227, 0x140351017\nmovaps  xmm9, [rsp+98h+var_48]                                         ; +0x22c, 0x14035101c\nadd     rsp, 80h                                                       ; +0x232, 0x140351022\npop     rdi                                                            ; +0x239, 0x140351029\npop     rsi                                                            ; +0x23a, 0x14035102a\npop     rbx                                                            ; +0x23b, 0x14035102b\nretn                                                                   ; +0x23c, 0x14035102c", "xrefs": ["LevelEditorLayer::checkpointActivated @ 0x1404008a7", "PlayLayer::checkpointActivated @ 0x140514190", "<???> @ 0x14076b8b8", "<???> @ 0x1409202dc"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}