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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52072c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ecx
push 0
call fcn.00462ed8
movzx eax, al
test eax, eax
je 0x462d3c
mov edx, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x24], eax
test edx, edx
mov dword [ebp - 0x28], eax
je 0x462ccd
mov eax, dword [ebp + 8]
movsx edx, byte [eax]
test edx, edx
jne 0x462cd4
mov eax, 1
jmp 0x462cd6
xor eax, eax
mov esi, dword [ebp - 0x14]
lea ecx, [ebp - 0x24]
lea edx, [ebp - 0x28]
push edx
xor ebx, ebx
push ebx
push ecx
test eax, eax
mov eax, dword [ebp + 8]
push ebx
je 0x462cf1
mov eax, 0
push eax
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, esi
mov dword [edx + 0x10], eax
test eax, eax
jne 0x462d3c
mov eax, dword [ebp - 0x28]
test eax, eax
jne 0x462d91
mov ecx, dword [ebp + 0xc]
push 0
call fcn.0042fc90
mov eax, esi
mov edx, dword [eax + 0x10]
test edx, edx
jne 0x462d3c
mov esi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x18]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc
call fcn.0043aa20
test eax, eax
je 0x462d8a
push 0
push str.Cant_read_value_of__s
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 8]
mov ebx, eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
push eax
push edx
call fcn.00463a38
push eax
mov eax, dword [ebp - 0x14]
push ebx
push dword [eax + 0x10]
call fcn.0043f61c
add esp, 0x14
mov esi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x18]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc
mov ebx, str.Cant_read_value_of__s
jmp 0x462d55
mov edx, dword [ebp + 8]
test edx, edx
je 0x462da2
mov edx, dword [ebp + 8]
movsx ecx, byte [edx]
test ecx, ecx
jne 0x462da9
mov edx, 1
jmp 0x462dab
xor edx, edx
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x30], 0
test edx, edx
mov edx, dword [ebp + 8]
mov dword [ebp - 0x34], ebx
push eax
je 0x462dc8
mov edx, 0
mov dword [ebp - 0x2c], edx
call fcn.0042f7f0
mov dword [ebp - 0x30], eax
mov dword [ebp - 4], 0
mov ebx, esi
lea ecx, [ebp - 0x24]
lea edx, [ebp - 0x28]
push edx
push eax
mov eax, dword [ebp - 0x2c]
push ecx
push 0
push eax
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, ebx
mov dword [edx + 0x10], eax
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x34]
call fcn.0042f7a8
mov eax, dword [ebp - 0x24]
cmp eax, 2
jne 0x462d18
movzx eax, byte [ebp + 0x10]
test eax, eax
jne 0x462d18
mov edx, dword [ebp + 0xc]
xor eax, eax
push eax
push eax
push dword [edx]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x462d18
mov eax, dword [0x55d358]
mov dword [ebp - 0x40], eax
mov dword [ebp - 4], 1
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp - 0x2c]
mov edx, dword [eax]
mov dword [ebp - 0x3c], edx
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], 0
push ebx
call fcn.0042f7f0
mov dword [ebp - 0x44], eax
mov dword [ebp - 4], 2
mov edx, ebx
push edx
push eax
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x48]
call fcn.0042f7a8
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x40]
push eax
call fcn.00430810
lea eax, [ebp - 0x40]
mov dword [ebp - 0x38], eax
mov dword [ebp - 4], 3
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x40]
mov eax, dword [edx - 0xc]
lea ecx, [edx - 0xc]
cmp eax, 0xffffffff
je 0x462d18
add eax, 0xffffffff
mov dword [edx - 0xc], eax
jne 0x462d18
push ecx
call dword [sym.imp.MSVCR80.dll_free]
pop ecx
jmp 0x462d18