Function at 0x522c30
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x603971
mov eax, dword fs:[0]
push eax
sub esp, 0x98
push ebx
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0xa8]
mov dword fs:[0], eax
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
lea edi, [esp + 0x18]
mov dword [esp + 0xb0], 0
call fcn.0047ac70
lea edi, [esp + 0x14]
mov byte [esp + 0xb0], 1
call fcn.0040ab90
mov byte [esp + 0xb0], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x522cc5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x14]
mov eax, dword [edx - 0xc]
test eax, eax
jle 0x522cf8
lea ecx, [eax - 1]
test ecx, ecx
jl 0x522ff7
cmp ecx, eax
jg 0x522ff7
movzx eax, word [edx + ecx*2]
cmp ax, 0x5c
je 0x522cf8
push 0x5c
lea edi, [esp + 0x18]
call fcn.0040af90
push 7
push 0x638df8
lea ecx, [esp + 0x1c]
push ecx
call fcn.0040aee0
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x522da2
lea ebx, [esp + 0x18]
call fcn.0047a980
lea edi, [esp + 0x14]
mov byte [esp + 0xb0], 2
call fcn.0040ab90
mov byte [esp + 0xb0], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x522d5e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x14]
mov ecx, dword [edx - 0xc]
test ecx, ecx
jle 0x522d91
lea eax, [ecx - 1]
test eax, eax
jl 0x522ff7
cmp eax, ecx
jg 0x522ff7
movzx eax, word [edx + eax*2]
cmp ax, 0x5c
je 0x522d91
push 0x5c
lea edi, [esp + 0x18]
call fcn.0040af90
push 7
push 0x638df8
lea ecx, [esp + 0x1c]
push ecx
call fcn.0040aee0
lea edx, [esp + 0x34]
push edx
xor edi, edi
call fcn.0050f180
mov ebx, dword [ebp + 8]
lea eax, [ebx + 0x2c]
mov byte [esp + 0xb0], 3
mov ecx, dword [esp + 0x14]
push eax
lea edx, [esp + 0x38]
call fcn.0050f5c0
test eax, eax
je 0x523076
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
lea esi, [eax + 0x10]
mov dword [esp + 0x1c], esi
mov byte [esp + 0xb0], 4
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
lea eax, [esp + 0x6c]
push eax
mov byte [esp + 0xb4], 5
call fcn.0050f180
push str.DefaultVersion
xor eax, eax
mov byte [esp + 0xb4], 6
push str.Properties
lea ecx, [esp + 0x3c]
push ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], eax
call fcn.0050fb90
lea edx, [esp + 0x24]
push edx
mov edi, eax
push str.Default
lea eax, [esp + 0x3c]
push eax
call fcn.0050f980
test eax, eax
je 0x522e6c
cmp edi, 0x454
ja 0x522f21
lea ebx, [esp + 0x20]
call fcn.0047a980
lea edi, [esp + 0x14]
mov byte [esp + 0xb0], 7
call fcn.0040ab90
mov byte [esp + 0xb0], 6
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x522eae
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x14]
mov ecx, dword [edx - 0xc]
test ecx, ecx
jle 0x522ee1
lea eax, [ecx - 1]
test eax, eax
jl 0x522ff7
cmp eax, ecx
jg 0x522ff7
movzx eax, word [edx + eax*2]
cmp ax, 0x5c
je 0x522ee1
push 0x5c
lea edi, [esp + 0x18]
call fcn.0040af90
push 7
push 0x638df8
lea ecx, [esp + 0x1c]
push ecx
call fcn.0040aee0
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
add eax, 0x2c
push eax
lea edx, [esp + 0x70]
call fcn.0050f5c0
test eax, eax
je 0x522f1e
lea edx, [esp + 0x24]
push edx
push str.Default
lea eax, [esp + 0x74]
push eax
call fcn.0050f980
mov ebx, dword [ebp + 8]
cmp byte [ebx + 0x2c], 0
jne 0x523018
mov eax, dword [esp + 0x30]
test eax, eax
je 0x523018
cmp eax, dword [esp + 0x2c]
je 0x523018
mov ecx, dword [eax]
add eax, 8
lea edi, [esp + 0x1c]
mov dword [esp + 0x30], ecx
call fcn.0040ab90
call fcn.00415390
mov esi, dword [esp + 0x1c]
push 2
push 0x633104
push esi
call fcn.005d5260
add esp, 0xc
test eax, eax
je 0x52300e
push 1
push 0x625c94
push esi
call fcn.005d5260
add esp, 0xc
test eax, eax
je 0x52300e
cmp dword [esi - 0xc], 0
jle 0x523001
push 0x3d
push esi
call fcn.005d33c4
add esp, 8
test eax, eax
je 0x523001
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x523001
lea ecx, [esp + 0x20]
mov edx, edi
call fcn.0041a270
lea edi, [esp + 0x18]
mov byte [esp + 0xb0], 8
call fcn.0040ab90
mov byte [esp + 0xb0], 6
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x522fee
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebx + 8]
mov ebx, dword [esp + 0x18]
jmp 0x523006
push 0x80070057
call fcn.00403650
mov edi, dword [ebx + 8]
mov ebx, esi
call fcn.00522710
mov ebx, dword [ebp + 8]
cmp byte [ebx + 0x2c], 0
je 0x522f2b
lea ecx, [esp + 0x6c]
push ecx
mov byte [esp + 0xb4], 5
call fcn.0050f250
mov byte [esp + 0xb0], 4
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x523052
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0xfffffff0
mov byte [esp + 0xb0], 3
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x523076
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0xb4], 0
call fcn.0050f250
mov dword [esp + 0xb0], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5230b3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0xa8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4