Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- signed int __thiscall dice::hfe::io::NetServer::_update(int this, int *a2)
- {
- int v2; // esi
- bool v3; // zf
- int i; // ebx
- int *v5; // ecx
- int v6; // edi
- int (__stdcall *v7)(char *); // edx
- int v8; // eax
- int v9; // ebp
- int *v10; // ecx
- int v11; // edi
- int (__stdcall *v12)(char *); // eax
- int v13; // eax
- char *v14; // eax
- int v15; // ecx
- int v16; // edx
- char *v17; // eax
- char *v18; // edi
- char *v19; // ST0C_4
- int v20; // eax
- int v21; // eax
- int *v22; // edi
- int v23; // eax
- int *v24; // eax
- int v25; // eax
- int *v26; // ecx
- int *v27; // eax
- int v28; // eax
- signed int result; // eax
- __int64 v30; // [esp+10h] [ebp-54h]
- int *v31; // [esp+18h] [ebp-4Ch]
- int v32; // [esp+1Ch] [ebp-48h]
- __int64 v33; // [esp+20h] [ebp-44h]
- LARGE_INTEGER PerformanceCount; // [esp+28h] [ebp-3Ch]
- __int64 v35; // [esp+30h] [ebp-34h]
- char v36; // [esp+38h] [ebp-2Ch]
- char *v37; // [esp+3Ch] [ebp-28h]
- unsigned int v38; // [esp+50h] [ebp-14h]
- int v39; // [esp+60h] [ebp-4h]
- v2 = this;
- v3 = *(this + 1340) == 0;
- v31 = a2;
- if ( v3 )
- *(this + 1340) = sub_A14780((this + 1264));
- for ( i = (*(**(v2 + 1140) + 12))(*(v2 + 1132), 1472); i > 0; i = (*(**(v2 + 1140) + 12))(*(v2 + 1132), 1472) )
- {
- if ( dice::hfe::io::NetServer::m_outputDebugInfo )
- {
- std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(&v36);
- v5 = *(v2 + 1140);
- v6 = *v5;
- v7 = *(*v5 + 28);
- v39 = 3;
- v8 = v7(&v36);
- (*(v6 + 36))(*(v2 + 1140), v8);
- v39 = -1;
- std::basic_string<char,std::char_traits<char>,std::allocator<char>>::~basic_string<char,std::char_traits<char>,std::allocator<char>>(&v36);
- }
- v9 = dice::hfe::io::PacketFilter::processPacket((v2 + 1396), *(v2 + 1132), i);
- if ( v9 != 1 )
- {
- std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(&v36);
- v10 = *(v2 + 1140);
- v11 = *v10;
- v12 = *(*v10 + 28);
- v39 = 7;
- v13 = v12(&v36);
- (*(v11 + 36))(*(v2 + 1140), v13);
- v14 = v37;
- if ( v38 < 0x10 )
- v14 = &v37;
- dice::hfe::io::PacketFilter::storePacket((v2 + 1396), *(v2 + 1132), i, v9, v14);
- v39 = -1;
- std::basic_string<char,std::char_traits<char>,std::allocator<char>>::~basic_string<char,std::char_traits<char>,std::allocator<char>>(&v36);
- continue;
- }
- v15 = *(v2 + 1132);
- ++*(v2 + 1288);
- dice::hfe::io::BitStream::setBuffer(*(v2 + 1160), v15, i);
- *(*(v2 + 1160) + 56) = 1;
- if ( !dice::hfe::io::readBasicHeader(*(v2 + 1160), &v30 + 5, &v32) )
- goto LABEL_27;
- QueryPerformanceCounter(&PerformanceCount);
- v16 = (PerformanceCount.QuadPart - *(v2 + 1264)) >> 32;
- LODWORD(v35) = PerformanceCount.LowPart - *(v2 + 1264);
- HIDWORD(v35) = v16;
- v33 = (v35 / *(v2 + 1272) * 1000.0);
- *(v2 + 1128) = v33;
- if ( v32 == 9 )
- goto LABEL_27;
- if ( v32 == 1 )
- {
- *(v2 + 1112) = 0;
- dice::hfe::io::NetServer::handleConnectRequest(v2);
- }
- else
- {
- v17 = std::_Rb_tree<int,std::pair<int const,dice::hfe::io::SWConnection *>,std::_Select1st<std::pair<int const,dice::hfe::io::SWConnection *>>,std::less<int>,std::allocator<std::pair<int const,dice::hfe::io::SWConnection *>>>::find(
- v2,
- SBYTE5(v30));
- v18 = v17;
- if ( !v17 )
- goto LABEL_27;
- LODWORD(v33) = *(v2 + 1140);
- v19 = dice::hfe::io::SWConnection::getPeerAddress(v17);
- v20 = (*(*v33 + 28))();
- if ( !sub_A31CA0(v20, v19) )
- goto LABEL_27;
- *(v18 + 30) = *(v2 + 1128);
- if ( v32 == 4 )
- {
- v21 = BYTE5(v30);
- v22 = v31;
- *(v2 + 1112) = 0;
- *v22 = v21;
- if ( !sub_A16090(v2, v21) )
- dice::hfe::io::NetServer::storeConnectionEvent(v2, *v22, 1);
- continue;
- }
- v23 = *(v18 + 39);
- if ( v23 != 1 )
- {
- if ( v23 == 2 )
- {
- switch ( v32 )
- {
- case 5:
- v25 = BYTE5(v30);
- v26 = v31;
- *(v2 + 1112) = 0;
- *v26 = v25;
- dice::hfe::io::NetServer::handleDisconnect(v2, v25);
- break;
- case 7:
- v27 = v31;
- *v31 = BYTE5(v30);
- *(v2 + 1112) = 0;
- dice::hfe::io::NetServer::handlePingRequest(v2, *v27);
- break;
- case 8:
- v28 = BYTE5(v30);
- *v31 = BYTE5(v30);
- dice::hfe::io::NetServer::handlePingResponse(v2, v28);
- break;
- case 15:
- v24 = v31;
- *v31 = BYTE5(v30);
- *(v2 + 1112) = i;
- dice::hfe::io::NetServer::handleDataPacket(v2, *v24, i);
- break;
- default:
- goto LABEL_27;
- }
- continue;
- }
- LABEL_27:
- *(v2 + 1112) = 0;
- continue;
- }
- *(v18 + 39) = 1;
- *(v18 + 30) = gettimeofday((v2 + 1264));
- dice::hfe::io::NetServer::sendConnectAccept(v2, BYTE5(v30));
- }
- }
- result = 8;
- *(v2 + 1112) = 0;
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement