Function at 0x40d480
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x493adb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x368
push ebx
push esi
push edi
mov eax, dword [ebp + 0x14]
push eax
call fcn.00415020
add esp, 4
push 0x49991c
mov eax, dword [ebp + 0x14]
push eax
call fcn.0043cd82
add esp, 8
mov dword [ebp - 0x10], eax
mov byte [ebp - 0x11], 0
mov dword [ebp - 0x18], 3
cmp dword [ebp - 0x10], 0
jne 0x40d4ea
mov eax, dword [ebp + 0x14]
push eax
push str.FtpPasvMode___open_file_error__:__s__r_n
call fcn.0040a6e0
add esp, 8
xor al, al
jmp 0x40d93c
lea ecx, [ebp - 0x1f8]
call fcn.0040aad0
mov dword [ebp - 4], 0
push 6
mov ecx, dword [ebp + 8]
call fcn.0040b460
mov dword [ebp - 0x1fc], eax
mov eax, dword [ebp - 0x1fc]
push eax
push 0
push 6
lea ecx, [ebp - 0x1f8]
call fcn.0040b4c0
mov eax, dword [ebp - 0x1fc]
push eax
push 0
push 6
mov ecx, dword [ebp + 0xc]
call fcn.0040b4c0
lea ecx, [ebp - 0x308]
call fcn.0040a810
mov dword [ebp - 0x308], 4
mov dword [ebp - 0x200], 0
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x204], eax
push 0xff
mov eax, dword [ebp + 0x14]
push eax
lea ecx, [ebp - 0x304]
push ecx
call fcn.0043da70
add esp, 0xc
mov eax, dword [ebp - 0x308]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x308]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x308]
mov dword [eax + 0x1a8], ecx
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x308]
mov dword [eax + 0x1ac], ecx
mov byte [ebp - 0x309], 0
cmp dword [ebp - 0x18], 0
je 0x40d650
movzx eax, byte [ebp - 0x309]
test eax, eax
jne 0x40d650
mov ecx, dword [ebp + 0xc]
call fcn.0040b510
mov dword [ebp - 0x310], eax
mov eax, dword [ebp - 0x310]
mov dword [ebp - 0x374], eax
cmp dword [ebp - 0x374], 6
je 0x40d622
cmp dword [ebp - 0x374], 9
je 0x40d5f3
jmp 0x40d642
lea eax, [ebp - 0x1f8]
push eax
mov ecx, dword [ebp + 0xc]
call fcn.0040b020
movzx ecx, al
test ecx, ecx
je 0x40d619
mov byte [ebp - 0x309], 1
mov dword [ebp - 0x18], 3
jmp 0x40d620
mov dword [ebp - 0x18], 0
jmp 0x40d64b
push str.FtpPortMode___:_hSocket_EVENTS_USER_CLOSE_r_n
call fcn.0040a6e0
add esp, 4
mov eax, dword [ebp + 8]
mov byte [eax + 0x1a4], 1
mov dword [ebp - 0x18], 0
jmp 0x40d64b
mov eax, dword [ebp - 0x18]
sub eax, 1
mov dword [ebp - 0x18], eax
jmp 0x40d5ac
cmp dword [ebp - 0x18], 0
je 0x40d668
lea ecx, [ebp - 0x1f8]
call fcn.0040b1f0
movzx eax, al
test eax, eax
jne 0x40d67c
push str.FtpPortMode___:_ftp_server_socket.SetAsyncEvent___error__r_n
call fcn.0040a6e0
add esp, 4
mov dword [ebp - 0x18], 0
cmp dword [ebp - 0x18], 0
je 0x40d886
lea ecx, [ebp - 0x1f8]
call fcn.0040b510
mov dword [ebp - 0x314], eax
mov eax, dword [ebp - 0x314]
mov dword [ebp - 0x374], eax
mov ecx, dword [ebp - 0x374]
sub ecx, 1
mov dword [ebp - 0x374], ecx
cmp dword [ebp - 0x374], 5
ja case.0x40d6c5.1
mov edx, dword [ebp - 0x374]
jmp dword [edx*4 + 0x40d94d]
push 0x1388
lea ecx, [ebp - 0x1f8]
call fcn.0040b250
movzx eax, al
test eax, eax
jne 0x40d704
mov eax, dword [ebp + 0x14]
push eax
push str.FtpPortMode___:_ftp_server_socket.Recv___error____s___r_n
call fcn.0040a6e0
add esp, 8
mov byte [ebp - 0x11], 0
mov dword [ebp - 0x18], 0
jmp 0x40d7f8
lea ecx, [ebp - 0x70]
call fcn.004164a0
mov dword [ebp - 0x318], eax
mov eax, dword [ebp - 0x318]
push eax
call fcn.004684a3
add esp, 4
mov dword [ebp - 0x370], eax
mov ecx, dword [ebp - 0x370]
mov dword [ebp - 0x31c], ecx
lea eax, [ebp - 0x31c]
push eax
mov ecx, dword [ebp - 0x318]
push ecx
lea ecx, [ebp - 0x70]
call fcn.00416500
mov eax, dword [ebp - 0x318]
push eax
lea ecx, [ebp - 0x70]
call fcn.00416680
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x318]
push ecx
push 1
mov edx, dword [ebp - 0x31c]
push edx
call fcn.0043d46f
add esp, 0x10
cmp dword [ebp - 0x31c], 0
je 0x40d7a2
mov eax, dword [ebp - 0x31c]
mov dword [ebp - 0x36c], eax
mov ecx, dword [ebp - 0x36c]
push ecx
call fcn.004684a8
add esp, 4
mov dword [ebp - 0x31c], 0
mov eax, dword [ebp - 0x200]
add eax, dword [ebp - 0x318]
mov dword [ebp - 0x200], eax
mov eax, dword [ebp - 0x200]
cmp eax, dword [ebp + 0x10]
jne 0x40d7ca
mov byte [ebp - 0x11], 1
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x200]
cmp eax, dword [ebp + 0x10]
jle 0x40d7f8
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x200]
push ecx
push str.FtpPortMode___File_Size_error__:_Recv_Size__d___File_Size__d_r_n
call fcn.0040a6e0
add esp, 0xc
mov byte [ebp - 0x11], 0
mov dword [ebp - 0x18], 0
jmp case.0x40d6c5.1
push str.FtpPortMode___:_hSocket_EVENTS_USER_CLOSE_r_n
call fcn.0040a6e0
add esp, 4
mov eax, dword [ebp + 8]
mov byte [eax + 0x1a4], 1
mov dword [ebp - 0x18], 0
jmp case.0x40d6c5.1
push str.FtpPortMode___:_hSocket_EVENTS_CLOSE_r_n
call fcn.0040a6e0
add esp, 4
mov dword [ebp - 0x18], 0
jmp case.0x40d6c5.1
push str.FtpPortMode___:_hSocket_EVENTS_ERROR_r_n
call fcn.0040a6e0
add esp, 4
mov dword [ebp - 0x18], 0
jmp case.0x40d6c5.1
push str.FtpPortMode___:_TimeOut__r_n
call fcn.0040a6e0
add esp, 4
mov eax, dword [ebp - 0x18]
sub eax, 1
test eax, eax
jle 0x40d86e
mov ecx, dword [ebp - 0x18]
sub ecx, 1
mov dword [ebp - 0x374], ecx
jmp 0x40d878
mov dword [ebp - 0x374], 0
mov edx, dword [ebp - 0x374]
mov dword [ebp - 0x18], edx
jmp 0x40d67c
mov eax, dword [ebp - 0x10]
push eax
call fcn.0043c86c
add esp, 4
test eax, eax
je 0x40d8a7
mov eax, dword [ebp + 0x14]
push eax
push str.close_file_error__:__s_r_n
call fcn.0040a6e0
add esp, 8
mov eax, dword [str.QUIT_r_n]
mov dword [ebp - 0x324], eax
mov cx, word [0x499f6c]
mov word [ebp - 0x320], cx
mov dl, byte [0x499f6e]
mov byte [ebp - 0x31e], dl
push 0
lea eax, [ebp - 0x324]
push eax
call fcn.0043bad0
add esp, 4
push eax
lea ecx, [ebp - 0x324]
push ecx
lea ecx, [ebp - 0x1f8]
call fcn.0040b4a0
push eax
call dword [sym.imp.WS2_32.dll_send]
lea eax, [ebp - 0x324]
push eax
push 0
call fcn.0040a4d0
add esp, 8
mov ecx, dword [ebp + 0xc]
call fcn.0040aef0
lea ecx, [ebp - 0x1f8]
call fcn.0040aef0
mov al, byte [ebp - 0x11]
mov byte [ebp - 0x365], al
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1f8]
call fcn.0040ac30
mov al, byte [ebp - 0x365]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret