Skip to content

Commit eb72218

Browse files
committed
move hells_gate extern func into root.zig & delete asm.zig
1 parent f843bf9 commit eb72218

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

src/asm.zig

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/root.zig

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const std = @import("std");
22
const windows = std.os.windows;
33
const ntdll = @import("ntdll.zig");
4-
const asm_impl = @import("asm.zig");
54
const utils = @import("utils.zig");
65
const testing = std.testing;
76
const builtin = @import("builtin");
@@ -10,6 +9,9 @@ const STUB_SIZE: usize = 32;
109
const RANGE: usize = 255;
1110
const SEARCH_RANGE: usize = 255;
1211

12+
extern fn hells_gate(syscall_number: u32, address: usize) void;
13+
extern fn hell_descent(arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize, arg6: usize, arg7: usize, arg8: usize, arg9: usize, arg10: usize, arg11: usize) callconv(.c) windows.NTSTATUS;
14+
1315
pub const Config = struct { seed: u32 = 5381, search_neighbor: bool = true, indirect_syscall: bool = true };
1416

1517
pub const ZcircuitError = ntdll.NtDllError || error{
@@ -119,8 +121,8 @@ pub const Syscall = extern struct {
119121

120122
if (args.len > 11) @compileError("Too many arguments for this syscall implementation");
121123

122-
asm_impl.hells_gate(self.ssn, self.address);
123-
return asm_impl.hell_descent(
124+
hells_gate(self.ssn, self.address);
125+
return hell_descent(
124126
if (args.len > 0) argToUsize(args[0]) else 0,
125127
if (args.len > 1) argToUsize(args[1]) else 0,
126128
if (args.len > 2) argToUsize(args[2]) else 0,

0 commit comments

Comments
 (0)