{"type": "func", "start": 5373077856, "end": 5373078309, "name": "LevelLeaderboard::setupLeaderboard", "pseudocode": "// \n// LevelLeaderboard::setupLeaderboard from 0x14042a960 to 0x14042ab25 (453 bytes)\n// \n// 5 xrefs:\n// > LevelLeaderboard::init @ 0x140429548\n// > LevelLeaderboard::loadScores @ 0x140429f06\n// > LevelLeaderboard::onUpdate @ 0x14042a509\n// > LevelLeaderboard::loadLeaderboardFinished @ 0x14042a7ff\n// > <???> @ 0x140926ac8\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:32:12 +0000\n// \n\n__int64 __fastcall LevelLeaderboard::setupLeaderboard(__int64 a1, cocos2d::CCObject *a2)\n{\n  int v2; // ebp\n  __int64 v5; // rax\n  struct cocos2d::CCObject *v6; // rbx\n  cocos2d::CCTouchDispatcher *v7; // rax\n  __int64 v8; // rax\n  int v9; // edx\n  __int64 v10; // rax\n  unsigned int *v11; // rcx\n  __int64 v12; // rax\n  __int64 *v13; // rcx\n  __int64 *i; // r8\n  __int64 v15; // rdx\n  int v16; // eax\n  cocos2d::CCLayerColor *v17; // rax\n  __int64 v18; // rcx\n  __int64 *v19; // rdi\n  __int64 v20; // rbx\n  __int64 v21; // rax\n  __int64 v23; // [rsp+20h] [rbp-48h]\n  int v24; // [rsp+30h] [rbp-38h]\n  float v25; // [rsp+70h] [rbp+8h] BYREF\n  float v26; // [rsp+74h] [rbp+Ch]\n  char v27; // [rsp+78h] [rbp+10h] BYREF\n\n  v2 = 0;\n  if ( *(_QWORD *)(a1 + 704) )\n  {\n    v5 = cocos2d::CCDirector::sharedDirector(a1);\n    v6 = *(struct cocos2d::CCObject **)(a1 + 704);\n    v7 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 144LL))(v5);\n    cocos2d::CCTouchDispatcher::unregisterForcePrio(v7, v6);\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 704) + 528LL))(*(_QWORD *)(a1 + 704));\n    *(_QWORD *)(a1 + 704) = 0;\n  }\n  v8 = cocos2d::CCDirector::sharedDirector(a1);\n  cocos2d::CCDirector::getWinSize(v8, &v25);\n  if ( a2 )\n  {\n    v10 = *(_QWORD *)(a1 + 680);\n    if ( v10 )\n    {\n      if ( *(_DWORD *)(v10 + 972) == 5 && *(_DWORD *)(a1 + 688) != 3 )\n      {\n        v11 = *((unsigned int **)a2 + 7);\n        v12 = *v11;\n        if ( (_DWORD)v12 )\n        {\n          v13 = *((__int64 **)v11 + 2);\n          for ( i = &v13[v12 - 1]; v13 <= i; *(_DWORD *)(v15 + 940) = *(_DWORD *)(a1 + 692) )\n          {\n            v15 = *v13;\n            if ( !*v13 )\n              break;\n            ++v13;\n            *(_DWORD *)(v15 + 936) = 1;\n          }\n        }\n      }\n    }\n    v16 = 18;\n    if ( *(_DWORD *)(a1 + 688) == 3 )\n      v16 = 31;\n    v24 = 0;\n    v2 = (unsigned int)CustomListView::create(a2, 0, 220.0, 340.0, v23, v16);\n  }\n  v17 = GJCommentListLayer::create(v2, v9, -12684609, 340.0, 1130102784, 1, v24);\n  v18 = *(_QWORD *)(a1 + 584);\n  *(_QWORD *)(a1 + 704) = v17;\n  (*(void (__fastcall **)(__int64, cocos2d::CCLayerColor *))(*(_QWORD *)v18 + 464LL))(v18, v17);\n  v19 = *(__int64 **)(a1 + 704);\n  v20 = *v19;\n  cocos2d::CCPoint::CCPoint(\n    (cocos2d::CCPoint *)&v27,\n    (float)(v25 - 340.0) * 0.5,\n    (float)((float)(v26 - 220.0) * 0.5) - 10.0);\n  return (*(__int64 (__fastcall **)(__int64 *, __int64))(v20 + 184))(v19, v21);\n}", "assembly": "; \n; LevelLeaderboard::setupLeaderboard from 0x14042a960 to 0x14042ab25 (453 bytes)\n; \n; 5 xrefs:\n; > LevelLeaderboard::init @ 0x140429548\n; > LevelLeaderboard::loadScores @ 0x140429f06\n; > LevelLeaderboard::onUpdate @ 0x14042a509\n; > LevelLeaderboard::loadLeaderboardFinished @ 0x14042a7ff\n; > <???> @ 0x140926ac8\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:32:12 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x14042a960\npush    rbp                                                            ; +0x5, 0x14042a965\npush    rsi                                                            ; +0x6, 0x14042a966\npush    rdi                                                            ; +0x7, 0x14042a967\nsub     rsp, 50h                                                       ; +0x8, 0x14042a968\nxor     ebp, ebp                                                       ; +0xc, 0x14042a96c\nmovaps  [rsp+68h+var_28], xmm7                                         ; +0xe, 0x14042a96e\nmov     rsi, rdx                                                       ; +0x13, 0x14042a973\nmov     rdi, rcx                                                       ; +0x16, 0x14042a976\ncmp     [rcx+2C0h], rbp                                                ; +0x19, 0x14042a979\njz      short loc_14042A9BF                                            ; +0x20, 0x14042a980\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x22, 0x14042a982\nmov     rbx, [rdi+2C0h]                                                ; +0x28, 0x14042a988\nmov     rcx, rax                                                       ; +0x2f, 0x14042a98f\nmov     r8, [rax]                                                      ; +0x32, 0x14042a992\ncall    qword ptr [r8+90h]                                             ; +0x35, 0x14042a995\nmov     rcx, rax                                                       ; +0x3c, 0x14042a99c\nmov     rdx, rbx                                                       ; +0x3f, 0x14042a99f\ncall    cs:?unregisterForcePrio@CCTouchDispatcher@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCTouchDispatcher::unregisterForcePrio(cocos2d::CCObject *) ; +0x42, 0x14042a9a2\nmov     rcx, [rdi+2C0h]                                                ; +0x48, 0x14042a9a8\nmov     rax, [rcx]                                                     ; +0x4f, 0x14042a9af\ncall    qword ptr [rax+210h]                                           ; +0x52, 0x14042a9b2\nmov     [rdi+2C0h], rbp                                                ; +0x58, 0x14042a9b8\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x5f, 0x14042a9bf\nmov     rcx, rax                                                       ; +0x65, 0x14042a9c5\nlea     rdx, [rsp+68h+arg_0]                                           ; +0x68, 0x14042a9c8\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x6d, 0x14042a9cd\nmovss   xmm7, cs:dword_14083591C                                       ; +0x73, 0x14042a9d3\ntest    rsi, rsi                                                       ; +0x7b, 0x14042a9db\njz      loc_14042AA80                                                  ; +0x7e, 0x14042a9de\nmov     rax, [rdi+2A8h]                                                ; +0x84, 0x14042a9e4\ntest    rax, rax                                                       ; +0x8b, 0x14042a9eb\njz      short loc_14042AA47                                            ; +0x8e, 0x14042a9ee\ncmp     dword ptr [rax+3CCh], 5                                        ; +0x90, 0x14042a9f0\njnz     short loc_14042AA47                                            ; +0x97, 0x14042a9f7\ncmp     dword ptr [rdi+2B0h], 3                                        ; +0x99, 0x14042a9f9\njz      short loc_14042AA47                                            ; +0xa0, 0x14042aa00\nmov     rcx, [rsi+38h]                                                 ; +0xa2, 0x14042aa02\nmov     eax, [rcx]                                                     ; +0xa6, 0x14042aa06\ntest    eax, eax                                                       ; +0xa8, 0x14042aa08\njz      short loc_14042AA47                                            ; +0xaa, 0x14042aa0a\nmov     rcx, [rcx+10h]                                                 ; +0xac, 0x14042aa0c\nlea     r8, [rax-1]                                                    ; +0xb0, 0x14042aa10\nlea     r8, [rcx+r8*8]                                                 ; +0xb4, 0x14042aa14\ncmp     rcx, r8                                                        ; +0xb8, 0x14042aa18\nja      short loc_14042AA47                                            ; +0xbb, 0x14042aa1b\nnop     dword ptr [rax]                                                ; +0xbd, 0x14042aa1d\nmov     rdx, [rcx]                                                     ; +0xc0, 0x14042aa20\ntest    rdx, rdx                                                       ; +0xc3, 0x14042aa23\njz      short loc_14042AA47                                            ; +0xc6, 0x14042aa26\nadd     rcx, 8                                                         ; +0xc8, 0x14042aa28\nmov     dword ptr [rdx+3A8h], 1                                        ; +0xcc, 0x14042aa2c\nmov     eax, [rdi+2B4h]                                                ; +0xd6, 0x14042aa36\nmov     [rdx+3ACh], eax                                                ; +0xdc, 0x14042aa3c\ncmp     rcx, r8                                                        ; +0xe2, 0x14042aa42\njbe     short loc_14042AA20                                            ; +0xe5, 0x14042aa45\ncmp     dword ptr [rdi+2B0h], 3                                        ; +0xe7, 0x14042aa47\nmov     eax, 12h                                                       ; +0xee, 0x14042aa4e\nmovss   xmm3, cs:dword_1408359D4                                       ; +0xf3, 0x14042aa53\nmov     ecx, 1Fh                                                       ; +0xfb, 0x14042aa5b\ncmovz   eax, ecx                                                       ; +0x100, 0x14042aa60\nxorps   xmm0, xmm0                                                     ; +0x103, 0x14042aa63\nmovss   [rsp+68h+var_38], xmm0                                         ; +0x106, 0x14042aa66\nxor     edx, edx                                                       ; +0x10c, 0x14042aa6c\nmov     rcx, rsi                                                       ; +0x10e, 0x14042aa6e\nmov     [rsp+68h+var_40], eax                                          ; +0x111, 0x14042aa71\nmovaps  xmm2, xmm7                                                     ; +0x115, 0x14042aa75\ncall    CustomListView__create                                         ; +0x118, 0x14042aa78\nmov     rbp, rax                                                       ; +0x11d, 0x14042aa7d\nmovss   xmm3, cs:dword_1408359D4                                       ; +0x120, 0x14042aa80\nmov     r8d, 0FF3E72BFh                                                ; +0x128, 0x14042aa88\nmov     byte ptr [rsp+68h+var_40], 1                                   ; +0x12e, 0x14042aa8e\nmov     rcx, rbp                                                       ; +0x133, 0x14042aa93\nmovss   dword ptr [rsp+68h+var_48], xmm7                               ; +0x136, 0x14042aa96\ncall    GJCommentListLayer__create                                     ; +0x13c, 0x14042aa9c\nmov     rcx, [rdi+248h]                                                ; +0x141, 0x14042aaa1\nmov     [rdi+2C0h], rax                                                ; +0x148, 0x14042aaa8\nmov     rdx, [rcx]                                                     ; +0x14f, 0x14042aaaf\nmov     r8, [rdx+1D0h]                                                 ; +0x152, 0x14042aab2\nmov     rdx, rax                                                       ; +0x159, 0x14042aab9\ncall    r8                                                             ; +0x15c, 0x14042aabc\nmovss   xmm2, [rsp+68h+arg_4]                                          ; +0x15f, 0x14042aabf\nlea     rcx, [rsp+68h+arg_8]                                           ; +0x165, 0x14042aac5\nmovss   xmm1, [rsp+68h+arg_0]                                          ; +0x16a, 0x14042aaca\nsubss   xmm2, xmm7                                                     ; +0x170, 0x14042aad0\nsubss   xmm1, cs:dword_1408359D4                                       ; +0x174, 0x14042aad4\nmov     rdi, [rdi+2C0h]                                                ; +0x17c, 0x14042aadc\nmulss   xmm2, cs:dword_140834F20                                       ; +0x183, 0x14042aae3\nmov     rbx, [rdi]                                                     ; +0x18b, 0x14042aaeb\nmulss   xmm1, cs:dword_140834F20                                       ; +0x18e, 0x14042aaee\nsubss   xmm2, cs:flt_1408354EC                                         ; +0x196, 0x14042aaf6\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x19e, 0x14042aafe\nmov     rdx, rax                                                       ; +0x1a4, 0x14042ab04\nmov     rcx, rdi                                                       ; +0x1a7, 0x14042ab07\ncall    qword ptr [rbx+0B8h]                                           ; +0x1aa, 0x14042ab0a\nmov     rbx, [rsp+68h+arg_10]                                          ; +0x1b0, 0x14042ab10\nmovaps  xmm7, [rsp+68h+var_28]                                         ; +0x1b8, 0x14042ab18\nadd     rsp, 50h                                                       ; +0x1bd, 0x14042ab1d\npop     rdi                                                            ; +0x1c1, 0x14042ab21\npop     rsi                                                            ; +0x1c2, 0x14042ab22\npop     rbp                                                            ; +0x1c3, 0x14042ab23\nretn                                                                   ; +0x1c4, 0x14042ab24", "xrefs": ["LevelLeaderboard::init @ 0x140429548", "LevelLeaderboard::loadScores @ 0x140429f06", "LevelLeaderboard::onUpdate @ 0x14042a509", "LevelLeaderboard::loadLeaderboardFinished @ 0x14042a7ff", "<???> @ 0x140926ac8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}