Created
June 1, 2017 16:03
-
-
Save invokr/f5b5f9dc518674e066d201af48b18999 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void __fastcall CConnectGameClient::CheckForResend(CConnectGameClient *this, char a2, double a3) | |
{ | |
signed int v3; // ecx@6 | |
__int64 v4; // r14@8 | |
signed __int64 v5; // rbx@8 | |
int v6; // er15@9 | |
int v7; // eax@9 | |
__int64 v8; // rcx@9 | |
__int64 v9; // rdx@11 | |
__int64 v10; // rdx@17 | |
netadr_t *v11; // [sp+8h] [bp-F8h]@8 | |
char v12; // [sp+10h] [bp-F0h]@19 | |
char v13; // [sp+50h] [bp-B0h]@8 | |
__int64 v14; // [sp+D0h] [bp-30h]@1 | |
v14 = *__stack_chk_guard_ptr[0]; | |
if ( *((_DWORD *)this + 21) == 1 ) | |
{ | |
(*(void (**)(void))(*g_pNetworkSystem + 392LL))(); | |
if ( a2 || (a3 = a3 - *((double *)this + 12), *(float *)(qword_5E5048 + 84) <= a3) ) | |
{ | |
if ( *((_DWORD *)this + 28) > 0 ) | |
{ | |
if ( *((_DWORD *)this + 26) >= *((_DWORD *)this + 27) ) | |
{ | |
if ( (unsigned __int8)LoggingSystem_IsChannelEnabled((unsigned int)LOG_CLIENT, 2LL) ) | |
LoggingSystem_Log( | |
(unsigned int)LOG_CLIENT, | |
2LL, | |
"CL: Connection failed after %i retries.\n", | |
*((_DWORD *)this + 27)); | |
*((_DWORD *)this + 21) = 0; | |
} | |
else | |
{ | |
(*(void (**)(void))(*g_pNetworkSystem + 392LL))(); | |
*((double *)this + 12) = a3; | |
v3 = *(_DWORD *)(qword_5E5158 + 88); | |
if ( !v3 ) | |
v3 = 1; | |
v4 = *((_QWORD *)this + 15); | |
v5 = 32LL * (*((_DWORD *)this + 26) / v3 % *((_DWORD *)this + 28)); | |
v11 = (netadr_t *)(v4 + v5); | |
V_snprintf(&v13, -128, "%cconnect0x%08X", 113LL, *((_DWORD *)this + 39)); | |
if ( (unsigned __int8)LoggingSystem_IsChannelEnabled((unsigned int)LOG_CLIENT, 1LL) ) | |
{ | |
v6 = LOG_CLIENT; | |
v7 = *(_DWORD *)(v4 + v5 + 28); | |
v8 = (unsigned int)(v7 - 2); | |
if ( (unsigned int)v8 >= 2 ) | |
{ | |
if ( v7 == 1 ) | |
{ | |
if ( *(_DWORD *)(v4 + v5 + 24) ) | |
v10 = (__int64)""; | |
else | |
v10 = CSteamID::Render((CSteamID *)(v4 + v5 + 12)); | |
V_sprintf_safe<64ul>(&v12, "%s:%d", v10, *(_DWORD *)(v4 + v5 + 20)); | |
} | |
else if ( v7 ) | |
{ | |
v12 = 0; | |
} | |
else | |
{ | |
netadr_t::ToString(v11, &v12, 0x40u, 0); | |
} | |
} | |
else | |
{ | |
if ( *(_DWORD *)(v4 + v5 + 24) ) | |
v9 = (__int64)""; | |
else | |
v9 = CSteamID::Render((CSteamID *)(v4 + v5 + 12)); | |
V_sprintf_safe<64ul>(&v12, "=%s", v9, v8); | |
} | |
LoggingSystem_Log((unsigned int)v6, 1LL, "CL: Sending connect to %s\n", &v12); | |
} | |
(*(void (__fastcall **)(_QWORD *, _QWORD, netadr_t *, _QWORD, char *))(*g_pNetworkSystem + 360LL))( | |
g_pNetworkSystem, | |
*((_DWORD *)this + 8), | |
v11, | |
"%s", | |
&v13); | |
++*((_DWORD *)this + 26); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment