Function at 0x180005c00
Capabilities:
Check if file exists
Create directory

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x70], rbx
mov rbx, rcx
call fcn.1800029b0
mov rcx, rax
test rax, rax
je 0x180005ebc
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x78], rax
mov r15, 0xffffffffffffffff
xor r13d, r13d
test rbx, rbx
je 0x180005c7c
cmp rbx, 0x10000
jae 0x180005c68
movzx edx, bx
lea rcx, [rsp + 0x78]
call fcn.180003790
jmp 0x180005c90
mov rax, r15
nop dword [rax + rax]
inc rax
cmp word [rbx + rax*2], r13w
jne 0x180005c70
jmp 0x180005c7f
mov eax, r13d
mov r8d, eax
mov rdx, rbx
lea rcx, [rsp + 0x78]
call fcn.180004be0
nop
mov rdi, qword [rsp + 0x78]
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x180005e83
mov ebp, r13d
lea r12, [rdi - 0x10]
nop dword [rax]
test ebp, ebp
js 0x180005e83
cmp ebp, dword [r12]
jge 0x180005e83
mov edx, 0x5c
movsxd rax, ebp
lea rcx, [rdi + rax*2]
call fcn.180009f30
mov rbp, rax
test rax, rax
je 0x180005e83
sub rbp, rdi
sar rbp, 1
cmp ebp, 0xffffffff
je 0x180005e83
call fcn.1800029b0
mov rcx, rax
test rax, rax
je 0x180005eb1
mov rax, qword [rax]
call qword [rax + 0x18]
lea rsi, [rax + 0x18]
mov qword [rsp + 0x80], rsi
add ebp, 1
mov r14d, r13d
cmovns r14d, ebp
cmp r14d, dword [r12]
jl 0x180005d3b
lea rcx, [rdi - 0x18]
call fcn.180001660
lea rbx, [rax + 0x18]
mov qword [rsp + 0x88], rbx
jmp 0x180005dbb
mov rcx, qword [rdi - 0x18]
test rcx, rcx
je 0x180005d4f
mov rax, qword [rcx]
call qword [rax + 0x20]
test rax, rax
jne 0x180005d66
call fcn.1800029b0
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x20]
test rax, rax
je 0x180005ed8
mov r9, qword [rax]
mov r8d, 2
mov edx, r14d
mov rcx, rax
call qword [r9]
test rax, rax
je 0x180005ed2
lea rbx, [rax + 0x18]
mov qword [rsp + 0x88], rbx
test r14d, r14d
js 0x180005ec7
cmp r14d, dword [rbx - 0xc]
jg 0x180005ec7
mov dword [rbx - 0x10], r14d
movsxd rdx, r14d
mov word [rbx + rdx*2], r13w
mov r9d, r14d
mov r8, rdi
mov rcx, rbx
call fcn.180005b70
nop
lea rdi, [rbx - 0x18]
add rsi, 0xffffffffffffffe8
cmp rdi, rsi
je 0x180005e1e
cmp dword [rsi + 0x10], 0
jl 0x180005e09
mov rax, qword [rsi]
cmp qword [rdi], rax
jne 0x180005e09
mov rcx, rdi
call fcn.180001660
mov rbx, rax
mov ecx, r15d
lock xadd dword [rsi + 0x10], ecx
sub ecx, 1
jg 0x180005dfb
mov rcx, qword [rsi]
mov r8, qword [rcx]
mov rdx, rsi
call qword [r8 + 8]
lea rax, [rbx + 0x18]
mov qword [rsp + 0x80], rax
jmp 0x180005e1e
mov r8d, dword [rbx - 0x10]
mov rdx, rbx
lea rcx, [rsp + 0x80]
call fcn.180004be0
nop
mov eax, r15d
lock xadd dword [rdi + 0x10], eax
sub eax, 1
jg 0x180005e37
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + 8]
mov rbx, qword [rsp + 0x80]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x180005e55
mov rcx, rbx
call fcn.18000d9d4
nop
lea rdx, [rbx - 0x18]
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jle 0x180005e70
mov rdi, qword [rsp + 0x78]
jmp 0x180005cb0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdi, qword [rsp + 0x78]
jmp 0x180005cb0
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], r15d
sub r15d, 1
jg 0x180005e9c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rbx, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80004005
call fcn.180001600
nop
mov ecx, 0x80004005
call fcn.180001600
nop
mov ecx, 0x80070057
call fcn.180001600
int3
call fcn.180004d00
int3
mov ecx, 0x80004005
call fcn.180001600
int3