Function at 0x10005ce0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100ba699
mov eax, dword fs:[0]
push eax
sub esp, 0x2ac
mov eax, dword [0x100e70dc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x298], ebx
push ecx
lea ecx, [ebp - 0x29c]
call fcn.10004bb0
mov dword [ebp - 4], 0
mov esi, dword [ebp - 0x29c]
test esi, esi
je 0x10006034
mov edi, dword [ebx]
xor ecx, ecx
mov dword [ebp - 0x27c], ecx
mov eax, 0x2aaaaaab
mov ecx, dword [ebx + 4]
sub ecx, edi
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x10006027
xor esi, esi
nop
lea edx, [edi + esi]
lea ecx, [ebp - 0x28]
call fcn.10035c90
xor eax, eax
mov byte [ebp - 4], 1
push 0xffffffffffffffff
push eax
mov word [ebp - 0x2b4], ax
lea ecx, [ebp - 0x2b4]
lea eax, [ebp - 0x28]
mov dword [ebp - 0x2a0], 7
push eax
mov dword [ebp - 0x2a4], 0
call fcn.10003cc0
mov byte [ebp - 4], 2
lea eax, [ebp - 0x2b4]
cmp dword [ebp - 0x2a0], 8
cmovae eax, dword [ebp - 0x2b4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp edi, 0xffffffff
je 0x10005df7
shr edi, 4
not edi
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2a0]
and edi, 1
cmp eax, 8
jb 0x10005f2c
inc eax
lea ecx, [ebp - 0x2b4]
push eax
push dword [ebp - 0x2b4]
call fcn.10004440
jmp 0x10005f2c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x10005f02
cmp eax, 3
je 0x10005f02
cmp eax, 0x7b
je 0x10005f02
xor eax, eax
mov dword [ebp - 0x280], 7
push 0xffffffffffffffff
push eax
mov word [ebp - 0x294], ax
lea ecx, [ebp - 0x294]
lea eax, [ebp - 0x2b4]
mov dword [ebp - 0x284], 0
push eax
call fcn.10003cc0
cmp dword [ebp - 0x280], 8
lea ecx, [ebp - 0x278]
lea eax, [ebp - 0x294]
cmovae eax, dword [ebp - 0x294]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x10005ec7
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x280]
xor ebx, ebx
cmp dword [ebp - 0x278], ebx
sete bl
cmp eax, 8
jb 0x10005ea1
inc eax
lea ecx, [ebp - 0x294]
push eax
push dword [ebp - 0x294]
call fcn.10004440
xor eax, eax
mov dword [ebp - 0x280], 7
mov dword [ebp - 0x284], 0
mov word [ebp - 0x294], ax
test ebx, ebx
je 0x10005f02
lea edi, [eax + 1]
jmp 0x10005f04
mov eax, dword [ebp - 0x280]
cmp eax, 8
jb 0x10005ee5
inc eax
lea ecx, [ebp - 0x294]
push eax
push dword [ebp - 0x294]
call fcn.10004440
xor eax, eax
mov dword [ebp - 0x280], 7
mov dword [ebp - 0x284], 0
mov word [ebp - 0x294], ax
xor edi, edi
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2a0]
cmp eax, 8
jb 0x10005f26
inc eax
lea ecx, [ebp - 0x2b4]
push eax
push dword [ebp - 0x2b4]
call fcn.10004440
mov ebx, dword [ebp - 0x298]
test edi, edi
je 0x10005fdb
push 1
push 0x100db80c
lea ecx, [ebp - 0x28]
call fcn.10003020
mov edx, dword [ebx]
lea ecx, [ebp - 0x2b4]
add edx, 0x18
add edx, esi
call fcn.10035c90
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
call fcn.10002f10
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2a0]
cmp eax, 8
jb 0x10005f88
inc eax
lea ecx, [ebp - 0x2b4]
push eax
push dword [ebp - 0x2b4]
call fcn.10004440
cmp dword [ebp - 0x14], 8
lea edx, [ebp - 0x28]
cmovae edx, dword [ebp - 0x28]
sub esp, 0x18
mov edi, esp
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], 0
mov word [edi], ax
cmp word [edx], ax
je 0x10005fca
mov eax, edx
lea ebx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10005fb5
sub eax, ebx
mov ebx, dword [ebp - 0x298]
sar eax, 1
push eax
push edx
mov ecx, edi
call fcn.10004020
call fcn.100052c0
add esp, 0x18
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x10005ff4
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.10004440
mov ecx, dword [ebx + 4]
mov eax, 0x2aaaaaab
mov edi, dword [ebx]
add esi, 0x30
inc dword [ebp - 0x27c]
sub ecx, edi
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [ebp - 0x27c], eax
jb 0x10005d60
mov esi, dword [ebp - 0x29c]
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1007bf25
mov esp, ebp
pop ebp
ret