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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [0x1046190]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push esi
push eax
push dword [0x10472a0]
mov dword [ebp - 0x41c], ecx
mov ecx, dword [ebp + 0x14]
push 0x1007808
lea eax, [ebp - 0x20c]
xor esi, esi
push 0x103
push eax
mov dword [ebp - 0x428], ecx
mov dword [ebp - 0x420], esi
mov dword [ebp - 0x42c], esi
call fcn.01028b64
add esp, 0x14
lea eax, [ebp - 0x420]
push eax
push 0x20019
push esi
lea eax, [ebp - 0x20c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x104201d
push ebx
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x418]
push eax
push esi
push 0x1009ba0
push dword [ebp - 0x420]
mov dword [ebp - 0x418], 1
mov dword [ebp - 0x424], 0x208
call edi
test eax, eax
mov ebx, 0x104
jne 0x1041f09
cmp dword [ebp - 0x418], 1
je 0x1041e7d
cmp dword [ebp - 0x418], 2
jne 0x1041f09
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x1041e86
sub eax, edx
sar eax, 1
cmp eax, 5
jbe 0x1041f09
cmp dword [ebp - 0x418], 2
jne 0x1041edb
push ebx
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x104200f
lea eax, [ebp - 0x414]
push eax
push ebx
lea eax, [ebp - 0x20c]
push eax
call fcn.01028a67
test eax, eax
jl 0x104200f
push 1
push ebx
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.01043e67
test eax, eax
jl 0x1041f09
lea eax, [ebp - 0x414]
push eax
call fcn.010326f3
test eax, eax
je 0x104200f
mov esi, dword [ebp + 0x10]
lea eax, [ebp - 0x424]
push eax
push dword [ebp - 0x41c]
lea eax, [ebp - 0x418]
push eax
push 0
push 0x1009aec
push dword [ebp - 0x420]
mov dword [ebp - 0x424], esi
call edi
test eax, eax
je 0x1041f40
push 0x100cdec
jmp 0x1041f91
cmp dword [ebp - 0x418], 2
jne 0x1041f83
push ebx
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1041f7c
lea eax, [ebp - 0x414]
push eax
mov eax, esi
shr eax, 1
push eax
push dword [ebp - 0x41c]
call fcn.01028a67
test eax, eax
jge 0x1041f9f
push 0x100221c
jmp 0x1041f91
cmp dword [ebp - 0x418], 1
je 0x1041f9f
push 0x100cde8
shr esi, 1
push esi
push dword [ebp - 0x41c]
call fcn.01028a67
mov esi, dword [ebp + 0x18]
lea eax, [ebp - 0x424]
push eax
push dword [ebp - 0x428]
lea eax, [ebp - 0x418]
push eax
push 0
push 0
push dword [ebp - 0x420]
mov dword [ebp - 0x424], esi
call edi
test eax, eax
jne 0x1041ff1
cmp dword [ebp - 0x418], 1
jne 0x1041ff1
mov eax, dword [ebp - 0x428]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1041fde
sub eax, edx
sar eax, 1
cmp eax, 2
jae 0x1042005
shr esi, 1
push 0x1002d58
dec esi
push esi
push dword [ebp - 0x428]
call fcn.01028a67
mov dword [ebp - 0x42c], 1
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x42c]
xor ecx, ebp
pop esi
call fcn.01031a01
leave
ret 0x14