mirror of
https://github.com/Whispergate/JanusLoader
synced 2026-07-22 11:23:12 +00:00
16 lines
626 B
C++
16 lines
626 B
C++
#pragma once
|
|
#include <cstdint>
|
|
#include <cstddef>
|
|
#include "vm.hpp"
|
|
|
|
// Payload blob is generated by tools/embed_payload.py
|
|
extern const uint8_t kPayload[];
|
|
extern const size_t kPayloadSize;
|
|
extern const uint64_t kEntryOffset; // offset into decrypted blob of entry point
|
|
extern const uint64_t kRelocOffsets[]; // offsets of 64-bit host pointers needing base fixup
|
|
extern const size_t kRelocCount;
|
|
|
|
// Decrypt, allocate, apply relocations, return initialised vm ready to run.
|
|
// Caller owns allocated memory (freed on process exit in shellcode context, so ignored).
|
|
bool janus_load(RiscVm* vm, SyscallTable* sc);
|