Reputation: 1675
When I analyzed a binary with IDA, I saw the following function:
Function::Function(void *, unsigned int, void *, unsigned int)
So, as you can see, IDA displays that we have 4 arguments. But below that, in the summary view, IDA shows that we have 5 arguments. In the following you can see the summary view of IDA where usually the arguments and local variables are shown (in that case we have no local var.):
arg_0 = dword ptr 8
arg_4 = dword ptr 0Ch
arg_8 = dword ptr 10h
arg_C = dword ptr 14h
arg_10 = dword ptr 18h
So, I am asking: Why is that happen? Is that a mistake of IDA? Or, is arg_10 a global variable rather than a argument passed to that function?
My assumption is that IDA can not resolve the type of the 5th argument, so it leaves it out in the function declaration.
Upvotes: 3
Views: 6606
Reputation: 2503
When calling methods of an object, a pointer to the object is implicitly passed as a parameter to the function. (This is what the this
keyword represents)
It is very likely that arg_0
is the this
pointer.
Upvotes: 4