Rizin
unix-like reverse engineering framework and cli tools
xbe.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2014 LemonBoy <thatlemon@gmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #ifndef _INCLUDE_XBE_H_
5 #define _INCLUDE_XBE_H_
6 
7 #define XBE_MAGIC 0x48454258
8 
9 #define XBE_EP_RETAIL 0xA8FC57AB
10 #define XBE_EP_DEBUG 0x94859D4B
11 
12 #define XBE_KP_RETAIL 0x5b6d40b6
13 #define XBE_KP_DEBUG 0xefb1f152
14 
15 #define XBE_EP_CHIHIRO 0x40B5C16E
16 #define XBE_KP_CHIHIRO 0x2290059D
17 
18 #define XBE_MAX_THUNK 378
19 typedef struct {
20  ut8 magic[4];
21  ut8 signature[0x100];
33  ut32 pe_data[7];
43  ut32 padding[2];
44 } xbe_header;
45 
46 #define SECT_FLAG_X 0x00000004
47 #define SECT_FLAG_W 0x00000001
48 typedef struct {
56  ut32 padding[2];
57  ut8 digest[20];
58 } xbe_section;
59 
60 typedef struct {
61  ut8 name[8];
66 } xbe_lib;
67 
68 typedef struct {
70  int kt_key;
71  int ep_key;
73 
74 #endif
static char * signature(RzBinFile *bf, bool json)
Definition: bin_pe.c:117
uint16_t ut16
uint32_t ut32
uint8_t ut8
Definition: lh5801.h:11
Definition: z80asm.h:102
int ep_key
Definition: xbe.h:71
int kt_key
Definition: xbe.h:70
xbe_header header
Definition: xbe.h:69
Definition: xbe.h:19
ut32 lib_versions_addr
Definition: xbe.h:40
ut32 headers_size
Definition: xbe.h:23
ut32 ep
Definition: xbe.h:31
ut32 cert_addr
Definition: xbe.h:27
ut32 xapi_lib_addr
Definition: xbe.h:42
ut32 tls_addr
Definition: xbe.h:32
ut32 debug_uname_addr
Definition: xbe.h:36
ut32 debug_path_addr
Definition: xbe.h:34
ut32 debug_name_addr
Definition: xbe.h:35
ut32 sections
Definition: xbe.h:28
ut32 init_flags
Definition: xbe.h:30
ut32 kernel_lib_addr
Definition: xbe.h:41
ut32 image_header_size
Definition: xbe.h:25
ut32 lib_versions
Definition: xbe.h:39
ut32 image_size
Definition: xbe.h:24
ut32 base
Definition: xbe.h:22
ut32 nonkernel_import_dir_addr
Definition: xbe.h:38
ut32 sechdr_addr
Definition: xbe.h:29
ut32 kernel_thunk_addr
Definition: xbe.h:37
ut32 timestamp
Definition: xbe.h:26
Definition: xbe.h:60
ut16 build
Definition: xbe.h:64
ut16 major
Definition: xbe.h:62
ut16 minor
Definition: xbe.h:63
ut16 flags
Definition: xbe.h:65
ut32 vaddr
Definition: xbe.h:50
ut32 offset
Definition: xbe.h:52
ut32 name_addr
Definition: xbe.h:54
ut32 size
Definition: xbe.h:53
ut32 vsize
Definition: xbe.h:51
ut32 flags
Definition: xbe.h:49
ut32 refcount
Definition: xbe.h:55