Function at 0x14021cb40
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov r11, rsp
push rdi
sub rsp, 0x60
mov qword [r11 - 0x48], 0xfffffffffffffffe
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rsi
mov rax, qword [0x140302028]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov rbx, rcx
mov qword [r11 - 0x40], rcx
cmp qword [rcx + 0x18], 8
jb 0x14021cb78
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14021cb91
mov rcx, rbx
call fcn.140074800
nop
jmp 0x14021cd2c
mov rax, qword [rbx + 0x10]
test rax, rax
jne 0x14021cbaa
mov rcx, rbx
call fcn.140074800
nop
xor al, al
jmp 0x14021cd2e
mov rcx, rbx
cmp qword [rbx + 0x18], 8
jb 0x14021cbb7
mov rcx, qword [rbx]
lea r9, [rcx + rax*2]
mov rcx, rbx
jb 0x14021cbc3
mov rcx, qword [rbx]
xor esi, esi
mov edx, esi
mov r8, r9
sub r8, rcx
inc r8
shr r8, 1
cmp rcx, r9
cmova r8, rsi
test r8, r8
je 0x14021cbfb
lea eax, [rsi + 0x5c]
cmp word [rcx], 0x2f
jne 0x14021cbeb
mov word [rcx], ax
add rcx, 2
inc rdx
cmp rdx, r8
jne 0x14021cbe2
mov rax, qword [rbx + 0x10]
mov rdi, rsi
nop
mov rdx, rbx
mov r9, qword [rbx + 0x18]
cmp r9, 8
jb 0x14021cc10
mov rdx, qword [rbx]
cmp rdi, rax
jae 0x14021cc4a
sub rax, rdi
lea rcx, [rdx + rdi*2]
mov rdi, rsi
je 0x14021cc3d
cmp word [rcx], 0x5c
je 0x14021cc3a
cmp rax, 1
je 0x14021cc3d
dec rax
add rcx, 2
cmp word [rcx], 0x5c
jne 0x14021cc27
mov rdi, rcx
test rdi, rdi
je 0x14021cc4a
sub rdi, rdx
sar rdi, 1
jmp 0x14021cc51
mov rdi, 0xffffffffffffffff
cmp rdi, 0xffffffffffffffff
jne 0x14021cc5b
mov rdi, qword [rbx + 0x10]
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], 7
mov word [rsp + 0x30], si
mov r8, rdi
cmp qword [rbx + 0x10], rdi
cmovb r8, qword [rbx + 0x10]
mov rdx, rbx
cmp r9, 8
jb 0x14021cc86
mov rdx, qword [rbx]
lea rcx, [rsp + 0x30]
call fcn.140074a60
nop
cmp qword [rsp + 0x40], 0
je 0x14021ccd0
lea rcx, [rsp + 0x30]
cmp qword [rsp + 0x48], 8
cmovae rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14021ccd0
lea rcx, [rsp + 0x30]
cmp qword [rsp + 0x48], 8
cmovae rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wmkdir]
test eax, eax
jne 0x14021cd4e
inc rdi
mov rdx, qword [rsp + 0x48]
cmp rdx, 8
jb 0x14021cd16
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14021cd10
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14021cdb6
call fcn.14009f0ec
nop
mov rax, qword [rbx + 0x10]
cmp rdi, rax
jb 0x14021cc00
mov rcx, rbx
call fcn.140074800
nop
mov al, 1
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.14009f440
mov rbx, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x60
pop rdi
ret
mov rdx, qword [rsp + 0x48]
cmp rdx, 8
jb 0x14021cd93
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14021cd8e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14021cd8e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14009f0ec
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], 7
mov word [rsp + 0x30], si
mov rcx, rbx
call fcn.140074800
nop
xor al, al
jmp 0x14021cd2e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3