Alternative GetCurrentProcessId, ASM Inline [FS:0x20]
'USER32
Private Declare Function CallThunk8 Lib "USER32" Alias "CallWindowProcW" (ByRef cThunk As Currency, Optional ByVal Param1 As Long = 0, Optional ByVal Param2 As Long = 0, Optional ByVal Param3 As Long = 0, Optional ByVal Param4 As Long = 0) As Long
'---------------------------------------------------------------------------------------
' Procedure : FS_GetCurrentProcessId
' Author : Karcrack
' Date : 23/09/2009
' Purpose : GetCurrentProcessId@Kernel32 alternative. Reads info from TIB
'---------------------------------------------------------------------------------------
'
Public Function FS_GetCurrentProcessId() As Long
' mov eax, [FS:0x20]
FS_GetCurrentProcessId = CallThunk8(-801556291178721.2444@)
End Function
Categories: Code
Gracias Karkrack…Muy Bueno ;)
how u generate the opcode?
thanks cobein