Function at 0x4f9580
Capabilities:
Check if file exists

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53a5e1
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x288
mov eax, dword [0x59a0a0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x288], ecx
mov eax, dword [ecx + 0x424]
mov esi, eax
mov dword [ebp - 0x294], 0
mov edx, dword [eax + 4]
cmp byte [edx + 0xd], 0
jne 0x4f95f7
cmp dword [edx + 0x10], 4
jae 0x4f95ed
mov edx, dword [edx + 8]
jmp 0x4f95f1
mov esi, edx
mov edx, dword [edx]
cmp byte [edx + 0xd], 0
je 0x4f95e2
cmp esi, eax
je 0x4f9601
cmp dword [esi + 0x10], 4
jbe 0x4f9603
mov esi, eax
cmp esi, eax
je 0x4f9a68
mov eax, dword [esi + 0xa8]
cmp dword [eax - 0xc], 0
je 0x4f9a68
push dword [esi + 0x60]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov dword [ebp - 0x284], eax
mov dword [ebp - 0x28c], 0
call fcn.00401980
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x4f9650
push 0x80004005
call fcn.00401b40
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4f9665
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x4f9667
call edx
lea edi, [eax + 0x10]
mov dword [ebp - 0x290], edi
cmp dword [ebp - 0x284], 0
mov dword [ebp - 4], 0
je 0x4f96db
mov eax, dword [ebp - 0x288]
mov dword [ebp - 0x28c], 1
cmp dword [eax + 0x4ac], 0
je 0x4f96a5
mov dword [ebp - 0x28c], 3
jmp 0x4f96d1
mov edx, dword [esi + 0xa8]
lea eax, [ebp - 0x290]
mov ecx, dword [esi + 0x60]
push eax
call fcn.004e0890
mov edi, dword [ebp - 0x290]
add esp, 4
test eax, eax
je 0x4f96db
mov dword [ebp - 0x28c], 2
mov dword [ebp - 0x294], 1
lea ecx, [ebp - 0x280]
call fcn.00429390
mov eax, dword [ebp - 0x28c]
xorps xmm0, xmm0
mov byte [ebp - 4], 1
mov dword [ebp - 0x27c], eax
mov eax, dword [ebp - 0x288]
mov dword [ebp - 0x280], 0x64
mov dword [ebp - 0x278], 0x15
movups xmmword [ebp - 0x50], xmm0
mov eax, dword [eax + 0x490]
mov dword [ebp - 0x1e8], eax
mov eax, dword [esi + 0x30]
mov dword [ebp - 0x168], eax
lea eax, [ebp - 0x50]
push eax
push 0
push dword [esi + 0x60]
movups xmmword [ebp - 0x40], xmm0
mov dword [ebp - 0x30], 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
mov ecx, dword [ebp - 0x164]
test eax, eax
cmovne ecx, dword [ebp - 0x30]
mov dword [ebp - 0x164], ecx
mov ecx, dword [ebp - 0x288]
mov eax, dword [ecx + 0x498]
mov dword [ebp - 0x160], eax
mov eax, dword [0x59fae0]
mov dword [ebp - 0x150], eax
mov eax, dword [ecx + 0x4a0]
mov dword [ebp - 0x14c], eax
lea eax, [ecx + 0x4c0]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov dword [ebp - 0x148], eax
mov eax, dword [ebp - 0x288]
mov eax, dword [eax + 0x478]
mov dword [ebp - 0x288], eax
test eax, eax
jne 0x4f97ae
xor edx, edx
jmp 0x4f97f8
mov ecx, eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4f97b3
sub ecx, edx
sar ecx, 1
lea eax, [ecx + 1]
mov dword [ebp - 0x284], eax
cmp eax, 0x3fffffff
jle 0x4f97d6
xor edx, edx
jmp 0x4f97f8
add eax, eax
call fcn.0049bc00
mov edx, dword [ebp - 0x284]
mov ecx, esp
push 3
lea eax, [edx + edx]
mov edx, dword [ebp - 0x288]
push eax
call fcn.0042d380
mov edx, eax
cmp byte [edx], 0
jne 0x4f9801
xor ecx, ecx
jmp 0x4f981d
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x284], eax
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4f9810
sub ecx, dword [ebp - 0x284]
push ecx
push edx
lea ecx, [ebp - 0x1e0]
call fcn.00406560
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
push ecx
mov byte [ebp - 4], 2
mov ecx, dword [esi + 0x60]
sub ecx, 0x10
mov dword [ebp - 0x284], esp
call fcn.004021e0
mov edx, esp
lea ecx, [ebp - 0x2c]
add eax, 0x10
mov dword [edx], eax
call fcn.004dc6f0
add esp, 4
test eax, eax
je 0x4f987b
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x1c8]
call fcn.00406660
mov eax, dword [esi + 0xa4]
cmp dword [eax - 0xc], 0
je 0x4f991a
test eax, eax
jne 0x4f9893
xor edx, edx
jmp 0x4f98e5
mov ecx, eax
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4f98a0
sub ecx, edx
sar ecx, 1
lea eax, [ecx + 1]
mov dword [ebp - 0x284], eax
cmp eax, 0x3fffffff
jle 0x4f98c3
xor edx, edx
jmp 0x4f98e5
add eax, eax
call fcn.0049bc00
mov edx, dword [ebp - 0x284]
mov ecx, esp
push 3
lea eax, [edx + edx]
mov edx, dword [esi + 0xa4]
push eax
call fcn.0042d380
mov edx, eax
cmp byte [edx], 0
jne 0x4f98ee
xor ecx, ecx
jmp 0x4f990d
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x284], eax
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4f9900
sub ecx, dword [ebp - 0x284]
push ecx
push edx
lea ecx, [ebp - 0x1b0]
call fcn.00406560
mov eax, dword [esi + 0xa8]
mov dword [ebp - 0x284], eax
test eax, eax
jne 0x4f992e
xor edx, edx
jmp 0x4f996c
mov ecx, eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4f9933
sub ecx, edx
sar ecx, 1
lea esi, [ecx + 1]
cmp esi, 0x3fffffff
jle 0x4f9951
xor edx, edx
jmp 0x4f996c
add esi, esi
mov eax, esi
call fcn.0049bc00
mov edx, dword [ebp - 0x284]
mov ecx, esp
push 3
push esi
call fcn.0042d380
mov edx, eax
cmp byte [edx], 0
jne 0x4f9975
xor ecx, ecx
jmp 0x4f9989
mov ecx, edx
lea esi, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4f9980
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x198]
call fcn.00406560
test edi, edi
jne 0x4f999e
xor edx, edx
jmp 0x4f99d8
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4f99a3
sub ecx, edx
sar ecx, 1
lea esi, [ecx + 1]
cmp esi, 0x3fffffff
jle 0x4f99c1
xor edx, edx
jmp 0x4f99d8
add esi, esi
mov eax, esi
call fcn.0049bc00
mov ecx, esp
mov edx, edi
push 3
push esi
call fcn.0042d380
mov edx, eax
cmp byte [edx], 0
jne 0x4f99e1
xor ecx, ecx
jmp 0x4f99ef
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4f99e6
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x180]
call fcn.00406560
push ecx
lea eax, [ebp - 0x280]
push eax
call fcn.0044c609
mov ecx, eax
call fcn.0042af00
mov eax, dword [ebp - 0x18]
cmp eax, 0x10
jb 0x4f9a25
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.00405350
lea ecx, [ebp - 0x280]
call fcn.0042a2e0
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4f9a68
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4f9a66
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4f9a68
call edx
mov eax, dword [ebp - 0x294]
lea esp, [ebp - 0x2a4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0049aa22
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret