{"type": "func", "start": 4298333512, "end": 4298333596, "name": "GameStatsManager::keyCostForSecretChest", "pseudocode": "// \n// GameStatsManager::keyCostForSecretChest from 0x100335d48 to 0x100335d9c (84 bytes)\n// \n// 1 xrefs:\n// > SecretRewardsLayer::onSelectItem @ 0x1002eb4a4\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\nint __fastcall GameStatsManager::keyCostForSecretChest(GameStatsManager *a1, int a2)\n{\n  int v2; // w15\n  int v3; // w14\n  int v4; // w13\n  int v5; // w12\n  int v6; // w10\n\n  if ( a2 <= 1000 )\n    v2 = 1;\n  else\n    v2 = 5;\n  if ( a2 <= 2000 )\n    v3 = v2;\n  else\n    v3 = 10;\n  if ( a2 <= 3000 )\n    v4 = v3;\n  else\n    v4 = 25;\n  if ( a2 <= 4000 )\n    v5 = v4;\n  else\n    v5 = 50;\n  if ( a2 <= 5000 )\n    v6 = v5;\n  else\n    v6 = 100;\n  if ( a2 <= 6000 )\n    return v6;\n  else\n    return 1;\n}", "assembly": "; \n; GameStatsManager::keyCostForSecretChest from 0x100335d48 to 0x100335d9c (84 bytes)\n; \n; 1 xrefs:\n; > SecretRewardsLayer::onSelectItem @ 0x1002eb4a4\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             W8, #1                                                 ; +0x0, 0x100335d48\nMOV             W9, #0x1770                                            ; +0x4, 0x100335d4c\nMOV             W10, #0x64 ; 'd'                                       ; +0x8, 0x100335d50\nMOV             W11, #0x1388                                           ; +0xc, 0x100335d54\nMOV             W12, #0x32 ; '2'                                       ; +0x10, 0x100335d58\nMOV             W13, #0x19                                             ; +0x14, 0x100335d5c\nMOV             W14, #0xA                                              ; +0x18, 0x100335d60\nCMP             W1, #0x3E8                                             ; +0x1c, 0x100335d64\nMOV             W15, #5                                                ; +0x20, 0x100335d68\nCSINC           W15, W15, WZR, GT                                      ; +0x24, 0x100335d6c\nCMP             W1, #0x7D0                                             ; +0x28, 0x100335d70\nCSEL            W14, W14, W15, GT                                      ; +0x2c, 0x100335d74\nCMP             W1, #0xBB8                                             ; +0x30, 0x100335d78\nCSEL            W13, W13, W14, GT                                      ; +0x34, 0x100335d7c\nCMP             W1, #0xFA0                                             ; +0x38, 0x100335d80\nCSEL            W12, W12, W13, GT                                      ; +0x3c, 0x100335d84\nCMP             W1, W11                                                ; +0x40, 0x100335d88\nCSEL            W10, W10, W12, GT                                      ; +0x44, 0x100335d8c\nCMP             W1, W9                                                 ; +0x48, 0x100335d90\nCSEL            W0, W8, W10, GT                                        ; +0x4c, 0x100335d94\nRET                                                                    ; +0x50, 0x100335d98", "xrefs": ["SecretRewardsLayer::onSelectItem @ 0x1002eb4a4"], "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"}