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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x1046190]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 8]
push edi
push dword [0x10472a0]
lea eax, [ebp - 0x20c]
push 0x1007844
xor esi, esi
push 0x103
push eax
mov dword [ebp - 0x420], esi
mov dword [ebp - 0x424], 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 0x1041ace
push ebx
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x418]
push eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push 0x1009ba0
push dword [ebp - 0x420]
xor ebx, ebx
inc ebx
mov dword [ebp - 0x418], ebx
mov dword [ebp - 0x41c], 0x208
call esi
test eax, eax
jne 0x104194d
cmp dword [ebp - 0x418], ebx
je 0x10418bc
cmp dword [ebp - 0x418], 2
jne 0x104194d
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10418c5
sub eax, edx
sar eax, 1
cmp eax, 5
jbe 0x104194d
cmp dword [ebp - 0x418], 2
mov ebx, 0x104
jne 0x104191f
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 0x1041ac1
lea eax, [ebp - 0x414]
push eax
push ebx
lea eax, [ebp - 0x20c]
push eax
call fcn.01028a67
test eax, eax
jl 0x1041ac1
push 1
push ebx
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.01043e67
test eax, eax
jl 0x104194d
lea eax, [ebp - 0x414]
push eax
call fcn.010326f3
test eax, eax
je 0x1041ac1
lea eax, [ebp - 0x41c]
push eax
lea eax, [edi + 0x3e8]
push eax
lea eax, [ebp - 0x418]
push eax
push 0
push 0x1009b34
push dword [ebp - 0x420]
mov dword [ebp - 0x41c], 0x14
call esi
test eax, eax
jne 0x1041ac1
cmp dword [ebp - 0x418], 1
jne 0x1041ac1
lea eax, [ebp - 0x41c]
push eax
lea eax, [edi + 0xc8]
push eax
lea eax, [ebp - 0x418]
push eax
push 0
push 0x1009b78
push dword [ebp - 0x420]
mov ebx, 0x12c
mov dword [ebp - 0x41c], ebx
call esi
test eax, eax
jne 0x1041ac1
cmp dword [ebp - 0x418], 1
jne 0x1041ac1
lea ecx, [ebp - 0x41c]
push ecx
lea eax, [edi + 0x320]
push eax
lea eax, [ebp - 0x418]
push eax
push 0
push 0x10021cc
push dword [ebp - 0x420]
mov dword [ebp - 0x41c], 0xc8
call esi
test eax, eax
jne 0x1041a0f
cmp dword [ebp - 0x418], 1
je 0x1041a22
push 0x1002d58
push 0x64
lea eax, [edi + 0x320]
push eax
call fcn.01028a67
lea eax, [ebp - 0x41c]
push eax
lea eax, [edi + 0x1f4]
push eax
lea eax, [ebp - 0x418]
push eax
push 0
push 0x1009b50
push dword [ebp - 0x420]
mov dword [ebp - 0x41c], ebx
call esi
test eax, eax
jne 0x1041ac1
xor ebx, ebx
inc ebx
cmp dword [ebp - 0x418], ebx
jne 0x1041ac1
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x418]
push eax
push 0
push 0x100cdd4
push dword [ebp - 0x420]
mov dword [ebp - 0x41c], 0x208
call esi
test eax, eax
jne 0x1041ab5
cmp dword [ebp - 0x418], ebx
jne 0x1041ab5
lea eax, [ebp - 0x20c]
push 0x1006914
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x1041ab5
and dword [edi + 0x3fc], eax
jmp 0x1041abb
mov dword [edi + 0x3fc], ebx
mov dword [ebp - 0x424], ebx
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x424]
pop edi
xor ecx, ebp
pop esi
call fcn.01031a01
leave
ret 4