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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
mov qword [rsp + 0x28], 0xfffffffffffffffe
mov rdi, rcx
xor r15d, r15d
mov rcx, qword [rcx]
mov eax, dword [rcx - 0x10]
test eax, eax
je 0x1400086a2
test eax, eax
je 0x1400082bb
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400082bb
test al, 0x10
je 0x1400082bb
mov eax, 1
jmp 0x1400086a2
mov rdi, qword [rdi]
sub rdi, 0x18
mov rcx, qword [rdi]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rdi + 0x10], r15d
jl 0x1400082e3
cmp rax, qword [rdi]
jne 0x1400082e3
mov rbx, rdi
lock add dword [rdi + 0x10], 1
jmp 0x140008322
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rdi + 8]
call qword [rax]
mov rbx, rax
test rax, rax
jne 0x1400082ff
call fcn.140003050
int3
mov eax, dword [rdi + 8]
mov dword [rbx + 8], eax
mov eax, dword [rdi + 8]
add eax, 1
movsxd rdx, eax
lea r9, [rdx + rdx]
lea r8, [rdi + 0x18]
add rdx, rdx
lea rcx, [rbx + 0x18]
call fcn.1400525a0
add rbx, 0x18
mov qword [rsp + 0x90], rbx
lea r13, [rbx - 0x10]
mov esi, dword [r13]
lea eax, [rsi - 1]
test eax, eax
js 0x140008697
cmp eax, esi
jg 0x140008697
cdqe
or r12, 0xffffffffffffffff
cmp word [rbx + rax*2], 0x5c
je 0x1400083f5
xor eax, eax
mov rcx, r12
lea rdi, [0x14007e0bc]
repne scasw ax, word [rdi]
not rcx
lea r14, [rcx - 1]
lea r13, [0x14007e0bc]
lea rbp, [0x14007e0bc]
sub rbp, rbx
sar rbp, 1
lea edi, [rsi + rcx - 1]
mov edx, 1
sub edx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, edx
jge 0x1400083b0
mov edx, edi
lea rcx, [rsp + 0x90]
call fcn.140003380
mov rbx, qword [rsp + 0x90]
cmp rbp, rsi
ja 0x1400083b9
lea r13, [rbx + rbp*2]
movsxd rdx, r14d
add rdx, rdx
lea rcx, [rbx + rsi*2]
mov r9, rdx
mov r8, r13
call fcn.1400525a0
test edi, edi
js 0x1400083ea
cmp edi, dword [rbx - 0xc]
jg 0x1400083ea
lea r13, [rbx - 0x10]
mov dword [r13], edi
movsxd rax, edi
mov word [rbx + rax*2], 0
jmp 0x1400083f5
mov ecx, 0x80070057
call fcn.140003280
int3
call fcn.1400280cc
mov rcx, rax
xor eax, eax
test rcx, rcx
setne al
test eax, eax
jne 0x140008414
mov ecx, 0x80004005
call fcn.140003280
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x88], rax
xor esi, esi
lea r8, [0x14007e0bc]
lea rdx, [rsp + 0x88]
lea rcx, [rsp + 0x98]
call fcn.1400090a0
nop
nop
nop
mov rax, qword [rax]
sub rbx, rax
movzx ecx, word [rax]
cmp cx, word [rax + rbx]
jne 0x14000846c
add rax, 2
test cx, cx
jne 0x140008456
xor eax, eax
jmp 0x140008471
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setne dil
mov rdx, qword [rsp + 0x98]
add rdx, 0xffffffffffffffe8
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14000849b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test dil, dil
je 0x140008649
lea eax, [rsi + 1]
test eax, eax
js 0x1400084dd
cmp eax, dword [r13]
jge 0x1400084dd
cdqe
mov rdi, qword [rsp + 0x90]
lea rcx, [rdi + rax*2]
mov dx, 0x5c
call fcn.140053e20
mov rsi, rax
test rax, rax
jne 0x1400084d5
mov esi, r12d
jmp 0x1400084e0
sub rsi, rdi
sar rsi, 1
jmp 0x1400084e0
mov esi, r12d
mov r8d, esi
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x90]
call fcn.140008f40
nop
mov rdx, qword [rax]
lea rdi, [rdx - 0x18]
mov rbx, qword [rsp + 0x88]
add rbx, 0xffffffffffffffe8
cmp rdi, rbx
je 0x1400085be
cmp dword [rbx + 0x10], 0
jl 0x1400085ac
mov rcx, qword [rdi]
cmp rcx, qword [rbx]
jne 0x1400085ac
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rdi + 0x10], 0
jl 0x140008546
cmp rax, qword [rdi]
jne 0x140008546
mov rbp, rdi
lock add dword [rdi + 0x10], 1
jmp 0x140008583
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rdi + 8]
call qword [rax]
mov rbp, rax
test rax, rax
je 0x140008643
mov eax, dword [rdi + 8]
mov dword [rbp + 8], eax
mov eax, dword [rdi + 8]
add eax, 1
movsxd rdx, eax
lea r9, [rdx + rdx]
lea r8, [rdi + 0x18]
add rdx, rdx
lea rcx, [rbp + 0x18]
call fcn.1400525a0
mov eax, r12d
lock xadd dword [rbx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14000859e
mov rcx, qword [rbx]
mov rax, qword [rcx]
mov rdx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbp + 0x18]
mov qword [rsp + 0x88], rax
jmp 0x1400085be
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x88]
call fcn.1400036f0
nop
mov rdx, qword [rsp + 0x20]
add rdx, 0xffffffffffffffe8
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400085df
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdi, qword [rsp + 0x88]
cmp dword [rdi - 0x10], 0
je 0x1400085ff
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400085ff
test al, 0x10
jne 0x14000861a
cmp dword [rdi - 0x10], 2
jne 0x14000860c
cmp word [rdi + 2], 0x3a
je 0x14000861a
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov r15d, eax
lea r8, [0x14007e0bc]
lea rdx, [rsp + 0x88]
lea rcx, [rsp + 0x98]
call fcn.1400090a0
mov rbx, qword [rsp + 0x90]
jmp 0x140008450
call fcn.140003050
nop
mov rdx, qword [rsp + 0x88]
add rdx, 0xffffffffffffffe8
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14000866e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x90]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r12d
add r12d, 0xffffffff
test r12d, r12d
jg 0x140008692
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, r15d
jmp 0x1400086a2
mov ecx, 0x80070057
call fcn.140003280
nop
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret