Function at 0x180133de0
Capabilities:
Check if file exists
Create directory
Delete file
Get common file path
Move file

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rax, rdx
mov rdi, rcx
mov rcx, rax
lea rdx, str.native
call sym.tcl86t.dll_hcl_FSGetInternalRep
lea rdx, str.native
mov rcx, rdi
mov rbx, rax
call sym.tcl86t.dll_hcl_FSGetInternalRep
mov rdx, rbx
mov rcx, rax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp 0x180133e30
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x770
mov rax, qword [0x18018f008]
xor rax, rsp
mov qword [rsp + 0x760], rax
mov rdi, rdx
mov rsi, rcx
mov qword [rsp + 0x20], rcx
mov qword [rsp + 0x30], rdx
mov rbx, 0xffffffffffffffff
mov dword [rsp + 0x28], ebx
test rcx, rcx
je 0x1801343ca
cmp word [rcx], 0
je 0x1801343ca
test rdx, rdx
je 0x1801343ca
cmp word [rdx], 0
je 0x1801343ca
call qword [sym.imp.KERNEL32.dll_MoveFileW]
mov ecx, ebx
xor r14d, r14d
test eax, eax
cmovne ecx, r14d
mov dword [rsp + 0x28], ecx
jmp 0x180133ec6
cmp ecx, 0xffffffff
je 0x180133ed2
mov eax, ecx
jmp 0x1801343db
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call sym.tcl86t.dll_hclWinConvertError
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov r12d, eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov r15d, eax
cmp r12d, 0xffffffff
jne 0x180133f29
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp eax, 0x104
jb 0x180133f26
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x26
jmp 0x1801343d6
mov r12d, r14d
cmp r15d, 0xffffffff
jne 0x180133f4a
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp eax, 0x104
jae 0x180133f15
mov r15d, r14d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], 9
jne 0x180133f66
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_listen
jmp 0x1801343d6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], 0xd
je 0x180134112
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], 0x11
jne 0x1801343d6
test r12b, 0x10
je 0x180134002
test r15b, 0x10
je 0x180133ff1
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.180134c10
test eax, eax
jne 0x1801343d6
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x1801340d5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call sym.tcl86t.dll_hclWinConvertError
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edx, r15d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], 0xd
je 0x180134112
jmp 0x1801343d6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], shutdown
jmp 0x1801343d6
test r15b, 0x10
je 0x180134019
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_setsockopt
jmp 0x1801343d6
lea r9, [rsp + 0x20]
lea r8, [rsp + 0x130]
mov edx, 0x104
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x1801343d6
cmp eax, 0x104
jg 0x1801343d6
mov rax, qword [rsp + 0x20]
test rax, rax
je 0x1801343d6
mov word [rax], r14w
lea r9, [rsp + 0x130]
xor r8d, r8d
lea rdx, str.tclr
lea rcx, [rsp + 0x130]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x1801343d6
lea rcx, [rsp + 0x130]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rdx, [rsp + 0x130]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x1801340f6
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x1801340dc
mov edx, 0x80
lea rcx, [rsp + 0x130]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rcx, [rsp + 0x130]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
jmp 0x1801343db
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rdx, rdi
lea rcx, [rsp + 0x130]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call sym.tcl86t.dll_hclWinConvertError
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], 0xd
jne 0x1801343d6
test r12b, 0x10
je 0x1801343d6
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x340]
mov edx, 0x104
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x1801343d6
cmp eax, 0x104
jg 0x1801343d6
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x550]
mov edx, 0x104
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x1801343d6
cmp eax, 0x104
jg 0x1801343d6
lea rcx, [rsp + 0x340]
call qword [sym.imp.USER32.dll_CharLowerW]
lea rcx, [rsp + 0x550]
call qword [sym.imp.USER32.dll_CharLowerW]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x58], r14d
mov dword [rsp + 0x5c], 0xc8
mov byte [rsp + 0x60], 0
lea rcx, [rsp + 0x340]
mov rax, rbx
nop dword [rax + rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x1801341c0
lea r8, [rsp + 0x50]
mov edx, eax
lea rcx, [rsp + 0x340]
call sym.tcl86t.dll_hcl_UniCharToUtfDString
mov rdi, rax
lea rax, [rsp + 0x140]
mov qword [rsp + 0x130], rax
mov dword [rsp + 0x138], r14d
mov dword [rsp + 0x13c], 0xc8
mov byte [rsp + 0x140], 0
lea rax, [rsp + 0x550]
inc rbx
cmp word [rax + rbx*2], 0
jne 0x180134214
lea r8, [rsp + 0x130]
mov edx, ebx
lea rcx, [rsp + 0x550]
call sym.tcl86t.dll_hcl_UniCharToUtfDString
mov rbx, rax
movsxd r8, dword [rsp + 0x58]
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x1801342c3
movsxd rcx, dword [rsp + 0x58]
movzx edx, byte [rcx + rbx]
cmp dl, 0x5c
je 0x180134264
cmp dl, 0x2f
je 0x180134264
test dl, dl
jne 0x1801342c3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_shutdown
lea rax, [rsp + 0x60]
mov rcx, qword [rsp + 0x50]
cmp rcx, rax
je 0x180134284
call sym.tcl86t.dll_hclpFree
lea rax, [rsp + 0x60]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x58], r14d
mov dword [rsp + 0x5c], 0xc8
mov byte [rsp + 0x60], 0
lea rax, [rsp + 0x140]
mov rcx, qword [rsp + 0x130]
cmp rcx, rax
je 0x1801343d6
call sym.tcl86t.dll_hclpFree
jmp 0x1801343d6
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x38]
mov rcx, rdi
call sym.tcl86t.dll_hcl_SplitPath
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x3c]
mov rcx, rbx
call sym.tcl86t.dll_hcl_SplitPath
lea rax, [rsp + 0x60]
mov rcx, qword [rsp + 0x50]
cmp rcx, rax
je 0x1801342fb
call sym.tcl86t.dll_hclpFree
lea rax, [rsp + 0x60]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x58], r14d
mov dword [rsp + 0x5c], 0xc8
mov byte [rsp + 0x60], 0
lea rax, [rsp + 0x140]
mov rcx, qword [rsp + 0x130]
cmp rcx, rax
je 0x180134331
call sym.tcl86t.dll_hclpFree
lea rax, [rsp + 0x140]
mov qword [rsp + 0x130], rax
mov dword [rsp + 0x138], r14d
mov dword [rsp + 0x13c], 0xc8
mov byte [rsp + 0x140], 0
mov eax, dword [rsp + 0x38]
cmp eax, 1
jne 0x180134373
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x1801343b4
test eax, eax
jle 0x1801343b4
cmp dword [rsp + 0x3c], 0
jle 0x1801343b4
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
mov rax, qword [rsp + 0x20]
mov r8, qword [rax]
sub r8, rcx
movzx edx, byte [rcx]
movzx eax, byte [rcx + r8]
sub edx, eax
jne 0x1801343a4
inc rcx
test eax, eax
jne 0x180134391
test edx, edx
je 0x1801343b4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_select
mov rcx, qword [rsp + 0x30]
call sym.tcl86t.dll_hclpFree
mov rcx, qword [rsp + 0x20]
call sym.tcl86t.dll_hclpFree
jmp 0x1801343d6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 2
mov eax, 1
mov rcx, qword [rsp + 0x760]
xor rcx, rsp
call fcn.180146240
mov rbx, qword [rsp + 0x7b0]
add rsp, 0x770
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret