Function at 0x140128350
Capabilities:
Query environment variable

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0x88
mov rax, qword [0x140178010]
xor rax, rsp
mov qword [rbp + 7], rax
mov ebx, edx
mov r14, r9
mov dword [rbp - 0x39], ebx
mov r12, r8
mov r13, rcx
mov rcx, qword [0x1401782b0]
lea rax, [0x1401782b0]
cmp rcx, rax
je 0x1401283b9
test byte [rcx + 0x1c], 1
je 0x1401283b9
cmp byte [rcx + 0x19], 4
jb 0x1401283b9
mov rcx, qword [rcx + 0x10]
lea r8, [0x140160800]
mov edx, 0x14
call fcn.140004c6c
xor edi, edi
test r13, r13
jne 0x1401283d8
lea r8, str.pMetadata
mov edx, 0x1b6
lea rcx, str.base_stor_blbengine_blbengutils_blbwriterutils.cpp
call fcn.14008624c
test r12, r12
jne 0x1401283f5
lea r8, str.pguidWriterId
mov edx, 0x1b7
lea rcx, str.base_stor_blbengine_blbengutils_blbwriterutils.cpp
call fcn.14008624c
movups xmm0, xmmword [0x140154f98]
movdqu xmmword [r12], xmm0
test r14, r14
je 0x14012840a
mov qword [r14], rdi
mov rcx, qword [r13 + 0x10]
mov rsi, rdi
mov qword [rbp - 0x29], rdi
mov qword [rbp - 0x31], rdi
mov dword [rbp - 0x21], edi
mov dword [rbp - 0x1d], edi
mov rcx, qword [rcx + rbx*8]
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov r15, rax
test rax, rax
jne 0x14012843b
mov edi, 0x8007000e
jmp 0x140128535
lea rdx, [rbp - 0x29]
mov rcx, rax
call qword [sym.imp.VSSAPI.DLL_CreateVssExamineWriterMetadataInternal]
mov edi, eax
test eax, eax
js 0x140128535
mov rdi, qword [rbp - 0x29]
mov rax, qword [rdi]
mov rbx, qword [rax + 0x18]
mov rcx, rbx
call qword [0x14014cce0]
lea rax, [rbp - 0x1d]
mov rcx, rdi
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0x31]
lea rax, [rbp - 0x21]
lea r8, [rbp - 0x19]
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 9]
call rbx
mov edi, eax
test eax, eax
js 0x140128535
test r14, r14
je 0x140128529
mov rcx, qword [r13 + 0x10]
xor r8d, r8d
mov r9d, dword [rbp - 0x39]
xor edx, edx
mov rcx, qword [rcx + r9*8]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebx, eax
test eax, eax
je 0x140128510
mov eax, ebx
mov ecx, 0xffffffff
add rax, rax
cmp rax, rcx
jbe 0x1401284cf
mov edi, 0x80070216
jmp 0x140128535
mov ecx, eax
mov edi, eax
call qword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov rsi, rax
test rax, rax
je 0x140128431
mov r8d, edi
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov rcx, qword [r13 + 0x10]
mov r8d, ebx
mov r9d, dword [rbp - 0x39]
mov rdx, rsi
xor edi, edi
mov rcx, qword [rcx + r9*8]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x140128526
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x140128535
mov qword [r14], rsi
movups xmm0, xmmword [rbp - 0x19]
xor esi, esi
movdqu xmmword [r12], xmm0
mov rcx, qword [rbp - 0x31]
test rcx, rcx
je 0x140128549
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
and qword [rbp - 0x31], 0
test r15, r15
je 0x140128557
mov rcx, r15
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov r14, qword [rbp - 0x29]
test r14, r14
je 0x140128575
mov rax, qword [r14]
mov rbx, qword [rax + 0x10]
mov rcx, rbx
call qword [0x14014cce0]
mov rcx, r14
call rbx
test rsi, rsi
je 0x140128583
mov rcx, rsi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [0x1401782b0]
lea rax, [0x1401782b0]
cmp rcx, rax
je 0x1401285b7
test byte [rcx + 0x1c], 1
je 0x1401285b7
cmp byte [rcx + 0x19], 4
jb 0x1401285b7
mov rcx, qword [rcx + 0x10]
lea r8, [0x140160800]
mov edx, 0x15
call fcn.140004c6c
mov eax, edi
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.1401474d0
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret