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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x10070
call fcn.00418020
mov eax, dword [0x419074]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, edx
push edi
mov edi, ecx
mov dword [ebp - 0x10058], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x10070], ebx
mov dword [ebp - 0x1004c], edi
mov dword [ebp - 0x1006c], esi
mov dword [ebp - 0x10068], eax
mov dword [ebp - 0x10060], 0x2000000
call fcn.0040800b
and dword [ebp - 0x1005c], 0
cmp esi, 2
jae 0x410640
xor eax, eax
jmp 0x411052
cmp dword [0x419534], 0
mov word [ebx], 0x2a
jne 0x410658
mov dword [ebp - 0x10060], 0x2200000
push 0x45afc0
push 0x41afa0
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x10044], eax
cmp eax, 0xffffffff
jne 0x4106ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x4106be
mov eax, dword [0x41aef0]
mov ecx, 0x406154
test eax, eax
jne 0x4106b7
mov ecx, 0x401110
mov eax, 0x406164
push ecx
push eax
push ecx
mov edx, 0x43afc0
mov ecx, edi
call fcn.0040e718
push eax
push 0x406168
push 0
call fcn.0041283e
add esp, 0x14
jmp 0x410639
mov eax, 0x40615c
jmp 0x410696
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x410639
push ecx
mov edx, 0x43afc0
mov ecx, edi
call fcn.0040e718
push eax
push 0x4062e0
push 0xffffffffffffffff
call fcn.0041283e
add esp, 0xc
jmp 0x410639
mov byte [ebx], 0
mov ebx, eax
mov ecx, dword [0x45afec]
cmp cx, 0x2e
je 0x410f4b
and ecx, 0xffffff
cmp ecx, 0x2e2e
je 0x410f4b
push 0x10000
lea edx, [ebp - 0x1000c]
mov ecx, edi
call fcn.0040a30d
mov ecx, 0x10000
lea eax, [ebp - 0x1000c]
cmp byte [eax], 0
je 0x41073e
inc eax
sub ecx, 1
jne 0x410733
mov eax, ecx
neg eax
sbb eax, eax
and eax, 0x7ff8ffa9
add eax, 0x80070057
test ecx, ecx
je 0x41075b
mov edx, 0x10000
sub edx, ecx
jmp 0x41075d
xor edx, edx
test eax, eax
js 0x41079e
mov ecx, 0x10000
lea eax, [ebp - 0x1000c]
lea eax, [eax + edx]
sub ecx, edx
je 0x41079a
add edx, 0x7ffefffe
mov esi, 0x45afec
add edx, ecx
sub esi, eax
test edx, edx
je 0x410796
mov bl, byte [eax + esi]
test bl, bl
je 0x410796
mov byte [eax], bl
inc eax
dec edx
sub ecx, 1
jne 0x410782
test ecx, ecx
jne 0x41079b
dec eax
mov byte [eax], 0
push 0
push dword [ebp - 0x10060]
lea eax, [ebp - 0x1000c]
push 3
push 0
push 3
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4107df
lea eax, [ebp - 0x1000c]
push eax
push 0x406310
push esi
call fcn.0041283e
add esp, 0xc
jmp 0x410f45
lea eax, [ebp - 0x10040]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x410813
lea eax, [ebp - 0x1000c]
push eax
push 0x406344
push 0xffffffffffffffff
call fcn.0041283e
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x410f45
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10040]
test al, 2
je 0x410831
cmp dword [0x41aeec], 0
je 0x410f45
shr eax, 4
and eax, 1
mov ecx, eax
mov dword [ebp - 0x10054], eax
call fcn.00408d33
test byte [ebp - 0x10040], 2
mov ebx, eax
mov dword [ebp - 0x10048], ebx
je 0x41085c
or dword [ebx + 0x14], 0x80
mov ecx, dword [ebx + 0x2c]
mov dword [ebx + 0x1c], edi
test ecx, ecx
je 0x4108a1
mov eax, dword [ebp - 0x1002c]
mov dword [ecx], eax
mov eax, dword [ebp - 0x10028]
mov dword [ecx + 4], eax
mov ecx, dword [ebx + 0x2c]
mov eax, dword [ebp - 0x10034]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0x10030]
mov dword [ecx + 0xc], eax
mov ecx, dword [ebx + 0x2c]
mov eax, dword [ebp - 0x1003c]
mov dword [ecx + 0x10], eax
mov eax, dword [ebp - 0x10038]
mov dword [ecx + 0x14], eax
cmp byte [0x45b0f0], 0
je 0x4108b1
or dword [ebx + 0x14], 0x8000
cmp dword [0x41aec8], 0
je 0x4108c3
cmp dword [0x41aef4], 0
je 0x4108d2
mov esi, 0x45afec
push esi
call dword [sym.imp.msvcrt.dll__strupr]
pop ecx
jmp 0x4108d7
mov esi, 0x45afec
cmp dword [0x41aec4], 0
jne 0x41094f
xor ebx, ebx
mov ecx, esi
cmp byte [0x45b0f0], bl
setne bl
call fcn.0040e3f5
test ebx, ebx
je 0x410909
mov ebx, dword [ebp - 0x10048]
test eax, eax
je 0x41094f
mov byte [0x45b0f0], 0
jmp 0x41094f
test eax, eax
jne 0x410949
mov esi, dword [ebp - 0x10054]
test esi, esi
mov esi, 0x406378
jne 0x410921
mov esi, 0x406384
push 0x45afec
push ecx
mov edx, 0x43afc0
mov ecx, edi
call fcn.0040e718
push eax
push esi
push 0x406390
push 0
call fcn.0041283e
add esp, 0x14
jmp 0x410f45
mov ebx, dword [ebp - 0x10048]
mov edi, esi
mov ecx, 0x45afec
mov esi, dword [ebp - 0x10054]
mov edx, esi
mov dword [ebp - 0x10050], edi
call fcn.0040e64e
cmp byte [0x45b0f0], 0
mov dword [ebp - 0x10048], eax
je 0x410a75
cmp eax, 0xdd
ja 0x4109e5
cmp dword [0x41aec4], 0
jne 0x41099a
mov ecx, 0x45afec
call fcn.0040e4f0
test eax, eax
je 0x4109e5
mov edi, dword [0x41aef4]
test edi, edi
je 0x410a6f
test esi, esi
je 0x4109c2
mov ecx, 0x45afec
call fcn.0040e62d
test eax, eax
je 0x4109eb
test esi, esi
jne 0x410a6f
cmp byte [0x45afec], 0
mov ecx, 0x45afec
je 0x410a6f
mov al, byte [ecx]
inc ecx
cmp al, 0x20
jle 0x4109eb
cmp byte [ecx], 0
jne 0x4109d4
jmp 0x410a6f
mov edi, dword [0x41aef4]
cmp dword [0x41aec8], 0
je 0x4109f8
test edi, edi
je 0x410a04
push 0x45b0f0
call dword [sym.imp.msvcrt.dll__strupr]
pop ecx
mov eax, 0x45b0f0
mov edx, esi
mov ecx, eax
mov dword [ebp - 0x10050], eax
call fcn.0040e64e
mov dword [ebp - 0x10048], eax
mov edi, 0x406378
test esi, esi
jne 0x410a2c
mov edi, 0x406384
mov ecx, dword [ebp - 0x1004c]
mov edx, 0x43afc0
push 0x45afec
push 0x10000
call fcn.0040e688
push eax
push 0x45b0f0
push edi
push 0x401110
push 0x4063d8
call dword [sym.imp.msvcrt.dll_printf]
push 1
call fcn.00417f51
add esp, 0x1c
push eax
call dword [sym.imp.msvcrt.dll_fflush]
pop ecx
mov edi, dword [ebp - 0x10050]
cmp dword [ebp - 0x10048], 0xdd
jbe 0x410ab3
test esi, esi
mov esi, 0x401bbc
jne 0x410a8f
mov esi, 0x401bc8
push edi
mov edi, dword [ebp - 0x1004c]
mov edx, 0x43afc0
push 0x10000
mov ecx, edi
call fcn.0040e688
push eax
push esi
push 0x406414
jmp 0x41093a
push 0x3b
push edi
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
test eax, eax
je 0x410af4
test esi, esi
mov esi, 0x401bbc
jne 0x410ad0
mov esi, 0x401bc8
push edi
mov edi, dword [ebp - 0x1004c]
mov edx, 0x43afc0
push 0x10000
mov ecx, edi
call fcn.0040e688
push eax
push esi
push 0x406448
jmp 0x41093a
cmp dword [0x41aec4], 0
je 0x410b41
cmp dword [0x41aef4], 0
jne 0x410b41
cmp dword [0x41aef8], 0
jne 0x410b41
test esi, esi
je 0x410b22
mov ecx, edi
call fcn.0040e62d
test eax, eax
je 0x410b37
test esi, esi
jne 0x410b58
cmp byte [edi], 0
mov ecx, edi
je 0x410b41
mov al, byte [ecx]
inc ecx
cmp al, 0x20
jle 0x410b37
cmp byte [ecx], 0
jne 0x410b29
jmp 0x410b41
mov dword [0x41aef8], 1
test esi, esi
jne 0x410b58
cmp dword [0x41aedc], esi
jne 0x410b58
mov eax, dword [ebp - 0x10048]
lea edi, [eax - 1]
jmp 0x410b61
mov eax, dword [ebp - 0x10048]
lea edi, [eax + 1]
mov ecx, edi
mov dword [ebp - 0x10064], edi
mov word [ebx + 0x18], ax
call fcn.00412a96
mov ecx, dword [ebp - 0x10050]
push ecx
push edi
push eax
mov dword [ebx], eax
call dword [sym.imp.msvcrt.dll_strcpy_s]
mov ecx, dword [ebp - 0x1005c]
add esp, 0xc
mov edx, ebx
call fcn.0040911a
mov ecx, dword [0x41aeb0]
mov edi, 0x10000
mov edx, dword [ebp - 0x10058]
mov dword [ebp - 0x1005c], eax
test ecx, ecx
je 0x410c00
mov eax, dword [ebp - 0x10068]
add eax, edx
add eax, dword [ebp - 0x10048]
cmp eax, 0xff
jbe 0x410c00
push edi
mov edx, 0x43afc0
mov ecx, ebx
call fcn.0040e688
push eax
push 0x401110
push 0x4064a0
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
push 1
call fcn.00417f51
pop ecx
push eax
call dword [sym.imp.msvcrt.dll_fflush]
mov edx, dword [ebp - 0x10058]
pop ecx
mov ecx, dword [0x41aeb0]
test esi, esi
je 0x410dc7
test ecx, ecx
je 0x410c46
cmp edx, 8
jb 0x410c46
push 0x10000
mov edx, 0x43afc0
mov ecx, ebx
call fcn.0040e688
push eax
push 0x401110
push 0x4064e8
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
push 1
call fcn.00417f51
pop ecx
push eax
call dword [sym.imp.msvcrt.dll_fflush]
pop ecx
cmp dword [0x41aeb8], 0
je 0x410c8f
mov ecx, dword [ebx]
call fcn.0040e4f0
test eax, eax
jne 0x410c8f
push 0x10000
mov edx, 0x43afc0
mov ecx, ebx
call fcn.0040e688
push eax
push 0x401110
push 0x40652c
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
push 1
call fcn.00417f51
pop ecx
push eax
call dword [sym.imp.msvcrt.dll_fflush]
pop ecx
cmp dword [0x41aebc], 0
je 0x410cd8
mov ecx, dword [ebx]
call fcn.0040e57d
test eax, eax
jne 0x410cd8
push 0x10000
mov edx, 0x43afc0
mov ecx, ebx
call fcn.0040e688
push eax
push 0x401110
push 0x40655c
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
push 1
call fcn.00417f51
pop ecx
push eax
call dword [sym.imp.msvcrt.dll_fflush]
pop ecx
cmp dword [0x41af2c], 0
mov edi, dword [ebp - 0x1004c]
je 0x410d11
cmp dword [0x41af70], 0
jne 0x410d11
cmp edi, dword [0x419e80]
jne 0x410d11
push 0x40658c
push dword [ebx]
call dword [sym.imp.msvcrt.dll__stricmp]
pop ecx
pop ecx
test eax, eax
jne 0x410d11
mov dword [0x41af70], ebx
cmp dword [0x41af68], 0
je 0x410f45
cmp dword [0x41af74], 0
jne 0x410d48
cmp edi, dword [0x419e80]
jne 0x410d48
push 0x406594
push dword [ebx]
call dword [sym.imp.msvcrt.dll__stricmp]
pop ecx
pop ecx
test eax, eax
jne 0x410d48
mov dword [0x41af74], ebx
cmp dword [0x41af68], 0
je 0x410f45
cmp dword [0x41af78], 0
jne 0x410d7f
cmp edi, dword [0x419e80]
jne 0x410d7f
push 0x4065a0
push dword [ebx]
call dword [sym.imp.msvcrt.dll__stricmp]
pop ecx
pop ecx
test eax, eax
jne 0x410d7f
mov dword [0x41af78], ebx
cmp dword [0x41af68], 0
je 0x410f45
cmp dword [0x41af7c], 0
jne 0x410f45
cmp edi, dword [0x419e80]
jne 0x410f45
push 0x4065ac
push dword [ebx]
call dword [sym.imp.msvcrt.dll__stricmp]
pop ecx
pop ecx
test eax, eax
jne 0x410f45
mov dword [0x41af7c], ebx
jmp 0x410f45
cmp dword [0x41aeb8], 0
je 0x410e0c
mov ecx, dword [ebx]
call fcn.0040e4f0
test eax, eax
jne 0x410e0c
push edi
mov edx, 0x43afc0
mov ecx, ebx
call fcn.0040e688
push eax
push 0x401110
push 0x4065b8
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
push 1
call fcn.00417f51
pop ecx
push eax
call dword [sym.imp.msvcrt.dll_fflush]
pop ecx
cmp dword [0x41aebc], 0
je 0x410e51
mov ecx, dword [ebx]
call fcn.0040e5c0
test eax, eax
jne 0x410e51
push edi
mov edx, 0x43afc0
mov ecx, ebx
call fcn.0040e688
push eax
push 0x401110
push 0x4065e4
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
push 1
call fcn.00417f51
pop ecx
push eax
call dword [sym.imp.msvcrt.dll_fflush]
pop ecx
mov esi, dword [ebp - 0x10020]
xor ecx, ecx
or ecx, dword [ebp - 0x1001c]
cmp dword [0x41aeac], 0
mov dword [ebp - 0x10054], ecx
mov dword [ebp - 0x10048], esi
je 0x410eb1
mov eax, ecx
or eax, esi
jne 0x410eb1
push edi
mov edx, 0x43afc0
mov ecx, ebx
call fcn.0040e688
push eax
push 0x401110
push 0x406610
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
push 1
call fcn.00417f51
pop ecx
push eax
call dword [sym.imp.msvcrt.dll_fflush]
pop ecx
mov ecx, dword [ebp - 0x10054]
push 0
pop edx
mov dword [ebx + 0xc], esi
mov esi, dword [0x41912c]
mov edi, esi
add edi, ecx
mov dword [ebx + 8], ecx
push 0
adc edx, dword [ebp - 0x10048]
mov ecx, esi
add edi, 0xffffffff
pop eax
adc edx, 0xffffffff
add ecx, 0xffffffff
push 0
adc eax, 0xffffffff
not ecx
not eax
and edi, ecx
push esi
and edx, eax
push edx
push edi
call fcn.00417fb0
add dword [0x419568], eax
mov eax, dword [ebp - 0x10054]
add dword [0x41ad18], eax
mov eax, dword [ebp - 0x10048]
adc dword [0x41ad1c], eax
call fcn.00408059
cmp dword [0x41aedc], 0
jne 0x410f3f
push 0x2e
push dword [ebx]
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
test eax, eax
jne 0x410f3f
push 0x401a9c
push dword [ebp - 0x10064]
push dword [ebx]
call dword [sym.imp.msvcrt.dll_strcat_s]
add esp, 0xc
mov edi, dword [ebp - 0x1004c]
mov ebx, dword [ebp - 0x10044]
push 0x45afc0
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4106f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x410f87
push ecx
mov edx, 0x43afc0
mov ecx, edi
call fcn.0040e718
push eax
push 0x4062e0
push 0xffffffffffffffff
call fcn.0041283e
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [ebp - 0x1005c]
mov edi, esi
test esi, esi
je 0x411050
mov ebx, dword [ebp - 0x10070]
cmp dword [edi + 0x14], 0
jge 0x41103f
mov esi, dword [edi]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x410fb3
sub esi, ecx
mov ecx, dword [ebp - 0x1006c]
lea eax, [esi + 2]
cmp ecx, eax
jae 0x411000
push ecx
push 0x10000
mov edx, 0x43afc0
mov ecx, edi
call fcn.0040e688
push eax
push 0x401110
push 0x40663c
call dword [sym.imp.msvcrt.dll_printf]
push 1
call fcn.00417f51
add esp, 0x14
push eax
call dword [sym.imp.msvcrt.dll_fflush]
pop ecx
jmp 0x41103f
push esi
push dword [edi]
push ebx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x10068]
lea edx, [ebx + 1]
add esp, 0xc
mov byte [ebx + esi], 0x5c
add eax, esi
add edx, esi
mov ecx, edi
push eax
mov eax, dword [ebp - 0x10058]
inc eax
mov byte [edx], 0
push eax
mov eax, dword [ebp - 0x1006c]
sub eax, esi
dec eax
push eax
call fcn.004105d7
mov ecx, dword [edi + 0x34]
mov dword [ecx], eax
mov edi, dword [edi + 0x24]
test edi, edi
jne 0x410fa4
mov esi, dword [ebp - 0x1005c]
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00417930
mov esp, ebp
pop ebp
ret 0xc