{"type": "func", "start": 4295559272, "end": 4295559724, "name": "GameLevelManager::onGetLevelLeaderboardCompleted", "pseudocode": "// \n// GameLevelManager::onGetLevelLeaderboardCompleted from 0x100090868 to 0x100090a2c (452 bytes)\n// \n// 1 xrefs:\n// > GameLevelManager::handleIt @ 0x100089a64\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__int64 __fastcall GameLevelManager::onGetLevelLeaderboardCompleted(GameLevelManager *a1, __int64 a2, __int64 a3)\n{\n  const char *v6; // x20\n  int v7; // w24\n  const char *v8; // x0\n  int v9; // w0\n  int v10; // w23\n  __int64 v11; // x0\n  __int64 result; // x0\n  __int64 Scores; // x21\n  void *v14[2]; // [xsp+8h] [xbp-98h] BYREF\n  char v15; // [xsp+1Fh] [xbp-81h]\n  void *__dst[2]; // [xsp+20h] [xbp-80h] BYREF\n  __int64 v17; // [xsp+30h] [xbp-70h]\n  std::string __p; // [xsp+40h] [xbp-60h] BYREF\n  __int64 v19; // [xsp+64h] [xbp-3Ch]\n\n  v6 = (const char *)a3;\n  if ( *(char *)(a3 + 23) < 0 )\n    v6 = *(const char **)a3;\n  GameLevelManager::removeDLFromActive(a1, v6);\n  v19 = 0;\n  if ( *(char *)(a3 + 23) < 0 )\n    sub_1000097D0(&__p, *(void **)a3, *(_QWORD *)(a3 + 8));\n  else\n    __p = *(std::string *)a3;\n  sub_1000A3208(&__p);\n  if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(__p.__r_.__value_.__l.__data_);\n  v7 = *(char *)(a2 + 23);\n  v8 = (const char *)a2;\n  if ( v7 < 0 )\n    v8 = *(const char **)a2;\n  v9 = atoi(v8);\n  v10 = v9;\n  if ( HIDWORD(v19) == 4 )\n  {\n    v11 = cocos2d::CCDictionary::objectForKey_1(a1->m_localLeaderboardLevels, a3);\n    if ( v11 && (v10 & 0x80000000) == 0 )\n    {\n      if ( (_DWORD)v19 == 1 )\n      {\n        *(_BYTE *)(v11 + 1321) = 0;\n      }\n      else if ( !(_DWORD)v19 )\n      {\n        *(_BYTE *)(v11 + 1320) = 0;\n      }\n    }\n    return cocos2d::CCDictionary::removeObjectForKey_1((int)a1->m_localLeaderboardLevels, (char *)a3);\n  }\n  else if ( v9 < 0 )\n  {\n    result = (__int64)a1->m_leaderboardManagerDelegate;\n    if ( result )\n      return (*(__int64 (__fastcall **)(__int64, const char *))(*(_QWORD *)result + 24LL))(result, v6);\n  }\n  else\n  {\n    if ( v7 < 0 )\n    {\n      sub_1000097D0(__dst, *(void **)a2, *(_QWORD *)(a2 + 8));\n    }\n    else\n    {\n      *(_OWORD *)__dst = *(_OWORD *)a2;\n      v17 = *(_QWORD *)(a2 + 16);\n    }\n    Scores = GameLevelManager::createAndGetScores(a1, __dst, 3);\n    if ( SHIBYTE(v17) < 0 )\n      operator delete(__dst[0]);\n    sub_100009900(v14, \" \");\n    GameLevelManager::storeSearchResult(a1, Scores, v14, v6);\n    if ( v15 < 0 )\n      operator delete(v14[0]);\n    result = (__int64)a1->m_leaderboardManagerDelegate;\n    if ( result )\n      return (*(__int64 (__fastcall **)(__int64, __int64, const char *))(*(_QWORD *)result + 16LL))(result, Scores, v6);\n  }\n  return result;\n}", "assembly": "; \n; GameLevelManager::onGetLevelLeaderboardCompleted from 0x100090868 to 0x100090a2c (452 bytes)\n; \n; 1 xrefs:\n; > GameLevelManager::handleIt @ 0x100089a64\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\nSUB             SP, SP, #0xB0                                          ; +0x0, 0x100090868\nSTP             X24, X23, [SP,#0xA0+var_30]                            ; +0x4, 0x10009086c\nSTP             X22, X21, [SP,#0xA0+var_20]                            ; +0x8, 0x100090870\nSTP             X20, X19, [SP,#0xA0+var_10]                            ; +0xc, 0x100090874\nSTP             X29, X30, [SP,#0xA0+var_s0]                            ; +0x10, 0x100090878\nADD             X29, SP, #0xA0                                         ; +0x14, 0x10009087c\nMOV             X21, X2                                                ; +0x18, 0x100090880\nMOV             X22, X1                                                ; +0x1c, 0x100090884\nMOV             X19, X0                                                ; +0x20, 0x100090888\nLDRSB           W8, [X2,#0x17]                                         ; +0x24, 0x10009088c\nMOV             X20, X2                                                ; +0x28, 0x100090890\nTBZ             W8, #0x1F, loc_10009089C                               ; +0x2c, 0x100090894\nLDR             X20, [X21]                                             ; +0x30, 0x100090898\nMOV             X0, X19                                                ; +0x34, 0x10009089c\nMOV             X1, X20                                                ; +0x38, 0x1000908a0\nBL              GameLevelManager__removeDLFromActive                   ; +0x3c, 0x1000908a4\nSTUR            XZR, [X29,#var_3C]                                     ; +0x40, 0x1000908a8\nLDRSB           W8, [X21,#0x17]                                        ; +0x44, 0x1000908ac\nTBNZ            W8, #0x1F, loc_1000908C8                               ; +0x48, 0x1000908b0\nLDR             Q0, [X21]                                              ; +0x4c, 0x1000908b4\nSTR             Q0, [SP,#0xA0+__p]                                     ; +0x50, 0x1000908b8\nLDR             X8, [X21,#0x10]                                        ; +0x54, 0x1000908bc\nSTR             X8, [SP,#0xA0+var_50]                                  ; +0x58, 0x1000908c0\nB               loc_1000908D4                                          ; +0x5c, 0x1000908c4\nLDP             X1, X2, [X21]; __src                                   ; +0x60, 0x1000908c8\nADD             X0, SP, #0xA0+__p; __dst                               ; +0x64, 0x1000908cc\nBL              sub_1000097D0                                          ; +0x68, 0x1000908d0\nADD             X0, SP, #0xA0+__p; __str                               ; +0x6c, 0x1000908d4\nSUB             X1, X29, #-var_34                                      ; +0x70, 0x1000908d8\nSUB             X2, X29, #-(var_3C+4)                                  ; +0x74, 0x1000908dc\nSUB             X3, X29, #-var_3C                                      ; +0x78, 0x1000908e0\nBL              sub_1000A3208                                          ; +0x7c, 0x1000908e4\nLDRSB           W8, [SP,#0xA0+var_50+7]                                ; +0x80, 0x1000908e8\nTBZ             W8, #0x1F, loc_1000908F8                               ; +0x84, 0x1000908ec\nLDR             X0, [SP,#0xA0+__p]; __p                                ; +0x88, 0x1000908f0\nBL              __ZdlPv; operator delete(void *)                       ; +0x8c, 0x1000908f4\nLDRSB           W24, [X22,#0x17]                                       ; +0x90, 0x1000908f8\nMOV             X0, X22                                                ; +0x94, 0x1000908fc\nTBZ             W24, #0x1F, loc_100090908                              ; +0x98, 0x100090900\nLDR             X0, [X22]; char *                                      ; +0x9c, 0x100090904\nBL              _atoi                                                  ; +0xa0, 0x100090908\nMOV             X23, X0                                                ; +0xa4, 0x10009090c\nLDUR            W8, [X29,#var_3C+4]                                    ; +0xa8, 0x100090910\nCMP             W8, #4                                                 ; +0xac, 0x100090914\nB.NE            loc_100090948                                          ; +0xb0, 0x100090918\nLDR             X0, [X19,#0x288]                                       ; +0xb4, 0x10009091c\nMOV             X1, X21                                                ; +0xb8, 0x100090920\nBL              cocos2d__CCDictionary__objectForKey_1                  ; +0xbc, 0x100090924\nCBZ             X0, loc_100090A08                                      ; +0xc0, 0x100090928\nTBNZ            W23, #0x1F, loc_100090A08                              ; +0xc4, 0x10009092c\nLDUR            W8, [X29,#var_3C]                                      ; +0xc8, 0x100090930\nCMP             W8, #1                                                 ; +0xcc, 0x100090934\nB.EQ            loc_100090A04                                          ; +0xd0, 0x100090938\nCBNZ            W8, loc_100090A08                                      ; +0xd4, 0x10009093c\nSTRB            WZR, [X0,#0x528]                                       ; +0xd8, 0x100090940\nB               loc_100090A08                                          ; +0xdc, 0x100090944\nTBNZ            W23, #0x1F, loc_100090964                              ; +0xe0, 0x100090948\nTBNZ            W24, #0x1F, loc_100090980                              ; +0xe4, 0x10009094c\nLDR             Q0, [X22]                                              ; +0xe8, 0x100090950\nSTR             Q0, [SP,#0xA0+__dst]                                   ; +0xec, 0x100090954\nLDR             X8, [X22,#0x10]                                        ; +0xf0, 0x100090958\nSTR             X8, [SP,#0xA0+var_70]                                  ; +0xf4, 0x10009095c\nB               loc_10009098C                                          ; +0xf8, 0x100090960\nLDR             X0, [X19,#0x308]                                       ; +0xfc, 0x100090964\nCBZ             X0, loc_100090A14                                      ; +0x100, 0x100090968\nLDR             X8, [X0]                                               ; +0x104, 0x10009096c\nLDR             X8, [X8,#0x18]                                         ; +0x108, 0x100090970\nMOV             X1, X20                                                ; +0x10c, 0x100090974\nBLR             X8                                                     ; +0x110, 0x100090978\nB               loc_100090A14                                          ; +0x114, 0x10009097c\nLDP             X1, X2, [X22]; __src                                   ; +0x118, 0x100090980\nADD             X0, SP, #0xA0+__dst; __dst                             ; +0x11c, 0x100090984\nBL              sub_1000097D0                                          ; +0x120, 0x100090988\nADD             X1, SP, #0xA0+__dst                                    ; +0x124, 0x10009098c\nMOV             X0, X19                                                ; +0x128, 0x100090990\nMOV             W2, #3                                                 ; +0x12c, 0x100090994\nBL              GameLevelManager__createAndGetScores                   ; +0x130, 0x100090998\nMOV             X21, X0                                                ; +0x134, 0x10009099c\nLDRSB           W8, [SP,#0xA0+var_70+7]                                ; +0x138, 0x1000909a0\nTBZ             W8, #0x1F, loc_1000909B0                               ; +0x13c, 0x1000909a4\nLDR             X0, [SP,#0xA0+__dst]; __p                              ; +0x140, 0x1000909a8\nBL              __ZdlPv; operator delete(void *)                       ; +0x144, 0x1000909ac\nADRL            X1, asc_1006B11F7; \" \"                                 ; +0x148, 0x1000909b0\nADD             X0, SP, #0xA0+var_98; int                              ; +0x150, 0x1000909b8\nBL              sub_100009900                                          ; +0x154, 0x1000909bc\nADD             X2, SP, #0xA0+var_98                                   ; +0x158, 0x1000909c0\nMOV             X0, X19                                                ; +0x15c, 0x1000909c4\nMOV             X1, X21                                                ; +0x160, 0x1000909c8\nMOV             X3, X20                                                ; +0x164, 0x1000909cc\nBL              GameLevelManager__storeSearchResult                    ; +0x168, 0x1000909d0\nLDRSB           W8, [SP,#0xA0+var_81]                                  ; +0x16c, 0x1000909d4\nTBZ             W8, #0x1F, loc_1000909E4                               ; +0x170, 0x1000909d8\nLDR             X0, [SP,#0xA0+var_98]; __p                             ; +0x174, 0x1000909dc\nBL              __ZdlPv; operator delete(void *)                       ; +0x178, 0x1000909e0\nLDR             X0, [X19,#0x308]                                       ; +0x17c, 0x1000909e4\nCBZ             X0, loc_100090A14                                      ; +0x180, 0x1000909e8\nLDR             X8, [X0]                                               ; +0x184, 0x1000909ec\nLDR             X8, [X8,#0x10]                                         ; +0x188, 0x1000909f0\nMOV             X1, X21                                                ; +0x18c, 0x1000909f4\nMOV             X2, X20                                                ; +0x190, 0x1000909f8\nBLR             X8                                                     ; +0x194, 0x1000909fc\nB               loc_100090A14                                          ; +0x198, 0x100090a00\nSTRB            WZR, [X0,#0x529]                                       ; +0x19c, 0x100090a04\nLDR             X0, [X19,#0x288]; int                                  ; +0x1a0, 0x100090a08\nMOV             X1, X21; __s                                           ; +0x1a4, 0x100090a0c\nBL              cocos2d__CCDictionary__removeObjectForKey_1            ; +0x1a8, 0x100090a10\nLDP             X29, X30, [SP,#0xA0+var_s0]                            ; +0x1ac, 0x100090a14\nLDP             X20, X19, [SP,#0xA0+var_10]                            ; +0x1b0, 0x100090a18\nLDP             X22, X21, [SP,#0xA0+var_20]                            ; +0x1b4, 0x100090a1c\nLDP             X24, X23, [SP,#0xA0+var_30]                            ; +0x1b8, 0x100090a20\nADD             SP, SP, #0xB0                                          ; +0x1bc, 0x100090a24\nRET                                                                    ; +0x1c0, 0x100090a28", "xrefs": ["GameLevelManager::handleIt @ 0x100089a64"], "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"}