Function at 0x402c40
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 0x402c79
push str.FTP_ERR:_Cannot_invoke_FTP_commands_until_connected.
push 0x41c060
call fcn.00408948
add esp, 8
call fcn.00401700
mov eax, 4
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov eax, dword [str.CWD]
mov cl, byte [0x417bcc]
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, 0x417988
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.00402200
add esp, 8
test eax, eax
jne 0x402f34
cmp dword [0x42c2cc], 0xffffffff
je 0x402d34
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 ax, word [0x42c2c8]
inc ax
cmp ax, 0x49bb
mov word [0x42c2c8], ax
jl 0x402d52
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 0x402d99
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 0x402de0
call fcn.00401c10
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov ecx, dword [0x42c2cc]
push 0x29
push 0xbd1
push ebx
push ecx
call sub.WSOCK32.dll_WSAAsyncSelect
cmp eax, 0xffffffff
jne 0x402e08
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 0x402e2a
call fcn.00401c10
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov eax, dword [str.TYPE_A_r_n]
mov ecx, dword [0x417b64]
mov dl, byte [0x417b68]
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 0x402e6c
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 0x402ee4
call fcn.00402bb0
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov ecx, dword [str.NLST_r_n]
mov dx, word [0x417b5c]
mov al, byte [0x417b5e]
mov dword [esp + 0x2c], ecx
lea ecx, [esp + 0x2c]
mov dword [0x42c2c4], 1
push ecx
push ebx
mov word [esp + 0x38], dx
mov byte [esp + 0x3a], al
call fcn.00402200
mov esi, eax
add esp, 8
test esi, esi
je 0x402f32
call fcn.00402bb0
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