MCPcopy Create free account
hub / github.com/bytecode77/r77-rootkit / LoadStringListFromRegistryKey

Function LoadStringListFromRegistryKey

r77api/clist.c:97–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95 return list;
96}
97VOID LoadStringListFromRegistryKey(PSTRING_LIST list, HKEY key, DWORD maxStringLength)
98{
99 DWORD count;
100 if (RegQueryInfoKeyW(key, NULL, NULL, NULL, NULL, NULL, NULL, &count, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
101 {
102 WCHAR valueName[100];
103 PWCHAR value = NEW_ARRAY(WCHAR, maxStringLength + 1);
104
105 for (DWORD i = 0; i < count; i++)
106 {
107 DWORD valueNameLength = 100;
108 DWORD type;
109 DWORD valueSize = maxStringLength;
110
111 if (RegEnumValueW(key, i, valueName, &valueNameLength, NULL, &type, (LPBYTE)value, &valueSize) == ERROR_SUCCESS && type == REG_SZ && !StringListContains(list, value))
112 {
113 StringListAdd(list, value);
114 }
115 }
116
117 FREE(value);
118 }
119}
120VOID DeleteStringList(PSTRING_LIST list)
121{
122 for (ULONG i = 0; i < list->Count; i++)

Callers 1

LoadR77ConfigFunction · 0.85

Calls 2

StringListContainsFunction · 0.85
StringListAddFunction · 0.85

Tested by

no test coverage detected