Function at 0x4078af
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 0x407902
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
push 0x4420b8
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00415ed0
add esp, 8
mov eax, dword [ebp - 8]
jmp 0x407bae
mov edx, dword [ebp - 0x198]
and edx, 0xffff
and edx, 0xff
and edx, 0xff
cmp edx, 2
jne 0x407937
mov eax, dword [ebp - 0x198]
and eax, 0xffff
shr eax, 8
and eax, 0xff
cmp eax, 2
je 0x407945
call dword [sym.imp.WS2_32.dll_WSACleanup]
or eax, 0xffffffff
jmp 0x407bae
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 0x4079bf
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 0x4079ac
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.00415b30
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.00415ed0
add esp, 8
jmp 0x4079bd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x407bae
jmp 0x4079d0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x407bae
cmp dword [ebp - 8], 0
jne 0x407a0e
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 0x407a0e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x407bae
cmp dword [ebp - 8], 0
jne 0x407a6c
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 0x407a6c
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x407bae
cmp dword [ebp - 8], 0
jne 0x407a9a
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 0x407a9a
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x407bae
cmp dword [ebp - 8], 0
jne 0x407ad4
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 0x407ad4
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x407bae
cmp dword [ebp - 8], 0
jne 0x407b63
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.kernel32.dll_GetSystemInfo]
mov dword [ebp - 0x238], 0
jmp 0x407b06
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 0x407b63
lea ecx, [ebp - 0x240]
push ecx
push 0
mov edx, dword [ebp - 0x248]
push edx
push 0x406e60
push 0
push 0
call dword [sym.imp.kernel32.dll_CreateThread]
mov dword [ebp - 0x23c], eax
cmp dword [ebp - 0x23c], 0
jne 0x407b54
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x407bae
mov eax, dword [ebp - 0x23c]
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x407af7
cmp dword [ebp - 8], 0
jne 0x407bab
lea ecx, [ebp - 0x244]
push ecx
push 0
mov edx, dword [ebp - 0x248]
push edx
push 0x407191
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 0x407bab
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x407bae
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret 8