Skip to content

Commit 13d0b6b

Browse files
authored
Merge pull request #58 from hakril/improv_simple_assembly
Improve handling of some instructions in simple x86/x64
2 parents 7475c88 + cbadada commit 13d0b6b

17 files changed

Lines changed: 3409 additions & 8 deletions

File tree

.github/workflows/mypytest.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@ jobs:
3131
with:
3232
python-version: ${{ matrix.python-version}}
3333
architecture: x86
34+
update-environment: false
3435
## Install the 64bits version of python3 asked
3536
- name: Set up Python3 ${{ matrix.python-version }} x64
3637
if: ${{ matrix.python-version != '2.7' }}
3738
uses: actions/setup-python@v5
3839
with:
3940
python-version: ${{ matrix.python-version}}
4041
architecture: x64
42+
update-environment: false
4143

4244
# Manually install python2.7 (both version at once)
4345
- name: Set up Python2.7 ${{ matrix.python-version }} x86 & x64
@@ -64,7 +66,7 @@ jobs:
6466
run: py -${{ matrix.python-version}}-${{ matrix.python-bitness-to-test}} -m pytest --junitxml=junit/test-results.xml -s -k "not known_to_fail" -v tests/
6567

6668
- name: Publish PyTest Results
67-
uses: EnricoMi/publish-unit-test-result-action/composite@v1
69+
uses: EnricoMi/publish-unit-test-result-action/windows@v2
6870
if: always()
6971
with:
7072
files: junit/test-results.xml
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#define MEM_EXTENDED_PARAMETER_TYPE_BITS 8

ctypes_generation/definitions/functions/syscall.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,3 +367,28 @@ NTSTATUS NtTerminateProcess(
367367
HANDLE ProcessHandle,
368368
NTSTATUS ExitStatus
369369
);
370+
371+
372+
NTSTATUS NtReadFile(
373+
_In_ HANDLE FileHandle,
374+
_In_opt_ HANDLE Event,
375+
_In_opt_ PIO_APC_ROUTINE ApcRoutine,
376+
_In_opt_ PVOID ApcContext,
377+
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
378+
_Out_ PVOID Buffer,
379+
_In_ ULONG Length,
380+
_In_opt_ PLARGE_INTEGER ByteOffset,
381+
_In_opt_ PULONG Key
382+
);
383+
384+
NTSTATUS NtWriteFile(
385+
[in] HANDLE FileHandle,
386+
[in, optional] HANDLE Event,
387+
[in, optional] PIO_APC_ROUTINE ApcRoutine,
388+
[in, optional] PVOID ApcContext,
389+
[out] PIO_STATUS_BLOCK IoStatusBlock,
390+
[in] PVOID Buffer,
391+
[in] ULONG Length,
392+
[in, optional] PLARGE_INTEGER ByteOffset,
393+
[in, optional] PULONG Key
394+
);
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
typedef enum MEM_EXTENDED_PARAMETER_TYPE {
2+
MemExtendedParameterInvalidType = 0,
3+
MemExtendedParameterAddressRequirements = 1,
4+
MemExtendedParameterNumaNode = 2,
5+
MemExtendedParameterPartitionHandle = 3,
6+
MemExtendedParameterUserPhysicalHandle = 4,
7+
MemExtendedParameterAttributeFlags = 5,
8+
MemExtendedParameterImageMachine = 6,
9+
MemExtendedParameterMax
10+
} *PMEM_EXTENDED_PARAMETER_TYPE;
11+
12+
13+
typedef struct _MEM_ADDRESS_REQUIREMENTS {
14+
PVOID LowestStartingAddress;
15+
PVOID HighestEndingAddress;
16+
SIZE_T Alignment;
17+
} MEM_ADDRESS_REQUIREMENTS, *PMEM_ADDRESS_REQUIREMENTS;
18+
19+
20+
typedef struct MEM_EXTENDED_PARAMETER {
21+
struct {
22+
ULONG64 Type : 8; // MEM_EXTENDED_PARAMETER_TYPE_BITS -> define not handled in parser here
23+
ULONG64 Reserved : 56; // 64 - MEM_EXTENDED_PARAMETER_TYPE_BITS -> define not handled in parser here
24+
} DUMMYSTRUCTNAME;
25+
union {
26+
ULONG64 ULong64;
27+
PVOID Pointer;
28+
SIZE_T Size;
29+
HANDLE Handle;
30+
ULONG ULong;
31+
} DUMMYUNIONNAME;
32+
} MEM_EXTENDED_PARAMETER, *PMEM_EXTENDED_PARAMETER;

0 commit comments

Comments
 (0)