Consider this code snippet:
I'm trying to find the code that declares the global variable in Ollydbg.
I can't find where it is.
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.Sign up to join this community
The C compiler doesn't create any assembly code to declare and initialize global fundamental data types, so you won't see anything like
MOV ..., 3 in OllyDbg for your program above.
In the disassembly of your program below, you can see that the global variable is stored at
dword_402000, which is hardcoded to begin with a value of