MCPcopy Create free account
hub / github.com/d35ha/CallObfuscator / wstr_i_cmp

Method wstr_i_cmp

src/shellcode.cpp:141–160  ·  view source on GitHub ↗

Compare two wide strings.

Source from the content-addressed store, hash-verified

139
140// Compare two wide strings.
141INT shellcode::wstr_i_cmp(PWSTR str1, PCWSTR str2, size_t length)
142{
143 // Init.
144 WCHAR c1, c2;
145 do
146 {
147 // Make the check.
148 c1 = *str1++;
149 c2 = *str2++;
150 if (c1 == L'\0') {
151 return c2 - c1;
152 };
153
154 // Move to the next iteration.
155 } while (((c1 == c2) || (c1 - c2 == 32) ||
156 (c2 - c1 == 32)) && --length);
157
158 // Final compare.
159 return c2 - c1;
160};
161
162// Get the dll base by name.
163HANDLE shellcode::get_dll_handle(HANDLE pe_base, PDWORD sh_funs, PWSTR dll_name)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected