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

Disassembly:
mov edi, edi
push ebp
lea ebp, [esp - 0x20c]
sub esp, 0x20c
push 0xfffffffffffffffe
push 0x413ac0
push 0x40c0ae
mov eax, dword fs:[0]
push eax
add esp, 0xffffffa8
mov eax, dword [section..data]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x208], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x20], 0x104
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x68], 0x409
mov dword [ebp - 4], 0
lea eax, [ebp - 0x44]
push eax
push 0x20019
push 0
push str.SoftwareMicrosoftMicrosoft_SQL_Server110
push 0x80000002
call fcn.0040b520
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
je 0x40a398
jmp 0x40a77d
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp]
push edx
push 0
push 0
push str.SharedCode
mov eax, dword [ebp - 0x44]
push eax
call fcn.0040b570
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
je 0x40a3c0
jmp 0x40a77d
push str.SetDllDirectoryW
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x64], eax
push str.GetDllDirectoryW
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x64], 0
je 0x40a400
cmp dword [ebp - 0x48], 0
jne 0x40a40c
mov dword [ebp - 0x40], 1
jmp 0x40a531
push 0
push 0
call dword [ebp - 0x48]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x20], ecx
lea edx, [ebp]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x20]
lea edx, [ecx + eax + 2]
mov dword [ebp - 0x20], edx
cmp dword [ebp - 0x1c], 0
je 0x40a483
mov dword [ebp - 0x50], 0
mov eax, dword [ebp - 0x20]
shl eax, 1
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x40a47b
mov edx, dword [ebp - 0x1c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 0x1c], 0
jmp 0x40a481
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x1c], eax
jmp 0x40a49b
mov ecx, dword [ebp - 0x20]
shl ecx, 1
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x40a4af
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [ebp - 0x48]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x1c], 0
je 0x40a4c1
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp - 0x20]
jae 0x40a40c
cmp dword [ebp - 0x1c], 0
je 0x40a4d1
mov edx, dword [ebp - 0x1c]
movzx eax, word [edx]
test eax, eax
jne 0x40a4ea
lea ecx, [ebp]
push ecx
call dword [ebp - 0x64]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x40a4e8
mov dword [ebp - 0x40], 1
jmp 0x40a531
push 0xffffffffffffffff
lea edx, [ebp]
push edx
push 0xffffffffffffffff
mov eax, dword [ebp - 0x1c]
push eax
push 1
mov ecx, dword [ebp - 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_CompareStringW]
cmp eax, 2
je 0x40a52a
mov dword [ebp - 0x40], 1
mov edx, dword [ebp - 0x1c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 0x1c], 0
jmp 0x40a531
mov dword [ebp - 0x2c], 1
cmp dword [ebp - 0x40], 0
je 0x40a77d
push 0
push 0
push str.Path
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x40a570
lea ecx, [ebp]
push ecx
push str.Path
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [ebp - 0x2c], eax
jmp 0x40a77d
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x38], 0
lea edx, [ebp]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
lea ecx, [ebp]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [ebp - 0x20]
lea eax, [edx + eax + 2]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x1c], 0
je 0x40a602
mov dword [ebp - 0x5c], 0
mov ecx, dword [ebp - 0x20]
shl ecx, 1
push ecx
mov edx, dword [ebp - 0x1c]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
jne 0x40a5fa
mov eax, dword [ebp - 0x1c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 0x1c], 0
jmp 0x40a600
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x1c], ecx
jmp 0x40a61a
mov edx, dword [ebp - 0x20]
shl edx, 1
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x40a636
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
push str.Path
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x1c], 0
je 0x40a648
mov edx, dword [ebp - 0x24]
cmp edx, dword [ebp - 0x20]
jae 0x40a595
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x4c], eax
mov ecx, dword [ebp - 0x24]
add ecx, 1
mov dword [ebp - 0x38], ecx
cmp dword [ebp - 0x3c], 0
jne 0x40a704
mov edx, dword [ebp - 0x38]
cmp edx, dword [ebp - 0x58]
jb 0x40a704
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x54], 0
xor eax, eax
mov word [ebp - 0x30], ax
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x4c]
mov ax, word [edx + ecx*2]
mov word [ebp - 0x30], ax
movzx ecx, word [ebp - 0x30]
mov edx, dword [ebp - 0x34]
movzx eax, word [ebp + edx*2]
xor edx, edx
cmp ecx, eax
sete dl
mov dword [ebp - 0x54], edx
cmp dword [ebp - 0x54], 0
je 0x40a6c3
mov eax, dword [ebp - 0x58]
sub eax, 1
cmp dword [ebp - 0x34], eax
jne 0x40a6b8
jmp 0x40a6c3
mov ecx, dword [ebp - 0x34]
add ecx, 1
mov dword [ebp - 0x34], ecx
jmp 0x40a681
cmp dword [ebp - 0x54], 0
je 0x40a6d2
mov dword [ebp - 0x3c], 1
jmp 0x40a6ed
mov edx, dword [ebp - 0x58]
sub edx, 1
cmp dword [ebp - 0x34], edx
jne 0x40a6ed
movzx eax, word [ebp - 0x30]
cmp eax, 0x3b
jne 0x40a6ed
mov dword [ebp - 0x3c], 1
mov ecx, dword [ebp - 0x4c]
add ecx, 2
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x38]
sub edx, 1
mov dword [ebp - 0x38], edx
jmp 0x40a657
cmp dword [ebp - 0x3c], 0
je 0x40a713
mov dword [ebp - 0x2c], 1
jmp 0x40a77d
mov eax, dword [ebp - 0x20]
shl eax, 1
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x1c], 0
je 0x40a77d
cmp dword [ebp - 0x28], 0
je 0x40a77d
lea ecx, [ebp]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x28]
push eax
call fcn.0040a080
push 0x4135a4
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call fcn.0040a0d0
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call fcn.0040a0d0
mov eax, dword [ebp - 0x28]
push eax
push str.Path
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], 0xfffffffe
call fcn.0040a78b
jmp 0x40a7db
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x208]
xor ecx, ebp
call fcn.0040bb9d
add ebp, 0x20c
mov esp, ebp
pop ebp
ret