MCPcopy Create free account
hub / github.com/AlSch092/UltimateAntiCheat / GetBytesAtAddress

Method GetBytesAtAddress

Process/Process.cpp:381–396  ·  view source on GitHub ↗

GetBytesAtAddress - return bytes from an address given `size`. returns a BYTE array filled with values from `address` for `size` number of bytes */

Source from the content-addressed store, hash-verified

379 returns a BYTE array filled with values from `address` for `size` number of bytes
380*/
381BYTE* Process::GetBytesAtAddress(__in const uintptr_t address, __in const UINT size) //remember to free bytes if not NULL ret
382{
383 BYTE* memBytes = new BYTE[size];
384
385 __try
386 {
387 memcpy((void*)memBytes, (void*)address, size);
388 return memBytes;
389 }
390 __except (EXCEPTION_EXECUTE_HANDLER)
391 {
392 delete[] memBytes;
393 memBytes = nullptr;
394 return NULL;
395 }
396}
397
398/*
399 GetIATEntries -Returns a list of ImportFunction* from the program IAT , for later hook checks

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected