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

Disassembly:
push r13
push r14
push r15
mov eax, 0x2770
call fcn.1400eeb60
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 [0x14013f2b0]
xor rax, rsp
mov qword [rsp + 0x2760], rax
mov r12b, cl
xor edi, edi
test dl, dl
je 0x1400ba7e6
cmp word [0x14015572e], di
je 0x1400ba84b
cmp qword [0x14019d3f8], rdi
je 0x1400ba84b
mov word [0x14015572e], di
jmp 0x1400ba84b
mov cl, 1
call fcn.1400c0824
mov dword [0x140158878], 3
mov qword [0x140147e60], rdi
mov cl, byte [0x140145ca4]
test cl, cl
jne 0x1400ba943
xor r8d, r8d
lea rdx, [0x14015eb58]
lea rcx, [0x14016c120]
call fcn.14004012c
cmp byte [0x14016d1a2], dil
je 0x1400ba84b
mov eax, dword [0x140158874]
mov r15d, 4
cmp qword [0x14015eb88], 1
cmova eax, r15d
mov dword [0x140158874], eax
jmp 0x1400ba851
mov r15d, 4
mov cl, byte [0x140145ca4]
test cl, cl
jne 0x1400ba949
cmp word [0x14015db52], di
jne 0x1400ba949
mov r12b, dil
mov ebx, 0x800
mov r8d, ebx
lea rdx, [0x14015db52]
mov ecx, dword [0x14015aaf4]
call fcn.1400c03e0
mov dword [rsp + 0x20], ebx
lea r13, [0x14010d188]
mov r9, r13
lea r8, [rsp + 0x1760]
lea rdx, str.DefFolder
lea rcx, [0x14010d988]
call fcn.14009f7ec
cmp word [rsp + 0x1760], di
jne 0x1400ba8dc
cmp byte [0x14016d1a2], dil
je 0x1400ba91a
lea rcx, [rsp + 0x1760]
call fcn.14003b160
cmp word [rsp + 0x1760], di
je 0x1400ba91a
mov rdx, rbx
lea rcx, [rsp + 0x1760]
call fcn.14007795c
mov r8, rbx
lea rdx, [0x14015db52]
lea rcx, [rsp + 0x1760]
call fcn.14008e0f8
mov r8, rbx
lea rdx, [rsp + 0x1760]
lea rcx, [0x14015db52]
call fcn.14008e130
cmp word [0x140153728], di
setne r8b
mov r9d, dword [0x14015aaf4]
mov rdx, rbx
lea rcx, [0x14015db52]
call fcn.1400c3dc0
mov cl, byte [0x140145ca4]
jmp 0x1400ba955
mov r15d, 4
lea r13, [0x14010d188]
mov ebx, 0x800
mov eax, dword [0x140158874]
mov edx, 5
test eax, eax
cmove eax, edx
mov dword [0x140158874], eax
test cl, cl
je 0x1400baac8
mov r14d, dword [0x140169344]
cmp r14d, 1
jbe 0x1400ba9bf
cmp dword [0x140158844], 3
je 0x1400baf68
lea ecx, [rdx + 0x60]
call fcn.140088044
mov rbx, rax
mov ecx, 0x1fd
call fcn.140088044
mov rdx, rax
mov r9d, 0x30
mov r8, rbx
mov rcx, qword [0x140145cd8]
call fcn.1400c67dc
jmp 0x1400baf68
mov r8, rbx
lea rdx, [0x14015db52]
lea rcx, [0x140169340]
call fcn.140005000
mov r8, rbx
lea rdx, [0x140156740]
lea rcx, [0x140169340]
call fcn.1400053d4
cmp word [0x140156740], di
je 0x1400baa03
mov rdx, rbx
lea rcx, [0x140156740]
call fcn.14007795c
mov byte [0x1401588e8], dil
lea rdx, [rsp + 0x110]
lea rcx, [0x140169340]
call fcn.1400053f4
mov eax, dword [rsp + 0x258]
mov dword [0x14015aaf4], 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, [0x14015db52]
call fcn.14006a508
test al, al
je 0x1400baa69
cmp qword [rsp + 0x1310], 0x18
je 0x1400baa8a
cmp dword [rsp + 0x258], edi
jne 0x1400baa83
cmp byte [rsp + 0x190], dil
mov byte [0x1401588d0], 1
jne 0x1400baa8a
mov byte [0x1401588d0], dil
test r14d, r14d
jne 0x1400baa98
cmp dword [rsp + 0x2e0], edi
je 0x1400baaa6
movzx eax, byte [rsp + 0x252]
mov dword [0x140158864], eax
mov r14d, 0x2a
cmp qword [rsp + 0x248], rdi
je 0x1400baabf
mov dword [0x140153728], r14d
jmp 0x1400baace
mov word [0x140153728], di
jmp 0x1400baace
mov r14d, 0x2a
mov rcx, qword [0x140145cd8]
call qword [sym.imp.USER32.dll_IsWindowVisible]
neg eax
sbb rcx, rcx
and rcx, qword [0x140145cd8]
xor r8d, r8d
mov dl, r12b
call fcn.1400bd94c
test al, al
je 0x1400baf49
mov al, byte [0x14019d417]
neg al
sbb ecx, ecx
and ecx, dword [0x14019d418]
mov dword [0x140158858], ecx
mov eax, dword [0x14019d404]
dec eax
cmp eax, 1
ja 0x1400bab6f
mov eax, dword [0x14019d410]
mov dword [rsp + 0x28], eax
mov eax, dword [0x14019d40c]
mov dword [rsp + 0x20], eax
mov r9d, dword [0x14019d408]
lea r8, str._dd_dh_dm
mov edx, 0x50
lea rcx, [rsp + 0x50]
call fcn.1400026d0
lea rdx, [rsp + 0x50]
cmp dword [0x14019d404], 1
lea rcx, [0x1401589f0]
je 0x1400bab6a
lea rcx, [0x1401589f8]
call fcn.14008f608
mov rcx, qword [0x14019d3f8]
test rcx, rcx
je 0x1400bab82
call fcn.1400c4708
jmp 0x1400baba6
cmp byte [0x140145ca4], dil
je 0x1400baba6
cmp qword [rsp + 0x248], rdi
je 0x1400baba6
cmp word [0x140153728], r14w
jne 0x1400baba6
mov word [0x140153728], di
cmp qword [0x14015eb88], rdi
jne 0x1400babe3
mov ecx, 0x65
call fcn.140088044
mov rbx, rax
mov ecx, 0x14b
call fcn.140088044
mov rdx, rax
mov r9d, 0x30
mov r8, rbx
mov rcx, qword [0x140145cd8]
call fcn.1400c67dc
jmp 0x1400baf49
cmp word [0x14015572e], di
je 0x1400bacd4
cmp dword [0x140156730], edi
jne 0x1400bacd4
lea rdx, [0x140111c68]
lea rcx, [0x14015572e]
call fcn.140069f38
mov r12, rax
test rax, rax
je 0x1400bacd4
mov r9, rax
mov edx, 1
mov r8d, 0x400
lea rcx, [rsp + 0x1360]
call fcn.1400f9f24
mov r14, rax
mov rcx, r12
call fcn.1400f5f4c
mov eax, 0x3ff
cmp r14, rax
cmovb rax, r14
cmp rax, 0x400
jae 0x1400bacce
mov byte [rsp + rax + 0x1360], dil
mov dword [rsp + 0x40], 0x30c
test r14, r14
je 0x1400bac90
lea r8, [rsp + 0x40]
mov edx, r14d
lea rcx, [rsp + 0x1360]
call qword [sym.imp.ADVAPI32.dll_IsTextUnicode]
test eax, eax
je 0x1400bac90
mov dword [0x140156730], 3
jmp 0x1400bacd4
cmp r14, 3
jbe 0x1400bacd4
cmp byte [rsp + 0x1360], 0xef
jne 0x1400bacd4
cmp byte [rsp + 0x1361], 0xbb
jne 0x1400bacd4
cmp byte [rsp + 0x1362], 0xbf
jne 0x1400bacd4
lea rcx, [rsp + 0x1360]
call fcn.140090c00
test al, al
je 0x1400bacd4
mov dword [0x140156730], r15d
jmp 0x1400bacd4
call fcn.1400ee934
nop
lea rcx, [rsp + 0x50]
call fcn.14008e174
nop
lea rcx, [0x14015eb58]
call fcn.14008e394
mov r15d, 0x25
lea rcx, [0x14015eb58]
call fcn.14008e224
mov r14, rax
test rax, rax
je 0x1400bae0b
mov r9, rbx
lea r8, [rsp + 0x1760]
mov rdx, rax
lea rcx, [0x14016c120]
call fcn.140040780
cmp word [r14], 0x40
jne 0x1400bad90
lea rcx, [rsp + 0x1760]
call fcn.140068fe0
test al, al
jne 0x1400bad90
lea rdx, [r14 + 2]
mov r9, rbx
lea r8, [rsp + 0x1760]
lea rcx, [0x14016c120]
call fcn.140040780
mov byte [rsp + 0x38], 1
mov byte [rsp + 0x30], 1
mov byte [rsp + 0x28], 1
mov eax, dword [0x140156734]
mov dword [rsp + 0x20], eax
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x1760]
call fcn.140069fec
test al, al
je 0x1400bad90
jmp 0x1400bacf1
mov edx, r15d
mov rcx, r14
call fcn.1400efd40
test rax, rax
je 0x1400badf7
mov edx, r15d
lea rcx, [rax + 2]
call fcn.1400efd40
test rax, rax
je 0x1400badf7
lea rcx, [rsp + 0x1760]
call fcn.140068fe0
test al, al
jne 0x1400badf7
mov r8d, ebx
lea rdx, [rsp + 0x310]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x7ff
ja 0x1400badf7
mov r8, rbx
lea rdx, [rsp + 0x310]
lea rcx, [rsp + 0x1760]
call fcn.14008e130
lea rdx, [rsp + 0x1760]
lea rcx, [rsp + 0x50]
call fcn.14008e1b0
jmp 0x1400bad8b
lea rdx, [rsp + 0x50]
lea rcx, [0x14015eb58]
call fcn.1400ba718
nop
lea rcx, [rsp + 0x50]
call fcn.14000414c
nop
jmp 0x1400bae38
cmp byte [0x14015cb05], dil
jne 0x1400bae5e
mov r9, rbx
lea r8, [0x14015db52]
lea rdx, [0x14015db52]
lea rcx, [0x14016c120]
call fcn.140040780
mov al, byte [0x140157840]
mov byte [0x14016bd10], al
lea rcx, [0x14016bce0]
call fcn.1400a7fb8
cmp byte [0x14015cb21], dil
je 0x1400bae86
call fcn.1400bb82c
jmp 0x1400bae98
mov dl, byte [0x14015cb03]
lea rcx, [0x140169340]
call fcn.1400041b8
cmp qword [0x14019d3f8], rdi
je 0x1400baead
lea rcx, [0x14015572e]
call fcn.140068cec
cmp dword [0x140146d08], 1
je 0x1400baf49
cmp byte [0x140145ca4], dil
je 0x1400baed1
lea rcx, [0x14016c120]
call fcn.140043d88
jmp 0x1400baf49
cmp byte [0x1401588ce], dil
je 0x1400baee6
lea rcx, [0x1401526e8]
call fcn.1400adedc
mov r8, rbx
lea rdx, [rsp + 0x1760]
lea rcx, [0x14016c120]
call fcn.1400400a4
lea rax, [rsp + 0x1760]
or r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], di
jne 0x1400baf09
lea rdx, [0x14015db52]
lea rcx, [rsp + 0x1760]
call fcn.1400911b4
test eax, eax
jne 0x1400baf3a
lea rcx, [0x14015db52]
call fcn.140079330
mov r13, rax
mov rdx, r13
lea rcx, [0x14016c120]
call fcn.140043188
mov rcx, qword [0x14019d3f8]
call fcn.1400eec7c
mov byte [0x14016bd10], dil
lea rcx, [0x14016bce0]
call fcn.1400a7fb8
mov rcx, qword [rsp + 0x2760]
xor rcx, rsp
call fcn.1400eebd0
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