|
102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
|
Go to the source code of this file.
Data Structures | |
| struct | target_filter |
Macros | |
| #define | SIDECAR_JMP_HOOK_TARGET(NAME, SIG, MASK, REQUIRED) |
| #define | SIDECAR_BYTE_PATCH_TARGET(NAME, SIG, MASK, OFFSET, PATCH, ORIGINAL, ORIGINAL_MASK) |
Functions | |
| static bool | assert_targets_for_fixture (size_t fixture_index, const DTTR_TestBinaryFixture *fixture, const char *path, const DTTR_TestPEImage *image, void *userdata) |
| static void | test_targets_matching (E_TargetKind kind) |
| static void | test_expected_pcdogs_jmp_hook_targets_resolve (void **state) |
| static void | test_expected_pcdogs_byte_patch_targets_resolve (void **state) |
| static bool | import_hook_expected (const char *name) |
| static bool | assert_imports_for_fixture (size_t fixture_index, const DTTR_TestBinaryFixture *fixture, const char *path, const DTTR_TestPEImage *image, void *userdata) |
| static void | test_expected_mss32_imports_are_hooked (void **state) |
Variables | |
| static const uint8_t | PATCH_FAST_PATH [] = {0xE9, 0xBA, 0x00, 0x00, 0x00, 0x90} |
| static const uint8_t | PATCH_NOP2 [] = {0x90, 0x90} |
| static const uint8_t | PATCH_FTOL_X [] = {0xD9, 0x1F, 0x90, 0x90, 0x90} |
| static const uint8_t | PATCH_NOP4 [] = {0x90, 0x90, 0x90, 0x90} |
| static const uint8_t | PATCH_FTOL_Y [] = {0xD9, 0x5D, 0x00, 0x90, 0x90} |
| static const uint8_t | PATCH_NOP3 [] = {0x90, 0x90, 0x90} |
| static const uint8_t | PATCH_RET [] = {0xC3} |
| static const uint8_t | ORIGINAL_FAST_PATH [] = {0x0F, 0x85, 0xB9, 0x00, 0x00, 0x00} |
| static const uint8_t | ORIGINAL_BATCH_LIMIT_A [] = {0x7D, 0x39} |
| static const uint8_t | ORIGINAL_BATCH_LIMIT_B [] = {0x7D, 0x59} |
| static const uint8_t | ORIGINAL_FTOL_CALL [] = {0xE8, 0, 0, 0, 0} |
| static const uint8_t | ORIGINAL_MOV_XY [] = {0x89, 0x44, 0x24, 0x30} |
| static const uint8_t | ORIGINAL_FSTP_X [] = {0xD9, 0x1F} |
| static const uint8_t | ORIGINAL_FILD_X [] = {0xDB, 0x44, 0x24, 0x30} |
| static const uint8_t | ORIGINAL_FSTP_Y [] = {0xD9, 0x5D, 0x00} |
| static const uint8_t | ORIGINAL_FILD_Y [] = {0xDB, 0x44, 0x24, 0x34} |
| static const uint8_t | ORIGINAL_PUSH_EBX [] = {0x53} |
| const pcdogs_target_expectation | DTTR_TEST_PCDOGS_SIDECAR_TARGETS [] |
| const size_t | DTTR_TEST_PCDOGS_SIDECAR_TARGET_COUNT |
| const char *const | DTTR_TEST_PCDOGS_SIDECAR_MSS_IMPORT_HOOKS [] |
| const size_t | DTTR_TEST_PCDOGS_SIDECAR_MSS_IMPORT_HOOK_COUNT |
| static const DTTR_TestCase | TEST_CASES [] |
| #define SIDECAR_BYTE_PATCH_TARGET | ( | NAME, | |
| SIG, | |||
| MASK, | |||
| OFFSET, | |||
| PATCH, | |||
| ORIGINAL, | |||
| ORIGINAL_MASK ) |
| #define SIDECAR_JMP_HOOK_TARGET | ( | NAME, | |
| SIG, | |||
| MASK, | |||
| REQUIRED ) |
|
static |
Definition at line 279 of file pcdogs.c.
References dttr_test_case_equal(), DTTR_TEST_PCDOGS_IMPORT_CAP, DTTR_TEST_PCDOGS_SIDECAR_MSS_IMPORT_HOOK_COUNT, import_hook_expected(), and pcdogs_collect_imports().
Referenced by test_expected_mss32_imports_are_hooked().
|
static |
Definition at line 224 of file pcdogs.c.
References dttr_test_assert_target_resolved(), dttr_test_fixture_required(), DTTR_TEST_PCDOGS_SIDECAR_TARGET_COUNT, DTTR_TEST_PCDOGS_SIDECAR_TARGETS, target_filter::kind, and target.
Referenced by test_targets_matching().
|
static |
Definition at line 268 of file pcdogs.c.
References DTTR_TEST_PCDOGS_SIDECAR_MSS_IMPORT_HOOK_COUNT, and DTTR_TEST_PCDOGS_SIDECAR_MSS_IMPORT_HOOKS.
Referenced by assert_imports_for_fixture().
Definition at line 321 of file pcdogs.c.
References assert_imports_for_fixture(), dttr_test_require_available(), NULL, pcdogs_fixtures_available(), pcdogs_for_each_fixture(), and state.
Definition at line 262 of file pcdogs.c.
References dttr_test_require_available(), pcdogs_fixtures_available(), state, TARGET_BYTE_PATCH, and test_targets_matching().
Definition at line 256 of file pcdogs.c.
References dttr_test_require_available(), pcdogs_fixtures_available(), state, TARGET_JMP_HOOK, and test_targets_matching().
|
static |
Definition at line 250 of file pcdogs.c.
References assert_targets_for_fixture(), and pcdogs_for_each_fixture().
Referenced by test_expected_pcdogs_byte_patch_targets_resolve(), and test_expected_pcdogs_jmp_hook_targets_resolve().
| const size_t DTTR_TEST_PCDOGS_SIDECAR_MSS_IMPORT_HOOK_COUNT |
Definition at line 215 of file pcdogs.c.
Referenced by assert_imports_for_fixture(), and import_hook_expected().
| const char* const DTTR_TEST_PCDOGS_SIDECAR_MSS_IMPORT_HOOKS[] |
Definition at line 185 of file pcdogs.c.
Referenced by import_hook_expected().
| const size_t DTTR_TEST_PCDOGS_SIDECAR_TARGET_COUNT |
Definition at line 178 of file pcdogs.c.
Referenced by assert_targets_for_fixture().
| const pcdogs_target_expectation DTTR_TEST_PCDOGS_SIDECAR_TARGETS[] |
Definition at line 49 of file pcdogs.c.
Referenced by assert_targets_for_fixture().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |