{"type": "func", "start": 4692024, "end": 4692222, "name": "GJBaseGameLayer::lightningFlash", "pseudocode": "// \n// GJBaseGameLayer::lightningFlash from 0x479838 to 0x4798fe (198 bytes)\n// \n// 1 xrefs:\n// > PlayerObject::togglePlayerScale @ 0x344ac6\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 GJBaseGameLayer::lightningFlash(GJBaseGameLayer *a1, cocos2d::CCPoint a2, cocos2d::ccColor3B a3)\n{\n  float x; // r8\n  cocos2d::CCDirector *v5; // r0\n  float v6; // r0\n  float y; // s17\n  float v8; // s16\n  float v9; // r7\n  float v10; // r0\n  int y_low; // [sp+1Ch] [bp-2Ch]\n  cocos2d::CCSize v12; // [sp+24h] [bp-24h] BYREF\n  cocos2d::CCPoint v13; // [sp+2Ch] [bp-1Ch] BYREF\n  cocos2d::CCPoint v14; // [sp+34h] [bp-14h] BYREF\n  cocos2d::CCPoint v15; // [sp+3Ch] [bp-Ch] BYREF\n\n  x = a2.x;\n  y_low = LODWORD(a2.y);\n  v5 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize(&v12, v5);\n  v6 = randRange(*(float *)LODWORD(x) - 50.0, *(float *)LODWORD(x) + 100.0);\n  y = a1->m_gameState.m_cameraPosition.y;\n  v8 = v12.height + 50.0;\n  v9 = v6;\n  v10 = a1->m_objectLayer->getScale(a1->m_objectLayer);\n  cocos2d::CCPoint::CCPoint(&v13, v9, y + (float)(v8 / v10));\n  cocos2d::CCPoint::CCPoint(&v14, &v13);\n  cocos2d::CCPoint::CCPoint(&v15, (const cocos2d::CCPoint *)LODWORD(x));\n  GJBaseGameLayer::lightningFlash((int)a1, &v14, (int)&v15, y_low, 5.0, 1056964608, 0, 1, 1.0);\n}", "assembly": "; \n; GJBaseGameLayer::lightningFlash from 0x479838 to 0x4798fe (198 bytes)\n; \n; 1 xrefs:\n; > PlayerObject::togglePlayerScale @ 0x344ac6\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.W          {R4-R8,LR}                                             ; +0x0, 0x479838\nMOV             R6, R0                                                 ; +0x4, 0x47983c\nLDR             R4, =(__stack_chk_guard_ptr - 0x47984A)                ; +0x6, 0x47983e\nMOV             R8, R1                                                 ; +0x8, 0x479840\nVPUSH           {D8}                                                   ; +0xa, 0x479842\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0xe, 0x479846\nLDR             R4, [R4]; __stack_chk_guard                            ; +0x10, 0x479848\nLDR             R3, [R4]                                               ; +0x12, 0x47984a\nSUB             SP, SP, #0x48                                          ; +0x14, 0x47984c\nVLDR            S16, =50.0                                             ; +0x16, 0x47984e\nADD             R5, SP, #0x48+var_1C                                   ; +0x1a, 0x479852\nSTR             R2, [SP,#0x48+var_2C]                                  ; +0x1c, 0x479854\nSTR             R3, [SP,#0x48+var_4]                                   ; +0x1e, 0x479856\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x20, 0x479858\nMOV             R1, R0                                                 ; +0x24, 0x47985c\nADD             R0, SP, #0x48+var_24; this                             ; +0x26, 0x47985e\nBL              _ZN7cocos2d10CCDirector10getWinSizeEv; cocos2d::CCDirector::getWinSize(void) ; +0x28, 0x479860\nVLDR            S15, [R8]                                              ; +0x2c, 0x479864\nVSUB.F32        S14, S15, S16                                          ; +0x30, 0x479868\nVMOV            R0, S14; float                                         ; +0x34, 0x47986c\nVLDR            S14, =100.0                                            ; +0x38, 0x479870\nVADD.F32        S15, S15, S14                                          ; +0x3c, 0x479874\nVMOV            R1, S15; float                                         ; +0x40, 0x479878\nBL              _Z9randRangeff; randRange(float,float)                 ; +0x44, 0x47987c\nVLDR            S15, [SP,#0x48+var_20]                                 ; +0x48, 0x479880\nVLDR            S17, [R6,#0x364]                                       ; +0x4c, 0x479884\nVADD.F32        S16, S15, S16                                          ; +0x50, 0x479888\nMOV             R7, R0                                                 ; +0x54, 0x47988c\nLDR.W           R0, [R6,#0x9F0]                                        ; +0x56, 0x47988e\nLDR             R3, [R0]                                               ; +0x5a, 0x479892\nLDR             R3, [R3,#0x54]                                         ; +0x5c, 0x479894\nBLX             R3                                                     ; +0x5e, 0x479896\nMOV             R1, R7; float                                          ; +0x60, 0x479898\nADD             R7, SP, #0x48+var_14                                   ; +0x62, 0x47989a\nVMOV            S15, R0                                                ; +0x64, 0x47989c\nMOV             R0, R5; this                                           ; +0x68, 0x4798a0\nVDIV.F32        S16, S16, S15                                          ; +0x6a, 0x4798a2\nVADD.F32        S15, S17, S16                                          ; +0x6e, 0x4798a6\nVMOV            R2, S15; float                                         ; +0x72, 0x4798aa\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x76, 0x4798ae\nMOV             R1, R5; cocos2d::CCPoint *                             ; +0x7a, 0x4798b2\nADD             R5, SP, #0x48+var_C                                    ; +0x7c, 0x4798b4\nMOV             R0, R7; this                                           ; +0x7e, 0x4798b6\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x80, 0x4798b8\nMOV             R1, R8; cocos2d::CCPoint *                             ; +0x84, 0x4798bc\nMOV             R0, R5; this                                           ; +0x86, 0x4798be\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x88, 0x4798c0\nLDR             R3, =0x40A00000                                        ; +0x8c, 0x4798c4\nMOV             R2, R5                                                 ; +0x8e, 0x4798c6\nMOV             R0, R6                                                 ; +0x90, 0x4798c8\nMOV             R1, R7                                                 ; +0x92, 0x4798ca\nSTR             R3, [SP,#0x48+var_48]                                  ; +0x94, 0x4798cc\nMOV.W           R3, #0x3F000000                                        ; +0x96, 0x4798ce\nSTR             R3, [SP,#0x48+var_44]                                  ; +0x9a, 0x4798d2\nMOVS            R3, #0                                                 ; +0x9c, 0x4798d4\nSTR             R3, [SP,#0x48+var_40]                                  ; +0x9e, 0x4798d6\nMOVS            R3, #1                                                 ; +0xa0, 0x4798d8\nSTR             R3, [SP,#0x48+var_3C]                                  ; +0xa2, 0x4798da\nMOV.W           R3, #0x3F800000                                        ; +0xa4, 0x4798dc\nSTR             R3, [SP,#0x48+var_38]                                  ; +0xa8, 0x4798e0\nLDR             R3, [SP,#0x48+var_2C]                                  ; +0xaa, 0x4798e2\nBL              _ZN15GJBaseGameLayer14lightningFlashEN7cocos2d7CCPointES1_NS0_10_ccColor3BEffibf; GJBaseGameLayer::lightningFlash(cocos2d::CCPoint,cocos2d::CCPoint,cocos2d::_ccColor3B,float,float,int,bool,float) ; +0xac, 0x4798e4\nLDR             R2, [SP,#0x48+var_4]                                   ; +0xb0, 0x4798e8\nLDR             R3, [R4]                                               ; +0xb2, 0x4798ea\nCMP             R2, R3                                                 ; +0xb4, 0x4798ec\nBEQ             loc_4798F4                                             ; +0xb6, 0x4798ee\nBLX             __stack_chk_fail                                       ; +0xb8, 0x4798f0\nADD             SP, SP, #0x48 ; 'H'                                    ; +0xbc, 0x4798f4\nVPOP            {D8}                                                   ; +0xbe, 0x4798f6\nPOP.W           {R4-R8,PC}                                             ; +0xc2, 0x4798fa", "xrefs": ["PlayerObject::togglePlayerScale @ 0x344ac6"], "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"}