Massive dump of xenia-info required code.
This is a working xenia-info for xex files (no gdfs files yet).
This commit is contained in:
85
src/core/file.cc
Normal file
85
src/core/file.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/core/file.h>
|
||||
|
||||
|
||||
typedef struct xe_file {
|
||||
xe_ref_t ref;
|
||||
|
||||
void* handle;
|
||||
} xe_file_t;
|
||||
|
||||
|
||||
#if XE_LIKE(WIN32)
|
||||
#define fseeko _fseeki64
|
||||
#define ftello _ftelli64
|
||||
#endif // WIN32
|
||||
|
||||
|
||||
xe_file_ref xe_file_open(xe_pal_ref pal, const xe_file_mode mode,
|
||||
const xechar_t *path) {
|
||||
xe_file_ref file = (xe_file_ref)xe_calloc(sizeof(xe_file_t));
|
||||
xe_ref_init((xe_ref)file);
|
||||
|
||||
xechar_t mode_string[10];
|
||||
mode_string[0] = 0;
|
||||
if (mode & kXEFileModeRead) {
|
||||
XEIGNORE(xestrcat(mode_string, XECOUNT(mode_string), XT("r")));
|
||||
}
|
||||
if (mode & kXEFileModeWrite) {
|
||||
XEIGNORE(xestrcat(mode_string, XECOUNT(mode_string), XT("w")));
|
||||
}
|
||||
XEIGNORE(xestrcat(mode_string, XECOUNT(mode_string), XT("b")));
|
||||
|
||||
#if XE_LIKE(WIN32)
|
||||
XEEXPECTZERO(_wfopen_s((FILE**)&file->handle, path, mode_string));
|
||||
#else
|
||||
file->handle = fopen(path, mode_string);
|
||||
XEEXPECTNOTNULL(file->handle);
|
||||
#endif // WIN32
|
||||
|
||||
return file;
|
||||
|
||||
XECLEANUP:
|
||||
xe_file_release(file);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void xe_file_dealloc(xe_file_ref file) {
|
||||
FILE* handle = (FILE*)file->handle;
|
||||
fclose(handle);
|
||||
file->handle = NULL;
|
||||
}
|
||||
|
||||
xe_file_ref xe_file_retain(xe_file_ref file) {
|
||||
xe_ref_retain((xe_ref)file);
|
||||
return file;
|
||||
}
|
||||
|
||||
void xe_file_release(xe_file_ref file) {
|
||||
xe_ref_release((xe_ref)file, (xe_ref_dealloc_t)xe_file_dealloc);
|
||||
}
|
||||
|
||||
size_t xe_file_get_length(xe_file_ref file) {
|
||||
FILE* handle = (FILE*)file->handle;
|
||||
|
||||
fseeko(handle, 0, SEEK_END);
|
||||
return ftello(handle);
|
||||
}
|
||||
|
||||
size_t xe_file_read(xe_file_ref file, const size_t offset,
|
||||
uint8_t *buffer, const size_t buffer_size) {
|
||||
FILE* handle = (FILE*)file->handle;
|
||||
if (fseeko(handle, offset, SEEK_SET) != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return fread(buffer, 1, buffer_size, handle);
|
||||
}
|
||||
74
src/core/memory.cc
Normal file
74
src/core/memory.cc
Normal file
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/core/memory.h>
|
||||
|
||||
#include <sys/mman.h>
|
||||
|
||||
|
||||
/**
|
||||
* Memory map:
|
||||
* 0x00000000 - 0x40000000 (1024mb) - virtual 4k pages
|
||||
* 0x40000000 - 0x80000000 (1024mb) - virtual 64k pages
|
||||
* 0x80000000 - 0x8C000000 ( 192mb) - xex 64k pages
|
||||
* 0x8C000000 - 0x90000000 ( 64mb) - xex 64k pages (encrypted)
|
||||
* 0x90000000 - 0xA0000000 ( 256mb) - xex 4k pages
|
||||
* 0xA0000000 - 0xC0000000 ( 512mb) - physical 64k pages
|
||||
*
|
||||
* We use the host OS to create an entire addressable range for this. That way
|
||||
* we don't have to emulate a TLB. It'd be really cool to pass through page
|
||||
* sizes or use madvice to let the OS know what to expect.
|
||||
*/
|
||||
|
||||
|
||||
struct xe_memory {
|
||||
xe_ref_t ref;
|
||||
|
||||
size_t length;
|
||||
void *ptr;
|
||||
};
|
||||
|
||||
|
||||
xe_memory_ref xe_memory_create(xe_pal_ref pal, xe_memory_options_t options) {
|
||||
xe_memory_ref memory = (xe_memory_ref)xe_calloc(sizeof(xe_memory));
|
||||
xe_ref_init((xe_ref)memory);
|
||||
|
||||
memory->length = 0xC0000000;
|
||||
memory->ptr = mmap(0, memory->length, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANON, -1, 0);
|
||||
XEEXPECTNOTNULL(memory->ptr);
|
||||
XEEXPECT(memory->ptr != MAP_FAILED);
|
||||
|
||||
return memory;
|
||||
|
||||
XECLEANUP:
|
||||
xe_memory_release(memory);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void xe_memory_dealloc(xe_memory_ref memory) {
|
||||
munmap(memory->ptr, memory->length);
|
||||
}
|
||||
|
||||
xe_memory_ref xe_memory_retain(xe_memory_ref memory) {
|
||||
xe_ref_retain((xe_ref)memory);
|
||||
return memory;
|
||||
}
|
||||
|
||||
void xe_memory_release(xe_memory_ref memory) {
|
||||
xe_ref_release((xe_ref)memory, (xe_ref_dealloc_t)xe_memory_dealloc);
|
||||
}
|
||||
|
||||
size_t xe_memory_get_length(xe_memory_ref memory) {
|
||||
return memory->length;
|
||||
}
|
||||
|
||||
void* xe_memory_addr(xe_memory_ref memory, uint32_t guest_addr) {
|
||||
return (uint8_t*)memory->ptr + guest_addr;
|
||||
}
|
||||
101
src/core/mmap_posix.cc
Normal file
101
src/core/mmap_posix.cc
Normal file
@@ -0,0 +1,101 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/core/mmap.h>
|
||||
|
||||
#include <sys/mman.h>
|
||||
|
||||
|
||||
typedef struct xe_mmap {
|
||||
xe_ref_t ref;
|
||||
|
||||
void* file_handle;
|
||||
void* mmap_handle;
|
||||
|
||||
void* addr;
|
||||
size_t length;
|
||||
} xe_mmap_t;
|
||||
|
||||
|
||||
xe_mmap_ref xe_mmap_open(xe_pal_ref pal, const xe_file_mode mode,
|
||||
const xechar_t *path,
|
||||
const size_t offset, const size_t length) {
|
||||
xe_mmap_ref mmap = (xe_mmap_ref)xe_calloc(sizeof(xe_mmap_t));
|
||||
xe_ref_init((xe_ref)mmap);
|
||||
|
||||
xechar_t mode_string[10];
|
||||
mode_string[0] = 0;
|
||||
if (mode & kXEFileModeRead) {
|
||||
XEIGNORE(xestrcat(mode_string, XECOUNT(mode_string), XT("r")));
|
||||
}
|
||||
if (mode & kXEFileModeWrite) {
|
||||
XEIGNORE(xestrcat(mode_string, XECOUNT(mode_string), XT("w")));
|
||||
}
|
||||
XEIGNORE(xestrcat(mode_string, XECOUNT(mode_string), XT("b")));
|
||||
|
||||
int prot = 0;
|
||||
if (mode & kXEFileModeRead) {
|
||||
prot |= PROT_READ;
|
||||
}
|
||||
if (mode & kXEFileModeWrite) {
|
||||
prot |= PROT_WRITE;
|
||||
}
|
||||
|
||||
FILE* file_handle = fopen(path, mode_string);
|
||||
mmap->file_handle = file_handle;
|
||||
XEEXPECTNOTNULL(mmap->file_handle);
|
||||
|
||||
size_t map_length;
|
||||
map_length = length;
|
||||
if (!length) {
|
||||
fseeko(file_handle, 0, SEEK_END);
|
||||
map_length = ftello(file_handle);
|
||||
}
|
||||
mmap->length = map_length;
|
||||
|
||||
mmap->addr = ::mmap(0, map_length, prot, MAP_SHARED, fileno(file_handle),
|
||||
offset);
|
||||
XEEXPECTNOTNULL(mmap->addr);
|
||||
|
||||
return mmap;
|
||||
|
||||
XECLEANUP:
|
||||
xe_mmap_release(mmap);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void xe_mmap_dealloc(xe_mmap_ref mmap) {
|
||||
if (mmap->addr) {
|
||||
munmap(mmap->addr, mmap->length);
|
||||
mmap->addr = NULL;
|
||||
}
|
||||
|
||||
FILE* file_handle = (FILE*)mmap->file_handle;
|
||||
if (file_handle) {
|
||||
fclose(file_handle);
|
||||
mmap->file_handle = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
xe_mmap_ref xe_mmap_retain(xe_mmap_ref mmap) {
|
||||
xe_ref_retain((xe_ref)mmap);
|
||||
return mmap;
|
||||
}
|
||||
|
||||
void xe_mmap_release(xe_mmap_ref mmap) {
|
||||
xe_ref_release((xe_ref)mmap, (xe_ref_dealloc_t)xe_mmap_dealloc);
|
||||
}
|
||||
|
||||
void* xe_mmap_get_addr(xe_mmap_ref mmap) {
|
||||
return mmap->addr;
|
||||
}
|
||||
|
||||
size_t xe_mmap_get_length(xe_mmap_ref mmap) {
|
||||
return mmap->length;
|
||||
}
|
||||
39
src/core/pal.cc
Normal file
39
src/core/pal.cc
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/core/pal.h>
|
||||
|
||||
|
||||
typedef struct xe_pal {
|
||||
xe_ref_t ref;
|
||||
|
||||
} xe_pal_t;
|
||||
|
||||
|
||||
xe_pal_ref xe_pal_create(xe_pal_options_t options) {
|
||||
xe_pal_ref pal = (xe_pal_ref)xe_calloc(sizeof(xe_pal_t));
|
||||
xe_ref_init((xe_ref)pal);
|
||||
|
||||
//
|
||||
|
||||
return pal;
|
||||
}
|
||||
|
||||
void xe_pal_dealloc(xe_pal_ref pal) {
|
||||
//
|
||||
}
|
||||
|
||||
xe_pal_ref xe_pal_retain(xe_pal_ref pal) {
|
||||
xe_ref_retain((xe_ref)pal);
|
||||
return pal;
|
||||
}
|
||||
|
||||
void xe_pal_release(xe_pal_ref pal) {
|
||||
xe_ref_release((xe_ref)pal, (xe_ref_dealloc_t)xe_pal_dealloc);
|
||||
}
|
||||
31
src/core/ref.cc
Normal file
31
src/core/ref.cc
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/core/ref.h>
|
||||
|
||||
|
||||
void xe_ref_init(xe_ref_t* ref) {
|
||||
ref->count = 1;
|
||||
}
|
||||
|
||||
void xe_ref_retain(xe_ref_t* ref) {
|
||||
xe_atomic_inc_32(&ref->count);
|
||||
}
|
||||
|
||||
void xe_ref_release(xe_ref_t* ref, xe_ref_dealloc_t dealloc) {
|
||||
if (!ref) {
|
||||
return;
|
||||
}
|
||||
if (!xe_atomic_dec_32(&ref->count)) {
|
||||
if (dealloc) {
|
||||
dealloc(ref);
|
||||
}
|
||||
xe_free(ref);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,21 @@
|
||||
# Copyright 2013 Ben Vanik. All Rights Reserved.
|
||||
{
|
||||
'sources': [
|
||||
'something.cc',
|
||||
'file.cc',
|
||||
'memory.cc',
|
||||
'pal.cc',
|
||||
'ref.cc',
|
||||
],
|
||||
|
||||
'conditions': [
|
||||
['OS == "mac" or OS == "linux"', {
|
||||
'sources': [
|
||||
'mmap_posix.cc',
|
||||
],
|
||||
}],
|
||||
['OS == "win"', {
|
||||
'sources': [
|
||||
],
|
||||
}],
|
||||
],
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/xenia.h>
|
||||
#include <xenia/cpu.h>
|
||||
|
||||
#include <llvm/IR/DerivedTypes.h>
|
||||
#include <llvm/IR/IRBuilder.h>
|
||||
@@ -16,7 +16,10 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
int some_function(int xx) {
|
||||
|
||||
void do_cpu_stuff() {
|
||||
XELOGCPU(XT("cpu"));
|
||||
|
||||
LLVMContext &context = getGlobalContext();
|
||||
//IRBuilder<> builder(context);
|
||||
Module *module = new Module("my cool jit", context);
|
||||
@@ -49,7 +52,8 @@ int some_function(int xx) {
|
||||
|
||||
builder.CreateRet(tmp2);
|
||||
|
||||
XELOGD(XT("woo %d"), 123);
|
||||
|
||||
module->dump();
|
||||
delete module;
|
||||
return xx + 4;
|
||||
}
|
||||
6
src/cpu/sources.gypi
Normal file
6
src/cpu/sources.gypi
Normal file
@@ -0,0 +1,6 @@
|
||||
# Copyright 2013 Ben Vanik. All Rights Reserved.
|
||||
{
|
||||
'sources': [
|
||||
'cpu.cc',
|
||||
],
|
||||
}
|
||||
15
src/gpu/gpu.cc
Normal file
15
src/gpu/gpu.cc
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/gpu.h>
|
||||
|
||||
|
||||
void do_gpu_stuff() {
|
||||
XELOGGPU(XT("gpu"));
|
||||
}
|
||||
6
src/gpu/sources.gypi
Normal file
6
src/gpu/sources.gypi
Normal file
@@ -0,0 +1,6 @@
|
||||
# Copyright 2013 Ben Vanik. All Rights Reserved.
|
||||
{
|
||||
'sources': [
|
||||
'gpu.cc',
|
||||
],
|
||||
}
|
||||
96
src/kernel/export.cc
Normal file
96
src/kernel/export.cc
Normal file
@@ -0,0 +1,96 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/export.h>
|
||||
|
||||
|
||||
bool xe_kernel_export_is_implemented(const xe_kernel_export_t *kernel_export) {
|
||||
if (kernel_export->flags & kXEKernelExportFlagFunction) {
|
||||
if (kernel_export->function_data.impl) {
|
||||
return true;
|
||||
}
|
||||
} else if (kernel_export->flags & kXEKernelExportFlagVariable) {
|
||||
if (kernel_export->variable_data) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
char name[32];
|
||||
xe_kernel_export_t *exports;
|
||||
size_t count;
|
||||
} xe_kernel_export_table_t;
|
||||
#define kXEKernelExportResolverTableMaxCount 8
|
||||
|
||||
|
||||
struct xe_kernel_export_resolver {
|
||||
xe_ref_t ref;
|
||||
|
||||
xe_kernel_export_table_t tables[kXEKernelExportResolverTableMaxCount];
|
||||
size_t table_count;
|
||||
};
|
||||
|
||||
|
||||
xe_kernel_export_resolver_ref xe_kernel_export_resolver_create() {
|
||||
xe_kernel_export_resolver_ref resolver = (xe_kernel_export_resolver_ref)
|
||||
xe_calloc(sizeof(xe_kernel_export_resolver));
|
||||
xe_ref_init((xe_ref)resolver);
|
||||
|
||||
return resolver;
|
||||
}
|
||||
|
||||
void xe_kernel_export_resolver_dealloc(xe_kernel_export_resolver_ref resolver) {
|
||||
}
|
||||
|
||||
xe_kernel_export_resolver_ref xe_kernel_export_resolver_retain(
|
||||
xe_kernel_export_resolver_ref resolver) {
|
||||
xe_ref_retain((xe_ref)resolver);
|
||||
return resolver;
|
||||
}
|
||||
|
||||
void xe_kernel_export_resolver_release(xe_kernel_export_resolver_ref resolver) {
|
||||
xe_ref_release((xe_ref)resolver,
|
||||
(xe_ref_dealloc_t)xe_kernel_export_resolver_dealloc);
|
||||
}
|
||||
|
||||
void xe_kernel_export_resolver_register_table(
|
||||
xe_kernel_export_resolver_ref resolver, const char *library_name,
|
||||
xe_kernel_export_t *exports, const size_t count) {
|
||||
XEASSERT(resolver->table_count + 1 < kXEKernelExportResolverTableMaxCount);
|
||||
xe_kernel_export_table_t *table = &resolver->tables[resolver->table_count++];
|
||||
XEIGNORE(xestrcpya(table->name, XECOUNT(table->name), library_name));
|
||||
table->exports = exports;
|
||||
table->count = count;
|
||||
}
|
||||
|
||||
xe_kernel_export_t *xe_kernel_export_resolver_get_by_ordinal(
|
||||
xe_kernel_export_resolver_ref resolver, const char *library_name,
|
||||
const uint32_t ordinal) {
|
||||
// TODO(benvanik): binary search everything.
|
||||
for (size_t n = 0; n < resolver->table_count; n++) {
|
||||
const xe_kernel_export_table_t *table = &resolver->tables[n];
|
||||
if (!xestrcmpa(library_name, table->name)) {
|
||||
// TODO(benvanik): binary search table.
|
||||
for (size_t m = 0; m < table->count; m++) {
|
||||
if (table->exports[m].ordinal == ordinal) {
|
||||
return &table->exports[m];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
xe_kernel_export_t *xe_kernel_export_resolver_get_by_name(
|
||||
xe_kernel_export_resolver_ref resolver, const char *library_name,
|
||||
const char *name) {
|
||||
return NULL;
|
||||
}
|
||||
130
src/kernel/kernel.cc
Normal file
130
src/kernel/kernel.cc
Normal file
@@ -0,0 +1,130 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel.h>
|
||||
|
||||
#include "kernel/modules/modules.h"
|
||||
|
||||
|
||||
typedef struct xe_kernel {
|
||||
xe_ref_t ref;
|
||||
|
||||
xe_kernel_options_t options;
|
||||
|
||||
xe_pal_ref pal;
|
||||
xe_memory_ref memory;
|
||||
xe_kernel_export_resolver_ref export_resolver;
|
||||
|
||||
struct {
|
||||
xe_xam_ref xam;
|
||||
xe_xbdm_ref xbdm;
|
||||
xe_xboxkrnl_ref xboxkrnl;
|
||||
} modules;
|
||||
} xe_kernel_t;
|
||||
|
||||
|
||||
xe_kernel_ref xe_kernel_create(xe_pal_ref pal, xe_memory_ref memory,
|
||||
xe_kernel_options_t options) {
|
||||
xe_kernel_ref kernel = (xe_kernel_ref)xe_calloc(sizeof(xe_kernel));
|
||||
xe_ref_init((xe_ref)kernel);
|
||||
|
||||
xe_copy_struct(&kernel->options, &options, sizeof(xe_kernel_options_t));
|
||||
|
||||
kernel->pal = xe_pal_retain(pal);
|
||||
kernel->memory = xe_memory_retain(memory);
|
||||
kernel->export_resolver = xe_kernel_export_resolver_create();
|
||||
|
||||
kernel->modules.xam =
|
||||
xe_xam_create(pal, memory, kernel->export_resolver);
|
||||
kernel->modules.xbdm =
|
||||
xe_xbdm_create(pal, memory, kernel->export_resolver);
|
||||
kernel->modules.xboxkrnl =
|
||||
xe_xboxkrnl_create(pal, memory, kernel->export_resolver);
|
||||
|
||||
return kernel;
|
||||
}
|
||||
|
||||
void xe_kernel_dealloc(xe_kernel_ref kernel) {
|
||||
xe_xboxkrnl_release(kernel->modules.xboxkrnl);
|
||||
|
||||
xe_kernel_export_resolver_release(kernel->export_resolver);
|
||||
xe_memory_release(kernel->memory);
|
||||
xe_pal_release(kernel->pal);
|
||||
}
|
||||
|
||||
xe_kernel_ref xe_kernel_retain(xe_kernel_ref kernel) {
|
||||
xe_ref_retain((xe_ref)kernel);
|
||||
return kernel;
|
||||
}
|
||||
|
||||
void xe_kernel_release(xe_kernel_ref kernel) {
|
||||
xe_ref_release((xe_ref)kernel, (xe_ref_dealloc_t)xe_kernel_dealloc);
|
||||
}
|
||||
|
||||
xe_pal_ref xe_kernel_get_pal(xe_kernel_ref kernel) {
|
||||
return xe_pal_retain(kernel->pal);
|
||||
}
|
||||
|
||||
xe_memory_ref xe_kernel_get_memory(xe_kernel_ref kernel) {
|
||||
return xe_memory_retain(kernel->memory);
|
||||
}
|
||||
|
||||
const xechar_t *xe_kernel_get_command_line(xe_kernel_ref kernel) {
|
||||
return kernel->options.command_line;
|
||||
}
|
||||
|
||||
xe_kernel_export_resolver_ref xe_kernel_get_export_resolver(
|
||||
xe_kernel_ref kernel) {
|
||||
return xe_kernel_export_resolver_retain(kernel->export_resolver);
|
||||
}
|
||||
|
||||
xe_module_ref xe_kernel_load_module(xe_kernel_ref kernel,
|
||||
const xechar_t *path) {
|
||||
xe_module_ref module = xe_kernel_get_module(kernel, path);
|
||||
if (module) {
|
||||
return module;
|
||||
}
|
||||
|
||||
// TODO(benvanik): map file from filesystem
|
||||
xe_mmap_ref mmap = xe_mmap_open(kernel->pal, kXEFileModeRead, path, 0, 0);
|
||||
if (!mmap) {
|
||||
return NULL;
|
||||
}
|
||||
void *addr = xe_mmap_get_addr(mmap);
|
||||
size_t length = xe_mmap_get_length(mmap);
|
||||
|
||||
xe_module_options_t options;
|
||||
xe_zero_struct(&options, sizeof(xe_module_options_t));
|
||||
XEIGNORE(xestrcpy(options.path, XECOUNT(options.path), path));
|
||||
module = xe_module_load(kernel->memory, kernel->export_resolver,
|
||||
addr, length, options);
|
||||
|
||||
// TODO(benvanik): retain memory somehow? is it needed?
|
||||
xe_mmap_release(mmap);
|
||||
|
||||
if (!module) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// stash in modules list
|
||||
|
||||
return xe_module_retain(module);
|
||||
}
|
||||
|
||||
void xe_kernel_launch_module(xe_kernel_ref kernel, xe_module_ref module) {
|
||||
//
|
||||
}
|
||||
|
||||
xe_module_ref xe_kernel_get_module(xe_kernel_ref kernel, const xechar_t *path) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void xe_kernel_unload_module(xe_kernel_ref kernel, xe_module_ref module) {
|
||||
//
|
||||
}
|
||||
444
src/kernel/module.cc
Normal file
444
src/kernel/module.cc
Normal file
@@ -0,0 +1,444 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/module.h>
|
||||
|
||||
#include <third_party/pe/pe_image.h>
|
||||
|
||||
|
||||
#define kXEModuleMaxSectionCount 32
|
||||
|
||||
typedef struct xe_module {
|
||||
xe_ref_t ref;
|
||||
|
||||
xe_module_options_t options;
|
||||
|
||||
xe_memory_ref memory;
|
||||
xe_kernel_export_resolver_ref export_resolver;
|
||||
|
||||
uint32_t handle;
|
||||
xe_xex2_ref xex;
|
||||
|
||||
size_t section_count;
|
||||
xe_module_pe_section_t sections[kXEModuleMaxSectionCount];
|
||||
} xe_module_t;
|
||||
|
||||
|
||||
int xe_module_load_pe(xe_module_ref module);
|
||||
|
||||
|
||||
xe_module_ref xe_module_load(xe_memory_ref memory,
|
||||
xe_kernel_export_resolver_ref export_resolver,
|
||||
const void *addr, const size_t length,
|
||||
xe_module_options_t options) {
|
||||
xe_module_ref module = (xe_module_ref)xe_calloc(sizeof(xe_module));
|
||||
xe_ref_init((xe_ref)module);
|
||||
|
||||
xe_copy_struct(&module->options, &options, sizeof(xe_module_options_t));
|
||||
|
||||
module->memory = xe_memory_retain(memory);
|
||||
module->export_resolver = xe_kernel_export_resolver_retain(export_resolver);
|
||||
|
||||
xe_xex2_options_t xex_options;
|
||||
module->xex = xe_xex2_load(memory, addr, length, xex_options);
|
||||
XEEXPECTNOTNULL(module->xex);
|
||||
|
||||
XEEXPECTZERO(xe_module_load_pe(module));
|
||||
|
||||
return module;
|
||||
|
||||
XECLEANUP:
|
||||
xe_module_release(module);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void xe_module_dealloc(xe_module_ref module) {
|
||||
xe_kernel_export_resolver_release(module->export_resolver);
|
||||
xe_memory_release(module->memory);
|
||||
}
|
||||
|
||||
xe_module_ref xe_module_retain(xe_module_ref module) {
|
||||
xe_ref_retain((xe_ref)module);
|
||||
return module;
|
||||
}
|
||||
|
||||
void xe_module_release(xe_module_ref module) {
|
||||
xe_ref_release((xe_ref)module, (xe_ref_dealloc_t)xe_module_dealloc);
|
||||
}
|
||||
|
||||
uint32_t xe_module_get_handle(xe_module_ref module) {
|
||||
return module->handle;
|
||||
}
|
||||
|
||||
xe_xex2_ref xe_module_get_xex(xe_module_ref module) {
|
||||
return xe_xex2_retain(module->xex);
|
||||
}
|
||||
|
||||
const xe_xex2_header_t *xe_module_get_xex_header(xe_module_ref module) {
|
||||
return xe_xex2_get_header(module->xex);
|
||||
}
|
||||
|
||||
void *xe_module_get_proc_address(xe_module_ref module, const uint32_t ordinal) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// IMAGE_CE_RUNTIME_FUNCTION_ENTRY
|
||||
// http://msdn.microsoft.com/en-us/library/ms879748.aspx
|
||||
typedef struct IMAGE_XBOX_RUNTIME_FUNCTION_ENTRY_t {
|
||||
uint32_t FuncStart; // Virtual address
|
||||
union {
|
||||
struct {
|
||||
uint32_t PrologLen : 8; // # of prolog instructions (size = x4)
|
||||
uint32_t FuncLen : 22; // # of instructions total (size = x4)
|
||||
uint32_t ThirtyTwoBit : 1; // Always 1
|
||||
uint32_t ExceptionFlag : 1; // 1 if PDATA_EH in .text -- unknown if used
|
||||
} Flags;
|
||||
uint32_t FlagsValue; // To make byte swapping easier
|
||||
};
|
||||
} IMAGE_XBOX_RUNTIME_FUNCTION_ENTRY;
|
||||
|
||||
int xe_module_load_pe(xe_module_ref module) {
|
||||
const xe_xex2_header_t *xex_header = xe_xex2_get_header(module->xex);
|
||||
uint8_t *mem = (uint8_t*)xe_memory_addr(module->memory, 0);
|
||||
const uint8_t *p = mem + xex_header->exe_address;
|
||||
|
||||
// Verify DOS signature (MZ).
|
||||
const IMAGE_DOS_HEADER* doshdr = (const IMAGE_DOS_HEADER*)p;
|
||||
if (doshdr->e_magic != IMAGE_DOS_SIGNATURE) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Move to the NT header offset from the DOS header.
|
||||
p += doshdr->e_lfanew;
|
||||
|
||||
// Verify NT signature (PE\0\0).
|
||||
const IMAGE_NT_HEADERS32* nthdr = (const IMAGE_NT_HEADERS32*)(p);
|
||||
if (nthdr->Signature != IMAGE_NT_SIGNATURE) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Verify matches an Xbox PE.
|
||||
const IMAGE_FILE_HEADER* filehdr = &nthdr->FileHeader;
|
||||
if ((filehdr->Machine != IMAGE_FILE_MACHINE_POWERPCBE) ||
|
||||
!(filehdr->Characteristics & IMAGE_FILE_32BIT_MACHINE)) {
|
||||
return 1;
|
||||
}
|
||||
// Verify the expected size.
|
||||
if (filehdr->SizeOfOptionalHeader != IMAGE_SIZEOF_NT_OPTIONAL_HEADER) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Verify optional header is 32bit.
|
||||
const IMAGE_OPTIONAL_HEADER32* opthdr = &nthdr->OptionalHeader;
|
||||
if (opthdr->Magic != IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
|
||||
return 1;
|
||||
}
|
||||
// Verify subsystem.
|
||||
if (opthdr->Subsystem != IMAGE_SUBSYSTEM_XBOX) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Linker version - likely 8+
|
||||
// Could be useful for recognizing certain patterns
|
||||
//opthdr->MajorLinkerVersion; opthdr->MinorLinkerVersion;
|
||||
|
||||
// Data directories of interest:
|
||||
// EXPORT IMAGE_EXPORT_DIRECTORY
|
||||
// IMPORT IMAGE_IMPORT_DESCRIPTOR[]
|
||||
// EXCEPTION IMAGE_CE_RUNTIME_FUNCTION_ENTRY[]
|
||||
// BASERELOC
|
||||
// DEBUG IMAGE_DEBUG_DIRECTORY[]
|
||||
// ARCHITECTURE /IMAGE_ARCHITECTURE_HEADER/ ----- import thunks!
|
||||
// TLS IMAGE_TLS_DIRECTORY
|
||||
// IAT Import Address Table ptr
|
||||
//opthdr->DataDirectory[IMAGE_DIRECTORY_ENTRY_X].VirtualAddress / .Size
|
||||
|
||||
// Verify section count not overrun.
|
||||
// NOTE: if this ever asserts, change to a dynamic section list.
|
||||
XEASSERT(filehdr->NumberOfSections <= kXEModuleMaxSectionCount);
|
||||
if (filehdr->NumberOfSections > kXEModuleMaxSectionCount) {
|
||||
return 1;
|
||||
}
|
||||
module->section_count = filehdr->NumberOfSections;
|
||||
|
||||
// Quick scan to determine bounds of sections.
|
||||
size_t upper_address = 0;
|
||||
const IMAGE_SECTION_HEADER* sechdr = IMAGE_FIRST_SECTION(nthdr);
|
||||
for (size_t n = 0; n < filehdr->NumberOfSections; n++, sechdr++) {
|
||||
const size_t physical_address = opthdr->ImageBase + sechdr->VirtualAddress;
|
||||
upper_address =
|
||||
MAX(upper_address, physical_address + sechdr->Misc.VirtualSize);
|
||||
}
|
||||
|
||||
// Setup/load sections.
|
||||
sechdr = IMAGE_FIRST_SECTION(nthdr);
|
||||
for (size_t n = 0; n < filehdr->NumberOfSections; n++, sechdr++) {
|
||||
xe_module_pe_section_t *section = &module->sections[n];
|
||||
xe_copy_memory(section->name, sizeof(section->name),
|
||||
sechdr->Name, sizeof(sechdr->Name));
|
||||
section->name[8] = 0;
|
||||
section->raw_address = sechdr->PointerToRawData;
|
||||
section->raw_size = sechdr->SizeOfRawData;
|
||||
section->address = xex_header->exe_address + sechdr->VirtualAddress;
|
||||
section->size = sechdr->Misc.VirtualSize;
|
||||
section->flags = sechdr->Characteristics;
|
||||
}
|
||||
|
||||
//DumpTLSDirectory(pImageBase, pNTHeader, (PIMAGE_TLS_DIRECTORY32)0);
|
||||
//DumpExportsSection(pImageBase, pNTHeader);
|
||||
return 0;
|
||||
}
|
||||
|
||||
xe_module_pe_section_t *xe_module_get_section(xe_module_ref module,
|
||||
const char *name) {
|
||||
for (size_t n = 0; n < module->section_count; n++) {
|
||||
if (xestrcmpa(module->sections[n].name, name) == 0) {
|
||||
return &module->sections[n];
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int xe_module_get_method_hints(xe_module_ref module,
|
||||
xe_module_pe_method_info_t **out_method_infos,
|
||||
size_t *out_method_info_count) {
|
||||
uint8_t *mem = (uint8_t*)xe_memory_addr(module->memory, 0);
|
||||
|
||||
*out_method_infos = NULL;
|
||||
*out_method_info_count = 0;
|
||||
|
||||
const IMAGE_XBOX_RUNTIME_FUNCTION_ENTRY *entry = NULL;
|
||||
|
||||
// Find pdata, which contains the exception handling entries.
|
||||
xe_module_pe_section_t *pdata = xe_module_get_section(module, ".pdata");
|
||||
if (!pdata) {
|
||||
// No exception data to go on.
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Resolve.
|
||||
const uint8_t *p = mem + pdata->address;
|
||||
|
||||
// Entry count = pdata size / sizeof(entry).
|
||||
const size_t entry_count =
|
||||
pdata->size / sizeof(IMAGE_XBOX_RUNTIME_FUNCTION_ENTRY);
|
||||
if (entry_count == 0) {
|
||||
// Empty?
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Allocate output.
|
||||
xe_module_pe_method_info_t *method_infos =
|
||||
(xe_module_pe_method_info_t*)xe_calloc(
|
||||
entry_count * sizeof(xe_module_pe_method_info_t));
|
||||
XEEXPECTNOTNULL(method_infos);
|
||||
|
||||
// Parse entries.
|
||||
// NOTE: entries are in memory as big endian, so pull them out and swap the
|
||||
// values before using them.
|
||||
entry = (const IMAGE_XBOX_RUNTIME_FUNCTION_ENTRY*)p;
|
||||
IMAGE_XBOX_RUNTIME_FUNCTION_ENTRY temp_entry;
|
||||
for (size_t n = 0; n < entry_count; n++, entry++) {
|
||||
xe_module_pe_method_info_t *method_info = &method_infos[n];
|
||||
method_info->address = XESWAP32BE(entry->FuncStart);
|
||||
|
||||
// The bitfield needs to be swapped by hand.
|
||||
temp_entry.FlagsValue = XESWAP32BE(entry->FlagsValue);
|
||||
method_info->total_length = temp_entry.Flags.FuncLen * 4;
|
||||
method_info->prolog_length = temp_entry.Flags.PrologLen * 4;
|
||||
}
|
||||
|
||||
*out_method_infos = method_infos;
|
||||
*out_method_info_count = entry_count;
|
||||
return 0;
|
||||
|
||||
XECLEANUP:
|
||||
if (method_infos) {
|
||||
xe_free(method_infos);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
void xe_module_dump(xe_module_ref module) {
|
||||
//const uint8_t *mem = (const uint8_t*)xe_memory_addr(module->memory, 0);
|
||||
const xe_xex2_header_t *header = xe_xex2_get_header(module->xex);
|
||||
|
||||
// XEX info.
|
||||
printf("Module %s:\n\n", module->options.path);
|
||||
printf(" Module Flags: %.8X\n", header->module_flags);
|
||||
printf(" System Flags: %.8X\n", header->system_flags);
|
||||
printf("\n");
|
||||
printf(" Address: %.8X\n", header->exe_address);
|
||||
printf(" Entry Point: %.8X\n", header->exe_entry_point);
|
||||
printf(" Stack Size: %.8X\n", header->exe_stack_size);
|
||||
printf(" Heap Size: %.8X\n", header->exe_heap_size);
|
||||
printf("\n");
|
||||
printf(" Execution Info:\n");
|
||||
printf(" Media ID: %.8X\n", header->execution_info.media_id);
|
||||
printf(" Version: %d.%d.%d.%d\n",
|
||||
header->execution_info.version.major,
|
||||
header->execution_info.version.minor,
|
||||
header->execution_info.version.build,
|
||||
header->execution_info.version.qfe);
|
||||
printf(" Base Version: %d.%d.%d.%d\n",
|
||||
header->execution_info.base_version.major,
|
||||
header->execution_info.base_version.minor,
|
||||
header->execution_info.base_version.build,
|
||||
header->execution_info.base_version.qfe);
|
||||
printf(" Title ID: %.8X\n", header->execution_info.title_id);
|
||||
printf(" Platform: %.8X\n", header->execution_info.platform);
|
||||
printf(" Exec Table: %.8X\n", header->execution_info.executable_table);
|
||||
printf(" Disc Number: %d\n", header->execution_info.disc_number);
|
||||
printf(" Disc Count: %d\n", header->execution_info.disc_count);
|
||||
printf(" Savegame ID: %.8X\n", header->execution_info.savegame_id);
|
||||
printf("\n");
|
||||
printf(" Loader Info:\n");
|
||||
printf(" Image Flags: %.8X\n", header->loader_info.image_flags);
|
||||
printf(" Game Regions: %.8X\n", header->loader_info.game_regions);
|
||||
printf(" Media Flags: %.8X\n", header->loader_info.media_flags);
|
||||
printf("\n");
|
||||
printf(" TLS Info:\n");
|
||||
printf(" Slot Count: %d\n", header->tls_info.slot_count);
|
||||
printf(" Data Size: %db\n", header->tls_info.data_size);
|
||||
printf(" Address: %.8X, %db\n", header->tls_info.raw_data_address,
|
||||
header->tls_info.raw_data_size);
|
||||
printf("\n");
|
||||
printf(" Headers:\n");
|
||||
for (size_t n = 0; n < header->header_count; n++) {
|
||||
const xe_xex2_opt_header_t *opt_header = &header->headers[n];
|
||||
printf(" %.8X (%.8X, %4db) %.8X = %11d\n",
|
||||
opt_header->key, opt_header->offset, opt_header->length,
|
||||
opt_header->value, opt_header->value);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
// Resources.
|
||||
printf("Resources:\n");
|
||||
printf(" %.8X, %db\n", header->resource_info.address,
|
||||
header->resource_info.size);
|
||||
printf(" TODO\n");
|
||||
printf("\n");
|
||||
|
||||
// Section info.
|
||||
printf("Sections:\n");
|
||||
for (size_t n = 0, i = 0; n < header->section_count; n++) {
|
||||
const xe_xex2_section_t *section = &header->sections[n];
|
||||
const char* type = "UNKNOWN";
|
||||
switch (section->info.type) {
|
||||
case XEX_SECTION_CODE:
|
||||
type = "CODE ";
|
||||
break;
|
||||
case XEX_SECTION_DATA:
|
||||
type = "RWDATA ";
|
||||
break;
|
||||
case XEX_SECTION_READONLY_DATA:
|
||||
type = "RODATA ";
|
||||
break;
|
||||
}
|
||||
const size_t start_address = header->exe_address +
|
||||
(i * xe_xex2_section_length);
|
||||
const size_t end_address = start_address + (section->info.page_count *
|
||||
xe_xex2_section_length);
|
||||
printf(" %3d %s %3d pages %.8X - %.8X (%d bytes)\n",
|
||||
(int)n, type, section->info.page_count, (int)start_address,
|
||||
(int)end_address, section->info.page_count * xe_xex2_section_length);
|
||||
i += section->info.page_count;
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
// Static libraries.
|
||||
printf("Static Libraries:\n");
|
||||
for (size_t n = 0; n < header->static_library_count; n++) {
|
||||
const xe_xex2_static_library_t *library = &header->static_libraries[n];
|
||||
printf(" %-8s : %d.%d.%d.%d\n", library->name, library->major,
|
||||
library->minor, library->build, library->qfe);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
// Imports.
|
||||
printf("Imports:\n");
|
||||
for (size_t n = 0; n < header->import_library_count; n++) {
|
||||
const xe_xex2_import_library_t *library = &header->import_libraries[n];
|
||||
|
||||
xe_xex2_import_info_t* import_infos;
|
||||
size_t import_info_count;
|
||||
if (!xe_xex2_get_import_infos(module->xex, library,
|
||||
&import_infos, &import_info_count)) {
|
||||
printf(" %s - %d imports\n", library->name, (int)import_info_count);
|
||||
printf(" Version: %d.%d.%d.%d\n",
|
||||
library->version.major, library->version.minor,
|
||||
library->version.build, library->version.qfe);
|
||||
printf(" Min Version: %d.%d.%d.%d\n",
|
||||
library->min_version.major, library->min_version.minor,
|
||||
library->min_version.build, library->min_version.qfe);
|
||||
printf("\n");
|
||||
|
||||
// Counts.
|
||||
int known_count = 0;
|
||||
int unknown_count = 0;
|
||||
int impl_count = 0;
|
||||
int unimpl_count = 0;
|
||||
for (size_t m = 0; m < import_info_count; m++) {
|
||||
const xe_xex2_import_info_t *info = &import_infos[m];
|
||||
const xe_kernel_export_t *kernel_export =
|
||||
xe_kernel_export_resolver_get_by_ordinal(
|
||||
module->export_resolver, library->name, info->ordinal);
|
||||
if (kernel_export) {
|
||||
known_count++;
|
||||
if (xe_kernel_export_is_implemented(kernel_export)) {
|
||||
impl_count++;
|
||||
}
|
||||
} else {
|
||||
unknown_count++;
|
||||
unimpl_count++;
|
||||
}
|
||||
}
|
||||
printf(" Total: %4zu\n", import_info_count);
|
||||
printf(" Known: %3d%% (%d known, %d unknown)\n",
|
||||
(int)(known_count / (float)import_info_count * 100.0f),
|
||||
known_count, unknown_count);
|
||||
printf(" Implemented: %3d%% (%d implemented, %d unimplemented)\n",
|
||||
(int)(impl_count / (float)import_info_count * 100.0f),
|
||||
impl_count, unimpl_count);
|
||||
printf("\n");
|
||||
|
||||
// Listing.
|
||||
for (size_t m = 0; m < import_info_count; m++) {
|
||||
const xe_xex2_import_info_t *info = &import_infos[m];
|
||||
const xe_kernel_export_t *kernel_export =
|
||||
xe_kernel_export_resolver_get_by_ordinal(
|
||||
module->export_resolver, library->name, info->ordinal);
|
||||
const char *name = "UNKNOWN";
|
||||
bool implemented = false;
|
||||
if (kernel_export) {
|
||||
name = kernel_export->name;
|
||||
implemented = xe_kernel_export_is_implemented(kernel_export);
|
||||
}
|
||||
if (info->thunk_address) {
|
||||
printf(" F %.8X %.8X %.3X (%3d) %s %s\n",
|
||||
info->value_address, info->thunk_address, info->ordinal,
|
||||
info->ordinal, implemented ? " " : "!!", name);
|
||||
} else {
|
||||
printf(" V %.8X %.3X (%3d) %s %s\n",
|
||||
info->value_address, info->ordinal, info->ordinal,
|
||||
implemented ? " " : "!!", name);
|
||||
}
|
||||
}
|
||||
|
||||
xe_free(import_infos);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
// Exports.
|
||||
printf("Exports:\n");
|
||||
printf(" TODO\n");
|
||||
printf("\n");
|
||||
}
|
||||
17
src/kernel/modules/modules.h
Normal file
17
src/kernel/modules/modules.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_MODULES_H_
|
||||
#define XENIA_KERNEL_MODULES_H_
|
||||
|
||||
#include "kernel/modules/xam/xam.h"
|
||||
#include "kernel/modules/xbdm/xbdm.h"
|
||||
#include "kernel/modules/xboxkrnl/xboxkrnl.h"
|
||||
|
||||
#endif // XENIA_KERNEL_MODULES_H_
|
||||
8
src/kernel/modules/sources.gypi
Normal file
8
src/kernel/modules/sources.gypi
Normal file
@@ -0,0 +1,8 @@
|
||||
# Copyright 2013 Ben Vanik. All Rights Reserved.
|
||||
{
|
||||
'includes': [
|
||||
'xam/sources.gypi',
|
||||
'xbdm/sources.gypi',
|
||||
'xboxkrnl/sources.gypi',
|
||||
],
|
||||
}
|
||||
6
src/kernel/modules/xam/sources.gypi
Normal file
6
src/kernel/modules/xam/sources.gypi
Normal file
@@ -0,0 +1,6 @@
|
||||
# Copyright 2013 Ben Vanik. All Rights Reserved.
|
||||
{
|
||||
'sources': [
|
||||
'xam.cc',
|
||||
],
|
||||
}
|
||||
42
src/kernel/modules/xam/xam.cc
Normal file
42
src/kernel/modules/xam/xam.cc
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include "kernel/modules/xam/xam.h"
|
||||
|
||||
#include "kernel/modules/xam/xam_table.h"
|
||||
|
||||
|
||||
struct xe_xam {
|
||||
xe_ref_t ref;
|
||||
};
|
||||
|
||||
|
||||
xe_xam_ref xe_xam_create(
|
||||
xe_pal_ref pal, xe_memory_ref memory,
|
||||
xe_kernel_export_resolver_ref export_resolver) {
|
||||
xe_xam_ref module = (xe_xam_ref)xe_calloc(sizeof(xe_xam));
|
||||
xe_ref_init((xe_ref)module);
|
||||
|
||||
xe_kernel_export_resolver_register_table(export_resolver, "xam.xex",
|
||||
xe_xam_export_table, XECOUNT(xe_xam_export_table));
|
||||
|
||||
return module;
|
||||
}
|
||||
|
||||
void xe_xam_dealloc(xe_xam_ref module) {
|
||||
}
|
||||
|
||||
xe_xam_ref xe_xam_retain(xe_xam_ref module) {
|
||||
xe_ref_retain((xe_ref)module);
|
||||
return module;
|
||||
}
|
||||
|
||||
void xe_xam_release(xe_xam_ref module) {
|
||||
xe_ref_release((xe_ref)module, (xe_ref_dealloc_t)xe_xam_dealloc);
|
||||
}
|
||||
31
src/kernel/modules/xam/xam.h
Normal file
31
src/kernel/modules/xam/xam.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_MODULES_XAM_H_
|
||||
#define XENIA_KERNEL_MODULES_XAM_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/kernel/export.h>
|
||||
|
||||
|
||||
struct xe_xam;
|
||||
typedef struct xe_xam* xe_xam_ref;
|
||||
|
||||
|
||||
xe_xam_ref xe_xam_create(
|
||||
xe_pal_ref pal, xe_memory_ref memory,
|
||||
xe_kernel_export_resolver_ref export_resolver);
|
||||
|
||||
xe_xam_ref xe_xam_retain(xe_xam_ref module);
|
||||
void xe_xam_release(xe_xam_ref module);
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_MODULES_XAM_H_
|
||||
1419
src/kernel/modules/xam/xam_table.h
Normal file
1419
src/kernel/modules/xam/xam_table.h
Normal file
File diff suppressed because it is too large
Load Diff
6
src/kernel/modules/xbdm/sources.gypi
Normal file
6
src/kernel/modules/xbdm/sources.gypi
Normal file
@@ -0,0 +1,6 @@
|
||||
# Copyright 2013 Ben Vanik. All Rights Reserved.
|
||||
{
|
||||
'sources': [
|
||||
'xbdm.cc',
|
||||
],
|
||||
}
|
||||
42
src/kernel/modules/xbdm/xbdm.cc
Normal file
42
src/kernel/modules/xbdm/xbdm.cc
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include "kernel/modules/xbdm/xbdm.h"
|
||||
|
||||
#include "kernel/modules/xbdm/xbdm_table.h"
|
||||
|
||||
|
||||
struct xe_xbdm {
|
||||
xe_ref_t ref;
|
||||
};
|
||||
|
||||
|
||||
xe_xbdm_ref xe_xbdm_create(
|
||||
xe_pal_ref pal, xe_memory_ref memory,
|
||||
xe_kernel_export_resolver_ref export_resolver) {
|
||||
xe_xbdm_ref module = (xe_xbdm_ref)xe_calloc(sizeof(xe_xbdm));
|
||||
xe_ref_init((xe_ref)module);
|
||||
|
||||
xe_kernel_export_resolver_register_table(export_resolver, "xbdm.exe",
|
||||
xe_xbdm_export_table, XECOUNT(xe_xbdm_export_table));
|
||||
|
||||
return module;
|
||||
}
|
||||
|
||||
void xe_xbdm_dealloc(xe_xbdm_ref module) {
|
||||
}
|
||||
|
||||
xe_xbdm_ref xe_xbdm_retain(xe_xbdm_ref module) {
|
||||
xe_ref_retain((xe_ref)module);
|
||||
return module;
|
||||
}
|
||||
|
||||
void xe_xbdm_release(xe_xbdm_ref module) {
|
||||
xe_ref_release((xe_ref)module, (xe_ref_dealloc_t)xe_xbdm_dealloc);
|
||||
}
|
||||
31
src/kernel/modules/xbdm/xbdm.h
Normal file
31
src/kernel/modules/xbdm/xbdm.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_MODULES_XBDM_H_
|
||||
#define XENIA_KERNEL_MODULES_XBDM_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/kernel/export.h>
|
||||
|
||||
|
||||
struct xe_xbdm;
|
||||
typedef struct xe_xbdm* xe_xbdm_ref;
|
||||
|
||||
|
||||
xe_xbdm_ref xe_xbdm_create(
|
||||
xe_pal_ref pal, xe_memory_ref memory,
|
||||
xe_kernel_export_resolver_ref export_resolver);
|
||||
|
||||
xe_xbdm_ref xe_xbdm_retain(xe_xbdm_ref module);
|
||||
void xe_xbdm_release(xe_xbdm_ref module);
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_MODULES_XBDM_H_
|
||||
26
src/kernel/modules/xbdm/xbdm_table.h
Normal file
26
src/kernel/modules/xbdm/xbdm_table.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_MODULES_XBDM_TABLE_H_
|
||||
#define XENIA_KERNEL_MODULES_XBDM_TABLE_H_
|
||||
|
||||
#include <xenia/kernel/export.h>
|
||||
|
||||
|
||||
#define FLAG(t) kXEKernelExportFlag##t
|
||||
|
||||
|
||||
static xe_kernel_export_t xe_xbdm_export_table[] = {
|
||||
};
|
||||
|
||||
|
||||
#undef FLAG
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_MODULES_XBDM_TABLE_H_
|
||||
6
src/kernel/modules/xboxkrnl/sources.gypi
Normal file
6
src/kernel/modules/xboxkrnl/sources.gypi
Normal file
@@ -0,0 +1,6 @@
|
||||
# Copyright 2013 Ben Vanik. All Rights Reserved.
|
||||
{
|
||||
'sources': [
|
||||
'xboxkrnl.cc',
|
||||
],
|
||||
}
|
||||
42
src/kernel/modules/xboxkrnl/xboxkrnl.cc
Normal file
42
src/kernel/modules/xboxkrnl/xboxkrnl.cc
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include "kernel/modules/xboxkrnl/xboxkrnl.h"
|
||||
|
||||
#include "kernel/modules/xboxkrnl/xboxkrnl_table.h"
|
||||
|
||||
|
||||
struct xe_xboxkrnl {
|
||||
xe_ref_t ref;
|
||||
};
|
||||
|
||||
|
||||
xe_xboxkrnl_ref xe_xboxkrnl_create(
|
||||
xe_pal_ref pal, xe_memory_ref memory,
|
||||
xe_kernel_export_resolver_ref export_resolver) {
|
||||
xe_xboxkrnl_ref module = (xe_xboxkrnl_ref)xe_calloc(sizeof(xe_xboxkrnl));
|
||||
xe_ref_init((xe_ref)module);
|
||||
|
||||
xe_kernel_export_resolver_register_table(export_resolver, "xboxkrnl.exe",
|
||||
xe_xboxkrnl_export_table, XECOUNT(xe_xboxkrnl_export_table));
|
||||
|
||||
return module;
|
||||
}
|
||||
|
||||
void xe_xboxkrnl_dealloc(xe_xboxkrnl_ref module) {
|
||||
}
|
||||
|
||||
xe_xboxkrnl_ref xe_xboxkrnl_retain(xe_xboxkrnl_ref module) {
|
||||
xe_ref_retain((xe_ref)module);
|
||||
return module;
|
||||
}
|
||||
|
||||
void xe_xboxkrnl_release(xe_xboxkrnl_ref module) {
|
||||
xe_ref_release((xe_ref)module, (xe_ref_dealloc_t)xe_xboxkrnl_dealloc);
|
||||
}
|
||||
31
src/kernel/modules/xboxkrnl/xboxkrnl.h
Normal file
31
src/kernel/modules/xboxkrnl/xboxkrnl.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_MODULES_XBOXKRNL_H_
|
||||
#define XENIA_KERNEL_MODULES_XBOXKRNL_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/kernel/export.h>
|
||||
|
||||
|
||||
struct xe_xboxkrnl;
|
||||
typedef struct xe_xboxkrnl* xe_xboxkrnl_ref;
|
||||
|
||||
|
||||
xe_xboxkrnl_ref xe_xboxkrnl_create(
|
||||
xe_pal_ref pal, xe_memory_ref memory,
|
||||
xe_kernel_export_resolver_ref export_resolver);
|
||||
|
||||
xe_xboxkrnl_ref xe_xboxkrnl_retain(xe_xboxkrnl_ref module);
|
||||
void xe_xboxkrnl_release(xe_xboxkrnl_ref module);
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_MODULES_XBOXKRNL_H_
|
||||
885
src/kernel/modules/xboxkrnl/xboxkrnl_table.h
Normal file
885
src/kernel/modules/xboxkrnl/xboxkrnl_table.h
Normal file
@@ -0,0 +1,885 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_MODULES_XBOXKRNL_TABLE_H_
|
||||
#define XENIA_KERNEL_MODULES_XBOXKRNL_TABLE_H_
|
||||
|
||||
#include <xenia/kernel/export.h>
|
||||
|
||||
|
||||
#define FLAG(t) kXEKernelExportFlag##t
|
||||
|
||||
|
||||
static xe_kernel_export_t xe_xboxkrnl_export_table[] = {
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000001, DbgBreakPoint, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000002, DbgBreakPointWithStatus, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000003, DbgPrint, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000004, DbgPrompt, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000005, DumpGetRawDumpInfo, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000006, DumpWriteDump, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000007, ExAcquireReadWriteLockExclusive, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000008, ExAcquireReadWriteLockShared, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000009, ExAllocatePool, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000000A, ExAllocatePoolWithTag, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000000B, ExAllocatePoolTypeWithTag, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000000C, ExConsoleGameRegion, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000000D, ExCreateThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000000E, ExEventObjectType, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000000F, ExFreePool, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000010, ExGetXConfigSetting, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000011, ExInitializeReadWriteLock, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000012, ExMutantObjectType, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000013, ExQueryPoolBlockSize, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000014, ExRegisterThreadNotification, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000015, ExRegisterTitleTerminateNotification, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000016, ExReleaseReadWriteLock, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000017, ExSemaphoreObjectType, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000018, ExSetXConfigSetting, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000019, ExTerminateThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000001A, ExTerminateTitleProcess, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000001B, ExThreadObjectType, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000001C, ExTimerObjectType, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000001D, MmDoubleMapMemory, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000001E, MmUnmapMemory, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000001F, XeKeysGetConsoleCertificate, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000020, FscGetCacheElementCount, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000021, FscSetCacheElementCount, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000022, HalGetCurrentAVPack, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000023, HalGpioControl, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000024, HalOpenCloseODDTray, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000025, HalReadWritePCISpace, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000026, HalRegisterPowerDownNotification, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000027, HalRegisterSMCNotification, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000028, HalReturnToFirmware, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000029, HalSendSMCMessage, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000002A, HalSetAudioEnable, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000002B, InterlockedFlushSList, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000002C, InterlockedPopEntrySList, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000002D, InterlockedPushEntrySList, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000002E, IoAcquireDeviceObjectLock, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000002F, IoAllocateIrp, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000030, IoBuildAsynchronousFsdRequest, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000031, IoBuildDeviceIoControlRequest, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000032, IoBuildSynchronousFsdRequest, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000033, IoCallDriver, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000034, IoCheckShareAccess, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000035, IoCompleteRequest, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000036, IoCompletionObjectType, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000037, IoCreateDevice, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000038, IoCreateFile, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000039, IoDeleteDevice, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000003A, IoDeviceObjectType, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000003B, IoDismountVolume, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000003C, IoDismountVolumeByFileHandle, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000003D, IoDismountVolumeByName, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000003E, IoFileObjectType, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000003F, IoFreeIrp, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000040, IoInitializeIrp, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000041, IoInvalidDeviceRequest, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000042, ExSetBetaFeaturesEnabled, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000043, IoQueueThreadIrp, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000044, IoReleaseDeviceObjectLock, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000045, IoRemoveShareAccess, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000046, IoSetIoCompletion, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000047, IoSetShareAccess, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000048, IoStartNextPacket, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000049, IoStartNextPacketByKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000004A, IoStartPacket, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000004B, IoSynchronousDeviceIoControlRequest, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000004C, IoSynchronousFsdRequest, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000004D, KeAcquireSpinLockAtRaisedIrql, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000004E, KeAlertResumeThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000004F, KeAlertThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000050, KeBlowFuses, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000051, KeBoostPriorityThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000052, KeBugCheck, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000053, KeBugCheckEx, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000054, KeCancelTimer, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000055, KeConnectInterrupt, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000056, KeContextFromKframes, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000057, KeContextToKframes, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000058, KeCreateUserMode, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000059, KeDebugMonitorData, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000005A, KeDelayExecutionThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000005B, KeDeleteUserMode, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000005C, KeDisconnectInterrupt, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000005D, KeEnableFpuExceptions, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000005E, KeEnablePPUPerformanceMonitor, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000005F, KeEnterCriticalRegion, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000060, KeEnterUserMode, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000061, KeFlushCacheRange, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000062, KeFlushCurrentEntireTb, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000063, KeFlushEntireTb, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000064, KeFlushUserModeCurrentTb, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000065, KeFlushUserModeTb, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000066, KeGetCurrentProcessType, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000067, KeGetPMWRegister, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000068, KeGetPRVRegister, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000069, KeGetSocRegister, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000006A, KeGetSpecialPurposeRegister, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000006B, KeLockL2, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000006C, KeUnlockL2, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000006D, KeInitializeApc, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000006E, KeInitializeDeviceQueue, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000006F, KeInitializeDpc, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000070, KeInitializeEvent, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000071, KeInitializeInterrupt, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000072, KeInitializeMutant, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000073, KeInitializeQueue, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000074, KeInitializeSemaphore, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000075, KeInitializeTimerEx, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000076, KeInsertByKeyDeviceQueue, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000077, KeInsertDeviceQueue, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000078, KeInsertHeadQueue, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000079, KeInsertQueue, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000007A, KeInsertQueueApc, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000007B, KeInsertQueueDpc, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000007C, KeIpiGenericCall, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000007D, KeLeaveCriticalRegion, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000007E, KeLeaveUserMode, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000007F, KePulseEvent, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000080, KeQueryBackgroundProcessors, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000081, KeQueryBasePriorityThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000082, KeQueryInterruptTime, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000083, KeQueryPerformanceFrequency, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000084, KeQuerySystemTime, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000085, KeRaiseIrqlToDpcLevel, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000086, KeRegisterDriverNotification, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000087, KeReleaseMutant, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000088, KeReleaseSemaphore, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000089, KeReleaseSpinLockFromRaisedIrql, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000008A, KeRemoveByKeyDeviceQueue, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000008B, KeRemoveDeviceQueue, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000008C, KeRemoveEntryDeviceQueue, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000008D, KeRemoveQueue, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000008E, KeRemoveQueueDpc, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000008F, KeResetEvent, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000090, KeRestoreFloatingPointState, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000091, KeRestoreVectorUnitState, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000092, KeResumeThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000093, KeRetireDpcList, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000094, KeRundownQueue, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000095, KeSaveFloatingPointState, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000096, KeSaveVectorUnitState, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000097, KeSetAffinityThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000098, KeSetBackgroundProcessors, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000099, KeSetBasePriorityThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000009A, KeSetCurrentProcessType, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000009B, KeSetCurrentStackPointers, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000009C, KeSetDisableBoostThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000009D, KeSetEvent, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000009E, KeSetEventBoostPriority, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000009F, KeSetPMWRegister, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000A0, KeSetPowerMode, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000A1, KeSetPRVRegister, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000A2, KeSetPriorityClassThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000A3, KeSetPriorityThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000A4, KeSetSocRegister, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000A5, KeSetSpecialPurposeRegister, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000A6, KeSetTimer, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000A7, KeSetTimerEx, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000A8, KeStallExecutionProcessor, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000A9, KeSuspendThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000AA, KeSweepDcacheRange, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000AB, KeSweepIcacheRange, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000AC, KeTestAlertThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000AD, KeTimeStampBundle, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000AE, KeTryToAcquireSpinLockAtRaisedIrql, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000AF, KeWaitForMultipleObjects, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000B0, KeWaitForSingleObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000B1, KfAcquireSpinLock, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000B2, KfRaiseIrql, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000B3, KfLowerIrql, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000B4, KfReleaseSpinLock, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000B5, KiBugCheckData, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000B6, LDICreateDecompression, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000B7, LDIDecompress, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000B8, LDIDestroyDecompression, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000B9, MmAllocatePhysicalMemory, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000BA, MmAllocatePhysicalMemoryEx, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000BB, MmCreateKernelStack, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000BC, MmDeleteKernelStack, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000BD, MmFreePhysicalMemory, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000BE, MmGetPhysicalAddress, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000BF, MmIsAddressValid, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000C0, MmLockAndMapSegmentArray, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000C1, MmLockUnlockBufferPages, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000C2, MmMapIoSpace, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000C3, MmPersistPhysicalMemoryAllocation, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000C4, MmQueryAddressProtect, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000C5, MmQueryAllocationSize, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000C6, MmQueryStatistics, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000C7, MmSetAddressProtect, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000C8, MmSplitPhysicalMemoryAllocation, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000C9, MmUnlockAndUnmapSegmentArray, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000CA, MmUnmapIoSpace, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000CB, Nls844UnicodeCaseTable, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000CC, NtAllocateVirtualMemory, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000CD, NtCancelTimer, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000CE, NtClearEvent, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000CF, NtClose, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000D0, NtCreateDirectoryObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000D1, NtCreateEvent, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000D2, NtCreateFile, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000D3, NtCreateIoCompletion, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000D4, NtCreateMutant, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000D5, NtCreateSemaphore, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000D6, NtCreateSymbolicLinkObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000D7, NtCreateTimer, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000D8, NtDeleteFile, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000D9, NtDeviceIoControlFile, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000DA, NtDuplicateObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000DB, NtFlushBuffersFile, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000DC, NtFreeVirtualMemory, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000DD, NtMakeTemporaryObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000DE, NtOpenDirectoryObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000DF, NtOpenFile, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000E0, NtOpenSymbolicLinkObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000E1, NtProtectVirtualMemory, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000E2, NtPulseEvent, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000E3, NtQueueApcThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000E4, NtQueryDirectoryFile, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000E5, NtQueryDirectoryObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000E6, NtQueryEvent, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000E7, NtQueryFullAttributesFile, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000E8, NtQueryInformationFile, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000E9, NtQueryIoCompletion, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000EA, NtQueryMutant, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000EB, NtQuerySemaphore, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000EC, NtQuerySymbolicLinkObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000ED, NtQueryTimer, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000EE, NtQueryVirtualMemory, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000EF, NtQueryVolumeInformationFile, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000F0, NtReadFile, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000F1, NtReadFileScatter, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000F2, NtReleaseMutant, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000F3, NtReleaseSemaphore, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000F4, NtRemoveIoCompletion, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000F5, NtResumeThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000F6, NtSetEvent, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000F7, NtSetInformationFile, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000F8, NtSetIoCompletion, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000F9, NtSetSystemTime, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000FA, NtSetTimerEx, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000FB, NtSignalAndWaitForSingleObjectEx, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000FC, NtSuspendThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000FD, NtWaitForSingleObjectEx, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000FE, NtWaitForMultipleObjectsEx, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000000FF, NtWriteFile, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000100, NtWriteFileGather, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000101, NtYieldExecution, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000102, ObCreateObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000103, ObCreateSymbolicLink, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000104, ObDeleteSymbolicLink, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000105, ObDereferenceObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000106, ObDirectoryObjectType, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000107, ObGetWaitableObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000108, ObInsertObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000109, ObIsTitleObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000010A, ObLookupAnyThreadByThreadId, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000010B, ObLookupThreadByThreadId, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000010C, ObMakeTemporaryObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000010D, ObOpenObjectByName, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000010E, ObOpenObjectByPointer, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000010F, ObReferenceObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000110, ObReferenceObjectByHandle, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000111, ObReferenceObjectByName, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000112, ObSymbolicLinkObjectType, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000113, ObTranslateSymbolicLink, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000114, RtlAnsiStringToUnicodeString, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000115, RtlAppendStringToString, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000116, RtlAppendUnicodeStringToString, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000117, RtlAppendUnicodeToString, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000118, RtlAssert, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000119, RtlCaptureContext, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000011A, RtlCompareMemory, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000011B, RtlCompareMemoryUlong, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000011C, RtlCompareString, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000011D, RtlCompareStringN, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000011E, RtlCompareUnicodeString, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000011F, RtlCompareUnicodeStringN, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000120, RtlCompareUtf8ToUnicode, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000121, RtlCopyString, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000122, RtlCopyUnicodeString, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000123, RtlCreateUnicodeString, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000124, RtlDowncaseUnicodeChar, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000125, RtlEnterCriticalSection, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000126, RtlFillMemoryUlong, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000127, RtlFreeAnsiString, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000128, RtlFreeUnicodeString, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000129, RtlGetCallersAddress, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000012A, RtlGetStackLimits, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000012B, RtlImageXexHeaderField, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000012C, RtlInitAnsiString, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000012D, RtlInitUnicodeString, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000012E, RtlInitializeCriticalSection, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000012F, RtlInitializeCriticalSectionAndSpinCount, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000130, RtlLeaveCriticalSection, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000131, RtlLookupFunctionEntry, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000132, RtlLowerChar, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000133, RtlMultiByteToUnicodeN, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000134, RtlMultiByteToUnicodeSize, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000135, RtlNtStatusToDosError, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000136, RtlRaiseException, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000137, RtlRaiseStatus, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000138, RtlRip, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000139, _scprintf, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000013A, _snprintf, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000013B, sprintf, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000013C, _scwprintf, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000013D, _snwprintf, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000013E, _swprintf, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000013F, RtlTimeFieldsToTime, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000140, RtlTimeToTimeFields, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000141, RtlTryEnterCriticalSection, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000142, RtlUnicodeStringToAnsiString, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000143, RtlUnicodeToMultiByteN, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000144, RtlUnicodeToMultiByteSize, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000145, RtlUnicodeToUtf8, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000146, RtlUnicodeToUtf8Size, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000147, RtlUnwind, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000148, RtlUnwind2, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000149, RtlUpcaseUnicodeChar, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000014A, RtlUpperChar, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000014B, RtlVirtualUnwind, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000014C, _vscprintf, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000014D, _vsnprintf, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000014E, vsprintf, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000014F, _vscwprintf, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000150, _vsnwprintf, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000151, _vswprintf, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000152, KeTlsAlloc, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000153, KeTlsFree, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000154, KeTlsGetValue, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000155, KeTlsSetValue, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000156, XboxHardwareInfo, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000157, XboxKrnlBaseVersion, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000158, XboxKrnlVersion, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000159, XeCryptAesKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000015A, XeCryptAesEcb, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000015B, XeCryptAesCbc, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000015C, XeCryptBnDwLeDhEqualBase, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000015D, XeCryptBnDwLeDhInvalBase, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000015E, XeCryptBnDwLeDhModExp, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000015F, XeCryptBnDw_Copy, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000160, XeCryptBnDw_SwapLeBe, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000161, XeCryptBnDw_Zero, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000162, XeCryptBnDwLePkcs1Format, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000163, XeCryptBnDwLePkcs1Verify, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000164, XeCryptBnQwBeSigCreate, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000165, XeCryptBnQwBeSigFormat, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000166, XeCryptBnQwBeSigVerify, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000167, XeCryptBnQwNeModExp, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000168, XeCryptBnQwNeModExpRoot, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000169, XeCryptBnQwNeModInv, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000016A, XeCryptBnQwNeModMul, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000016B, XeCryptBnQwNeRsaKeyGen, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000016C, XeCryptBnQwNeRsaPrvCrypt, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000016D, XeCryptBnQwNeRsaPubCrypt, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000016E, XeCryptBnQw_Copy, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000016F, XeCryptBnQw_SwapDwQw, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000170, XeCryptBnQw_SwapDwQwLeBe, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000171, XeCryptBnQw_SwapLeBe, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000172, XeCryptBnQw_Zero, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000173, XeCryptChainAndSumMac, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000174, XeCryptDesParity, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000175, XeCryptDesKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000176, XeCryptDesEcb, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000177, XeCryptDesCbc, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000178, XeCryptDes3Key, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000179, XeCryptDes3Ecb, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000017A, XeCryptDes3Cbc, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000017B, XeCryptHmacMd5Init, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000017C, XeCryptHmacMd5Update, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000017D, XeCryptHmacMd5Final, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000017E, XeCryptHmacMd5, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000017F, XeCryptHmacShaInit, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000180, XeCryptHmacShaUpdate, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000181, XeCryptHmacShaFinal, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000182, XeCryptHmacSha, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000183, XeCryptHmacShaVerify, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000184, XeCryptMd5Init, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000185, XeCryptMd5Update, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000186, XeCryptMd5Final, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000187, XeCryptMd5, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000188, XeCryptParveEcb, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000189, XeCryptParveCbcMac, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000018A, XeCryptRandom, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000018B, XeCryptRc4Key, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000018C, XeCryptRc4Ecb, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000018D, XeCryptRc4, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000018E, XeCryptRotSumSha, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000018F, XeCryptShaInit, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000190, XeCryptShaUpdate, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000191, XeCryptShaFinal, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000192, XeCryptSha, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000193, XexExecutableModuleHandle, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000194, XexCheckExecutablePrivilege, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000195, XexGetModuleHandle, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000196, XexGetModuleSection, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000197, XexGetProcedureAddress, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000198, XexLoadExecutable, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000199, XexLoadImage, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000019A, XexLoadImageFromMemory, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000019B, XexLoadImageHeaders, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000019C, XexPcToFileHeader, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000019D, KiApcNormalRoutineNop, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000019E, XexRegisterPatchDescriptor, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000019F, XexSendDeferredNotifications, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001A0, XexStartExecutable, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001A1, XexUnloadImage, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001A2, XexUnloadImageAndExitThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001A3, XexUnloadTitleModules, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001A4, XexVerifyImageHeaders, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001A5, __C_specific_handler, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001A6, DbgLoadImageSymbols, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001A7, DbgUnLoadImageSymbols, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001A8, RtlImageDirectoryEntryToData, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001A9, RtlImageNtHeader, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001AA, ExDebugMonitorService, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001AB, MmDbgReadCheck, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001AC, MmDbgReleaseAddress, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001AD, MmDbgWriteCheck, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001AE, ExLoadedCommandLine, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001AF, ExLoadedImageName, ? , FLAG(Variable)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001B0, VdBlockUntilGUIIdle, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001B1, VdCallGraphicsNotificationRoutines, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001B2, VdDisplayFatalError, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001B3, VdEnableClosedCaption, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001B4, VdEnableDisableClockGating, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001B5, VdEnableDisablePowerSavingMode, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001B6, VdEnableRingBufferRPtrWriteBack, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001B7, VdGenerateGPUCSCCoefficients, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001B8, VdGetClosedCaptionReadyStatus, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001B9, VdGetCurrentDisplayGamma, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001BA, VdGetCurrentDisplayInformation, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001BB, VdGetDisplayModeOverride, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001BC, VdGetGraphicsAsicID, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001BD, VdGetSystemCommandBuffer, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001BE, VdGlobalDevice, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001BF, VdGlobalXamDevice, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001C0, VdGpuClockInMHz, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001C1, VdHSIOCalibrationLock, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001C2, VdInitializeEngines, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001C3, VdInitializeRingBuffer, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001C4, VdInitializeScaler, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001C5, VdInitializeScalerCommandBuffer, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001C6, VdIsHSIOTrainingSucceeded, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001C7, VdPersistDisplay, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001C8, VdQuerySystemCommandBuffer, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001C9, VdQueryVideoFlags, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001CA, VdQueryVideoMode, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001CB, VdReadDVERegisterUlong, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001CC, VdReadWriteHSIOCalibrationFlag, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001CD, VdRegisterGraphicsNotification, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001CE, VdRegisterXamGraphicsNotification, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001CF, VdSendClosedCaptionData, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001D0, VdSetCGMSOption, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001D1, VdSetColorProfileAdjustment, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001D2, VdSetCscMatricesOverride, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001D3, VdSetDisplayMode, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001D4, VdSetDisplayModeOverride, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001D5, VdSetGraphicsInterruptCallback, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001D6, VdSetHDCPOption, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001D7, VdSetMacrovisionOption, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001D8, VdSetSystemCommandBuffer, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001D9, VdSetSystemCommandBufferGpuIdentifierAddress, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001DA, VdSetWSSData, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001DB, VdSetWSSOption, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001DC, VdShutdownEngines, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001DD, VdTurnDisplayOff, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001DE, VdTurnDisplayOn, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001DF, KiApcNormalRoutineNop, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001E0, VdWriteDVERegisterUlong, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001E1, XVoicedHeadsetPresent, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001E2, XVoicedSubmitPacket, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001E3, XVoicedClose, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001E4, XVoicedActivate, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001E5, XInputdGetCapabilities, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001E6, XInputdReadState, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001E7, XInputdWriteState, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001E8, XInputdNotify, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001E9, XInputdRawState, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001EA, HidGetCapabilities, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001EB, HidReadKeys, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001EC, XInputdGetDeviceStats, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001ED, XInputdResetDevice, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001EE, XInputdSetRingOfLight, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001EF, XInputdSetRFPowerMode, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001F0, XInputdSetRadioFrequency, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001F1, HidGetLastInputTime, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001F2, XAudioRenderDriverInitialize, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001F3, XAudioRegisterRenderDriverClient, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001F4, XAudioUnregisterRenderDriverClient, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001F5, XAudioSubmitRenderDriverFrame, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001F6, XAudioRenderDriverLock, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001F7, XAudioGetVoiceCategoryVolumeChangeMask, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001F8, XAudioGetVoiceCategoryVolume, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001F9, XAudioSetVoiceCategoryVolume, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001FA, XAudioBeginDigitalBypassMode, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001FB, XAudioEndDigitalBypassMode, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001FC, XAudioSubmitDigitalPacket, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001FD, XAudioQueryDriverPerformance, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001FE, XAudioGetRenderDriverThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000001FF, XAudioGetSpeakerConfig, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000200, XAudioSetSpeakerConfig, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000201, NicSetUnicastAddress, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000202, NicAttach, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000203, NicDetach, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000204, NicXmit, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000205, NicUpdateMcastMembership, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000206, NicFlushXmitQueue, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000207, NicShutdown, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000208, NicGetLinkState, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000209, NicGetStats, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000020A, NicGetOpt, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000020B, NicSetOpt, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000020C, DrvSetSysReqCallback, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000020D, DrvSetUserBindingCallback, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000020E, DrvSetContentStorageCallback, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000020F, DrvSetAutobind, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000210, DrvGetContentStorageNotification, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000211, MtpdBeginTransaction, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000212, MtpdCancelTransaction, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000213, MtpdEndTransaction, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000214, MtpdGetCurrentDevices, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000215, MtpdReadData, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000216, MtpdReadEvent, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000217, MtpdResetDevice, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000218, MtpdSendData, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000219, MtpdVerifyProximity, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000021A, XUsbcamSetCaptureMode, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000021B, XUsbcamGetConfig, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000021C, XUsbcamSetConfig, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000021D, XUsbcamGetState, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000021E, XUsbcamReadFrame, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000021F, XUsbcamSnapshot, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000220, XUsbcamSetView, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000221, XUsbcamGetView, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000222, XUsbcamCreate, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000223, XUsbcamDestroy, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000224, XMACreateContext, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000225, XMAInitializeContext, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000226, XMAReleaseContext, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000227, XMAEnableContext, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000228, XMADisableContext, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000229, XMAGetOutputBufferWriteOffset, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000022A, XMASetOutputBufferReadOffset, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000022B, XMAGetOutputBufferReadOffset, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000022C, XMASetOutputBufferValid, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000022D, XMAIsOutputBufferValid, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000022E, XMASetInputBuffer0Valid, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000022F, XMAIsInputBuffer0Valid, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000230, XMASetInputBuffer1Valid, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000231, XMAIsInputBuffer1Valid, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000232, XMASetInputBuffer0, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000233, XMASetInputBuffer1, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000234, XMAGetPacketMetadata, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000235, XMABlockWhileInUse, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000236, XMASetLoopData, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000237, XMASetInputBufferReadOffset, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000238, XMAGetInputBufferReadOffset, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000239, ExIsBetaFeatureEnabled, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000023A, XeKeysGetFactoryChallenge, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000023B, XeKeysSetFactoryResponse, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000023C, XeKeysInitializeFuses, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000023D, XeKeysSaveBootLoader, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000023E, XeKeysSaveKeyVault, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000023F, XeKeysGetStatus, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000240, XeKeysGeneratePrivateKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000241, XeKeysGetKeyProperties, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000242, XeKeysSetKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000243, XeKeysGenerateRandomKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000244, XeKeysGetKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000245, XeKeysGetDigest, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000246, XeKeysGetConsoleID, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000247, XeKeysGetConsoleType, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000248, XeKeysQwNeRsaPrvCrypt, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000249, XeKeysHmacSha, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000024A, XInputdPassThroughRFCommand, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000024B, XeKeysAesCbc, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000024C, XeKeysDes2Cbc, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000024D, XeKeysDesCbc, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000024E, XeKeysObscureKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000024F, XeKeysHmacShaUsingKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000250, XeKeysSaveBootLoaderEx, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000251, XeKeysAesCbcUsingKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000252, XeKeysDes2CbcUsingKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000253, XeKeysDesCbcUsingKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000254, XeKeysObfuscate, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000255, XeKeysUnObfuscate, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000256, XeKeysConsolePrivateKeySign, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000257, XeKeysConsoleSignatureVerification, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000258, XeKeysVerifyRSASignature, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000259, StfsCreateDevice, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000025A, StfsControlDevice, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000025B, VdSwap, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000025C, HalFsbInterruptCount, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000025D, XeKeysSaveSystemUpdate, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000025E, XeKeysLockSystemUpdate, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000025F, XeKeysExecute, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000260, XeKeysGetVersions, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000261, XInputdPowerDownDevice, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000262, AniBlockOnAnimation, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000263, AniTerminateAnimation, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000264, XUsbcamReset, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000265, AniSetLogo, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000266, KeCertMonitorData, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000267, HalIsExecutingPowerDownDpc, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000268, VdInitializeEDRAM, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000269, VdRetrainEDRAM, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000026A, VdRetrainEDRAMWorker, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000026B, VdHSIOTrainCount, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000026C, HalGetPowerUpCause, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000026D, VdHSIOTrainingStatus, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000026E, RgcBindInfo, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000026F, VdReadEEDIDBlock, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000270, VdEnumerateVideoModes, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000271, VdEnableHDCP, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000272, VdRegisterHDCPNotification, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000273, HidReadMouseChanges, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000274, DumpSetCollectionFacility, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000275, XexTransformImageKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000276, XAudioOverrideSpeakerConfig, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000277, XInputdReadTextKeystroke, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000278, DrvXenonButtonPressed, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000279, DrvBindToUser, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000027A, XexGetModuleImportVersions, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000027B, RtlComputeCrc32, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000027C, XeKeysSetRevocationList, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000027D, HalRegisterPowerDownCallback, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000027E, VdGetDisplayDiscoveryData, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000027F, XInputdSendStayAliveRequest, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000280, XVoicedSendVPort, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000281, XVoicedGetBatteryStatus, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000282, XInputdFFGetDeviceInfo, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000283, XInputdFFSetEffect, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000284, XInputdFFUpdateEffect, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000285, XInputdFFEffectOperation, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000286, XInputdFFDeviceControl, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000287, XInputdFFSetDeviceGain, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000288, XInputdFFCancelIo, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000289, XInputdFFSetRumble, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000028A, NtAllocateEncryptedMemory, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000028B, NtFreeEncryptedMemory, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000028C, XeKeysExSaveKeyVault, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000028D, XeKeysExSetKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000028E, XeKeysExGetKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000028F, DrvSetDeviceConfigChangeCallback, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000290, DrvDeviceConfigChange, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000291, HalRegisterHdDvdRomNotification, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000292, XeKeysSecurityInitialize, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000293, XeKeysSecurityLoadSettings, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000294, XeKeysSecuritySaveSettings, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000295, XeKeysSecuritySetDetected, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000296, XeKeysSecurityGetDetected, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000297, XeKeysSecuritySetActivated, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000298, XeKeysSecurityGetActivated, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000299, XeKeysDvdAuthAP25InstallTable, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000029A, XeKeysDvdAuthAP25GetTableVersion, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000029B, XeKeysGetProtectedFlag, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000029C, XeKeysSetProtectedFlag, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000029D, KeEnablePFMInterrupt, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000029E, KeDisablePFMInterrupt, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000029F, KeSetProfilerISR, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002A0, VdStartDisplayDiscovery, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002A1, VdSetHDCPRevocationList, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002A2, XeKeysGetUpdateSequence, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002A3, XeKeysDvdAuthExActivate, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002A4, KeGetImagePageTableEntry, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002A5, HalRegisterBackgroundModeTransitionCallback, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002A6, AniStartBootAnimation, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002A7, HalClampUnclampOutputDACs, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002A8, HalPowerDownToBackgroundMode, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002A9, HalNotifyAddRemoveBackgroundTask, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002AA, HalCallBackgroundModeNotificationRoutines, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002AB, HalFsbResetCount, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002AC, HalGetMemoryInformation, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002AD, XInputdGetLastTextInputTime, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002AE, VdEnableWMAProOverHDMI, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002AF, XeKeysRevokeSaveSettings, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002B0, XInputdSetTextMessengerIndicator, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002B1, MicDeviceRequest, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002B2, XeKeysGetMediaID, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002B3, XeKeysLoadKeyVault, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002B4, KeGetVidInfo, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002B5, HalNotifyBackgroundModeTransitionComplete, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002B6, IoAcquireCancelSpinLock, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002B7, IoReleaseCancelSpinLock, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002B8, NtCancelIoFile, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002B9, NtCancelIoFileEx, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002BA, HalFinalizePowerLossRecovery, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002BB, HalSetPowerLossRecovery, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002BC, ExReadModifyWriteXConfigSettingUlong, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002BD, HalRegisterXamPowerDownCallback, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002BE, ExCancelAlarm, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002BF, ExInitializeAlarm, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002C0, ExSetAlarm, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002C1, XexActivationGetNonce, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002C2, XexActivationSetLicense, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002C3, IptvSetBoundaryKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002C4, IptvSetSessionKey, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002C5, IptvVerifyOmac1Signature, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002C6, IptvGetAesCtrTransform, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002C7, SataCdRomRecordReset, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002C8, XInputdSetTextDeviceKeyLocks, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002C9, XInputdGetTextDeviceKeyLocks, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002CA, XexActivationVerifyOwnership, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002CB, XexDisableVerboseDbgPrint, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002CC, SvodCreateDevice, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002CD, RtlCaptureStackBackTrace, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002CE, XeKeysRevokeUpdateDynamic, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002CF, XexImportTraceEnable, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002D0, ExRegisterXConfigNotification, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002D1, XeKeysSecuritySetStat, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002D2, VdQueryRealVideoMode, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002D3, XexSetExecutablePrivilege, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002D4, XAudioSuspendRenderDriverClients, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002D5, IptvGetSessionKeyHash, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002D6, VdSetCGMSState, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002D7, VdSetSCMSState, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002D8, KeFlushMultipleTb, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002D9, VdGetOption, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002DA, VdSetOption, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002DB, UsbdBootEnumerationDoneEvent, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002DC, StfsDeviceErrorEvent, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002DD, ExTryToAcquireReadWriteLockExclusive, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002DE, ExTryToAcquireReadWriteLockShared, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002DF, XexSetLastKdcTime, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002E0, XInputdControl, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002E1, RmcDeviceRequest, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002E2, LDIResetDecompression, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002E3, NicRegisterDevice, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002E4, UsbdAddDeviceComplete, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002E5, UsbdCancelAsyncTransfer, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002E6, UsbdGetDeviceSpeed, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002E7, UsbdGetDeviceTopology, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002E8, UsbdGetEndpointDescriptor, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002E9, UsbdIsDeviceAuthenticated, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002EA, UsbdOpenDefaultEndpoint, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002EB, UsbdOpenEndpoint, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002EC, UsbdQueueAsyncTransfer, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002ED, UsbdQueueCloseDefaultEndpoint, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002EE, UsbdQueueCloseEndpoint, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002EF, UsbdRemoveDeviceComplete, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002F0, KeRemoveQueueApc, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002F1, UsbdDriverLoadRequiredEvent, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002F2, UsbdGetRequiredDrivers, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002F3, UsbdRegisterDriverObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002F4, UsbdUnregisterDriverObject, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002F5, UsbdCallAndBlockOnDpcRoutine, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002F6, UsbdResetDevice, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002F7, UsbdGetDeviceDescriptor, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002F8, NomnilGetExtension, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002F9, NomnilStartCloseDevice, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002FA, WifiBeginAuthentication, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002FB, WifiCheckCounterMeasures, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002FC, WifiChooseAuthenCipherSetFromBSSID, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002FD, WifiCompleteAuthentication, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002FE, WifiGetAssociationIE, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x000002FF, WifiOnMICError, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000300, WifiPrepareAuthenticationContext, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000301, WifiRecvEAPOLPacket, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000302, WifiDeduceNetworkType, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000303, NicUnregisterDevice, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000304, DumpXitThread, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000305, XInputdSetWifiChannel, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000306, NomnilSetLed, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000307, WifiCalculateRegulatoryDomain, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000308, WifiSelectAdHocChannel, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000309, WifiChannelToFrequency, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000030A, MmGetPoolPagesType, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000030B, ExExpansionInstall, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000030C, ExExpansionCall, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000030D, PsCamDeviceRequest, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000030E, McaDeviceRequest, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000030F, DetroitDeviceRequest, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000310, XeCryptSha256Init, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000311, XeCryptSha256Update, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000312, XeCryptSha256Final, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000313, XeCryptSha256, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000314, XeCryptSha384Init, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000315, XeCryptSha384Update, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000316, XInputdGetDevicePid, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000317, HalGetNotedArgonErrors, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000318, XeCryptSha384Final, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000319, HalReadArgonEeprom, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000031A, HalWriteArgonEeprom, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000031B, XeKeysFcrtLoad, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000031C, XeKeysFcrtSave, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000031D, XeKeysFcrtSet, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000031E, XeCryptSha384, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000031F, XeCryptSha512Init, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000320, XAudioRegisterRenderDriverMECClient, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000321, XAudioUnregisterRenderDriverMECClient, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000322, XAudioCaptureRenderDriverFrame, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000323, XeCryptSha512Update, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000324, XeCryptSha512Final, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000325, XeCryptSha512, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000326, XeCryptBnQwNeCompare, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000327, XVoicedGetDirectionalData, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000328, DrvSetMicArrayStartCallback, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000329, DevAuthGetStatistics, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000032A, NullCableRequest, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000032B, XeKeysRevokeIsDeviceRevoked, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000032C, DumpUpdateDumpSettings, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000032D, EtxConsumerDisableEventType, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000032E, EtxConsumerEnableEventType, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000032F, EtxConsumerProcessLogs, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000330, EtxConsumerRegister, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000331, EtxConsumerUnregister, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000332, EtxProducerLog, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000333, EtxProducerLogV, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000334, EtxProducerRegister, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000335, EtxProducerUnregister, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000336, EtxConsumerFlushBuffers, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000337, EtxProducerLogXwpp, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000338, EtxProducerLogXwppV, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000339, UsbdEnableDisableRootHubPort, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000033A, EtxBufferRegister, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000033B, EtxBufferUnregister, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000033C, DumpRegisterDedicatedDataBlock, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000033D, XeKeysDvdAuthExSave, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000033E, XeKeysDvdAuthExInstall, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000033F, XexShimDisable, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000340, XexShimEnable, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000341, XexShimEntryDisable, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000342, XexShimEntryEnable, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000343, XexShimEntryRegister, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000344, XexShimLock, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000345, XboxKrnlVersion4Digit, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000346, XeKeysObfuscateEx, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000347, XeKeysUnObfuscateEx, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000348, XexTitleHash, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000349, XexTitleHashClose, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000034A, XexTitleHashContinue, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000034B, XexTitleHashOpen, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000034C, XAudioGetRenderDriverTic, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000034D, XAudioEnableDucker, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000034E, XAudioSetDuckerLevel, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000034F, XAudioIsDuckerEnabled, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000350, XAudioGetDuckerLevel, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000351, XAudioGetDuckerThreshold, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000352, XAudioSetDuckerThreshold, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000353, XAudioGetDuckerAttackTime, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000354, XAudioSetDuckerAttackTime, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000355, XAudioGetDuckerReleaseTime, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000356, XAudioSetDuckerReleaseTime, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000357, XAudioGetDuckerHoldTime, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000358, XAudioSetDuckerHoldTime, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x00000359, DevAuthShouldAlwaysEnforce, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000035A, XAudioGetUnderrunCount, ? , FLAG(Function)),
|
||||
XE_DECLARE_EXPORT(xboxkrnl, 0x0000035C, XVoicedIsActiveProcess, ? , FLAG(Function)),
|
||||
};
|
||||
|
||||
|
||||
#undef FLAG
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_MODULES_XBOXKRNL_TABLE_H_
|
||||
13
src/kernel/sources.gypi
Normal file
13
src/kernel/sources.gypi
Normal file
@@ -0,0 +1,13 @@
|
||||
# Copyright 2013 Ben Vanik. All Rights Reserved.
|
||||
{
|
||||
'sources': [
|
||||
'export.cc',
|
||||
'kernel.cc',
|
||||
'module.cc',
|
||||
'xex2.cc',
|
||||
],
|
||||
|
||||
'includes': [
|
||||
'modules/sources.gypi',
|
||||
],
|
||||
}
|
||||
829
src/kernel/xex2.cc
Normal file
829
src/kernel/xex2.cc
Normal file
@@ -0,0 +1,829 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xex2.h>
|
||||
|
||||
#include <third_party/crypto/rijndael-alg-fst.h>
|
||||
#include <third_party/crypto/rijndael-alg-fst.c>
|
||||
#include <third_party/mspack/lzx.h>
|
||||
#include <third_party/mspack/lzxd.c>
|
||||
#include <third_party/mspack/mspack.h>
|
||||
|
||||
|
||||
typedef struct xe_xex2 {
|
||||
xe_ref_t ref;
|
||||
|
||||
xe_memory_ref memory;
|
||||
|
||||
xe_xex2_header_t header;
|
||||
} xe_xex2_t;
|
||||
|
||||
|
||||
int xe_xex2_read_header(const uint8_t *addr, const size_t length,
|
||||
xe_xex2_header_t *header);
|
||||
int xe_xex2_decrypt_key(xe_xex2_header_t *header);
|
||||
int xe_xex2_read_image(xe_xex2_ref xex,
|
||||
const uint8_t *xex_addr, const size_t xex_length,
|
||||
xe_memory_ref memory);
|
||||
|
||||
|
||||
xe_xex2_ref xe_xex2_load(xe_memory_ref memory,
|
||||
const void* addr, const size_t length,
|
||||
xe_xex2_options_t options) {
|
||||
xe_xex2_ref xex = (xe_xex2_ref)xe_calloc(sizeof(xe_xex2));
|
||||
xe_ref_init((xe_ref)xex);
|
||||
|
||||
xex->memory = xe_memory_retain(memory);
|
||||
|
||||
XEEXPECTZERO(xe_xex2_read_header((const uint8_t*)addr, length, &xex->header));
|
||||
|
||||
XEEXPECTZERO(xe_xex2_decrypt_key(&xex->header));
|
||||
|
||||
XEEXPECTZERO(xe_xex2_read_image(xex, (const uint8_t*)addr, length, memory));
|
||||
|
||||
return xex;
|
||||
|
||||
XECLEANUP:
|
||||
xe_xex2_release(xex);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void xe_xex2_dealloc(xe_xex2_ref xex) {
|
||||
xe_xex2_header_t *header = &xex->header;
|
||||
xe_free(header->sections);
|
||||
if (header->file_format_info.compression_type == XEX_COMPRESSION_BASIC) {
|
||||
xe_free(header->file_format_info.compression_info.basic.blocks);
|
||||
}
|
||||
for (size_t n = 0; n < header->import_library_count; n++) {
|
||||
xe_xex2_import_library_t *library = &header->import_libraries[n];
|
||||
xe_free(library->records);
|
||||
}
|
||||
|
||||
xe_memory_release(xex->memory);
|
||||
}
|
||||
|
||||
xe_xex2_ref xe_xex2_retain(xe_xex2_ref xex) {
|
||||
xe_ref_retain((xe_ref)xex);
|
||||
return xex;
|
||||
}
|
||||
|
||||
void xe_xex2_release(xe_xex2_ref xex) {
|
||||
xe_ref_release((xe_ref)xex, (xe_ref_dealloc_t)xe_xex2_dealloc);
|
||||
}
|
||||
|
||||
const xechar_t* xe_xex2_get_name(xe_xex2_ref xex) {
|
||||
// TODO(benvanik): get name.
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const xe_xex2_header_t* xe_xex2_get_header(xe_xex2_ref xex) {
|
||||
return &xex->header;
|
||||
}
|
||||
|
||||
int xe_xex2_read_header(const uint8_t *addr, const size_t length,
|
||||
xe_xex2_header_t *header) {
|
||||
const uint8_t *p = addr;
|
||||
const uint8_t *pc;
|
||||
const uint8_t *ps;
|
||||
xe_xex2_loader_info_t *ldr;
|
||||
|
||||
header->xex2 = XEGETUINT32BE(p + 0x00);
|
||||
if (header->xex2 != 0x58455832) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
header->module_flags = (xe_xex2_module_flags)XEGETUINT32BE(p + 0x04);
|
||||
header->exe_offset = XEGETUINT32BE(p + 0x08);
|
||||
header->unknown0 = XEGETUINT32BE(p + 0x0C);
|
||||
header->certificate_offset = XEGETUINT32BE(p + 0x10);
|
||||
header->header_count = XEGETUINT32BE(p + 0x14);
|
||||
|
||||
for (size_t n = 0; n < header->header_count; n++) {
|
||||
const uint8_t *ph = p + 0x18 + (n * 8);
|
||||
const uint32_t key = XEGETUINT32BE(ph + 0x00);
|
||||
const uint32_t data_offset = XEGETUINT32BE(ph + 0x04);
|
||||
|
||||
xe_xex2_opt_header_t *opt_header = &header->headers[n];
|
||||
opt_header->key = key;
|
||||
switch (key & 0xFF) {
|
||||
case 0x01:
|
||||
// dataOffset = data
|
||||
opt_header->length = 0;
|
||||
opt_header->value = data_offset;
|
||||
break;
|
||||
case 0xFF:
|
||||
// dataOffset = offset (first dword in data is size)
|
||||
opt_header->length = XEGETUINT32BE(p + data_offset);
|
||||
opt_header->offset = data_offset;
|
||||
break;
|
||||
default:
|
||||
// dataOffset = size in dwords
|
||||
opt_header->length = (key & 0xFF) * 4;
|
||||
opt_header->offset = data_offset;
|
||||
break;
|
||||
}
|
||||
|
||||
const uint8_t *pp = p + opt_header->offset;
|
||||
switch (opt_header->key) {
|
||||
case XEX_HEADER_SYSTEM_FLAGS:
|
||||
header->system_flags = (xe_xex2_system_flags)data_offset;
|
||||
break;
|
||||
case XEX_HEADER_RESOURCE_INFO:
|
||||
{
|
||||
xe_xex2_resource_info_t *res = &header->resource_info;
|
||||
XEEXPECTZERO(xe_copy_memory(res->title_id,
|
||||
sizeof(res->title_id), pp + 0x04, 8));
|
||||
res->address = XEGETUINT32BE(pp + 0x0C);
|
||||
res->size = XEGETUINT32BE(pp + 0x10);
|
||||
if ((opt_header->length - 4) / 16 > 1) {
|
||||
// Ignoring extra resources (not yet seen)
|
||||
XELOGW(XT("ignoring extra XEX_HEADER_RESOURCE_INFO resources"));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case XEX_HEADER_EXECUTION_INFO:
|
||||
{
|
||||
xe_xex2_execution_info_t *ex = &header->execution_info;
|
||||
ex->media_id = XEGETUINT32BE(pp + 0x00);
|
||||
ex->version.value = XEGETUINT32BE(pp + 0x04);
|
||||
ex->base_version.value = XEGETUINT32BE(pp + 0x08);
|
||||
ex->title_id = XEGETUINT32BE(pp + 0x0C);
|
||||
ex->platform = XEGETUINT8BE(pp + 0x10);
|
||||
ex->executable_table = XEGETUINT8BE(pp + 0x11);
|
||||
ex->disc_number = XEGETUINT8BE(pp + 0x12);
|
||||
ex->disc_count = XEGETUINT8BE(pp + 0x13);
|
||||
ex->savegame_id = XEGETUINT32BE(pp + 0x14);
|
||||
}
|
||||
break;
|
||||
case XEX_HEADER_GAME_RATINGS:
|
||||
{
|
||||
xe_xex2_game_ratings_t *ratings = &header->game_ratings;
|
||||
ratings->esrb = (xe_xex2_rating_esrb_value)XEGETUINT8BE(pp + 0x00);
|
||||
ratings->pegi = (xe_xex2_rating_pegi_value)XEGETUINT8BE(pp + 0x01);
|
||||
ratings->pegifi = (xe_xex2_rating_pegi_fi_value)XEGETUINT8BE(pp + 0x02);
|
||||
ratings->pegipt = (xe_xex2_rating_pegi_pt_value)XEGETUINT8BE(pp + 0x03);
|
||||
ratings->bbfc = (xe_xex2_rating_bbfc_value)XEGETUINT8BE(pp + 0x04);
|
||||
ratings->cero = (xe_xex2_rating_cero_value)XEGETUINT8BE(pp + 0x05);
|
||||
ratings->usk = (xe_xex2_rating_usk_value)XEGETUINT8BE(pp + 0x06);
|
||||
ratings->oflcau = (xe_xex2_rating_oflc_au_value)XEGETUINT8BE(pp + 0x07);
|
||||
ratings->oflcnz = (xe_xex2_rating_oflc_nz_value)XEGETUINT8BE(pp + 0x08);
|
||||
ratings->kmrb = (xe_xex2_rating_kmrb_value)XEGETUINT8BE(pp + 0x09);
|
||||
ratings->brazil = (xe_xex2_rating_brazil_value)XEGETUINT8BE(pp + 0x0A);
|
||||
ratings->fpb = (xe_xex2_rating_fpb_value)XEGETUINT8BE(pp + 0x0B);
|
||||
}
|
||||
break;
|
||||
case XEX_HEADER_TLS_INFO:
|
||||
{
|
||||
xe_xex2_tls_info_t *tls = &header->tls_info;
|
||||
tls->slot_count = XEGETUINT32BE(pp + 0x00);
|
||||
tls->raw_data_address = XEGETUINT32BE(pp + 0x04);
|
||||
tls->data_size = XEGETUINT32BE(pp + 0x08);
|
||||
tls->raw_data_size = XEGETUINT32BE(pp + 0x0C);
|
||||
}
|
||||
break;
|
||||
case XEX_HEADER_IMAGE_BASE_ADDRESS:
|
||||
header->exe_address = opt_header->value;
|
||||
break;
|
||||
case XEX_HEADER_ENTRY_POINT:
|
||||
header->exe_entry_point = opt_header->value;
|
||||
break;
|
||||
case XEX_HEADER_DEFAULT_STACK_SIZE:
|
||||
header->exe_stack_size = opt_header->value;
|
||||
break;
|
||||
case XEX_HEADER_DEFAULT_HEAP_SIZE:
|
||||
header->exe_heap_size = opt_header->value;
|
||||
break;
|
||||
case XEX_HEADER_IMPORT_LIBRARIES:
|
||||
{
|
||||
const size_t max_count = XECOUNT(header->import_libraries);
|
||||
size_t count = XEGETUINT32BE(pp + 0x08);
|
||||
XEASSERT(count <= max_count);
|
||||
if (count > max_count) {
|
||||
XELOGW(XT("ignoring %zu extra entries in "
|
||||
"XEX_HEADER_IMPORT_LIBRARIES"), (max_count - count));
|
||||
count = max_count;
|
||||
}
|
||||
header->import_library_count = count;
|
||||
|
||||
uint32_t string_table_size = XEGETUINT32BE(pp + 0x04);
|
||||
const char *string_table = (const char*)(pp + 0x0C);
|
||||
|
||||
pp += 12 + string_table_size;
|
||||
for (size_t m = 0; m < count; m++) {
|
||||
xe_xex2_import_library_t *library = &header->import_libraries[m];
|
||||
XEEXPECTZERO(xe_copy_memory(library->digest, sizeof(library->digest),
|
||||
pp + 0x04, 20));
|
||||
library->import_id = XEGETUINT32BE(pp + 0x18);
|
||||
library->version.value = XEGETUINT32BE(pp + 0x1C);
|
||||
library->min_version.value = XEGETUINT32BE(pp + 0x20);
|
||||
|
||||
const uint16_t name_index = XEGETUINT16BE(pp + 0x24);
|
||||
for (size_t i = 0, j = 0; i < string_table_size;) {
|
||||
if (j == name_index) {
|
||||
XEIGNORE(xestrcpya(library->name, XECOUNT(library->name),
|
||||
string_table + i));
|
||||
break;
|
||||
}
|
||||
if (string_table[i] == 0) {
|
||||
i++;
|
||||
if (i % 4) {
|
||||
i += 4 - (i % 4);
|
||||
}
|
||||
j++;
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
library->record_count = XEGETUINT16BE(pp + 0x26);
|
||||
library->records = (uint32_t*)xe_calloc(
|
||||
library->record_count * sizeof(uint32_t));
|
||||
XEEXPECTNOTNULL(library->records);
|
||||
pp += 0x28;
|
||||
for (size_t i = 0; i < library->record_count; i++) {
|
||||
library->records[i] = XEGETUINT32BE(pp);
|
||||
pp += 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case XEX_HEADER_STATIC_LIBRARIES:
|
||||
{
|
||||
const size_t max_count = XECOUNT(header->static_libraries);
|
||||
size_t count = (opt_header->length - 4) / 16;
|
||||
XEASSERT(count <= max_count);
|
||||
if (count > max_count) {
|
||||
XELOGW(XT("ignoring %zu extra entries in "
|
||||
"XEX_HEADER_STATIC_LIBRARIES"), (max_count - count));
|
||||
count = max_count;
|
||||
}
|
||||
header->static_library_count = count;
|
||||
pp += 4;
|
||||
for (size_t m = 0; m < count; m++) {
|
||||
xe_xex2_static_library_t *library = &header->static_libraries[m];
|
||||
XEEXPECTZERO(xe_copy_memory(library->name, sizeof(library->name),
|
||||
pp + 0x00, 8));
|
||||
library->name[8] = 0;
|
||||
library->major = XEGETUINT16BE(pp + 0x08);
|
||||
library->minor = XEGETUINT16BE(pp + 0x0A);
|
||||
library->build = XEGETUINT16BE(pp + 0x0C);
|
||||
uint16_t qfeapproval = XEGETUINT16BE(pp + 0x0E);
|
||||
library->approval = (xe_xex2_approval_type)(qfeapproval & 0x8000);
|
||||
library->qfe = qfeapproval & ~0x8000;
|
||||
pp += 16;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case XEX_HEADER_FILE_FORMAT_INFO:
|
||||
{
|
||||
xe_xex2_file_format_info_t *fmt = &header->file_format_info;
|
||||
fmt->encryption_type =
|
||||
(xe_xex2_encryption_type)XEGETUINT16BE(pp + 0x04);
|
||||
fmt->compression_type =
|
||||
(xe_xex2_compression_type)XEGETUINT16BE(pp + 0x06);
|
||||
switch (fmt->compression_type) {
|
||||
case XEX_COMPRESSION_NONE:
|
||||
// TODO: XEX_COMPRESSION_NONE
|
||||
XEASSERTALWAYS();
|
||||
break;
|
||||
case XEX_COMPRESSION_BASIC:
|
||||
{
|
||||
xe_xex2_file_basic_compression_info_t *comp_info =
|
||||
&fmt->compression_info.basic;
|
||||
uint32_t info_size = XEGETUINT32BE(pp + 0x00);
|
||||
comp_info->block_count = (info_size - 8) / 8;
|
||||
comp_info->blocks = (xe_xex2_file_basic_compression_block_t*)
|
||||
xe_calloc(comp_info->block_count *
|
||||
sizeof(xe_xex2_file_basic_compression_block_t));
|
||||
XEEXPECTNOTNULL(comp_info->blocks);
|
||||
for (size_t m = 0; m < comp_info->block_count; m++) {
|
||||
xe_xex2_file_basic_compression_block_t *block =
|
||||
&comp_info->blocks[m];
|
||||
block->data_size = XEGETUINT32BE(pp + 0x08 + (m * 8));
|
||||
block->zero_size = XEGETUINT32BE(pp + 0x0C + (m * 8));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case XEX_COMPRESSION_NORMAL:
|
||||
{
|
||||
xe_xex2_file_normal_compression_info_t *comp_info =
|
||||
&fmt->compression_info.normal;
|
||||
uint32_t window_size = XEGETUINT32BE(pp + 0x08);
|
||||
uint32_t window_bits = 0;
|
||||
for (size_t m = 0; m < 32; m++, window_bits++) {
|
||||
window_size <<= 1;
|
||||
if (window_size == 0x80000000) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
comp_info->window_size = XEGETUINT32BE(pp + 0x08);
|
||||
comp_info->window_bits = window_bits;
|
||||
comp_info->block_size = XEGETUINT32BE(pp + 0x0C);
|
||||
XEEXPECTZERO(xe_copy_memory(comp_info->block_hash,
|
||||
sizeof(comp_info->block_hash),
|
||||
pp + 0x10, 20));
|
||||
}
|
||||
break;
|
||||
case XEX_COMPRESSION_DELTA:
|
||||
// TODO: XEX_COMPRESSION_DELTA
|
||||
XEASSERTALWAYS();
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Loader info.
|
||||
pc = p + header->certificate_offset;
|
||||
ldr = &header->loader_info;
|
||||
ldr->header_size = XEGETUINT32BE(pc + 0x000);
|
||||
ldr->image_size = XEGETUINT32BE(pc + 0x004);
|
||||
XEEXPECTZERO(xe_copy_memory(ldr->rsa_signature, sizeof(ldr->rsa_signature),
|
||||
pc + 0x008, 256));
|
||||
ldr->unklength = XEGETUINT32BE(pc + 0x108);
|
||||
ldr->image_flags = (xe_xex2_image_flags)XEGETUINT32BE(pc + 0x10C);
|
||||
ldr->load_address = XEGETUINT32BE(pc + 0x110);
|
||||
XEEXPECTZERO(xe_copy_memory(ldr->section_digest, sizeof(ldr->section_digest),
|
||||
pc + 0x114, 20));
|
||||
ldr->import_table_count = XEGETUINT32BE(pc + 0x128);
|
||||
XEEXPECTZERO(xe_copy_memory(ldr->import_table_digest,
|
||||
sizeof(ldr->import_table_digest),
|
||||
pc + 0x12C, 20));
|
||||
XEEXPECTZERO(xe_copy_memory(ldr->media_id, sizeof(ldr->media_id),
|
||||
pc + 0x140, 16));
|
||||
XEEXPECTZERO(xe_copy_memory(ldr->file_key, sizeof(ldr->file_key),
|
||||
pc + 0x150, 16));
|
||||
ldr->export_table = XEGETUINT32BE(pc + 0x160);
|
||||
XEEXPECTZERO(xe_copy_memory(ldr->header_digest, sizeof(ldr->header_digest),
|
||||
pc + 0x164, 20));
|
||||
ldr->game_regions = (xe_xex2_region_flags)XEGETUINT32BE(pc + 0x178);
|
||||
ldr->media_flags = (xe_xex2_media_flags)XEGETUINT32BE(pc + 0x17C);
|
||||
|
||||
// Section info follows loader info.
|
||||
ps = p + header->certificate_offset + 0x180;
|
||||
header->section_count = XEGETUINT32BE(ps + 0x000);
|
||||
ps += 4;
|
||||
header->sections = (xe_xex2_section_t*)xe_calloc(
|
||||
header->section_count * sizeof(xe_xex2_section_t));
|
||||
XEEXPECTNOTNULL(header->sections);
|
||||
for (size_t n = 0; n < header->section_count; n++) {
|
||||
xe_xex2_section_t *section = &header->sections[n];
|
||||
section->info.value = XEGETUINT32BE(ps);
|
||||
ps += 4;
|
||||
XEEXPECTZERO(xe_copy_memory(section->digest, sizeof(section->digest), ps,
|
||||
sizeof(section->digest)));
|
||||
ps += sizeof(section->digest);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
XECLEANUP:
|
||||
return 1;
|
||||
}
|
||||
|
||||
int xe_xex2_decrypt_key(xe_xex2_header_t *header) {
|
||||
const static uint8_t xe_xex2_retail_key[16] = {
|
||||
0x20, 0xB1, 0x85, 0xA5, 0x9D, 0x28, 0xFD, 0xC3,
|
||||
0x40, 0x58, 0x3F, 0xBB, 0x08, 0x96, 0xBF, 0x91
|
||||
};
|
||||
const static uint8_t xe_xex2_devkit_key[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
// Guess key based on file info.
|
||||
// TODO: better way to finding out which key to use?
|
||||
const uint8_t *xexkey;
|
||||
if (header->file_format_info.compression_type == XEX_COMPRESSION_NORMAL &&
|
||||
header->file_format_info.encryption_type == XEX_ENCRYPTION_NORMAL) {
|
||||
xexkey = xe_xex2_retail_key;
|
||||
} else {
|
||||
xexkey = xe_xex2_devkit_key;
|
||||
}
|
||||
|
||||
// Decrypt the header key.
|
||||
uint32_t rk[4 * (MAXNR + 1)];
|
||||
int32_t Nr = rijndaelKeySetupDec(rk, xexkey, 128);
|
||||
rijndaelDecrypt(rk, Nr,
|
||||
header->loader_info.file_key, header->session_key);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
typedef struct mspack_memory_file_t {
|
||||
struct mspack_system sys;
|
||||
void *buffer;
|
||||
off_t buffer_size;
|
||||
off_t offset;
|
||||
} mspack_memory_file;
|
||||
mspack_memory_file *mspack_memory_open(struct mspack_system *sys,
|
||||
void* buffer, const size_t buffer_size) {
|
||||
XEASSERT(buffer_size < INT_MAX);
|
||||
if (buffer_size >= INT_MAX) {
|
||||
return NULL;
|
||||
}
|
||||
mspack_memory_file *memfile = (mspack_memory_file*)xe_calloc(
|
||||
sizeof(mspack_memory_file));
|
||||
if (!memfile) {
|
||||
return NULL;
|
||||
}
|
||||
memfile->buffer = buffer;
|
||||
memfile->buffer_size = (off_t)buffer_size;
|
||||
memfile->offset = 0;
|
||||
return memfile;
|
||||
}
|
||||
void mspack_memory_close(mspack_memory_file *file) {
|
||||
mspack_memory_file *memfile = (mspack_memory_file*)file;
|
||||
xe_free(memfile);
|
||||
}
|
||||
int mspack_memory_read(struct mspack_file *file, void *buffer, int chars) {
|
||||
mspack_memory_file *memfile = (mspack_memory_file*)file;
|
||||
const off_t remaining = memfile->buffer_size - memfile->offset;
|
||||
const off_t total = MIN(chars, remaining);
|
||||
if (xe_copy_memory(buffer, total,
|
||||
(uint8_t*)memfile->buffer + memfile->offset, total)) {
|
||||
return -1;
|
||||
}
|
||||
memfile->offset += total;
|
||||
return (int)total;
|
||||
}
|
||||
int mspack_memory_write(struct mspack_file *file, void *buffer, int chars) {
|
||||
mspack_memory_file *memfile = (mspack_memory_file*)file;
|
||||
const off_t remaining = memfile->buffer_size - memfile->offset;
|
||||
const off_t total = MIN(chars, remaining);
|
||||
if (xe_copy_memory((uint8_t*)memfile->buffer + memfile->offset,
|
||||
memfile->buffer_size - memfile->offset, buffer, total)) {
|
||||
return -1;
|
||||
}
|
||||
memfile->offset += total;
|
||||
return (int)total;
|
||||
}
|
||||
void *mspack_memory_alloc(struct mspack_system *sys, size_t chars) {
|
||||
XEUNREFERENCED(sys);
|
||||
return xe_calloc(chars);
|
||||
}
|
||||
void mspack_memory_free(void *ptr) {
|
||||
xe_free(ptr);
|
||||
}
|
||||
void mspack_memory_copy(void *src, void *dest, size_t chars) {
|
||||
xe_copy_memory(dest, chars, src, chars);
|
||||
}
|
||||
struct mspack_system *mspack_memory_sys_create() {
|
||||
struct mspack_system *sys = (struct mspack_system *)xe_calloc(
|
||||
sizeof(struct mspack_system));
|
||||
if (!sys) {
|
||||
return NULL;
|
||||
}
|
||||
sys->read = mspack_memory_read;
|
||||
sys->write = mspack_memory_write;
|
||||
sys->alloc = mspack_memory_alloc;
|
||||
sys->free = mspack_memory_free;
|
||||
sys->copy = mspack_memory_copy;
|
||||
return sys;
|
||||
}
|
||||
void mspack_memory_sys_destroy(struct mspack_system *sys) {
|
||||
xe_free(sys);
|
||||
}
|
||||
|
||||
void xe_xex2_decrypt_buffer(const uint8_t *session_key,
|
||||
const uint8_t *input_buffer,
|
||||
const size_t input_size, uint8_t* output_buffer,
|
||||
const size_t output_size) {
|
||||
uint32_t rk[4 * (MAXNR + 1)];
|
||||
uint8_t ivec[16] = {0};
|
||||
int32_t Nr = rijndaelKeySetupDec(rk, session_key, 128);
|
||||
const uint8_t *ct = input_buffer;
|
||||
uint8_t* pt = output_buffer;
|
||||
for (size_t n = 0; n < input_size; n += 16, ct += 16, pt += 16) {
|
||||
// Decrypt 16 uint8_ts from input -> output.
|
||||
rijndaelDecrypt(rk, Nr, ct, pt);
|
||||
for (size_t i = 0; i < 16; i++) {
|
||||
// XOR with previous.
|
||||
pt[i] ^= ivec[i];
|
||||
// Set previous.
|
||||
ivec[i] = ct[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int xe_xex2_read_image_uncompressed(const xe_xex2_header_t *header,
|
||||
const uint8_t *xex_addr,
|
||||
const size_t xex_length,
|
||||
xe_memory_ref memory) {
|
||||
uint8_t *buffer = (uint8_t*)xe_memory_addr(memory, header->exe_address);
|
||||
size_t buffer_size = 0x40000000;
|
||||
|
||||
const size_t exe_length = xex_length - header->exe_offset;
|
||||
const uint8_t *p = (const uint8_t*)xex_addr + header->exe_offset;
|
||||
|
||||
switch (header->file_format_info.encryption_type) {
|
||||
case XEX_ENCRYPTION_NONE:
|
||||
return xe_copy_memory(buffer, buffer_size, p, exe_length);
|
||||
case XEX_ENCRYPTION_NORMAL:
|
||||
xe_xex2_decrypt_buffer(header->session_key, p, exe_length, buffer,
|
||||
buffer_size);
|
||||
return 0;
|
||||
default:
|
||||
XEASSERTALWAYS();
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int xe_xex2_read_image_basic_compressed(const xe_xex2_header_t *header,
|
||||
const uint8_t *xex_addr,
|
||||
const size_t xex_length,
|
||||
xe_memory_ref memory) {
|
||||
uint8_t *buffer = (uint8_t*)xe_memory_addr(memory, header->exe_address);
|
||||
size_t buffer_size = 0x40000000;
|
||||
|
||||
const size_t exe_length = xex_length - header->exe_offset;
|
||||
const uint8_t* source_buffer = (const uint8_t*)xex_addr + header->exe_offset;
|
||||
const uint8_t *p = source_buffer;
|
||||
|
||||
uint8_t *d = buffer;
|
||||
|
||||
uint32_t rk[4 * (MAXNR + 1)];
|
||||
uint8_t ivec[16] = {0};
|
||||
int32_t Nr = rijndaelKeySetupDec(rk, header->session_key, 128);
|
||||
|
||||
const xe_xex2_file_basic_compression_info_t* comp_info =
|
||||
&header->file_format_info.compression_info.basic;
|
||||
for (size_t n = 0; n < comp_info->block_count; n++) {
|
||||
const size_t data_size = comp_info->blocks[n].data_size;
|
||||
const size_t zero_size = comp_info->blocks[n].zero_size;
|
||||
|
||||
switch (header->file_format_info.encryption_type) {
|
||||
case XEX_ENCRYPTION_NONE:
|
||||
XEEXPECTZERO(xe_copy_memory(d, buffer_size - (d - buffer), p,
|
||||
exe_length - (p - source_buffer)));
|
||||
break;
|
||||
case XEX_ENCRYPTION_NORMAL:
|
||||
{
|
||||
const uint8_t *ct = p;
|
||||
uint8_t* pt = d;
|
||||
for (size_t n = 0; n < data_size; n += 16, ct += 16, pt += 16) {
|
||||
// Decrypt 16 uint8_ts from input -> output.
|
||||
rijndaelDecrypt(rk, Nr, ct, pt);
|
||||
for (size_t i = 0; i < 16; i++) {
|
||||
// XOR with previous.
|
||||
pt[i] ^= ivec[i];
|
||||
// Set previous.
|
||||
ivec[i] = ct[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
XEASSERTALWAYS();
|
||||
return 1;
|
||||
}
|
||||
|
||||
p += data_size;
|
||||
d += data_size + zero_size;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
XECLEANUP:
|
||||
return 1;
|
||||
}
|
||||
|
||||
int xe_xex2_read_image_compressed(const xe_xex2_header_t *header,
|
||||
const uint8_t *xex_addr,
|
||||
const size_t xex_length,
|
||||
xe_memory_ref memory) {
|
||||
uint8_t *buffer = (uint8_t*)xe_memory_addr(memory, header->exe_address);
|
||||
size_t buffer_size = 0x40000000;
|
||||
|
||||
const size_t exe_length = xex_length - header->exe_offset;
|
||||
const uint8_t *exe_buffer = (const uint8_t*)xex_addr + header->exe_offset;
|
||||
|
||||
// src -> dest:
|
||||
// - decrypt (if encrypted)
|
||||
// - de-block:
|
||||
// 4b total size of next block in uint8_ts
|
||||
// 20b hash of entire next block (including size/hash)
|
||||
// Nb block uint8_ts
|
||||
// - decompress block contents
|
||||
|
||||
int result_code = 1;
|
||||
|
||||
uint8_t *compress_buffer = NULL;
|
||||
const uint8_t *p = NULL;
|
||||
uint8_t *d = NULL;
|
||||
uint8_t *deblock_buffer = NULL;
|
||||
size_t block_size = 0;
|
||||
struct mspack_system *sys = NULL;
|
||||
mspack_memory_file *lzxsrc = NULL;
|
||||
mspack_memory_file *lzxdst = NULL;
|
||||
struct lzxd_stream *lzxd = NULL;
|
||||
|
||||
// Decrypt (if needed).
|
||||
bool free_input = false;
|
||||
const uint8_t *input_buffer = exe_buffer;
|
||||
const size_t input_size = exe_length;
|
||||
switch (header->file_format_info.encryption_type) {
|
||||
case XEX_ENCRYPTION_NONE:
|
||||
// No-op.
|
||||
break;
|
||||
case XEX_ENCRYPTION_NORMAL:
|
||||
// TODO: a way to do without a copy/alloc?
|
||||
free_input = true;
|
||||
input_buffer = (const uint8_t*)xe_calloc(input_size);
|
||||
XEEXPECTNOTNULL(input_buffer);
|
||||
xe_xex2_decrypt_buffer(header->session_key, exe_buffer, exe_length,
|
||||
(uint8_t*)input_buffer, input_size);
|
||||
break;
|
||||
default:
|
||||
XEASSERTALWAYS();
|
||||
return false;
|
||||
}
|
||||
|
||||
compress_buffer = (uint8_t*)xe_calloc(exe_length);
|
||||
XEEXPECTNOTNULL(compress_buffer);
|
||||
|
||||
p = input_buffer;
|
||||
d = compress_buffer;
|
||||
|
||||
// De-block.
|
||||
deblock_buffer = (uint8_t*)xe_calloc(input_size);
|
||||
XEEXPECTNOTNULL(deblock_buffer);
|
||||
block_size = header->file_format_info.compression_info.normal.block_size;
|
||||
while (block_size) {
|
||||
const uint8_t *pnext = p + block_size;
|
||||
const size_t next_size = XEGETINT32BE(p);
|
||||
p += 4;
|
||||
p += 20; // skip 20b hash
|
||||
|
||||
while(true) {
|
||||
const size_t chunk_size = (p[0] << 8) | p[1];
|
||||
p += 2;
|
||||
if (!chunk_size) {
|
||||
break;
|
||||
}
|
||||
xe_copy_memory(d, exe_length - (d - compress_buffer), p, chunk_size);
|
||||
p += chunk_size;
|
||||
d += chunk_size;
|
||||
}
|
||||
|
||||
p = pnext;
|
||||
block_size = next_size;
|
||||
}
|
||||
|
||||
// Setup decompressor and decompress.
|
||||
sys = mspack_memory_sys_create();
|
||||
XEEXPECTNOTNULL(sys);
|
||||
lzxsrc = mspack_memory_open(sys, (void*)compress_buffer, d - compress_buffer);
|
||||
XEEXPECTNOTNULL(lzxsrc);
|
||||
lzxdst = mspack_memory_open(sys, buffer, buffer_size);
|
||||
XEEXPECTNOTNULL(lzxdst);
|
||||
lzxd = lzxd_init(
|
||||
sys,
|
||||
(struct mspack_file *)lzxsrc,
|
||||
(struct mspack_file *)lzxdst,
|
||||
header->file_format_info.compression_info.normal.window_bits,
|
||||
0,
|
||||
32768,
|
||||
(off_t)header->loader_info.image_size);
|
||||
XEEXPECTNOTNULL(lzxd);
|
||||
XEEXPECTZERO(lzxd_decompress(lzxd, (off_t)header->loader_info.image_size));
|
||||
|
||||
result_code = 0;
|
||||
|
||||
XECLEANUP:
|
||||
if (lzxd) {
|
||||
lzxd_free(lzxd);
|
||||
lzxd = NULL;
|
||||
}
|
||||
if (lzxsrc) {
|
||||
mspack_memory_close(lzxsrc);
|
||||
lzxsrc = NULL;
|
||||
}
|
||||
if (lzxdst) {
|
||||
mspack_memory_close(lzxdst);
|
||||
lzxdst = NULL;
|
||||
}
|
||||
if (sys) {
|
||||
mspack_memory_sys_destroy(sys);
|
||||
sys = NULL;
|
||||
}
|
||||
xe_free(compress_buffer);
|
||||
xe_free(deblock_buffer);
|
||||
if (free_input) {
|
||||
xe_free((void*)input_buffer);
|
||||
}
|
||||
return result_code;
|
||||
}
|
||||
|
||||
int xe_xex2_read_image(xe_xex2_ref xex, const uint8_t *xex_addr,
|
||||
const size_t xex_length, xe_memory_ref memory) {
|
||||
const xe_xex2_header_t *header = &xex->header;
|
||||
switch (header->file_format_info.compression_type) {
|
||||
case XEX_COMPRESSION_NONE:
|
||||
return xe_xex2_read_image_uncompressed(
|
||||
header, xex_addr, xex_length, memory);
|
||||
case XEX_COMPRESSION_BASIC:
|
||||
return xe_xex2_read_image_basic_compressed(
|
||||
header, xex_addr, xex_length, memory);
|
||||
case XEX_COMPRESSION_NORMAL:
|
||||
return xe_xex2_read_image_compressed(
|
||||
header, xex_addr, xex_length, memory);
|
||||
default:
|
||||
XEASSERTALWAYS();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
int xe_xex2_get_import_infos(xe_xex2_ref xex,
|
||||
const xe_xex2_import_library_t *library,
|
||||
xe_xex2_import_info_t **out_import_infos,
|
||||
size_t *out_import_info_count) {
|
||||
uint8_t *mem = (uint8_t*)xe_memory_addr(xex->memory, 0);
|
||||
const xe_xex2_header_t *header = xe_xex2_get_header(xex);
|
||||
|
||||
// Find library index for verification.
|
||||
size_t library_index = -1;
|
||||
for (size_t n = 0; n < header->import_library_count; n++) {
|
||||
if (&header->import_libraries[n] == library) {
|
||||
library_index = n;
|
||||
break;
|
||||
}
|
||||
}
|
||||
XEASSERT(library_index != (size_t)-1);
|
||||
|
||||
// Records:
|
||||
// The number of records does not correspond to the number of imports!
|
||||
// Each record points at either a location in text or data - dereferencing the
|
||||
// pointer will yield a value that & 0xFFFF = the import ordinal,
|
||||
// >> 16 & 0xFF = import library index, and >> 24 & 0xFF = 0 if a variable
|
||||
// (just get address) or 1 if a thunk (needs rewrite).
|
||||
|
||||
// Calculate real count.
|
||||
size_t info_count = 0;
|
||||
for (size_t n = 0; n < library->record_count; n++) {
|
||||
const uint32_t record = library->records[n];
|
||||
const uint32_t value = XEGETUINT32BE(mem + record);
|
||||
if (value & 0xFF000000) {
|
||||
// Thunk for previous record - ignore.
|
||||
} else {
|
||||
// Variable/thunk.
|
||||
info_count++;
|
||||
}
|
||||
}
|
||||
|
||||
// Allocate storage.
|
||||
xe_xex2_import_info_t *infos = (xe_xex2_import_info_t*)xe_calloc(
|
||||
info_count * sizeof(xe_xex2_import_info_t));
|
||||
XEEXPECTNOTNULL(infos);
|
||||
|
||||
// Construct infos.
|
||||
for (size_t n = 0, i = 0; n < library->record_count; n++) {
|
||||
const uint32_t record = library->records[n];
|
||||
const uint32_t value = XEGETUINT32BE(mem + record);
|
||||
const uint32_t type = (value & 0xFF000000) >> 24;
|
||||
|
||||
// Verify library index matches given library.
|
||||
XEASSERT(library_index == ((value >> 16) & 0xFF));
|
||||
|
||||
switch (type) {
|
||||
case 0x00:
|
||||
{
|
||||
xe_xex2_import_info_t* info = &infos[i++];
|
||||
info->ordinal = value & 0xFFFF;
|
||||
info->value_address = record;
|
||||
}
|
||||
break;
|
||||
case 0x01:
|
||||
{
|
||||
// Thunk for previous record.
|
||||
XEASSERT(i > 0);
|
||||
xe_xex2_import_info_t* info = &infos[i - 1];
|
||||
XEASSERT(info->ordinal == (value & 0xFFFF));
|
||||
info->thunk_address = record;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
XEASSERTALWAYS();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
*out_import_info_count = info_count;
|
||||
*out_import_infos = infos;
|
||||
return 0;
|
||||
|
||||
XECLEANUP:
|
||||
xe_free(infos);
|
||||
*out_import_info_count = 0;
|
||||
*out_import_infos = NULL;
|
||||
return 1;
|
||||
}
|
||||
59
src/xenia/logging.cc
Normal file
59
src/xenia/logging.cc
Normal file
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/logging.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
|
||||
|
||||
void xe_log_line(const xechar_t* file_path, const uint32_t line_number,
|
||||
const xechar_t* function_name, const xechar_t level_char,
|
||||
const xechar_t* fmt, ...) {
|
||||
const int kLogMax = 2048;
|
||||
|
||||
// Strip out just the filename from the path.
|
||||
const xechar_t* filename = xestrrchr(file_path, XE_PATH_SEPARATOR);
|
||||
if (filename) {
|
||||
// Slash - skip over it.
|
||||
filename++;
|
||||
} else {
|
||||
// No slash, entire thing is filename.
|
||||
filename = file_path;
|
||||
}
|
||||
|
||||
// Scribble args into the print buffer.
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
xechar_t buffer[kLogMax];
|
||||
int buffer_length = xevsnprintf(buffer, XECOUNT(buffer), fmt, args);
|
||||
va_end(args);
|
||||
if (buffer_length < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Format string - add a trailing newline if required.
|
||||
const xechar_t* outfmt;
|
||||
if ((buffer_length >= 1) && buffer[buffer_length - 1] == '\n') {
|
||||
outfmt = XT("XE[%c] %s:%d: %s");
|
||||
} else {
|
||||
outfmt = XT("XE[%c] %s:%d: %s\n");
|
||||
}
|
||||
|
||||
#if defined(OutputDebugString)
|
||||
xechar_t full_output[kLogMax];
|
||||
if (xesnprintf(full_output, XECOUNT(buffer), outfmt, level_char,
|
||||
filename, line_number, buffer) >= 0) {
|
||||
OutputDebugString(full_output);
|
||||
}
|
||||
#elif defined(XE_WCHAR)
|
||||
XEIGNORE(fwprintf(stdout, outfmt, level_char, filename, line_number, buffer));
|
||||
#else
|
||||
XEIGNORE(fprintf(stdout, outfmt, level_char, filename, line_number, buffer));
|
||||
#endif // OutputDebugString
|
||||
}
|
||||
137
src/xenia/malloc.cc
Normal file
137
src/xenia/malloc.cc
Normal file
@@ -0,0 +1,137 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/malloc.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
|
||||
|
||||
void *xe_malloc(const size_t size) {
|
||||
// Some platforms return NULL from malloc with size zero.
|
||||
if (!size) {
|
||||
return malloc(1);
|
||||
}
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void *xe_calloc(const size_t size) {
|
||||
// Some platforms return NULL from malloc with size zero.
|
||||
if (!size) {
|
||||
return calloc(1, 1);
|
||||
}
|
||||
return calloc(1, size);
|
||||
}
|
||||
|
||||
void* xe_realloc(void *ptr, const size_t old_size, const size_t new_size) {
|
||||
if (!ptr) {
|
||||
// Support realloc as malloc.
|
||||
return malloc(new_size);
|
||||
}
|
||||
if (old_size == new_size) {
|
||||
// No-op.
|
||||
return ptr;
|
||||
}
|
||||
if (!new_size) {
|
||||
// Zero-size realloc, return a dummy buffer for platforms that don't support
|
||||
// zero-size allocs.
|
||||
void *dummy = malloc(1);
|
||||
if (!dummy) {
|
||||
return NULL;
|
||||
}
|
||||
xe_free(ptr);
|
||||
return dummy;
|
||||
}
|
||||
|
||||
return realloc(ptr, new_size);
|
||||
}
|
||||
|
||||
void* xe_recalloc(void *ptr, const size_t old_size, const size_t new_size) {
|
||||
if (!ptr) {
|
||||
// Support realloc as malloc.
|
||||
return calloc(1, new_size);
|
||||
}
|
||||
if (old_size == new_size) {
|
||||
// No-op.
|
||||
return ptr;
|
||||
}
|
||||
if (!new_size) {
|
||||
// Zero-size realloc, return a dummy buffer for platforms that don't support
|
||||
// zero-size allocs.
|
||||
void *dummy = calloc(1, 1);
|
||||
if (!dummy) {
|
||||
return NULL;
|
||||
}
|
||||
xe_free(ptr);
|
||||
return dummy;
|
||||
}
|
||||
|
||||
void *result = realloc(ptr, new_size);
|
||||
if (!result) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Zero out new memory.
|
||||
if (new_size > old_size) {
|
||||
xe_zero_memory(result, new_size, old_size, new_size - old_size);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void xe_free(void *ptr) {
|
||||
if (ptr) {
|
||||
free(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
xe_aligned_void_t *xe_malloc_aligned(const size_t size) {
|
||||
// TODO(benvanik): validate every platform is aligned to XE_ALIGNMENT.
|
||||
return xe_malloc(size);
|
||||
}
|
||||
|
||||
void xe_free_aligned(xe_aligned_void_t *ptr) {
|
||||
xe_free((void*)ptr);
|
||||
}
|
||||
|
||||
int xe_zero_struct(void *ptr, const size_t size) {
|
||||
return xe_zero_memory(ptr, size, 0, size);
|
||||
}
|
||||
|
||||
int xe_zero_memory(void *ptr, const size_t size, const size_t offset,
|
||||
const size_t length) {
|
||||
// TODO(benvanik): validate sizing/clamp.
|
||||
if (!ptr || !length) {
|
||||
return 0;
|
||||
}
|
||||
if (offset + length > size) {
|
||||
return 1;
|
||||
}
|
||||
memset((uint8_t*)ptr + offset, 0, length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int xe_copy_struct(void *dest, const void *source, const size_t size) {
|
||||
return xe_copy_memory(dest, size, source, size);
|
||||
}
|
||||
|
||||
int xe_copy_memory(void *dest, const size_t dest_size, const void *source,
|
||||
const size_t source_size) {
|
||||
// TODO(benvanik): validate sizing.
|
||||
if (!source_size) {
|
||||
return 0;
|
||||
}
|
||||
if (!dest || !source) {
|
||||
return 1;
|
||||
}
|
||||
if (dest_size < source_size) {
|
||||
return 1;
|
||||
}
|
||||
memcpy(dest, source, source_size);
|
||||
return 0;
|
||||
}
|
||||
7
src/xenia/sources.gypi
Normal file
7
src/xenia/sources.gypi
Normal file
@@ -0,0 +1,7 @@
|
||||
# Copyright 2013 Ben Vanik. All Rights Reserved.
|
||||
{
|
||||
'sources': [
|
||||
'logging.cc',
|
||||
'malloc.cc',
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user