Function at 0x401c10
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create raw socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
sub esp, 0x2a8
push ebx
push ebp
push esi
push edi
call fcn.00401b40
mov ebx, eax
and eax, 0xffff
cmp eax, 0xffffffff
mov dword [0x413224], 0
jne 0x401c42
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2a8
ret
push 0x413228
call fcn.004039d0
add esp, 4
lea ecx, [esp + 0x128]
push ecx
push 0x202
call sub.WS2_32.dll_WSAStartup
cmp eax, 0xffffffff
jne 0x401c7b
call sub.WS2_32.dll_WSACleanup
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x2a8
ret
mov esi, dword [esp + 0x2c4]
test esi, esi
je 0x401cb7
movsx edx, byte [esi]
push edx
call fcn.004040e7
add esp, 4
test eax, eax
push esi
je 0x401c9e
call sub.WS2_32.dll_gethostbyname
jmp 0x401cbb
call sub.WS2_32.dll_inet_addr
mov dword [esp + 0x24], eax
push 2
lea eax, [esp + 0x28]
push 4
push eax
call sub.WS2_32.dll_gethostbyaddr
jmp 0x401cbb
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x401cde
mov dword [0x413224], 4
call sub.WS2_32.dll_WSACleanup
mov eax, dword [0x413224]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2a8
ret
xor ecx, ecx
lea edi, [esp + 0x18]
mov dword [esp + 0x14], ecx
push ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
mov edx, dword [eax + 0xc]
movsx ecx, word [eax + 0xa]
mov esi, dword [edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ax, word [eax + 8]
mov word [esp + 0x18], ax
call sub.WS2_32.dll_htons
push 0
push 1
push 2
mov word [esp + 0x22], ax
call sub.WS2_32.dll_socket
lea ecx, [esp + 0x14]
mov ebp, eax
push 0x10
push ecx
push ebp
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
je 0x401cc9
mov edi, dword [esp + 0x2d0]
mov ebx, dword [esp + 0x2bc]
cmp ebx, 2
je 0x401d5b
cmp ebx, 5
je 0x401d8b
cmp ebx, 6
je 0x401d8b
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0xc]
xor edx, edx
push str.DCPTools
mov dx, word [edi]
push 0
push edx
mov edx, dword [edi + 0x10]
push eax
mov eax, dword [esp + 0x2d8]
push ecx
push edx
mov ecx, dword [eax]
lea edx, [esp + 0x40]
push ecx
push ebx
push str._d__lu__lu__lu__d__d__lu__s
push edx
jmp 0x401dc5
mov esi, dword [esp + 0x2d4]
push esi
call fcn.00403990
mov ecx, dword [edi + 0x14]
mov edx, dword [edi + 0xc]
add esp, 4
xor eax, eax
mov ax, word [edi]
push esi
push 0
push eax
mov eax, dword [edi + 0x10]
push ecx
mov ecx, dword [esp + 0x2d8]
push edx
push eax
mov edx, dword [ecx]
lea eax, [esp + 0x40]
push edx
push ebx
push str._d__lu__lu__lu__d__d__lu__s
push eax
call fcn.00404095
add esp, 0x28
lea ecx, [esp + 0x28]
push 0
push 0x80
push ecx
push ebp
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x401e93
cmp ebx, 1
je 0x401e93
cmp ebx, 2
je 0x401e93
xor esi, esi
mov edx, 0x80
push 0
sub edx, esi
lea eax, [esp + esi + 0xac]
push edx
push eax
push ebp
call sub.WS2_32.dll_recv
cmp eax, 1
jl 0x401e27
add esi, eax
cmp esi, 0x80
jl 0x401e00
cmp ebx, 3
je 0x401e43
cmp ebx, 4
je 0x401e6c
cmp ebx, 5
je 0x401e93
mov eax, dword [esp + 0x10]
test eax, eax
je 0x401e93
jmp 0x401d4c
mov ecx, dword [esp + 0x2c8]
lea edx, [esp + 0xa8]
push ecx
push str._lu
push edx
call fcn.00404061
add esp, 0xc
mov dword [0x413224], 8
jmp 0x401e93
mov eax, dword [esp + 0x2cc]
lea ecx, [esp + 0xa8]
push eax
push str._lu
push ecx
call fcn.00404061
add esp, 0xc
mov dword [0x413224], 9
push ebp
call sub.WS2_32.dll_closesocket
cmp dword [0x413224], 3
jne 0x401cc9
call sub.WS2_32.dll_WSACleanup
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x2a8
ret