Function at 0x402f40
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
mov eax, dword [0x42c4e8]
sub esp, 0xa0
cmp eax, 0xffffffff
push ebx
push esi
push edi
jne 0x402f79
push str.FTP_ERR:_Cannot_invoke_FTP_commands_until_connected.
push 0x41c060
call fcn.00408948
add esp, 8
call fcn.00401700
mov eax, reloc.WSOCK32.dll_connect
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
cmp dword [0x42c2cc], 0xffffffff
je 0x402fa8
push str.FTP_ERR:_Cannot_invoke_another_file_transfer_until_current_transfer_is_complete.
push 0x41c060
call fcn.00408948
add esp, 8
call fcn.00401700
mov eax, htons
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov ebx, dword [esp + 0xb8]
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x104
jbe 0x402fef
push ebx
push str.FTP_ERR:_File_name__s_too_long.
push 0x41c060
call fcn.00408948
add esp, 0xc
call fcn.00401700
call fcn.00402bb0
mov eax, 6
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
push 0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov eax, ecx
mov esi, edi
mov edi, 0x41bb20
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.004090a3
add esp, 8
test eax, eax
jne 0x403035
push ebx
call fcn.00409079
add esp, 4
test eax, eax
je 0x403035
push ebx
push str.FTP_ERR:_Error_deleting__s
jmp 0x4030a2
push 0x180
push ebx
call fcn.00409063
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
jne 0x403052
push ebx
push str.FTP_ERR:_Error_creating__s
jmp 0x4030a2
mov edi, dword [esp + 0xbc]
push edi
push esi
call fcn.0040e9d0
add esp, 8
test eax, eax
je 0x40308f
push edi
push ebx
push str.FTP_ERR:_Error_setting__s_to_size_of__d_bytes
push 0x41c060
call fcn.00408948
add esp, 0x10
call fcn.00401700
mov eax, inet_addr
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
push esi
call fcn.00408fc8
add esp, 4
test eax, eax
je 0x4030c3
push ebx
push str.FTP_ERR:_Error_closing_file__s.
push 0x41c060
call fcn.00408948
add esp, 0xc
call fcn.00401700
mov eax, inet_addr
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov ax, word [0x42c2c8]
inc ax
cmp ax, 0x49bb
mov word [0x42c2c8], ax
jl 0x4030e1
mov ax, 0xf23
mov word [0x42c2c8], ax
movsx eax, ax
mov ecx, eax
xor edx, edx
and ecx, 0xff
mov dl, ah
push ecx
push edx
lea eax, [esp + 0x24]
push str._d__d_r_n
push eax
call fcn.00408948
add esp, 0x10
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [0x42c2cc], eax
jne 0x403128
call fcn.00401c10
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov cx, word [0x42c2c8]
mov word [esp + 0xc], 2
push ecx
mov dword [esp + 0x14], 0
call sub.WSOCK32.dll_htons
mov word [esp + 0xe], ax
mov eax, dword [0x42c2cc]
lea edx, [esp + 0xc]
push 0x10
push edx
push eax
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x40316f
call fcn.00401c10
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov ebx, dword [esp + 0xb0]
mov ecx, dword [0x42c2cc]
push 0x29
push 0xbd1
push ebx
push ecx
call sub.WSOCK32.dll_WSAAsyncSelect
cmp eax, 0xffffffff
jne 0x40319e
call fcn.00401c10
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov edx, dword [0x42c2cc]
push 5
push edx
call sub.WSOCK32.dll_listen
cmp eax, 0xffffffff
jne 0x4031c0
call fcn.00401c10
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov eax, dword [str.TYPE_I_r_n]
mov ecx, dword [0x417c14]
mov dl, byte [0x417c18]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x30], ecx
push eax
push ebx
mov byte [esp + 0x3c], dl
call fcn.00402200
mov esi, eax
add esp, 8
test esi, esi
je 0x403202
call fcn.00402bb0
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov edi, 0x41bb00
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x2c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x2c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push ebx
call fcn.00402200
mov esi, eax
add esp, 8
test esi, esi
je 0x40327a
call fcn.00402bb0
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov ecx, dword [str.RETR]
mov edi, dword [esp + 0xb4]
mov dword [esp + 0x2c], ecx
or ecx, 0xffffffff
xor eax, eax
mov dx, word [0x417c0c]
repne scasb al, byte es:[edi]
not ecx
mov word [esp + 0x30], dx
sub edi, ecx
lea edx, [esp + 0x2c]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x2c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x417988
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x2c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push ebx
call fcn.00402200
mov esi, eax
add esp, 8
test esi, esi
je 0x403311
call fcn.00402bb0
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0xa0
ret