Function at 0x59062850
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x591558f2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x17c
mov eax, dword [0x591ac718]
push ebp
xor ebp, ebp
push esi
cmp eax, ebp
push edi
mov dword [esp + 0x24], ecx
je 0x59062896
push str.CheckBadMailLog_____
push str.Winncap
push 0xffffffffffffffff
push 0x591ac6ac
call fcn.59083dc0
add esp, 0x10
lea eax, [esp + 0x18]
push eax
call fcn.5900d760
add esp, 4
push str..eml
lea ecx, [esp + 0x1c]
mov dword [esp + 0x194], ebp
call fcn.590a1ad0
mov edx, dword [esp + 0x18]
mov ecx, 0x4f
xor eax, eax
lea edi, [esp + 0x4c]
mov dword [esp + 0x48], ebp
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x48]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x20], esi
je 0x59062ad5
cmp dword [0x591ac718], ebp
je 0x5906290e
lea eax, [esp + 0x74]
push eax
push str.CheckBadMailLog___S_
push str.Winncap
push 0xffffffffffffffff
push 0x591ac6ac
call fcn.59083dc0
add esp, 0x14
push ebx
lea ecx, [esp + 0x2c]
call fcn.590aaee0
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov byte [esp + 0x194], 1
mov bl, 3
test byte [esp + 0x4c], 0x10
jne 0x59062a81
lea ecx, [esp + 0x78]
push ecx
lea ecx, [esp + 0x14]
call fcn.590a0590
mov edx, dword [esp + 0x10]
mov byte [esp + 0x194], 2
mov esi, dword [edx - 8]
cmp esi, 4
jbe 0x59062a6c
xor eax, eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x40], eax
push ecx
mov dword [esp + 0x48], eax
mov dword [esp + 0x40], ebp
mov dword [esp + 0x4c], eax
call fcn.5900d760
add esp, 4
lea edx, [esp + 0x10]
lea ecx, [esp + 0x18]
push edx
mov byte [esp + 0x198], bl
call fcn.590a1b30
add esi, 0xfffffffc
lea eax, [esp + 0x20]
push esi
push eax
lea ecx, [esp + 0x18]
call fcn.590a34e0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x198], 4
call fcn.590a1040
lea ecx, [esp + 0x20]
mov byte [esp + 0x194], bl
call fcn.590a0ec0
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x3c]
push ecx
push edx
call fcn.590cbdd0
add esp, 8
test eax, eax
je 0x59062a5b
lea eax, [esp + 0x18]
lea ecx, [esp + 0x14]
push eax
call fcn.590a0490
lea ecx, [esp + 0x14]
mov byte [esp + 0x194], 5
call fcn.590a2180
push str..mlg
push 0x59188aa4
lea ecx, [esp + 0x1c]
call fcn.590a2d00
mov ecx, dword [esp + 0x14]
push ecx
call edi
cmp eax, 0xffffffff
jne 0x59062a4b
push str..mlg2
push str..mlg
lea ecx, [esp + 0x1c]
call fcn.590a2d00
mov edx, dword [esp + 0x14]
push edx
call edi
cmp eax, 0xffffffff
jne 0x59062a4b
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x18]
push eax
push ecx
lea ecx, [esp + 0x34]
call fcn.590ab4e0
lea ecx, [esp + 0x14]
mov byte [esp + 0x194], bl
call fcn.590a0ec0
lea ecx, [esp + 0x18]
mov byte [esp + 0x194], 2
call fcn.590a0ec0
lea ecx, [esp + 0x10]
mov byte [esp + 0x194], 1
call fcn.590a0ec0
mov esi, dword [esp + 0x24]
lea edx, [esp + 0x4c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
cmp eax, ebp
jne 0x59062928
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x30]
xor esi, esi
cmp eax, ebp
pop ebx
jle 0x59062ac4
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
push 2
push ebp
mov eax, dword [eax + esi*4]
push eax
call fcn.59057710
mov eax, dword [esp + 0x2c]
inc esi
cmp esi, eax
jl 0x59062aa7
lea ecx, [esp + 0x28]
mov byte [esp + 0x190], 0
call fcn.590aaef0
lea ecx, [esp + 0x18]
mov dword [esp + 0x190], 0xffffffff
call fcn.590a0ec0
mov ecx, dword [esp + 0x188]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x188
ret