Function at 0x140024120
Capabilities:
Check if file exists

Disassembly:
mov r11, rsp
push rbp
push rdi
sub rsp, 0x268
mov rax, qword [0x1400c9158]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov qword [r11 - 0x18], r12
mov r12, r9
mov qword [r11 - 0x20], r14
mov qword [r11 - 0x28], r15
mov r15, r8
test r9, r9
jne 0x1400405a8
xor ebp, ebp
mov r14d, 0x104
mov qword [r8], rbp
mov edx, r14d
mov r8, rcx
lea rcx, [rsp + 0x30]
call fcn.1400258bc
mov ecx, r14d
mov qword [rsp + 0x280], rbx
lea rax, [rsp + 0x30]
cmp word [rax], bp
je 0x140024198
add rax, 2
sub rcx, 1
jne 0x140024184
jmp 0x1400405ba
test rcx, rcx
je 0x1400405ba
mov rax, r14
mov ebx, 0x7ffffffe
sub rax, rcx
lea rax, [rsp + rax*2 + 0x30]
test rcx, rcx
je 0x1400405b1
lea r9, [0x140095d00]
mov r8d, ebx
sub r9, rax
test r8, r8
je 0x1400241eb
movzx edx, word [r9 + rax]
test dx, dx
je 0x1400241eb
mov word [rax], dx
dec r8
add rax, 2
sub rcx, 1
jne 0x1400241c7
jmp 0x1400405b1
test rcx, rcx
je 0x1400405b1
mov word [rax], bp
lea r8, [rsp + 0x30]
mov qword [rsp + 0x288], rsi
xor edx, edx
mov ecx, 0x1f0003
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_OpenSemaphoreW]
mov rdi, rax
test rax, rax
je 0x1400405c4
lea rdx, [rsp + 0x24]
mov dword [rsp + 0x24], ebp
mov rcx, rax
mov dword [rsp + 0x20], ebp
call fcn.140024360
mov esi, eax
test eax, eax
js 0x1400405f3
mov rcx, r14
lea rax, [rsp + 0x30]
cmp word [rax], bp
je 0x140024255
add rax, 2
sub rcx, 1
jne 0x140024244
jmp 0x1400242b0
test rcx, rcx
je 0x1400242b0
sub r14, rcx
lea rax, [rsp + 0x30]
lea rax, [rax + r14*2]
test rcx, rcx
je 0x140040616
lea r8, [0x140095cf8]
sub r8, rax
nop dword [rax]
test rbx, rbx
je 0x1400242a4
movzx edx, word [r8 + rax]
test dx, dx
je 0x1400242a4
mov word [rax], dx
dec rbx
add rax, 2
sub rcx, 1
jne 0x140024280
jmp 0x140040616
test rcx, rcx
je 0x140040616
mov word [rax], bp
lea r8, [rsp + 0x30]
xor edx, edx
mov ecx, 0x1f0003
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_OpenSemaphoreW]
mov rbx, rax
test rax, rax
je 0x14004061f
lea rdx, [rsp + 0x20]
mov rcx, rax
call fcn.140024360
mov esi, eax
test eax, eax
js 0x14004063c
mov rcx, rbx
call fcn.140028908
movsxd rcx, dword [rsp + 0x20]
movsxd rax, dword [rsp + 0x24]
shl rcx, 0x1f
test r12, r12
jne 0x140024357
or rax, rcx
mov qword [r15], rax
mov r15, qword [rsp + 0x250]
mov r14, qword [rsp + 0x258]
mov r12, qword [rsp + 0x260]
mov rsi, qword [rsp + 0x288]
mov rbx, qword [rsp + 0x280]
test rdi, rdi
je 0x14002433b
mov rcx, rdi
call fcn.140028908
mov eax, ebp
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.14002dd40
add rsp, 0x268
pop rdi
pop rbp
ret
mov byte [r12], 1
jmp 0x140024300
mov byte [r9], 0
jmp 0x140024159
sub rax, 2
jmp 0x1400241f4
mov ebx, 0x7ffffffe
jmp 0x1400241f7
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 2
je 0x140024306
mov rcx, qword [rsp + 0x278]
lea r8, [0x140097940]
mov edx, 0xc8
call fcn.140048770
mov ebp, eax
jmp 0x140024306
mov rcx, qword [rsp + 0x278]
lea r8, [0x140097940]
mov r9d, esi
mov edx, 0xce
call fcn.1400025a0
mov ebp, esi
jmp 0x140024306
sub rax, 2
jmp 0x1400242ad
mov rcx, qword [rsp + 0x278]
lea r8, [0x140097940]
mov edx, 0xd4
call fcn.140048770
mov esi, eax
jmp 0x140040660
mov rcx, qword [rsp + 0x278]
lea r8, [0x140097940]
mov r9d, eax
mov edx, 0xd6
call fcn.1400025a0
mov rcx, rbx
call fcn.140028908
mov ebp, esi
jmp 0x140024306