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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x4b8
mov eax, dword [0x1072c48]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push ebx
xor ebx, ebx
push esi
mov esi, dword [ebp + 0x14]
mov eax, 0x80004005
mov dword [ebp - 0x4b0], ecx
mov dword [ebp - 0x4ac], edx
mov dword [ebp - 0x4a8], esi
mov dword [ebp - 0x498], eax
mov dword [ebp - 0x4b4], ebx
mov dword [ebp - 0x4b8], ebx
cmp ecx, ebx
je 0x103732e
cmp edx, ebx
je 0x103732e
cmp esi, ebx
je 0x103732e
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push edi
lea eax, [ebp - 0x4b4]
push eax
mov edi, 0x20019
push edi
push ebx
push 0x1001f80
push 0x80000002
call esi
test eax, eax
jne 0x103729d
and dword [ebp - 0x49c], ebx
lea eax, [ebp - 0x49c]
push eax
push edi
push ebx
push dword [ebp - 0x4b0]
push dword [ebp - 0x4b4]
call esi
test eax, eax
jne 0x1037284
lea eax, [ebp - 0x4a0]
push eax
lea eax, [ebp - 0x494]
push eax
lea eax, [ebp - 0x4a4]
push eax
push ebx
push ebx
push dword [ebp - 0x49c]
xor edi, edi
inc edi
mov dword [ebp - 0x4a4], edi
mov dword [ebp - 0x4a0], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1037278
cmp dword [ebp - 0x4a4], 2
mov esi, 0x104
jne 0x103710b
push esi
lea eax, [ebp - 0x28c]
push eax
lea eax, [ebp - 0x494]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x103710b
push esi
lea eax, [ebp - 0x28c]
push eax
call fcn.010417b6
mov dword [ebp - 0x498], eax
test eax, eax
jl 0x103710b
lea eax, [ebp - 0x28c]
push eax
push dword [ebp + 0x10]
push dword [ebp - 0x4ac]
call fcn.01035811
mov dword [ebp - 0x498], eax
test eax, eax
jl 0x103710b
mov ebx, edi
cmp dword [ebp - 0x4a4], edi
jne 0x103714c
push esi
lea eax, [ebp - 0x494]
push eax
call fcn.010417b6
mov dword [ebp - 0x498], eax
test eax, eax
jl 0x103714c
lea eax, [ebp - 0x494]
push eax
push dword [ebp + 0x10]
push dword [ebp - 0x4ac]
call fcn.01035811
xor ebx, ebx
test eax, eax
mov dword [ebp - 0x498], eax
setge bl
test ebx, ebx
je 0x1037278
push 0x1001e44
push dword [ebp + 0x18]
mov ebx, edi
push dword [ebp - 0x4a8]
call fcn.01035811
test eax, eax
jl 0x1037278
push edi
mov esi, 0x1002ac8
push esi
lea eax, [ebp - 0x28c]
push 0x208
push eax
call fcn.01035948
add esp, 0x10
test eax, eax
jl 0x1037278
lea eax, [ebp - 0x4a0]
push eax
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x4a4]
push eax
push 0
lea eax, [ebp - 0x28c]
push eax
push dword [ebp - 0x49c]
mov edi, 0x80
mov dword [ebp - 0x4a0], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1037278
mov dword [ebp - 0x4a0], edi
cmp ebx, 1
jbe 0x10371f3
push 0x1002ac4
push dword [ebp + 0x18]
push dword [ebp - 0x4a8]
call fcn.010358c7
test eax, eax
jl 0x1037268
lea eax, [ebp - 0x84]
push eax
push dword [ebp + 0x18]
push dword [ebp - 0x4a8]
call fcn.010358c7
test eax, eax
jl 0x1037268
inc ebx
mov dword [ebp - 0x4b8], 1
cmp ebx, 0x40
ja 0x1037271
push ebx
push esi
lea eax, [ebp - 0x28c]
push 0x208
push eax
call fcn.01035948
add esp, 0x10
test eax, eax
jl 0x1037271
lea eax, [ebp - 0x4a0]
push eax
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x4a4]
push eax
push 0
lea eax, [ebp - 0x28c]
push eax
push dword [ebp - 0x49c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x10371d1
cmp dword [ebp - 0x4b8], 0
je 0x1037278
and dword [ebp - 0x498], 0
push dword [ebp - 0x49c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x4b4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x498], 0
jge 0x1037327
mov esi, dword [sym.imp.msvcrt.dll__wcsicmp]
push 0x100173c
push dword [ebp - 0x4b0]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10372cf
cmp dword [ebp + 0x10], 0x7fffffff
jae 0x1037327
push dword [ebp + 0x10]
push dword [ebp - 0x4ac]
push 0x470
jmp 0x10372f9
push 0x1002a9c
push dword [ebp - 0x4b0]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1037327
cmp dword [ebp + 0x10], 0x7fffffff
jae 0x1037327
push dword [ebp + 0x10]
push dword [ebp - 0x4ac]
push 0x46f
push dword [0x1073960]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x1037327
push 0x1002a50
push dword [ebp + 0x18]
push dword [ebp - 0x4a8]
call fcn.01035811
test eax, eax
jl 0x1037327
and dword [ebp - 0x498], 0
mov eax, dword [ebp - 0x498]
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.01047464
leave
ret 0x14