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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbd0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x430], ebx
mov dword [ebp - 0x42c], 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.00405268
mov eax, dword [ebp - 8]
call fcn.00405268
xor eax, eax
push ebp
push 0x4b5fe4
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, ebx
call fcn.00404dac
call fcn.004b5c2c
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x4b5fa7
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, esi
mov eax, dword [ebp - 0x18]
call fcn.00462570
xor ecx, ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
call fcn.004625d8
test al, al
je 0x4b5f91
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00462d3c
test al, al
je 0x4b5f91
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 0x10]
push eax
push 0
mov eax, dword [ebp - 8]
call fcn.00405278
push eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 4]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
mov eax, dword [ebp - 0x10]
dec eax
je 0x4b5d2a
dec eax
je 0x4b5d3c
add eax, 0xfffffffe
sub eax, 2
jb 0x4b5dba
dec eax
je 0x4b5dd1
jmp 0x4b5e3d
mov ecx, ebx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00462b34
jmp 0x4b5f89
mov ecx, ebx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00462b34
mov eax, dword [ebp - 0xc]
test eax, eax
jns 0x4b5d55
call fcn.00403e38
push eax
push 0
mov eax, dword [ebx]
call fcn.00405278
push eax
call sub.kernel32.dll_ExpandEnvironmentStringsA
test eax, eax
jns 0x4b5d6e
call fcn.00403e38
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x4b5f89
mov eax, dword [ebp - 0xc]
test eax, eax
jns 0x4b5d87
call fcn.00403e38
push eax
lea eax, [ebp - 0x419]
push eax
mov eax, dword [ebx]
call fcn.00405278
push eax
call sub.kernel32.dll_ExpandEnvironmentStringsA
test eax, eax
jns 0x4b5da5
call fcn.00403e38
mov dword [ebp - 0xc], eax
mov eax, ebx
lea edx, [ebp - 0x419]
call fcn.00404f9c
jmp 0x4b5f89
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00462bc0
mov edx, ebx
call fcn.0040b168
jmp 0x4b5f89
mov eax, ebx
call fcn.00404dac
cmp dword [ebp - 0xc], 0xffffffff
jle 0x4b5f89
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [ebp - 0x419]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00462bfc
mov dl, 1
mov eax, dword [0x4190f0]
call fcn.00403ec8
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0xc]
test ecx, ecx
jns 0x4b5e16
call fcn.00403e38
lea eax, [ebp - 0x419]
mov edx, 0x400
call fcn.004b60b8
mov edx, ebx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [ebp - 0x14]
call fcn.00403ef8
jmp 0x4b5f89
mov eax, ebx
call fcn.00404dac
cmp dword [ebp - 0xc], 0xffffffff
jle 0x4b5f89
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [ebp - 0x419]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.00462bfc
cmp byte [ebp + 0xc], 0
je 0x4b5f20
xor esi, esi
cmp esi, 0x400
jbe 0x4b5e7c
call fcn.00403e38
cmp byte [ebp + esi - 0x419], 0
je 0x4b5ed1
lea eax, [ebp - 0x420]
push eax
cmp esi, 0x400
jbe 0x4b5e9a
call fcn.00403e38
xor eax, eax
mov al, byte [ebp + esi - 0x419]
mov dword [ebp - 0x428], eax
mov byte [ebp - 0x424], 0
lea edx, [ebp - 0x428]
xor ecx, ecx
mov eax, 0x4b5ffc
call fcn.0040bfcc
mov edx, dword [ebp - 0x420]
mov eax, ebx
call fcn.00405088
jmp 0x4b5f0b
lea eax, [ebp - 0x42c]
push eax
mov eax, dword [ebx]
call fcn.00405080
mov edx, eax
mov eax, dword [ebx]
mov ecx, 1
call fcn.004052d8
mov eax, dword [ebp - 0x42c]
mov edx, 0x4b600c
call fcn.004051c4
je 0x4b5f0b
mov eax, ebx
mov edx, 0x4b6018
call fcn.00405088
mov eax, dword [ebx]
call fcn.00405080
mov edx, eax
sub edx, 2
mov eax, ebx
call fcn.00405404
jmp 0x4b5f89
mov edi, dword [ebp - 0xc]
dec edi
test edi, edi
jl 0x4b5f78
inc edi
xor esi, esi
lea eax, [ebp - 0x430]
push eax
cmp esi, 0x400
jbe 0x4b5f3f
call fcn.00403e38
xor eax, eax
mov al, byte [ebp + esi - 0x419]
mov dword [ebp - 0x428], eax
mov byte [ebp - 0x424], 0
lea edx, [ebp - 0x428]
xor ecx, ecx
mov eax, 0x4b6024
call fcn.0040bfcc
mov edx, dword [ebp - 0x430]
mov eax, ebx
call fcn.00405088
inc esi
dec edi
jne 0x4b5f2b
mov eax, dword [ebx]
call fcn.00405080
mov edx, eax
dec edx
mov eax, ebx
call fcn.00405404
mov eax, dword [ebp - 0x18]
call fcn.00462540
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4b5fae
mov eax, dword [ebp - 0x18]
call fcn.00403ef8
ret