{"type": "func", "start": 5373493536, "end": 5373493870, "name": "ShareLevelLayer::onSettings", "pseudocode": "// \n// ShareLevelLayer::onSettings from 0x140490120 to 0x14049026e (334 bytes)\n// \n// 2 xrefs:\n// > ShareLevelLayer::init @ 0x14048f940\n// > <???> @ 0x1406dc074\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=2\nvoid ShareLevelLayer::onSettings(ShareLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // rcx\n  GJGameLevel *m_level; // rbx\n  ShareLevelSettingsLayer *v5; // rdi\n  void (*show)(FLAlertLayer *); // rdx\n  void *v7; // [rsp+30h] [rbp+8h]\n\n  v3 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v7 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v7);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v3 = (GameManager *)qword_1406C2ED8;\n  }\n  GameManager::setGameVariable(v3, \"0029\", 1);\n  m_level = a1->m_level;\n  v5 = (ShareLevelSettingsLayer *)operator new(0x2A0u);\n  FLAlertLayer::FLAlertLayer(v5);\n  v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (ShareLevelSettingsLayer_vtbl *)&ShareLevelSettingsLayer::`vftable';\n  v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&ShareLevelSettingsLayer::`vftable';\n  v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&ShareLevelSettingsLayer::`vftable';\n  v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&ShareLevelSettingsLayer::`vftable';\n  v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&ShareLevelSettingsLayer::`vftable';\n  v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&ShareLevelSettingsLayer::`vftable';\n  v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&ShareLevelSettingsLayer::`vftable';\n  v5->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&ShareLevelSettingsLayer::`vftable';\n  v5->NumberInputDelegate::__vftable = (NumberInputDelegate_vtbl *)&ShareLevelSettingsLayer::`vftable';\n  if ( ShareLevelSettingsLayer::init(v5, m_level) )\n  {\n    cocos2d::CCObject::autorelease(v5);\n  }\n  else\n  {\n    ((void (__fastcall *)(ShareLevelSettingsLayer *, __int64))v5->~ShareLevelSettingsLayer)(v5, 1);\n    v5 = nullptr;\n  }\n  show = (void (*)(FLAlertLayer *))v5->show;\n  if ( show == FLAlertLayer::show )\n    FLAlertLayer::show(v5);\n  else\n    show(v5);\n}", "assembly": "; \n; ShareLevelLayer::onSettings from 0x140490120 to 0x14049026e (334 bytes)\n; \n; 2 xrefs:\n; > ShareLevelLayer::init @ 0x14048f940\n; > <???> @ 0x1406dc074\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_8], rbx                                               ; +0x0, 0x140490120\npush    rdi                                                            ; +0x5, 0x140490125\nsub     rsp, 20h                                                       ; +0x6, 0x140490126\nmov     rbx, rcx                                                       ; +0xa, 0x14049012a\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xd, 0x14049012d\ntest    rcx, rcx                                                       ; +0x14, 0x140490134\njnz     short loc_140490168                                            ; +0x17, 0x140490137\nmov     ecx, 668h; Size                                                ; +0x19, 0x140490139\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1e, 0x14049013e\nmov     [rsp+28h+arg_0], rax                                           ; +0x23, 0x140490143\nmov     rcx, rax                                                       ; +0x28, 0x140490148\ncall    sub_14017AB00                                                  ; +0x2b, 0x14049014b\nnop                                                                    ; +0x30, 0x140490150\nmov     cs:qword_1406C2ED8, rax                                        ; +0x31, 0x140490151\nmov     rdx, [rax]                                                     ; +0x38, 0x140490158\nmov     rcx, rax                                                       ; +0x3b, 0x14049015b\ncall    qword ptr [rdx+48h]                                            ; +0x3e, 0x14049015e\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x41, 0x140490161\nmov     r8b, 1                                                         ; +0x48, 0x140490168\nlea     rdx, a0029; \"0029\"                                             ; +0x4b, 0x14049016b\ncall    GameManager__setGameVariable                                   ; +0x52, 0x140490172\nmov     rbx, [rbx+278h]                                                ; +0x57, 0x140490177\nmov     ecx, 2A0h; Size                                                ; +0x5e, 0x14049017e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x63, 0x140490183\nmov     rdi, rax                                                       ; +0x68, 0x140490188\nmov     [rsp+28h+arg_0], rax                                           ; +0x6b, 0x14049018b\nmov     rcx, rax                                                       ; +0x70, 0x140490190\ncall    FLAlertLayer__FLAlertLayer                                     ; +0x73, 0x140490193\nlea     rax, ??_7ShareLevelSettingsLayer@@6B@; const ShareLevelSettingsLayer::`vftable' ; +0x78, 0x140490198\nmov     [rdi], rax                                                     ; +0x7f, 0x14049019f\nlea     rax, ??_7ShareLevelSettingsLayer@@6B@_0; const ShareLevelSettingsLayer::`vftable' ; +0x82, 0x1404901a2\nmov     [rdi+140h], rax                                                ; +0x89, 0x1404901a9\nlea     rax, ??_7ShareLevelSettingsLayer@@6B@_1; const ShareLevelSettingsLayer::`vftable' ; +0x90, 0x1404901b0\nmov     [rdi+148h], rax                                                ; +0x97, 0x1404901b7\nlea     rax, ??_7ShareLevelSettingsLayer@@6B@_2; const ShareLevelSettingsLayer::`vftable' ; +0x9e, 0x1404901be\nmov     [rdi+150h], rax                                                ; +0xa5, 0x1404901c5\nlea     rax, ??_7ShareLevelSettingsLayer@@6B@_3; const ShareLevelSettingsLayer::`vftable' ; +0xac, 0x1404901cc\nmov     [rdi+158h], rax                                                ; +0xb3, 0x1404901d3\nlea     rax, ??_7ShareLevelSettingsLayer@@6B@_4; const ShareLevelSettingsLayer::`vftable' ; +0xba, 0x1404901da\nmov     [rdi+160h], rax                                                ; +0xc1, 0x1404901e1\nlea     rax, ??_7ShareLevelSettingsLayer@@6B@_5; const ShareLevelSettingsLayer::`vftable' ; +0xc8, 0x1404901e8\nmov     [rdi+198h], rax                                                ; +0xcf, 0x1404901ef\nlea     rax, ??_7ShareLevelSettingsLayer@@6B@_6; const ShareLevelSettingsLayer::`vftable' ; +0xd6, 0x1404901f6\nmov     [rdi+1B0h], rax                                                ; +0xdd, 0x1404901fd\nlea     rax, ??_7ShareLevelSettingsLayer@@6B@_7; const ShareLevelSettingsLayer::`vftable' ; +0xe4, 0x140490204\nmov     [rdi+278h], rax                                                ; +0xeb, 0x14049020b\nmov     rdx, rbx                                                       ; +0xf2, 0x140490212\nmov     rcx, rdi                                                       ; +0xf5, 0x140490215\ncall    ShareLevelSettingsLayer__init                                  ; +0xf8, 0x140490218\nmov     rcx, rdi                                                       ; +0xfd, 0x14049021d\ntest    al, al                                                         ; +0x100, 0x140490220\njz      short loc_14049022C                                            ; +0x102, 0x140490222\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x104, 0x140490224\njmp     short loc_140490239                                            ; +0x10a, 0x14049022a\nmov     rax, [rdi]                                                     ; +0x10c, 0x14049022c\nmov     edx, 1                                                         ; +0x10f, 0x14049022f\ncall    qword ptr [rax+8]                                              ; +0x114, 0x140490234\nxor     edi, edi                                                       ; +0x117, 0x140490237\nmov     rax, [rdi]                                                     ; +0x119, 0x140490239\nmov     rdx, [rax+410h]                                                ; +0x11c, 0x14049023c\nlea     rax, FLAlertLayer__show                                        ; +0x123, 0x140490243\nmov     rcx, rdi                                                       ; +0x12a, 0x14049024a\ncmp     rdx, rax                                                       ; +0x12d, 0x14049024d\njnz     short loc_140490261                                            ; +0x130, 0x140490250\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x132, 0x140490252\nadd     rsp, 20h                                                       ; +0x137, 0x140490257\npop     rdi                                                            ; +0x13b, 0x14049025b\njmp     FLAlertLayer__show                                             ; +0x13c, 0x14049025c\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x141, 0x140490261\nadd     rsp, 20h                                                       ; +0x146, 0x140490266\npop     rdi                                                            ; +0x14a, 0x14049026a\njmp     rdx                                                            ; +0x14b, 0x14049026b", "xrefs": ["ShareLevelLayer::init @ 0x14048f940", "<???> @ 0x1406dc074"], "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"}