Function at 0x140038210
Capabilities:
Set current directory

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rbp
push rdi
sub rsp, 0x160
cmp byte [0x14012d5da], 0
mov ebp, r8d
mov edi, edx
mov dword [rcx + 0xb74], edx
mov rbx, rcx
jne 0x1400384ac
cmp byte [rcx + 0xbe0], 0
je 0x1400384ac
mov rcx, qword [0x140127a38]
mov dword [0x14012d8f8], r8d
xor r8d, r8d
mov qword [rax + 8], rsi
mov qword [rax + 0x10], r14
lea edx, [r8 + 1]
call fcn.140001780
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 [0x140124200]
lea rcx, [0x1401278d0]
inc dword [0x1401278cc]
xor esi, esi
add r8, 0x150
mov word [rsp + 0x15e], si
mov qword [0x140124200], r8
mov rax, r8
lea edx, [rsi + 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 0x1400382b3
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, [0x14012afc0]
movups xmmword [rax + 0x40], xmm0
mov dword [r8 + 0x3c], esi
call fcn.140037960
cmp dword [0x140127a5c], esi
mov qword [0x14012bbb0], rsi
je 0x14003836e
mov rax, qword [0x140126a10]
lea rcx, [0x1400ef7e4]
test rax, rax
je 0x140038368
mov rax, qword [rax]
test rax, rax
cmovne rcx, rax
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rcx, qword [0x140126968]
cmp rcx, qword [0x140126970]
mov r14d, dword [0x1401241f4]
mov dword [0x1401241f4], esi
mov byte [0x14012d5da], 1
jne 0x14003839e
call fcn.1400079d0
mov rcx, qword [0x140126968]
cmp rcx, qword [0x140126960]
jb 0x1400383b8
mov rax, qword [0x14012b690]
mov qword [rcx], rax
mov rcx, qword [0x140126968]
add rcx, 0x18
mov byte [0x140126fc8], sil
mov qword [0x140126968], rcx
lea rax, str.OnExit
mov qword [rcx], rsi
mov qword [rcx + 8], rax
mov dword [rcx + 0x10], esi
mov rcx, qword [rbx + 0xb60]
test rcx, rcx
je 0x140038402
call fcn.140001880
test eax, eax
je 0x140038402
cmp byte [0x140126fc8], sil
jne 0x140038402
mov byte [0x140126fc8], 1
jmp 0x140038459
mov byte [0x140126fc8], 1
mov dword [rsp + 0x30], esi
call fcn.140079070
cmp qword [rbx + 0xb60], rsi
lea rcx, [rbx + 0xb10]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x20]
movsxd rax, dword [0x14012d8f8]
sete sil
mov r9d, esi
mov dword [rsp + 0x50], 1
mov r8d, 2
mov qword [rsp + 0x40], rax
call fcn.1400bcd90
cmp eax, 3
jne 0x1400384ed
sub qword [0x140126968], 0x18
mov byte [0x14012d5da], 0
cmp edi, 0xffffffff
jle 0x1400384fc
lea rcx, [rsp + 0x60]
call fcn.140005730
mov rsi, qword [rsp + 0x170]
mov eax, 8
mov dword [0x1401241f4], r14d
mov r14, qword [rsp + 0x178]
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
cmp byte [0x140126fc8], 0
jne 0x1400384e0
cmp edi, 6
jne 0x1400384e0
mov rax, qword [0x140129e60]
mov ecx, dword [0x14012d8f8]
mov byte [0x140126fc8], 1
cmp word [rax], 0
lea eax, [rdi + 2]
cmovne ecx, ebp
mov dword [0x14012d8f8], ecx
jmp 0x140038497
mov byte [0x140126fc8], 0
call fcn.140038510
int3
sub qword [0x140126968], 0x18
mov byte [0x14012d5da], 0
mov r8d, ebp
mov edx, edi
mov rcx, rbx
call fcn.140038510
int3