C++ Function

Results 1 to 1 of 1
  1. #1
    Member gustavobm is offline
    MemberRank
    Oct 2010 Join Date
    58Posts

    happy C++ Function

    Can someone explain this function?

    Code:
    DWORD CallClassFunction(DWORD function,void* this_pointer,DWORD count,...)
    {
    	DWORD result;
    
        _asm
    	{
    	    mov eax,count
            LOOP_START:
    		test eax,eax
    		je LOOP_END
    		mov edx,dword ptr ds:[count+eax*4]
    		push edx
    		sub eax,1
    		jmp LOOP_START
            LOOP_END:
    		xor eax,eax
    		mov ecx,this_pointer
    		call [function]
    		mov result,eax
    	}
    
    	return result;
    }
    Code:
    void gItemSystemFor380_ApplyFor380Option(LPOBJ lpObj)
    {
    	CallClassFunction(0x00404BD8,(void*)0x0C546658,1,lpObj);
    }
    Used to call CItemSystemFor380::ApplyFor380Option.

    What I can't understand are these values:

    DWORD function: Function offset, .pdb file (OK);
    void* this_pointer: ????
    DWORD count: ????




Advertisement