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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x537883
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x5c6150]
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 dword [ebp - 0x48], ecx
mov edi, dword [ebp + 8]
xor eax, eax
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 1
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x52af7a
mov eax, dword [esi]
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call ebx
cmp eax, 0xffffffff
je 0x52af91
shr eax, 4
not al
and al, 1
jne 0x52afad
cmp dword [esi + 0x2c], 8
lea eax, [esi + 0x18]
jb 0x52af9c
mov eax, dword [eax]
push eax
call ebx
cmp eax, 0xffffffff
je 0x52aff3
shr eax, 4
not al
and al, 1
je 0x52aff3
lea eax, [ebp - 0x40]
cmp eax, esi
je 0x52afca
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x52afbe
mov eax, dword [esi]
push dword [esi + 0x10]
lea ecx, [ebp - 0x40]
push eax
call fcn.00413520
add esi, 0x18
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x52b075
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x52afe2
mov eax, dword [esi]
push dword [esi + 0x10]
lea ecx, [ebp - 0x28]
push eax
call fcn.00413520
jmp 0x52b075
cmp dword [esi + 0x44], 8
lea edi, [esi + 0x30]
mov eax, edi
jb 0x52b000
mov eax, dword [edi]
push eax
call ebx
cmp eax, 0xffffffff
je 0x52b011
shr eax, 4
not al
and al, 1
jne 0x52b035
cmp dword [esi + 0x5c], 8
lea eax, [esi + 0x48]
jb 0x52b01c
mov eax, dword [eax]
push eax
call ebx
cmp eax, 0xffffffff
je 0x52b178
shr eax, 4
not al
and al, 1
je 0x52b178
lea eax, [ebp - 0x40]
cmp eax, edi
je 0x52b052
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x52b046
mov eax, dword [edi]
push dword [edi + 0x10]
lea ecx, [ebp - 0x40]
push eax
call fcn.00413520
add esi, 0x48
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x52b072
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x52b066
mov eax, dword [esi]
push dword [esi + 0x10]
lea ecx, [ebp - 0x28]
push eax
call fcn.00413520
mov edi, dword [ebp - 0x44]
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call ebx
cmp eax, 0xffffffff
je 0x52b0f6
shr eax, 4
not al
and al, 1
je 0x52b0f6
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
push ecx
mov ecx, dword [ebp - 0x48]
call fcn.0052ab20
test al, al
jne 0x52b1aa
cmp dword [ebp - 0x14], 8
lea esi, [ebp - 0x28]
push 4
cmovae esi, dword [ebp - 0x28]
mov ecx, edi
push str.load
call fcn.0042c750
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x52b0d0
sub ecx, edx
sar ecx, 1
push ecx
push esi
mov ecx, edi
call fcn.0042c750
push 9
push str.__failed.
mov ecx, edi
call fcn.0042c750
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
call ebx
cmp eax, 0xffffffff
je 0x52b178
shr eax, 4
not al
and al, 1
je 0x52b178
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
push ecx
mov ecx, dword [ebp - 0x48]
call fcn.0052ab20
test al, al
jne 0x52b1aa
cmp dword [ebp - 0x2c], 8
lea esi, [ebp - 0x40]
push 4
cmovae esi, dword [ebp - 0x40]
mov ecx, edi
push str.load
call fcn.0042c750
mov edx, esi
lea edi, [edx + 2]
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x52b150
mov ecx, dword [ebp - 0x44]
sub edx, edi
sar edx, 1
push edx
push esi
call fcn.0042c750
mov ecx, dword [ebp - 0x44]
push 9
push str.__failed.
call fcn.0042c750
xor bl, bl
lea ecx, [ebp - 0x28]
call fcn.004134c0
lea ecx, [ebp - 0x40]
call fcn.004134c0
mov al, bl
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.004d6cfd
mov esp, ebp
pop ebp
ret 8
mov bl, 1
jmp 0x52b17a