Function at 0x406800
Capabilities:
Delete registry value
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x447cec
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x348
push ebx
push ebp
xor ebp, ebp
push esi
mov dword [esp + 0xc], ebp
call fcn.0043cb83
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x10], eax
mov dword [esp + 0x35c], ebp
call fcn.0043cb83
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea ebx, [eax + 0x10]
mov dword [esp + 0x18], ebx
mov byte [esp + 0x35c], 1
call fcn.0044608e
mov esi, dword [eax + 4]
lea eax, [esi + 0xcc]
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x44], esi
call fcn.00401e30
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x28]
push edx
push ebp
push ebp
push 2
push ebp
push 6
call sub.WINSPOOL.DRV_EnumPrintersA
test eax, eax
jne 0x4068ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x4068ff
lea eax, [ebx - 0x10]
mov byte [esp + 0x35c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4068bc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x35c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4068e5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x348]
mov dword fs:[0], ecx
add esp, 0x354
ret
mov eax, dword [esp + 0x24]
push edi
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
cmp edi, ebp
mov dword [esp + 0x38], edi
je 0x406c6f
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x2c]
push edx
push eax
push edi
push 2
push ebp
push 6
call sub.WINSPOOL.DRV_EnumPrintersA
test eax, eax
je 0x406b05
cmp dword [esp + 0x2c], ebp
mov dword [esp + 0x34], ebp
jbe 0x406afd
add edi, 0x10
mov dword [esp + 0x18], edi
xor esi, esi
test esi, esi
mov ebp, dword [esp + 0x14]
mov eax, dword [ebp - 0xc]
jl 0x406975
cmp esi, eax
jge 0x406975
lea eax, [esi + ebp]
push 9
push eax
call fcn.0042f4d1
add esp, 8
test eax, eax
jne 0x40697f
mov dword [esp + 0x10], 0xffffffff
jmp 0x40698d
sub eax, ebp
test eax, eax
mov dword [esp + 0x10], eax
jge 0x406a0e
push esi
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00401cf0
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [ebx - 0x10]
cmp eax, esi
mov byte [esp + 0x360], 2
je 0x406a05
mov edx, dword [esi + 0xc]
test edx, edx
lea edi, [esi + 0xc]
jl 0x4069f3
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x4069f3
push eax
call fcn.004014e0
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x4069df
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
mov eax, dword [esp + 0x3c]
lea ebx, [ebp + 0x10]
mov ebp, dword [esp + 0x14]
mov dword [esp + 0x1c], ebx
jmp 0x406a8a
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x24]
call fcn.00401a70
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x3c]
jmp 0x406a8a
mov eax, dword [esp + 0x10]
sub eax, esi
push eax
push esi
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x20]
call fcn.00401730
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [ebx - 0x10]
cmp eax, esi
mov byte [esp + 0x360], 3
je 0x406a86
mov edx, dword [esi + 0xc]
test edx, edx
lea edi, [esi + 0xc]
jl 0x406a74
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x406a74
push eax
call fcn.004014e0
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x406a67
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
lea ebx, [ebp + 0x10]
mov ebp, dword [esp + 0x14]
mov dword [esp + 0x1c], ebx
jmp 0x406a86
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x24]
call fcn.00401a70
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
mov byte [esp + 0x360], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406aac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
push eax
push ebx
call fcn.0042de57
add esp, 8
test eax, eax
je 0x406b61
mov eax, dword [esp + 0x10]
test eax, eax
lea esi, [eax + 1]
jge 0x406954
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
inc eax
add edx, 0x54
xor ebp, ebp
cmp eax, ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x18], edx
jb 0x406952
mov edi, dword [esp + 0x38]
mov esi, dword [esp + 0x44]
mov dword [esp + 0x10], 1
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [esp + 0x10], ebp
je 0x406c6f
push str.DIASUser
push str.SOFTWARECanonDIASSETUP
lea eax, [esp + 0x158]
push 0x44bbe8
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [esp + 0x20]
push ecx
push 0x2001f
push ebp
lea edx, [esp + 0x15c]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x406bba
mov dword [esp + 0x10], ebp
jmp 0x406c6f
mov ecx, dword [esp + 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
lea eax, [ebx - 0x10]
mov byte [esp + 0x360], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406b8e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [ebp - 0x10]
mov dword [esp + 0x360], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406bb3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
jmp 0x406cbe
mov eax, dword [esi + 0xd0]
push eax
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x258]
push edx
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x2c]
xor esi, esi
push esi
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x60]
push edx
push esi
mov dword [esp + 0x34], ebp
mov ebp, 0x104
push eax
mov dword [esp + 0x44], ebp
mov dword [esp + 0x50], ebp
call edi
test eax, eax
jne 0x406c56
mov edi, edi
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jne 0x406c23
inc dword [esp + 0x18]
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x258]
push eax
lea ecx, [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x2c]
push 0
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x60]
push eax
inc esi
push esi
push ecx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x50], ebp
call edi
test eax, eax
je 0x406c10
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, dword [esp + 0x18]
jbe 0x406c6f
mov dword [esp + 0x10], 0
lea eax, [ebx - 0x10]
mov byte [esp + 0x360], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406c91
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x360], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406cba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x358]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x354
ret