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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d3ab6
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x638fe4]
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 edi, edx
mov dword [ebp - 0x230], edi
mov ebx, ecx
push ecx
mov esi, esp
mov dword [ebp - 0x22c], esi
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.004035b0
add esp, 4
lea ecx, [ebp - 0x22c]
add eax, 0x10
xor edx, edx
mov dword [esi], eax
call fcn.005aded0
mov dword [ebp - 4], 0
mov esi, esp
mov dword [ebp - 0x220], esi
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.004035b0
add esp, 4
lea ecx, [ebp - 0x234]
add eax, 0x10
mov edx, 1
mov dword [esi], eax
call fcn.005aded0
add esp, 4
mov byte [ebp - 4], 1
push dword [ebp - 0x22c]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call esi
test eax, eax
je 0x58b83b
push dword [ebp - 0x234]
call esi
test eax, eax
je 0x58b83b
mov ecx, dword [0x643bf0]
test ecx, ecx
je 0x58b8bc
xor eax, eax
cmp ebx, 0x9fbf1
push 0x50021
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call ecx
cmp eax, 0xb
jl 0x58b8bc
push 0x20001
mov edx, ebx
lea ecx, [ebp - 0x224]
call fcn.005b5f80
add esp, 4
push 0x60e1e8
lea ecx, [ebp - 0x224]
mov byte [ebp - 4], 2
call fcn.00404810
test eax, eax
jne 0x58b8ad
push ecx
mov esi, esp
mov dword [ebp - 0x220], esi
mov eax, dword [ebp - 0x234]
add eax, 0xfffffff0
push eax
call fcn.004035b0
add esp, 4
add eax, 0x10
mov dword [esi], eax
call fcn.005aeb10
add esp, 4
test al, al
jne 0x58b8ad
lea ecx, [ebp - 0x224]
call fcn.00402b90
xor edi, edi
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov ecx, dword [ebp - 0x234]
mov eax, esi
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jg 0x58bd68
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x224], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x58bd60
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x224], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x58bd56
push 0
push dword [edx + 4]
call ebx
jmp 0x58bd68
lea ecx, [ebp - 0x224]
mov byte [ebp - 4], 1
call fcn.00402b90
mov edi, dword [ebp + 8]
mov edx, dword [0x643be0]
lea esi, [edi + 0x2000001]
test edx, edx
je 0x58b8fb
mov ecx, dword [ebp - 0x230]
mov ecx, dword [ecx]
mov eax, dword [ecx - 0xc]
inc eax
push eax
xor eax, eax
cmp ebx, 0x9fbf1
push ecx
setne al
dec eax
and eax, 4
push esi
push dword [eax + 0x644028]
call edx
mov edx, dword [0x643be0]
cmp esi, 0xa0009
jne 0x58b940
mov eax, dword [ebp - 0x230]
push ecx
mov esi, esp
mov byte [ebp - 0x219], 1
mov dword [ebp - 0x220], esi
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.004035b0
mov cl, byte [ebp - 0x219]
add esp, 4
add eax, 0x10
mov dword [esi], eax
call fcn.0058c700
mov edx, dword [0x643be0]
add esp, 4
lea esi, [edi + 0x2020001]
test edx, edx
je 0x58b974
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax - 0xc]
inc ecx
push ecx
push eax
xor eax, eax
cmp ebx, 0x9fbf1
push esi
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call edx
mov edx, dword [0x643be0]
cmp esi, 0xa0009
jne 0x58b9b7
push ecx
mov esi, esp
mov byte [ebp - 0x219], 1
mov dword [ebp - 0x220], esi
mov eax, dword [ebp - 0x22c]
add eax, 0xfffffff0
push eax
call fcn.004035b0
mov cl, byte [ebp - 0x219]
add esp, 4
add eax, 0x10
mov dword [esi], eax
call fcn.0058c700
mov edx, dword [0x643be0]
add esp, 4
add edi, 0x2030001
test edx, edx
je 0x58b9e5
mov eax, dword [ebp - 0x234]
mov ecx, dword [eax - 0xc]
inc ecx
push ecx
push eax
xor eax, eax
cmp ebx, 0x9fbf1
push edi
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call edx
cmp edi, 0xa0009
jne 0x58ba22
push ecx
mov esi, esp
mov byte [ebp - 0x219], 1
mov dword [ebp - 0x220], esi
mov eax, dword [ebp - 0x234]
add eax, 0xfffffff0
push eax
call fcn.004035b0
mov cl, byte [ebp - 0x219]
add esp, 4
add eax, 0x10
mov dword [esi], eax
call fcn.0058c700
add esp, 4
call fcn.00418413
mov ecx, eax
test ecx, ecx
jne 0x58ba37
push 0x80004005
call fcn.00402650
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x58ba4c
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x58ba4e
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x224], 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 0x58ba87
push 0x104
lea ecx, [ebp - 0x224]
call fcn.00402cf0
mov esi, dword [ebp - 0x224]
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.0054c667
add esp, 8
test eax, eax
js 0x58bd4c
cmp eax, dword [esi - 8]
jg 0x58bd4c
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 - 0x220], esi
mov eax, dword [eax]
mov dword [ebp - 0x228], eax
mov eax, dword [esi - 8]
sub eax, 0x104
or eax, edi
jge 0x58baf7
push 0x104
lea ecx, [ebp - 0x224]
call fcn.00402cf0
mov esi, dword [ebp - 0x224]
push dword [ebp - 0x228]
push dword [ebp - 0x220]
push esi
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58bd4c
cmp eax, dword [esi - 8]
jg 0x58bd4c
xor ecx, ecx
mov dword [esi - 0xc], eax
push ecx
mov word [esi + eax*2], cx
mov edi, esp
lea eax, [esi - 0x10]
mov dword [ebp - 0x220], edi
push eax
mov dword [ebp - 0x220], eax
call fcn.004035b0
add esp, 4
add eax, 0x10
mov dword [edi], eax
call fcn.005add70
mov edi, dword [ebp + 8]
add esp, 4
mov edx, dword [0x643be0]
lea ecx, [edi + 0x2010001]
test edx, edx
je 0x58bb8f
mov eax, dword [esi - 0xc]
inc eax
push eax
xor eax, eax
cmp ebx, 0x9fbf1
push esi
setne al
dec eax
and eax, 4
push ecx
push dword [eax + 0x644028]
call edx
lea ecx, [edi + 0x2010001]
cmp ecx, 0xa0009
jne 0x58bbc8
push ecx
mov esi, esp
mov byte [ebp - 0x219], 1
mov dword [ebp - 0x228], esi
push dword [ebp - 0x220]
call fcn.004035b0
mov cl, byte [ebp - 0x219]
add esp, 4
add eax, 0x10
mov dword [esi], eax
call fcn.0058c700
add esp, 4
mov ecx, dword [0x643bf0]
mov byte [ebp - 0x219], 0
test ecx, ecx
je 0x58bc09
xor eax, eax
cmp ebx, 0x9fbf1
push 0x10018
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call ecx
cmp eax, 0x13ba
jne 0x58bc09
mov esi, dword [ebp - 0x230]
mov dl, 1
jmp 0x58bc9e
push str.SOFTWARECanonEasy_Guide_Viewer
lea eax, [ebp - 0x218]
mov dword [ebp - 0x228], 0
push 0x104
push eax
call fcn.0054cb78
mov esi, dword [ebp - 0x230]
lea ecx, [ebp - 0x220]
add esp, 0xc
mov edx, esi
call fcn.005af020
push dword [eax]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x220]
call fcn.00402b90
lea eax, [ebp - 0x228]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x218]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov eax, dword [ebp - 0x228]
test eax, eax
je 0x58bc98
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x228], 0
mov dl, 1
jmp 0x58bc9e
mov dl, byte [ebp - 0x219]
mov ecx, dword [0x643bf4]
test ecx, ecx
je 0x58bcd9
xor eax, eax
test dl, dl
sete al
add eax, 0x127a
push eax
lea eax, [edi + 0x1040001]
push eax
xor eax, eax
cmp ebx, 0x9fbf1
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call ecx
mov ecx, dword [0x643bf4]
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
jge 0x58bce6
or eax, 0xffffffff
jmp 0x58bd07
push str.Network
push eax
call fcn.00546eba
mov ecx, dword [0x643bf4]
add esp, 8
test eax, eax
jne 0x58bd03
or eax, 0xffffffff
jmp 0x58bd07
sub eax, dword [esi]
sar eax, 1
xor edx, edx
test eax, eax
setg dl
add edx, 0x1270
test ecx, ecx
je 0x58bd37
push edx
lea eax, [edi + 0x1050001]
push eax
xor eax, eax
cmp ebx, 0x9fbf1
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call ecx
lea ecx, [ebp - 0x224]
mov edi, 1
call fcn.00402b90
jmp 0x58b83d
push 0x80070057
call fcn.00402650
mov ecx, edx
call dword [ebp - 0x224]
jmp 0x58bd68
mov ecx, edx
call dword [ebp - 0x224]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x22c]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], esi
dec esi
test esi, esi
jg 0x58bdad
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x58bda9
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x58bda9
push 0
push dword [edx + 4]
call ebx
jmp 0x58bdad
mov ecx, edx
call esi
mov eax, edi
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.00544774
mov esp, ebp
pop ebp
ret