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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x470
mov rax, qword [0x10004a110]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov rsi, qword [rsp + 0x4c8]
mov r12, r9
mov qword [rsp + 0x20], rcx
mov rbp, rdx
lea r9, [0x10001edf0]
lea rcx, [rsp + 0x40]
lea r8, [0x100020780]
xor ebx, ebx
mov edx, 0x103
mov qword [rsp + 0x38], rbx
call fcn.10002e570
lea rdx, [rsp + 0x38]
mov qword [rsp + 0x20], rdx
lea rdx, [rsp + 0x40]
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x10003ee56
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x34]
lea r9, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
lea rdx, [0x100022e48]
xor r8d, r8d
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x34], 0x208
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
jne 0x10003ed72
mov edx, dword [rsp + 0x30]
cmp edx, 1
je 0x10003ec84
cmp edx, 2
jne 0x10003ed72
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x40]
repne scasw ax, word [rdi]
not rcx
dec rcx
cmp rcx, 5
jbe 0x10003ed72
cmp edx, 2
jne 0x10003ed1f
mov edi, 0x104
lea rdx, [rsp + 0x250]
lea rcx, [rsp + 0x40]
mov r8d, edi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, ebx
je 0x10003ee4b
lea rdx, [rsp + 0x250]
lea rax, [rsp + 0x40]
lea rcx, [rsp + 0x40]
sub rdx, rax
mov r8d, ebx
lea rax, [rdi + 0x7ffffefa]
cmp rax, rbx
je 0x10003ed04
movzx eax, word [rdx + rcx]
cmp ax, bx
je 0x10003ed04
mov word [rcx], ax
add rcx, 2
sub rdi, 1
jne 0x10003ece2
cmp rdi, rbx
jne 0x10003ed13
sub rcx, 2
mov r8d, 0x8007007a
cmp r8d, ebx
mov word [rcx], bx
jl 0x10003ee4b
lea rax, [rsp + 0x40]
cmp rax, rbx
je 0x10003ed43
lea rdx, [rsp + 0x250]
lea rcx, [rsp + 0x40]
mov r8d, 1
call fcn.100045e8c
jmp 0x10003ed48
mov eax, 0x80004003
cmp eax, ebx
jl 0x10003ed72
lea rax, [rsp + 0x250]
cmp rax, rbx
je 0x10003ed68
lea rcx, [rsp + 0x250]
call fcn.1000400f0
jmp 0x10003ed6a
mov eax, ebx
cmp eax, ebx
je 0x10003ee4b
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x34]
lea r9, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, [0x100020760]
mov edi, 0x12c
xor r8d, r8d
mov qword [rsp + 0x20], rbp
mov dword [rsp + 0x34], edi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
jne 0x10003ee4b
cmp dword [rsp + 0x30], 1
jne 0x10003ee4b
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x34]
lea r9, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, [0x100023048]
xor r8d, r8d
mov qword [rsp + 0x20], r12
mov dword [rsp + 0x34], edi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
jne 0x10003ee4b
cmp dword [rsp + 0x30], 1
jne 0x10003ee4b
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x34]
lea r9, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, [0x10001de60]
xor r8d, r8d
mov qword [rsp + 0x20], rsi
mov dword [rsp + 0x34], 0x208
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
jne 0x10003ee32
cmp dword [rsp + 0x30], 1
je 0x10003ee46
cmp dword [rsp + 0x30], 2
je 0x10003ee46
lea r8, [0x100001db4]
mov edx, 0x208
mov rcx, rsi
call fcn.10002e35c
mov ebx, 1
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.1000475f0
add rsp, 0x470
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret