With
Code:
DWORD tmp = PathernNetwork();
there is a part of memory somewhere that holds 4 byte (some address).
If you now execute
Code:
MOV EAX, DWORD PTR DS : [tmp]
you access that part of the memory and read it. So the content (value) of tmp is put into eax. With
Code:
MOV EAX, DWORD PTR DS : [EAX]
you're dereferencing and read the content located at the address specified by eax (which is the value of tmp). So on this part what you now did translated to C pseudocode is
or
Code:
eax = *(DWORD*)PathernNetwork()
.
Now let's take a look why it works with defines. Defines does not translate to variables, so are not actually located somewhere in the memory. Instead it's like a synonym for the thing defined (addresses in this case). So with
Code:
MOV EAX, DWORD PTR DS : [tmp]
you're not accessing a variable first but directly dereferencing the "target" address. With the second dereferencation with
Code:
MOV EAX, DWORD PTR DS : [EAX]
you'd get something like this in pseudocode:
Code:
eax = **(DWORD**)tmp
(note that tmp is the define now not a variable) or
Code:
eax = **(DWORD**)0x0069630C
.
I guess you see the difference? One dereferencation. That's easy to fix, the solution is trivial and I hope you don't need spoonfeeding after this detailed explanation?

With best regards
Jeoni