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

Disassembly:
mov eax, dword [0x42a8e8]
sub esp, 0xa0
cmp eax, 0xffffffff
push ebx
push esi
push edi
jne 0x404379
push str.FTP_ERR:_Cannot_invoke_FTP_commands_until_connected.
push 0x41a460
call fcn.004080ec
add esp, 8
call fcn.00402e00
mov eax, 4
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov eax, dword [str.CWD]
mov cl, byte [0x415cd8]
mov edi, dword [esp + 0xb4]
mov dword [esp + 0x2c], eax
mov byte [esp + 0x30], cl
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x2c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x415a94
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov ebx, dword [esp + 0xb0]
lea eax, [esp + 0x2c]
and ecx, 3
push eax
push ebx
rep movsb byte es:[edi], byte [esi]
call fcn.00403900
add esp, 8
test eax, eax
jne 0x404634
cmp dword [0x42a6cc], 0xffffffff
je 0x404434
push str.FTP_ERR:_Cannot_invoke_another_file_transfer_until_current_transfer_is_complete.
push 0x41a460
call fcn.004080ec
add esp, 8
call fcn.00402e00
mov eax, htons
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov ax, word [0x42a6c8]
inc ax
cmp ax, 0x49bb
mov word [0x42a6c8], ax
jl 0x404452
mov ax, 0xf23
mov word [0x42a6c8], 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.004080ec
add esp, 0x10
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [0x42a6cc], eax
jne 0x404499
call fcn.00403310
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov cx, word [0x42a6c8]
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 [0x42a6cc]
lea edx, [esp + 0xc]
push 0x10
push edx
push eax
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x4044e0
call fcn.00403310
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov ecx, dword [0x42a6cc]
push 0x29
push 0xbd1
push ebx
push ecx
call sub.WSOCK32.dll_WSAAsyncSelect
cmp eax, 0xffffffff
jne 0x404508
call fcn.00403310
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov edx, dword [0x42a6cc]
push 5
push edx
call sub.WSOCK32.dll_listen
cmp eax, 0xffffffff
jne 0x40452a
call fcn.00403310
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov eax, dword [str.TYPE_A_r_n]
mov ecx, dword [0x415c70]
mov dl, byte [0x415c74]
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.00403900
mov esi, eax
add esp, 8
test esi, esi
je 0x40456c
call fcn.004042b0
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov edi, 0x419f00
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.00403900
mov esi, eax
add esp, 8
test esi, esi
je 0x4045e4
call fcn.004042b0
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov ecx, dword [str.NLST_r_n]
mov dx, word [0x415c68]
mov al, byte [0x415c6a]
mov dword [esp + 0x2c], ecx
lea ecx, [esp + 0x2c]
mov dword [0x42a6c4], 1
push ecx
push ebx
mov word [esp + 0x38], dx
mov byte [esp + 0x3a], al
call fcn.00403900
mov esi, eax
add esp, 8
test esi, esi
je 0x404632
call fcn.004042b0
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0xa0
ret