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

Disassembly:
push 0xffffffffffffffff
push 0x4570bb
mov eax, dword fs:[0]
push eax
sub esp, 0x51c
mov eax, dword [0x46be4c]
xor eax, esp
mov dword [esp + 0x518], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x46be4c]
xor eax, esp
push eax
lea eax, [esp + 0x530]
mov dword fs:[0], eax
mov esi, dword [esp + 0x540]
mov dword [esp + 0x20], 1
call fcn.004317f7
xor ecx, ecx
xor ebx, ebx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40bc46
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
push 0xfc
lea ecx, [esp + 0x434]
push ebx
push ecx
mov dword [esp + 0x544], ebx
call fcn.004413c0
push 0xfc
lea edx, [esp + 0x344]
push ebx
push edx
call fcn.004413c0
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push 0x45d450
push esi
lea eax, [esp + 0x450]
push 0x45ce28
push eax
call edi
push str.LPTENUM
push esi
lea ecx, [esp + 0x364]
push 0x45ce28
push ecx
call edi
add esp, 0x38
push ebx
push 0x45d444
lea ecx, [esp + 0x20]
call fcn.00401bc0
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea edx, [esp + 0x14]
push edx
push 0x20019
push ebx
lea eax, [esp + 0x340]
push eax
push 0x80000002
mov dword [esp + 0x40], ebx
call edi
test eax, eax
jne 0x40beda
push 0xfc
lea ecx, [esp + 0x44]
push ebx
push ecx
call fcn.004413c0
mov eax, dword [esp + 0x20]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
add esp, 0xc
push 0xfc
lea edx, [esp + 0x44]
push edx
push ebx
push eax
mov dword [esp + 0x40], ebx
call ebp
test eax, eax
jne 0x40be87
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push ecx
push 0x20019
push ebx
lea edx, [esp + 0x4c]
push edx
push eax
call edi
test eax, eax
jne 0x40be5e
push 0xfc
lea ecx, [esp + 0x140]
push ebx
push ecx
call fcn.004413c0
mov eax, dword [esp + 0x28]
add esp, 0xc
push 0xfc
lea edx, [esp + 0x140]
push edx
push ebx
push eax
xor esi, esi
call ebp
test eax, eax
jne 0x40be1a
lea esp, [esp]
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x38]
push ecx
push 0x20019
push ebx
lea edx, [esp + 0x148]
push edx
push eax
call edi
test eax, eax
jne 0x40bdeb
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x3c]
lea edx, [esp + 0x23c]
push edx
lea eax, [esp + 0x30]
push eax
push ebx
push str.DeviceDesc
push ecx
mov dword [esp + 0x40], 1
mov dword [esp + 0x3c], 0xfc
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40bdef
lea edx, [esp + 0x238]
push edx
call fcn.0040a520
add esp, 4
mov dword [esp + 0x2c], eax
jmp 0x40bdef
mov dword [esp + 0x20], ebx
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x1c]
push 0xfc
lea ecx, [esp + 0x140]
push ecx
add esi, 1
push esi
push edx
call ebp
test eax, eax
je 0x40bd80
cmp dword [esp + 0x2c], ebx
je 0x40be51
lea eax, [esp + 0x40]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40be27
sub eax, edx
push eax
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x20]
call fcn.00401c50
push 1
push 0x45c734
lea ecx, [esp + 0x20]
call fcn.00401c50
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40be62
mov dword [esp + 0x20], ebx
mov eax, dword [esp + 0x30]
push 0xfc
add eax, 1
lea edx, [esp + 0x44]
push edx
push eax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x20]
push eax
call ebp
test eax, eax
je 0x40bd28
mov esi, dword [esp + 0x18]
push 0x45d444
push esi
call fcn.00442f25
add esp, 8
cmp eax, ebx
setne al
test al, al
je 0x40becd
push ecx
lea eax, [esi - 0x10]
mov dword [esp + 0x40], esp
mov edi, esp
push eax
call fcn.004015c0
add eax, 0x10
mov dword [edi], eax
mov ecx, dword [esp + 0x1c]
add esp, 4
push ecx
call fcn.00408620
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
add esp, 8
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40bee4
mov ebp, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov dword [esp + 0x20], ebx
push ebx
push 0x45d444
lea ecx, [esp + 0x20]
call fcn.00401bc0
lea eax, [esp + 0x14]
push eax
push 0x20019
push 0
push str.SystemCurrentControlSetServicesClassPrinter
push 0x80000002
call edi
test eax, eax
jne 0x40c071
push 0xfc
push eax
lea ecx, [esp + 0x48]
push ecx
call fcn.004413c0
mov eax, dword [esp + 0x20]
add esp, 0xc
push 0xfc
lea edx, [esp + 0x44]
push edx
xor edi, edi
push edi
push eax
call ebp
test eax, eax
jne 0x40c02b
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x4c]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40bfce
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x23c]
push edx
lea eax, [esp + 0x30]
push eax
push 0
push str.DriverDesc
push ecx
mov dword [esp + 0x40], 1
mov dword [esp + 0x3c], 0xfc
call esi
lea edx, [esp + 0x24]
push edx
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x23c]
push eax
lea ecx, [esp + 0x30]
push ecx
push 0
push str.DriverDesc
push edx
call esi
test eax, eax
jne 0x40bfce
lea eax, [esp + 0x238]
push eax
call fcn.0040a520
add esp, 4
mov ebx, eax
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x40c00e
lea eax, [esp + 0x40]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40bfe4
sub eax, edx
push eax
lea edx, [esp + 0x44]
push edx
lea ecx, [esp + 0x20]
call fcn.00401c50
push 1
push 0x45c734
lea ecx, [esp + 0x20]
call fcn.00401c50
mov ecx, dword [esp + 0x14]
push 0xfc
lea eax, [esp + 0x44]
push eax
add edi, 1
push edi
push ecx
call ebp
test eax, eax
je 0x40bf42
mov esi, dword [esp + 0x18]
push 0x45d444
push esi
call fcn.00442f25
add esp, 8
test eax, eax
setne al
test al, al
je 0x40c06b
push ecx
lea eax, [esi - 0x10]
mov dword [esp + 0x40], esp
mov edi, esp
push eax
call fcn.004015c0
add eax, 0x10
mov dword [edi], eax
mov edx, dword [esp + 0x1c]
add esp, 4
push edx
call fcn.00408620
add esp, 8
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
push esi
push 0x45d444
lea ecx, [esp + 0x20]
call fcn.00401bc0
lea ecx, [esp + 0x14]
push ecx
push 0x20019
push esi
push str.EnumUSBPRINT
push 0x80000002
mov dword [esp + 0x40], esi
call edi
test eax, eax
jne 0x40c3b5
push 0xfc
lea edx, [esp + 0x44]
push esi
push edx
call fcn.004413c0
mov ecx, dword [esp + 0x20]
add esp, 0xc
push 0xfc
lea eax, [esp + 0x44]
push eax
push esi
push ecx
mov dword [esp + 0x40], esi
call ebp
test eax, eax
mov esi, dword [esp + 0x18]
jne 0x40c318
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push edx
push 0x20019
xor ebx, ebx
push ebx
lea eax, [esp + 0x4c]
push eax
push ecx
call edi
test eax, eax
jne 0x40c2e3
push 0xfc
lea edx, [esp + 0x140]
push ebx
push edx
call fcn.004413c0
mov ecx, dword [esp + 0x28]
add esp, 0xc
push 0xfc
lea eax, [esp + 0x140]
push eax
push ebx
push ecx
xor edi, edi
call ebp
test eax, eax
jne 0x40c1de
jmp 0x40c140
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x38]
push edx
push 0x20019
push ebx
lea eax, [esp + 0x148]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40c1af
lea edx, [esp + 0x24]
push edx
mov edx, dword [esp + 0x3c]
lea eax, [esp + 0x23c]
push eax
lea ecx, [esp + 0x30]
push ecx
push ebx
push str.DeviceDesc
push edx
mov dword [esp + 0x40], 1
mov dword [esp + 0x3c], 0xfc
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40c1b3
lea eax, [esp + 0x238]
push eax
call fcn.0040a520
add esp, 4
mov dword [esp + 0x2c], eax
jmp 0x40c1b3
mov dword [esp + 0x20], ebx
mov ecx, dword [esp + 0x38]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x1c]
push 0xfc
lea edx, [esp + 0x140]
push edx
add edi, 1
push edi
push eax
call ebp
test eax, eax
je 0x40c140
cmp dword [esp + 0x2c], ebx
je 0x40c2d0
lea eax, [esp + 0x40]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40c1f0
sub eax, edx
mov edx, dword [esi - 0xc]
lea ecx, [esp + 0x40]
mov ebp, eax
mov eax, dword [esi - 8]
mov ebx, ecx
mov dword [esp + 0x34], ecx
mov ecx, 1
sub ecx, dword [esi - 4]
lea edi, [edx + ebp]
sub eax, edi
sub ebx, esi
or eax, ecx
mov dword [esp + 0x3c], edx
jge 0x40c236
push edi
lea ecx, [esp + 0x1c]
call fcn.00401570
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x3c]
cmp ebx, edx
ja 0x40c240
add ebx, esi
mov dword [esp + 0x34], ebx
mov eax, dword [esp + 0x34]
push ebp
push eax
add edx, esi
push ebp
push edx
call fcn.00440f45
add esp, 0x10
test edi, edi
jl 0x40c30e
cmp edi, dword [esi - 8]
jg 0x40c30e
mov dword [esi - 0xc], edi
mov byte [edi + esi], 0
mov ebp, dword [esi - 0xc]
mov eax, dword [esi - 8]
mov edi, 0x45c734
mov ecx, 1
sub ecx, dword [esi - 4]
lea ebx, [ebp + 1]
mov dword [esp + 0x34], edi
sub eax, ebx
sub edi, esi
or eax, ecx
jge 0x40c29a
push ebx
lea ecx, [esp + 0x1c]
call fcn.00401570
mov esi, dword [esp + 0x18]
cmp edi, ebp
ja 0x40c2a4
add edi, esi
mov dword [esp + 0x34], edi
mov ecx, dword [esp + 0x34]
push 1
push ecx
push 1
add ebp, esi
push ebp
call fcn.00440f45
add esp, 0x10
test ebx, ebx
jl 0x40c30e
cmp ebx, dword [esi - 8]
jg 0x40c30e
mov ebp, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov dword [esi - 0xc], ebx
mov byte [ebx + esi], 0
xor ebx, ebx
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
jmp 0x40c2e7
mov dword [esp + 0x20], ebx
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
push 0xfc
lea ecx, [esp + 0x44]
add eax, 1
push ecx
push eax
push edx
mov dword [esp + 0x40], eax
call ebp
test eax, eax
je 0x40c0e5
jmp 0x40c31a
push 0x80070057
call fcn.00401090
xor ebx, ebx
push 0x45d444
push esi
call fcn.00442f25
add esp, 8
cmp eax, ebx
setne al
test al, al
je 0x40c3a8
push ecx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
lea edi, [esi - 0x10]
mov dword [esp + 0x40], esp
mov ebp, esp
call edx
cmp dword [edi + 0xc], ebx
lea ecx, [edi + 0xc]
jl 0x40c35e
cmp eax, dword [edi]
jne 0x40c35e
mov ebx, edi
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x40c395
mov ecx, dword [edi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov ebx, eax
test ebx, ebx
jne 0x40c377
jmp fcn.00401340
mov eax, dword [edi + 4]
mov dword [ebx + 4], eax
mov eax, dword [edi + 4]
add eax, 1
push eax
add edi, 0x10
push edi
push eax
lea ecx, [ebx + 0x10]
push ecx
call fcn.00440f45
add esp, 0x10
add ebx, 0x10
mov dword [ebp], ebx
mov edx, dword [esp + 0x18]
push edx
call fcn.00408620
add esp, 8
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40c3bd
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x18]
add esi, 0xfffffff0
mov dword [esp + 0x538], 0xffffffff
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c3e4
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x530]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x518]
xor ecx, esp
call fcn.0044027a
add esp, 0x528
ret