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

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
sub esp, 0x30
push ecx
push edi
lea edi, [esp + 8]
mov eax, 0xcccccccc
mov ecx, 0xc
rep stosd dword es:[edi], eax
pop edi
pop ecx
mov esi, dword [ebp + 8]
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x20], 0
call fcn.0052fe80
cmp al, 0
je 0x4e90ba
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp + 0xc]
call fcn.0040cf40
cmp dword [ebp - 0x14], 0
je 0x4e9050
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0xc]
shr edx, 1
jmp 0x4e9055
mov edx, 0
add edx, 1
lea edx, [edx + edx]
push edx
call fcn.0053b090
pop ecx
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x14], 0
je 0x4e9073
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0xc]
jmp 0x4e9078
mov eax, 0
add eax, 2
push eax
lea ecx, [ebp - 0x14]
call fcn.0040d280
push eax
push dword [ebp - 0x20]
call fcn.0040f400
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0
push dword [ebp - 0x20]
mov eax, dword [ebp - 0x38]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [ebp - 0x14], 0
je 0x4e90da
mov ecx, dword [ebp - 0x14]
call fcn.0040c8f0
jmp 0x4e90da
lea eax, [ebp - 0x10]
push eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0
mov ecx, dword [ebp + 0xc]
call fcn.0040d1c0
push eax
mov eax, dword [ebp - 0x38]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp dword [ebp - 0xc], 1
je 0x4e90ec
cmp dword [ebp - 0xc], 2
je 0x4e90ec
cmp dword [ebp - 0xc], 7
jne 0x4e90f2
cmp dword [ebp - 0x10], 0
jne 0x4e913d
cmp dword [ebp - 0x20], 0
je 0x4e9101
push dword [ebp - 0x20]
call fcn.0053b0a0
pop ecx
mov dword [esi], 0
push 0x576628
call fcn.0040e8d0
pop ecx
push eax
push 0x576628
mov ecx, esi
call fcn.0040cb20
cmp dword [esi], 0
je 0x4e912f
mov ebx, dword [esi]
mov edx, dword [0x5494f8]
mov dword [ebx + 0x10], edx
mov edx, esi
mov eax, dword [ebp + 8]
lea esp, [ebp - 8]
pop esi
pop ebx
pop ebp
ret 8
call fcn.0052fe80
cmp al, 0
je 0x4e9251
cmp dword [ebp - 0xc], 7
jne 0x4e9251
mov edx, dword [ebp - 0x10]
lea edx, [edx + edx]
push edx
call fcn.0053b090
pop ecx
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x24]
lea eax, [ebp - 0xc]
push eax
push 0
push dword [ebp - 0x20]
mov eax, dword [ebp - 0x38]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x28], eax
push dword [ebp - 0x20]
call fcn.0053b0a0
pop ecx
cmp dword [ebp - 0x28], 0
je 0x4e91b1
push 0
push str.ERROR_SUCCESS__err
push 0x19d
push str.Registry.cpp
push 4
push 0x83
call fcn.00495150
add esp, 0x18
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x10]
add eax, 0xfffffffe
push eax
push dword [ebp - 0x24]
lea ecx, [ebp - 0x18]
call fcn.0040cbb0
push dword [ebp - 0x24]
call fcn.0053b0a0
pop ecx
cmp dword [ebp - 0xc], 2
jne 0x4e922e
push 0
push 0
lea ecx, [ebp - 0x18]
call fcn.0040d280
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
add eax, 0xfffffffe
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x2c]
lea edx, [edx + edx]
push edx
call fcn.0053b090
pop ecx
mov dword [ebp - 0x24], eax
push dword [ebp - 0x2c]
push dword [ebp - 0x24]
lea ecx, [ebp - 0x18]
call fcn.0040d280
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [ebp - 0x2c]
push dword [ebp - 0x24]
lea ecx, [ebp - 0x18]
call fcn.0040cbb0
push dword [ebp - 0x24]
call fcn.0053b0a0
pop ecx
push esi
lea ecx, [ebp - 0x18]
call fcn.0040cda0
cmp dword [ebp - 0x18], 0
je 0x4e9245
mov ecx, dword [ebp - 0x18]
call fcn.0040c8f0
mov eax, dword [ebp + 8]
lea esp, [ebp - 8]
pop esi
pop ebx
pop ebp
ret 8
mov eax, dword [ebp - 0x10]
push eax
call fcn.0053b090
pop ecx
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x30]
lea eax, [ebp - 0xc]
push eax
push 0
mov ecx, dword [ebp + 0xc]
call fcn.0040d1c0
push eax
mov eax, dword [ebp - 0x38]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x10]
add eax, 0xffffffff
push eax
push dword [ebp - 0x30]
lea ecx, [ebp - 0x1c]
call fcn.0040cb20
push dword [ebp - 0x30]
call fcn.0053b0a0
pop ecx
cmp dword [ebp - 0xc], 2
jne 0x4e92f9
push 0
push 0
lea ecx, [ebp - 0x1c]
call fcn.0040d250
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
add eax, 0xffffffff
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
push eax
call fcn.0053b090
pop ecx
mov dword [ebp - 0x30], eax
push dword [ebp - 0x34]
push dword [ebp - 0x30]
lea ecx, [ebp - 0x1c]
call fcn.0040d250
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push dword [ebp - 0x34]
push dword [ebp - 0x30]
lea ecx, [ebp - 0x1c]
call fcn.0040cb20
push dword [ebp - 0x30]
call fcn.0053b0a0
pop ecx
call fcn.00514260
cmp dword [ebp - 0x1c], 0
je 0x4e930a
mov edx, dword [ebp - 0x1c]
mov dword [edx + 0x10], eax
mov edx, dword [ebp - 0x1c]
mov dword [esi], edx
cmp dword [esi], 0
je 0x4e9318
mov edx, dword [esi]
inc dword [edx]
cmp dword [ebp - 0x1c], 0
je 0x4e9326
mov ecx, dword [ebp - 0x1c]
call fcn.0040c8f0
mov eax, dword [ebp + 8]
lea esp, [ebp - 8]
pop esi
pop ebx
pop ebp
ret 8