Skip to content

Commit 78093ed

Browse files
committed
Update to VS 2022 and bug fixes
1. Update to VS 2022 2. Update NTAssassin to fix incorrect text displayed in Rectangle Editor
1 parent c79dd9a commit 78093ed

14 files changed

Lines changed: 346 additions & 51 deletions

File tree

Source/AlleyWind/3rdParty/include/NTAssassin/NTANT.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,6 @@ NTA_API VOID NTAPI NT_InitObject(POBJECT_ATTRIBUTES Object, HANDLE RootDirectory
8181
* @param[in] RootDirectory RootDirectory member of OBJECT_ATTRIBUTES
8282
* @param[out] Object Pointer to OBJECT_ATTRIBUTES to be filled
8383
* @param[out] ObjectName ObjectName member of OBJECT_ATTRIBUTES
84+
* @warning ObjectName.Buffer should be freed by "Mem_HeapFree" when you no longer need
8485
*/
8586
NTA_API NTSTATUS NTAPI NT_InitPathObject(PCWSTR Path, HANDLE RootDirectory, POBJECT_ATTRIBUTES Object, PUNICODE_STRING ObjectName);

Source/AlleyWind/3rdParty/include/NTAssassin/NTAPE.h

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,24 @@
22

33
#include "NTAssassin.h"
44

5-
typedef struct _PE_IMAGE {
6-
PIMAGE_DOS_HEADER lpImage;
7-
WORD wMachine;
5+
typedef struct _PE_STRUCT {
6+
PIMAGE_DOS_HEADER Image;
7+
BOOL OfflineMap;
8+
PIMAGE_FILE_HEADER FileHeader;
89
union {
9-
PIMAGE_NT_HEADERS64 lpNtHeader64;
10-
PIMAGE_NT_HEADERS32 lpNtHeader32;
11-
PIMAGE_NT_HEADERS lpNtHeader;
10+
PIMAGE_OPTIONAL_HEADER OptionalHeader;
11+
PIMAGE_OPTIONAL_HEADER64 OptionalHeader64;
12+
PIMAGE_OPTIONAL_HEADER32 OptionalHeader32;
13+
PIMAGE_ROM_OPTIONAL_HEADER OptionalHeaderRom;
1214
};
13-
BOOL bFileMap;
14-
} PE_IMAGE, * PPE_IMAGE;
15+
PIMAGE_SECTION_HEADER SectionHeader;
16+
PVOID OverlayData;
17+
} PE_STRUCT, * PPE_STRUCT;
1518

16-
NTA_API BOOL NTAPI PE_Init(PPE_IMAGE lpImage, LPVOID lpMem, BOOL bFileMap);
19+
NTA_API BOOL NTAPI PE_Resolve(PPE_STRUCT PEStruct, PVOID Image, BOOL OfflineMap);
1720

18-
#define PE_GetFirstSection(lpImage) (IMAGE_FIRST_SECTION((lpImage)->lpNtHeader))
21+
NTA_API PIMAGE_DATA_DIRECTORY NTAPI PE_GetDataDirectory(PPE_STRUCT PEStruct, UINT Index);
22+
23+
NTA_API PIMAGE_SECTION_HEADER NTAPI PE_GetSectionByRVA(PPE_STRUCT PEStruct, DWORD RVA);
24+
25+
NTA_API PVOID NTAPI PE_RVA2Ptr(PPE_STRUCT PEStruct, DWORD RVA);

Source/AlleyWind/3rdParty/include/NTAssassin/NTASys.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,9 @@ NTA_API VOID NTAPI Sys_StatusMsgBox(HWND Owner, PCWSTR Title, NTSTATUS Status);
7878
/**
7979
* @see "Sys_StatusMsgBox"
8080
*/
81-
#define Sys_LastStatusMsgBox(Owner, Title) Sys_StatusMsgBox(Owner, Title, NT_GetLastStatus())
81+
#define Sys_LastStatusMsgBox(Owner, Title) Sys_StatusMsgBox(Owner, Title, NT_GetLastStatus())
82+
83+
/**
84+
* @see "IsProcessorFeaturePresent"
85+
*/
86+
#define Sys_TestCPUFeature(Feature) ((Feature) < PROCESSOR_FEATURE_MAX ? (BOOL)NT_GetKUSD()->ProcessorFeatures[(Feature)] : FALSE)

Source/AlleyWind/3rdParty/include/NTAssassin/NTAssassin.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,19 @@
7878
#define _THREADINFOCLASS _MS_THREADINFOCLASS
7979
#define THREADINFOCLASS MS_THREADINFOCLASS
8080
#define ThreadIsIoPending MS_ThreadIsIoPending
81+
#define _SYSTEM_INFORMATION_CLASS _MS_SYSTEM_INFORMATION_CLASS
82+
#define SYSTEM_INFORMATION_CLASS MS_SYSTEM_INFORMATION_CLASS
83+
#define SystemBasicInformation MS_SystemBasicInformation
84+
#define SystemPerformanceInformation MS_SystemPerformanceInformation
85+
#define SystemTimeOfDayInformation MS_SystemTimeOfDayInformation
86+
#define SystemProcessInformation MS_SystemProcessInformation
87+
#define SystemProcessorPerformanceInformation MS_SystemProcessorPerformanceInformation
88+
#define SystemInterruptInformation MS_SystemInterruptInformation
89+
#define SystemExceptionInformation MS_SystemExceptionInformation
90+
#define SystemRegistryQuotaInformation MS_SystemRegistryQuotaInformation
91+
#define SystemLookasideInformation MS_SystemLookasideInformation
92+
#define SystemCodeIntegrityInformation MS_SystemCodeIntegrityInformation
93+
#define SystemPolicyInformation MS_SystemPolicyInformation
8194

8295
#include <Windows.h>
8396
#include <Winternl.h>

0 commit comments

Comments
 (0)