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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5573cb
mov eax, dword fs:[0]
push eax
sub esp, 0xc24
mov eax, dword [0x5d7b20]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0xc24], 1
mov dword [ebp - 0xc1c], edi
mov dword [ebp - 0xc20], edi
mov dword [ebp - 0xc28], edi
mov dword [ebp - 0xc2c], edi
call fcn.0044c104
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x41e3ef
push 0x80004005
call fcn.00403e70
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0xc18], eax
push 4
push str.ENUM
lea ecx, [ebp - 0xc18]
mov dword [ebp - 4], edi
call fcn.00404df0
push 1
push 0x56825c
lea ecx, [ebp - 0xc18]
call fcn.00405330
cmp esi, edi
jne 0x41e430
xor eax, eax
jmp 0x41e444
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x41e435
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [ebp - 0xc18]
call fcn.00405330
cmp esi, edi
je 0x41e649
mov eax, esi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x41e460
sub eax, edx
sar eax, 1
je 0x41e649
mov edx, dword [ebp - 0xc18]
lea ecx, [ebp - 0xc1c]
push ecx
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x41e618
mov ecx, dword [ebp - 0xc1c]
push 0x401
lea eax, [ebp - 0xc14]
push eax
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
jne 0x41e605
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
lea edx, [ebp - 0xc14]
push edx
push str.DeletePrinterPort:_szSubKey___s_n
call fcn.00415550
mov edx, dword [ebp - 0xc1c]
add esp, 8
lea eax, [ebp - 0xc20]
push eax
lea ecx, [ebp - 0xc14]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x41e5e0
push 0x200
push eax
lea eax, [ebp - 0x410]
push eax
call fcn.0053e550
add esp, 0xc
lea ecx, [ebp - 0xc28]
push ecx
mov ecx, dword [ebp - 0xc20]
lea edx, [ebp - 0x410]
push edx
lea eax, [ebp - 0xc2c]
push eax
push 0
push str.PortName
push ecx
mov dword [ebp - 0xc28], 0x200
call ebx
test eax, eax
jne 0x41e5c9
lea edx, [ebp - 0x410]
push edx
push str.DeletePrinterPort:PortNameBuf___s_n
call fcn.00415550
push str.SystemCurrentControlSetControlPrintPorts_
lea eax, [ebp - 0x210]
push 0x100
push eax
call fcn.0053eeab
lea ecx, [ebp - 0x410]
push ecx
lea edx, [ebp - 0x210]
push 0x100
push edx
call fcn.0053e396
lea eax, [ebp - 0x210]
push eax
push str.DeletePrinterPort:PortRegBuf___s_n
call fcn.00415550
add esp, 0x28
lea ecx, [ebp - 0x210]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call esi
neg eax
sbb eax, eax
inc eax
and dword [ebp - 0xc24], eax
jne 0x41e5c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DeletePort_failed.__0x_x__n
call fcn.00415550
add esp, 8
mov edx, dword [ebp - 0xc20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0xc20], 0
mov ecx, dword [ebp - 0xc1c]
push 0x401
lea eax, [ebp - 0xc14]
push eax
inc edi
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x41e4c4
xor edi, edi
mov edx, dword [ebp - 0xc1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0xc1c], edi
mov eax, dword [ebp - 0xc18]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41e641
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0xc24]
jmp 0x41e67c
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0xc18]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41e67a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret