Function at 0x100138a6
Capabilities:
Check for time delay via gettickcount
Create raw socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x280
mov eax, dword [0x1001f048]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
mov ebx, dword [ebp + 0x10]
lea edi, [ebp - 0x14]
mov esi, dword [ebp + 8]
stosd dword es:[edi], eax
mov dword [ebp - 0x278], ebx
mov dword [ebp - 0x274], 0x10
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp - 0x24]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
inc eax
push eax
push 3
push 2
pop eax
push eax
call sub.WS2_32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
jne 0x10013912
call sub.WS2_32.dll_WSAGetLastError
sub eax, 0x271d
neg eax
sbb eax, eax
add eax, 0xfffffc1a
jmp 0x10013b0d
test ebx, ebx
je 0x10013950
push 4
push ebx
push 7
push 0
push edi
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x10013950
call sub.WS2_32.dll_WSAGetLastError
push edi
mov esi, eax
call sub.WS2_32.dll_closesocket
push esi
call sub.WS2_32.dll_WSASetLastError
xor eax, eax
cmp esi, 0x271d
sete al
add eax, 0xfffffc19
jmp 0x10013b0d
mov eax, dword [esi]
mov dword [ebp - 0x10], eax
push 2
pop eax
mov word [ebp - 0x14], ax
xor eax, eax
mov word [ebp - 0x12], ax
mov eax, 0xd8
mov word [0x10020588], ax
mov eax, dword [section..data]
mov word [0x1002058a], ax
inc eax
mov dword [0x10020584], 8
xor ecx, ecx
mov dword [section..data], eax
lea eax, [ecx + 0x20]
mov byte [ecx + 0x10020591], al
inc ecx
cmp ecx, 0x20
jl 0x1001398a
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
push 0x2d
mov ebx, 0x10020584
mov dword [0x1002058d], eax
push ebx
call fcn.10013b1e
pop ecx
pop ecx
push 0x10
mov word [0x10020586], ax
lea eax, [ebp - 0x14]
push eax
push 0
push 0x2d
push ebx
push edi
call sub.WS2_32.dll_sendto
cmp eax, 0x2d
jb 0x10013928
call esi
mov ebx, dword [ebp + 0xc]
add ebx, eax
jmp 0x10013a94
call esi
mov ecx, ebx
mov dword [ebp - 0x270], 0x3e8
sub ecx, eax
mov dword [ebp - 0x26c], 1
mov eax, ecx
mov dword [ebp - 0x268], edi
xor edx, edx
div dword [ebp - 0x270]
mov dword [ebp - 0x280], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [ebp - 0x27c], eax
lea eax, [ebp - 0x280]
push eax
push 0
push 0
lea eax, [ebp - 0x26c]
push eax
push 1
call sub.WS2_32.dll_select
test eax, eax
je 0x10013aa4
cmp eax, 0xffffffff
je 0x10013ad9
lea eax, [ebp - 0x274]
push eax
lea eax, [ebp - 0x24]
push eax
push 0
push 0x141
lea eax, [ebp - 0x168]
push eax
push edi
call sub.WS2_32.dll_recvfrom
cmp eax, 0xffffffff
je 0x10013abf
cmp eax, 0x1d
jb 0x10013a94
mov al, byte [ebp - 0x154]
cmp al, 3
je 0x10013ab8
cmp al, 0xb
je 0x10013ab1
test al, al
jne 0x10013a94
mov eax, 0xd8
cmp word [ebp - 0x150], ax
je 0x10013a9e
call esi
cmp eax, ebx
jb 0x100139e1
call esi
cmp eax, ebx
jbe 0x10013ae0
mov esi, 0xfffffc1b
push edi
call sub.WS2_32.dll_closesocket
jmp 0x10013b0b
mov esi, 0xfffffc1e
jmp 0x10013aa9
mov esi, 0xfffffc1d
jmp 0x10013aa9
call sub.WS2_32.dll_WSAGetLastError
push edi
mov esi, eax
call sub.WS2_32.dll_closesocket
push esi
call sub.WS2_32.dll_WSASetLastError
mov eax, 0xfffffc18
jmp 0x10013b0d
mov esi, 0xfffffc18
jmp 0x10013aa9
mov ecx, dword [ebp - 0x278]
test ecx, ecx
je 0x10013af3
movzx eax, byte [ebp - 0x160]
mov dword [ecx], eax
call esi
mov esi, eax
sub esi, dword [ebp - 0x14b]
push edi
call sub.WS2_32.dll_closesocket
push 1
test esi, esi
pop eax
cmove esi, eax
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10015a21
mov esp, ebp
pop ebp
ret