Function at 0x5399f5
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x358
push esi
push edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x254], 0
mov dword [ebp - 0x148], 0
mov dword [ebp - 0x14c], 0
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x358]
rep stosd dword es:[edi], eax
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x250]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x358]
push eax
call fcn.00529440
add esp, 4
lea edi, [ebp - 0x358]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
movsx ecx, byte [ebp + ecx - 0x359]
cmp ecx, 0x5c
je 0x539a85
push 0x5ccb94
lea edx, [ebp - 0x358]
push edx
call fcn.0054bea0
add esp, 8
push 0x5ccb98
lea eax, [ebp - 0x358]
push eax
call fcn.0054bea0
add esp, 8
cmp dword [ebp + 0xc], 0
jne 0x539c3d
mov edi, dword [ebp + 8]
lea edx, [ebp - 0x250]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x5ccba8
lea ecx, [ebp - 0x250]
push ecx
call fcn.0054bea0
add esp, 8
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x539af2
xor eax, eax
jmp 0x539cdd
lea eax, [ebp - 0x358]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x539c3b
push 0x5ccbac
lea ecx, [ebp - 0x358]
push ecx
call fcn.0054cc9f
add esp, 8
mov dword [ebp - 0x254], eax
cmp dword [ebp - 0x254], 0
jne 0x539b32
xor eax, eax
jmp 0x539cdd
lea edx, [ebp - 0x144]
push edx
lea eax, [ebp - 0x250]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x14c], eax
cmp dword [ebp - 0x14c], 0xffffffff
jne 0x539b75
mov ecx, dword [ebp - 0x254]
push ecx
call fcn.0054cbf2
add esp, 4
mov dword [ebp - 0x254], 0
xor eax, eax
jmp 0x539cdd
mov dword [ebp - 4], 0
cmp dword [ebp - 4], 0
jne 0x539c2e
lea edx, [ebp - 0x250]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 0x148], eax
mov eax, dword [ebp - 0x148]
and eax, 0x10
test eax, eax
jne 0x539bc3
mov ecx, dword [ebp - 0x254]
push ecx
push 0x104
push 1
lea edx, [ebp - 0x250]
push edx
call fcn.0054e00a
add esp, 0x10
lea eax, [ebp - 0x144]
push eax
mov ecx, dword [ebp - 0x14c]
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x539bed
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x539bed
mov dword [ebp - 4], 1
mov edi, dword [ebp + 8]
lea edx, [ebp - 0x250]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x118]
push ecx
lea edx, [ebp - 0x250]
push edx
call fcn.0054bea0
add esp, 8
jmp 0x539b7c
mov eax, dword [ebp - 0x14c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x539cb6
push 0x5ccbb0
lea ecx, [ebp - 0x358]
push ecx
call fcn.0054cc9f
add esp, 8
mov dword [ebp - 0x254], eax
cmp dword [ebp - 0x254], 0
jne 0x539c64
xor eax, eax
jmp 0x539cdd
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x250]
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 0xc]
lea edx, [ebp - 0x250]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x254]
push ecx
push 0x104
push 1
lea edx, [ebp - 0x250]
push edx
call fcn.0054e00a
add esp, 0x10
cmp dword [ebp - 0x254], 0
je 0x539cd8
mov eax, dword [ebp - 0x254]
push eax
call fcn.0054cbf2
add esp, 4
mov dword [ebp - 0x254], 0
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret