Function at 0x40d000
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x100
mov eax, dword [str.Terminal_Server]
mov ecx, dword [0x4547fc]
mov edx, dword [0x454800]
push ebx
push esi
push edi
mov dword [esp + 0x30], eax
mov eax, dword [0x454804]
mov dword [esp + 0x34], ecx
mov ecx, 0xc
mov esi, str.SystemCurrentControlSetControlProductOptions
lea edi, [esp + 0xdc]
mov dword [esp + 0x3c], eax
mov eax, dword [0x4547c0]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [str.ProductSuite]
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov dword [esp + 0x28], eax
mov al, byte [0x453f70]
mov dword [esp + 0x38], edx
mov edx, dword [0x4547bc]
mov dword [esp + 0x20], ecx
mov cl, byte [0x4547c4]
xor ebx, ebx
mov dword [esp + 0x24], edx
test al, al
mov byte [esp + 0x2c], cl
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
jge 0x40d0ae
lea edx, [esp + 0x40]
mov dword [esp + 0x40], 0x94
push edx
call esi
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x44]
cmp eax, 2
mov dword [0x459a90], ecx
sete al
mov byte [0x453f70], al
test al, al
jne 0x40d0bc
pop edi
pop esi
pop ebx
add esp, 0x100
ret
mov eax, dword [0x459a90]
mov byte [esp + 0xf], 0
cmp eax, 4
jbe 0x40d121
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 0x40]
lea edx, [esp + 0x40]
rep stosd dword es:[edi], eax
push edx
mov dword [esp + 0x44], 0x9c
call esi
test eax, eax
je 0x40d10e
mov eax, dword [esp + 0xd8]
test al, 0x10
je 0x40d10e
test ah, 1
jne 0x40d10e
mov byte [esp + 0xf], 1
pop edi
mov al, byte [esp + 0xb]
pop esi
pop ebx
add esp, 0x100
ret
mov byte [esp + 0xf], 0
pop edi
mov al, byte [esp + 0xb]
pop esi
pop ebx
add esp, 0x100
ret
lea eax, [esp + 0x14]
push ebp
push eax
push 0x20019
lea ecx, [esp + 0xe8]
push ebx
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
jne 0x40d16a
lea edx, [esp + 0x14]
lea eax, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x1c]
push ebx
push eax
lea ecx, [esp + 0x30]
push ebx
push ecx
push edx
call esi
cmp eax, ebx
je 0x40d21b
mov eax, dword [esp + 0x14]
cmp eax, ebx
jbe 0x40d21b
cmp dword [esp + 0x1c], 7
jne 0x40d21b
push eax
call fcn.0043658d
mov ebp, eax
add esp, 4
cmp ebp, ebx
je 0x40d21b
mov ecx, dword [esp + 0x14]
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
lea edx, [esp + 0x24]
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x14]
lea ecx, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x1c]
push ebp
push ecx
push ebx
push edx
push eax
call esi
test eax, eax
jne 0x40d210
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x34]
push ecx
call ebx
mov dword [esp + 0x20], eax
mov al, byte [ebp]
test al, al
mov esi, ebp
je 0x40d210
push esi
call ebx
mov edi, eax
mov eax, dword [esp + 0x20]
cmp edi, eax
jne 0x40d1fd
lea edx, [esp + 0x34]
push esi
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x40d20b
mov al, byte [esi + edi + 1]
lea esi, [esi + edi + 1]
test al, al
jne 0x40d1e0
jmp 0x40d210
mov byte [esp + 0x13], 1
push ebp
call fcn.004365b6
add esp, 4
xor ebx, ebx
mov eax, dword [esp + 0x18]
pop ebp
cmp eax, ebx
je 0x40d22b
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [esp + 0xf]
pop edi
pop esi
pop ebx
add esp, 0x100
ret