Function at 0x406110
Capabilities:
Delete file
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x40e08b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x27c
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x10]
mov dword [esp + 0x1c], 1
call sub.MFC42.DLL_CString::CString_3
mov ebp, dword [esp + 0x2a0]
mov edi, dword [esp + 0x29c]
xor ebx, ebx
lea eax, [esp + 0x4c]
push ebx
push ebx
push eax
push ebp
push edi
mov dword [esp + 0x2a8], ebx
call dword [sym.imp.WININET.dll_FtpFindFirstFileA]
cmp eax, ebx
mov dword [esp + 0x28], eax
jne 0x4061bd
push ebp
lea ecx, [esp + 0x14]
push 0x412620
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x1c]
push edx
push 2
push esi
call fcn.00405580
push ebp
push 0x4125f0
call fcn.004047c0
add esp, 0x20
lea ecx, [esp + 0x10]
mov dword [esi + 0x7c], 0xb
mov dword [esp + 0x294], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x406466
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea eax, [esp + 0x34]
lea ecx, [esp + 0x60]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov edx, dword [esp + 0x3e]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x3a]
and edx, 0xffff
and eax, 0xffff
push edx
mov edx, dword [esp + 0x3a]
push eax
mov eax, dword [esp + 0x3c]
and ecx, 0xffff
and edx, 0xffff
push ecx
mov ecx, dword [esp + 0x78]
and eax, 0xffff
push edx
push eax
lea edx, [esp + 0x8c]
push ecx
push edx
lea eax, [esp + 0x2c]
push 0x4125a4
push eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x34]
push ecx
push 2
push esi
call fcn.00405580
mov edx, dword [esp + 0x9c]
mov eax, dword [esi + 0xe8]
add esp, 0x30
push edx
push ebx
push 0x406
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
push ebx
push 2
push 0x80000000
push ebp
push edi
call dword [sym.imp.WININET.dll_FtpOpenFileA]
mov edi, dword [esp + 0x2a4]
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push edi
push ecx
mov dword [esp + 0x24], eax
call fcn.00404660
add esp, 8
call fcn.00404550
add esp, 4
push ebx
push 0x80
push 2
push ebx
push 2
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, dword [esp + 0x2a0]
mov ebp, eax
push edx
lea eax, [esp + 0x14]
push 0x412598
push eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x1c]
push ecx
push 1
push esi
call fcn.00405580
add esp, 0x18
mov dword [esp + 0x14], 0x100
xor edi, edi
cmp dword [esi + 0x60], 1
jne 0x4063b1
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x190]
push 0x100
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp eax, ebx
je 0x406481
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x14]
push ebx
push edx
lea ecx, [esp + 0x194]
push eax
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], ebx
add edi, eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], eax
fild qword [esp + 0x20]
mov dword [esp + 0x30], ebx
sub esp, 8
fild qword [esp + 0x34]
lea edx, [esp + 0x80]
fdivp st(1)
fmul qword [0x40fca0]
fstp qword [esp]
push edi
push eax
push edx
lea eax, [esp + 0x24]
push 0x412568
push eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x2c]
add esp, 0x1c
push 2
push ecx
mov ecx, esi
call fcn.00405540
cmp byte [esp + 0x2a8], bl
je 0x406387
mov edx, dword [esp + 0x10]
push ebx
push edx
mov ecx, esi
call fcn.004060f0
mov eax, dword [esi + 0xe8]
push ebx
push edi
push 0x402
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [esp + 0x14], 0x100
je 0x4062ce
cmp dword [esi + 0x60], ebx
je 0x40641e
mov eax, dword [esp + 0x2a0]
lea ecx, [esp + 0x10]
push eax
push 0x41255c
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x1c]
push edx
push 1
push esi
call fcn.00405580
mov eax, dword [esp + 0x28]
mov ecx, dword [esi + 0xa8]
add esp, 0x18
push eax
push ebx
push 0x181
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
lea edx, [esp + 0x44]
lea eax, [esp + 0x60]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
lea ecx, [esp + 0x44]
push ecx
push ebx
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov dword [esi + 0x7c], ebx
mov dword [esp + 0x1c], 1
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x60], ebx
jne 0x40644e
mov eax, dword [esp + 0x2a4]
mov dword [esi + 0x7c], 0xc
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov dword [esp + 0x1c], ebx
lea ecx, [esp + 0x10]
mov dword [esp + 0x294], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x288
ret 0x10
mov ecx, dword [esp + 0x18]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ecx
call edi
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x28]
push edx
call edi
lea ecx, [esp + 0x10]
mov dword [esi + 0x7c], 0x65
mov dword [esp + 0x294], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x406466