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

Disassembly:
push ebp
mov ebp, esp
cmp dword [0x631c10], 0
mov eax, dword [ebp + 8]
je 0x520004
push eax
call fcn.005231bc
pop edx
mov dword [ebp + 8], eax
leave
jmp 0x5289e0
push eax
call fcn.005231a2
pop ecx
mov dword [ebp + 8], eax
leave
jmp 0x528480
push edi
push esi
push ebx
sub esp, 0x120
mov ebx, dword [esp + 0x130]
call sub.msvcrt.dll__errno
mov dword [eax], 0
test ebx, ebx
je 0x5286a9
cmp byte [ebx], 0
je 0x528674
mov dword [esp], ebx
call sub.KERNEL32.DLL_GetFileAttributesA
sub esp, 4
cmp eax, 0xffffffff
je 0x52869a
test al, 0x10
je 0x528674
mov dword [esp + 4], ebx
mov eax, 0x104
lea esi, [esp + 0x10]
mov dword [esp + 8], eax
mov dword [esp], esi
call sub.msvcrt.dll__fullpath
mov ecx, esi
lea esi, [esi]
lea edi, [edi]
mov ebx, dword [ecx]
add ecx, 4
lea edx, [ebx - 0x1010101]
not ebx
and edx, ebx
mov eax, edx
and eax, 0x80808080
je 0x5284f0
and edx, 0x8080
jne 0x528516
shr eax, 0x10
add ecx, 2
add al, al
sbb ecx, 3
sub ecx, esi
lea edx, [ecx + 0x233]
mov dword [esp], edx
call sub.msvcrt.dll_malloc
test eax, eax
mov ebx, eax
je 0x52868b
mov dword [esp + 4], esi
lea esi, [eax + 0x22c]
mov dword [esp], esi
call sub.msvcrt.dll_strcpy
cmp byte [ebx + 0x22c], 0
je 0x528610
mov dword [esp], esi
mov ecx, 0x2f
mov dword [esp + 4], ecx
call sub.msvcrt.dll_strrchr
mov edi, eax
mov ecx, esi
lea esi, [esi]
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
mov eax, edx
and eax, 0x80808080
je 0x528570
and edx, 0x8080
jne 0x528596
shr eax, 0x10
add ecx, 2
add al, al
sbb ecx, 3
sub ecx, esi
lea edx, [ecx + ebx + 0x22b]
cmp edi, edx
je 0x528610
mov dword [esp], esi
mov edi, 0x5c
mov dword [esp + 4], edi
call sub.msvcrt.dll_strrchr
mov edi, eax
mov ecx, esi
lea esi, [esi]
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
mov eax, edx
and eax, 0x80808080
je 0x5285c0
and edx, 0x8080
jne 0x5285e6
shr eax, 0x10
add ecx, 2
add al, al
sbb ecx, 3
sub ecx, esi
lea edx, [ecx + ebx + 0x22b]
cmp edi, edx
je 0x528610
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov word [eax + esi], 0x5c
lea esi, [esi]
lea edi, [edi]
mov dword [esp], esi
mov edi, 0xffffffff
call sub.msvcrt.dll_strlen
mov word [eax + esi], 0x2a
xor ecx, ecx
xor esi, esi
mov dword [ebx + 0x224], edi
xor edx, edx
xor eax, eax
mov dword [ebx + 0x228], ecx
mov edi, 0x104
xor ecx, ecx
mov dword [ebx + 0x118], esi
lea esi, [ebx + 0x120]
mov word [ebx + 0x11c], dx
mov word [ebx + 0x11e], ax
mov dword [esp + 8], edi
mov dword [esp], esi
mov dword [esp + 4], ecx
call sub.msvcrt.dll_memset
add esp, 0x120
mov eax, ebx
pop ebx
pop esi
pop edi
ret
call sub.msvcrt.dll__errno
mov dword [eax], 0x14
xor eax, eax
add esp, 0x120
pop ebx
pop esi
pop edi
ret
call sub.msvcrt.dll__errno
mov dword [eax], 0xc
xor eax, eax
jmp 0x528681
call sub.msvcrt.dll__errno
mov dword [eax], 2
xor eax, eax
jmp 0x528681
call sub.msvcrt.dll__errno
mov dword [eax], 0xe
xor eax, eax
jmp 0x528681
push edi
push esi
push ebx
sub esp, 0x340
mov esi, dword [esp + 0x350]
call sub.msvcrt.dll__errno
mov dword [eax], 0
test esi, esi
je 0x528c15
cmp word [esi], 0
je 0x528be0
mov edx, dword [sym.imp.msvcrt.dll__osver]
mov eax, dword [edx]
and eax, 0x8000
test ax, ax
jne 0x528b22
mov dword [esp], esi
call sub.KERNEL32.DLL_GetFileAttributesW
sub esp, 4
cmp eax, 0xffffffff
je 0x528c06
test al, 0x10
je 0x528be0
mov dword [esp + 4], esi
mov edi, 0x104
mov dword [esp + 8], edi
lea edi, [esp + 0x130]
mov dword [esp], edi
call sub.msvcrt.dll__wfullpath
mov dword [esp], edi
call sub.msvcrt.dll_wcslen
mov dword [esp], 0x61f7c0
mov ebx, eax
call sub.msvcrt.dll_wcslen
mov dword [esp], 0x61f7c4
add ebx, eax
call sub.msvcrt.dll_wcslen
lea ecx, [ebx + eax]
lea esi, [ecx + ecx + 0x43a]
mov dword [esp], esi
call sub.msvcrt.dll_malloc
test eax, eax
mov esi, eax
je 0x528bf7
mov dword [esp + 4], edi
lea edi, [eax + 0x434]
mov dword [esp], edi
call sub.msvcrt.dll_wcscpy
cmp word [esi + 0x434], 0
jne 0x528b70
mov dword [esp], edi
mov eax, 0x61f7c4
mov ebx, 0xffffffff
mov dword [esp + 4], eax
xor edi, edi
call sub.msvcrt.dll_wcscat
mov dword [esi + 0x42c], ebx
xor ecx, ecx
xor edx, edx
mov dword [esi + 0x430], ecx
xor eax, eax
mov ebx, 0x104
mov dword [esi + 0x21c], edi
xor ecx, ecx
lea edi, [esi + 0x224]
mov word [esi + 0x220], dx
mov word [esi + 0x222], ax
mov dword [esp + 8], ebx
mov dword [esp], edi
mov dword [esp + 4], ecx
call sub.msvcrt.dll_memset
add esp, 0x340
mov eax, esi
pop ebx
pop esi
pop edi
ret
mov dword [esp + 8], esi
xor ebx, ebx
xor edx, edx
mov dword [esp + 0x1c], ebx
mov ecx, 0xffffffff
lea ebx, [esp + 0x20]
mov dword [esp + 0x18], edx
mov eax, 0x104
xor edi, edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 4], edi
mov dword [esp + 0x14], eax
mov dword [esp], 0
call sub.KERNEL32.DLL_WideCharToMultiByte
sub esp, 0x20
mov dword [esp], ebx
call sub.KERNEL32.DLL_GetFileAttributesA
jmp 0x528a2b
mov dword [esp], edi
mov edx, 0x2f
mov dword [esp + 4], edx
call sub.msvcrt.dll_wcsrchr
mov dword [esp], edi
mov ebx, eax
call sub.msvcrt.dll_wcslen
lea eax, [esi + eax*2 + 0x432]
cmp ebx, eax
je 0x528abb
mov dword [esp], edi
mov eax, 0x5c
mov dword [esp + 4], eax
call sub.msvcrt.dll_wcsrchr
mov dword [esp], edi
mov ebx, eax
call sub.msvcrt.dll_wcslen
lea ecx, [esi + eax*2 + 0x432]
cmp ebx, ecx
je 0x528abb
mov dword [esp], edi
mov edx, 0x61f7c0
mov dword [esp + 4], edx
call sub.msvcrt.dll_wcscat
jmp 0x528abb
call sub.msvcrt.dll__errno
mov dword [eax], 0x14
xor eax, eax
add esp, 0x340
pop ebx
pop esi
pop edi
ret
call sub.msvcrt.dll__errno
mov dword [eax], 0xc
xor eax, eax
jmp 0x528bed
call sub.msvcrt.dll__errno
mov dword [eax], 2
xor eax, eax
jmp 0x528bed
call sub.msvcrt.dll__errno
mov dword [eax], 0xe
xor eax, eax
jmp 0x528bed