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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x460
mov eax, dword [0x5c5040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x440], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x43c], eax
xor eax, eax
push 7
pop ecx
lea edi, [ebp - 0x45c]
mov dword [ebp - 0x460], 0x20
rep stosd dword es:[edi], eax
xor edi, edi
lea eax, [ebp - 0x41c]
mov dword [ebp - 0x438], eax
xor eax, eax
mov dword [ebx], edi
mov word [ebp - 0x41c], ax
mov word [ebp - 0x210], ax
mov eax, dword [esi + 4]
mov dword [ebp - 0x420], ebx
mov dword [ebp - 0x424], edi
mov dword [ebp - 0x42c], edi
mov dword [ebp - 0x428], edi
cmp eax, edi
jne 0x5c3059
lea eax, [ebp - 0x42c]
push eax
push dword [esi]
call fcn.005c11ad
cmp eax, edi
jne 0x5c307b
push 0x20a
push edi
call fcn.005c19e4
mov edi, eax
mov dword [ebp - 0x428], edi
test edi, edi
je 0x5c341a
mov ebx, dword [sym.imp.KERNEL32.dll_RegQueryValueExW]
xor eax, eax
mov word [edi], ax
lea eax, [ebp - 0x434]
push eax
push edi
lea eax, [ebp - 0x430]
push eax
push 0
push 0x5c1950
push dword [ebp - 0x42c]
mov dword [ebp - 0x434], 0x20a
call ebx
test eax, eax
jne 0x5c3425
push 2
pop eax
cmp dword [ebp - 0x430], eax
jne 0x5c3425
cmp word [edi], 0
je 0x5c3425
push 0x104
lea eax, [ebp - 0x41c]
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
call edi
lea eax, [ebp - 0x41c]
push eax
call fcn.005c1aa9
lea eax, [ebp - 0x434]
push eax
push dword [ebp - 0x428]
lea eax, [ebp - 0x430]
push eax
push 0
push 0x5c1930
push dword [ebp - 0x42c]
mov dword [ebp - 0x434], 0x20a
call ebx
test eax, eax
je 0x5c3430
cmp eax, 1
jle 0x5c3425
cmp eax, 3
jg 0x5c3425
push dword [ebp - 0x428]
xor eax, eax
mov word [ebp - 0x210], ax
call fcn.005c1299
and dword [ebp - 0x428], 0
push esi
push dword [ebp - 0x438]
lea eax, [ebp - 0x210]
push eax
call fcn.005c1a3f
test eax, eax
jne 0x5c1855
cmp word [ebp - 0x210], ax
jne 0x5c34af
push dword [ebp - 0x420]
lea eax, [ebp - 0x210]
push esi
push dword [ebp - 0x438]
push eax
call fcn.005c1aed
test eax, eax
je 0x5c18af
mov ecx, dword [ebp - 0x424]
and dword [ebp - 0x424], 0
mov dword [eax + 0x14], ecx
mov dword [esi + 4], eax
lea eax, [esi + 8]
push eax
push 1
push 0x5c1918
push dword [ebp - 0x42c]
call fcn.005c1b9d
mov ebx, dword [ebp - 0x420]
cmp dword [esi + 4], 0
je 0x5c18af
mov eax, dword [esi + 8]
test eax, eax
jne 0x5c1886
mov eax, 0x5c190c
push ebx
push eax
push dword [esi + 4]
call fcn.005c196b
mov ecx, dword [ebp - 0x440]
push 0
push 0x5c18f0
mov dword [ecx], eax
push dword [esi + 4]
call fcn.005c196b
mov ecx, dword [ebp - 0x43c]
mov dword [ecx], eax
xor esi, esi
cmp dword [ebp - 0x42c], esi
je 0x5c18c5
push dword [ebp - 0x42c]
call dword [sym.imp.KERNEL32.dll_RegCloseKey]
cmp dword [ebp - 0x428], esi
jne 0x5c3537
cmp dword [ebp - 0x424], esi
pop edi
pop esi
pop ebx
jne 0x5c3547
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005c19d2
leave
ret 0x10
cmp dword [eax + 8], edi
jne 0x5c187a
mov eax, dword [eax + 0x10]
cmp eax, edi
je 0x5c187a
cmp word [eax], di
je 0x5c187a
jmp 0x5c34e2
mov dword [ebx], eax
jmp 0x5c1874
mov dword [ebx], 8
jmp 0x5c18af
mov ecx, dword [ebp - 0x420]
jmp 0x5c18ad
push 2
pop eax
cmp dword [ebp - 0x430], eax
jne 0x5c3425
mov ebx, dword [ebp - 0x428]
cmp word [ebx], 0
je 0x5c3425
push 0x104
lea eax, [ebp - 0x210]
push eax
push ebx
call edi
push ebx
call fcn.005c1299
and dword [ebp - 0x428], 0
lea eax, [ebp - 0x210]
push eax
call fcn.005c1aa9
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
jmp 0x5c3493
movzx ecx, word [ebp + eax*2 - 0x41e]
dec eax
cmp cx, 0x5c
je 0x5c349d
cmp cx, 0x2f
je 0x5c349d
test eax, eax
je 0x5c1804
jmp 0x5c347e
lea eax, [ebp + eax*2 - 0x41a]
mov dword [ebp - 0x438], eax
jmp 0x5c1804
lea eax, [ebp - 0x210]
mov dword [ebp - 0x458], eax
lea eax, [ebp - 0x460]
push eax
call dword [sym.imp.KERNEL32.dll_CreateActCtxW]
mov dword [ebp - 0x424], eax
cmp eax, 0xffffffff
jne 0x5c1828
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x5c3425
mov dword [ebp - 0x458], eax
lea eax, [ebp - 0x460]
push eax
call dword [sym.imp.KERNEL32.dll_CreateActCtxW]
mov edi, eax
mov dword [ebp - 0x424], edi
cmp edi, 0xffffffff
jne 0x5c350f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx], eax
jmp 0x5c18af
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x5c3525
cmp eax, 0xffffffff
je 0x5c3525
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseActCtx]
mov eax, dword [esi + 4]
and dword [ebp - 0x424], 0
mov dword [eax + 0x14], edi
jmp 0x5c187a
push dword [ebp - 0x428]
call fcn.005c1299
jmp 0x5c18d1
cmp dword [ebp - 0x424], 0xffffffff
je 0x5c18e0
push dword [ebp - 0x424]
call dword [sym.imp.KERNEL32.dll_ReleaseActCtx]
jmp 0x5c18e0