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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b063d
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.00589c90
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.00589c90
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 0x5667da
push dword [ebp - 0x238]
call esi
test eax, eax
je 0x5667da
xor eax, eax
cmp ebx, 0x9fbf1
jne 0x566753
mov eax, 1
mov ecx, dword [0x621a6c]
test ecx, ecx
je 0x566869
push 0x50021
push dword [eax*4 + 0x621ebc]
call ecx
cmp eax, 0xb
jl 0x566869
push 0x20001
mov edx, ebx
lea ecx, [ebp - 0x228]
call fcn.0058f590
add esp, 4
push 0x5ead80
lea ecx, [ebp - 0x228]
mov byte [ebp - 4], 2
call fcn.00403940
test eax, eax
jne 0x566845
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.005890d0
add esp, 4
test al, al
jne 0x566845
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 0x566800
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 0x566827
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.00527e2c
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 0x566869
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 0x566881
mov esi, 1
mov edx, dword [0x621a1c]
test edx, edx
je 0x5668b5
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 0x5668f3
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.00567780
mov edx, dword [0x621a1c]
add esp, 4
mov dword [ebp - 0x224], 0
lea esi, [edi + 0x2020001]
cmp ebx, 0x9fbf1
jne 0x566915
mov dword [ebp - 0x224], 1
test edx, edx
je 0x56693b
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 0x566978
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.00567780
mov edx, dword [0x621a1c]
add esp, 4
add edi, 0x2030001
xor esi, esi
cmp ebx, 0x9fbf1
jne 0x56698d
mov esi, 1
test edx, edx
je 0x5669a7
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 0x5669de
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.00567780
add esp, 4
call fcn.00414e1f
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x5669fa
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 0x566a3a
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.00528e42
add esp, 8
test eax, eax
js 0x566d3f
cmp eax, dword [esi - 8]
jg 0x566d3f
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 0x566aaa
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.00528e42
add esp, 8
test eax, eax
js 0x566d3f
cmp eax, dword [esi - 8]
jg 0x566d3f
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.00588f90
mov edi, dword [ebp + 8]
add esp, 4
mov dword [ebp - 0x224], 0
lea edx, [edi + 0x2010001]
cmp ebx, 0x9fbf1
jne 0x566b2a
mov dword [ebp - 0x224], 1
mov ecx, dword [0x621a1c]
test ecx, ecx
je 0x566b50
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 0x566b83
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.00567780
add esp, 4
xor eax, eax
mov byte [ebp - 0x21d], 0
cmp ebx, 0x9fbf1
jne 0x566b99
mov eax, 1
mov ecx, dword [0x621a6c]
test ecx, ecx
je 0x566bbf
push 0x10018
push dword [eax*4 + 0x621ebc]
call ecx
cmp eax, 0x13ba
jne 0x566bbf
mov dl, 1
jmp 0x566c67
push str.SOFTWARECanonEasy_Guide_Viewer
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x224], 0
push 0x104
push eax
call fcn.00529409
mov edx, dword [ebp - 0x230]
lea ecx, [ebp - 0x22c]
add esp, 0xc
call fcn.0058b080
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 0x566c22
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 0x566c61
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x224], 0
mov dl, 1
jmp 0x566c67
mov dl, byte [ebp - 0x21d]
xor esi, esi
cmp ebx, 0x9fbf1
jne 0x566c76
mov esi, 1
mov ecx, dword [0x621a3c]
test ecx, ecx
je 0x566ca3
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 0x566cde
push str.Network
push eax
call fcn.00528f1f
add esp, 8
test eax, eax
je 0x566cd8
sub eax, dword [esi]
sar eax, 1
test eax, eax
jle 0x566cd8
mov ecx, dword [0x621a3c]
mov edx, 1
jmp 0x566ce0
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 0x566cfb
mov edx, 1
test ecx, ecx
je 0x566d10
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 0x5667dc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x5667dc
push 0x80070057
call fcn.00402740
int3