MCPcopy Create free account
hub / github.com/OpenSteam001/OpenSteamTool / ReadConfigStoreLocalBinary

Function ReadConfigStoreLocalBinary

src/Hook/Hooks_Decryption.cpp:38–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 }
37
38 std::vector<uint8_t> ReadConfigStoreLocalBinary(const std::string& keyName) {
39 if (!g_pConfigStoreLocal || !oConfigStoreGetBinary) {
40 LOG_DECRYPTIONKEY_WARN("GetConfigStoreLocalBinary: ConfigStoreGetBinary not ready, cannot get binary value");
41 return {};
42 }
43
44 std::vector<uint8_t> value(1024);
45 int32 result = oConfigStoreGetBinary(g_pConfigStoreLocal, k_EConfigStoreUserLocal,
46 keyName.c_str(),
47 reinterpret_cast<char*>(value.data()),
48 static_cast<uint32>(value.size()));
49 if (result <= 0) {
50 LOG_DECRYPTIONKEY_DEBUG("GetConfigStoreLocalBinary: failed to read KeyName='{}'", keyName);
51 return {};
52 }
53
54 value.resize(result);
55 LOG_DECRYPTIONKEY_DEBUG("GetConfigStoreLocalBinary: got value for KeyName='{}' ({} bytes)",
56 keyName, value.size());
57 return value;
58 }
59}
60
61namespace Hooks_Decryption {

Callers 1

Calls 2

dataMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected