Function at 0x40e5a0
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x31c
mov eax, dword [0x46be4c]
xor eax, esp
mov dword [esp + 0x318], eax
mov eax, dword [esp + 0x320]
push ebx
xor ebx, ebx
cmp dword [esp + 0x328], ebx
mov dword [esp + 0x18], ebx
jne 0x40e5e3
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x318]
xor ecx, esp
call fcn.0044027a
add esp, 0x31c
ret
lea ecx, [esp + 8]
push ecx
push 0x20019
push ebx
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40e882
push esi
push 0xfc
lea edx, [esp + 0x12c]
push ebx
push edx
call fcn.004413c0
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
add esp, 0xc
push 0xfc
lea eax, [esp + 0x12c]
push eax
push ebx
push ecx
mov dword [esp + 0x30], ebx
call esi
test eax, eax
jne 0x40e876
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push ebp
jmp 0x40e650
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
push edx
push 0x20019
push 0
lea eax, [esp + 0x13c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40e80a
push 0xfc
push eax
lea edx, [esp + 0x3c]
push edx
call fcn.004413c0
mov ecx, dword [esp + 0x1c]
add esp, 0xc
push 0xfc
lea eax, [esp + 0x38]
push eax
xor ebp, ebp
push ebp
push ecx
call esi
test eax, eax
jne 0x40e7ff
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x1c]
push edx
push 0x20019
push 0
lea eax, [esp + 0x40]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40e7cc
push 0xfc
push eax
lea edx, [esp + 0x234]
push edx
mov dword [esp + 0x2c], 1
mov dword [esp + 0x24], 0xfc
call fcn.004413c0
add esp, 0xc
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x230]
push ecx
lea edx, [esp + 0x28]
push edx
push 0
push str.DeviceDesc
push eax
call edi
test eax, eax
jne 0x40e738
lea ecx, [esp + 0x22c]
push ecx
call fcn.0040a520
add esp, 4
test eax, eax
jne 0x40e738
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40e7cc
xor eax, eax
mov dword [esp + 0x2c], eax
mov byte [esp + 0x30], al
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x28]
push edx
push 0
push str.PrinterID
push eax
mov dword [esp + 0x38], 3
mov dword [esp + 0x30], 4
call edi
test eax, eax
jne 0x40e7bd
mov dl, byte [esp + 0x2c]
mov ecx, dword [esp + 0x334]
cmp dl, byte [ecx]
mov esi, dword [esp + 0x18]
jne 0x40e7a4
lea edx, [esp + 0x2c]
sub ecx, edx
lea esp, [esp]
cmp eax, esi
jge 0x40e7a6
mov bl, byte [esp + eax + 0x2d]
add eax, 1
lea edx, [ecx + eax]
cmp bl, byte [esp + edx + 0x2c]
je 0x40e790
cmp eax, esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
jne 0x40e7b9
mov ebx, 1
mov dword [esp + 0x24], ebx
jmp 0x40e7bd
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x40e7eb
mov edx, dword [esp + 0x10]
push 0xfc
lea ecx, [esp + 0x38]
push ecx
add ebp, 1
push ebp
push edx
call esi
test eax, eax
je 0x40e6a6
jmp 0x40e7fb
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x34]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test ebx, ebx
jne 0x40e834
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
push 0xfc
lea ecx, [esp + 0x134]
add eax, 1
push ecx
push eax
push edx
mov dword [esp + 0x38], eax
call esi
test eax, eax
je 0x40e650
jmp 0x40e874
mov ecx, dword [esp + 0x10]
push 0xfc
lea eax, [esp + 0x38]
push eax
push 0
push ecx
call esi
cmp eax, 0x103
mov edx, dword [esp + 0x10]
push edx
jne 0x40e86e
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x130]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
jmp 0x40e874
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebp
pop edi
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov ecx, dword [esp + 0x31c]
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0044027a
add esp, 0x31c
ret