Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __int64 CBaseServer::SetReservationCookie(CBaseServer *this, __int64 a2, const char *a3, ...)
- {
- __int64 v3; // r14
- CBaseServer *v4; // r13
- const char *v5; // rbx
- __int64 v6; // r12
- __int64 v7; // r14
- signed __int64 v8; // r15
- signed __int64 v9; // rdi
- __int64 v10; // r14
- signed __int64 v11; // r12
- signed __int64 v12; // rdi
- const char *v13; // rdi
- const char *v14; // rbx
- char *v15; // rbx
- int v16; // eax
- __int64 v17; // rdx
- int v18; // eax
- int v19; // er12
- __int64 v20; // rcx
- int v21; // ecx
- __int64 v22; // rax
- int v23; // ecx
- signed __int64 v24; // rcx
- __int64 v25; // rax
- __int64 v26; // rax
- const char *v27; // rdi
- char *v28; // rbx
- int i; // er12
- __int64 v30; // rax
- int v31; // eax
- __int64 v32; // r14
- signed __int64 v33; // r15
- signed __int64 v34; // rdi
- __int64 result; // rax
- __int64 *v36; // [rsp+18h] [rbp-578h]
- unsigned int v37; // [rsp+D4h] [rbp-4BCh]
- __int64 v38; // [rsp+D8h] [rbp-4B8h]
- __int64 v39; // [rsp+E0h] [rbp-4B0h]
- __int64 v40; // [rsp+E8h] [rbp-4A8h]
- __int64 v41; // [rsp+F0h] [rbp-4A0h]
- __int64 v42; // [rsp+F8h] [rbp-498h]
- int v43; // [rsp+100h] [rbp-490h]
- int v44; // [rsp+104h] [rbp-48Ch]
- int v45; // [rsp+108h] [rbp-488h]
- char v46; // [rsp+110h] [rbp-480h]
- char v47; // [rsp+119h] [rbp-477h]
- char v48; // [rsp+220h] [rbp-370h]
- char v49; // [rsp+229h] [rbp-367h]
- char v50; // [rsp+330h] [rbp-260h]
- char v51; // [rsp+339h] [rbp-257h]
- __va_list_tag va[1]; // [rsp+440h] [rbp-150h]
- char v53[16]; // [rsp+460h] [rbp-130h]
- __int128 v54; // [rsp+470h] [rbp-120h]
- __int128 v55; // [rsp+480h] [rbp-110h]
- __int128 v56; // [rsp+490h] [rbp-100h]
- __int128 v57; // [rsp+4A0h] [rbp-F0h]
- __int128 v58; // [rsp+4B0h] [rbp-E0h]
- __int128 v59; // [rsp+4C0h] [rbp-D0h]
- __int128 v60; // [rsp+4D0h] [rbp-C0h]
- __int128 v61; // [rsp+4E0h] [rbp-B0h]
- __int128 v62; // [rsp+4F0h] [rbp-A0h]
- __int128 v63; // [rsp+500h] [rbp-90h]
- __int128 v64; // [rsp+510h] [rbp-80h]
- __int128 v65; // [rsp+520h] [rbp-70h]
- __int128 v66; // [rsp+530h] [rbp-60h]
- __int128 v67; // [rsp+540h] [rbp-50h]
- __int128 v68; // [rsp+550h] [rbp-40h]
- __int64 v69; // [rsp+560h] [rbp-30h]
- v3 = a2;
- v4 = this;
- if ( *((_QWORD *)this + 108) == a2 )
- goto LABEL_58;
- v68 = 0LL;
- v67 = 0LL;
- v66 = 0LL;
- v65 = 0LL;
- v64 = 0LL;
- v63 = 0LL;
- v62 = 0LL;
- v61 = 0LL;
- v60 = 0LL;
- v59 = 0LL;
- v58 = 0LL;
- v57 = 0LL;
- v56 = 0LL;
- v55 = 0LL;
- v54 = 0LL;
- *(_OWORD *)v53 = 0LL;
- va_start(va, a3);
- V_vsnprintf(v53, 256, a3, va);
- v45 = -65281;
- ConColorMsg(&v45, "-> Reservation cookie %llx: reason %s\n", a2, v53);
- if ( !a2 )
- {
- v6 = 0LL;
- ConVar::SetValue((ConVar *)&sv_mmqueue_reservation, "");
- v7 = *((signed int *)this + 212);
- if ( v7 > 0 )
- {
- v8 = 44 * v7 - 40;
- do
- {
- v9 = *((_QWORD *)v4 + 104) + v8;
- *(_DWORD *)(v9 + 28) = 0;
- netadr_s::Clear((netadr_s *)v9);
- *(_QWORD *)(v9 + 20) = 0LL;
- *(_QWORD *)(v9 + 12) = 0LL;
- LODWORD(v7) = v7 - 1;
- v8 -= 44LL;
- }
- while ( (signed int)v7 > 0 );
- }
- *((_DWORD *)v4 + 212) = 0;
- LABEL_57:
- v3 = v6;
- goto LABEL_58;
- }
- if ( byte_A44079 & 0x10 )
- {
- v5 = "FCVAR_NEVER_AS_STRING";
- }
- else
- {
- v5 = "";
- if ( *(_QWORD *)(qword_A44088 + 72) )
- v5 = *(const char **)(qword_A44088 + 72);
- }
- CFmtStrN<256,false>::CFmtStrN(&v50, "Q%llx,", a2);
- if ( !StringAfterPrefix(v5, &v51) )
- {
- if ( byte_A44079 & 0x10 )
- {
- v14 = "FCVAR_NEVER_AS_STRING";
- }
- else
- {
- v14 = "";
- if ( *(_QWORD *)(qword_A44088 + 72) )
- v14 = *(const char **)(qword_A44088 + 72);
- }
- CFmtStrN<256,false>::CFmtStrN(&v48, "G%llx,", a2);
- if ( !StringAfterPrefix(v14, &v49) )
- goto LABEL_59;
- v6 = a2;
- v32 = *((signed int *)this + 212);
- if ( v32 > 0 )
- {
- v33 = 44 * v32 - 40;
- do
- {
- v34 = *((_QWORD *)v4 + 104) + v33;
- *(_DWORD *)(v34 + 28) = 0;
- netadr_s::Clear((netadr_s *)v34);
- *(_QWORD *)(v34 + 20) = 0LL;
- *(_QWORD *)(v34 + 12) = 0LL;
- LODWORD(v32) = v32 - 1;
- v33 -= 44LL;
- }
- while ( (signed int)v32 > 0 );
- }
- *((_DWORD *)v4 + 212) = 0;
- *((_DWORD *)v4 + 222) = 0;
- goto LABEL_57;
- }
- v36 = (__int64 *)((char *)this + 832);
- v10 = *((signed int *)this + 212);
- if ( v10 > 0 )
- {
- v11 = 44 * v10 - 40;
- do
- {
- v12 = *v36 + v11;
- *(_DWORD *)(v12 + 28) = 0;
- netadr_s::Clear((netadr_s *)v12);
- *(_QWORD *)(v12 + 20) = 0LL;
- *(_QWORD *)(v12 + 12) = 0LL;
- LODWORD(v10) = v10 - 1;
- v11 -= 44LL;
- }
- while ( (signed int)v10 > 0 );
- }
- *((_DWORD *)v4 + 212) = 0;
- if ( byte_A44079 & 0x10 )
- {
- v13 = "FCVAR_NEVER_AS_STRING";
- }
- else
- {
- v13 = "";
- if ( *(_QWORD *)(qword_A44088 + 72) )
- v13 = *(const char **)(qword_A44088 + 72);
- }
- v15 = strchr(v13, 91);
- v16 = 0;
- if ( v15 )
- {
- do
- {
- v44 = 0;
- sscanf(v15, "[%x]", &v44);
- if ( v44 )
- {
- netadr_s::SetIP((netadr_s *)((char *)&v38 + 4), 0);
- netadr_s::SetPort((netadr_s *)((char *)&v38 + 4), 0);
- netadr_s::SetType((char *)&v38 + 4, 3LL);
- v42 = 0LL;
- v41 = 0LL;
- v40 = 0LL;
- LODWORD(v38) = v44;
- v43 = 0;
- v18 = *((_DWORD *)v4 + 210);
- v19 = *((_DWORD *)v4 + 212);
- v20 = *((unsigned int *)v4 + 212);
- if ( v19 >= v18 )
- {
- CUtlMemory<CBaseServer::QueueMatchPlayer_t,int>::Grow(v36, (unsigned int)(v19 + 1 - v18), v17, v20);
- LODWORD(v20) = *((_DWORD *)v4 + 212);
- }
- v21 = v20 + 1;
- *((_DWORD *)v4 + 212) = v21;
- v22 = *((_QWORD *)v4 + 104);
- *((_QWORD *)v4 + 107) = v22;
- v23 = v21 - v19 - 1;
- if ( v23 > 0 )
- {
- _V_memmove((void *)(v22 + 44LL * (v19 + 1)), (const void *)(v22 + 44LL * v19), 44 * v23);
- v22 = *v36;
- }
- v24 = v22 + 44LL * v19;
- if ( v24 )
- {
- *(_DWORD *)(v24 + 40) = v43;
- *(_QWORD *)(v24 + 32) = v42;
- *(_QWORD *)(v24 + 24) = v41;
- *(_QWORD *)(v24 + 16) = v40;
- v25 = v38;
- *(_QWORD *)(v24 + 8) = v39;
- *(_QWORD *)v24 = v25;
- }
- LODWORD(v42) = 0;
- netadr_s::Clear((netadr_s *)((char *)&v38 + 4));
- }
- v15 = strchr(v15 + 1, 91);
- }
- while ( v15 );
- v16 = *((_DWORD *)v4 + 212);
- }
- *((_DWORD *)v4 + 222) = v16;
- v3 = a2;
- if ( !`guard variable for'CBaseServer::SetReservationCookie(unsigned long long,char const*,...)::s_pchTournamentServer
- && (unsigned int)__cxa_guard_acquire(&`guard variable for'CBaseServer::SetReservationCookie(unsigned long long,char const*,...)::s_pchTournamentServer) )
- {
- v26 = CommandLine(
- &`guard variable for'CBaseServer::SetReservationCookie(unsigned long long,char const*,...)::s_pchTournamentServer,
- 91LL);
- CBaseServer::SetReservationCookie(unsigned long long,char const*,...)::s_pchTournamentServer = (*(__int64 (__fastcall **)(__int64, const char *, _QWORD))(*(_QWORD *)v26 + 56LL))(
- v26,
- "-tournament",
- 0LL);
- __cxa_guard_release(&`guard variable for'CBaseServer::SetReservationCookie(unsigned long long,char const*,...)::s_pchTournamentServer);
- }
- if ( CBaseServer::SetReservationCookie(unsigned long long,char const*,...)::s_pchTournamentServer )
- {
- if ( byte_A44079 & 0x10 )
- {
- v27 = "FCVAR_NEVER_AS_STRING";
- }
- else
- {
- v27 = "";
- if ( *(_QWORD *)(qword_A44088 + 72) )
- v27 = *(const char **)(qword_A44088 + 72);
- }
- v28 = strchr(v27, 123);
- for ( i = 0; v28; v28 = strchr(v28 + 1, 123) )
- {
- v37 = 0;
- sscanf(v28, "{%x}", &v37);
- i -= (v37 < 1) - 1;
- }
- v3 = a2;
- if ( !`guard variable for'CBaseServer::SetReservationCookie(unsigned long long,char const*,...)::s_nTournamentExtraCastersSlots
- && (unsigned int)__cxa_guard_acquire(&`guard variable for'CBaseServer::SetReservationCookie(unsigned long long,char const*,...)::s_nTournamentExtraCastersSlots) )
- {
- v30 = CommandLine(
- &`guard variable for'CBaseServer::SetReservationCookie(unsigned long long,char const*,...)::s_nTournamentExtraCastersSlots,
- 123LL);
- CBaseServer::SetReservationCookie(unsigned long long,char const*,...)::s_nTournamentExtraCastersSlots = (*(__int64 (__fastcall **)(__int64, const char *, signed __int64))(*(_QWORD *)v30 + 64LL))(v30, "-tournament_extra_casters_slots", 2LL);
- __cxa_guard_release(&`guard variable for'CBaseServer::SetReservationCookie(unsigned long long,char const*,...)::s_nTournamentExtraCastersSlots);
- }
- if ( CBaseServer::SetReservationCookie(unsigned long long,char const*,...)::s_nTournamentExtraCastersSlots <= i )
- i = CBaseServer::SetReservationCookie(unsigned long long,char const*,...)::s_nTournamentExtraCastersSlots;
- v31 = 0;
- if ( i >= 0 )
- v31 = i;
- *((_DWORD *)v4 + 222) += v31;
- }
- LABEL_58:
- while ( 1 )
- {
- *((_QWORD *)v4 + 108) = v3;
- CBaseServer::UpdateGameData(v4);
- ConVar::SetValue((ConVar *)&sv_hosting_lobby, *((_QWORD *)v4 + 108) != 0LL);
- result = __stack_chk_guard;
- if ( __stack_chk_guard == v69 )
- break;
- LABEL_59:
- CFmtStrN<256,false>::CFmtStrN(&v46, "0x%llx", v3);
- ConVar::SetValue((ConVar *)&sv_mmqueue_reservation, &v47);
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement