Function at 0x14022ad20
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x5f]
sub rsp, 0x90
mov qword [rbp + 7], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rdi
mov rax, qword [0x1403ddfb8]
xor rax, rsp
mov qword [rbp + 0x47], rax
mov rbx, rcx
mov rax, qword [rcx + 0x38]
mov rcx, qword [rax]
test rcx, rcx
je 0x14022ad88
mov rdx, qword [rbx + 0x50]
movsxd r8, dword [rdx]
lea rax, [rcx + r8]
cmp rcx, rax
jae 0x14022ad88
lea eax, [r8 - 1]
mov dword [rdx], eax
mov rcx, qword [rbx + 0x38]
mov rdx, qword [rcx]
lea rax, [rdx + 1]
mov qword [rcx], rax
movzx eax, byte [rdx]
jmp 0x14022afc4
cmp qword [rbx + 0x80], 0
jne 0x14022ad9a
or eax, 0xffffffff
jmp 0x14022afc4
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x14022adc7
mov rdx, qword [rbx + 0x90]
mov rcx, qword [rbx + 0x88]
mov qword [r8], rcx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
cmp qword [rbx + 0x68], 0
jne 0x14022ae01
mov byte [rbp + 0x20], 0
mov r9, qword [rbx + 0x80]
mov edx, 1
mov r8d, edx
lea rcx, [rbp + 0x20]
call fcn.1402aae5c
cmp rax, 1
jne 0x14022adf9
movzx ebx, byte [rbp + 0x20]
jmp 0x14022afc2
or ebx, 0xffffffff
jmp 0x14022afc2
mov qword [rbp + 0x3f], sendto
mov qword [rbp + 0x37], 0
mov byte [rbp + 0x27], 0
mov rcx, qword [rbx + 0x80]
call fcn.1402a1e08
cmp eax, 0xffffffff
je 0x14022af68
movzx r8d, al
mov edx, 1
lea rcx, [rbp + 0x27]
call fcn.1400479c0
lea rdx, [rbp + 0x27]
cmp qword [rbp + 0x3f], 0x10
cmovae rdx, qword [rbp + 0x27]
lea r8, [rbp + 0x27]
cmovae r8, qword [rbp + 0x27]
mov rcx, qword [rbx + 0x68]
mov r10, qword [rcx]
mov r9, qword [rbp + 0x37]
add r9, rdx
lea rax, [rbp + 0x17]
mov qword [rsp + 0x38], rax
lea rax, [rbp + 0x20]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x1f]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0xf]
mov qword [rsp + 0x20], rax
lea rdx, [rbx + 0x74]
call qword [r10 + 0x30]
test eax, eax
js 0x14022af68
cmp eax, 1
jle 0x14022aeaf
cmp eax, 3
jne 0x14022af68
cmp qword [rbp + 0x37], 1
jae 0x14022aede
jmp 0x14022ae15
lea rax, [rbp + 0x1f]
cmp qword [rbp + 0x17], rax
lea rax, [rbp + 0x27]
jne 0x14022af1d
cmp qword [rbp + 0x3f], 0x10
cmovae rax, qword [rbp + 0x27]
mov r8, qword [rbp + 0xf]
sub r8, rax
xor edx, edx
lea rcx, [rbp + 0x27]
call fcn.14002d670
jmp 0x14022ae15
mov rcx, qword [rbp + 0x27]
cmp qword [rbp + 0x3f], 0x10
jb 0x14022af0e
mov rax, rcx
test rcx, rcx
jne 0x14022af12
mov byte [rbp + 0x1f], al
call fcn.1402946c4
mov dword [rax], reloc.WS2_32.dll_shutdown
call fcn.1402904fc
mov rcx, qword [rbp + 0x27]
movzx eax, byte [rbp + 0x1f]
jmp 0x14022af18
lea rax, [rbp + 0x27]
movzx eax, byte [rax]
mov byte [rbp + 0x1f], al
movzx ebx, al
jmp 0x14022af6f
mov rcx, qword [rbp + 0x27]
cmp qword [rbp + 0x3f], 0x10
cmovae rax, rcx
mov rdx, qword [rbp + 0xf]
sub eax, edx
add eax, dword [rbp + 0x37]
movsxd rdi, eax
test eax, eax
jle 0x14022af62
nop word [rax + rax]
dec rdi
movsx ecx, byte [rdi + rdx]
mov rdx, qword [rbx + 0x80]
call fcn.1402a27b4
test rdi, rdi
jle 0x14022af5e
mov rdx, qword [rbp + 0xf]
jmp 0x14022af40
mov rcx, qword [rbp + 0x27]
movzx ebx, byte [rbp + 0x1f]
jmp 0x14022af6f
mov rcx, qword [rbp + 0x27]
or ebx, 0xffffffff
mov rax, qword [rbp + 0x3f]
cmp rax, 0x10
jb 0x14022afc2
inc rax
cmp rax, 0x1000
jb 0x14022afbd
test byte [rbp + 0x27], 0x1f
je 0x14022af90
call fcn.14029051c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x14022af9f
call fcn.14029051c
int3
sub rcx, rax
cmp rcx, 8
jae 0x14022afae
call fcn.14029051c
int3
cmp rcx, 0x27
jbe 0x14022afba
call fcn.14029051c
int3
mov rcx, rax
call fcn.14026d850
mov eax, ebx
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.14026d870
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret