Function at 0x59061f00
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x59156673
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x190
mov eax, dword [0x591ae1c8]
push ebx
push ebp
xor ebp, ebp
push esi
cmp eax, ebp
push edi
mov dword [esp + 0x24], ecx
je 0x59061f47
push str.CheckBadMailLog_____
push str.Winncap
push 0xffffffffffffffff
push 0x591ae15c
call fcn.590851e0
add esp, 0x10
lea eax, [esp + 0x20]
push eax
call fcn.5900d5e0
add esp, 4
lea ecx, [esp + 0x20]
mov dword [esp + 0x1a8], ebp
push ecx
lea ecx, [esp + 0x1c]
call fcn.590a18b0
push str..eml
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1ac], 1
call fcn.590a2ef0
mov ecx, 0x4f
xor eax, eax
lea edi, [esp + 0x64]
mov dword [esp + 0x60], ebp
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x60]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x4c], esi
je 0x5906227e
cmp dword [0x591ae1c8], ebp
je 0x59061fd8
lea ecx, [esp + 0x8c]
push ecx
push str.CheckBadMailLog___S_
push str.Winncap
push 0xffffffffffffffff
push 0x591ae15c
call fcn.590851e0
add esp, 0x14
lea ecx, [esp + 0x50]
call fcn.590ac300
mov byte [esp + 0x1a8], 2
mov dword [esp + 0x28], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], ebp
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov byte [esp + 0x1a8], 3
mov bl, 5
test byte [esp + 0x60], 0x10
jne 0x590621b9
lea edx, [esp + 0x8c]
lea ecx, [esp + 0x14]
push edx
call fcn.590a19b0
mov eax, dword [esp + 0x14]
mov byte [esp + 0x1a8], 4
mov esi, dword [eax - 8]
cmp esi, 4
jbe 0x590621a4
xor ecx, ecx
lea edx, [esp + 0x1c]
mov dword [esp + 0x3c], ecx
push edx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x48], ecx
call fcn.5900d5e0
add esp, 4
lea eax, [esp + 0x14]
lea ecx, [esp + 0x1c]
push eax
mov byte [esp + 0x1ac], bl
call fcn.590a2f50
add esi, 0xfffffffc
lea ecx, [esp + 0x48]
push esi
push ecx
lea ecx, [esp + 0x1c]
call fcn.590a4900
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x1ac], 6
call fcn.590a2460
lea ecx, [esp + 0x48]
mov byte [esp + 0x1a8], bl
call fcn.590a22e0
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x38]
push edx
push eax
call fcn.590ccb40
add esp, 8
test eax, eax
je 0x59062193
cmp dword [esp + 0x7c], ebp
ja 0x5906215c
cmp dword [esp + 0x80], 0x6400000
ja 0x5906215c
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x14]
call fcn.590a18b0
lea ecx, [esp + 0x10]
mov byte [esp + 0x1a8], 7
call fcn.590a35a0
push str..mlg
push 0x59189abc
lea ecx, [esp + 0x18]
call fcn.590a4120
mov edx, dword [esp + 0x10]
push edx
call edi
cmp eax, 0xffffffff
jne 0x5906214a
push str..mlg2
push str..mlg
lea ecx, [esp + 0x18]
call fcn.590a4120
mov eax, dword [esp + 0x10]
push eax
call edi
cmp eax, 0xffffffff
jne 0x5906214a
mov edx, dword [esp + 0x54]
lea ecx, [esp + 0x1c]
push ecx
push edx
lea ecx, [esp + 0x58]
call fcn.590ac900
lea ecx, [esp + 0x10]
mov byte [esp + 0x1a8], bl
call fcn.590a22e0
jmp 0x59062193
mov esi, dword [esp + 0x2c]
push 0xffffffffffffffff
lea ecx, [esp + 0x2c]
lea eax, [esi + 1]
push eax
call fcn.590622e0
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x38]
shl esi, 4
add esi, eax
mov dword [esi], ecx
mov edx, dword [esp + 0x3c]
mov dword [esi + 4], edx
mov eax, dword [esp + 0x40]
mov dword [esi + 8], eax
mov ecx, dword [esp + 0x44]
mov dword [esi + 0xc], ecx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1a8], 4
call fcn.590a22e0
lea ecx, [esp + 0x14]
mov byte [esp + 0x1a8], 3
call fcn.590a22e0
mov esi, dword [esp + 0x4c]
lea edx, [esp + 0x60]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
cmp eax, ebp
jne 0x59062009
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x54]
xor esi, esi
cmp eax, ebp
jle 0x590621fb
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x24]
push 2
push ebp
mov eax, dword [eax + esi*4]
push eax
call fcn.59056d00
mov eax, dword [esp + 0x54]
inc esi
cmp esi, eax
jl 0x590621de
mov eax, dword [esp + 0x2c]
xor esi, esi
cmp eax, ebp
jle 0x59062254
push ecx
lea edx, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call fcn.590a18b0
push esi
lea ecx, [esp + 0x30]
mov byte [esp + 0x1b0], 3
call fcn.590622c0
mov edx, dword [eax]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
call fcn.59059d30
mov eax, dword [esp + 0x40]
add esp, 0x14
inc esi
cmp esi, eax
jl 0x59062205
mov eax, dword [esp + 0x28]
mov byte [esp + 0x1a8], 2
cmp eax, ebp
je 0x5906226d
push eax
call fcn.5913e209
add esp, 4
lea ecx, [esp + 0x50]
mov byte [esp + 0x1a8], 1
call fcn.590ac310
lea ecx, [esp + 0x18]
mov byte [esp + 0x1a8], 0
call fcn.590a22e0
lea ecx, [esp + 0x20]
mov dword [esp + 0x1a8], 0xffffffff
call fcn.590a22e0
mov ecx, dword [esp + 0x1a0]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x19c
ret