Function at 0x406bbf
Capabilities:
Create tcp socket
Create thread
Create udp socket
Get hostname
Get system information on windows
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x248
mov dword [ebp - 0x248], ecx
mov dword [ebp - 8], 0
lea eax, [ebp - 0x198]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x406c12
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
push 0x440eec
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00414eb0
add esp, 8
mov eax, dword [ebp - 8]
jmp 0x406ebe
mov edx, dword [ebp - 0x198]
and edx, 0xffff
and edx, 0xff
and edx, 0xff
cmp edx, 2
jne 0x406c47
mov eax, dword [ebp - 0x198]
and eax, 0xffff
shr eax, 8
and eax, 0xff
cmp eax, 2
je 0x406c55
call dword [sym.imp.WS2_32.dll_WSACleanup]
or eax, 0xffffffff
jmp 0x406ebe
push 0x64
lea ecx, [ebp - 0x1fc]
push ecx
call dword [sym.imp.WS2_32.dll_gethostname]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x406ccf
lea edx, [ebp - 0x1fc]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x200], eax
cmp dword [ebp - 0x200], 0
je 0x406cbc
push 4
mov eax, dword [ebp - 0x200]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
push edx
lea eax, [ebp - 4]
push eax
call fcn.00414410
add esp, 0xc
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
mov edx, dword [ebp + 0xc]
push edx
call fcn.00414eb0
add esp, 8
jmp 0x406ccd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x406ebe
jmp 0x406ce0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x406ebe
cmp dword [ebp - 8], 0
jne 0x406d1e
push 1
push 0
push 0
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov ecx, dword [ebp - 0x248]
mov dword [ecx + 0x58], eax
mov edx, dword [ebp - 0x248]
cmp dword [edx + 0x58], 0xffffffff
jne 0x406d1e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x406ebe
cmp dword [ebp - 8], 0
jne 0x406d7c
mov word [ebp - 0x210], 2
push 0
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x20c], eax
mov ax, word [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x20e], ax
push 0x10
lea ecx, [ebp - 0x210]
push ecx
mov edx, dword [ebp - 0x248]
mov eax, dword [edx + 0x58]
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x406d7c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x406ebe
cmp dword [ebp - 8], 0
jne 0x406daa
push 5
mov ecx, dword [ebp - 0x248]
mov edx, dword [ecx + 0x58]
push edx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x406daa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x406ebe
cmp dword [ebp - 8], 0
jne 0x406de4
push 0
push 0
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov ecx, dword [ebp - 0x248]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp - 0x248]
cmp dword [edx + 0xc], 0xffffffff
jne 0x406de4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x406ebe
cmp dword [ebp - 8], 0
jne 0x406e73
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov dword [ebp - 0x238], 0
jmp 0x406e16
mov ecx, dword [ebp - 0x238]
add ecx, 1
mov dword [ebp - 0x238], ecx
mov edx, dword [ebp - 0x220]
lea eax, [edx + edx + 2]
cmp dword [ebp - 0x238], eax
jae 0x406e73
lea ecx, [ebp - 0x240]
push ecx
push 0
mov edx, dword [ebp - 0x248]
push edx
push 0x406170
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x23c], eax
cmp dword [ebp - 0x23c], 0
jne 0x406e64
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x406ebe
mov eax, dword [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406e07
cmp dword [ebp - 8], 0
jne 0x406ebb
lea ecx, [ebp - 0x244]
push ecx
push 0
mov edx, dword [ebp - 0x248]
push edx
push 0x4064a1
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [ebp - 0x248]
mov dword [ecx + 0x5c], eax
mov edx, dword [ebp - 0x248]
cmp dword [edx + 0x5c], 0
jne 0x406ebb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x406ebe
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret 8