Function at 0x566650
Capabilities:
Check if file exists
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b0a0d
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x616040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov dword [ebp - 0x230], edi
mov ebx, ecx
mov eax, dword [edi]
push ecx
sub eax, 0x10
mov esi, esp
push eax
call fcn.00403660
add esp, 4
lea ecx, [ebp - 0x23c]
add eax, 0x10
xor edx, edx
mov dword [esi], eax
call fcn.00589f60
mov dword [ebp - 4], 0
mov esi, esp
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.00403660
add esp, 4
lea ecx, [ebp - 0x238]
add eax, 0x10
mov edx, 1
mov dword [esi], eax
call fcn.00589f60
add esp, 4
mov byte [ebp - 4], 1
push dword [ebp - 0x23c]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call esi
test eax, eax
je 0x56679a
push dword [ebp - 0x238]
call esi
test eax, eax
je 0x56679a
xor eax, eax
cmp ebx, 0x9fbf1
jne 0x566713
mov eax, 1
mov ecx, dword [0x621a6c]
test ecx, ecx
je 0x566829
push 0x50021
push dword [eax*4 + 0x621ebc]
call ecx
cmp eax, 0xb
jl 0x566829
push 0x20001
mov edx, ebx
lea ecx, [ebp - 0x228]
call fcn.0058f8e0
add esp, 4
push 0x5ead7c
lea ecx, [ebp - 0x228]
mov byte [ebp - 4], 2
call fcn.00403940
test eax, eax
jne 0x566805
mov eax, dword [ebp - 0x238]
push ecx
add eax, 0xfffffff0
mov esi, esp
push eax
call fcn.00403660
add esp, 4
add eax, 0x10
mov dword [esi], eax
call fcn.005893a0
add esp, 4
test al, al
jne 0x566805
lea ecx, [ebp - 0x228]
call fcn.00402b60
xor esi, esi
mov byte [ebp - 4], 0
or ecx, 0xffffffff
mov edx, dword [ebp - 0x238]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5667c0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
mov edi, dword [ebp - 0x23c]
add edi, 0xfffffff0
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5667e7
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00527e5c
mov esp, ebp
pop ebp
ret
mov byte [ebp - 4], 1
or ecx, 0xffffffff
mov edx, dword [ebp - 0x228]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x566829
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp + 8]
xor esi, esi
lea eax, [edi + 0x2000001]
cmp ebx, 0x9fbf1
jne 0x566841
mov esi, 1
mov edx, dword [0x621a1c]
test edx, edx
je 0x566875
mov ecx, dword [ebp - 0x230]
mov ecx, dword [ecx]
mov eax, dword [ecx - 0xc]
inc eax
push eax
push ecx
lea eax, [edi + 0x2000001]
push eax
push dword [esi*4 + 0x621ebc]
call edx
mov edx, dword [0x621a1c]
lea eax, [edi + 0x2000001]
cmp eax, 0xa0009
jne 0x5668b3
mov eax, dword [ebp - 0x230]
push ecx
mov esi, esp
mov byte [ebp - 0x21d], 1
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.00403660
mov cl, byte [ebp - 0x21d]
add esp, 4
add eax, 0x10
mov dword [esi], eax
call fcn.00567740
mov edx, dword [0x621a1c]
add esp, 4
mov dword [ebp - 0x224], 0
lea esi, [edi + 0x2020001]
cmp ebx, 0x9fbf1
jne 0x5668d5
mov dword [ebp - 0x224], 1
test edx, edx
je 0x5668fb
mov eax, dword [ebp - 0x23c]
mov ecx, dword [eax - 0xc]
inc ecx
push ecx
push eax
mov eax, dword [ebp - 0x224]
push esi
push dword [eax*4 + 0x621ebc]
call edx
mov edx, dword [0x621a1c]
cmp esi, 0xa0009
jne 0x566938
mov eax, dword [ebp - 0x23c]
push ecx
add eax, 0xfffffff0
mov byte [ebp - 0x21d], 1
mov esi, esp
push eax
call fcn.00403660
mov cl, byte [ebp - 0x21d]
add esp, 4
add eax, 0x10
mov dword [esi], eax
call fcn.00567740
mov edx, dword [0x621a1c]
add esp, 4
add edi, 0x2030001
xor esi, esi
cmp ebx, 0x9fbf1
jne 0x56694d
mov esi, 1
test edx, edx
je 0x566967
mov eax, dword [ebp - 0x238]
mov ecx, dword [eax - 0xc]
inc ecx
push ecx
push eax
push edi
push dword [esi*4 + 0x621ebc]
call edx
cmp edi, 0xa0009
jne 0x56699e
mov eax, dword [ebp - 0x238]
push ecx
add eax, 0xfffffff0
mov byte [ebp - 0x21d], 1
mov esi, esp
push eax
call fcn.00403660
mov cl, byte [ebp - 0x21d]
add esp, 4
add eax, 0x10
mov dword [esi], eax
call fcn.00567740
add esp, 4
call fcn.0041505f
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x5669ba
push 0x80004005
call fcn.00402740
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x228], esi
mov byte [ebp - 4], 3
mov edi, 1
mov eax, dword [esi - 8]
mov ecx, edi
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5669fa
push 0x104
lea ecx, [ebp - 0x228]
call fcn.00402c20
mov esi, dword [ebp - 0x228]
push 0x104
push esi
push str._APPDATA_CanonIJ_Scan_Utility
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [esi - 8]
push esi
call fcn.00528e72
add esp, 8
test eax, eax
js 0x566cff
cmp eax, dword [esi - 8]
jg 0x566cff
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov eax, dword [ebp - 0x230]
sub edi, dword [esi - 4]
mov dword [ebp - 0x224], esi
mov eax, dword [eax]
mov dword [ebp - 0x234], eax
mov eax, dword [esi - 8]
sub eax, 0x104
or eax, edi
jge 0x566a6a
push 0x104
lea ecx, [ebp - 0x228]
call fcn.00402c20
mov esi, dword [ebp - 0x228]
push dword [ebp - 0x234]
push dword [ebp - 0x224]
push esi
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push dword [esi - 8]
push esi
call fcn.00528e72
add esp, 8
test eax, eax
js 0x566cff
cmp eax, dword [esi - 8]
jg 0x566cff
xor ecx, ecx
mov dword [esi - 0xc], eax
push ecx
mov word [esi + eax*2], cx
mov edi, esp
lea eax, [esi - 0x10]
push eax
mov dword [ebp - 0x234], eax
call fcn.00403660
add esp, 4
add eax, 0x10
mov dword [edi], eax
call fcn.00589260
mov edi, dword [ebp + 8]
add esp, 4
mov dword [ebp - 0x224], 0
lea edx, [edi + 0x2010001]
cmp ebx, 0x9fbf1
jne 0x566aea
mov dword [ebp - 0x224], 1
mov ecx, dword [0x621a1c]
test ecx, ecx
je 0x566b10
mov eax, dword [esi - 0xc]
inc eax
push eax
mov eax, dword [ebp - 0x224]
push esi
push edx
push dword [eax*4 + 0x621ebc]
call ecx
lea edx, [edi + 0x2010001]
cmp edx, 0xa0009
jne 0x566b43
push ecx
mov esi, esp
mov byte [ebp - 0x21d], 1
push dword [ebp - 0x234]
call fcn.00403660
mov cl, byte [ebp - 0x21d]
add esp, 4
add eax, 0x10
mov dword [esi], eax
call fcn.00567740
add esp, 4
xor eax, eax
mov byte [ebp - 0x21d], 0
cmp ebx, 0x9fbf1
jne 0x566b59
mov eax, 1
mov ecx, dword [0x621a6c]
test ecx, ecx
je 0x566b7f
push 0x10018
push dword [eax*4 + 0x621ebc]
call ecx
cmp eax, 0x13ba
jne 0x566b7f
mov dl, 1
jmp 0x566c27
push str.SOFTWARECanonEasy_Guide_Viewer
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x224], 0
push 0x104
push eax
call fcn.00529439
mov edx, dword [ebp - 0x230]
lea ecx, [ebp - 0x22c]
add esp, 0xc
call fcn.0058b350
push dword [eax]
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edx, dword [ebp - 0x22c]
or ecx, 0xffffffff
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x566be2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x224]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x21c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov eax, dword [ebp - 0x224]
test eax, eax
je 0x566c21
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x224], 0
mov dl, 1
jmp 0x566c27
mov dl, byte [ebp - 0x21d]
xor esi, esi
cmp ebx, 0x9fbf1
jne 0x566c36
mov esi, 1
mov ecx, dword [0x621a3c]
test ecx, ecx
je 0x566c63
xor eax, eax
test dl, dl
sete al
add eax, 0x127a
push eax
lea eax, [edi + 0x1040001]
push eax
push dword [esi*4 + 0x621ebc]
call ecx
mov ecx, dword [0x621a3c]
mov esi, dword [ebp - 0x230]
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
jl 0x566c9e
push str.Network
push eax
call fcn.00528f4f
add esp, 8
test eax, eax
je 0x566c98
sub eax, dword [esi]
sar eax, 1
test eax, eax
jle 0x566c98
mov ecx, dword [0x621a3c]
mov edx, 1
jmp 0x566ca0
mov ecx, dword [0x621a3c]
xor edx, edx
xor eax, eax
test edx, edx
setne al
xor edx, edx
add eax, 0x1270
cmp ebx, 0x9fbf1
jne 0x566cbb
mov edx, 1
test ecx, ecx
je 0x566cd0
push eax
lea eax, [edi + 0x1050001]
push eax
push dword [edx*4 + 0x621ebc]
call ecx
mov edx, dword [ebp - 0x234]
mov esi, 1
mov byte [ebp - 4], 1
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x56679c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x56679c
push 0x80070057
call fcn.00402740
int3