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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x408a20]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x28]
push ebx
push esi
mov esi, dword [ebp + 8]
lea edx, [ecx + 2]
push edi
mov dword [ebp - 0x44], esi
xor ebx, ebx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x28], 0x8f1a8f0d
mov dword [ebp - 0x24], 0x8f258f3c
mov dword [ebp - 0x20], 0x8f0f8f3d
mov dword [ebp - 0x1c], 0x8f238f2a
mov dword [ebp - 0x18], 0x8f208f27
mov dword [ebp - 0x14], 0x8f2f8f0d
mov dword [ebp - 0x10], 0x8f2f8f3a
mov dword [ebp - 0xc], 0x8f218f22
mov dword [ebp - 8], 0x8f29
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x403274
sub ecx, edx
lea eax, [ebp - 0x28]
sar ecx, 1
push ecx
push 0x18f4e
push eax
call fcn.00402a2a
movzx ecx, word [esi]
xor edx, edx
mov eax, dword [esi + 4]
mov word [eax + ecx*2], dx
lea edx, [ebp - 0x28]
mov ecx, edx
mov dword [ebp - 0x40], ecx
mov ax, word [edx]
add edx, 2
cmp ax, bx
jne 0x4032a6
mov edi, dword [esi + 4]
sub edx, ecx
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x4032b9
mov esi, dword [ebp - 0x40]
mov ecx, edx
mov eax, dword [ebp - 0x44]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push dword [eax + 4]
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea eax, [ebp - 0x64]
mov dword [ebp - 0x5c], 0x18
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x50], 0x40
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
cmp dword [ebp + 0x10], ebx
je 0x403376
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x5c]
push eax
push 0x10000000
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.ntoskrnl.exe_ZwCreateKey]
test eax, eax
js 0x403447
push dword [0x4087fc]
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov edx, dword [ebp - 0x34]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40333f
sub ecx, esi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push ebx
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.ntoskrnl.exe_ZwSetValueKey]
test eax, eax
js 0x40343e
mov bl, 1
jmp 0x40343e
mov edi, dword [ebp - 0x34]
xor eax, eax
mov word [edi], ax
lea eax, [ebp - 0x5c]
push eax
push 0xf003f
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.ntoskrnl.exe_ZwOpenKey]
test eax, eax
js 0x403447
push dword [0x4087fc]
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea eax, [ebp - 0x30]
push eax
push ebx
push ebx
push 2
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
cmp eax, 0xc0000023
jne 0x40343e
mov eax, dword [ebp - 0x30]
push 0x5075626c
add eax, 4
push eax
push ebx
call dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov esi, eax
test esi, esi
je 0x40343e
mov eax, dword [ebp - 0x30]
add eax, 4
push eax
push ebx
push esi
call sub.ntoskrnl.exe_memset
add esp, 0xc
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x30]
lea eax, [ebp - 0x3c]
push esi
push 2
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
test eax, eax
js 0x403432
push 0x40
pop eax
lfence
cmp dword [esi + 8], eax
jbe 0x403418
mov dword [esi + 8], eax
push eax
push ebx
push edi
call sub.ntoskrnl.exe_memset
push dword [esi + 8]
lea eax, [esi + 0xc]
push eax
push edi
call sub.ntoskrnl.exe_memcpy
add esp, 0x18
mov bl, 1
push 0x5075626c
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
push dword [ebp - 0x2c]
call dword [sym.imp.ntoskrnl.exe_ZwClose]
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406896
leave
ret 0xc