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

Method ansi_to_wide

src/shellcode.cpp:116–129  ·  view source on GitHub ↗

Convert ansi to wide chars.

Source from the content-addressed store, hash-verified

114
115// Convert ansi to wide chars.
116VOID shellcode::ansi_to_wide(PCHAR str, PWCHAR out, size_t size)
117{
118 // Test if the buffer is zero-length.
119 size /= sizeof(WCHAR);
120 if (!size) return;
121
122 // Copy the chars.
123 while (--size && *str) {
124 *out++ = (WCHAR)*str++;
125 };
126
127 // Append NULL.
128 *out = 0;
129};
130
131// Copy string between to buffers.
132VOID shellcode::wstr_cpy(PWSTR str1, PCWSTR str2, size_t length)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected