2.0.615
This commit is contained in:
vxunderground 2022-12-29 00:44:35 -06:00
parent 361948cf15
commit bbae7ef435
3 changed files with 7 additions and 7 deletions

View File

@ -3,7 +3,7 @@ managed by [vx-underground](https://vx-underground.org) | follow us on [Twitter]
# VX-API
Version: 2.0.613
Version: 2.0.615
Developer: smelly__vx

View File

@ -8,7 +8,7 @@ DWORD AlignSection(_In_ DWORD Size, _In_ DWORD Align, _In_ DWORD Address)
return Address + (Size / Align + 1) * Align;
}
BOOL AddSectionToPeFileW(_In_ LPCWSTR Path, _In_ LPCSTR SectionName, _In_ DWORD SectionSizeInBytes)
BOOL AddSectionToPeFileW(_In_ LPCWSTR Path, _In_ LPCWSTR SectionName, _In_ DWORD SectionSizeInBytes)
{
BOOL bFlag = FALSE;
HANDLE hHandle = INVALID_HANDLE_VALUE;
@ -24,12 +24,12 @@ BOOL AddSectionToPeFileW(_In_ LPCWSTR Path, _In_ LPCSTR SectionName, _In_ DWORD
DWORD SectionCharacteristics = ERROR_SUCCESS;
WCHAR DisposeableObject[32] = { 0 };
CHAR DisposeableObject[32] = { 0 };
if (CharStringToWCharString(DisposeableObject, (PCHAR)SectionName, StringLengthA(SectionName)) == 0)
if (WCharStringToCharString(DisposeableObject, (PWCHAR)SectionName, StringLengthW(SectionName)) == 0)
goto EXIT_ROUTINE;
if(IsPeSectionW(Path, DisposeableObject))
if(IsPeSectionW(Path, SectionName))
return TRUE;
SizeOfTargetBinary = GetFileSizeFromPathW((PWCHAR)Path, FILE_ATTRIBUTE_NORMAL);
@ -54,7 +54,7 @@ BOOL AddSectionToPeFileW(_In_ LPCWSTR Path, _In_ LPCSTR SectionName, _In_ DWORD
Offset = File->NumberOfSections;
RtlZeroMemory(&Section[Offset], sizeof(IMAGE_SECTION_HEADER));
RtlCopyMemory(&Section[Offset].Name, SectionName, StringLengthA(SectionName));
RtlCopyMemory(&Section[Offset].Name, DisposeableObject, StringLengthA(DisposeableObject));
Section[Offset].Misc.VirtualSize = AlignSection(SectionSizeInBytes, Optional->SectionAlignment, 0);
Section[Offset].VirtualAddress = AlignSection(Section[Offset - 1].Misc.VirtualSize, Optional->SectionAlignment, Section[Offset - 1].VirtualAddress);

View File

@ -195,7 +195,7 @@ HMODULE GetPeFileBaseAddress(VOID);
DWORD64 LdrLoadGetProcedureAddress(VOID);
BOOL IsPeSectionW(_In_ LPCWSTR PathToBinary, _In_ LPCWSTR PeSectionName);
BOOL IsPeSectionA(_In_ LPCSTR PathToBinary, _In_ LPCSTR PeSectionName);
BOOL AddSectionToPeFileW(_In_ LPCWSTR Path, _In_ LPCSTR SectionName, _In_ DWORD SectionSizeInBytes);
BOOL AddSectionToPeFileW(_In_ LPCWSTR Path, _In_ LPCWSTR SectionName, _In_ DWORD SectionSizeInBytes);
BOOL AddSectionToPeFileA(_In_ LPCSTR Path, _In_ LPCSTR SectionName, _In_ DWORD SectionSizeInBytes);
BOOL WriteDataToPeSectionW(_In_ LPCWSTR Path, _In_ LPCWSTR SectionName, _In_ PBYTE DataToWrite, _In_ DWORD DataToWriteInBytes);
BOOL WriteDataToPeSectionA(_In_ LPCSTR Path, _In_ LPCSTR SectionName, _In_ PBYTE DataToWrite, _In_ DWORD DataToWriteInBytes);