Function at 0x57c7b4
Capabilities:
Create tcp socket
Create udp socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff6b8
push ebx
push esi
push edi
mov ebx, eax
mov byte [ebp - 1], 0
push 0x11
push 2
push 2
call sub.wsock32.dll_socket
mov dword [ebp - 8], eax
xor ecx, ecx
push ebp
push 0x57ca19
push dword fs:[ecx]
mov dword fs:[ecx], esp
call sub.kernel32.dll_GetTickCount
mov esi, eax
lea eax, [ebp - 0x30]
mov edx, 0xc
call fcn.00408684
mov word [ebp - 0x30], si
mov word [ebp - 0x2e], 0x1000
push 1
call sub.wsock32.dll_htons
mov word [ebp - 0x2c], ax
lea eax, [ebp - 0x40]
mov edx, 0x10
call fcn.00408684
mov word [ebp - 0x40], 2
mov eax, dword [ebx + 0x50]
mov dword [ebp - 0x3c], eax
push 0x89
call sub.wsock32.dll_htons
mov word [ebp - 0x3e], ax
mov eax, 0x32
call fcn.00402df4
mov dword [ebp - 0x10], eax
xor ecx, ecx
push ebp
push 0x57c9fb
push dword fs:[ecx]
mov dword fs:[ecx], esp
mov edx, 0x32
mov eax, dword [ebp - 0x10]
call fcn.00408684
lea edx, [ebp - 0x30]
mov ecx, 0xc
mov eax, dword [ebp - 0x10]
call fcn.00408668
mov edx, 0x59bf60
mov eax, dword [ebp - 0x10]
add eax, 0xc
mov ecx, 0x26
call fcn.00408668
push 0x10
lea eax, [ebp - 0x40]
push eax
push 0
push 0x32
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.wsock32.dll_sendto
inc eax
je 0x57c9e5
lea eax, [ebp - 0x144]
mov edx, 0x104
call fcn.00408684
mov eax, dword [ebp - 8]
mov dword [ebp - 0x140], eax
mov dword [ebp - 0x144], 1
lea eax, [ebp - 0x18]
mov edx, 8
call fcn.00408684
mov dword [ebp - 0x18], 1
lea eax, [ebp - 0x18]
push eax
push 0
push 0
lea eax, [ebp - 0x144]
push eax
push 0
call sub.wsock32.dll_select
test eax, eax
jle 0x57c9e5
lea eax, [ebp - 0x945]
mov edx, 0x801
call fcn.00408684
mov dword [ebp - 0xc], 0x10
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x40]
push eax
push 0
push 0x801
lea eax, [ebp - 0x945]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.wsock32.dll_recvfrom
mov edi, eax
cmp edi, 0xc
jle 0x57c9e5
lea eax, [ebp - 0x945]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
cmp si, word [eax]
jne 0x57c9e5
mov eax, dword [ebp - 0x24]
movzx eax, word [eax + 2]
shr eax, 0xc
jne 0x57c9e5
mov eax, dword [ebp - 0x24]
mov ax, word [eax + 6]
push eax
call sub.wsock32.dll_htons
cmp ax, 1
jne 0x57c9e5
lea eax, [ebp - 0x945]
add eax, 0xc
movzx eax, byte [eax + 0x2c]
mov edx, eax
add edx, edx
lea edx, [edx + edx*8]
mov ecx, edx
add ecx, 6
sub edi, 0xc
cmp ecx, edi
jge 0x57c9e5
add edx, 0x39
mov eax, edx
lea edx, [ebp - 0x945]
add eax, edx
mov edx, dword [eax]
mov dword [ebp - 0x1e], edx
mov dx, word [eax + 4]
mov word [ebp - 0x1a], dx
lea eax, [ebx + 0x64]
mov edx, 6
call fcn.00408684
mov al, byte [ebp - 0x1e]
mov byte [ebx + 0x64], al
mov al, byte [ebp - 0x1d]
mov byte [ebx + 0x65], al
mov al, byte [ebp - 0x1c]
mov byte [ebx + 0x66], al
mov al, byte [ebp - 0x1b]
mov byte [ebx + 0x67], al
mov al, byte [ebp - 0x1a]
mov byte [ebx + 0x68], al
mov al, byte [ebp - 0x19]
mov byte [ebx + 0x69], al
mov dword [ebx + 0x6c], 6
mov byte [ebp - 1], 1
mov byte [ebx + 0x40], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x57ca02
mov eax, dword [ebp - 0x10]
call fcn.00402e24
ret