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

Disassembly:
push 0x118
mov eax, 0x7b5267
call fcn.00645f96
mov edi, ecx
mov esi, dword [ebp + 8]
xor eax, eax
mov ebx, dword [ebp + 0xc]
push eax
mov dword [ebp - 0xfc], esi
call fcn.00697f20
test al, al
je 0x69848b
xor ecx, ecx
lea eax, [ebp - 0xf8]
push eax
push ecx
lea eax, [ebp - 0xf4]
mov dword [ebp - 0xf4], ecx
push eax
push ecx
push esi
mov dword [ebp - 0xf8], ecx
call fcn.00698944
pop ecx
push eax
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [edi + 0x30], eax
test eax, eax
jne 0x69848b
cmp dword [ebp - 0xf4], 1
je 0x698375
cmp dword [ebp - 0xf4], 2
je 0x698375
push str.Registry_value___s__is_not_text__but_of_type__s_
lea ecx, [ebp - 0x70]
call fcn.00408c6d
xor ecx, ecx
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0xb0]
call fcn.00408cc0
mov esi, eax
lea ecx, [ebp - 0x90]
call fcn.00408cc0
push esi
push eax
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 2
push eax
call fcn.00669628
add esp, 0xc
lea ecx, [ebp - 0x124]
push eax
call fcn.0066154b
sub esp, 0x20
mov byte [ebp - 4], 3
mov eax, esp
mov dword [ebp - 0x110], esp
push dword [ebp - 0xf4]
push eax
call fcn.00697b84
sub esp, 0x18
mov byte [ebp - 4], 4
mov eax, esp
push dword [ebp - 0xfc]
push edi
push eax
call fcn.006977de
add esp, 0xc
mov byte [ebp - 4], 3
lea eax, [ebp - 0x124]
push eax
call fcn.006967e9
add esp, 0x44
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x124]
call fcn.00661721
lea ecx, [ebp - 0x90]
call fcn.00408e36
lea ecx, [ebp - 0xb0]
call fcn.00408e36
lea ecx, [ebp - 0x70]
jmp 0x69851f
mov esi, dword [ebp - 0xf8]
shr esi, 1
jne 0x69838b
mov ecx, ebx
call fcn.0066e54c
jmp 0x69847d
push esi
push ebx
lea ecx, [ebp - 0x10c]
call fcn.00690d8d
lea eax, [ebp - 0xf8]
push eax
lea ecx, [ebp - 0x10c]
call fcn.0066191a
push eax
lea eax, [ebp - 0xf4]
push eax
xor eax, eax
push eax
push dword [ebp - 0xfc]
call fcn.00698944
pop ecx
push eax
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [ebp - 0x10c]
mov dword [edi + 0x30], eax
call fcn.0066191a
xor ecx, ecx
cmp word [eax + esi*2 - 2], cx
jne 0x6983e2
dec esi
push esi
lea ecx, [ebp - 0x10c]
call fcn.006918ed
lea ecx, [ebp - 0x10c]
call fcn.006910f0
cmp dword [ebp - 0xf4], 2
jne 0x69847d
cmp byte [ebp + 0x10], 0
jne 0x69847d
xor eax, eax
mov ecx, ebx
push eax
push eax
call fcn.00669d63
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, eax
test esi, esi
setne cl
test cl, cl
je 0x69847d
lea ecx, [ebp - 0x30]
call fcn.00408cc0
push esi
lea eax, [ebp - 0x30]
mov dword [ebp - 4], 5
push eax
lea ecx, [ebp - 0x104]
call fcn.006616b6
push esi
mov ecx, eax
call fcn.0066191a
push eax
mov ecx, ebx
call fcn.00669d63
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea ecx, [ebp - 0x104]
call fcn.006616dd
lea eax, [ebp - 0x30]
mov ecx, ebx
push eax
call fcn.00408ed9
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.00408e36
xor eax, eax
cmp dword [edi + 0x30], eax
jne 0x69848b
mov al, 1
jmp 0x698526
push str.Cant_read_value_of__s
lea ecx, [ebp - 0x50]
call fcn.00408c6d
lea ecx, [ebp - 0xd0]
mov dword [ebp - 4], 6
call fcn.00408cc0
mov esi, eax
lea ecx, [ebp - 0xf0]
call fcn.00408cc0
push esi
push eax
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 8
push eax
call fcn.00669628
add esp, 0xc
lea ecx, [ebp - 0x24]
push eax
call fcn.0066154b
sub esp, 0x20
mov byte [ebp - 4], 9
mov eax, esp
push dword [ebp - 0xfc]
push edi
push eax
call fcn.006977de
add esp, 0xc
lea eax, [ebp - 0x24]
push eax
push dword [edi + 0x30]
call fcn.0067829d
add esp, 0x28
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x24]
call fcn.00661721
lea ecx, [ebp - 0xf0]
call fcn.00408e36
lea ecx, [ebp - 0xd0]
call fcn.00408e36
lea ecx, [ebp - 0x50]
call fcn.00408e36
xor al, al
call fcn.00645f45
ret 0xc