#include "classes.h" // 00946cd0 uint8_t Menu_Character_Entry::IsCharacterAvailable(int unused) { uint8_t isUnlocked; void *playerConfig; int playerType; Manager *manager; manager = g_manager; playerType = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[1])) + 0x1)))); if ((playerType < 0) || ((GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT((g_manager->_entityConfig)._players._begin)) / 0x148 <= playerType)) { playerConfig = (void *)0x0; } else { playerConfig = (void *)(playerType * 0x148 + GHIDRA_INT((g_manager->_entityConfig)._players._begin)); } if (-1 < *GHIDRA_CAST((GHIDRA_CAST(playerConfig) + 0xe8))) { isUnlocked = PersistentGameData::Unlocked (&g_manager->_persistentGameData,*GHIDRA_CAST((GHIDRA_CAST(playerConfig) + 0xe8))); if ((isUnlocked == 0) || (((playerType == 9 || (playerType == 0x1e)) && ((manager->_persistentGameData)._eventCounters[0x15] == 0)))) { return 0; } } return 1; }