Function at 0x100d32f
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov ebx, 0x400
push ebx
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, eax
test esi, esi
je 0x100d39c
mov ecx, 0x100
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
xor edi, edi
mov word [ebp - 0xa], bx
mov word [ebp - 0xc], di
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push edi
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
cmp eax, edi
mov dword [ebp - 8], eax
jne 0x100d3a6
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push esi
push edi
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, 0xc0000017
jmp 0x100d4fc
mov edx, dword [ebp + 0xc]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
xor edi, edi
lea eax, [ebp - 0x1c]
push edi
push eax
not ecx
lea eax, [ebp - 0xc]
dec ecx
push eax
mov word [ebp - 0x1a], bx
mov word [ebp - 0x1c], cx
mov dword [ebp - 0x18], edx
call dword [sym.imp.ntdll.dll_RtlAnsiStringToUnicodeString]
lea eax, [ebp - 4]
push eax
push ebx
push esi
lea eax, [ebp - 0xc]
push 1
push eax
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_NtQueryValueKey]
cmp eax, edi
mov dword [ebp + 0xc], eax
jge 0x100d41a
mov eax, dword fs:[0x18]
push dword [ebp - 8]
mov eax, dword [eax + 0x30]
mov ebx, dword [sym.imp.ntdll.dll_RtlFreeHeap]
push edi
push dword [eax + 0x18]
call ebx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push esi
push edi
push dword [eax + 0x18]
call ebx
jmp 0x100d4f9
mov eax, dword [esi + 4]
mov ecx, dword [ebp + 0x14]
cmp eax, 4
mov dword [ecx], eax
je 0x100d4c5
cmp eax, 3
je 0x100d4c5
mov word [ebp - 0x14], di
mov edi, dword [sym.imp.ntdll.dll_RtlFreeHeap]
cmp eax, 2
jne 0x100d44f
mov eax, dword [ebp - 8]
mov word [ebp - 0x12], bx
mov dword [ebp - 0x10], eax
jmp 0x100d470
mov eax, dword fs:[0x18]
push dword [ebp - 8]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call edi
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x10], eax
mov ax, word [ebp + 0x18]
mov word [ebp - 0x12], ax
mov ax, word [esi + 0xc]
push 0
mov word [ebp - 0x24], ax
mov ax, word [esi + 0xc]
mov word [ebp - 0x22], ax
mov eax, dword [esi + 8]
add eax, esi
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.ntdll.dll_RtlUnicodeStringToAnsiString]
mov eax, dword [ebp + 0x14]
cmp dword [eax], 2
jne 0x100d4e8
push dword [ebp + 0x18]
push dword [ebp + 0x10]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov dword [ebp - 4], eax
mov eax, dword fs:[0x18]
push dword [ebp - 0x10]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
jmp 0x100d4e6
mov eax, dword [esi + 8]
mov ecx, dword [ebp + 0x10]
mov eax, dword [eax + esi]
mov dword [ecx], eax
mov eax, dword fs:[0x18]
push dword [ebp - 8]
mov eax, dword [eax + 0x30]
push edi
mov edi, dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [eax + 0x18]
call edi
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push esi
push 0
push dword [eax + 0x18]
call edi
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0x14