{"type": "func", "start": 4298981988, "end": 4298982072, "name": "GameStatsManager::keyCostForSecretChest", "pseudocode": "// \n// GameStatsManager::keyCostForSecretChest from 0x1003d4264 to 0x1003d42b8 (84 bytes)\n// \n// 1 xrefs:\n// > SecretRewardsLayer::onSelectItem @ 0x10038662c\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:04:12 +0000\n// \n\n__int64 __fastcall GameStatsManager::keyCostForSecretChest(__int64 a1, int a2)\n{\n  int v2; // w15\n  int v3; // w14\n  int v4; // w13\n  int v5; // w12\n  unsigned 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 0x1003d4264 to 0x1003d42b8 (84 bytes)\n; \n; 1 xrefs:\n; > SecretRewardsLayer::onSelectItem @ 0x10038662c\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:04:12 +0000\n; \nMOV             W8, #1                                                 ; +0x0, 0x1003d4264\nMOV             W9, #0x1770                                            ; +0x4, 0x1003d4268\nMOV             W10, #0x64 ; 'd'                                       ; +0x8, 0x1003d426c\nMOV             W11, #0x1388                                           ; +0xc, 0x1003d4270\nMOV             W12, #0x32 ; '2'                                       ; +0x10, 0x1003d4274\nMOV             W13, #0x19                                             ; +0x14, 0x1003d4278\nMOV             W14, #0xA                                              ; +0x18, 0x1003d427c\nCMP             W1, #0x3E8                                             ; +0x1c, 0x1003d4280\nMOV             W15, #5                                                ; +0x20, 0x1003d4284\nCSINC           W15, W15, WZR, GT                                      ; +0x24, 0x1003d4288\nCMP             W1, #0x7D0                                             ; +0x28, 0x1003d428c\nCSEL            W14, W14, W15, GT                                      ; +0x2c, 0x1003d4290\nCMP             W1, #0xBB8                                             ; +0x30, 0x1003d4294\nCSEL            W13, W13, W14, GT                                      ; +0x34, 0x1003d4298\nCMP             W1, #0xFA0                                             ; +0x38, 0x1003d429c\nCSEL            W12, W12, W13, GT                                      ; +0x3c, 0x1003d42a0\nCMP             W1, W11                                                ; +0x40, 0x1003d42a4\nCSEL            W10, W10, W12, GT                                      ; +0x44, 0x1003d42a8\nCMP             W1, W9                                                 ; +0x48, 0x1003d42ac\nCSEL            W0, W8, W10, GT                                        ; +0x4c, 0x1003d42b0\nRET                                                                    ; +0x50, 0x1003d42b4", "xrefs": ["SecretRewardsLayer::onSelectItem @ 0x10038662c"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}