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

Disassembly:
push rbp
push rdi
mov eax, 0x2d38
call fcn.140031e20
sub rsp, rax
mov eax, dword [0x1400c4600]
mov rdi, r9
mov rbp, rcx
inc eax
cmp eax, 0x30
mov dword [0x1400c4600], eax
jge 0x1400340a0
mov qword [rsp + 0x2d50], rbx
mov qword [rsp + 0x2d58], rsi
xor esi, esi
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x2d20], r15
mov rbx, rdx
mov dword [rsp + 0x30], esi
mov qword [rsp + 0x58], rsi
mov r15d, r8d
call fcn.1400170c0
lea rcx, [rsp + 0x50]
mov r8d, 0x2000
mov rdx, rbx
call fcn.140017100
test al, al
je 0x1400340d1
mov qword [rsp + 0x2d60], r12
mov qword [rsp + 0x2d30], r13
lea rdx, [rsp + 0x6f0]
mov r13b, 1
mov ecx, 0x104
mov qword [rsp + 0x2d28], r14
mov qword [rsp + 0x2d68], rdi
xor r12b, r12b
movzx r14d, r13b
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.14001a7ac
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x2d0]
call fcn.140019150
lea rdx, [rsp + 0x4e0]
lea rcx, [rsp + 0x2d0]
call fcn.140019124
lea rcx, [rsp + 0x2d0]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
nop word [rax + rax]
cmp r14b, 1
jne 0x140016e78
mov eax, dword [rsp + 0x64]
test r14b, al
jne 0x14003412d
test al, 2
jne 0x14003412d
test al, 4
jne 0x14003410f
lea rdx, [rsp + 0x900]
lea rcx, [rsp + 0x50]
mov r8d, 0xfff
call fcn.140016b10
test al, al
je 0x140016e78
inc dword [rsp + 0x30]
mov rbx, rsi
mov rdi, rsi
movzx esi, word [rsp + rbx*2 + 0x900]
movzx ecx, si
call fcn.140019e08
test eax, eax
je 0x140016d45
movzx ecx, si
call fcn.140019df0
test eax, eax
jne 0x140016edd
cmp word [rsp + rbx*2 + 0x900], 0
je 0x140016d71
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 0x140016d50
lea rdx, [rsp + 0x900]
xor esi, esi
mov rcx, rbp
mov word [rsp + rdi*2 + 0x900], si
call fcn.140016f00
test al, al
je 0x1400341b0
lea rcx, [rsp + 0x900]
call fcn.140019b5c
test eax, eax
je 0x140016ddf
lea ebx, [rax - 1]
movsxd rdi, ebx
test ebx, ebx
js 0x140016dd4
movzx esi, word [rsp + rdi*2 + 0x900]
movzx ecx, si
call fcn.140019e08
test eax, eax
je 0x140016dd2
movzx ecx, si
call fcn.140019df0
test eax, eax
jne 0x14003414b
xor esi, esi
movsxd rax, ebx
mov word [rsp + rax*2 + 0x902], si
lea rcx, [rsp + 0x900]
xor dil, dil
call fcn.140019b5c
cmp eax, 2
jle 0x140016e10
movsxd rbx, eax
movzx ecx, word [rsp + rbx*2 + 0x8fc]
and cx, 0x7f
call fcn.140019df0
test eax, eax
jne 0x140016ee5
cmp r12b, 1
je 0x14003416c
lea rax, [rsp + 0x50]
lea r9, [rsp + 0x30]
lea r8, [rsp + 0xc0]
lea rdx, [rsp + 0x900]
mov rcx, rbp
mov qword [rsp + 0x20], rax
call fcn.140016fa0
cmp eax, 3
jne 0x140034182
mov edx, dword [rsp + 0x30]
lea r8, [rsp + 0x900]
mov r9d, r15d
mov rcx, rbp
call fcn.140016fd0
cmp dil, 1
je 0x1400341a8
xor r12b, r12b
cmp r13b, 1
je 0x140016cd0
lea rcx, [rsp + 0x50]
call fcn.1400170c0
lea rcx, [rsp + 0x6f0]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea rcx, [rsp + 0x50]
call fcn.1400170c0
dec dword [0x1400c4600]
mov r14, qword [rsp + 0x2d28]
mov r12, qword [rsp + 0x2d60]
mov al, r13b
mov r13, qword [rsp + 0x2d30]
mov rsi, qword [rsp + 0x2d58]
mov rbx, qword [rsp + 0x2d50]
mov r15, qword [rsp + 0x2d20]
add rsp, 0x2d38
pop rdi
pop rbp
ret
inc rbx
jmp 0x140016d21
cmp word [rsp + rbx*2 + 0x8fe], 0x5f
jne 0x140016e10
jmp 0x14003415c
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.1400454c0
dec dword [0x1400c4600]
xor al, al
jmp 0x140016ed3
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.1400454c0
lea rcx, [rsp + 0x50]
call fcn.1400170c0
dec dword [0x1400c4600]
xor al, al
jmp 0x140016ebb
lea rdx, [rsp + 0x900]
lea rcx, [rsp + 0x50]
mov r8d, 0xfff
call fcn.1400440a0
nop
jmp 0x140016d0f
lea rdx, [rsp + 0x900]
lea rcx, [rsp + 0x50]
mov r8d, 0xfff
call fcn.140052ce0
nop
jmp 0x140016d0f
dec ebx
sub rdi, 1
jns 0x140016dae
jmp 0x140016dd2
mov word [rsp + rbx*2 + 0x8fe], si
mov dil, 1
jmp 0x140016e10
lea rdx, [rsp + 0x900]
mov rcx, rbp
call fcn.140045210
nop
jmp 0x140016e61
test eax, eax
je 0x1400341a0
cmp eax, 2
je 0x140016e4a
cmp eax, 4
jne 0x140016e61
xor r14b, r14b
jmp 0x140016e61
xor r13b, r13b
jmp 0x140016e61
mov r12b, 1
jmp 0x140016e6e
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.1400454c0
xor r13b, r13b
jmp 0x140016e78