the "getthreadselectorentry" code below doesn't work to give me data about the con\eip address... anybody know anything about this stuff?
Code: Select all
global con.context
hThreadh = CallFunction(libkernel32,"OpenThread", #PROCESS_ALL_ACCESS_VISTA_WIN7, 0,de\DWthreadid)
con\ContextFlags = #CONTEXT_CONTROL
res=GetThreadContext_(hthreadh,@con)
PUSH eax
MOV eax,con\eflags
OR eax,$100
MOV con\eflags,eax
POP eax
eap=de\u\exception\exceptionrecord\exceptionaddress
Global selentry.LDT_ENTRY;
Global dwDsBase.l;
; /* try and calculate the address of EIP so i have the (I think it is called) process's virtual address of EIP */
GetThreadSelectorEntry_(hThreadh, Con\eip, @SelEntry);
;MessageRequester("basehi",Str(con\eip))
dwDsBase = (SelEntry\HighWord\Bytes\BaseHi << 24) | (SelEntry\HighWord\Bytes\BaseMid << 16) | SelEntry\BaseLow