Function at 0x140087810
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x11000]
mov eax, 0x11100
call fcn.14024c240
sub rsp, rax
mov qword [rbp - 0x38], 0xfffffffffffffffe
mov qword [rsp + 0x11140], rbx
mov rax, qword [0x140398250]
xor rax, rsp
mov qword [rbp + 0x10ff0], rax
mov r13, r8
mov edi, edx
mov dword [rsp + 0x60], edx
xor r8d, r8d
lea rdx, str.CBaseFuncSub::FS_SearchUSBPrinterSub
lea rcx, [rsp + 0x78]
call fcn.1400075a0
nop
mov qword [rsp + 0x20], r13
mov r9d, edi
lea r8, str.iCount___d__USBRegPath___s
mov edx, 1
lea rcx, [rsp + 0x78]
call fcn.140007780
xor r12d, r12d
mov dword [rsp + 0x48], r12d
call fcn.140102a14
mov rcx, rax
mov eax, r12d
test rcx, rcx
setne al
test eax, eax
jne 0x1400878b6
mov ecx, 0x80004005
call fcn.140005210
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x70], rax
lea rdx, reloc.WSOCK32.dll_inet_addr
test rdx, 0xffffffffffff0000
jne 0x1400878f6
movzx edi, dx
mov ecx, edi
call fcn.1401027e8
test rax, rax
je 0x140087907
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.140005b00
jmp 0x140087907
mov r8d, 1
lea rcx, [rsp + 0x70]
call fcn.140005d50
nop
mov dword [rsp + 0x40], 0x208
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x30]
call fcn.14024b970
xor edx, edx
mov r8d, 0x7fff
lea rcx, [rbp + 0xff0]
call fcn.14024b970
call fcn.140102a14
mov rcx, rax
mov eax, r12d
test rcx, rcx
setne al
test eax, eax
jne 0x140087954
mov ecx, 0x80004005
call fcn.140005210
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x50], rbx
lea rcx, [rbp + 0xff0]
lea rax, [rbp + 0xff0]
or r14, 0xffffffffffffffff
test rax, 0xffffffffffff0000
jne 0x1400879aa
movzx edi, cx
mov ecx, edi
call fcn.1401027e8
test rax, rax
je 0x140087aae
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140005b00
mov rbx, qword [rsp + 0x50]
jmp 0x140087aae
xor eax, eax
mov rcx, r14
lea rdi, [rbp + 0xff0]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x140087a26
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x140087aae
cmp dword [rdx + 0x10], eax
jge 0x1400879f8
cmp dword [rbx - 0xc], eax
jge 0x1400879eb
mov ecx, 0x80070057
call fcn.140005210
int3
mov dword [rbx - 0x10], r12d
mov word [rbx], r12w
jmp 0x140087aae
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140087a0f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x50], rbx
jmp 0x140087aae
mov r12d, dword [rbx - 0x10]
lea rsi, [rbp + 0xff0]
sub rsi, rbx
sar rsi, 1
test ecx, ecx
jns 0x140087a46
mov ecx, 0x80070057
call fcn.140005210
int3
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x140087a68
mov edx, edi
lea rcx, [rsp + 0x50]
call fcn.140005e40
mov rbx, qword [rsp + 0x50]
movsxd rax, edi
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
add rdx, rdx
cmp rsi, r12
lea r12, [rax + rax]
mov r9, r12
ja 0x140087a8c
lea r8, [rbx + rsi*2]
call fcn.1402457b4
jmp 0x140087a98
lea r8, [rbp + 0xff0]
call fcn.1402471ac
cmp edi, dword [rbx - 0xc]
jg 0x1400883e8
mov dword [rbx - 0x10], edi
xor eax, eax
mov word [r12 + rbx], ax
xor r12d, r12d
mov rcx, qword [0x1403b9750]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + reloc.OLEAUT32.dll_VariantTimeToSystemTime]
mov r15, rax
test rax, rax
je 0x14008834a
mov rsi, qword [rax + 0x10]
mov qword [rbp - 0x50], rsi
test esi, esi
je 0x14008834a
lea rax, [rbp - 0x68]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, r13
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14008818e
mov dword [rbp - 0x78], r12d
movsxd r13, esi
movsxd rsi, dword [rsp + 0x60]
mov qword [rbp - 0x48], rsi
xor eax, eax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x40]
lea r8, [rbp - 0x30]
xor edx, edx
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x14008817e
xor ebx, ebx
nop word [rax + rax]
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rbp - 0x30]
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400880ae
mov dword [rsp + 0x40], 0x208
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x30]
call fcn.14024b970
mov edi, ebx
mov dword [rsp + 0x44], ebx
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x40]
lea r8, [rbp - 0x30]
xor edx, edx
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x1400880a2
xor r12d, r12d
nop dword [rax + rax]
lea rax, [rbp - 0x58]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rbp - 0x30]
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140088032
mov dword [rbp - 0x5c], 1
mov dword [rbp - 0x60], 0x410
lea rax, [rbp - 0x60]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x3e0]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x5c]
xor r8d, r8d
lea rdx, str.DeviceDesc
mov rcx, qword [rbp - 0x58]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140088022
mov rdi, r12
test r13, r13
jle 0x14008801e
test rdi, rdi
js 0x140088173
cmp rdi, qword [r15 + 0x10]
jge 0x140088173
mov rax, qword [r15 + 8]
lea rdx, [rbp + 0x3e0]
mov rcx, qword [rax + rdi*8]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x140087c90
inc rdi
cmp rdi, r13
jl 0x140087c57
jmp 0x14008801e
cmp rsi, 4
je 0x140087ca0
cmp rsi, 5
jne 0x140087e3b
call fcn.140102a14
mov rcx, rax
mov eax, r12d
test rcx, rcx
setne al
test eax, eax
je 0x140088168
mov rax, qword [rcx]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x68], rbx
lea rcx, [rbp - 0x30]
lea rax, [rbp - 0x30]
test rax, 0xffffffffffff0000
jne 0x140087d05
movzx edi, cx
mov ecx, edi
call fcn.1401027e8
test rax, rax
je 0x140087def
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140005b00
mov rbx, qword [rsp + 0x68]
jmp 0x140087def
xor eax, eax
mov rcx, r14
lea rdi, [rbp - 0x30]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x140087d74
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x140087def
cmp dword [rdx + 0x10], eax
jge 0x140087d49
cmp dword [rbx - 0xc], eax
jl 0x14008811b
mov dword [rbx - 0x10], r12d
mov word [rbx], r12w
jmp 0x140087def
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140087d60
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x68], rbx
jmp 0x140087def
mov r12d, dword [rbx - 0x10]
lea rsi, [rbp - 0x30]
sub rsi, rbx
sar rsi, 1
test ecx, ecx
js 0x14008815d
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x140087dac
mov edx, edi
lea rcx, [rsp + 0x68]
call fcn.140005e40
mov rbx, qword [rsp + 0x68]
movsxd rax, edi
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
add rdx, rdx
cmp rsi, r12
lea r12, [rax + rax]
mov r9, r12
ja 0x140087dd0
lea r8, [rbx + rsi*2]
call fcn.1402457b4
jmp 0x140087dd9
lea r8, [rbp - 0x30]
call fcn.1402471ac
cmp edi, dword [rbx - 0xc]
jg 0x140088152
mov dword [rbx - 0x10], edi
xor eax, eax
mov word [r12 + rbx], ax
xor r12d, r12d
cmp dword [rbx - 0x10], 0
jl 0x140088003
lea rdx, [0x1402ed058]
mov rcx, rbx
call fcn.140245e24
test rax, rax
je 0x140088003
sub rax, rbx
sar rax, 1
cmp eax, 0xffffffff
je 0x140088003
lea rdx, [rbx - 0x18]
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140087e3b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
call fcn.140102a14
mov rcx, rax
mov eax, r12d
test rcx, rcx
setne al
test eax, eax
je 0x140088147
mov rax, qword [rcx]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x58], rbx
lea rcx, [rbp + 0x3e0]
lea rax, [rbp + 0x3e0]
test rax, 0xffffffffffff0000
jne 0x140087ea1
movzx edi, cx
mov ecx, edi
call fcn.1401027e8
test rax, rax
je 0x140087f97
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.140005b00
jmp 0x140087f97
xor eax, eax
mov rcx, r14
lea rdi, [rbp + 0x3e0]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x140087f16
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x140087f97
cmp dword [rdx + 0x10], eax
jge 0x140087ee8
cmp dword [rbx - 0xc], eax
jl 0x140088126
mov dword [rbx - 0x10], r12d
mov word [rbx], r12w
jmp 0x140087f97
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140087eff
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x58], rax
jmp 0x140087f97
mov r12d, dword [rbx - 0x10]
lea rsi, [rbp + 0x3e0]
sub rsi, rbx
sar rsi, 1
test ecx, ecx
js 0x14008813c
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x140087f51
mov edx, edi
lea rcx, [rsp + 0x58]
call fcn.140005e40
mov rbx, qword [rsp + 0x58]
movsxd rax, edi
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
add rdx, rdx
cmp rsi, r12
lea r12, [rax + rax]
mov r9, r12
ja 0x140087f75
lea r8, [rbx + rsi*2]
call fcn.1402457b4
jmp 0x140087f81
lea r8, [rbp + 0x3e0]
call fcn.1402471ac
cmp edi, dword [rbx - 0xc]
jg 0x140088131
mov dword [rbx - 0x10], edi
xor eax, eax
mov word [r12 + rbx], ax
xor r12d, r12d
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x70]
lea rcx, [rbp - 0x40]
call fcn.14003fef0
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x50]
call fcn.140005f90
nop
mov rdx, qword [rbp - 0x40]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140087fdd
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x58]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140087ffd
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
inc dword [rsp + 0x48]
jmp 0x14008801e
lea rdx, [rbx - 0x18]
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14008801e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov edi, dword [rsp + 0x44]
mov rcx, qword [rbp - 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rsi, qword [rbp - 0x48]
jmp 0x14008804c
lea r9, [rbp - 0x30]
lea r8, str._t_t_tRegOpenKeyEx_EnumUSB..._s_:NG
mov edx, 7
lea rcx, [rsp + 0x78]
call fcn.140007780
mov dword [rsp + 0x40], 0x410
xor edx, edx
mov r8d, 0x410
lea rcx, [rbp - 0x30]
call fcn.14024b970
inc edi
mov dword [rsp + 0x44], edi
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x40]
lea r8, [rbp - 0x30]
mov edx, edi
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x140087be0
mov r12d, dword [rbp - 0x78]
xor ebx, ebx
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1400880c8
lea r9, [rbp - 0x30]
lea r8, str._t_t_tRegOpenKeyEx_EnumUSB_s_:NG
mov edx, 7
lea rcx, [rsp + 0x78]
call fcn.140007780
mov dword [rsp + 0x40], 0x410
xor edx, edx
mov r8d, 0x410
lea rcx, [rbp - 0x30]
call fcn.14024b970
inc r12d
mov dword [rbp - 0x78], r12d
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x40]
lea r8, [rbp - 0x30]
mov edx, r12d
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x140088179
jmp 0x140087b60
mov ecx, 0x80070057
call fcn.140005210
nop
mov ecx, 0x80070057
call fcn.140005210
int3
mov ecx, 0x80070057
call fcn.140005210
int3
mov ecx, 0x80070057
call fcn.140005210
nop
mov ecx, 0x80004005
call fcn.140005210
nop
mov ecx, 0x80070057
call fcn.140005210
int3
mov ecx, 0x80070057
call fcn.140005210
nop
mov ecx, 0x80004005
call fcn.140005210
int3
call fcn.140102ffc
int3
mov rbx, qword [rsp + 0x50]
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rsi, qword [rbp - 0x50]
jmp 0x1400881a4
lea r8, str._t_t_tRegOpenKeyEx_EnumUSB_:NG
mov edx, 7
lea rcx, [rsp + 0x78]
call fcn.140007780
mov eax, dword [rsp + 0x60]
test eax, eax
je 0x140088277
cmp eax, 4
je 0x140088277
mov edx, 7
lea rcx, [rsp + 0x78]
cmp dword [rsp + 0x48], 0
je 0x140088213
mov r9, rbx
lea r8, str._t_t_tFound_Existing_USBPrinter__s_
call fcn.140007780
mov rcx, qword [0x1403b9770]
mov rax, qword [rcx]
mov r8, rbx
mov edx, 0x87
call qword [rax + 0x18]
mov rcx, qword [0x1403b9750]
cmp eax, 7
mov rax, qword [rcx]
jne 0x140088240
call qword [rax + 0x48]
lea r8, [0x1402e3828]
lea rdx, str.YESNO
jmp 0x1400882d4
lea r8, str._t_t_tNot_found_Existing_USBPrinter
call fcn.140007780
mov rcx, qword [0x1403b9770]
mov rax, qword [rcx]
mov edx, 0x86
call qword [rax + 0x18]
mov rcx, qword [0x1403b9750]
cmp eax, 7
mov rax, qword [rcx]
je 0x1400881fd
call qword [rax + 0x48]
mov rdi, qword [rax]
lea r8, [0x1402e2d90]
lea rdx, str.YESNO
mov rcx, rax
call qword [rdi + 0x20]
mov rcx, qword [0x1403b9750]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rdi, qword [rax]
xor edx, edx
mov rcx, rax
call qword [rdi + 0x80]
jmp 0x1400882dd
mov rcx, qword [0x1403b9750]
mov rax, qword [rcx]
call qword [rax + 0x48]
mov rdi, qword [rax]
lea r8, [rbp + 0x7f0]
lea rdx, [0x1402e2e08]
mov rcx, rax
call qword [rdi + 0x18]
lea rdx, str.Generic
lea rcx, [rbp + 0x7f0]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1400882dd
cmp esi, dword [rsp + 0x48]
jne 0x1400882dd
mov rcx, qword [0x1403b9750]
mov rax, qword [rcx]
call qword [rax + 0x48]
lea r8, [0x1402e0308]
lea rdx, str.USBEXIST
mov rdi, qword [rax]
mov rcx, rax
call qword [rdi + 0x20]
mov r9d, 1
lea r8, str.return___08x
lea edx, [r9 + 1]
lea rcx, [rsp + 0x78]
call fcn.140007780
nop
lea rdx, [rbx - 0x18]
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140088315
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x70]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r14d
dec r14d
test r14d, r14d
jg 0x140088336
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
lea rcx, [rsp + 0x78]
call fcn.140007730
mov eax, 1
jmp 0x1400883f3
lea r8, str.InsDrv.ini_does_not_contain_any_USB_support_printer.
mov edx, 7
lea rcx, [rsp + 0x78]
call fcn.140007780
mov rcx, qword [0x1403b9750]
mov rax, qword [rcx]
call qword [rax + 0x48]
mov rdi, qword [rax]
lea r8, [0x1402e0308]
lea rdx, str.USBEXIST
mov rcx, rax
call qword [rdi + 0x20]
xor r9d, r9d
lea r8, str.return___08x
lea edx, [r9 + 2]
lea rcx, [rsp + 0x78]
call fcn.140007780
nop
lea rdx, [rbx - 0x18]
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400883b9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x70]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r14d
dec r14d
test r14d, r14d
jg 0x1400883da
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
lea rcx, [rsp + 0x78]
call fcn.140007730
xor eax, eax
jmp 0x1400883f3
mov ecx, 0x80070057
call fcn.140005210
nop
mov rcx, qword [rbp + 0x10ff0]
xor rcx, rsp
call fcn.140245660
mov rbx, qword [rsp + 0x11140]
add rsp, 0x11100
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret