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

Disassembly:
sub esp, 0x204
push ebp
mov ebp, dword [esp + 0x20c]
cmp byte [ebp], 0
mov dword [esp + 4], ecx
je 0x535846
push esi
push 0xfe
lea eax, [esp + 0x12]
push 0
mov esi, 0x20
push eax
mov word [esp + 0x18], si
call fcn.0058ac30
push 0xfe
lea ecx, [esp + 0x11e]
push 0
push ecx
mov word [esp + 0x124], si
call fcn.0058ac30
lea edx, [esp + 0x24]
add esp, 0x18
mov eax, ebp
sub edx, ebp
nop
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x5355e0
lea edx, [esp + 0xc]
push edx
call fcn.0058b0cc
add esp, 4
cmp byte [0xa4803c], 0
je 0x53562a
push ebp
push 0xa4803c
lea eax, [esp + 0x114]
push 0x5bd104
push eax
call fcn.00589571
lea ecx, [esp + 0x11c]
push ecx
call fcn.0058b0cc
add esp, 0x14
push edi
mov edi, 0x5ae364
mov esi, ebp
mov ecx, 2
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x53564f
mov edi, 0x6384c0
mov esi, ebp
mov ecx, 3
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x535671
push ebp
push 0xa4803c
lea ecx, [esp + 0x18]
push 0x5bd104
push ecx
call fcn.00589571
lea edx, [esp + 0x20]
push edx
call fcn.0058b0cc
add esp, 0x14
lea eax, [esp + 0x10]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x535678
sub eax, edx
cmp byte [esp + eax + 0xf], 0x5c
jne 0x5356c2
lea eax, [esp + 0x10]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x535691
sub eax, edx
mov byte [esp + eax + 0xf], cl
lea eax, [esp + 0x110]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x5356b0
sub eax, edx
mov byte [esp + eax + 0x10f], cl
mov esi, dword [sym.imp.kernel32.dll_GetFileAttributesA]
lea eax, [esp + 0x10]
push eax
call esi
cmp eax, 0xffffffff
jne 0x535770
lea ecx, [esp + 0x110]
push ecx
call esi
cmp eax, 0xffffffff
jne 0x53570a
mov edx, dword [esp + 0xc]
push ebp
push str.Search_path__s_does_not_exist
push eax
push edx
call fcn.00533f30
add esp, 0x10
pop edi
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0x204
ret 8
xor eax, eax
lea esp, [esp]
mov cl, byte [esp + eax + 0x110]
mov byte [esp + eax + 0x10], cl
add eax, 1
test cl, cl
jne 0x535710
cmp byte [esp + 0x218], 0
mov edi, 0xa47c48
jne 0x535736
mov edi, 0xa4813c
mov eax, dword [edi]
test eax, eax
mov dword [edi + 8], eax
je 0x5357a6
mov eax, dword [eax]
test eax, eax
je 0x5357a6
lea ecx, [eax + 4]
lea eax, [esp + 0x10]
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x535786
test dl, dl
je 0x53576c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x535786
add eax, 2
add ecx, 2
test dl, dl
jne 0x535750
xor eax, eax
jmp 0x53578b
test al, 0x10
jne 0x535722
mov eax, dword [esp + 0xc]
push ebp
push str.Search_path__s_is_not_a_directory
push 0xffffffffffffffff
push eax
jmp 0x5356f3
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x5357d6
mov eax, dword [edi + 8]
test eax, eax
je 0x5357a6
mov eax, dword [eax + 4]
test eax, eax
mov dword [edi + 8], eax
je 0x5357a6
mov eax, dword [eax]
test eax, eax
jne 0x535745
push 0x104
call fcn.00588cb9
mov esi, eax
add esp, 4
test esi, esi
je 0x5357fc
push 0x100
lea edx, [esi + 4]
push 0
push edx
mov dword [esi], 0
call fcn.0058ac30
add esp, 0xc
mov edx, esi
jmp 0x5357fe
mov ecx, dword [esp + 0xc]
push ebp
push str.Search_path__s_already_exists
push 0xfffffffffffffffd
push ecx
call fcn.00533f30
add esp, 0x10
pop edi
pop esi
mov eax, 0xfffffffd
pop ebp
add esp, 0x204
ret 8
xor edx, edx
lea eax, [esp + 0x10]
mov esi, eax
mov ecx, edx
sub ecx, esi
lea esi, [ecx + 4]
jmp 0x535810
mov cl, byte [eax]
mov byte [esi + eax], cl
add eax, 1
test cl, cl
jne 0x535810
mov al, byte [esp + 0x218]
neg al
push 1
push edx
mov ecx, edi
sbb eax, eax
and eax, 0x4000
or dword [edx], eax
call fcn.00535020
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x204
ret 8
push ebp
push 0x63841c
push 0xffffffffffffffff
push ecx
call fcn.00533f30
add esp, 0x10
or eax, 0xffffffff
pop ebp
add esp, 0x204
ret 8