Function at 0x4089c0
Capabilities:
Create raw socket
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
mov ebx, ecx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x408a21
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov edi, 0x43c5d8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x244]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x22c
ret 8
mov ax, word [esp + 0xac]
cmp al, 2
jne 0x408be8
xor ecx, ecx
mov cl, ah
cmp cl, al
jne 0x408be8
lea edx, [esp + 0x48]
push 0x64
push edx
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x408bc6
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x408bc6
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 edi, eax
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x24c]
push 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0
and ecx, 3
push 1
rep movsb byte es:[edi], byte [esi]
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
cmp eax, 0xffffffff
mov dword [ebx + 0x58], eax
jne 0x408ac4
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 ecx, dword [esp + 0x240]
mov dword [esp + 0x18], eax
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x16], ax
mov eax, dword [ebx + 0x58]
lea edx, [esp + 0x14]
push 0x10
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x408b13
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x22c
ret 8
mov ecx, dword [ebx + 0x58]
push 5
push ecx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x408b37
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 [ebx + 0xc], eax
jne 0x408b60
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x22c
ret 8
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0x38]
mov edi, dword [sym.imp.KERNEL32.dll_CreateThread]
xor esi, esi
lea ecx, [eax + eax + 2]
test ecx, ecx
jbe 0x408bac
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x10]
push edx
push 0
push ebx
push 0x408270
push 0
push 0
call edi
test eax, eax
je 0x408bc6
push eax
call ebp
mov eax, dword [esp + 0x38]
inc esi
lea ecx, [eax + eax + 2]
cmp esi, ecx
jb 0x408b85
lea edx, [esp + 0x10]
push edx
push 0
push ebx
push 0x408490
push 0
push 0
call edi
test eax, eax
mov dword [ebx + 0x5c], eax
jne 0x408bd9
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