能力值:
( LV4,RANK:50 )
|
-
-
2 楼
#ifdef _WIN64 ULONG NTAPI Wx86GetImageHandle( __in PSTR ImageName ) { NTSTATUS Status = STATUS_SUCCESS; PWOW64_PROCESS Wow64Process = NULL; PPEB32 Peb = NULL; PPEB_LDR_DATA32 Ldr = NULL; PLDR_DATA_TABLE_ENTRY32 LdrDataTableEntry = NULL; PLDR_DATA_TABLE_ENTRY32 FoundDataTableEntry = NULL; ANSI_STRING AnsiImageFileName = { 0 }; UNICODE_STRING ImageFileName = { 0 }; UNICODE_STRING Wx86ImageFileName = { 0 }; ULONG ImageBase = 0;
Wow64Process = PsGetCurrentProcessWow64Process();
if (NULL != Wow64Process) { Peb = (PPEB32)&Wow64Process->Wow64;
Ldr = ULongToPtr(Peb->Ldr);
if (NULL != Ldr) { LdrDataTableEntry = CONTAINING_RECORD( &Ldr->InLoadOrderModuleList, LDR_DATA_TABLE_ENTRY32, InLoadOrderLinks);
FoundDataTableEntry = CONTAINING_RECORD( ULongToPtr(LdrDataTableEntry->InLoadOrderLinks.Flink), LDR_DATA_TABLE_ENTRY32, InLoadOrderLinks);
if (NULL == ImageName) { FoundDataTableEntry = ULongToPtr(Ldr->EntryInProgress); ImageBase = FoundDataTableEntry->DllBase; Status = STATUS_SUCCESS; goto exit; } else { RtlInitAnsiString( &AnsiImageFileName, ImageName);
Status = RtlAnsiStringToUnicodeString( &ImageFileName, &AnsiImageFileName, TRUE);
if (NT_SUCCESS(Status)) { while (FoundDataTableEntry != LdrDataTableEntry) { Wx86ImageFileName.Buffer = ULongToPtr(FoundDataTableEntry->BaseDllName.Buffer); Wx86ImageFileName.Length = FoundDataTableEntry->BaseDllName.Length; Wx86ImageFileName.MaximumLength = FoundDataTableEntry->BaseDllName.MaximumLength;
if (FALSE != RtlEqualUnicodeString( &ImageFileName, &Wx86ImageFileName, TRUE)) { ImageBase = FoundDataTableEntry->DllBase; Status = STATUS_SUCCESS; goto exit; }
FoundDataTableEntry = CONTAINING_RECORD( ULongToPtr(FoundDataTableEntry->InLoadOrderLinks.Flink), LDR_DATA_TABLE_ENTRY32, InLoadOrderLinks); }
RtlFreeUnicodeString(&ImageFileName); } } } }
exit: return ImageBase; } #endif // _WIN64
|
能力值:
( LV4,RANK:50 )
|
-
-
3 楼
顺便说一句 结构体定义在WRK wow64t.h
|
能力值:
( LV2,RANK:10 )
|
-
-
4 楼
小艾
顺便说一句 结构体定义在WRK wow64t.h
懂了 谢谢老哥我去试试
最后于 2018-6-18 08:38
被雪碧丶编辑
,原因: 自己傻逼,眼瞎看错字
|
能力值:
( LV2,RANK:10 )
|
-
-
5 楼
不行联系我。。成品32 64都行。。1907616825
|
能力值:
(RANK:15 )
|
-
-
6 楼
辣是真滴牛批
|
能力值:
( LV2,RANK:10 )
|
-
-
7 楼
mark peb32
|
能力值:
(RANK:10 )
|
-
-
8 楼
50少了点吧
|
|
|