Function at 0x587dc0
Capabilities:
Check if file exists
Enumerate files on windows
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b029f
mov eax, dword fs:[0]
push eax
sub esp, 0x338
mov eax, dword [0x614040]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x2fc], edx
mov eax, ecx
mov dword [ebp - 0x314], eax
mov dword [ebp - 0x320], eax
mov dword [ebp - 0x33c], 0
push 0x5e7af0
push str._Network
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0
call fcn.00403990
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
lea eax, [ebp - 0x2f4]
push eax
push str.SOFTWARECanonScanGearDevices
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x2f4], 0
call esi
xor edi, edi
or ebx, 0xffffffff
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x30c]
mov dword [ebp - 0x30c], 0x40
push eax
lea eax, [ebp - 0x9c]
push eax
push edi
push dword [ebp - 0x2f4]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x58802c
mov dword [ebp - 0x2f0], eax
lea eax, [ebp - 0x2f0]
push eax
lea eax, [ebp - 0x9c]
push eax
push dword [ebp - 0x2f4]
call esi
call fcn.00414eab
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
je 0x58804a
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x2f8], eax
lea eax, [ebp - 0x2f8]
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x2f0]
mov edx, str.ProductName
push eax
call fcn.00589660
add esp, 4
push dword [ebp - 0x2f0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 8]
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x58804a
mov esi, dword [ebp - 0x2f8]
mov ecx, esi
lea esp, [esp]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x587f36
test dx, dx
je 0x587f32
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x587f36
add ecx, 4
add eax, 4
test dx, dx
jne 0x587f10
xor eax, eax
jmp 0x587f3b
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
jne 0x587f78
add esi, 0xfffffff0
mov byte [ebp - 4], al
mov ecx, ebx
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x587f60
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
inc edi
cmp edi, 0x100
jb 0x587e50
jmp 0x58802c
lea eax, [ebp - 0x9c]
push eax
lea ecx, [ebp - 0x300]
call fcn.00402f60
mov byte [ebp - 4], 2
mov ecx, dword [eax]
mov edi, dword [ebp + 8]
add edi, 0xfffffff0
lea edx, [ecx - 0x10]
cmp edx, edi
je 0x587fec
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x587fdd
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x587fdd
push edx
call fcn.00403660
mov dword [ebp - 0x310], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x587fcf
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x310]
add eax, 0x10
mov dword [ebp + 8], eax
jmp 0x587fe9
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp + 8]
call fcn.004035a0
or ebx, 0xffffffff
mov byte [ebp - 4], 1
mov ecx, ebx
mov edx, dword [ebp - 0x300]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58800f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov byte [ebp - 4], 0
mov ecx, ebx
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58802c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x2f4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.00414eab
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x588054
push 0x80004005
call fcn.00402740
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x2f0], esi
mov byte [ebp - 4], 3
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], 0
jne 0x588126
mov ecx, dword [esi - 0x10]
add esi, 0xfffffff0
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
mov ecx, eax
jl 0x58809a
cmp ecx, dword [esi]
jne 0x58809a
mov edi, esi
mov eax, 1
lock xadd dword [edx], eax
jmp 0x5880d7
mov eax, dword [ecx]
push 2
push dword [esi + 4]
call dword [eax]
mov edi, eax
test edi, edi
jne 0x5880ae
call fcn.00402c80
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov ecx, dword [esi + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [edi + 0x10]
push eax
call fcn.00528cf5
add esp, 0x10
lea eax, [edi + 0x10]
mov byte [ebp - 4], 0
mov edi, dword [ebp - 0x314]
mov ecx, ebx
mov dword [edi], eax
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5880fc
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp + 8]
add esi, 0xfffffff0
lea eax, [esi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x588972
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x588972
mov dword [ebp - 0x308], 0
mov dword [ebp - 0x304], 0
mov byte [ebp - 4], 4
call fcn.00414eab
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x58815a
push 0x80004005
call fcn.00402740
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
mov dword [ebp - 0x334], eax
add eax, 0x10
mov dword [ebp - 0x340], eax
lea eax, [ebp - 0x308]
mov byte [ebp - 4], 5
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
push eax
push str.SOFTWARECanonScanGearDevices
push reloc.OLEAUT32.dll_SysReAllocString
call edi
test eax, eax
je 0x5881ac
push 0x6098b4
lea eax, [ebp - 0x328]
mov dword [ebp - 0x328], 0
push eax
call fcn.0052d791
lea eax, [ebp - 0x304]
push eax
push dword [ebp + 8]
push dword [ebp - 0x308]
call edi
test eax, eax
je 0x5881dd
push 0x6098b4
lea eax, [ebp - 0x324]
mov dword [ebp - 0x324], 0
push eax
call fcn.0052d791
call fcn.00414eab
xor ecx, ecx
mov edx, eax
cmp dword [ebp - 0x2fc], ecx
jne 0x5882f0
test edx, edx
setne cl
test ecx, ecx
jne 0x588205
push 0x80004005
call fcn.00402740
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x2f8], eax
lea eax, [ebp - 0x2f8]
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x304]
mov edx, str.CaddisLLDPath
push eax
call fcn.00589660
mov edi, dword [ebp - 0x2f8]
add esp, 4
cmp dword [edi - 0xc], 0
jne 0x58825a
push 0x6098b4
lea eax, [ebp - 0x338]
mov dword [ebp - 0x338], 0
push eax
call fcn.0052d791
lea edx, [ebp - 0x2f0]
mov ecx, 0x5e54b8
call fcn.00585a10
mov esi, dword [ebp - 0x2f0]
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x58829a
push 0x104
lea ecx, [ebp - 0x2f0]
call fcn.00402c20
mov esi, dword [ebp - 0x2f0]
push edi
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [esi - 8]
push esi
call fcn.00528e42
add esp, 8
test eax, eax
js 0x5882e6
cmp eax, dword [esi - 8]
jg 0x5882e6
add edi, 0xfffffff0
mov dword [esi - 0xc], eax
xor ecx, ecx
mov byte [ebp - 4], 5
mov word [esi + eax*2], cx
mov ecx, ebx
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5888a1
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x5888a1
push 0x80070057
call fcn.00402740
test edx, edx
setne cl
test ecx, ecx
jne 0x588303
push 0x80004005
call fcn.00402740
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x300], eax
lea eax, [ebp - 0x300]
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x304]
mov edx, str.CaddisUIPath
push eax
call fcn.00589660
mov ebx, dword [ebp - 0x300]
add esp, 4
cmp dword [ebx - 0xc], 0
jne 0x588358
push 0x6098b4
lea eax, [ebp - 0x32c]
mov dword [ebp - 0x32c], 0
push eax
call fcn.0052d791
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x588382
push 0x104
lea ecx, [ebp - 0x2f0]
call fcn.00402c20
mov esi, dword [ebp - 0x2f0]
call fcn.00416b46
push 0x104
push esi
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push dword [esi - 8]
push esi
call fcn.00528e42
add esp, 8
test eax, eax
js 0x5882e6
cmp eax, dword [esi - 8]
jg 0x5882e6
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5883e6
push 0x104
lea ecx, [ebp - 0x2f0]
call fcn.00402c20
mov esi, dword [ebp - 0x2f0]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push dword [esi - 8]
push esi
call fcn.00528e42
add esp, 8
test eax, eax
js 0x5882e6
cmp eax, dword [esi - 8]
jg 0x5882e6
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x58843d
push 0x104
lea ecx, [ebp - 0x2f0]
call fcn.00402c20
mov esi, dword [ebp - 0x2f0]
push ebx
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [esi - 8]
push esi
call fcn.00528e42
add esp, 8
test eax, eax
js 0x5882e6
cmp eax, dword [esi - 8]
jg 0x5882e6
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor ecx, ecx
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], cx
call edi
test eax, eax
jne 0x588546
lea edx, [ebp - 0x2f0]
mov ecx, 0x5e54d8
call fcn.00585a10
mov esi, dword [ebp - 0x2f0]
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5884bc
push 0x104
lea ecx, [ebp - 0x2f0]
call fcn.00402c20
mov esi, dword [ebp - 0x2f0]
push str.CanonIJ_Scan_Utility
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [esi - 8]
push esi
call fcn.00528e42
add esp, 8
test eax, eax
js 0x5882e6
cmp eax, dword [esi - 8]
jg 0x5882e6
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x588518
push 0x104
lea ecx, [ebp - 0x2f0]
call fcn.00402c20
mov esi, dword [ebp - 0x2f0]
push ebx
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [esi - 8]
push esi
call fcn.00528e42
add esp, 8
test eax, eax
js 0x5882e6
cmp eax, dword [esi - 8]
jg 0x5882e6
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
push esi
call edi
test eax, eax
jne 0x588880
push 3
push 4
lea eax, [ebp - 0x2fc]
push eax
lea ecx, [ebp - 0x300]
call fcn.004056e0
push dword [eax]
call fcn.0052a73a
mov edi, dword [ebp - 0x2fc]
add esp, 4
add edi, 0xfffffff0
mov dword [ebp - 0x330], eax
or edx, 0xffffffff
lea ecx, [edi + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x588597
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.00414eab
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x5885b3
push 0x80004005
call fcn.00402740
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x2f4], eax
lea edx, [ebp - 0x2f4]
mov byte [ebp - 4], 8
mov ecx, 0x5e54d8
call fcn.00585a10
mov edi, dword [ebp - 0x2f4]
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x588607
push 0x104
lea ecx, [ebp - 0x2f4]
call fcn.00402c20
mov edi, dword [ebp - 0x2f4]
push str.CanonIJ_Scan_Utility
push edi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [edi - 8]
push edi
call fcn.00528e42
add esp, 8
test eax, eax
js 0x5882e6
cmp eax, dword [edi - 8]
jg 0x5882e6
mov dword [edi - 0xc], eax
xor ecx, ecx
mov word [edi + eax*2], cx
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x588663
push 0x104
lea ecx, [ebp - 0x2f4]
call fcn.00402c20
mov edi, dword [ebp - 0x2f4]
push str.CNUI.TBL
push edi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0x250
lea eax, [ebp - 0x2ec]
mov dword [ebp - 0x310], SysReAllocString
push 0
push eax
call fcn.0052d120
add esp, 0xc
lea eax, [ebp - 0x2ec]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x30c], eax
cmp eax, 0xffffffff
je 0x588862
lea esp, [esp]
lea eax, [ebp - 0x2c0]
push eax
lea ecx, [ebp - 0x2f8]
call fcn.00402f60
push 3
push 4
lea eax, [ebp - 0x2fc]
mov byte [ebp - 4], 9
push eax
lea ecx, [ebp - 0x2f8]
call fcn.004056e0
push dword [eax]
call fcn.0052a73a
mov ecx, dword [ebp - 0x2fc]
add esp, 4
add ecx, 0xfffffff0
mov dword [ebp - 0x318], eax
mov dword [ebp - 0x31c], ecx
or edx, 0xffffffff
add ecx, 0xc
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x58871e
mov edx, dword [ebp - 0x31c]
push edx
mov ecx, dword [edx]
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x318]
cmp dword [ebp - 0x330], eax
jge 0x588817
cmp eax, dword [ebp - 0x310]
jge 0x588817
lea edx, [ebp - 0x2f0]
mov dword [ebp - 0x310], eax
mov ecx, 0x5e54d8
call fcn.00585a10
mov esi, dword [ebp - 0x2f0]
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x58877c
push 0x104
lea ecx, [ebp - 0x2f0]
call fcn.00402c20
mov esi, dword [ebp - 0x2f0]
push str.CanonIJ_Scan_Utility
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [esi - 8]
push esi
call fcn.00528e42
add esp, 8
test eax, eax
js 0x5882e6
cmp eax, dword [esi - 8]
jg 0x5882e6
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov ecx, 1
mov eax, dword [ebp - 0x2f8]
sub ecx, dword [esi - 4]
mov dword [ebp - 0x318], eax
mov eax, dword [esi - 8]
sub eax, 0x104
or eax, ecx
jge 0x5887e4
push 0x104
lea ecx, [ebp - 0x2f0]
call fcn.00402c20
mov esi, dword [ebp - 0x2f0]
push dword [ebp - 0x318]
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [esi - 8]
push esi
call fcn.00528e42
add esp, 8
test eax, eax
js 0x5882e6
cmp eax, dword [esi - 8]
jg 0x5882e6
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
mov byte [ebp - 4], 8
or ecx, 0xffffffff
mov edx, dword [ebp - 0x2f8]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58883b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x2ec]
push eax
push dword [ebp - 0x30c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x5886b0
push dword [ebp - 0x30c]
call dword [sym.imp.KERNEL32.dll_FindClose]
add edi, 0xfffffff0
mov byte [ebp - 4], 7
or ecx, 0xffffffff
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x588880
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
add ebx, 0xfffffff0
mov byte [ebp - 4], 5
or ecx, 0xffffffff
lea eax, [ebx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58889e
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
or ebx, 0xffffffff
mov edx, dword [ebp - 0x334]
mov ecx, ebx
mov byte [ebp - 4], 4
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5888c1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 3
jmp 0x5888ec
mov eax, dword [ebp - 0x304]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x588909
push eax
call edi
mov dword [ebp - 0x304], 0
mov eax, dword [ebp - 0x308]
test eax, eax
je 0x588920
push eax
call edi
mov dword [ebp - 0x308], 0
add esi, 0xfffffff0
push esi
call fcn.00403660
mov edi, dword [ebp - 0x314]
add eax, 0x10
add esp, 4
mov byte [ebp - 4], 0
mov ecx, ebx
mov dword [edi], eax
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x588951
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x588972
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
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 - 0x18]
xor ecx, ebp
call fcn.00527e2c
mov esp, ebp
pop ebp
ret