Function at 0x1002a405
Capabilities:
Write file on windows

Disassembly:
push 0x40
mov eax, 0x101d0fa5
call fcn.10099809
mov edi, ecx
mov dword [ebp - 0x14], edi
mov esi, dword [ebp + 8]
push esi
lea ecx, [edi + 0x28]
call fcn.1002a2d5
and dword [ebp - 0x18], 0
mov dword [edi + 0x24], 1
mov eax, dword [0x10211078]
mov dword [ebp - 0x10], eax
and dword [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.10150580
mov byte [ebp - 4], 1
push str.MailInfo
lea ecx, [ebp - 0x4c]
call fcn.101506d0
lea eax, [esi + 8]
push eax
lea eax, [ebp + 8]
push eax
call fcn.100e2ca0
mov byte [ebp - 4], 2
push dword [eax]
mov edi, 0x101e7ef8
push edi
lea eax, [ebp - 0x4c]
push str.GUID
push eax
call fcn.10150780
add esp, 0x18
mov byte [ebp - 4], 1
lea ecx, [ebp + 8]
call fcn.100cef50
push dword [esi + 0x18]
mov ebx, 0x101e6ac8
push ebx
lea eax, [ebp - 0x4c]
push str.ProcID
push eax
call fcn.10150780
push dword [esi + 0x1c]
lea eax, [ebp - 0x4c]
push ebx
push str.ProcBit
push eax
call fcn.10150780
push dword [esi + 0x20]
lea eax, [ebp - 0x4c]
push ebx
push str.Direction
push eax
call fcn.10150780
push dword [esi + 0x2c]
lea eax, [ebp - 0x4c]
push dword [esi + 0x28]
push str._I64u
push str.MailSize
push eax
call fcn.10150780
add esp, 0x44
push dword [esi + 0x30]
lea eax, [ebp - 0x4c]
push edi
push str.From
push eax
call fcn.10150780
push dword [esi + 0x34]
lea eax, [ebp - 0x4c]
push edi
push 0x101ef298
push eax
call fcn.10150780
push dword [esi + 0x38]
lea eax, [ebp - 0x4c]
push edi
push 0x101ef290
push eax
call fcn.10150780
push dword [esi + 0x3c]
push edi
lea eax, [ebp - 0x4c]
push str.Bccs
push eax
call fcn.10150780
add esp, 0x40
push dword [esi + 0x40]
lea eax, [ebp - 0x4c]
push edi
push str.Subject
push eax
call fcn.10150780
mov ecx, dword [esi + 0x44]
xor eax, eax
add esp, 0x10
cmp dword [ecx - 8], eax
jne 0x1002a551
mov ecx, dword [esi + 0x48]
cmp dword [ecx - 8], eax
je 0x1002a554
xor eax, eax
inc eax
push eax
push 0x101e80d4
lea eax, [ebp - 0x4c]
push str.HasText
push eax
call fcn.10150780
and dword [ebp + 8], 0
add esp, 0x10
lea ecx, [esi + 0x4c]
call fcn.100056e5
test eax, eax
jle 0x1002a6b6
push str.Attach
lea ecx, [ebp - 0x4c]
call fcn.10150760
lea ecx, [ebp - 0x4c]
call fcn.10151930
push dword [ebp + 8]
lea ecx, [esi + 0x4c]
call fcn.10006ccc
push dword [eax]
lea eax, [ebp - 0x4c]
push ebx
push 0x101ef24c
push eax
call fcn.10150780
add esp, 0x10
push dword [ebp + 8]
lea ecx, [esi + 0x4c]
call fcn.10006ccc
push dword [eax + 0xc]
push dword [eax + 8]
lea eax, [ebp - 0x4c]
push str._I64u
push str.Size
push eax
call fcn.10150780
add esp, 0x14
push dword [ebp + 8]
lea ecx, [esi + 0x4c]
call fcn.10006ccc
push dword [eax + 0x10]
lea eax, [ebp - 0x4c]
push ebx
push str.Status
push eax
call fcn.10150780
add esp, 0x10
push dword [ebp + 8]
lea ecx, [esi + 0x4c]
call fcn.10006ccc
push dword [eax + 0x14]
lea eax, [ebp - 0x4c]
push edi
push str.Name
push eax
call fcn.10150780
add esp, 0x10
push dword [ebp + 8]
lea ecx, [esi + 0x4c]
call fcn.10006ccc
push dword [eax + 0x18]
lea eax, [ebp - 0x4c]
push edi
push str.Cache
push eax
call fcn.10150780
add esp, 0x10
push dword [ebp + 8]
lea ecx, [esi + 0x4c]
call fcn.10006ccc
push dword [eax + 0x1c]
lea eax, [ebp - 0x4c]
push edi
push str.DecryptPath
push eax
call fcn.10150780
add esp, 0x10
push dword [ebp + 8]
lea ecx, [esi + 0x4c]
call fcn.10006ccc
push dword [eax + 0x20]
lea eax, [ebp - 0x4c]
push edi
push str.DocWatermarkPath
push eax
call fcn.10150780
add esp, 0x10
push dword [ebp + 8]
lea ecx, [esi + 0x4c]
call fcn.10006ccc
push dword [eax + 0x24]
push edi
lea eax, [ebp - 0x4c]
push str.DecryptPath2
push eax
call fcn.10150780
add esp, 0x10
lea ecx, [ebp - 0x4c]
call fcn.10151960
inc dword [ebp + 8]
lea ecx, [esi + 0x4c]
call fcn.100056e5
cmp dword [ebp + 8], eax
jl 0x1002a57f
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x4c]
call fcn.10150680
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x10]
call fcn.100cf0e0
mov byte [ebp - 4], 1
lea ecx, [ebp + 8]
call fcn.100cef50
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.10150610
mov eax, dword [ebp - 0x10]
xor ebx, ebx
cmp dword [eax - 8], ebx
jne 0x1002a71b
cmp dword [0x10269fe8], ebx
je 0x1002a82d
push str.SaveMailInfo_doc_is_empty
push str.MailInfo
push 4
push 0x10269f7c
call fcn.10025270
add esp, 0x10
jmp 0x1002a82d
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x1c]
push eax
call fcn.10028243
mov byte [ebp - 4], 4
mov edi, dword [eax]
push ebx
push ebx
push 2
call fcn.100f7cc0
push eax
push 1
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.100cef50
cmp edi, 0xffffffff
jne 0x1002a787
cmp dword [0x10269fe8], ebx
je 0x1002a82d
push str.MailInfo.dat
push str.SaveMailInfo_create_file__s__fail
push str.MailInfo
push 4
push 0x10269f7c
call fcn.10025270
add esp, 0x14
jmp 0x1002a82d
mov eax, dword [ebp - 0x10]
push ebx
mov dword [ebp + 8], ebx
mov eax, dword [eax - 8]
lea ecx, [ebp + 8]
push ecx
add eax, eax
push eax
push ebx
lea ecx, [ebp - 0x10]
call fcn.100cfc20
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1002a7d7
cmp dword [0x10269fe8], ebx
je 0x1002a7ce
push str.SaveMailInfo_write_file_fail
push str.MailInfo
push 4
push 0x10269f7c
call fcn.10025270
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1002a82d
cmp dword [0x10269fe8], ebx
je 0x1002a7fb
push dword [ebp + 8]
push str.SaveMailInfo_after_write_file__dwWrite__lu_
push str.MailInfo
push 4
push 0x10269f7c
call fcn.10025270
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x14]
xor edi, edi
inc edi
push edi
lea eax, [esi + 0x44]
push eax
call fcn.10028408
test eax, eax
je 0x1002a82a
mov ecx, dword [ebp - 0x14]
push ebx
add esi, 0x48
push esi
call fcn.10028408
mov dword [ebp - 0x18], edi
test eax, eax
jne 0x1002a82d
mov dword [ebp - 0x18], ebx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.100cef50
mov eax, dword [ebp - 0x18]
call fcn.100998e1
ret 4