Function at 0x180002814
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
push rdi
sub rsp, 0x170
mov qword [rax - 0xd0], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x18002f528]
xor rax, rsp
mov qword [rsp + 0x160], rax
mov rsi, rcx
mov qword [rsp + 0x40], rcx
mov rax, qword [rcx + 0x128]
mov qword [rsp + 0x60], rax
mov rax, qword [rcx + 0x30]
mov qword [rsp + 0x68], rax
mov rax, qword [rcx + 0x98]
mov qword [rsp + 0x70], rax
mov eax, dword [0x180031de8]
mov ecx, eax
imul ecx, eax
imul ecx, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
shl eax, 3
sub ecx, eax
cmp ecx, 4
jne 0x1800028bd
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov ecx, dword [0x180031de8]
mov edx, 7
test rax, rax
cmove ecx, edx
mov dword [0x180031de8], ecx
mov rcx, rsi
call fcn.180002704
test al, al
je 0x180002a8c
cmp byte [rsi + 0x10], 0
je 0x1800028e3
mov rcx, rsi
call fcn.180002acc
test al, al
je 0x1800029da
and dword [rsp + 0x30], 0
lea rax, [rsi + 0x18]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov rdx, qword [rsi + 0x60]
mov rcx, qword [rsi + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180002997
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x180002963
cmp eax, 0x3e5
je 0x18000295d
lea rax, str.Channel_read_failure
mov qword [rsp + 0x38], rax
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x78]
call fcn.18000ce08
nop
lea rax, [0x180026df8]
mov qword [rsp + 0x78], rax
lea rdx, [0x18002d830]
lea rcx, [rsp + 0x78]
call fcn.18000d608
mov byte [rsi + 0x10], 1
jmp 0x180002997
lea rcx, [rsp + 0x48]
call fcn.18000ce80
nop
lea rax, [0x180026df8]
mov qword [rsp + 0x48], rax
lea rax, [0x180026e18]
mov qword [rsp + 0x48], rax
lea rdx, [0x18002d7e8]
lea rcx, [rsp + 0x48]
call fcn.18000d608
cmp byte [rsi + 0x10], 0
jne 0x1800029da
lea rbx, [rsi + 0x48]
mov rdi, qword [rbx + 8]
sub rdi, qword [rbx]
mov edx, dword [rsp + 0x30]
add rdx, rdi
mov rcx, rbx
call fcn.180003a68
mov rcx, qword [rbx]
mov r8d, dword [rsp + 0x30]
add rcx, rdi
mov rdx, qword [rsi + 0x60]
call fcn.18000bdb0
mov rcx, qword [rsi + 0x38]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov dil, 1
jmp 0x1800029dd
xor dil, dil
mov rcx, rsi
call fcn.180002cdc
mov bl, al
mov rcx, rsi
call fcn.180003130
or bl, dil
je 0x1800029f9
jmp 0x1800028bd
mov r9d, 0x1f4
xor r8d, r8d
lea rdx, [rsp + 0x60]
lea ecx, [r8 + 3]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x180002a24
mov rcx, qword [rsi + 0x128]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x1800029f4
cmp eax, 3
jae 0x180002a3b
mov rcx, rsi
call fcn.180002acc
mov rcx, rsi
call fcn.180002fa0
jmp 0x180002a51
cmp eax, 0x102
jne 0x180002a5b
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x180002a51
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, rsi
call fcn.180003130
jmp 0x1800029f4
lea rcx, [rsp + 0x90]
call fcn.18000ce80
nop
lea rax, [0x180026df8]
mov qword [rsp + 0x90], rax
lea rdx, [0x18002d830]
lea rcx, [rsp + 0x90]
call fcn.18000d608
call fcn.18000196c
test al, al
jne 0x180002aa4
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_GetTimeZoneInformation]
nop
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.18000bd80
lea r11, [rsp + 0x170]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret