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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40f95c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c8
mov eax, dword [0x4160f0]
push ebx
push esi
xor esi, esi
mov dword [esp + 0x2c8], eax
push edi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov edi, dword [ebp + 0xc]
cmp dword [edi + 0x18], 8
mov dword [esp + 0x2dc], esi
jb 0x403567
mov eax, dword [edi + 4]
jmp 0x40356a
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40357a
test al, 0x10
jne 0x403590
mov esi, dword [ebp + 8]
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call fcn.00402fd0
mov eax, esi
jmp 0x403787
mov ebx, 7
push 0x411244
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], esi
mov word [esp + 0x28], si
call fcn.00409a7d
add esp, 4
push eax
push 0x411244
lea ecx, [esp + 0x28]
call fcn.00402010
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x60]
push edi
push edx
mov byte [esp + 0x2e8], 1
call fcn.00402c30
add esp, 0xc
cmp dword [esp + 0x38], 8
mov byte [esp + 0x2dc], 3
jb 0x4035f5
mov eax, dword [esp + 0x24]
push eax
call fcn.00409ad2
add esp, 4
xor eax, eax
mov ecx, 0x93
lea edi, [esp + 0x7c]
mov dword [esp + 0x78], esi
rep stosd dword es:[edi], eax
cmp dword [esp + 0x74], 8
mov eax, dword [esp + 0x60]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], esi
mov word [esp + 0x24], si
jae 0x403622
lea eax, [esp + 0x60]
lea ecx, [esp + 0x78]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x403660
mov edi, dword [ebp + 8]
lea edx, [esp + 0x10]
push edx
mov ecx, edi
call fcn.00402fd0
cmp dword [esp + 0x74], 8
jb 0x40376f
mov eax, dword [esp + 0x60]
push eax
jmp 0x403767
lea ecx, [esp + 0xa4]
push ecx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x58], esi
mov word [esp + 0x48], si
call fcn.00409a7d
add esp, 4
push eax
lea edx, [esp + 0xa8]
push edx
lea ecx, [esp + 0x48]
call fcn.00402010
push 0x411240
mov byte [esp + 0x2e0], 4
call fcn.00409a7d
add esp, 4
push eax
mov eax, dword [esp + 0x58]
push 0x411240
push eax
push esi
lea ecx, [esp + 0x50]
call fcn.004010d0
test eax, eax
je 0x403707
push 0x411238
call fcn.00409a7d
mov ecx, dword [esp + 0x58]
add esp, 4
push eax
push 0x411238
push ecx
push esi
lea ecx, [esp + 0x50]
call fcn.004010d0
test eax, eax
je 0x403707
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x14]
call fcn.00403480
cmp dword [esp + 0x58], 8
mov byte [esp + 0x2dc], 3
jb 0x403723
mov eax, dword [esp + 0x44]
push eax
jmp 0x40371b
cmp dword [esp + 0x58], 8
mov byte [esp + 0x2dc], 3
jb 0x403723
mov ecx, dword [esp + 0x44]
push ecx
call fcn.00409ad2
add esp, 4
lea edx, [esp + 0x78]
push edx
push edi
mov dword [esp + 0x60], ebx
mov dword [esp + 0x5c], esi
mov word [esp + 0x4c], si
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
cmp eax, 1
je 0x403660
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [ebp + 8]
lea eax, [esp + 0x10]
push eax
mov ecx, edi
call fcn.00402fd0
cmp dword [esp + 0x74], 8
jb 0x40376f
mov ecx, dword [esp + 0x60]
push ecx
call fcn.00409ad2
add esp, 4
lea ecx, [esp + 0x10]
mov word [esp + 0x60], si
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], ebx
call fcn.00402f90
mov eax, edi
mov ecx, dword [esp + 0x2d4]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x2cc]
call fcn.00409ac4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret