I am analyzing a disassembled dll and got stuck on the line
mov ebx,fs:[00000004h]
I want to find out the exact physical address of the data that is written into ebx with this instruction. gdb tells me that fs = 0x53.
I already found out that the address depends on the mode (protected or real), and I'm pretty sure the CPU is in protected mode (see *). So the start of segment fs should be stored somewhere in the GDT, right? I also found out the address of the GDT-register (0x009bd5c0007f)
, but gdb doesn't let me access or read the register, so I don't know how to find out the physical address of fs (and, therefore, of fs:[00000004h]
).
Can anybody help me please?
I used the instruction smsw ax
, and after that eax
was 0x280031. So the last bit is 1, which means protected mode. Did I get that right?