Function at 0x10046c00
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x1018e8e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x58]
mov ebx, ecx
push edi
push esi
lea ecx, [ebx + 0x28]
call fcn.10044ca0
mov dword [ebx + 0x24], 1
mov eax, dword [0x1019b4e4]
xor edi, edi
mov dword [esp + 0x5c], eax
mov dword [esp + 0x10], edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x54], edi
call fcn.100a0fd0
push str.MailInfo
lea ecx, [esp + 0x20]
mov byte [esp + 0x58], 1
call fcn.100a1120
lea ecx, [esi + 8]
lea edx, [esp + 0x14]
push ecx
push edx
call fcn.1008fd10
add esp, 8
mov eax, dword [eax]
lea ecx, [esp + 0x1c]
push eax
push 0x101c8aec
push str.GUID
push ecx
mov byte [esp + 0x64], 2
call fcn.100a11d0
add esp, 0x10
lea ecx, [esp + 0x14]
mov byte [esp + 0x54], 1
call fcn.10077520
mov edx, dword [esi + 0x18]
lea eax, [esp + 0x1c]
push edx
push 0x101c0f48
push str.Direction
push eax
call fcn.100a11d0
mov ecx, dword [esi + 0x24]
mov edx, dword [esi + 0x20]
add esp, 0x10
lea eax, [esp + 0x1c]
push ecx
push edx
push str._I64u
push str.MailSize
push eax
call fcn.100a11d0
mov ecx, dword [esi + 0x28]
add esp, 0x14
lea edx, [esp + 0x1c]
push ecx
push 0x101c8aec
push str.From
push edx
call fcn.100a11d0
mov eax, dword [esi + 0x2c]
add esp, 0x10
lea ecx, [esp + 0x1c]
push eax
push 0x101c8aec
push 0x101d1b38
push ecx
call fcn.100a11d0
mov edx, dword [esi + 0x30]
add esp, 0x10
lea eax, [esp + 0x1c]
push edx
push 0x101c8aec
push 0x101d1b30
push eax
call fcn.100a11d0
mov ecx, dword [esi + 0x34]
add esp, 0x10
lea edx, [esp + 0x1c]
push ecx
push 0x101c8aec
push str.Bccs
push edx
call fcn.100a11d0
mov eax, dword [esi + 0x38]
add esp, 0x10
lea ecx, [esp + 0x1c]
push eax
push 0x101c8aec
push str.Subject
push ecx
call fcn.100a11d0
mov edx, dword [esi + 0x3c]
add esp, 0x10
cmp dword [edx - 8], edi
jne 0x10046d74
mov eax, dword [esi + 0x40]
cmp dword [eax - 8], edi
jne 0x10046d74
xor eax, eax
jmp 0x10046d79
mov eax, 1
push eax
push 0x101c114c
lea ecx, [esp + 0x24]
push str.HasText
push ecx
call fcn.100a11d0
mov eax, dword [esi + 0x48]
add esp, 0x10
xor ebp, ebp
cmp eax, edi
jle 0x10046e8b
push str.Attach
lea ecx, [esp + 0x20]
call fcn.100a11b0
lea ecx, [esp + 0x1c]
call fcn.100a2380
mov edx, dword [esi + 0x44]
lea ecx, [esp + 0x1c]
mov eax, dword [edi + edx]
push eax
push 0x101c0f48
push 0x101d1afc
push ecx
call fcn.100a11d0
mov edx, dword [esi + 0x44]
add esp, 0x10
mov eax, dword [edi + edx + 0xc]
push eax
mov ecx, dword [edi + edx + 8]
lea edx, [esp + 0x20]
push ecx
push str._I64u
push str.Size
push edx
call fcn.100a11d0
mov eax, dword [esi + 0x44]
add esp, 0x14
lea edx, [esp + 0x1c]
mov ecx, dword [edi + eax + 0x10]
push ecx
push 0x101c0f48
push str.Status
push edx
call fcn.100a11d0
mov eax, dword [esi + 0x44]
add esp, 0x10
lea edx, [esp + 0x1c]
mov ecx, dword [edi + eax + 0x14]
push ecx
push 0x101c8aec
push str.Name
push edx
call fcn.100a11d0
mov eax, dword [esi + 0x44]
add esp, 0x10
lea edx, [esp + 0x1c]
mov ecx, dword [edi + eax + 0x18]
push ecx
push 0x101c8aec
push str.Cache
push edx
call fcn.100a11d0
mov eax, dword [esi + 0x44]
add esp, 0x10
lea edx, [esp + 0x1c]
mov ecx, dword [edi + eax + 0x1c]
push ecx
push 0x101c8aec
push str.DecryptPath
push edx
call fcn.100a11d0
add esp, 0x10
lea ecx, [esp + 0x1c]
call fcn.100a23b0
mov eax, dword [esi + 0x48]
inc ebp
add edi, 0x20
cmp ebp, eax
jl 0x10046d9e
lea eax, [esp + 0x14]
lea ecx, [esp + 0x1c]
push eax
call fcn.100a10d0
push eax
lea ecx, [esp + 0x60]
mov byte [esp + 0x58], 3
call fcn.100776b0
lea ecx, [esp + 0x14]
mov byte [esp + 0x54], 1
call fcn.10077520
lea ecx, [esp + 0x1c]
mov byte [esp + 0x54], 0
call fcn.100a1060
mov ecx, dword [esp + 0x5c]
mov eax, dword [ecx - 8]
test eax, eax
je 0x10046fa9
lea edx, [esp + 0x18]
mov ecx, ebx
push edx
call fcn.10045370
mov edi, dword [eax]
push 0
push 0
push 1
mov byte [esp + 0x60], 4
call fcn.100bc880
push eax
push 1
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
lea ecx, [esp + 0x18]
mov edi, eax
mov byte [esp + 0x54], 0
call fcn.10077520
cmp edi, 0xffffffff
je 0x10046fcd
mov eax, dword [esp + 0x5c]
xor ebp, ebp
mov dword [esp + 0x14], ebp
lea ecx, [esp + 0x14]
mov eax, dword [eax - 8]
push ebp
push ecx
lea ecx, [esp + 0x64]
lea edx, [eax + eax]
push edx
push ebp
call fcn.100781f0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
mov eax, dword [0x10201328]
je 0x10046ff6
cmp eax, ebp
je 0x10046f71
mov eax, dword [esp + 0x14]
push eax
push str.SaveMailInfo_after_write_file__dwWrite__lu_
push str.MailInfo
push 4
push 0x10200a94
call fcn.1008b760
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi + 0x3c]
push 1
push eax
mov ecx, ebx
call fcn.10047050
test eax, eax
je 0x10046fa3
add esi, 0x40
push ebp
push esi
mov ecx, ebx
call fcn.10047050
test eax, eax
je 0x10046fa3
mov dword [esp + 0x10], 1
jmp 0x1004701a
mov dword [esp + 0x10], ebp
jmp 0x1004701a
mov eax, dword [0x10201328]
test eax, eax
je 0x1004701a
push str.SaveMailInfo_doc_is_empty
push str.MailInfo
push 4
push 0x10200a94
call fcn.1008b760
add esp, 0x10
jmp 0x1004701a
mov eax, dword [0x10201328]
test eax, eax
je 0x1004701a
push str.MailInfo.dat
push str.SaveMailInfo_create_file__s__fail
push str.MailInfo
push 4
push 0x10200a94
call fcn.1008b760
add esp, 0x14
jmp 0x1004701a
cmp eax, ebp
je 0x10047013
push str.SaveMailInfo_write_file_fail
push str.MailInfo
push 4
push 0x10200a94
call fcn.1008b760
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x5c]
mov dword [esp + 0x54], 0xffffffff
call fcn.10077520
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x48
ret 4