Function at 0x100463030
Capabilities:
Query environment variable
Set environment variable

Disassembly:
sub rsp, 0x318
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rsp + 0x300], rax
mov qword [rsp + 0x70], 0
mov dword [rsp + 0x30], 0x104
mov dword [rsp + 0x40], 0
mov eax, dword [rsp + 0x30]
shl rax, 1
mov dword [rsp + 0x78], eax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0xa0], 0
mov qword [rsp + 0x88], 0
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x58], 0
mov dword [rsp + 0x90], 0x409
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.SoftwareMicrosoftMicrosoft_SQL_Server150
mov rcx, 0xffffffff80000002
call fcn.100454d60
mov dword [rsp + 0x64], eax
cmp dword [rsp + 0x64], 0
je 0x1004630e8
jmp 0x100463706
lea rax, [rsp + 0x78]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xf0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.SharedCode
mov rcx, qword [rsp + 0x70]
call fcn.100454d90
mov dword [rsp + 0x64], eax
cmp dword [rsp + 0x64], 0
je 0x100463126
jmp 0x100463706
mov eax, dword [rsp + 0x78]
xor edx, edx
mov ecx, 2
div rcx
mov dword [rsp + 0x30], eax
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea rdx, str.SetDllDirectoryW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0xa0], rax
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea rdx, str.GetDllDirectoryW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x88], rax
cmp qword [rsp + 0xa0], 0
je 0x100463198
cmp qword [rsp + 0x88], 0
jne 0x1004631a5
mov dword [rsp + 0x58], 1
jmp 0x1004633ae
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0xb0], rax
xor edx, edx
xor ecx, ecx
mov rax, qword [rsp + 0xb0]
call qword [case.0x10044bd0b.0]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x30], eax
lea rcx, [rsp + 0xf0]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [rsp + 0x30]
lea eax, [rcx + rax + 2]
mov dword [rsp + 0x30], eax
cmp qword [rsp + 0x38], 0
je 0x10046327b
mov qword [rsp + 0x98], 0
mov eax, dword [rsp + 0x30]
shl rax, 1
mov qword [rsp + 0xb8], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rsp + 0xb8]
mov r9, rcx
mov r8, qword [rsp + 0x38]
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov qword [rsp + 0x98], rax
cmp qword [rsp + 0x98], 0
jne 0x10046326c
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rsp + 0x38], 0
jmp 0x100463279
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0x38], rax
jmp 0x1004632ae
mov eax, dword [rsp + 0x30]
shl rax, 1
mov qword [rsp + 0xc0], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rsp + 0xc0]
mov r8, rcx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
je 0x1004632e1
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0xc8], rax
mov rdx, qword [rsp + 0x38]
mov ecx, dword [rsp + 0x30]
mov rax, qword [rsp + 0xc8]
call qword [case.0x10044bd0b.0]
mov dword [rsp + 0x40], eax
cmp qword [rsp + 0x38], 0
je 0x1004632f7
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x40], eax
jae 0x1004631a5
cmp qword [rsp + 0x38], 0
je 0x10046330b
mov rax, qword [rsp + 0x38]
movzx eax, word [rax]
test eax, eax
jne 0x100463346
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0xd0], rax
lea rcx, [rsp + 0xf0]
mov rax, qword [rsp + 0xd0]
call qword [case.0x10044bd0b.0]
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x48], 0
jne 0x100463344
mov dword [rsp + 0x58], 1
jmp 0x1004633ae
mov dword [rsp + 0x28], 0xffffffff
lea rax, [rsp + 0xf0]
mov qword [rsp + 0x20], rax
mov r9d, 0xffffffff
mov r8, qword [rsp + 0x38]
mov edx, 1
mov ecx, dword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_CompareStringW]
cmp eax, 2
je 0x1004633a6
mov dword [rsp + 0x58], 1
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rsp + 0x38], 0
jmp 0x1004633ae
mov dword [rsp + 0x48], 1
cmp dword [rsp + 0x58], 0
je 0x100463706
xor r8d, r8d
xor edx, edx
lea rcx, str.Path
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0
jne 0x1004633fc
lea rdx, [rsp + 0xf0]
lea rcx, str.Path
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [rsp + 0x48], eax
jmp 0x100463706
mov dword [rsp + 0x60], 0
mov qword [rsp + 0x80], 0
mov dword [rsp + 0x5c], 0
lea rcx, [rsp + 0xf0]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
mov dword [rsp + 0x6c], eax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x30], eax
lea rcx, [rsp + 0xf0]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [rsp + 0x30]
lea eax, [rcx + rax + 2]
mov dword [rsp + 0x30], eax
cmp qword [rsp + 0x38], 0
je 0x1004634dc
mov qword [rsp + 0xa8], 0
mov eax, dword [rsp + 0x30]
shl rax, 1
mov qword [rsp + 0xd8], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rsp + 0xd8]
mov r9, rcx
mov r8, qword [rsp + 0x38]
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov qword [rsp + 0xa8], rax
cmp qword [rsp + 0xa8], 0
jne 0x1004634cd
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rsp + 0x38], 0
jmp 0x1004634da
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x38], rax
jmp 0x10046350f
mov eax, dword [rsp + 0x30]
shl rax, 1
mov qword [rsp + 0xe0], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rsp + 0xe0]
mov r8, rcx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
je 0x100463532
mov r8d, dword [rsp + 0x30]
mov rdx, qword [rsp + 0x38]
lea rcx, str.Path
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [rsp + 0x40], eax
cmp qword [rsp + 0x38], 0
je 0x100463548
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x40], eax
jae 0x10046342c
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x80], rax
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x5c], eax
cmp qword [rsp + 0x80], 0
je 0x100463655
cmp dword [rsp + 0x60], 0
jne 0x100463655
mov eax, dword [rsp + 0x6c]
cmp dword [rsp + 0x5c], eax
jb 0x100463655
mov dword [rsp + 0x4c], 0
mov dword [rsp + 0x68], 0
xor eax, eax
mov word [rsp + 0x44], ax
mov eax, dword [rsp + 0x4c]
mov rcx, qword [rsp + 0x80]
movzx eax, word [rcx + rax*2]
mov word [rsp + 0x44], ax
movzx eax, word [rsp + 0x44]
mov ecx, dword [rsp + 0x4c]
movzx ecx, word [rsp + rcx*2 + 0xf0]
cmp eax, ecx
jne 0x1004635d2
mov dword [rsp + 0x7c], 1
jmp 0x1004635da
mov dword [rsp + 0x7c], 0
mov eax, dword [rsp + 0x7c]
mov dword [rsp + 0x68], eax
cmp dword [rsp + 0x68], 0
je 0x100463603
mov eax, dword [rsp + 0x6c]
dec eax
cmp dword [rsp + 0x4c], eax
jne 0x1004635f7
jmp 0x100463603
mov eax, dword [rsp + 0x4c]
inc eax
mov dword [rsp + 0x4c], eax
jmp 0x10046359e
cmp dword [rsp + 0x68], 0
je 0x100463614
mov dword [rsp + 0x60], 1
jmp 0x100463632
mov eax, dword [rsp + 0x6c]
dec eax
cmp dword [rsp + 0x4c], eax
jne 0x100463632
movzx eax, word [rsp + 0x44]
cmp eax, 0x3b
jne 0x100463632
mov dword [rsp + 0x60], 1
mov rax, qword [rsp + 0x80]
add rax, 2
mov qword [rsp + 0x80], rax
mov eax, dword [rsp + 0x5c]
dec eax
mov dword [rsp + 0x5c], eax
jmp 0x10046356e
cmp dword [rsp + 0x60], 0
je 0x100463669
mov dword [rsp + 0x48], 1
jmp 0x100463706
mov eax, dword [rsp + 0x30]
shl rax, 1
mov qword [rsp + 0xe8], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rsp + 0xe8]
mov r8, rcx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x38], 0
je 0x100463706
cmp qword [rsp + 0x50], 0
je 0x100463706
mov eax, dword [rsp + 0x30]
lea r8, [rsp + 0xf0]
mov edx, eax
mov rcx, qword [rsp + 0x50]
call fcn.100462cc0
mov eax, dword [rsp + 0x30]
lea r8, [0x10047f160]
mov edx, eax
mov rcx, qword [rsp + 0x50]
call fcn.100462d40
mov eax, dword [rsp + 0x30]
mov r8, qword [rsp + 0x38]
mov edx, eax
mov rcx, qword [rsp + 0x50]
call fcn.100462d40
mov rdx, qword [rsp + 0x50]
lea rcx, str.Path
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [rsp + 0x48], eax
cmp qword [rsp + 0x38], 0
je 0x10046372d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rsp + 0x38], 0
cmp qword [rsp + 0x50], 0
je 0x100463754
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x50]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rsp + 0x50], 0
cmp qword [rsp + 0x70], 0
je 0x100463766
mov rcx, qword [rsp + 0x70]
call fcn.100454920
mov eax, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x300]
xor rcx, rsp
call fcn.100469360
add rsp, 0x318
ret