MCPcopy Create free account
hub / github.com/NtQuery/Scylla / patchReferenceInMemory

Method patchReferenceInMemory

Scylla/IATReferenceScan.cpp:295–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295void IATReferenceScan::patchReferenceInMemory( IATReference * ref )
296{
297 DWORD_PTR newIatAddressPointer = ref->targetPointer - IatAddressVA + NewIatAddressRVA;
298
299 DWORD patchBytes = 0;
300
301#ifdef _WIN64
302 patchBytes = (DWORD)(newIatAddressPointer - ref->addressVA - 6);
303#else
304 patchBytes = newIatAddressPointer;
305#endif
306 ProcessAccessHelp::writeMemoryToProcess(ref->addressVA + 2, sizeof(DWORD), &patchBytes);
307}
308
309void IATReferenceScan::patchDirectImportInMemory( IATReference * ref )
310{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected