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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [0x103f058]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
xor esi, esi
mov dword [ebp - 0x42c], eax
mov dword [ebp - 0x418], esi
mov dword [ebp - 0x428], 1
cmp eax, esi
jne 0x10302df
xor eax, eax
jmp 0x1030532
push ebx
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push esi
lea eax, [ebp - 0x418]
push eax
push esi
push 3
push esi
push esi
push esi
push 0x1002288
mov ebx, 0x80000002
push ebx
call edi
test eax, eax
je 0x103032d
push esi
lea eax, [ebp - 0x418]
push eax
push esi
push 1
push esi
push esi
push esi
push 0x1002288
push ebx
mov dword [ebp - 0x428], esi
call edi
test eax, eax
je 0x103032d
xor eax, eax
jmp 0x1030530
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x420]
push eax
push esi
mov ebx, 0x10059a8
push ebx
push dword [ebp - 0x418]
mov dword [ebp - 0x424], 0x208
mov dword [ebp - 0x420], 1
call edi
cmp dword [ebp - 0x420], 2
mov dword [ebp - 0x41c], eax
jne 0x10303b1
cmp eax, esi
jne 0x10303c2
mov edi, 0x104
push edi
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x414]
push eax
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.01027e68
jmp 0x10304ea
cmp dword [ebp - 0x420], 1
jne 0x10303c2
cmp eax, esi
je 0x10304e5
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x420]
push eax
push esi
push 0x1005990
push dword [ebp - 0x418]
mov dword [ebp - 0x424], 0x208
call edi
xor ecx, ecx
cmp dword [ebp - 0x420], 1
mov dword [ebp - 0x41c], eax
mov word [ebp - 6], cx
jne 0x1030408
cmp eax, esi
je 0x103046d
mov edi, 0x104
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.0103bb43
test eax, eax
jne 0x1030461
lea eax, [ebp - 0x20c]
push eax
call fcn.0102e61a
push edi
lea eax, [ebp - 0x414]
push eax
push 0x26fd
push dword [0x10405b0]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x1030461
lea eax, [ebp - 0x414]
push eax
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.01027edd
mov dword [ebp - 0x41c], esi
cmp dword [ebp - 0x41c], esi
jne 0x1030519
cmp dword [ebp - 0x428], esi
je 0x10304dd
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x103047e
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push esi
push ebx
push dword [ebp - 0x418]
call edi
lea eax, [ebp - 0x20c]
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, si
jne 0x10304b3
sub eax, ecx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push esi
push 0x100595c
push dword [ebp - 0x418]
call edi
cmp dword [ebp - 0x41c], esi
jne 0x1030519
mov edi, 0x104
xor eax, eax
mov word [ebp - 6], ax
cmp dword [ebp + 0xc], esi
jne 0x1030504
push edi
lea eax, [ebp - 0x20c]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 0x10]
push dword [ebp - 0x42c]
call fcn.01027e68
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
cmp dword [ebp - 0x41c], esi
sete al
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0102df7d
leave
ret 0xc