void PatchResourceDataEntry (ByteBuffer resources) { var old_rsrc = GetImageResourceSection (); var rva = resources.ReadUInt32 (); resources.position -= 4; resources.WriteUInt32 (rva - old_rsrc.VirtualAddress + rsrc.VirtualAddress); } }