|
102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
|
Go to the source code of this file.
| DTTR_Result DTTR_PCDOGS_DataResolve | ( | const DTTR_Core_Context * | ctx, |
| DTTR_PCDOGS_T_Data_ID | id, | ||
| uintptr_t * | out_addr ) |
Definition at line 101 of file pcdogs_symbols.c.
References ctx, dttr_core_result(), DTTR_ERR_INVALID_ARGUMENT, DTTR_PCDOGS_DataSymbolID(), and DTTR_PCDOGS_SymbolDataResolve().
Referenced by DTTR_PCDOGS_Hook_DataPointer(), and DTTR_PCDOGS_PatchGroup_HookDataPointer().
| DTTR_Result DTTR_PCDOGS_FunctionResolve | ( | const DTTR_Core_Context * | ctx, |
| DTTR_PCDOGS_T_Function_ID | id, | ||
| uintptr_t * | out_addr ) |
Definition at line 69 of file pcdogs_symbols.c.
References ctx, dttr_core_result(), DTTR_ERR_INVALID_ARGUMENT, DTTR_PCDOGS_FunctionSymbolID(), and DTTR_PCDOGS_SymbolFunctionResolve().
Referenced by resolve_toc().
| DTTR_Result DTTR_PCDOGS_Hook_DataPointer | ( | const DTTR_Core_Context * | ctx, |
| DTTR_PCDOGS_T_Data_ID | id, | ||
| void * | new_value, | ||
| void ** | out_original, | ||
| DTTR_Core_Hook ** | out_hook ) |
Definition at line 117 of file pcdogs_symbols.c.
References ctx, DTTR_Core_HookPointer(), dttr_core_result(), DTTR_ERR_INVALID_ARGUMENT, DTTR_PCDOGS_DataResolve(), DTTR_ResultOK(), and NULL.
| DTTR_Result DTTR_PCDOGS_PatchGroup_HookDataPointer | ( | DTTR_Core_PatchGroup * | group, |
| DTTR_PCDOGS_T_Data_ID | id, | ||
| void * | new_value, | ||
| void ** | out_original ) |
Definition at line 199 of file pcdogs_symbols.c.
References ctx, dttr_core_patch_group_context(), DTTR_Core_PatchGroupHookPointer(), dttr_core_result(), DTTR_ERR_INVALID_ARGUMENT, DTTR_PCDOGS_DataResolve(), DTTR_ResultOK(), and NULL.
Referenced by patch_spec_install().
| DTTR_Result DTTR_PCDOGS_PatchGroup_HookFunction | ( | DTTR_Core_PatchGroup * | group, |
| DTTR_PCDOGS_T_Function_ID | id, | ||
| void * | detour, | ||
| void ** | out_original ) |
Definition at line 182 of file pcdogs_symbols.c.
References dttr_core_result(), DTTR_ERR_INVALID_ARGUMENT, DTTR_PCDOGS_FunctionSymbolID(), and patch_group_hook_symbol_function().
Referenced by patch_spec_install().
| DTTR_Result DTTR_PCDOGS_PatchGroup_Install | ( | const DTTR_Core_Context * | ctx, |
| const DTTR_PCDOGS_T_Patch_Spec * | specs, | ||
| size_t | spec_count, | ||
| DTTR_Core_PatchGroup ** | out_group, | ||
| DTTR_PCDOGS_T_Patch_Report * | out_report ) |
Definition at line 325 of file pcdogs_symbols.c.
References DTTR_PCDOGS_T_Patch_Report::attempted, cleanup(), ctx, DTTR_Core_PatchGroupCreate(), DTTR_Core_PatchGroupRelease(), dttr_core_result(), DTTR_ERR_ALREADY_INSTALLED, DTTR_ERR_INVALID_ARGUMENT, DTTR_ERR_NOT_FOUND, DTTR_ERR_UNSUPPORTED, DTTR_OK, DTTR_ResultOK(), DTTR_PCDOGS_T_Patch_Report::installed, NULL, patch_report_fail(), patch_report_init(), patch_spec_install(), DTTR_PCDOGS_T_Patch_Report::skipped_optional, and DTTR_Result::status.
Referenced by dttr_sidecar_install_pcdogs_patch_group().
| DTTR_Result DTTR_PCDOGS_SymbolDataResolve | ( | const DTTR_Core_Context * | ctx, |
| DTTR_PCDOGS_T_Symbol_Data_ID | id, | ||
| uintptr_t * | out_addr ) |
Definition at line 85 of file pcdogs_symbols.c.
References ctx, DTTR_PCDOGS_SYMBOL_DATA_COUNT, global_address_at(), and resolve_symbol().
Referenced by DTTR_PCDOGS_DataResolve().
| DTTR_Result DTTR_PCDOGS_SymbolFunctionResolve | ( | const DTTR_Core_Context * | ctx, |
| DTTR_PCDOGS_T_Symbol_Function_ID | id, | ||
| uintptr_t * | out_addr ) |
Definition at line 53 of file pcdogs_symbols.c.
References ctx, DTTR_PCDOGS_SYMBOL_FUNCTION_COUNT, function_address_at(), and resolve_symbol().
Referenced by DTTR_PCDOGS_FunctionResolve(), and patch_group_hook_symbol_function().
|
static |
Definition at line 19 of file pcdogs_symbols.c.
References DTTR_PCDOGS_T_Symbol_Function::address, and DTTR_PCDOGS_SymbolFunctionAt().
Referenced by DTTR_PCDOGS_SymbolFunctionResolve().
|
static |
Definition at line 24 of file pcdogs_symbols.c.
References DTTR_PCDOGS_T_Symbol_Data::address, and DTTR_PCDOGS_SymbolDataAt().
Referenced by DTTR_PCDOGS_SymbolDataResolve().
|
static |
Definition at line 144 of file pcdogs_symbols.c.
References DTTR_PCDOGS_T_Symbol_Function::callable, ctx, dttr_core_patch_group_context(), DTTR_Core_PatchGroupHookFunction(), dttr_core_result(), DTTR_ERR_INVALID_ARGUMENT, DTTR_ERR_UNSUPPORTED, DTTR_PCDOGS_HOOK_REL32, DTTR_PCDOGS_SymbolFunctionAt(), DTTR_PCDOGS_SymbolFunctionResolve(), DTTR_ResultOK(), DTTR_PCDOGS_T_Symbol_Function::hook_kind, NULL, and DTTR_PCDOGS_T_Symbol_Function::patch_size.
Referenced by DTTR_PCDOGS_PatchGroup_HookFunction().
|
static |
Definition at line 11 of file pcdogs_symbols.c.
References dttr_core_report_fail().
Referenced by DTTR_PCDOGS_PatchGroup_Install().
|
static |
Definition at line 7 of file pcdogs_symbols.c.
References dttr_core_report_init().
Referenced by DTTR_PCDOGS_PatchGroup_Install().
|
static |
Definition at line 268 of file pcdogs_symbols.c.
References DTTR_PCDOGS_T_Patch_Spec::detour, DTTR_Core_PatchGroupInstallTargets(), dttr_core_result(), DTTR_ERR_NOT_FOUND, DTTR_ERR_UNSUPPORTED, DTTR_OK, DTTR_PCDOGS_PATCH_ADDRESS_BYTES, DTTR_PCDOGS_PATCH_AOB_BYTES, DTTR_PCDOGS_PATCH_AOB_REL32_JMP, DTTR_PCDOGS_PATCH_DATA_POINTER_HOOK, DTTR_PCDOGS_PATCH_FUNCTION_HOOK, DTTR_PCDOGS_PATCH_TARGET, DTTR_PCDOGS_PATCH_UNSUPPORTED, DTTR_PCDOGS_PatchGroup_HookDataPointer(), DTTR_PCDOGS_PatchGroup_HookFunction(), DTTR_ResultOK(), DTTR_PCDOGS_T_Patch_Spec::function, DTTR_PCDOGS_T_Patch_Spec::global, DTTR_PCDOGS_T_Patch_Spec::kind, DTTR_PCDOGS_T_Patch_Spec::new_value, DTTR_PCDOGS_T_Patch_Spec::out_original, patch_spec_target(), DTTR_Core_TargetReport::skipped_optional, and target.
Referenced by DTTR_PCDOGS_PatchGroup_Install().
|
static |
Definition at line 222 of file pcdogs_symbols.c.
References DTTR_PCDOGS_T_Patch_Spec::address, DTTR_PCDOGS_T_Patch_Spec::aob, DTTR_PCDOGS_T_Patch_Spec::detour, dttr_core_result(), DTTR_ERR_INVALID_ARGUMENT, DTTR_ERR_UNSUPPORTED, DTTR_OK, DTTR_PCDOGS_PATCH_ADDRESS_BYTES, DTTR_PCDOGS_PATCH_AOB_BYTES, DTTR_PCDOGS_PATCH_AOB_REL32_JMP, DTTR_PCDOGS_PATCH_TARGET, DTTR_TARGET_ADDRESS_PATCH, DTTR_TARGET_AOB_PATCH, DTTR_TARGET_AOB_REL32_JMP, DTTR_PCDOGS_T_Patch_Spec::kind, DTTR_PCDOGS_T_Patch_Spec::offset, DTTR_PCDOGS_T_Patch_Spec::patch_bytes, DTTR_PCDOGS_T_Patch_Spec::patch_size, DTTR_PCDOGS_T_Patch_Spec::required, DTTR_PCDOGS_T_Patch_Spec::target, and target.
Referenced by patch_spec_install().
|
static |
Definition at line 29 of file pcdogs_symbols.c.
References count, ctx, dttr_core_result(), DTTR_ERR_INVALID_ARGUMENT, DTTR_ERR_NOT_FOUND, DTTR_OK, and DTTR_PCDOGS_ResolveAll().
Referenced by DTTR_PCDOGS_SymbolDataResolve(), and DTTR_PCDOGS_SymbolFunctionResolve().