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

Disassembly:
sub rsp, reloc.sqldk.dll_Ordinal_776
mov rax, qword [0x10042d0d0]
xor rax, rsp
mov qword [rsp + 0x2f8], rax
mov qword [rsp + 0x280], 0
mov dword [rsp + 0x250], reloc.sqldk.dll_Ordinal_260
mov dword [rsp + 0x25c], 0
mov qword [rsp + 0x278], 0
mov qword [rsp + 0x260], 0
mov qword [rsp + 0x268], 0
mov qword [rsp + 0x288], 0
mov dword [rsp + reloc.sqldk.dll_Ordinal_600], 0
mov dword [rsp + 0x274], 0
mov dword [rsp + 0x254], reloc.sqldk.dll_Ordinal_1033
lea rax, [rsp + 0x280]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.SoftwareMicrosoftMicrosoft_SQL_Server120
mov rcx, 0xffffffff80000002
call fcn.100416fd0
mov dword [rsp + 0x270], eax
cmp dword [rsp + 0x270], 0
je 0x1004184ab
jmp 0x100418b9c
lea rax, [rsp + 0x250]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.SharedCode
mov rcx, qword [rsp + 0x280]
call fcn.100417300
mov dword [rsp + 0x270], eax
cmp dword [rsp + 0x270], 0
je 0x1004184f2
jmp 0x100418b9c
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 + 0x268], 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 + 0x288], rax
cmp qword [rsp + 0x268], 0
je 0x100418552
cmp qword [rsp + 0x288], 0
jne 0x100418562
mov dword [rsp + 0x274], 1
jmp 0x100418777
xor edx, edx
xor ecx, ecx
call qword [rsp + 0x288]
mov dword [rsp + 0x25c], eax
mov eax, dword [rsp + 0x25c]
mov dword [rsp + 0x250], eax
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [rsp + 0x250]
lea eax, [rcx + rax + 2]
mov dword [rsp + 0x250], eax
cmp qword [rsp + 0x278], 0
je 0x10041863f
mov qword [rsp + reloc.sqlmin.dll_Ordinal_656], 0
mov eax, dword [rsp + 0x250]
shl rax, 1
mov qword [rsp + 0x2c8], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rsp + 0x2c8]
mov r9, rcx
mov r8, qword [rsp + 0x278]
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov qword [rsp + reloc.sqlmin.dll_Ordinal_656], rax
cmp qword [rsp + reloc.sqlmin.dll_Ordinal_656], 0
jne 0x10041862d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x278]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rsp + 0x278], 0
jmp 0x10041863d
mov rax, qword [rsp + reloc.sqlmin.dll_Ordinal_656]
mov qword [rsp + 0x278], rax
jmp 0x100418678
mov eax, dword [rsp + 0x250]
shl rax, 1
mov qword [rsp + 0x2d0], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rsp + 0x2d0]
mov r8, rcx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x278], rax
cmp qword [rsp + 0x278], 0
je 0x1004186a0
mov rdx, qword [rsp + 0x278]
mov ecx, dword [rsp + 0x250]
call qword [rsp + 0x288]
mov dword [rsp + 0x25c], eax
cmp qword [rsp + 0x278], 0
je 0x1004186bf
mov eax, dword [rsp + 0x250]
cmp dword [rsp + 0x25c], eax
jae 0x100418562
cmp qword [rsp + 0x278], 0
je 0x1004186d9
mov rax, qword [rsp + 0x278]
movzx eax, word [rax]
test eax, eax
jne 0x100418703
lea rcx, [rsp + 0x40]
call qword [rsp + Ordinal_621]
mov dword [rsp + reloc.sqldk.dll_Ordinal_600], eax
cmp dword [rsp + reloc.sqldk.dll_Ordinal_600], 0
jne 0x100418701
mov dword [rsp + 0x274], 1
jmp 0x100418777
mov dword [rsp + 0x28], 0xffffffff
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, 0xffffffff
mov r8, qword [rsp + 0x278]
mov edx, 1
mov ecx, dword [rsp + 0x254]
call qword [sym.imp.KERNEL32.dll_CompareStringW]
cmp eax, 2
je 0x10041876c
mov dword [rsp + 0x274], 1
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x278]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rsp + 0x278], 0
jmp 0x100418777
mov dword [rsp + reloc.sqldk.dll_Ordinal_600], 1
cmp dword [rsp + 0x274], 0
je 0x100418b9c
xor r8d, r8d
xor edx, edx
lea rcx, [0x100421da0]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [rsp + 0x25c], eax
mov eax, dword [rsp + 0x25c]
mov dword [rsp + 0x250], eax
cmp dword [rsp + 0x250], 0
jne 0x1004187d4
lea rdx, [rsp + 0x40]
lea rcx, [0x100421da0]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [rsp + reloc.sqldk.dll_Ordinal_600], eax
jmp 0x100418b9c
mov dword [rsp + 0x2a8], 0
mov qword [rsp + 0x2a0], 0
mov dword [rsp + 0x298], 0
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
mov dword [rsp + 0x29c], eax
mov eax, dword [rsp + 0x25c]
mov dword [rsp + 0x250], eax
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [rsp + 0x250]
lea eax, [rcx + rax + 2]
mov dword [rsp + 0x250], eax
cmp qword [rsp + 0x278], 0
je 0x1004188d6
mov qword [rsp + 0x2b0], 0
mov eax, dword [rsp + 0x250]
shl rax, 1
mov qword [rsp + 0x2d8], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rsp + 0x2d8]
mov r9, rcx
mov r8, qword [rsp + 0x278]
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov qword [rsp + 0x2b0], rax
cmp qword [rsp + 0x2b0], 0
jne 0x1004188c4
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x278]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rsp + 0x278], 0
jmp 0x1004188d4
mov rax, qword [rsp + 0x2b0]
mov qword [rsp + 0x278], rax
jmp 0x10041890f
mov eax, dword [rsp + 0x250]
shl rax, 1
mov qword [rsp + 0x2e0], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rsp + 0x2e0]
mov r8, rcx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x278], rax
cmp qword [rsp + 0x278], 0
je 0x10041893e
mov r8d, dword [rsp + 0x250]
mov rdx, qword [rsp + 0x278]
lea rcx, [0x100421da0]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [rsp + 0x25c], eax
cmp qword [rsp + 0x278], 0
je 0x10041895d
mov eax, dword [rsp + 0x250]
cmp dword [rsp + 0x25c], eax
jae 0x10041880b
mov rax, qword [rsp + 0x278]
mov qword [rsp + 0x2a0], rax
mov eax, dword [rsp + 0x25c]
add eax, 1
mov dword [rsp + 0x298], eax
cmp dword [rsp + 0x2a8], 0
jne 0x100418aba
mov eax, dword [rsp + 0x29c]
cmp dword [rsp + 0x298], eax
jb 0x100418aba
mov dword [rsp + 0x2bc], 0
mov dword [rsp + 0x2b8], 0
mov word [rsp + 0x2c0], 0
mov eax, dword [rsp + 0x2bc]
mov rcx, qword [rsp + 0x2a0]
movzx eax, word [rcx + rax*2]
mov word [rsp + 0x2c0], ax
movzx eax, word [rsp + 0x2c0]
mov ecx, dword [rsp + 0x2bc]
movzx ecx, word [rsp + rcx*2 + 0x40]
cmp eax, ecx
jne 0x100418a00
mov dword [rsp + 0x2e8], 1
jmp 0x100418a0b
mov dword [rsp + 0x2e8], 0
mov eax, dword [rsp + 0x2e8]
mov dword [rsp + 0x2b8], eax
cmp dword [rsp + 0x2b8], 0
je 0x100418a4e
mov eax, dword [rsp + 0x29c]
sub eax, 1
cmp dword [rsp + 0x2bc], eax
jne 0x100418a38
jmp 0x100418a4e
mov eax, dword [rsp + 0x2bc]
add eax, 1
mov dword [rsp + 0x2bc], eax
jmp 0x1004189c0
cmp dword [rsp + 0x2b8], 0
je 0x100418a65
mov dword [rsp + 0x2a8], 1
jmp 0x100418a90
mov eax, dword [rsp + 0x29c]
sub eax, 1
cmp dword [rsp + 0x2bc], eax
jne 0x100418a90
movzx eax, word [rsp + 0x2c0]
cmp eax, 0x3b
jne 0x100418a90
mov dword [rsp + 0x2a8], 1
mov rax, qword [rsp + 0x2a0]
add rax, 2
mov qword [rsp + 0x2a0], rax
mov eax, dword [rsp + 0x298]
sub eax, 1
mov dword [rsp + 0x298], eax
jmp 0x10041897e
cmp dword [rsp + 0x2a8], 0
je 0x100418ad4
mov dword [rsp + reloc.sqldk.dll_Ordinal_600], 1
jmp 0x100418b9c
mov eax, dword [rsp + 0x250]
shl rax, 1
mov qword [rsp + 0x2f0], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rsp + 0x2f0]
mov r8, rcx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x260], rax
cmp qword [rsp + 0x278], 0
je 0x100418b9c
cmp qword [rsp + 0x260], 0
je 0x100418b9c
mov eax, dword [rsp + 0x250]
lea r8, [rsp + 0x40]
mov rdx, rax
mov rcx, qword [rsp + 0x260]
call fcn.100418cc0
mov eax, dword [rsp + 0x250]
lea r8, [0x100421d9c]
mov rdx, rax
mov rcx, qword [rsp + 0x260]
call fcn.100418d30
mov eax, dword [rsp + 0x250]
mov r8, qword [rsp + 0x278]
mov rdx, rax
mov rcx, qword [rsp + 0x260]
call fcn.100418d30
mov rdx, qword [rsp + 0x260]
lea rcx, [0x100421da0]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [rsp + reloc.sqldk.dll_Ordinal_600], eax
cmp qword [rsp + 0x278], 0
je 0x100418bcc
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x278]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rsp + 0x278], 0
cmp qword [rsp + 0x260], 0
je 0x100418bfc
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x260]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rsp + 0x260], 0
cmp qword [rsp + 0x280], 0
je 0x100418c14
mov rcx, qword [rsp + 0x280]
call fcn.100417ed0
mov eax, dword [rsp + reloc.sqldk.dll_Ordinal_600]
mov rcx, qword [rsp + 0x2f8]
xor rcx, rsp
call fcn.1004013c0
add rsp, reloc.sqldk.dll_Ordinal_776
ret