{"type": "func", "start": 3978520, "end": 3978734, "name": "FLAlertLayer::addCloseButton", "pseudocode": "// \n// FLAlertLayer::addCloseButton from 0x3cb518 to 0x3cb5ee (214 bytes)\n// \n// 3 xrefs:\n// > LevelInfoLayer::onPlay @ 0x49b664\n// > EditLevelLayer::onTest @ 0x49f8c0\n// > EditLevelLayer::onPlay @ 0x4a03f8\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:46:37 +0000\n// \n\nint __fastcall FLAlertLayer::addCloseButton(const cocos2d::CCPoint **this)\n{\n  const char *v2; // r1\n  int v3; // r4\n  int v4; // r4\n  const cocos2d::CCPoint *v5; // r9\n  void (__fastcall *v6)(int, _DWORD *); // r8\n  float v8[2]; // [sp+Ch] [bp-10h] BYREF\n  _BYTE v9[8]; // [sp+14h] [bp-8h] BYREF\n  _DWORD v10[4]; // [sp+1Ch] [bp+0h] BYREF\n\n  cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this);\n  cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v8);\n  v3 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)\"GJ_closeBtn_001.png\", v2);\n  (*(void (__fastcall **)(int, int))(*(_DWORD *)v3 + 80))(v3, 1060320051);\n  v10[2] = FLAlertLayer::onButton;\n  v10[3] = 0;\n  v4 = CCMenuItemSpriteExtra::create(v3, 0, (int)this, (int)FLAlertLayer::onButton, 0);\n  CCMenuItemSpriteExtra::setSizeMult(v4, 1.2);\n  (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v4);\n  v5 = *(this + 111);\n  v6 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v4 + 92);\n  cocos2d::CCPoint::CCPoint(\n    (cocos2d::CCPoint *)v9,\n    (float)((float)(v8[0] * 0.5) - (float)(*((float *)this + 127) * 0.5)) + 5.0,\n    (float)((float)(*((float *)this + 128) * 0.5) + (float)(v8[1] * 0.5)) - 5.0);\n  cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v10, v5);\n  v6(v4, v10);\n  (*(void (__fastcall **)(int, int))(*(_DWORD *)v4 + 36))(v4, 2);\n  return v4;\n}", "assembly": "; \n; FLAlertLayer::addCloseButton from 0x3cb518 to 0x3cb5ee (214 bytes)\n; \n; 3 xrefs:\n; > LevelInfoLayer::onPlay @ 0x49b664\n; > EditLevelLayer::onTest @ 0x49f8c0\n; > EditLevelLayer::onPlay @ 0x4a03f8\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:46:37 +0000\n; \nPUSH.W          {R4-R9,LR}                                             ; +0x0, 0x3cb518\nSUB             SP, SP, #0x34                                          ; +0x4, 0x3cb51c\nLDR             R6, =(__stack_chk_guard_ptr - 0x3CB528)                ; +0x6, 0x3cb51e\nMOV             R5, R0                                                 ; +0x8, 0x3cb520\nADD             R7, SP, #0x1C                                          ; +0xa, 0x3cb522\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xc, 0x3cb524\nLDR             R6, [R6]; __stack_chk_guard                            ; +0xe, 0x3cb526\nLDR             R3, [R6]                                               ; +0x10, 0x3cb528\nSTR             R3, [SP,#0x34+var_8]                                   ; +0x12, 0x3cb52a\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x14, 0x3cb52c\nMOV             R1, R0                                                 ; +0x18, 0x3cb530\nADD             R0, SP, #0x34+var_28; this                             ; +0x1a, 0x3cb532\nBL              _ZN7cocos2d10CCDirector10getWinSizeEv; cocos2d::CCDirector::getWinSize(void) ; +0x1c, 0x3cb534\nLDR             R0, =(aGjClosebtn001P - 0x3CB53E); \"GJ_closeBtn_001.png\" ; +0x20, 0x3cb538\nADD             R0, PC; \"GJ_closeBtn_001.png\"                          ; +0x22, 0x3cb53a\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0x24, 0x3cb53c\nLDR             R1, =0x3F333333                                        ; +0x28, 0x3cb540\nLDR             R3, [R0]                                               ; +0x2a, 0x3cb542\nMOV             R4, R0                                                 ; +0x2c, 0x3cb544\nLDR             R3, [R3,#0x50]                                         ; +0x2e, 0x3cb546\nBLX             R3                                                     ; +0x30, 0x3cb548\nLDR             R3, =(_ZN12FLAlertLayer8onButtonEPN7cocos2d8CCObjectE_ptr - 0x3CB554) ; +0x32, 0x3cb54a\nMOV             R2, R5                                                 ; +0x34, 0x3cb54c\nMOVS            R1, #0                                                 ; +0x36, 0x3cb54e\nADD             R3, PC; _ZN12FLAlertLayer8onButtonEPN7cocos2d8CCObjectE_ptr ; +0x38, 0x3cb550\nLDR             R3, [R3]; FLAlertLayer::onButton(cocos2d::CCObject *)  ; +0x3a, 0x3cb552\nSTR             R1, [SP,#0x34+var_34]                                  ; +0x3c, 0x3cb554\nMOV             R0, R4                                                 ; +0x3e, 0x3cb556\nSTR             R3, [SP,#0x34+var_10]                                  ; +0x40, 0x3cb558\nSTR             R1, [SP,#0x34+var_C]                                   ; +0x42, 0x3cb55a\nBL              _ZN21CCMenuItemSpriteExtra6createEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CCMenuItemSpriteExtra::create(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0x44, 0x3cb55c\nLDR             R1, flt_3CB5F4; float                                  ; +0x48, 0x3cb560\nMOV             R4, R0                                                 ; +0x4a, 0x3cb562\nBL              _ZN21CCMenuItemSpriteExtra11setSizeMultEf; CCMenuItemSpriteExtra::setSizeMult(float) ; +0x4c, 0x3cb564\nLDR.W           R0, [R5,#0x1BC]                                        ; +0x50, 0x3cb568\nMOV             R1, R4                                                 ; +0x54, 0x3cb56c\nLDR             R3, [R0]                                               ; +0x56, 0x3cb56e\nLDR.W           R3, [R3,#0xE4]                                         ; +0x58, 0x3cb570\nBLX             R3                                                     ; +0x5c, 0x3cb574\nVMOV.F32        S13, #0.5                                              ; +0x5e, 0x3cb576\nVLDR            S14, [R5,#0x1FC]                                       ; +0x62, 0x3cb57a\nLDR             R3, [R4]                                               ; +0x66, 0x3cb57e\nLDR.W           R9, [R5,#0x1BC]                                        ; +0x68, 0x3cb580\nVLDR            S15, [SP,#0x34+var_28]                                 ; +0x6c, 0x3cb584\nLDR.W           R8, [R3,#0x5C]                                         ; +0x70, 0x3cb588\nVLDR            S11, [SP,#0x34+var_24]                                 ; +0x74, 0x3cb58c\nVMUL.F32        S14, S14, S13                                          ; +0x78, 0x3cb590\nVNMLS.F32       S14, S15, S13                                          ; +0x7c, 0x3cb594\nVLDR            S15, [R5,#0x200]                                       ; +0x80, 0x3cb598\nADD             R5, SP, #0x34+var_20                                   ; +0x84, 0x3cb59c\nMOV             R0, R5; this                                           ; +0x86, 0x3cb59e\nVMUL.F32        S15, S15, S13                                          ; +0x88, 0x3cb5a0\nVMLA.F32        S15, S11, S13                                          ; +0x8c, 0x3cb5a4\nVMOV.F32        S12, #5.0                                              ; +0x90, 0x3cb5a8\nVADD.F32        S14, S14, S12                                          ; +0x94, 0x3cb5ac\nVSUB.F32        S15, S15, S12                                          ; +0x98, 0x3cb5b0\nVMOV            R1, S14; float                                         ; +0x9c, 0x3cb5b4\nVMOV            R2, S15; float                                         ; +0xa0, 0x3cb5b8\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xa4, 0x3cb5bc\nMOV             R2, R5                                                 ; +0xa8, 0x3cb5c0\nMOV             R0, R7; this                                           ; +0xaa, 0x3cb5c2\nMOV             R1, R9; cocos2d::CCPoint *                             ; +0xac, 0x3cb5c4\nBL              _ZN7cocos2d6CCNode18convertToNodeSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const&) ; +0xae, 0x3cb5c6\nMOV             R0, R4                                                 ; +0xb2, 0x3cb5ca\nMOV             R1, R7                                                 ; +0xb4, 0x3cb5cc\nBLX             R8                                                     ; +0xb6, 0x3cb5ce\nLDR             R3, [R4]                                               ; +0xb8, 0x3cb5d0\nMOV             R0, R4                                                 ; +0xba, 0x3cb5d2\nMOVS            R1, #2                                                 ; +0xbc, 0x3cb5d4\nLDR             R3, [R3,#0x24]                                         ; +0xbe, 0x3cb5d6\nBLX             R3                                                     ; +0xc0, 0x3cb5d8\nLDR             R2, [SP,#0x34+var_8]                                   ; +0xc2, 0x3cb5da\nLDR             R3, [R6]                                               ; +0xc4, 0x3cb5dc\nMOV             R0, R4                                                 ; +0xc6, 0x3cb5de\nCMP             R2, R3                                                 ; +0xc8, 0x3cb5e0\nBEQ             loc_3CB5E8                                             ; +0xca, 0x3cb5e2\nBLX             __stack_chk_fail                                       ; +0xcc, 0x3cb5e4\nADD             SP, SP, #0x34 ; '4'                                    ; +0xd0, 0x3cb5e8\nPOP.W           {R4-R9,PC}                                             ; +0xd2, 0x3cb5ea", "xrefs": ["LevelInfoLayer::onPlay @ 0x49b664", "EditLevelLayer::onTest @ 0x49f8c0", "EditLevelLayer::onPlay @ 0x4a03f8"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}