V
V
vari0us2016-08-30 18:56:48
C++ / C#
vari0us, 2016-08-30 18:56:48

How to change the value in the file at the address?

Greetings.
I need to patch *.exe or *.dll files with a value of a certain type, for example, a float number 100.050 or 10 bytes "FFAB10CD00" at certain addresses like 0x00590a
Addresses and data, including their types, can be anything, they will always be known in advance, search you don’t need anything, you need to stupidly patch a value of a known type and size to a known address, but for some reason I didn’t find how to do it in a simple way, without crap
I hoped that there would be a function like Write( file, addres, value )
But Google didn’t help me

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GavriKos, 2016-08-30
@GavriKos

Read the entire file into a variable, patch into a variable, write the entire variable into a file.

V
Vladimir Martyanov, 2016-08-30
@vilgeforce

CreateFile, SetFilePointer, WriteFile, CloseFile. All.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question