{"type": "func", "start": 5371096320, "end": 5371096791, "name": "GJBaseGameLayer::lightningFlash", "pseudocode": "// \n// GJBaseGameLayer::lightningFlash from 0x140246d00 to 0x140246ed7 (471 bytes)\n// \n// 2 xrefs:\n// > PlayerObject::togglePlayerScale @ 0x1403a0c6c\n// > <???> @ 0x1406ce6d0\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::lightningFlash(\n        GJBaseGameLayer *a1,\n        cocos2d::CCPoint a2,\n        cocos2d::CCPoint a3,\n        cocos2d::ccColor3B *a4,\n        float a5,\n        float a6,\n        int a7,\n        bool a8,\n        float a9)\n{\n  float v9; // xmm3_4\n  _BOOL8 v13; // rdx\n  __int64 v14; // rax\n  cocos2d::CCPoint v15; // rax\n  cocos2d::CCPoint v16; // rbx\n  cocos2d::CCPoint v17; // rax\n  cocos2d::CCLightning *v18; // rbx\n  __int64 v19; // rax\n  __int64 v20; // rdi\n  struct cocos2d::CCBlink *v21; // rbx\n  struct cocos2d::CCDelayTime *v22; // rax\n  struct cocos2d::CCSequence *v23; // rax\n  cocos2d::ccColor3B *v24; // r8\n  __int64 v25; // rbx\n  struct cocos2d::CCDelayTime *v26; // rax\n  float v27; // [rsp+20h] [rbp-28h] BYREF\n  cocos2d::CCPoint v28; // [rsp+28h] [rbp-20h] BYREF\n  cocos2d::CCPoint v29; // [rsp+30h] [rbp-18h] BYREF\n\n  ((void (__fastcall *)(_QWORD, _QWORD, _QWORD))cocos2d::CCPoint::operator-)(a3, &v27, a2);\n  v14 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v28 = (cocos2d::CCPoint)operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(*(_QWORD *)&v28);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v14 = qword_1406C2ED8;\n  }\n  if ( !*(_BYTE *)(v14 + 917) )\n  {\n    cocos2d::CCPoint::CCPoint(&v28);\n    v16 = v15;\n    cocos2d::CCPoint::CCPoint(&v29);\n    v18 = cocos2d::CCLightning::lightningWithStrikePoint(v17, v16, a6);\n    ((void (__fastcall *)(cocos2d::CCLightning *, cocos2d::CCPoint))v18->setPosition_0)(v18, a2);\n    v18->setColor(&v18->cocos2d::CCRGBAProtocol, a4);\n    v18->m_lineWidth = a5;\n    *(_WORD *)&v18->m_unkBool = 257;\n    v18->m_opacityModify = a9;\n    if ( a7 )\n      v18->m_displacement = a7;\n    a1->m_objectLayer->addChild_0(a1->m_objectLayer, v18, 0);\n  }\n  if ( a8 )\n  {\n    LOBYTE(v13) = 1;\n    a1->m_flashNode->setVisible(a1->m_flashNode, v13);\n    v19 = cocos2d::CCHide::create();\n    if ( a7 )\n    {\n      v25 = v19;\n      v26 = cocos2d::CCDelayTime::create(0.079999998);\n      v23 = cocos2d::CCSequence::create(v26, v25, 0);\n    }\n    else\n    {\n      v20 = v19;\n      v21 = cocos2d::CCBlink::create(0.12, 1u);\n      v22 = cocos2d::CCDelayTime::create(0.079999998);\n      v23 = cocos2d::CCSequence::create(v22, v21, v20, 0);\n    }\n    cocos2d::CCNode::runAction((CCLightFlash *)a1->m_flashNode, (cocos2d::CCPoint)v23, v24, v9, v27);\n  }\n}", "assembly": "; \n; GJBaseGameLayer::lightningFlash from 0x140246d00 to 0x140246ed7 (471 bytes)\n; \n; 2 xrefs:\n; > PlayerObject::togglePlayerScale @ 0x1403a0c6c\n; > <???> @ 0x1406ce6d0\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_0], rbx                                               ; +0x0, 0x140246d00\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x140246d05\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x140246d0a\nmov     [rsp+arg_18], rdi                                              ; +0xf, 0x140246d0f\npush    r14                                                            ; +0x14, 0x140246d14\nsub     rsp, 40h                                                       ; +0x16, 0x140246d16\nmov     r14, r9                                                        ; +0x1a, 0x140246d1a\nmov     rax, r8                                                        ; +0x1d, 0x140246d1d\nmov     rbp, rdx                                                       ; +0x20, 0x140246d20\nmov     rsi, rcx                                                       ; +0x23, 0x140246d23\nmov     r8, rdx                                                        ; +0x26, 0x140246d26\nlea     rdx, [rsp+48h+var_28]                                          ; +0x29, 0x140246d29\nmov     rcx, rax                                                       ; +0x2e, 0x140246d2e\ncall    cs:??GCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator-(cocos2d::CCPoint const &) ; +0x31, 0x140246d31\nmov     rax, cs:qword_1406C2ED8                                        ; +0x37, 0x140246d37\ntest    rax, rax                                                       ; +0x3e, 0x140246d3e\njnz     short loc_140246D72                                            ; +0x41, 0x140246d41\nmov     ecx, 668h; Size                                                ; +0x43, 0x140246d43\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x48, 0x140246d48\nmov     [rsp+48h+var_20], rax                                          ; +0x4d, 0x140246d4d\nmov     rcx, rax                                                       ; +0x52, 0x140246d52\ncall    sub_14017AB00                                                  ; +0x55, 0x140246d55\nnop                                                                    ; +0x5a, 0x140246d5a\nmov     cs:qword_1406C2ED8, rax                                        ; +0x5b, 0x140246d5b\nmov     rdx, [rax]                                                     ; +0x62, 0x140246d62\nmov     rcx, rax                                                       ; +0x65, 0x140246d65\ncall    qword ptr [rdx+48h]                                            ; +0x68, 0x140246d68\nmov     rax, cs:qword_1406C2ED8                                        ; +0x6b, 0x140246d6b\nmov     edi, [rsp+48h+arg_30]                                          ; +0x72, 0x140246d72\ncmp     byte ptr [rax+395h], 0                                         ; +0x79, 0x140246d79\njnz     loc_140246E27                                                  ; +0x80, 0x140246d80\nlea     rdx, dword_1406C1D28                                           ; +0x86, 0x140246d86\nlea     rcx, [rsp+48h+var_20]                                          ; +0x8d, 0x140246d8d\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x92, 0x140246d92\nmov     rbx, rax                                                       ; +0x98, 0x140246d98\nlea     rdx, [rsp+48h+var_28]                                          ; +0x9b, 0x140246d9b\nlea     rcx, [rsp+48h+var_18]                                          ; +0xa0, 0x140246da0\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xa5, 0x140246da5\nmov     rcx, rax                                                       ; +0xab, 0x140246dab\nmovss   xmm2, [rsp+48h+arg_28]                                         ; +0xae, 0x140246dae\nmov     rdx, rbx                                                       ; +0xb4, 0x140246db4\ncall    cocos2d__CCLightning__lightningWithStrikePoint                 ; +0xb7, 0x140246db7\nmov     rbx, rax                                                       ; +0xbc, 0x140246dbc\nmov     r8, [rax]                                                      ; +0xbf, 0x140246dbf\nmov     rdx, rbp                                                       ; +0xc2, 0x140246dc2\nmov     rcx, rax                                                       ; +0xc5, 0x140246dc5\ncall    qword ptr [r8+0B8h]                                            ; +0xc8, 0x140246dc8\nlea     rcx, [rbx+140h]                                                ; +0xcf, 0x140246dcf\nmov     r8, [rcx]                                                      ; +0xd6, 0x140246dd6\nmov     rdx, r14                                                       ; +0xd9, 0x140246dd9\ncall    qword ptr [r8]                                                 ; +0xdc, 0x140246ddc\nmovss   xmm0, [rsp+48h+arg_20]                                         ; +0xdf, 0x140246ddf\nmovss   dword ptr [rbx+170h], xmm0                                     ; +0xe5, 0x140246de5\nmov     word ptr [rbx+174h], 101h                                      ; +0xed, 0x140246ded\nmovss   xmm0, [rsp+48h+arg_40]                                         ; +0xf6, 0x140246df6\nmovss   dword ptr [rbx+17Ch], xmm0                                     ; +0xff, 0x140246dff\ntest    edi, edi                                                       ; +0x107, 0x140246e07\njz      short loc_140246E11                                            ; +0x109, 0x140246e09\nmov     [rbx+15Ch], edi                                                ; +0x10b, 0x140246e0b\nmov     rcx, [rsi+0FE8h]                                               ; +0x111, 0x140246e11\nmov     rax, [rcx]                                                     ; +0x118, 0x140246e18\nxor     r8d, r8d                                                       ; +0x11b, 0x140246e1b\nmov     rdx, rbx                                                       ; +0x11e, 0x140246e1e\ncall    qword ptr [rax+1B8h]                                           ; +0x121, 0x140246e21\ncmp     [rsp+48h+arg_38], 0                                            ; +0x127, 0x140246e27\njz      loc_140246EBC                                                  ; +0x12f, 0x140246e2f\nmov     rcx, [rsi+31F8h]                                               ; +0x135, 0x140246e35\nmov     dl, 1                                                          ; +0x13c, 0x140246e3c\nmov     rax, [rcx]                                                     ; +0x13e, 0x140246e3e\ncall    qword ptr [rax+140h]                                           ; +0x141, 0x140246e41\ncall    cs:?create@CCHide@cocos2d@@SAPEAV12@XZ; cocos2d::CCHide::create(void) ; +0x147, 0x140246e47\ntest    edi, edi                                                       ; +0x14d, 0x140246e4d\njnz     short loc_140246E8C                                            ; +0x14f, 0x140246e4f\nmov     rdi, rax                                                       ; +0x151, 0x140246e51\nmov     edx, 1                                                         ; +0x154, 0x140246e54\nmovss   xmm0, cs:dword_140622A28                                       ; +0x159, 0x140246e59\ncall    cs:?create@CCBlink@cocos2d@@SAPEAV12@MI@Z; cocos2d::CCBlink::create(float,uint) ; +0x161, 0x140246e61\nmov     rbx, rax                                                       ; +0x167, 0x140246e67\nmovss   xmm0, cs:dword_140622A04                                       ; +0x16a, 0x140246e6a\ncall    cs:?create@CCDelayTime@cocos2d@@SAPEAV12@M@Z; cocos2d::CCDelayTime::create(float) ; +0x172, 0x140246e72\nmov     rcx, rax                                                       ; +0x178, 0x140246e78\nxor     r9d, r9d                                                       ; +0x17b, 0x140246e7b\nmov     r8, rdi                                                        ; +0x17e, 0x140246e7e\nmov     rdx, rbx                                                       ; +0x181, 0x140246e81\ncall    cs:?create@CCSequence@cocos2d@@SAPEAV12@PEAVCCFiniteTimeAction@2@ZZ; cocos2d::CCSequence::create(cocos2d::CCFiniteTimeAction *,...) ; +0x184, 0x140246e84\njmp     short loc_140246EAC                                            ; +0x18a, 0x140246e8a\nmov     rbx, rax                                                       ; +0x18c, 0x140246e8c\nmovss   xmm0, cs:dword_140622A04                                       ; +0x18f, 0x140246e8f\ncall    cs:?create@CCDelayTime@cocos2d@@SAPEAV12@M@Z; cocos2d::CCDelayTime::create(float) ; +0x197, 0x140246e97\nmov     rcx, rax                                                       ; +0x19d, 0x140246e9d\nxor     r8d, r8d                                                       ; +0x1a0, 0x140246ea0\nmov     rdx, rbx                                                       ; +0x1a3, 0x140246ea3\ncall    cs:?create@CCSequence@cocos2d@@SAPEAV12@PEAVCCFiniteTimeAction@2@ZZ; cocos2d::CCSequence::create(cocos2d::CCFiniteTimeAction *,...) ; +0x1a6, 0x140246ea6\nmov     rdx, rax                                                       ; +0x1ac, 0x140246eac\nmov     rcx, [rsi+31F8h]                                               ; +0x1af, 0x140246eaf\ncall    cs:?runAction@CCNode@cocos2d@@QEAAPEAVCCAction@2@PEAV32@@Z; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x1b6, 0x140246eb6\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x1bc, 0x140246ebc\nmov     rbp, [rsp+48h+arg_8]                                           ; +0x1c1, 0x140246ec1\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x1c6, 0x140246ec6\nmov     rdi, [rsp+48h+arg_18]                                          ; +0x1cb, 0x140246ecb\nadd     rsp, 40h                                                       ; +0x1d0, 0x140246ed0\npop     r14                                                            ; +0x1d4, 0x140246ed4\nretn                                                                   ; +0x1d6, 0x140246ed6", "xrefs": ["PlayerObject::togglePlayerScale @ 0x1403a0c6c", "<???> @ 0x1406ce6d0"], "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"}