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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbcc
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x434], ebx
mov dword [ebp - 0x430], ebx
mov dword [ebp - 0x420], ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov esi, eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.00407c84
mov eax, dword [ebp - 8]
call fcn.00407c84
xor eax, eax
push ebp
push 0x5b6dc8
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, ebx
xor edx, edx
call fcn.00407c9c
call fcn.005b69d8
mov dword [ebp - 0x18], eax
xor edx, edx
push ebp
push 0x5b6d8b
push dword fs:[edx]
mov dword fs:[edx], esp
mov edx, esi
mov eax, dword [ebp - 0x18]
call fcn.0044fdec
xor ecx, ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
call fcn.0044ff34
test al, al
je 0x5b6d75
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00450eec
test al, al
je 0x5b6d75
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 0x10]
push eax
push 0
mov eax, dword [ebp - 8]
call fcn.00407d28
push eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 4]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
mov eax, dword [ebp - 0x10]
dec eax
je 0x5b6adc
dec eax
je 0x5b6aee
add eax, 0xfffffffe
sub eax, 2
jb 0x5b6b6c
dec eax
je 0x5b6b83
jmp 0x5b6bf1
mov ecx, ebx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00450964
jmp 0x5b6d6d
mov ecx, ebx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00450964
mov eax, dword [ebp - 0xc]
test eax, eax
jns 0x5b6b07
call fcn.00405714
push eax
push 0
mov eax, dword [ebx]
call fcn.00407d28
push eax
call sub.kernel32.dll_ExpandEnvironmentStringsW
test eax, eax
jns 0x5b6b20
call fcn.00405714
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x5b6d6d
mov eax, dword [ebp - 0xc]
test eax, eax
jns 0x5b6b39
call fcn.00405714
push eax
lea eax, [ebp - 0x419]
push eax
mov eax, dword [ebx]
call fcn.00407d28
push eax
call sub.kernel32.dll_ExpandEnvironmentStringsW
test eax, eax
jns 0x5b6b57
call fcn.00405714
mov dword [ebp - 0xc], eax
mov eax, ebx
lea edx, [ebp - 0x419]
call fcn.00407e58
jmp 0x5b6d6d
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00450be4
mov edx, ebx
call fcn.004161e4
jmp 0x5b6d6d
mov eax, ebx
xor edx, edx
call fcn.00407c9c
cmp dword [ebp - 0xc], 0xffffffff
jle 0x5b6d6d
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [ebp - 0x419]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00450d74
mov dl, 1
mov eax, dword [0x4321b4]
call fcn.0043e78c
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0xc]
test ecx, ecx
jns 0x5b6bca
call fcn.00405714
lea eax, [ebp - 0x419]
mov edx, 0x400
call fcn.005b6ebc
mov edx, ebx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [ebp - 0x14]
call fcn.00405854
jmp 0x5b6d6d
mov eax, ebx
xor edx, edx
call fcn.00407c9c
cmp dword [ebp - 0xc], 0xffffffff
jle 0x5b6d6d
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [ebp - 0x419]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00450d74
cmp byte [ebp + 0xc], 0
je 0x5b6cf5
xor esi, esi
cmp esi, 0x400
jbe 0x5b6c32
call fcn.00405714
cmp byte [ebp + esi - 0x419], 0
je 0x5b6c86
lea eax, [ebp - 0x420]
push eax
cmp esi, 0x400
jbe 0x5b6c50
call fcn.00405714
movzx eax, byte [ebp + esi - 0x419]
mov dword [ebp - 0x428], eax
mov byte [ebp - 0x424], 0
lea edx, [ebp - 0x428]
xor ecx, ecx
mov eax, 0x5b6de4
call fcn.00417aac
mov edx, dword [ebp - 0x420]
mov eax, ebx
call fcn.004080c0
jmp 0x5b6cd0
mov eax, dword [ebx]
mov dword [ebp - 0x42c], eax
mov esi, dword [ebp - 0x42c]
test esi, esi
je 0x5b6c9d
sub esi, 4
mov esi, dword [esi]
lea eax, [ebp - 0x430]
push eax
mov eax, dword [ebx]
mov ecx, 1
mov edx, esi
call fcn.004083ec
mov eax, dword [ebp - 0x430]
mov edx, 0x5b6dfc
call fcn.00408384
je 0x5b6cd0
mov eax, ebx
mov edx, 0x5b6e0c
call fcn.004080c0
mov eax, dword [ebx]
mov dword [ebp - 0x42c], eax
mov eax, dword [ebp - 0x42c]
test eax, eax
je 0x5b6ce7
sub eax, 4
mov eax, dword [eax]
mov edx, eax
sub edx, 2
mov eax, ebx
call fcn.00408028
jmp 0x5b6d6d
mov edi, dword [ebp - 0xc]
dec edi
test edi, edi
jl 0x5b6d4c
inc edi
xor esi, esi
lea eax, [ebp - 0x434]
push eax
cmp esi, 0x400
jbe 0x5b6d14
call fcn.00405714
movzx eax, byte [ebp + esi - 0x419]
mov dword [ebp - 0x428], eax
mov byte [ebp - 0x424], 0
lea edx, [ebp - 0x428]
xor ecx, ecx
mov eax, 0x5b6e20
call fcn.00417aac
mov edx, dword [ebp - 0x434]
mov eax, ebx
call fcn.004080c0
inc esi
dec edi
jne 0x5b6d00
mov eax, dword [ebx]
mov dword [ebp - 0x42c], eax
mov eax, dword [ebp - 0x42c]
test eax, eax
je 0x5b6d63
sub eax, 4
mov eax, dword [eax]
mov edx, eax
dec edx
mov eax, ebx
call fcn.00408028
mov eax, dword [ebp - 0x18]
call fcn.0044fdbc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5b6d92
mov eax, dword [ebp - 0x18]
call fcn.00405854
ret