Function at 0x10020776
Capabilities:
Check if file exists
Delete file

Disassembly:
push 0x2f4
mov eax, 0x1005f17a
call fcn.100420aa
xor ebx, ebx
push ebx
push ebx
lea eax, [ebp - 0x1ec]
mov dword [ebp - 0x1c0], ebx
call fcn.1002e978
push 2
pop esi
push eax
mov ecx, edx
mov dword [ebp - 4], esi
call fcn.10007cf7
pop ecx
test al, al
je 0x100207e2
push str.attachments:_from:_to:
lea ecx, [ebp - 0x30]
call fcn.10001976
lea eax, [ebp - 0x1ec]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x1c0], 1
call fcn.1000ecf7
pop ecx
mov byte [ebp - 0x1cd], bl
test al, al
jne 0x100207e9
mov byte [ebp - 0x1cd], 1
mov dword [ebp - 4], esi
test byte [ebp - 0x1c0], 1
je 0x10020807
and dword [ebp - 0x1c0], 0xfffffffe
push ebx
push 1
lea ecx, [ebp - 0x30]
call fcn.10001e5b
cmp byte [ebp - 0x1cd], bl
jne 0x10020f26
push str.from
lea ecx, [ebp - 0x30]
call fcn.10001976
sub esp, 0x1c
mov byte [ebp - 4], 4
mov ecx, esp
mov dword [ebp - 0x1c8], esp
mov edi, 0x10063b9d
push edi
call fcn.10001976
lea eax, [ebp - 0x30]
push eax
lea esi, [ebp - 0x1ec]
lea ebx, [ebp - 0xa0]
call fcn.10007dd1
add esp, 0x20
push 0
push 1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 6
call fcn.10001e5b
push 0x10064f40
lea ecx, [ebp - 0x23c]
call fcn.10001976
sub esp, 0x1c
mov byte [ebp - 4], 7
mov ecx, esp
mov dword [ebp - 0x1c8], esp
push edi
call fcn.10001976
lea eax, [ebp - 0x23c]
push eax
lea ebx, [ebp - 0xbc]
call fcn.10007dd1
add esp, 0x20
push 0
push 1
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 9
call fcn.10001e5b
push 0x10064cd4
lea ecx, [ebp - 0x30]
call fcn.10001976
sub esp, 0x1c
mov byte [ebp - 4], 0xa
mov ecx, esp
mov dword [ebp - 0x1c8], esp
push edi
call fcn.10001976
lea eax, [ebp - 0x30]
push eax
lea ebx, [ebp - 0x68]
call fcn.10007dd1
add esp, 0x20
push 0
push 1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0xc
call fcn.10001e5b
push str.body
lea ecx, [ebp - 0x2bc]
call fcn.10001976
sub esp, 0x1c
mov byte [ebp - 4], 0xd
mov ecx, esp
mov dword [ebp - 0x1c8], esp
push edi
call fcn.10001976
lea eax, [ebp - 0x2bc]
push eax
lea ebx, [ebp - 0x84]
call fcn.10007dd1
add esp, 0x20
push 0
push 1
lea ecx, [ebp - 0x2bc]
mov byte [ebp - 4], 0xf
call fcn.10001e5b
mov eax, ebx
push eax
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0xbc]
push eax
lea eax, [ebp - 0xa0]
push eax
lea ebx, [ebp - 0x1bc]
call fcn.10004034
mov eax, esi
push eax
mov edx, str.attachments
mov byte [ebp - 4], 0x10
call fcn.1002ec16
push eax
lea ebx, [ebp - 0x23c]
call fcn.1002d9eb
lea eax, [ebp - 0x21c]
push eax
mov ecx, ebx
mov byte [ebp - 4], 0x11
call fcn.1002eca1
lea eax, [ebp - 0x2a0]
push eax
mov byte [ebp - 4], 0x12
call fcn.1000a94e
mov byte [ebp - 4], 0x13
mov esi, dword [ebp - 0x210]
cmp esi, dword [ebp - 0x20c]
jbe 0x100209b3
call fcn.1003f502
mov edi, dword [ebp - 0x20c]
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 0x1cc], eax
mov dword [ebp - 0x1c8], esi
cmp dword [ebp - 0x210], edi
jbe 0x100209d8
call fcn.1003f502
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 0x280], eax
mov eax, dword [ebp - 0x1cc]
xor ebx, ebx
cmp eax, ebx
je 0x100209f8
cmp eax, dword [ebp - 0x280]
je 0x100209fd
call fcn.1003f502
cmp dword [ebp - 0x1c8], edi
je 0x10020ae9
lea esi, [ebp - 0x1cc]
call fcn.10002533
lea ecx, [ebp - 0x23c]
push ecx
call fcn.1002ec38
push eax
lea ebx, [ebp - 0x25c]
call fcn.1002d9eb
mov byte [ebp - 4], 0x14
cmp byte [ebp - 0x254], 4
jne 0x10020aca
mov eax, ebx
push eax
lea ecx, [ebp - 0x278]
call fcn.1002dec9
push eax
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0x15
call fcn.10003019
pop ecx
push 0
push 1
lea ecx, [ebp - 0x278]
mov byte [ebp - 4], 0x17
call fcn.10001e5b
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
jae 0x10020a78
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10020abe
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
jae 0x10020a8f
lea eax, [ebp - 0x2c]
push eax
lea esi, [ebp - 0x1cc]
call fcn.10002533
push eax
lea eax, [ebp - 0x1bc]
push eax
call fcn.10004187
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x2a0]
push eax
lea ebx, [ebp - 0x2c8]
call fcn.1000a9ac
push 0
push 1
lea esi, [ebp - 0x30]
call fcn.10006669
lea esi, [ebp - 0x25c]
mov byte [ebp - 4], 0x13
call fcn.1002db7f
lea esi, [ebp - 0x1cc]
call fcn.10015d86
jmp 0x100209e4
lea ecx, [ebp - 0x4c]
call fcn.1001d1d2
push ebx
push ebx
lea eax, [ebp - 0x204]
call fcn.1002e978
lea esi, [ebp - 0x278]
mov byte [ebp - 4], 0x1b
call fcn.10026606
sub esp, 0x18
mov byte [ebp - 4], 0x1c
mov edx, eax
mov esi, esp
mov dword [ebp - 0x1c8], esp
call fcn.1002d9af
lea eax, [ebp - 0x204]
push eax
mov edx, str.data_time
mov byte [ebp - 4], 0x1d
call fcn.1002ec16
mov edi, eax
mov byte [ebp - 4], 0x1c
call fcn.1002dc02
push ebx
xor ebx, ebx
inc ebx
push ebx
lea ecx, [ebp - 0x278]
mov byte [ebp - 4], 0x1b
call fcn.10001e5b
cmp dword [ebp - 0x34], 8
mov eax, dword [ebp - 0x48]
jae 0x10020b63
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x1bc]
push eax
call fcn.1000426c
test al, al
je 0x10020e0b
sub esp, 0x18
lea edx, [ebp - 0xa0]
mov esi, esp
mov dword [ebp - 0x1c8], esp
call fcn.1002d9af
lea eax, [ebp - 0x204]
push eax
mov edx, str.mail_from
mov byte [ebp - 4], 0x1e
call fcn.1002ec16
mov edi, eax
mov byte [ebp - 4], 0x1b
call fcn.1002dc02
sub esp, 0x18
lea edx, [ebp - 0xbc]
mov esi, esp
mov dword [ebp - 0x1c8], esp
call fcn.1002d9af
lea eax, [ebp - 0x204]
push eax
mov edx, str.mail_to
mov byte [ebp - 4], 0x1f
call fcn.1002ec16
mov edi, eax
mov byte [ebp - 4], 0x1b
call fcn.1002dc02
sub esp, 0x18
lea edx, [ebp - 0x68]
mov esi, esp
mov dword [ebp - 0x1c8], esp
call fcn.1002d9af
lea eax, [ebp - 0x204]
push eax
mov edx, 0x10064cd4
mov byte [ebp - 4], 0x20
call fcn.1002ec16
mov edi, eax
mov byte [ebp - 4], 0x1b
call fcn.1002dc02
sub esp, 0x18
lea edx, [ebp - 0x84]
mov esi, esp
mov dword [ebp - 0x1c8], esp
call fcn.1002d9af
lea eax, [ebp - 0x204]
push eax
mov edx, 0x10064b20
mov byte [ebp - 4], 0x21
call fcn.1002ec16
mov edi, eax
mov byte [ebp - 4], 0x1b
call fcn.1002dc02
sub esp, 0x18
mov esi, esp
mov dword [ebp - 0x1c8], esp
push dword [ebp - 0x284]
call fcn.1002d8d0
lea eax, [ebp - 0x204]
push eax
mov edx, str.attach_count
mov byte [ebp - 4], 0x22
call fcn.1002ec16
mov edi, eax
mov byte [ebp - 4], 0x1b
call fcn.1002dc02
push str.block
lea ecx, [ebp - 0x278]
call fcn.10001976
lea eax, [ebp - 0x278]
push eax
lea eax, [ebp - 0x1ec]
mov byte [ebp - 4], 0x23
call fcn.10007d9a
pop ecx
cmp eax, ebx
jne 0x10020ce8
push 0x10064cf8
lea esi, [ebp - 0x25c]
call fcn.100057e7
mov eax, esi
mov byte [ebp - 4], 0x24
or dword [ebp - 0x1c0], 2
push eax
lea edi, [ebp - 0x2e4]
call fcn.10003059
pop ecx
mov dword [ebp - 4], 0x25
or dword [ebp - 0x1c0], 4
jmp 0x10020d20
push 0x10064d04
lea esi, [ebp - 0x30]
call fcn.100057e7
mov eax, esi
mov dword [ebp - 4], 0x26
or dword [ebp - 0x1c0], 8
push eax
lea edi, [ebp - 0x300]
call fcn.10003059
pop ecx
mov dword [ebp - 4], 0x27
or dword [ebp - 0x1c0], 0x10
sub esp, 0x18
mov edx, eax
mov esi, esp
mov dword [ebp - 0x1c8], esp
call fcn.1002d9af
lea eax, [ebp - 0x204]
push eax
mov edx, str.ml_process
mov dword [ebp - 4], 0x28
call fcn.1002ec16
mov edi, eax
mov byte [ebp - 4], 0x27
call fcn.1002dc02
xor edi, edi
test byte [ebp - 0x1c0], 0x10
je 0x10020d74
and dword [ebp - 0x1c0], 0xffffffef
push edi
push ebx
lea ecx, [ebp - 0x300]
call fcn.10001e5b
test byte [ebp - 0x1c0], 8
je 0x10020d8e
and dword [ebp - 0x1c0], 0xfffffff7
push edi
push ebx
lea esi, [ebp - 0x30]
call fcn.10006669
test byte [ebp - 0x1c0], 4
je 0x10020dab
and dword [ebp - 0x1c0], 0xfffffffb
push edi
push ebx
lea ecx, [ebp - 0x2e4]
call fcn.10001e5b
mov dword [ebp - 4], 0x23
test byte [ebp - 0x1c0], 2
je 0x10020dc8
push edi
push ebx
lea esi, [ebp - 0x25c]
call fcn.10006669
push edi
push ebx
lea ecx, [ebp - 0x278]
mov byte [ebp - 4], 0x1b
call fcn.10001e5b
cmp dword [ebp - 0x34], 8
mov eax, dword [ebp - 0x48]
jae 0x10020de5
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x204]
call fcn.1001d2cd
pop ecx
test al, al
jne 0x10020e2c
cmp dword [ebp - 0x34], 8
mov eax, dword [ebp - 0x48]
jae 0x10020e02
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x10020e2c
cmp dword [ebp - 0x34], 8
mov esi, dword [ebp - 0x48]
jae 0x10020e17
lea esi, [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.write_eml_err__eml:_ls__err:_d
call fcn.10029b5d
add esp, 0xc
mov eax, dword [ebp - 0x288]
mov edx, dword [ebp - 0x2a0]
mov ecx, dword [eax]
mov dword [ebp - 0x1cc], edx
mov dword [ebp - 0x1c8], ecx
mov dword [ebp - 0x1c4], edx
mov dword [ebp - 0x1c0], eax
jmp 0x10020e7f
lea esi, [ebp - 0x1cc]
call fcn.10016265
cmp dword [eax + 0x18], 8
jb 0x10020e6a
mov eax, dword [eax + 4]
jmp 0x10020e6d
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea esi, [ebp - 0x1cc]
call fcn.1000e3c7
lea edi, [ebp - 0x1c4]
lea esi, [ebp - 0x1cc]
call fcn.1001a3e4
test al, al
je 0x10020e54
lea esi, [ebp - 0x204]
mov byte [ebp - 4], 0x18
call fcn.1002db7f
xor edi, edi
push edi
push ebx
lea esi, [ebp - 0x4c]
call fcn.10006669
lea eax, [ebp - 0x2a0]
push eax
mov byte [ebp - 4], 0x12
call fcn.1000a984
lea esi, [ebp - 0x21c]
call fcn.10001ea6
push dword [ebp - 0x21c]
call fcn.1003f53c
pop ecx
lea esi, [ebp - 0x23c]
mov byte [ebp - 4], 0x10
call fcn.1002db7f
lea eax, [ebp - 0x1bc]
push eax
mov byte [ebp - 4], 0xf
call fcn.100168bd
push edi
push ebx
lea ecx, [ebp - 0x84]
call fcn.10001e5b
push edi
push ebx
lea ecx, [ebp - 0x68]
call fcn.10001e5b
push edi
push ebx
lea ecx, [ebp - 0xbc]
call fcn.10001e5b
push edi
push ebx
lea ecx, [ebp - 0xa0]
call fcn.10001e5b
or dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x1ec]
call fcn.1002db7f
call fcn.1004212d
ret