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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x430
mov eax, dword [0x1046190]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push ebx
push eax
push dword [0x10472a0]
mov dword [ebp - 0x42c], ecx
mov ecx, dword [ebp + 0x14]
push 0x1007824
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.01028b64
add esp, 0x14
lea eax, [ebp - 0x420]
push eax
push 0x20019
push ebx
lea eax, [ebp - 0x20c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1041d81
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 0x1009ba0
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 0x1041c5e
cmp dword [ebp - 0x418], edi
je 0x1041bcd
cmp dword [ebp - 0x418], 2
jne 0x1041c5e
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x1041bd6
sub eax, edx
sar eax, 1
cmp eax, 5
jbe 0x1041c5e
cmp dword [ebp - 0x418], 2
mov edi, 0x104
jne 0x1041c30
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 0x1041d73
lea eax, [ebp - 0x414]
push eax
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.01028a67
test eax, eax
jl 0x1041d73
push 1
push edi
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.01043e67
test eax, eax
jl 0x1041c5e
lea eax, [ebp - 0x414]
push eax
call fcn.010326f3
test eax, eax
je 0x1041d73
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 0x1004844
push dword [ebp - 0x420]
call esi
test eax, eax
jne 0x1041d73
cmp dword [ebp - 0x418], 1
jne 0x1041d73
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 0x1009b04
push dword [ebp - 0x420]
call esi
test eax, eax
jne 0x1041d73
cmp dword [ebp - 0x418], 1
jne 0x1041d73
mov edi, dword [ebp + 0x20]
lea eax, [ebp - 0x41c]
push eax
push dword [ebp - 0x424]
lea eax, [ebp - 0x418]
push eax
push ebx
push 0x100546c
push dword [ebp - 0x420]
mov dword [ebp - 0x41c], edi
call esi
test eax, eax
jne 0x1041d16
cmp dword [ebp - 0x418], 1
je 0x1041d69
cmp dword [ebp - 0x418], 2
jne 0x1041d56
push 0x104
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x424]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1041d56
lea eax, [ebp - 0x414]
push eax
mov eax, edi
shr eax, 1
push eax
push dword [ebp - 0x424]
call fcn.01028a67
test eax, eax
jge 0x1041d69
push 0x1002d58
shr edi, 1
push edi
push dword [ebp - 0x424]
call fcn.01028a67
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.01031a01
leave
ret 0x1c