Function at 0x140009600
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x3d8]
sub rsp, 0x4d8
mov rax, qword [0x1402698e0]
xor rax, rsp
mov qword [rbp + 0x3c0], rax
movsxd rdi, r8d
mov r12, rcx
xor r14d, r14d
xor ecx, ecx
mov qword [rsp + 0x68], r9
mov rsi, rdx
mov dword [rsp + 0x44], edi
mov ebx, r14d
mov dword [rsp + 0x3c], r14d
mov qword [rsp + 0x60], rdx
call fcn.14019a0f4
or r13, 0xffffffffffffffff
mov qword [rsi], r14
mov esi, dword [rsp + 0x40]
mov dword [rsp + 0x30], r13d
lea r15, [rax + rdi]
mov qword [rsp + 0x50], r14
mov byte [rsp + 0x38], 1
nop dword [rax]
nop dword [rax + rax]
xor eax, eax
lea rdx, [rbp + 0x1a0]
mov rcx, r12
lea r9d, [rax + 2]
lea r8d, [rax + 0xe]
mov dword [rsp + 0x40], reloc.WS2_32.dll_recv
mov qword [rbp + 0x1a0], rax
mov dword [rbp + 0x1a8], eax
mov word [rbp + 0x1ac], ax
call qword [sym.imp.WS2_32.dll_recv]
inc ebx
mov edi, eax
mov dword [rsp + 0x58], ebx
cmp ebx, 0x3e8
jg 0x140009df3
cmp eax, 0xffffffff
jne 0x1400096ea
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2728
je 0x1400096ea
sub eax, 0xb
je 0x1400096ea
cmp eax, 0x14
jne 0x140009abd
movsx r14d, byte [rbp + 0x1ac]
cmp edi, 0xffffffff
je 0x140009a4e
test edi, edi
je 0x140009cb6
xor cl, cl
lea eax, [r14 - 1]
cmp eax, 0xb
mov eax, 1
movzx ecx, cl
cmovbe ecx, eax
test cl, cl
je 0x140009c34
movzx eax, byte [rbp + 0x1a0]
mov byte [rsp + 0x34], al
movzx eax, byte [rbp + 0x1a1]
mov byte [rsp + 0x35], al
movzx eax, byte [rbp + 0x1a2]
mov byte [rsp + 0x36], al
movzx eax, byte [rbp + 0x1a3]
mov byte [rsp + 0x37], al
mov ecx, dword [rsp + 0x34]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp dword [0x14027d0a0], 0
movsxd rbx, eax
mov dword [rsp + 0x30], ebx
je 0x140009787
lea rdx, str.Msg_Receive__ld_bytes_pending
lea rcx, [rbp + 0x1b0]
mov r8d, ebx
call fcn.140197aa8
lea rcx, [rbp + 0x1b0]
call fcn.14000c2d0
cmp ebx, 0x1dcd6500
jg 0x140009c0f
test ebx, ebx
js 0x140009c0f
mov r14, qword [rsp + 0x50]
test r14, r14
jne 0x1400097be
mov rcx, rbx
call fcn.140198594
mov r14, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x140009aea
mov r8, rbx
mov edx, 0x20
mov rcx, r14
call fcn.14019ad10
mov rax, qword [rsp + 0x60]
mov edi, ebx
mov qword [rax], r14
nop dword [rax + rax]
xor r9d, r9d
mov r8d, edi
mov rdx, r14
mov rcx, r12
call qword [sym.imp.WS2_32.dll_recv]
movsxd rbx, eax
mov eax, dword [rsp + 0x3c]
inc eax
mov dword [rsp + 0x3c], eax
cmp eax, 0x186a0
jg 0x140009c03
cmp ebx, 0xffffffff
jne 0x140009838
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2728
je 0x14000987b
sub eax, 0xb
je 0x14000987b
cmp eax, 0x14
je 0x14000987b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Msg_Receive_recv_returns__d
jmp 0x140009aca
cmp dword [0x14027d0a0], 0
je 0x140009871
movzx r9d, byte [rsp + 0x38]
mov rcx, qword [rsp + 0x68]
mov r8d, ebx
mov rdx, r14
mov qword [rsp + 0x20], r12
call fcn.14000bd10
mov eax, dword [rsp + 0x38]
test ebx, ebx
movzx eax, al
mov ecx, 0
cmovg eax, ecx
mov dword [rsp + 0x38], eax
add r14, rbx
sub edi, ebx
mov qword [rsp + 0x50], r14
test edi, edi
jle 0x1400098f8
nop
xor ecx, ecx
call fcn.14019a0f4
cmp r15, rax
js 0x140009b06
xor ecx, ecx
call fcn.14019a0f4
mov ecx, r15d
lea rdx, [rbp - 0x70]
sub ecx, eax
xor eax, eax
xor r9d, r9d
mov dword [rsp + 0x48], ecx
lea ecx, [rax + 0x40]
xor r8d, r8d
mov dword [rsp + 0x4c], eax
mov qword [rbp - 0x68], r12
mov dword [rbp - 0x70], 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
mov esi, eax
cmp eax, 0xffffffff
jne 0x1400098df
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
je 0x140009880
jmp 0x1400098f8
test eax, eax
jle 0x1400098f8
lea rdx, [rbp - 0x70]
mov rcx, r12
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x1400097e0
mov eax, dword [rsp + 0x30]
cmp eax, 0xffffffff
jne 0x140009b14
mov ebx, dword [rsp + 0x58]
test esi, esi
jle 0x140009922
lea rdx, [rbp - 0x70]
mov rcx, r12
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x140009680
mov ecx, 0x274c
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, qword [0x14027d2e8]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp byte [0x14027d1c0], 0
je 0x140009a38
call fcn.1400093c0
lea rcx, [0x140227eec]
lea rdx, [0x140227ef0]
test al, al
cmovne rdx, rcx
lea rcx, [0x14027d1c0]
call fcn.140197a78
mov rdi, rax
test rax, rax
je 0x140009a38
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, eax
call sub.KERNEL32.dll_GetCurrentProcessId
lea rdx, str.Process_ID:__d___Thread_ID:__ld
lea rcx, [rbp + 0x250]
mov r9d, ebx
mov r8d, eax
call fcn.140197aa8
lea rcx, [rsp + 0x78]
call fcn.14019d81c
lea rcx, [rsp + 0x78]
call fcn.14019d9b8
lea rdx, [rbp + 0x250]
mov rcx, r13
nop
inc rcx
cmp byte [rdx + rcx], 0
jne 0x1400099c0
lea rdx, [rbp + 0x250]
lea r8, str.__m__d__Y__H:_M:_S
mov r9, rax
add rcx, rdx
mov edx, 0x3c
call fcn.140199dc0
movzx r8d, word [rbp - 0x80]
lea rax, [rbp + 0x250]
inc r13
cmp byte [rax + r13], 0
jne 0x1400099f3
lea rcx, [rbp + 0x250]
lea rdx, str.._3.3hu
add rcx, r13
call fcn.140197aa8
lea r9, str.Msg_Receive_recv_timed_out
lea r8, [rbp + 0x250]
lea rdx, str._n_s__s_n
mov rcx, rdi
call fcn.14019c35c
mov rcx, rdi
call fcn.14019c0f4
mov rcx, qword [0x14027d2e8]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [rsp + 0x30]
jmp 0x140009e19
xor r14d, r14d
xor ecx, ecx
call fcn.14019a0f4
cmp r15, rax
js 0x140009cbd
xor ecx, ecx
call fcn.14019a0f4
mov ecx, r15d
xor r9d, r9d
sub ecx, eax
mov eax, 1
lea rdx, [rbp - 0x70]
mov dword [rbp - 0x70], eax
lea rax, [rsp + 0x48]
mov dword [rsp + 0x48], ecx
lea ecx, [r9 + 0x40]
xor r8d, r8d
mov dword [rsp + 0x4c], r14d
mov qword [rsp + 0x20], rax
mov qword [rbp - 0x68], r12
call qword [sym.imp.WS2_32.dll_select]
mov esi, eax
cmp eax, 0xffffffff
jne 0x140009909
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
je 0x140009a51
jmp 0x140009922
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Msg_Receive_peek_recv_returns__d
mov r8d, eax
lea rcx, [rbp + 0x1b0]
call fcn.140197aa8
lea rcx, [rbp + 0x1b0]
call fcn.14000c2d0
jmp 0x140009e16
mov ecx, reloc.WS2_32.dll_ntohl
call qword [sym.imp.WS2_32.dll_WSASetLastError]
lea rcx, str.Msg_Receive_out_of_memory
call fcn.14000c2d0
jmp 0x140009e16
mov r8d, dword [rsp + 0x44]
lea rdx, str.Msg_Receive_nWaitSecs_timeout_exceeded__d
jmp 0x140009acd
test edi, edi
jle 0x140009e19
mov ecx, 0x274c
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, qword [0x14027d2e8]
or edx, 0xffffffff
mov dword [rsp + 0x30], r13d
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp byte [0x14027d1c0], 0
je 0x140009a38
call fcn.1400093c0
lea rcx, [0x140227eec]
lea rdx, [0x140227ef0]
test al, al
cmovne rdx, rcx
lea rcx, [0x14027d1c0]
call fcn.140197a78
mov rdi, rax
test rax, rax
je 0x140009a38
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, eax
call sub.KERNEL32.dll_GetCurrentProcessId
lea rdx, str.Process_ID:__d___Thread_ID:__ld
lea rcx, [rbp + 0x250]
mov r9d, ebx
mov r8d, eax
call fcn.140197aa8
lea rcx, [rsp + 0x68]
call fcn.14019d81c
lea rcx, [rsp + 0x68]
call fcn.14019d9b8
lea rdx, [rbp + 0x250]
mov rcx, r13
nop
inc rcx
cmp byte [rdx + rcx], 0
jne 0x140009bc0
lea rdx, [rbp + 0x250]
lea r8, str.__m__d__Y__H:_M:_S
mov r9, rax
add rcx, rdx
mov edx, 0x3c
call fcn.140199dc0
movzx r8d, word [rsp + 0x70]
lea rax, [rbp + 0x250]
inc r13
cmp byte [rax + r13], 0
jne 0x140009bf4
jmp 0x1400099fd
lea rcx, str.TrillNetIO::Msg_Receive::doloop::2_possible_corrupt_message
jmp 0x140009dfa
lea rdx, str._d_is_a_valid_trillium_message_with_possible_corruption__length_d
lea rcx, [rbp + 0x1b0]
mov r9d, ebx
mov r8d, r14d
call fcn.140197aa8
lea rcx, [rbp + 0x1b0]
jmp 0x140009dfa
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x78]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
jne 0x140009c91
movzx ecx, word [rsp + 0x7a]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [rsp + 0x7c]
movzx ebx, ax
call qword [sym.imp.WS2_32.dll_inet_ntoa]
lea rdx, str._d_is_not_a_valid_trillium_message__Message_length__d_IP_Address__s_Port__d
lea rcx, [rbp + 0x1b0]
mov r9d, edi
mov r8d, r14d
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rax
call fcn.140197aa8
lea rcx, [rbp + 0x1b0]
jmp 0x140009dfa
lea rdx, str._d_is_not_a_valid_trillium_message__Message_length__d
lea rcx, [rbp + 0x1b0]
mov r9d, edi
mov r8d, r14d
call fcn.140197aa8
lea rcx, [rbp + 0x1b0]
jmp 0x140009dfa
xor eax, eax
jmp 0x140009e19
mov r8d, dword [rsp + 0x44]
lea rdx, str.Msg_Receive_nWaitSecs_timeout_exceeded__d
lea rcx, [rbp + 0x1b0]
call fcn.140197aa8
mov rcx, qword [0x14027d2e8]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp byte [0x14027d1c0], r14b
je 0x140009de4
call fcn.1400093c0
lea rcx, [0x140227eec]
lea rdx, [0x140227ef0]
test al, al
cmovne rdx, rcx
lea rcx, [0x14027d1c0]
call fcn.140197a78
mov rdi, rax
test rax, rax
je 0x140009de4
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, eax
call sub.KERNEL32.dll_GetCurrentProcessId
lea rdx, str.Process_ID:__d___Thread_ID:__ld
lea rcx, [rbp + 0x250]
mov r9d, ebx
mov r8d, eax
call fcn.140197aa8
lea rcx, [rsp + 0x68]
call fcn.14019d81c
lea rcx, [rsp + 0x68]
call fcn.14019d9b8
lea rdx, [rbp + 0x250]
mov rcx, r13
inc rcx
cmp byte [rdx + rcx], r14b
jne 0x140009d67
lea rdx, [rbp + 0x250]
lea r8, str.__m__d__Y__H:_M:_S
mov r9, rax
add rcx, rdx
mov edx, 0x3c
call fcn.140199dc0
movzx r8d, word [rsp + 0x70]
lea rcx, [rbp + 0x250]
mov rax, r13
nop
inc rax
cmp byte [rcx + rax], r14b
jne 0x140009da0
lea rcx, [rbp + 0x250]
lea rdx, str.._3.3hu
add rcx, rax
call fcn.140197aa8
lea r9, [rbp + 0x1b0]
lea r8, [rbp + 0x250]
lea rdx, str._n_s__s_n
mov rcx, rdi
call fcn.14019c35c
mov rcx, rdi
call fcn.14019c0f4
mov rcx, qword [0x14027d2e8]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x140009e16
lea rcx, str.TrillNetIO::Msg_Receive::doloop::1_possible_corrupt_message
call fcn.14000c2d0
xor r9d, r9d
lea rdx, [rbp + 0x350]
lea r8d, [r9 + 0x64]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_recv]
mov eax, r13d
mov rcx, qword [rbp + 0x3c0]
xor rcx, rsp
call fcn.14019ac00
add rsp, 0x4d8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret