i want to do an inline asm and i want to see if a given location of memory is non-writable-executable code or its writable data; if its data, skip the overwrite.
i want to do it in pure asm + win api.
i partially achieved it by checking if I'm in code section or not. but it seems even there, there are some locations that are meant to be used as data and fiddling with them will cause access violation.
i want to do it in a more advanced, flawless, way.
thanks in advance.
What I have tried:
trying base-offset to detect sections of the target exe file