Function at 0x1400d4270
Capabilities:
Check if file exists
Create directory
Get common file path
Get disk information
Get token membership
Query environment variable

Disassembly:
push r15
mov eax, 0x14078
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.1401d92a0
sub rsp, rax
mov rdi, qword [0x14022c040]
mov rbx, qword [rdi]
mov qword [rsp + 0x14068], rbx
lea rbx, str.TMPDIR
mov rcx, rbx
call fcn.1400d3040
test rax, rax
jne 0x1400d42cc
jmp 0x1400d4720
cmp dl, 0x5c
jne 0x1400d42c8
mov byte [rax], 0x2f
add rax, 1
movzx edx, byte [rax]
test dl, dl
jne 0x1400d42c0
lea rbx, [0x140205895]
mov rcx, rbx
call fcn.1400d3040
test rax, rax
je 0x1400d4760
lea rbx, [0x1402058cd]
mov rcx, rbx
call fcn.1400d3040
test rax, rax
je 0x1400d4790
lea rsi, str.PLINK_PROTOCOL
mov rcx, rsi
call fcn.1400d3040
test rax, rax
je 0x1400d46b0
lea r12, str.MSYSTEM
mov rcx, r12
call fcn.1400d3040
test rax, rax
je 0x1400d43a0
cmp byte [rax], 0
je 0x1400d43a0
lea rcx, [0x1402059b6]
call fcn.1400d3040
test rax, rax
je 0x1400d46d0
lea rcx, str.MSYS
call fcn.1400d3040
mov rcx, rax
test rax, rax
je 0x1400d4570
lea rdx, str.winsymlinks:nativestrict
call sub.msvcrt.dll_strstr
test rax, rax
je 0x1400d4570
mov rax, qword [rsp + 0x14068]
sub rax, qword [rdi]
jne 0x1400d4a11
add rsp, 0x14078
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, rbx
lea r13, str.PATH
lea rsi, [rsp + 0x4060]
call fcn.1400d3040
mov rcx, r13
mov rbx, rax
call fcn.1400d3040
lea r8, str.MINGW_d
mov edx, 0x8000
mov rcx, rsi
mov r9d, 0x40
mov rbp, rax
call fcn.1400be0f0
mov r8d, 1
mov rdx, rsi
mov rcx, r12
call fcn.1400de2f0
test rbx, rbx
je 0x1400d4588
mov r9, rbx
lea r8, str._s_bin_
mov edx, 0x8000
mov rcx, rsi
call fcn.1400be0f0
mov r12d, 0x8000
movsxd rbx, eax
sub r12, rbx
lea r14, [rsi + rbx]
call qword [0x1401e9490]
lea r15, [rsp + 0xc060]
mov r8d, 0x8000
mov rdx, qword [rax]
mov rcx, r15
call fcn.1400d2b10
cdqe
sub rax, 1
cmp rax, 0x7ffe
ja 0x1400d460f
movzx eax, byte [rsp + 0xc060]
test al, al
je 0x1400d460f
xor ecx, ecx
mov rdx, r15
jmp 0x1400d447c
movzx eax, byte [rdx + 1]
add rdx, 1
test al, al
je 0x1400d4493
cmp al, 0x2f
je 0x1400d4484
cmp al, 0x5c
jne 0x1400d4470
mov rcx, rdx
movzx eax, byte [rdx + 1]
add rdx, 1
test al, al
jne 0x1400d447c
test rcx, rcx
je 0x1400d460f
sub rcx, r15
cmp rcx, 0x18
jbe 0x1400d4670
movabs rax, 0x343677676e696d5c
lea r9, [rcx - 0x19]
movabs rdx, 0x6365786562696c5c
lea r8, [r15 + r9]
xor rax, qword [r8]
xor rdx, qword [r8 + 8]
or rax, rdx
je 0x1400d4598
movabs r11, 0x343677676e696d5c
lea rdx, [rcx - 0xc]
lea rax, [r15 + rdx]
cmp qword [rax], r11
je 0x1400d49a6
movabs r11, 0x323377676e696d5c
xor r11, qword [r8]
movabs r10, 0x6365786562696c5c
xor r10, qword [r8 + 8]
or r11, r10
je 0x1400d494e
mov r9, rdx
movabs rdx, 0x323377676e696d5c
cmp qword [rax], rdx
je 0x1400d49bb
lea r9, [rcx - 4]
lea rax, [r15 + r9]
cmp dword [rax], 0x646d635c
jne 0x1400d49ca
mov dword [rsp + 0x28], 0x40
lea r8, str._.smingw_d_bin_
mov rdx, r12
mov rcx, r14
mov qword [rsp + 0x20], r15
mov dword [rsp + 0x3c], r9d
call fcn.1400be0f0
movsxd r11, eax
jmp 0x1400d45dc
mov rax, qword [0x14022c5d0]
mov dword [rax], 0
jmp 0x1400d4376
mov r14, rsi
mov r12d, 0x8000
xor ebx, ebx
jmp 0x1400d4420
movabs rax, 0x5c6365786562696c
xor rax, qword [r8 + 9]
movabs rdx, 0x65726f632d746967
xor rdx, qword [r8 + 0x11]
or rax, rdx
jne 0x1400d44d5
mov qword [rsp + 0x20], r15
lea r8, str._.smingw64_bin_
mov rdx, r12
mov rcx, r14
mov dword [rsp + 0x3c], r9d
call fcn.1400be0f0
movsxd r11, eax
mov qword [rsp + 0x20], r15
mov r9d, dword [rsp + 0x3c]
mov rdx, r12
lea rcx, [r14 + r11]
sub rdx, r11
lea r8, str._.susr_bin_
mov qword [rsp + 0x30], r11
call fcn.1400be0f0
mov r11, qword [rsp + 0x30]
cdqe
add r11, rbx
lea rbx, [r11 + rax]
test rbp, rbp
je 0x1400d4648
mov edx, 0x8000
lea rcx, [rsi + rbx]
mov r9, rbp
sub rdx, rbx
lea r8, [0x1402059b3]
call fcn.1400be0f0
mov r8d, 1
mov rdx, rsi
mov rcx, r13
call fcn.1400de2f0
jmp 0x1400d4334
test rbx, rbx
je 0x1400d4660
mov byte [rsp + rbx + 0x405f], 0
jmp 0x1400d462f
mov byte [rsp + 0x4060], 0
jmp 0x1400d462f
cmp rcx, 0xb
jbe 0x1400d4997
movabs rdx, 0x343677676e696d5c
lea r9, [rcx - 0xc]
lea rax, [r15 + r9]
cmp qword [rax], rdx
jne 0x1400d4517
cmp dword [rax + 8], 0x6e69625c
jne 0x1400d4517
jmp 0x1400d45bd
xor r8d, r8d
lea rdx, [0x140205900]
mov rcx, rsi
call fcn.1400de2f0
jmp 0x1400d431b
lea rbx, [0x1402059bd]
mov rcx, rbx
call fcn.1400d3040
test rax, rax
jne 0x1400d4349
lea rcx, [0x1402059c6]
call fcn.1400d3040
test rax, rax
jne 0x1400d4349
mov r8d, 1
lea rdx, str.C.UTF_8
mov rcx, rbx
call fcn.1400de2f0
jmp 0x1400d4349
lea rcx, [0x14020589a]
call fcn.1400d3040
mov rdx, rax
test rax, rax
je 0x1400d4912
mov rcx, rbx
mov r8d, 1
call fcn.1400de2f0
mov rcx, rbx
call fcn.1400d3040
test rax, rax
je 0x1400d42d3
jmp 0x1400d42cc
call qword [sym.imp.KERNEL32.dll_GetVersion]
xor r8d, r8d
cmp eax, 0x3ad6ffff
ja 0x1400d48e8
lea rdx, str.cygwin
mov rcx, rbx
call fcn.1400de2f0
jmp 0x1400d42eb
lea rcx, str.HOMEDRIVE
call fcn.1400d3040
mov rsi, rax
test rax, rax
je 0x1400d48b8
mov rax, qword [0x14022c910]
mov rcx, rsi
mov qword [rsp + 0x40], 0
lea rbp, [rsp + 0x40]
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x50], rax
call sub.msvcrt.dll_strlen
mov rdx, rsi
mov rcx, rbp
mov r8, rax
call fcn.14008f5f0
lea rcx, str.HOMEPATH
call fcn.1400d3040
mov rsi, rax
test rax, rax
je 0x1400d48b0
mov rcx, rax
lea r12, [rsp + 0x2060]
call sub.msvcrt.dll_strlen
mov rdx, rsi
mov rcx, rbp
mov r8, rax
call fcn.14008f5f0
mov r13, qword [rsp + 0x50]
call fcn.1400d1230
mov r9d, 0xffffffff
mov r8d, 0x1000
mov rcx, r12
mov rdx, r13
mov esi, eax
call fcn.1400d25c0
test eax, eax
js 0x1400d492f
mov r9d, esi
mov r8d, 0x104
mov edx, eax
mov rcx, r12
call fcn.1400d3b90
test eax, eax
js 0x1400d4880
lea rsi, [rsp + 0x60]
mov edx, 0x1000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1400d4880
mov rdx, r12
mov rcx, rsi
call qword [sym.imp.msvcrt.dll__wcsicmp_1]
test eax, eax
je 0x1400d48b0
mov rcx, qword [rsp + 0x50]
call fcn.1400f7010
test eax, eax
je 0x1400d48b0
mov rdx, qword [rsp + 0x50]
mov rcx, rbx
mov r8d, 1
call fcn.1400de2f0
mov rcx, rbp
call fcn.14008e580
jmp 0x1400d4303
mov rcx, rbp
call fcn.14008e580
lea rcx, str.USERPROFILE
call fcn.1400d3040
test rax, rax
je 0x1400d4303
mov r8d, 1
mov rdx, rax
mov rcx, rbx
call fcn.1400de2f0
jmp 0x1400d4303
mov rcx, rbx
lea rdx, str.xterm_256color
call fcn.1400de2f0
xor r8d, r8d
lea rdx, str.truecolor
lea rcx, str.COLORTERM
call fcn.1400de2f0
jmp 0x1400d42eb
lea rcx, str.TEMP
call fcn.1400d3040
mov rdx, rax
test rax, rax
jne 0x1400d4738
jmp 0x1400d42d3
mov rsi, qword [sym.imp.msvcrt.dll__errno]
call rsi
cmp dword [rax], 0x22
jne 0x1400d4880
call rsi
mov dword [rax], 0x26
jmp 0x1400d4880
movabs r11, 0x5c6365786562696c
xor r11, qword [r8 + 9]
movabs r10, 0x65726f632d746967
xor r10, qword [r8 + 0x11]
or r11, r10
jne 0x1400d4514
mov qword [rsp + 0x20], r15
lea r8, str._.smingw32_bin_
mov rdx, r12
mov rcx, r14
mov dword [rsp + 0x3c], r9d
call fcn.1400be0f0
movsxd r11, eax
jmp 0x1400d45dc
cmp rcx, 3
ja 0x1400d452a
jmp 0x1400d460f
cmp dword [rax + 8], 0x6e69625c
jne 0x1400d44f0
mov r9, rdx
jmp 0x1400d45bd
cmp dword [rax + 8], 0x6e69625c
jne 0x1400d452a
jmp 0x1400d4973
cmp dword [rax], 0x6e69625c
je 0x1400d453e
cmp rcx, 0x10
jbe 0x1400d460f
lea r9, [rcx - 0x11]
mov r8d, 0x11
lea rdx, str.libexecgit_core
lea rcx, [r15 + r9]
mov qword [rsp + 0x30], r9
call sub.msvcrt.dll_memcmp
mov r9, qword [rsp + 0x30]
test eax, eax
je 0x1400d453e
jmp 0x1400d460f
call fcn.1401d96b0
nop
nop word [rax + rax]