{"type": "func", "start": 4298325596, "end": 4298325708, "name": "GJChallengeItem::incrementCount", "pseudocode": "// \n// GJChallengeItem::incrementCount from 0x100333e5c to 0x100333ecc (112 bytes)\n// \n// 1 xrefs:\n// > GameStatsManager::incrementChallenge @ 0x10032fa04\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 __fastcall GJChallengeItem::incrementCount(GJChallengeItem *a1, int a2)\n{\n  int v3; // w20\n  int v4; // w8\n  int v5; // w8\n\n  if ( !a1->m_canClaim )\n  {\n    v3 = a1->m_count.random - a1->m_count.seed + a2;\n    v4 = a1->m_goal.random - a1->m_goal.seed;\n    if ( v3 >= v4 )\n    {\n      a1->m_canClaim = 1;\n      v3 = v4;\n    }\n    a1->m_count.value = v3;\n    v5 = (int)(float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0);\n    a1->m_count.random = v3 + v5;\n    a1->m_count.seed = v5;\n  }\n}", "assembly": "; \n; GJChallengeItem::incrementCount from 0x100333e5c to 0x100333ecc (112 bytes)\n; \n; 1 xrefs:\n; > GameStatsManager::incrementChallenge @ 0x10032fa04\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\nLDRB            W8, [X0,#0x64]                                         ; +0x0, 0x100333e5c\nTBNZ            W8, #0, locret_100333EC8                               ; +0x4, 0x100333e60\nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x8, 0x100333e64\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0xc, 0x100333e68\nADD             X29, SP, #0x10                                         ; +0x10, 0x100333e6c\nMOV             X19, X0                                                ; +0x14, 0x100333e70\nLDP             W8, W9, [X0,#0x3C]                                     ; +0x18, 0x100333e74\nSUB             W8, W8, W9                                             ; +0x1c, 0x100333e78\nADD             W20, W8, W1                                            ; +0x20, 0x100333e7c\nLDP             W8, W9, [X0,#0x54]                                     ; +0x24, 0x100333e80\nSUB             W8, W8, W9                                             ; +0x28, 0x100333e84\nCMP             W20, W8                                                ; +0x2c, 0x100333e88\nB.LT            loc_100333E9C                                          ; +0x30, 0x100333e8c\nMOV             W9, #1                                                 ; +0x34, 0x100333e90\nSTRB            W9, [X19,#0x64]                                        ; +0x38, 0x100333e94\nMOV             X20, X8                                                ; +0x3c, 0x100333e98\nSTR             W20, [X19,#0x44]                                       ; +0x40, 0x100333e9c\nBL              _rand                                                  ; +0x44, 0x100333ea0\nSCVTF           S0, W0, #0x1F                                          ; +0x48, 0x100333ea4\nMOV             W8, #0x447A0000                                        ; +0x4c, 0x100333ea8\nFMOV            S1, W8                                                 ; +0x50, 0x100333eac\nFMUL            S0, S0, S1                                             ; +0x54, 0x100333eb0\nFCVTZS          W8, S0                                                 ; +0x58, 0x100333eb4\nADD             W9, W20, W8                                            ; +0x5c, 0x100333eb8\nSTP             W9, W8, [X19,#0x3C]                                    ; +0x60, 0x100333ebc\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x64, 0x100333ec0\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x68, 0x100333ec4\nRET                                                                    ; +0x6c, 0x100333ec8", "xrefs": ["GameStatsManager::incrementChallenge @ 0x10032fa04"], "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"}