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

Disassembly:
push rbp
push rbx
push r12
push r14
push r15
lea rbp, [rsp - 0x580]
sub rsp, 0x680
mov rax, qword [0x1400d61c0]
xor rax, rsp
mov qword [rbp + 0x570], rax
xor r12d, r12d
mov r15, rdx
cmp qword [rcx + 0x10], 0x104
mov ebx, r12d
mov dword [rsp + 0x60], ebx
mov r14, rcx
jae 0x140020cf6
cmp qword [rdx + 0x10], 0x104
jae 0x140020cf6
or r9, 0xffffffffffffffff
mov qword [rsp + 0x6c8], rdi
xor r8d, r8d
mov qword [rbp - 0x68], 7
lea rcx, [rbp - 0x80]
mov qword [rbp - 0x70], r12
mov word [rbp - 0x80], r12w
call fcn.140003170
cmp qword [rbp - 0x68], 8
lea rcx, [rbp - 0x80]
cmovae rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400209d9
cmp qword [rbp - 0x68], 8
lea rdx, [rbp - 0x80]
mov r8d, 0x104
lea rcx, [rbp + 0x320]
cmovae rdx, qword [rbp - 0x80]
call fcn.14008be5c
test rax, rax
jne 0x140020813
mov qword [rbp - 0x28], 7
mov qword [rbp - 0x30], r12
mov word [rbp - 0x40], r12w
jmp 0x14002088f
cmp word [rbp + 0x320], bx
jne 0x140020821
mov r8, r12
jmp 0x14002083a
lea rax, [rbp + 0x320]
or r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp word [rax + r8*2], bx
jne 0x140020830
mov qword [rbp - 0x28], 7
mov qword [rbp - 0x30], r12
mov word [rbp - 0x40], r12w
test r8, r8
jne 0x14002085b
mov qword [rbp - 0x30], r12
mov word [rbp - 0x40], r12w
jmp 0x14002086b
lea rdx, [rbp + 0x320]
lea rcx, [rbp - 0x40]
call fcn.14000b820
xor edx, edx
lea rcx, [rbp - 0x40]
xor r8d, r8d
call fcn.140014cf0
cmp rax, 0xffffffffffffffff
je 0x14002088f
or r8, 0xffffffffffffffff
lea rcx, [rbp - 0x40]
mov rdx, rax
call fcn.140004de0
mov r8, qword [rbp - 0x68]
cmp r8, 8
jb 0x1400208a9
mov rdx, qword [rbp - 0x80]
lea rcx, [rbp - 0x80]
inc r8
call fcn.140004d70
lea rdx, [rbp - 0x40]
mov qword [rbp - 0x68], 7
lea rcx, [rbp - 0x80]
mov qword [rbp - 0x70], r12
mov word [rbp - 0x80], r12w
call fcn.140006000
mov r8, qword [rbp - 0x28]
cmp r8, 8
jb 0x1400208e1
mov rdx, qword [rbp - 0x40]
lea rcx, [rbp - 0x40]
inc r8
call fcn.140004d70
cmp qword [rbp - 0x70], rbx
je 0x140020a84
mov rdx, r14
lea rcx, [rbp + 0x20]
call fcn.140020330
mov rcx, qword [rbp + 0x30]
test rcx, rcx
je 0x140020cd3
cmp qword [rbp + 0x38], 8
lea rax, [rbp + 0x20]
mov qword [rsp + 0x48], rcx
lea rdx, [rsp + 0x50]
cmovae rax, qword [rbp + 0x20]
lea rcx, [rsp + 0x40]
cmp qword [rbp - 0x68], 8
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x80]
movaps xmm0, xmmword [rsp + 0x40]
cmovae rax, qword [rbp - 0x80]
mov qword [rsp + 0x40], rax
mov rax, qword [rbp - 0x70]
mov qword [rsp + 0x48], rax
movdqa xmmword [rsp + 0x50], xmm0
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
call fcn.14001c140
test al, al
jne 0x140020cd3
xor r8d, r8d
lea rdx, [rbp - 0x80]
lea rcx, [rbp + 0x20]
call fcn.14001d100
test al, al
jne 0x140020cd3
lea rax, [rbp - 0x60]
mov qword [rbp - 0x48], 7
mov r9d, 3
mov qword [rsp + 0x20], rax
mov r8b, 1
mov qword [rbp - 0x50], r12
mov rdx, r14
mov word [rbp - 0x60], r12w
lea rcx, [rbp + 0x40]
call fcn.1400355c0
mov r8, qword [rbp - 0x48]
cmp r8, 8
jb 0x1400209c6
mov rdx, qword [rbp - 0x60]
lea rcx, [rbp - 0x60]
inc r8
call fcn.140004d70
cmp qword [r14 + 0x18], 8
jb 0x140020a8c
mov rcx, qword [r14]
jmp 0x140020a8f
lea rdx, [rbp - 0x40]
lea rcx, [rbp - 0x80]
call fcn.14001d3f0
mov rdx, rax
lea rcx, [rbp - 0x60]
call fcn.140020330
mov rdi, rax
lea rax, [rbp - 0x80]
cmp rax, rdi
je 0x140020a35
mov r8, qword [rbp - 0x68]
cmp r8, 8
jb 0x140020a18
mov rdx, qword [rbp - 0x80]
lea rcx, [rbp - 0x80]
inc r8
call fcn.140004d70
mov rdx, rdi
mov qword [rbp - 0x68], 7
lea rcx, [rbp - 0x80]
mov qword [rbp - 0x70], r12
mov word [rbp - 0x80], r12w
call fcn.140006000
mov r8, qword [rbp - 0x48]
cmp r8, 8
jb 0x140020a4f
mov rdx, qword [rbp - 0x60]
lea rcx, [rbp - 0x60]
inc r8
call fcn.140004d70
mov r8, qword [rbp - 0x28]
mov qword [rbp - 0x48], 7
mov qword [rbp - 0x50], r12
mov word [rbp - 0x60], r12w
cmp r8, 8
jb 0x140020a7a
mov rdx, qword [rbp - 0x40]
lea rcx, [rbp - 0x40]
inc r8
call fcn.140004d70
cmp qword [rbp - 0x70], rbx
jne 0x1400208eb
xor dil, dil
jmp 0x140020cdf
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140020aab
xor dil, dil
lea rcx, [rbp + 0x40]
call fcn.140035780
jmp 0x140020cd6
or r9, 0xffffffffffffffff
mov qword [rsp + 0x6c0], rsi
xor r8d, r8d
mov qword [rbp - 8], 7
mov rdx, r14
mov qword [rbp - 0x10], r12
lea rcx, [rbp - 0x20]
mov word [rbp - 0x20], r12w
call fcn.140003170
mov rcx, r14
call fcn.140020d40
or r9, 0xffffffffffffffff
mov qword [rbp + 0x18], 7
xor r8d, r8d
mov qword [rbp + 0x10], r12
mov rdx, r14
mov word [rbp], r12w
lea rcx, [rbp]
movzx esi, al
mov dil, 1
call fcn.140003170
mov rcx, r15
call fcn.140020d40
test al, al
je 0x140020b36
lea rdx, [rbp - 0x60]
mov rcx, r14
call fcn.14001d3f0
mov rdx, rax
lea rcx, [rbp]
call fcn.14000b100
lea rcx, [rbp - 0x60]
call fcn.140002120
cmp qword [rbp - 0x10], r12
je 0x140020cae
or r9, 0xffffffffffffffff
mov qword [rbp - 0x48], 7
xor r8d, r8d
mov qword [rbp - 0x50], r12
mov rdx, r15
mov word [rbp - 0x60], r12w
lea rcx, [rbp - 0x60]
call fcn.140003170
cmp qword [rbp - 8], 8
lea rax, [rbp - 0x20]
lea rdx, [rsp + 0x70]
cmovae rax, qword [rbp - 0x20]
lea rcx, [rbp - 0x40]
cmp qword [rbp + 0x18], 8
mov qword [rsp + 0x40], rax
mov rax, qword [rbp - 0x10]
mov qword [rsp + 0x48], rax
lea rax, [rbp]
cmovae rax, qword [rbp]
movaps xmm0, xmmword [rsp + 0x40]
mov qword [rsp + 0x50], rax
mov rax, qword [rbp + 0x10]
mov qword [rsp + 0x58], rax
movdqa xmmword [rsp + 0x70], xmm0
movaps xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rbp - 0x40], xmm0
call fcn.14001c140
test al, al
jne 0x140020bdc
lea r8, [rbp - 0x60]
lea rdx, [rbp - 0x20]
lea rcx, [rbp]
call fcn.14001d100
test al, al
je 0x140020ca2
test sil, sil
je 0x140020c25
cmp qword [rbp - 0x48], 8
lea rcx, [rbp - 0x60]
cmovae rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140020c01
shr eax, 4
and al, 1
jne 0x140020c4d
cmp qword [rbp - 0x48], 8
lea rcx, [rbp - 0x60]
cmovae rcx, qword [rbp - 0x60]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140020c4d
test bl, 2
je 0x140020c4a
and ebx, 0xfffffffd
jmp 0x140020c3e
lea rdx, [rbp - 0x60]
lea rcx, [rbp - 0x20]
call fcn.140021d70
test al, al
jne 0x140020c4d
test bl, 4
je 0x140020c4a
and ebx, 0xfffffffb
lea rcx, [rbp + 0x320]
call fcn.140025360
xor dil, dil
lea rdx, [rbp - 0x40]
lea rcx, [rbp + 0x40]
call fcn.1400359b0
mov rdx, rax
lea rcx, [rbp - 0x20]
call fcn.14000b100
lea rcx, [rbp - 0x40]
call fcn.140002120
cmp qword [rbp - 0x10], r12
je 0x140020c8e
lea rdx, [rbp + 0x320]
lea rcx, [rbp + 0x40]
call fcn.140035860
mov esi, dword [rax]
shr esi, 4
and sil, 1
lea rcx, [rbp - 0x60]
call fcn.140002120
test dil, dil
jne 0x140020b36
jmp 0x140020cae
xor dil, dil
lea rcx, [rbp - 0x60]
call fcn.140002120
lea rcx, [rbp]
call fcn.140002120
lea rcx, [rbp - 0x20]
call fcn.140002120
mov rsi, qword [rsp + 0x6c0]
lea rcx, [rbp + 0x40]
call fcn.140035780
jmp 0x140020cd6
xor dil, dil
lea rcx, [rbp + 0x20]
call fcn.140002120
lea rcx, [rbp - 0x80]
call fcn.140002120
movzx eax, dil
mov rdi, qword [rsp + 0x6c8]
jmp 0x140020cf8
xor al, al
mov rcx, qword [rbp + 0x570]
xor rcx, rsp
call fcn.1400812a0
add rsp, 0x680
pop r15
pop r14
pop r12
pop rbx
pop rbp
ret