能力值:
( LV13,RANK:1370 )
|
-
-
2 楼
有几种方法吧:
1、
invoke OpenProcess , PROCESS_ALL_ACCESS , TRUE , Pid
mov hProcess,eax
invoke GetModuleInformation,hProcess,ModuleHwnd,addr ModuleInformation,size MODULEINFO
其中:
MODULEINFO struct
lpBaseOfDll dword 0 ;模块的地址
SizeOfImage dword 0 ;大小
EntryPoint dword 0 ;入口
MODULEINFO ends
2、
GetModulePreferredBaseAddr proc dwProcessID:DWORD,pvModuleRemote:PVOID
local pvModulePreferredBaseAddr:PVOID
LOCAL idh:IMAGE_DOS_HEADER
LOCAL inth:IMAGE_NT_HEADERS
invoke Toolhelp32ReadProcessMemory,dwProcessID,pvModuleRemote,addr idh,sizeof idh ,NULL
.if idh.e_magic==IMAGE_DOS_SIGNATURE
invoke Toolhelp32ReadProcessMemory,dwProcessID,pvModuleRemote+idh.e_lfanew,addr inth,sizeof inth,NULL
.if inth.Signature==IMAGE_NT_SIGNATURE
mov eax,inth.OptionalHeader.ImageBase
mov pvModulePreferredBaseAddr,eax
.endif
.endif
mov eax,pvModulePreferredBaseAddr
GetModulePreferredBaseAddr endp
3、
invoke OpenProcess , PROCESS_ALL_ACCESS , TRUE , Pid
mov hProcess,eax
invoke VirtualQueryEx,hProcess,400000h,addr meminfo,sizeof meminfo
mov eax,meminfo.BaseAddress
mov BaseAddr,eax
|