Function at 0x500eb0
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 0x5c1e30
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.00447f50
cmp dword [esi + 0x294], 0xffffffff
mov dword [ebp - 4], 0
je 0x501196
cmp byte [esi + 0xd6], 0
lea eax, [esi + 0xd6]
jne 0x501196
xorps xmm0, xmm0
lea ecx, [ebp - 0x3c]
push eax
movlpd qword [ebp - 0x3c], xmm0
call fcn.0042a060
mov cl, byte [ebp + 8]
mov byte [ebp - 4], 1
test cl, cl
jne 0x500f53
push 1
call fcn.00447b80
mov cl, byte [ebp + 8]
add esp, 4
cmp byte [esi + 0x291], 0
mov byte [ebp - 0x171], 1
jne 0x5010b2
test cl, cl
jne 0x5010b2
cmp byte [esi + 0x292], cl
jne 0x5010b2
push 1
push dword [esi + 0x294]
call dword [sym.imp.WS2_32.dll_shutdown]
mov byte [esi + 0x292], 1
test eax, eax
je 0x500fc8
mov eax, dword [ebx]
mov ecx, ebx
push str.error_on_socket_shutdown.
call dword [eax + 0x14]
push ebx
push 0
call fcn.004ff6d0
add esp, 8
push dword [esi + 0x294]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x294], 0xffffffff
xor bl, bl
jmp 0x501183
cmp dword [esi + 0x294], 0xffffffff
jne 0x500fde
xor al, al
mov byte [ebp - 0x171], al
jmp 0x5010b2
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.0046d220
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 0x501087
nop word [eax + eax]
cmp eax, 0xffffffff
je 0x501049
test eax, eax
jns 0x50105a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x501121
call sub.KERNEL32.DLL_GetTickCount
cmp eax, edi
cmovb edi, eax
sub eax, edi
cmp eax, dword [ebp - 0x34]
jae 0x501121
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 0x501040
cmp byte [ebx + 0x129], 0
je 0x50109c
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.0046d300
mov byte [ebp - 0x171], 1
push str.AbortiveClose
lea ecx, [ebx + 0x90]
call fcn.0042cca0
test al, al
je 0x5010e9
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 0x50113d
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.004ff260
add esp, 0xc
xor al, al
mov byte [ebp - 0x171], al
jmp 0x501143
lea ecx, [ebp - 0x170]
mov byte [ebp - 4], 1
call fcn.0046d300
xor al, al
mov byte [ebp - 0x171], al
jmp 0x5010b2
mov al, byte [ebp - 0x171]
mov dword [esi + 0x294], 0xffffffff
cmp byte [ebx + 0x129], 0
je 0x50117d
cmp byte [esi + 0x291], 0
mov edx, dword [ebx]
je 0x501168
push str.Closed_listen_socket.
jmp 0x501178
test al, al
je 0x501173
push str.Cleanly_terminated_TCP_connection.
jmp 0x501178
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.0042a160
jmp 0x501198
mov bl, 1
lea ecx, [ebp - 0x48]
call fcn.00448050
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.005af618
mov esp, ebp
pop ebp
ret 0x10