Function at 0x500e70
Capabilities:
Check for time delay via gettickcount
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c1dd0
mov eax, dword fs:[0]
push eax
sub esp, 0x168
mov eax, dword [0x68cc00]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov ebx, dword [ebp + 0x14]
lea ecx, [ebp - 0x48]
mov edi, dword [ebp + 0x10]
xorps xmm0, xmm0
push str.terminateConnection
push ebx
movq qword [ebp - 0x48], xmm0
mov dword [ebp - 0x40], 0
call fcn.00447ef0
cmp dword [esi + 0x294], 0xffffffff
mov dword [ebp - 4], 0
je 0x501156
cmp byte [esi + 0xd6], 0
lea eax, [esi + 0xd6]
jne 0x501156
xorps xmm0, xmm0
lea ecx, [ebp - 0x3c]
push eax
movlpd qword [ebp - 0x3c], xmm0
call fcn.00429ff0
mov cl, byte [ebp + 8]
mov byte [ebp - 4], 1
test cl, cl
jne 0x500f13
push 1
call fcn.00447b20
mov cl, byte [ebp + 8]
add esp, 4
cmp byte [esi + 0x291], 0
mov byte [ebp - 0x171], 1
jne 0x501072
test cl, cl
jne 0x501072
cmp byte [esi + 0x292], cl
jne 0x501072
push 1
push dword [esi + 0x294]
call dword [sym.imp.WS2_32.dll_shutdown]
mov byte [esi + 0x292], 1
test eax, eax
je 0x500f88
mov eax, dword [ebx]
mov ecx, ebx
push str.error_on_socket_shutdown.
call dword [eax + 0x14]
push ebx
push 0
call fcn.004ff690
add esp, 8
push dword [esi + 0x294]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x294], 0xffffffff
xor bl, bl
jmp 0x501143
cmp dword [esi + 0x294], 0xffffffff
jne 0x500f9e
xor al, al
mov byte [ebp - 0x171], al
jmp 0x501072
mov eax, dword [ebp + 0xc]
mov edx, 0x7530
test eax, eax
mov ecx, edx
push 0x128
cmovne ecx, eax
lea eax, [ebp - 0x170]
cmp ecx, edx
push 0
cmova ecx, edx
push eax
mov dword [ebp - 0x34], ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x170]
push edi
call fcn.0046d1d0
mov byte [ebp - 4], 2
call sub.KERNEL32.DLL_GetTickCount
push 0
mov edi, eax
lea eax, [ebp - 0x30]
push 0x20
push eax
push dword [esi + 0x294]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x501047
nop word [eax + eax]
cmp eax, 0xffffffff
je 0x501009
test eax, eax
jns 0x50101a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x5010e1
call sub.KERNEL32.DLL_GetTickCount
cmp eax, edi
cmovb edi, eax
sub eax, edi
cmp eax, dword [ebp - 0x34]
jae 0x5010e1
push 0
push 0x20
lea eax, [ebp - 0x30]
push eax
push dword [esi + 0x294]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x501000
cmp byte [ebx + 0x129], 0
je 0x50105c
mov eax, dword [ebx]
mov ecx, ebx
push str.TCP_connection_cleanly_closed_by_peer.
call dword [eax + 0x18]
lea ecx, [ebp - 0x170]
mov byte [ebp - 4], 1
call fcn.0046d2b0
mov byte [ebp - 0x171], 1
push str.AbortiveClose
lea ecx, [ebx + 0x90]
call fcn.0042cc30
test al, al
je 0x5010a9
push 4
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 1
push eax
push 0x80
push 0xffff
push dword [esi + 0x294]
call dword [sym.imp.WS2_32.dll_setsockopt]
push dword [esi + 0x294]
call dword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x5010fd
mov eax, dword [ebx]
mov ecx, ebx
push str.error_on_closesocket.
call dword [eax + 0x14]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push ebx
push 0
push eax
call fcn.004ff220
add esp, 0xc
xor al, al
mov byte [ebp - 0x171], al
jmp 0x501103
lea ecx, [ebp - 0x170]
mov byte [ebp - 4], 1
call fcn.0046d2b0
xor al, al
mov byte [ebp - 0x171], al
jmp 0x501072
mov al, byte [ebp - 0x171]
mov dword [esi + 0x294], 0xffffffff
cmp byte [ebx + 0x129], 0
je 0x50113d
cmp byte [esi + 0x291], 0
mov edx, dword [ebx]
je 0x501128
push str.Closed_listen_socket.
jmp 0x501138
test al, al
je 0x501133
push str.Cleanly_terminated_TCP_connection.
jmp 0x501138
push str.Terminated_TCP_connection.
mov ecx, ebx
call dword [edx + 0x18]
mov bl, byte [ebp - 0x171]
lea ecx, [ebp - 0x3c]
mov word [esi + 0x290], 0
call fcn.0042a0f0
jmp 0x501158
mov bl, 1
lea ecx, [ebp - 0x48]
call fcn.00447ff0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005af5a8
mov esp, ebp
pop ebp
ret 0x10