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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x818
mov eax, dword [0x4b16c628]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov dword [ebp - 0x810], eax
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
mov dword [ebp - 0x814], eax
xor esi, esi
xor eax, eax
mov ebx, ecx
mov word [ebp - 0x804], si
mov ecx, 0x1ff
lea edi, [ebp - 0x802]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x818]
push eax
lea edi, [ebp - 0x804]
mov eax, edi
push eax
lea eax, [ebp - 0x80c]
push eax
push 0
push dword [ebp - 0x810]
mov dword [ebp - 0x80c], esi
mov dword [ebp - 0x808], esi
mov esi, 0x800
push edx
mov dword [ebp - 0x818], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4b15ba1f
cmp dword [ebp - 0x80c], 1
je 0x4b15b8d6
cmp dword [ebp - 0x80c], 2
jne 0x4b15ba46
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4b15b8e3
or dword [ebx + 0xa8], eax
cmp dword [ebp - 0x80c], 2
je 0x4b15b905
lea eax, [ebp - 0x804]
push 0x25
push eax
call dword [sym.imp.msvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
je 0x4b15b9f2
push esi
call sub.MFC42u.dll_operatornew
test eax, eax
pop ecx
mov dword [ebp - 0x808], eax
jne 0x4b15b939
mov eax, dword [0x4b16c0b8]
cmp byte [eax + 0x19], 2
mov ecx, 0x8007000e
mov esi, ecx
jb 0x4b15ba6c
push ecx
push 0x4b151b3c
push 0x16
jmp 0x4b15b9dc
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, 0x400
push esi
push eax
lea eax, [ebp - 0x804]
push eax
call edi
mov ebx, eax
test ebx, ebx
jne 0x4b15b970
mov eax, dword [0x4b16c0b8]
xor esi, esi
cmp byte [eax + 0x19], 2
jb 0x4b15ba6c
push esi
push 0x4b151b3c
push 0x17
jmp 0x4b15b9dc
cmp ebx, esi
jbe 0x4b15b9ec
push dword [ebp - 0x808]
call sub.MFC42u.dll_operatordelete
lea eax, [ebx + ebx]
push eax
call sub.MFC42u.dll_operatornew
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x808], eax
jne 0x4b15b9b4
mov eax, dword [0x4b16c0b8]
cmp byte [eax + 0x19], 2
mov ecx, 0x8007000e
mov esi, ecx
jb 0x4b15ba6c
push ecx
push 0x4b151b3c
push 0x18
jmp 0x4b15b9dc
push ebx
push eax
lea eax, [ebp - 0x804]
push eax
call edi
test eax, eax
jne 0x4b15b9ec
mov eax, dword [0x4b16c0b8]
xor esi, esi
cmp byte [eax + 0x19], 2
jb 0x4b15ba6c
push esi
push 0x4b151b3c
push 0x19
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.4b156ac1
jmp 0x4b15ba6c
mov edi, dword [ebp - 0x808]
mov ecx, dword [ebp - 0x814]
push edi
call fcn.4b166e98
mov esi, eax
test esi, esi
jge 0x4b15ba6c
mov eax, dword [0x4b16c0b8]
cmp byte [eax + 0x19], 3
jb 0x4b15ba6c
push esi
push dword [ebp - 0x810]
push 0x4b151b3c
push 0x1a
jmp 0x4b15ba61
cmp eax, 2
jne 0x4b15ba38
mov ecx, dword [ebp - 0x814]
push 0x4b151b5c
call fcn.4b166e98
mov esi, eax
jmp 0x4b15ba81
test eax, eax
jle 0x4b15ba46
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
mov eax, dword [0x4b16c0b8]
cmp byte [eax + 0x19], 3
jb 0x4b15ba81
push esi
push dword [ebp - 0x810]
push 0x4b151b3c
push 0x1b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.4b1572cc
cmp dword [ebp - 0x808], 0
je 0x4b15ba81
push dword [ebp - 0x808]
call sub.MFC42u.dll_operatordelete
pop ecx
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
pop ebx
call fcn.4b163f8b
leave
ret 0x10