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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x25
xor ebx, ebx
push dword [esi + 4]
mov dword [ebp - 0x14], ebx
call dword [sym.imp.MSVCRT.DLL_wcschr]
pop ecx
cmp eax, ebx
pop ecx
mov dword [ebp - 8], eax
je 0x1013cb1
push 0x208
push ebx
call dword [sym.imp.KERNEL32.DLL_LocalAlloc]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x1013c9c
mov edi, dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
mov ebx, 0x104
push ebx
push eax
push dword [esi + 4]
call edi
test eax, eax
mov dword [ebp - 4], eax
je 0x1013c61
cmp eax, ebx
jbe 0x1013ca3
push dword [ebp - 8]
mov ebx, dword [sym.imp.KERNEL32.DLL_LocalFree]
call ebx
mov eax, dword [ebp - 4]
test eax, eax
je 0x1013c9c
lea eax, [eax + eax + 2]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_LocalAlloc]
test eax, eax
mov dword [ebp - 8], eax
je 0x1013c9c
push dword [ebp - 4]
push eax
push dword [esi + 4]
call edi
test eax, eax
mov dword [ebp - 4], eax
jne 0x1013ca3
push dword [ebp - 8]
call ebx
pop edi
pop esi
pop ebx
leave
ret 4
mov eax, dword [esi + 4]
xor ebx, ebx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 8]
mov dword [esi + 4], eax
lea eax, [ebp - 0xc]
push eax
push 0x2001f
push ebx
push 0x1008dc0
push 0x80000002
call dword [sym.imp.ADVAPI32.DLL_RegOpenKeyExW]
cmp eax, ebx
jne 0x1013c9c
lea eax, [ebp - 0x11c]
mov edi, dword [sym.imp.ADVAPI32.DLL_RegQueryValueExW]
mov dword [ebp + 8], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push dword [esi]
mov dword [ebp - 4], 0x100
push dword [ebp - 0xc]
call edi
cmp eax, ebx
je 0x1013d98
cmp eax, 3
je 0x1013d5e
cmp eax, 2
je 0x1013d5e
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.DLL_LocalAlloc]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x1013d8a
lea ecx, [ebp - 4]
push ecx
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push dword [esi]
push dword [ebp - 0xc]
call edi
cmp eax, ebx
je 0x1013d98
lea eax, [ebp - 0x11c]
cmp dword [ebp + 8], eax
je 0x1013d48
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_LocalFree]
cmp dword [ebp - 8], ebx
je 0x1013d8a
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_LocalFree]
mov eax, dword [ebp - 0x1c]
mov dword [esi + 4], eax
jmp 0x1013d8a
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x1013d6a
cmp eax, 1
jne 0x1013d8a
push dword [esi + 4]
call dword [sym.imp.MSVCRT.DLL_wcslen]
pop ecx
lea eax, [eax + eax + 2]
push eax
push dword [esi + 4]
push 1
push ebx
push dword [esi]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.DLL_RegSetValueExW]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.DLL_RegCloseKey]
jmp 0x1013c9c
mov edi, dword [ebp + 8]
mov dword [ebp - 0x10], edi
cmp edi, ebx
je 0x1013e32
cmp word [edi], bx
je 0x1013e32
push 0x2c
push edi
call dword [sym.imp.MSVCRT.DLL_wcschr]
mov edi, eax
pop ecx
cmp edi, ebx
pop ecx
je 0x1013dc3
mov word [edi], bx
push dword [esi + 4]
push dword [ebp - 0x10]
call dword [sym.imp.MSVCRT.DLL__wcsicmp]
pop ecx
test eax, eax
pop ecx
jne 0x1013e22
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x1013d34
cmp eax, 1
je 0x1013d34
cmp eax, 2
jne 0x1013e22
cmp edi, ebx
je 0x1013e1a
lea ebx, [edi + 2]
push ebx
call dword [sym.imp.MSVCRT.DLL_wcslen]
pop ecx
lea eax, [eax + eax + 2]
push eax
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.MSVCRT.DLL_memmove]
add esp, 0xc
xor ebx, ebx
mov dword [ebp - 0x14], 1
jmp 0x1013d9e
mov eax, dword [ebp - 0x10]
mov word [eax], bx
jmp 0x1013e11
cmp edi, ebx
je 0x1013e32
mov word [edi], 0x2c
inc edi
inc edi
jmp 0x1013d9b
mov eax, dword [esi + 8]
cmp eax, 1
je 0x1013e42
cmp eax, ebx
jne 0x1013ec7
push dword [esi + 4]
call dword [sym.imp.MSVCRT.DLL_wcslen]
pop ecx
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax*2 + 4]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x1013ec5
and word [ebx], 0
cmp dword [esi + 8], 1
mov edi, dword [sym.imp.MSVCRT.DLL_wcscat]
jne 0x1013e87
push dword [esi + 4]
push ebx
call dword [sym.imp.MSVCRT.DLL_wcscpy]
pop ecx
pop ecx
push 0x10091ac
push ebx
call edi
pop ecx
pop ecx
push dword [ebp + 8]
push ebx
call edi
cmp dword [esi + 8], 0
pop ecx
pop ecx
jne 0x1013ea7
push 0x10091ac
push ebx
call edi
pop ecx
pop ecx
push dword [esi + 4]
push ebx
call edi
pop ecx
pop ecx
lea eax, [ebp - 0x11c]
cmp dword [ebp + 8], eax
je 0x1013ebb
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_LocalFree]
mov dword [ebp + 8], ebx
mov dword [ebp - 0x14], 1
xor ebx, ebx
cmp dword [ebp - 0x14], ebx
je 0x1013d34
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.DLL_wcslen]
pop ecx
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 8]
push 1
push ebx
push dword [esi]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.DLL_RegSetValueExW]
jmp 0x1013d34