Add code patching so it's easy to update blobs in the future

Migrate EncodeBlobs.py to lib folder - might add a build step later
Removed some stale logic
This commit is contained in:
Nick Landers
2019-07-22 14:29:32 -06:00
parent 1a0fc5050e
commit d69a262a71
7 changed files with 132 additions and 66 deletions
+1 -12
View File
@@ -333,18 +333,7 @@ ULONG_PTR ExecutePayload(ULONG_PTR uiLibraryAddress, DWORD dwFunctionHash, LPVOI
// copy the section over
uiValueD = ((PIMAGE_SECTION_HEADER)uiValueA)->SizeOfRawData;
if (uiValueD == 0) {
/// Currently will cause memset to get linked
//// If the seciton is empty, fill in a zeroed block of X (section alignment) size
//uiValueD = ((PIMAGE_NT_HEADERS)uiHeaderValue)->OptionalHeader.SectionAlignment;
//while (uiValueD--)
// // Silly trick to avoid the optimized link to memset.
// *(BYTE *)uiValueB++ = 0x00;
}
else {
if (uiValueD != 0) {
while (uiValueD--)
*(BYTE *)uiValueB++ = *(BYTE *)uiValueC++;
}