Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ekaterine Papava
wine
Commits
fe693a70
Commit
fe693a70
authored
1 year ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
winedump: Dump hybrid metadata also for i386 CHPE modules.
parent
6e348640
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/winedump/pe.c
+133
-109
133 additions, 109 deletions
tools/winedump/pe.c
with
133 additions
and
109 deletions
tools/winedump/pe.c
+
133
−
109
View file @
fe693a70
...
...
@@ -1777,99 +1777,122 @@ static void dump_dir_imported_functions(void)
static
void
dump_hybrid_metadata
(
void
)
{
unsigned
int
i
;
const
struct
{
unsigned
int
version
;
unsigned
int
code_map
;
unsigned
int
code_map_count
;
unsigned
int
code_ranges_to_ep
;
unsigned
int
redir_metadata
;
unsigned
int
__os_arm64x_dispatch_call_no_redirect
;
unsigned
int
__os_arm64x_dispatch_ret
;
unsigned
int
__os_arm64x_check_call
;
unsigned
int
__os_arm64x_check_icall
;
unsigned
int
__os_arm64x_check_icall_cfg
;
unsigned
int
alt_entry
;
unsigned
int
aux_iat
;
unsigned
int
code_ranges_to_ep_count
;
unsigned
int
redir_metadata_count
;
unsigned
int
__os_arm64x_get_x64_information
;
unsigned
int
__os_arm64x_set_x64_information
;
unsigned
int
except_data
;
unsigned
int
except_data_size
;
unsigned
int
__os_arm64x_jump
;
unsigned
int
aux_iat_copy
;
}
*
data
=
get_hybrid_metadata
();
if
(
!
data
)
return
;
const
void
*
metadata
=
get_hybrid_metadata
();
if
(
!
metadata
)
return
;
printf
(
"Hybrid metadata
\n
"
);
print_dword
(
"Version"
,
data
->
version
);
print_dword
(
"Code map"
,
data
->
code_map
);
print_dword
(
"Code map count"
,
data
->
code_map_count
);
print_dword
(
"Code ranges to entry points"
,
data
->
code_ranges_to_ep
);
print_dword
(
"Redirection metadata"
,
data
->
redir_metadata
);
print_dword
(
"__os_arm64x_dispatch_call_no_redirect"
,
data
->
__os_arm64x_dispatch_call_no_redirect
);
print_dword
(
"__os_arm64x_dispatch_ret"
,
data
->
__os_arm64x_dispatch_ret
);
print_dword
(
"__os_arm64x_check_call"
,
data
->
__os_arm64x_check_call
);
print_dword
(
"__os_arm64x_check_icall"
,
data
->
__os_arm64x_check_icall
);
print_dword
(
"__os_arm64x_check_icall_cfg"
,
data
->
__os_arm64x_check_icall_cfg
);
print_dword
(
"Alternate entry point"
,
data
->
alt_entry
);
print_dword
(
"Auxiliary IAT"
,
data
->
aux_iat
);
print_dword
(
"Code ranges to entry points count"
,
data
->
code_ranges_to_ep_count
);
print_dword
(
"Redirection metadata count"
,
data
->
redir_metadata_count
);
print_dword
(
"__os_arm64x_get_x64_information"
,
data
->
__os_arm64x_get_x64_information
);
print_dword
(
"__os_arm64x_set_x64_information"
,
data
->
__os_arm64x_set_x64_information
);
print_dword
(
"Exception data"
,
data
->
except_data
);
print_dword
(
"Exception data size"
,
data
->
except_data_size
);
print_dword
(
"__os_arm64x_jump"
,
data
->
__os_arm64x_jump
);
print_dword
(
"Auxiliary IAT copy"
,
data
->
aux_iat_copy
);
if
(
data
->
code_map
)
switch
(
PE_nt_headers
->
FileHeader
.
Machine
)
{
case
IMAGE_FILE_MACHINE_I386
:
{
const
struct
const
IMAGE_CHPE_METADATA_X86
*
data
=
metadata
;
printf
(
" Version %#x
\n
"
,
(
int
)
data
->
Version
);
printf
(
" CHPECodeAddressRangeOffset %#x
\n
"
,
(
int
)
data
->
CHPECodeAddressRangeOffset
);
printf
(
" CHPECodeAddressRangeCount %#x
\n
"
,
(
int
)
data
->
CHPECodeAddressRangeCount
);
printf
(
" WowA64ExceptionHandlerFunctionPointer %#x
\n
"
,
(
int
)
data
->
WowA64ExceptionHandlerFunctionPointer
);
printf
(
" WowA64DispatchCallFunctionPointer %#x
\n
"
,
(
int
)
data
->
WowA64DispatchCallFunctionPointer
);
printf
(
" WowA64DispatchIndirectCallFunctionPointer %#x
\n
"
,
(
int
)
data
->
WowA64DispatchIndirectCallFunctionPointer
);
printf
(
" WowA64DispatchIndirectCallCfgFunctionPointer %#x
\n
"
,
(
int
)
data
->
WowA64DispatchIndirectCallCfgFunctionPointer
);
printf
(
" WowA64DispatchRetFunctionPointer %#x
\n
"
,
(
int
)
data
->
WowA64DispatchRetFunctionPointer
);
printf
(
" WowA64DispatchRetLeafFunctionPointer %#x
\n
"
,
(
int
)
data
->
WowA64DispatchRetLeafFunctionPointer
);
printf
(
" WowA64DispatchJumpFunctionPointer %#x
\n
"
,
(
int
)
data
->
WowA64DispatchJumpFunctionPointer
);
if
(
data
->
Version
>=
2
)
printf
(
" CompilerIATPointer %#x
\n
"
,
(
int
)
data
->
CompilerIATPointer
);
if
(
data
->
Version
>=
3
)
printf
(
" WowA64RdtscFunctionPointer %#x
\n
"
,
(
int
)
data
->
WowA64RdtscFunctionPointer
);
if
(
data
->
Version
>=
4
)
{
unsigned
int
start
:
30
;
unsigned
int
type
:
2
;
unsigned
int
len
;
}
*
map
=
RVA
(
data
->
code_map
,
data
->
code_map_count
*
sizeof
(
*
map
)
);
printf
(
" unknown[0] %#x
\n
"
,
(
int
)
data
->
unknown
[
0
]
);
printf
(
" unknown[1] %#x
\n
"
,
(
int
)
data
->
unknown
[
1
]
);
printf
(
" unknown[2] %#x
\n
"
,
(
int
)
data
->
unknown
[
2
]
);
printf
(
" unknown[3] %#x
\n
"
,
(
int
)
data
->
unknown
[
3
]
);
}
printf
(
"
\n
Code ranges
\n
"
);
for
(
i
=
0
;
i
<
data
->
code_map_count
;
i
++
)
if
(
data
->
CHPECodeAddressRangeOffset
)
{
static
const
char
*
types
[]
=
{
"ARM64"
,
"ARM64EC"
,
"x64"
,
"??"
};
unsigned
int
start
=
map
[
i
].
start
&
~
0x3
;
unsigned
int
type
=
map
[
i
].
start
&
0x3
;
printf
(
" %08x - %08x %s
\n
"
,
start
,
start
+
map
[
i
].
len
,
types
[
type
]
);
const
IMAGE_CHPE_RANGE_ENTRY
*
map
=
RVA
(
data
->
CHPECodeAddressRangeOffset
,
data
->
CHPECodeAddressRangeCount
*
sizeof
(
*
map
)
);
printf
(
"
\n
Code ranges
\n
"
);
for
(
i
=
0
;
i
<
data
->
CHPECodeAddressRangeCount
;
i
++
)
{
static
const
char
*
types
[]
=
{
"x86"
,
"ARM64"
};
unsigned
int
start
=
map
[
i
].
StartOffset
&
~
1
;
unsigned
int
type
=
map
[
i
].
Length
&
1
;
printf
(
" %08x - %08x %s
\n
"
,
start
,
start
+
(
int
)
map
[
i
].
Length
,
types
[
type
]
);
}
}
break
;
}
if
(
data
->
code_ranges_to_ep
)
case
IMAGE_FILE_MACHINE_AMD64
:
case
IMAGE_FILE_MACHINE_ARM64
:
{
const
struct
const
IMAGE_ARM64EC_METADATA
*
data
=
metadata
;
printf
(
"Version %#x
\n
"
,
(
int
)
data
->
Version
);
printf
(
"CodeMap %#x
\n
"
,
(
int
)
data
->
CodeMap
);
printf
(
"CodeMapCount %#x
\n
"
,
(
int
)
data
->
CodeMapCount
);
printf
(
"CodeRangesToEntryPoints %#x
\n
"
,
(
int
)
data
->
CodeRangesToEntryPoints
);
printf
(
"RedirectionMetadata %#x
\n
"
,
(
int
)
data
->
RedirectionMetadata
);
printf
(
"__os_arm64x_dispatch_call_no_redirect %#x
\n
"
,
(
int
)
data
->
__os_arm64x_dispatch_call_no_redirect
);
printf
(
"__os_arm64x_dispatch_ret %#x
\n
"
,
(
int
)
data
->
__os_arm64x_dispatch_ret
);
printf
(
"__os_arm64x_dispatch_call %#x
\n
"
,
(
int
)
data
->
__os_arm64x_dispatch_call
);
printf
(
"__os_arm64x_dispatch_icall %#x
\n
"
,
(
int
)
data
->
__os_arm64x_dispatch_icall
);
printf
(
"__os_arm64x_dispatch_icall_cfg %#x
\n
"
,
(
int
)
data
->
__os_arm64x_dispatch_icall_cfg
);
printf
(
"AlternateEntryPoint %#x
\n
"
,
(
int
)
data
->
AlternateEntryPoint
);
printf
(
"AuxiliaryIAT %#x
\n
"
,
(
int
)
data
->
AuxiliaryIAT
);
printf
(
"CodeRangesToEntryPointsCount %#x
\n
"
,
(
int
)
data
->
CodeRangesToEntryPointsCount
);
printf
(
"RedirectionMetadataCount %#x
\n
"
,
(
int
)
data
->
RedirectionMetadataCount
);
printf
(
"GetX64InformationFunctionPointer %#x
\n
"
,
(
int
)
data
->
GetX64InformationFunctionPointer
);
printf
(
"SetX64InformationFunctionPointer %#x
\n
"
,
(
int
)
data
->
SetX64InformationFunctionPointer
);
printf
(
"ExtraRFETable %#x
\n
"
,
(
int
)
data
->
ExtraRFETable
);
printf
(
"ExtraRFETableSize %#x
\n
"
,
(
int
)
data
->
ExtraRFETableSize
);
printf
(
"__os_arm64x_dispatch_fptr %#x
\n
"
,
(
int
)
data
->
__os_arm64x_dispatch_fptr
);
printf
(
"AuxiliaryIATCopy %#x
\n
"
,
(
int
)
data
->
AuxiliaryIATCopy
);
if
(
data
->
CodeMap
)
{
const
IMAGE_CHPE_RANGE_ENTRY
*
map
=
RVA
(
data
->
CodeMap
,
data
->
CodeMapCount
*
sizeof
(
*
map
)
);
printf
(
"
\n
Code ranges
\n
"
);
for
(
i
=
0
;
i
<
data
->
CodeMapCount
;
i
++
)
{
static
const
char
*
types
[]
=
{
"ARM64"
,
"ARM64EC"
,
"x64"
,
"??"
};
unsigned
int
start
=
map
[
i
].
StartOffset
&
~
0x3
;
unsigned
int
type
=
map
[
i
].
Length
&
0x3
;
printf
(
" %08x - %08x %s
\n
"
,
start
,
start
+
(
int
)
map
[
i
].
Length
,
types
[
type
]
);
}
}
if
(
data
->
CodeRangesToEntryPoints
)
{
unsigned
int
start
;
unsigned
int
end
;
unsigned
int
func
;
}
*
map
=
RVA
(
data
->
code_ranges_to_ep
,
data
->
code_ranges_to_ep_count
*
sizeof
(
*
map
)
);
const
IMAGE_ARM64EC_CODE_RANGE_ENTRY_POINT
*
map
=
RVA
(
data
->
CodeRangesToEntryPoints
,
data
->
CodeRangesToEntryPointsCount
*
sizeof
(
*
map
)
);
printf
(
"
\n
Code ranges to entry points
\n
"
);
printf
(
" Start - End Entry point
\n
"
);
for
(
i
=
0
;
i
<
data
->
code_ranges_to_ep_count
;
i
++
)
printf
(
" %08x - %08x %08x
\n
"
,
map
[
i
].
start
,
map
[
i
].
end
,
map
[
i
].
func
);
}
printf
(
"
\n
Code ranges to entry points
\n
"
);
printf
(
" Start - End Entry point
\n
"
);
for
(
i
=
0
;
i
<
data
->
CodeRangesToEntryPointsCount
;
i
++
)
printf
(
" %08x - %08x %08x
\n
"
,
(
int
)
map
[
i
].
StartRva
,
(
int
)
map
[
i
].
EndRva
,
(
int
)
map
[
i
].
EntryPoint
);
}
if
(
data
->
redir_metadata
)
{
const
struct
if
(
data
->
RedirectionMetadata
)
{
unsigned
int
func
;
unsigned
int
redir
;
}
*
map
=
RVA
(
data
->
redir_metadata
,
data
->
redir_metadata_count
*
sizeof
(
*
map
)
);
const
IMAGE_ARM64EC_REDIRECTION_ENTRY
*
map
=
RVA
(
data
->
RedirectionMetadata
,
data
->
RedirectionMetadataCount
*
sizeof
(
*
map
)
);
printf
(
"
\n
Entry point redirection
\n
"
);
for
(
i
=
0
;
i
<
data
->
redir_metadata_count
;
i
++
)
printf
(
" %08x -> %08x
\n
"
,
map
[
i
].
func
,
map
[
i
].
redir
);
printf
(
"
\n
Entry point redirection
\n
"
);
for
(
i
=
0
;
i
<
data
->
RedirectionMetadataCount
;
i
++
)
printf
(
" %08x -> %08x
\n
"
,
(
int
)
map
[
i
].
Source
,
(
int
)
map
[
i
].
Destination
);
}
break
;
}
}
printf
(
"
\n
"
);
}
static
void
dump_dir_loadconfig
(
void
)
...
...
@@ -1903,52 +1926,52 @@ static void dump_dir_loadconfig(void)
print_word
(
"CSDVersion"
,
loadcfg64
->
CSDVersion
);
print_word
(
"DependentLoadFlags"
,
loadcfg64
->
DependentLoadFlags
);
print_longlong
(
"SecurityCookie"
,
loadcfg64
->
SecurityCookie
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
SEHandlerTable
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
SEHandlerTable
))
goto
done
;
print_longlong
(
"SEHandlerTable"
,
loadcfg64
->
SEHandlerTable
);
print_longlong
(
"SEHandlerCount"
,
loadcfg64
->
SEHandlerCount
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
GuardCFCheckFunctionPointer
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
GuardCFCheckFunctionPointer
))
goto
done
;
print_longlong
(
"GuardCFCheckFunctionPointer"
,
loadcfg64
->
GuardCFCheckFunctionPointer
);
print_longlong
(
"GuardCFDispatchFunctionPointer"
,
loadcfg64
->
GuardCFDispatchFunctionPointer
);
print_longlong
(
"GuardCFFunctionTable"
,
loadcfg64
->
GuardCFFunctionTable
);
print_longlong
(
"GuardCFFunctionCount"
,
loadcfg64
->
GuardCFFunctionCount
);
print_dword
(
"GuardFlags"
,
loadcfg64
->
GuardFlags
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
CodeIntegrity
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
CodeIntegrity
))
goto
done
;
print_word
(
"CodeIntegrity.Flags"
,
loadcfg64
->
CodeIntegrity
.
Flags
);
print_word
(
"CodeIntegrity.Catalog"
,
loadcfg64
->
CodeIntegrity
.
Catalog
);
print_dword
(
"CodeIntegrity.CatalogOffset"
,
loadcfg64
->
CodeIntegrity
.
CatalogOffset
);
print_dword
(
"CodeIntegrity.Reserved"
,
loadcfg64
->
CodeIntegrity
.
Reserved
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
GuardAddressTakenIatEntryTable
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
GuardAddressTakenIatEntryTable
))
goto
done
;
print_longlong
(
"GuardAddressTakenIatEntryTable"
,
loadcfg64
->
GuardAddressTakenIatEntryTable
);
print_longlong
(
"GuardAddressTakenIatEntryCount"
,
loadcfg64
->
GuardAddressTakenIatEntryCount
);
print_longlong
(
"GuardLongJumpTargetTable"
,
loadcfg64
->
GuardLongJumpTargetTable
);
print_longlong
(
"GuardLongJumpTargetCount"
,
loadcfg64
->
GuardLongJumpTargetCount
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
DynamicValueRelocTable
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
DynamicValueRelocTable
))
goto
done
;
print_longlong
(
"DynamicValueRelocTable"
,
loadcfg64
->
DynamicValueRelocTable
);
print_longlong
(
"CHPEMetadataPointer"
,
loadcfg64
->
CHPEMetadataPointer
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
GuardRFFailureRoutine
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
GuardRFFailureRoutine
))
goto
done
;
print_longlong
(
"GuardRFFailureRoutine"
,
loadcfg64
->
GuardRFFailureRoutine
);
print_longlong
(
"GuardRFFailureRoutineFunct
ionPointe
r"
,
loadcfg64
->
GuardRFFailureRoutineFunctionPointer
);
print_longlong
(
"GuardRFFailureRoutineFunc
P
tr"
,
loadcfg64
->
GuardRFFailureRoutineFunctionPointer
);
print_dword
(
"DynamicValueRelocTableOffset"
,
loadcfg64
->
DynamicValueRelocTableOffset
);
print_word
(
"DynamicValueRelocTableSection"
,
loadcfg64
->
DynamicValueRelocTableSection
);
print_word
(
"Reserved2"
,
loadcfg64
->
Reserved2
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
GuardRFVerifyStackPointerFunctionPointer
))
return
;
print_longlong
(
"GuardRFVerifyStackPointerFunct
ionPointe
r"
,
loadcfg64
->
GuardRFVerifyStackPointerFunctionPointer
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
GuardRFVerifyStackPointerFunctionPointer
))
goto
done
;
print_longlong
(
"GuardRFVerifyStackPointerFunc
P
tr"
,
loadcfg64
->
GuardRFVerifyStackPointerFunctionPointer
);
print_dword
(
"HotPatchTableOffset"
,
loadcfg64
->
HotPatchTableOffset
);
print_dword
(
"Reserved3"
,
loadcfg64
->
Reserved3
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
EnclaveConfigurationPointer
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
EnclaveConfigurationPointer
))
goto
done
;
print_longlong
(
"EnclaveConfigurationPointer"
,
loadcfg64
->
EnclaveConfigurationPointer
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
VolatileMetadataPointer
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
VolatileMetadataPointer
))
goto
done
;
print_longlong
(
"VolatileMetadataPointer"
,
loadcfg64
->
VolatileMetadataPointer
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
GuardEHContinuationTable
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
GuardEHContinuationTable
))
goto
done
;
print_longlong
(
"GuardEHContinuationTable"
,
loadcfg64
->
GuardEHContinuationTable
);
print_longlong
(
"GuardEHContinuationCount"
,
loadcfg64
->
GuardEHContinuationCount
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
GuardXFGCheckFunctionPointer
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
GuardXFGCheckFunctionPointer
))
goto
done
;
print_longlong
(
"GuardXFGCheckFunctionPointer"
,
loadcfg64
->
GuardXFGCheckFunctionPointer
);
print_longlong
(
"GuardXFGDispatchFunctionPointer"
,
loadcfg64
->
GuardXFGDispatchFunctionPointer
);
print_longlong
(
"GuardXFGTableDispatchFunct
ionPointe
r"
,
loadcfg64
->
GuardXFGTableDispatchFunctionPointer
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
CastGuardOsDeterminedFailureMode
))
return
;
print_longlong
(
"GuardXFGTableDispatchFunc
P
tr"
,
loadcfg64
->
GuardXFGTableDispatchFunctionPointer
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
CastGuardOsDeterminedFailureMode
))
goto
done
;
print_longlong
(
"CastGuardOsDeterminedFailureMode"
,
loadcfg64
->
CastGuardOsDeterminedFailureMode
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
GuardMemcpyFunctionPointer
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY64
,
GuardMemcpyFunctionPointer
))
goto
done
;
print_longlong
(
"GuardMemcpyFunctionPointer"
,
loadcfg64
->
GuardMemcpyFunctionPointer
);
}
else
...
...
@@ -1962,54 +1985,55 @@ static void dump_dir_loadconfig(void)
print_word
(
"CSDVersion"
,
loadcfg32
->
CSDVersion
);
print_word
(
"DependentLoadFlags"
,
loadcfg32
->
DependentLoadFlags
);
print_dword
(
"SecurityCookie"
,
loadcfg32
->
SecurityCookie
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
SEHandlerTable
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
SEHandlerTable
))
goto
done
;
print_dword
(
"SEHandlerTable"
,
loadcfg32
->
SEHandlerTable
);
print_dword
(
"SEHandlerCount"
,
loadcfg32
->
SEHandlerCount
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
GuardCFCheckFunctionPointer
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
GuardCFCheckFunctionPointer
))
goto
done
;
print_dword
(
"GuardCFCheckFunctionPointer"
,
loadcfg32
->
GuardCFCheckFunctionPointer
);
print_dword
(
"GuardCFDispatchFunctionPointer"
,
loadcfg32
->
GuardCFDispatchFunctionPointer
);
print_dword
(
"GuardCFFunctionTable"
,
loadcfg32
->
GuardCFFunctionTable
);
print_dword
(
"GuardCFFunctionCount"
,
loadcfg32
->
GuardCFFunctionCount
);
print_dword
(
"GuardFlags"
,
loadcfg32
->
GuardFlags
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
CodeIntegrity
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
CodeIntegrity
))
goto
done
;
print_word
(
"CodeIntegrity.Flags"
,
loadcfg32
->
CodeIntegrity
.
Flags
);
print_word
(
"CodeIntegrity.Catalog"
,
loadcfg32
->
CodeIntegrity
.
Catalog
);
print_dword
(
"CodeIntegrity.CatalogOffset"
,
loadcfg32
->
CodeIntegrity
.
CatalogOffset
);
print_dword
(
"CodeIntegrity.Reserved"
,
loadcfg32
->
CodeIntegrity
.
Reserved
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
GuardAddressTakenIatEntryTable
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
GuardAddressTakenIatEntryTable
))
goto
done
;
print_dword
(
"GuardAddressTakenIatEntryTable"
,
loadcfg32
->
GuardAddressTakenIatEntryTable
);
print_dword
(
"GuardAddressTakenIatEntryCount"
,
loadcfg32
->
GuardAddressTakenIatEntryCount
);
print_dword
(
"GuardLongJumpTargetTable"
,
loadcfg32
->
GuardLongJumpTargetTable
);
print_dword
(
"GuardLongJumpTargetCount"
,
loadcfg32
->
GuardLongJumpTargetCount
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
DynamicValueRelocTable
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
DynamicValueRelocTable
))
goto
done
;
print_dword
(
"DynamicValueRelocTable"
,
loadcfg32
->
DynamicValueRelocTable
);
print_dword
(
"CHPEMetadataPointer"
,
loadcfg32
->
CHPEMetadataPointer
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
GuardRFFailureRoutine
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
GuardRFFailureRoutine
))
goto
done
;
print_dword
(
"GuardRFFailureRoutine"
,
loadcfg32
->
GuardRFFailureRoutine
);
print_dword
(
"GuardRFFailureRoutineFunc
tionPointer"
,
loadcfg32
->
GuardRFFailureRoutineFunctionPointer
);
print_dword
(
"GuardRFFailureRoutineFunc
Ptr"
,
loadcfg32
->
GuardRFFailureRoutineFunctionPointer
);
print_dword
(
"DynamicValueRelocTableOffset"
,
loadcfg32
->
DynamicValueRelocTableOffset
);
print_word
(
"DynamicValueRelocTableSection"
,
loadcfg32
->
DynamicValueRelocTableSection
);
print_word
(
"Reserved2"
,
loadcfg32
->
Reserved2
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
GuardRFVerifyStackPointerFunctionPointer
))
return
;
print_dword
(
"GuardRFVerifyStackPointerFunct
ionPointe
r"
,
loadcfg32
->
GuardRFVerifyStackPointerFunctionPointer
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
GuardRFVerifyStackPointerFunctionPointer
))
goto
done
;
print_dword
(
"GuardRFVerifyStackPointerFunc
P
tr"
,
loadcfg32
->
GuardRFVerifyStackPointerFunctionPointer
);
print_dword
(
"HotPatchTableOffset"
,
loadcfg32
->
HotPatchTableOffset
);
print_dword
(
"Reserved3"
,
loadcfg32
->
Reserved3
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
EnclaveConfigurationPointer
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
EnclaveConfigurationPointer
))
goto
done
;
print_dword
(
"EnclaveConfigurationPointer"
,
loadcfg32
->
EnclaveConfigurationPointer
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
VolatileMetadataPointer
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
VolatileMetadataPointer
))
goto
done
;
print_dword
(
"VolatileMetadataPointer"
,
loadcfg32
->
VolatileMetadataPointer
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
GuardEHContinuationTable
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
GuardEHContinuationTable
))
goto
done
;
print_dword
(
"GuardEHContinuationTable"
,
loadcfg32
->
GuardEHContinuationTable
);
print_dword
(
"GuardEHContinuationCount"
,
loadcfg32
->
GuardEHContinuationCount
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
GuardXFGCheckFunctionPointer
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
GuardXFGCheckFunctionPointer
))
goto
done
;
print_dword
(
"GuardXFGCheckFunctionPointer"
,
loadcfg32
->
GuardXFGCheckFunctionPointer
);
print_dword
(
"GuardXFGDispatchFunctionPointer"
,
loadcfg32
->
GuardXFGDispatchFunctionPointer
);
print_dword
(
"GuardXFGTableDispatchFunct
ionPointe
r"
,
loadcfg32
->
GuardXFGTableDispatchFunctionPointer
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
CastGuardOsDeterminedFailureMode
))
return
;
print_dword
(
"GuardXFGTableDispatchFunc
P
tr"
,
loadcfg32
->
GuardXFGTableDispatchFunctionPointer
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
CastGuardOsDeterminedFailureMode
))
goto
done
;
print_dword
(
"CastGuardOsDeterminedFailureMode"
,
loadcfg32
->
CastGuardOsDeterminedFailureMode
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
GuardMemcpyFunctionPointer
))
return
;
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY32
,
GuardMemcpyFunctionPointer
))
goto
done
;
print_dword
(
"GuardMemcpyFunctionPointer"
,
loadcfg32
->
GuardMemcpyFunctionPointer
);
}
done:
printf
(
"
\n
"
);
dump_hybrid_metadata
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment