Function at 0x140044a50
Capabilities:
Read file on windows

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
push rbx
push rsi
push r12
push r13
push r14
push r15
sub rsp, 0x58
mov r13d, dword [rdx]
mov rbx, rcx
mov ecx, r13d
movsxd r12, r8d
mov edx, r13d
xor esi, esi
and ecx, 1
mov dword [rsp + 0xa8], esi
mov eax, dword [rbx + 0x68]
and edx, 2
and r13d, 4
mov dword [rsp + 0x90], ecx
mov dword [rsp + 0x30], edx
bt eax, 9
jae 0x140044aa6
lea r15d, [rsi + 1]
test ecx, ecx
jne 0x140044aa9
mov r15d, esi
mov qword [rsp + 0x50], rbp
test edx, edx
je 0x140044acd
bt eax, 0x1a
jb 0x140044acd
mov rcx, qword [rbx + 0x88]
call fcn.14005a2c0
mov ebp, 1
test eax, eax
jne 0x140044acf
mov ebp, esi
test dword [rbx + 0x68], 0x4000000
mov qword [rsp + 0x48], rdi
je 0x140044ae7
mov edi, 1
test r13d, r13d
jne 0x140044ae9
mov edi, esi
call fcn.1400339d0
mov rcx, qword [rsp + 0x98]
add r12, rax
mov r14, rax
mov dword [rcx], esi
mov rax, qword [0x140263930]
test rax, rax
je 0x140044b1f
mov rax, qword [rax + 0x38]
test rax, rax
je 0x140044b1f
mov ecx, dword [rbx]
call rax
mov rcx, qword [rsp + 0x98]
test r15d, r15d
jne 0x140044e06
test ebp, ebp
jne 0x140044dff
test edi, edi
jne 0x140044df6
cmp dword [rsp + 0x90], esi
je 0x140044ce0
test dword [rbx + 0x68], 0x400
jne 0x140044ce0
mov rax, qword [rbx + 0x138]
xor ecx, ecx
mov dword [rsp + 0xa8], 1
mov qword [rax], rcx
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rcx
mov qword [rax + 0x18], rcx
mov rax, qword [rbx + 0x138]
mov qword [rax + 0x18], rbx
lock inc dword [rbx + 0x120]
or dword [rbx + 0x68], 0x400
mov rcx, rbx
call fcn.140048d20
movsxd rcx, dword [rbx + 0x70]
lea rax, [0x140041670]
mov r9, qword [rbx + 0x138]
lea rdx, [rbx + 0x164]
lea r8d, [r15 + 1]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFileEx]
movsxd rdi, eax
mov rcx, rdi
call fcn.140171010
test rax, rax
jne 0x140044c11
mov rcx, qword gs:[0x58]
mov eax, 0x2f80
mov rdx, qword [rcx]
mov rax, qword [rax + rdx]
test rax, rax
jne 0x140044bed
call fcn.140176084
mov ecx, dword [rax]
mov edx, 3
mov dword [rsp + 0x20], 6
lea r9d, [rdx + 0x6a]
lea r8d, [r9 + 0x7b]
call fcn.14003f940
test eax, eax
je 0x140044e2b
test edi, edi
jne 0x140044cca
lea rcx, [0x14027dfa0]
call sub.KERNEL32.dll_EnterCriticalSection
cmp rbx, qword [0x14027dfe8]
mov rcx, qword [rbx + 0xf0]
jne 0x140044c3e
mov qword [0x14027dfe8], rcx
jmp 0x140044c53
mov rax, qword [rbx + 0xf8]
mov qword [rax + 0xf0], rcx
mov rcx, qword [0x14027dfe8]
mov rdx, qword [rbx + 0xf0]
test rdx, rdx
je 0x140044c6f
mov rax, qword [rbx + 0xf8]
mov qword [rdx + 0xf8], rax
jmp 0x140044c82
test rcx, rcx
je 0x140044c82
mov rax, qword [rbx + 0xf8]
mov qword [rcx + 0xf8], rax
lea rcx, [0x14027dfa0]
mov qword [rbx + 0xf0], rsi
mov qword [rbx + 0xf8], rsi
call sub.KERNEL32.dll_LeaveCriticalSection
and dword [rbx + 0x68], 0xfffffbff
or eax, 0xffffffff
lock xadd dword [rbx + 0x120], eax
cmp eax, 1
jne 0x140044cbb
mov rcx, rbx
call fcn.140040d20
or dword [rbx + 0x68], 0x100000
mov rcx, rbx
call fcn.140048dc0
test dword [rbx + 0x68], 0x4000000
je 0x140044cdd
mov edi, 1
test r13d, r13d
jne 0x140044ce0
mov edi, esi
nop
test ebp, ebp
jne 0x140044dd9
test edi, edi
jne 0x140044dd9
cmp dword [rsp + 0xa0], esi
jl 0x140044d0a
cmp r14, r12
jae 0x140044dd9
mov ecx, r12d
sub ecx, r14d
jmp 0x140044d0d
or ecx, 0xffffffff
mov edx, 1
call qword [sym.imp.KERNEL32.dll_SleepEx]
mov eax, dword [rbx + 0x68]
bt eax, 9
jae 0x140044d30
mov r15d, 1
cmp dword [rsp + 0x90], esi
jne 0x140044d33
mov r15d, esi
cmp dword [rsp + 0x30], esi
je 0x140044d54
bt eax, 0x1a
jb 0x140044d54
mov rcx, qword [rbx + 0x88]
call fcn.14005a2c0
mov ebp, 1
test eax, eax
jne 0x140044d56
mov ebp, esi
test dword [rbx + 0x68], 0x4000000
je 0x140044d69
mov edi, 1
test r13d, r13d
jne 0x140044d6b
mov edi, esi
call fcn.1400339d0
mov r14, rax
test r15d, r15d
je 0x140044ce0
mov edi, 1
mov rax, qword [rsp + 0x98]
mov esi, 1
mov dword [rax], edi
cmp dword [rsp + 0xa8], 0
je 0x140044dd5
test dword [rbx + 0x68], 0x400
je 0x140044dd5
movsxd rcx, dword [rbx + 0x70]
call fcn.140053620
test dword [rbx + 0x68], 0x400
je 0x140044dd5
nop word [rax + rax]
or edx, 0xffffffff
or ecx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_SleepEx]
test dword [rbx + 0x68], 0x400
jne 0x140044dc0
mov eax, esi
jmp 0x140044e12
test r15d, r15d
jne 0x140044d7c
test ebp, ebp
jne 0x140044def
test edi, edi
je 0x140044d90
neg edi
sbb edi, edi
and edi, 4
jmp 0x140044d81
mov edi, 2
jmp 0x140044d81
lea edi, [rdi*4]
jmp 0x140044e0b
mov edi, 2
jmp 0x140044e0b
mov edi, 1
mov dword [rcx], edi
mov eax, 1
mov rdi, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbx
ret
lea rdx, str.cant_read_from_handle:__m
mov ecx, 0x4b0000
call fcn.14002d6c0
int3