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

Disassembly:
push 0xffffffffffffffff
push 0x59148e72
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x17c
mov eax, dword [0x5919cca0]
push ebp
xor ebp, ebp
push esi
cmp eax, ebp
push edi
mov dword [esp + 0x24], ecx
je 0x5905cb16
push str.CheckBadMailLog_____
push str.Winncap
push 0xffffffffffffffff
push 0x5919cc34
call fcn.5907cd70
add esp, 0x10
lea eax, [esp + 0x18]
push eax
call fcn.5900d1c0
add esp, 4
push str..eml
lea ecx, [esp + 0x1c]
mov dword [esp + 0x194], ebp
call fcn.5909aa10
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 0x5905cd55
cmp dword [0x5919cca0], ebp
je 0x5905cb8e
lea eax, [esp + 0x74]
push eax
push str.CheckBadMailLog___S_
push str.Winncap
push 0xffffffffffffffff
push 0x5919cc34
call fcn.5907cd70
add esp, 0x14
push ebx
lea ecx, [esp + 0x2c]
call fcn.590a3e20
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov byte [esp + 0x194], 1
mov bl, 3
test byte [esp + 0x4c], 0x10
jne 0x5905cd01
lea ecx, [esp + 0x78]
push ecx
lea ecx, [esp + 0x14]
call fcn.590994d0
mov edx, dword [esp + 0x10]
mov byte [esp + 0x194], 2
mov esi, dword [edx - 8]
cmp esi, 4
jbe 0x5905ccec
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.5900d1c0
add esp, 4
lea edx, [esp + 0x10]
lea ecx, [esp + 0x18]
push edx
mov byte [esp + 0x198], bl
call fcn.5909aa70
add esi, 0xfffffffc
lea eax, [esp + 0x20]
push esi
push eax
lea ecx, [esp + 0x18]
call fcn.5909c420
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x198], 4
call fcn.59099f80
lea ecx, [esp + 0x20]
mov byte [esp + 0x194], bl
call fcn.59099e00
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x3c]
push ecx
push edx
call fcn.590b45a0
add esp, 8
test eax, eax
je 0x5905ccdb
lea eax, [esp + 0x18]
lea ecx, [esp + 0x14]
push eax
call fcn.590993d0
lea ecx, [esp + 0x14]
mov byte [esp + 0x194], 5
call fcn.5909b0c0
push str..mlg
push 0x5917a62c
lea ecx, [esp + 0x1c]
call fcn.5909bc40
mov ecx, dword [esp + 0x14]
push ecx
call edi
cmp eax, 0xffffffff
jne 0x5905cccb
push str..mlg2
push str..mlg
lea ecx, [esp + 0x1c]
call fcn.5909bc40
mov edx, dword [esp + 0x14]
push edx
call edi
cmp eax, 0xffffffff
jne 0x5905cccb
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x18]
push eax
push ecx
lea ecx, [esp + 0x34]
call fcn.590a4420
lea ecx, [esp + 0x14]
mov byte [esp + 0x194], bl
call fcn.59099e00
lea ecx, [esp + 0x18]
mov byte [esp + 0x194], 2
call fcn.59099e00
lea ecx, [esp + 0x10]
mov byte [esp + 0x194], 1
call fcn.59099e00
mov esi, dword [esp + 0x24]
lea edx, [esp + 0x4c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
cmp eax, ebp
jne 0x5905cba8
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x30]
xor esi, esi
cmp eax, ebp
pop ebx
jle 0x5905cd44
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
push 2
push ebp
mov eax, dword [eax + esi*4]
push eax
call fcn.59051e90
mov eax, dword [esp + 0x2c]
inc esi
cmp esi, eax
jl 0x5905cd27
lea ecx, [esp + 0x28]
mov byte [esp + 0x190], 0
call fcn.590a3e30
lea ecx, [esp + 0x18]
mov dword [esp + 0x190], 0xffffffff
call fcn.59099e00
mov ecx, dword [esp + 0x188]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x188
ret