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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50eded
mov eax, dword fs:[0]
push eax
sub esp, 0x504
mov eax, dword [0x558384]
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 edi, ecx
mov ebx, dword [ebp + 8]
push ebx
call fcn.004aa080
mov esi, eax
add esp, 4
test esi, esi
js 0x4a98f6
cmp word [ebx + esi*2 + 2], 0
lea eax, [ebx + esi*2]
je 0x4a98f6
push eax
lea ecx, [ebp - 0x500]
call fcn.004a86a0
push ebx
lea ecx, [ebp - 0x4d0]
mov dword [ebp - 4], 0
call fcn.004a86a0
mov byte [ebp - 4], 1
cmp esi, dword [ebp - 0x4cc]
jae 0x4a9642
mov eax, dword [ebp - 0x4d0]
xor ecx, ecx
mov dword [ebp - 0x4cc], esi
mov word [eax + esi*2], cx
mov ecx, dword [ebp - 0x4fc]
cmp ecx, 6
jbe 0x4a966b
mov eax, dword [ebp - 0x500]
push str.:_DATA
lea eax, [eax + ecx*2]
add eax, 0xfffffff4
push eax
call fcn.004a8ee0
add esp, 8
test al, al
jne 0x4a967b
push str.:_DATA
lea ecx, [ebp - 0x500]
call fcn.004a89c0
push dword [ebp - 0x4d0]
call fcn.004aa380
add esp, 4
test al, al
mov eax, dword [ebp - 0x4d0]
je 0x4a96d0
cmp esi, 2
je 0x4a96a4
cmp esi, 3
jne 0x4a96d0
cmp word [eax + 4], 0x5c
jne 0x4a96d0
mov ecx, edi
call fcn.004a93f0
mov eax, dword [edi + 0x28]
lea ecx, [edi + 0x28]
xor edx, edx
mov dword [ecx + 4], 0
mov word [eax], dx
cmp esi, 2
jne 0x4a96e3
lea eax, [ebp - 0x4d0]
push eax
call fcn.004a8790
jmp 0x4a96e3
push dword [ebp + 0xc]
mov ecx, edi
push eax
call fcn.004a95b0
test al, al
je 0x4a98dd
and dword [edi + 0x20], 0xfffffbef
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [ebp - 0x510], 0xffffffff
lea eax, [ebp - 0x4d0]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x50c]
call fcn.004a8640
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x4f4]
call fcn.004a8700
mov ecx, dword [ebp - 0x510]
mov byte [ebp - 4], 4
cmp ecx, 0xffffffff
je 0x4a977a
mov eax, dword [0x562550]
test eax, eax
je 0x4a986f
lea edx, [ebp - 0x268]
push edx
push ecx
call eax
test eax, eax
je 0x4a9873
mov eax, dword [ebp - 0x268]
mov dword [ebp - 0x4e4], eax
mov eax, dword [ebp - 0x264]
mov dword [ebp - 0x4e0], eax
lea eax, [ebp - 0x260]
jmp 0x4a97e8
cmp dword [0x56254c], 0
mov esi, dword [ebp - 0x50c]
je 0x4a986f
push 0
call ebx
push 0
lea eax, [ebp - 0x4c0]
push eax
push 0
push esi
call dword [0x56254c]
mov dword [ebp - 0x510], eax
cmp eax, 0xffffffff
jne 0x4a97ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
je 0x4a9873
cmp dword [ebp - 0x510], 0xffffffff
je 0x4a9873
mov eax, dword [ebp - 0x4c0]
mov dword [ebp - 0x4e4], eax
mov eax, dword [ebp - 0x4bc]
mov dword [ebp - 0x4e0], eax
lea eax, [ebp - 0x4b8]
push eax
lea ecx, [ebp - 0x4f4]
call fcn.004a8800
push dword [ebp - 0x500]
push dword [ebp - 0x4f4]
call fcn.004a8e40
add esp, 8
test al, al
jne 0x4a9823
push dword [ebp - 0x4f4]
mov byte [ebp - 4], 3
call fcn.004b8926
add esp, 4
jmp 0x4a9721
mov eax, dword [ebp - 0x4f0]
cmp eax, 7
jbe 0x4a9847
lea ecx, [eax - 6]
cmp ecx, eax
jae 0x4a9847
mov eax, dword [ebp - 0x4f4]
xor edx, edx
mov dword [ebp - 0x4f0], ecx
mov word [eax + ecx*2], dx
lea eax, [ebp - 0x4f4]
lea ecx, [edi + 0x28]
push eax
call fcn.004a8980
mov eax, dword [ebp - 0x4e4]
mov bl, 1
mov dword [edi], eax
mov eax, dword [ebp - 0x4e0]
mov dword [edi + 4], eax
mov byte [edi + 0x24], 1
jmp 0x4a9884
push 0x78
call ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
jne 0x4a9882
push 2
call ebx
xor bl, bl
push dword [ebp - 0x4f4]
call fcn.004b8926
push dword [ebp - 0x50c]
call fcn.004b8926
mov eax, dword [ebp - 0x510]
add esp, 8
cmp eax, 0xffffffff
je 0x4a98bd
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x4a98bd
mov dword [ebp - 0x510], 0xffffffff
push dword [ebp - 0x4d0]
call fcn.004b8926
push dword [ebp - 0x500]
call fcn.004b8926
add esp, 8
mov al, bl
jmp 0x4a9c0d
push dword [ebp - 0x4d0]
call fcn.004b8926
push dword [ebp - 0x500]
call fcn.004b8926
add esp, 8
mov dword [ebp - 0x4d8], 0xffffffff
push ebx
mov dword [ebp - 4], 5
xor esi, esi
call fcn.004aa470
add esp, 4
test al, al
je 0x4a991b
mov esi, 4
lea eax, [ebx + esi*2]
push eax
mov dword [ebp - 0x4d4], eax
call fcn.004aa3b0
add esp, 4
test al, al
je 0x4a999a
cmp word [ebx + esi*2 + 6], 0
jne 0x4a999a
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x4dc], eax
cmp eax, 0xffffffff
je 0x4a9b9e
test al, 0x10
je 0x4a9b9e
mov ecx, edi
call fcn.004a93f0
mov eax, dword [ebp - 0x4dc]
lea ecx, [edi + 0x28]
push dword [ebp - 0x4d4]
mov dword [edi + 0x20], eax
call fcn.004a8800
cmp dword [edi + 0x2c], 2
jbe 0x4a998b
mov eax, dword [edi + 0x28]
xor ecx, ecx
mov dword [edi + 0x2c], 2
mov word [eax + 4], cx
push ebx
mov ecx, edi
call fcn.004a94d0
mov cl, 1
jmp 0x4a9c0b
movzx eax, word [ebx]
cmp eax, 0x5c
je 0x4a99ab
cmp eax, 0x2f
jne 0x4a9b9e
cmp word [ebx + 2], 0
push ebx
jne 0x4a99f6
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x4d4], eax
cmp eax, 0xffffffff
je 0x4a9b9e
test al, 0x10
je 0x4a9b9e
mov ecx, edi
call fcn.004a93f0
mov eax, dword [edi + 0x28]
xor ecx, ecx
mov dword [edi + 0x2c], 0
mov word [eax], cx
mov cl, 1
mov eax, dword [ebp - 0x4d4]
mov dword [edi + 0x20], eax
jmp 0x4a9c0b
call fcn.004aa130
add esp, 4
test eax, eax
je 0x4a9b9e
cmp word [ebx + eax*2], 0
lea esi, [ebx + eax*2]
je 0x4a9b9e
push esi
call fcn.004aa0f0
add esp, 4
test eax, eax
jns 0x4a9b9e
push ebx
mov ecx, edi
call fcn.004a94d0
test al, al
je 0x4a9a41
lea ecx, [edi + 0x28]
push esi
call fcn.004a8800
mov cl, 1
jmp 0x4a9c0b
push ebx
lea ecx, [ebp - 0x4d0]
call fcn.004a86a0
mov ecx, dword [ebp - 0x4cc]
mov byte [ebp - 4], 6
cmp dword [ebp - 0x4c8], ecx
jne 0x4a9a70
lea ecx, [ebp - 0x4d0]
call fcn.004a8bc0
mov ecx, dword [ebp - 0x4cc]
mov eax, dword [ebp - 0x4d0]
mov edx, 0x5c
push 0x2a
mov word [eax + ecx*2], dx
inc ecx
xor edx, edx
mov word [eax + ecx*2], dx
mov dword [ebp - 0x4cc], ecx
lea ecx, [ebp - 0x4d0]
call fcn.004a93b0
push edi
push dword [ebp - 0x4d0]
lea ecx, [ebp - 0x4d8]
mov byte [ebp - 0x4c1], 0
call fcn.004a9c30
test al, al
je 0x4a9b07
lea eax, [edi + 0x28]
mov ecx, 0x5363cc
mov dword [ebp - 0x4d4], eax
mov eax, dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4a9aec
test dx, dx
je 0x4a9ae8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4a9aec
add eax, 4
add ecx, 4
test dx, dx
jne 0x4a9ac6
xor eax, eax
jmp 0x4a9af1
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4a9b00
mov ecx, dword [ebp - 0x4d4]
jmp 0x4a9b80
mov byte [ebp - 0x4c1], 1
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x4dc], eax
cmp eax, 0xffffffff
jne 0x4a9b21
or eax, eax
mov dword [ebp - 0x4dc], eax
cmp byte [ebp - 0x4c1], 0
jne 0x4a9b5f
cmp eax, 0xffffffff
je 0x4a9b33
test al, 0x10
jne 0x4a9b5f
push dword [ebp - 0x4d0]
mov byte [ebp - 4], 5
call fcn.004b8926
mov esi, dword [ebp - 0x4d8]
add esp, 4
cmp esi, 0xffffffff
je 0x4a9b9e
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
jne 0x4a9b9e
xor cl, cl
jmp 0x4a9bcf
mov ecx, edi
call fcn.004a93f0
mov eax, dword [ebp - 0x4dc]
cmp eax, 0xffffffff
je 0x4a9b76
mov dword [edi + 0x20], eax
jmp 0x4a9b7d
mov dword [edi + 0x20], 0x10
lea ecx, [edi + 0x28]
push esi
call fcn.004a8800
push dword [ebp - 0x4d0]
call fcn.004b8926
mov esi, dword [ebp - 0x4d8]
add esp, 4
mov cl, 1
jmp 0x4a9bf3
lea eax, [ebp - 0x260]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
mov dword [ebp - 0x4d8], esi
cmp esi, 0xffffffff
jne 0x4a9bbd
xor cl, cl
jmp 0x4a9bcf
lea eax, [ebp - 0x260]
push edi
push eax
call fcn.004a9470
add esp, 8
mov cl, 1
cmp byte [ebp + 0xc], 0
mov byte [ebp - 0x4c1], cl
je 0x4a9bf9
test cl, cl
je 0x4a9bf9
mov eax, dword [edi + 0x20]
shr eax, 0xa
test al, 1
je 0x4a9bf9
push ebx
mov ecx, edi
call fcn.004a94d0
mov cl, al
mov byte [ebp - 0x4c1], cl
cmp esi, 0xffffffff
je 0x4a9c0b
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov cl, byte [ebp - 0x4c1]
mov al, cl
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.004bd1b9
mov esp, ebp
pop ebp
ret 8