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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0xa20]
sub rsp, 0xb20
mov rax, qword [0x140189090]
xor rax, rsp
mov qword [rbp + 0xa10], rax
xor esi, esi
mov dword [rsp + 0x30], esi
mov qword [rsp + 0x78], rsi
movdqa xmm0, xmmword [0x140166ab0]
movdqu xmmword [rbp - 0x78], xmm0
mov word [rsp + 0x78], si
mov dword [rsp + 0x30], 8
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x38]
call fcn.140025770
nop
lea rcx, [rsp + 0x78]
cmp rcx, rax
je 0x14004191b
mov r8, qword [rax + 0x10]
cmp qword [rax + 0x18], 8
jb 0x14004190d
mov rax, qword [rax]
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.140009050
nop
lea rcx, [rsp + 0x38]
call fcn.140008fe0
lea rdx, [rbp - 0x48]
lea rcx, [rsp + 0x78]
call fcn.140024a70
nop
lea rcx, [rsp + 0x78]
call fcn.140008fe0
mov word [rbp + 0x1f0], si
lea rdx, [rbp + 0x1f0]
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov qword [rbp - 0x68], rsi
movdqa xmm0, xmmword [0x140166ab0]
movdqu xmmword [rbp - 0x58], xmm0
mov word [rbp - 0x68], si
lea rax, [rbp + 0x1f0]
mov rbx, 0xffffffffffffffff
mov r8, rbx
nop dword [rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x140041980
lea rdx, [rbp + 0x1f0]
lea rcx, [rbp - 0x68]
call fcn.140009050
nop
mov dil, 1
lea rdx, [rbp - 0x68]
lea rcx, [rbp - 0x48]
call fcn.140022810
test eax, eax
je 0x140041bc6
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x20]
call fcn.1400fb5b0
lea rdx, [rbp - 0x20]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov qword [rsp + 0x78], rsi
movdqa xmm0, xmmword [0x140166ab0]
movdqu xmmword [rbp - 0x78], xmm0
mov word [rsp + 0x78], si
lea rax, [rbp - 0x20]
nop
inc rbx
cmp word [rax + rbx*2], 0
jne 0x1400419f0
mov r8, rbx
lea rdx, [rbp - 0x20]
lea rcx, [rsp + 0x78]
call fcn.140009050
mov ebx, 0x60
xor ecx, ecx
call fcn.140027380
mov dword [rsp + 0x20], 1
lea r9, str.Logger
xor r8d, r8d
lea rdx, [0x14001cc30]
mov rcx, rax
call fcn.140027650
cmp dword [rax + 0x40], 5
jl 0x140041ad0
xor ecx, ecx
call fcn.140027380
mov dword [rsp + 0x20], 1
lea r9, str.Logger
xor r8d, r8d
lea rdx, [0x14001cc30]
mov rcx, rax
call fcn.140027650
mov rsi, rax
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x78]
call fcn.1400220d0
mov rdi, rax
mov dword [rsp + 0x30], 0x61
cmp qword [rax + 0x18], 0x10
jb 0x140041a91
mov rdi, qword [rax]
lea rdx, [rsp + 0x38]
lea rcx, [rbp - 0x68]
call fcn.1400220d0
nop
mov ebx, 0x63
mov dword [rsp + 0x30], ebx
cmp qword [rax + 0x18], 0x10
jb 0x140041ab3
mov rax, qword [rax]
mov qword [rsp + 0x20], rdi
mov r9, rax
lea r8, str.EnsureWorkingDirectory:_Trying_to_change_working_director_from__s_to__s
mov edx, 5
mov rcx, rsi
call fcn.14001efa0
nop
test bl, 2
je 0x140041ae3
and ebx, 0xfffffffd
lea rcx, [rsp + 0x38]
call fcn.1400091f0
nop
test bl, 1
je 0x140041af5
and ebx, 0xfffffffe
lea rcx, [rsp + 0x58]
call fcn.1400091f0
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], 8
cmovae rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
setne dil
test eax, eax
jne 0x140041bbb
xor ecx, ecx
call fcn.140027380
mov dword [rsp + 0x20], 1
lea r9, str.Logger
xor r8d, r8d
lea rdx, [0x14001cc30]
mov rcx, rax
call fcn.140027650
cmp dword [rax + 0x40], 3
jl 0x140041bab
xor ecx, ecx
call fcn.140027380
mov dword [rsp + 0x20], 1
lea r9, str.Logger
xor r8d, r8d
lea rdx, [0x14001cc30]
mov rcx, rax
call fcn.140027650
mov rsi, rax
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x78]
call fcn.1400220d0
nop
or ebx, 4
mov dword [rsp + 0x30], ebx
cmp qword [rax + 0x18], 0x10
jb 0x140041b93
mov rax, qword [rax]
mov r9, rax
lea r8, str.EnsureWorkingDirecotry:_Failed_to_change_the_working_directory_to__s
mov edx, 3
mov rcx, rsi
call fcn.14001efa0
nop
test bl, 4
je 0x140041bbb
lea rcx, [rsp + 0x58]
call fcn.1400091f0
nop
lea rcx, [rsp + 0x78]
call fcn.140008fe0
nop
lea rcx, [rbp - 0x68]
call fcn.140008fe0
nop
lea rcx, [rbp - 0x48]
call fcn.140008fe0
movzx eax, dil
mov rcx, qword [rbp + 0xa10]
xor rcx, rsp
call fcn.1400f89b0
lea r11, [rsp + 0xb20]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret