Function at 0x519380
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x10ac
call fcn.0061d060
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x5201a0
mov esi, dword [ebp + 0x28]
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
test edx, edx
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
je 0x5193c1
mov byte [edx], 0
mov eax, dword [ebp + 0x10]
test esi, esi
je 0x5193cb
mov byte [esi], 0
mov ecx, dword [ebp + 0x14]
test eax, eax
je 0x5193d5
mov byte [eax], 0
mov edx, dword [ebp + 0x18]
test ecx, ecx
je 0x5193df
mov byte [ecx], 0
mov edi, dword [ebp + 0x20]
test edx, edx
je 0x5193fc
cmp dword [edx + 0x14], 8
mov eax, edx
jb 0x5193f0
mov eax, dword [edx]
mov dword [edx + 0x10], 0
mov word [eax], 0
mov ecx, dword [ebp + 0x24]
test edi, edi
je 0x519419
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x51940d
mov eax, dword [edi]
mov dword [edi + 0x10], 0
mov word [eax], 0
mov eax, dword [ebp + 8]
test ecx, ecx
mov dword [ebp - 0x28], eax
je 0x519439
cmp dword [ecx + 0x14], 8
mov eax, ecx
jb 0x51942d
mov eax, dword [ecx]
mov dword [ecx + 0x10], 0
mov word [eax], 0
mov esi, dword [ebp + 8]
cmp dword [esi + 0x10], 0
je 0x51993f
cmp dword [esi + 0x14], 7
mov eax, esi
jbe 0x519450
mov eax, dword [esi]
push 3
push eax
call dword [sym.imp.SHLWAPI.dll_UrlIsW]
cmp dword [esi + 0x14], 7
mov ebx, eax
mov eax, esi
jbe 0x519468
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsURLW]
mov esi, eax
mov ecx, ebx
or ecx, esi
jne 0x5194a8
mov eax, dword [ebp + 8]
cmp dword [eax + 0x14], 7
jbe 0x519485
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x51993f
mov ecx, dword [ebp + 8]
push str.file:__
push 0
call fcn.0041ed50
mov ebx, 1
or esi, ebx
mov dword [ebp - 0x2c], ebx
je 0x51993f
xor ebx, ebx
push edi
push dword [ebp + 8]
call fcn.005161a0
add esp, 8
cmp eax, 4
ja 0x519941
mov esi, eax
mov ecx, 0x16
bt ecx, esi
jae 0x519941
cmp dword [ebp - 0x2c], 0
je 0x51984e
lea ebx, [ebp - 0x10b8]
push 0x1048
push 0
push ebx
call fcn.0061e8c0
add esp, 0xc
mov eax, dword [ebp + 8]
mov dword [ebp - 0x6c], 0x824
cmp dword [eax + 0x14], 7
jbe 0x51950f
mov eax, dword [ebp + 8]
mov eax, dword [eax]
lea ecx, [ebp - 0x6c]
push 0
push ecx
push ebx
push eax
call dword [sym.imp.SHLWAPI.dll_PathCreateFromUrlW]
test eax, eax
jne 0x51993f
cmp dword [ebp - 0x6c], 0
je 0x51993f
mov edi, dword [ebp + 8]
mov dword [ebp - 0x24], esi
cmp dword [edi + 0x14], 7
jae 0x51955d
sub esp, 0xc
mov al, byte [ebp - 0x44]
mov ecx, edi
mov byte [esp + 4], al
mov dword [esp + 8], str.file:__
mov dword [esp], 7
call fcn.00405590
jmp 0x519589
mov eax, edi
je 0x519563
mov eax, dword [edi]
movsd xmm0, qword [0x67d316]
movsd xmm1, qword [str.file:__]
mov dword [edi + 0x10], 7
movsd qword [eax + 6], xmm0
movsd qword [eax], xmm1
mov word [eax + 0xe], 0
push ebx
call fcn.005d3244
add esp, 4
mov edx, dword [edi + 0x14]
mov ecx, dword [edi + 0x10]
mov esi, edx
sub esi, ecx
cmp esi, eax
jae 0x5195be
sub esp, 0x10
mov cl, byte [ebp - 0x44]
mov byte [esp + 4], cl
mov ecx, edi
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp], eax
call fcn.0040b010
jmp 0x5195e7
lea esi, [ecx + eax]
cmp edx, 7
mov dword [edi + 0x10], esi
jbe 0x5195ce
mov edx, dword [ebp + 8]
mov edi, dword [edx]
add eax, eax
lea ecx, [edi + ecx*2]
push eax
push ebx
push ecx
call fcn.0061e340
add esp, 0xc
mov word [edi + esi*2], 0
mov edi, dword [ebp + 8]
mov esi, dword [edi + 0x10]
mov ecx, 0xffffffff
lea eax, [esi + esi*2]
mov dword [ebp - 0x70], eax
add eax, eax
cmovae ecx, eax
push 0x68e5f0
push ecx
call fcn.005db7ed
add esp, 8
test eax, eax
je 0x51965a
add esi, esi
mov ebx, eax
lea eax, [esi + esi*2]
push eax
push 0
push ebx
call fcn.0061e8c0
add esp, 0xc
cmp dword [edi + 0x14], 7
mov eax, edi
jbe 0x51962c
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [ebp - 0x10], 2
lea ecx, [ebp - 0x70]
push 0x20001000
push ecx
mov dword [ebp - 0x4c], ebx
push ebx
push eax
call dword [sym.imp.SHLWAPI.dll_UrlCanonicalizeW]
test eax, eax
je 0x519671
mov esi, dword [ebp - 0x24]
mov edi, 1
xor ebx, ebx
jmp 0x51983b
mov esi, dword [ebp - 0x24]
mov edi, 1
xor ebx, ebx
test edi, edi
jne 0x519941
jmp 0x51984e
mov ebx, dword [ebp - 0x4c]
push ebx
call fcn.005d3244
add esp, 4
mov ecx, dword [ebp + 8]
mov esi, eax
mov eax, dword [ecx + 0x14]
cmp eax, esi
jae 0x5196a1
sub esp, 0xc
mov al, byte [ebp - 0x44]
mov byte [esp + 4], al
mov dword [esp + 8], ebx
mov dword [esp], esi
call fcn.00405590
jmp 0x5196c2
cmp eax, 7
mov edi, ecx
jbe 0x5196aa
mov edi, dword [ecx]
mov eax, esi
mov dword [ecx + 0x10], esi
add eax, esi
push eax
push ebx
push edi
call fcn.0061e340
add esp, 0xc
mov word [edi + esi*2], 0
lea eax, [ebp - 0x10b8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0x28]
lea edi, [ebp - 0x10b8]
test eax, eax
je 0x5196e6
cmp dword [ebp - 0x48], 0
setne byte [eax]
mov dword [ebp - 0x30], 7
mov dword [ebp - 0x34], 0
mov word [ebp - 0x44], 0
push edi
call fcn.005d3244
add esp, 4
mov esi, eax
cmp eax, 7
jbe 0x519725
sub esp, 0xc
mov al, byte [ebp - 0x64]
lea ecx, [ebp - 0x44]
mov byte [esp + 4], al
mov dword [esp + 8], edi
mov dword [esp], esi
call fcn.00405590
jmp 0x519741
mov eax, esi
mov dword [ebp - 0x34], esi
lea ecx, [ebp - 0x44]
add eax, esi
push eax
push edi
push ecx
call fcn.0061e340
add esp, 0xc
mov word [ebp + esi*2 - 0x44], 0
lea eax, [ebp - 0x44]
mov dword [ebp - 0x10], 3
push 0
push 0
push eax
call fcn.00429c90
add esp, 0xc
test al, al
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0xc]
mov edi, 1
je 0x5197fb
mov ecx, dword [ebp + 0x1c]
test ecx, ecx
je 0x5197a4
xor eax, eax
cmp dword [ebp - 0x48], 0
lea esi, [ebp - 0x44]
mov edx, esi
setne al
cmp dword [ebp - 0x30], 7
jbe 0x519789
mov edx, dword [ebp - 0x44]
push 0
push 0
push eax
push esi
push edx
call fcn.004b8620
test al, al
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0xc]
mov edi, 1
je 0x5197fb
mov esi, dword [ebp - 0x34]
test esi, esi
je 0x5197fb
test eax, eax
je 0x5197b2
mov byte [eax], 1
lea eax, [ebp - 0x44]
cmp eax, edx
sete cl
test edx, edx
je 0x519aaa
test cl, cl
jne 0x519aaa
cmp dword [ebp - 0x30], 7
jbe 0x5197d3
mov eax, dword [ebp - 0x44]
mov ecx, dword [edx + 0x14]
cmp ecx, esi
jae 0x519a8a
sub esp, 0xc
mov cl, byte [ebp - 0x64]
mov byte [esp + 4], cl
mov ecx, edx
mov dword [esp + 8], eax
mov dword [esp], esi
call fcn.00405590
jmp 0x519aaa
mov esi, dword [ebp - 0x24]
xor ebx, ebx
mov ecx, dword [ebp - 0x30]
cmp ecx, 8
jb 0x51983b
mov eax, dword [ebp - 0x44]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x519831
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x519c7a
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
push dword [ebp - 0x4c]
call fcn.005db8b4
add esp, 4
test edi, edi
jne 0x519941
cmp esi, 2
jne 0x519873
mov dword [ebp - 0x10], 0xffffffff
call fcn.00519ea0
mov ecx, eax
push dword [ebp + 8]
call fcn.00515900
movzx eax, al
mov esi, 2
sub esi, eax
cmp dword [ebp - 0x2c], 0
je 0x519924
mov ecx, dword [0x6d1ebc]
test ecx, ecx
je 0x51993f
lea esi, [ebp - 0x10b8]
mov dword [ebp - 0x10], 0xffffffff
push 4
push esi
call fcn.004ae014
mov edi, dword [ebp + 8]
mov ecx, dword [ebp - 0x10a8]
mov eax, dword [edi + 0x10]
lea ebx, [eax + ecx + 1]
mov eax, 0xffffffff
mov dword [ebp - 0x24], ebx
add ebx, ebx
cmovae eax, ebx
push 0x68e5f0
push eax
call fcn.005db7ed
add esp, 8
test eax, eax
je 0x51995a
push ebx
push 0
mov dword [ebp - 0x2c], eax
push eax
call fcn.0061e8c0
add esp, 0xc
cmp dword [edi + 0x14], 7
jbe 0x5198ed
mov edi, dword [edi]
mov dword [ebp - 0x28], edi
cmp dword [ebp - 0x10a4], 7
mov eax, dword [ebp - 0x2c]
jbe 0x5198ff
mov esi, dword [ebp - 0x10b8]
mov dword [ebp - 0x10], 7
push dword [ebp - 0x28]
push esi
push dword [ebp - 0x24]
push eax
call fcn.005d4fb0
add esp, 0x10
test eax, eax
mov eax, dword [ebp + 0x14]
je 0x519961
xor ebx, ebx
jmp 0x519a35
cmp esi, 4
je 0x51987d
cmp esi, 2
je 0x5199c1
cmp esi, 1
je 0x51987d
xor ebx, ebx
mov eax, dword [ebp - 0x18]
and bl, 1
mov dword fs:[0], eax
mov eax, ebx
add esp, 0x10ac
pop esi
pop edi
pop ebx
pop ebp
ret
xor ebx, ebx
jmp 0x519a40
test eax, eax
je 0x519968
mov byte [eax], 1
mov ecx, dword [0x6d1ebc]
xor eax, eax
test ecx, ecx
je 0x5199c8
mov byte [ebp - 0x1e], 1
mov dword [ebp - 0x10], 8
lea eax, [ebp - 0x44]
push 3
mov dword [ebp - 0x28], eax
push eax
call fcn.004ae014
cmp dword [ebp - 0x30], 7
jbe 0x519999
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x28], eax
mov ecx, dword [0x6d1ebc]
mov dl, 1
mov eax, 0
test ecx, ecx
je 0x5199d1
mov byte [ebp - 0x1d], 1
mov dword [ebp - 0x10], 9
call fcn.004fed90
mov ecx, dword [ebp - 0x28]
mov dl, 1
jmp 0x5199d4
mov bl, 1
jmp 0x519941
mov ecx, 0x658578
xor edx, edx
jmp 0x5199d4
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x28], edx
mov byte [ebp - 0x1d], dl
mov dword [ebp - 0x10], 9
push 0x34
push ecx
push dword [ebp - 0x2c]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
sete bl
cmp byte [ebp - 0x28], 0
je 0x519a35
mov ecx, dword [ebp - 0x30]
cmp ecx, 8
jb 0x519a35
mov eax, dword [ebp - 0x44]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x519a2b
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x519c86
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
push dword [ebp - 0x2c]
call fcn.005db8b4
add esp, 4
mov ecx, dword [ebp - 0x10a4]
cmp ecx, 8
jb 0x519941
mov eax, dword [ebp - 0x10b8]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x519a7b
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x519c6e
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
jmp 0x519941
cmp ecx, 8
mov edi, edx
jb 0x519a93
mov edi, dword [edx]
lea ecx, [esi + esi]
mov dword [edx + 0x10], esi
push ecx
push eax
push edi
call fcn.0061e340
add esp, 0xc
mov word [edi + esi*2], 0
cmp dword [ebp - 0x30], 7
jbe 0x519ab5
mov eax, dword [ebp - 0x44]
jmp 0x519ab8
lea eax, [ebp - 0x44]
lea ecx, [ebp - 0x64]
push eax
push ecx
call fcn.004b8130
add esp, 8
mov esi, dword [ebp - 0x54]
mov ecx, dword [ebp + 0x24]
test esi, esi
je 0x519b0e
lea edx, [ebp - 0x64]
cmp edx, ecx
sete al
test ecx, ecx
je 0x519b4e
test al, al
jne 0x519b4e
cmp dword [ebp - 0x50], 7
jbe 0x519ae8
mov edx, dword [ebp - 0x64]
mov eax, dword [ecx + 0x14]
cmp eax, esi
jae 0x519b27
mov dword [ebp - 0x10], 4
sub esp, 0xc
mov al, byte [ebp - 0x68]
mov byte [esp + 4], al
mov dword [esp + 8], edx
mov dword [esp], esi
call fcn.00405590
jmp 0x519b47
cmp dword [ebp - 0x48], 0
mov esi, dword [ebp - 0x24]
jne 0x519c2c
mov edi, 1
xor ebx, ebx
jmp 0x519c2e
cmp eax, 8
mov edi, ecx
jb 0x519b30
mov edi, dword [ecx]
lea eax, [esi + esi]
mov dword [ecx + 0x10], esi
push eax
push edx
push edi
call fcn.0061e340
add esp, 0xc
mov word [edi + esi*2], 0
mov dword [ebp - 0x10], 4
cmp dword [ebp - 0x50], 7
jbe 0x519b59
mov eax, dword [ebp - 0x64]
jmp 0x519b5c
lea eax, [ebp - 0x64]
mov dword [ebp - 0x10], 4
push 1
push eax
call fcn.00514020
add esp, 8
mov esi, dword [ebp - 0x24]
xor ebx, ebx
mov edi, 1
test eax, eax
je 0x519c2e
cmp eax, 3
je 0x519c2e
mov eax, dword [ebp - 0x54]
cmp eax, 5
je 0x519ba5
cmp eax, 4
jne 0x519c2c
cmp dword [ebp - 0x50], 7
jbe 0x519bb0
mov eax, dword [ebp - 0x64]
jmp 0x519bb3
cmp dword [ebp - 0x50], 7
jbe 0x519c00
mov eax, dword [ebp - 0x64]
jmp 0x519c03
lea eax, [ebp - 0x64]
cmp word [eax], 0x2e
jne 0x519c2c
cmp word [eax + 2], 0x70
jne 0x519bce
cmp word [eax + 4], 0x64
jne 0x519bce
cmp word [eax + 6], 0x66
je 0x519c25
cmp word [eax + 2], 0x66
jne 0x519be3
cmp word [eax + 4], 0x64
jne 0x519be3
cmp word [eax + 6], 0x66
je 0x519c25
cmp word [eax], 0x2e
jne 0x519c2c
cmp word [eax + 2], 0x78
jne 0x519c2c
cmp word [eax + 4], 0x64
jne 0x519c2c
cmp word [eax + 6], 0x70
je 0x519c25
jmp 0x519c2c
lea eax, [ebp - 0x64]
cmp word [eax], 0x2e
jne 0x519c2c
cmp word [eax + 2], 0x78
jne 0x519c2c
cmp word [eax + 4], 0x66
jne 0x519c2c
cmp word [eax + 6], 0x64
jne 0x519c2c
cmp word [eax + 8], 0x66
jne 0x519c2c
mov bl, 1
cmp esi, 2
je 0x519c2e
xor edi, edi
mov ecx, dword [ebp - 0x50]
cmp ecx, 8
jb 0x519800
mov eax, dword [ebp - 0x64]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x519c5f
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x519c92
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
jmp 0x519800
mov dword [ebp - 0x10], 6
call fcn.006207e0
mov dword [ebp - 0x10], 1
call fcn.006207e0
mov dword [ebp - 0x10], 5
call fcn.006207e0
mov dword [ebp - 0x10], 0
call fcn.006207e0
nop
push ebp
sub esp, 0x14
add ebp, 0xc
call fcn.0061de80
nop dword [eax]
push ebp
sub esp, 0x14
add ebp, 0xc
mov ecx, dword [ebp - 0x50]
cmp ecx, 8
jb 0x519cee
mov eax, dword [ebp - 0x64]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x519ce4
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x519d07
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 7
mov word [ebp - 0x64], 0
add esp, 0x14
pop ebp
ret
call fcn.006207e0
nop dword [eax]
push ebp
sub esp, 0x14
add ebp, 0xc
call fcn.0061de80
nop dword [eax]
push ebp
sub esp, 0x14
add ebp, 0xc
mov ecx, dword [ebp - 0x30]
cmp ecx, 8
jb 0x519d5e
mov eax, dword [ebp - 0x44]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x519d54
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x519d77
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 7
mov word [ebp - 0x44], 0
add esp, 0x14
pop ebp
ret
call fcn.006207e0
nop dword [eax]
push ebp
sub esp, 0x14
add ebp, 0xc
push dword [ebp - 0x4c]
call fcn.005db8b4
add esp, 0x18
pop ebp
ret