Method | Description | |
---|---|---|
DeLocateBuff32 ( byte bytes, uint Delta, uint RVA, |
||
DeLocateBuff64 ( byte bytes, ulong Delta, ulong RVA, |
I ported this from a C function and will likely write it in safe/C# eventually ;) Most of my code is rewrites of earlier native stuff I've done since it's nice to have a sandbox to play in.
|
|
DeLocateFile ( string fPath, string RelocFile, ulong CurrBase, string SaveTo, bool is64 = false, bool FixHeader = false, bool ScaleFileAlignment = false ) : Task |
||
DelocateHeader ( byte bytes, ulong OrigBase, long OrigBaseOffset, bool Is64 ) : void | ||
ProcessRelocs ( byte FileBuff ) : List |
This routine takes a binary .reloc and emit's List of type Reloc There are theoretically some .reloc entries we do not support, I've not seen too many for recent binaries. If we wanted to support more, adding more translations here would be fine.
|
public DeLocateBuff32 ( byte bytes, uint Delta, uint RVA, |
||
bytes | byte | |
Delta | uint | |
RVA | uint | |
relocs | ||
return | void |
public DeLocateBuff64 ( byte bytes, ulong Delta, ulong RVA, |
||
bytes | byte | buffer to delocate |
Delta | ulong | Delta between preferred image base and where your loaded now |
RVA | ulong | Relative Virtual Address of the byte* buffer |
relocs | preprocessed .reloc data | |
return | void |
public DeLocateFile ( string fPath, string RelocFile, ulong CurrBase, string SaveTo, bool is64 = false, bool FixHeader = false, bool ScaleFileAlignment = false ) : Task |
||
fPath | string | |
RelocFile | string | |
CurrBase | ulong | |
SaveTo | string | |
is64 | bool | |
FixHeader | bool | |
ScaleFileAlignment | bool | |
return | Task |
public static DelocateHeader ( byte bytes, ulong OrigBase, long OrigBaseOffset, bool Is64 ) : void | ||
bytes | byte | |
OrigBase | ulong | |
OrigBaseOffset | long | |
Is64 | bool | |
return | void |
public static ProcessRelocs ( byte FileBuff ) : List |
||
FileBuff | byte | |
return | List |