Function at 0x180053d00
Capabilities:
Check if file exists
Get file size

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x410]
sub rsp, 0x510
mov qword [rbp - 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x568], rbx
mov rax, qword [0x1800eb008]
xor rax, rsp
mov qword [rbp + 0x400], rax
mov r12, r8
mov rdi, rdx
mov r13, rcx
test rdx, rdx
je 0x18005417d
cmp word [rdx], 0
je 0x18005417d
mov edx, 0xc0000000
mov r14d, 0x80000000
cmp dword [rcx + 0x24], 0
cmovne edx, r14d
xor r15d, r15d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x20000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea r8d, [r15 + 1]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rsp + 0x70], rax
cmp rax, 0xffffffffffffffff
jne 0x180053e1d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
cmp eax, 0x21
ja 0x180053dbe
movabs rdx, 0x300080020
bt rdx, rcx
jb 0x180053ddc
cmp ecx, 0xa7
je 0x180053ddc
test ecx, ecx
jle 0x18005415b
movzx ecx, cx
or ecx, 0x80070000
jmp 0x18005415b
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea r8d, [r9 + 1]
mov edx, r14d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rsp + 0x70], rax
cmp rax, 0xffffffffffffffff
je 0x180054154
mov dword [r13 + 0x24], 1
jmp 0x180053e4a
cmp dword [r13 + 0x24], 0
jne 0x180053e4a
cmp word [rdi], 0
jne 0x180053e2f
mov r8, r15
jmp 0x180053e3e
or r8, 0xffffffffffffffff
inc r8
cmp word [rdi + r8*2], 0
jne 0x180053e33
lea rcx, [r13 + 0x70]
mov rdx, rdi
call fcn.180004430
xor edx, edx
lea r8d, [rdx + 0x5c]
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_StrRChrW]
mov rsi, rax
test rax, rax
jne 0x180053e6b
mov ecx, 0x80004005
jmp 0x18005415b
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x1f0]
call fcn.18008c000
sub rsi, rdi
sar rsi, 1
lea r8d, [rsi + 2]
mov rdx, rdi
lea rcx, [rbp + 0x1f0]
call qword [sym.imp.SHLWAPI.dll_StrCpyNW]
xor eax, eax
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x20]
call fcn.18008c000
xor eax, eax
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], rax
lea r9, [rsp + 0x78]
lea r8, [rbp - 0x68]
mov rdx, rbx
mov rcx, r13
call fcn.1800541b0
test eax, eax
mov ecx, eax
js 0x18005415b
movabs rsi, 0x2aaaaaaaaaaaaaab
cmp eax, 1
je 0x18005415b
mov qword [rbp - 0x38], r15
lea rdx, [rbp - 0x38]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x180054154
mov rax, qword [rbp - 0x38]
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
jne 0x18005414d
mov rax, rbx
or rbx, 0xffffffffffffffff
mov qword [rsp + 0x70], rbx
mov qword [rbp - 0x68], rax
lea rdi, [r13 + 0xa0]
mov r8, qword [rdi + 8]
lea rax, [rbp - 0x68]
cmp rax, r8
jae 0x180053fc6
mov rax, qword [rdi]
lea rcx, [rbp - 0x68]
cmp rax, rcx
ja 0x180053fc6
lea rcx, [rbp - 0x68]
sub rcx, rax
mov rax, rsi
imul rcx
mov rsi, rdx
sar rsi, 3
mov rax, rsi
shr rax, 0x3f
add rsi, rax
cmp r8, qword [rdi + 0x10]
jne 0x180053f9a
mov rcx, rdi
call fcn.180055650
mov rcx, qword [rdi + 8]
lea rax, [rsi + rsi*2]
shl rax, 4
add rax, qword [rdi]
test rcx, rcx
je 0x180053ff4
movups xmm0, xmmword [rax]
movups xmmword [rcx], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rcx + 0x10], xmm1
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rcx + 0x20], xmm0
jmp 0x180053ff4
cmp r8, qword [rdi + 0x10]
jne 0x180053fd4
mov rcx, rdi
call fcn.180055650
mov rax, qword [rdi + 8]
test rax, rax
je 0x180053ff4
movups xmm0, xmmword [rbp - 0x68]
movups xmmword [rax], xmm0
movups xmm1, xmmword [rbp - 0x58]
movups xmmword [rax + 0x10], xmm1
movups xmm0, xmmword [rbp - 0x48]
movups xmmword [rax + 0x20], xmm0
add qword [rdi + 8], 0x30
mov rdi, qword [rbp - 0x80]
mov r9, qword [rsp + 0x78]
test r9, r9
jne 0x180054010
test rdi, rdi
je 0x18005415e
movzx eax, byte [rbp - 0x79]
movzx ecx, byte [rbp - 0x7a]
movzx edx, byte [rbp - 0x7b]
movzx r8d, byte [rbp - 0x7c]
movzx r10d, byte [rbp - 0x7d]
movzx r11d, byte [rbp - 0x7e]
movzx ebx, byte [rbp - 0x7f]
movzx edi, dil
movzx esi, word [rsp + 0x7e]
movzx r14d, word [rsp + 0x7c]
mov dword [rsp + 0x68], eax
mov dword [rsp + 0x60], ecx
mov dword [rsp + 0x58], edx
mov dword [rsp + 0x50], r8d
mov dword [rsp + 0x48], r10d
mov dword [rsp + 0x40], r11d
mov dword [rsp + 0x38], ebx
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], r14d
lea r8, [rbp + 0x1f0]
lea rdx, str._s_08x__04x__04x__02x_02x__02x_02x_02x_02x_02x_02x.vdi
lea rcx, [rbp - 0x20]
call qword [sym.imp.USER32.dll_wsprintfW]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea r8d, [r9 + 1]
mov r14d, 0x80000000
mov edx, r14d
lea rcx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rsp + 0x70], rax
cmp rax, 0xffffffffffffffff
jne 0x180053ebd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 2
jne 0x18005413e
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x20]
call fcn.18008c000
mov rax, qword [r12]
mov r8d, 0x104
lea rdx, [rbp - 0x20]
mov rcx, r12
call qword [rax + 0x30]
mov edi, eax
test eax, eax
js 0x180054161
cmp eax, 1
je 0x180054161
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea r8d, [rbx + 2]
mov edx, r14d
lea rcx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rsp + 0x70], rax
cmp rax, 0xffffffffffffffff
jne 0x180053ebd
call fcn.180002050
mov edi, eax
jmp 0x180054161
test eax, eax
jle 0x180054161
movzx edi, ax
or edi, 0x80070000
jmp 0x180054161
mov ecx, 0xe0034004
jmp 0x18005415b
call fcn.180002050
mov ecx, eax
mov r15d, ecx
mov edi, r15d
cmp rbx, 0xffffffffffffffff
je 0x180054170
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x70], 0xffffffffffffffff
mov eax, edi
jmp 0x180054182
mov eax, 0x80070057
mov rcx, qword [rbp + 0x400]
xor rcx, rsp
call fcn.180072920
mov rbx, qword [rsp + 0x568]
add rsp, 0x510
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret