{"type": "func", "start": 5371095744, "end": 5371096308, "name": "GJBaseGameLayer::checkpointActivated", "pseudocode": "// \n// GJBaseGameLayer::checkpointActivated from 0x140246ac0 to 0x140246cf4 (564 bytes)\n// \n// 4 xrefs:\n// > LevelEditorLayer::checkpointActivated @ 0x1402e0f28\n// > PlayLayer::checkpointActivated @ 0x1403b4fb0\n// > <???> @ 0x1405670d8\n// > <???> @ 0x1406ce6c4\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=1\nvoid GJBaseGameLayer::checkpointActivated(GJBaseGameLayer *a1, CheckpointGameObject *a2)\n{\n  __int64 v4; // rcx\n  cocos2d::CCDirector *v5; // rax\n  float v6; // xmm7_4\n  float v7; // xmm6_4\n  float v8; // xmm9_4\n  float v9; // xmm0_4\n  const cocos2d::ccColor3B *v10; // rax\n  __int64 v11; // rax\n  __int64 v12; // rbx\n  const cocos2d::CCPoint *v13; // rax\n  const cocos2d::CCPoint *v14; // rsi\n  __int64 v15; // rcx\n  cocos2d::CCPoint v16; // rax\n  cocos2d::CCPoint v17; // rbx\n  cocos2d::CCPoint v18; // rax\n  cocos2d::CCLightning *v19; // rbx\n  char v20[8]; // [rsp+28h] [rbp-70h] BYREF\n  cocos2d::CCPoint v21; // [rsp+30h] [rbp-68h] BYREF\n  cocos2d::CCPoint v22; // [rsp+38h] [rbp-60h] BYREF\n  cocos2d::CCPoint v23; // [rsp+40h] [rbp-58h] BYREF\n  cocos2d::CCPoint v24; // [rsp+48h] [rbp-50h] BYREF\n  float v25; // [rsp+A8h] [rbp+10h] BYREF\n  __int16 v26; // [rsp+B0h] [rbp+18h] BYREF\n  GLubyte b; // [rsp+B2h] [rbp+1Ah]\n\n  if ( !a2->m_hasNoEffects )\n  {\n    ((void (__fastcall *)(CheckpointGameObject *, float *))a2->getRealPosition)(a2, &v25);\n    v5 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v4);\n    cocos2d::CCDirector::getWinSize(v5);\n    v6 = v25 - 50.0;\n    v7 = v25 + 100.0;\n    v8 = (float)((float)((float)rand() / 32767.0) * (float)(v7 - v6)) + v6;\n    v9 = a1->m_objectLayer->getScale(a1->m_objectLayer);\n    cocos2d::CCPoint::CCPoint(v9, v8);\n    v10 = a2->m_colorSprite->getColor(&a2->m_colorSprite->cocos2d::CCRGBAProtocol);\n    v26 = *(_WORD *)&v10->r;\n    b = v10->b;\n    cocos2d::CCPoint::CCPoint(&v21);\n    v12 = v11;\n    cocos2d::CCPoint::CCPoint(&v22);\n    v14 = v13;\n    cocos2d::CCPoint::operator-(v12, v20, v13);\n    v15 = qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v23 = (cocos2d::CCPoint)operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(*(_QWORD *)&v23);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v15 = qword_1406C2ED8;\n    }\n    if ( !*(_BYTE *)(v15 + 917) )\n    {\n      cocos2d::CCPoint::CCPoint(&v23);\n      v17 = v16;\n      cocos2d::CCPoint::CCPoint(&v24);\n      v19 = cocos2d::CCLightning::lightningWithStrikePoint(v18, v17, 0.5);\n      v19->setPosition_0(v19, v14);\n      v19->setColor(&v19->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v26);\n      v19->m_lineWidth = 5.0;\n      *(_WORD *)&v19->m_unkBool = 257;\n      v19->m_opacityModify = 1.0;\n      a1->m_objectLayer->addChild_0(a1->m_objectLayer, v19, 0);\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::checkpointActivated from 0x140246ac0 to 0x140246cf4 (564 bytes)\n; \n; 4 xrefs:\n; > LevelEditorLayer::checkpointActivated @ 0x1402e0f28\n; > PlayLayer::checkpointActivated @ 0x1403b4fb0\n; > <???> @ 0x1405670d8\n; > <???> @ 0x1406ce6c4\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    rbx                                                            ; +0x0, 0x140246ac0\npush    rsi                                                            ; +0x2, 0x140246ac2\npush    rdi                                                            ; +0x3, 0x140246ac3\nsub     rsp, 80h                                                       ; +0x4, 0x140246ac4\nmovaps  [rsp+98h+var_28], xmm6                                         ; +0xb, 0x140246acb\nmovaps  [rsp+98h+var_38], xmm7                                         ; +0x10, 0x140246ad0\nmovaps  [rsp+98h+var_48], xmm9                                         ; +0x15, 0x140246ad5\nmov     rbx, rdx                                                       ; +0x1b, 0x140246adb\nmov     rdi, rcx                                                       ; +0x1e, 0x140246ade\ncmp     byte ptr [rdx+41Ch], 0                                         ; +0x21, 0x140246ae1\njnz     loc_140246CD9                                                  ; +0x28, 0x140246ae8\nmov     rax, [rdx]                                                     ; +0x2e, 0x140246aee\nlea     rdx, [rsp+98h+arg_8]                                           ; +0x31, 0x140246af1\nmov     rcx, rbx                                                       ; +0x39, 0x140246af9\ncall    qword ptr [rax+4A8h]                                           ; +0x3c, 0x140246afc\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x42, 0x140246b02\nmov     rcx, rax                                                       ; +0x48, 0x140246b08\nlea     rdx, [rsp+98h+arg_18]                                          ; +0x4b, 0x140246b0b\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x53, 0x140246b13\nmovss   xmm6, [rsp+98h+arg_8]                                          ; +0x59, 0x140246b19\nmovaps  xmm7, xmm6                                                     ; +0x62, 0x140246b22\nsubss   xmm7, cs:dword_1406231E0                                       ; +0x65, 0x140246b25\naddss   xmm6, cs:dword_1406232BC                                       ; +0x6d, 0x140246b2d\ncall    cs:rand                                                        ; +0x75, 0x140246b35\nmovd    xmm9, eax                                                      ; +0x7b, 0x140246b3b\ncvtdq2ps xmm9, xmm9                                                    ; +0x80, 0x140246b40\ndivss   xmm9, cs:dword_140623644                                       ; +0x84, 0x140246b44\nsubss   xmm6, xmm7                                                     ; +0x8d, 0x140246b4d\nmulss   xmm9, xmm6                                                     ; +0x91, 0x140246b51\naddss   xmm9, xmm7                                                     ; +0x96, 0x140246b56\nmovss   xmm6, [rsp+98h+arg_1C]                                         ; +0x9b, 0x140246b5b\naddss   xmm6, cs:dword_1406231E0                                       ; +0xa4, 0x140246b64\nmov     rcx, [rdi+0FE8h]                                               ; +0xac, 0x140246b6c\nmov     rax, [rcx]                                                     ; +0xb3, 0x140246b73\ncall    qword ptr [rax+0A8h]                                           ; +0xb6, 0x140246b76\ndivss   xmm6, xmm0                                                     ; +0xbc, 0x140246b7c\naddss   xmm6, dword ptr [rdi+414h]                                     ; +0xc0, 0x140246b80\nmovaps  xmm2, xmm6                                                     ; +0xc8, 0x140246b88\nmovaps  xmm1, xmm9                                                     ; +0xcb, 0x140246b8b\nlea     rcx, [rsp+98h+var_78]                                          ; +0xcf, 0x140246b8f\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xd4, 0x140246b94\nmov     rcx, [rbx+380h]                                                ; +0xda, 0x140246b9a\nadd     rcx, 140h                                                      ; +0xe1, 0x140246ba1\nmov     rax, [rcx]                                                     ; +0xe8, 0x140246ba8\ncall    qword ptr [rax+8]                                              ; +0xeb, 0x140246bab\nmovzx   ecx, word ptr [rax]                                            ; +0xee, 0x140246bae\nmov     [rsp+98h+arg_10], cx                                           ; +0xf1, 0x140246bb1\nmovzx   eax, byte ptr [rax+2]                                          ; +0xf9, 0x140246bb9\nmov     [rsp+98h+arg_12], al                                           ; +0xfd, 0x140246bbd\nlea     rdx, [rsp+98h+arg_8]                                           ; +0x104, 0x140246bc4\nlea     rcx, [rsp+98h+var_68]                                          ; +0x10c, 0x140246bcc\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x111, 0x140246bd1\nmov     rbx, rax                                                       ; +0x117, 0x140246bd7\nlea     rdx, [rsp+98h+var_78]                                          ; +0x11a, 0x140246bda\nlea     rcx, [rsp+98h+var_60]                                          ; +0x11f, 0x140246bdf\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x124, 0x140246be4\nmov     rsi, rax                                                       ; +0x12a, 0x140246bea\nmov     r8, rax                                                        ; +0x12d, 0x140246bed\nlea     rdx, [rsp+98h+var_70]                                          ; +0x130, 0x140246bf0\nmov     rcx, rbx                                                       ; +0x135, 0x140246bf5\ncall    cs:??GCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator-(cocos2d::CCPoint const &) ; +0x138, 0x140246bf8\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x13e, 0x140246bfe\ntest    rcx, rcx                                                       ; +0x145, 0x140246c05\njnz     short loc_140246C39                                            ; +0x148, 0x140246c08\nmov     ecx, 668h; Size                                                ; +0x14a, 0x140246c0a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x14f, 0x140246c0f\nmov     [rsp+98h+var_58], rax                                          ; +0x154, 0x140246c14\nmov     rcx, rax                                                       ; +0x159, 0x140246c19\ncall    sub_14017AB00                                                  ; +0x15c, 0x140246c1c\nnop                                                                    ; +0x161, 0x140246c21\nmov     cs:qword_1406C2ED8, rax                                        ; +0x162, 0x140246c22\nmov     rdx, [rax]                                                     ; +0x169, 0x140246c29\nmov     rcx, rax                                                       ; +0x16c, 0x140246c2c\ncall    qword ptr [rdx+48h]                                            ; +0x16f, 0x140246c2f\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x172, 0x140246c32\ncmp     byte ptr [rcx+395h], 0                                         ; +0x179, 0x140246c39\njnz     loc_140246CD9                                                  ; +0x180, 0x140246c40\nlea     rdx, dword_1406C1D28                                           ; +0x186, 0x140246c46\nlea     rcx, [rsp+98h+var_58]                                          ; +0x18d, 0x140246c4d\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x192, 0x140246c52\nmov     rbx, rax                                                       ; +0x198, 0x140246c58\nlea     rdx, [rsp+98h+var_70]                                          ; +0x19b, 0x140246c5b\nlea     rcx, [rsp+98h+var_50]                                          ; +0x1a0, 0x140246c60\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x1a5, 0x140246c65\nmov     rcx, rax                                                       ; +0x1ab, 0x140246c6b\nmovss   xmm2, cs:dword_140622B08                                       ; +0x1ae, 0x140246c6e\nmov     rdx, rbx                                                       ; +0x1b6, 0x140246c76\ncall    cocos2d__CCLightning__lightningWithStrikePoint                 ; +0x1b9, 0x140246c79\nmov     rbx, rax                                                       ; +0x1be, 0x140246c7e\nmov     r8, [rax]                                                      ; +0x1c1, 0x140246c81\nmov     rdx, rsi                                                       ; +0x1c4, 0x140246c84\nmov     rcx, rax                                                       ; +0x1c7, 0x140246c87\ncall    qword ptr [r8+0B8h]                                            ; +0x1ca, 0x140246c8a\nlea     rcx, [rbx+140h]                                                ; +0x1d1, 0x140246c91\nmov     r8, [rcx]                                                      ; +0x1d8, 0x140246c98\nlea     rdx, [rsp+98h+arg_10]                                          ; +0x1db, 0x140246c9b\ncall    qword ptr [r8]                                                 ; +0x1e3, 0x140246ca3\nmov     dword ptr [rbx+170h], 40A00000h                                ; +0x1e6, 0x140246ca6\nmov     word ptr [rbx+174h], 101h                                      ; +0x1f0, 0x140246cb0\nmov     dword ptr [rbx+17Ch], 3F800000h                                ; +0x1f9, 0x140246cb9\nmov     rcx, [rdi+0FE8h]                                               ; +0x203, 0x140246cc3\nmov     rax, [rcx]                                                     ; +0x20a, 0x140246cca\nxor     r8d, r8d                                                       ; +0x20d, 0x140246ccd\nmov     rdx, rbx                                                       ; +0x210, 0x140246cd0\ncall    qword ptr [rax+1B8h]                                           ; +0x213, 0x140246cd3\nmovaps  xmm6, [rsp+98h+var_28]                                         ; +0x219, 0x140246cd9\nmovaps  xmm7, [rsp+98h+var_38]                                         ; +0x21e, 0x140246cde\nmovaps  xmm9, [rsp+98h+var_48]                                         ; +0x223, 0x140246ce3\nadd     rsp, 80h                                                       ; +0x229, 0x140246ce9\npop     rdi                                                            ; +0x230, 0x140246cf0\npop     rsi                                                            ; +0x231, 0x140246cf1\npop     rbx                                                            ; +0x232, 0x140246cf2\nretn                                                                   ; +0x233, 0x140246cf3", "xrefs": ["LevelEditorLayer::checkpointActivated @ 0x1402e0f28", "PlayLayer::checkpointActivated @ 0x1403b4fb0", "<???> @ 0x1405670d8", "<???> @ 0x1406ce6c4"], "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"}