Function at 0x4197ad
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x558436
mov eax, dword fs:[0]
push eax
sub esp, 0x270
mov eax, dword [0x5b3db0]
xor eax, esp
mov dword [esp + 0x268], eax
push ebx
push esi
push edi
mov eax, dword [0x5b3db0]
xor eax, esp
push eax
lea eax, [esp + 0x280]
mov dword fs:[0], eax
lea eax, [esp + 0x10]
push eax
push ecx
mov esi, ecx
mov ecx, esp
mov dword [esp + 0x30], esp
push esi
lea edi, [esp + 0x34]
call fcn.00401daf
mov ecx, edi
call fcn.00418817
pop ecx
pop ecx
push 4
pop edi
call fcn.00418f11
test al, al
je 0x4199e6
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push esi
call fcn.00401daf
call fcn.00418d42
pop ecx
test al, al
je 0x4199e6
push 3
pop edi
push 0x58b430
lea ecx, [esp + 0x14]
call fcn.004070b3
mov ebx, eax
and dword [esp + 0x288], 0
push str.SOFTWAREEPSONEpsonScanManager
lea ecx, [esp + 0x20]
call fcn.00401daf
push ebx
push eax
lea eax, [esp + 0x28]
push eax
mov byte [esp + 0x294], 1
call fcn.00401680
add esp, 0xc
push esi
push eax
lea eax, [esp + 0x20]
push eax
mov byte [esp + 0x294], 2
call fcn.004016d7
mov eax, dword [eax]
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
push 0x20019
push 0
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, dword [esp + 0x18]
mov ebx, eax
neg ebx
sbb bl, bl
add ecx, 0xfffffff0
call fcn.004021a7
mov ecx, dword [esp + 0x20]
add ecx, 0xfffffff0
call fcn.004021a7
mov ecx, dword [esp + 0x1c]
add ecx, 0xfffffff0
call fcn.004021a7
or dword [esp + 0x288], 0xffffffff
mov ecx, dword [esp + 0x10]
add ecx, 0xfffffff0
call fcn.004021a7
inc bl
je 0x419b40
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x2c]
push eax
push 0
push 0x58b434
push dword [esp + 0x28]
mov dword [esp + 0x28], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4199dd
push str.ScanSmart
lea ecx, [esp + 0x1c]
call fcn.004070b3
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x28c], edi
call fcn.004028db
test eax, eax
jne 0x419952
call fcn.004196f7
test al, al
je 0x419952
xor edi, edi
push str.EpsonScan_2
lea ecx, [esp + 0x24]
call fcn.004070b3
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x28c], 4
call fcn.004028db
test eax, eax
jne 0x41997d
push 2
pop edi
push 0x58b46c
lea ecx, [esp + 0x20]
call fcn.004070b3
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x28c], 5
call fcn.004028db
test eax, eax
jne 0x4199b1
call fcn.0041971e
test al, al
je 0x4199b1
xor edi, edi
inc edi
mov ecx, dword [esp + 0x1c]
add ecx, 0xfffffff0
call fcn.004021a7
mov ecx, dword [esp + 0x20]
add ecx, 0xfffffff0
call fcn.004021a7
or dword [esp + 0x288], 0xffffffff
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffff0
call fcn.004021a7
push dword [esp + 0x14]
jmp 0x419b3a
call fcn.004196f7
test al, al
je 0x419b40
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push esi
call fcn.00401daf
call fcn.00419119
pop ecx
test al, al
je 0x419b40
push 0x58b430
lea ecx, [esp + 0x20]
xor edi, edi
call fcn.004070b3
mov ebx, eax
push str.SOFTWAREEPSONEpsonScanManager
lea ecx, [esp + 0x24]
mov dword [esp + 0x28c], 6
call fcn.00401daf
push ebx
push eax
lea eax, [esp + 0x1c]
push eax
mov byte [esp + 0x294], 7
call fcn.00401680
add esp, 0xc
push esi
push eax
lea eax, [esp + 0x18]
push eax
mov byte [esp + 0x294], 8
call fcn.004016d7
mov eax, dword [eax]
add esp, 0xc
lea ecx, [esp + 0x18]
push ecx
push 0x20019
push edi
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, dword [esp + 0x10]
mov ebx, eax
neg ebx
sbb bl, bl
add ecx, 0xfffffff0
call fcn.004021a7
mov ecx, dword [esp + 0x14]
add ecx, 0xfffffff0
call fcn.004021a7
mov ecx, dword [esp + 0x20]
add ecx, 0xfffffff0
call fcn.004021a7
or dword [esp + 0x288], 0xffffffff
mov ecx, dword [esp + 0x1c]
add ecx, 0xfffffff0
call fcn.004021a7
inc bl
je 0x419b40
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x2c]
push eax
push edi
push 0x58b434
push dword [esp + 0x2c]
mov dword [esp + 0x28], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x419b36
push 0x58b46c
lea ecx, [esp + 0x18]
call fcn.004070b3
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x28c], 9
call fcn.004028db
test eax, eax
jne 0x419b22
call fcn.0041971e
test al, al
je 0x419b22
inc edi
or dword [esp + 0x288], 0xffffffff
mov ecx, dword [esp + 0x14]
add ecx, 0xfffffff0
call fcn.004021a7
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x2c]
push eax
call fcn.00401136
mov dword [esp + 0x288], 0xa
push dword [esp + 0x28]
lea eax, [esp + 0x30]
push eax
call fcn.00407d80
pop ecx
pop ecx
test edi, edi
je 0x419b84
cmp edi, 3
je 0x419b84
cmp edi, 2
je 0x419b84
cmp dword [esp + 0x38], 0
jle 0x419b84
cmp dword [esp + 0x30], 0
jle 0x419b84
xor edi, edi
inc edi
lea esi, [esp + 0x2c]
call fcn.00401178
mov eax, edi
mov ecx, dword [esp + 0x280]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0052b424
mov esp, ebp
pop ebp
ret