Function at 0x1058c2d
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 0x1058c69
xor eax, eax
jmp 0x1058ebc
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 0x1058cb7
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 0x1058cb7
xor eax, eax
jmp 0x1058eba
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 0x1058d3b
cmp eax, esi
jne 0x1058d4c
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.01035811
jmp 0x1058e74
cmp dword [ebp - 0x420], 1
jne 0x1058d4c
cmp eax, esi
je 0x1058e6f
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 0x1058d92
cmp eax, esi
je 0x1058df7
mov edi, 0x104
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.01064391
test eax, eax
jne 0x1058deb
lea eax, [ebp - 0x20c]
push eax
call fcn.01055e3d
push edi
lea eax, [ebp - 0x414]
push eax
push 0x26fd
push dword [0x1073960]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x1058deb
lea eax, [ebp - 0x414]
push eax
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.01035886
mov dword [ebp - 0x41c], esi
cmp dword [ebp - 0x41c], esi
jne 0x1058ea3
cmp dword [ebp - 0x428], esi
je 0x1058e67
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x1058e08
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 0x1058e3d
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 0x1058ea3
mov edi, 0x104
xor eax, eax
mov word [ebp - 6], ax
cmp dword [ebp + 0xc], esi
jne 0x1058e8e
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.01035811
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.01047464
leave
ret 0xc