Function at 0x404640
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 0x404679
push str.FTP_ERR:_Cannot_invoke_FTP_commands_until_connected.
push 0x41a460
call fcn.004080ec
add esp, 8
call fcn.00402e00
mov eax, reloc.WSOCK32.dll_connect
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
cmp dword [0x42a6cc], 0xffffffff
je 0x4046a8
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 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 0x4046ef
push ebx
push str.FTP_ERR:_File_name__s_too_long.
push 0x41a460
call fcn.004080ec
add esp, 0xc
call fcn.00402e00
call fcn.004042b0
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, 0x419f20
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.004085d0
add esp, 8
test eax, eax
jne 0x404735
push ebx
call fcn.004091b4
add esp, 4
test eax, eax
je 0x404735
push ebx
push str.FTP_ERR:_Error_deleting__s
jmp 0x4047a2
push 0x180
push ebx
call fcn.0040919e
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
jne 0x404752
push ebx
push str.FTP_ERR:_Error_creating__s
jmp 0x4047a2
mov edi, dword [esp + 0xbc]
push edi
push esi
call fcn.0040e05d
add esp, 8
test eax, eax
je 0x40478f
push edi
push ebx
push str.FTP_ERR:_Error_setting__s_to_size_of__d_bytes
push 0x41a460
call fcn.004080ec
add esp, 0x10
call fcn.00402e00
mov eax, inet_addr
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
push esi
call fcn.004090be
add esp, 4
test eax, eax
je 0x4047c3
push ebx
push str.FTP_ERR:_Error_closing_file__s.
push 0x41a460
call fcn.004080ec
add esp, 0xc
call fcn.00402e00
mov eax, inet_addr
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov ax, word [0x42a6c8]
inc ax
cmp ax, 0x49bb
mov word [0x42a6c8], ax
jl 0x4047e1
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 0x404828
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 0x40486f
call fcn.00403310
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov ebx, dword [esp + 0xb0]
mov ecx, dword [0x42a6cc]
push 0x29
push 0xbd1
push ebx
push ecx
call sub.WSOCK32.dll_WSAAsyncSelect
cmp eax, 0xffffffff
jne 0x40489e
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 0x4048c0
call fcn.00403310
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
mov eax, dword [str.TYPE_I_r_n]
mov ecx, dword [0x415d20]
mov dl, byte [0x415d24]
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 0x404902
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 0x40497a
call fcn.004042b0
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 [0x415d18]
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, 0x415a94
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 0x404a11
call fcn.004042b0
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