{"type": "func", "start": 4296151856, "end": 4296152261, "name": "GJBaseGameLayer::lightningFlash", "pseudocode": "// \n// GJBaseGameLayer::lightningFlash from 0x100121330 to 0x1001214c5 (405 bytes)\n// \n// 3 xrefs:\n// > GJBaseGameLayer::teleportPlayer @ 0x10012117d\n// > GJBaseGameLayer::checkpointActivated @ 0x10016363d\n// > GJBaseGameLayer::lightningFlash_1 @ 0x100163746\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// local variable allocation has failed, the output may be wrong!\nvoid __fastcall 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  int v9; // r8d\n  char v10; // r9\n  char v11; // r15\n  int v12; // r14d\n  GJBaseGameLayer *v13; // rbx\n  char v14; // ecx^2\n  float v15; // xmm0_4\n  cocos2d::CCLightning *v16; // r13\n  unsigned int v17; // r15d\n  unsigned int v18; // eax\n  int v19; // ecx\n  int v20; // r8d\n  int v21; // r9d\n  cocos2d::CCAction *v22; // rax\n  GJBaseGameLayer *v23; // r14\n  unsigned int v24; // ebx\n  unsigned int v25; // eax\n  unsigned int v26; // esi\n  int v27; // r8d\n  int v28; // r9d\n  char v29[8]; // [rsp+8h] [rbp-58h] BYREF\n  char v30[8]; // [rsp+10h] [rbp-50h] BYREF\n  char v31[8]; // [rsp+18h] [rbp-48h] BYREF\n  GJBaseGameLayer *v32; // [rsp+20h] [rbp-40h]\n  float v33; // [rsp+28h] [rbp-38h]\n  float v34; // [rsp+2Ch] [rbp-34h]\n  float x; // [rsp+30h] [rbp-30h]\n  __int16 v36; // [rsp+34h] [rbp-2Ch] BYREF\n  char v37; // [rsp+36h] [rbp-2Ah]\n\n  v33 = a5;\n  v11 = v10;\n  v12 = v9;\n  x = a3.x;\n  v34 = a2.x;\n  v13 = a1;\n  v36 = a8;\n  v37 = v14;\n  sub_10028CD00(v31, a7, *(_QWORD *)&a4.r);\n  if ( !GameManager::sharedState()->m_performanceMode )\n  {\n    v32 = a1;\n    sub_10028CC60(v29);\n    sub_10028CC60(v30);\n    v15 = x;\n    v16 = cocos2d::CCLightning::lightningWithStrikePoint((cocos2d::CCPoint)LODWORD(x), a3, a5);\n    ((void (__fastcall *)(cocos2d::CCLightning *, _QWORD, float, double, float, float))v16->setPosition)(\n      v16,\n      *(_QWORD *)&a4.r,\n      v15,\n      *(double *)&a3,\n      a5,\n      a6);\n    ((void (__fastcall *)(cocos2d::CCLightning *, __int16 *))v16->setColor)(v16, &v36);\n    v16->m_lineWidth = v34;\n    *(_WORD *)&v16->m_unkBool = 257;\n    a2 = (cocos2d::CCPoint)LODWORD(v33);\n    v16->m_opacityModify = v33;\n    if ( v12 )\n      v16->m_displacement = v12;\n    v13 = v32;\n    ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLightning *, _QWORD))v32->m_objectLayer->addChild_0)(\n      v32->m_objectLayer,\n      v16,\n      0);\n  }\n  if ( v11 )\n  {\n    ((void (__fastcall *)(cocos2d::CCNode *, __int64, double, double, double, double))v13->m_flashNode->setVisible)(\n      v13->m_flashNode,\n      1,\n      *(double *)&a2,\n      *(double *)&a3,\n      *(double *)&a5,\n      *(double *)&a6);\n    v17 = (unsigned int)cocos2d::CCDelayTime::create(0.079999998);\n    if ( v12 )\n    {\n      v18 = (unsigned int)cocos2d::CCHide::create();\n      v22 = (cocos2d::CCAction *)sub_1003B5760(v17, v18, 0, v19, v20, v21);\n    }\n    else\n    {\n      v23 = v13;\n      v24 = (unsigned int)cocos2d::CCBlink::create(0.12, 1u);\n      v25 = (unsigned int)cocos2d::CCHide::create();\n      v26 = v24;\n      v13 = v23;\n      v22 = (cocos2d::CCAction *)sub_1003B5760(v17, v26, v25, 0, v27, v28);\n    }\n    cocos2d::CCNode::runAction(v13->m_flashNode, v22);\n  }\n}", "assembly": "; \n; GJBaseGameLayer::lightningFlash from 0x100121330 to 0x1001214c5 (405 bytes)\n; \n; 3 xrefs:\n; > GJBaseGameLayer::teleportPlayer @ 0x10012117d\n; > GJBaseGameLayer::checkpointActivated @ 0x10016363d\n; > GJBaseGameLayer::lightningFlash_1 @ 0x100163746\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    rbp                                                            ; +0x0, 0x100121330\nmov     rbp, rsp                                                       ; +0x1, 0x100121331\npush    r15                                                            ; +0x4, 0x100121334\npush    r14                                                            ; +0x6, 0x100121336\npush    r13                                                            ; +0x8, 0x100121338\npush    r12                                                            ; +0xa, 0x10012133a\npush    rbx                                                            ; +0xc, 0x10012133c\nsub     rsp, 38h                                                       ; +0xd, 0x10012133d\nmovss   [rbp+var_38], xmm2                                             ; +0x11, 0x100121341\nmov     r15d, r9d                                                      ; +0x16, 0x100121346\nmov     r14d, r8d                                                      ; +0x19, 0x100121349\nmovss   [rbp+var_30], xmm1                                             ; +0x1c, 0x10012134c\nmovss   [rbp+var_34], xmm0                                             ; +0x21, 0x100121351\nmov     r12, rsi                                                       ; +0x26, 0x100121356\nmov     rbx, rdi                                                       ; +0x29, 0x100121359\nmov     [rbp+var_2C], cx                                               ; +0x2c, 0x10012135c\nshr     ecx, 10h                                                       ; +0x30, 0x100121360\nmov     [rbp+var_2A], cl                                               ; +0x33, 0x100121363\nlea     rdi, [rbp+var_48]                                              ; +0x36, 0x100121366\nmov     rsi, rdx                                                       ; +0x3a, 0x10012136a\nmov     rdx, r12                                                       ; +0x3d, 0x10012136d\ncall    sub_10028CD00                                                  ; +0x40, 0x100121370\ncall    GameManager__sharedState                                       ; +0x45, 0x100121375\ncmp     byte ptr [rax+375h], 0                                         ; +0x4a, 0x10012137a\njnz     loc_10012142C                                                  ; +0x51, 0x100121381\nmov     [rbp+var_40], rbx                                              ; +0x57, 0x100121387\nlea     r13, [rbp+var_58]                                              ; +0x5b, 0x10012138b\nlea     rsi, [rbp+var_48]                                              ; +0x5f, 0x10012138f\nmov     rdi, r13                                                       ; +0x63, 0x100121393\ncall    sub_10028CC60                                                  ; +0x66, 0x100121396\nlea     rsi, qword_10099EFF0                                           ; +0x6b, 0x10012139b\nlea     rbx, [rbp+var_50]                                              ; +0x72, 0x1001213a2\nmov     rdi, rbx                                                       ; +0x76, 0x1001213a6\ncall    sub_10028CC60                                                  ; +0x79, 0x1001213a9\nmov     rdi, r13                                                       ; +0x7e, 0x1001213ae\nmov     rsi, rbx                                                       ; +0x81, 0x1001213b1\nmovss   xmm0, [rbp+var_30]                                             ; +0x84, 0x1001213b4\ncall    cocos2d__CCLightning__lightningWithStrikePoint                 ; +0x89, 0x1001213b9\nmov     r13, rax                                                       ; +0x8e, 0x1001213be\nmov     rax, [rax]                                                     ; +0x91, 0x1001213c1\nmov     rdi, r13                                                       ; +0x94, 0x1001213c4\nmov     rsi, r12                                                       ; +0x97, 0x1001213c7\ncall    qword ptr [rax+0B8h]                                           ; +0x9a, 0x1001213ca\nmov     rax, [r13+0]                                                   ; +0xa0, 0x1001213d0\nlea     rsi, [rbp+var_2C]                                              ; +0xa4, 0x1001213d4\nmov     rdi, r13                                                       ; +0xa8, 0x1001213d8\ncall    qword ptr [rax+3C0h]                                           ; +0xab, 0x1001213db\nmovss   xmm0, [rbp+var_34]                                             ; +0xb1, 0x1001213e1\nmovss   dword ptr [r13+170h], xmm0                                     ; +0xb6, 0x1001213e6\nmov     word ptr [r13+174h], 101h                                      ; +0xbf, 0x1001213ef\nmovss   xmm0, [rbp+var_38]                                             ; +0xc9, 0x1001213f9\nmovss   dword ptr [r13+17Ch], xmm0                                     ; +0xce, 0x1001213fe\ntest    r14d, r14d                                                     ; +0xd7, 0x100121407\njz      short loc_100121413                                            ; +0xda, 0x10012140a\nmov     [r13+15Ch], r14d                                               ; +0xdc, 0x10012140c\nmov     rbx, [rbp+var_40]                                              ; +0xe3, 0x100121413\nmov     rdi, [rbx+0EB8h]                                               ; +0xe7, 0x100121417\nmov     rax, [rdi]                                                     ; +0xee, 0x10012141e\nmov     rsi, r13                                                       ; +0xf1, 0x100121421\nxor     edx, edx                                                       ; +0xf4, 0x100121424\ncall    qword ptr [rax+1C0h]                                           ; +0xf6, 0x100121426\ntest    r15b, r15b                                                     ; +0xfc, 0x10012142c\njz      loc_1001214B6                                                  ; +0xff, 0x10012142f\nmov     rdi, [rbx+3060h]                                               ; +0x105, 0x100121435\nmov     rax, [rdi]                                                     ; +0x10c, 0x10012143c\nmov     esi, 1                                                         ; +0x10f, 0x10012143f\ncall    qword ptr [rax+148h]                                           ; +0x114, 0x100121444\nmovss   xmm0, cs:dword_100815D40                                       ; +0x11a, 0x10012144a\ncall    cocos2d__CCDelayTime__create                                   ; +0x122, 0x100121452\nmov     r15, rax                                                       ; +0x127, 0x100121457\ntest    r14d, r14d                                                     ; +0x12a, 0x10012145a\njz      short loc_100121475                                            ; +0x12d, 0x10012145d\ncall    cocos2d__CCHide__create                                        ; +0x12f, 0x10012145f\nmov     rdi, r15                                                       ; +0x134, 0x100121464\nmov     rsi, rax                                                       ; +0x137, 0x100121467\nxor     edx, edx                                                       ; +0x13a, 0x10012146a\nxor     eax, eax                                                       ; +0x13c, 0x10012146c\ncall    sub_1003B5760                                                  ; +0x13e, 0x10012146e\njmp     short loc_1001214A7                                            ; +0x143, 0x100121473\nmovss   xmm0, cs:dword_100816888                                       ; +0x145, 0x100121475\nmov     edi, 1                                                         ; +0x14d, 0x10012147d\ncall    cocos2d__CCBlink__create                                       ; +0x152, 0x100121482\nmov     r14, rbx                                                       ; +0x157, 0x100121487\nmov     rbx, rax                                                       ; +0x15a, 0x10012148a\ncall    cocos2d__CCHide__create                                        ; +0x15d, 0x10012148d\nmov     rdi, r15                                                       ; +0x162, 0x100121492\nmov     rsi, rbx                                                       ; +0x165, 0x100121495\nmov     rbx, r14                                                       ; +0x168, 0x100121498\nmov     rdx, rax                                                       ; +0x16b, 0x10012149b\nxor     ecx, ecx                                                       ; +0x16e, 0x10012149e\nxor     eax, eax                                                       ; +0x170, 0x1001214a0\ncall    sub_1003B5760                                                  ; +0x172, 0x1001214a2\nmov     rdi, [rbx+3060h]                                               ; +0x177, 0x1001214a7\nmov     rsi, rax                                                       ; +0x17e, 0x1001214ae\ncall    cocos2d__CCNode__runAction                                     ; +0x181, 0x1001214b1\nadd     rsp, 38h                                                       ; +0x186, 0x1001214b6\npop     rbx                                                            ; +0x18a, 0x1001214ba\npop     r12                                                            ; +0x18b, 0x1001214bb\npop     r13                                                            ; +0x18d, 0x1001214bd\npop     r14                                                            ; +0x18f, 0x1001214bf\npop     r15                                                            ; +0x191, 0x1001214c1\npop     rbp                                                            ; +0x193, 0x1001214c3\nretn                                                                   ; +0x194, 0x1001214c4", "xrefs": ["GJBaseGameLayer::teleportPlayer @ 0x10012117d", "GJBaseGameLayer::checkpointActivated @ 0x10016363d", "GJBaseGameLayer::lightningFlash_1 @ 0x100163746"], "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"}