Function at 0x10058670
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x10260178
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.10055760
mov dword [ebx + 0x24], 1
mov eax, dword [0x1026e87c]
xor edi, edi
mov dword [esp + 0x5c], eax
mov dword [esp + 0x10], edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x54], edi
call fcn.100bc810
push str.MailInfo
lea ecx, [esp + 0x20]
mov byte [esp + 0x58], 1
call fcn.100bc960
lea ecx, [esi + 8]
lea edx, [esp + 0x14]
push ecx
push edx
call fcn.100aadd0
add esp, 8
mov eax, dword [eax]
lea ecx, [esp + 0x1c]
push eax
push 0x102bebbc
push str.GUID
push ecx
mov byte [esp + 0x64], 2
call fcn.100bca10
add esp, 0x10
lea ecx, [esp + 0x14]
mov byte [esp + 0x54], 1
call fcn.10090bf0
mov edx, dword [esi + 0x18]
lea eax, [esp + 0x1c]
push edx
push 0x102b5870
push str.ProcID
push eax
call fcn.100bca10
mov ecx, dword [esi + 0x1c]
add esp, 0x10
lea edx, [esp + 0x1c]
push ecx
push 0x102b5870
push str.ProcBit
push edx
call fcn.100bca10
mov eax, dword [esi + 0x20]
add esp, 0x10
lea ecx, [esp + 0x1c]
push eax
push 0x102b5870
push str.Direction
push ecx
call fcn.100bca10
mov edx, dword [esi + 0x2c]
mov eax, dword [esi + 0x28]
add esp, 0x10
lea ecx, [esp + 0x1c]
push edx
push eax
push str._I64u
push str.MailSize
push ecx
call fcn.100bca10
mov edx, dword [esi + 0x30]
add esp, 0x14
lea eax, [esp + 0x1c]
push edx
push 0x102bebbc
push str.From
push eax
call fcn.100bca10
mov ecx, dword [esi + 0x34]
add esp, 0x10
lea edx, [esp + 0x1c]
push ecx
push 0x102bebbc
push 0x102cac98
push edx
call fcn.100bca10
mov eax, dword [esi + 0x38]
add esp, 0x10
lea ecx, [esp + 0x1c]
push eax
push 0x102bebbc
push 0x102cac90
push ecx
call fcn.100bca10
mov edx, dword [esi + 0x3c]
add esp, 0x10
lea eax, [esp + 0x1c]
push edx
push 0x102bebbc
push str.Bccs
push eax
call fcn.100bca10
mov ecx, dword [esi + 0x40]
add esp, 0x10
lea edx, [esp + 0x1c]
push ecx
push 0x102bebbc
push 0x102b9d2c
push edx
call fcn.100bca10
mov eax, dword [esi + 0x44]
add esp, 0x10
cmp dword [eax - 8], edi
jne 0x1005881a
mov ecx, dword [esi + 0x48]
cmp dword [ecx - 8], edi
jne 0x1005881a
xor eax, eax
jmp 0x1005881f
mov eax, 1
push eax
push 0x102b5a74
lea edx, [esp + 0x24]
push str.HasText
push edx
call fcn.100bca10
mov eax, dword [esi + 0x50]
add esp, 0x10
xor ebp, ebp
cmp eax, edi
jle 0x1005898e
push str.Attach
lea ecx, [esp + 0x20]
call fcn.100bc9f0
lea ecx, [esp + 0x1c]
call fcn.100bdbc0
mov eax, dword [esi + 0x4c]
lea edx, [esp + 0x1c]
mov ecx, dword [edi + eax]
push ecx
push 0x102b5870
push 0x102cac5c
push edx
call fcn.100bca10
mov eax, dword [esi + 0x4c]
add esp, 0x10
mov ecx, dword [edi + eax + 0xc]
push ecx
mov edx, dword [edi + eax + 8]
lea eax, [esp + 0x20]
push edx
push str._I64u
push str.Size
push eax
call fcn.100bca10
mov ecx, dword [esi + 0x4c]
add esp, 0x14
lea eax, [esp + 0x1c]
mov edx, dword [edi + ecx + 0x10]
push edx
push 0x102b5870
push str.Status
push eax
call fcn.100bca10
mov ecx, dword [esi + 0x4c]
add esp, 0x10
lea eax, [esp + 0x1c]
mov edx, dword [edi + ecx + 0x14]
push edx
push 0x102bebbc
push str.Name
push eax
call fcn.100bca10
mov ecx, dword [esi + 0x4c]
add esp, 0x10
lea eax, [esp + 0x1c]
mov edx, dword [edi + ecx + 0x18]
push edx
push 0x102bebbc
push str.Cache
push eax
call fcn.100bca10
mov ecx, dword [esi + 0x4c]
add esp, 0x10
lea eax, [esp + 0x1c]
mov edx, dword [edi + ecx + 0x1c]
push edx
push 0x102bebbc
push str.DecryptPath
push eax
call fcn.100bca10
mov ecx, dword [esi + 0x4c]
add esp, 0x10
lea eax, [esp + 0x1c]
mov edx, dword [edi + ecx + 0x20]
push edx
push 0x102bebbc
push str.DocWatermarkPath
push eax
call fcn.100bca10
mov ecx, dword [esi + 0x4c]
add esp, 0x10
lea eax, [esp + 0x1c]
mov edx, dword [edi + ecx + 0x24]
push edx
push 0x102bebbc
push str.DecryptPath2
push eax
call fcn.100bca10
mov ecx, dword [esi + 0x4c]
add esp, 0x10
mov edx, dword [edi + ecx + 0x28]
push edx
push 0x102bebbc
lea eax, [esp + 0x24]
push str.EncryptXml
push eax
call fcn.100bca10
add esp, 0x10
lea ecx, [esp + 0x1c]
call fcn.100bdbf0
mov eax, dword [esi + 0x50]
inc ebp
add edi, 0x30
cmp ebp, eax
jl 0x10058844
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x20]
call fcn.100bc910
push eax
lea ecx, [esp + 0x60]
mov byte [esp + 0x58], 3
call fcn.10090d80
lea ecx, [esp + 0x14]
mov byte [esp + 0x54], 1
call fcn.10090bf0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x54], 0
call fcn.100bc8a0
mov edx, dword [esp + 0x5c]
mov eax, dword [edx - 8]
test eax, eax
je 0x10058aa9
lea eax, [esp + 0x18]
mov ecx, ebx
push eax
call fcn.10056040
mov edi, dword [eax]
xor ebp, ebp
push ebp
push ebp
push 2
mov byte [esp + 0x60], 4
call fcn.101936b0
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.10090bf0
cmp edi, 0xffffffff
je 0x10058acd
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x14], ebp
lea edx, [esp + 0x14]
push ebp
mov eax, dword [ecx - 8]
push edx
add eax, eax
lea ecx, [esp + 0x64]
push eax
push ebp
call fcn.100918c0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
mov eax, dword [0x1030ceb0]
je 0x10058af5
cmp eax, ebp
je 0x10058a71
mov ecx, dword [esp + 0x14]
push ecx
push str.SaveMailInfo_after_write_file__dwWrite__lu_
push str.MailInfo
push 4
push 0x1030c61c
call fcn.100a65e0
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi + 0x44]
push 1
push eax
mov ecx, ebx
call fcn.10058b50
test eax, eax
je 0x10058aa3
add esi, 0x48
push ebp
push esi
mov ecx, ebx
call fcn.10058b50
test eax, eax
je 0x10058aa3
mov dword [esp + 0x10], 1
jmp 0x10058b19
mov dword [esp + 0x10], ebp
jmp 0x10058b19
mov eax, dword [0x1030ceb0]
test eax, eax
je 0x10058b19
push str.SaveMailInfo_doc_is_empty
push str.MailInfo
push 4
push 0x1030c61c
call fcn.100a65e0
add esp, 0x10
jmp 0x10058b19
cmp dword [0x1030ceb0], ebp
je 0x10058b19
push str.MailInfo.dat
push str.SaveMailInfo_create_file__s__fail
push str.MailInfo
push 4
push 0x1030c61c
call fcn.100a65e0
add esp, 0x14
jmp 0x10058b19
cmp eax, ebp
je 0x10058b12
push str.SaveMailInfo_write_file_fail
push str.MailInfo
push 4
push 0x1030c61c
call fcn.100a65e0
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x5c]
mov dword [esp + 0x54], 0xffffffff
call fcn.10090bf0
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