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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x4b8
mov eax, dword [0x107fa78]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push ebx
xor ebx, ebx
cmp ecx, 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
je 0x1036cd1
cmp edx, ebx
je 0x1036cd1
cmp esi, ebx
je 0x1036cd1
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push edi
lea eax, [ebp - 0x4b4]
push eax
mov edi, 0x20019
push edi
push ebx
push 0x1001ff0
push reloc.OLEAUT32.dll_SysReAllocString
call esi
test eax, eax
jne 0x1036c40
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 0x1036c27
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 0x1036c1b
cmp dword [ebp - 0x4a4], 2
mov esi, 0x104
jne 0x1036aae
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 0x1036aae
push esi
lea eax, [ebp - 0x28c]
push eax
call fcn.0104204f
test eax, eax
mov dword [ebp - 0x498], eax
jl 0x1036aae
lea eax, [ebp - 0x28c]
push eax
push dword [ebp + 0x10]
push dword [ebp - 0x4ac]
call fcn.01034c79
test eax, eax
mov dword [ebp - 0x498], eax
jl 0x1036aae
mov ebx, edi
cmp dword [ebp - 0x4a4], edi
jne 0x1036aef
push esi
lea eax, [ebp - 0x494]
push eax
call fcn.0104204f
test eax, eax
mov dword [ebp - 0x498], eax
jl 0x1036aef
lea eax, [ebp - 0x494]
push eax
push dword [ebp + 0x10]
push dword [ebp - 0x4ac]
call fcn.01034c79
xor ebx, ebx
test eax, eax
mov dword [ebp - 0x498], eax
setge bl
test ebx, ebx
je 0x1036c1b
push 0x1001e8c
push dword [ebp + 0x18]
mov ebx, edi
push dword [ebp - 0x4a8]
call fcn.01034c79
test eax, eax
jl 0x1036c1b
push edi
mov esi, 0x1002da8
push esi
lea eax, [ebp - 0x28c]
push 0x208
push eax
call fcn.01034db1
add esp, 0x10
test eax, eax
jl 0x1036c1b
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 0x1036c1b
cmp ebx, 1
mov dword [ebp - 0x4a0], edi
jbe 0x1036b96
push 0x1002da4
push dword [ebp + 0x18]
push dword [ebp - 0x4a8]
call fcn.01034d30
test eax, eax
jl 0x1036c0b
lea eax, [ebp - 0x84]
push eax
push dword [ebp + 0x18]
push dword [ebp - 0x4a8]
call fcn.01034d30
test eax, eax
jl 0x1036c0b
inc ebx
cmp ebx, 0x40
mov dword [ebp - 0x4b8], 1
ja 0x1036c14
push ebx
push esi
lea eax, [ebp - 0x28c]
push 0x208
push eax
call fcn.01034db1
add esp, 0x10
test eax, eax
jl 0x1036c14
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 0x1036b74
cmp dword [ebp - 0x4b8], 0
je 0x1036c1b
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 0x1036cca
mov esi, dword [sym.imp.msvcrt.dll__wcsicmp]
push 0x1001fa0
push dword [ebp - 0x4b0]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1036c72
cmp dword [ebp + 0x10], 0x7fffffff
jae 0x1036cca
push dword [ebp + 0x10]
push dword [ebp - 0x4ac]
push 0x470
jmp 0x1036c9c
push 0x1002d7c
push dword [ebp - 0x4b0]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1036cca
cmp dword [ebp + 0x10], 0x7fffffff
jae 0x1036cca
push dword [ebp + 0x10]
push dword [ebp - 0x4ac]
push 0x46f
push dword [0x1081390]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x1036cca
push 0x1002d30
push dword [ebp + 0x18]
push dword [ebp - 0x4a8]
call fcn.01034c79
test eax, eax
jl 0x1036cca
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.01047417
leave
ret 0x14