I know this has probably been asked a millions times but, I couldn't find this specific problem.
So I am running EnumVisibleObjects, and it injects, runs, even calls my call back but the result it returns is kind of weird. I Get this.
Code:
[INF]:GUID: 2291002c - Filter: 4
[INF]:GUID: 2291002c - Filter: 4
[INF]:GUID: 2291002c - Filter: 4
[INF]:GUID: 2291002c - Filter: 4
[INF]:GUID: 2291002c - Filter: 4
[INF]:GUID: 2291002c - Filter: 4
So from everything I read, it says that this is suppose to return a guid....but it returns this. I look at the Callback function that is used in wow for this, and it looks like an object pointer gets passed as a parameter not a GUID.
Code:
mov eax, s_objMgr
push [ebp+arg_4]
mov eax, [eax+0C4h] ; Next Object
mov esi, [eax+ecx+4]
push ecx
call [ebp+arg_0]
pop ecx
pop ecx
test eax, eax
jz short loc_79C11B
This is a callback function that gets used in Wow, by EnumVisibleObjects
Code:
.text:007AE500 ; Attributes: bp-based frame
.text:007AE500
.text:007AE500 sub_7AE500 proc near ; DATA XREF: sub_7B3F0B+46o
.text:007AE500 ; .text:00966E5Fo ...
.text:007AE500
.text:007AE500 arg_0 = dword ptr 8
.text:007AE500
.text:007AE500 push ebp
.text:007AE501 mov ebp, esp
.text:007AE503 mov ecx, [ebp+arg_0] <-- Is this a pointer?
.text:007AE506 test ecx, ecx
.text:007AE508 jz short loc_7AE51D
.text:007AE50A mov eax, [ecx+4] <-- Or is it a GUID and its only getting 4 bytes?
.text:007AE50D movsx eax, word ptr [eax+10h]
.text:007AE511 shr eax, 4
.text:007AE514 test al, 1
.text:007AE516 jz short loc_7AE51D
.text:007AE518 call sub_80D53F
.text:007AE51D
.text:007AE51D loc_7AE51D: ; CODE XREF: sub_7AE500+8j
.text:007AE51D ; sub_7AE500+16j
.text:007AE51D xor eax, eax
.text:007AE51F inc eax
.text:007AE520 pop ebp
.text:007AE521 retn
.text:007AE521 sub_7AE500 endp
I am totally lost cause I get no errors, but I dont get the results I expect.
Here is my implementation of the function.
Code:
int __cdecl Lists( __int64 guid, int filter ) {
LOG_INF( "GUID: " << std::hex << guid << " - Filter: " << filter << std::endl );
return 0;
}
typedef signed int ( __cdecl *pEnumVisibleObjects )( void *p, u_long a2);
pEnumVisibleObjects oEnumVisibleObjects = (pEnumVisibleObjects)((DWORD)gpXTC->GetOffsetMgr()->GetFullAddress(GOFF_ENUM_VISIBLE_OBJECT));
while( true ) {
oEnumVisibleObjects( &Lists, 4 );
Sleep( 2000 );
}