Function at 0x409790
Capabilities:
Query or enumerate registry key
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x278
push ebx
push ebp
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
push edi
push str.RegistryMachineSOFTWAREMicrosoftWindows_NTCurrentVersionNetworkCards_
lea eax, [esp + 0x70]
xor ebp, ebp
push eax
mov dword [esp + 0x1c], ebp
call esi
push str.RegistryMachineSOFTWAREMicrosoftWindows_NTCurrentVersionNetworkCards_
lea ecx, [esp + 0x84]
push ecx
call esi
lea eax, [esp + 0x4c]
push eax
push 0xf003f
lea ecx, [esp + 0x20]
lea edx, [esp + 0x74]
push ecx
mov dword [esp + 0x58], 0x18
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x64], 0x40
mov dword [esp + 0x60], edx
mov dword [esp + 0x68], ebp
mov dword [esp + 0x6c], ebp
call dword [sym.imp.ntoskrnl.exe_ZwOpenKey]
test eax, eax
jne 0x409827
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.ntoskrnl.exe_ZwQueryKey]
lea edx, [esp + 0x14]
push edx
push ebp
push ebp
push 2
push eax
call esi
mov eax, dword [esp + 0x14]
cmp eax, ebp
jne 0x409836
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ntoskrnl.exe_ZwClose]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x278
ret 4
mov ebx, dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
push 0x4d6c7431
push eax
push ebp
call ebx
mov ecx, dword [esp + 0x18]
mov edi, eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x14]
push edx
push eax
push edi
push 2
push ecx
mov dword [esp + 0x3c], edi
call esi
test eax, eax
je 0x409885
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ntoskrnl.exe_ZwClose]
push ebp
push edi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x278
ret 4
mov dword [esp + 0x24], ebp
cmp dword [edi + 0x14], ebp
jbe 0x409827
jmp 0x409896
mov ebx, dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov ecx, dword [esp + 0x18]
mov edi, dword [sym.imp.ntoskrnl.exe_ZwEnumerateKey]
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 0
push ebp
push ecx
call edi
mov edx, dword [esp + 0x14]
push 0x4d6c7431
push edx
push 0
call ebx
mov esi, eax
mov eax, dword [esp + 0x14]
push eax
push 0
push esi
call sub.ntoskrnl.exe_memset
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
push edx
push esi
push 0
push ebp
push eax
call edi
test eax, eax
je 0x4098f0
push 0
push esi
jmp 0x409a9e
mov di, word [esi + 0xc]
push 0x4d6c7431
push 0x100
push 0
call ebx
push 0x4d6c7431
push 0x100
push 0
mov ebp, eax
call ebx
push 0
push 0
push ebp
mov ebx, eax
mov dword [esp + 0x3c], 0x1010101
call sub.ntoskrnl.exe_memset
mov eax, str.RegistryMachineSOFTWAREMicrosoftWindows_NTCurrentVersionNetworkCards_
mov ecx, ebp
add esp, 0xc
sub ecx, eax
movzx edx, word [eax]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x409932
movzx ecx, di
shr ecx, 1
push ecx
lea eax, [esi + 0x10]
push eax
push ebp
call sub.ntoskrnl.exe_wcsncat
add esp, 0xc
push 0
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
call esi
push 0x100
lea edx, [esp + 0x8c]
push edx
push str.ServiceName
mov eax, ebp
call fcn.004050c0
test eax, eax
ja 0x40998c
test ebx, ebx
je 0x409985
push 0
push ebx
call esi
test ebp, ebp
jmp 0x409a99
push 0
push 0
push ebx
call sub.ntoskrnl.exe_memset
mov eax, str.___
mov edx, ebx
add esp, 0xc
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4099a2
lea eax, [esp + 0x88]
mov esi, eax
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4099c0
mov edi, ebx
sub eax, esi
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4099d2
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
lea eax, [esp + 0x68]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
xor esi, esi
push esi
push esi
push esi
push 1
push 3
push 0x80
push esi
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x54]
lea ecx, [esp + 0x84]
push eax
mov dword [esp + 0x60], ecx
push 0xc0000000
lea ecx, [esp + 0x54]
push ecx
mov dword [esp + 0x60], 0x18
mov dword [esp + 0x64], esi
mov dword [esp + 0x6c], 0x240
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], esi
call dword [sym.imp.ntoskrnl.exe_ZwCreateFile]
test eax, eax
jl 0x409a8b
push 0xc
lea edx, [esp + 0x78]
push edx
mov edx, dword [esp + 0x34]
push 4
lea eax, [esp + 0x3c]
push eax
push 0x170002
lea ecx, [esp + 0x30]
push ecx
push esi
push esi
push esi
push edx
mov dword [esp + 0x44], 1
mov dword [esp + 0x48], esi
call dword [sym.imp.ntoskrnl.exe_ZwDeviceIoControlFile]
cmp dword [esp + 0x20], 6
jne 0x409a8b
cmp dword [esp + 0x1c], esi
je 0x409ac9
cmp ebx, esi
je 0x409a97
push esi
push ebx
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
cmp ebp, esi
je 0x409aa4
push 0
push ebp
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov ebp, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
inc ebp
mov dword [esp + 0x24], ebp
cmp ebp, dword [eax + 0x14]
jb 0x409890
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x278
ret 4
mov eax, dword [esp + 0x28c]
mov ecx, dword [esp + 0x74]
mov dx, word [esp + 0x78]
mov dword [eax], ecx
mov word [eax + 4], dx
cmp ebx, esi
je 0x409aeb
push esi
push ebx
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
cmp ebp, esi
je 0x409af7
push esi
push ebp
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x278
ret 4