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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa64
mov eax, dword [0x4c6184]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x4c7898]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0xa5c], edx
mov esi, ecx
cmp eax, 0xffffffff
jne 0x409b32
lea eax, [ebp - 0x920]
push eax
mov dword [ebp - 0x920], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [ebp - 0x910]
mov ecx, dword [ebp - 0x91c]
mov edx, dword [ebp - 0xa5c]
mov dword [0x4c7898], eax
mov dword [0x4d06a0], ecx
xor ecx, ecx
cmp eax, 2
setne cl
dec ecx
test dword [0x4d06a0], ecx
je 0x409dc6
test ebx, ebx
je 0x409b71
cmp word [ebx], 0
je 0x409b71
lea esi, [ebp - 0x808]
mov eax, ebx
sub esi, ebx
jmp 0x409b60
movzx ecx, word [eax]
mov word [esi + eax], cx
add eax, 2
test cx, cx
jne 0x409b60
jmp 0x409b90
push 0x1000000
lea ecx, [ebp - 0x808]
push ecx
push 0xffffffffffffffff
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edx, dword [ebp - 0xa5c]
cmp edx, 0xffffffff
jne 0x409bfb
lea edx, [ebp - 0xa58]
push edx
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0xa5c], eax
cmp eax, 0xffffffff
jne 0x409c40
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x409e69
cmp eax, 3
je 0x409e69
cmp eax, 0x12
je 0x409e69
mov eax, 1
mov byte [edi + 0x10c0], al
mov eax, dword [ebp - 0xa5c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00486a8b
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0xa58]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x409c40
mov dword [ebp - 0xa5c], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
mov eax, dword [ebp - 0xa5c]
setne dl
mov byte [edi + 0x10c0], dl
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00486a8b
mov esp, ebp
pop ebp
ret
lea edx, [edi + 0x400]
lea eax, [ebp - 0x808]
mov esi, edx
mov ecx, eax
mov dword [ebp - 0xa60], edx
sub esi, ecx
jmp 0x409c60
movzx ecx, word [eax]
mov word [esi + eax], cx
add eax, 2
test cx, cx
jne 0x409c60
lea esi, [ebp - 0xa2c]
call fcn.0040a910
mov ecx, esi
sub eax, ecx
mov edi, edi
movzx ecx, word [esi]
mov word [eax + esi], cx
movzx ecx, word [esi]
add esi, 2
test cx, cx
jne 0x409c80
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
push 0x1000000
push edi
push 0xffffffffffffffff
push edx
push 0
push 0
call esi
mov eax, dword [ebp - 0xa3c]
xor ebx, ebx
push ebx
xor edx, edx
add edx, dword [ebp - 0xa38]
push ebx
adc eax, ebx
push 0x1000000
mov dword [edi + 0xc04], eax
lea eax, [edi + 0xca8]
push eax
push 0xffffffffffffffff
lea ecx, [ebp - 0x824]
push ecx
mov dword [edi + 0xc00], edx
mov edx, dword [ebp - 0xa58]
push ebx
push ebx
mov dword [edi + 0xc08], edx
call esi
mov edx, dword [ebp - 0xa54]
mov eax, dword [ebp - 0xa50]
mov ecx, dword [ebp - 0xa4c]
mov dword [edi + 0x10a8], edx
mov edx, dword [ebp - 0xa48]
mov dword [edi + 0x10b4], edx
mov dword [edi + 0x10ac], eax
mov eax, dword [ebp - 0xa44]
mov dword [edi + 0x10b0], ecx
mov ecx, dword [ebp - 0xa40]
lea edx, [ebp - 0xa44]
push edx
lea esi, [edi + 0xc18]
mov dword [edi + 0x10b8], eax
mov dword [edi + 0x10bc], ecx
call fcn.004100c0
lea eax, [ebp - 0xa54]
push eax
lea esi, [edi + 0xc48]
call fcn.004100c0
lea ecx, [ebp - 0xa4c]
push ecx
lea esi, [edi + 0xc78]
call fcn.004100c0
mov edx, dword [edi + 0xc18]
mov eax, dword [edi + 0xc2c]
sub edx, 0x3c
shl edx, 4
or edx, dword [edi + 0xc1c]
shr eax, 1
shl edx, 5
or edx, dword [edi + 0xc20]
shl edx, 5
or edx, dword [edi + 0xc24]
shl edx, 6
or edx, dword [edi + 0xc28]
shl edx, 5
or edx, eax
mov dword [edi + 0xc0c], edx
mov edx, dword [ebp - 0xa60]
call fcn.0040fc70
test al, al
je 0x40a03c
jmp 0x40a037
test esi, esi
je 0x409dec
cmp byte [esi], 0
je 0x409dec
lea ebx, [ebp - 0x408]
mov eax, esi
sub ebx, esi
lea esp, [esp]
mov cl, byte [eax]
mov byte [ebx + eax], cl
inc eax
test cl, cl
jne 0x409de0
jmp 0x409e0f
push 0
push 0
push 0x1000000
lea edx, [ebp - 0x408]
push edx
push 0xffffffffffffffff
push ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, dword [ebp - 0xa5c]
lea eax, [ebp - 0x948]
push eax
cmp edx, 0xffffffff
jne 0x409e88
lea ecx, [ebp - 0x408]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0xa5c], eax
cmp eax, 0xffffffff
jne 0x409ec6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x409e69
cmp eax, 3
je 0x409e69
mov eax, 1
mov byte [edi + 0x10c0], al
mov eax, dword [ebp - 0xa5c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00486a8b
mov esp, ebp
pop ebp
ret
xor eax, eax
mov byte [edi + 0x10c0], al
mov eax, dword [ebp - 0xa5c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00486a8b
mov esp, ebp
pop ebp
ret
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x409ec6
mov dword [ebp - 0xa5c], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
mov eax, dword [ebp - 0xa5c]
setne cl
mov byte [edi + 0x10c0], cl
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00486a8b
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x408]
mov edx, edi
mov ecx, eax
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x409ed2
lea esi, [ebp - 0x91c]
call fcn.0040a8a0
mov edx, esi
sub eax, edx
jmp 0x409ef0
mov cl, byte [esi]
mov byte [eax + esi], cl
inc esi
test cl, cl
jne 0x409ef0
push 0x1000000
lea eax, [edi + 0x400]
push eax
push 0xffffffffffffffff
push edi
push 0
push 0
mov dword [ebp - 0xa60], eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [ebp - 0x92c]
xor eax, eax
xor esi, esi
add eax, dword [ebp - 0x928]
lea edx, [edi + 0xca8]
mov dword [edi + 0xc00], eax
mov eax, dword [ebp - 0x948]
adc ecx, esi
mov dword [edi + 0xc08], eax
lea eax, [ebp - 0x818]
mov dword [edi + 0xc04], ecx
mov ecx, eax
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x409f53
mov edx, dword [ebp - 0x944]
mov eax, dword [ebp - 0x940]
mov ecx, dword [ebp - 0x93c]
mov dword [edi + 0x10a8], edx
mov edx, dword [ebp - 0x938]
mov dword [edi + 0x10b4], edx
mov dword [edi + 0x10ac], eax
mov eax, dword [ebp - 0x934]
mov dword [edi + 0x10b0], ecx
mov ecx, dword [ebp - 0x930]
lea edx, [ebp - 0x934]
push edx
lea esi, [edi + 0xc18]
mov dword [edi + 0x10b8], eax
mov dword [edi + 0x10bc], ecx
call fcn.004100c0
lea eax, [ebp - 0x944]
push eax
lea esi, [edi + 0xc48]
call fcn.004100c0
lea ecx, [ebp - 0x93c]
push ecx
lea esi, [edi + 0xc78]
call fcn.004100c0
mov edx, dword [edi + 0xc18]
mov eax, dword [edi + 0xc2c]
sub edx, 0x3c
shl edx, 4
or edx, dword [edi + 0xc1c]
shr eax, 1
shl edx, 5
or edx, dword [edi + 0xc20]
shl edx, 5
or edx, dword [edi + 0xc24]
shl edx, 6
or edx, dword [edi + 0xc28]
shl edx, 5
or edx, eax
mov dword [edi + 0xc0c], edx
mov al, byte [edi]
test al, al
je 0x40a031
cmp al, 0x20
jb 0x40a03c
cmp al, 0x7f
ja 0x40a03c
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40a021
mov edx, dword [ebp - 0xa60]
xor ecx, ecx
mov word [edx], cx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xa5c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00486a8b
mov esp, ebp
pop ebp
ret