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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push edi
xor edi, edi
mov dword [ebp - 8], edi
cmp dword [0x1006164], edi
jne 0x1001e90
mov eax, 0x208
push eax
push 0x40
mov dword [0x1006168], eax
call esi
mov dword [0x1006164], eax
cmp eax, edi
jne 0x1001e90
mov dword [0x1006168], edi
mov eax, dword [section..data]
cmp eax, section..data
je 0x1001e89
test byte [eax + 0x1c], 4
je 0x1001e89
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [section..data]
push 0x1001250
push 0x29
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001915
xor eax, eax
jmp 0x10020a7
push ebx
lea eax, [ebp - 4]
push eax
push edi
lea eax, [ebp - 0xc]
push eax
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, 0x100127c
push ebx
push dword [ebp + 8]
call edi
test eax, eax
jne 0x1002087
mov eax, dword [ebp - 4]
cmp eax, dword [0x1006168]
jbe 0x1001f25
mov eax, dword [0x1006164]
test eax, eax
je 0x1001ecf
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 4]
add eax, 2
push eax
push 0x40
mov dword [0x1006168], eax
call esi
mov dword [0x1006164], eax
test eax, eax
jne 0x1001f25
and dword [0x1006168], eax
mov eax, dword [section..data]
cmp eax, section..data
je 0x1001f1e
test byte [eax + 0x1c], 4
je 0x1001f1e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [section..data]
push 0x1001250
push 0x2a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001915
xor eax, eax
jmp 0x10020a6
mov eax, dword [0x1006168]
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push dword [0x1006164]
lea eax, [ebp - 0xc]
push eax
push 0
push ebx
push dword [ebp + 8]
call edi
mov ecx, dword [0x1006168]
mov edi, dword [0x1006164]
shr ecx, 1
xor edx, edx
mov word [edi + ecx*2 - 2], dx
xor ecx, ecx
cmp eax, ecx
jne 0x1002087
mov eax, dword [0x1006164]
cmp word [eax], cx
je 0x10020a3
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push ecx
push ecx
push eax
call edi
mov ebx, eax
test ebx, ebx
jne 0x1001fbe
mov eax, dword [section..data]
cmp eax, section..data
je 0x1002087
test byte [eax + 0x1c], 4
je 0x1002087
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1001250
push 0x2b
mov eax, dword [section..data]
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001915
jmp 0x1002087
lea eax, [ebx + ebx]
push eax
push 0x40
call esi
mov esi, eax
test esi, esi
je 0x1002051
push ebx
push esi
push dword [0x1006164]
call edi
test eax, eax
jne 0x1002008
mov eax, dword [section..data]
cmp eax, section..data
je 0x1002087
test byte [eax + 0x1c], 4
je 0x1002087
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1001250
push 0x2c
jmp 0x1001fa9
lea edi, [eax + eax]
mov eax, dword [0x1006168]
cmp edi, eax
jbe 0x100202e
push dword [0x1006164]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x1006164], esi
mov dword [0x1006168], edi
jmp 0x10020a3
push esi
shr eax, 1
push eax
push dword [0x1006164]
call fcn.01001cf3
test eax, eax
jge 0x1002048
mov dword [ebp - 8], 1
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1002081
mov eax, dword [section..data]
cmp eax, section..data
je 0x10020a3
test byte [eax + 0x1c], 4
je 0x10020a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [section..data]
push 0x1001250
push 0x2d
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001915
cmp dword [ebp - 8], 0
je 0x10020a3
mov eax, dword [0x1006168]
shr eax, 1
push eax
push dword [0x1006164]
push 9
push dword [0x10060e0]
call dword [sym.imp.USER32.dll_LoadStringW]
xor eax, eax
inc eax
pop ebx
pop edi
pop esi
leave
ret 4