Function at 0x1400bbaf4
Capabilities:
Query environment variable
Read file on windows

Disassembly:
push r13
push r14
push r15
mov eax, 0x2770
call fcn.1400f31b0
sub rsp, rax
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x2798], rbx
mov qword [rsp + 0x27a0], rdi
mov qword [rsp + 0x27a8], r12
mov rax, qword [0x1401542d0]
xor rax, rsp
mov qword [rsp + 0x2760], rax
mov r12b, cl
xor edi, edi
test dl, dl
je 0x1400bbb5e
cmp word [0x14016a7ae], di
je 0x1400bbbc3
cmp qword [0x1401b1fe8], rdi
je 0x1400bbbc3
mov word [0x14016a7ae], di
jmp 0x1400bbbc3
mov cl, 1
call fcn.1400c1fb8
mov dword [0x14016d8f8], 3
mov qword [0x14015bc18], rdi
mov cl, byte [0x14015bbe2]
test cl, cl
jne 0x1400bbcbd
xor r8d, r8d
lea rdx, [0x140173d10]
lea rcx, [0x140181400]
call fcn.14003f38c
cmp byte [0x140182482], dil
je 0x1400bbbc3
mov eax, dword [0x14016d8f4]
mov r14d, 4
cmp qword [0x140173d40], 1
cmova eax, r14d
mov dword [0x14016d8f4], eax
jmp 0x1400bbbc9
mov r14d, 4
mov cl, byte [0x14015bbe2]
test cl, cl
jne 0x1400bbcc3
cmp word [0x140172d0a], di
jne 0x1400bbcc3
mov r12b, dil
mov ebx, 0x800
mov r8d, ebx
lea rdx, [0x140172d0a]
mov ecx, dword [0x14016fca8]
call fcn.1400c1afc
mov dword [rsp + 0x20], ebx
lea r13, [0x140111128]
mov r9, r13
lea r8, [rsp + 0x1760]
lea rdx, str.DefFolder
lea rcx, [0x1401119c8]
call fcn.1400a0710
cmp word [rsp + 0x1760], di
jne 0x1400bbc56
cmp byte [0x140182482], dil
je 0x1400bbc94
mov edx, ebx
lea rcx, [rsp + 0x1760]
call fcn.140039cc0
cmp word [rsp + 0x1760], di
je 0x1400bbc94
mov rdx, rbx
lea rcx, [rsp + 0x1760]
call fcn.1400782a4
mov r8, rbx
lea rdx, [0x140172d0a]
lea rcx, [rsp + 0x1760]
call fcn.14008efc8
mov r8, rbx
lea rdx, [rsp + 0x1760]
lea rcx, [0x140172d0a]
call fcn.14008eff0
cmp word [0x1401687a8], di
setne r8b
mov r9d, dword [0x14016fca8]
mov rdx, rbx
lea rcx, [0x140172d0a]
call fcn.1400c5774
mov cl, byte [0x14015bbe2]
jmp 0x1400bbccf
mov r14d, 4
lea r13, [0x140111128]
mov ebx, 0x800
mov eax, dword [0x14016d8f4]
mov edx, 2
test eax, eax
cmove eax, edx
mov dword [0x14016d8f4], eax
test cl, cl
je 0x1400bbe49
mov r15d, dword [0x14017e624]
cmp r15d, 1
jbe 0x1400bbd39
cmp dword [0x14016d8c4], 3
je 0x1400bc284
lea ecx, [rdx + 0x63]
call fcn.140088ebc
mov rbx, rax
mov ecx, 0x1fd
call fcn.140088ebc
mov rdx, rax
mov r9d, 0x30
mov r8, rbx
mov rcx, qword [0x14015bc78]
call fcn.1400c81a0
jmp 0x1400bc284
mov r8, rbx
lea rdx, [0x140172d0a]
lea rcx, [0x14017e620]
call fcn.140005120
mov r8, rbx
lea rdx, [0x14016b7c0]
lea rcx, [0x14017e620]
call fcn.1400054f8
cmp word [0x14016b7c0], di
je 0x1400bbd7d
mov rdx, rbx
lea rcx, [0x14016b7c0]
call fcn.1400782a4
mov byte [0x14016d969], dil
lea rdx, [rsp + 0x110]
lea rcx, [0x14017e620]
call fcn.140005518
mov eax, dword [rsp + 0x258]
mov dword [0x14016fca8], eax
mov qword [rsp + 0x1320], rdi
mov qword [rsp + 0x1328], rdi
mov qword [rsp + 0x1330], rdi
xor r8d, r8d
lea rdx, [rsp + 0x310]
lea rcx, [0x140172d0a]
call fcn.14006a780
test al, al
je 0x1400bbde3
cmp qword [rsp + 0x1310], 0x18
je 0x1400bbe04
cmp dword [rsp + 0x258], edi
jne 0x1400bbdfd
cmp byte [rsp + 0x190], dil
mov byte [0x14016d950], 1
jne 0x1400bbe04
mov byte [0x14016d950], dil
test r15d, r15d
jne 0x1400bbe12
cmp dword [rsp + 0x2e0], edi
je 0x1400bbe20
movzx eax, byte [rsp + 0x252]
mov dword [0x14016d8e4], eax
cmp qword [rsp + 0x248], rdi
je 0x1400bbe42
mov r8, rbx
lea rdx, [0x140111558]
lea rcx, [0x1401687a8]
call fcn.14008eff0
jmp 0x1400bbe49
mov word [0x1401687a8], di
mov rcx, qword [0x14015bc78]
call qword [sym.imp.USER32.dll_IsWindowVisible]
neg eax
sbb rcx, rcx
and rcx, qword [0x14015bc78]
xor r8d, r8d
mov dl, r12b
call fcn.1400bee38
test al, al
je 0x1400bc265
mov al, byte [0x1401b2007]
neg al
sbb ecx, ecx
and ecx, dword [0x1401b2008]
mov dword [0x14016d8d8], ecx
mov rcx, qword [0x1401b1fe8]
test rcx, rcx
je 0x1400bbe9e
call fcn.1400c609c
jmp 0x1400bbec2
cmp byte [0x14015bbe2], dil
je 0x1400bbec2
cmp qword [rsp + 0x248], rdi
je 0x1400bbec2
cmp word [0x1401687a8], 0x2a
jne 0x1400bbec2
mov word [0x1401687a8], di
cmp qword [0x140173d40], rdi
jne 0x1400bbeff
mov ecx, 0x65
call fcn.140088ebc
mov rbx, rax
mov ecx, 0x14b
call fcn.140088ebc
mov rdx, rax
mov r9d, 0x30
mov r8, rbx
mov rcx, qword [0x14015bc78]
call fcn.1400c81a0
jmp 0x1400bc265
cmp word [0x14016a7ae], di
je 0x1400bbff0
cmp dword [0x14016b7b0], edi
jne 0x1400bbff0
lea rdx, [0x140115be8]
lea rcx, [0x14016a7ae]
call fcn.14006a1b0
mov r12, rax
test rax, rax
je 0x1400bbff0
mov r9, rax
mov edx, 1
mov r8d, 0x400
lea rcx, [rsp + 0x1360]
call fcn.1400fe444
mov r15, rax
mov rcx, r12
call fcn.1400fa46c
mov eax, 0x3ff
cmp r15, rax
cmovb rax, r15
cmp rax, 0x400
jae 0x1400bbfea
mov byte [rsp + rax + 0x1360], dil
mov dword [rsp + 0x40], 0x30c
test r15, r15
je 0x1400bbfac
lea r8, [rsp + 0x40]
mov edx, r15d
lea rcx, [rsp + 0x1360]
call qword [sym.imp.ADVAPI32.dll_IsTextUnicode]
test eax, eax
je 0x1400bbfac
mov dword [0x14016b7b0], 3
jmp 0x1400bbff0
cmp r15, 3
jbe 0x1400bbff0
cmp byte [rsp + 0x1360], 0xef
jne 0x1400bbff0
cmp byte [rsp + 0x1361], 0xbb
jne 0x1400bbff0
cmp byte [rsp + 0x1362], 0xbf
jne 0x1400bbff0
lea rcx, [rsp + 0x1360]
call fcn.140091b68
test al, al
je 0x1400bbff0
mov dword [0x14016b7b0], r14d
jmp 0x1400bbff0
call fcn.1400f2f8c
nop
lea rcx, [rsp + 0x50]
call fcn.14008f024
nop
lea rcx, [0x140173d10]
call fcn.14008f264
mov r15d, 0x25
lea rcx, [0x140173d10]
call fcn.14008f0d4
mov r14, rax
test rax, rax
je 0x1400bc127
mov r9, rbx
lea r8, [rsp + 0x1760]
mov rdx, rax
lea rcx, [0x140181400]
call fcn.14003fac8
cmp word [r14], 0x40
jne 0x1400bc0ac
lea rcx, [rsp + 0x1760]
call fcn.140069278
test al, al
jne 0x1400bc0ac
lea rdx, [r14 + 2]
mov r9, rbx
lea r8, [rsp + 0x1760]
lea rcx, [0x140181400]
call fcn.14003fac8
mov byte [rsp + 0x38], 1
mov byte [rsp + 0x30], 1
mov byte [rsp + 0x28], 1
mov eax, dword [0x14016b7b4]
mov dword [rsp + 0x20], eax
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x1760]
call fcn.14006a264
test al, al
je 0x1400bc0ac
jmp 0x1400bc00d
mov edx, r15d
mov rcx, r14
call fcn.1400f4370
test rax, rax
je 0x1400bc113
mov edx, r15d
lea rcx, [rax + 2]
call fcn.1400f4370
test rax, rax
je 0x1400bc113
lea rcx, [rsp + 0x1760]
call fcn.140069278
test al, al
jne 0x1400bc113
mov r8d, ebx
lea rdx, [rsp + 0x310]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x7ff
ja 0x1400bc113
mov r8, rbx
lea rdx, [rsp + 0x310]
lea rcx, [rsp + 0x1760]
call fcn.14008eff0
lea rdx, [rsp + 0x1760]
lea rcx, [rsp + 0x50]
call fcn.14008f060
jmp 0x1400bc0a7
lea rdx, [rsp + 0x50]
lea rcx, [0x140173d10]
call fcn.1400bba90
nop
lea rcx, [rsp + 0x50]
call fcn.140004118
nop
jmp 0x1400bc154
cmp byte [0x140171cbd], dil
jne 0x1400bc17a
mov r9, rbx
lea r8, [0x140172d0a]
lea rdx, [0x140172d0a]
lea rcx, [0x140181400]
call fcn.14003fac8
mov al, byte [0x14016c8c0]
mov byte [0x140180ff0], al
lea rcx, [0x140180fc0]
call fcn.1400a8f2c
cmp byte [0x140171cd9], dil
je 0x1400bc1a2
call fcn.1400bcb34
jmp 0x1400bc1b4
mov dl, byte [0x140171cbb]
lea rcx, [0x14017e620]
call fcn.140004184
cmp qword [0x1401b1fe8], rdi
je 0x1400bc1c9
lea rcx, [0x14016a7ae]
call fcn.140068f90
cmp dword [0x14015abb0], 1
je 0x1400bc265
cmp byte [0x14015bbe2], dil
je 0x1400bc1ed
lea rcx, [0x140181400]
call fcn.140043244
jmp 0x1400bc265
cmp byte [0x14016d94e], dil
je 0x1400bc202
lea rcx, [0x140167760]
call fcn.1400aefc0
mov r8, rbx
lea rdx, [rsp + 0x1760]
lea rcx, [0x140181400]
call fcn.14003f304
lea rax, [rsp + 0x1760]
or r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], di
jne 0x1400bc225
lea rdx, [0x140172d0a]
lea rcx, [rsp + 0x1760]
call fcn.14009211c
test eax, eax
jne 0x1400bc256
lea rcx, [0x140172d0a]
call fcn.140079c5c
mov r13, rax
mov rdx, r13
lea rcx, [0x140181400]
call fcn.140042678
mov rcx, qword [0x1401b1fe8]
call fcn.1400f2e7c
mov byte [0x140180ff0], dil
lea rcx, [0x140180fc0]
call fcn.1400a8f2c
mov rcx, qword [rsp + 0x2760]
xor rcx, rsp
call fcn.1400f3220
lea r11, [rsp + 0x2770]
mov rbx, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
ret