Function at 0x403d28
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov byte [ebp - 1], 0
test edi, edi
je 0x404001
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x404001
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x403d5f
mov eax, dword [0x408858]
mov ebx, dword [0x408878]
jmp 0x403d97
cmp eax, 1
jne 0x403d71
mov eax, dword [0x408890]
mov ebx, dword [0x4088b0]
jmp 0x403d97
cmp eax, 2
jne 0x403d83
mov eax, dword [0x4088d4]
mov ebx, dword [0x408900]
jmp 0x403d97
cmp eax, 3
jne 0x404001
mov eax, dword [0x40891c]
mov ebx, dword [0x408940]
push dword [0x408b74]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
xor ecx, ecx
mov dword [ebp - 0x38], 0x18
cmp dword [ebp + 0x10], 1
lea eax, [ebp - 0x20]
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x2c], 0x40
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
jne 0x403e5c
cmp dword [edi], ecx
je 0x404001
cmp dword [esi], ecx
je 0x404001
push ecx
push ecx
push ecx
push ecx
lea eax, [ebp - 0x38]
push eax
push 0x10000000
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ntoskrnl.exe_ZwCreateKey]
test eax, eax
js 0x403e54
push dword [ebp - 0x10]
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
push dword [esi]
lea eax, [ebp - 0x18]
push dword [edi]
xor edi, edi
push edi
push edi
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ntoskrnl.exe_ZwSetValueKey]
test eax, eax
js 0x403e4b
push ebx
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
push 4
pop ebx
push ebx
push esi
push ebx
push edi
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ntoskrnl.exe_ZwSetValueKey]
test eax, eax
js 0x403e4b
mov byte [ebp - 1], 1
push dword [ebp - 0xc]
call dword [sym.imp.ntoskrnl.exe_ZwClose]
mov al, byte [ebp - 1]
jmp 0x404003
lea eax, [ebp - 0x38]
push eax
push 0xf003f
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ntoskrnl.exe_ZwOpenKey]
test eax, eax
js 0x403ff6
push ebx
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea eax, [ebp - 8]
xor ebx, ebx
push eax
push ebx
push ebx
push 2
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
cmp eax, 0xc0000023
jne 0x403fe4
push 0x5075626c
push dword [ebp - 8]
push ebx
call dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov esi, eax
test esi, esi
je 0x403fe1
push dword [ebp - 8]
push ebx
push esi
call sub.ntoskrnl.exe_memset
add esp, 0xc
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
lea eax, [ebp - 0x18]
push esi
push 2
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
test eax, eax
js 0x403fd5
push 4
lfence
mov eax, dword [esi + 8]
pop ebx
cmp eax, ebx
jbe 0x403efb
mov dword [esi + 8], ebx
mov eax, ebx
push eax
lea eax, [esi + 0xc]
push eax
push dword [ebp + 0xc]
call sub.ntoskrnl.exe_memcpy
add esp, 0xc
push 0x5075626c
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
push dword [ebp - 0x10]
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea eax, [ebp - 8]
xor esi, esi
push eax
push esi
push esi
push 2
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
cmp eax, 0xc0000023
jne 0x403fe1
push 0x5075626c
push dword [ebp - 8]
push esi
call dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov esi, eax
test esi, esi
je 0x403fe1
push dword [ebp - 8]
push 0
push esi
call sub.ntoskrnl.exe_memset
add esp, 0xc
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
lea eax, [ebp - 0x18]
push esi
push 2
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
test eax, eax
js 0x403fd5
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 8]
cmp eax, dword [ecx]
jne 0x403fd5
lfence
mov eax, dword [esi + 8]
push 0x46696c65
add eax, ebx
push eax
push 0
call dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov dword [edi], eax
test eax, eax
je 0x403fd5
lfence
mov eax, dword [esi + 8]
add eax, ebx
push eax
push 0
push dword [edi]
call sub.ntoskrnl.exe_memset
push dword [esi + 8]
lea eax, [esi + 0xc]
push eax
push dword [edi]
call sub.ntoskrnl.exe_memcpy
add esp, 0x18
mov byte [ebp - 1], 1
push 0x5075626c
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov esi, dword [ebp + 0xc]
push dword [ebp - 0xc]
call dword [sym.imp.ntoskrnl.exe_ZwClose]
mov al, byte [ebp - 1]
test al, al
jne 0x404003
jmp 0x403ff9
mov al, byte [ebp - 1]
and dword [edi], 0
and dword [esi], 0
jmp 0x404003
xor al, al
pop edi
pop esi
pop ebx
leave
ret 0x10