Function at 0x402443
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 0x402496
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
push 0x411fe0
mov ecx, dword [ebp + 0xc]
push ecx
call sub.MSVCRT.dll_strcpy
add esp, 8
mov eax, dword [ebp - 8]
jmp 0x402751
mov edx, dword [ebp - 0x198]
and edx, 0xffff
and edx, 0xff
and edx, 0xff
cmp edx, 2
jne 0x4024cb
mov eax, dword [ebp - 0x198]
and eax, 0xffff
shr eax, 8
and eax, 0xff
cmp eax, 2
je 0x4024d9
call dword [sym.imp.WS2_32.dll_WSACleanup]
or eax, 0xffffffff
jmp 0x402751
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 0x402553
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 0x402540
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 sub.MSVCRT.dll_memcpy
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 sub.MSVCRT.dll_strcpy
add esp, 8
jmp 0x402551
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x402751
jmp 0x402564
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x402751
cmp dword [ebp - 8], 0
jne 0x4025a8
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 + 0xac], eax
mov edx, dword [ebp - 0x248]
cmp dword [edx + 0xac], 0xffffffff
jne 0x4025a8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x402751
cmp dword [ebp - 8], 0
jne 0x402608
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 + 0xac]
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x402608
call fcn.00402bc0
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x402751
cmp dword [ebp - 8], 0
jne 0x402638
push 5
mov ecx, dword [ebp - 0x248]
mov edx, dword [ecx + 0xac]
push edx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x402638
call fcn.00402bc0
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x402751
cmp dword [ebp - 8], 0
jne 0x402671
push 0
push 0
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov ecx, dword [ebp - 0x248]
mov dword [ecx + 0x60], eax
mov edx, dword [ebp - 0x248]
cmp dword [edx + 0x60], 0xffffffff
jne 0x402671
call fcn.00402bc0
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x402751
cmp dword [ebp - 8], 0
jne 0x402700
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov dword [ebp - 0x238], 0
jmp 0x4026a3
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 0x402700
lea ecx, [ebp - 0x240]
push ecx
push 0
mov edx, dword [ebp - 0x248]
push edx
push 0x4019b0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x23c], eax
cmp dword [ebp - 0x23c], 0
jne 0x4026f1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x402751
mov eax, dword [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x402694
cmp dword [ebp - 8], 0
jne 0x40274e
lea ecx, [ebp - 0x244]
push ecx
push 0
mov edx, dword [ebp - 0x248]
push edx
push 0x401c2d
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [ebp - 0x248]
mov dword [ecx + 0xb0], eax
mov edx, dword [ebp - 0x248]
cmp dword [edx + 0xb0], 0
jne 0x40274e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x402751
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret 8