{"type": "func", "start": 4295454512, "end": 4295454601, "name": "GameStatsManager::keyCostForSecretChest", "pseudocode": "// \n// GameStatsManager::keyCostForSecretChest from 0x100076f30 to 0x100076f89 (89 bytes)\n// \n// 1 xrefs:\n// > SecretRewardsLayer::onSelectItem @ 0x10063487d\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 result; // eax\n\n  result = 1;\n  if ( a2 <= 6000 )\n  {\n    result = 100;\n    if ( a2 <= 5000 )\n    {\n      result = 50;\n      if ( a2 <= 4000 )\n      {\n        result = 25;\n        if ( a2 <= 3000 )\n        {\n          result = 10;\n          if ( a2 <= 2000 )\n            return 4 * (a2 >= 1001) + 1;\n        }\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; GameStatsManager::keyCostForSecretChest from 0x100076f30 to 0x100076f89 (89 bytes)\n; \n; 1 xrefs:\n; > SecretRewardsLayer::onSelectItem @ 0x10063487d\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\npush    rbp                                                            ; +0x0, 0x100076f30\nmov     rbp, rsp                                                       ; +0x1, 0x100076f31\nmov     eax, 1                                                         ; +0x4, 0x100076f34\ncmp     esi, 1770h                                                     ; +0x9, 0x100076f39\njg      short loc_100076F87                                            ; +0xf, 0x100076f3f\nmov     eax, 64h ; 'd'                                                 ; +0x11, 0x100076f41\ncmp     esi, 1388h                                                     ; +0x16, 0x100076f46\njg      short loc_100076F87                                            ; +0x1c, 0x100076f4c\nmov     eax, 32h ; '2'                                                 ; +0x1e, 0x100076f4e\ncmp     esi, 0FA0h                                                     ; +0x23, 0x100076f53\njg      short loc_100076F87                                            ; +0x29, 0x100076f59\nmov     eax, 19h                                                       ; +0x2b, 0x100076f5b\ncmp     esi, 0BB8h                                                     ; +0x30, 0x100076f60\njg      short loc_100076F87                                            ; +0x36, 0x100076f66\nmov     eax, 0Ah                                                       ; +0x38, 0x100076f68\ncmp     esi, 7D0h                                                      ; +0x3d, 0x100076f6d\njg      short loc_100076F87                                            ; +0x43, 0x100076f73\nxor     eax, eax                                                       ; +0x45, 0x100076f75\ncmp     esi, 3E9h                                                      ; +0x47, 0x100076f77\nsetnl   al                                                             ; +0x4d, 0x100076f7d\nlea     eax, ds:1[rax*4]                                               ; +0x50, 0x100076f80\npop     rbp                                                            ; +0x57, 0x100076f87\nretn                                                                   ; +0x58, 0x100076f88", "xrefs": ["SecretRewardsLayer::onSelectItem @ 0x10063487d"], "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"}