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

Disassembly:
push r13
push r14
push r15
mov eax, 0x2770
call fcn.1400fc480
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 [0x140160370]
xor rax, rsp
mov qword [rsp + 0x2760], rax
mov r12b, cl
xor edi, edi
test dl, dl
je 0x1400c3896
cmp word [0x14017689e], di
je 0x1400c38fb
cmp qword [0x1401bdf08], rdi
je 0x1400c38fb
mov word [0x14017689e], di
jmp 0x1400c38fb
mov cl, 1
call fcn.1400c9de0
mov dword [0x1401799e8], 3
mov qword [0x140168ea0], rdi
mov cl, byte [0x140166ce4]
test cl, cl
jne 0x1400c39f5
xor r8d, r8d
lea rdx, [0x14017fe00]
lea rcx, [0x14018d510]
call fcn.140044648
cmp byte [0x14018e58e], dil
je 0x1400c38fb
mov eax, dword [0x1401799e4]
mov r14d, 4
cmp qword [0x14017fe30], 1
cmova eax, r14d
mov dword [0x1401799e4], eax
jmp 0x1400c3901
mov r14d, 4
mov cl, byte [0x140166ce4]
test cl, cl
jne 0x1400c39fb
cmp word [0x14017edfa], di
jne 0x1400c39fb
mov r12b, dil
mov ebx, 0x800
mov r8d, ebx
lea rdx, [0x14017edfa]
mov ecx, dword [0x14017bd98]
call fcn.1400c992c
mov dword [rsp + 0x20], ebx
lea r13, [0x14011bd58]
mov r9, r13
lea r8, [rsp + 0x1360]
lea rdx, str.DefFolder
lea rcx, [0x14011c9d0]
call fcn.1400a7a38
cmp word [rsp + 0x1360], di
jne 0x1400c398e
cmp byte [0x14018e58e], dil
je 0x1400c39cc
mov edx, ebx
lea rcx, [rsp + 0x1360]
call fcn.14003e728
cmp word [rsp + 0x1360], di
je 0x1400c39cc
mov rdx, rbx
lea rcx, [rsp + 0x1360]
call fcn.14007ea30
mov r8, rbx
lea rdx, [0x14017edfa]
lea rcx, [rsp + 0x1360]
call fcn.140096270
mov r8, rbx
lea rdx, [rsp + 0x1360]
lea rcx, [0x14017edfa]
call fcn.140096298
cmp word [0x140174898], di
setne r8b
mov r9d, dword [0x14017bd98]
mov rdx, rbx
lea rcx, [0x14017edfa]
call fcn.1400cd5a4
mov cl, byte [0x140166ce4]
jmp 0x1400c3a07
mov r14d, 4
lea r13, [0x14011bd58]
mov ebx, 0x800
mov eax, dword [0x1401799e4]
mov edx, 2
test eax, eax
cmove eax, edx
mov dword [0x1401799e4], eax
test cl, cl
je 0x1400c3b81
mov r15d, dword [0x14018a714]
cmp r15d, 1
jbe 0x1400c3a71
cmp dword [0x1401799b4], 3
je 0x1400c3fa1
lea ecx, [rdx + 0x63]
call fcn.1400901c8
mov rbx, rax
mov ecx, 0x1fd
call fcn.1400901c8
mov rdx, rax
mov r9d, 0x30
mov r8, rbx
mov rcx, qword [0x140166d18]
call fcn.1400d0120
jmp 0x1400c3fa1
mov r8, rbx
lea rdx, [0x14017edfa]
lea rcx, [0x14018a710]
call fcn.140005f50
mov r8, rbx
lea rdx, [0x1401778b0]
lea rcx, [0x14018a710]
call fcn.1400064ec
cmp word [0x1401778b0], di
je 0x1400c3ab5
mov rdx, rbx
lea rcx, [0x1401778b0]
call fcn.14007ea30
mov byte [0x140179a59], dil
lea rdx, [rsp + 0x110]
lea rcx, [0x14018a710]
call fcn.14000650c
mov eax, dword [rsp + 0x258]
mov dword [0x14017bd98], 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, [0x14017edfa]
call fcn.140070c98
test al, al
je 0x1400c3b1b
cmp qword [rsp + 0x1310], 0x18
je 0x1400c3b3c
cmp dword [rsp + 0x258], edi
jne 0x1400c3b35
cmp byte [rsp + 0x190], dil
mov byte [0x140179a40], 1
jne 0x1400c3b3c
mov byte [0x140179a40], dil
test r15d, r15d
jne 0x1400c3b4a
cmp dword [rsp + 0x2e0], edi
je 0x1400c3b58
movzx eax, byte [rsp + 0x252]
mov dword [0x1401799d4], eax
cmp qword [rsp + 0x248], rdi
je 0x1400c3b7a
mov r8, rbx
lea rdx, [0x14011c528]
lea rcx, [0x140174898]
call fcn.140096298
jmp 0x1400c3b81
mov word [0x140174898], di
mov rcx, qword [0x140166d18]
call qword [sym.imp.USER32.dll_IsWindowVisible]
neg eax
sbb rcx, rcx
and rcx, qword [0x140166d18]
xor r8d, r8d
mov dl, r12b
call fcn.1400c6c60
test al, al
je 0x1400c3f82
mov al, byte [0x1401bdf27]
neg al
sbb ecx, ecx
and ecx, dword [0x1401bdf28]
mov dword [0x1401799c8], ecx
mov rcx, qword [0x1401bdf08]
test rcx, rcx
je 0x1400c3bd6
call fcn.1400cdecc
jmp 0x1400c3bfa
cmp byte [0x140166ce4], dil
je 0x1400c3bfa
cmp qword [rsp + 0x248], rdi
je 0x1400c3bfa
cmp word [0x140174898], 0x2a
jne 0x1400c3bfa
mov word [0x140174898], di
cmp qword [0x14017fe30], rdi
jne 0x1400c3c37
mov ecx, 0x65
call fcn.1400901c8
mov rbx, rax
mov ecx, 0x14b
call fcn.1400901c8
mov rdx, rax
mov r9d, 0x30
mov r8, rbx
mov rcx, qword [0x140166d18]
call fcn.1400d0120
jmp 0x1400c3f82
cmp word [0x14017689e], di
je 0x1400c3d16
cmp dword [0x1401778a0], edi
jne 0x1400c3d16
lea rdx, [0x140120cd8]
lea rcx, [0x14017689e]
call fcn.1400706c8
mov r12, rax
test rax, rax
je 0x1400c3d16
mov r9, rax
mov edx, 1
mov r8d, 0x400
lea rcx, [rsp + 0x2360]
call fcn.1401079a4
mov r15, rax
mov rcx, r12
call fcn.1401039c8
mov eax, 0x3ff
cmp r15, rax
cmovb rax, r15
cmp rax, 0x400
jae 0x1400c3d10
mov byte [rsp + rax + 0x2360], dil
mov dword [rsp + 0x40], 0x30c
test r15, r15
je 0x1400c3ce4
lea r8, [rsp + 0x40]
mov edx, r15d
lea rcx, [rsp + 0x2360]
call qword [sym.imp.ADVAPI32.dll_IsTextUnicode]
test eax, eax
je 0x1400c3ce4
mov dword [0x1401778a0], 3
jmp 0x1400c3d16
lea rcx, [rsp + 0x2360]
call fcn.140095ab8
cmp eax, 2
jne 0x1400c3cff
mov dword [0x1401778a0], r14d
jmp 0x1400c3d16
cmp eax, 1
jne 0x1400c3d16
mov dword [0x1401778a0], 2
jmp 0x1400c3d16
call fcn.1400fc254
nop
lea rcx, [rsp + 0x50]
call fcn.1400962cc
nop
lea rcx, [0x14017fe00]
call fcn.14009650c
mov r15d, 0x25
lea rcx, [0x14017fe00]
call fcn.14009637c
mov r14, rax
test rax, rax
je 0x1400c3e4d
mov r9, rbx
lea r8, [rsp + 0x1360]
mov rdx, rax
lea rcx, [0x14018d510]
call fcn.140044d84
cmp word [r14], 0x40
jne 0x1400c3dd2
lea rcx, [rsp + 0x1360]
call fcn.14006f794
test al, al
jne 0x1400c3dd2
lea rdx, [r14 + 2]
mov r9, rbx
lea r8, [rsp + 0x1360]
lea rcx, [0x14018d510]
call fcn.140044d84
mov byte [rsp + 0x38], 1
mov byte [rsp + 0x30], 1
mov byte [rsp + 0x28], 1
mov eax, dword [0x1401778a4]
mov dword [rsp + 0x20], eax
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x1360]
call fcn.14007077c
test al, al
je 0x1400c3dd2
jmp 0x1400c3d33
mov edx, r15d
mov rcx, r14
call fcn.1400fd65c
test rax, rax
je 0x1400c3e39
mov edx, r15d
lea rcx, [rax + 2]
call fcn.1400fd65c
test rax, rax
je 0x1400c3e39
lea rcx, [rsp + 0x1360]
call fcn.14006f794
test al, al
jne 0x1400c3e39
mov r8d, ebx
lea rdx, [rsp + 0x310]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x7ff
ja 0x1400c3e39
mov r8, rbx
lea rdx, [rsp + 0x310]
lea rcx, [rsp + 0x1360]
call fcn.140096298
lea rdx, [rsp + 0x1360]
lea rcx, [rsp + 0x50]
call fcn.140096308
jmp 0x1400c3dcd
lea rdx, [rsp + 0x50]
lea rcx, [0x14017fe00]
call fcn.1400c37c8
nop
lea rcx, [rsp + 0x50]
call fcn.140004acc
nop
jmp 0x1400c3e7a
mov r9, rbx
lea r8, [0x14017edfa]
lea rdx, [0x14017edfa]
lea rcx, [0x14018d510]
call fcn.140044d84
mov al, byte [0x1401789b0]
mov byte [0x14018d100], al
lea rcx, [0x14018d0d0]
call fcn.1400b0314
cmp byte [0x14017ddc9], dil
je 0x1400c3ebf
call fcn.1400c4850
jmp 0x1400c3ed1
mov dl, byte [0x14017ddab]
lea rcx, [0x14018a710]
call fcn.140004d08
cmp qword [0x1401bdf08], rdi
je 0x1400c3ee6
lea rcx, [0x14017689e]
call fcn.14006f4ac
cmp dword [0x140167d48], 1
je 0x1400c3f82
cmp byte [0x140166ce4], dil
je 0x1400c3f0a
lea rcx, [0x14018d510]
call fcn.140048730
jmp 0x1400c3f82
cmp byte [0x140179a3e], dil
je 0x1400c3f1f
lea rcx, [0x140168ea8]
call fcn.1400b63bc
mov r8, rbx
lea rdx, [rsp + 0x1360]
lea rcx, [0x14018d510]
call fcn.1400445c0
lea rax, [rsp + 0x1360]
or r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], di
jne 0x1400c3f42
lea rdx, [0x14017edfa]
lea rcx, [rsp + 0x1360]
call fcn.140099480
test eax, eax
jne 0x1400c3f73
lea rcx, [0x14017edfa]
call fcn.1400803f0
mov r13, rax
mov rdx, r13
lea rcx, [0x14018d510]
call fcn.140047b54
mov rcx, qword [0x1401bdf08]
call fcn.1400fc59c
mov byte [0x14018d100], dil
lea rcx, [0x14018d0d0]
call fcn.1400b0314
mov rcx, qword [rsp + 0x2760]
xor rcx, rsp
call fcn.1400fc4f0
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