{"type": "func", "start": 4295540400, "end": 4295540945, "name": "GameStatsManager::getNextGoldChestID", "pseudocode": "// \n// GameStatsManager::getNextGoldChestID from 0x10008beb0 to 0x10008c0d1 (545 bytes)\n// \n// 2 xrefs:\n// > SecretRewardsLayer::init @ 0x1006315b4\n// > SecretRewardsLayer::onGoldChest @ 0x1006324bf\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 v1; // r14d\n\n  v1 = 6001;\n  if ( GameStatsManager::isSecretChestUnlocked(a1, 6001) )\n  {\n    v1 = 6002;\n    if ( GameStatsManager::isSecretChestUnlocked(a1, 6002) )\n    {\n      v1 = 6003;\n      if ( GameStatsManager::isSecretChestUnlocked(a1, 6003) )\n      {\n        v1 = 6004;\n        if ( GameStatsManager::isSecretChestUnlocked(a1, 6004) )\n        {\n          v1 = 6005;\n          if ( GameStatsManager::isSecretChestUnlocked(a1, 6005) )\n          {\n            v1 = 6006;\n            if ( GameStatsManager::isSecretChestUnlocked(a1, 6006) )\n            {\n              v1 = 6007;\n              if ( GameStatsManager::isSecretChestUnlocked(a1, 6007) )\n              {\n                v1 = 6008;\n                if ( GameStatsManager::isSecretChestUnlocked(a1, 6008) )\n                {\n                  v1 = 6009;\n                  if ( GameStatsManager::isSecretChestUnlocked(a1, 6009) )\n                  {\n                    v1 = 6010;\n                    if ( GameStatsManager::isSecretChestUnlocked(a1, 6010) )\n                    {\n                      v1 = 6011;\n                      if ( GameStatsManager::isSecretChestUnlocked(a1, 6011) )\n                      {\n                        v1 = 6012;\n                        if ( GameStatsManager::isSecretChestUnlocked(a1, 6012) )\n                        {\n                          v1 = 6013;\n                          if ( GameStatsManager::isSecretChestUnlocked(a1, 6013) )\n                          {\n                            v1 = 6014;\n                            if ( GameStatsManager::isSecretChestUnlocked(a1, 6014) )\n                            {\n                              v1 = 6015;\n                              if ( GameStatsManager::isSecretChestUnlocked(a1, 6015) )\n                              {\n                                v1 = 6016;\n                                if ( GameStatsManager::isSecretChestUnlocked(a1, 6016) )\n                                {\n                                  v1 = 6017;\n                                  if ( GameStatsManager::isSecretChestUnlocked(a1, 6017) )\n                                  {\n                                    v1 = 6018;\n                                    if ( GameStatsManager::isSecretChestUnlocked(a1, 6018) )\n                                    {\n                                      v1 = 6019;\n                                      if ( GameStatsManager::isSecretChestUnlocked(a1, 6019) )\n                                      {\n                                        v1 = 0;\n                                        if ( !GameStatsManager::isSecretChestUnlocked(a1, 6020) )\n                                          return 6020;\n                                      }\n                                    }\n                                  }\n                                }\n                              }\n                            }\n                          }\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return v1;\n}", "assembly": "; \n; GameStatsManager::getNextGoldChestID from 0x10008beb0 to 0x10008c0d1 (545 bytes)\n; \n; 2 xrefs:\n; > SecretRewardsLayer::init @ 0x1006315b4\n; > SecretRewardsLayer::onGoldChest @ 0x1006324bf\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, 0x10008beb0\nmov     rbp, rsp                                                       ; +0x1, 0x10008beb1\npush    r15                                                            ; +0x4, 0x10008beb4\npush    r14                                                            ; +0x6, 0x10008beb6\npush    rbx                                                            ; +0x8, 0x10008beb8\npush    rax                                                            ; +0x9, 0x10008beb9\nmov     rbx, rdi                                                       ; +0xa, 0x10008beba\nmov     r14d, 1771h                                                    ; +0xd, 0x10008bebd\nmov     esi, 1771h                                                     ; +0x13, 0x10008bec3\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x18, 0x10008bec8\ntest    al, al                                                         ; +0x1d, 0x10008becd\njz      loc_10008C0C3                                                  ; +0x1f, 0x10008becf\nmov     r14d, 1772h                                                    ; +0x25, 0x10008bed5\nmov     rdi, rbx                                                       ; +0x2b, 0x10008bedb\nmov     esi, 1772h                                                     ; +0x2e, 0x10008bede\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x33, 0x10008bee3\ntest    al, al                                                         ; +0x38, 0x10008bee8\njz      loc_10008C0C3                                                  ; +0x3a, 0x10008beea\nmov     r14d, 1773h                                                    ; +0x40, 0x10008bef0\nmov     rdi, rbx                                                       ; +0x46, 0x10008bef6\nmov     esi, 1773h                                                     ; +0x49, 0x10008bef9\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x4e, 0x10008befe\ntest    al, al                                                         ; +0x53, 0x10008bf03\njz      loc_10008C0C3                                                  ; +0x55, 0x10008bf05\nmov     r14d, 1774h                                                    ; +0x5b, 0x10008bf0b\nmov     rdi, rbx                                                       ; +0x61, 0x10008bf11\nmov     esi, 1774h                                                     ; +0x64, 0x10008bf14\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x69, 0x10008bf19\ntest    al, al                                                         ; +0x6e, 0x10008bf1e\njz      loc_10008C0C3                                                  ; +0x70, 0x10008bf20\nmov     r14d, 1775h                                                    ; +0x76, 0x10008bf26\nmov     rdi, rbx                                                       ; +0x7c, 0x10008bf2c\nmov     esi, 1775h                                                     ; +0x7f, 0x10008bf2f\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x84, 0x10008bf34\ntest    al, al                                                         ; +0x89, 0x10008bf39\njz      loc_10008C0C3                                                  ; +0x8b, 0x10008bf3b\nmov     r14d, 1776h                                                    ; +0x91, 0x10008bf41\nmov     rdi, rbx                                                       ; +0x97, 0x10008bf47\nmov     esi, 1776h                                                     ; +0x9a, 0x10008bf4a\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x9f, 0x10008bf4f\ntest    al, al                                                         ; +0xa4, 0x10008bf54\njz      loc_10008C0C3                                                  ; +0xa6, 0x10008bf56\nmov     r14d, 1777h                                                    ; +0xac, 0x10008bf5c\nmov     rdi, rbx                                                       ; +0xb2, 0x10008bf62\nmov     esi, 1777h                                                     ; +0xb5, 0x10008bf65\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0xba, 0x10008bf6a\ntest    al, al                                                         ; +0xbf, 0x10008bf6f\njz      loc_10008C0C3                                                  ; +0xc1, 0x10008bf71\nmov     r14d, 1778h                                                    ; +0xc7, 0x10008bf77\nmov     rdi, rbx                                                       ; +0xcd, 0x10008bf7d\nmov     esi, 1778h                                                     ; +0xd0, 0x10008bf80\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0xd5, 0x10008bf85\ntest    al, al                                                         ; +0xda, 0x10008bf8a\njz      loc_10008C0C3                                                  ; +0xdc, 0x10008bf8c\nmov     r14d, 1779h                                                    ; +0xe2, 0x10008bf92\nmov     rdi, rbx                                                       ; +0xe8, 0x10008bf98\nmov     esi, 1779h                                                     ; +0xeb, 0x10008bf9b\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0xf0, 0x10008bfa0\ntest    al, al                                                         ; +0xf5, 0x10008bfa5\njz      loc_10008C0C3                                                  ; +0xf7, 0x10008bfa7\nmov     r14d, 177Ah                                                    ; +0xfd, 0x10008bfad\nmov     rdi, rbx                                                       ; +0x103, 0x10008bfb3\nmov     esi, 177Ah                                                     ; +0x106, 0x10008bfb6\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x10b, 0x10008bfbb\ntest    al, al                                                         ; +0x110, 0x10008bfc0\njz      loc_10008C0C3                                                  ; +0x112, 0x10008bfc2\nmov     r14d, 177Bh                                                    ; +0x118, 0x10008bfc8\nmov     rdi, rbx                                                       ; +0x11e, 0x10008bfce\nmov     esi, 177Bh                                                     ; +0x121, 0x10008bfd1\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x126, 0x10008bfd6\ntest    al, al                                                         ; +0x12b, 0x10008bfdb\njz      loc_10008C0C3                                                  ; +0x12d, 0x10008bfdd\nmov     r14d, 177Ch                                                    ; +0x133, 0x10008bfe3\nmov     rdi, rbx                                                       ; +0x139, 0x10008bfe9\nmov     esi, 177Ch                                                     ; +0x13c, 0x10008bfec\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x141, 0x10008bff1\ntest    al, al                                                         ; +0x146, 0x10008bff6\njz      loc_10008C0C3                                                  ; +0x148, 0x10008bff8\nmov     r14d, 177Dh                                                    ; +0x14e, 0x10008bffe\nmov     rdi, rbx                                                       ; +0x154, 0x10008c004\nmov     esi, 177Dh                                                     ; +0x157, 0x10008c007\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x15c, 0x10008c00c\ntest    al, al                                                         ; +0x161, 0x10008c011\njz      loc_10008C0C3                                                  ; +0x163, 0x10008c013\nmov     r14d, 177Eh                                                    ; +0x169, 0x10008c019\nmov     rdi, rbx                                                       ; +0x16f, 0x10008c01f\nmov     esi, 177Eh                                                     ; +0x172, 0x10008c022\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x177, 0x10008c027\ntest    al, al                                                         ; +0x17c, 0x10008c02c\njz      loc_10008C0C3                                                  ; +0x17e, 0x10008c02e\nmov     r14d, 177Fh                                                    ; +0x184, 0x10008c034\nmov     rdi, rbx                                                       ; +0x18a, 0x10008c03a\nmov     esi, 177Fh                                                     ; +0x18d, 0x10008c03d\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x192, 0x10008c042\ntest    al, al                                                         ; +0x197, 0x10008c047\njz      short loc_10008C0C3                                            ; +0x199, 0x10008c049\nmov     r14d, 1780h                                                    ; +0x19b, 0x10008c04b\nmov     rdi, rbx                                                       ; +0x1a1, 0x10008c051\nmov     esi, 1780h                                                     ; +0x1a4, 0x10008c054\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x1a9, 0x10008c059\ntest    al, al                                                         ; +0x1ae, 0x10008c05e\njz      short loc_10008C0C3                                            ; +0x1b0, 0x10008c060\nmov     r14d, 1781h                                                    ; +0x1b2, 0x10008c062\nmov     rdi, rbx                                                       ; +0x1b8, 0x10008c068\nmov     esi, 1781h                                                     ; +0x1bb, 0x10008c06b\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x1c0, 0x10008c070\ntest    al, al                                                         ; +0x1c5, 0x10008c075\njz      short loc_10008C0C3                                            ; +0x1c7, 0x10008c077\nmov     r14d, 1782h                                                    ; +0x1c9, 0x10008c079\nmov     rdi, rbx                                                       ; +0x1cf, 0x10008c07f\nmov     esi, 1782h                                                     ; +0x1d2, 0x10008c082\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x1d7, 0x10008c087\ntest    al, al                                                         ; +0x1dc, 0x10008c08c\njz      short loc_10008C0C3                                            ; +0x1de, 0x10008c08e\nmov     r14d, 1783h                                                    ; +0x1e0, 0x10008c090\nmov     rdi, rbx                                                       ; +0x1e6, 0x10008c096\nmov     esi, 1783h                                                     ; +0x1e9, 0x10008c099\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x1ee, 0x10008c09e\ntest    al, al                                                         ; +0x1f3, 0x10008c0a3\njz      short loc_10008C0C3                                            ; +0x1f5, 0x10008c0a5\nmov     r15d, 1784h                                                    ; +0x1f7, 0x10008c0a7\nmov     rdi, rbx                                                       ; +0x1fd, 0x10008c0ad\nmov     esi, 1784h                                                     ; +0x200, 0x10008c0b0\ncall    GameStatsManager__isSecretChestUnlocked                        ; +0x205, 0x10008c0b5\nxor     r14d, r14d                                                     ; +0x20a, 0x10008c0ba\ntest    al, al                                                         ; +0x20d, 0x10008c0bd\ncmovz   r14d, r15d                                                     ; +0x20f, 0x10008c0bf\nmov     eax, r14d                                                      ; +0x213, 0x10008c0c3\nadd     rsp, 8                                                         ; +0x216, 0x10008c0c6\npop     rbx                                                            ; +0x21a, 0x10008c0ca\npop     r14                                                            ; +0x21b, 0x10008c0cb\npop     r15                                                            ; +0x21d, 0x10008c0cd\npop     rbp                                                            ; +0x21f, 0x10008c0cf\nretn                                                                   ; +0x220, 0x10008c0d0", "xrefs": ["SecretRewardsLayer::init @ 0x1006315b4", "SecretRewardsLayer::onGoldChest @ 0x1006324bf"], "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"}