Function at 0x1058c4e
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 [0x1072c48]
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 0x1058c8a
xor eax, eax
jmp 0x1058edd
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 0x1009434
mov ebx, 0x80000002
push ebx
call edi
test eax, eax
je 0x1058cd8
push esi
lea eax, [ebp - 0x418]
push eax
push esi
push 1
push esi
push esi
push esi
push 0x1009434
push ebx
mov dword [ebp - 0x428], esi
call edi
test eax, eax
je 0x1058cd8
xor eax, eax
jmp 0x1058edb
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, 0x1009f54
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 0x1058d5c
cmp eax, esi
jne 0x1058d6d
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.01035831
jmp 0x1058e95
cmp dword [ebp - 0x420], 1
jne 0x1058d6d
cmp eax, esi
je 0x1058e90
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x420]
push eax
push esi
push 0x1009f3c
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 0x1058db3
cmp eax, esi
je 0x1058e18
mov edi, 0x104
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.010643af
test eax, eax
jne 0x1058e0c
lea eax, [ebp - 0x20c]
push eax
call fcn.01055e5e
push edi
lea eax, [ebp - 0x414]
push eax
push 0x26fd
push dword [0x1073960]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x1058e0c
lea eax, [ebp - 0x414]
push eax
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.010358a6
mov dword [ebp - 0x41c], esi
cmp dword [ebp - 0x41c], esi
jne 0x1058ec4
cmp dword [ebp - 0x428], esi
je 0x1058e88
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x1058e29
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 0x1058e5e
sub eax, ecx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push esi
push 0x1009f08
push dword [ebp - 0x418]
call edi
cmp dword [ebp - 0x41c], esi
jne 0x1058ec4
mov edi, 0x104
xor eax, eax
mov word [ebp - 6], ax
cmp dword [ebp + 0xc], esi
jne 0x1058eaf
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.01035831
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.01047480
leave
ret 0xc