{"type": "func", "start": 5369354016, "end": 5369354503, "name": "CreatorLayer::onLeaderboards", "pseudocode": "// \n// CreatorLayer::onLeaderboards from 0x14009d720 to 0x14009d907 (487 bytes)\n// \n// 2 xrefs:\n// > CreatorLayer::init @ 0x14009c4ac\n// > <???> @ 0x1406c7590\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=3\nvoid CreatorLayer::onLeaderboards(CreatorLayer *a1, cocos2d::CCObject *a2)\n{\n  __int64 v2; // rdi\n  __int64 v3; // rbx\n  LeaderboardStat v4; // ebx\n  LeaderboardType v5; // edi\n  struct cocos2d::CCScene *v6; // r14\n  __int64 v7; // rdx\n  __int64 v8; // rcx\n  LeaderboardsLayer *v9; // rsi\n  struct cocos2d::CCTransitionFade *v10; // rbx\n  __int64 v11; // rcx\n  cocos2d::CCDirector *v12; // rax\n  void *v13; // [rsp+50h] [rbp+18h]\n  void *v14; // [rsp+50h] [rbp+18h]\n\n  v2 = qword_1406C2EC0;\n  if ( !qword_1406C2EC0 )\n  {\n    v13 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280(v13);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n    v2 = qword_1406C2EC0;\n  }\n  v3 = v2;\n  if ( !v2 )\n  {\n    v14 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280(v14);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n    v2 = qword_1406C2EC0;\n  }\n  v4 = *(_DWORD *)(v3 + 708);\n  v5 = *(_DWORD *)(v2 + 704);\n  v6 = (struct cocos2d::CCScene *)cocos2d::CCScene::create(a1, a2);\n  *(_QWORD *)(cocos2d::CCApplication::sharedApplication(v8, v7) + 224) = v6;\n  v9 = (LeaderboardsLayer *)operator new(0x200u);\n  cocos2d::CCLayer::CCLayer(v9);\n  v9->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (LeaderboardsLayer_vtbl *)&LeaderboardsLayer::`vftable';\n  v9->cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&LeaderboardsLayer::`vftable';\n  v9->cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&LeaderboardsLayer::`vftable';\n  v9->cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&LeaderboardsLayer::`vftable';\n  v9->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&LeaderboardsLayer::`vftable';\n  v9->cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&LeaderboardsLayer::`vftable';\n  v9->LeaderboardManagerDelegate::__vftable = (LeaderboardManagerDelegate_vtbl *)&LeaderboardsLayer::`vftable';\n  v9->FLAlertLayerProtocol::__vftable = (FLAlertLayerProtocol_vtbl *)&LeaderboardsLayer::`vftable';\n  v9->m_list = nullptr;\n  v9->m_userScores = nullptr;\n  *(_QWORD *)&v9->m_type = 0;\n  v9->m_topBtn = nullptr;\n  v9->m_globalBtn = nullptr;\n  v9->m_creatorsBtn = nullptr;\n  v9->m_friendsBtn = nullptr;\n  v9->m_circle = nullptr;\n  v9->m_noInternet = nullptr;\n  v9->m_modeButtons = nullptr;\n  if ( LeaderboardsLayer::init(v9, v5, v4) )\n  {\n    cocos2d::CCObject::autorelease(v9);\n  }\n  else\n  {\n    ((void (__fastcall *)(LeaderboardsLayer *, __int64))v9->~LeaderboardsLayer)(v9, 1);\n    v9 = nullptr;\n  }\n  v6->addChild_1(v6, v9);\n  v10 = cocos2d::CCTransitionFade::create(0.5, v6);\n  v12 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v11);\n  cocos2d::CCDirector::pushScene(v12, v10);\n}", "assembly": "; \n; CreatorLayer::onLeaderboards from 0x14009d720 to 0x14009d907 (487 bytes)\n; \n; 2 xrefs:\n; > CreatorLayer::init @ 0x14009c4ac\n; > <???> @ 0x1406c7590\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, 0x14009d720\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x14009d725\npush    rsi                                                            ; +0xa, 0x14009d72a\npush    rdi                                                            ; +0xb, 0x14009d72b\npush    r14                                                            ; +0xc, 0x14009d72c\nsub     rsp, 20h                                                       ; +0xe, 0x14009d72e\nmov     rdi, cs:qword_1406C2EC0                                        ; +0x12, 0x14009d732\ntest    rdi, rdi                                                       ; +0x19, 0x14009d739\njnz     short loc_14009D76D                                            ; +0x1c, 0x14009d73c\nmov     ecx, 3D0h; Size                                                ; +0x1e, 0x14009d73e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x23, 0x14009d743\nmov     [rsp+38h+arg_10], rax                                          ; +0x28, 0x14009d748\nmov     rcx, rax                                                       ; +0x2d, 0x14009d74d\ncall    sub_140141280                                                  ; +0x30, 0x14009d750\nnop                                                                    ; +0x35, 0x14009d755\nmov     cs:qword_1406C2EC0, rax                                        ; +0x36, 0x14009d756\nmov     rdx, [rax]                                                     ; +0x3d, 0x14009d75d\nmov     rcx, rax                                                       ; +0x40, 0x14009d760\ncall    qword ptr [rdx+48h]                                            ; +0x43, 0x14009d763\nmov     rdi, cs:qword_1406C2EC0                                        ; +0x46, 0x14009d766\nmov     rbx, rdi                                                       ; +0x4d, 0x14009d76d\ntest    rdi, rdi                                                       ; +0x50, 0x14009d770\njnz     short loc_14009D7A4                                            ; +0x53, 0x14009d773\nmov     ecx, 3D0h; Size                                                ; +0x55, 0x14009d775\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x5a, 0x14009d77a\nmov     [rsp+38h+arg_10], rax                                          ; +0x5f, 0x14009d77f\nmov     rcx, rax                                                       ; +0x64, 0x14009d784\ncall    sub_140141280                                                  ; +0x67, 0x14009d787\nnop                                                                    ; +0x6c, 0x14009d78c\nmov     cs:qword_1406C2EC0, rax                                        ; +0x6d, 0x14009d78d\nmov     rdx, [rax]                                                     ; +0x74, 0x14009d794\nmov     rcx, rax                                                       ; +0x77, 0x14009d797\ncall    qword ptr [rdx+48h]                                            ; +0x7a, 0x14009d79a\nmov     rdi, cs:qword_1406C2EC0                                        ; +0x7d, 0x14009d79d\nmov     ebx, [rbx+2C4h]                                                ; +0x84, 0x14009d7a4\nmov     edi, [rdi+2C0h]                                                ; +0x8a, 0x14009d7aa\ncall    cs:?create@CCScene@cocos2d@@SAPEAV12@XZ; cocos2d::CCScene::create(void) ; +0x90, 0x14009d7b0\nmov     r14, rax                                                       ; +0x96, 0x14009d7b6\ncall    cs:?sharedApplication@CCApplication@cocos2d@@SAPEAV12@XZ; cocos2d::CCApplication::sharedApplication(void) ; +0x99, 0x14009d7b9\nmov     [rax+0E0h], r14                                                ; +0x9f, 0x14009d7bf\nmov     ecx, 200h; Size                                                ; +0xa6, 0x14009d7c6\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xab, 0x14009d7cb\nmov     rsi, rax                                                       ; +0xb0, 0x14009d7d0\nmov     [rsp+38h+arg_10], rax                                          ; +0xb3, 0x14009d7d3\nmov     rcx, rax                                                       ; +0xb8, 0x14009d7d8\ncall    cs:??0CCLayer@cocos2d@@QEAA@XZ; cocos2d::CCLayer::CCLayer(void) ; +0xbb, 0x14009d7db\nlea     rax, ??_7LeaderboardsLayer@@6B@; const LeaderboardsLayer::`vftable' ; +0xc1, 0x14009d7e1\nmov     [rsi], rax                                                     ; +0xc8, 0x14009d7e8\nlea     rax, ??_7LeaderboardsLayer@@6B@_0; const LeaderboardsLayer::`vftable' ; +0xcb, 0x14009d7eb\nmov     [rsi+140h], rax                                                ; +0xd2, 0x14009d7f2\nlea     rax, ??_7LeaderboardsLayer@@6B@_1; const LeaderboardsLayer::`vftable' ; +0xd9, 0x14009d7f9\nmov     [rsi+148h], rax                                                ; +0xe0, 0x14009d800\nlea     rax, ??_7LeaderboardsLayer@@6B@_2; const LeaderboardsLayer::`vftable' ; +0xe7, 0x14009d807\nmov     [rsi+150h], rax                                                ; +0xee, 0x14009d80e\nlea     rax, ??_7LeaderboardsLayer@@6B@_3; const LeaderboardsLayer::`vftable' ; +0xf5, 0x14009d815\nmov     [rsi+158h], rax                                                ; +0xfc, 0x14009d81c\nlea     rax, ??_7LeaderboardsLayer@@6B@_4; const LeaderboardsLayer::`vftable' ; +0x103, 0x14009d823\nmov     [rsi+160h], rax                                                ; +0x10a, 0x14009d82a\nlea     rax, ??_7LeaderboardsLayer@@6B@_5; const LeaderboardsLayer::`vftable' ; +0x111, 0x14009d831\nmov     [rsi+198h], rax                                                ; +0x118, 0x14009d838\nlea     rax, ??_7LeaderboardsLayer@@6B@_6; const LeaderboardsLayer::`vftable' ; +0x11f, 0x14009d83f\nmov     [rsi+1A0h], rax                                                ; +0x126, 0x14009d846\nxor     ebp, ebp                                                       ; +0x12d, 0x14009d84d\nmov     [rsi+1A8h], rbp                                                ; +0x12f, 0x14009d84f\nmov     [rsi+1B0h], rbp                                                ; +0x136, 0x14009d856\nmov     [rsi+1B8h], rbp                                                ; +0x13d, 0x14009d85d\nmov     [rsi+1C0h], rbp                                                ; +0x144, 0x14009d864\nmov     [rsi+1C8h], rbp                                                ; +0x14b, 0x14009d86b\nmov     [rsi+1D0h], rbp                                                ; +0x152, 0x14009d872\nmov     [rsi+1D8h], rbp                                                ; +0x159, 0x14009d879\nmov     [rsi+1E0h], rbp                                                ; +0x160, 0x14009d880\nmov     [rsi+1E8h], rbp                                                ; +0x167, 0x14009d887\nmov     [rsi+1F8h], rbp                                                ; +0x16e, 0x14009d88e\nmov     r8d, ebx                                                       ; +0x175, 0x14009d895\nmov     edx, edi                                                       ; +0x178, 0x14009d898\nmov     rcx, rsi                                                       ; +0x17a, 0x14009d89a\ncall    LeaderboardsLayer__init                                        ; +0x17d, 0x14009d89d\nmov     rcx, rsi                                                       ; +0x182, 0x14009d8a2\ntest    al, al                                                         ; +0x185, 0x14009d8a5\njz      short loc_14009D8B1                                            ; +0x187, 0x14009d8a7\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x189, 0x14009d8a9\njmp     short loc_14009D8BF                                            ; +0x18f, 0x14009d8af\nmov     rax, [rsi]                                                     ; +0x191, 0x14009d8b1\nmov     edx, 1                                                         ; +0x194, 0x14009d8b4\ncall    qword ptr [rax+8]                                              ; +0x199, 0x14009d8b9\nmov     rsi, rbp                                                       ; +0x19c, 0x14009d8bc\nmov     rax, [r14]                                                     ; +0x19f, 0x14009d8bf\nmov     rdx, rsi                                                       ; +0x1a2, 0x14009d8c2\nmov     rcx, r14                                                       ; +0x1a5, 0x14009d8c5\ncall    qword ptr [rax+1C0h]                                           ; +0x1a8, 0x14009d8c8\nmov     rdx, r14                                                       ; +0x1ae, 0x14009d8ce\nmovss   xmm0, cs:dword_140622B08                                       ; +0x1b1, 0x14009d8d1\ncall    cs:?create@CCTransitionFade@cocos2d@@SAPEAV12@MPEAVCCScene@2@@Z; cocos2d::CCTransitionFade::create(float,cocos2d::CCScene *) ; +0x1b9, 0x14009d8d9\nmov     rbx, rax                                                       ; +0x1bf, 0x14009d8df\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1c2, 0x14009d8e2\nmov     rcx, rax                                                       ; +0x1c8, 0x14009d8e8\nmov     rdx, rbx                                                       ; +0x1cb, 0x14009d8eb\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x1ce, 0x14009d8ee\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x1d3, 0x14009d8f3\nadd     rsp, 20h                                                       ; +0x1d8, 0x14009d8f8\npop     r14                                                            ; +0x1dc, 0x14009d8fc\npop     rdi                                                            ; +0x1de, 0x14009d8fe\npop     rsi                                                            ; +0x1df, 0x14009d8ff\njmp     cs:?pushScene@CCDirector@cocos2d@@QEAA_NPEAVCCScene@2@@Z; cocos2d::CCDirector::pushScene(cocos2d::CCScene *) ; +0x1e0, 0x14009d900", "xrefs": ["CreatorLayer::init @ 0x14009c4ac", "<???> @ 0x1406c7590"], "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"}