Function at 0x140016f9a
Capabilities:
Read file on windows
Receive data
Receive data on socket

Disassembly:
push rbp
push rdi
push rsi
push rbx
mov eax, 0x2098
call fcn.140023ab0
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x2040], rcx
mov qword [rbp + 0x2048], rdx
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax]
mov dword [rbp + 0x2008], eax
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 0x40]
test rax, rax
je 0x14001752b
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rdx, qword [rax + 0x40]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rcx, qword [rbp + 0x2048]
shl rcx, 3
add rax, rcx
mov rax, qword [rax]
mov rax, qword [rax + 0x50]
sub rdx, rax
mov qword [rbp + 0x1ff8], rdx
mov rax, qword [rbp + 0x1ff8]
mov ecx, eax
mov eax, dword [rbp + 0x2008]
cdqe
lea rdx, [rbp - 0x10]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
mov dword [rbp + 0x1ff4], eax
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax + 0x10]
cmp eax, 1
jne 0x1400170e5
mov ecx, 2
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov rcx, rax
lea rax, str.Tried_to_treat_a_DATAGRAM_socket_like_a_stream.
mov qword [rsp + 0x20], rax
mov r9d, 0x130
lea r8, str.libs_select_group.c
lea rax, str.Unrecoverable_error_in__s__d_:__s_n_n
mov rdx, rax
call sym.fprintf_4
call sym.abort
cmp dword [rbp + 0x1ff4], 0
jns 0x1400171cf
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 0x30]
test rax, rax
je 0x1400171b5
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rbx, qword [rax + 0x30]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rsi, qword [rax + 0x60]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax]
mov ecx, eax
call dbg.getlastsocketerror
mov ecx, eax
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov r9, rsi
mov r8d, ecx
mov rcx, rax
call rbx
mov ecx, eax
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov r8d, ecx
mov rcx, rax
call dbg.select_handle_response
jmp 0x140017b7f
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov rcx, rax
call dbg.select_group_remove_and_close_socket
jmp 0x140017b7f
cmp dword [rbp + 0x1ff4], 0
jne 0x14001728d
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 0x38]
test rax, rax
je 0x140017273
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov r9, qword [rax + 0x38]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rcx, qword [rax + 0x60]
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov r8, rcx
mov rcx, rax
call r9
mov ecx, eax
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov r8d, ecx
mov rcx, rax
call dbg.select_handle_response
jmp 0x140017b7f
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov rcx, rax
call dbg.select_group_remove_and_close_socket
jmp 0x140017b7f
mov eax, dword [rbp + 0x1ff4]
movsxd r8, eax
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rdx, qword [rax + 0x48]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rcx, qword [rbp + 0x2048]
shl rcx, 3
add rax, rcx
mov rax, qword [rax]
mov rax, qword [rax + 0x50]
lea rcx, [rdx + rax]
lea rax, [rbp - 0x10]
mov rdx, rax
call sym.memcpy
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rcx, qword [rax + 0x50]
mov eax, dword [rbp + 0x1ff4]
movsxd rdx, eax
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov r8, qword [rbp + 0x2048]
shl r8, 3
add rax, r8
mov rax, qword [rax]
add rdx, rcx
mov qword [rax + 0x50], rdx
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 0x50]
mov rdx, qword [rbp + 0x2040]
mov rdx, qword [rdx]
mov rcx, qword [rbp + 0x2048]
shl rcx, 3
add rdx, rcx
mov rdx, qword [rdx]
mov rdx, qword [rdx + 0x40]
cmp rdx, rax
jae 0x1400173af
mov ecx, 2
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov rcx, rax
lea rax, str.Something_caused_data_corruption__overflow__
mov qword [rsp + 0x20], rax
mov r9d, 0x14b
lea r8, str.libs_select_group.c
lea rax, str.Unrecoverable_error_in__s__d_:__s_n_n
mov rdx, rax
call sym.fprintf_4
call sym.abort
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rdx, qword [rax + 0x50]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rcx, qword [rbp + 0x2048]
shl rcx, 3
add rax, rcx
mov rax, qword [rax]
mov rax, qword [rax + 0x40]
cmp rdx, rax
jne 0x140017b7f
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov r10, qword [rax + 0x20]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rcx, qword [rax + 0x60]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov r9, qword [rax + 0x50]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov r8, qword [rax + 0x48]
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], 0xffff
mov qword [rsp + 0x20], 0
mov rcx, rax
call r10
mov ecx, eax
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov r8d, ecx
mov rcx, rax
call dbg.select_handle_response
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rcx, qword [rax + 0x50]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 0x48]
mov r8, rcx
mov edx, 0
mov rcx, rax
call sym.memset
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov qword [rax + 0x50], 0
jmp 0x140017b7f
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax + 0x10]
test eax, eax
je 0x140017574
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax + 0x10]
cmp eax, 3
jne 0x14001789a
mov dword [rbp + 0x200c], 1
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax + 0x10]
test eax, eax
jne 0x1400175bd
lea rdx, [rbp - 0x10]
mov eax, dword [rbp + 0x2008]
mov r8d, 0x2000
mov ecx, eax
call dbg.tcp_recv
mov qword [rbp - 0x18], rax
jmp 0x14001762b
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax + 0x10]
cmp eax, 3
jne 0x14001762b
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 8]
lea rcx, [rbp - 0x18]
lea rdx, [rbp - 0x10]
mov qword [rsp + 0x20], 0
mov r9, rcx
mov r8d, 0x2000
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ReadFile]
call rax
mov dword [rbp + 0x200c], eax
mov rax, qword [rbp - 0x18]
test rax, rax
js 0x140017641
cmp dword [rbp + 0x200c], 0
jne 0x14001771e
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 0x30]
test rax, rax
je 0x140017704
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rbx, qword [rax + 0x30]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rsi, qword [rax + 0x60]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax]
mov ecx, eax
call dbg.getlastsocketerror
mov ecx, eax
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov r9, rsi
mov r8d, ecx
mov rcx, rax
call rbx
mov ecx, eax
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov r8d, ecx
mov rcx, rax
call dbg.select_handle_response
jmp 0x140017895
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov rcx, rax
call dbg.select_group_remove_and_close_socket
jmp 0x140017895
mov rax, qword [rbp - 0x18]
test rax, rax
jne 0x1400177dc
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 0x38]
test rax, rax
je 0x1400177c2
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov r9, qword [rax + 0x38]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rcx, qword [rax + 0x60]
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov r8, rcx
mov rcx, rax
call r9
mov ecx, eax
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov r8d, ecx
mov rcx, rax
call dbg.select_handle_response
jmp 0x140017b7e
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov rcx, rax
call dbg.select_group_remove_and_close_socket
jmp 0x140017b7e
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 0x20]
test rax, rax
je 0x140017b7e
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov r10, qword [rax + 0x20]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rcx, qword [rax + 0x60]
mov rax, qword [rbp - 0x18]
mov r9, rax
lea r8, [rbp - 0x10]
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], 0xffff
mov qword [rsp + 0x20], 0
mov rcx, rax
call r10
mov ecx, eax
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov r8d, ecx
mov rcx, rax
call dbg.select_handle_response
jmp 0x140017b7e
jmp 0x140017b7e
mov dword [rbp - 0x34], 0x10
lea rax, [rbp - 0x30]
mov r8d, 0x10
mov edx, 0
mov rcx, rax
call sym.memset
mov eax, dword [rbp + 0x2008]
cdqe
lea rdx, [rbp - 0x10]
lea rcx, [rbp - 0x34]
mov qword [rsp + 0x28], rcx
lea rcx, [rbp - 0x30]
mov qword [rsp + 0x20], rcx
mov r9d, 0
mov r8d, 0x2000
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recvfrom]
call rax
cdqe
mov qword [rbp + 0x2000], rax
cmp qword [rbp + 0x2000], 0
js 0x14001790f
cmp qword [rbp + 0x2000], 0xffffffffffffffff
jne 0x1400179ec
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 0x30]
test rax, rax
je 0x1400179d2
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rbx, qword [rax + 0x30]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rsi, qword [rax + 0x60]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax]
mov ecx, eax
call dbg.getlastsocketerror
mov ecx, eax
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov r9, rsi
mov r8d, ecx
mov rcx, rax
call rbx
mov ecx, eax
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov r8d, ecx
mov rcx, rax
call dbg.select_handle_response
jmp 0x140017b7f
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov rcx, rax
call dbg.select_group_remove_and_close_socket
jmp 0x140017b7f
cmp qword [rbp + 0x2000], 0
jne 0x140017aab
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 0x38]
test rax, rax
je 0x140017a91
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov r9, qword [rax + 0x38]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rcx, qword [rax + 0x60]
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov r8, rcx
mov rcx, rax
call r9
mov ecx, eax
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov r8d, ecx
mov rcx, rax
call dbg.select_handle_response
jmp 0x140017b7f
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov rcx, rax
call dbg.select_group_remove_and_close_socket
jmp 0x140017b7f
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 0x20]
test rax, rax
je 0x140017b7f
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rbx, qword [rax + 0x20]
mov rax, qword [rbp + 0x2040]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x2048]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rdi, qword [rax + 0x60]
movzx eax, word [rbp - 0x2e]
movzx eax, ax
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_ntohs]
call rax
movzx esi, ax
mov eax, dword [rbp - 0x2c]
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_inet_ntoa]
call rax
mov rcx, rax
mov r9, qword [rbp + 0x2000]
lea r8, [rbp - 0x10]
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rcx
mov rcx, rax
call rbx
mov ecx, eax
mov edx, dword [rbp + 0x2008]
mov rax, qword [rbp + 0x2040]
mov r8d, ecx
mov rcx, rax
call dbg.select_handle_response
jmp 0x140017b7f
nop
nop
add rsp, 0x2098
pop rbx
pop rsi
pop rdi
pop rbp
ret