so I have this problem of me not understanding how to convert this one function into useable code in C#. Problem being that I am currently hooking into a game via C# and I want to rebuild a function that is very much required on the C# side of my modification, the game is of course written in C++
void __fastcall CachedReader::OutOfBoundsError(CachedReader *this, unsigned __int64 a2, __int64 a3)
{
ulong totalSize = a2 + a3;
if ( totalSize > (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 3) + 48i64))(*((_QWORD *)this + 3)) )
{
//TODO: Error logging here
}
}
Any help converting this is greatly appreciated :)