Hi !
The function that you are analyzing is probably a thiscall function:
Code:
.text:00771850 sub_771850 proc near ; CODE XREF: sub_771D70+66p
.text:00771850
.text:00771850 var_28 = dword ptr -28h
.text:00771850 var_24 = dword ptr -24h
.text:00771850 var_20 = dword ptr -20h
.text:00771850 var_1C = dword ptr -1Ch
.text:00771850 var_18 = dword ptr -18h
.text:00771850 var_14 = dword ptr -14h
.text:00771850 var_10 = byte ptr -10h
.text:00771850
.text:00771850 push ebp
.text:00771851 mov ebp, esp
.text:00771853 and esp, 0FFFFFFF0h
.text:00771856 sub esp, 34h
.text:00771859 push ebx
.text:0077185A mov ebx, ecx ; ebx = ecx = this* pointer
.text:0077185C mov eax, [ebx+48h] ; eax = object member
If you want to find who (where was) created the class instance (lying in the ecx register on function entry), you might need to check on callers of this function.
BP on the function at 0x00771850 and check caller on the stack. You'll need to track down where the ecx register comes from.
Usually, object instances are allocated on the heap (use the 'new' C++ keyword) so you'll probably find a function which ultimately calls HeapAlloc() and set the ecx register with the result returned by this API. (if the object is on the stack, it is probably not very far from this function).
It might gets complicated on big programs where an object can be allocated long before (in terms of assembly lines executed) its real use, or when backtracking where the ecx register comes from gets messy.
In this case I tend to go with Windbg to find where the object (the pointer in ecx register) was allocated.
Windbg + gflags: start gflags -> "Image File" tab -> enter the name of the application in the edit box -> press 'Tab'. check "Enable Heap Tagging" + "Enable Heap Tagging by DLL" (not necessarily needed, but that doesn't do any harm).
The important thing is to check "Create User mode stack trace database" and then "Enable stack backtrace". Enter an appropriate value (I usually use "64"

. Press "apply" then "ok".
Start your app under windbg (or attach) and then BP at 0x00771850, then:
You should get a stack backtrace of where the object was allocated (that is, when the 'new' was done).
If you want to track the member at offset +0x48, do the same as above and then put a HBP at offset 0x48:
It should break when the member is set. From there you might need to track where this member was allocated once again...
Tracking object instantiation has never been so easy when you know the trick. It's damn cool for "use after free" errors and other bugs that are quite tricky.
Hope it helps.