Function at 0x10058180
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x1025e1a8
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.10055370
mov dword [ebx + 0x24], 1
mov eax, dword [0x1026c87c]
xor edi, edi
mov dword [esp + 0x5c], eax
mov dword [esp + 0x10], edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x54], edi
call fcn.100ba8b0
push str.MailInfo
lea ecx, [esp + 0x20]
mov byte [esp + 0x58], 1
call fcn.100baa00
lea ecx, [esi + 8]
lea edx, [esp + 0x14]
push ecx
push edx
call fcn.100a8e70
add esp, 8
mov eax, dword [eax]
lea ecx, [esp + 0x1c]
push eax
push 0x102bcb2c
push str.GUID
push ecx
mov byte [esp + 0x64], 2
call fcn.100baab0
add esp, 0x10
lea ecx, [esp + 0x14]
mov byte [esp + 0x54], 1
call fcn.1008ec90
mov edx, dword [esi + 0x18]
lea eax, [esp + 0x1c]
push edx
push 0x102b3870
push str.ProcID
push eax
call fcn.100baab0
mov ecx, dword [esi + 0x1c]
add esp, 0x10
lea edx, [esp + 0x1c]
push ecx
push 0x102b3870
push str.ProcBit
push edx
call fcn.100baab0
mov eax, dword [esi + 0x20]
add esp, 0x10
lea ecx, [esp + 0x1c]
push eax
push 0x102b3870
push str.Direction
push ecx
call fcn.100baab0
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.100baab0
mov edx, dword [esi + 0x30]
add esp, 0x14
lea eax, [esp + 0x1c]
push edx
push 0x102bcb2c
push str.From
push eax
call fcn.100baab0
mov ecx, dword [esi + 0x34]
add esp, 0x10
lea edx, [esp + 0x1c]
push ecx
push 0x102bcb2c
push 0x102c8c0c
push edx
call fcn.100baab0
mov eax, dword [esi + 0x38]
add esp, 0x10
lea ecx, [esp + 0x1c]
push eax
push 0x102bcb2c
push 0x102c8c04
push ecx
call fcn.100baab0
mov edx, dword [esi + 0x3c]
add esp, 0x10
lea eax, [esp + 0x1c]
push edx
push 0x102bcb2c
push str.Bccs
push eax
call fcn.100baab0
mov ecx, dword [esi + 0x40]
add esp, 0x10
lea edx, [esp + 0x1c]
push ecx
push 0x102bcb2c
push 0x102b7c9c
push edx
call fcn.100baab0
mov eax, dword [esi + 0x44]
add esp, 0x10
cmp dword [eax - 8], edi
jne 0x1005832a
mov ecx, dword [esi + 0x48]
cmp dword [ecx - 8], edi
jne 0x1005832a
xor eax, eax
jmp 0x1005832f
mov eax, 1
push eax
push 0x102b3a74
lea edx, [esp + 0x24]
push str.HasText
push edx
call fcn.100baab0
mov eax, dword [esi + 0x50]
add esp, 0x10
xor ebp, ebp
cmp eax, edi
jle 0x1005847f
push str.Attach
lea ecx, [esp + 0x20]
call fcn.100baa90
lea ecx, [esp + 0x1c]
call fcn.100bbc60
mov eax, dword [esi + 0x4c]
lea edx, [esp + 0x1c]
mov ecx, dword [edi + eax]
push ecx
push 0x102b3870
push 0x102c8bd0
push edx
call fcn.100baab0
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.100baab0
mov ecx, dword [esi + 0x4c]
add esp, 0x14
lea eax, [esp + 0x1c]
mov edx, dword [edi + ecx + 0x10]
push edx
push 0x102b3870
push str.Status
push eax
call fcn.100baab0
mov ecx, dword [esi + 0x4c]
add esp, 0x10
lea eax, [esp + 0x1c]
mov edx, dword [edi + ecx + 0x14]
push edx
push 0x102bcb2c
push str.Name
push eax
call fcn.100baab0
mov ecx, dword [esi + 0x4c]
add esp, 0x10
lea eax, [esp + 0x1c]
mov edx, dword [edi + ecx + 0x18]
push edx
push 0x102bcb2c
push str.Cache
push eax
call fcn.100baab0
mov ecx, dword [esi + 0x4c]
add esp, 0x10
lea eax, [esp + 0x1c]
mov edx, dword [edi + ecx + 0x1c]
push edx
push 0x102bcb2c
push str.DecryptPath
push eax
call fcn.100baab0
mov ecx, dword [esi + 0x4c]
add esp, 0x10
lea eax, [esp + 0x1c]
mov edx, dword [edi + ecx + 0x20]
push edx
push 0x102bcb2c
push str.DocWatermarkPath
push eax
call fcn.100baab0
mov ecx, dword [esi + 0x4c]
add esp, 0x10
lea eax, [esp + 0x1c]
mov edx, dword [edi + ecx + 0x24]
push edx
push 0x102bcb2c
push str.DecryptPath2
push eax
call fcn.100baab0
add esp, 0x10
lea ecx, [esp + 0x1c]
call fcn.100bbc90
mov eax, dword [esi + 0x50]
inc ebp
add edi, 0x28
cmp ebp, eax
jl 0x10058354
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x20]
call fcn.100ba9b0
push eax
lea ecx, [esp + 0x60]
mov byte [esp + 0x58], 3
call fcn.1008ee20
lea ecx, [esp + 0x14]
mov byte [esp + 0x54], 1
call fcn.1008ec90
lea ecx, [esp + 0x1c]
mov byte [esp + 0x54], 0
call fcn.100ba940
mov edx, dword [esp + 0x5c]
mov eax, dword [edx - 8]
test eax, eax
je 0x1005859a
lea eax, [esp + 0x18]
mov ecx, ebx
push eax
call fcn.10055c40
mov edi, dword [eax]
xor ebp, ebp
push ebp
push ebp
push 2
mov byte [esp + 0x60], 4
call fcn.10191750
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.1008ec90
cmp edi, 0xffffffff
je 0x100585be
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.1008f960
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
mov eax, dword [0x1030aa70]
je 0x100585e6
cmp eax, ebp
je 0x10058562
mov ecx, dword [esp + 0x14]
push ecx
push str.SaveMailInfo_after_write_file__dwWrite__lu_
push str.MailInfo
push 4
push 0x1030a1dc
call fcn.100a4680
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.10058640
test eax, eax
je 0x10058594
add esi, 0x48
push ebp
push esi
mov ecx, ebx
call fcn.10058640
test eax, eax
je 0x10058594
mov dword [esp + 0x10], 1
jmp 0x1005860a
mov dword [esp + 0x10], ebp
jmp 0x1005860a
mov eax, dword [0x1030aa70]
test eax, eax
je 0x1005860a
push str.SaveMailInfo_doc_is_empty
push str.MailInfo
push 4
push 0x1030a1dc
call fcn.100a4680
add esp, 0x10
jmp 0x1005860a
cmp dword [0x1030aa70], ebp
je 0x1005860a
push str.MailInfo.dat
push str.SaveMailInfo_create_file__s__fail
push str.MailInfo
push 4
push 0x1030a1dc
call fcn.100a4680
add esp, 0x14
jmp 0x1005860a
cmp eax, ebp
je 0x10058603
push str.SaveMailInfo_write_file_fail
push str.MailInfo
push 4
push 0x1030a1dc
call fcn.100a4680
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x5c]
mov dword [esp + 0x54], 0xffffffff
call fcn.1008ec90
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