private byte[] getIniKey() throws IOException, CartConfigurationException {
		String configFileName = System.getProperty("user.home") + "/.cart/cart.cfg";
		byte[] validKey = null;

		try (BufferedReader configReader = new BufferedReader(new FileReader(configFileName))) {
			// Look for an ini format line of rc4_key = <base64>
			// account for variable whitespace and allow for a ;-delimited comment at the
			// end
			// Note: While this should probably be arc4_key, it must be rc4_key to match
			// CaRT module.
			Pattern pattern = Pattern.compile("^\\s*rc4_key\\s*=\\s*(([^\\s]{4}){1,5})\\s*(;.*)?$",
				Pattern.CASE_INSENSITIVE);
			String line;

			while ((line = configReader.readLine()) != null) {
				Matcher matcher = pattern.matcher(line);

				if (matcher.find()) {
					try {
						byte[] potentialARC4Key = Base64.getDecoder().decode(matcher.group(1));

						// Create a copy padded up to the key size; or truncated at the key size
						validKey = Arrays.copyOf(potentialARC4Key, CartV1Constants.ARC4_KEY_LENGTH);

						break;
					}
					catch (IllegalArgumentException e) {
						throw new CartConfigurationException(
							"rc4_key in " + configFileName + " is not valid base64-encoded data.");
					}
				}
			}
		}

		return validKey;
	}
Attempt to get a decryption key from the standard CaRT configuration file
(~/.cart/cart.cfg).

@return The key from the configuration file, if found; otherwise, null.
@throws IOException                If there was a failure to read data.
@throws CartConfigurationException If the configuration data for CaRT was
                                   found, but invalid.
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/cart/CartV1File.java