Function at 0x499ce0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5066b7
mov eax, dword fs:[0]
push eax
mov eax, 0x10d4
call fcn.004e1be0
mov eax, dword [0x54e938]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
mov edi, dword [ebp + 0x18]
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x10c0], ebx
mov ebx, dword [ebp + 0x20]
mov dword [ebp - 0x10b4], ebx
mov ebx, dword [ebp + 0x24]
mov dword [ebp - 0x10d0], ebx
mov ebx, dword [ebp + 0x28]
mov dword [ebp - 0x10e0], edx
mov dword [ebp - 0x10d4], ecx
mov dword [ebp - 0x10c8], edi
mov dword [ebp - 0x10dc], ebx
mov dword [ebp - 0x10b8], 0
test edx, edx
je 0x499d68
mov byte [edx], 0
xor edx, edx
cmp ebx, edx
je 0x499d70
mov byte [ebx], dl
cmp eax, edx
je 0x499d76
mov byte [eax], dl
cmp ecx, edx
je 0x499d7c
mov byte [ecx], dl
mov ecx, 8
cmp edi, edx
je 0x499d98
mov dword [edi + 0x10], edx
cmp dword [edi + 0x14], ecx
jb 0x499d91
mov eax, dword [edi]
jmp 0x499d93
mov eax, edi
xor edi, edi
mov word [eax], di
mov ebx, dword [ebp - 0x10b4]
cmp ebx, edx
je 0x499db5
mov dword [ebx + 0x10], edx
cmp dword [ebx + 0x14], ecx
jb 0x499dae
mov eax, dword [ebx]
jmp 0x499db0
mov eax, ebx
xor edi, edi
mov word [eax], di
mov eax, dword [ebp - 0x10d0]
cmp eax, edx
je 0x499dce
mov dword [eax + 0x10], edx
cmp dword [eax + 0x14], ecx
jb 0x499dc9
mov eax, dword [eax]
xor edi, edi
mov word [eax], di
cmp dword [esi + 0x10], edx
je 0x499f2a
cmp dword [esi + 0x14], ecx
jb 0x499de0
mov eax, dword [esi]
jmp 0x499de2
mov eax, esi
push 3
push eax
call dword [sym.imp.SHLWAPI.dll_UrlIsW]
cmp dword [esi + 0x14], 8
mov edi, eax
mov dword [ebp - 0x10cc], edi
jb 0x499dfd
mov eax, dword [esi]
jmp 0x499dff
mov eax, esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsURLW]
test eax, eax
jne 0x499e44
test edi, edi
jne 0x499e44
cmp dword [esi + 0x14], 8
jb 0x499e18
mov eax, dword [esi]
jmp 0x499e1a
mov eax, esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x499f2a
push 7
push str.file:__
push 0
mov ecx, esi
call fcn.0041cd40
mov edi, 1
mov dword [ebp - 0x10cc], edi
push ebx
push esi
call fcn.00498bf0
add esp, 8
mov dword [ebp - 0x10b4], eax
cmp eax, 1
je 0x499e67
cmp eax, 4
je 0x499e67
cmp eax, 2
jne 0x499f2a
test edi, edi
je 0x49a1a4
xor eax, eax
push 0x1046
push eax
lea ecx, [ebp - 0x1056]
push ecx
mov word [ebp - 0x1058], ax
call fcn.004e15a0
mov ebx, 8
add esp, 0xc
mov dword [ebp - 0x10bc], 0x824
cmp dword [esi + 0x14], ebx
jb 0x499ea5
mov eax, dword [esi]
jmp 0x499ea7
mov eax, esi
push 0
lea edx, [ebp - 0x10bc]
push edx
lea ecx, [ebp - 0x1058]
push ecx
push eax
call dword [sym.imp.SHLWAPI.dll_PathCreateFromUrlW]
test eax, eax
jne 0x499f2a
cmp dword [ebp - 0x10bc], eax
je 0x499f2a
push str.file:__
mov ecx, esi
call fcn.00418650
lea edx, [ebp - 0x1058]
push edx
mov ecx, esi
call fcn.00429a40
mov eax, dword [esi + 0x10]
lea eax, [eax + eax*2]
xor ecx, ecx
mov dword [ebp - 0x10c4], eax
mov edx, 2
mul edx
seto cl
push 0x551c20
neg ecx
or ecx, eax
push ecx
call fcn.0041867c
mov edi, eax
add esp, 8
mov dword [ebp - 0x10d8], edi
mov dword [ebp - 4], 0
test edi, edi
jne 0x499f31
push eax
call fcn.004188d7
add esp, 4
xor al, al
jmp 0x49a312
mov eax, dword [ebp - 0x10c4]
lea ecx, [eax + eax]
push ecx
push 0
push edi
call fcn.004e15a0
add esp, 0xc
cmp dword [esi + 0x14], ebx
jb 0x499f4f
mov eax, dword [esi]
jmp 0x499f51
mov eax, esi
push 0x20001000
lea edx, [ebp - 0x10c4]
push edx
push edi
push eax
call dword [sym.imp.SHLWAPI.dll_UrlCanonicalizeW]
push edi
test eax, eax
jne 0x499f22
mov ecx, esi
call fcn.00418650
lea eax, [ebp - 0x1058]
push eax
xor bl, bl
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x499f86
mov bl, 1
mov eax, dword [ebp - 0x10dc]
test eax, eax
je 0x499f92
mov byte [eax], bl
lea ecx, [ebp - 0x1058]
push ecx
lea ecx, [ebp - 0x1090]
call fcn.00408940
push 0
lea edx, [ebp - 0x1090]
push 0
push edx
mov byte [ebp - 4], 1
call fcn.00417120
add esp, 0xc
test al, al
je 0x49a0c0
cmp dword [ebp - 0x10c0], 0
je 0x49a008
cmp dword [ebp - 0x107c], 8
mov eax, dword [ebp - 0x1090]
jae 0x499fe1
lea eax, [ebp - 0x1090]
xor ecx, ecx
test bl, bl
setne cl
push 0
push 0
lea edx, [ebp - 0x1090]
push ecx
mov ecx, dword [ebp - 0x10c0]
push edx
push eax
call fcn.00463240
test al, al
je 0x49a0c0
cmp dword [ebp - 0x1080], 0
jbe 0x49a0c0
mov eax, dword [ebp - 0x10e0]
test eax, eax
je 0x49a022
mov byte [eax], 1
cmp dword [ebp - 0x10c8], 0
je 0x49a041
mov ecx, dword [ebp - 0x10c8]
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x1090]
push eax
call fcn.00406960
cmp dword [ebp - 0x107c], 8
mov eax, dword [ebp - 0x1090]
jae 0x49a056
lea eax, [ebp - 0x1090]
push eax
lea ecx, [ebp - 0x1074]
push ecx
call fcn.00462710
add esp, 8
cmp dword [ebp - 0x1064], 0
mov byte [ebp - 4], 2
je 0x49a16a
mov ecx, dword [ebp - 0x10d0]
test ecx, ecx
je 0x49a091
push 0xffffffffffffffff
push 0
lea edx, [ebp - 0x1074]
push edx
call fcn.00406960
cmp dword [ebp - 0x1060], 8
mov eax, dword [ebp - 0x1074]
jae 0x49a0a6
lea eax, [ebp - 0x1074]
push 1
push eax
call fcn.00498410
add esp, 8
test al, al
je 0x49a0db
lea ecx, [ebp - 0x1074]
call fcn.0040a2c0
lea ecx, [ebp - 0x1090]
call fcn.0040a2c0
push edi
call fcn.004188d7
add esp, 4
xor al, al
jmp 0x49a312
lea eax, [ebp - 0x1074]
push str..pdf
push eax
call fcn.0041cad0
add esp, 8
test al, al
jne 0x49a13b
lea ecx, [ebp - 0x1074]
push str..fdf
push ecx
call fcn.0041cad0
add esp, 8
test al, al
jne 0x49a13b
lea edx, [ebp - 0x1074]
push str..xfdf
push edx
call fcn.0041cad0
add esp, 8
test al, al
jne 0x49a13b
lea eax, [ebp - 0x1074]
push str..xdp
push eax
call fcn.0041cad0
add esp, 8
test al, al
je 0x49a172
cmp dword [ebp - 0x10b4], 2
jne 0x49a172
lea ecx, [ebp - 0x1074]
call fcn.0040a2c0
lea ecx, [ebp - 0x1090]
call fcn.0040a2c0
push edi
call fcn.004188d7
add esp, 4
mov al, 1
jmp 0x49a312
test bl, bl
je 0x49a0b5
lea ecx, [ebp - 0x1074]
call fcn.0040a2c0
lea ecx, [ebp - 0x1090]
call fcn.0040a2c0
push edi
mov dword [ebp - 4], 0xffffffff
call fcn.004188d7
mov edi, dword [ebp - 0x10cc]
mov eax, dword [ebp - 0x10b4]
add esp, 4
cmp eax, 1
je 0x49a1c2
cmp eax, 4
je 0x49a1c2
test edi, edi
jne 0x49a1c2
cmp eax, 2
jne 0x499f2a
mov al, 1
jmp 0x49a312
mov ecx, dword [0x5513c0]
test ecx, ecx
je 0x499f2a
push 4
lea edx, [ebp - 0x1074]
push edx
call fcn.0045e398
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp - 0x1064]
lea edi, [ecx + eax + 1]
xor ecx, ecx
mov eax, edi
mov edx, 2
mul edx
seto cl
push 0x551c20
mov dword [ebp - 4], 3
neg ecx
or ecx, eax
push ecx
call fcn.0041867c
mov ebx, eax
add esp, 8
mov dword [ebp - 0x10d8], ebx
mov byte [ebp - 4], 4
test ebx, ebx
jne 0x49a23d
push eax
call fcn.004188d7
add esp, 4
lea ecx, [ebp - 0x1074]
call fcn.0040a2c0
xor al, al
jmp 0x49a312
lea eax, [edi + edi]
push eax
push 0
push ebx
call fcn.004e15a0
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x49a254
mov esi, dword [esi]
cmp dword [ebp - 0x1060], 8
mov eax, dword [ebp - 0x1074]
jae 0x49a269
lea eax, [ebp - 0x1074]
push esi
push eax
push edi
push ebx
call fcn.00408c10
add esp, 0x10
test eax, eax
je 0x49a27c
push ebx
jmp 0x49a223
mov eax, dword [ebp - 0x10d4]
test eax, eax
je 0x49a289
mov byte [eax], 1
mov ecx, dword [0x5513c0]
test ecx, ecx
je 0x49a2c8
push 3
lea edx, [ebp - 0x10ac]
push edx
call fcn.0045e398
cmp dword [eax + 0x14], 8
mov dword [ebp - 0x10b8], 1
jb 0x49a2c4
mov esi, dword [eax]
mov ecx, dword [0x5513c0]
test ecx, ecx
je 0x49a2cd
call fcn.00447770
jmp 0x49a2cf
mov esi, eax
jmp 0x49a2b3
mov esi, 0x50d97c
xor eax, eax
push 0x34
push esi
push ebx
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
sete byte [ebp - 0x10ad]
test byte [ebp - 0x10b8], 1
je 0x49a2f8
lea ecx, [ebp - 0x10ac]
call fcn.0040a2c0
push ebx
call fcn.004188d7
add esp, 4
lea ecx, [ebp - 0x1074]
call fcn.0040a2c0
mov al, byte [ebp - 0x10ad]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00401316
mov esp, ebp
pop ebp
ret