Function at 0x140003180
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x250
mov rax, qword [0x140021010]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov r13, r8
xor r14d, r14d
mov qword [r8], r14
mov esi, 0x104
mov r9d, esi
lea rdx, [rsp + 0x30]
lea rax, [rsp + 0x30]
sub rcx, rax
nop
lea rax, [r9 + 0x7ffffefa]
test rax, rax
je 0x1400031f2
movzx eax, word [rcx + rdx]
test ax, ax
je 0x1400031f2
mov word [rdx], ax
add rdx, 2
sub r9, 1
jne 0x1400031d0
lea rax, [rdx - 2]
test r9, r9
cmovne rax, rdx
mov word [rax], r14w
mov rcx, rsi
lea rax, [rsp + 0x30]
nop dword [rax]
cmp word [rax], r14w
je 0x140003220
add rax, 2
sub rcx, 1
jne 0x140003210
mov rax, rsi
sub rax, rcx
test rcx, rcx
cmove rax, r14
mov ebp, 0x7ffffffe
je 0x140003281
mov rdx, rsi
sub rdx, rax
lea rcx, [rsp + 0x30]
lea rcx, [rcx + rax*2]
je 0x140003272
mov eax, ebp
lea r9, [0x140015d80]
sub r9, rcx
test rax, rax
je 0x140003272
movzx r8d, word [r9 + rcx]
test r8w, r8w
je 0x140003272
mov word [rcx], r8w
add rcx, 2
dec rax
sub rdx, 1
jne 0x140003251
lea rax, [rcx - 2]
test rdx, rdx
cmovne rax, rcx
mov word [rax], r14w
lea r8, [rsp + 0x30]
xor edx, edx
mov ecx, 0x1f0003
call qword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
mov rdi, rax
test rax, rax
setne r12b
test rax, rax
jne 0x1400032cb
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x140003561
mov rcx, qword [rsp + 0x278]
mov edx, 0xc9
call fcn.140002c10
mov r14d, eax
jmp 0x140003561
mov r15d, r14d
mov dword [rsp + 0x20], r14d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x1400032ed
mov edx, 0x95
jmp 0x1400033c9
test eax, eax
je 0x140003302
cmp eax, 0x102
je 0x140003302
mov edx, 0x96
jmp 0x140003526
mov dword [rsp + 0x24], r14d
mov edx, 1
mov rcx, rdi
test eax, eax
jne 0x14000335f
lea r8, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x14000332c
mov edx, 0x9e
jmp 0x1400033c9
inc dword [rsp + 0x24]
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x140003355
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12a
je 0x1400033ef
mov edx, 0xa3
jmp 0x140003526
mov dword [rsp + 0x28], r14d
lea r8, [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x14000337a
mov edx, 0xad
jmp 0x1400033c9
cmp dword [rsp + 0x28], r14d
je 0x14000338b
mov edx, 0xae
jmp 0x140003526
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x140003521
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12a
jne 0x140003521
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x1400033e1
mov edx, 0xb4
mov rcx, qword [rsp + 0x278]
call fcn.140002c10
mov ebx, eax
test eax, eax
jns 0x1400033f4
jmp 0x140003542
test eax, eax
je 0x1400033ef
mov edx, 0xb5
jmp 0x140003526
mov r15d, dword [rsp + 0x24]
mov rcx, rsi
lea rax, [rsp + 0x30]
nop dword [rax]
cmp word [rax], r14w
je 0x140003410
add rax, 2
sub rcx, 1
jne 0x140003400
mov rax, rsi
sub rax, rcx
test rcx, rcx
cmove rax, r14
je 0x140003464
sub rsi, rax
lea rdx, [rsp + 0x30]
lea rdx, [rdx + rax*2]
je 0x140003455
lea rcx, [0x140015d88]
sub rcx, rdx
test rbp, rbp
je 0x140003455
movzx eax, word [rcx + rdx]
test ax, ax
je 0x140003455
mov word [rdx], ax
add rdx, 2
dec rbp
sub rsi, 1
jne 0x140003437
lea rax, [rdx - 2]
test rsi, rsi
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
setne bpl
test rax, rax
jne 0x14000349b
mov rcx, qword [rsp + 0x278]
mov edx, 0xd5
call fcn.140002c10
mov esi, eax
jmp 0x1400034ca
lea rdx, [rsp + 0x20]
mov rcx, rbx
call fcn.140002ff0
mov esi, eax
test eax, eax
jns 0x1400034ee
mov rcx, qword [rsp + 0x278]
mov r9d, eax
lea r8, [0x140015cfc]
mov edx, 0xd7
call fcn.140002bf0
test bpl, bpl
je 0x140003564
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x278]
test eax, eax
je 0x1400035bc
jmp 0x140003564
test bpl, bpl
je 0x14000350c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x278]
test eax, eax
je 0x1400035c7
movsxd rcx, dword [rsp + 0x20]
shl rcx, 0x1f
movsxd rax, r15d
or rax, rcx
mov qword [r13], rax
jmp 0x140003561
mov edx, 0xb1
mov ebx, 0x8000ffff
mov r9d, ebx
lea r8, [0x140015cfc]
mov rcx, qword [rsp + 0x278]
call fcn.140002bf0
mov rcx, qword [rsp + 0x278]
mov r9d, ebx
lea r8, [0x140015cfc]
mov edx, 0xcf
call fcn.140002bf0
mov r14d, ebx
mov esi, r14d
test r12b, r12b
je 0x14000357e
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x278]
test eax, eax
je 0x1400035b1
mov eax, esi
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.140012940
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
mov edx, 0x924
call fcn.140002c30
nop
mov edx, 0x924
call fcn.140002c30
nop
mov edx, 0x924
call fcn.140002c30
int3