Function at 0x180135960
Capabilities:
Get file size
Read file on windows
Read file via mapping

Disassembly:
push rbx
push r12
push r14
sub rsp, 0x60
xor ebx, ebx
mov r12, r8
mov qword [r8], rbx
mov r14, rdx
test rcx, rcx
jne 0x180135989
mov eax, 0x21
add rsp, 0x60
pop r14
pop r12
pop rbx
ret
test r14, r14
jne 0x18013599d
mov eax, 6
add rsp, 0x60
pop r14
pop r12
pop rbx
ret
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x40], r15
mov r15, qword [rcx]
mov ecx, dword [rdx]
mov eax, ecx
and eax, 7
cmp eax, 1
jne 0x180135a11
mov edx, 0x48
mov rcx, r15
call qword [r15 + 8]
mov rsi, rax
test rax, rax
je 0x180135a31
xorps xmm0, xmm0
mov qword [r12], rsi
movups xmmword [rsi], xmm0
xor eax, eax
movups xmmword [rsi + 0x10], xmm0
movups xmmword [rsi + 0x20], xmm0
movups xmmword [rsi + 0x30], xmm0
mov qword [rsi + 0x40], rax
mov rax, qword [r14 + 8]
mov ecx, dword [r14 + 0x10]
mov qword [rsi], rax
mov dword [rsi + 8], ecx
mov dword [rsi + 0xc], ebx
mov qword [rsi + 0x38], rbx
mov qword [rsi + 0x20], rbx
mov qword [rsi + 0x28], rbx
mov qword [rsi + 0x30], r15
jmp 0x180135c4c
cmp eax, 4
jne 0x180135c16
mov edx, 0x48
mov rcx, r15
call qword [r15 + 8]
mov rdi, rax
mov rsi, rax
test rax, rax
jne 0x180135a3b
mov ebx, 0x40
jmp 0x180135c4c
mov qword [rsp + 0x88], rbp
xor r9d, r9d
mov qword [rsp + 0x48], r13
mov ebp, 1
mov qword [rax], rbx
mov r8d, ebp
mov qword [rax + 8], rbx
mov edx, 0x80000000
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rbx
mov qword [rax + 0x28], rbx
mov qword [rax + 0x38], rbx
mov qword [rax + 0x40], rbx
mov qword [rax + 0x30], r15
mov r13, qword [r14 + 0x18]
mov qword [rsp + 0x30], rbx
mov rcx, r13
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x180135bf0
lea rdx, [rsp + 0x90]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x180135bdb
mov rax, qword [rsp + 0x90]
cmp rax, 0x7fffffff
jg 0x180135bdb
test rax, rax
je 0x180135bdb
mov qword [rsp + 0x28], rbx
xor r9d, r9d
xor edx, edx
mov dword [rsp + 0x20], ebx
mov r8d, 2
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov rbp, rax
test rax, rax
je 0x180135bdb
mov eax, dword [rsp + 0x90]
xor r9d, r9d
xor r8d, r8d
mov dword [rdi + 8], eax
mov edx, 4
mov dword [rdi + 0xc], ebx
mov rcx, rbp
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rcx, rbp
mov qword [rdi], rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rdi], rbx
je 0x180135b49
lea rax, [0x180150d10]
jmp 0x180135ba9
mov rcx, qword [rdi + 0x30]
xor edx, edx
movsxd r8, dword [rdi + 8]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rdi], rax
test rax, rax
je 0x180135bdb
mov ebp, ebx
nop word [rax + rax]
mov r8d, dword [rdi + 8]
lea r9, [rsp + 0x80]
mov edx, ebp
sub r8d, ebp
add rdx, qword [rdi]
mov rcx, r14
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180135bc9
add ebp, dword [rsp + 0x80]
cmp ebp, dword [rdi + 8]
jne 0x180135b70
lea rax, [0x180150d40]
mov rcx, r14
mov qword [rdi + 0x28], rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rdi]
mov ebp, ebx
mov qword [rdi + 0x10], rax
mov qword [rdi + 0x18], r13
mov qword [rdi + 0x20], rbx
jmp 0x180135bfd
mov rcx, qword [rdi + 0x30]
xor edx, edx
mov r8, qword [rdi]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi], rbx
mov ebp, 0x51
mov qword [rdi + 8], rbx
mov rdx, rdi
mov rcx, r15
call qword [r15 + 0x10]
mov rsi, rbx
mov r13, qword [rsp + 0x48]
mov ebx, ebp
test ebp, ebp
mov rbp, qword [rsp + 0x88]
jne 0x180135c4c
mov qword [r12], rsi
jmp 0x180135c4c
cmp eax, 2
jne 0x180135c2e
mov rsi, qword [rdx + 0x20]
test rsi, rsi
je 0x180135c2e
mov qword [rsi + 0x30], r15
mov qword [r12], rsi
jmp 0x180135c4c
mov ebx, 6
test cl, 2
je 0x180135c4c
mov rcx, qword [rdx + 0x20]
test rcx, rcx
je 0x180135c4c
mov rax, qword [rcx + 0x28]
test rax, rax
je 0x180135c4c
call rax
mov r15, qword [rsp + 0x40]
mov eax, ebx
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x60
pop r14
pop r12
pop rbx
ret