Function at 0x140046780
Capabilities:
Check if file exists

Disassembly:
push rbp
push rsi
push rdi
push r12
push r14
sub rsp, 0x250
mov rax, qword [0x140111200]
xor rax, rsp
mov qword [rsp + 0x240], rax
xor r14d, r14d
lea rax, [rsp + 0x30]
mov esi, 0x104
mov qword [r8], r14
mov r9d, esi
lea rdx, [rsp + 0x30]
sub rcx, rax
mov r12, r8
nop
lea rax, [r9 + 0x7ffffefa]
test rax, rax
je 0x1400467e2
movzx eax, word [rcx + rdx]
test ax, ax
je 0x1400467e2
mov word [rdx], ax
add rdx, 2
sub r9, 1
jne 0x1400467c0
test r9, r9
lea rax, [rdx - 2]
mov rcx, rsi
cmovne rax, rdx
mov word [rax], r14w
lea rax, [rsp + 0x30]
nop dword [rax]
cmp word [rax], r14w
je 0x140046810
add rax, 2
sub rcx, 1
jne 0x140046800
mov rax, rsi
mov ebp, 0x7ffffffe
sub rax, rcx
test rcx, rcx
cmove rax, r14
je 0x140046871
mov rdx, rsi
lea rcx, [rsp + 0x30]
lea rcx, [rcx + rax*2]
sub rdx, rax
je 0x140046862
lea r9, [0x1400eddd8]
mov eax, ebp
sub r9, rcx
test rax, rax
je 0x140046862
movzx r8d, word [rcx + r9]
test r8w, r8w
je 0x140046862
mov word [rcx], r8w
dec rax
add rcx, 2
sub rdx, 1
jne 0x140046841
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r14w
mov qword [rsp + 0x280], rbx
lea r8, [rsp + 0x30]
xor edx, edx
mov qword [rsp + 0x288], r15
mov ecx, 0x1f0003
call qword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
mov rdi, rax
test rax, rax
jne 0x1400468c4
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x140046b2c
mov rcx, qword [rsp + 0x278]
mov edx, reloc.OLEAUT32.dll_CreateErrorInfo
call fcn.1400462b0
mov r14d, eax
jmp 0x140046b2c
xor edx, edx
mov dword [rsp + 0x24], r14d
mov rcx, rdi
mov r15d, r14d
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x1400468e6
mov edx, 0x95
jmp 0x1400469c2
test eax, eax
je 0x1400468fb
cmp eax, 0x102
je 0x1400468fb
mov edx, 0x96
jmp 0x140046afc
mov dword [rsp + 0x20], r14d
mov edx, 1
mov rcx, rdi
test eax, eax
jne 0x140046958
lea r8, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x140046925
mov edx, 0x9e
jmp 0x1400469c2
inc dword [rsp + 0x20]
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 + 1]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x14004694e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12a
je 0x1400469e8
mov edx, 0xa3
jmp 0x140046afc
lea r8, [rsp + 0x28]
mov dword [rsp + 0x28], r14d
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x140046973
mov edx, 0xad
jmp 0x1400469c2
cmp dword [rsp + 0x28], r14d
je 0x140046984
mov edx, 0xae
jmp 0x140046afc
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 + 1]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x140046af7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12a
jne 0x140046af7
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x1400469da
mov edx, 0xb4
mov rcx, qword [rsp + 0x278]
call fcn.1400462b0
mov ebx, eax
test eax, eax
jns 0x1400469ed
jmp 0x140046b11
test eax, eax
je 0x1400469e8
mov edx, 0xb5
jmp 0x140046afc
mov r15d, dword [rsp + 0x20]
mov rcx, rsi
lea rax, [rsp + 0x30]
cmp word [rax], r14w
je 0x140046a05
add rax, 2
sub rcx, 1
jne 0x1400469f5
mov rax, rsi
sub rax, rcx
test rcx, rcx
cmove rax, r14
je 0x140046a5d
lea rdx, [rsp + 0x30]
lea rdx, [rdx + rax*2]
sub rsi, rax
je 0x140046a4e
lea rcx, [0x1400eddd4]
sub rcx, rdx
nop dword [rax]
test rbp, rbp
je 0x140046a4e
movzx eax, word [rcx + rdx]
test ax, ax
je 0x140046a4e
mov word [rdx], ax
dec rbp
add rdx, 2
sub rsi, 1
jne 0x140046a30
test rsi, rsi
lea rax, [rdx - 2]
cmovne rax, rdx
mov word [rax], r14w
lea r8, [rsp + 0x30]
xor edx, edx
mov ecx, 0x1f0003
call qword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
mov rbx, rax
test rax, rax
jne 0x140046a90
mov rcx, qword [rsp + 0x278]
mov edx, 0xd5
call fcn.1400462b0
mov esi, eax
jmp 0x140046b34
lea rdx, [rsp + 0x24]
mov rcx, rbx
call fcn.1400465f0
mov esi, eax
lfence
test eax, eax
jns 0x140046ace
mov rcx, qword [rsp + 0x278]
mov r9d, eax
mov edx, 0xd7
call fcn.140046290
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x140046b85
jmp 0x140046b34
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x140046b98
movsxd rcx, dword [rsp + 0x24]
mov esi, r14d
shl rcx, 0x1f
movsxd rax, r15d
or rcx, rax
mov qword [r12], rcx
jmp 0x140046b34
mov edx, 0xb1
mov rcx, qword [rsp + 0x278]
mov ebx, 0x8000ffff
mov r9d, ebx
call fcn.140046290
lfence
mov rcx, qword [rsp + 0x278]
mov r9d, ebx
mov edx, 0xcf
call fcn.140046290
mov r14d, ebx
mov esi, r14d
test rdi, rdi
je 0x140046b41
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x140046b72
mov r15, qword [rsp + 0x288]
mov eax, esi
mov rbx, qword [rsp + 0x280]
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.14009ea10
add rsp, 0x250
pop r14
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rcx, qword [rsp + 0x278]
mov edx, 0x93e
call fcn.1400462d0
int3
mov rcx, qword [rsp + 0x278]
mov edx, 0x93e
call fcn.1400462d0
int3
mov rcx, qword [rsp + 0x278]
mov edx, 0x93e
call fcn.1400462d0
int3