Function at 0x403139
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xaac
mov eax, dword [0x408064]
xor eax, esp
mov dword [esp + 0xaa8], eax
push ebx
push esi
push edi
mov edi, 0x100
lea eax, [esp + 0x4a0]
push edi
push eax
push edi
lea eax, [esp + 0x6ac]
xor ebx, ebx
push eax
push edi
lea eax, [esp + 0x5b4]
push eax
push 3
lea eax, [esp + 0x28]
push eax
push ecx
call dword [sym.imp.msvcrt.dll__splitpath_s]
add esp, 0x24
cmp dword [0x4084cc], ebx
je 0x4031be
lea eax, [esp + 0x4a0]
push eax
lea eax, [esp + 0x6a4]
push eax
lea eax, [esp + 0x5a8]
push eax
lea eax, [esp + 0x18]
push eax
push 0x401264
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0x14
xor esi, esi
cmp byte [esp + 0x6a0], bl
jne 0x4031d3
mov word [esp + 0x6a0], 0x2a
cmp byte [0x4084d0], bl
je 0x4031f9
cmp byte [esp + 0x4a0], bl
jne 0x4031f9
push ecx
push 0x40128c
push ecx
mov edx, edi
lea ecx, [esp + 0x4ac]
call fcn.00402ebe
lea eax, [esp + 0x4a0]
push eax
lea eax, [esp + 0x6a4]
push eax
lea eax, [esp + 0x5a8]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x2a0]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll__makepath_s]
add esp, 0x18
cmp dword [0x4084cc], ebx
je 0x403249
lea eax, [esp + 0x290]
push eax
push 0x401290
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
pop ecx
xor ecx, ecx
lea eax, [esp + 0x150]
push ecx
push ecx
push ecx
push eax
push ecx
lea eax, [esp + 0x2a4]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileExA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x403292
cmp dword [0x4084cc], ebx
je 0x40351b
lea eax, [esp + 0x4a0]
push eax
push 0x4012a4
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
pop ecx
jmp 0x40351b
cmp byte [0x4084d0], 0
lea eax, [esp + 0x17c]
jne 0x403460
xor esi, esi
push esi
push eax
lea eax, [esp + 0x5a8]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x2a0]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll__makepath_s]
push 0x104
lea eax, [esp + 0x3b4]
push esi
push eax
call sub.msvcrt.dll_memset
add esp, 0x24
push esi
push 0x4084e0
push dword [0x4084d4]
call dword [sym.imp.dbghelp.dll_SymInitialize]
cmp dword [0x4084cc], 0
mov esi, 0x680
je 0x40332c
push 0x4084e0
push 0x4012bc
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
pop ecx
push 0
push 0
push 0x402f10
push dword [0x4084d4]
mov esi, 0x80000680
call dword [sym.imp.dbghelp.dll_SymRegisterCallback64]
push esi
call dword [sym.imp.dbghelp.dll_SymSetOptions]
mov ecx, 0x104
lea eax, [esp + 0x8a8]
push ecx
push eax
push ecx
lea eax, [esp + 0x3a4]
push eax
push 2
lea eax, [esp + 0x2a4]
push eax
push 0
push dword [0x4084d4]
call dword [sym.imp.dbghelp.dll_SymGetSymbolFile]
test eax, eax
jne 0x403486
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
jne 0x403436
push 0x100
lea eax, [esp + 0x9b4]
push eax
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
lea eax, [esp + 0x2b0]
push eax
call dword [sym.imp.msvcrt.dll__splitpath_s]
add esp, 0x24
mov byte [esp + 0x4a0], 0x5c
lea eax, [esp + 0x4a0]
push eax
push 0x4084e0
push 0x4012e0
lea eax, [esp + 0x1c]
push 0x104
push eax
call fcn.00402df4
add esp, 0x14
lea eax, [esp + 0x10]
push eax
push 0x4012e8
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
pop ecx
mov ecx, 0x104
lea eax, [esp + 0x8a8]
push ecx
push eax
push ecx
lea eax, [esp + 0x3a4]
push eax
push esi
lea eax, [esp + 0x2a4]
push eax
lea eax, [esp + 0x28]
push eax
push dword [0x4084d4]
call dword [sym.imp.dbghelp.dll_SymGetSymbolFile]
test eax, eax
jne 0x403486
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x294]
push eax
push 0x401304
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
jmp 0x4034e2
lea eax, [esp + 0x290]
cmp esi, 0xc1
jne 0x403457
push eax
push 0x401338
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
jmp 0x4034e1
push esi
push eax
push 0x40136c
jmp 0x403428
push 0
push eax
lea eax, [esp + 0x5a8]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x3a8]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll__makepath_s]
add esp, 0x18
cmp dword [0x4084cc], 0
je 0x4034aa
push 0x4099a0
lea eax, [esp + 0x39c]
push eax
push 0x401398
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
sub esp, 0x10
lea ecx, [esp + 0x3a8]
call fcn.00405de6
mov esi, eax
test esi, esi
je 0x4034e2
push esi
lea eax, [esp + 0x180]
push eax
push 0x4013bc
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
push 0x4013e8
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
lea eax, [esp + 0x150]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x403513
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x40350e
push eax
push 0x4013f4
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
pop ecx
xor ebx, ebx
xor esi, esi
inc ebx
test ebx, ebx
je 0x403292
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [0x4085e4], 0
je 0x403689
xor ebx, ebx
cmp dword [0x4084cc], ebx
je 0x403545
push 0x401428
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
push 0
push 0
lea eax, [esp + 0x5a8]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x7b0]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll__makepath_s]
add esp, 0x18
lea ecx, [esp + 0x7a0]
push 0x40143c
call fcn.00402da3
xor ecx, ecx
lea eax, [esp + 0x10]
push ecx
push ecx
push 1
push eax
push ecx
lea eax, [esp + 0x7b4]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileExA]
mov edi, eax
cmp edi, 0xffffffff
je 0x403682
lea eax, [esp + 0x3c]
cmp byte [eax], 0x2e
jne 0x4035b7
movzx eax, byte [eax + 1]
test al, al
je 0x403667
lea edx, [esp + 0x3c]
xor ecx, ecx
movzx eax, byte [edx + ecx]
mov edx, 0x401440
cmp al, byte [edx + ecx]
lea edx, [esp + 0x3c]
jne 0x4035da
inc ecx
cmp ecx, 3
jne 0x4035bd
jmp 0x403667
test byte [esp + 0x10], 0x10
je 0x403667
push 0
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x5a8]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x3a8]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll__makepath_s]
add esp, 0x18
lea ecx, [esp + 0x398]
push 0x401444
call fcn.00402da3
lea eax, [esp + 0x398]
push eax
push 0x401448
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
pop ecx
lea ecx, [esp + 0x398]
call fcn.00403139
mov esi, eax
test esi, esi
je 0x403667
push esi
lea eax, [esp + 0x40]
push eax
push 0x40145c
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
push 0x4013e8
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
lea eax, [esp + 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40367a
xor ebx, ebx
inc ebx
test ebx, ebx
je 0x4035a2
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0xab4]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00406960
mov esp, ebp
pop ebp
ret