Commit Graph

25 Commits

Author SHA1 Message Date
Maurice Heumann
304dbcc661 Comprehensive WOW64 subsystem implementation (#555)
# Major Features Implemented
**Core WOW64 Architecture**
1. Full TEB, PEB, and Windows structure implementations for 32-bit
processes
2. Proper thread context switching with 32-bit stack allocation
3. Configurable memory allocation with 32-bit/64-bit address space
handling
4. Automatic WOW64 process identification and handling
5. Heaven's Gate Implementation for handling exceptions

**Enhanced Emulation Features**
1. Fixed GDT setup and segment management for WOW64
2. Multi-architecture PE loading with proper import resolution
3. Segment-aware disassembly with WOW64 debugging capabilities

**Testing & Validation**
**32-bit Test Sample**: Minimal "hello" executable with full ASM source

# TODO
Needs more testing, currently in very early stages.
2025-10-21 20:13:01 +02:00
momo5502
8ef9349c37 Small timing fix 2025-10-21 20:12:28 +02:00
AlexGuo1998
66c7c3126d Fix std::chrono::system_clock::now()
In `ntdll!RtlGetSystemTimePrecise`, `kusd.SystemTime` is queried first, and QPC offset (`QPC() - kusd.BaselineSystemTimeQpc`) is added if it's larger than 0.
Setting `kusd.BaselineSystemTimeQpc` to `UINT64_MAX` avoids the adjustment, so incorrect adjustments won't happen.
Alternatively, We can update `kusd.BaselineSystemTimeQpc` to be the QPC value just when `kusd.SystemTime` changes, but that's not possible, because we cannot monitor `kusd.SystemTime` for change.
2025-10-20 10:30:44 +08:00
brian
65eecf1cfd Comprehensive WOW64 subsystem implementation 2025-10-13 19:55:50 +08:00
momo5502
c81c1468ba Mark RDPID as unavailable 2025-09-07 21:30:11 +02:00
momo5502
2a43b42428 Mark rdtsc(p) as available 2025-09-07 20:43:11 +02:00
momo5502
b2eef2bf46 Align processor counts 2025-08-17 07:31:37 +02:00
Maurice Heumann
a6dd9251b8 Prepare 32 bit support 2025-04-14 13:57:54 +02:00
momo5502
d191f8e667 Optimize MMIO handling 2025-04-05 09:03:41 +02:00
momo5502
db1ef0dd16 Include PCH everywhere 2025-03-18 20:19:26 +01:00
Maurice Heumann
2cc2137c3a Unify steady and system clock 2025-03-18 12:10:59 +01:00
Maurice Heumann
450e3c2a9c Use clock interfaces to precisely control time 2025-03-18 11:48:44 +01:00
momo5502
6263353438 Isolate memory manager 2025-02-09 18:19:32 +01:00
momo5502
ec1333278b Implement root fs handling 2025-01-25 07:24:01 +01:00
Elias Bachaalany
f1f42b855b refactored into its own files ('time.hpp/.cpp') 2025-01-11 21:51:05 -08:00
Elias Bachaalany
4129725c97 moved some time/sync funcs/consts out from syscall_utils 2025-01-11 21:35:10 -08:00
momo5502
bff8420ffd Format all the code 2025-01-06 17:19:26 +01:00
momo5502
17860edc4c Fix most conversion warnings 2025-01-05 20:34:54 +01:00
momo5502
69f82e5376 Fix compilation warnings on linux 2025-01-05 19:59:02 +01:00
momo5502
605d66c237 Fix ADL for serialize/deserialize 2025-01-05 19:31:51 +01:00
momo5502
6b172f5e78 Add macOS support 2025-01-05 17:43:17 +01:00
robert-yates
8e049a2650 migrate to platform structures 2024-12-24 21:08:39 +01:00
momo5502
5f49b30fe0 Cleanup KUSD MMIO 2024-11-24 10:37:26 +01:00
momo5502
d3cf88a0c4 Dynamically update KUSD system time 2024-11-23 22:19:05 +01:00
momo5502
2e2b4ffb2f KUSD MMIO 2024-11-23 19:32:14 +01:00