Function at 0x140042224
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xa0
mov rax, rdx
mov r12, rcx
xor edi, edi
lea rdx, [rbp - 0x41]
and qword [rbp - 0x41], rdi
xor ebx, ebx
and qword [rbp - 0x31], rdi
mov rcx, rax
mov rsi, r8
mov qword [rbp - 0x21], rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
nop dword [rax + rax]
test eax, eax
je 0x14004249c
lea rdx, [rbp - 0x31]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
nop dword [rax + rax]
test eax, eax
je 0x14004249c
mov rax, qword [rbp - 0x31]
cmp qword [rbp - 0x41], rax
jne 0x14004249c
and dword [rbp - 0x49], ebx
lea esi, [rdi + 1]
and qword [rbp - 0x39], rbx
xorps xmm0, xmm0
and qword [rbp - 0x29], rbx
xorps xmm1, xmm1
mov edx, esi
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
movups xmmword [rbp - 0x19], xmm0
movups xmmword [rbp - 9], xmm0
movups xmmword [rbp + 7], xmm1
movups xmmword [rbp + 0x17], xmm1
call qword [sym.imp.KERNEL32.dll_CreateEventW]
nop dword [rax + rax]
mov r15, rax
test rax, rax
je 0x14004249c
xor r9d, r9d
xor r8d, r8d
mov edx, esi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
nop dword [rax + rax]
mov r14, rax
test rax, rax
je 0x14004248d
lea rax, [rbp + 0x7f]
mov rcx, r12
lea r9, [rbp - 0x29]
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x49]
mov edi, esi
lea rdx, [rbp - 0x39]
call fcn.14002e6f8
test eax, eax
je 0x14004247e
cmp qword [rbp - 0x39], rbx
je 0x14004247e
mov r12, qword [rbp - 0x29]
test r12, r12
je 0x14004247e
mov rax, qword [rbp - 0x41]
test rax, rax
je 0x14004247e
mov ecx, dword [rbp - 0x49]
lea r9, [rbp + 0x7f]
mov esi, dword [rbp - 0x49]
cmp rcx, rax
mov rdx, qword [rbp - 0x39]
mov rcx, qword [rbp + 0x6f]
cmovg esi, eax
and dword [rbp + 0x7f], 0
xor edi, edi
and qword [rbp - 0x19], rdi
mov rax, rbx
and qword [rbp - 0x11], rdi
mov r8d, esi
shr rax, 0x20
mov dword [rbp - 5], eax
lea rax, [rbp - 0x19]
mov qword [rsp + 0x20], rax
mov dword [rbp - 9], ebx
mov qword [rbp - 1], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
jne 0x1400423be
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
cmp eax, 0x3e5
jne 0x140042462
mov eax, dword [rbp - 0x1d]
lea r9, [rbp + 0x7f]
mov rcx, qword [rbp + 0x77]
mov r8d, esi
and qword [rbp + 7], rdi
mov rdx, r12
and qword [rbp + 0xf], rdi
mov dword [rbp + 0x1b], eax
lea rax, [rbp + 7]
mov qword [rsp + 0x20], rax
mov dword [rbp + 0x17], ebx
mov qword [rbp + 0x1f], r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
jne 0x14004240d
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
cmp eax, 0x3e5
jne 0x140042462
mov rcx, qword [rbp + 0x6f]
lea r8, [rbp + 0x7f]
mov r9d, 1
lea rdx, [rbp - 0x19]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
nop dword [rax + rax]
mov rcx, qword [rbp + 0x77]
lea r8, [rbp + 0x7f]
mov r9d, 1
lea rdx, [rbp + 7]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x39]
mov rdx, r12
mov r8d, esi
call sub.msvcrt.dll_memcmp
test eax, eax
mov eax, 1
cmove edi, eax
mov rax, qword [rbp - 0x41]
mov ecx, esi
add rbx, rcx
sub rax, rcx
mov qword [rbp - 0x21], rbx
mov qword [rbp - 0x41], rax
test edi, edi
jne 0x14004234b
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov eax, edi
add rsp, 0xa0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret