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

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0xa50
push ebx
push esi
push edi
call fcn.00406e67
mov edi, 0x1000000
test eax, eax
je 0x405dae
mov eax, dword [ebp + 0x78]
test eax, eax
je 0x405c0e
cmp word [eax], 0
je 0x405c0e
push eax
lea eax, [ebp - 0x9e8]
push eax
call fcn.0040e40c
jmp 0x405c1e
push edi
lea eax, [ebp - 0x9e8]
push eax
push dword [ebp + 0x74]
call fcn.0040e218
mov esi, dword [ebp + 0x7c]
or ebx, 0xffffffff
lea eax, [ebp - 0x1e8]
push eax
cmp dword [ebp + 0x70], ebx
jne 0x405c64
lea eax, [ebp - 0x9e8]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp + 0x70], eax
cmp eax, ebx
jne 0x405c8f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x405e14
cmp eax, 3
je 0x405e14
cmp eax, 0x12
jmp 0x405e0d
push dword [ebp + 0x70]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x405c86
mov dword [ebp + 0x70], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
setne al
mov byte [esi + 0x109c], al
cmp dword [ebp + 0x70], ebx
je 0x405f5b
lea eax, [ebp - 0x9e8]
push eax
lea ebx, [esi + 0x400]
push ebx
call fcn.0040e40c
lea eax, [ebp - 0x1bc]
push eax
push ebx
call fcn.0040740b
push eax
call fcn.0040e40c
push edi
push esi
push ebx
call fcn.0040e1e9
push 1
push 0
push 0
push dword [ebp - 0x1cc]
call fcn.00401030
mov ecx, dword [ebp - 0x1c8]
xor ebx, ebx
add eax, ecx
mov dword [esi + 0xc00], eax
mov eax, dword [ebp - 0x1e8]
mov dword [esi + 0xc08], eax
push edi
lea eax, [esi + 0xc80]
push eax
lea eax, [ebp + 0x4c]
adc edx, ebx
push eax
mov dword [esi + 0xc04], edx
call fcn.0040e1e9
mov eax, dword [ebp - 0x1e4]
mov dword [esi + 0x1080], eax
mov eax, dword [ebp - 0x1e0]
mov dword [esi + 0x1084], eax
mov eax, dword [ebp - 0x1dc]
mov dword [esi + 0x1088], eax
mov eax, dword [ebp - 0x1d8]
mov dword [esi + 0x108c], eax
mov eax, dword [ebp - 0x1d4]
mov dword [esi + 0x1090], eax
mov eax, dword [ebp - 0x1d0]
mov dword [esi + 0x1094], eax
lea eax, [ebp - 0x1d4]
lea edi, [esi + 0xc14]
push eax
mov ecx, edi
call fcn.0040e04d
lea eax, [ebp - 0x1e4]
push eax
lea ecx, [esi + 0xc38]
call fcn.0040e04d
lea eax, [ebp - 0x1dc]
push eax
lea ecx, [esi + 0xc5c]
call fcn.0040e04d
mov ecx, edi
call fcn.0040dfa5
lea edi, [esi + 0x400]
push edi
mov dword [esi + 0xc0c], eax
call fcn.0040db8b
test al, al
je 0x405f5b
xor eax, eax
mov word [edi], ax
jmp 0x405f5b
mov eax, dword [ebp + 0x74]
test eax, eax
je 0x405dc9
cmp byte [eax], 0
je 0x405dc9
push eax
lea eax, [ebp - 0x5e8]
push eax
call fcn.0040a450
jmp 0x405dd9
push edi
lea eax, [ebp - 0x5e8]
push eax
push dword [ebp + 0x78]
call fcn.0040e1e9
mov esi, dword [ebp + 0x7c]
or ebx, 0xffffffff
lea eax, [ebp - 0xd8]
push eax
cmp dword [ebp + 0x70], ebx
jne 0x405e21
lea eax, [ebp - 0x5e8]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp + 0x70], eax
cmp eax, ebx
jne 0x405e4c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x405e14
cmp eax, 3
je 0x405e14
xor eax, eax
inc eax
jmp 0x405e16
xor eax, eax
mov byte [esi + 0x109c], al
jmp 0x405f5b
push dword [ebp + 0x70]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405e43
mov dword [ebp + 0x70], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
setne al
mov byte [esi + 0x109c], al
cmp dword [ebp + 0x70], ebx
je 0x405f5b
lea eax, [ebp - 0x5e8]
push eax
push esi
call fcn.0040a450
lea eax, [ebp - 0xac]
push eax
push esi
call fcn.004073b4
push eax
call fcn.0040a450
push edi
lea ebx, [esi + 0x400]
push ebx
push esi
call fcn.0040e218
push 1
push 0
push 0
push dword [ebp - 0xbc]
call fcn.00401030
mov ecx, dword [ebp - 0xb8]
xor edi, edi
add eax, ecx
mov dword [esi + 0xc00], eax
mov eax, dword [ebp - 0xd8]
mov dword [esi + 0xc08], eax
lea eax, [ebp + 0x58]
push eax
lea eax, [esi + 0xc80]
adc edx, edi
push eax
mov dword [esi + 0xc04], edx
call fcn.0040a450
mov eax, dword [ebp - 0xd4]
mov dword [esi + 0x1080], eax
mov eax, dword [ebp - 0xd0]
mov dword [esi + 0x1084], eax
mov eax, dword [ebp - 0xcc]
mov dword [esi + 0x1088], eax
mov eax, dword [ebp - 0xc8]
mov dword [esi + 0x108c], eax
mov eax, dword [ebp - 0xc4]
mov dword [esi + 0x1090], eax
mov eax, dword [ebp - 0xc0]
mov dword [esi + 0x1094], eax
lea eax, [ebp - 0xc4]
lea edi, [esi + 0xc14]
push eax
mov ecx, edi
call fcn.0040e04d
lea eax, [ebp - 0xd4]
push eax
lea ecx, [esi + 0xc38]
call fcn.0040e04d
lea eax, [ebp - 0xcc]
push eax
lea ecx, [esi + 0xc5c]
call fcn.0040e04d
mov ecx, edi
call fcn.0040dfa5
push esi
mov dword [esi + 0xc0c], eax
call 0x40db6d
test al, al
je 0x405f5b
xor eax, eax
mov word [ebx], ax
and dword [esi + 0x1098], 0
mov eax, dword [ebp + 0x70]
pop edi
pop esi
pop ebx
add ebp, 0x68
leave
ret 0x10