Function at 0x1400c0c10
Capabilities:
Get common file path
Set current directory
Set environment variable

Disassembly:
mov qword [rsp + 0x20], r9
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xb8
mov qword [rsp + 0x98], 0xfffffffffffffffe
mov rsi, r9
mov rdi, r8
mov rbx, rdx
mov rbp, rcx
mov eax, dword [rsp + 0x120]
mov ecx, eax
shr ecx, 0x10
mov dword [rsp + 0x4c], ecx
movzx r14d, ax
movzx r13d, r14b
and r13b, 4
mov byte [rsp + 0x108], r13b
movzx eax, byte [0x14019bce6]
mov byte [rsp + 0x120], al
movzx eax, r14w
and ax, 0x10
mov word [rsp + 0x48], ax
movzx eax, r14w
and ax, 0x40
mov word [rsp + 0x42], ax
and byte [rbp + 0x12], 0x7f
mov eax, r14d
shr eax, 1
shl al, 7
or byte [rbp + 0x12], al
movzx eax, r14b
and al, 1
mov byte [rsp + 0x100], al
test r14b, r14b
js 0x1400c0cc5
cmp byte [0x14019c0cf], 0
je 0x1400c0cc5
mov byte [0x14019c0cf], 0
mov rcx, rbp
call fcn.14002d230
test rdi, rdi
cmove rdi, rbx
mov qword [rsp + 0x110], rdi
mov rax, qword [rsp + 0x128]
test rax, rax
cmove rax, rbx
mov qword [rsp + 0x128], rax
mov r15, qword [rbp + 0x40]
xor r12d, r12d
test r15, r15
setne r12b
mov dword [rsp + 0x44], r12d
mov qword [rsp + 0x50], 0
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.1400a4890
xor eax, eax
test rsi, rsi
setne al
mov dword [rsp + 0x58], eax
xor esi, esi
mov rdi, rsi
mov qword [rsp + 0x60], rsi
test eax, eax
je 0x1400c0d50
mov edx, 0x20a
lea rcx, [rsp + 0x60]
call fcn.1400635c0
mov rdi, qword [rsp + 0x60]
mov rdx, rdi
mov ecx, 0x208
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov rbx, rsi
test r12d, r12d
je 0x1400c0dac
test r13b, r13b
jne 0x1400c0dac
mov cl, 1
call fcn.1400b9270
mov ecx, 0x9e8
call fcn.1400cf938
mov rbx, rax
test rax, rax
je 0x1400c0da9
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov rdx, rax
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
xor r9d, r9d
mov r8d, 0x271c
mov rcx, rbx
call fcn.140074070
mov rbx, rax
jmp 0x1400c0dac
mov rbx, rsi
mov qword [rsp + 0x88], rbx
mov r12, r15
test rbx, rbx
cmovne r12, rbx
mov r13, qword [rsp + 0x130]
test r13, r13
je 0x1400c0dcf
mov qword [r13 + 0x40], r12
mov rax, rsi
mov qword [rsp + 0x70], rax
test r13, r13
jne 0x1400c0e1e
mov ecx, 0xd0
call fcn.1400cf938
mov r13, rax
mov qword [rsp + 0x130], rax
test rax, rax
je 0x1400c0e13
mov rdx, rbp
mov rcx, rax
call fcn.14002a68c
nop
mov rdx, rbp
mov rcx, r13
call fcn.14002af60
mov qword [r13 + 0x40], r12
jmp 0x1400c0e16
mov r13, rsi
mov rax, r13
mov qword [rsp + 0x70], rax
mov qword [rsp + 0xa0], rax
mov rsi, rbp
test r13, r13
cmovne rsi, r13
mov eax, dword [rsp + 0x4c]
mov word [rsi + 0xc], ax
mov rax, qword [rsi + 0x40]
mov qword [rsp + 0x80], rax
mov qword [rsi + 0x40], r12
lea rcx, [0x14019cf50]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rsi + 0x60]
mov qword [rsp + 0x78], rax
mov rax, qword [rsi + 0x68]
mov qword [rsp + 0x90], rax
movzx eax, byte [rsi + 0xf]
mov byte [rsp + 0x130], al
mov eax, dword [rsi + 8]
mov dword [rsp + 0x4c], eax
movzx eax, byte [rsi + 0xba]
mov byte [rsp + 0x40], al
lea rcx, [0x14019cf50]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea r11, [rsp + 0x50]
mov qword [rsi + 0x60], r11
mov rax, qword [rsp + 0x50]
mov rax, qword [rax]
mov qword [rsp + 0x68], rax
mov qword [rsi + 0x68], rax
mov r8d, 1
mov rdx, qword [rsp + 0x110]
mov rcx, rsi
call fcn.140075040
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [rsi + 0x74], eax
cmp dword [rsp + 0x44], 0
je 0x1400c0ee9
mov rax, qword [rsp + 0x128]
mov qword [r12 + 0x208], rax
mov dword [rsi + 0x24], 0
test r14b, 0x10
je 0x1400c0efa
or byte [rsi + 0xf], 1
test r14b, 0x20
je 0x1400c0f07
or byte [rsi + 0xba], 1
cmp dword [rsp + 0x58], 0
je 0x1400c0f29
movzx r8d, word [rsp + 0x42]
mov r14, qword [rsp + 0x118]
mov rdx, r14
mov rcx, rsi
call fcn.140036614
jmp 0x1400c0f31
mov r14, qword [rsp + 0x118]
lea rax, [0x14014f7a8]
test r14, r14
cmovne rax, r14
mov qword [rsp + 0x110], rax
cmp dword [rsp + 0x44], 0
je 0x1400c0fba
test rbx, rbx
je 0x1400c0fb1
mov qword [r12 + 0x1f8], rsi
mov rax, qword [r12 + 0x178]
mov qword [rax], rsi
mov byte [r12 + 0xa2], 1
mov byte [r12 + 0xa1], 0xff
mov rcx, r12
call fcn.14010868c
cmp byte [rsp + 0x120], 0
jne 0x1400c0fc3
test r15, r15
je 0x1400c0fcc
lea r14, [0x14019cf50]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
inc dword [r15 + 0x140]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1400c0fd3
lea r14, [0x14019cf50]
jmp 0x1400c0fd3
lea r14, [0x14019cf50]
jmp 0x1400c0fd3
lea r14, [0x14019cf50]
jmp 0x1400c0fd3
lea r14, [0x14019cf50]
movzx eax, byte [rbp + 0x11]
test al, al
je 0x1400c0fde
mov byte [rsi + 0x11], al
mov al, byte [rsp + 0x100]
mov byte [rsi + 0x10], al
cmp word [rsp + 0x48], 0
jne 0x1400c1059
mov qword [rsp + 0x118], r14
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
or r9d, 0xffffffff
xor r8d, r8d
lea rdx, str.__MAIN__
mov rcx, rbp
call fcn.1400307c0
test rax, rax
jne 0x1400c1026
lea r8, [0x14014337c]
jmp 0x1400c1040
mov rdx, qword [rax]
lea rcx, [0x14015188c]
call fcn.14005c550
test al, al
jne 0x1400c1050
lea r8, [0x140143378]
lea rdx, [0x1401545a0]
mov rcx, rsi
call fcn.140061290
nop
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test byte [rbp + 0x12], 0x80
je 0x1400c1063
and byte [rsi + 0x12], 0xfe
mov rax, qword [rsp + 0x110]
cmp word [rax], 0
je 0x1400c108e
movzx eax, byte [rsi + 0x12]
test al, 8
jne 0x1400c108e
cmp byte [rsi + 0xb8], 0
je 0x1400c108e
test al, 1
je 0x1400c108e
mov r14d, 1
jmp 0x1400c1091
xor r14d, r14d
cmp qword [0x14019c058], 0
je 0x1400c10fa
test r14d, r14d
je 0x1400c10fa
lea rdx, str.ENTER:
lea rcx, [rsp + 0x118]
call fcn.140071240
nop
mov rdx, qword [rsp + 0x110]
lea rcx, [rsp + 0x118]
call fcn.140063600
mov qword [rsp + 0x20], 0
mov r9d, 0x11
xor r8d, r8d
mov rdx, qword [rsp + 0x118]
mov rcx, rsi
call fcn.140039c90
nop
lea rcx, [rsp + 0x118]
call fcn.14005b520
mov byte [rsi + 0xb8], 1
cmp dword [rsp + 0x44], 0
je 0x1400c11f0
test rbx, rbx
je 0x1400c11f0
cmp byte [rsp + 0x120], 0
je 0x1400c11dd
mov byte [r12 + 0xa1], 0x81
mov byte [r12 + 0xa0], 0x10
mov rax, qword [r12]
xor r8d, r8d
mov edx, 0x271d
mov rcx, r12
call qword [rax + 0x10]
lea r9, str.0x_I64X
lea r8, str.__WinID
mov rdx, qword [r12 + 0x20]
mov rcx, rsi
call fcn.140065de0
mov qword [r12 + 0x208], 0
mov rdx, qword [rsp + 0x128]
mov rcx, rsi
call fcn.1400b78d0
cmp dword [r12 + 0x140], 0
jg 0x1400c11a7
mov rax, qword [r12 + 0x118]
cmp dword [rax], 0
jg 0x1400c11a7
mov rax, qword [r12 + 0x138]
cmp dword [rax], 0
jle 0x1400c1230
mov byte [r12 + 0xa1], 0xff
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x10]
mov rcx, qword [r12 + 0x20]
call qword [sym.imp.USER32.dll_PostMessageW]
mov edx, 0x20
mov rcx, r12
call fcn.140070a00
mov byte [r12 + 0xa1], 0x81
jmp 0x1400c1230
mov byte [r12 + 0xa0], 0
mov rcx, r12
call fcn.140070c00
jmp 0x1400c1230
mov rdx, qword [rsp + 0x68]
mov rcx, rsi
call fcn.1400b78d0
mov rcx, qword [rsi + 0x40]
test rcx, rcx
je 0x1400c1230
cmp byte [rsp + 0x108], 0
jne 0x1400c1230
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x10]
mov rcx, qword [rcx + 0x20]
call qword [sym.imp.USER32.dll_PostMessageW]
mov rbx, qword [rsi + 0x40]
mov qword [rsp + 0x88], rbx
mov r12, qword [rsp + 0x110]
cmp word [r12], 0
je 0x1400c129a
test r14d, r14d
je 0x1400c129a
lea rdx, str.LEAVE:
lea rcx, [rsp + 0x128]
call fcn.140071240
nop
mov rdx, r12
lea rcx, [rsp + 0x128]
call fcn.140063600
mov qword [rsp + 0x20], 0
mov r9d, 0x11
xor r8d, r8d
mov rdx, qword [rsp + 0x128]
mov rcx, rsi
call fcn.140039c90
nop
lea rcx, [rsp + 0x128]
call fcn.14005b520
mov r12d, dword [rsi + 0xb4]
test r13, r13
je 0x1400c12bb
mov edx, dword [rsp + 0x4c]
mov rcx, rsi
call fcn.140045e0c
lea r13, [0x14019cf50]
jmp 0x1400c12fd
lea r13, [0x14019cf50]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r11, qword [rsp + 0x78]
mov qword [rsi + 0x60], r11
mov rax, qword [rsp + 0x90]
mov qword [rsi + 0x68], rax
mov al, byte [rsp + 0x130]
mov byte [rsi + 0xf], al
mov al, byte [rsp + 0x40]
mov byte [rsi + 0xba], al
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp qword [rsi + 0x40], 0
je 0x1400c1310
mov rax, qword [rsp + 0x80]
mov qword [rsi + 0x40], rax
mov rsi, qword [rsp + 0x70]
test rsi, rsi
je 0x1400c133f
mov qword [rsp + 0x128], rsi
xor edx, edx
mov rcx, rsi
call fcn.140045e0c
nop
lea rcx, [rsi + 0x58]
call fcn.14005b520
mov rcx, rsi
call fcn.1400cf984
nop
test rbx, rbx
je 0x1400c1352
mov rax, qword [rbx]
mov edx, 1
mov rcx, rbx
call qword [rax + 0x18]
mov bl, byte [rsp + 0x120]
test bl, bl
jne 0x1400c139a
test r15, r15
je 0x1400c139a
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
dec dword [r15 + 0x140]
cmp byte [r15 + 0xa1], 0x81
je 0x1400c1391
xor r9d, r9d
xor r8d, r8d
mov edx, 0x43d
mov rcx, qword [r15 + 0x20]
call qword [sym.imp.USER32.dll_PostMessageW]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.1400601e0
cmp dword [rsp + 0x58], 0
je 0x1400c1461
cmp word [rsp + 0x42], 0
jne 0x1400c1461
mov qword [rsp + 0x128], r13
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
or r9d, 0xffffffff
xor r8d, r8d
lea rdx, [0x140149848]
mov rcx, rbp
call fcn.1400307c0
test rax, rax
je 0x1400c13f3
mov rdx, qword [rax]
lea rcx, str.CurDir
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
or r9d, 0xffffffff
xor r8d, r8d
lea rdx, str.CurDrv
mov rcx, rbp
call fcn.1400307c0
test rax, rax
je 0x1400c141e
mov rdx, qword [rax]
lea rcx, [0x140154560]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
or r9d, 0xffffffff
xor r8d, r8d
lea rdx, str.CurFile
mov rcx, rbp
call fcn.1400307c0
test rax, rax
je 0x1400c1449
mov rdx, qword [rax]
lea rcx, [0x140154538]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call fcn.14002a8c0
nop
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp qword [rbp + 0x40], 0
je 0x1400c146c
mov qword [rbp + 0x40], r15
test bl, bl
jne 0x1400c147b
xor edx, edx
mov rcx, rbp
call fcn.14009aae0
nop
lea rcx, [rsp + 0x60]
call fcn.14005b520
nop
mov qword [rsp + 0x128], r13
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rax, qword [rsp + 0x50]
test rax, rax
je 0x1400c14c9
dec dword [rax + 8]
mov rbx, qword [rsp + 0x50]
cmp dword [rbx + 8], 0
jg 0x1400c14c0
mov rcx, rbx
call fcn.14005b520
mov rcx, rbx
call fcn.1400cf984
mov qword [rsp + 0x50], 0
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, r12d
add rsp, 0xb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret