Function at 0x1400547c0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbp
push rsi
push r12
push r13
push r14
push r15
sub rsp, 0x78
xor r13d, r13d
mov rsi, rdx
movsxd rdx, dword [rdx + 0xc]
mov r12d, r9d
mov r15, r8
mov r14, rcx
mov ebp, r13d
mov eax, dword [rsi + 8]
sub eax, edx
cmp r9d, eax
cmovge r12d, eax
test r12d, r12d
jle 0x140054a2f
movzx eax, word [rsi + 0x18]
sub eax, edx
mov qword [rsp + 0x68], rdi
cmp r12d, eax
mov qword [rsp + 0x70], rbx
mov edi, r12d
cmovge edi, eax
test edi, edi
jle 0x140054865
add rdx, qword [rsi + 0x10]
mov rcx, r15
movsxd rbx, edi
mov r8, rbx
call fcn.140087590
add dword [rsi + 0xc], edi
add r15, rbx
sub r12d, edi
mov qword [rsp + 0xc0], r15
mov ebp, edi
test r12d, r12d
jg 0x140054865
mov eax, edi
mov rbx, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x68]
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbp
ret
mov edx, dword [rsi]
mov rcx, r14
call fcn.1400525b0
movzx ecx, word [rsi + 0x18]
mov rdi, rax
mov r15d, dword [rsi + 4]
sub r15d, ecx
add r15d, dword [rsi + 0xc]
call qword [sym.imp.tier0.dll_ThreadGetCurrentId]
mov rdx, qword [rdi + 0x18]
mov rcx, rax
cmp rax, rdx
je 0x1400548b1
xor eax, eax
lock cmpxchg qword [rdi + 0x18], rcx
je 0x1400548b1
pause
mov rdx, rcx
xor r8d, r8d
lea rcx, [rdi + 0x18]
call qword [sym.imp.tier0.dll_private:_void___cdecl_CThreadFastMutex::Lock_unsigned_long_long_unsigned___int64___unsigned_int_volatile___ptr64]
jmp 0x1400548ba
nop
mov eax, dword [rdi + 0x20]
inc eax
mov dword [rdi + 0x20], eax
cmp dword [rsi], 0x7fff
jne 0x1400548cf
mov eax, dword [r14 + 0x20c]
add eax, 0x1c
add r15d, eax
mov r10, qword [rsp + 0xc0]
mov ebx, r15d
and ebx, 0x800fffff
mov dword [rsp + 0xb8], r15d
mov r14d, r12d
mov qword [rsp + 0x48], r10
mov r8d, r15d
mov dword [rsp + 0xc8], r13d
lea eax, [rbx + r12]
cmp eax, 0x100000
jle 0x140054910
neg ebx
and ebx, 0xfffff
jmp 0x140054913
mov ebx, r12d
mov rax, qword [rsp + 0xb0]
add rax, 0x240
mov qword [rsp + 0x50], rax
nop word [rax + rax]
lea rcx, [rsp + 0x40]
mov dword [rsp + 0x40], r13d
mov qword [rsp + 0x30], rcx
mov r9, rdi
mov dword [rsp + 0x28], ebx
mov rdx, r10
mov dword [rsp + 0x20], r8d
mov rcx, rax
mov r8, rsi
call fcn.140051800
test al, al
je 0x1400549bb
mov r10, qword [rsp + 0x48]
sub r14d, ebx
mov r8d, dword [rsp + 0xb8]
mov edx, dword [rsp + 0x40]
add r8d, ebx
add edx, dword [rsp + 0xc8]
movsxd rax, ebx
mov ebx, r14d
add r10, rax
mov dword [rsp + 0xb8], r8d
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x48], r10
mov dword [rsp + 0xc8], edx
cmp r14d, 0x100000
jle 0x1400549ad
mov ebx, 0x100000
jmp 0x140054930
test r14d, r14d
jne 0x140054930
add dword [rsi + 0xc], edx
jmp 0x140054a0e
cmp r15d, dword [rdi + 0x10]
je 0x1400549d4
mov rcx, qword [rdi + 8]
xor r9d, r9d
xor r8d, r8d
mov edx, r15d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rdx, qword [rsp + 0xc0]
lea r9, [rsp + 0xc8]
mov rcx, qword [rdi + 8]
mov r8d, r12d
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [rsp + 0xc8]
add dword [rsi + 0xc], ecx
lea eax, [rcx + r15]
mov dword [rdi + 0x10], eax
mov edx, dword [rsp + 0xc8]
mov eax, dword [rdi + 0x20]
add ebp, edx
dec eax
mov dword [rdi + 0x20], eax
mov eax, dword [rdi + 0x20]
test eax, eax
mov eax, ebp
jne 0x14005484c
nop
xchg qword [rdi + 0x18], r13
jmp 0x14005484c
mov eax, r13d
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbp
ret