Function at 0x1400545e0
Capabilities:
Check if file exists

Disassembly:
push rbp
push rsi
push rdi
push r12
push r14
sub rsp, 0x250
mov rax, qword [0x1401740a0]
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 0x140054642
movzx eax, word [rcx + rdx]
test ax, ax
je 0x140054642
mov word [rdx], ax
add rdx, 2
sub r9, 1
jne 0x140054620
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 0x140054670
add rax, 2
sub rcx, 1
jne 0x140054660
mov rax, rsi
mov ebp, 0x7ffffffe
sub rax, rcx
test rcx, rcx
cmove rax, r14
je 0x1400546d1
mov rdx, rsi
lea rcx, [rsp + 0x30]
lea rcx, [rcx + rax*2]
sub rdx, rax
je 0x1400546c2
lea r9, [0x140148f38]
mov eax, ebp
sub r9, rcx
test rax, rax
je 0x1400546c2
movzx r8d, word [r9 + rcx]
test r8w, r8w
je 0x1400546c2
mov word [rcx], r8w
dec rax
add rcx, 2
sub rdx, 1
jne 0x1400546a1
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 0x140054724
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x140054986
mov rcx, qword [rsp + 0x278]
mov edx, 0xc9
call fcn.140054120
mov r14d, eax
jmp 0x140054986
xor edx, edx
mov dword [rsp + 0x28], r14d
mov rcx, rdi
mov r15d, r14d
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x140054746
mov edx, 0x95
jmp 0x140054822
test eax, eax
je 0x14005475b
cmp eax, 0x102
je 0x14005475b
mov edx, 0x96
jmp 0x140054959
mov dword [rsp + 0x20], r14d
mov edx, 1
mov rcx, rdi
test eax, eax
jne 0x1400547b8
lea r8, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x140054785
mov edx, 0x9e
jmp 0x140054822
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 0x1400547ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12a
je 0x140054848
mov edx, 0xa3
jmp 0x140054959
lea r8, [rsp + 0x24]
mov dword [rsp + 0x24], r14d
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x1400547d3
mov edx, 0xad
jmp 0x140054822
cmp dword [rsp + 0x24], r14d
je 0x1400547e4
mov edx, 0xae
jmp 0x140054959
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 + 1]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x140054954
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12a
jne 0x140054954
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x14005483a
mov edx, 0xb4
mov rcx, qword [rsp + 0x278]
call fcn.140054120
mov ebx, eax
test eax, eax
jns 0x14005484d
jmp 0x14005496e
test eax, eax
je 0x140054848
mov edx, 0xb5
jmp 0x140054959
mov r15d, dword [rsp + 0x20]
mov rcx, rsi
lea rax, [rsp + 0x30]
cmp word [rax], r14w
je 0x140054865
add rax, 2
sub rcx, 1
jne 0x140054855
mov rax, rsi
sub rax, rcx
test rcx, rcx
cmove rax, r14
je 0x1400548bd
lea rdx, [rsp + 0x30]
lea rdx, [rdx + rax*2]
sub rsi, rax
je 0x1400548ae
lea rcx, [0x140148f40]
sub rcx, rdx
nop dword [rax]
test rbp, rbp
je 0x1400548ae
movzx eax, word [rcx + rdx]
test ax, ax
je 0x1400548ae
mov word [rdx], ax
dec rbp
add rdx, 2
sub rsi, 1
jne 0x140054890
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 0x1400548f0
mov rcx, qword [rsp + 0x278]
mov edx, 0xd5
call fcn.140054120
mov esi, eax
jmp 0x14005498e
lea rdx, [rsp + 0x28]
mov rcx, rbx
call fcn.140054450
mov esi, eax
test eax, eax
jns 0x14005492b
mov rcx, qword [rsp + 0x278]
mov r9d, eax
mov edx, 0xd7
call fcn.140054100
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1400549df
jmp 0x14005498e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1400549f2
movsxd rcx, dword [rsp + 0x28]
mov esi, r14d
shl rcx, 0x1f
movsxd rax, r15d
or rcx, rax
mov qword [r12], rcx
jmp 0x14005498e
mov edx, 0xb1
mov rcx, qword [rsp + 0x278]
mov ebx, 0x8000ffff
mov r9d, ebx
call fcn.140054100
mov rcx, qword [rsp + 0x278]
mov r9d, ebx
mov edx, 0xcf
call fcn.140054100
mov r14d, ebx
mov esi, r14d
test rdi, rdi
je 0x14005499b
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1400549cc
mov r15, qword [rsp + 0x288]
mov eax, esi
mov rbx, qword [rsp + 0x280]
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.1400f5be0
add rsp, 0x250
pop r14
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rcx, qword [rsp + 0x278]
mov edx, 0x93e
call fcn.140054140
int3
mov rcx, qword [rsp + 0x278]
mov edx, 0x93e
call fcn.140054140
int3
mov rcx, qword [rsp + 0x278]
mov edx, 0x93e
call fcn.140054140
int3