Function at 0x5b0260
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d5907
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x638fe4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], 0
mov dword [ebp - 4], 0
push dword [ebp + 8]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call esi
or ebx, 0xffffffff
test eax, eax
je 0x5b0607
mov eax, dword [ebp + 8]
mov ebx, 1
cmp dword [eax - 0xc], 0xfc
jle 0x5b03d3
mov ecx, dword [0x643bf0]
test ecx, ecx
je 0x5b02e2
push 0x50020
push dword [0x644028]
call ecx
mov ecx, eax
mov eax, dword [ebp + 8]
cmp ecx, 0xff1
push eax
setne byte [ebp - 0x1c]
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push 0x60d17c
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x20], eax
call fcn.00403280
lea edx, [ebp - 0x14]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x10]
call fcn.005b1770
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.00402b90
push dword [ebp - 0x1c]
lea edx, [ebp - 0x10]
lea ecx, [ebp - 0x1c]
call fcn.005b47d0
add esp, 4
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.00403220
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.00402b90
mov eax, dword [ebp - 0x10]
mov edx, ebx
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, 0x104
or ecx, edx
jge 0x5b036d
push 0x104
lea ecx, [ebp - 0x10]
call fcn.00402cf0
mov eax, dword [ebp - 0x10]
push dword [ebp - 0x20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp + 8]
call fcn.00403220
push dword [ebp + 8]
call esi
test eax, eax
jne 0x5b03c4
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
push eax
call fcn.004035b0
add esp, 4
lea ecx, [ebp - 0x10]
add eax, 0x10
mov dword [edi], eax
call fcn.00402b90
lea ecx, [ebp + 8]
call fcn.00402b90
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0
call fcn.00402b90
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push eax
lea ecx, [ebp - 0x18]
call fcn.00403280
mov byte [ebp - 4], 5
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
push eax
call fcn.004035b0
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 6
mov eax, dword [edi - 8]
sub ebx, dword [edi - 4]
sub eax, 0x104
or eax, ebx
jge 0x5b041f
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402cf0
mov edi, dword [ebp - 0x14]
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
push dword [edi - 8]
push edi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x5b0641
cmp eax, dword [edi - 8]
jg 0x5b0641
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
xor ebx, ebx
mov edi, edi
call fcn.00418413
test eax, eax
je 0x5b0637
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x5b0473
lock inc dword [eax + 0x14]
add eax, 8
jmp 0x5b0477
mov ecx, eax
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
push ebx
push edi
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 7
push str._s__d_
push eax
call fcn.00402e70
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x10]
add esp, 0x10
push dword [eax - 0xc]
push eax
call fcn.00403780
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x5b0504
mov byte [ebp - 4], 6
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x5b04f2
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5b04f0
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5b04f0
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5b04f2
call edx
inc ebx
cmp ebx, 0xf4240
jl 0x5b0450
jmp 0x5b0587
mov ecx, dword [ebp + 8]
lea ebx, [esi - 0x10]
add ecx, 0xfffffff0
mov dword [ebp - 0x20], ecx
cmp ebx, ecx
je 0x5b0547
cmp dword [ecx + 0xc], 0
jl 0x5b053b
mov eax, dword [ebx]
cmp eax, dword [ecx]
jne 0x5b053b
push ebx
call fcn.004035b0
mov ecx, dword [ebp - 0x20]
add esp, 4
mov esi, eax
call fcn.00402670
lea eax, [esi + 0x10]
mov dword [ebp + 8], eax
jmp 0x5b0547
push dword [esi - 0xc]
lea ecx, [ebp + 8]
push esi
call fcn.00403620
mov byte [ebp - 4], 6
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x5b0587
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5b0585
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5b0585
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [ecx + 4]
call esi
jmp 0x5b058d
call edx
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
or ebx, 0xffffffff
mov byte [ebp - 4], 5
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x5b05cc
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5b05ca
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5b05ca
push 0
push dword [ecx + 4]
call esi
jmp 0x5b05cc
call edx
mov byte [ebp - 4], 0
mov eax, ebx
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x5b0607
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5b0631
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5b0631
push 0
push dword [edx + 4]
call esi
mov esi, dword [ebp + 8]
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x5b061b
call dword [eax + 0x10]
mov ecx, eax
cmp dword [esi - 4], 0
lea eax, [esi - 4]
jl 0x5b064b
cmp ecx, dword [esi - 0x10]
jne 0x5b064b
lea edi, [esi - 0x10]
lock inc dword [eax]
jmp 0x5b0683
mov ecx, edx
call edi
jmp 0x5b0607
push 0x80004005
call fcn.00402650
push 0x80070057
call fcn.00402650
mov eax, dword [ecx]
push 2
push dword [esi - 0xc]
call dword [eax]
mov edi, eax
test edi, edi
jne 0x5b065f
call fcn.00402e60
mov eax, dword [esi - 0xc]
lea ecx, [edi + 0x10]
mov dword [edi + 4], eax
mov edx, dword [esi - 0xc]
lea eax, [edx*2 + 2]
push eax
push esi
lea edx, [edx*2 + 2]
call fcn.0056c4f0
add esp, 8
lea eax, [edi + 0x10]
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp - 0x24]
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
mov dword [edi], eax
lock xadd dword [ecx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x5b06e3
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5b06df
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5b06df
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, edx
call esi
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret