Function at 0x140016020
Capabilities:
Get common file path
Set current directory

Disassembly:
push rbp
push rdi
mov eax, 0x2d38
call fcn.140030df0
sub rsp, rax
mov eax, dword [0x1400c03b0]
mov rdi, r9
mov rbp, rcx
inc eax
cmp eax, 0x30
mov dword [0x1400c03b0], eax
jge 0x1400329b0
xor eax, eax
mov qword [rsp + 0x2d50], rbx
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x2d30], r13
mov rbx, rdx
mov r13d, r8d
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x58], rax
call fcn.140016590
lea rcx, [rsp + 0x50]
mov r8d, 0x2000
mov rdx, rbx
call fcn.1400165d0
test al, al
je 0x1400329e1
mov qword [rsp + 0x2d58], rsi
mov qword [rsp + 0x2d60], r12
mov qword [rsp + 0x2d28], r14
lea rdx, [rsp + 0x6f0]
mov r14b, 1
mov ecx, 0x104
mov qword [rsp + 0x2d20], r15
mov qword [rsp + 0x2d68], rdi
xor r12b, r12b
movzx r15d, r14b
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea r9, [rsp + 0x40]
lea r8, [rsp + 0xc0]
mov edx, 0x104
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea r11, [rsp + 0x2900]
lea r9, [rsp + 0x2b10]
lea r8, [rsp + 0x4e0]
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0xc0]
mov qword [rsp + 0x20], r11
call fcn.1400198dc
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x2d0]
call fcn.140018120
lea rdx, [rsp + 0x4e0]
lea rcx, [rsp + 0x2d0]
call fcn.1400180f4
lea rcx, [rsp + 0x2d0]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
nop word [rax + rax]
cmp r15b, 1
jne 0x14001634d
mov eax, dword [rsp + 0x64]
test r15b, al
jne 0x140032a3f
test al, 2
jne 0x140032a3f
test al, 4
jne 0x140032a1f
mov ecx, 0xfff
call fcn.140017e04
lea rcx, [rsp + 0x50]
mov r8d, 0xfff
mov rdx, rax
mov rdi, rax
call fcn.140015ee0
movzx esi, al
test al, al
je 0x1400161d4
or edx, 0xffffffff
mov rcx, rdi
call fcn.140015d70
lea rcx, [rsp + 0x900]
mov rdx, rax
mov rbx, rax
call fcn.140018120
mov rcx, rbx
call fcn.1400185f4
mov rcx, rdi
call fcn.1400185f4
test sil, sil
je 0x14001634d
inc dword [rsp + 0x30]
xor eax, eax
mov rbx, rax
mov rdi, rax
movzx esi, word [rsp + rbx*2 + 0x900]
movzx ecx, si
call fcn.140018dd8
test eax, eax
je 0x140016215
movzx ecx, si
call fcn.140018dc0
test eax, eax
jne 0x1400163b2
cmp word [rsp + rbx*2 + 0x900], di
je 0x140016241
nop
movzx eax, word [rsp + rbx*2 + 0x900]
inc rbx
inc rdi
mov word [rsp + rdi*2 + 0x8fe], ax
cmp word [rsp + rbx*2 + 0x900], 0
jne 0x140016220
lea rdx, [rsp + 0x900]
xor esi, esi
mov rcx, rbp
mov word [rsp + rdi*2 + 0x900], si
call fcn.1400163d0
test al, al
je 0x140032ac4
lea rcx, [rsp + 0x900]
call fcn.140018b2c
test eax, eax
je 0x1400162af
lea edi, [rax - 1]
movsxd rbx, edi
test edi, edi
js 0x1400162a4
movzx esi, word [rsp + rbx*2 + 0x900]
movzx ecx, si
call fcn.140018dd8
test eax, eax
je 0x1400162a2
movzx ecx, si
call fcn.140018dc0
test eax, eax
jne 0x140032a5f
xor esi, esi
movsxd rax, edi
mov word [rsp + rax*2 + 0x902], si
lea rcx, [rsp + 0x900]
xor dil, dil
call fcn.140018b2c
cmp eax, 2
jle 0x1400162e0
movsxd rbx, eax
movzx ecx, word [rsp + rbx*2 + 0x8fc]
and cx, 0x7f
call fcn.140018dc0
test eax, eax
jne 0x1400163ba
cmp r12b, 1
je 0x140032a80
lea rax, [rsp + 0x50]
lea r9, [rsp + 0x30]
lea r8, [rsp + 0xc0]
lea rdx, [rsp + 0x900]
mov rcx, rbp
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], rax
call fcn.140016470
cmp eax, 3
jne 0x140032a96
mov edx, dword [rsp + 0x30]
lea r8, [rsp + 0x900]
mov r9d, r13d
mov rcx, rbp
call fcn.1400164a0
cmp dil, 1
je 0x140032abc
xor r12b, r12b
cmp r14b, 1
je 0x140016160
lea rcx, [rsp + 0x50]
call fcn.140016590
lea rcx, [rsp + 0x6f0]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea rcx, [rsp + 0x50]
call fcn.140016590
dec dword [0x1400c03b0]
mov r15, qword [rsp + 0x2d20]
mov r12, qword [rsp + 0x2d60]
mov rsi, qword [rsp + 0x2d58]
mov al, r14b
mov r14, qword [rsp + 0x2d28]
mov rbx, qword [rsp + 0x2d50]
mov r13, qword [rsp + 0x2d30]
add rsp, 0x2d38
pop rdi
pop rbp
ret
inc rbx
jmp 0x1400161f1
cmp word [rsp + rbx*2 + 0x8fe], 0x5f
jne 0x1400162e0
jmp 0x140032a70
mov rax, qword [rsp + 0x2d70]
mov r8d, dword [rsp + 0x2d78]
lea r9, str.include_depth_exceeded.__Make_sure_there_are_no_recursive_includes
mov rdx, rdi
mov qword [rsp + 0x20], rax
call fcn.140043bb0
dec dword [0x1400c03b0]
xor al, al
jmp 0x1400163a8
mov rax, qword [rsp + 0x2d70]
mov r8d, dword [rsp + 0x2d78]
lea r9, str.Error_opening_the_file
mov rdx, rdi
mov rcx, rbp
mov qword [rsp + 0x20], rax
call fcn.140043bb0
lea rcx, [rsp + 0x50]
call fcn.140016590
dec dword [0x1400c03b0]
xor al, al
jmp 0x140016398
lea rdx, [rsp + 0x900]
lea rcx, [rsp + 0x50]
mov r8d, 0xfff
call fcn.1400426e0
mov sil, al
jmp 0x1400161dc
lea rdx, [rsp + 0x900]
lea rcx, [rsp + 0x50]
mov r8d, 0xfff
call fcn.140050a20
mov sil, al
jmp 0x1400161dc
dec edi
sub rbx, 1
jns 0x14001627e
jmp 0x1400162a2
mov word [rsp + rbx*2 + 0x8fe], si
mov dil, 1
jmp 0x1400162e0
lea rdx, [rsp + 0x900]
mov rcx, rbp
call fcn.140043900
nop
jmp 0x140016336
test eax, eax
je 0x140032ab4
cmp eax, 2
je 0x14001631f
cmp eax, 4
jne 0x140016336
xor r15b, r15b
jmp 0x140016336
xor r14b, r14b
jmp 0x140016336
mov r12b, 1
jmp 0x140016343
mov r8d, dword [rsp + 0x30]
mov rdx, qword [rsp + 0x2d68]
lea rax, [rsp + 0x900]
lea r9, str.Unterminated_string
mov rcx, rbp
mov qword [rsp + 0x20], rax
call fcn.140043bb0
xor r14b, r14b
jmp 0x14001634d