Function at 0x140040d80
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r12
push rbp
push r14
push r15
lea rbp, [rsp - 0x1b0]
sub rsp, 0x2b0
mov rax, qword [0x1400da0c0]
xor rax, rsp
mov qword [rbp + 0x1a0], rax
xor r12d, r12d
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x70]
call fcn.14009de30
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
mov r8d, 0x104
lea rdx, [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xorps xmm0, xmm0
movups xmmword [rsp + 0x68], xmm0
mov qword [rsp + 0x78], r12
mov qword [rbp - 0x80], r12
lea rax, [rbp - 0x70]
mov r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], r12w
jne 0x140040e04
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x68]
call fcn.1400046c0
nop
lea rdx, [rsp + 0x68]
mov r10, qword [rsp + 0x68]
mov r11, qword [rbp - 0x80]
cmp r11, 7
cmova rdx, r10
mov r9, qword [rsp + 0x78]
test r9, r9
je 0x140040e78
lea rcx, [r9 - 1]
mov rax, 0xffffffffffffffff
cmp rcx, rax
cmovb rax, rcx
lea r8, [rdx + rax*2]
cmp word [r8], 0x5c
je 0x140040e70
nop word [rax + rax]
cmp r8, rdx
je 0x140040e78
sub r8, 2
cmp word [r8], 0x5c
jne 0x140040e60
sub r8, rdx
sar r8, 1
jmp 0x140040e7f
mov r8, 0xffffffffffffffff
xorps xmm0, xmm0
movups xmmword [rsp + 0x28], xmm0
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x40], r12
cmp r9, r8
cmovb r8, r9
lea rdx, [rsp + 0x68]
cmp r11, 7
cmova rdx, r10
lea rcx, [rsp + 0x28]
call fcn.1400046c0
nop
mov rdx, qword [rbp - 0x80]
cmp rdx, 7
jbe 0x140040ef1
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140040eec
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14004123c
call fcn.140075e30
mov qword [rsp + 0x78], r12
mov r15d, 7
mov qword [rbp - 0x80], r15
mov word [rsp + 0x68], r12w
lea rbx, [rsp + 0x28]
mov r10, qword [rsp + 0x28]
mov r11, qword [rsp + 0x40]
cmp r11, r15
cmova rbx, r10
mov rsi, qword [rsp + 0x38]
cmp rsi, 5
jb 0x140040fa4
lea rdi, [rsi - 4]
lea rdi, [rbx + rdi*2]
mov r8, rbx
lea r14, str.x64_
nop dword [rax]
mov rax, rdi
sub rax, r8
sar rax, 1
mov rcx, r12
je 0x140040f6c
cmp word [r8], 0x5c
je 0x140040f69
cmp rax, 1
je 0x140040f6c
dec rax
add r8, 2
cmp word [r8], 0x5c
jne 0x140040f55
mov rcx, r8
mov r8, rcx
test rcx, rcx
je 0x140040fa4
mov edx, 5
mov rcx, r14
mov r9, r8
sub r9, r14
movzx eax, word [rcx + r9]
cmp ax, word [rcx]
jne 0x140040f9e
add rcx, 2
sub rdx, 1
jne 0x140040f82
sub r8, rbx
sar r8, 1
jmp 0x140040fab
add r8, 2
jmp 0x140040f40
mov r8, 0xffffffffffffffff
cmp r8, 0xffffffffffffffff
je 0x1400411ca
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x58], xmm1
cmp rsi, r8
cmovb r8, rsi
lea rdx, [rsp + 0x28]
cmp r11, 7
cmova rdx, r10
lea rcx, [rsp + 0x48]
call fcn.1400046c0
mov rdx, qword [rsp + 0x40]
cmp rdx, 7
jbe 0x140041026
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140041021
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140041242
call fcn.140075e30
movups xmm1, xmmword [rsp + 0x48]
movups xmmword [rsp + 0x28], xmm1
movups xmm0, xmmword [rsp + 0x58]
movups xmmword [rsp + 0x38], xmm0
movq rbx, xmm0
movabs rdx, 0x7ffffffffffffffe
mov rax, rdx
sub rax, rbx
cmp rax, 0xa
jb 0x140041248
lea r14, [rsp + 0x28]
movq rcx, xmm1
psrldq xmm0, 8
movq rax, xmm0
cmp rax, 7
cmova r14, rcx
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x58], xmm1
lea rsi, [rbx + 0xa]
lea rdi, [rsp + 0x48]
cmp rsi, 7
jbe 0x14004112a
mov r15, rsi
or r15, 7
cmp r15, rdx
jbe 0x1400410b8
mov r15, rdx
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
jmp 0x1400410e7
mov eax, 0xa
cmp r15, rax
cmovb r15, rax
lea rcx, [r15 + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x140041254
add rcx, rcx
cmp rcx, 0x1000
jb 0x140041113
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140041254
mov rcx, rax
call fcn.140075e64
test rax, rax
je 0x14004124e
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x140041125
test rcx, rcx
je 0x140041122
call fcn.140075e64
mov rdi, rax
jmp 0x140041125
mov rdi, r12
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], r15
add rbx, rbx
mov r8, rbx
mov rdx, r14
mov rcx, rdi
call fcn.14009d790
movups xmm0, xmmword [str.cover.jpg]
movups xmmword [rdi + rbx], xmm0
mov eax, dword [0x1400c6850]
mov dword [rdi + rbx + 0x10], eax
mov word [rdi + rsi*2], r12w
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 7
cmova rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
setne bl
mov rdx, qword [rsp + 0x60]
cmp rdx, 7
jbe 0x1400411be
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400411b9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14004124e
call fcn.140075e30
mov r11, qword [rsp + 0x40]
mov r10, qword [rsp + 0x28]
jmp 0x1400411cc
xor bl, bl
cmp r11, 7
jbe 0x140041203
lea rdx, [r11*2 + 2]
mov rax, r10
cmp rdx, 0x1000
jb 0x1400411fb
add rdx, 0x27
mov r10, qword [r10 - 8]
sub rax, r10
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140041236
mov rcx, r10
call fcn.140075e30
movzx eax, bl
mov rcx, qword [rbp + 0x1a0]
xor rcx, rsp
call fcn.140075e10
lea r11, [rsp + 0x2b0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call fcn.14007cf1c
int3
call fcn.14007cf1c
nop
call fcn.14007cf1c
nop
call fcn.1400016c0
int3
call fcn.14007cf1c
int3
call fcn.140001620
int3