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

Disassembly:
sub esp, 0x22c
lea eax, [esp + 0x9c]
push ebx
push ebp
push esi
push edi
push eax
push 0x202
mov esi, ecx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x40291e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [esp + 0x244]
mov ecx, 0x406234
sub esi, ecx
mov dl, byte [ecx]
mov byte [esi + ecx], dl
inc ecx
test dl, dl
jne 0x402907
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x22c
ret 8
mov ax, word [esp + 0xac]
cmp al, 2
jne 0x402ad2
xor ecx, ecx
mov cl, ah
cmp cl, al
jne 0x402ad2
lea edx, [esp + 0x48]
push 0x64
push edx
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x402ab0
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x402ab0
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edx, dword [esp + 0x244]
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
test cl, cl
jne 0x402977
push 1
push 0
push 0
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
cmp eax, 0xffffffff
mov dword [esi + 0x58], eax
jne 0x4029ae
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x22c
ret 8
push 0
mov word [esp + 0x18], 2
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x240]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [esi + 0x58]
lea ecx, [esp + 0x14]
push 0x10
push ecx
push edx
mov word [esp + 0x22], ax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x4029fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x22c
ret 8
mov eax, dword [esi + 0x58]
push 5
push eax
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x402a21
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x22c
ret 8
push 0
push 0
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
cmp eax, 0xffffffff
mov dword [esi + 0xc], eax
jne 0x402a4a
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x22c
ret 8
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov edx, dword [esp + 0x38]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
xor edi, edi
lea eax, [edx + edx + 2]
test eax, eax
jbe 0x402a96
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x10]
push ecx
push 0
push esi
push 0x402190
push 0
push 0
call ebx
test eax, eax
je 0x402ab0
push eax
call ebp
mov edx, dword [esp + 0x38]
inc edi
lea eax, [edx + edx + 2]
cmp edi, eax
jb 0x402a6f
lea ecx, [esp + 0x10]
push ecx
push 0
push esi
push 0x4023b0
push 0
push 0
call ebx
test eax, eax
mov dword [esi + 0x5c], eax
jne 0x402ac3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x22c
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x22c
ret 8
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x22c
ret 8