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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
xor ebx, ebx
push edi
mov edi, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
cmp dword [ebp + 0xc], ebx
je 0x403751
push dword [ebp + 0xc]
jmp 0x40377f
push dword [ebp + 8]
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x34], 0x18
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x28], 0x240
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
push eax
push 0x3001f
lea eax, [ebp - 8]
push eax
call dword [sym.imp.ntoskrnl.exe_ZwOpenKey]
test eax, eax
js 0x4039a2
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push 2
push dword [ebp - 8]
call dword [sym.imp.ntoskrnl.exe_ZwQueryKey]
cmp dword [ebp - 4], ebx
jbe 0x40398a
push esi
push 0x5075626c
push dword [ebp - 4]
push ebx
call dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov esi, eax
test esi, esi
je 0x403989
push dword [ebp - 4]
push ebx
push esi
call sub.ntoskrnl.exe_memset
add esp, 0xc
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push esi
push 2
push dword [ebp - 8]
call dword [sym.imp.ntoskrnl.exe_ZwQueryKey]
test eax, eax
js 0x40397d
mov eax, ebx
mov dword [ebp - 0xc], ebx
cmp dword [esi + 0x14], ebx
jbe 0x4038ca
lea ecx, [ebp - 4]
mov dword [ebp - 4], ebx
push ecx
push ebx
push edi
push ebx
push eax
push dword [ebp - 8]
call dword [sym.imp.ntoskrnl.exe_ZwEnumerateKey]
test eax, eax
jns 0x40382a
cmp eax, 0x80000005
je 0x40382a
cmp eax, 0xc0000023
jne 0x4038b8
cmp dword [ebp - 4], ebx
jbe 0x4038b8
push 0x5075626c
push dword [ebp - 4]
push ebx
call dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov edi, eax
test edi, edi
je 0x4038b8
push dword [ebp - 4]
push ebx
push edi
call sub.ntoskrnl.exe_memset
add esp, 0xc
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push edi
push ebx
push dword [ebp - 0xc]
push dword [ebp - 8]
call dword [sym.imp.ntoskrnl.exe_ZwEnumerateKey]
test eax, eax
js 0x4038aa
mov ax, word [edi + 0xc]
mov word [ebp - 0x12], ax
mov word [ebp - 0x14], ax
lea eax, [edi + 0x10]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x4c]
push eax
push ebx
mov dword [ebp - 0x4c], 0x18
mov dword [ebp - 0x40], 0x240
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
call fcn.00403732
push 0x5075626c
push edi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov edi, ebx
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp eax, dword [esi + 0x14]
jb 0x403800
mov edi, ebx
mov eax, ebx
mov dword [ebp - 0xc], ebx
cmp dword [esi + 0x20], ebx
jbe 0x40397d
lea ecx, [ebp - 4]
mov dword [ebp - 4], ebx
push ecx
push ebx
push edi
push 1
push eax
push dword [ebp - 8]
call dword [sym.imp.ntoskrnl.exe_ZwEnumerateValueKey]
test eax, eax
jns 0x4038ff
cmp eax, 0x80000005
je 0x4038ff
cmp eax, 0xc0000023
jne 0x40396d
cmp dword [ebp - 4], ebx
jbe 0x40396d
push 0x5075626c
push dword [ebp - 4]
push ebx
call dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov edi, eax
test edi, edi
je 0x40396d
push dword [ebp - 4]
push ebx
push edi
call sub.ntoskrnl.exe_memset
add esp, 0xc
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push edi
push 1
push dword [ebp - 0xc]
push dword [ebp - 8]
call dword [sym.imp.ntoskrnl.exe_ZwEnumerateValueKey]
test eax, eax
js 0x40395f
mov ax, word [edi + 0x10]
mov word [ebp - 0x12], ax
mov word [ebp - 0x14], ax
lea eax, [edi + 0x14]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 8]
call dword [sym.imp.ntoskrnl.exe_ZwDeleteValueKey]
push 0x5075626c
push edi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov edi, ebx
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp eax, dword [esi + 0x20]
jb 0x4038d8
push 0x5075626c
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
pop esi
push dword [ebp - 8]
call dword [sym.imp.ntoskrnl.exe_ZwDeleteKey]
test eax, eax
js 0x403999
mov bl, 1
push dword [ebp - 8]
call dword [sym.imp.ntoskrnl.exe_ZwClose]
pop edi
mov al, bl
pop ebx
leave
ret 8