Function at 0x140091c40
Capabilities:
Check if file exists
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x380]
sub rsp, 0x480
mov rax, qword [0x14011d8d0]
xor rax, rsp
mov qword [rbp + 0x370], rax
lea rcx, [rbp - 0x80]
mov r13, r9
mov qword [rsp + 0x68], r9
mov r15, r8
mov rbx, rdx
mov r14d, 0x80004005
call fcn.14004a620
xor r12d, r12d
lea rcx, [rbp]
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x58], r12
call fcn.140048570
mov rax, qword [0x14011d880]
lea rcx, [0x14011d880]
call qword [rax + 0x18]
lea rcx, [0x14011d880]
add rax, 0x18
mov qword [rsp + 0x28], rax
mov rax, qword [0x14011d880]
call qword [rax + 0x18]
lea rdx, [0x1400de328]
add rax, 0x18
mov qword [rsp + 0x40], rax
test rdx, 0xffffffffffff0000
jne 0x140091d0f
movzx edi, dx
xor edx, edx
mov ecx, edi
call fcn.1400017e0
test rax, rax
je 0x140091d1c
lea rcx, [rsp + 0x40]
mov r8d, edi
mov rdx, rax
call fcn.140001f70
jmp 0x140091d1c
lea rcx, [rsp + 0x40]
xor r8d, r8d
call fcn.140001e80
lea r8, [rsp + 0x40]
lea rcx, [rbp - 0x80]
mov edx, 1
call fcn.1400480e0
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
or rsi, 0xffffffffffffffff
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140091d52
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, qword [0x14011d880]
lea rcx, [0x14011d880]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x38], rax
test rbx, rbx
je 0x140091db0
test rbx, 0xffffffffffff0000
jne 0x140091d9d
movzx edi, bx
xor edx, edx
mov ecx, edi
call fcn.1400017e0
test rax, rax
je 0x140091dc3
lea rcx, [rsp + 0x38]
mov r8d, edi
mov rdx, rax
call fcn.140001f70
jmp 0x140091dc3
xor eax, eax
mov rcx, rsi
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
dec rcx
jmp 0x140091db3
mov ecx, r12d
mov r8d, ecx
lea rcx, [rsp + 0x38]
mov rdx, rbx
call fcn.140001e80
lea r8, [rsp + 0x48]
lea rdx, [rsp + 0x38]
lea rcx, [rbp - 0x80]
call fcn.14004bf40
mov rdx, qword [rsp + 0x38]
mov eax, esi
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140091df5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, qword [0x14011d880]
lea rcx, [0x14011d880]
call qword [rax + 0x18]
lea rcx, [0x14011d880]
lea rbx, [rax + 0x18]
mov rax, qword [0x14011d880]
mov qword [rsp + 0x20], rbx
call qword [rax + 0x18]
mov rcx, qword [rsp + 0x50]
sub rcx, qword [rsp + 0x48]
add rax, 0x18
mov qword [rsp + 0x30], rax
movabs rax, 0x2e8ba2e8ba2e8ba3
imul rcx
sar rdx, 6
mov rax, rdx
shr rax, 0x3f
add rdx, rax
je 0x14009223a
lea rcx, [rbp + 0x162]
xor edx, edx
mov r8d, 0x206
mov word [rbp + 0x160], r12w
call sub.MSVCR100.dll_memset
lea rdx, [rbp + 0x160]
lea rcx, str._SystemDrive_
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140091fb7
xor eax, eax
lea rdi, [rbp + 0x160]
mov rcx, rsi
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x140091f0e
mov rdi, qword [rbx - 0x18]
cmp dword [rbx - 0x10], eax
lea rdx, [rbx - 0x18]
je 0x140091f9b
cmp dword [rdx + 0x10], eax
jge 0x140091ee1
cmp dword [rbx - 0xc], eax
jge 0x140091ed4
mov ecx, 0x80070057
call fcn.140001000
int3
mov dword [rbx - 0x10], r12d
mov word [rbx], r12w
jmp 0x140091f9b
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140091ef7
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x20], rax
jmp 0x140091f9b
mov r13d, dword [rbx - 0x10]
lea r12, [rbp + 0x160]
sub r12, rbx
sar r12, 1
test ecx, ecx
jns 0x140091f2e
mov ecx, 0x80070057
call fcn.140001000
int3
mov eax, dword [rbx - 0xc]
mov ecx, 1
sub ecx, dword [rbx - 8]
sub eax, edi
or ecx, eax
jge 0x140091f50
lea rcx, [rsp + 0x20]
mov edx, edi
call fcn.140001c20
mov rbx, qword [rsp + 0x20]
movsxd rdx, dword [rbx - 0xc]
movsxd rax, edi
mov rcx, rbx
add rdx, rdx
cmp r12, r13
lea r13, [rax + rax]
mov r9, r13
ja 0x140091f75
lea r8, [rbx + r12*2]
call qword [sym.imp.MSVCR100.dll_memmove_s]
jmp 0x140091f82
lea r8, [rbp + 0x160]
call qword [sym.imp.MSVCR100.dll_memcpy_s]
cmp edi, dword [rbx - 0xc]
jg 0x140092017
xor eax, eax
mov dword [rbx - 0x10], edi
mov word [r13 + rbx], ax
mov r13, qword [rsp + 0x68]
lea rdx, [0x1400e73b8]
lea rcx, [rsp + 0x20]
mov r8d, 7
call fcn.140003c10
mov rbx, qword [rsp + 0x20]
mov rax, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x28]
mov rdx, qword [rax + 0x48]
lea r12, [rdi - 0x18]
lea rcx, [rdx - 0x18]
cmp rcx, r12
je 0x140092035
cmp dword [r12 + 0x10], 0
jl 0x140092022
mov rax, qword [r12]
cmp qword [rcx], rax
jne 0x140092022
call fcn.140001b90
mov ecx, esi
mov rdi, rax
lock xadd dword [r12 + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x140092007
mov rcx, qword [r12]
mov rdx, r12
mov rax, qword [rcx]
call qword [rax + 8]
mov rbx, qword [rsp + 0x20]
add rdi, 0x18
mov qword [rsp + 0x28], rdi
jmp 0x140092035
mov ecx, 0x80070057
call fcn.140001000
int3
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x28]
call fcn.140001e80
mov rdi, qword [rsp + 0x28]
mov edx, Ordinal_49
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_wcsrchr]
test rax, rax
je 0x140092214
sub rax, rdi
sar rax, 1
cmp eax, 0xffffffff
je 0x140092214
lea r8d, [rax + 1]
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x28]
call fcn.140006920
add rdi, 0xffffffffffffffe8
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
cmp rcx, rdi
je 0x1400920c6
cmp dword [rdi + 0x10], 0
jl 0x1400920b8
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x1400920b8
call fcn.140001b90
mov ecx, esi
mov rbx, rax
lock xadd dword [rdi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x1400920ad
mov rcx, qword [rdi]
mov rdx, rdi
mov rax, qword [rcx]
call qword [rax + 8]
lea rax, [rbx + 0x18]
mov qword [rsp + 0x28], rax
jmp 0x1400920c6
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x28]
call fcn.140001e80
mov rdx, qword [rsp + 0x78]
mov eax, esi
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400920e5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdi, qword [rsp + 0x28]
mov edx, Ordinal_49
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_wcsrchr]
test rax, rax
je 0x14009220f
sub rax, rdi
sar rax, 1
cmp eax, 0xffffffff
je 0x14009220f
lea rdx, [0x1400ddd20]
lea rcx, [rsp + 0x20]
mov r8d, 1
call fcn.140003c10
mov edx, Ordinal_49
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_wcsrchr]
test rax, rax
jne 0x14009213e
mov eax, esi
jmp 0x140092144
sub rax, rdi
sar rax, 1
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x28]
mov r8d, eax
call fcn.140001d30
lea rcx, [rsp + 0x20]
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
call fcn.140003c10
mov rdx, qword [rsp + 0x70]
mov eax, esi
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140092186
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdx, qword [rsp + 0x20]
mov rdi, qword [rsp + 0x30]
lea rcx, [rdx - 0x18]
add rdi, 0xffffffffffffffe8
cmp rcx, rdi
je 0x1400921e5
cmp dword [rdi + 0x10], 0
jl 0x1400921d7
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x1400921d7
call fcn.140001b90
mov ecx, esi
mov rbx, rax
lock xadd dword [rdi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x1400921cc
mov rcx, qword [rdi]
mov rdx, rdi
mov rax, qword [rcx]
call qword [rax + 8]
lea rax, [rbx + 0x18]
mov qword [rsp + 0x30], rax
jmp 0x1400921e5
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.140001e80
lea rdx, [0x1400ddd20]
lea rcx, [rsp + 0x20]
mov r8d, 1
call fcn.140003c10
mov rdx, qword [rsp + 0x28]
lea rcx, [rsp + 0x20]
mov r8d, dword [rdx - 0x10]
call fcn.140003c10
mov rbx, qword [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140092237
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
xor r12d, r12d
mov qword [r15], rax
mov r14d, r12d
jmp 0x14009223a
xor r12d, r12d
mov rdx, qword [rsp + 0x30]
mov dword [r13], r14d
mov eax, esi
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14009225d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdx, qword [rsp + 0x20]
mov eax, esi
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14009227c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdx, qword [rsp + 0x28]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x140092299
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
lea rcx, [rbp]
call fcn.14002be60
mov rdi, qword [rsp + 0x48]
test rdi, rdi
je 0x1400922d7
mov rbx, qword [rsp + 0x50]
cmp rdi, rbx
je 0x1400922cf
mov rcx, rdi
call fcn.14002be60
add rdi, 0x160
cmp rdi, rbx
jne 0x1400922b6
mov rdi, qword [rsp + 0x48]
mov rcx, rdi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
lea rcx, [rbp - 0x80]
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x58], r12
call fcn.14004bd80
xor eax, eax
mov rcx, qword [rbp + 0x370]
xor rcx, rsp
call fcn.1400cafa0
mov rbx, qword [rsp + 0x4c0]
add rsp, 0x480
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret