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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 0x1c]
push edi
xor edi, edi
mov ebx, edi
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], edi
cmp dword [ebp + 0x18], ebx
je 0x1005f4d6
test esi, esi
jne 0x1005f4d1
push 0x57
pop eax
jmp 0x1005f6a6
mov eax, dword [esi]
mov dword [ebp - 0x10], eax
cmp dword [ebp + 0x20], ebx
jne 0x1005f513
push 0x33
call fcn.10010082
pop ecx
test eax, eax
je 0x1005f4fb
lea ecx, [ebp - 4]
push ecx
push 0x20019
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x1005f52f
lea eax, [ebp - 4]
push eax
push 0x20019
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
jmp 0x1005f52f
lea eax, [ebp - 4]
push eax
push 0x20119
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.1010e24e
mov ecx, eax
call fcn.1010d1af
mov edi, eax
test edi, edi
jne 0x1005f6a4
mov edi, dword [ebp - 4]
push 0x43
call fcn.10010082
pop ecx
push esi
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push 0
push dword [ebp + 0x10]
push edi
test eax, eax
je 0x1005f559
call eax
jmp 0x1005f55f
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test edi, edi
je 0x1005f572
push dword [ebp - 4]
call fcn.10017c01
jmp 0x1005f6a4
test esi, esi
je 0x1005f61c
mov eax, dword [esi]
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x1005f58e
mov eax, ecx
mov dword [ebp - 0xc], ecx
lea edi, [eax + 2]
push edi
mov dword [ebp + 0xc], edi
call fcn.1012b7a9
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x1005f5a9
or eax, 0xffffffff
jmp 0x1005f6a6
push edi
call fcn.1012b7a9
mov edi, eax
mov dword [ebp - 8], edi
pop ecx
test edi, edi
jne 0x1005f5c2
push ebx
call fcn.1012b7b2
pop ecx
jmp 0x1005f5a1
push dword [ebp + 0xc]
push 0
push ebx
call fcn.1012db70
push dword [ebp + 0xc]
push 0
push edi
call fcn.1012db70
mov edi, dword [ebp - 4]
push 0x43
call fcn.10010082
add esp, 0x1c
push esi
push ebx
push dword [ebp + 0x14]
push 0
push dword [ebp + 0x10]
push edi
test eax, eax
je 0x1005f5f8
call eax
jmp 0x1005f5fe
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test edi, edi
je 0x1005f60e
push dword [ebp - 4]
call fcn.10017c01
jmp 0x1005f68b
push dword [esi]
push ebx
push dword [ebp - 8]
call fcn.1012d5f0
add esp, 0xc
push dword [ebp - 4]
call fcn.10017c01
mov edi, eax
test edi, edi
jne 0x1005f68b
mov eax, dword [ebp + 0x14]
cmp dword [eax], 2
jne 0x1005f676
test esi, esi
je 0x1005f676
mov eax, dword [ebp - 0xc]
inc eax
shr eax, 1
push eax
push dword [ebp - 8]
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edx, eax
mov eax, dword [ebp - 0xc]
lea ecx, [edx + edx]
cmp eax, ecx
jae 0x1005f661
mov dword [esi], ecx
cmp dword [ebp + 0x18], edi
je 0x1005f68b
mov edi, 0xea
jmp 0x1005f68b
cmp dword [ebp - 0x10], 0
jne 0x1005f66b
mov dword [esi], eax
jmp 0x1005f676
cmp dword [ebp - 0x14], ecx
je 0x1005f676
test edx, edx
je 0x1005f676
mov dword [esi], ecx
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x1005f68b
push dword [esi]
push dword [ebp - 8]
push eax
call fcn.1012d5f0
add esp, 0xc
test ebx, ebx
je 0x1005f696
push ebx
call fcn.1012b7b2
pop ecx
mov eax, dword [ebp - 8]
test eax, eax
je 0x1005f6a4
push eax
call fcn.1012b7b2
pop ecx
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0x1c