Function at 0x10050583
Capabilities:
Delete file

Disassembly:
push 0x98
mov eax, 0x101ce7ec
call fcn.10094ac6
mov dword [ebp - 0x10], ecx
and dword [ebp - 0x14], 0
push str.DecryptOrEncrypteMailAttach_____
mov edi, str.OnItemSend
push edi
push 0xffffffffffffffff
mov ebx, 0x1025eddc
push ebx
call fcn.10023e87
add esp, 0x10
lea ecx, [ebp - 0x74]
call fcn.100cfb20
and dword [ebp - 4], 0
lea ecx, [ebp - 0x64]
call fcn.100cfb20
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x84]
call fcn.100cfb20
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x3c]
call fcn.100d7620
mov byte [ebp - 4], 3
push dword [ebp + 0x20]
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x74]
push eax
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call fcn.1004f337
test eax, eax
jne 0x1005066a
push str.No_Attach_DecryptOrEncrypt_
push edi
push 0xffffffffffffffff
push ebx
call fcn.10023e87
add esp, 0x10
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x3c]
call fcn.100d7630
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x84]
call fcn.100cfb30
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x64]
call fcn.100cfb30
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x74]
call fcn.100cfb30
xor eax, eax
call fcn.10094b9e
ret 0x1c
cmp dword [ebp + 0x18], 0
je 0x100508da
call fcn.1003c0cc
cmp eax, 1
je 0x1005082d
mov eax, dword [0x102069b8]
and dword [ebp + 0x1c], 0
mov dword [ebp + 8], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x10]
and dword [ebp + 0x20], 0
push 1
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp + 0x20]
push eax
push esi
call fcn.10043147
test eax, eax
je 0x1005087f
cmp dword [ebp + 0x20], 0
je 0x1005087f
lea ecx, [ebp - 0x28]
call fcn.1005eb88
mov byte [ebp - 4], 5
push dword [ebp + 0x20]
lea ecx, [ebp - 0x28]
call fcn.1005ebf2
call fcn.1003c0cc
cmp eax, 2
jne 0x1005072f
cmp dword [ebp - 0x18], 1
jne 0x100506eb
mov eax, dword [ebp - 0x24]
jmp 0x100506f4
cmp dword [ebp - 0x18], 2
jne 0x100506fd
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
push eax
call dword [ecx + 0xd8]
cmp dword [ebp - 0x18], 1
jne 0x10050714
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1e8]
jmp 0x100507c1
cmp dword [ebp - 0x18], 2
jne 0x100507c1
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x168]
jmp 0x100507c1
call fcn.1003c0cc
cmp eax, 3
je 0x10050743
call fcn.1003c0cc
cmp eax, 4
jne 0x100507c1
and dword [ebp + 0x18], 0
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x150]
mov ecx, dword [eax]
lea edx, [ebp + 0x18]
push edx
push 5
push eax
call dword [ecx + 0x40]
xor ecx, ecx
cmp dword [ebp + 0x18], ecx
je 0x100507b5
cmp dword [ebp - 0x18], 1
jne 0x10050772
mov eax, dword [ebp - 0x24]
jmp 0x1005077b
cmp dword [ebp - 0x18], 2
jne 0x10050785
mov eax, dword [ebp - 0x20]
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0xb8]
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x28]
push eax
call fcn.1004125a
cmp dword [ebp - 0x18], 1
jne 0x1005079c
mov eax, dword [ebp - 0x24]
jmp 0x100507a5
cmp dword [ebp - 0x18], 2
jne 0x100507b5
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
lea edx, [ebp + 0x14]
push edx
push dword [ebp + 0x18]
push eax
call dword [ecx + 0xd0]
mov byte [ebp - 4], 5
lea ecx, [ebp + 0x18]
call fcn.1003df26
cmp dword [esi + 0x10], 1
jne 0x100507d5
mov eax, dword [esi + 4]
mov ecx, dword [eax]
push 1
push eax
call dword [ecx + 0x10c]
cmp dword [ebp + 0x1c], 0
je 0x10050815
push 0xffffffffffffffff
lea ecx, [ebp - 0x54]
call fcn.100104e2
mov byte [ebp - 4], 8
push dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
call fcn.1003c9e3
push dword [ebp + 8]
push eax
push str.DecryptOrEncrypteMailAttach_DelFile___d___s_
push edi
push 0xffffffffffffffff
push ebx
call fcn.10023e87
add esp, 0x18
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x54]
call fcn.1001050e
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x28]
call fcn.1005eb15
mov byte [ebp - 4], 3
lea ecx, [ebp + 8]
call fcn.100ca200
mov ecx, dword [ebp - 0x10]
lea eax, [ecx + 0x698]
push eax
push 1
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.1004b15c
mov ecx, dword [ebp - 0x10]
lea eax, [ecx + 0x6a8]
cmp dword [eax], 0
jne 0x10050c90
mov dword [eax], 1
push 0xffff
lea eax, [ecx + 0x698]
push eax
push esi
call fcn.1004aae5
mov dword [ebp - 0x14], eax
jmp 0x10050c90
push 0
push str.DecryptOrEncrypteMailAttach_pIDispPatchOrg_Err__08x_
push edi
push 0xffffffffffffffff
push ebx
call fcn.10023e87
add esp, 0x14
mov byte [ebp - 4], 3
lea ecx, [ebp + 8]
call fcn.100ca200
xor esi, esi
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x3c]
call fcn.100d7630
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x84]
call fcn.100cfb30
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x64]
call fcn.100cfb30
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x74]
call fcn.100cfb30
mov eax, esi
jmp 0x10050662
lea ecx, [ebp - 0x4c]
call fcn.100cfb20
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x24]
call fcn.100cfb20
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x94]
call fcn.100d7620
mov byte [ebp - 4], 0xb
cmp dword [ebp - 0x38], 0
jle 0x10050b86
call fcn.1003c355
test eax, eax
je 0x10050b86
cmp dword [esi + 0x10], 1
mov dword [ebp - 0x2c], 2
jne 0x10050939
mov eax, dword [esi + 4]
mov ecx, dword [eax]
lea edx, [ebp - 0x2c]
push edx
push eax
call dword [ecx + 0x1f4]
mov edi, eax
jmp 0x1005093e
mov edi, 0x80004005
test edi, edi
jl 0x1005094c
cmp dword [ebp - 0x2c], 3
je 0x10050b86
and dword [ebp + 0x20], 0
mov byte [ebp - 4], 0xd
mov eax, dword [esi + 0x10]
cmp eax, 1
jne 0x10050961
mov esi, dword [esi + 4]
jmp 0x10050969
cmp eax, 2
jne 0x10050975
mov esi, dword [esi + 8]
mov eax, dword [esi]
lea ecx, [ebp + 0x20]
push ecx
push esi
call dword [eax + 0x30]
mov edi, eax
push dword [ebp + 0x20]
push edi
push str.DecryptOrEncrypteMailAttach_get_Attachments__lx___p_
push str.OnItemAdd
push 0xffffffffffffffff
push ebx
call fcn.10023e87
add esp, 0x18
test edi, edi
jl 0x10050b7a
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x10050b7a
and dword [ebp - 0x14], 0
mov ecx, dword [eax]
lea edx, [ebp - 0x14]
push edx
push eax
call dword [ecx + 0x2c]
test eax, eax
jl 0x10050b5a
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x38]
jle 0x10050b5a
xor ecx, ecx
inc ecx
cmp eax, ecx
mov dword [ebp + 0x1c], ecx
jl 0x10050b5a
xor eax, eax
cmp dword [ebp - 0x38], eax
jle 0x100509ea
mov edx, dword [ebp - 0x3c]
cmp ecx, dword [edx + eax*4]
je 0x10050b17
inc eax
cmp eax, dword [ebp - 0x38]
jl 0x100509d8
and dword [ebp + 0x18], 0
mov byte [ebp - 4], 0xf
push 3
pop eax
mov word [ebp - 0xa4], ax
xor eax, eax
inc eax
mov word [ebp - 0xa2], ax
xor eax, eax
lea edi, [ebp - 0xa0]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp + 0x20]
lea edx, [ebp + 0x18]
push edx
mov dword [ebp - 0x9c], ecx
mov ecx, dword [eax]
sub esp, 0x10
mov edi, esp
lea esi, [ebp - 0xa4]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push eax
movsd dword es:[edi], dword [esi]
call dword [ecx + 0x30]
test eax, eax
jl 0x10050b4e
and dword [ebp + 0xc], 0
mov byte [ebp - 4], 0x10
lea eax, [ebp + 0xc]
push eax
push ecx
lea eax, [ebp + 0x18]
mov ecx, esp
mov dword [ebp - 0x50], esp
push eax
call fcn.10041acf
mov byte [ebp - 4], 0x11
mov byte [ebp - 4], 0x10
mov ecx, dword [ebp - 0x10]
call fcn.10046d85
test eax, eax
jne 0x10050afe
mov eax, dword [0x102069b8]
mov dword [ebp + 0x10], eax
mov byte [ebp - 4], 0x12
mov eax, dword [0x102069b8]
mov dword [ebp + 0x14], eax
mov byte [ebp - 4], 0x13
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x1c]
lea eax, [ebp + 0x18]
push ecx
mov ecx, esp
mov dword [ebp - 0x50], esp
push eax
call fcn.10041acf
mov byte [ebp - 4], 0x14
mov byte [ebp - 4], 0x13
mov ecx, dword [ebp - 0x10]
call fcn.10041364
test eax, eax
je 0x10050b29
lea eax, [ebp + 0x10]
push eax
push dword [ebp - 0x48]
lea ecx, [ebp - 0x4c]
call fcn.100d0130
lea eax, [ebp + 0x14]
push eax
push dword [ebp - 0x20]
lea ecx, [ebp - 0x24]
call fcn.100d0130
push dword [ebp + 0x1c]
lea ecx, [ebp - 0x94]
push dword [ebp - 0x90]
call fcn.100d7860
mov byte [ebp - 4], 0x12
lea ecx, [ebp + 0x14]
call fcn.100ca200
mov byte [ebp - 4], 0x10
lea ecx, [ebp + 0x10]
call fcn.100ca200
mov byte [ebp - 4], 0xf
push dword [ebp + 0xc]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov byte [ebp - 4], 0xd
lea ecx, [ebp + 0x18]
call fcn.1003df70
mov ecx, dword [ebp + 0x1c]
inc ecx
cmp ecx, dword [ebp - 0x14]
mov dword [ebp + 0x1c], ecx
jle 0x100509d1
jmp 0x10050b5a
mov byte [ebp - 4], 0x12
lea ecx, [ebp + 0x14]
call fcn.100ca200
mov byte [ebp - 4], 0x10
lea ecx, [ebp + 0x10]
call fcn.100ca200
mov byte [ebp - 4], 0xf
push dword [ebp + 0xc]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov byte [ebp - 4], 0xd
lea ecx, [ebp + 0x18]
call fcn.1003df70
mov ecx, dword [ebp - 0x10]
lea eax, [ecx + 0x6ac]
push eax
push 4
lea eax, [ebp - 0x94]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.1004b15c
mov byte [ebp - 4], 0xb
lea ecx, [ebp + 0x20]
call fcn.1003df4b
mov esi, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x10]
add esi, 0x6ac
push esi
push 1
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.1004b15c
mov ecx, dword [ebp - 0x10]
push 0xffff
push esi
push dword [ebp + 8]
call fcn.1004aae5
mov edi, dword [ebp - 0x48]
mov dword [ebp - 0x14], eax
jmp 0x10050be9
mov eax, dword [ebp - 0x4c]
push dword [eax + edi*4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x4c]
push dword [eax + edi*4]
push str.delete_temp_file___s_
push str.OnItemSend
push 0xffffffffffffffff
push ebx
call fcn.10023e87
add esp, 0x14
dec edi
jns 0x10050bc2
mov ecx, esi
call fcn.1003d730
dec eax
mov dword [ebp + 0x18], eax
js 0x10050c5d
mov edi, 0x414
jmp 0x10050c03
mov eax, dword [ebp + 0x18]
push eax
mov ecx, esi
call fcn.10041e44
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebp + 0x18]
mov ecx, esi
call fcn.10041e44
add eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebp + 0x18]
mov ecx, esi
call fcn.10041e44
add eax, edi
push eax
push dword [ebp + 0x18]
mov ecx, esi
call fcn.10041e44
add eax, 4
push eax
push str.delete_temp_file___s___s_
push str.OnItemSend
push 0xffffffffffffffff
push ebx
call fcn.10023e87
add esp, 0x18
dec dword [ebp + 0x18]
jns 0x10050c00
mov ecx, esi
call fcn.10047345
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x94]
call fcn.100d7630
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x24]
call fcn.100cfb30
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x4c]
call fcn.100cfb30
mov edi, str.OnItemSend
mov eax, dword [ebp - 0x38]
dec eax
mov dword [ebp + 0x18], eax
js 0x10050cdd
jmp 0x10050c9e
mov eax, dword [ebp + 0x18]
mov esi, eax
mov eax, dword [ebp - 0x64]
shl esi, 2
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x74]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x74]
push dword [eax + esi]
mov eax, dword [ebp - 0x64]
push dword [eax + esi]
push str.delete_temp_file___s___s_
push edi
push 0xffffffffffffffff
push ebx
call fcn.10023e87
add esp, 0x18
dec dword [ebp + 0x18]
jns 0x10050c9b
mov esi, dword [ebp - 0x14]
push esi
push str.RebuildMailAttach___d_
push edi
push 0xffffffffffffffff
push ebx
call fcn.10023e87
add esp, 0x14
jmp 0x100508a0