Function at 0x14003a320
Capabilities:
Set current directory

Disassembly:
mov rax, rsp
push rsi
push rdi
push r14
sub rsp, 0x160
cmp byte [0x140138672], 0
mov r14d, r8d
mov esi, edx
mov dword [rcx + 0xb74], edx
mov rdi, rcx
jne 0x14003a5d3
cmp byte [rcx + 0xbe0], 0
je 0x14003a5d3
mov rcx, qword [0x140132a80]
mov edx, 1
mov qword [rax + 8], rbx
mov dword [0x140138998], r8d
xor r8d, r8d
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], r15
call fcn.1400017a0
mov r8d, 0x7f
lea rcx, [rsp + 0x60]
mov rdx, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
mov r8, qword [0x14012f240]
lea rcx, [0x140132910]
inc dword [0x140132a88]
xor ebp, ebp
add r8, 0x150
mov word [rsp + 0x15e], bp
mov qword [0x14012f240], r8
mov rax, r8
mov edx, 2
lea rax, [rax + 0x80]
movups xmm0, xmmword [rcx]
lea rcx, [rcx + 0x80]
movups xmmword [rax - 0x80], xmm0
movups xmm1, xmmword [rcx - 0x70]
movups xmmword [rax - 0x70], xmm1
movups xmm0, xmmword [rcx - 0x60]
movups xmmword [rax - 0x60], xmm0
movups xmm1, xmmword [rcx - 0x50]
movups xmmword [rax - 0x50], xmm1
movups xmm0, xmmword [rcx - 0x40]
movups xmmword [rax - 0x40], xmm0
movups xmm1, xmmword [rcx - 0x30]
movups xmmword [rax - 0x30], xmm1
movups xmm0, xmmword [rcx - 0x20]
movups xmmword [rax - 0x20], xmm0
movups xmm1, xmmword [rcx - 0x10]
movups xmmword [rax - 0x10], xmm1
sub rdx, 1
jne 0x14003a3c5
movups xmm0, xmmword [rcx]
movups xmmword [rax], xmm0
movups xmm1, xmmword [rcx + 0x10]
movups xmmword [rax + 0x10], xmm1
movups xmm0, xmmword [rcx + 0x20]
movups xmmword [rax + 0x20], xmm0
movups xmm1, xmmword [rcx + 0x30]
movups xmmword [rax + 0x30], xmm1
movups xmm0, xmmword [rcx + 0x40]
lea rcx, [0x140136060]
movups xmmword [rax + 0x40], xmm0
mov dword [r8 + 0x3c], ebp
call fcn.140039a50
cmp dword [0x140132aac], ebp
mov qword [0x140136c50], rbp
je 0x14003a480
mov rax, qword [0x140131a50]
lea rcx, [0x1400f98c4]
test rax, rax
je 0x14003a47a
mov rax, qword [rax]
test rax, rax
cmovne rcx, rax
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rcx, qword [0x1401319a8]
cmp rcx, qword [0x1401319b0]
mov r15d, dword [0x14012f234]
mov dword [0x14012f234], ebp
mov byte [0x140138672], 1
jne 0x14003a4b0
call fcn.140007bf0
mov rcx, qword [0x1401319a8]
cmp rcx, qword [0x1401319a0]
jb 0x14003a4ca
mov rax, qword [0x140136730]
mov qword [rcx], rax
mov rcx, qword [0x1401319a8]
add rcx, 0x18
mov byte [0x140132008], bpl
mov qword [0x1401319a8], rcx
lea rax, str.OnExit
mov bl, 1
mov qword [rcx], rbp
mov qword [rcx + 8], rax
mov dword [rcx + 0x10], ebp
mov rcx, qword [rdi + 0xb60]
test rcx, rcx
je 0x14003a511
call fcn.1400018a0
test eax, eax
je 0x14003a511
cmp byte [0x140132008], bpl
movzx ebx, bl
cmove ebx, ebp
mov byte [0x140132008], 1
test bl, bl
je 0x14003a579
mov dword [rsp + 0x30], ebp
call fcn.14007f340
cmp qword [rdi + 0xb60], rbp
lea rcx, [rdi + 0xb10]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x20]
movsxd rax, dword [0x140138998]
sete bpl
mov r9d, ebp
mov dword [rsp + 0x50], 1
mov r8d, 2
mov qword [rsp + 0x40], rax
call fcn.1400c4bc0
cmp eax, 3
jne 0x14003a579
sub qword [0x1401319a8], 0x18
mov byte [0x140138672], 0
jmp 0x14003a590
sub qword [0x1401319a8], 0x18
mov byte [0x140138672], 0
test bl, bl
jne 0x14003a61a
cmp esi, 0xffffffff
jle 0x14003a61a
lea rcx, [rsp + 0x60]
call fcn.140005820
mov rbp, qword [rsp + 0x188]
mov eax, 8
mov rbx, qword [rsp + 0x180]
mov dword [0x14012f234], r15d
mov r15, qword [rsp + 0x190]
add rsp, 0x160
pop r14
pop rdi
pop rsi
ret
cmp byte [0x140132008], 0
jne 0x14003a60d
cmp esi, 6
jne 0x14003a60d
mov rax, qword [0x140134ef0]
cmp word [rax], 0
je 0x14003a5f5
mov dword [0x140138998], r14d
mov byte [0x140132008], 1
mov eax, 8
add rsp, 0x160
pop r14
pop rdi
pop rsi
ret
mov byte [0x140132008], 0
call fcn.14003a630
int3
mov r8d, r14d
mov edx, esi
mov rcx, rdi
call fcn.14003a630
int3