{"type": "func", "start": 5371866432, "end": 5371866886, "name": "LevelLeaderboard::setupLeaderboard", "pseudocode": "// \n// LevelLeaderboard::setupLeaderboard from 0x140302d40 to 0x140302f06 (454 bytes)\n// \n// 6 xrefs:\n// > LevelLeaderboard::init @ 0x140301bdb\n// > LevelLeaderboard::loadScores @ 0x140302506\n// > LevelLeaderboard::onUpdate @ 0x140302913\n// > LevelLeaderboard::loadLeaderboardFinished @ 0x140302bdf\n// > <???> @ 0x1406d4400\n// > <???> @ 0x1406d440c\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 LevelLeaderboard::setupLeaderboard(LevelLeaderboard *a1, cocos2d::CCArray *a2)\n{\n  CustomListView *v2; // rsi\n  __int64 v5; // rax\n  cocos2d::CCTouchDispatcher *v6; // rax\n  cocos2d::CCDirector *v7; // rax\n  const char *v8; // rdx\n  GJGameLevel *m_level; // rax\n  cocos2d::ccArray *data; // rcx\n  __int64 num; // rax\n  cocos2d::CCObject **arr; // rcx\n  cocos2d::CCObject **i; // r8\n  cocos2d::CCObject *v14; // rdx\n  BoomListType v15; // eax\n  GJCommentListLayer *v16; // rax\n  cocos2d::CCLayer *m_mainLayer; // rcx\n  float v18; // xmm0_4\n  GJCommentListLayer_vtbl *v19; // rbx\n  const cocos2d::CCPoint *v20; // rax\n  int v21; // [rsp+20h] [rbp-38h]\n  float v22; // [rsp+60h] [rbp+8h]\n\n  v2 = nullptr;\n  if ( a1->m_list )\n  {\n    v5 = cocos2d::CCDirector::sharedDirector(a1);\n    v6 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 144LL))(v5);\n    cocos2d::CCTouchDispatcher::unregisterForcePrio(v6, a1->m_list);\n    a1->m_list->removeMeAndCleanup(a1->m_list);\n    a1->m_list = nullptr;\n  }\n  v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1);\n  cocos2d::CCDirector::getWinSize(v7);\n  if ( a2 )\n  {\n    m_level = a1->m_level;\n    if ( m_level )\n    {\n      if ( m_level->m_levelLength == 5 && a1->m_type != Local )\n      {\n        data = a2->data;\n        num = data->num;\n        if ( (_DWORD)num )\n        {\n          arr = data->arr;\n          for ( i = &arr[num - 1]; arr <= i; v14[16].m_nLuaID = a1->m_mode )\n          {\n            v14 = *arr;\n            if ( !*arr )\n              break;\n            ++arr;\n            v14[16].m_uID = 1;\n          }\n        }\n      }\n    }\n    v15 = Comment4|Achievement;\n    if ( a1->m_type == Local )\n      v15 = LocalLevelScore;\n    v2 = CustomListView::create(a2, nullptr, 220.0, 340.0, v21, v15, 0.0);\n  }\n  v16 = GJCommentListLayer::create(v2, v8, (cocos2d::ccColor4B)-12684609, 340.0, 220.0, 1);\n  m_mainLayer = a1->m_mainLayer;\n  a1->m_list = v16;\n  v18 = ((float (__fastcall *)(cocos2d::CCLayer *, GJCommentListLayer *))m_mainLayer->addChild_1)(m_mainLayer, v16);\n  v19 = a1->m_list->__vftable;\n  cocos2d::CCPoint::CCPoint(v18, (float)(v22 - 340.0) * 0.5);\n  v19->setPosition_0(a1->m_list, v20);\n}", "assembly": "; \n; LevelLeaderboard::setupLeaderboard from 0x140302d40 to 0x140302f06 (454 bytes)\n; \n; 6 xrefs:\n; > LevelLeaderboard::init @ 0x140301bdb\n; > LevelLeaderboard::loadScores @ 0x140302506\n; > LevelLeaderboard::onUpdate @ 0x140302913\n; > LevelLeaderboard::loadLeaderboardFinished @ 0x140302bdf\n; > <???> @ 0x1406d4400\n; > <???> @ 0x1406d440c\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_10], rbx                                              ; +0x0, 0x140302d40\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x140302d45\npush    rdi                                                            ; +0xa, 0x140302d4a\nsub     rsp, 50h                                                       ; +0xb, 0x140302d4b\nxor     esi, esi                                                       ; +0xf, 0x140302d4f\nmovaps  [rsp+58h+var_18], xmm7                                         ; +0x11, 0x140302d51\nmov     rbx, rdx                                                       ; +0x16, 0x140302d56\nmov     rdi, rcx                                                       ; +0x19, 0x140302d59\ncmp     [rcx+2A0h], rsi                                                ; +0x1c, 0x140302d5c\njz      short loc_140302D9F                                            ; +0x23, 0x140302d63\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x25, 0x140302d65\nmov     rcx, rax                                                       ; +0x2b, 0x140302d6b\nmov     r8, [rax]                                                      ; +0x2e, 0x140302d6e\ncall    qword ptr [r8+90h]                                             ; +0x31, 0x140302d71\nmov     rdx, [rdi+2A0h]                                                ; +0x38, 0x140302d78\nmov     rcx, rax                                                       ; +0x3f, 0x140302d7f\ncall    cs:?unregisterForcePrio@CCTouchDispatcher@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCTouchDispatcher::unregisterForcePrio(cocos2d::CCObject *) ; +0x42, 0x140302d82\nmov     rcx, [rdi+2A0h]                                                ; +0x48, 0x140302d88\nmov     rax, [rcx]                                                     ; +0x4f, 0x140302d8f\ncall    qword ptr [rax+200h]                                           ; +0x52, 0x140302d92\nmov     [rdi+2A0h], rsi                                                ; +0x58, 0x140302d98\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x5f, 0x140302d9f\nmov     rcx, rax                                                       ; +0x65, 0x140302da5\nlea     rdx, [rsp+58h+arg_0]                                           ; +0x68, 0x140302da8\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x6d, 0x140302dad\nmovss   xmm7, cs:dword_1406233F4                                       ; +0x73, 0x140302db3\ntest    rbx, rbx                                                       ; +0x7b, 0x140302dbb\njz      loc_140302E60                                                  ; +0x7e, 0x140302dbe\nmov     rax, [rdi+288h]                                                ; +0x84, 0x140302dc4\ntest    rax, rax                                                       ; +0x8b, 0x140302dcb\njz      short loc_140302E27                                            ; +0x8e, 0x140302dce\ncmp     dword ptr [rax+358h], 5                                        ; +0x90, 0x140302dd0\njnz     short loc_140302E27                                            ; +0x97, 0x140302dd7\ncmp     dword ptr [rdi+290h], 3                                        ; +0x99, 0x140302dd9\njz      short loc_140302E27                                            ; +0xa0, 0x140302de0\nmov     rcx, [rbx+38h]                                                 ; +0xa2, 0x140302de2\nmov     eax, [rcx]                                                     ; +0xa6, 0x140302de6\ntest    eax, eax                                                       ; +0xa8, 0x140302de8\njz      short loc_140302E27                                            ; +0xaa, 0x140302dea\nmov     rcx, [rcx+10h]                                                 ; +0xac, 0x140302dec\nlea     r8, [rax-1]                                                    ; +0xb0, 0x140302df0\nlea     r8, [rcx+r8*8]                                                 ; +0xb4, 0x140302df4\ncmp     rcx, r8                                                        ; +0xb8, 0x140302df8\nja      short loc_140302E27                                            ; +0xbb, 0x140302dfb\nnop     dword ptr [rax]                                                ; +0xbd, 0x140302dfd\nmov     rdx, [rcx]                                                     ; +0xc0, 0x140302e00\ntest    rdx, rdx                                                       ; +0xc3, 0x140302e03\njz      short loc_140302E27                                            ; +0xc6, 0x140302e06\nadd     rcx, 8                                                         ; +0xc8, 0x140302e08\nmov     dword ptr [rdx+388h], 1                                        ; +0xcc, 0x140302e0c\nmov     eax, [rdi+294h]                                                ; +0xd6, 0x140302e16\nmov     [rdx+38Ch], eax                                                ; +0xdc, 0x140302e1c\ncmp     rcx, r8                                                        ; +0xe2, 0x140302e22\njbe     short loc_140302E00                                            ; +0xe5, 0x140302e25\ncmp     dword ptr [rdi+290h], 3                                        ; +0xe7, 0x140302e27\nmov     eax, 14h                                                       ; +0xee, 0x140302e2e\nmovss   xmm3, cs:dword_140623460                                       ; +0xf3, 0x140302e33\nmov     ecx, 21h ; '!'                                                 ; +0xfb, 0x140302e3b\ncmovz   eax, ecx                                                       ; +0x100, 0x140302e40\nxorps   xmm0, xmm0                                                     ; +0x103, 0x140302e43\nmovss   [rsp+58h+var_28], xmm0                                         ; +0x106, 0x140302e46\nxor     edx, edx                                                       ; +0x10c, 0x140302e4c\nmov     rcx, rbx                                                       ; +0x10e, 0x140302e4e\nmov     [rsp+58h+var_30], eax                                          ; +0x111, 0x140302e51\nmovaps  xmm2, xmm7                                                     ; +0x115, 0x140302e55\ncall    CustomListView__create                                         ; +0x118, 0x140302e58\nmov     rsi, rax                                                       ; +0x11d, 0x140302e5d\nmovss   xmm3, cs:dword_140623460                                       ; +0x120, 0x140302e60\nmov     r8d, 0FF3E72BFh                                                ; +0x128, 0x140302e68\nmov     byte ptr [rsp+58h+var_30], 1                                   ; +0x12e, 0x140302e6e\nmov     rcx, rsi                                                       ; +0x133, 0x140302e73\nmovss   [rsp+58h+var_38], xmm7                                         ; +0x136, 0x140302e76\ncall    GJCommentListLayer__create                                     ; +0x13c, 0x140302e7c\nmov     rcx, [rdi+240h]                                                ; +0x141, 0x140302e81\nmov     rdx, rax                                                       ; +0x148, 0x140302e88\nmov     [rdi+2A0h], rax                                                ; +0x14b, 0x140302e8b\nmov     r8, [rcx]                                                      ; +0x152, 0x140302e92\ncall    qword ptr [r8+1C0h]                                            ; +0x155, 0x140302e95\nmovss   xmm2, [rsp+58h+arg_4]                                          ; +0x15c, 0x140302e9c\nlea     rcx, [rsp+58h+arg_8]                                           ; +0x162, 0x140302ea2\nmovss   xmm1, [rsp+58h+arg_0]                                          ; +0x167, 0x140302ea7\nsubss   xmm2, xmm7                                                     ; +0x16d, 0x140302ead\nsubss   xmm1, cs:dword_140623460                                       ; +0x171, 0x140302eb1\nmov     rax, [rdi+2A0h]                                                ; +0x179, 0x140302eb9\nmulss   xmm2, cs:dword_140622B08                                       ; +0x180, 0x140302ec0\nmov     rbx, [rax]                                                     ; +0x188, 0x140302ec8\nmulss   xmm1, cs:dword_140622B08                                       ; +0x18b, 0x140302ecb\nsubss   xmm2, cs:flt_14062307C                                         ; +0x193, 0x140302ed3\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x19b, 0x140302edb\nmov     rcx, [rdi+2A0h]                                                ; +0x1a1, 0x140302ee1\nmov     rdx, rax                                                       ; +0x1a8, 0x140302ee8\ncall    qword ptr [rbx+0B8h]                                           ; +0x1ab, 0x140302eeb\nmov     rbx, [rsp+58h+arg_10]                                          ; +0x1b1, 0x140302ef1\nmov     rsi, [rsp+58h+arg_18]                                          ; +0x1b6, 0x140302ef6\nmovaps  xmm7, [rsp+58h+var_18]                                         ; +0x1bb, 0x140302efb\nadd     rsp, 50h                                                       ; +0x1c0, 0x140302f00\npop     rdi                                                            ; +0x1c4, 0x140302f04\nretn                                                                   ; +0x1c5, 0x140302f05", "xrefs": ["LevelLeaderboard::init @ 0x140301bdb", "LevelLeaderboard::loadScores @ 0x140302506", "LevelLeaderboard::onUpdate @ 0x140302913", "LevelLeaderboard::loadLeaderboardFinished @ 0x140302bdf", "<???> @ 0x1406d4400", "<???> @ 0x1406d440c"], "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"}