Function at 0x521480
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5787f6
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x5cb464]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0xc]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x5214be
push ebx
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push str.CreateObject
push dword [0x5d56f4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x5214e8
or eax, 0xffffffff
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 dword [ebp - 0x10], 0
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], 0
push ecx
push 0x59f4bc
push 0x59f53c
call eax
test eax, eax
je 0x521512
or edi, 0xffffffff
jmp 0x521699
push 0x10
call fcn.0042ce00
mov esi, eax
add esp, 4
mov dword [ebp - 0x14], esi
test esi, esi
je 0x521549
mov dword [esi + 4], vtable.IStreamGetSize.0
mov dword [esi + 8], 0
mov dword [esi], vtable.CInFileStream.0
mov dword [esi + 4], vtable.CInFileStream.1.0
mov dword [esi + 0xc], 0xffffffff
jmp 0x52154b
xor esi, esi
mov dword [ebp - 0x18], esi
test esi, esi
je 0x521558
mov eax, dword [esi]
push esi
call dword [eax + 4]
push dword [ebp + 8]
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.00524a40
test al, al
jne 0x521572
or edi, 0xffffffff
jmp 0x52168b
push 0x1c
call fcn.0042ce00
add esp, 4
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 5
test eax, eax
je 0x521592
mov ecx, eax
call fcn.00520e30
mov ebx, eax
jmp 0x521594
xor ebx, ebx
mov byte [ebp - 4], 2
mov dword [ebp - 0x1c], ebx
test ebx, ebx
je 0x5215a5
mov eax, dword [ebx]
push ebx
call dword [eax + 4]
mov byte [ebx + 0xc], 0
mov eax, dword [ebp - 0x10]
push ebx
push 0
push esi
mov ecx, dword [eax]
push eax
mov byte [ebp - 4], 6
call dword [ecx + 0xc]
test eax, eax
je 0x5215c6
or edi, 0xffffffff
jmp 0x521681
push 0x78
call fcn.0042ce00
add esp, 4
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 0xa
test eax, eax
je 0x5215e9
mov ecx, eax
call fcn.00520d30
mov edi, eax
mov dword [ebp - 0x14], eax
jmp 0x5215ee
xor edi, edi
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 6
mov dword [ebp - 0x20], edi
test edi, edi
je 0x5215ff
mov eax, dword [edi]
push edi
call dword [eax + 4]
push dword [ebp + 0xc]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0xb
call fcn.00520cd0
mov edx, dword [ebp + 0x10]
lea eax, [ebp - 0x2c]
push edx
push eax
push dword [ebp - 0x10]
mov ecx, edi
mov byte [ebp - 4], 0xc
call fcn.00521b50
push dword [ebp - 0x2c]
mov byte [ebp - 4], 0xb
call fcn.00469a25
mov ecx, dword [ebp + 0x10]
add esp, 4
mov byte [edi + 0x58], 0
test ecx, ecx
je 0x521649
push dword [ebp + 0xc]
mov eax, dword [ecx]
push dword [ebp + 8]
push ecx
call dword [eax]
mov eax, dword [ebp - 0x10]
push edi
push 0
push 0xffffffffffffffff
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x1c]
mov edx, dword [ebp + 0x10]
mov edi, eax
test edx, edx
je 0x521670
mov ecx, dword [edx]
xor eax, eax
test edi, edi
sete al
push eax
push edx
call dword [ecx + 0xc]
neg edi
sbb edi, edi
mov ecx, dword [ebp - 0x14]
push ecx
mov byte [ebp - 4], 0x11
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, dword [ebx]
push ebx
mov byte [ebp - 4], 0x12
call dword [eax + 8]
mov byte [ebp - 4], 0x13
test esi, esi
je 0x521699
mov eax, dword [esi]
push esi
call dword [eax + 8]
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 4], 0x14
test ecx, ecx
je 0x5216ad
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
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