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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x80
mov rax, qword [0x1400cd070]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov rsi, rcx
mov qword [rsp + 0x40], rcx
mov rdx, qword [rcx]
movsxd rcx, dword [rdx - 0x10]
cmp ecx, 2
jge 0x140005166
add rdx, 0xffffffffffffffe8
mov edi, 0xffffffff
jmp 0x140005445
lea r8d, [rcx - 1]
cmp r8d, ecx
jg 0x14000546a
mov edi, 0xffffffff
cmp byte [rcx + rdx - 1], 0x5c
jne 0x1400051bd
lea rdx, [rsp + 0x30]
mov rcx, rsi
call fcn.140007f10
nop
mov rdx, rax
mov rcx, rsi
call fcn.140008010
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400051b7
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rdx, qword [rsi]
mov ecx, dword [rdx - 0x10]
add rdx, 0xffffffffffffffe8
test ecx, ecx
jg 0x1400051ca
jmp 0x140005445
cmp ecx, 3
mov rcx, rdx
jg 0x140005234
call fcn.140008330
lea rbx, [rax + 0x18]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1400051f4
test al, 0x10
je 0x1400051f4
mov ebp, 1
jmp 0x1400051f6
xor ebp, ebp
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140005210
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [rsi]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], edi
test ebp, ebp
je 0x14000544a
sub edi, 1
jg 0x14000528e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
jmp 0x14000528e
call fcn.140008330
lea r14, [rax + 0x18]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ebp, ebp
cmp eax, 0xffffffff
je 0x140005254
test al, 0x10
lea ebx, [rbp + 1]
jne 0x140005256
mov ebx, ebp
lea rdx, [r14 - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14000526f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
test ebx, ebx
je 0x1400052b8
mov rdx, qword [rsi]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x14000528e
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.WS2_32.dll_htonl + 8]
mov eax, 1
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140072f40
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
call fcn.1400019f0
nop
mov rcx, rax
test rax, rax
je 0x14000545f
mov rax, qword [rax]
call qword [rax + Ordinal_26]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x70], rbx
mov edx, 0x5c
mov rcx, qword [rsi]
call qword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsrchr]
test rax, rax
jne 0x1400052f0
mov eax, edi
jmp 0x1400052f2
sub eax, dword [rsi]
mov r8d, eax
lea rdx, [rsp + 0x38]
mov rcx, rsi
call fcn.140007f10
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rbx, 0xffffffffffffffe8
cmp rcx, rbx
je 0x14000535c
cmp dword [rbx + 0x10], 0
jl 0x14000534d
mov rax, qword [rbx]
cmp qword [rcx], rax
jne 0x14000534d
call fcn.140008330
mov r14, rax
mov ecx, edi
lock xadd dword [rbx + 0x10], ecx
sub ecx, 1
jg 0x140005342
mov rcx, qword [rbx]
mov r8, qword [rcx]
mov rdx, rbx
call qword [rreloc.WS2_32.dll_htonl + 8]
lea rax, [r14 + 0x18]
mov qword [rsp + 0x70], rax
jmp 0x14000535c
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x70]
call fcn.140002a80
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14000537a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rax, qword [rsp + 0x70]
cmp dword [rax - 0x10], 0
jg 0x1400053a1
lea rdx, [rax - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14000543e
mov rcx, qword [rdx]
jmp 0x140005437
lea rbx, [rax - 0x18]
mov rcx, rbx
call fcn.140008330
add rax, 0x18
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x20]
call fcn.140005120
test eax, eax
je 0x140005425
mov dword [rsp + 0x58], Ordinal_27
mov qword [rsp + 0x60], rbp
mov dword [rsp + 0x68], ebp
lea rdx, [rsp + 0x58]
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp eax, 1
sete bpl
mov eax, edi
lock xadd dword [rbx + 0x10], eax
sub eax, 1
jg 0x140005403
mov rcx, qword [rbx]
mov rax, qword [rcx]
mov rdx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [rsi]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x14000541e
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.WS2_32.dll_htonl + 8]
mov eax, ebp
jmp 0x140005293
mov eax, edi
lock xadd dword [rbx + 0x10], eax
sub eax, 1
jg 0x14000543e
mov rcx, qword [rbx]
mov rdx, rbx
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [rsi]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x140005458
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor eax, eax
jmp 0x140005293
mov ecx, 0x80004005
call fcn.140001850
int3
mov ecx, 0x80070057
call fcn.140001850
int3