From bcd575f9b0266789d82bc3fa48665211590b7b3b Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sat, 12 Jan 2013 23:25:41 -0800 Subject: [PATCH] Massive dump of xenia-info required code. This is a working xenia-info for xex files (no gdfs files yet). --- common.gypi | 9 + include/xenia/assert.h | 72 + include/xenia/atomic.h | 81 + include/xenia/byte_order.h | 68 + include/xenia/common.h | 24 + include/xenia/config.h | 31 + include/xenia/core.h | 21 + include/xenia/core/file.h | 37 + include/xenia/core/memory.h | 35 + include/xenia/core/mmap.h | 32 + include/xenia/core/pal.h | 31 + include/xenia/core/ref.h | 29 + include/xenia/cpu.h | 18 + include/xenia/gpu.h | 18 + include/xenia/kernel.h | 49 + include/xenia/kernel/export.h | 76 + include/xenia/kernel/module.h | 71 + include/xenia/kernel/xex2.h | 46 + include/xenia/kernel/xex2_info.h | 459 ++++++ include/xenia/logging.h | 72 + include/xenia/malloc.h | 33 + include/xenia/platform.h | 155 ++ include/xenia/platform_includes.h | 51 + include/xenia/string.h | 106 ++ include/xenia/types.h | 109 ++ include/xenia/xenia.h | 6 + src/core/file.cc | 85 ++ src/core/memory.cc | 74 + src/core/mmap_posix.cc | 101 ++ src/core/pal.cc | 39 + src/core/ref.cc | 31 + src/core/sources.gypi | 17 +- src/{core/something.cc => cpu/cpu.cc} | 10 +- src/cpu/sources.gypi | 6 + src/gpu/gpu.cc | 15 + src/gpu/sources.gypi | 6 + src/kernel/export.cc | 96 ++ src/kernel/kernel.cc | 130 ++ src/kernel/module.cc | 444 ++++++ src/kernel/modules/modules.h | 17 + src/kernel/modules/sources.gypi | 8 + src/kernel/modules/xam/sources.gypi | 6 + src/kernel/modules/xam/xam.cc | 42 + src/kernel/modules/xam/xam.h | 31 + src/kernel/modules/xam/xam_table.h | 1419 ++++++++++++++++++ src/kernel/modules/xbdm/sources.gypi | 6 + src/kernel/modules/xbdm/xbdm.cc | 42 + src/kernel/modules/xbdm/xbdm.h | 31 + src/kernel/modules/xbdm/xbdm_table.h | 26 + src/kernel/modules/xboxkrnl/sources.gypi | 6 + src/kernel/modules/xboxkrnl/xboxkrnl.cc | 42 + src/kernel/modules/xboxkrnl/xboxkrnl.h | 31 + src/kernel/modules/xboxkrnl/xboxkrnl_table.h | 885 +++++++++++ src/kernel/sources.gypi | 13 + src/kernel/xex2.cc | 829 ++++++++++ src/xenia/logging.cc | 59 + src/xenia/malloc.cc | 137 ++ src/xenia/sources.gypi | 7 + third_party/crypto/rijndael-alg-fst.c | 2 +- third_party/pe/pe_image.h | 528 +++---- tools/xenia-info/xenia-info.cc | 44 +- tools/xenia-info/xenia-info.gypi | 2 + tools/xenia-run/xenia-run.cc | 8 +- tools/xenia-run/xenia-run.gypi | 3 + xenia-build.py | 20 +- xenia.gyp | 126 +- 66 files changed, 6859 insertions(+), 304 deletions(-) create mode 100644 include/xenia/assert.h create mode 100644 include/xenia/atomic.h create mode 100644 include/xenia/byte_order.h create mode 100644 include/xenia/common.h create mode 100644 include/xenia/config.h create mode 100644 include/xenia/core.h create mode 100644 include/xenia/core/file.h create mode 100644 include/xenia/core/memory.h create mode 100644 include/xenia/core/mmap.h create mode 100644 include/xenia/core/pal.h create mode 100644 include/xenia/core/ref.h create mode 100644 include/xenia/cpu.h create mode 100644 include/xenia/gpu.h create mode 100644 include/xenia/kernel.h create mode 100644 include/xenia/kernel/export.h create mode 100644 include/xenia/kernel/module.h create mode 100644 include/xenia/kernel/xex2.h create mode 100644 include/xenia/kernel/xex2_info.h create mode 100644 include/xenia/logging.h create mode 100644 include/xenia/malloc.h create mode 100644 include/xenia/platform.h create mode 100644 include/xenia/platform_includes.h create mode 100644 include/xenia/string.h create mode 100644 include/xenia/types.h create mode 100644 src/core/file.cc create mode 100644 src/core/memory.cc create mode 100644 src/core/mmap_posix.cc create mode 100644 src/core/pal.cc create mode 100644 src/core/ref.cc rename src/{core/something.cc => cpu/cpu.cc} (94%) create mode 100644 src/cpu/sources.gypi create mode 100644 src/gpu/gpu.cc create mode 100644 src/gpu/sources.gypi create mode 100644 src/kernel/export.cc create mode 100644 src/kernel/kernel.cc create mode 100644 src/kernel/module.cc create mode 100644 src/kernel/modules/modules.h create mode 100644 src/kernel/modules/sources.gypi create mode 100644 src/kernel/modules/xam/sources.gypi create mode 100644 src/kernel/modules/xam/xam.cc create mode 100644 src/kernel/modules/xam/xam.h create mode 100644 src/kernel/modules/xam/xam_table.h create mode 100644 src/kernel/modules/xbdm/sources.gypi create mode 100644 src/kernel/modules/xbdm/xbdm.cc create mode 100644 src/kernel/modules/xbdm/xbdm.h create mode 100644 src/kernel/modules/xbdm/xbdm_table.h create mode 100644 src/kernel/modules/xboxkrnl/sources.gypi create mode 100644 src/kernel/modules/xboxkrnl/xboxkrnl.cc create mode 100644 src/kernel/modules/xboxkrnl/xboxkrnl.h create mode 100644 src/kernel/modules/xboxkrnl/xboxkrnl_table.h create mode 100644 src/kernel/sources.gypi create mode 100644 src/kernel/xex2.cc create mode 100644 src/xenia/logging.cc create mode 100644 src/xenia/malloc.cc create mode 100644 src/xenia/sources.gypi diff --git a/common.gypi b/common.gypi index 68d89be03..5f00deab8 100644 --- a/common.gypi +++ b/common.gypi @@ -21,6 +21,15 @@ 'include/', ], + 'defines': [ + '__STDC_LIMIT_MACROS=1', + '__STDC_CONSTANT_MACROS=1', + '_ISOC99_SOURCE=1', + ], + 'cflags': [ + '-std=c99', + ], + 'configurations': { 'debug': { 'defines': [ diff --git a/include/xenia/assert.h b/include/xenia/assert.h new file mode 100644 index 000000000..824fba073 --- /dev/null +++ b/include/xenia/assert.h @@ -0,0 +1,72 @@ +/** + ****************************************************************************** + * 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_ASSERT_H_ +#define XENIA_ASSERT_H_ + +#include + +#include +#include +#include +#include +#include + + +#if XE_COMPILER(MSVC) +// http://msdn.microsoft.com/en-us/library/b0084kay.aspx +#if !defined(__WFILE__) +#define WIDEN2(x) L##x +#define WIDEN(x) WIDEN2(x) +#define __WFILE__ WIDEN(__FILE__) +#define __WFUNCTION__ WIDEN(__FUNCTION__) +#endif +#define XE_CURRENT_FILE __WFILE__ +#define XE_CURRENT_FUNCTION __WFUNCTION__ +#else +#define XE_CURRENT_FILE __FILE__ +#define XE_CURRENT_FUNCTION __FUNCTION__ +#endif // MSVC +#define XE_CURRENT_LINE __LINE__ + + +#define __XE_ASSERT(expr) assert(expr) +#if XE_OPTION(ENABLE_ASSERTS) +#define XEASSERTCORE(expr) __XE_ASSERT(expr) +#else +#define XEASSERTCORE(expr) XE_EMPTY_MACRO +#endif // ENABLE_ASSERTS + +#define XEASSERTALWAYS() XEASSERTCORE( 0 ) +#define XEASSERT(expr) XEASSERTCORE( (expr) ) +#define XEASSERTTRUE(expr) XEASSERTCORE( (expr) ) +#define XEASSERTFALSE(expr) XEASSERTCORE(!(expr) ) +#define XEASSERTZERO(expr) XEASSERTCORE( (expr) == 0 ) +#define XEASSERTNOTZERO(expr) XEASSERTCORE( (expr) != 0 ) +#define XEASSERTNULL(expr) XEASSERTCORE( (expr) == NULL ) +#define XEASSERTNOTNULL(expr) XEASSERTCORE( (expr) != NULL ) + + +#if XE_COMPILER(MSVC) +// http://msdn.microsoft.com/en-us/library/bb918086.aspx +// TODO(benvanik): if 2010+, use static_assert? +// http://msdn.microsoft.com/en-us/library/dd293588.aspx +#define XESTATICASSERT(expr, message) _STATIC_ASSERT(expr) +//#elif XE_COMPILER(GNUC) +// http://stackoverflow.com/questions/3385515/static-assert-in-c +//#define XESTATICASSERT(expr, message) ({ extern int __attribute__((error("assertion failure: '" #expr "' not true - " #message))) compile_time_check(); ((expr)?0:compile_time_check()),0; }) +#else +// http://stackoverflow.com/questions/3385515/static-assert-in-c +#define XESTATICASSERT3(expr, L) typedef char static_assertion_##L[(expr)?1:-1] +#define XESTATICASSERT2(expr, L) XESTATICASSERT3(expr, L) +#define XESTATICASSERT(expr, message) XESTATICASSERT2(expr, __LINE__) +#endif // MSVC + + +#endif // XENIA_ASSERT_H_ diff --git a/include/xenia/atomic.h b/include/xenia/atomic.h new file mode 100644 index 000000000..4e0d114c3 --- /dev/null +++ b/include/xenia/atomic.h @@ -0,0 +1,81 @@ +/** + ****************************************************************************** + * 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_ATOMIC_H_ +#define XENIA_ATOMIC_H_ + +#include +#include + + +// These functions are modeled off of the Apple OSAtomic routines +// http://developer.apple.com/library/mac/#documentation/DriversKernelHardware/Reference/libkern_ref/OSAtomic_h/ + +#if XE_LIKE(OSX) +#include + +#define xe_atomic_inc_32(value) \ + OSAtomicIncrement32Barrier(value) +#define xe_atomic_dec_32(value) \ + OSAtomicDecrement32Barrier(value) +#define xe_atomic_add_32(amount, value) \ + ((void)OSAtomicAdd32Barrier(amount, value)) +#define xe_atomic_sub_32(amount, value) \ + ((void)OSAtomicAdd32Barrier(-amount, value)) +#define xe_atomic_cas_32(oldValue, newValue, value) \ + OSAtomicCompareAndSwap32Barrier(oldValue, newValue, value) + +typedef OSQueueHead xe_atomic_stack_t; +#define xe_atomic_stack_init(stack) \ + *(stack) = (OSQueueHead)OS_ATOMIC_QUEUE_INIT +#define xe_atomic_stack_enqueue(stack, item, offset) \ + OSAtomicEnqueue((OSQueueHead*)stack, item, offset) +#define xe_atomic_stack_dequeue(stack, offset) \ + OSAtomicDequeue((OSQueueHead*)stack, offset) + +#elif XE_LIKE(WIN32) + +#define xe_atomic_inc_32(value) \ + InterlockedIncrement((volatile LONG*)value) +#define xe_atomic_dec_32(value) \ + InterlockedDecrement((volatile LONG*)value) +#define xe_atomic_add_32(amount, value) \ + ((void)InterlockedExchangeAdd((volatile LONG*)value, amount)) +#define xe_atomic_sub_32(amount, value) \ + ((void)InterlockedExchangeSubtract((volatile unsigned*)value, amount)) +#define xe_atomic_vas_32(oldValue, newValue, value) \ + (InterlockedCompareExchange((volatile LONG*)value, newValue, oldValue) == oldValue) + +typedef SLIST_HEADER xe_atomic_stack_t; +#define xe_atomic_stack_init(stack) \ + InitializeSListHead((PSLIST_HEADER)stack) +#define xe_atomic_stack_enqueue(stack, item, offset) \ + XEIGNORE(InterlockedPushEntrySList((PSLIST_HEADER)stack, (PSLIST_ENTRY)((byte*)item + offset))) +XEFORCEINLINE void* xe_atomic_stack_dequeue(xe_atomic_stack_t* stack, + const size_t offset) { + void* ptr = (void*)InterlockedPopEntrySList((PSLIST_HEADER)stack); + if (ptr) { + return (void*)(((byte*)ptr) - offset); + } else { + return NULL; + } +} + +#elif XE_LIKE(POSIX) + +#error TODO(benvanik): POSIX atomic primitives + +#else + +#error No atomic primitives defined for this platform/cpu combination. + +#endif // OSX + + +#endif // XENIA_ATOMIC_H_ diff --git a/include/xenia/byte_order.h b/include/xenia/byte_order.h new file mode 100644 index 000000000..bd50ce4ef --- /dev/null +++ b/include/xenia/byte_order.h @@ -0,0 +1,68 @@ +/** + ****************************************************************************** + * 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_BYTE_ORDER_H_ +#define XENIA_BYTE_ORDER_H_ + +#include +#include + + +#if XE_COMPILER(MSVC) +#define XESWAP16 _byteswap_ushort +#define XESWAP32 _byteswap_ulong +#define XESWAP64 _byteswap_uint64 +#elif XE_LIKE(OSX) +#include +#define XESWAP16 OSSwapInt16 +#define XESWAP32 OSSwapInt32 +#define XESWAP64 OSSwapInt64 +#else +#define XESWAP16 bswap_16 +#define XESWAP32 bswap_32 +#define XESWAP64 bswap_64 +#endif + + +#if XE_CPU(BIGENDIAN) +#define XESWAP16BE(p) (p) +#define XESWAP32BE(p) (p) +#define XESWAP64BE(p) (p) +#define XESWAP16LE(p) XESWAP16(p) +#define XESWAP32LE(p) XESWAP32(p) +#define XESWAP64LE(p) XESWAP64(p) +#else +#define XESWAP16BE(p) XESWAP16(p) +#define XESWAP32BE(p) XESWAP32(p) +#define XESWAP64BE(p) XESWAP64(p) +#define XESWAP16LE(p) (p) +#define XESWAP32LE(p) (p) +#define XESWAP64LE(p) (p) +#endif + + +#define XEGETINT8BE(p) ( (int8_t)(*(p))) +#define XEGETUINT8BE(p) ( (uint8_t)(*(p))) +#define XEGETINT16BE(p) ( (int16_t)XESWAP16BE(*(uint16_t*)(p))) +#define XEGETUINT16BE(p) ((uint16_t)XESWAP16BE(*(uint16_t*)(p))) +#define XEGETINT32BE(p) ( (int32_t)XESWAP32BE(*(uint32_t*)(p))) +#define XEGETUINT32BE(p) ((uint32_t)XESWAP32BE(*(uint32_t*)(p))) +#define XEGETINT64BE(p) ( (int64_t)XESWAP64BE(*(uint64_t*)(p))) +#define XEGETUINT64BE(p) ((uint64_t)XESWAP64BE(*(uint64_t*)(p))) +#define XEGETINT8LE(p) ( (int8_t)(*(p))) +#define XEGETUINT8LE(p) ( (uint8_t)(*(p))) +#define XEGETINT16LE(p) ( (int16_t)XESWAP16LE(*(uint16_t*)(p))) +#define XEGETUINT16LE(p) ((uint16_t)XESWAP16LE(*(uint16_t*)(p))) +#define XEGETINT32LE(p) ( (int32_t)XESWAP32LE(*(uint32_t*)(p))) +#define XEGETUINT32LE(p) ((uint32_t)XESWAP32LE(*(uint32_t*)(p))) +#define XEGETINT64LE(p) ( (int64_t)XESWAP64LE(*(uint64_t*)(p))) +#define XEGETUINT64LE(p) ((uint64_t)XESWAP64LE(*(uint64_t*)(p))) + + +#endif // XENIA_BYTE_ORDER_H_ diff --git a/include/xenia/common.h b/include/xenia/common.h new file mode 100644 index 000000000..ff16b03c3 --- /dev/null +++ b/include/xenia/common.h @@ -0,0 +1,24 @@ +/** + ****************************************************************************** + * 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_COMMON_H_ +#define XENIA_COMMON_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // XENIA_COMMON_H_ diff --git a/include/xenia/config.h b/include/xenia/config.h new file mode 100644 index 000000000..ebcc4f04c --- /dev/null +++ b/include/xenia/config.h @@ -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_CONFIG_H_ +#define XENIA_CONFIG_H_ + + +#define XE_OPTION(NAME) (defined XE_OPTION_##NAME && XE_OPTION_##NAME) + +// Enable compile-time and runtime-time assertions. +#define XE_OPTION_ENABLE_ASSERTS 1 + +// Enable general logging. +#define XE_OPTION_ENABLE_LOGGING 1 +#define XE_OPTION_LOG_ERROR 1 +#define XE_OPTION_LOG_WARNING 1 +#define XE_OPTION_LOG_INFO 1 +#define XE_OPTION_LOG_DEBUG 1 +#define XE_OPTION_LOG_CPU 1 +#define XE_OPTION_LOG_GPU 1 +#define XE_OPTION_LOG_KERNEL 1 + + +#endif // XENIA_CONFIG_H_ + diff --git a/include/xenia/core.h b/include/xenia/core.h new file mode 100644 index 000000000..1c807dea4 --- /dev/null +++ b/include/xenia/core.h @@ -0,0 +1,21 @@ +/** + ****************************************************************************** + * 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_CORE_H_ +#define XENIA_CORE_H_ + +#include + +#include +#include +#include +#include +#include + +#endif // XENIA_CORE_H_ diff --git a/include/xenia/core/file.h b/include/xenia/core/file.h new file mode 100644 index 000000000..81c2b87d8 --- /dev/null +++ b/include/xenia/core/file.h @@ -0,0 +1,37 @@ +/** + ****************************************************************************** + * 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_CORE_FILE_H_ +#define XENIA_CORE_FILE_H_ + +#include +#include +#include + + +struct xe_file; +typedef struct xe_file* xe_file_ref; + + +typedef enum { + kXEFileModeRead = (1 << 0), + kXEFileModeWrite = (1 << 1), +} xe_file_mode; + + +xe_file_ref xe_file_open(xe_pal_ref pal, const xe_file_mode mode, + const xechar_t *path); +xe_file_ref xe_file_retain(xe_file_ref file); +void xe_file_release(xe_file_ref file); +size_t xe_file_get_length(xe_file_ref file); +size_t xe_file_read(xe_file_ref file, const size_t offset, + uint8_t *buffer, const size_t buffer_size); + + +#endif // XENIA_CORE_FILE_H_ diff --git a/include/xenia/core/memory.h b/include/xenia/core/memory.h new file mode 100644 index 000000000..216b552f3 --- /dev/null +++ b/include/xenia/core/memory.h @@ -0,0 +1,35 @@ +/** + ****************************************************************************** + * 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_CORE_MEMORY_H_ +#define XENIA_CORE_MEMORY_H_ + +#include +#include +#include + + +typedef struct { + int reserved; +} xe_memory_options_t; + + +struct xe_memory; +typedef struct xe_memory* xe_memory_ref; + + +xe_memory_ref xe_memory_create(xe_pal_ref pal, xe_memory_options_t options); +xe_memory_ref xe_memory_retain(xe_memory_ref memory); +void xe_memory_release(xe_memory_ref memory); + +size_t xe_memory_get_length(xe_memory_ref memory); +void *xe_memory_addr(xe_memory_ref memory, uint32_t guest_addr); + + +#endif // XENIA_CORE_MEMORY_H_ diff --git a/include/xenia/core/mmap.h b/include/xenia/core/mmap.h new file mode 100644 index 000000000..098a81755 --- /dev/null +++ b/include/xenia/core/mmap.h @@ -0,0 +1,32 @@ +/** + ****************************************************************************** + * 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_CORE_MMAP_H_ +#define XENIA_CORE_MMAP_H_ + +#include +#include +#include +#include + + +struct xe_mmap; +typedef struct xe_mmap* xe_mmap_ref; + + +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 xe_mmap_retain(xe_mmap_ref mmap); +void xe_mmap_release(xe_mmap_ref mmap); +void *xe_mmap_get_addr(xe_mmap_ref mmap); +size_t xe_mmap_get_length(xe_mmap_ref mmap); + + +#endif // XENIA_CORE_MMAP_H_ diff --git a/include/xenia/core/pal.h b/include/xenia/core/pal.h new file mode 100644 index 000000000..59eefe044 --- /dev/null +++ b/include/xenia/core/pal.h @@ -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_CORE_PAL_H_ +#define XENIA_CORE_PAL_H_ + +#include +#include + + +typedef struct { + int reserved; +} xe_pal_options_t; + + +struct xe_pal; +typedef struct xe_pal* xe_pal_ref; + + +xe_pal_ref xe_pal_create(xe_pal_options_t options); +xe_pal_ref xe_pal_retain(xe_pal_ref pal); +void xe_pal_release(xe_pal_ref pal); + + +#endif // XENIA_CORE_PAL_H_ diff --git a/include/xenia/core/ref.h b/include/xenia/core/ref.h new file mode 100644 index 000000000..2406102d0 --- /dev/null +++ b/include/xenia/core/ref.h @@ -0,0 +1,29 @@ +/** + ****************************************************************************** + * 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_CORE_REF_H_ +#define XENIA_CORE_REF_H_ + +#include + + +typedef struct { + volatile int32_t count; +} xe_ref_t; +typedef xe_ref_t* xe_ref; + +typedef void (*xe_ref_dealloc_t)(xe_ref); + + +void xe_ref_init(xe_ref ref); +void xe_ref_retain(xe_ref ref); +void xe_ref_release(xe_ref ref, xe_ref_dealloc_t dealloc); + + +#endif // XENIA_CORE_REF_H_ diff --git a/include/xenia/cpu.h b/include/xenia/cpu.h new file mode 100644 index 000000000..6d34e971b --- /dev/null +++ b/include/xenia/cpu.h @@ -0,0 +1,18 @@ +/** + ****************************************************************************** + * 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_CPU_H_ +#define XENIA_CPU_H_ + +#include +#include + +void do_cpu_stuff(); + +#endif // XENIA_CPU_H_ diff --git a/include/xenia/gpu.h b/include/xenia/gpu.h new file mode 100644 index 000000000..432e82760 --- /dev/null +++ b/include/xenia/gpu.h @@ -0,0 +1,18 @@ +/** + ****************************************************************************** + * 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_GPU_H_ +#define XENIA_GPU_H_ + +#include +#include + +void do_gpu_stuff(); + +#endif // XENIA_GPU_H_ diff --git a/include/xenia/kernel.h b/include/xenia/kernel.h new file mode 100644 index 000000000..f71da9250 --- /dev/null +++ b/include/xenia/kernel.h @@ -0,0 +1,49 @@ +/** + ****************************************************************************** + * 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_H_ +#define XENIA_KERNEL_H_ + +#include +#include + +#include +#include +#include + + +typedef struct { + xechar_t command_line[2048]; +} xe_kernel_options_t; + + +struct xe_kernel; +typedef struct xe_kernel* xe_kernel_ref; + + +xe_kernel_ref xe_kernel_create(xe_pal_ref pal, xe_memory_ref memory, + xe_kernel_options_t options); +xe_kernel_ref xe_kernel_retain(xe_kernel_ref kernel); +void xe_kernel_release(xe_kernel_ref kernel); + +xe_pal_ref xe_kernel_get_pal(xe_kernel_ref kernel); +xe_memory_ref xe_kernel_get_memory(xe_kernel_ref kernel); + +const xechar_t *xe_kernel_get_command_line(xe_kernel_ref kernel); + +xe_kernel_export_resolver_ref xe_kernel_get_export_resolver( + xe_kernel_ref kernel); + +xe_module_ref xe_kernel_load_module(xe_kernel_ref kernel, const xechar_t *path); +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); +void xe_kernel_unload_module(xe_kernel_ref kernel, xe_module_ref module); + + +#endif // XENIA_KERNEL_H_ diff --git a/include/xenia/kernel/export.h b/include/xenia/kernel/export.h new file mode 100644 index 000000000..11992b920 --- /dev/null +++ b/include/xenia/kernel/export.h @@ -0,0 +1,76 @@ +/** + ****************************************************************************** + * 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_EXPORT_H_ +#define XENIA_KERNEL_EXPORT_H_ + +#include + + +typedef enum { + kXEKernelExportFlagFunction = 1 << 0, + kXEKernelExportFlagVariable = 1 << 1, +} xe_kernel_export_flags; + +typedef void (*xe_kernel_export_fn)(); + +typedef struct { + uint32_t ordinal; + uint32_t flags; + char signature[16]; + char name[96]; + + union { + // Variable data. Only valid when kXEKernelExportFlagVariable is set. + void *variable_data; + + struct { + // Real function implementation (if present). + xe_kernel_export_fn impl; + + // Shimmed implementation (call if param structs are big endian). + // This may be NULL if no shim is needed or present. + xe_kernel_export_fn shim; + } function_data; + }; +} xe_kernel_export_t; + +#define XE_DECLARE_EXPORT(module, ordinal, name, signature, flags) \ + { \ + ordinal, \ + flags, \ + #signature, \ + #name, \ + } + + +bool xe_kernel_export_is_implemented(const xe_kernel_export_t *kernel_export); + + +struct xe_kernel_export_resolver; +typedef struct xe_kernel_export_resolver* xe_kernel_export_resolver_ref; + + +xe_kernel_export_resolver_ref xe_kernel_export_resolver_create(); +xe_kernel_export_resolver_ref xe_kernel_export_resolver_retain( + xe_kernel_export_resolver_ref resolver); +void xe_kernel_export_resolver_release(xe_kernel_export_resolver_ref resolver); + +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); + +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); +xe_kernel_export_t *xe_kernel_export_resolver_get_by_name( + xe_kernel_export_resolver_ref resolver, const char *library_name, + const char *name); + +#endif // XENIA_KERNEL_EXPORT_H_ diff --git a/include/xenia/kernel/module.h b/include/xenia/kernel/module.h new file mode 100644 index 000000000..c9e53ec9d --- /dev/null +++ b/include/xenia/kernel/module.h @@ -0,0 +1,71 @@ +/** + ****************************************************************************** + * 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_MODULE_H_ +#define XENIA_KERNEL_MODULE_H_ + +#include + +#include +#include + +typedef struct { + xechar_t path[2048]; + xechar_t name[256]; +} xe_module_options_t; + +struct xe_module; +typedef struct xe_module* xe_module_ref; + + +#define kXEPESectionContainsCode 0x00000020 +#define kXEPESectionContainsDataInit 0x00000040 +#define kXEPESectionContainsDataUninit 0x00000080 +#define kXEPESectionMemoryExecute 0x20000000 +#define kXEPESectionMemoryRead 0x40000000 +#define kXEPESectionMemoryWrite 0x80000000 +typedef struct { + char name[9]; // 8 + 1 for \0 + uint32_t raw_address; + size_t raw_size; + uint32_t address; + size_t size; + uint32_t flags; // kXEPESection* +} xe_module_pe_section_t; + +typedef struct { + uint32_t address; + size_t total_length; // in bytes + size_t prolog_length; // in bytes +} xe_module_pe_method_info_t; + + +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 xe_module_retain(xe_module_ref module); +void xe_module_release(xe_module_ref module); + +uint32_t xe_module_get_handle(xe_module_ref module); +xe_xex2_ref xe_module_get_xex(xe_module_ref module); +const xe_xex2_header_t *xe_module_get_xex_header(xe_module_ref module); + +void *xe_module_get_proc_address(xe_module_ref module, const uint32_t ordinal); + +xe_module_pe_section_t *xe_module_get_section(xe_module_ref module, + const char *name); +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); + +void xe_module_dump(xe_module_ref module); + + +#endif // XENIA_KERNEL_MODULE_H_ diff --git a/include/xenia/kernel/xex2.h b/include/xenia/kernel/xex2.h new file mode 100644 index 000000000..2f69ee4de --- /dev/null +++ b/include/xenia/kernel/xex2.h @@ -0,0 +1,46 @@ +/** + ****************************************************************************** + * 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_XEX2_H_ +#define XENIA_KERNEL_XEX2_H_ + +#include + +#include + +typedef struct { + int reserved; +} xe_xex2_options_t; + +struct xe_xex2; +typedef struct xe_xex2* xe_xex2_ref; + +typedef struct { + uint32_t ordinal; + uint32_t value_address; // address to place value + uint32_t thunk_address; // NULL or address of thunk +} xe_xex2_import_info_t; + + +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 xe_xex2_retain(xe_xex2_ref xex); +void xe_xex2_release(xe_xex2_ref xex); + +const xechar_t *xe_xex2_get_name(xe_xex2_ref xex); +const xe_xex2_header_t *xe_xex2_get_header(xe_xex2_ref xex); + +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); + + +#endif // XENIA_KERNEL_XEX2_H_ diff --git a/include/xenia/kernel/xex2_info.h b/include/xenia/kernel/xex2_info.h new file mode 100644 index 000000000..1e2e93d9f --- /dev/null +++ b/include/xenia/kernel/xex2_info.h @@ -0,0 +1,459 @@ +/** + ****************************************************************************** + * 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_XEX2_INFO_H_ +#define XENIA_KERNEL_XEX2_INFO_H_ + +#include + + +typedef enum { + XEX_HEADER_RESOURCE_INFO = 0x000002FF, + XEX_HEADER_FILE_FORMAT_INFO = 0x000003FF, + XEX_HEADER_DELTA_PATCH_DESCRIPTOR = 0x000005FF, + XEX_HEADER_BASE_REFERENCE = 0x00000405, + XEX_HEADER_BOUNDING_PATH = 0x000080FF, + XEX_HEADER_DEVICE_ID = 0x00008105, + XEX_HEADER_ORIGINAL_BASE_ADDRESS = 0x00010001, + XEX_HEADER_ENTRY_POINT = 0x00010100, + XEX_HEADER_IMAGE_BASE_ADDRESS = 0x00010201, + XEX_HEADER_IMPORT_LIBRARIES = 0x000103FF, + XEX_HEADER_CHECKSUM_TIMESTAMP = 0x00018002, + XEX_HEADER_ENABLED_FOR_CALLCAP = 0x00018102, + XEX_HEADER_ENABLED_FOR_FASTCAP = 0x00018200, + XEX_HEADER_ORIGINAL_PE_NAME = 0x000183FF, + XEX_HEADER_STATIC_LIBRARIES = 0x000200FF, + XEX_HEADER_TLS_INFO = 0x00020104, + XEX_HEADER_DEFAULT_STACK_SIZE = 0x00020200, + XEX_HEADER_DEFAULT_FILESYSTEM_CACHE_SIZE = 0x00020301, + XEX_HEADER_DEFAULT_HEAP_SIZE = 0x00020401, + XEX_HEADER_PAGE_HEAP_SIZE_AND_FLAGS = 0x00028002, + XEX_HEADER_SYSTEM_FLAGS = 0x00030000, + XEX_HEADER_EXECUTION_INFO = 0x00040006, + XEX_HEADER_TITLE_WORKSPACE_SIZE = 0x00040201, + XEX_HEADER_GAME_RATINGS = 0x00040310, + XEX_HEADER_LAN_KEY = 0x00040404, + XEX_HEADER_XBOX360_LOGO = 0x000405FF, + XEX_HEADER_MULTIDISC_MEDIA_IDS = 0x000406FF, + XEX_HEADER_ALTERNATE_TITLE_IDS = 0x000407FF, + XEX_HEADER_ADDITIONAL_TITLE_MEMORY = 0x00040801, + XEX_HEADER_EXPORTS_BY_NAME = 0x00E10402, +} xe_xex2_header_keys; + +typedef enum { + XEX_MODULE_TITLE = 0x00000001, + XEX_MODULE_EXPORTS_TO_TITLE = 0x00000002, + XEX_MODULE_SYSTEM_DEBUGGER = 0x00000004, + XEX_MODULE_DLL_MODULE = 0x00000008, + XEX_MODULE_MODULE_PATCH = 0x00000010, + XEX_MODULE_PATCH_FULL = 0x00000020, + XEX_MODULE_PATCH_DELTA = 0x00000040, + XEX_MODULE_USER_MODE = 0x00000080, +} xe_xex2_module_flags; + +typedef enum { + XEX_SYSTEM_NO_FORCED_REBOOT = 0x00000001, + XEX_SYSTEM_FOREGROUND_TASKS = 0x00000002, + XEX_SYSTEM_NO_ODD_MAPPING = 0x00000004, + XEX_SYSTEM_HANDLE_MCE_INPUT = 0x00000008, + XEX_SYSTEM_RESTRICTED_HUD_FEATURES = 0x00000010, + XEX_SYSTEM_HANDLE_GAMEPAD_DISCONNECT = 0x00000020, + XEX_SYSTEM_INSECURE_SOCKETS = 0x00000040, + XEX_SYSTEM_XBOX1_INTEROPERABILITY = 0x00000080, + XEX_SYSTEM_DASH_CONTEXT = 0x00000100, + XEX_SYSTEM_USES_GAME_VOICE_CHANNEL = 0x00000200, + XEX_SYSTEM_PAL50_INCOMPATIBLE = 0x00000400, + XEX_SYSTEM_INSECURE_UTILITY_DRIVE = 0x00000800, + XEX_SYSTEM_XAM_HOOKS = 0x00001000, + XEX_SYSTEM_ACCESS_PII = 0x00002000, + XEX_SYSTEM_CROSS_PLATFORM_SYSTEM_LINK = 0x00004000, + XEX_SYSTEM_MULTIDISC_SWAP = 0x00008000, + XEX_SYSTEM_MULTIDISC_INSECURE_MEDIA = 0x00010000, + XEX_SYSTEM_AP25_MEDIA = 0x00020000, + XEX_SYSTEM_NO_CONFIRM_EXIT = 0x00040000, + XEX_SYSTEM_ALLOW_BACKGROUND_DOWNLOAD = 0x00080000, + XEX_SYSTEM_CREATE_PERSISTABLE_RAMDRIVE = 0x00100000, + XEX_SYSTEM_INHERIT_PERSISTENT_RAMDRIVE = 0x00200000, + XEX_SYSTEM_ALLOW_HUD_VIBRATION = 0x00400000, + XEX_SYSTEM_ACCESS_UTILITY_PARTITIONS = 0x00800000, + XEX_SYSTEM_IPTV_INPUT_SUPPORTED = 0x01000000, + XEX_SYSTEM_PREFER_BIG_BUTTON_INPUT = 0x02000000, + XEX_SYSTEM_ALLOW_EXTENDED_SYSTEM_RESERVATION = 0x04000000, + XEX_SYSTEM_MULTIDISC_CROSS_TITLE = 0x08000000, + XEX_SYSTEM_INSTALL_INCOMPATIBLE = 0x10000000, + XEX_SYSTEM_ALLOW_AVATAR_GET_METADATA_BY_XUID = 0x20000000, + XEX_SYSTEM_ALLOW_CONTROLLER_SWAPPING = 0x40000000, + XEX_SYSTEM_DASH_EXTENSIBILITY_MODULE = 0x80000000, + // TODO: figure out how stored + /*XEX_SYSTEM_ALLOW_NETWORK_READ_CANCEL = 0x0, + XEX_SYSTEM_UNINTERRUPTABLE_READS = 0x0, + XEX_SYSTEM_REQUIRE_FULL_EXPERIENCE = 0x0, + XEX_SYSTEM_GAME_VOICE_REQUIRED_UI = 0x0, + XEX_SYSTEM_CAMERA_ANGLE = 0x0, + XEX_SYSTEM_SKELETAL_TRACKING_REQUIRED = 0x0, + XEX_SYSTEM_SKELETAL_TRACKING_SUPPORTED = 0x0,*/ +} xe_xex2_system_flags; + +// ESRB (Entertainment Software Rating Board) +typedef enum { + XEX_RATING_ESRB_eC = 0x00, + XEX_RATING_ESRB_E = 0x02, + XEX_RATING_ESRB_E10 = 0x04, + XEX_RATING_ESRB_T = 0x06, + XEX_RATING_ESRB_M = 0x08, + XEX_RATING_ESRB_AO = 0x0E, + XEX_RATING_ESRB_UNRATED = 0xFF, +} xe_xex2_rating_esrb_value; +// PEGI (Pan European Game Information) +typedef enum { + XEX_RATING_PEGI_3_PLUS = 0, + XEX_RATING_PEGI_7_PLUS = 4, + XEX_RATING_PEGI_12_PLUS = 9, + XEX_RATING_PEGI_16_PLUS = 13, + XEX_RATING_PEGI_18_PLUS = 14, + XEX_RATING_PEGI_UNRATED = 0xFF, +} xe_xex2_rating_pegi_value; +// PEGI (Pan European Game Information) - Finland +typedef enum { + XEX_RATING_PEGI_FI_3_PLUS = 0, + XEX_RATING_PEGI_FI_7_PLUS = 4, + XEX_RATING_PEGI_FI_11_PLUS = 8, + XEX_RATING_PEGI_FI_15_PLUS = 12, + XEX_RATING_PEGI_FI_18_PLUS = 14, + XEX_RATING_PEGI_FI_UNRATED = 0xFF, +} xe_xex2_rating_pegi_fi_value; +// PEGI (Pan European Game Information) - Portugal +typedef enum { + XEX_RATING_PEGI_PT_4_PLUS = 1, + XEX_RATING_PEGI_PT_6_PLUS = 3, + XEX_RATING_PEGI_PT_12_PLUS = 9, + XEX_RATING_PEGI_PT_16_PLUS = 13, + XEX_RATING_PEGI_PT_18_PLUS = 14, + XEX_RATING_PEGI_PT_UNRATED = 0xFF, +} xe_xex2_rating_pegi_pt_value; +// BBFC (British Board of Film Classification) - UK/Ireland +typedef enum { + XEX_RATING_BBFC_UNIVERSAL = 1, + XEX_RATING_BBFC_PG = 5, + XEX_RATING_BBFC_3_PLUS = 0, + XEX_RATING_BBFC_7_PLUS = 4, + XEX_RATING_BBFC_12_PLUS = 9, + XEX_RATING_BBFC_15_PLUS = 12, + XEX_RATING_BBFC_16_PLUS = 13, + XEX_RATING_BBFC_18_PLUS = 14, + XEX_RATING_BBFC_UNRATED = 0xFF, +} xe_xex2_rating_bbfc_value; +// CERO (Computer Entertainment Rating Organization) +typedef enum { + XEX_RATING_CERO_A = 0, + XEX_RATING_CERO_B = 2, + XEX_RATING_CERO_C = 4, + XEX_RATING_CERO_D = 6, + XEX_RATING_CERO_Z = 8, + XEX_RATING_CERO_UNRATED = 0xFF, +} xe_xex2_rating_cero_value; +// USK (Unterhaltungssoftware SelbstKontrolle) +typedef enum { + XEX_RATING_USK_ALL = 0, + XEX_RATING_USK_6_PLUS = 2, + XEX_RATING_USK_12_PLUS = 4, + XEX_RATING_USK_16_PLUS = 6, + XEX_RATING_USK_18_PLUS = 8, + XEX_RATING_USK_UNRATED = 0xFF, +} xe_xex2_rating_usk_value; +// OFLC (Office of Film and Literature Classification) - Australia +typedef enum { + XEX_RATING_OFLC_AU_G = 0, + XEX_RATING_OFLC_AU_PG = 2, + XEX_RATING_OFLC_AU_M = 4, + XEX_RATING_OFLC_AU_MA15_PLUS = 6, + XEX_RATING_OFLC_AU_UNRATED = 0xFF, +} xe_xex2_rating_oflc_au_value; +// OFLC (Office of Film and Literature Classification) - New Zealand +typedef enum { + XEX_RATING_OFLC_NZ_G = 0, + XEX_RATING_OFLC_NZ_PG = 2, + XEX_RATING_OFLC_NZ_M = 4, + XEX_RATING_OFLC_NZ_MA15_PLUS = 6, + XEX_RATING_OFLC_NZ_UNRATED = 0xFF, +} xe_xex2_rating_oflc_nz_value; +// KMRB (Korea Media Rating Board) +typedef enum { + XEX_RATING_KMRB_ALL = 0, + XEX_RATING_KMRB_12_PLUS = 2, + XEX_RATING_KMRB_15_PLUS = 4, + XEX_RATING_KMRB_18_PLUS = 6, + XEX_RATING_KMRB_UNRATED = 0xFF, +} xe_xex2_rating_kmrb_value; +// Brazil +typedef enum { + XEX_RATING_BRAZIL_ALL = 0, + XEX_RATING_BRAZIL_12_PLUS = 2, + XEX_RATING_BRAZIL_14_PLUS = 4, + XEX_RATING_BRAZIL_16_PLUS = 5, + XEX_RATING_BRAZIL_18_PLUS = 8, + XEX_RATING_BRAZIL_UNRATED = 0xFF, +} xe_xex2_rating_brazil_value; +// FPB (Film and Publication Board) +typedef enum { + XEX_RATING_FPB_ALL = 0, + XEX_RATING_FPB_PG = 6, + XEX_RATING_FPB_10_PLUS = 7, + XEX_RATING_FPB_13_PLUS = 10, + XEX_RATING_FPB_16_PLUS = 13, + XEX_RATING_FPB_18_PLUS = 14, + XEX_RATING_FPB_UNRATED = 0xFF, +} xe_xex2_rating_fpb_value; + +typedef struct { + xe_xex2_rating_esrb_value esrb; + xe_xex2_rating_pegi_value pegi; + xe_xex2_rating_pegi_fi_value pegifi; + xe_xex2_rating_pegi_pt_value pegipt; + xe_xex2_rating_bbfc_value bbfc; + xe_xex2_rating_cero_value cero; + xe_xex2_rating_usk_value usk; + xe_xex2_rating_oflc_au_value oflcau; + xe_xex2_rating_oflc_nz_value oflcnz; + xe_xex2_rating_kmrb_value kmrb; + xe_xex2_rating_brazil_value brazil; + xe_xex2_rating_fpb_value fpb; +} xe_xex2_game_ratings_t; + +typedef union { + uint32_t value; + struct { + uint32_t major : 4; + uint32_t minor : 4; + uint32_t build : 16; + uint32_t qfe : 8; + }; +} xe_xex2_version_t; + +typedef struct { + uint32_t key; + uint32_t length; + union { + uint32_t value; + uint32_t offset; + }; +} xe_xex2_opt_header_t; + +typedef struct { + char title_id[8]; + uint32_t address; + uint32_t size; +} xe_xex2_resource_info_t; + +typedef struct { + uint32_t media_id; + xe_xex2_version_t version; + xe_xex2_version_t base_version; + uint32_t title_id; + uint8_t platform; + uint8_t executable_table; + uint8_t disc_number; + uint8_t disc_count; + uint32_t savegame_id; +} xe_xex2_execution_info_t; + +typedef struct { + uint32_t slot_count; + uint32_t raw_data_address; + uint32_t data_size; + uint32_t raw_data_size; +} xe_xex2_tls_info_t; + +typedef struct { + char name[32]; + uint8_t digest[20]; + uint32_t import_id; + xe_xex2_version_t version; + xe_xex2_version_t min_version; + size_t record_count; + uint32_t *records; +} xe_xex2_import_library_t; + +typedef enum { + XEX_APPROVAL_UNAPPROVED = 0, + XEX_APPROVAL_POSSIBLE = 1, + XEX_APPROVAL_APPROVED = 2, + XEX_APPROVAL_EXPIRED = 3, +} xe_xex2_approval_type; + +typedef struct { + char name[9]; // 8 + 1 for \0 + uint16_t major; + uint16_t minor; + uint16_t build; + uint16_t qfe; + xe_xex2_approval_type approval; +} xe_xex2_static_library_t; + +typedef enum { + XEX_ENCRYPTION_NONE = 0, + XEX_ENCRYPTION_NORMAL = 1, +} xe_xex2_encryption_type; + +typedef enum { + XEX_COMPRESSION_NONE = 0, + XEX_COMPRESSION_BASIC = 1, + XEX_COMPRESSION_NORMAL = 2, + XEX_COMPRESSION_DELTA = 3, +} xe_xex2_compression_type; + +typedef struct { + uint32_t data_size; + uint32_t zero_size; +} xe_xex2_file_basic_compression_block_t; + +typedef struct { + uint32_t block_count; + xe_xex2_file_basic_compression_block_t *blocks; +} xe_xex2_file_basic_compression_info_t; + +typedef struct { + uint32_t window_size; + uint32_t window_bits; + uint32_t block_size; + uint8_t block_hash[20]; +} xe_xex2_file_normal_compression_info_t; + +typedef struct { + xe_xex2_encryption_type encryption_type; + xe_xex2_compression_type compression_type; + union { + xe_xex2_file_basic_compression_info_t basic; + xe_xex2_file_normal_compression_info_t normal; + } compression_info; +} xe_xex2_file_format_info_t; + +typedef enum { + XEX_IMAGE_MANUFACTURING_UTILITY = 0x00000002, + XEX_IMAGE_MANUFACTURING_SUPPORT_TOOLS = 0x00000004, + XEX_IMAGE_XGD2_MEDIA_ONLY = 0x00000008, + XEX_IMAGE_CARDEA_KEY = 0x00000100, + XEX_IMAGE_XEIKA_KEY = 0x00000200, + XEX_IMAGE_USERMODE_TITLE = 0x00000400, + XEX_IMAGE_USERMODE_SYSTEM = 0x00000800, + XEX_IMAGE_ORANGE0 = 0x00001000, + XEX_IMAGE_ORANGE1 = 0x00002000, + XEX_IMAGE_ORANGE2 = 0x00004000, + XEX_IMAGE_IPTV_SIGNUP_APPLICATION = 0x00010000, + XEX_IMAGE_IPTV_TITLE_APPLICATION = 0x00020000, + XEX_IMAGE_KEYVAULT_PRIVILEGES_REQUIRED = 0x04000000, + XEX_IMAGE_ONLINE_ACTIVATION_REQUIRED = 0x08000000, + XEX_IMAGE_PAGE_SIZE_4KB = 0x10000000, // else 64KB + XEX_IMAGE_REGION_FREE = 0x20000000, + XEX_IMAGE_REVOCATION_CHECK_OPTIONAL = 0x40000000, + XEX_IMAGE_REVOCATION_CHECK_REQUIRED = 0x80000000, +} xe_xex2_image_flags; + +typedef enum { + XEX_MEDIA_HARDDISK = 0x00000001, + XEX_MEDIA_DVD_X2 = 0x00000002, + XEX_MEDIA_DVD_CD = 0x00000004, + XEX_MEDIA_DVD_5 = 0x00000008, + XEX_MEDIA_DVD_9 = 0x00000010, + XEX_MEDIA_SYSTEM_FLASH = 0x00000020, + XEX_MEDIA_MEMORY_UNIT = 0x00000080, + XEX_MEDIA_USB_MASS_STORAGE_DEVICE = 0x00000100, + XEX_MEDIA_NETWORK = 0x00000200, + XEX_MEDIA_DIRECT_FROM_MEMORY = 0x00000400, + XEX_MEDIA_RAM_DRIVE = 0x00000800, + XEX_MEDIA_SVOD = 0x00001000, + XEX_MEDIA_INSECURE_PACKAGE = 0x01000000, + XEX_MEDIA_SAVEGAME_PACKAGE = 0x02000000, + XEX_MEDIA_LOCALLY_SIGNED_PACKAGE = 0x04000000, + XEX_MEDIA_LIVE_SIGNED_PACKAGE = 0x08000000, + XEX_MEDIA_XBOX_PACKAGE = 0x10000000, +} xe_xex2_media_flags; + +typedef enum { + XEX_REGION_NTSCU = 0x000000FF, + XEX_REGION_NTSCJ = 0x0000FF00, + XEX_REGION_NTSCJ_JAPAN = 0x00000100, + XEX_REGION_NTSCJ_CHINA = 0x00000200, + XEX_REGION_PAL = 0x00FF0000, + XEX_REGION_PAL_AU_NZ = 0x00010000, + XEX_REGION_OTHER = 0xFF000000, + XEX_REGION_ALL = 0xFFFFFFFF, +} xe_xex2_region_flags; + +typedef struct { + uint32_t header_size; + uint32_t image_size; + uint8_t rsa_signature[256]; + uint32_t unklength; + xe_xex2_image_flags image_flags; + uint32_t load_address; + uint8_t section_digest[20]; + uint32_t import_table_count; + uint8_t import_table_digest[20]; + uint8_t media_id[16]; + uint8_t file_key[16]; + uint32_t export_table; + uint8_t header_digest[20]; + xe_xex2_region_flags game_regions; + xe_xex2_media_flags media_flags; +} xe_xex2_loader_info_t; + +typedef enum { + XEX_SECTION_CODE = 1, + XEX_SECTION_DATA = 2, + XEX_SECTION_READONLY_DATA = 3, +} xe_xex2_section_type; + +typedef struct { + union { + struct { + xe_xex2_section_type type : 4; + uint32_t page_count : 28; // # of 64kb pages + }; + uint32_t value; // To make uint8_t swapping easier + } info; + uint8_t digest[20]; +} xe_xex2_section_t; + +#define xe_xex2_section_length 0x00010000 + +typedef struct { + uint32_t xex2; + xe_xex2_module_flags module_flags; + uint32_t exe_offset; + uint32_t unknown0; + uint32_t certificate_offset; + + xe_xex2_system_flags system_flags; + xe_xex2_resource_info_t resource_info; + xe_xex2_execution_info_t execution_info; + xe_xex2_game_ratings_t game_ratings; + xe_xex2_tls_info_t tls_info; + size_t import_library_count; + xe_xex2_import_library_t import_libraries[32]; + size_t static_library_count; + xe_xex2_static_library_t static_libraries[32]; + xe_xex2_file_format_info_t file_format_info; + xe_xex2_loader_info_t loader_info; + uint8_t session_key[16]; + + uint32_t exe_address; + uint32_t exe_entry_point; + uint32_t exe_stack_size; + uint32_t exe_heap_size; + + size_t header_count; + xe_xex2_opt_header_t headers[64]; + + size_t section_count; + xe_xex2_section_t* sections; +} xe_xex2_header_t; + + +#endif // XENIA_KERNEL_XEX2_INFO_H_ diff --git a/include/xenia/logging.h b/include/xenia/logging.h new file mode 100644 index 000000000..5a8e0009a --- /dev/null +++ b/include/xenia/logging.h @@ -0,0 +1,72 @@ +/** + ****************************************************************************** + * 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_LOGGING_H_ +#define XENIA_LOGGING_H_ + +#include +#include + + +#if XE_COMPILER(GNUC) +#define XE_LOG_LINE_ATTRIBUTE __attribute__ ((format (printf, 5, 6))) +#else +#define XE_LOG_LINE_ATTRIBUTE +#endif // GNUC +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, ...) XE_LOG_LINE_ATTRIBUTE; +#undef XE_LOG_LINE_ATTRIBUTE + +#if XE_OPTION(ENABLE_LOGGING) +#define XELOGCORE(level, fmt, ...) xe_log_line( \ + XE_CURRENT_FILE, XE_CURRENT_LINE, XE_CURRENT_FUNCTION, level, \ + fmt, ##__VA_ARGS__) +#else +#define XELOGCORE(level, fmt, ...) XE_EMPTY_MACRO +#endif // ENABLE_LOGGING + +#if XE_OPTION(LOG_ERROR) +#define XELOGE(fmt, ...) XELOGCORE('!', fmt, ##__VA_ARGS__) +#else +#define XELOGE(fmt, ...) XE_EMPTY_MACRO +#endif +#if XE_OPTION(LOG_WARNING) +#define XELOGW(fmt, ...) XELOGCORE('w', fmt, ##__VA_ARGS__) +#else +#define XELOGW(fmt, ...) XE_EMPTY_MACRO +#endif +#if XE_OPTION(LOG_INFO) +#define XELOGI(fmt, ...) XELOGCORE('i', fmt, ##__VA_ARGS__) +#else +#define XELOGI(fmt, ...) XE_EMPTY_MACRO +#endif +#if XE_OPTION(LOG_DEBUG) +#define XELOGD(fmt, ...) XELOGCORE('d', fmt, ##__VA_ARGS__) +#else +#define XELOGD(fmt, ...) XE_EMPTY_MACRO +#endif +#if XE_OPTION(LOG_CPU) +#define XELOGCPU(fmt, ...) XELOGCORE('C', fmt, ##__VA_ARGS__) +#else +#define XELOGCPU(fmt, ...) XE_EMPTY_MACRO +#endif +#if XE_OPTION(LOG_GPU) +#define XELOGGPU(fmt, ...) XELOGCORE('G', fmt, ##__VA_ARGS__) +#else +#define XELOGGPU(fmt, ...) XE_EMPTY_MACRO +#endif +#if XE_OPTION(LOG_KERNEL) +#define XELOGKERNEL(fmt, ...) XELOGCORE('K', fmt, ##__VA_ARGS__) +#else +#define XELOGKERNEL(fmt, ...) XE_EMPTY_MACRO +#endif + + +#endif // XENIA_LOGGING_H_ diff --git a/include/xenia/malloc.h b/include/xenia/malloc.h new file mode 100644 index 000000000..da8d5a44a --- /dev/null +++ b/include/xenia/malloc.h @@ -0,0 +1,33 @@ +/** + ****************************************************************************** + * 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_MALLOC_H_ +#define XENIA_MALLOC_H_ + +#include + + +void *xe_malloc(const size_t size); +void *xe_calloc(const size_t size); +void *xe_realloc(void *ptr, const size_t old_size, const size_t new_size); +void *xe_recalloc(void *ptr, const size_t old_size, const size_t new_size); +void xe_free(void *ptr); + +xe_aligned_void_t *xe_malloc_aligned(const size_t size); +void xe_free_aligned(xe_aligned_void_t *ptr); + +int xe_zero_struct(void *ptr, const size_t size); +int xe_zero_memory(void *ptr, const size_t size, const size_t offset, + const size_t length); +int xe_copy_struct(void *dest, const void *source, const size_t size); +int xe_copy_memory(void *dest, const size_t dest_size, const void *source, + const size_t source_size); + + +#endif // XENIA_MALLOC_H_ diff --git a/include/xenia/platform.h b/include/xenia/platform.h new file mode 100644 index 000000000..a15de7962 --- /dev/null +++ b/include/xenia/platform.h @@ -0,0 +1,155 @@ +/** + ****************************************************************************** + * 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_PLATFORM_H_ +#define XENIA_PLATFORM_H_ + +// NOTE: ordering matters here as sometimes multiple flags are defined on +// certain platforms. + +// Great resource on predefined macros: http://predef.sourceforge.net/preos.html + +/* +XE_PLATFORM: IOS | OSX | XBOX360 | WINCE | WIN32 | ANDROID | NACL | UNIX +XE_LIKE: OSX | WIN32 | POSIX +XE_PROFILE: EMBEDDED | DESKTOP (+ _SIMULATOR) +XE_COMPILER: GNUC | MSVC | INTEL | UNKNOWN +XE_CPU: 32BIT | 64BIT | BIGENDIAN | LITTLEENDIAN +*/ + +#define XE_PLATFORM(NAME) (defined XE_PLATFORM_##NAME && XE_PLATFORM_##NAME ) +#define XE_LIKE(NAME) (defined XE_LIKE_##NAME && XE_LIKE_##NAME ) +#define XE_PROFILE(NAME) (defined XE_PROFILE_##NAME && XE_PROFILE_##NAME ) +#define XE_COMPILER(NAME) (defined XE_COMPILER_##NAME && XE_COMPILER_##NAME ) +#define XE_CPU(NAME) (defined XE_CPU_##NAME && XE_CPU_##NAME ) + +#if defined(__APPLE__) +#include +#endif + +#if (defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED ) || \ + (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE ) || \ + (defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR) + +#define XE_PLATFORM_IOS 1 +#define XE_LIKE_OSX 1 +#define XE_PROFILE_EMBEDDED 1 + +#if defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR +// EMBEDDED *and* SIMULATOR +#define XE_PROFILE_SIMULATOR 1 +#endif + +#elif defined(TARGET_OS_MAC) && TARGET_OS_MAC + +#define XE_PLATFORM_OSX 1 +#define XE_LIKE_OSX 1 +#define XE_PROFILE_DESKTOP 1 + +#elif defined(_XBOX) + +#define XE_PLATFORM_XBOX360 1 +#define XE_LIKE_WIN32 1 +#define XE_PROFILE_EMBEDDED 1 + +#elif defined(_WIN32_WCE) + +#define XE_PLATFORM_WINCE 1 +#define XE_LIKE_WIN32 1 +#define XE_PROFILE_EMBEDDED 1 + +#elif defined(__CYGWIN__) + +#define XE_PLATFORM_CYGWIN 1 +#define XE_LIKE_POSIX 1 +#define XE_PROFILE_DESKTOP 1 + +#elif defined(WIN32) || defined(_WIN32) + +#define XE_PLATFORM_WIN32 1 +#define XE_LIKE_WIN32 1 +#define XE_PROFILE_DESKTOP 1 + +#elif defined(ANDROID) + +#define XE_PLATFORM_ANDROID 1 +#define XE_LIKE_POSIX 1 +#define XE_PROFILE_EMBEDDED 1 + +#elif defined(__native_client__) + +#define XE_PLATFORM_NACL 1 +#define XE_LIKE_POSIX 1 +#define XE_PROFILE_DESKTOP 1 + +#else + +#define XE_PLATFORM_UNIX 1 +#define XE_LIKE_POSIX 1 +#define XE_PROFILE_DESKTOP 1 + +#endif + +#if defined(__GNUC__) +#define XE_COMPILER_GNUC 1 +#elif defined(_MSC_VER) +#define XE_COMPILER_MSVC 1 +#elif defined(__MINGW32) +#define XE_COMPILER_MINGW32 1 +#elif defined(__INTEL_COMPILER) +#define XE_COMPILER_INTEL 1 +#else +#define XE_COMPILER_UNKNOWN 1 +#endif + +#if defined(__ia64__) || defined(_M_IA64) || \ + defined(__ppc64__) || defined(__PPC64__) || \ + defined(__arch64__) || \ + defined(__x86_64__) || defined(_M_X64) || defined(_M_AMD64) || \ + defined(__LP64__) || defined(__LLP64) || \ + defined(_WIN64) || \ + (__WORDSIZE == 64) +#define XE_CPU_64BIT 1 +#else +#define XE_CPU_32BIT 1 +#endif // [64bit flags] + +#if defined(__ppc__) || defined(__PPC__) || defined(__powerpc__) || defined(__powerpc) || defined(__POWERPC__) || defined(_M_PPC) || defined(__PPC) || \ + defined(__ppc64__) || defined(__PPC64__) || \ + defined(__ARMEB__) || \ + defined(__BIG_ENDIAN) || defined(__BIG_ENDIAN__) +#define XE_CPU_BIGENDIAN 1 +#else +#define XE_CPU_LITTLEENDIAN 1 +#endif // [big endian flags] + +#if defined(DEBUG) || defined(_DEBUG) +#define XE_DEBUG 1 +#endif // DEBUG + +#if XE_CPU(32BIT) +#define XE_ALIGNMENT 8 +#else +#define XE_ALIGNMENT 16 +#endif // 32BIT + +#if XE_LIKE(WIN32) +#define XE_MAIN_THUNK(name) \ + int wmain(int argc, wchar_t *argv[]) { \ + return name(argc, (xechar_t**)argv); \ + } +#else +#define XE_MAIN_THUNK(name) \ + int main(int argc, char **argv) { \ + return name(argc, argv); \ + } +#endif // WIN32 + + +#endif // XENIA_PLATFORM_H_ diff --git a/include/xenia/platform_includes.h b/include/xenia/platform_includes.h new file mode 100644 index 000000000..2309b942b --- /dev/null +++ b/include/xenia/platform_includes.h @@ -0,0 +1,51 @@ +/** + ****************************************************************************** + * 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_PLATFORM_INCLUDES_H_ +#define XENIA_PLATFORM_INCLUDES_H_ + +#include + + +#if XE_PLATFORM(WINCE) || XE_PLATFORM(WIN32) +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include +#endif // WINCE || WIN32 + +#if XE_PLATFORM(XBOX360) +#include +#include +#endif // XBOX360 + +#if XE_COMPILER(MSVC) +// Disable warning C4068: unknown pragma +#pragma warning(disable : 4068) +#endif // MSVC + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#endif // XENIA_PLATFORM_INCLUDES_H_ diff --git a/include/xenia/string.h b/include/xenia/string.h new file mode 100644 index 000000000..6e5e253ab --- /dev/null +++ b/include/xenia/string.h @@ -0,0 +1,106 @@ +/** + ****************************************************************************** + * 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_STRING_H_ +#define XENIA_STRING_H_ + +#include +#include + + +// NOTE: these differing implementations should behave pretty much the same. +// If they don't, then they will have to be abstracted out. + +#define XEInvalidSize ((size_t)(-1)) + +#if !XE_LIKE(WIN32) +int strncpy_s(char* dest, size_t destLength, const char* source, size_t count); +#define strcpy_s(dest, destLength, source) !(strcpy(dest, source) == dest + (destLength*0)) +#define strcat_s(dest, destLength, source) !(strcat(dest, source) == dest + (destLength*0)) +#define _snprintf_s(dest, destLength, format, ...) snprintf(dest, destLength, format, ##__VA_ARGS__) +#else +#define strcasecmp _stricmp +#endif + +#define xestrlenw wcslen +#define xestrcmpw wcscmp +#define xestrcasecmpw _wcsicmp +#define xestrchrw wcschr +#define xestrrchrw wcsrchr +#define xestrstrw wcsstr +#define xestrcpyw(dest, destLength, source) (wcscpy_s(dest, destLength, source) == 0) +#define xestrncpyw(dest, destLength, source, count) (wcsncpy_s(dest, destLength, source, count) == 0) +#define xestrcatw(dest, destLength, source) (wcscat_s(dest, destLength, source) == 0) +#define xesnprintfw(buffer, bufferCount, format, ...) _snwprintf_s(buffer, bufferCount, (bufferCount) ? (bufferCount - 1) : 0, format, ##__VA_ARGS__) +#define xevsnprintfw(buffer, bufferCount, format, args) _vsnwprintf_s(buffer, bufferCount, (bufferCount) ? (bufferCount - 1) : 0, format, args) +#define xevscprintfw(format, args) _vscwprintf(format, args) + +#define xestrlena strlen +#define xestrcmpa strcmp +#define xestrcasecmpa strcasecmp +#define xestrchra strchr +#define xestrrchra strrchr +#define xestrstra strstr +#define xestrcpya(dest, destLength, source) (strcpy_s(dest, destLength, source) == 0) +#define xestrncpya(dest, destLength, source, count) (strncpy_s(dest, destLength, source, count) == 0) +#define xestrcata(dest, destLength, source) (strcat_s(dest, destLength, source) == 0) +#define xesnprintfa(buffer, bufferCount, format, ...) _snprintf_s(buffer, bufferCount, format, ##__VA_ARGS__) +#define xevsnprintfa(buffer, bufferCount, format, args) vsnprintf(buffer, bufferCount, format, args) + +#if XE_PLATFORM(WIN32) + +typedef wchar_t xechar_t; +#define XE_WCHAR 1 +#define XETEXT(s) L ## s + +#define xestrlen xestrlenw +#define xestrcmp xestrcmpw +#define xestrcasecmp xestrcasecmpw +#define xestrchr xestrchrw +#define xestrrchr xestrrchrw +#define xestrstr xestrstrw +#define xestrcpy xestrcpyw +#define xestrncpy xestrncpyw +#define xestrcat xestrcatw +#define xesnprintf xesnprintfw +#define xevsnprintf xevsnprintfw +#define xestrnarrow(dest, destLength, source) (wcstombs_s(NULL, dest, destLength, source, _TRUNCATE) == 0) +#define xestrwiden(dest, destLength, source) (mbstowcs_s(NULL, dest, destLength, source, _TRUNCATE) == 0) + +#else + +typedef char xechar_t; +#define XE_CHAR 1 +#define XETEXT(s) s + +#define xestrlen xestrlena +#define xestrcmp xestrcmpa +#define xestrcasecmp xestrcasecmpa +#define xestrchr xestrchra +#define xestrrchr xestrrchra +#define xestrstr xestrstra +#define xestrcpy xestrcpya +#define xestrncpy xestrncpya +#define xestrcat xestrcata +#define xesnprintf xesnprintfa +#define xevsnprintf xevsnprintfa +#define xestrnarrow(dest, destLength, source) xestrCpy(dest, destLength, source) +#define xestrwiden(dest, destLength, source) xestrCpy(dest, destLength, source) + +#endif // WIN32 + +#define XT XETEXT + +#if XE_LIKE(WIN32) +#define XE_PATH_SEPARATOR ((xechar_t)'\\') +#else +#define XE_PATH_SEPARATOR ((xechar_t)'/') +#endif // WIN32 + +#endif // XENIA_STRING_H_ diff --git a/include/xenia/types.h b/include/xenia/types.h new file mode 100644 index 000000000..f5f2a1dd8 --- /dev/null +++ b/include/xenia/types.h @@ -0,0 +1,109 @@ +/** + ****************************************************************************** + * 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_TYPES_H_ +#define XENIA_TYPES_H_ + +#include +#include + + +#define XE_EMPTY_MACRO do { } while(0) + +#define XEUNREFERENCED(expr) (void)(expr) + +#if XE_COMPILER(MSVC) +#define XEASSUME(expr) __analysis_assume(expr) +#else +#define XEASSUME(expr) +#endif // MSVC + +#if XE_COMPILER(MSVC) +#define XECDECL __cdecl +#else +#define XECDECL +#endif // MSVC + +#if defined(__cplusplus) +#define XEEXTERNC extern "C" +#define XEEXTERNC_BEGIN extern "C" { +#define XEEXTERNC_END } +#else +#define XEEXTERNC extern +#define XEEXTERNC_BEGIN +#define XEEXTERNC_END +#endif // __cplusplus + +#if XE_COMPILER(MSVC) +// http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx +#define XEFORCEINLINE static __forceinline +#define XENOINLINE __declspec(noinline) +#elif XE_COMPILER(GNUC) +// http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html +#if (__GNUC__ >= 4) +#define XEFORCEINLINE static __inline__ __attribute__((always_inline)) +#else +#define XEFORCEINLINE static __inline__ +#endif +#define XENOINLINE +#else +#define XEFORCEINLINE +#define XENOINLINE +#endif // MSVC + +#if XE_COMPILER(MSVC) +// http://msdn.microsoft.com/en-us/library/83ythb65.aspx +#define XECACHEALIGN __declspec(align(XE_ALIGNMENT)) +#define XECACHEALIGN64 __declspec(align(64)) +#elif XE_COMPILER(GNUC) +// http://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html +#define XECACHEALIGN __attribute__ ((aligned(XE_ALIGNMENT))) +#define XECACHEALIGN64 __attribute__ ((aligned(64))) +#else +#define XECACHEALIGN +#define XECACHEALIGN64 +#endif // MSVC +typedef XECACHEALIGN volatile void xe_aligned_void_t; + +#if XE_COMPILER(MSVC) +// http://msdn.microsoft.com/en-us/library/ms175773.aspx +#define XECOUNT(array) _countof(array) +#elif XE_COMPILER(GNUC) +#define XECOUNT(array) (sizeof(array) / sizeof(__typeof__(array[0]))) +#else +#define XECOUNT(array) (sizeof(array) / sizeof(array[0])) +#endif // MSVC + +#if !defined(MIN) +#if XE_COMPILER(GNUC) +#define MIN(A, B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); (__a < __b) ? __a : __b; }) +#define MAX(A, B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); (__a < __b) ? __b : __a; }) +//#elif XE_COMPILER(MSVC) +// TODO(benvanik): experiment with decltype: +// http://msdn.microsoft.com/en-us/library/dd537655.aspx +#else +// NOTE: this implementation will evaluate the arguments twice - may be worth +// writing an inline function instead. +#define MIN(A, B) ( ((A) < (B)) ? (A) : (B) ) +#define MAX(A, B) ( ((A) < (B)) ? (B) : (A) ) +#endif // GNUC +#endif // !MIN + +#define XEFAIL() goto XECLEANUP +#define XEEXPECT(expr) if (!(expr) ) { goto XECLEANUP; } +#define XEEXPECTTRUE(expr) if (!(expr) ) { goto XECLEANUP; } +#define XEEXPECTFALSE(expr) if ( (expr) ) { goto XECLEANUP; } +#define XEEXPECTZERO(expr) if ( (expr) != 0 ) { goto XECLEANUP; } +#define XEEXPECTNOTZERO(expr) if ( (expr) == 0 ) { goto XECLEANUP; } +#define XEEXPECTNULL(expr) if ( (expr) != NULL ) { goto XECLEANUP; } +#define XEEXPECTNOTNULL(expr) if ( (expr) == NULL ) { goto XECLEANUP; } +#define XEIGNORE(expr) do { (void)(expr); } while(0) + + +#endif // XENIA_TYPES_H_ diff --git a/include/xenia/xenia.h b/include/xenia/xenia.h index 497f4b6b6..35249b31f 100644 --- a/include/xenia/xenia.h +++ b/include/xenia/xenia.h @@ -10,6 +10,12 @@ #ifndef XENIA_H_ #define XENIA_H_ +#include +#include +#include +#include +#include + int some_function(int x); #endif // XENIA_H_ diff --git a/src/core/file.cc b/src/core/file.cc new file mode 100644 index 000000000..429b01899 --- /dev/null +++ b/src/core/file.cc @@ -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 + + +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); +} diff --git a/src/core/memory.cc b/src/core/memory.cc new file mode 100644 index 000000000..6aee95629 --- /dev/null +++ b/src/core/memory.cc @@ -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 + +#include + + +/** + * 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; +} diff --git a/src/core/mmap_posix.cc b/src/core/mmap_posix.cc new file mode 100644 index 000000000..15e74390e --- /dev/null +++ b/src/core/mmap_posix.cc @@ -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 + +#include + + +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; +} diff --git a/src/core/pal.cc b/src/core/pal.cc new file mode 100644 index 000000000..11fea7ca8 --- /dev/null +++ b/src/core/pal.cc @@ -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 + + +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); +} diff --git a/src/core/ref.cc b/src/core/ref.cc new file mode 100644 index 000000000..68a847d6b --- /dev/null +++ b/src/core/ref.cc @@ -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 + + +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); + } +} diff --git a/src/core/sources.gypi b/src/core/sources.gypi index f9abda25b..b16056af9 100644 --- a/src/core/sources.gypi +++ b/src/core/sources.gypi @@ -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': [ + ], + }], ], } diff --git a/src/core/something.cc b/src/cpu/cpu.cc similarity index 94% rename from src/core/something.cc rename to src/cpu/cpu.cc index cdc07f3a8..87aa74e1b 100644 --- a/src/core/something.cc +++ b/src/cpu/cpu.cc @@ -7,7 +7,7 @@ ****************************************************************************** */ -#include +#include #include #include @@ -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; } diff --git a/src/cpu/sources.gypi b/src/cpu/sources.gypi new file mode 100644 index 000000000..98d0dc414 --- /dev/null +++ b/src/cpu/sources.gypi @@ -0,0 +1,6 @@ +# Copyright 2013 Ben Vanik. All Rights Reserved. +{ + 'sources': [ + 'cpu.cc', + ], +} diff --git a/src/gpu/gpu.cc b/src/gpu/gpu.cc new file mode 100644 index 000000000..416acb392 --- /dev/null +++ b/src/gpu/gpu.cc @@ -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 + + +void do_gpu_stuff() { + XELOGGPU(XT("gpu")); +} diff --git a/src/gpu/sources.gypi b/src/gpu/sources.gypi new file mode 100644 index 000000000..8dd685bb0 --- /dev/null +++ b/src/gpu/sources.gypi @@ -0,0 +1,6 @@ +# Copyright 2013 Ben Vanik. All Rights Reserved. +{ + 'sources': [ + 'gpu.cc', + ], +} diff --git a/src/kernel/export.cc b/src/kernel/export.cc new file mode 100644 index 000000000..ebda11ec8 --- /dev/null +++ b/src/kernel/export.cc @@ -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 + + +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; +} diff --git a/src/kernel/kernel.cc b/src/kernel/kernel.cc new file mode 100644 index 000000000..5a17bc443 --- /dev/null +++ b/src/kernel/kernel.cc @@ -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 + +#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) { + // +} diff --git a/src/kernel/module.cc b/src/kernel/module.cc new file mode 100644 index 000000000..583d5d2a5 --- /dev/null +++ b/src/kernel/module.cc @@ -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 + +#include + + +#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"); +} diff --git a/src/kernel/modules/modules.h b/src/kernel/modules/modules.h new file mode 100644 index 000000000..9429da492 --- /dev/null +++ b/src/kernel/modules/modules.h @@ -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_ diff --git a/src/kernel/modules/sources.gypi b/src/kernel/modules/sources.gypi new file mode 100644 index 000000000..bbcfda6ae --- /dev/null +++ b/src/kernel/modules/sources.gypi @@ -0,0 +1,8 @@ +# Copyright 2013 Ben Vanik. All Rights Reserved. +{ + 'includes': [ + 'xam/sources.gypi', + 'xbdm/sources.gypi', + 'xboxkrnl/sources.gypi', + ], +} diff --git a/src/kernel/modules/xam/sources.gypi b/src/kernel/modules/xam/sources.gypi new file mode 100644 index 000000000..5e1ec7e67 --- /dev/null +++ b/src/kernel/modules/xam/sources.gypi @@ -0,0 +1,6 @@ +# Copyright 2013 Ben Vanik. All Rights Reserved. +{ + 'sources': [ + 'xam.cc', + ], +} diff --git a/src/kernel/modules/xam/xam.cc b/src/kernel/modules/xam/xam.cc new file mode 100644 index 000000000..dcce72062 --- /dev/null +++ b/src/kernel/modules/xam/xam.cc @@ -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); +} diff --git a/src/kernel/modules/xam/xam.h b/src/kernel/modules/xam/xam.h new file mode 100644 index 000000000..789d9b004 --- /dev/null +++ b/src/kernel/modules/xam/xam.h @@ -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 +#include + +#include + + +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_ diff --git a/src/kernel/modules/xam/xam_table.h b/src/kernel/modules/xam/xam_table.h new file mode 100644 index 000000000..8c153de3a --- /dev/null +++ b/src/kernel/modules/xam/xam_table.h @@ -0,0 +1,1419 @@ +/** + ****************************************************************************** + * 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_TABLE_H_ +#define XENIA_KERNEL_MODULES_XAM_TABLE_H_ + +#include + + +#define FLAG(t) kXEKernelExportFlag##t + + +static xe_kernel_export_t xe_xam_export_table[] = { +XE_DECLARE_EXPORT(xam, 0x00000001, NetDll_WSAStartup, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000002, NetDll_WSACleanup, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000003, NetDll_socket, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000004, NetDll_closesocket, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000005, NetDll_shutdown, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000006, NetDll_ioctlsocket, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000007, NetDll_setsockopt, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000008, NetDll_getsockopt, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000009, NetDll_getsockname, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000000A, NetDll_getpeername, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000000B, NetDll_bind, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000000C, NetDll_connect, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000000D, NetDll_listen, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000000E, NetDll_accept, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000000F, NetDll_select, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000010, NetDll_WSAGetOverlappedResult, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000011, NetDll_WSACancelOverlappedIO, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000012, NetDll_recv, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000013, NetDll_WSARecv, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000014, NetDll_recvfrom, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000015, NetDll_WSARecvFrom, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000016, NetDll_send, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000017, NetDll_WSASend, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000018, NetDll_sendto, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000019, NetDll_WSASendTo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000001A, NetDll_inet_addr, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000001B, NetDll_WSAGetLastError, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000001C, NetDll_WSASetLastError, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000001D, NetDll_WSACreateEvent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000001E, NetDll_WSACloseEvent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000001F, NetDll_WSASetEvent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000020, NetDll_WSAResetEvent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000021, NetDll_WSAWaitForMultipleEvents, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000022, NetDll___WSAFDIsSet, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000023, NetDll_WSAEventSelect, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000024, NetDll_WSAStartupEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000033, NetDll_XNetStartup, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000034, NetDll_XNetCleanup, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000035, NetDll_XNetRandom, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000036, NetDll_XNetCreateKey, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000037, NetDll_XNetRegisterKey, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000038, NetDll_XNetUnregisterKey, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000039, NetDll_XNetXnAddrToInAddr, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000003A, NetDll_XNetServerToInAddr, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000003B, NetDll_XNetTsAddrToInAddr, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000003C, NetDll_XNetInAddrToXnAddr, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000003D, NetDll_XNetInAddrToServer, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000003E, NetDll_XNetInAddrToString, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000003F, NetDll_XNetUnregisterInAddr, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000040, NetDll_XNetXnAddrToMachineId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000041, NetDll_XNetConnect, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000042, NetDll_XNetGetConnectStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000043, NetDll_XNetDnsLookup, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000044, NetDll_XNetDnsRelease, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000045, NetDll_XNetQosListen, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000046, NetDll_XNetQosLookup, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000047, NetDll_XNetQosServiceLookup, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000048, NetDll_XNetQosRelease, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000049, NetDll_XNetGetTitleXnAddr, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000004A, NetDll_XNetGetDebugXnAddr, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000004B, NetDll_XNetGetEthernetLinkStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000004C, NetDll_XNetGetBroadcastVersionStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000004D, NetDll_XNetQosGetListenStats, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000004E, NetDll_XNetGetOpt, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000004F, NetDll_XNetSetOpt, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000050, NetDll_XNetStartupEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000051, NetDll_XNetReplaceKey, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000052, NetDll_XNetGetXnAddrPlatform, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000053, NetDll_XNetGetSystemLinkPort, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000054, NetDll_XNetSetSystemLinkPort, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000065, NetDll_XnpLoadConfigParams, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000066, NetDll_XnpSaveConfigParams, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000067, NetDll_XnpConfigUPnP, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000068, NetDll_XnpConfig, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000069, NetDll_XnpGetConfigStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000006A, NetDll_XnpLoadMachineAccount, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000006B, NetDll_XnpSaveMachineAccount, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000006C, NetDll_XnpCapture, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000006D, NetDll_XnpEthernetInterceptSetCallbacks, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000006E, NetDll_XnpEthernetInterceptXmit, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000006F, NetDll_XnpEthernetInterceptRecv, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000070, NetDll_XnpLogonGetStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000071, NetDll_XnpLogonGetQFlags, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000072, NetDll_XnpLogonSetQFlags, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000073, NetDll_XnpLogonSetQEvent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000074, NetDll_XnpLogonClearQEvent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000075, NetDll_XnpLogonGetQVals, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000076, NetDll_XnpLogonSetQVals, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000077, NetDll_XnpLogonSetPState, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000078, NetDll_XnpGetVlanXboxName, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000079, NetDll_XnpSetVlanXboxName, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000007A, NetDll_XnpGetActiveSocketList, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000007B, NetDll_XnpNoteSystemTime, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000007C, NetDll_XnpRegisterKeyForCallerType, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000007D, NetDll_XnpUnregisterKeyForCallerType, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000007E, NetDll_XnpLogonGetChallenge, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000007F, NetDll_XnpLogonClearChallenge, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000080, NetDll_XnpLogonSetChallengeResponse, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000081, NetDll_XnpGetSecAssocList, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000082, NetDll_XnpGetKeyList, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000083, NetDll_XnpGetQosLookupList, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000084, NetDll_XnpPersistTitleState, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000085, NetDll_XnpReplaceKeyForCallerType, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000086, NetDll_XnpEthernetInterceptSetExtendedReceiveCallback, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000087, NetDll_XnpQosHistoryLoad, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000088, NetDll_XnpQosHistorySaveMeasurements, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000089, NetDll_XnpQosHistoryGetEntries, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000008A, NetDll_XnpQosHistoryGetAggregateMeasurement, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000008B, NetDll_XnpToolSetCallbacks, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000008C, NetDll_XnpToolIpProxyInject, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000008D, NetDll_XnpUpdateConfigParams, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000008E, NetDll_XnpEthernetInterceptXmitAsIp, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000097, NetDll_XmlDownloadStart, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000098, NetDll_XmlDownloadContinue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000099, NetDll_XmlDownloadStop, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000009A, NetDll_XmlDownloadGetParseTime, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000009B, NetDll_XmlDownloadGetReceivedDataSize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000C6, XnpGetXwppMemoryLogSnapshot, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000C7, XnpGetXwppRuntimeFilter, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000C9, NetDll_XHttpStartup, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000CA, NetDll_XHttpShutdown, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000CB, NetDll_XHttpOpen, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000CC, NetDll_XHttpCloseHandle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000CD, NetDll_XHttpConnect, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000CE, NetDll_XHttpSetStatusCallback, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000CF, NetDll_XHttpOpenRequest, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000D0, NetDll_XHttpOpenRequestUsingMemory, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000D1, NetDll_XHttpSendRequest, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000D2, NetDll_XHttpReceiveResponse, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000D3, NetDll_XHttpQueryHeaders, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000D4, NetDll_XHttpReadData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000D5, NetDll_XHttpWriteData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000D6, NetDll_XHttpQueryOption, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000D7, NetDll_XHttpSetOption, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000D8, NetDll_XHttpDoWork, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000D9, NetDll_XHttpSetCredentials, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000DA, NetDll_XHttpQueryAuthSchemes, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000DB, NetDll_XHttpCrackUrl, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000FB, NetDll_UpnpStartup, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000FC, NetDll_UpnpCleanup, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000FD, NetDll_UpnpSearchCreate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000FE, NetDll_UpnpSearchGetDevices, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000000FF, NetDll_UpnpDescribeCreate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000100, NetDll_UpnpDescribeGetResults, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000101, NetDll_UpnpActionCalculateWorkBufferSize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000102, NetDll_UpnpActionCreate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000103, NetDll_UpnpActionGetResults, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000104, NetDll_UpnpEventCreate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000105, NetDll_UpnpEventGetCurrentState, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000106, NetDll_UpnpEventUnsubscribe, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000107, NetDll_UpnpDoWork, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000108, NetDll_UpnpCloseHandle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000012D, XNetLogonGetLoggedOnUsers, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000012E, XNetLogonGetNatType, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000012F, XNetLogonTaskStart, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000130, XNetLogonTaskClose, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000131, XNetLogonTaskContinue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000132, XNetLogonGetServiceInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000133, XNetLogonGetUserPrivileges, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000134, XNetLogonSetConsoleCertificate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000135, XNetLogonGetMachineID, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000136, XNetLogonGetTitleID, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000137, XNetLogonGetTitleVersion, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000138, XNetLogonGetServiceNetworkID, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000139, XNetLogonGetDnsString, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000013A, XNetLogonSetTitleID, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000013B, XNetLogonGetExtendedStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000013C, XNetLogonClearTicketCaches, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000013D, XNetLogonInitOverrideInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000013E, XNetLogonGetLastUPnPStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000013F, XNetLogonGetFlowToken, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000140, XNetLogonGetTicketOpt, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000141, XNetLogonSetTicketOpt, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000190, XamInputGetCapabilities, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000191, XamInputGetState, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000192, XamInputSetState, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000193, XamInputGetKeystroke, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000194, XamInputEnableAutobind, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000195, XamInputRawState, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000196, XamEnableSystemAppInput, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000197, XamInputGetDeviceStats, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000198, XamInputGetKeystrokeEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000199, XamInputGetKeystrokeHud, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000019A, XamInputSetLayoutKeyboard, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000019B, XamInputToggleKeyLocks, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000019C, XamInputResetLayoutKeyboard, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000019D, XamInputGetKeystrokeHudEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000019E, XamInputSetKeyboardTranslationHud, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000019F, XamSetInactivityTime, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001A0, XamEnableInactivityProcessing, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001A1, XamResetInactivity, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001A2, XamSetInactivityTimeFromConfig, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001A3, XamLoaderGetMediaInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001A4, XamLoaderLaunchTitle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001A5, XamLoaderLaunchTitleEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001A6, XamLoaderSetLaunchData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001A7, XamLoaderGetLaunchDataSize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001A8, XamLoaderGetLaunchData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001A9, XamLoaderTerminateTitle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001AA, XamLoaderGetDvdTrayState, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001AB, XamLoaderGetGameInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001AC, XamLoaderLaunchTitleOnDvd, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001AD, XamLoaderSetSpindleSpeed, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001AE, XamTaskCreateQueue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001AF, XamTaskSchedule, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001B0, XamTaskReschedule, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001B1, XamTaskCloseHandle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001B2, XamTaskCancel, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001B3, XamTaskShouldExit, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001B4, XamTaskWaitOnCompletion, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001B5, XamTaskModify, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001B6, XamTaskGetCurrentTask, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001B7, XamTaskGetAttributes, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001B8, XamExecutingOnBehalfOfTitle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001B9, XamInputSendStayAliveRequest, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001BA, XamInputGetUserVibrationLevel, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001BB, XamIsSystemTitleId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001BC, XamLoaderIsTitleTerminatePending, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001BD, XamInputSetTextMessengerIndicator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001BE, XamLoaderGetPriorTitleId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001BF, XamIsXbox1TitleId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001C0, XamInputSetKeyLocks, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001C1, XamInputGetKeyLocks, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001C2, XamTaskGetStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001C3, XamGetRootObj, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001C4, XamDevAuthSetFault, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001C5, XamGetDefaultSystemImage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001C6, XamGetWCNConfigFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001C7, XamSetPowerMode, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001C8, XamExecuteChallenge, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001C9, XamGetDefaultImage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001CA, XamMuteSound, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001CB, XamGetOnlineSchema, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001CC, XamSetDashContext, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001CD, XamGetDashContext, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001CE, XamIsCurrentTitleDash, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001CF, XamGetCurrentTitleId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001D0, XamSetCurrentTitleDash, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001D1, XamAllocHeapFreeSpace, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001D2, XamSetDashContextEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001D3, XamGetDashContextEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001D4, XamSetHudContext, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001D5, XamGetHudContext, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001D6, XCustomGetBannerImage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001D7, Refresh, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001D8, XCustomSetAction, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001D9, XCustomGetLastActionPress, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001DA, XCustomSetDynamicActions, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001DB, XCustomBroadcastActionEvent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001DC, XCustomGetLastActionPressEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001DD, XCustomRegisterDynamicActions, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001DE, XCustomUnregisterDynamicActions, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001DF, XCustomGetCurrentGamercard, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001E0, XamDbgPrint, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001E1, XamDbgSetOutputLevel, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001E2, XamDbgSetBreakLevel, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001E3, XamLoaderGetMediaInfoEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001E4, XamLoaderSetGameInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001E5, XamFormatMessage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001E6, XamUniSortCmpString, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001E7, XamFormatTimeString, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001E8, XamFormatDateString, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001E9, XamGetLocaleDateFormat, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001EA, XamAlloc, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001EB, XamAllocEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001EC, XamFree, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001ED, XamAllocSize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001EE, XamAllocMountIPTVHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001EF, XamAllocUnmountIPTVHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001F0, XamAllocFreeIPTVHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001F1, XamDeviceRemap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001F2, XamLoaderGetClearCache, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001F3, XamLoaderSetClearCache, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001F4, XMsgInProcessCall, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001F5, XMsgCompleteIORequest, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001F6, XMsgSystemProcessCall, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001F7, XMsgStartIORequest, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001F8, XMsgCancelIORequest, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001F9, XMsgAcquireAsyncMessageFromOverlapped, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001FA, XMsgReleaseAsyncMessageToOverlapped, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001FB, XamGetOverlappedResult, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001FC, XMsgStartIORequestEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001FD, XamAppAllocateInterappWorkspace, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001FE, XamAppGetInterappWorkspace, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000001FF, XamAppFreeInterappWorkspace, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000200, XamFeatureEnabled, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000201, XamFeatureEnforceImageBudget, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000202, XamFeatureSetMask, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000203, XamFeatureEnableDisable, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000204, XuiControlSetItemAssociation, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000205, XamGetTitleGlobalStorageValue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000206, XamSetTitleGlobalStorageValue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000207, XamUserValidateAvatarManifest, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000208, XamUserGetDeviceContext, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000209, XamUserLookupDevice, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000020A, XamUserGetXUID, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000020B, XamUserLogon, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000020C, XamUserGetGamerTag, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000020D, XamUserGetUserIndexMask, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000020E, XamUserGetName, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000020F, XamLookupCommonStringByIndex, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000210, XamUserGetSigninState, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000211, XamUserGetIndexFromXUID, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000212, XamUserCheckPrivilege, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000213, XamUserAreUsersFriends, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000214, XamSetUserPresetPresenceState, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000215, XamGetUserPresetPresenceState, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000216, XamUserGetUserFlagsFromXUID, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000217, XamUserGetMembershipTierFromXUID, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000218, XamUserGetOnlineCountryFromXUID, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000219, XamUserReadProfileSettings, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000021A, XamUserWriteProfileSettings, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000021B, XamUserGetMembershipTier, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000021C, XamUserGetUserFlags, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000021D, XamUserGetRequestedUserIndexMask, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000021E, XamUserIsGuest, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000021F, XamUserProfileSync, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000220, XamUserFlushLogonQueue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000221, XamUserIsOnlineEnabled, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000222, XamUserGetCachedUserFlags, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000223, XamAreMixedAccountsSignedIn, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000224, XamUserLogonEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000225, XamSetUserShowMessengerFriends, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000226, XamGetUserShowMessengerFriends, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000227, XamUserGetSigninInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000228, XamUserIsPartial, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000229, XamUserGetOnlineLanguageFromXUID, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000022A, XamUserReadProfileSettingsEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000022B, XamSystemUpdaterLogon, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000022C, XamUserGetUsersMissingAvatars, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000022D, XamIsChildAccountSignedIn, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000022E, XamUserPrefetchProfileSettings, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000022F, XamUserInvalidateProfileSetting, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000230, XamProfileCreate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000231, XamProfileCreateEnumerator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000232, XamProfileEnumerate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000233, XamProfileDelete, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000234, XamProfileGetCreationStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000235, XamProfileFindAccount, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000236, XamProfileRenameAccount, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000237, XamProfileOpen, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000238, XamProfileClose, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000239, XamProfileSaveAccountInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000023A, XamProfileLoadAccountInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000023B, XamProfileRecoverTitle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000023C, XamProfileSaveWindowsLiveCredentials, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000023D, XamProfileLoadWindowsLiveCredentials, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000023E, XamProfileIsSaveWindowsLiveCredsEnabled, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000023F, XamProfileSetSaveWindowsLiveCredsEnabled, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000240, XamSetProfileReadTestHook, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000241, XamProfileGetLastSync, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000242, XamAccountRecoveryRecoverTitle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000243, XamProfileControlPec, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000244, XamAppLoad, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000245, XamAppUnloadSelf, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000246, XamAppUnloadStack, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000247, XamSendMessageToLoadedApps, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000248, XamAppRequestLoad, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000249, XamAppUnrequestLoad, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000024A, XamNavigate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000024B, XamRegisterSysApp, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000024C, XamUnregisterSysApp, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000024D, XamAppReinitialize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000024E, XamCreateEnumeratorHandle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000024F, XamGetPrivateEnumStructureFromHandle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000250, XamEnumerate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000251, XamLoadSysApp, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000252, XamUnloadSysApp, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000253, XamReloadSysApp, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000254, XamAppLoadPass2SysApps, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000255, XamProfileGetLiveLegalLocale, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000256, XamUserIsParentalControlled, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000257, XamContentLaunchImageFromFileInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000258, XamContentCreate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000259, XamContentCreateEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000025A, XamContentClose, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000025B, XamContentDelete, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000025C, XamContentCreateEnumerator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000025D, XamContentCreateDeviceEnumerator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000025E, XamContentGetDeviceData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000025F, XamContentGetDeviceName, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000260, XamContentSetThumbnail, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000261, XamContentGetThumbnail, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000262, XamContentGetCreator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000263, XamContentLaunchImage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000264, XamContentGetAttributes, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000265, XamContentGetDeviceState, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000266, XamContentGetLicenseMask, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000267, XamContentFlush, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000268, XamContentResolve, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000269, XamContentOpenFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000026A, XamContentInstall, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000026B, XamContentLockUnlockPackageHeaders, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000026C, XamContentCopyInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000026D, XamContentMoveInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000026E, XamContentGetMetaDataInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000026F, XamContentCreateEnumeratorInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000270, XamContentDeleteInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000271, XamContentCreateInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000272, XamContentSetThumbnailInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000273, XamContentLaunchImageInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000274, XamContentWritePackageHeader, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000275, XamContentDismountAndClosePackage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000276, XamContentResolveInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000277, XamContentGetAttributesInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000278, XamContentOpenFileInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000279, XamContentAggregateCreateEnumerator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000027A, XamContentCreateAndMountPackage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000027B, XamContentOpenPackageFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000027C, XamContentMountPackage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000027D, XamContentFlushPackage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000027E, XamContentClosePackageFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000027F, XamContentDuplicateFileHandle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000280, XamGetExecutionId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000281, XamGetGameRatings, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000282, XamGetSystemVersion, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000283, XamContentGetLocalizedString, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000284, XamContentGetDefaultDevice, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000285, XamContentInstallInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000286, XamContentSetMediaMetaDataInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000287, XamContentGetDeviceSerialNumber, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000288, XamContentGetMountedPackageByRootName, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000289, XamContentRegisterChangeCallback, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000028A, XamNotifyCreateListener, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000028B, XNotifyGetNext, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000028C, XNotifyPositionUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000028D, XNotifyDelayUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000028E, XNotifyBroadcast, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000028F, XNotifyRegisterArea, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000290, XNotifyQueueUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000291, XamNotifyCreateListenerInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000292, XNotifyUISetOptions, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000293, XNotifyUIGetOptions, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000294, XamContentLaunchImageInternalEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000295, XamShutdown, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000296, XamAllocDevkitHeapAvailable, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000297, XamNotifyCreateListenerRangeInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000298, XNotifyQueueUIEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000299, XamAppRequestLoadEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000029A, XuiPNGTextureLoader, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000029B, XuiRenderGetXuiDevice, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000029C, XuiDefault_False, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000029D, XamUserGetReportingInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000029E, XamUpdateStart, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000029F, XamUpdateGetProgress, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002A0, XamUpdateGetExtenderInstance, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002A1, XamUpdateFinish, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002A2, XamUpdateAttachExtenderInstance, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002A3, XamUpdateAllocateExtenderBuffer, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002A4, XamRestartTitleLoadAfterUpdate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002A5, XamUIThreadDisableFontPatching, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002A6, XamUpdateGetBaseSystemVersion, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002A7, XamUpdateGetCurrentSystemVersion, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002A8, XamUIThreadEnableFontPatching, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002A9, XamTerminateTitleForUpdate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002AA, XamSystemUpdateInstallLocal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002AB, XamUpdateChainPass3FromPass2, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002AD, XamInputGetCapabilitiesEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002AE, XamUserIsUnsafeProgrammingAllowed, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002AF, XamDevAuthSetFaultEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002B0, XamUpdateGetData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002B1, XamCacheIntegrityCheck, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002B2, XamCacheStoreFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002B3, XamCacheFetchFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002B4, XamCacheOpenFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002B5, XamCacheCloseFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002B6, XamGetCachedTitleName, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002B7, XamCacheReset, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002B8, XamGetCachedGamerTag, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002B9, XamGetCachedGamerTagW, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002BA, XamCacheDeleteFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002BB, XamCacheRenameFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002BC, XamShowSigninUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002BD, XamShowSigninUIEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002BE, XamShowSigninUIp, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002BF, XamShowFriendsUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002C0, XamShowMessagesUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002C1, XamShowKeyboardUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002C2, XamShowQuickChatUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002C3, XamShowVoiceMailUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002C4, XamShowGamerCardUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002C5, XamShowAchievementsUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002C6, XamShowPlayerReviewUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002C7, XamShowMarketplaceUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002C8, XamShowPlayersUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002C9, XamShowUpdaterUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002CA, XamShowMessageBoxUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002CB, XamShowDeviceSelectorUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002CC, XamShowMessageComposeUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002CD, XamShowGameInviteUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002CE, XamShowFriendRequestUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002CF, XamShowCreateProfileUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002D0, XamShowGamesUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002D1, XamShowLiveSignupUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002D2, XamShowFriendsUIp, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002D3, XamShowComplaintUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002D4, XamShowReputationUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002D5, XamShowGamerCardUIForXUID, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002D6, XamShowForcedNameChangeUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002D7, XamShowLiveUpsellUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002D8, XamShowPasscodeVerifyUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002D9, XamShowDirtyDiscErrorUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002DA, XamShowSignupCreditCardUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002DB, XamShowPrivateChatInviteUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002DC, XamShowMessageBoxUIEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002DD, XamShowRecentMessageUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002DE, XamShowRecentMessageUIEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002DF, XamShowMessagesUIEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002E0, XamShowAchievementDetailsUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002E1, XamShowPersonalizationUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002E2, XamShowChangeGamerTileUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002E3, XamShowVoiceSettingsUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002E4, XamShowVideoChatInviteUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002E5, XamShowCustomMessageComposeUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002E6, XamShowCustomPlayerListUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002E7, XamShowMarketplaceDownloadItemsUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002E8, XamShowMarketplaceUIEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002E9, XamShowMessageBox, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002EA, XamIsSysUiInvokedByXenonButton, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002EB, XamIsSysUiInvokedByTitle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002EC, XamIsUIActive, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002ED, XamSysUiDisableAutoClose, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002EE, XamUserCreateAchievementEnumerator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002EF, XamReadTile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002F0, XamWriteGamerTile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002F1, XamWriteTile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002F2, XamReadImage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002F3, XamUserCreateTitlesPlayedEnumerator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002F4, XamDecompressPNGToTexture, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002F5, XamReadTileToTexture, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002F6, XamReadString, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002F7, XamUserCreateStatsEnumerator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002F8, XamPrepareGamerTiles, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002F9, XamClearTitle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002FA, XamReadStrings, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002FB, XamWriteGamerTileEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002FC, XamReadTileEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002FD, XamReadTileToTextureEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002FE, XamShowMessengerUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000002FF, XamShowKeyboardUIMessenger, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000300, XamShowLiveUpsellUIEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000301, XamShowJoinSessionInProgressUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000302, XamShowGraduateUserUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000303, XamShowGamerCardUIForXUIDp, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000304, XamShowGuideUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000305, XamShowPartyUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000306, XamShowPartyInviteUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000307, XamUserAddRecentPlayer, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000308, XamUserUpdateRecentPlayer, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000309, XamUserCreatePlayerEnumerator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000030A, XamParseGamerTileKey, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000030B, XamShowCommunitySessionsUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000030C, XamVoiceCreate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000030D, XamVoiceHeadsetPresent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000030E, XamVoiceSubmitPacket, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000030F, XamVoiceClose, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000310, XamVoiceGetBatteryStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000311, Refresh, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000312, Refresh, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000313, XamShowJoinSessionByIdInProgressUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000314, XamShowPartyJoinInProgressUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000315, XamBuildSharedSystemResourceLocator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000316, XamSessionCreateHandle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000317, XamSessionRefObjByHandle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000318, XamVoiceGetMicArrayStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000319, XamVoiceSetAudioCaptureRoutine, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000031A, XamVoiceGetDirectionalData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000031B, XamBuildResourceLocator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000031C, XamBuildSharedSystemResourceLocator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000031D, XamBuildGamercardResourceLocator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000031E, XamBuildDynamicResourceLocator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000031F, XamBuildXamResourceLocator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000320, XuiAnimRun, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000321, XuiApplyLocale, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000322, XuiBubbleMessage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000323, XuiControlIsBackButton, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000324, XuiControlIsNavButton, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000325, XuiCreateObject, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000326, XuiDestroyObject, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000327, XuiDynamicCast, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000328, XuiElementAddChild, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000329, XuiElementFindNamedFrame, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000032A, XuiElementGetChildById, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000032B, XuiElementGetFirstChild, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000032C, XuiElementGetFocus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000032D, XuiElementGetFocusUser, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000032E, XuiElementGetId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000032F, XuiElementGetLastChild, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000330, XuiElementGetNext, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000331, XuiElementGetParent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000332, XuiElementGetUserFocus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000333, XuiElementInitFocus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000334, XuiElementInitUserFocus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000335, XuiElementPlayTimeline, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000336, XuiElementSetBounds, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000337, XuiElementSetFocus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000338, XuiElementSetUserFocus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000339, XuiElementTreeGetFocus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000033A, XuiFindClass, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000033B, XuiFreeStringTable, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000033C, XuiGetBaseObject, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000033D, XuiGetClass, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000033E, XuiGetObjectClass, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000033F, XuiGetOuter, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000340, XuiInit, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000341, XuiLoadFromBinary, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000342, XuiLoadStringTableFromFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000343, XuiVisualGetBasePath, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000344, XuiLookupStringTable, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000345, XuiNavButtonGetPressPath, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000346, XuiObjectFromHandle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000347, XuiObjectGetProperty, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000348, XuiObjectGetPropertyId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000349, XuiProcessInput, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000034A, XuiRegisterClass, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000034B, XuiRenderBegin, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000034C, XuiRenderCreateDC, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000034D, XuiRenderDCDeviceChanged, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000034E, XuiRenderDestroyDC, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000034F, XuiRenderEnd, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000350, XuiRenderGetBackBufferSize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000351, XuiRenderInit, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000352, XuiRenderInitShared, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000353, XuiRenderPresent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000354, XuiRenderSetViewTransform, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000355, XuiRenderUninit, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000356, XamShowNuiGuideUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000357, XuiSceneCreate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000358, XuiSceneNavigateBack, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000359, XuiSceneNavigateFirst, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000035A, XuiSceneNavigateForward, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000035B, XuiScenePlayBackFromTransition, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000035C, XuiScenePlayBackToTransition, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000035D, XuiScenePlayFromTransition, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000035E, XuiScenePlayToTransition, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000035F, XuiSendMessage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000360, XuiSetLocale, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000361, XuiUninit, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000362, XuiUnregisterClass, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000363, XuiTextElementSetText, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000364, XuiSetTimer, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000365, XuiTimersRun, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000366, XuiTextElementGetText, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000367, XuiVisualSetBasePath, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000368, XuiHandleIsValid, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000369, XuiAlloc, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000036A, XuiFree, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000036B, XuiDefault_True, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000036C, XuiDefault_EmptyString, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000036D, XuiDefault_IntegerZero, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000036E, XuiCopyString, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000036F, XuiRealloc, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000370, XuiControlPlayOptionalVisual, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000371, XuiKillTimer, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000372, XuiElementEnableInput, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000373, XuiElementInputEnabled, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000374, XuiIsInstanceOf, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000375, XuiResourceComposeLocator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000376, XuiResourceLocatorIsAbsolute, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000377, XuiBroadcastMessage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000378, XuiElementDisallowRecursiveTimelineControl, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000379, XUIElementPropVal_Construct, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000037A, XUIElementPropVal_Destruct, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000037B, XUIElementPropVal_SetString, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000037C, XuiObjectSetProperty, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000037D, XuiElementGetOpacity, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000037E, XuiElementSetOpacity, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000037F, XuiEditSetTextLimit, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000380, XuiEditGetTextLimit, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000381, XuiSliderSetValue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000382, XuiSliderGetValue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000383, XuiSliderSetRange, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000384, XuiElementUnlink, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000385, XuiElementInsertChild, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000386, XuiSceneNavigateBackToFirst, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000387, XuiProgressBarSetRange, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000388, XuiProgressBarSetValue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000389, XuiProgressBarGetValue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000038A, XuiControlAttachVisual, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000038B, XuiCreateTextureBrush, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000038C, XuiDestroyBrush, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000038D, XUIElementPropVal_SetColorFromUint, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000038E, XuiFigureSetFill, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000038F, XuiSliderGetRange, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000390, XuiFigureSetTexture, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000391, XuiControlGetItemAssociation, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000392, XuiResourceLoadAll, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000393, XuiImageElementSetImagePath, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000394, XuiImageElementGetImagePath, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000395, XuiControlGetVisual, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000396, XuiControlGetNavigation, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000397, XuiLookupStringTableByIndex, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000398, XUIElementPropVal_SetBool, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000399, XuiElementHasFocus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000039A, XUIElementPropVal_SetUint, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000039B, XUIElementPropVal_Clear, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000039C, XuiEditSetTextFormatInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000039D, XuiCreateSolidBrush, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000039E, XuiSceneInterruptTransitions, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000039F, XuiResourceOpen, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003A0, XuiResourceRead, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003A1, XuiResourceClose, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003A2, XuiVisualCreateInstance, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003A3, XuiElementGetTimeline, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003A4, GetCodecVersion, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003A5, XuiElementIsDescendant, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003A6, XuiSetMessageFilter, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003A7, XuiAttachTextureBrush, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003A8, XuiElementBeginRender, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003A9, XuiElementEndRender, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003AA, XuiDrawShape, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003AB, XuiSelectBrushEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003AC, XuiFigureGetShape, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003AD, XuiFillRect, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003AE, XuiVec2TransformCoord, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003AF, XuiMatrixMultiply, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003B0, XuiElementGetXForm, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003B1, XuiElementSetPosition, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003B2, XuiSelectBrush, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003B3, XuiElementRenderChildren, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003B4, XuiFreeUnusedTextures, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003B5, XuiListEnableItemOverride, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003B6, XuiListGetDefaultItemSize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003B7, XuiResourceSeek, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003B8, XuiElementDiscardResources, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003B9, XuiTabSceneGoto, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003BA, XuiTabSceneGetCurrentTab, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003BB, XamShowWhatsOnUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003BC, XamShowEditProfileUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003BD, XamShowStorePickerUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003BE, XamShowTermsOfUseUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003BF, XamShowJoinPartyUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003C0, XamShowWordRegisterUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003C1, XamOverrideHudOpenType, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003C2, XamShowAchievementsUIEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003C3, XamUserGetUserTenure, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003C4, XamUserGetSubscriptionType, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003C5, XamShowGameVoiceChannelUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003C6, XamShowAvatarAwardsUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003C7, XamShowAvatarAwardGamesUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003C8, XamShowVideoRichPresenceUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003C9, XamHudGetUserIndex, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003CA, XGetAudioFlags, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003CB, XGetAVPack, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003CC, XGetGameRegion, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003CD, XGetLanguage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003CE, XapipGetLocale, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003CF, XGetVideoFlags, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003D0, XGetVideoStandard, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003D1, XGetVideoMode, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003D2, XamGetLanguage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003D3, XUITimeline_Run, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003D4, XamSetAutomation, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003D5, XAutomationpBindController, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003D6, XAutomationpUnbindController, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003D7, XAutomationpInputXenonButton, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003D8, XAutomationpInputPress, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003D9, XAutomationpInputSetState, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003DA, XamEnableOverdraw, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003DB, g_XuiAutomation, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003DC, XamVoiceGetMicArrayAudio, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003DD, XampSystemInput, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003DE, XamInputControl, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003DF, XuiElementGetPosition, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003E0, XamIsMessageBoxActive, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003E1, XamIsBackgroundSceneInTransition, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003E2, XuiElementTreeHasFocus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003E3, XuiFigureClose, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003E4, GamerCardStartup, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003E5, GamerCardCleanup, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003E6, GamerCardRegisterControls, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003E7, GamerCardUnregisterControls, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003E8, RtlFindFirstFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003E9, RtlFindNextFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003EA, RtlGetModuleFileName, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003EB, RtlOutputDebugString, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003EC, RtlRemoveDirectory, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003ED, RtlSleep, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003EE, RtlGetLastError, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003EF, RtlSetLastError, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003F0, RtlSetLastNTError, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003F1, RtlDebugPrint, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003F2, RtlDebugError, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003F3, XDebugWarning, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003F4, RtlDebugTrace, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003F5, RtlDebugEntry, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003F6, RtlDebugExit, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003F7, RtlGetAttributesOnHeapAlloc, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003F8, RtlSetAttributesOnHeapAlloc, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003F9, XuiFigureSetShape, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003FA, RtlCreateHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003FB, RtlDestroyHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003FC, RtlAllocateHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003FD, RtlAllocateHeapSlowly, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003FE, RtlReAllocateHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000003FF, RtlFreeHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000400, RtlFreeHeapSlowly, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000401, RtlSizeHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000402, RtlZeroHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000403, RtlDebugWalkHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000404, RtlWalkHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000405, RtlLockHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000406, RtlUnlockHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000407, RtlValidateHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000408, RtlDebugCompactHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000409, RtlCompactHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000040A, XamAppSetTestOption, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000040B, XamAppReportError, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000040C, XamIsNuiUIActive, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000040D, XamVerifyPasscode, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000040E, OutputDebugStringA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000040F, DebugBreak, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000410, GetCurrentThreadId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000411, XDebugError, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000412, XDebugWarning, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000413, RtlDebugSetLevel, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000414, CloseHandle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000415, GetTickCount, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000416, GetLastError, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000417, SetFilePointer, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000418, SetFilePointerEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000419, SetLastError, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000041A, MultiByteToWideChar, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000041B, WideCharToMultiByte, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000041C, ReadFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000041D, FlushFileBuffers, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000041E, WriteFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000041F, OutputDebugStringW, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000420, SetEvent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000421, XapiFormatTimeOut, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000422, CreateMutexA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000423, OpenMutexA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000424, ReleaseMutex, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000425, WaitForSingleObject, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000426, WaitForSingleObjectEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000427, GetFileSize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000428, GetFileSizeEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000429, XapiDirectoryInformationToFindData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000042A, XapiFormatObjectAttributes, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000042B, ResetEvent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000042C, wsprintfA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000042D, wsprintfW, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000042E, GetOverlappedResult, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000042F, QueryPerformanceCounter, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000430, QueryPerformanceFrequency, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000431, LocalAlloc, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000432, LocalFree, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000433, RaiseException, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000434, RtlUniform, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000435, RtlRandom, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000436, Sleep, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000437, SleepEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000438, XMemSet, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000439, XRegisterThreadNotifyRoutine, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000043A, XGetOverlappedExtendedError, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000043B, XGetOverlappedResult, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000043C, CreateThread, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000043D, ResumeThread, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000043E, ExitThread, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000043F, GetTimeZoneInformation, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000440, GetSystemTimeAsFileTime, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000441, SystemTimeToFileTime, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000442, FileTimeToSystemTime, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000443, GetSystemTime, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000444, GetLocalTime, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000445, CreateDirectoryA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000446, CreateEventA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000447, CreateFileA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000448, DeleteFileA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000449, FindFirstFileA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000044A, FindNextFileA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000044B, GetFileAttributesA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000044C, XamLoaderGetCurrentTitleD3DVersion, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000044D, GetFileAttributesExA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000044E, GetModuleHandleA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000044F, GetDiskFreeSpaceExA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000450, CopyFileA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000451, SetEndOfFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000452, XamFamilyAddParentalExemptionToList, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000453, XamFamilyIsParentalValidationRequired, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000454, PIXBeginCapture, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000455, PIXEndCapture, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000456, PIXAddCounter, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000457, PIXGetGPUSlot, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000458, SetWaitableTimer, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000459, CancelWaitableTimer, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000045A, CreateWaitableTimerA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000045B, DuplicateHandle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000045C, XapipCreateThread, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000045D, lstrcpyA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000045E, lstrcpyW, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000045F, lstrcpynA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000460, lstrcpynW, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000461, lstrcatA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000462, lstrcatW, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000463, lstrlenA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000464, lstrlenW, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000465, IsBadReadPtr, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000466, IsBadWritePtr, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000467, FileTimeToLocalFileTime, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000468, XMemCpy, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000469, XMemCpyStreaming, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000046A, XamHudSetUserIndex, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000046B, XamShowNuiTroubleshooterUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000046C, XamTestShowNuiTroubleshooterUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000046D, XamShowPasscodeVerifyUIEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000046E, XamShowNuiAchievementsUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000046F, XamShowNuiCommunitySessionsUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000470, XamShowNuiDeviceSelectorUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000471, XamShowNuiDirtyDiscErrorUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000472, XamShowNuiFriendsUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000473, XamShowNuiGameInviteUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000474, XamShowNuiGamerCardUIForXUID, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000475, XamShowNuiMarketplaceDownloadItemsUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000476, XamShowNuiMarketplaceUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000477, XamShowNuiMessageBoxUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000478, XamShowNuiPartyUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000479, XamShowNuiFriendRequestUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000047A, XamShowNuiSigninUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000047B, XamShowNuiControllerRequiredUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000047C, XamShowNuiGamesUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000047D, XamShowNuiHardwareRequiredUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000047E, XamCacheStoreFileByString, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000047F, XamCacheFetchFileByString, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000480, XamCacheDeleteFileByString, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000481, XamGetCachedTitleNameEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000482, XamXlfsInitializeUploadQueue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000483, XamXlfsUninitializeUploadQueue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000484, XamXlfsMountUploadQueueInstance, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000485, XamXlfsUnmountUploadQueueInstance, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000486, XamVoiceRecordUserPrivileges, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000487, XamXlfsInitializeUploadQueueWithTestHooks, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000488, XamXlfsNotifyContentDeletion, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000489, XMemAlloc, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000048A, XMemFree, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000048B, XMemSize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000048C, XamVoiceSetMicArrayIdleUsers, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000048D, XamVoiceMuteMicArray, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000048E, XamVoiceGetMicArrayUnderrunStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000048F, XuiSceneEnableTransitionDependency, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000490, XamVoiceGetMicArrayAudioEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000491, XamVoiceDisableMicArray, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000497, XamVoiceIsActiveProcess, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000004B0, XMPRegisterCodec, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000514, XamIsCurrentTitleIptv, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000515, XamIsIptvEnabled, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000516, XamIsDvrRecording, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000517, XamIptvUninstall, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000518, XamGetDvrStorage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000519, XamSetDvrStorage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000051A, XamIptvGetServiceName, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000051B, XamNuiHudGetEngagedEnrollmentIndex, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000578, XamReminderGetItems, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000579, XamReminderClearItems, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000057A, XamReminderItemAdd, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000057B, XamReminderItemRemove, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000057C, XamReminderGetNextItem, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000057D, XamReminderGetModifiedTime, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000057E, XamReminderClearCache, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005DC, XamAvatarInitialize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005DD, XamAvatarShutdown, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005DE, XamAvatarGetManifestLocalUser, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005DF, XamAvatarGetManifestsByXuid, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005E0, XamAvatarGetAssetsResultSize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005E1, XamAvatarGetAssets, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005E2, XamAvatarGenerateMipMaps, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005E3, XamAvatarSetCustomAsset, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005E4, XamAvatarSetManifest, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005E5, EnumerateMediaObjects, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005E6, EnumerateMediaObjects, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005E7, XamAvatarLoadAnimation, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005E8, XamAvatarBeginEnumAssets, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005E9, XamAvatarEndEnumAssets, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005EA, XamAvatarEnumAssets, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005EB, XamAvatarGetMetadataRandom, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005EC, EnumerateMediaObjects, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005ED, EnumerateMediaObjects, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005EE, XamAvatarGetMetadataSignedOutProfileCount, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005EF, XamAvatarGetMetadataSignedOutProfile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005F0, EnumerateMediaObjects, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005F1, XamAvatarManifestGetBodyType, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005F2, XamAvatarGetInstrumentation, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005F3, XamAvatarGetAssetIcon, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005F4, XamAvatarWearNow, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005F5, XamAvatarGetAssetBinary, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005F6, XamAvatarReinstallAwardedAsset, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005F7, XamAvatarGetInstalledAssetPackageDescription, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000005F8, XamAvatarSetMocks, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000060E, XamContentMountInstalledGame, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000060F, XamContentIsGameInstalledToHDD, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000610, XamContentQueryLicenseInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000611, XamContentGetDeviceVolumePath, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000612, XamContentDeviceCheckUpdates, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000613, XamContentGetHeaderInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000640, XamPackageManagerFindPackageContainingIndexedXEX, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000641, XamPackageManagerReinitialize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000642, XamPackageManagerGetAuthoritativeManifestVersion, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000643, XamGetCurrentSystemOnlineManifestRevision, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000644, XamPackageManagerDeleteExtendedPartition, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000645, XamPackageManagerHasExtendedPartition, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000646, XamPackageManagerGetExperienceMode, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000647, XamPackageManagerGetFeatureRequiresUpdateStrings, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000648, XamPackageManagerGetFileSize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000649, XampDemandUpdateGetAttributes, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000064A, XampDemandUpdateGetExtendedAttributes, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000064B, XampDemandUpdateGetInstance, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000064C, XampDemandUpdateSetRefreshTestFlags, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000064D, XampDemandUpdateIsRefreshTestFlagSet, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000064E, XampDemandUpdateGetManifestLocalPath, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000064F, XampDemandUpdateRefreshManifest, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000650, XdfInitialize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000651, XdfShutdown, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000652, XdfGetExpectedDownloadSize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000653, XdfGetItem, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000654, XdfCacheItem, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000655, XdfLoadXexFromCache, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000656, XdfLoadXex, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000657, XdfCancelRequest, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000658, XdfResumeDelayedItem, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000659, XdfLaunchNewImageFromCache, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000065A, XampDemandUpdateRefreshManifestDuringLogon, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000065B, XampDemandUpdateCheckOnlineManifestChanged, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000065C, XampDemandUpdateRunCacheCleaner, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000686, XamXStudioRequest, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000006A4, XamShowAvatarMiniCreatorUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000006A5, XamShowGoldUpgradeUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000006A6, XamResumeUpdaterUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000006A7, XamShowDirectAcquireUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000006A8, XamShowPaymentOptionsUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000708, XamGetLiveHiveValueA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000709, XamGetLiveHiveValueW, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000070A, XamGetLiveHiveValueDuringLogonAttemptA, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000076C, XamDownloadMarketplaceStoresList, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000076D, XamGetStoreFront, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000076E, XamSetStagingMode, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000076F, XamGetStagingMode, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000770, XamAppGetSessionId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007D0, XamDoesOmniNeedConfiguration, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007D1, XamFirstRunExperienceShouldRun, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007D2, GetProcessHeap, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007D3, UnhandledExceptionFilter, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007D4, SetUnhandledExceptionFilter, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007D5, XamIsOptionalMediaUpdateInstalled, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007D6, XamShowOptionalMediaUpdateRequiredUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007D7, XamShowOptionalMediaUpdateRequiredUIEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007D8, XamShowFirstRunWelcomeUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007D9, XamTaskCreateQueueEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007DA, XamSetDashBackstackData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007DB, XamLaunchAvatarEditor, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007DC, XamGetDashBackstackData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007DD, XamGetDashBackstackNodesCount, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007DE, XamSetLastActiveUserData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007DF, XamGetLastActiveUserData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007E0, XamSetActiveDashAppInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000007E1, XamGetActiveDashAppInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000802, XamUserCreateAvatarAssetEnumerator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000803, XamInitializeGameTileCache, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000804, XamDestroyGameTileCache, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000805, XamReadGameTileImage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000806, XamShouldThrottleAccountInfoCall, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000807, XuiClassDerivesFrom, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000808, XuiFreeVisuals, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000809, XuiGetBaseClass, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000080A, XuiLoadVisualFromBinary, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000080B, XuiResourceGetBuffer, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000080C, XuiResourceGetTotalSize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000080D, XuiElementGetUserData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000080E, XuiElementSetUserData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000080F, XuiTabSceneGetCount, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000810, XuiSliderGetStep, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000811, XuiSliderSetStep, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000812, XuiProgressBarGetRange, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000813, XuiElementSetHittable, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000814, XuiElementPlayNamedFrames, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000815, XuiElementGetPivot, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000816, XuiElementGetPrev, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000817, XuiElementGetScale, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000818, XuiElementSetPivot, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000819, XuiElementSetRotation, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000081A, XuiElementSetScale, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000081B, XuiControlWantsUnfocusedInput, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000081C, XuiResourceOpenNoLoc, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000081D, XuiResourceReleasePackage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000081E, XuiResourceGetPackageEntryInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000081F, XuiResourceGetPackageEntryCount, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000820, XuiResourceOpenPackage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000821, XamCodeCoverageFileOpen, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000822, XamCodeCoverageFileClose, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000823, XamCodeCoverageFileLseek, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000824, XamCodeCoverageFileRead, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000825, XamCodeCoverageFileWrite, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000826, Refresh, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000827, XampHeapGetInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000828, XampHeapGetCount, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000829, XamShowPamUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000082A, XuiElementLayoutTree, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000082B, XamRegisterScreenSaverCallback, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000082C, XUIElementPropVal_SetInt, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000082D, XUIElementPropVal_SetFloat, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000082E, XuiObjectGetPropertyDef, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000082F, XuiRenderGetDevice, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000830, XuiRenderRestoreState, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000831, XuiElementGetFullXForm, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000832, XuiRenderGetViewTransform, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000833, XuiRenderGetColorSpace, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000834, XamPngEncode, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000835, XamPngDecode, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000836, XamPngEncodeEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000837, XuiTextElementMeasureText, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000838, XamLoaderShouldConfirmReboot, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000839, XamLoaderRebootToDash, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000083A, XamNuiHudGetEngagedTrackingID, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000083B, XamLoaderLaunchTitleForReason, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000083C, XamNuiHudSetEngagedTrackingID, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000083E, XamSetupTexture, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000841, XamSetupCameraPreviewStuff, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000842, XamReleaseCameraPreviewStuff, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000843, XamRenderCameraPreviewStuff, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000848, XamAccountRecoveryGetSetTitleSyncTime, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000849, XamReadBiometricData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000084A, XamWriteBiometricData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000084B, XamD3DResourceDescriptorCreate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000084C, XamD3DResourceDescriptorAddRef, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000084D, XamD3DResourceDescriptorRelease, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000084E, XamD3DResourceAddRef, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000084F, XamD3DResourceSet, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000850, XamD3DResourceIsBusy, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000851, XamD3DResourceRelease, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000085E, XamNuiEnableChatMic, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000085F, XamNuiIsChatMicEnabled, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000860, XamNuiGetDepthCalibration, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000861, XamNuiStoreDepthCalibration, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000862, XamUserNuiIsBiometricEnabled, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000863, XamUserNuiEnableBiometric, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000864, XamNuiCameraSetFlags, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000865, XamNuiCameraRememberFloor, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000866, XamUserNuiGetUserIndexForBind, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000867, XamUserNuiGetUserIndexForSignin, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000868, XamUserNuiBind, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000869, XamUserNuiGetUserIndex, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000086A, XamUserNuiGetEnrollmentIndex, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000086B, XamUserNuiUnbind, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000086C, XamNuiIdentityGetQualityFlagsMessage, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000086D, XamNuiCameraTiltSetCallback, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000086E, XamNuiHudIsEnabled, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000086F, XamNuiCameraGetTiltControllerType, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000870, XamNuiCameraTiltGetStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000871, XamNuiIdentityGetQualityFlags, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000872, XamNuiIdentityEnrollForSignIn, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000873, XamNuiIdentityGetSessionId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000874, XamNuiIdentityIdentifyWithBiometric, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000875, ControlPackGetHandleManager, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000876, XamEnableNuiAutomation, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000877, XamNuiGetSystemGestureControl, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000878, XamGetPasscodeKeyFromVirtualKey, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000879, XamEnableNatalPlayback, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000087A, XamIsNuiAutomationEnabled, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000087B, XamIsNatalPlaybackEnabled, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000087C, XamNuiHudInterpretFrame, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000087D, XamNuiHudEnableInputFilter, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000087E, ControlpackNuiCursorSetTrackingId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000087F, XamNuiHudGetInitializeFlags, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000880, XamNuiCameraElevationSetAngle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000881, XamNuiCameraElevationGetAngle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000882, XamNuiCameraElevationAutoTilt, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000883, XamNuiCameraElevationStopMovement, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000884, XamNuiCameraElevationSetCallback, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000885, XamNuiGetDeviceStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000886, XamNuiNatalCameraUpdateStarting, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000887, XamNuiNatalCameraUpdateComplete, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000888, XamNuiHudGetVersions, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000889, XamGetHUDElementByPath, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000088A, XamGetHUDElementByAutoId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000088B, XuiElementGetScreenPositionCenter, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000088C, XamNuiCameraElevationReverseAutoTilt, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000088D, ControlPackSimpleCursorGetRayFromScreenPosition, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000088E, ControlPackSideNavControlGetNuiHandle, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000088F, XamFindHUDElementByXuiId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000890, XamNuiIsDeviceReady, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000891, XamNuiSetForceDeviceOff, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000892, XamNuiPlayerEngagementUpdate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000893, XamNuiSkeletonGetBestSkeletonIndex, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000894, XamNuiSkeletonScoreUpdate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000895, XamNuiCameraTiltReportStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000896, XamNuiCameraAdjustTilt, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000898, D3DDevice_CreateVertexShader, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000899, D3DDevice_CreatePixelShader, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000089A, D3DDevice_CreateTexture, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000089B, D3DDevice_CreateVertexBuffer, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000089C, D3DDevice_CreateIndexBuffer, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000089D, D3DDevice_CreateVertexDeclaration, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000089E, D3DVertexBuffer_Unlock, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x0000089F, D3DVertexBuffer_Lock, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008A0, D3DIndexBuffer_Unlock, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008A1, D3DIndexBuffer_Lock, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008A2, D3DTexture_UnlockRect, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008A3, D3DTexture_LockRect, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008A4, D3DDevice_Clear, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008A5, D3DDevice_SetViewport, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008A6, D3DDevice_GetViewport, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008A7, D3DVertexShader_Release, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008A8, D3DPixelShader_Release, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008A9, D3DVertexDeclaration_Release, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008AA, D3DResource_Release, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008AB, D3DDevice_Release, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008AC, D3DDevice_SetVertexShader, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008AD, D3DDevice_SetPixelShader, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008AE, D3DDevice_SetTexture, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008AF, D3DDevice_SetVertexDeclaration, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008B0, D3DDevice_SetIndices, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008B1, D3DDevice_SetStreamSource, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008B2, D3DDevice_DrawVertices, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008B3, D3DDevice_DrawVerticesUP, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008B4, D3DDevice_DrawIndexedVertices, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008B5, D3DDevice_DrawIndexedVerticesUP, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008B6, D3DDevice_SetVertexShaderConstantF_ParameterCheck, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008B7, D3DDevice_SetPixelShaderConstantF_ParameterCheck, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008B8, D3DDevice_SetSamplerState_ParameterCheck, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008B9, D3DDevice_SetRenderState_ParameterCheck, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008BA, D3DDevice_GetRenderState_ParameterCheck, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008BB, D3DDevice_SetVertexShaderConstantFN, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008BC, D3DDevice_SetPixelShaderConstantFN, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008BD, D3DDevice_GetRenderState_ZEnable, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008BE, D3DDevice_GetRenderState_CullMode, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008BF, D3DDevice_GetRenderState_AlphaBlendEnable, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008C0, D3DDevice_GetRenderState_SrcBlendAlpha, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008C1, D3DDevice_GetRenderState_DestBlendAlpha, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008C2, D3DDevice_GetRenderState_BlendOp, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008C3, D3DDevice_GetRenderState_ViewportEnable, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008C4, D3DDevice_SetRenderState_ZEnable, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008C5, D3DDevice_SetRenderState_CullMode, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008C6, D3DDevice_SetRenderState_AlphaBlendEnable, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008C7, D3DDevice_SetRenderState_SrcBlendAlpha, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008C8, D3DDevice_SetRenderState_DestBlendAlpha, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008C9, D3DDevice_SetRenderState_BlendOp, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008CA, D3DDevice_SetRenderState_ViewportEnable, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008CB, D3DDevice_SetSamplerState_MagFilter, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008CC, D3DDevice_SetSamplerState_MinFilter, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008CD, D3DDevice_SetSamplerState_AddressU, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008CE, D3DDevice_SetSamplerState_AddressV, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008CF, XGSetTextureHeader, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008D0, XGGetTextureDesc, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008D1, XGOffsetResourceAddress, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008D2, D3DResource_AddRef, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008D3, D3DVertexShader_AddRef, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008D4, D3DPixelShader_AddRef, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008D5, D3DVertexDeclaration_AddRef, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008D6, XGSetTextureHeaderEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008D7, D3DDevice_GetRenderTarget, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008D8, D3DDevice_SetRenderTarget, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008D9, D3DDevice_GetDepthStencilSurface, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008DA, D3DDevice_SetDepthStencilSurface, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008DB, D3DDevice_Resolve, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008DC, D3DDevice_SetPixelShaderConstantB, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008DD, XamNuiGetDeviceSerialNumber, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008FC, XamXtwManagerGetVariableCount, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008FD, XamXtwManagerGetId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008FE, XamXtwManagerGetValue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000008FF, XamXtwManagerSetValue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000900, XamXtwManagerIncrement, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000901, XamXtwManagerDecrement, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000902, XamXtwManagerResetValue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000903, XamXtwManagerResetAll, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000904, XamXtwManagerGetDataFilePath, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000905, XamXtwManagerDeleteDataFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000906, XamXtwManagerSave, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000907, XamXtwManagerLoad, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000908, XamGetXTweakManager, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009C4, XamBackgroundDownloadSetMode, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009C5, XamBackgroundDownloadIsEnabled, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009C6, XamBackgroundDownloadGetActiveItem, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009C7, XamBackgroundDownloadGetItems, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009C8, XamBackgroundDownloadClearItems, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009C9, XamBackgroundDownloadItemAdd, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009CA, XamBackgroundDownloadItemRemove, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009CB, XamBackgroundDownloadItemMakeFirst, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009CC, XamBackgroundDownloadSetForegroundPriority, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009CD, XamBackgroundDownloadGetForegroundPriority, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009CE, XamBackgroundDownloadItemToContentData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009CF, XamBackgroundDownloadItemGetStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009D0, XamBackgroundDownloadHistoryGetItem, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009D1, XamBackgroundDownloadItemGetHistoryStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009D2, XamBackgroundDownloadItemSetHistoryStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009D3, XamBackgroundDownloadItemGetStatusAsync, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009D4, XamBackgroundDownloadItemGetStatusEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009D5, XamBackgroundDownloadItemGetHistoryStatusEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009D6, XamBackgroundDownloadBindItems, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009D7, XamBackgroundDownloadSetPollingActive, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009D8, XamBackgroundDownloadGetPollingActive, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009D9, XamBackgroundDownloadGetMode, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009DA, XamBackgroundDownloadGetUnexpectedChangeCount, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009DB, XamBackgroundDownloadIsItemForThisConsole, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009DC, XamBackgroundDownloadSelectDevice, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009DD, XamBackgroundDownloadItemModify, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009DE, XamBackgroundDownloadCacheLegacyMappingInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009DF, XamBackgroundDownloadGetLegacyMappingInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009E0, XamBackgroundDownloadGetLegacyId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x000009E1, XamBackgroundDownloadDoFail, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A28, XamSwapDisc, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A29, XamSwapDiscPatchAddress, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A2A, XamSwapCancel, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A32, XamRamDriveCreate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A33, XamRamDriveDestroy, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A5A, XamPlayTimerGetData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A5B, XamPlayTimerSetData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A5C, XamPlayTimerResume, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A5D, XamPlayTimerSuspend, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A5E, XamPlayTimerIsRunning, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A5F, XamPlayTimerIsEnabled, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A60, XamPlayTimerGetNextResetDate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A61, XamPlayTimerFormatDurationString, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A62, XamPlayTimerGetTimeRemaining, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A63, XamPlayTimerUpdateTimeRemaining, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A64, XamPlayTimerForceNotification, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A65, XamPlayTimerRefreshResetDate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A6E, UpnpAVServerSearchInitialize, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A6F, UpnpAVServerSearchDestroy, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A70, UpnpAVServerSearchStart, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A71, Destroy, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A72, UpnpAVServerSearchDoWork, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A73, UpnpAVServerSearchGetNextServer, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A8C, XCustomBroadcastGamercardEvent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000A8D, XamCustomGetCurrentActions, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AA0, XamInstrumentationLogEvent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AA1, XamRegisterSMCNotification, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AAA, XamInstrumentationLogEventEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AAB, XamInstrumentationGetSourceConfig, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AAC, XamInstrumentationDebugConfig, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000ADC, CurlCreateCacheEntry, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000ADD, CurlOpenCacheEntry, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000ADE, CurlSetCacheEntryExpireTime, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000ADF, CurlReadCacheEntryHeaders, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AE0, CurlReadCacheEntryContent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AE1, CurlWriteCacheEntryContent, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AE2, CurlCloseCacheEntry, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AE3, CurlEnumerateCacheEntry, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AE5, CurlWipeBackingFiles, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AE7, CurlOpenTitleBackingFile, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AF0, XamSetSecurityViolationDetected, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AF1, XamIsSecurityViolationDetected, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AF2, XamIsAnySecurityViolationDetected, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AF3, XamGetSecurityViolationsDetected, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AF4, XamActivateCounterMeasure, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AF5, XamDeactivateCounterMeasure, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AF6, XamIsCounterMeasureActivated, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AF7, XamGetActiveCounterMeasures, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AFC, XamPartyCreate, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AFD, XamPartyLeave, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AFE, XamPartySendInviteDeprecated, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000AFF, XamPartyGetUserList, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B00, XamPartySendGameInvites, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B01, XamPartyJoin, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B02, XamPartyKickUser, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B03, XamPartyAddLocalUsers, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B04, XamConvertEmoticons, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B05, XamGetLocaleTimeFormat, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B06, XamPartyRemoveLocalUsers, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B07, XamPartyGetUserListInternal, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B08, XamPartySetJoinable, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B09, XamPartyGetJoinable, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B0A, XamPartyGetInfo, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B0B, XamPartySetCustomData, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B0C, XamPartySetConnectivityGraph, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B0D, XamPartyGetRoutingTable, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B0E, XamPartyAutomationInprocCall, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B0F, XamPartyGetState, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B10, XamPartyGetBandwidth, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B11, XamPartyGetNetworkCounters, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B12, XamShowQuickLaunchUI, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B13, XamPartyIsCoordinator, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B14, XamPartyGetFormation, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B15, XamPartySendInvite, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B16, XamPartySetTestDelay, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B17, XamPartyOverrideNatType, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B18, XamPartyGetAccessLevel, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B19, XamPartySetTestFlags, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B1A, XamIsSystemExperienceTitleId, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B22, XamTaskSetCancelSubTasks, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B23, XamTaskGetCompletionStatus, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B24, XamTaskCancelWaitAndCloseWaitTask, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B2C, XamWebInstrumentationCreateReport, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B2D, XamWebInstrumentationSetUserVar, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B2E, XamWebInstrumentationSetUserVarNoEscape, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B2F, XamWebInstrumentationGetURL, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B30, XamWebInstrumentationSendReport, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B31, XamWebInstrumentationDestroyReport, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B32, XamWebInstrumentationCreateSampledReport, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B33, XampSetSamplingRandomValue, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B34, XampWebInstrumentationSetProfileCounts, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B35, XamWebInstrumentationGetURLEx, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B36, XampSetOmnitureCallbackFunction, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B37, XamShowQuickChatUIp, ? , FLAG(Function)), +XE_DECLARE_EXPORT(xam, 0x00000B4A, XamVerifyXSignerSignature, ? , FLAG(Function)), +}; + + +#undef FLAG + + +#endif // XENIA_KERNEL_MODULES_XAM_TABLE_H_ diff --git a/src/kernel/modules/xbdm/sources.gypi b/src/kernel/modules/xbdm/sources.gypi new file mode 100644 index 000000000..84dee72da --- /dev/null +++ b/src/kernel/modules/xbdm/sources.gypi @@ -0,0 +1,6 @@ +# Copyright 2013 Ben Vanik. All Rights Reserved. +{ + 'sources': [ + 'xbdm.cc', + ], +} diff --git a/src/kernel/modules/xbdm/xbdm.cc b/src/kernel/modules/xbdm/xbdm.cc new file mode 100644 index 000000000..e340a89cf --- /dev/null +++ b/src/kernel/modules/xbdm/xbdm.cc @@ -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); +} diff --git a/src/kernel/modules/xbdm/xbdm.h b/src/kernel/modules/xbdm/xbdm.h new file mode 100644 index 000000000..b6c1f3252 --- /dev/null +++ b/src/kernel/modules/xbdm/xbdm.h @@ -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 +#include + +#include + + +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_ diff --git a/src/kernel/modules/xbdm/xbdm_table.h b/src/kernel/modules/xbdm/xbdm_table.h new file mode 100644 index 000000000..fca0eff05 --- /dev/null +++ b/src/kernel/modules/xbdm/xbdm_table.h @@ -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 + + +#define FLAG(t) kXEKernelExportFlag##t + + +static xe_kernel_export_t xe_xbdm_export_table[] = { +}; + + +#undef FLAG + + +#endif // XENIA_KERNEL_MODULES_XBDM_TABLE_H_ diff --git a/src/kernel/modules/xboxkrnl/sources.gypi b/src/kernel/modules/xboxkrnl/sources.gypi new file mode 100644 index 000000000..85092433f --- /dev/null +++ b/src/kernel/modules/xboxkrnl/sources.gypi @@ -0,0 +1,6 @@ +# Copyright 2013 Ben Vanik. All Rights Reserved. +{ + 'sources': [ + 'xboxkrnl.cc', + ], +} diff --git a/src/kernel/modules/xboxkrnl/xboxkrnl.cc b/src/kernel/modules/xboxkrnl/xboxkrnl.cc new file mode 100644 index 000000000..fc039f20b --- /dev/null +++ b/src/kernel/modules/xboxkrnl/xboxkrnl.cc @@ -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); +} diff --git a/src/kernel/modules/xboxkrnl/xboxkrnl.h b/src/kernel/modules/xboxkrnl/xboxkrnl.h new file mode 100644 index 000000000..ed5d25f1d --- /dev/null +++ b/src/kernel/modules/xboxkrnl/xboxkrnl.h @@ -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 +#include + +#include + + +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_ diff --git a/src/kernel/modules/xboxkrnl/xboxkrnl_table.h b/src/kernel/modules/xboxkrnl/xboxkrnl_table.h new file mode 100644 index 000000000..9032e4179 --- /dev/null +++ b/src/kernel/modules/xboxkrnl/xboxkrnl_table.h @@ -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 + + +#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_ diff --git a/src/kernel/sources.gypi b/src/kernel/sources.gypi new file mode 100644 index 000000000..839db7919 --- /dev/null +++ b/src/kernel/sources.gypi @@ -0,0 +1,13 @@ +# Copyright 2013 Ben Vanik. All Rights Reserved. +{ + 'sources': [ + 'export.cc', + 'kernel.cc', + 'module.cc', + 'xex2.cc', + ], + + 'includes': [ + 'modules/sources.gypi', + ], +} diff --git a/src/kernel/xex2.cc b/src/kernel/xex2.cc new file mode 100644 index 000000000..00358fae7 --- /dev/null +++ b/src/kernel/xex2.cc @@ -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 + +#include +#include +#include +#include +#include + + +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; +} diff --git a/src/xenia/logging.cc b/src/xenia/logging.cc new file mode 100644 index 000000000..d56784809 --- /dev/null +++ b/src/xenia/logging.cc @@ -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 + +#include + + +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 +} diff --git a/src/xenia/malloc.cc b/src/xenia/malloc.cc new file mode 100644 index 000000000..1c827d46f --- /dev/null +++ b/src/xenia/malloc.cc @@ -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 + +#include + + +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; +} diff --git a/src/xenia/sources.gypi b/src/xenia/sources.gypi new file mode 100644 index 000000000..ceeb2fd98 --- /dev/null +++ b/src/xenia/sources.gypi @@ -0,0 +1,7 @@ +# Copyright 2013 Ben Vanik. All Rights Reserved. +{ + 'sources': [ + 'logging.cc', + 'malloc.cc', + ], +} diff --git a/third_party/crypto/rijndael-alg-fst.c b/third_party/crypto/rijndael-alg-fst.c index 8a100404d..99102f428 100644 --- a/third_party/crypto/rijndael-alg-fst.c +++ b/third_party/crypto/rijndael-alg-fst.c @@ -1295,7 +1295,7 @@ void rijndaelEncryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], in (Te4[(s1 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(s2 ) & 0xff] & 0x000000ff) ^ rk[3]; - + s0 = t0; s1 = t1; s2 = t2; diff --git a/third_party/pe/pe_image.h b/third_party/pe/pe_image.h index c8a5bf390..a734e7623 100644 --- a/third_party/pe/pe_image.h +++ b/third_party/pe/pe_image.h @@ -23,58 +23,58 @@ #define IMAGE_NT_SIGNATURE 0x00004550 /* PE00 */ typedef struct _IMAGE_DOS_HEADER { /* DOS .EXE header */ - uint16 e_magic; /* Magic number */ - uint16 e_cblp; /* Bytes on last page of file */ - uint16 e_cp; /* Pages in file */ - uint16 e_crlc; /* Relocations */ - uint16 e_cparhdr; /* Size of header in paragraphs */ - uint16 e_minalloc; /* Minimum extra paragraphs needed */ - uint16 e_maxalloc; /* Maximum extra paragraphs needed */ - uint16 e_ss; /* Initial (relative) SS value */ - uint16 e_sp; /* Initial SP value */ - uint16 e_csum; /* Checksum */ - uint16 e_ip; /* Initial IP value */ - uint16 e_cs; /* Initial (relative) CS value */ - uint16 e_lfarlc; /* File address of relocation table */ - uint16 e_ovno; /* Overlay number */ - uint16 e_res[4]; /* Reserved words */ - uint16 e_oemid; /* OEM identifier (for e_oeminfo) */ - uint16 e_oeminfo; /* OEM information; e_oemid specific */ - uint16 e_res2[10]; /* Reserved words */ - int32 e_lfanew; /* File address of new exe header */ + uint16_t e_magic; /* Magic number */ + uint16_t e_cblp; /* Bytes on last page of file */ + uint16_t e_cp; /* Pages in file */ + uint16_t e_crlc; /* Relocations */ + uint16_t e_cparhdr; /* Size of header in paragraphs */ + uint16_t e_minalloc; /* Minimum extra paragraphs needed */ + uint16_t e_maxalloc; /* Maximum extra paragraphs needed */ + uint16_t e_ss; /* Initial (relative) SS value */ + uint16_t e_sp; /* Initial SP value */ + uint16_t e_csum; /* Checksum */ + uint16_t e_ip; /* Initial IP value */ + uint16_t e_cs; /* Initial (relative) CS value */ + uint16_t e_lfarlc; /* File address of relocation table */ + uint16_t e_ovno; /* Overlay number */ + uint16_t e_res[4]; /* Reserved words */ + uint16_t e_oemid; /* OEM identifier (for e_oeminfo) */ + uint16_t e_oeminfo; /* OEM information; e_oemid specific */ + uint16_t e_res2[10]; /* Reserved words */ + int32_t e_lfanew; /* File address of new exe header */ } IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER; typedef struct _IMAGE_OS2_HEADER { /* OS/2 .EXE header */ - uint16 ne_magic; /* Magic number */ - int8 ne_ver; /* Version number */ - int8 ne_rev; /* Revision number */ - uint16 ne_enttab; /* Offset of Entry Table */ - uint16 ne_cbenttab; /* Number of bytes in Entry Table */ - int32 ne_crc; /* Checksum of whole file */ - uint16 ne_flags; /* Flag word */ - uint16 ne_autodata; /* Automatic data segment number */ - uint16 ne_heap; /* Initial heap allocation */ - uint16 ne_stack; /* Initial stack allocation */ - int32 ne_csip; /* Initial CS:IP setting */ - int32 ne_sssp; /* Initial SS:SP setting */ - uint16 ne_cseg; /* Count of file segments */ - uint16 ne_cmod; /* Entries in Module Reference Table */ - uint16 ne_cbnrestab; /* Size of non-resident name table */ - uint16 ne_segtab; /* Offset of Segment Table */ - uint16 ne_rsrctab; /* Offset of Resource Table */ - uint16 ne_restab; /* Offset of resident name table */ - uint16 ne_modtab; /* Offset of Module Reference Table */ - uint16 ne_imptab; /* Offset of Imported Names Table */ - int32 ne_nrestab; /* Offset of Non-resident Names Table */ - uint16 ne_cmovent; /* Count of movable entries */ - uint16 ne_align; /* Segment alignment shift count */ - uint16 ne_cres; /* Count of resource segments */ - uint8 ne_exetyp; /* Target Operating system */ - uint8 ne_flagsothers; /* Other .EXE flags */ - uint16 ne_pretthunks; /* offset to return thunks */ - uint16 ne_psegrefbytes; /* offset to segment ref. bytes */ - uint16 ne_swaparea; /* Minimum code swap area size */ - uint16 ne_expver; /* Expected Windows version number */ + uint16_t ne_magic; /* Magic number */ + int8_t ne_ver; /* Version number */ + int8_t ne_rev; /* Revision number */ + uint16_t ne_enttab; /* Offset of Entry Table */ + uint16_t ne_cbenttab; /* Number of bytes in Entry Table */ + int32_t ne_crc; /* Checksum of whole file */ + uint16_t ne_flags; /* Flag word */ + uint16_t ne_autodata; /* Automatic data segment number */ + uint16_t ne_heap; /* Initial heap allocation */ + uint16_t ne_stack; /* Initial stack allocation */ + int32_t ne_csip; /* Initial CS:IP setting */ + int32_t ne_sssp; /* Initial SS:SP setting */ + uint16_t ne_cseg; /* Count of file segments */ + uint16_t ne_cmod; /* Entries in Module Reference Table */ + uint16_t ne_cbnrestab; /* Size of non-resident name table */ + uint16_t ne_segtab; /* Offset of Segment Table */ + uint16_t ne_rsrctab; /* Offset of Resource Table */ + uint16_t ne_restab; /* Offset of resident name table */ + uint16_t ne_modtab; /* Offset of Module Reference Table */ + uint16_t ne_imptab; /* Offset of Imported Names Table */ + int32_t ne_nrestab; /* Offset of Non-resident Names Table */ + uint16_t ne_cmovent; /* Count of movable entries */ + uint16_t ne_align; /* Segment alignment shift count */ + uint16_t ne_cres; /* Count of resource segments */ + uint8_t ne_exetyp; /* Target Operating system */ + uint8_t ne_flagsothers; /* Other .EXE flags */ + uint16_t ne_pretthunks; /* offset to return thunks */ + uint16_t ne_psegrefbytes; /* offset to segment ref. bytes */ + uint16_t ne_swaparea; /* Minimum code swap area size */ + uint16_t ne_expver; /* Expected Windows version number */ } IMAGE_OS2_HEADER, *PIMAGE_OS2_HEADER; /* @@ -82,13 +82,13 @@ typedef struct _IMAGE_OS2_HEADER { /* OS/2 .EXE header */ */ typedef struct _IMAGE_FILE_HEADER { - uint16 Machine; - uint16 NumberOfSections; - uint32 TimeDateStamp; - uint32 PointerToSymbolTable; - uint32 NumberOfSymbols; - uint16 SizeOfOptionalHeader; - uint16 Characteristics; + uint16_t Machine; + uint16_t NumberOfSections; + uint32_t TimeDateStamp; + uint32_t PointerToSymbolTable; + uint32_t NumberOfSymbols; + uint16_t SizeOfOptionalHeader; + uint16_t Characteristics; } IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER; #define IMAGE_SIZEOF_FILE_HEADER 20 @@ -135,8 +135,8 @@ typedef struct _IMAGE_FILE_HEADER { */ typedef struct _IMAGE_DATA_DIRECTORY { - uint32 VirtualAddress; - uint32 Size; + uint32_t VirtualAddress; + uint32_t Size; } IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY; #define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16 @@ -150,41 +150,41 @@ typedef struct _IMAGE_OPTIONAL_HEADER { * Standard fields. */ - uint16 Magic; - uint8 MajorLinkerVersion; - uint8 MinorLinkerVersion; - uint32 SizeOfCode; - uint32 SizeOfInitializedData; - uint32 SizeOfUninitializedData; - uint32 AddressOfEntryPoint; - uint32 BaseOfCode; - uint32 BaseOfData; + uint16_t Magic; + uint8_t MajorLinkerVersion; + uint8_t MinorLinkerVersion; + uint32_t SizeOfCode; + uint32_t SizeOfInitializedData; + uint32_t SizeOfUninitializedData; + uint32_t AddressOfEntryPoint; + uint32_t BaseOfCode; + uint32_t BaseOfData; /* * NT additional fields. */ - uint32 ImageBase; - uint32 SectionAlignment; - uint32 FileAlignment; - uint16 MajorOperatingSystemVersion; - uint16 MinorOperatingSystemVersion; - uint16 MajorImageVersion; - uint16 MinorImageVersion; - uint16 MajorSubsystemVersion; - uint16 MinorSubsystemVersion; - uint32 Reserved1; - uint32 SizeOfImage; - uint32 SizeOfHeaders; - uint32 CheckSum; - uint16 Subsystem; - uint16 DllCharacteristics; - uint32 SizeOfStackReserve; - uint32 SizeOfStackCommit; - uint32 SizeOfHeapReserve; - uint32 SizeOfHeapCommit; - uint32 LoaderFlags; - uint32 NumberOfRvaAndSizes; + uint32_t ImageBase; + uint32_t SectionAlignment; + uint32_t FileAlignment; + uint16_t MajorOperatingSystemVersion; + uint16_t MinorOperatingSystemVersion; + uint16_t MajorImageVersion; + uint16_t MinorImageVersion; + uint16_t MajorSubsystemVersion; + uint16_t MinorSubsystemVersion; + uint32_t Reserved1; + uint32_t SizeOfImage; + uint32_t SizeOfHeaders; + uint32_t CheckSum; + uint16_t Subsystem; + uint16_t DllCharacteristics; + uint32_t SizeOfStackReserve; + uint32_t SizeOfStackCommit; + uint32_t SizeOfHeapReserve; + uint32_t SizeOfHeapCommit; + uint32_t LoaderFlags; + uint32_t NumberOfRvaAndSizes; IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; } IMAGE_OPTIONAL_HEADER, *PIMAGE_OPTIONAL_HEADER; @@ -202,7 +202,7 @@ typedef IMAGE_OPTIONAL_HEADER IMAGE_OPTIONAL_HEADER32; #endif typedef struct _IMAGE_NT_HEADERS { - uint32 Signature; + uint32_t Signature; IMAGE_FILE_HEADER FileHeader; IMAGE_OPTIONAL_HEADER OptionalHeader; } IMAGE_NT_HEADERS, *PIMAGE_NT_HEADERS; @@ -210,7 +210,7 @@ typedef struct _IMAGE_NT_HEADERS { typedef IMAGE_NT_HEADERS IMAGE_NT_HEADERS32; #define IMAGE_FIRST_SECTION( ntheader ) ((PIMAGE_SECTION_HEADER) \ - ((byte*)ntheader + \ + ((uint8_t*)ntheader + \ offsetof( IMAGE_NT_HEADERS, OptionalHeader ) + \ ((PIMAGE_NT_HEADERS)(ntheader))->FileHeader.SizeOfOptionalHeader \ )) @@ -267,19 +267,19 @@ typedef IMAGE_NT_HEADERS IMAGE_NT_HEADERS32; #define IMAGE_SIZEOF_SHORT_NAME 8 typedef struct _IMAGE_SECTION_HEADER { - uint8 Name[IMAGE_SIZEOF_SHORT_NAME]; + uint8_t Name[IMAGE_SIZEOF_SHORT_NAME]; union { - uint32 PhysicalAddress; - uint32 VirtualSize; + uint32_t PhysicalAddress; + uint32_t VirtualSize; } Misc; - uint32 VirtualAddress; - uint32 SizeOfRawData; - uint32 PointerToRawData; - uint32 PointerToRelocations; - uint32 PointerToLinenumbers; - uint16 NumberOfRelocations; - uint16 NumberOfLinenumbers; - uint32 Characteristics; + uint32_t VirtualAddress; + uint32_t SizeOfRawData; + uint32_t PointerToRawData; + uint32_t PointerToRelocations; + uint32_t PointerToLinenumbers; + uint16_t NumberOfRelocations; + uint16_t NumberOfLinenumbers; + uint32_t Characteristics; } IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER; #define IMAGE_SIZEOF_SECTION_HEADER 40 @@ -301,13 +301,13 @@ typedef struct _IMAGE_SECTION_HEADER { #define IMAGE_SCN_LNK_REMOVE 0x00000800 /* Section contents will not become part of image. */ #define IMAGE_SCN_LNK_COMDAT 0x00001000 /* Section contents comdat. */ -#define IMAGE_SCN_ALIGN_1BYTES 0x00100000 -#define IMAGE_SCN_ALIGN_2BYTES 0x00200000 -#define IMAGE_SCN_ALIGN_4BYTES 0x00300000 -#define IMAGE_SCN_ALIGN_8BYTES 0x00400000 +#define IMAGE_SCN_ALIGN_1BYTES 0x00100000 +#define IMAGE_SCN_ALIGN_2BYTES 0x00200000 +#define IMAGE_SCN_ALIGN_4BYTES 0x00300000 +#define IMAGE_SCN_ALIGN_8BYTES 0x00400000 #define IMAGE_SCN_ALIGN_16BYTES 0x00500000 /* Default alignment if no others are specified. */ -#define IMAGE_SCN_ALIGN_32BYTES 0x00600000 -#define IMAGE_SCN_ALIGN_64BYTES 0x00700000 +#define IMAGE_SCN_ALIGN_32BYTES 0x00600000 +#define IMAGE_SCN_ALIGN_64BYTES 0x00700000 #define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 /* Section can be discarded. */ #define IMAGE_SCN_MEM_NOT_CACHED 0x04000000 /* Section is not cachable. */ @@ -323,18 +323,18 @@ typedef struct _IMAGE_SECTION_HEADER { typedef struct _IMAGE_SYMBOL { union { - uint8 ShortName[8]; + uint8_t ShortName[8]; struct { - uint32 Short; /* if 0, use LongName */ - uint32 Long; /* offset into string table */ + uint32_t Short; /* if 0, use LongName */ + uint32_t Long; /* offset into string table */ } Name; - uint8* LongName[2]; + uint8_t* LongName[2]; } N; - uint32 Value; - int16 SectionNumber; - uint16 Type; - uint8 StorageClass; - uint8 NumberOfAuxSymbols; + uint32_t Value; + int16_t SectionNumber; + uint16_t Type; + uint8_t StorageClass; + uint8_t NumberOfAuxSymbols; } IMAGE_SYMBOL; typedef IMAGE_SYMBOL UNALIGNED *PIMAGE_SYMBOL; @@ -359,18 +359,18 @@ typedef IMAGE_SYMBOL UNALIGNED *PIMAGE_SYMBOL; #define IMAGE_SYM_TYPE_VOID 1 #define IMAGE_SYM_TYPE_CHAR 2 /* type character. */ #define IMAGE_SYM_TYPE_SHORT 3 /* type short integer. */ -#define IMAGE_SYM_TYPE_INT 4 -#define IMAGE_SYM_TYPE_LONG 5 -#define IMAGE_SYM_TYPE_FLOAT 6 -#define IMAGE_SYM_TYPE_DOUBLE 7 -#define IMAGE_SYM_TYPE_STRUCT 8 -#define IMAGE_SYM_TYPE_UNION 9 +#define IMAGE_SYM_TYPE_INT 4 +#define IMAGE_SYM_TYPE_LONG 5 +#define IMAGE_SYM_TYPE_FLOAT 6 +#define IMAGE_SYM_TYPE_DOUBLE 7 +#define IMAGE_SYM_TYPE_STRUCT 8 +#define IMAGE_SYM_TYPE_UNION 9 #define IMAGE_SYM_TYPE_ENUM 10 /* enumeration. */ #define IMAGE_SYM_TYPE_MOE 11 /* member of enumeration. */ -#define IMAGE_SYM_TYPE_UCHAR 12 -#define IMAGE_SYM_TYPE_USHORT 13 -#define IMAGE_SYM_TYPE_UINT 14 -#define IMAGE_SYM_TYPE_ULONG 15 +#define IMAGE_SYM_TYPE_UCHAR 12 +#define IMAGE_SYM_TYPE_USHORT 13 +#define IMAGE_SYM_TYPE_UINT 14 +#define IMAGE_SYM_TYPE_ULONG 15 /* * Type (derived) values. @@ -385,7 +385,7 @@ typedef IMAGE_SYMBOL UNALIGNED *PIMAGE_SYMBOL; * Storage classes. */ -#define IMAGE_SYM_CLASS_END_OF_FUNCTION (uint8 )-1 +#define IMAGE_SYM_CLASS_END_OF_FUNCTION (uint8_t )-1 #define IMAGE_SYM_CLASS_NULL 0 #define IMAGE_SYM_CLASS_AUTOMATIC 1 #define IMAGE_SYM_CLASS_EXTERNAL 2 @@ -460,35 +460,35 @@ typedef IMAGE_SYMBOL UNALIGNED *PIMAGE_SYMBOL; typedef union _IMAGE_AUX_SYMBOL { struct { - uint32 TagIndex; /* struct, union, or enum tag index */ + uint32_t TagIndex; /* struct, union, or enum tag index */ union { struct { - uint16 Linenumber; /* declaration line number */ - uint16 Size; /* size of struct, union, or enum */ + uint16_t Linenumber; /* declaration line number */ + uint16_t Size; /* size of struct, union, or enum */ } LnSz; - uint32 TotalSize; + uint32_t TotalSize; } Misc; union { struct { /* if ISFCN, tag, or .bb */ - uint32 PointerToLinenumber; - uint32 PointerToNextFunction; + uint32_t PointerToLinenumber; + uint32_t PointerToNextFunction; } Function; struct { /* if ISARY, up to 4 dimen. */ - uint16 Dimension[4]; + uint16_t Dimension[4]; } Array; } FcnAry; - uint16 TvIndex; /* tv index */ + uint16_t TvIndex; /* tv index */ } Sym; struct { - uint8 Name[IMAGE_SIZEOF_SYMBOL]; + uint8_t Name[IMAGE_SIZEOF_SYMBOL]; } File; struct { - uint32 Length; /* section length */ - uint16 NumberOfRelocations; /* number of relocation entries */ - uint16 NumberOfLinenumbers; /* number of line numbers */ - uint32 CheckSum; /* checksum for communal */ - int16 Number; /* section number to associate with */ - uint8 Selection; /* communal selection type */ + uint32_t Length; /* section length */ + uint16_t NumberOfRelocations; /* number of relocation entries */ + uint16_t NumberOfLinenumbers; /* number of line numbers */ + uint32_t CheckSum; /* checksum for communal */ + int16_t Number; /* section number to associate with */ + uint8_t Selection; /* communal selection type */ } Section; } IMAGE_AUX_SYMBOL; typedef IMAGE_AUX_SYMBOL UNALIGNED *PIMAGE_AUX_SYMBOL; @@ -516,9 +516,9 @@ typedef IMAGE_AUX_SYMBOL UNALIGNED *PIMAGE_AUX_SYMBOL; */ typedef struct _IMAGE_RELOCATION { - uint32 VirtualAddress; - uint32 SymbolTableIndex; - uint16 Type; + uint32_t VirtualAddress; + uint32_t SymbolTableIndex; + uint16_t Type; } IMAGE_RELOCATION; typedef IMAGE_RELOCATION UNALIGNED *PIMAGE_RELOCATION; @@ -604,9 +604,9 @@ typedef IMAGE_RELOCATION UNALIGNED *PIMAGE_RELOCATION; */ typedef struct _IMAGE_BASE_RELOCATION { - uint32 VirtualAddress; - uint32 SizeOfBlock; -/* uint16 TypeOffset[1]; */ + uint32_t VirtualAddress; + uint32_t SizeOfBlock; +/* uint16_t TypeOffset[1]; */ } IMAGE_BASE_RELOCATION, *PIMAGE_BASE_RELOCATION; #define IMAGE_SIZEOF_BASE_RELOCATION 8 @@ -630,10 +630,10 @@ typedef struct _IMAGE_BASE_RELOCATION { typedef struct _IMAGE_LINENUMBER { union { - uint32 SymbolTableIndex; /* Symbol table index of function name if Linenumber is 0. */ - uint32 VirtualAddress; /* Virtual address of line number. */ + uint32_t SymbolTableIndex; /* Symbol table index of function name if Linenumber is 0. */ + uint32_t VirtualAddress; /* Virtual address of line number. */ } Type; - uint16 Linenumber; /* Line number. */ + uint16_t Linenumber; /* Line number. */ } IMAGE_LINENUMBER; typedef IMAGE_LINENUMBER UNALIGNED *PIMAGE_LINENUMBER; @@ -648,16 +648,16 @@ typedef IMAGE_LINENUMBER UNALIGNED *PIMAGE_LINENUMBER; #define IMAGE_ARCHIVE_END "`\n" #define IMAGE_ARCHIVE_PAD "\n" #define IMAGE_ARCHIVE_LINKER_MEMBER "/ " -#define IMAGE_ARCHIVE_LONGNAMES_MEMBER "// " +#define IMAGE_ARCHIVE_LONGNAMES_MEMBER "// " typedef struct _IMAGE_ARCHIVE_MEMBER_HEADER { - uint8 Name[16]; /* File member name - `/' terminated. */ - uint8 Date[12]; /* File member date - decimal. */ - uint8 UserID[6]; /* File member user id - decimal. */ - uint8 GroupID[6]; /* File member group id - decimal. */ - uint8 Mode[8]; /* File member mode - octal. */ - uint8 Size[10]; /* File member size - decimal. */ - uint8 EndHeader[2]; /* String to end header. */ + uint8_t Name[16]; /* File member name - `/' terminated. */ + uint8_t Date[12]; /* File member date - decimal. */ + uint8_t UserID[6]; /* File member user id - decimal. */ + uint8_t GroupID[6]; /* File member group id - decimal. */ + uint8_t Mode[8]; /* File member mode - octal. */ + uint8_t Size[10]; /* File member size - decimal. */ + uint8_t EndHeader[2]; /* String to end header. */ } IMAGE_ARCHIVE_MEMBER_HEADER, *PIMAGE_ARCHIVE_MEMBER_HEADER; #define IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60 @@ -671,17 +671,17 @@ typedef struct _IMAGE_ARCHIVE_MEMBER_HEADER { */ typedef struct _IMAGE_EXPORT_DIRECTORY { - uint32 Characteristics; - uint32 TimeDateStamp; - uint16 MajorVersion; - uint16 MinorVersion; - uint32 Name; - uint32 Base; - uint32 NumberOfFunctions; - uint32 NumberOfNames; - uint32 **AddressOfFunctions; - uint32 **AddressOfNames; - uint16 **AddressOfNameOrdinals; + uint32_t Characteristics; + uint32_t TimeDateStamp; + uint16_t MajorVersion; + uint16_t MinorVersion; + uint32_t Name; + uint32_t Base; + uint32_t NumberOfFunctions; + uint32_t NumberOfNames; + uint32_t **AddressOfFunctions; + uint32_t **AddressOfNames; + uint16_t **AddressOfNameOrdinals; } IMAGE_EXPORT_DIRECTORY, *PIMAGE_EXPORT_DIRECTORY; /* @@ -689,14 +689,14 @@ typedef struct _IMAGE_EXPORT_DIRECTORY { */ typedef struct _IMAGE_IMPORT_BY_NAME { - uint16 Hint; - uint8 Name[1]; + uint16_t Hint; + uint8_t Name[1]; } IMAGE_IMPORT_BY_NAME, *PIMAGE_IMPORT_BY_NAME; typedef struct _IMAGE_THUNK_DATA { union { - uint32 *Function; - uint32 Ordinal; + uint32_t *Function; + uint32_t Ordinal; PIMAGE_IMPORT_BY_NAME AddressOfData; } u1; } IMAGE_THUNK_DATA, *PIMAGE_THUNK_DATA; @@ -706,10 +706,10 @@ typedef struct _IMAGE_THUNK_DATA { #define IMAGE_ORDINAL(Ordinal) (Ordinal & 0xffff) typedef struct _IMAGE_IMPORT_DESCRIPTOR { - uint32 Characteristics; - uint32 TimeDateStamp; - uint32 ForwarderChain; - uint32 Name; + uint32_t Characteristics; + uint32_t TimeDateStamp; + uint32_t ForwarderChain; + uint32_t Name; PIMAGE_THUNK_DATA FirstThunk; } IMAGE_IMPORT_DESCRIPTOR, *PIMAGE_IMPORT_DESCRIPTOR; @@ -719,17 +719,17 @@ typedef struct _IMAGE_IMPORT_DESCRIPTOR { typedef void (*PIMAGE_TLS_CALLBACK) ( void* DllHandle, - uint32 Reason, + uint32_t Reason, void* Reserved ); typedef struct _IMAGE_TLS_DIRECTORY { - uint32 StartAddressOfRawData; - uint32 EndAddressOfRawData; - uint32 *AddressOfIndex; + uint32_t StartAddressOfRawData; + uint32_t EndAddressOfRawData; + uint32_t *AddressOfIndex; PIMAGE_TLS_CALLBACK *AddressOfCallBacks; - uint32 SizeOfZeroFill; - uint32 Characteristics; + uint32_t SizeOfZeroFill; + uint32_t Characteristics; } IMAGE_TLS_DIRECTORY, *PIMAGE_TLS_DIRECTORY; @@ -752,12 +752,12 @@ typedef struct _IMAGE_TLS_DIRECTORY { */ typedef struct _IMAGE_RESOURCE_DIRECTORY { - uint32 Characteristics; - uint32 TimeDateStamp; - uint16 MajorVersion; - uint16 MinorVersion; - uint16 NumberOfNamedEntries; - uint16 NumberOfIdEntries; + uint32_t Characteristics; + uint32_t TimeDateStamp; + uint16_t MajorVersion; + uint16_t MinorVersion; + uint16_t NumberOfNamedEntries; + uint16_t NumberOfIdEntries; /* IMAGE_RESOURCE_DIRECTORY_ENTRY DirectoryEntries[]; */ } IMAGE_RESOURCE_DIRECTORY, *PIMAGE_RESOURCE_DIRECTORY; @@ -780,8 +780,8 @@ typedef struct _IMAGE_RESOURCE_DIRECTORY { */ typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY { - uint32 Name; - uint32 OffsetToData; + uint32_t Name; + uint32_t OffsetToData; } IMAGE_RESOURCE_DIRECTORY_ENTRY, *PIMAGE_RESOURCE_DIRECTORY_ENTRY; /* @@ -794,13 +794,13 @@ typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY { */ typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING { - uint16 Length; + uint16_t Length; char NameString[ 1 ]; } IMAGE_RESOURCE_DIRECTORY_STRING, *PIMAGE_RESOURCE_DIRECTORY_STRING; typedef struct _IMAGE_RESOURCE_DIR_STRING_U { - uint16 Length; + uint16_t Length; wchar_t NameString[ 1 ]; } IMAGE_RESOURCE_DIR_STRING_U, *PIMAGE_RESOURCE_DIR_STRING_U; @@ -814,10 +814,10 @@ typedef struct _IMAGE_RESOURCE_DIR_STRING_U { */ typedef struct _IMAGE_RESOURCE_DATA_ENTRY { - uint32 OffsetToData; - uint32 Size; - uint32 CodePage; - uint32 Reserved; + uint32_t OffsetToData; + uint32_t Size; + uint32_t CodePage; + uint32_t Reserved; } IMAGE_RESOURCE_DATA_ENTRY, *PIMAGE_RESOURCE_DATA_ENTRY; /* @@ -825,16 +825,16 @@ typedef struct _IMAGE_RESOURCE_DATA_ENTRY { */ typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY { - uint32 Characteristics; - uint32 TimeDateStamp; - uint16 MajorVersion; - uint16 MinorVersion; - uint32 GlobalFlagsClear; - uint32 GlobalFlagsSet; - uint32 CriticalSectionDefaultTimeout; - uint32 DeCommitFreeBlockThreshold; - uint32 DeCommitTotalFreeThreshold; - uint32 Reserved[ 8 ]; + uint32_t Characteristics; + uint32_t TimeDateStamp; + uint16_t MajorVersion; + uint16_t MinorVersion; + uint32_t GlobalFlagsClear; + uint32_t GlobalFlagsSet; + uint32_t CriticalSectionDefaultTimeout; + uint32_t DeCommitFreeBlockThreshold; + uint32_t DeCommitTotalFreeThreshold; + uint32_t Reserved[ 8 ]; } IMAGE_LOAD_CONFIG_DIRECTORY, *PIMAGE_LOAD_CONFIG_DIRECTORY; @@ -846,11 +846,11 @@ typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY { */ typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY { - uint32 BeginAddress; - uint32 EndAddress; + uint32_t BeginAddress; + uint32_t EndAddress; void* ExceptionHandler; void* HandlerData; - uint32 PrologEndAddress; + uint32_t PrologEndAddress; } IMAGE_RUNTIME_FUNCTION_ENTRY, *PIMAGE_RUNTIME_FUNCTION_ENTRY; /* @@ -858,14 +858,14 @@ typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY { */ typedef struct _IMAGE_DEBUG_DIRECTORY { - uint32 Characteristics; - uint32 TimeDateStamp; - uint16 MajorVersion; - uint16 MinorVersion; - uint32 Type; - uint32 SizeOfData; - uint32 AddressOfRawData; - uint32 PointerToRawData; + uint32_t Characteristics; + uint32_t TimeDateStamp; + uint16_t MajorVersion; + uint16_t MinorVersion; + uint32_t Type; + uint32_t SizeOfData; + uint32_t AddressOfRawData; + uint32_t PointerToRawData; } IMAGE_DEBUG_DIRECTORY, *PIMAGE_DEBUG_DIRECTORY; #define IMAGE_DEBUG_TYPE_UNKNOWN 0 @@ -879,14 +879,14 @@ typedef struct _IMAGE_DEBUG_DIRECTORY { #define IMAGE_DEBUG_TYPE_RESERVED7 8 typedef struct _IMAGE_COFF_SYMBOLS_HEADER { - uint32 NumberOfSymbols; - uint32 LvaToFirstSymbol; - uint32 NumberOfLinenumbers; - uint32 LvaToFirstLinenumber; - uint32 RvaToFirstByteOfCode; - uint32 RvaToLastByteOfCode; - uint32 RvaToFirstByteOfData; - uint32 RvaToLastByteOfData; + uint32_t NumberOfSymbols; + uint32_t LvaToFirstSymbol; + uint32_t NumberOfLinenumbers; + uint32_t LvaToFirstLinenumber; + uint32_t RvaToFirstByteOfCode; + uint32_t RvaToLastByteOfCode; + uint32_t RvaToFirstByteOfData; + uint32_t RvaToLastByteOfData; } IMAGE_COFF_SYMBOLS_HEADER, *PIMAGE_COFF_SYMBOLS_HEADER; #define FRAME_FPO 0 @@ -897,16 +897,16 @@ typedef struct _IMAGE_COFF_SYMBOLS_HEADER { #pragma warning(disable:4214) #endif typedef struct _FPO_DATA { - uint32 ulOffStart; /* offset 1st byte of function code */ - uint32 cbProcSize; /* # bytes in function */ - uint32 cdwLocals; /* # bytes in locals/4 */ - uint16 cdwParams; /* # bytes in params/4 */ - uint16 cbProlog : 8; /* # bytes in prolog */ - uint16 cbRegs : 3; /* # regs saved */ - uint16 fHasSEH : 1; /* TRUE if SEH in func */ - uint16 fUseBP : 1; /* TRUE if EBP has been allocated */ - uint16 reserved : 1; /* reserved for future use */ - uint16 cbFrame : 2; /* frame type */ + uint32_t ulOffStart; /* offset 1st byte of function code */ + uint32_t cbProcSize; /* # bytes in function */ + uint32_t cdwLocals; /* # bytes in locals/4 */ + uint16_t cdwParams; /* # bytes in params/4 */ + uint16_t cbProlog : 8; /* # bytes in prolog */ + uint16_t cbRegs : 3; /* # regs saved */ + uint16_t fHasSEH : 1; /* TRUE if SEH in func */ + uint16_t fUseBP : 1; /* TRUE if EBP has been allocated */ + uint16_t reserved : 1; /* reserved for future use */ + uint16_t cbFrame : 2; /* frame type */ } FPO_DATA, *PFPO_DATA; #define SIZEOF_RFPO_DATA 16 #ifdef _MSC_VER @@ -916,12 +916,12 @@ typedef struct _FPO_DATA { #define IMAGE_DEBUG_MISC_EXENAME 1 typedef struct _IMAGE_DEBUG_MISC { - uint32 DataType; /* type of misc data, see defines */ - uint32 Length; /* total length of record, rounded to four */ + uint32_t DataType; /* type of misc data, see defines */ + uint32_t Length; /* total length of record, rounded to four */ /* byte multiple. */ - uint8 Unicode; /* TRUE if data is unicode string */ - uint8 Reserved[ 3 ]; - uint8 Data[ 1 ]; /* Actual data */ + uint8_t Unicode; /* TRUE if data is unicode string */ + uint8_t Reserved[ 3 ]; + uint8_t Data[ 1 ]; /* Actual data */ } IMAGE_DEBUG_MISC, *PIMAGE_DEBUG_MISC; @@ -946,18 +946,18 @@ typedef struct _IMAGE_DEBUG_MISC { */ typedef struct _IMAGE_SEPARATE_DEBUG_HEADER { - uint16 Signature; - uint16 Flags; - uint16 Machine; - uint16 Characteristics; - uint32 TimeDateStamp; - uint32 CheckSum; - uint32 ImageBase; - uint32 SizeOfImage; - uint32 NumberOfSections; - uint32 ExportedNamesSize; - uint32 DebugDirectorySize; - uint32 Reserved[ 3 ]; + uint16_t Signature; + uint16_t Flags; + uint16_t Machine; + uint16_t Characteristics; + uint32_t TimeDateStamp; + uint32_t CheckSum; + uint32_t ImageBase; + uint32_t SizeOfImage; + uint32_t NumberOfSections; + uint32_t ExportedNamesSize; + uint32_t DebugDirectorySize; + uint32_t Reserved[ 3 ]; } IMAGE_SEPARATE_DEBUG_HEADER, *PIMAGE_SEPARATE_DEBUG_HEADER; #define IMAGE_SEPARATE_DEBUG_SIGNATURE 0x4944 @@ -966,21 +966,21 @@ typedef struct _IMAGE_SEPARATE_DEBUG_HEADER { #ifdef USES_COMPLUS20 -/* +/* * COM+ 2.0 header structure. */ typedef struct IMAGE_COR20_HEADER { /* Header versioning */ - uint32 cb; - uint16 MajorRuntimeVersion; - uint16 MinorRuntimeVersion; - + uint32_t cb; + uint16_t MajorRuntimeVersion; + uint16_t MinorRuntimeVersion; + /* Symbol table and startup information */ - IMAGE_DATA_DIRECTORY MetaData; - uint32 Flags; - uint32 EntryPointToken; - + IMAGE_DATA_DIRECTORY MetaData; + uint32_t Flags; + uint32_t EntryPointToken; + /* Binding information */ IMAGE_DATA_DIRECTORY Resources; IMAGE_DATA_DIRECTORY StrongNameSignature; @@ -1002,7 +1002,7 @@ typedef struct IMAGE_COR20_HEADER /*@Todo: this is obsolete, being replaced by pdata in the PE header.*/ IMAGE_DATA_DIRECTORY IPMap; - + } IMAGE_COR20_HEADER; #endif /* USES_COMPLUS20 */ diff --git a/tools/xenia-info/xenia-info.cc b/tools/xenia-info/xenia-info.cc index 80542f47d..c613987a8 100644 --- a/tools/xenia-info/xenia-info.cc +++ b/tools/xenia-info/xenia-info.cc @@ -9,6 +9,46 @@ #include -int main() { - return some_function(4); + +int xenia_info(int argc, xechar_t **argv) { + int result_code = 1; + + xe_pal_ref pal = NULL; + xe_memory_ref memory = NULL; + xe_kernel_ref kernel = NULL; + xe_module_ref module = NULL; + + // TODO(benvanik): real command line parsing. + if (argc < 2) { + printf("usage: xenia-info some.xex\n"); + return 1; + } + const xechar_t *path = argv[1]; + + xe_pal_options_t pal_options; + pal = xe_pal_create(pal_options); + XEEXPECTNOTNULL(pal); + + xe_memory_options_t memory_options; + memory = xe_memory_create(pal, memory_options); + XEEXPECTNOTNULL(memory); + + xe_kernel_options_t kernel_options; + xe_zero_struct(&kernel_options, sizeof(kernel_options)); + kernel = xe_kernel_create(pal, memory, kernel_options); + XEEXPECTNOTNULL(kernel); + + module = xe_kernel_load_module(kernel, path); + XEEXPECTNOTNULL(module); + + xe_module_dump(module); + + result_code = 0; +XECLEANUP: + xe_module_release(module); + xe_kernel_release(kernel); + xe_memory_release(memory); + xe_pal_release(pal); + return result_code; } +XE_MAIN_THUNK(xenia_info); diff --git a/tools/xenia-info/xenia-info.gypi b/tools/xenia-info/xenia-info.gypi index 9dda4614e..479aa05c1 100644 --- a/tools/xenia-info/xenia-info.gypi +++ b/tools/xenia-info/xenia-info.gypi @@ -7,6 +7,8 @@ 'dependencies': [ 'xeniacore', + 'xeniacpu', + 'xeniakernel', ], 'include_dirs': [ diff --git a/tools/xenia-run/xenia-run.cc b/tools/xenia-run/xenia-run.cc index 80542f47d..248a3cad4 100644 --- a/tools/xenia-run/xenia-run.cc +++ b/tools/xenia-run/xenia-run.cc @@ -9,6 +9,10 @@ #include -int main() { - return some_function(4); + +int xenia_run(int argc, xechar_t **argv) { + do_cpu_stuff(); + do_gpu_stuff(); + return 0; } +XE_MAIN_THUNK(xenia_run); diff --git a/tools/xenia-run/xenia-run.gypi b/tools/xenia-run/xenia-run.gypi index 3dd5a618f..fc841fc54 100644 --- a/tools/xenia-run/xenia-run.gypi +++ b/tools/xenia-run/xenia-run.gypi @@ -7,6 +7,9 @@ 'dependencies': [ 'xeniacore', + 'xeniacpu', + 'xeniagpu', + 'xeniakernel', ], 'include_dirs': [ diff --git a/xenia-build.py b/xenia-build.py index 93b33ce9d..1bb733e40 100755 --- a/xenia-build.py +++ b/xenia-build.py @@ -115,10 +115,21 @@ def has_bin(bin): 'which %s' % (bin), shell=True, stdout=DEVNULL) == 0 else False -def shell_call(command): +def shell_call(command, throw_on_error=True): """Executes a shell command. + + Args: + command: Command to execute. + throw_on_error: Whether to throw an error or return the status code. + + Returns: + If throw_on_error is False the status code of the call will be returned. """ - subprocess.check_call(command, shell=True) + if throw_on_error: + subprocess.check_call(command, shell=True) + return 0 + else: + return subprocess.call(command, shell=True) class Command(object): @@ -358,8 +369,11 @@ class BuildCommand(Command): print '' print '- building xenia in %s...' % (config) - shell_call('third_party/ninja/ninja -C build/xenia/%s' % (config)) + result = shell_call('third_party/ninja/ninja -C build/xenia/%s' % (config), + throw_on_error=False) print '' + if result != 0: + return result print 'Success!' return 0 diff --git a/xenia.gyp b/xenia.gyp index 653c54929..6afda4a5d 100644 --- a/xenia.gyp +++ b/xenia.gyp @@ -15,47 +15,117 @@ 'include_dirs': [ 'include/', ], - 'link_settings': { - 'libraries': [ - '