mirror of https://github.com/vxunderground/VX-API
new function + more annotations
This commit is contained in:
parent
b94b2dbde5
commit
802532c49a
|
@ -55,6 +55,7 @@ You're free to use this in any manner you please. You do not need to use this en
|
|||
| HashFileByMsiFileHashTable | smelly__vx | Cryptography Related |
|
||||
| GetLastErrorFromTeb | smelly__vx | Error Handling |
|
||||
| GetLastNtStatusFromTeb | smelly__vx | Error Handling |
|
||||
| RtlNtStatusToDosErrorViaImport | ReactOS | Error Handling |
|
||||
| GetLastErrorFromTeb | smelly__vx | Error Handling |
|
||||
| SetLastErrorInTeb | smelly__vx | Error Handling |
|
||||
| SetLastNtStatusInTeb | smelly__vx | Error Handling |
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
VOID ByteArrayToCharArrayA(PCHAR Destination, PBYTE Source, DWORD Length)
|
||||
VOID ByteArrayToCharArrayA(_Inout_ PCHAR Destination, _In_ PBYTE Source, _In_ DWORD Length)
|
||||
{
|
||||
for (DWORD dwX = 0; dwX < Length; dwX++)
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ VOID ByteArrayToCharArrayA(PCHAR Destination, PBYTE Source, DWORD Length)
|
|||
}
|
||||
}
|
||||
|
||||
VOID ByteArrayToCharArrayW(PWCHAR Destination, PBYTE Source, DWORD Length)
|
||||
VOID ByteArrayToCharArrayW(_Inout_ PWCHAR Destination, _In_ PBYTE Source, _In_ DWORD Length)
|
||||
{
|
||||
for (DWORD dwX = 0; dwX < Length; dwX++)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
PCHAR CaplockStringA(PCHAR Ptr)
|
||||
PCHAR CaplockStringA(_In_ PCHAR Ptr)
|
||||
{
|
||||
PCHAR sv = Ptr;
|
||||
while (*sv != '\0')
|
||||
|
@ -13,7 +13,7 @@ PCHAR CaplockStringA(PCHAR Ptr)
|
|||
return Ptr;
|
||||
}
|
||||
|
||||
PWCHAR CaplockStringW(PWCHAR Ptr)
|
||||
PWCHAR CaplockStringW(_In_ PWCHAR Ptr)
|
||||
{
|
||||
PWCHAR sv = Ptr;
|
||||
while (*sv != '\0')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
VOID CharArrayToByteArrayA(PCHAR Char, PBYTE Byte, DWORD Length)
|
||||
VOID CharArrayToByteArrayA(_In_ PCHAR Char, _Inout_ PBYTE Byte, _In_ DWORD Length)
|
||||
{
|
||||
for (DWORD dwX = 0; dwX < Length; dwX++)
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ VOID CharArrayToByteArrayA(PCHAR Char, PBYTE Byte, DWORD Length)
|
|||
}
|
||||
}
|
||||
|
||||
VOID CharArrayToByteArrayW(PWCHAR Char, PBYTE Byte, DWORD Length)
|
||||
VOID CharArrayToByteArrayW(_In_ PWCHAR Char, _Inout_ PBYTE Byte, _In_ DWORD Length)
|
||||
{
|
||||
for (DWORD dwX = 0; dwX < Length; dwX++)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
SIZE_T CharStringToWCharString(PWCHAR Destination, PCHAR Source, SIZE_T MaximumAllowed)
|
||||
SIZE_T CharStringToWCharString(_Inout_ PWCHAR Destination, _In_ PCHAR Source, SIZE_T _In_ MaximumAllowed)
|
||||
{
|
||||
INT Length = (INT)MaximumAllowed;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
PVOID CopyMemoryEx(PVOID Destination, CONST PVOID Source, SIZE_T Length)
|
||||
PVOID CopyMemoryEx(_Inout_ PVOID Destination, _In_ CONST PVOID Source, _In_ SIZE_T Length)
|
||||
{
|
||||
PBYTE D = (PBYTE)Destination;
|
||||
PBYTE S = (PBYTE)Source;
|
||||
|
|
|
@ -14,12 +14,13 @@ TODO:
|
|||
- Profit!!!!11
|
||||
|
||||
KNOWN ISSUES
|
||||
- Implement RtlNtStatusToDosError
|
||||
- Work on In / Out / Inout in function calls
|
||||
- Various logic improvements
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
int main(VOID)
|
||||
{
|
||||
DWORD dwError = ERROR_SUCCESS;
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#include "Win32Helper.h"
|
||||
|
||||
DWORD RtlNtStatusToDosErrorViaImport(_In_ NTSTATUS Status)
|
||||
{
|
||||
typedef ULONG(NTAPI* RTLNTSTATUSTODOSERROR)(NTSTATUS);
|
||||
RTLNTSTATUSTODOSERROR RtlNtStatusToDosError;
|
||||
HMODULE hModule = NULL;
|
||||
DWORD dwError = ERROR_SUCCESS;
|
||||
|
||||
hModule = GetModuleHandleEx2W(L"ntdll.dll");
|
||||
if (hModule == NULL)
|
||||
return -1;
|
||||
|
||||
RtlNtStatusToDosError = (RTLNTSTATUSTODOSERROR)GetProcAddressA((DWORD64)hModule, "RtlNtStatusToDosError");
|
||||
if (!RtlNtStatusToDosError)
|
||||
return -1;
|
||||
|
||||
dwError = RtlNtStatusToDosError(Status);
|
||||
|
||||
RtlNtStatusToDosError = NULL;
|
||||
|
||||
return dwError;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
PCHAR SecureStringCopyA(PCHAR String1, LPCSTR String2, SIZE_T Size)
|
||||
PCHAR SecureStringCopyA(_Inout_ PCHAR String1, _In_ LPCSTR String2, _In_ SIZE_T Size)
|
||||
{
|
||||
PCHAR pChar = String1;
|
||||
|
||||
|
@ -9,7 +9,7 @@ PCHAR SecureStringCopyA(PCHAR String1, LPCSTR String2, SIZE_T Size)
|
|||
return pChar;
|
||||
}
|
||||
|
||||
PWCHAR SecureStringCopyW(PWCHAR String1, LPCWSTR String2, SIZE_T Size)
|
||||
PWCHAR SecureStringCopyW(_Inout_ PWCHAR String1, _In_ LPCWSTR String2, _In_ SIZE_T Size)
|
||||
{
|
||||
PWCHAR pChar = String1;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
INT StringCompareA(LPCSTR String1, LPCSTR String2)
|
||||
INT StringCompareA(_In_ LPCSTR String1, _In_ LPCSTR String2)
|
||||
{
|
||||
for (; *String1 == *String2; String1++, String2++)
|
||||
{
|
||||
|
@ -11,7 +11,7 @@ INT StringCompareA(LPCSTR String1, LPCSTR String2)
|
|||
return ((*(LPCSTR)String1 < *(LPCSTR)String2) ? -1 : +1);
|
||||
}
|
||||
|
||||
INT StringCompareW(LPCWSTR String1, LPCWSTR String2)
|
||||
INT StringCompareW(_In_ LPCWSTR String1, _In_ LPCWSTR String2)
|
||||
{
|
||||
for (; *String1 == *String2; String1++, String2++)
|
||||
{
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
PWCHAR StringConcatW(PWCHAR String, PWCHAR String2)
|
||||
PWCHAR StringConcatW(_Inout_ PWCHAR String, _In_ PWCHAR String2)
|
||||
{
|
||||
StringCopyW(&String[StringLengthW(String)], String2);
|
||||
|
||||
return String;
|
||||
}
|
||||
|
||||
PCHAR StringConcatA(PCHAR String, PCHAR String2)
|
||||
PCHAR StringConcatA(_Inout_ PCHAR String, _In_ PCHAR String2)
|
||||
{
|
||||
StringCopyA(&String[StringLengthA(String)], String2);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
PCHAR StringCopyA(PCHAR String1, PCHAR String2)
|
||||
PCHAR StringCopyA(_Inout_ PCHAR String1, _In_ PCHAR String2)
|
||||
{
|
||||
PCHAR p = String1;
|
||||
|
||||
|
@ -9,7 +9,7 @@ PCHAR StringCopyA(PCHAR String1, PCHAR String2)
|
|||
return String1;
|
||||
}
|
||||
|
||||
PWCHAR StringCopyW(PWCHAR String1, PWCHAR String2)
|
||||
PWCHAR StringCopyW(_Inout_ PWCHAR String1, _In_ PWCHAR String2)
|
||||
{
|
||||
PWCHAR p = String1;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ INT StringCompareStringRegionW(PWCHAR String1, PWCHAR String2, SIZE_T Count)
|
|||
return 0;
|
||||
}
|
||||
|
||||
PCHAR StringFindSubstringA(PCHAR String1, PCHAR String2)
|
||||
PCHAR StringFindSubstringA(_In_ PCHAR String1, _In_ PCHAR String2)
|
||||
{
|
||||
PCHAR pPointer = String1;
|
||||
DWORD Length = (DWORD)StringLengthA(String2);
|
||||
|
@ -50,7 +50,7 @@ PCHAR StringFindSubstringA(PCHAR String1, PCHAR String2)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
PWCHAR StringFindSubstringW(PWCHAR String1, PWCHAR String2)
|
||||
PWCHAR StringFindSubstringW(_In_ PWCHAR String1, _In_ PWCHAR String2)
|
||||
{
|
||||
PWCHAR pPointer = String1;
|
||||
DWORD Length = (DWORD)StringLengthW(String2);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
SIZE_T StringLengthA(LPCSTR String)
|
||||
SIZE_T StringLengthA(_In_ LPCSTR String)
|
||||
{
|
||||
LPCSTR String2;
|
||||
|
||||
|
@ -9,7 +9,7 @@ SIZE_T StringLengthA(LPCSTR String)
|
|||
return (String2 - String);
|
||||
}
|
||||
|
||||
SIZE_T StringLengthW(LPCWSTR String)
|
||||
SIZE_T StringLengthW(_In_ LPCWSTR String)
|
||||
{
|
||||
LPCWSTR String2;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
PCHAR StringLocateCharA(PCHAR String, INT Character)
|
||||
PCHAR StringLocateCharA(_Inout_ PCHAR String, _In_ INT Character)
|
||||
{
|
||||
do
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ PCHAR StringLocateCharA(PCHAR String, INT Character)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
PWCHAR StringLocateCharW(PWCHAR String, INT Character)
|
||||
PWCHAR StringLocateCharW(_Inout_ PWCHAR String, _In_ INT Character)
|
||||
{
|
||||
do
|
||||
{
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
#pragma once
|
||||
#include "Internal.h"
|
||||
|
||||
PCHAR CaplockStringA(PCHAR Ptr);
|
||||
PWCHAR CaplockStringW(PWCHAR Ptr);
|
||||
PVOID CopyMemoryEx(PVOID Destination, CONST PVOID Source, SIZE_T Length);
|
||||
VOID ZeroMemoryEx(PVOID Destination, SIZE_T Size);
|
||||
PCHAR SecureStringCopyA(PCHAR String1, LPCSTR String2, SIZE_T Size);
|
||||
PWCHAR SecureStringCopyW(PWCHAR String1, LPCWSTR String2, SIZE_T Size);
|
||||
INT StringCompareA(LPCSTR String1, LPCSTR String2);
|
||||
INT StringCompareW(LPCWSTR String1, LPCWSTR String2);
|
||||
PWCHAR StringConcatW(PWCHAR String, PWCHAR String2);
|
||||
PCHAR StringConcatA(PCHAR String, PCHAR String2);
|
||||
PCHAR StringCopyA(PCHAR String1, PCHAR String2);
|
||||
PWCHAR StringCopyW(PWCHAR String1, PWCHAR String2);
|
||||
PCHAR StringFindSubstringA(PCHAR String1, PCHAR String2);
|
||||
PWCHAR StringFindSubstringW(PWCHAR String1, PWCHAR String2);
|
||||
SIZE_T StringLengthA(LPCSTR String);
|
||||
SIZE_T StringLengthW(LPCWSTR String);
|
||||
PCHAR StringLocateCharA(PCHAR String, INT Character);
|
||||
PWCHAR StringLocateCharW(PWCHAR String, INT Character);
|
||||
PCHAR StringRemoveSubstringA(PCHAR String, CONST PCHAR Substring);
|
||||
PWCHAR StringRemoveSubstringW(PWCHAR String, CONST PWCHAR Substring);
|
||||
PCHAR StringTerminateStringAtCharA(PCHAR String, INT Character);
|
||||
PWCHAR StringTerminateStringAtCharW(PWCHAR String, INT Character);
|
||||
PCHAR StringTokenA(PCHAR String, CONST PCHAR Delim);
|
||||
PWCHAR StringTokenW(PWCHAR String, CONST PWCHAR Delim);
|
||||
PCHAR CaplockStringA(_In_ PCHAR Ptr);
|
||||
PWCHAR CaplockStringW(_In_ PWCHAR Ptr);
|
||||
PVOID CopyMemoryEx(_Inout_ PVOID Destination, _In_ CONST PVOID Source, _In_ SIZE_T Length);
|
||||
VOID ZeroMemoryEx(_Inout_ PVOID Destination, _In_ SIZE_T Size);
|
||||
PCHAR SecureStringCopyA(_Inout_ PCHAR String1, _In_ LPCSTR String2, _In_ SIZE_T Size);
|
||||
PWCHAR SecureStringCopyW(_Inout_ PWCHAR String1, _In_ LPCWSTR String2, _In_ SIZE_T Size);
|
||||
INT StringCompareA(_In_ LPCSTR String1, _In_ LPCSTR String2);
|
||||
INT StringCompareW(_In_ LPCWSTR String1, _In_ LPCWSTR String2);
|
||||
PWCHAR StringConcatW(_Inout_ PWCHAR String, _In_ PWCHAR String2);
|
||||
PCHAR StringConcatA(_Inout_ PCHAR String, _In_ PCHAR String2);
|
||||
PCHAR StringCopyA(_Inout_ PCHAR String1, _In_ PCHAR String2);
|
||||
PWCHAR StringCopyW(_Inout_ PWCHAR String1, _In_ PWCHAR String2);
|
||||
PCHAR StringFindSubstringA(_In_ PCHAR String1, _In_ PCHAR String2);
|
||||
PWCHAR StringFindSubstringW(_In_ PWCHAR String1, _In_ PWCHAR String2);
|
||||
SIZE_T StringLengthA(_In_ LPCSTR String);
|
||||
SIZE_T StringLengthW(_In_ LPCWSTR String);
|
||||
PCHAR StringLocateCharA(_Inout_ PCHAR String, _In_ INT Character);
|
||||
PWCHAR StringLocateCharW(_Inout_ PWCHAR String, _In_ INT Character);
|
||||
PCHAR StringRemoveSubstringA(_Inout_ PCHAR String, _In_ CONST PCHAR Substring);
|
||||
PWCHAR StringRemoveSubstringW(_Inout_ PWCHAR String, _In_ CONST PWCHAR Substring);
|
||||
PCHAR StringTerminateStringAtCharA(_Inout_ PCHAR String, _In_ INT Character);
|
||||
PWCHAR StringTerminateStringAtCharW(_Inout_ PWCHAR String, _In_ INT Character);
|
||||
PCHAR StringTokenA(_In_ PCHAR String, _In_ CONST PCHAR Delim);
|
||||
PWCHAR StringTokenW(_In_ PWCHAR String, _In_ CONST PWCHAR Delim);
|
||||
VOID CharArrayToByteArrayA(PCHAR Char, PBYTE Byte, DWORD Length);
|
||||
VOID CharArrayToByteArrayW(PWCHAR Char, PBYTE Byte, DWORD Length);
|
||||
VOID RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString);
|
||||
VOID RtlInitEmptyUnicodeString(PUNICODE_STRING UnicodeString, PWCHAR Buffer, USHORT BufferSize);
|
||||
SIZE_T CharStringToWCharString(PWCHAR Destination, PCHAR Source, SIZE_T MaximumAllowed);
|
||||
SIZE_T WCharStringToCharString(PCHAR Destination, PWCHAR Source, SIZE_T MaximumAllowed);
|
||||
VOID ByteArrayToCharArrayA(PCHAR Destination, PBYTE Source, DWORD Length);
|
||||
VOID ByteArrayToCharArrayW(PWCHAR Destination, PBYTE Source, DWORD Length);
|
||||
VOID RtlInitUnicodeString(_Inout_ PUNICODE_STRING DestinationString, _In_ PCWSTR SourceString);
|
||||
VOID RtlInitEmptyUnicodeString(_Inout_ PUNICODE_STRING UnicodeString, _In_ PWCHAR Buffer, _In_ USHORT BufferSize);
|
||||
SIZE_T CharStringToWCharString(_Inout_ PWCHAR Destination, _In_ PCHAR Source, _In_ SIZE_T MaximumAllowed);
|
||||
SIZE_T WCharStringToCharString(_Inout_ PCHAR Destination, _In_ PWCHAR Source, _In_ SIZE_T MaximumAllowed);
|
||||
VOID ByteArrayToCharArrayA(_Inout_ PCHAR Destination, _In_ PBYTE Source, _In_ DWORD Length);
|
||||
VOID ByteArrayToCharArrayW(_Inout_ PWCHAR Destination, _In_ PBYTE Source, _In_ DWORD Length);
|
|
@ -1,6 +1,6 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
PCHAR StringRemoveSubstringA(PCHAR String, CONST PCHAR Substring)
|
||||
PCHAR StringRemoveSubstringA(_Inout_ PCHAR String, _In_ CONST PCHAR Substring)
|
||||
{
|
||||
DWORD Length = (DWORD)StringLengthA(Substring);
|
||||
PCHAR pPointer = String;
|
||||
|
@ -14,7 +14,7 @@ PCHAR StringRemoveSubstringA(PCHAR String, CONST PCHAR Substring)
|
|||
return String;
|
||||
}
|
||||
|
||||
PWCHAR StringRemoveSubstringW(PWCHAR String, CONST PWCHAR Substring)
|
||||
PWCHAR StringRemoveSubstringW(_Inout_ PWCHAR String, _In_ CONST PWCHAR Substring)
|
||||
{
|
||||
DWORD Length = (DWORD)StringLengthW(Substring);
|
||||
PWCHAR pPointer = String;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
PCHAR StringTerminateStringAtCharA(PCHAR String, INT Character)
|
||||
PCHAR StringTerminateStringAtCharA(_Inout_ PCHAR String, _In_ INT Character)
|
||||
{
|
||||
DWORD Length = (DWORD)StringLengthA(String);
|
||||
|
||||
|
@ -16,7 +16,7 @@ PCHAR StringTerminateStringAtCharA(PCHAR String, INT Character)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
PWCHAR StringTerminateStringAtCharW(PWCHAR String, INT Character)
|
||||
PWCHAR StringTerminateStringAtCharW(_Inout_ PWCHAR String, _In_ INT Character)
|
||||
{
|
||||
DWORD Length = (DWORD)StringLengthW(String);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
PCHAR StringTokenA(PCHAR String, CONST PCHAR Delim)
|
||||
PCHAR StringTokenA(_In_ PCHAR String, _In_ CONST PCHAR Delim)
|
||||
{
|
||||
PCHAR Last;
|
||||
PCHAR SpanP, Token;
|
||||
|
@ -46,7 +46,7 @@ CONTINUE:
|
|||
|
||||
}
|
||||
|
||||
PWCHAR StringTokenW(PWCHAR String, CONST PWCHAR Delim)
|
||||
PWCHAR StringTokenW(_In_ PWCHAR String, _In_ CONST PWCHAR Delim)
|
||||
{
|
||||
PWCHAR Last;
|
||||
PWCHAR SpanP, Token;
|
||||
|
|
|
@ -153,7 +153,7 @@
|
|||
<ClCompile Include="GetCurrentDirectoryFromUserProcessParameters.cpp" />
|
||||
<ClCompile Include="GetCurrentProcessIdFromTeb.cpp" />
|
||||
<ClCompile Include="GetCurrentUserSid.cpp" />
|
||||
<ClCompile Include="GetCurrentWindowText.cpp" />
|
||||
<ClCompile Include="GetCurrentWindowTextFromUserProcessParameter.cpp" />
|
||||
<ClCompile Include="GetFileSizeFromPath.cpp" />
|
||||
<ClCompile Include="GetKUserSharedData.cpp" />
|
||||
<ClCompile Include="GetLastErrorFromTeb.cpp" />
|
||||
|
@ -199,13 +199,13 @@
|
|||
<ClCompile Include="MasqueradePebAsExplorer.cpp" />
|
||||
<ClCompile Include="MpfComModifyShortcutTarget.cpp" />
|
||||
<ClCompile Include="MpfComVssDeleteShadowVolumeBackups.cpp" />
|
||||
<ClCompile Include="MpfPrintDesktopScreenSaveAsBitmap.cpp" />
|
||||
<ClCompile Include="OleGetClipboardData.cpp" />
|
||||
<ClCompile Include="RecursiveFindFile.cpp" />
|
||||
<ClCompile Include="RemoveDllFromPeb.cpp" />
|
||||
<ClCompile Include="RtlInitEmptyUnicodeString.cpp" />
|
||||
<ClCompile Include="RtlInitUnicodeString.cpp" />
|
||||
<ClCompile Include="RtlLoadPeHeaders.cpp" />
|
||||
<ClCompile Include="RtlNtStatusToDosErrorViaImport.cpp" />
|
||||
<ClCompile Include="SecureStringCopy.cpp" />
|
||||
<ClCompile Include="SetLastErrorInTeb.cpp" />
|
||||
<ClCompile Include="SetLastNtStatusInTeb.cpp" />
|
||||
|
@ -230,6 +230,9 @@
|
|||
<ClInclude Include="Internal.h" />
|
||||
<ClInclude Include="Win32Helper.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\README.md" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
|
|
@ -222,7 +222,7 @@
|
|||
<ClCompile Include="GetCurrentUserSid.cpp">
|
||||
<Filter>Source Files\Windows API Helper Functions\Helper Functions</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GetCurrentWindowText.cpp">
|
||||
<ClCompile Include="GetCurrentWindowTextFromUserProcessParameter.cpp">
|
||||
<Filter>Source Files\Windows API Helper Functions\Helper Functions</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GetFileSizeFromPath.cpp">
|
||||
|
@ -312,9 +312,6 @@
|
|||
<ClCompile Include="DelayedExecutionExecuteOnDisplayOff.cpp">
|
||||
<Filter>Source Files\Windows API Helper Functions\Evasion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ByteArrayToCharArray.cpp">
|
||||
<Filter>Source Files\String Manipulation</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CreateMd5HashFromFilePath.cpp">
|
||||
<Filter>Source Files\Windows API Helper Functions\Cryptography Related</Filter>
|
||||
</ClCompile>
|
||||
|
@ -342,8 +339,11 @@
|
|||
<ClCompile Include="RemoveDllFromPeb.cpp">
|
||||
<Filter>Source Files\Windows API Helper Functions\Evasion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MpfPrintDesktopScreenSaveAsBitmap.cpp">
|
||||
<Filter>Source Files\Windows API Helper Functions\Malicious Capabilities</Filter>
|
||||
<ClCompile Include="ByteArrayToCharArray.cpp">
|
||||
<Filter>Source Files\String Manipulation\String Conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RtlNtStatusToDosErrorViaImport.cpp">
|
||||
<Filter>Source Files\Windows API Helper Functions\Error Handling</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -357,4 +357,7 @@
|
|||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\README.md" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,6 +1,6 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
SIZE_T WCharStringToCharString(PCHAR Destination, PWCHAR Source, SIZE_T MaximumAllowed)
|
||||
SIZE_T WCharStringToCharString(_Inout_ PCHAR Destination, _In_ PWCHAR Source, _In_ SIZE_T MaximumAllowed)
|
||||
{
|
||||
INT Length = (INT)MaximumAllowed;
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ NTSTATUS GetLastNtStatusFromTeb(VOID);
|
|||
VOID SetLastErrorInTeb(_In_ DWORD ErrorCode);
|
||||
VOID SetLastNtStatusInTeb(_In_ NTSTATUS Status);
|
||||
DWORD Win32FromHResult(_In_ HRESULT Result);
|
||||
DWORD RtlNtStatusToDosErrorViaImport(_In_ NTSTATUS Status);
|
||||
|
||||
//cryptography related
|
||||
DWORD HashStringDjb2A(_In_ PCHAR String);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "StringManipulation.h"
|
||||
|
||||
VOID ZeroMemoryEx(PVOID Destination, SIZE_T Size)
|
||||
VOID ZeroMemoryEx(_Inout_ PVOID Destination, _In_ SIZE_T Size)
|
||||
{
|
||||
PULONG Dest = (PULONG)Destination;
|
||||
SIZE_T Count = Size / sizeof(ULONG);
|
||||
|
|
Loading…
Reference in New Issue