Function at 0x1005f250
Capabilities:
Check for time delay via gettickcount
Create raw socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Resolve dns
Resolve function by parsing pe exports
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x498
mov eax, dword [0x100fd230]
xor eax, esp
mov dword [esp + 0x494], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov esi, ecx
mov dword [esp + 0x18], edx
push esi
mov dword [esp + 0x20], eax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x1005f29b
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x1005f45e
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
push 1
push 0
push 0
push 1
mov ecx, 2
xorps xmm0, xmm0
push 3
movaps xmmword [esp + 0x54], xmm0
push ecx
mov word [esp + 0x58], cx
mov dword [esp + 0x5c], eax
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
lea ecx, [esp + 0x24]
push 4
push ecx
push 0x1006
push 0xffff
push eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x38], 0x64
call edi
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x24]
push 4
push eax
push 0x1005
push 0xffff
push esi
call edi
push 0x400
xorps xmm0, xmm0
lea eax, [esp + 0x9c]
push 0
push eax
movaps xmmword [esp + 0x6c], xmm0
movaps xmmword [esp + 0x7c], xmm0
movq qword [esp + 0x8c], xmm0
call fcn.10091da0
add esp, 0xc
mov word [esp + 0x60], 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
movaps xmm0, xmmword [0x100e8ee0]
xor edi, edi
mov word [esp + 0x64], ax
xor ecx, ecx
movups xmmword [esp + 0x68], xmm0
movups xmmword [esp + 0x78], xmm0
mov dword [esp + 0x10], ecx
mov edx, 0x1e
nop dword [eax]
test ecx, ecx
mov eax, 1
push 4
cmovne eax, edx
mov dword [esp + 0x34], eax
lea eax, [esp + 0x34]
push eax
push 4
push 0
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
xor eax, eax
mov word [esp + 0x62], ax
movzx eax, di
inc edi
push eax
mov dword [esp + 0x24], edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x66], ax
lea edx, [esp + 0x60]
xor esi, esi
mov edi, 0x14
movzx ecx, word [edx]
lea edx, [edx + 2]
add esi, ecx
sub edi, 1
jne 0x1005f3a6
mov ecx, esi
movzx eax, si
shr ecx, 0x10
add ecx, eax
mov eax, ecx
shr eax, 0x10
add eax, ecx
not eax
mov word [esp + 0x62], ax
movzx eax, word [esp + 0x66]
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [esp + 0x14]
push 0x10
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x44]
push eax
push edi
push 0x28
lea eax, [esp + 0x70]
push eax
push esi
call dword [sym.imp.WS2_32.dll_sendto]
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], 0x10
push eax
lea eax, [esp + 0x54]
push eax
push edi
push 0x400
lea eax, [esp + 0xa8]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edx, eax
cmp edx, 0xffffffff
je 0x1005f4de
nop word [eax + eax]
movzx ecx, byte [esp + 0x98]
and ecx, 0xf
shl ecx, 2
lea eax, [ecx + 8]
cmp edx, eax
jl 0x1005f4ac
lea esi, [esp + 0x98]
add esi, ecx
mov al, byte [esi]
test al, al
jne 0x1005f475
movzx edi, word [esi + 4]
movzx eax, word [esi + 6]
jmp 0x1005f492
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [esp + 0x494]
xor ecx, esp
call fcn.1008f445
mov esp, ebp
pop ebp
ret
cmp al, 0xb
jne 0x1005f4ac
lea eax, [esp + 0xa0]
add ecx, eax
movzx eax, byte [ecx]
and eax, 0xf
movzx edi, word [ecx + eax*4 + 4]
movzx eax, word [ecx + eax*4 + 6]
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp di, ax
jne 0x1005f4ac
mov eax, dword [esp + 0x34]
cmp word [esp + 0x28], ax
je 0x1005f507
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x54]
push eax
push 0
push 0x400
lea eax, [esp + 0xa8]
push eax
push dword [esp + 0x28]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edx, eax
cmp edx, 0xffffffff
jne 0x1005f430
mov esi, dword [esp + 0x14]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x10]
cmp eax, 0x274c
jne 0x1005f554
test ecx, ecx
jne 0x1005f548
mov eax, dword [esp + 0x18]
inc ecx
mov edi, dword [esp + 0x20]
mov dword [eax], 0xffffffff
jmp 0x1005f354
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov cl, byte [esi]
sub eax, dword [esp + 0x38]
test cl, cl
je 0x1005f51c
cmp cl, 0xb
jne 0x1005f528
test eax, eax
mov edx, 1
cmovne edx, eax
jmp 0x1005f52c
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x3c], edx
test ecx, ecx
jne 0x1005f540
mov eax, dword [esp + 0x18]
mov dword [eax], edx
jmp 0x1005f576
mov eax, dword [esp + 0x1c]
mov dword [eax], edx
jmp 0x1005f576
mov eax, dword [esp + 0x1c]
mov dword [eax], 0xffffffff
jmp 0x1005f576
test ecx, ecx
jne 0x1005f56c
mov eax, dword [esp + 0x18]
inc ecx
mov edi, dword [esp + 0x20]
mov dword [eax], 0xfffffffe
jmp 0x1005f354
mov eax, dword [esp + 0x1c]
mov dword [eax], 0xfffffffe
mov esi, dword [esp + 0x14]
inc ecx
mov edi, dword [esp + 0x20]
mov edx, 0x1e
mov dword [esp + 0x10], ecx
cmp ecx, 2
jl 0x1005f360
mov ecx, dword [esp + 0x49c]
lea eax, [edx - 0x1d]
pop edi
pop esi
xor ecx, esp
call fcn.1008f445
mov esp, ebp
pop ebp
ret