{"type": "func", "start": 4298366892, "end": 4298366972, "name": "GameStatsManager::getNextGoldChestID", "pseudocode": "// \n// GameStatsManager::getNextGoldChestID from 0x10033dfac to 0x10033dffc (80 bytes)\n// \n// 2 xrefs:\n// > SecretRewardsLayer::init @ 0x1002e9110\n// > SecretRewardsLayer::onGoldChest @ 0x1002e9d28\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::getNextGoldChestID(GameStatsManager *a1)\n{\n  int v2; // w21\n  int i; // w19\n\n  v2 = 20;\n  for ( i = 6001; GameStatsManager::isSecretChestUnlocked(a1, i); ++i )\n  {\n    if ( !--v2 )\n      return 0;\n  }\n  return i;\n}", "assembly": "; \n; GameStatsManager::getNextGoldChestID from 0x10033dfac to 0x10033dffc (80 bytes)\n; \n; 2 xrefs:\n; > SecretRewardsLayer::init @ 0x1002e9110\n; > SecretRewardsLayer::onGoldChest @ 0x1002e9d28\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             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x10033dfac\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x10033dfb0\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x10033dfb4\nADD             X29, SP, #0x20                                         ; +0xc, 0x10033dfb8\nMOV             X20, X0                                                ; +0x10, 0x10033dfbc\nMOV             W21, #0x14                                             ; +0x14, 0x10033dfc0\nMOV             W19, #0x1771                                           ; +0x18, 0x10033dfc4\nMOV             X0, X20                                                ; +0x1c, 0x10033dfc8\nMOV             X1, X19                                                ; +0x20, 0x10033dfcc\nBL              GameStatsManager__isSecretChestUnlocked                ; +0x24, 0x10033dfd0\nTBZ             W0, #0, loc_10033DFE8                                  ; +0x28, 0x10033dfd4\nADD             W19, W19, #1                                           ; +0x2c, 0x10033dfd8\nSUBS            W21, W21, #1                                           ; +0x30, 0x10033dfdc\nB.NE            loc_10033DFC8                                          ; +0x34, 0x10033dfe0\nMOV             W19, #0                                                ; +0x38, 0x10033dfe4\nMOV             X0, X19                                                ; +0x3c, 0x10033dfe8\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x40, 0x10033dfec\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x44, 0x10033dff0\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x48, 0x10033dff4\nRET                                                                    ; +0x4c, 0x10033dff8", "xrefs": ["SecretRewardsLayer::init @ 0x1002e9110", "SecretRewardsLayer::onGoldChest @ 0x1002e9d28"], "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"}