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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x5a8
mov eax, dword [0x107fa78]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push dword [ebx]
lea eax, [ebp - 0x20c]
push dword [0x107fde4]
xor esi, esi
push 0x100bde0
push 0x103
push eax
mov dword [ebp - 0x5a0], esi
mov dword [ebp - 0x5a8], esi
call fcn.01034d76
add esp, 0x14
lea eax, [ebp - 0x5a0]
push eax
push 0x20019
push esi
lea eax, [ebp - 0x20c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x107138e
push edi
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push 0x1004e6c
push dword [ebp - 0x5a0]
mov edi, 0x208
mov dword [ebp - 0x598], 1
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x1070e4f
cmp dword [ebp - 0x598], 1
je 0x1070db7
cmp dword [ebp - 0x598], 2
jne 0x1070e4f
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1070dc0
sub eax, edx
sar eax, 1
cmp eax, 5
jbe 0x1070e4f
cmp dword [ebp - 0x598], 2
jne 0x1070e1d
push 0x104
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1071381
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.01034c79
test eax, eax
jl 0x1071381
push 1
push 0x104
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.010686d6
test eax, eax
jl 0x1070e4f
lea eax, [ebp - 0x414]
push eax
call fcn.01056f43
test eax, eax
je 0x1071381
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x10116ac
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x1070e96
cmp dword [ebp - 0x598], 1
jne 0x1070e96
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebx + 0x20]
push eax
call fcn.010593e7
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x101168c
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x1070eee
cmp dword [ebp - 0x598], 1
jne 0x1070eee
lea eax, [ebp - 0x20c]
push 0x10040f0
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x1070eee
mov dword [ebx + 0x34], 1
jmp 0x1070ef2
and dword [ebx + 0x34], 0
lea eax, [ebp - 0x59c]
push eax
push dword [ebx + 4]
lea eax, [ebp - 0x598]
push eax
push 0
push 0x100f1b4
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x1070f35
cmp dword [ebp - 0x598], 1
jne 0x1070f35
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebx + 4]
push eax
call fcn.010593e7
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x101166c
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x1071381
cmp dword [ebp - 0x598], 1
je 0x1070f7d
cmp dword [ebp - 0x598], 2
jne 0x1071381
cmp dword [ebp - 0x598], 2
jne 0x1070fc7
push 0x104
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1071381
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.01034c79
test eax, eax
jl 0x1071381
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebx + 0x1c]
push eax
call fcn.010593e7
test eax, eax
jne 0x1071381
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1011640
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x1071381
cmp dword [ebp - 0x598], 1
jne 0x1071381
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebx + 0x14]
push eax
call fcn.010593e7
test eax, eax
jne 0x1071381
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1011610
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x10710c9
cmp dword [ebp - 0x598], 1
jne 0x10710c9
push 0x103
lea eax, [ebp - 0x412]
push eax
mov word [ebp - 0x414], 0x40
call fcn.010590be
test eax, eax
je 0x10710c9
push 0x1011608
push 0x104
lea eax, [ebp - 0x414]
push eax
call fcn.01034cee
lea eax, [ebp - 0x20c]
push eax
push 0x104
lea eax, [ebp - 0x414]
push eax
call fcn.01034cee
lea eax, [ebp - 0x414]
push eax
lea eax, [ebx + 0x18]
push eax
call fcn.010593e7
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x10115e8
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x1071110
cmp dword [ebp - 0x598], 1
jne 0x1071110
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebx + 0xc]
push eax
call fcn.010593e7
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x100f3b0
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x1071157
cmp dword [ebp - 0x598], 1
jne 0x1071157
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebx + 0x10]
push eax
call fcn.010593e7
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x594]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1011538
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], 0x100
call esi
test eax, eax
jne 0x10711cf
cmp dword [ebp - 0x598], 1
jne 0x10711cf
lea eax, [ebp - 0x594]
push eax
push 0x1082220
push 0x10040c8
lea eax, [ebp - 0x494]
push 0x143
push eax
call fcn.01034d76
add esp, 0x14
lea eax, [ebp - 0x494]
push eax
lea eax, [ebx + 0x30]
push eax
call fcn.010593e7
test eax, eax
jne 0x1071381
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x594]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x10115c4
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], 0x100
call esi
test eax, eax
jne 0x1071256
cmp dword [ebp - 0x598], 1
jne 0x1071256
lea eax, [ebp - 0x594]
push eax
call fcn.01068ddd
test eax, eax
je 0x1071248
lea eax, [ebp - 0x594]
push eax
push 0x1082220
push 0x10040c8
lea eax, [ebp - 0x494]
push 0x143
push eax
call fcn.01034d76
add esp, 0x14
lea eax, [ebp - 0x494]
push eax
jmp 0x107124d
push 0x1001e8c
lea eax, [ebx + 0x2c]
push eax
call fcn.010593e7
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x100bd94
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x10712a7
cmp dword [ebp - 0x598], 1
jne 0x10712a7
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebx + 8]
push eax
call fcn.010593e7
test eax, eax
jne 0x1071381
jmp 0x1071321
mov eax, dword [ebx]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10712ac
sub eax, edx
sar eax, 1
lea edi, [eax + 0xb]
xor ecx, ecx
push 2
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
test eax, eax
pop ecx
mov dword [ebp - 0x5a4], eax
je 0x1071381
mov ecx, dword [ebx]
inc ecx
inc ecx
push ecx
push edi
push eax
call fcn.01034c79
push 0x10115b8
push edi
push dword [ebp - 0x5a4]
call fcn.01034cee
push dword [ebp - 0x5a4]
mov ecx, ebx
call fcn.01068d40
test eax, eax
jne 0x1071381
push dword [ebp - 0x5a4]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
mov edi, 0x208
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x10115a4
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
xor esi, esi
inc esi
test eax, eax
jne 0x1071377
cmp dword [ebp - 0x598], esi
jne 0x1071377
lea eax, [ebp - 0x20c]
push 0x10040f0
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x1071377
mov dword [ebx + 0x38], esi
jmp 0x107137b
and dword [ebx + 0x38], 0
mov dword [ebp - 0x5a8], esi
push dword [ebp - 0x5a0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x5a8]
pop esi
xor ecx, ebp
pop ebx
call fcn.01047417
leave
ret 4