Function at 0x405050
Capabilities:
Delete registry key
Resolve function by parsing pe exports
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42a410
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x43b010]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push esi
push edi
mov eax, dword [0x43b010]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebx + 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
je 0x4050e9
push str._gdssnp
push eax
call fcn.00417e59
add esp, 8
test eax, eax
je 0x4050e9
lea eax, [esp + 0x1c]
push eax
push str.SOFTWAREHewlett_PackardHP_SSNP
push 0x80000002
call edi
test eax, eax
jne 0x4050e9
push 4
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 1
push eax
push 4
push 0
push str.SSNPDisableAll
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 9
xor eax, eax
mov dword [esp + 0x54], 7
push str._gcomname
lea ecx, [esp + 0x44]
mov dword [esp + 0x54], 0
mov word [esp + 0x44], ax
call fcn.0040adb0
mov dword [esp + 0x80], 0
lea eax, [esp + 0x3c]
cmp dword [esp + 0x50], 8
cmovae eax, dword [esp + 0x3c]
push eax
push dword [ebx + 0x10]
call fcn.00417e59
add esp, 8
test eax, eax
je 0x4051e9
mov ecx, dword [esp + 0x4c]
cmp word [eax + ecx*2], 0x22
lea eax, [eax + ecx*2]
jne 0x4051e9
add eax, 2
lea ecx, [esp + 0x24]
push eax
call fcn.0040a170
push 1
push 0
lea eax, [esp + 0x18]
mov byte [esp + 0x88], 1
push eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x1c], 0x22
call fcn.0040a830
cmp eax, 0xffffffff
je 0x40518d
push eax
lea ecx, [esp + 0x28]
call fcn.0040a490
cmp dword [esp + 0x34], 0
je 0x4051ce
lea ecx, [esp + 0x54]
call fcn.00413c80
lea eax, [esp + 0x24]
mov byte [esp + 0x80], 2
push eax
lea ecx, [esp + 0x58]
call fcn.00413e10
cmp dword [esp + 0x6c], 8
mov dword [esp + 0x54], vtable.SNMPGlobalCommunityName.0
jb 0x4051ce
push dword [esp + 0x58]
call fcn.004144c0
add esp, 4
mov byte [esp + 0x80], 0
cmp dword [esp + 0x38], 8
jb 0x4051e9
push dword [esp + 0x24]
call fcn.004144c0
add esp, 4
cmp dword [ebx + 0x10], 0
mov dword [esp + 0x14], 0
je 0x40573e
lea eax, [esp + 0x14]
push eax
push str.SoftwareHewlett_PackardHP_Print_Settings
push 0x80000001
call edi
test eax, eax
jne 0x40573e
push str._snptm
push dword [ebx + 0x10]
or esi, 0xffffffff
call fcn.00417e59
add esp, 8
test eax, eax
je 0x405239
add eax, 0xe
push eax
call fcn.004178f4
add esp, 4
mov esi, eax
mov dword [esp + 0x20], esi
cmp esi, 0xffffffff
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
je 0x40525e
push 4
lea eax, [esp + 0x24]
push eax
push 4
push 0
push 0x435198
push dword [esp + 0x28]
call esi
push str._policy
push dword [ebx + 0x10]
call fcn.00417e59
add esp, 8
test eax, eax
je 0x40530a
push str._policy
push dword [ebx + 0x10]
call fcn.00417e59
add esp, 8
cmp word [eax + 0xe], 0x22
jne 0x40530a
add eax, 0x10
lea ecx, [esp + 0x24]
push eax
call fcn.0040a170
push 1
push 0
lea eax, [esp + 0x18]
mov byte [esp + 0x88], 3
push eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x1c], 0x22
call fcn.0040a830
cmp eax, 0xffffffff
je 0x4052cb
push eax
lea ecx, [esp + 0x28]
call fcn.0040a490
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4052f9
cmp dword [esp + 0x38], 8
lea eax, [eax*2 + 2]
push eax
lea ecx, [esp + 0x28]
cmovae ecx, dword [esp + 0x28]
push ecx
push 1
push 0
push str.Policy
push dword [esp + 0x28]
call esi
lea ecx, [esp + 0x24]
mov byte [esp + 0x80], 0
call fcn.0040a220
push str._aml
push dword [ebx + 0x10]
call fcn.00417e59
add esp, 8
test eax, eax
je 0x4054ff
lea eax, [esp + 0x10]
push eax
push 0x435578
push dword [esp + 0x1c]
call edi
test eax, eax
jne 0x4054ff
mov edi, dword [ebx + 0x10]
lea ecx, [ecx]
push str._aml
push edi
call fcn.00417e59
mov edi, eax
add esp, 8
test edi, edi
je 0x4054f1
add edi, 8
lea ecx, [esp + 0x24]
push edi
call fcn.0040a170
mov byte [esp + 0x80], 4
cmp dword [esp + 0x34], 0
je 0x4054ce
cmp dword [esp + 0x38], 8
lea eax, [esp + 0x24]
cmovae eax, dword [esp + 0x24]
cmp word [eax], 0x22
jne 0x405399
push 1
push 0
lea ecx, [esp + 0x2c]
call fcn.0040a4d0
push 1
push 0
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x2c
push eax
lea ecx, [esp + 0x30]
call fcn.0040a830
mov esi, eax
cmp esi, 0xffffffff
je 0x4054ce
test esi, esi
je 0x4053e5
cmp dword [esp + 0x38], 8
lea ecx, [esp + 0x24]
cmovae ecx, dword [esp + 0x24]
cmp word [ecx + esi*2 - 2], 0x22
jne 0x4053e5
dec esi
lea ecx, [esp + 0x24]
push 1
push esi
call fcn.0040a4d0
cmp esi, 0xffffffff
je 0x4054ce
push esi
push 0
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x30]
call fcn.0040a620
lea eax, [esi + 1]
mov byte [esp + 0x80], 5
push eax
push 0
lea ecx, [esp + 0x2c]
call fcn.0040a4d0
cmp dword [esp + 0x38], 8
lea eax, [esp + 0x24]
cmovae eax, dword [esp + 0x24]
cmp word [eax], 0x20
jne 0x405437
push 1
push 0
lea ecx, [esp + 0x2c]
call fcn.0040a4d0
cmp dword [esp + 0x38], 8
lea eax, [esp + 0x24]
cmovae eax, dword [esp + 0x24]
cmp word [eax], 0x22
jne 0x405458
push 1
push 0
lea ecx, [esp + 0x2c]
call fcn.0040a4d0
push 1
push 0
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x22
push eax
lea ecx, [esp + 0x30]
call fcn.0040a830
cmp eax, 0xffffffff
je 0x405481
push eax
lea ecx, [esp + 0x28]
call fcn.0040a490
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x24]
cmp dword [esp + 0x38], 8
lea ecx, [esp + 0x54]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmovae edx, dword [esp + 0x24]
cmp dword [esp + 0x68], 8
lea eax, [eax*2 + 2]
push eax
cmovae ecx, dword [esp + 0x58]
push edx
push 1
push 0
push ecx
push dword [esp + 0x24]
call esi
cmp dword [esp + 0x68], 8
jb 0x4054ce
push dword [esp + 0x54]
call fcn.004144c0
add esp, 4
mov byte [esp + 0x80], 0
cmp dword [esp + 0x38], 8
jb 0x4054e9
push dword [esp + 0x24]
call fcn.004144c0
add esp, 4
test edi, edi
jne 0x405340
push dword [esp + 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call edi
jmp 0x405505
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str._rml
push dword [ebx + 0x10]
call fcn.00417e59
add esp, 8
test eax, eax
je 0x40561f
push str._rmlALL
push dword [ebx + 0x10]
call fcn.00417e59
add esp, 8
test eax, eax
je 0x405545
push 0x435578
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
jmp 0x40561f
lea eax, [esp + 0x10]
push eax
push 0x435578
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x40561f
mov esi, dword [ebx + 0x10]
push str._rml_
push esi
call fcn.00417e59
mov esi, eax
add esp, 8
test esi, esi
je 0x405619
add esi, 0xa
lea ecx, [esp + 0x24]
push esi
call fcn.0040a170
push 1
push 0
lea eax, [esp + 0x20]
mov byte [esp + 0x88], 6
push eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x24], 0x22
call fcn.0040a830
lea ecx, [esp + 0x24]
cmp eax, 0xffffffff
je 0x4055ba
lea esi, [esi + eax*2]
push eax
jmp 0x4055bc
push 0
call fcn.0040a490
cmp dword [esp + 0x34], 0
je 0x4055df
cmp dword [esp + 0x38], 8
lea edx, [esp + 0x24]
mov ecx, dword [esp + 0x10]
cmovae edx, dword [esp + 0x24]
call fcn.00414430
mov byte [esp + 0x80], 0
cmp dword [esp + 0x38], 8
jb 0x4055fa
push dword [esp + 0x24]
call fcn.004144c0
add esp, 4
xor eax, eax
mov dword [esp + 0x38], 7
mov dword [esp + 0x34], 0
mov word [esp + 0x24], ax
test esi, esi
jne 0x405564
push dword [esp + 0x10]
call edi
mov edx, dword [esp + 0x14]
mov ecx, ebx
call fcn.00404f20
push 0x434cf4
push dword [ebx + 0x10]
mov dword [esp + 0x24], 1
call fcn.00417e59
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
add esp, 8
test eax, eax
je 0x405662
push 4
lea eax, [esp + 0x20]
push eax
push 4
push 0
push str.Restricted
push dword [esp + 0x28]
call esi
push 0x434cfc
push dword [ebx + 0x10]
mov dword [esp + 0x24], 0
call fcn.00417e59
add esp, 8
test eax, eax
je 0x405694
push 4
lea eax, [esp + 0x20]
push eax
push 4
push 0
push str.EnableProfiles
push dword [esp + 0x28]
call esi
push str._mppqs
push dword [ebx + 0x10]
call fcn.00417e59
add esp, 8
test eax, eax
je 0x405738
push str._mppqs
push dword [ebx + 0x10]
call fcn.00417e59
add esp, 8
cmp word [eax + 0xc], 0x22
jne 0x405738
add eax, 0xe
lea ecx, [esp + 0x24]
push eax
call fcn.0040a170
push 1
push 0
lea eax, [esp + 0x20]
mov byte [esp + 0x88], 7
push eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x24], 0x22
call fcn.0040a830
cmp eax, 0xffffffff
je 0x405701
push eax
lea ecx, [esp + 0x28]
call fcn.0040a490
mov eax, dword [esp + 0x34]
test eax, eax
je 0x40572f
cmp dword [esp + 0x38], 8
lea eax, [eax*2 + 2]
push eax
lea ecx, [esp + 0x28]
cmovae ecx, dword [esp + 0x28]
push ecx
push 1
push 0
push str.MPPQueryString
push dword [esp + 0x28]
call esi
lea ecx, [esp + 0x24]
call fcn.0040a220
push dword [esp + 0x14]
call edi
cmp dword [esp + 0x50], 8
jb 0x405751
push dword [esp + 0x3c]
call fcn.004144c0
add esp, 4
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.0041729b
mov esp, ebp
pop ebp
ret