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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b2616
mov eax, dword fs:[0]
push eax
sub esp, 0x338
mov eax, dword [0x616040]
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 0x5e9af0
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 0x589efc
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.00414e1f
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
je 0x589f1a
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, 0x5ece18
push eax
call fcn.0058b690
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 0x589f1a
mov esi, dword [ebp - 0x2f8]
mov ecx, esi
lea esp, [esp]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x589e06
test dx, dx
je 0x589e02
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x589e06
add ecx, 4
add eax, 4
test dx, dx
jne 0x589de0
xor eax, eax
jmp 0x589e0b
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
jne 0x589e48
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 0x589e30
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 0x589d20
jmp 0x589efc
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 0x589ebc
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x589ead
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x589ead
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 0x589e9f
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 0x589eb9
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 0x589edf
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 0x589efc
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.00414e1f
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x589f24
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 0x589ff6
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 0x589f6a
cmp ecx, dword [esi]
jne 0x589f6a
mov edi, esi
mov eax, 1
lock xadd dword [edx], eax
jmp 0x589fa7
mov eax, dword [ecx]
push 2
push dword [esi + 4]
call dword [eax]
mov edi, eax
test edi, edi
jne 0x589f7e
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 0x589fcc
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 0x58a842
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x58a842
mov dword [ebp - 0x308], 0
mov dword [ebp - 0x304], 0
mov byte [ebp - 4], 4
call fcn.00414e1f
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x58a02a
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 0x58a07c
push 0x60bae4
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 0x58a0ad
push 0x60bae4
lea eax, [ebp - 0x324]
mov dword [ebp - 0x324], 0
push eax
call fcn.0052d791
call fcn.00414e1f
xor ecx, ecx
mov edx, eax
cmp dword [ebp - 0x2fc], ecx
jne 0x58a1c0
test edx, edx
setne cl
test ecx, ecx
jne 0x58a0d5
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.0058b690
mov edi, dword [ebp - 0x2f8]
add esp, 4
cmp dword [edi - 0xc], 0
jne 0x58a12a
push 0x60bae4
lea eax, [ebp - 0x338]
mov dword [ebp - 0x338], 0
push eax
call fcn.0052d791
lea edx, [ebp - 0x2f0]
mov ecx, 0x5e74b8
call fcn.005873d0
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 0x58a16a
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 0x58a1b6
cmp eax, dword [esi - 8]
jg 0x58a1b6
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 0x58a771
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x58a771
push 0x80070057
call fcn.00402740
test edx, edx
setne cl
test ecx, ecx
jne 0x58a1d3
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.0058b690
mov ebx, dword [ebp - 0x300]
add esp, 4
cmp dword [ebx - 0xc], 0
jne 0x58a228
push 0x60bae4
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 0x58a252
push 0x104
lea ecx, [ebp - 0x2f0]
call fcn.00402c20
mov esi, dword [ebp - 0x2f0]
call fcn.00416adc
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 0x58a1b6
cmp eax, dword [esi - 8]
jg 0x58a1b6
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 0x58a2b6
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 0x58a1b6
cmp eax, dword [esi - 8]
jg 0x58a1b6
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 0x58a30d
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 0x58a1b6
cmp eax, dword [esi - 8]
jg 0x58a1b6
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 0x58a416
lea edx, [ebp - 0x2f0]
mov ecx, 0x5e74d8
call fcn.005873d0
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 0x58a38c
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 0x58a1b6
cmp eax, dword [esi - 8]
jg 0x58a1b6
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 0x58a3e8
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 0x58a1b6
cmp eax, dword [esi - 8]
jg 0x58a1b6
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
push esi
call edi
test eax, eax
jne 0x58a750
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 0x58a467
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.00414e1f
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x58a483
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, 0x5e74d8
call fcn.005873d0
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 0x58a4d7
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 0x58a1b6
cmp eax, dword [edi - 8]
jg 0x58a1b6
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 0x58a533
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 0x58a732
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 0x58a5ee
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 0x58a6e7
cmp eax, dword [ebp - 0x310]
jge 0x58a6e7
lea edx, [ebp - 0x2f0]
mov dword [ebp - 0x310], eax
mov ecx, 0x5e74d8
call fcn.005873d0
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 0x58a64c
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 0x58a1b6
cmp eax, dword [esi - 8]
jg 0x58a1b6
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 0x58a6b4
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 0x58a1b6
cmp eax, dword [esi - 8]
jg 0x58a1b6
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 0x58a70b
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 0x58a580
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 0x58a750
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 0x58a76e
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 0x58a791
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 3
jmp 0x58a7bc
mov eax, dword [ebp - 0x304]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x58a7d9
push eax
call edi
mov dword [ebp - 0x304], 0
mov eax, dword [ebp - 0x308]
test eax, eax
je 0x58a7f0
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 0x58a821
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 0x58a842
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