Function at 0x1800022d0
Capabilities:
Read file on windows

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
push r14
sub rsp, 0x120
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rsp + 0x158], rbx
mov rbx, rcx
mov rax, qword [rcx + 0x128]
mov qword [rsp + 0x30], rax
mov rax, qword [rcx + 0x30]
mov qword [rsp + 0x38], rax
mov rax, qword [rcx + 0x98]
mov qword [rsp + 0x40], rax
xor r14d, r14d
nop dword [rax]
mov rcx, rbx
call fcn.180002230
test al, al
je 0x180002555
cmp byte [rbx + 0x10], r14b
je 0x180002346
mov rcx, rbx
call fcn.1800025f0
test al, al
je 0x18000249c
mov dword [rsp + 0x148], r14d
lea rax, [rbx + 0x18]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x148]
mov r8d, 0x1000
mov rdx, qword [rbx + 0x60]
mov rcx, qword [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180002406
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x1800023d2
cmp eax, 0x3e5
je 0x1800023cc
lea rax, str.Channel_read_failure
mov qword [rsp + 0x150], rax
lea rdx, [rsp + 0x150]
lea rcx, [rsp + 0x60]
call fcn.18000d188
nop
lea rax, [0x180026ab8]
mov qword [rsp + 0x60], rax
lea rdx, [0x18002db20]
lea rcx, [rsp + 0x60]
call fcn.18000d988
mov byte [rbx + 0x10], 1
jmp 0x180002406
lea rcx, [rsp + 0x48]
call fcn.18000d200
nop
lea rax, [0x180026ab8]
mov qword [rsp + 0x48], rax
lea rax, [0x180026ad8]
mov qword [rsp + 0x48], rax
lea rdx, [0x18002dad8]
lea rcx, [rsp + 0x48]
call fcn.18000d988
cmp byte [rbx + 0x10], r14b
jne 0x18000249c
mov rsi, qword [rbx + 0x50]
sub rsi, qword [rbx + 0x48]
mov ecx, dword [0x180031de8]
lea r8d, [rcx + 2]
lea eax, [rcx + 1]
imul r8d, eax
imul r8d, ecx
mov eax, 0x66666667
imul r8d
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
sub r8d, eax
cmp r8d, 2
jne 0x180002462
mov dword [rsp + 0x98], r14d
mov dword [rsp + 0xc0], r14d
mov dword [rsp + 0xf0], r14d
mov edx, dword [rsp + 0x148]
add rdx, rsi
lea rcx, [rbx + 0x48]
call fcn.180003630
mov rcx, qword [rbx + 0x48]
mov r8d, dword [rsp + 0x148]
add rcx, rsi
mov rdx, qword [rbx + 0x60]
call fcn.18000c130
mov rcx, qword [rbx + 0x38]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov sil, 1
jmp 0x18000249f
xor sil, sil
mov rcx, rbx
call fcn.180002800
movzx edi, al
mov rcx, rbx
call fcn.180002da0
or dil, sil
je 0x1800024bc
jmp 0x180002320
mov r9d, 0x1f4
xor r8d, r8d
lea rdx, [rsp + 0x30]
lea ecx, [r8 + 3]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x1800024ea
mov rcx, qword [rbx + 0x128]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x180002320
cmp eax, 3
jae 0x180002501
mov rcx, rbx
call fcn.1800025f0
mov rcx, rbx
call fcn.180002c40
jmp 0x180002517
cmp eax, 0x102
jne 0x180002524
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x180002517
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, rbx
call fcn.180002da0
jmp 0x180002320
lea rcx, [rsp + 0x80]
call fcn.18000d200
nop
lea rax, [0x180026ab8]
mov qword [rsp + 0x80], rax
lea rdx, [0x18002db20]
lea rcx, [rsp + 0x80]
call fcn.18000d988
mov r8d, dword [0x180031de8]
lea ecx, [r8 + 2]
lea eax, [r8 + 1]
imul ecx, eax
imul ecx, r8d
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0xe
sub ecx, edx
cmp ecx, 3
jne 0x1800025ce
mov eax, 0x51eb851f
imul r8d
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x64
sub r8d, edx
add r8d, 0x141
movsxd rcx, r8d
mov eax, 4
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.18000c0d0
mov rcx, rax
call fcn.18000d404
nop
mov rbx, qword [rsp + 0x158]
add rsp, 0x120
pop r14
pop rdi
pop rsi
ret