Function at 0x521e60
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x608de2
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
push ebx
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0xd8]
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 + 0x10], eax
xor ebx, ebx
lea edi, [esp + 0x18]
mov dword [esp + 0xe0], ebx
call fcn.0047ac70
lea edi, [esp + 0x10]
mov byte [esp + 0xe0], 1
call fcn.0040ab90
mov byte [esp + 0xe0], bl
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 0x521ef2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x10]
mov eax, dword [edx - 0xc]
cmp eax, ebx
jle 0x521f25
lea ecx, [eax - 1]
cmp ecx, ebx
jl 0x52213f
cmp ecx, eax
jg 0x52213f
movzx eax, word [edx + ecx*2]
cmp ax, 0x5c
je 0x521f25
push 0x5c
lea edi, [esp + 0x14]
call fcn.0040af90
push 9
push 0x638d90
lea ecx, [esp + 0x18]
push ecx
call fcn.0040aee0
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x521fd1
lea ebx, [esp + 0x18]
call fcn.0047a980
lea edi, [esp + 0x10]
mov byte [esp + 0xe0], 2
call fcn.0040ab90
mov byte [esp + 0xe0], 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 0x521f8b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x10]
mov ecx, dword [edx - 0xc]
test ecx, ecx
jle 0x521fbe
lea eax, [ecx - 1]
test eax, eax
jl 0x52213f
cmp eax, ecx
jg 0x52213f
movzx eax, word [edx + eax*2]
cmp ax, 0x5c
je 0x521fbe
push 0x5c
lea edi, [esp + 0x14]
call fcn.0040af90
push 9
push 0x638d90
lea ecx, [esp + 0x18]
push ecx
call fcn.0040aee0
xor ebx, ebx
lea edx, [esp + 0x64]
push edx
xor edi, edi
call fcn.0050f180
mov esi, dword [ebp + 8]
mov byte [esp + 0xe0], 3
mov ecx, dword [esp + 0x10]
add esi, 0x2c
push esi
lea edx, [esp + 0x68]
call fcn.0050f5c0
cmp eax, ebx
je 0x522457
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0xe0], 4
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [esp + 0x20], eax
mov byte [esp + 0xe0], 5
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [esp + 0x24], eax
mov byte [esp + 0xe0], 6
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0xe0], 7
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [esp + 0x28], eax
lea eax, [esp + 0x9c]
push eax
mov byte [esp + 0xe4], 8
call fcn.0050f180
mov eax, 0xa
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], ebx
lea ecx, [esp + 0x2c]
push ecx
push str.Deny
lea edx, [esp + 0x6c]
push edx
mov byte [esp + 0xec], al
call fcn.0050f980
cmp byte [esi], bl
jne 0x522156
mov esi, dword [esp + 0x38]
cmp esi, ebx
je 0x522156
cmp esi, dword [esp + 0x34]
je 0x522156
mov eax, esi
mov esi, dword [esi]
add eax, 8
lea edi, [esp + 0x14]
call fcn.0040ab90
mov edi, dword [esp + 0x14]
push edi
lea ecx, [esp + 0x50]
call fcn.004c39a0
cmp eax, ebx
jne 0x522149
mov eax, edi
lea ebx, [esp + 0x4c]
call fcn.004c37c0
xor ebx, ebx
jmp 0x52214c
push 0x80070057
call fcn.00403650
mov byte [eax + 4], bl
mov eax, dword [ebp + 8]
add eax, 0x2c
cmp byte [eax], bl
je 0x522104
push str.DefaultVersion
push str.Properties
lea eax, [esp + 0x6c]
push eax
call fcn.0050fb90
lea ecx, [esp + 0x3c]
push ecx
push str.Default
lea edx, [esp + 0x6c]
push edx
mov esi, eax
call fcn.0050f980
cmp eax, ebx
je 0x522190
cmp esi, 0x454
ja 0x52224a
lea ebx, [esp + 0x18]
call fcn.0047a980
lea edi, [esp + 0x10]
mov byte [esp + 0xe0], 0xb
call fcn.0040ab90
mov byte [esp + 0xe0], 0xa
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 0x5221d2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x10]
mov ecx, dword [edx - 0xc]
test ecx, ecx
jle 0x522205
lea eax, [ecx - 1]
test eax, eax
jl 0x52213f
cmp eax, ecx
jg 0x52213f
movzx eax, word [edx + eax*2]
cmp ax, 0x5c
je 0x522205
push 0x5c
lea edi, [esp + 0x14]
call fcn.0040af90
push 9
push 0x638d90
lea ecx, [esp + 0x18]
push ecx
call fcn.0040aee0
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x10]
add eax, 0x2c
push eax
lea edx, [esp + 0xa0]
call fcn.0050f5c0
test eax, eax
je 0x522248
lea edx, [esp + 0x3c]
push edx
push str.Default
lea eax, [esp + 0xa4]
push eax
call fcn.0050f980
xor ebx, ebx
mov esi, dword [ebp + 8]
add esi, 0x2c
cmp byte [esi], bl
mov dword [esp + 0x18], esi
jne 0x5222cf
mov esi, dword [esp + 0x48]
cmp esi, ebx
je 0x5222cb
cmp esi, dword [esp + 0x44]
je 0x5222cb
mov eax, esi
mov esi, dword [esi]
add eax, 8
lea edi, [esp + 0x14]
call fcn.0040ab90
mov ecx, dword [esp + 0x14]
push ecx
lea ecx, [esp + 0x50]
call fcn.004c39a0
test eax, eax
jne 0x5222c3
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x2c]
push edx
mov ebx, edi
call fcn.00521c50
add esp, 0x10
test eax, eax
je 0x5222c1
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
mov edx, dword [ebp + 8]
push eax
push ecx
mov ecx, dword [esp + 0x28]
push edx
call fcn.005224c0
xor ebx, ebx
mov eax, dword [esp + 0x18]
cmp byte [eax], bl
je 0x52225c
mov esi, dword [esp + 0x18]
lea edi, [esp + 0x4c]
call fcn.004c6cd0
mov eax, dword [esp + 0x60]
cmp eax, ebx
je 0x5222e9
push eax
call fcn.005d27e0
add esp, 4
lea ecx, [esp + 0x9c]
push ecx
mov byte [esp + 0xe4], 8
call fcn.0050f250
lea edx, [esp + 0x2c]
push edx
push str.Custom
lea eax, [esp + 0x6c]
push eax
mov dword [esp + 0x38], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x44], ebx
call fcn.0050f980
cmp byte [esi], bl
jne 0x52238f
mov esi, dword [esp + 0x38]
lea ebx, [ebx]
cmp esi, ebx
je 0x52238f
cmp esi, dword [esp + 0x34]
je 0x52238f
mov eax, esi
mov esi, dword [esi]
add eax, 8
lea edi, [esp + 0x14]
call fcn.0040ab90
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov ebx, edi
call fcn.00521c50
add esp, 0x10
test eax, eax
je 0x522383
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
mov ecx, dword [ebp + 8]
push edx
push eax
push ecx
mov ecx, dword [esp + 0x2c]
call fcn.005224c0
mov eax, dword [ebp + 8]
add eax, 0x2c
xor ebx, ebx
cmp byte [eax], bl
je 0x522330
mov byte [esp + 0xe0], 7
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x5223b7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xe0], 6
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5223df
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xe0], 5
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x522407
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xe0], 4
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 0x52242f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xe0], 3
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 0x522457
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 8]
lea edx, [esp + 0x64]
push edx
mov byte [eax + 0x18], 1
mov byte [esp + 0xe4], bl
call fcn.0050f250
mov dword [esp + 0xe0], 0xffffffff
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52249d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0xd8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4