What do you want to accomplish? There are maybe other ways to do this more easily.
Anyway, let's see what I can do
The function basicly looks for pending packets it needs to send. In this process are 2 calls involved.
The first is
GetNextOutgoingPacket to get the next packet it needs and
NET_SendPacket to send it.
You can see that this calls
GetNextOutgoingPacket because it's doing:
Code:
ASM:
call dword ptr [eax+98h]
pseudocode:
result = (*(int (__cdecl **)(int, int *, signed int, int *, __int16 *))(*(_DWORD *)v2 + 152))(
v2,
&buf,
16384,
&v7,
&v8); //152 == 0x98
which means call function at vtable index 38. Thanks to OSW we've
this. Count the virtual functions and you'll know that 38 is our match.
You want to change
result,
v6 and
a1.
a1 is CBaseServer,
v6 clearly is the netadr struct and
result is the packet length.
I don't know if this is a really good idea because the function is called alot but you can hook NET_SendPacket and check if the return address ==
ForwardPacketsFromMasterServerUpdater and modify the params if so.