{"type": "func", "start": 7574220, "end": 7574568, "name": "GJGameLevel::saveNewScore", "pseudocode": "// \n// GJGameLevel::saveNewScore from 0x7392cc to 0x739428 (348 bytes)\n// \n// 6 xrefs:\n// > PlayLayer::levelComplete @ 0x5d13cc\n// > PlayLayer::levelComplete @ 0x5d1430\n// > PlayLayer::levelComplete @ 0x5d153c\n// > GJGameLevel::handleStatsConflict @ 0x739608\n// > GJGameLevel::handleStatsConflict @ 0x73967c\n// > <???> @ 0xc6ae0\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 GJGameLevel::saveNewScore(\n        GJGameLevel *this,\n        int a2,\n        int a3,\n        int a4,\n        int a5,\n        int a6,\n        __int64 a7,\n        unsigned __int8 a8)\n{\n  int v15; // w1\n  unsigned int v16; // w22\n  int m_bestPoints; // w1\n  int m_clicksTime; // w2\n  int m_ticksTime; // w3\n  int m_coinsTime; // w4\n  int m_bestTime; // w0\n  int v23; // w1\n  int m_clicksPoints; // w5\n  int m_ticksPoints; // w6\n  int m_coinsPoints; // w7\n\n  if ( a3 )\n  {\n    v16 = 0;\n    if ( a2 )\n    {\n      m_bestPoints = this->m_bestPoints;\n      if ( a8 | (m_bestPoints == 0) || a2 > m_bestPoints )\n      {\n        m_clicksTime = this->m_clicksTime;\n        m_ticksTime = this->m_ticksTime;\n        m_coinsTime = this->m_coinsTime;\n        m_bestTime = this->m_bestTime;\n        this->m_ticksPoints = a4;\n        v16 = 1;\n        this->m_clicksPoints = a5;\n        this->m_coinsPoints = a6;\n        this->m_bestPoints = a2;\n        this->m_platformerSeed = generateBestHash(m_bestTime, a2, m_clicksTime, m_ticksTime, m_coinsTime, a5, a4, a6);\n        sub_D18EA8(&this->m_inputsPoints, a7);\n        this->m_savedPoints = 1;\n      }\n    }\n  }\n  else if ( a2 <= 0 )\n  {\n    v16 = 0;\n  }\n  else\n  {\n    v15 = this->m_bestTime;\n    if ( a8 | (v15 == 0) || (v16 = 0, a2 < v15) )\n    {\n      v23 = this->m_bestPoints;\n      m_clicksPoints = this->m_clicksPoints;\n      m_ticksPoints = this->m_ticksPoints;\n      m_coinsPoints = this->m_coinsPoints;\n      this->m_ticksTime = a4;\n      v16 = 1;\n      this->m_clicksTime = a5;\n      this->m_coinsTime = a6;\n      this->m_bestTime = a2;\n      this->m_platformerSeed = generateBestHash(a2, v23, a5, a4, a6, m_clicksPoints, m_ticksPoints, m_coinsPoints);\n      sub_D18EA8(&this->m_inputsTime, a7);\n      this->m_savedTime = 1;\n    }\n  }\n  GJGameLevel::storeNewLocalScore(this, a2, a3);\n  return v16;\n}", "assembly": "; \n; GJGameLevel::saveNewScore from 0x7392cc to 0x739428 (348 bytes)\n; \n; 6 xrefs:\n; > PlayLayer::levelComplete @ 0x5d13cc\n; > PlayLayer::levelComplete @ 0x5d1430\n; > PlayLayer::levelComplete @ 0x5d153c\n; > GJGameLevel::handleStatsConflict @ 0x739608\n; > GJGameLevel::handleStatsConflict @ 0x73967c\n; > <???> @ 0xc6ae0\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\nSTP             X29, X30, [SP,#var_40]!                                ; +0x0, 0x7392cc\nMOV             W10, W3                                                ; +0x4, 0x7392d0\nMOV             W9, W4                                                 ; +0x8, 0x7392d4\nMOV             X29, SP                                                ; +0xc, 0x7392d8\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0x10, 0x7392dc\nSTP             X21, X22, [SP,#0x40+var_20]                            ; +0x14, 0x7392e0\nSTR             X23, [SP,#0x40+var_10]                                 ; +0x18, 0x7392e4\nMOV             W21, W2                                                ; +0x1c, 0x7392e8\nMOV             X19, X0                                                ; +0x20, 0x7392ec\nMOV             W20, W1                                                ; +0x24, 0x7392f0\nMOV             W8, W5                                                 ; +0x28, 0x7392f4\nMOV             X23, X6                                                ; +0x2c, 0x7392f8\nUXTB            W7, W7                                                 ; +0x30, 0x7392fc\nCBNZ            W2, loc_739354                                         ; +0x34, 0x739300\nCMP             W1, WZR                                                ; +0x38, 0x739304\nB.LE            loc_739420                                             ; +0x3c, 0x739308\nLDR             W1, [X0,#0x3AC]                                        ; +0x40, 0x73930c\nCMP             W1, WZR                                                ; +0x44, 0x739310\nCSET            W0, EQ                                                 ; +0x48, 0x739314\nORR             W7, W7, W0                                             ; +0x4c, 0x739318\nCBNZ            W7, loc_7393CC                                         ; +0x50, 0x73931c\nCMP             W20, W1                                                ; +0x54, 0x739320\nMOV             W22, #0                                                ; +0x58, 0x739324\nB.LT            loc_7393CC                                             ; +0x5c, 0x739328\nMOV             X0, X19; this                                          ; +0x60, 0x73932c\nMOV             W1, W20; int                                           ; +0x64, 0x739330\nMOV             W2, W21; int                                           ; +0x68, 0x739334\nBL              _ZN11GJGameLevel18storeNewLocalScoreEii; GJGameLevel::storeNewLocalScore(int,int) ; +0x6c, 0x739338\nLDR             X23, [SP,#0x40+var_10]                                 ; +0x70, 0x73933c\nMOV             W0, W22                                                ; +0x74, 0x739340\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x78, 0x739344\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0x7c, 0x739348\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x80, 0x73934c\nRET                                                                    ; +0x84, 0x739350\nMOV             W22, #0                                                ; +0x88, 0x739354\nCBZ             W1, loc_73932C                                         ; +0x8c, 0x739358\nLDR             W1, [X0,#0x3C8]                                        ; +0x90, 0x73935c\nCMP             W1, WZR                                                ; +0x94, 0x739360\nCSET            W0, EQ                                                 ; +0x98, 0x739364\nORR             W7, W7, W0                                             ; +0x9c, 0x739368\nCBNZ            W7, loc_739378                                         ; +0xa0, 0x73936c\nCMP             W20, W1                                                ; +0xa4, 0x739370\nB.LE            loc_73932C                                             ; +0xa8, 0x739374\nLDR             W2, [X19,#0x3B4]; int                                  ; +0xac, 0x739378\nMOV             W1, W20; int                                           ; +0xb0, 0x73937c\nLDR             W3, [X19,#0x3B0]; int                                  ; +0xb4, 0x739380\nMOV             W5, W9; int                                            ; +0xb8, 0x739384\nLDR             W4, [X19,#0x3B8]; int                                  ; +0xbc, 0x739388\nMOV             W6, W10; int                                           ; +0xc0, 0x73938c\nLDR             W0, [X19,#0x3AC]; int                                  ; +0xc4, 0x739390\nMOV             W7, W8; int                                            ; +0xc8, 0x739394\nSTR             W10, [X19,#0x3CC]                                      ; +0xcc, 0x739398\nMOV             W22, #1                                                ; +0xd0, 0x73939c\nSTR             W9, [X19,#0x3D0]                                       ; +0xd4, 0x7393a0\nSTR             W8, [X19,#0x3D4]                                       ; +0xd8, 0x7393a4\nSTR             W20, [X19,#0x3C8]                                      ; +0xdc, 0x7393a8\nBL              _Z16generateBestHashiiiiiiii; generateBestHash(int,int,int,int,int,int,int,int) ; +0xe0, 0x7393ac\nSTR             W0, [X19,#0x3E0]                                       ; +0xe4, 0x7393b0\nMOV             X1, X23                                                ; +0xe8, 0x7393b4\nADD             X0, X19, #0x3D8                                        ; +0xec, 0x7393b8\nBL              sub_D18EA8                                             ; +0xf0, 0x7393bc\nMOV             W0, #1                                                 ; +0xf4, 0x7393c0\nSTRB            W0, [X19,#0x3F9]                                       ; +0xf8, 0x7393c4\nB               loc_73932C                                             ; +0xfc, 0x7393c8\nLDR             W1, [X19,#0x3C8]; int                                  ; +0x100, 0x7393cc\nMOV             W2, W9; int                                            ; +0x104, 0x7393d0\nLDR             W5, [X19,#0x3D0]; int                                  ; +0x108, 0x7393d4\nMOV             W3, W10; int                                           ; +0x10c, 0x7393d8\nLDR             W6, [X19,#0x3CC]; int                                  ; +0x110, 0x7393dc\nMOV             W4, W8; int                                            ; +0x114, 0x7393e0\nLDR             W7, [X19,#0x3D4]; int                                  ; +0x118, 0x7393e4\nMOV             W0, W20; int                                           ; +0x11c, 0x7393e8\nSTR             W10, [X19,#0x3B0]                                      ; +0x120, 0x7393ec\nMOV             W22, #1                                                ; +0x124, 0x7393f0\nSTR             W9, [X19,#0x3B4]                                       ; +0x128, 0x7393f4\nSTR             W8, [X19,#0x3B8]                                       ; +0x12c, 0x7393f8\nSTR             W20, [X19,#0x3AC]                                      ; +0x130, 0x7393fc\nBL              _Z16generateBestHashiiiiiiii; generateBestHash(int,int,int,int,int,int,int,int) ; +0x134, 0x739400\nSTR             W0, [X19,#0x3E0]                                       ; +0x138, 0x739404\nMOV             X1, X23                                                ; +0x13c, 0x739408\nADD             X0, X19, #0x3C0                                        ; +0x140, 0x73940c\nBL              sub_D18EA8                                             ; +0x144, 0x739410\nMOV             W0, #1                                                 ; +0x148, 0x739414\nSTRB            W0, [X19,#0x3F8]                                       ; +0x14c, 0x739418\nB               loc_73932C                                             ; +0x150, 0x73941c\nMOV             W22, #0                                                ; +0x154, 0x739420\nB               loc_73932C                                             ; +0x158, 0x739424", "xrefs": ["PlayLayer::levelComplete @ 0x5d13cc", "PlayLayer::levelComplete @ 0x5d1430", "PlayLayer::levelComplete @ 0x5d153c", "GJGameLevel::handleStatsConflict @ 0x739608", "GJGameLevel::handleStatsConflict @ 0x73967c", "<???> @ 0xc6ae0"], "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"}