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

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 2
add esp, 0xfffff004
push eax
dec eax
jne 0x4c404d
mov eax, dword [ebp - 4]
add esp, 0xffffffd8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x202c], ebx
mov dword [ebp - 0x201c], ebx
mov esi, ecx
mov dword [ebp - 4], edx
mov edi, eax
mov ebx, dword [ebp + 8]
xor eax, eax
push ebp
push 0x4c435c
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, ebx
xor edx, edx
call fcn.00406a7c
mov eax, 0x80000002
call fcn.004c400c
mov dword [ebp - 0x14], eax
xor edx, edx
push ebp
push 0x4c4331
push dword fs:[edx]
mov dword fs:[edx], esp
mov edx, edi
mov eax, dword [ebp - 0x14]
call fcn.00448bf8
xor ecx, ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
call fcn.00448d40
test al, al
je 0x4c431b
mov edx, esi
mov eax, dword [ebp - 0x14]
call fcn.00449cf8
test al, al
je 0x4c431b
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 0x10]
push eax
push 0
mov eax, esi
call fcn.00406b08
mov edi, eax
push edi
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 4]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
mov eax, dword [ebp - 0x10]
dec eax
je 0x4c4116
dec eax
je 0x4c4127
add eax, 0xfffffffe
sub eax, 2
jb 0x4c416a
dec eax
je 0x4c4180
jmp 0x4c4200
mov ecx, ebx
mov edx, esi
mov eax, dword [ebp - 0x14]
call fcn.00449770
jmp 0x4c4313
mov ecx, ebx
mov edx, esi
mov eax, dword [ebp - 0x14]
call fcn.00449770
mov eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x2016]
push eax
mov eax, dword [ebx]
call fcn.00406b08
push eax
call sub.kernel32.dll_ExpandEnvironmentStringsW
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x4c4313
mov eax, ebx
lea edx, [ebp - 0x2016]
call fcn.00406c38
jmp 0x4c4313
mov edx, esi
mov eax, dword [ebp - 0x14]
call fcn.004499f0
mov edx, ebx
call fcn.00412d9c
jmp 0x4c4313
mov eax, ebx
xor edx, edx
call fcn.00406a7c
cmp dword [ebp - 0xc], 0xffffffff
jle 0x4c4313
mov eax, dword [ebp - 0xc]
call fcn.004041d4
mov dword [ebp - 8], eax
xor edx, edx
push ebp
push 0x4c41f9
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
push 0
push 0
push edi
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 4]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
mov eax, ebx
mov edx, dword [ebp - 0xc]
call fcn.00406df0
mov eax, ebx
call fcn.00407480
mov ecx, dword [ebp - 0xc]
mov edx, eax
mov eax, dword [ebp - 8]
call fcn.004043a4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c4313
mov eax, dword [ebp - 8]
call fcn.00404208
ret
mov eax, ebx
xor edx, edx
call fcn.00406a7c
cmp dword [ebp - 0xc], 0xffffffff
jle 0x4c4313
mov eax, dword [ebp - 0xc]
call fcn.004041d4
mov dword [ebp - 8], eax
xor edx, edx
push ebp
push 0x4c430c
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 8]
mov edx, esi
mov eax, dword [ebp - 0x14]
call fcn.00449b80
cmp byte [ebp + 0xc], 0
je 0x4c42af
mov esi, dword [ebp - 0xc]
dec esi
test esi, esi
jl 0x4c428c
inc esi
xor edi, edi
lea eax, [ebp - 0x201c]
push eax
mov eax, dword [ebp - 8]
movzx eax, byte [eax + edi]
mov dword [ebp - 0x2024], eax
mov byte [ebp - 0x2020], 0
lea edx, [ebp - 0x2024]
xor ecx, ecx
mov eax, 0x4c4378
call fcn.00413f6c
mov edx, dword [ebp - 0x201c]
mov eax, ebx
call fcn.00406e88
inc edi
dec esi
jne 0x4c424e
mov eax, dword [ebx]
mov dword [ebp - 0x2028], eax
mov eax, dword [ebp - 0x2028]
test eax, eax
je 0x4c42a3
sub eax, 4
mov eax, dword [eax]
mov edx, eax
dec edx
mov eax, ebx
call fcn.00406df0
jmp 0x4c42f6
mov esi, dword [ebp - 0xc]
dec esi
test esi, esi
jl 0x4c42f6
inc esi
xor edi, edi
mov eax, dword [ebp - 8]
movzx eax, byte [eax + edi]
sub al, 0x20
jae 0x4c42d3
mov eax, ebx
mov edx, 0x4c4394
call fcn.00406e88
jmp 0x4c42f2
lea eax, [ebp - 0x202c]
mov edx, dword [ebp - 8]
movzx edx, byte [edx + edi]
call fcn.00406be8
mov edx, dword [ebp - 0x202c]
mov eax, ebx
call fcn.00406e88
inc edi
dec esi
jne 0x4c42ba
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c4313
mov eax, dword [ebp - 8]
call fcn.00404208
ret
mov eax, dword [ebp - 0x14]
call fcn.00448bc8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c4338
mov eax, dword [ebp - 0x14]
call fcn.00404df0
ret