Function at 0x1036fdd
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 0x103734e
cmp edx, ebx
je 0x103734e
cmp esi, ebx
je 0x103734e
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 0x10372bd
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 0x10372a4
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 0x1037298
cmp dword [ebp - 0x4a4], 2
mov esi, 0x104
jne 0x103712b
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 0x103712b
push esi
lea eax, [ebp - 0x28c]
push eax
call fcn.010417d3
mov dword [ebp - 0x498], eax
test eax, eax
jl 0x103712b
lea eax, [ebp - 0x28c]
push eax
push dword [ebp + 0x10]
push dword [ebp - 0x4ac]
call fcn.01035831
mov dword [ebp - 0x498], eax
test eax, eax
jl 0x103712b
mov ebx, edi
cmp dword [ebp - 0x4a4], edi
jne 0x103716c
push esi
lea eax, [ebp - 0x494]
push eax
call fcn.010417d3
mov dword [ebp - 0x498], eax
test eax, eax
jl 0x103716c
lea eax, [ebp - 0x494]
push eax
push dword [ebp + 0x10]
push dword [ebp - 0x4ac]
call fcn.01035831
xor ebx, ebx
test eax, eax
mov dword [ebp - 0x498], eax
setge bl
ret
test ebx, ebx
je 0x1037298
push 0x1001e44
push dword [ebp + 0x18]
mov ebx, edi
push dword [ebp - 0x4a8]
call fcn.01035831
test eax, eax
jl 0x1037298
push edi
mov esi, 0x1002ac8
push esi
lea eax, [ebp - 0x28c]
push 0x208
push eax
call fcn.01035968
add esp, 0x10
test eax, eax
jl 0x1037298
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 0x1037298
mov dword [ebp - 0x4a0], edi
cmp ebx, 1
jbe 0x1037213
push 0x1002ac4
push dword [ebp + 0x18]
push dword [ebp - 0x4a8]
call fcn.010358e7
test eax, eax
jl 0x1037288
lea eax, [ebp - 0x84]
push eax
push dword [ebp + 0x18]
push dword [ebp - 0x4a8]
call fcn.010358e7
test eax, eax
jl 0x1037288
inc ebx
mov dword [ebp - 0x4b8], 1
cmp ebx, 0x40
ja 0x1037291
push ebx
push esi
lea eax, [ebp - 0x28c]
push 0x208
push eax
call fcn.01035968
add esp, 0x10
test eax, eax
jl 0x1037291
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 0x10371f1
cmp dword [ebp - 0x4b8], 0
je 0x1037298
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 0x1037347
mov esi, dword [sym.imp.msvcrt.dll__wcsicmp]
push 0x100173c
push dword [ebp - 0x4b0]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10372ef
cmp dword [ebp + 0x10], 0x7fffffff
jae 0x1037347
push dword [ebp + 0x10]
push dword [ebp - 0x4ac]
push 0x470
jmp 0x1037319
push 0x1002a9c
push dword [ebp - 0x4b0]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1037347
cmp dword [ebp + 0x10], 0x7fffffff
jae 0x1037347
push dword [ebp + 0x10]
push dword [ebp - 0x4ac]
push 0x46f
push dword [0x1073960]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x1037347
push 0x1002a50
push dword [ebp + 0x18]
push dword [ebp - 0x4a8]
call fcn.01035831
test eax, eax
jl 0x1037347
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.01047480
leave
ret 0x14