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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x430
mov eax, dword [0x107fa78]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push ebx
push eax
push dword [0x107fde4]
mov dword [ebp - 0x42c], ecx
mov ecx, dword [ebp + 0x14]
push 0x100bd1c
mov dword [ebp - 0x430], ecx
mov ecx, dword [ebp + 0x1c]
lea eax, [ebp - 0x20c]
xor ebx, ebx
push 0x103
push eax
mov dword [ebp - 0x424], ecx
mov dword [ebp - 0x420], ebx
mov dword [ebp - 0x428], ebx
call fcn.01034d76
add esp, 0x14
lea eax, [ebp - 0x420]
push eax
push 0x20019
push ebx
lea eax, [ebp - 0x20c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1071937
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x418]
push eax
push ebx
push 0x1004e6c
push dword [ebp - 0x420]
xor edi, edi
inc edi
mov dword [ebp - 0x418], edi
mov dword [ebp - 0x41c], 0x208
call esi
test eax, eax
jne 0x1071814
cmp dword [ebp - 0x418], edi
je 0x1071783
cmp dword [ebp - 0x418], 2
jne 0x1071814
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x107178c
sub eax, edx
sar eax, 1
cmp eax, 5
jbe 0x1071814
cmp dword [ebp - 0x418], 2
mov edi, 0x104
jne 0x10717e6
push edi
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1071929
lea eax, [ebp - 0x414]
push eax
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.01034c79
test eax, eax
jl 0x1071929
push 1
push edi
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.010686d6
test eax, eax
jl 0x1071814
lea eax, [ebp - 0x414]
push eax
call fcn.01056f43
test eax, eax
je 0x1071929
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x41c], eax
lea eax, [ebp - 0x41c]
push eax
push dword [ebp - 0x42c]
lea eax, [ebp - 0x418]
push eax
push ebx
push 0x100ee70
push dword [ebp - 0x420]
call esi
test eax, eax
jne 0x1071929
cmp dword [ebp - 0x418], 1
jne 0x1071929
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x41c], eax
lea eax, [ebp - 0x41c]
push eax
push dword [ebp - 0x430]
lea eax, [ebp - 0x418]
push eax
push ebx
push 0x1011750
push dword [ebp - 0x420]
call esi
test eax, eax
jne 0x1071929
cmp dword [ebp - 0x418], 1
jne 0x1071929
mov edi, dword [ebp + 0x20]
lea eax, [ebp - 0x41c]
push eax
push dword [ebp - 0x424]
lea eax, [ebp - 0x418]
push eax
push ebx
push 0x1011744
push dword [ebp - 0x420]
mov dword [ebp - 0x41c], edi
call esi
test eax, eax
jne 0x10718cc
cmp dword [ebp - 0x418], 1
je 0x107191f
cmp dword [ebp - 0x418], 2
jne 0x107190c
push 0x104
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x424]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x107190c
lea eax, [ebp - 0x414]
push eax
mov eax, edi
shr eax, 1
push eax
push dword [ebp - 0x424]
call fcn.01034c79
test eax, eax
jge 0x107191f
push 0x1001e8c
shr edi, 1
push edi
push dword [ebp - 0x424]
call fcn.01034c79
mov dword [ebp - 0x428], 1
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x428]
xor ecx, ebp
pop ebx
call fcn.01047417
leave
ret 0x1c