Compare two wide strings.
| 139 | |
| 140 | // Compare two wide strings. |
| 141 | INT 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. |
| 163 | HANDLE shellcode::get_dll_handle(HANDLE pe_base, PDWORD sh_funs, PWSTR dll_name) |
nothing calls this directly
no outgoing calls
no test coverage detected