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];
22
ut32
base
;
23
ut32
headers_size
;
24
ut32
image_size
;
25
ut32
image_header_size
;
26
ut32
timestamp
;
27
ut32
cert_addr
;
28
ut32
sections
;
29
ut32
sechdr_addr
;
30
ut32
init_flags
;
31
ut32
ep
;
32
ut32
tls_addr
;
33
ut32
pe_data[7];
34
ut32
debug_path_addr
;
35
ut32
debug_name_addr
;
36
ut32
debug_uname_addr
;
37
ut32
kernel_thunk_addr
;
38
ut32
nonkernel_import_dir_addr
;
39
ut32
lib_versions
;
40
ut32
lib_versions_addr
;
41
ut32
kernel_lib_addr
;
42
ut32
xapi_lib_addr
;
43
ut32
padding[2];
44
}
xbe_header
;
45
46
#define SECT_FLAG_X 0x00000004
47
#define SECT_FLAG_W 0x00000001
48
typedef
struct
{
49
ut32
flags
;
50
ut32
vaddr
;
51
ut32
vsize
;
52
ut32
offset
;
53
ut32
size
;
54
ut32
name_addr
;
55
ut32
refcount
;
56
ut32
padding[2];
57
ut8
digest[20];
58
}
xbe_section
;
59
60
typedef
struct
{
61
ut8
name
[8];
62
ut16
major
;
63
ut16
minor
;
64
ut16
build
;
65
ut16
flags
;
66
}
xbe_lib
;
67
68
typedef
struct
{
69
xbe_header
header
;
70
int
kt_key
;
71
int
ep_key
;
72
}
rz_bin_xbe_obj_t
;
73
74
#endif
signature
static char * signature(RzBinFile *bf, bool json)
Definition:
bin_pe.c:117
ut16
uint16_t ut16
Definition:
demangler_util.h:30
ut32
uint32_t ut32
Definition:
demangler_util.h:31
ut8
uint8_t ut8
Definition:
lh5801.h:11
name
Definition:
z80asm.h:102
rz_bin_xbe_obj_t
Definition:
xbe.h:68
rz_bin_xbe_obj_t::ep_key
int ep_key
Definition:
xbe.h:71
rz_bin_xbe_obj_t::kt_key
int kt_key
Definition:
xbe.h:70
rz_bin_xbe_obj_t::header
xbe_header header
Definition:
xbe.h:69
xbe_header
Definition:
xbe.h:19
xbe_header::lib_versions_addr
ut32 lib_versions_addr
Definition:
xbe.h:40
xbe_header::headers_size
ut32 headers_size
Definition:
xbe.h:23
xbe_header::ep
ut32 ep
Definition:
xbe.h:31
xbe_header::cert_addr
ut32 cert_addr
Definition:
xbe.h:27
xbe_header::xapi_lib_addr
ut32 xapi_lib_addr
Definition:
xbe.h:42
xbe_header::tls_addr
ut32 tls_addr
Definition:
xbe.h:32
xbe_header::debug_uname_addr
ut32 debug_uname_addr
Definition:
xbe.h:36
xbe_header::debug_path_addr
ut32 debug_path_addr
Definition:
xbe.h:34
xbe_header::debug_name_addr
ut32 debug_name_addr
Definition:
xbe.h:35
xbe_header::sections
ut32 sections
Definition:
xbe.h:28
xbe_header::init_flags
ut32 init_flags
Definition:
xbe.h:30
xbe_header::kernel_lib_addr
ut32 kernel_lib_addr
Definition:
xbe.h:41
xbe_header::image_header_size
ut32 image_header_size
Definition:
xbe.h:25
xbe_header::lib_versions
ut32 lib_versions
Definition:
xbe.h:39
xbe_header::image_size
ut32 image_size
Definition:
xbe.h:24
xbe_header::base
ut32 base
Definition:
xbe.h:22
xbe_header::nonkernel_import_dir_addr
ut32 nonkernel_import_dir_addr
Definition:
xbe.h:38
xbe_header::sechdr_addr
ut32 sechdr_addr
Definition:
xbe.h:29
xbe_header::kernel_thunk_addr
ut32 kernel_thunk_addr
Definition:
xbe.h:37
xbe_header::timestamp
ut32 timestamp
Definition:
xbe.h:26
xbe_lib
Definition:
xbe.h:60
xbe_lib::build
ut16 build
Definition:
xbe.h:64
xbe_lib::major
ut16 major
Definition:
xbe.h:62
xbe_lib::minor
ut16 minor
Definition:
xbe.h:63
xbe_lib::flags
ut16 flags
Definition:
xbe.h:65
xbe_section
Definition:
xbe.h:48
xbe_section::vaddr
ut32 vaddr
Definition:
xbe.h:50
xbe_section::offset
ut32 offset
Definition:
xbe.h:52
xbe_section::name_addr
ut32 name_addr
Definition:
xbe.h:54
xbe_section::size
ut32 size
Definition:
xbe.h:53
xbe_section::vsize
ut32 vsize
Definition:
xbe.h:51
xbe_section::flags
ut32 flags
Definition:
xbe.h:49
xbe_section::refcount
ut32 refcount
Definition:
xbe.h:55
librz
bin
format
xbe
xbe.h
Generated by
1.9.1