Function at 0x180137f70
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x47]
sub rsp, 0xa0
mov rax, qword [0x18018f008]
xor rax, rsp
mov qword [rbp + 0x3f], rax
mov edi, edx
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp eax, 0xffffffff
jne 0x180137330
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x180137330
mov ecx, eax
call sym.tcl86t.dll_hclWinConvertError
mov eax, 0xffffffff
jmp 0x18013762c
test edi, edi
jne 0x18013733b
xor eax, eax
jmp 0x18013762c
mov qword [rsp + 0xc8], r14
mov qword [rsp + 0xd0], r15
xor r15d, r15d
test bl, 0x10
jne 0x180137400
mov r14d, edi
and r14d, 2
je 0x180137376
test bl, 1
je 0x180137376
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_listen
jmp 0x180137617
mov ebx, edi
and ebx, 1
je 0x180137389
mov rcx, rsi
call fcn.180137650
test eax, eax
je 0x180137365
test dil, 7
je 0x180137400
test edi, 0xfffffff8
jne 0x180137400
mov eax, edi
mov qword [rsp + 0x30], r15
and eax, 0xfffffffc
mov dword [rsp + 0x28], 0x20000000
shl eax, 0x1d
mov ecx, eax
mov dword [rsp + 0x20], 3
bts ecx, 0x1e
test r14d, r14d
cmove ecx, eax
mov edx, ecx
bts edx, 0x1d
test ebx, ebx
cmove edx, ecx
xor r9d, r9d
mov rcx, rsi
lea r8d, [r9 + 7]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x1801373f1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x18013761c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x180137365
xor r9d, r9d
mov qword [rbp - 1], r15
lea rax, [rbp - 0x19]
mov dword [rbp + 0xb], r15d
xor r8d, r8d
mov word [rbp + 0xf], 0x1600
mov rcx, rsi
mov qword [rbp - 0x11], r15
lea edx, [r9 + 0x17]
mov dword [rbp - 9], r15d
mov dword [rbp - 0x15], r15d
mov dword [rbp - 5], shutdown
mov dword [rbp - 0x19], r15d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x180137458
mov ecx, eax
call sym.tcl86t.dll_hclWinConvertError
jmp 0x180137617
mov ebx, dword [rbp - 0x19]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x1801375e2
mov r9d, dword [rbp - 0x19]
lea rax, [rbp - 0x19]
mov r8, rbx
mov qword [rsp + 0x20], rax
mov edx, reloc.WS2_32.dll_socket
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
test eax, eax
je 0x1801375e2
lea r8, [rbp + 7]
mov rcx, rbx
lea rdx, [rbp - 1]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorOwner]
test eax, eax
je 0x1801375ca
mov rcx, qword [rbp - 1]
call qword [sym.imp.ADVAPI32.dll_GetSidIdentifierAuthority]
mov ecx, dword [rax]
cmp ecx, dword [rbp + 0xb]
jne 0x1801374d9
movzx eax, word [rax + 4]
cmp ax, word [rbp + 0xf]
je 0x1801375ca
mov ecx, 2
call qword [sym.imp.ADVAPI32.dll_ImpersonateSelf]
test eax, eax
je 0x1801375e2
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
xor r8d, r8d
lea r9, [rbp - 0x11]
mov rcx, rax
lea edx, [r8 + 0xa]
call qword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
je 0x1801375e2
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov eax, edi
mov dword [rbp + 0x17], 0x120089
and al, 4
mov dword [rbp + 0x1b], 0x120116
neg al
mov dword [rbp + 0x1f], 0x1200a0
mov eax, edi
mov dword [rbp + 0x23], 0x1f01ff
sbb ecx, ecx
lea r9, [rbp + 0x17]
and ecx, 0x120089
mov edx, ecx
or edx, 0x120116
and al, 2
lea rax, [rbp - 0x15]
cmove edx, ecx
mov qword [rsp + 0x38], rax
mov r8d, edx
lea rax, [rbp - 9]
mov qword [rsp + 0x30], rax
or r8d, 0x1200a0
lea rax, [rbp - 5]
and dil, 1
mov qword [rsp + 0x28], rax
mov rcx, rbx
cmove r8d, edx
lea rax, [rbp + 0x27]
mov rdx, qword [rbp - 0x11]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_AccessCheck]
test eax, eax
je 0x1801375e2
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rbp - 0x15], r15d
jne 0x1801375de
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_listen
jmp 0x180137617
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
jmp 0x18013761c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call sym.tcl86t.dll_hclWinConvertError
test rbx, rbx
je 0x180137608
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rbp - 0x11]
test rcx, rcx
je 0x180137617
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xffffffff
mov r14, qword [rsp + 0xc8]
mov r15, qword [rsp + 0xd0]
mov rcx, qword [rbp + 0x3f]
xor rcx, rsp
call fcn.180146240
mov rbx, qword [rsp + 0xd8]
add rsp, 0xa0
pop rdi
pop rsi
pop rbp
ret
push rbx
sub rsp, 0x20
mov ebx, edx
lea rdx, str.native
call sym.tcl86t.dll_hcl_FSGetInternalRep
mov edx, ebx
mov rcx, rax
add rsp, 0x20
pop rbx
jmp 0x1801372e0