Function at 0x140007900
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbp
push rsi
push rdi
push r13
lea rbp, [rsp - 0x2418]
mov eax, 0x2518
call fcn.1400455d0
sub rsp, rax
mov rax, qword [0x14005b040]
xor rax, rsp
mov qword [rbp + 0x2400], rax
mov r13, rcx
mov qword [rsp + 0x50], rcx
mov rcx, qword [rcx + 0x2058]
lea r8, str.TimeoutDefault
xor edi, edi
mov byte [rsp + 0x58], 0
mov r9d, 0x1e
mov dword [rsp + 0x64], edi
lea rdx, str.Settings
call fcn.140019450
mov rcx, qword [r13 + 0x2050]
mov esi, eax
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x60], eax
test rcx, rcx
je 0x140007987
mov rcx, qword [rcx + 0x720]
test rcx, rcx
je 0x140007987
mov rax, qword [rcx]
call qword [rax + 0x18]
cmp dword [r13 + 0x2068], edi
je 0x140008416
mov qword [rsp + 0x2548], rbx
mov qword [rsp + 0x2550], r12
mov qword [rsp + 0x2558], r14
mov qword [rsp + 0x2510], r15
xor ecx, ecx
mov dword [rbp + 0x1d0], edi
mov ebx, 2
mov dword [rbp - 0x40], edi
call fcn.14002db90
mov r15, rax
mov qword [rsp + 0x48], rax
mov eax, dword [r13 + 0x2000]
mov r12d, edi
test eax, eax
jle 0x140007b08
mov r14, r13
nop word [rax + rax]
mov edx, dword [rbp + 0x1d0]
mov ecx, edi
test edx, edx
je 0x140007a16
mov rax, qword [r14]
mov r8, qword [rax + 0x558]
cmp qword [rbp + rcx*8 + 0x1d8], r8
je 0x140007a16
inc ecx
cmp ecx, edx
jb 0x140007a06
cmp ecx, edx
jne 0x140007a37
cmp edx, 0x40
jae 0x140007a37
mov rax, qword [r14]
mov rax, qword [rax + 0x558]
mov qword [rbp + rcx*8 + 0x1d8], rax
inc dword [rbp + 0x1d0]
mov rbx, qword [r14]
cmp dword [rbx + 0x20], 0
jle 0x140007a75
mov edx, dword [rbp - 0x40]
mov ecx, edi
test edx, edx
je 0x140007a5d
mov r8, qword [rbx + 0x558]
cmp qword [rbp + rcx*8 - 0x38], r8
je 0x140007a5d
inc ecx
cmp ecx, edx
jb 0x140007a50
cmp ecx, edx
jne 0x140007a75
cmp edx, 0x40
jae 0x140007a75
mov rax, qword [rbx + 0x558]
mov qword [rbp + rcx*8 - 0x38], rax
inc dword [rbp - 0x40]
add rbx, 0x5b0
mov esi, 0x80
xor r13d, r13d
mov rdi, qword [rbx]
test rdi, rdi
je 0x140007ad6
test r15, r15
je 0x140007ab6
mov rdx, qword [rdi + 0x20]
mov rcx, r15
call fcn.14002cc00
mov eax, dword [rdi + 0x28]
cvttsd2si ecx, xmm0
cmp ecx, eax
jg 0x140007ab6
sub eax, ecx
cmp eax, dword [rsp + 0x60]
jge 0x140007ad6
mov dword [rsp + 0x60], eax
jmp 0x140007ad6
mov rdi, qword [rbx]
test rdi, rdi
je 0x140007ad3
mov rcx, qword [rdi]
call fcn.1400272e4
mov edx, 0x30
mov rcx, rdi
call fcn.14002116c
mov qword [rbx], r13
add rbx, 8
sub rsi, 1
jne 0x140007a84
mov r13, qword [rsp + 0x50]
inc r12d
add r14, 8
mov rdi, rsi
mov eax, dword [r13 + 0x2000]
cmp r12d, eax
jl 0x1400079f0
mov esi, dword [rsp + 0x40]
mov ebx, 2
mov ecx, dword [rsp + 0x60]
test ecx, ecx
je 0x14000826f
test eax, eax
jne 0x140007b38
imul edx, ecx, 0x3e8
mov rcx, qword [r13 + 0x2060]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, 0x102
sub ecx, eax
neg ecx
sbb eax, eax
jmp 0x140007b58
lea rax, [rsp + 0x60]
xor r9d, r9d
lea r8, [rbp - 0x40]
mov qword [rsp + 0x20], rax
lea rdx, [rbp + 0x1d0]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x140008412
test eax, eax
je 0x14000826f
cmp dword [r13 + 0x2000], 0
mov r12d, edi
jle 0x1400083c3
mov rdi, r13
nop dword [rax]
mov rcx, qword [rdi]
lea rdx, [rbp - 0x40]
mov rcx, qword [rcx + 0x558]
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x140007c33
mov rcx, qword [r13 + 0x2058]
lea rdx, str.Connection__d:_sending_top_queue_packet_r_n
mov r8d, r12d
call fcn.140019c40
mov rdx, qword [rdi]
add rdx, 0x18
mov r8d, dword [rdx + 8]
movsxd rcx, dword [rdx + 0xc]
test r8d, r8d
jle 0x140007c33
lea eax, [rcx + 1]
and eax, 0x8000000f
jge 0x140007bd7
dec eax
or eax, 0xfffffff0
inc eax
mov dword [rdx + 0xc], eax
lea rcx, [rcx + rcx*4]
lea eax, [r8 - 1]
mov dword [rdx + 8], eax
lea rdx, [rdx + rcx*8]
add rdx, 0x10
je 0x140007c33
movzx eax, word [rdx + 0x14]
mov r9d, dword [rdx + 0x18]
mov r8d, dword [rdx + 0xc]
mov rcx, qword [rdi]
mov word [rsp + 0x28], ax
mov eax, dword [rdx + 0x10]
mov rdx, qword [rdx]
mov dword [rsp + 0x20], eax
call fcn.140005720
cmp eax, 0xffffffff
jne 0x140007c33
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [r13 + 0x2058]
lea rdx, str.sendto_returns_with_error__d_r_n
mov r8d, eax
call fcn.140019c40
mov rcx, qword [rdi]
lea rdx, [rbp + 0x1d0]
mov rcx, qword [rcx + 0x558]
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x140007fe1
mov rcx, qword [rdi]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rdx, [rbp + 0x13f0]
lea rax, [rbp - 0x80]
mov dword [rsp + 0x68], reloc.WS2_32.dll_recv
xor r9d, r9d
mov qword [rsp + 0x20], rax
mov rcx, qword [rcx + 0x558]
mov r8d, 0x1000
call qword [sym.imp.WS2_32.dll_recvfrom]
movsxd rsi, eax
cmp esi, 0xffffffff
jne 0x140007cb6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [r13 + 0x2058]
lea rdx, str.recvfrom_returns_with_error__d_r_n
mov r8d, eax
call fcn.140019c40
jmp 0x140007fdd
mov r14, qword [rdi]
mov eax, dword [r14 + 0x10]
cmp eax, 2
jne 0x140007ded
mov r14d, dword [rbp - 0x7c]
lea r8, [0x14005e860]
xorps xmm0, xmm0
lea rdx, [rsp + 0x74]
movups xmmword [rsp + 0x70], xmm0
mov r9d, 0x20
mov dword [rsp + 0x74], r14d
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_inet_ntop]
mov rcx, qword [r13 + 0x2058]
lea rdx, str.Adapter__d_has_recognized_an_incoming_DNS_request_from__s_r_n
mov r9, rax
mov r8d, r12d
call fcn.140019c40
mov r8d, 0x1001
lea rcx, [rbp + 0x13f0]
sub r8, rsi
add rcx, rsi
mov edx, 0xff
call fcn.140045990
xor edx, edx
lea rcx, [rbp + 0x3e0]
mov r8d, 0x1000
call fcn.140045990
movzx ebx, word [rbp - 0x7e]
lea rax, [rbp + 0x3e0]
mov word [rsp + 0x38], bx
lea r8, [rbp + 0x13f0]
mov dword [rsp + 0x30], r14d
mov r9d, esi
mov edx, r12d
mov qword [rsp + 0x20], rax
mov rcx, r13
call fcn.14000e630
mov r8d, eax
test eax, eax
jle 0x140007fdd
mov rcx, qword [rdi]
mov eax, 2
mov word [rbp - 0x70], ax
mov dword [rbp - 0x6c], r14d
test bx, bx
je 0x140007d90
mov word [rbp - 0x6e], bx
jmp 0x140007d9b
movzx eax, word [rcx + 0x582]
mov word [rbp - 0x6e], ax
lea rax, [rbp - 0x70]
mov rcx, qword [rcx + 0x558]
lea rdx, [rbp + 0x3e0]
mov dword [rsp + 0x28], reloc.WS2_32.dll_recv
xor r9d, r9d
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
jne 0x140007fdd
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [r13 + 0x2058]
lea rdx, str.sendto_returns_with_error__d_r_n
mov r8d, eax
call fcn.140019c40
jmp 0x140007fdd
cmp eax, 5
jne 0x140007eb8
mov ebx, dword [rbp - 0x7c]
lea r8, [0x14005e860]
xorps xmm0, xmm0
lea rdx, [rsp + 0x74]
movups xmmword [rsp + 0x70], xmm0
mov r14d, 2
mov dword [rsp + 0x74], ebx
mov ecx, r14d
mov r9d, 0x20
call qword [sym.imp.WS2_32.dll_inet_ntop]
mov rcx, qword [r13 + 0x2058]
lea rdx, str.Adapter__d_has_recognized_an_incoming_DNS_response_from__s_r_n
mov r9, rax
mov r8d, r12d
call fcn.140019c40
mov r8d, 0x1001
lea rcx, [rbp + 0x13f0]
sub r8, rsi
add rcx, rsi
mov edx, 0xff
call fcn.140045990
xor edx, edx
lea rcx, [rbp + 0x3e0]
mov r8d, 0x1000
call fcn.140045990
mov r9d, esi
lea r8, [rbp + 0x13f0]
mov edx, r12d
mov rcx, r13
call fcn.14000e470
mov r8d, eax
test eax, eax
jle 0x140007fdd
movzx eax, word [rbp - 0x7e]
mov rcx, qword [rdi]
mov word [rbp - 0x60], r14w
mov dword [rbp - 0x5c], ebx
test ax, ax
jne 0x140007eab
movzx eax, word [rcx + 0x582]
mov word [rbp - 0x5e], ax
lea rax, [rbp - 0x60]
jmp 0x140007d9f
cmp eax, 3
jne 0x140008001
mov r15d, dword [rbp - 0x7c]
lea r8, [0x14005e860]
xorps xmm0, xmm0
lea rdx, [rsp + 0x74]
movups xmmword [rsp + 0x70], xmm0
mov r9d, 0x20
mov dword [rsp + 0x74], r15d
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_inet_ntop]
mov rcx, qword [r13 + 0x2058]
lea rdx, str.Adapter__d_has_recognized_an_incoming_TFTP_request_from__s_r_n
mov r9, rax
mov r8d, r12d
call fcn.140019c40
mov r8d, 0x1001
lea rcx, [rbp + 0x13f0]
sub r8, rsi
add rcx, rsi
mov edx, 0xff
call fcn.140045990
xor edx, edx
lea rcx, [rbp + 0x3e0]
mov r8d, 0x1000
call fcn.140045990
movzx ebx, word [rbp - 0x7e]
lea rax, [rbp + 0x3e0]
mov word [rsp + 0x38], bx
lea r8, [rbp + 0x13f0]
mov dword [rsp + 0x30], r15d
mov r9d, esi
mov rcx, r14
mov qword [rsp + 0x20], rax
call fcn.14001dd00
mov r8d, eax
test eax, eax
jle 0x140007fd8
mov rcx, qword [rdi]
mov eax, 2
mov word [rbp - 0x50], ax
mov dword [rbp - 0x4c], r15d
test bx, bx
je 0x140007f84
mov word [rbp - 0x4e], bx
jmp 0x140007f8f
movzx eax, word [rcx + 0x582]
mov word [rbp - 0x4e], ax
mov rcx, qword [rcx + 0x558]
lea rax, [rbp - 0x50]
mov dword [rsp + 0x28], reloc.WS2_32.dll_recv
lea rdx, [rbp + 0x3e0]
xor r9d, r9d
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
jne 0x140007fd8
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [r13 + 0x2058]
lea rdx, str.sendto_returns_with_error__d_r_n
mov r8d, eax
call fcn.140019c40
mov r15, qword [rsp + 0x48]
mov esi, dword [rsp + 0x40]
inc r12d
add rdi, 8
mov ebx, 2
cmp r12d, dword [r13 + 0x2000]
jl 0x140007b80
xor edi, edi
jmp 0x1400083c3
cmp eax, 4
jne 0x1400080dc
mov ebx, dword [rbp - 0x7c]
lea r8, [0x14005e860]
xorps xmm0, xmm0
lea rdx, [rsp + 0x74]
movups xmmword [rsp + 0x70], xmm0
mov r9d, 0x20
mov dword [rsp + 0x74], ebx
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_ntop]
mov rcx, qword [r13 + 0x2058]
lea rdx, str.Adapter__d_has_recognized_an_incoming_request_for_a_relayed_connection_from__s_r_n
mov r9, rax
mov r8d, r12d
call fcn.140019c40
movzx eax, word [rbp - 0x7e]
lea rdx, [rbp + 0x13f0]
mov word [rsp + 0x28], ax
mov r9d, r12d
mov r8d, esi
mov dword [rsp + 0x20], ebx
mov rcx, r13
call fcn.14000c750
xor ecx, ecx
call fcn.14002db90
mov ecx, r15d
sub ecx, eax
add ecx, dword [rsp + 0x60]
jns 0x140008089
xor ebx, ebx
mov ecx, ebx
jmp 0x14000809b
xor ecx, ecx
call fcn.14002db90
mov ecx, r15d
sub ecx, eax
add ecx, dword [rsp + 0x60]
xor ebx, ebx
mov esi, dword [rsp + 0x40]
cmp esi, ecx
jge 0x1400080ac
mov dword [rsp + 0x60], esi
jmp 0x140007fe1
xor ecx, ecx
call fcn.14002db90
mov ecx, r15d
sub ecx, eax
add ecx, dword [rsp + 0x60]
jns 0x1400080c7
mov dword [rsp + 0x60], ebx
jmp 0x140007fe1
xor ecx, ecx
call fcn.14002db90
mov ecx, r15d
sub ecx, eax
add dword [rsp + 0x60], ecx
jmp 0x140007fe1
xor ecx, ecx
call fcn.14002db90
mov ebx, dword [rbp - 0x7c]
lea r8, [0x14005e860]
xorps xmm0, xmm0
lea rdx, [rsp + 0x74]
movups xmmword [rsp + 0x70], xmm0
mov r9d, 0x20
mov dword [rsp + 0x74], ebx
mov ecx, 2
mov r14, rax
call qword [sym.imp.WS2_32.dll_inet_ntop]
mov rcx, qword [r13 + 0x2058]
lea rdx, str.Adapter__d_has_recognized_an_incoming_DHCP_request_from__s_r_n
mov r9, rax
mov r8d, r12d
call fcn.140019c40
mov ecx, dword [rsp + 0x40]
xor r8d, r8d
mov edx, r15d
mov eax, r8d
sub edx, r14d
add edx, dword [rsp + 0x60]
cmovns eax, edx
cmp ecx, eax
jge 0x14000814c
mov dword [rsp + 0x60], ecx
jmp 0x140008156
test edx, edx
cmovs edx, r8d
mov dword [rsp + 0x60], edx
mov r8d, 0x1001
lea rcx, [rbp + 0x13f0]
sub r8, rsi
add rcx, rsi
mov edx, 0xff
call fcn.140045990
xor edx, edx
lea rcx, [rbp + 0x3e0]
mov r8d, 0x1000
call fcn.140045990
mov rcx, qword [rdi]
lea rdx, [rbp + 0x13f0]
movzx eax, word [rbp - 0x7e]
add rcx, 0x2a8
mov qword [rsp + 0x30], r14
mov r8d, esi
mov word [rsp + 0x28], ax
mov dword [rsp + 0x20], ebx
call fcn.14001b360
mov rax, qword [rdi]
mov ecx, dword [rax + 0x564]
call qword [sym.imp.WS2_32.dll_ntohl]
lea rcx, [rsp + 0x58]
mov r9d, esi
mov qword [rsp + 0x38], rcx
lea r8, [rbp + 0x13f0]
mov dword [rsp + 0x30], eax
mov edx, r12d
lea rax, [rbp + 0x3e0]
mov dword [rsp + 0x28], 0x1000
mov rcx, r13
mov qword [rsp + 0x20], rax
call fcn.140008c10
mov esi, eax
test eax, eax
jle 0x140008257
mov rcx, qword [rdi]
lea rdx, [rbp + 0x3e0]
xor eax, eax
mov qword [rsp + 0x30], r14
mov word [rsp + 0x28], ax
add rcx, 0x2a8
mov r8d, esi
mov dword [rsp + 0x20], ebx
call fcn.14001b360
movzx eax, byte [rsp + 0x58]
lea r8, [rbp + 0x3e0]
mov dword [rsp + 0x30], r12d
lea rdx, [rbp + 0x13f0]
mov dword [rsp + 0x28], ebx
mov r9d, esi
mov rcx, r13
mov byte [rsp + 0x20], al
call fcn.140008890
jmp 0x140007fdd
mov rcx, qword [r13 + 0x2058]
lea rdx, str.DHCP_Request_ignored_r_n
call fcn.140019c40
jmp 0x140007fdd
mov rbx, qword [r13 + 0x2058]
mov edx, 0xffffffff
mov rcx, qword [rbx + 0x598]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0x588]
test rcx, rcx
je 0x14000829e
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov rcx, qword [rbx + 0x590]
mov qword [rbx + 0x588], rdi
test rcx, rcx
je 0x1400082bb
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov rcx, qword [rbx + 0x598]
mov qword [rbx + 0x590], rdi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rax, qword [r13 + 0x2050]
mov edx, 0xffffffff
mov rbx, qword [rax + 0x6d8]
mov rcx, qword [rbx + 0x598]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0x588]
test rcx, rcx
je 0x140008305
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov rcx, qword [rbx + 0x590]
mov qword [rbx + 0x588], rdi
test rcx, rcx
je 0x140008322
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov rcx, qword [rbx + 0x598]
mov qword [rbx + 0x590], rdi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, qword [r13 + 0x2058]
lea r8, str.DeleteOnRelease
mov r9d, 1
lea rdx, str.Settings
call fcn.140019450
test eax, eax
je 0x14000839f
mov eax, dword [rsp + 0x60]
lea r8, [rsp + 0x68]
mov edx, esi
mov dword [rsp + 0x68], eax
mov rcx, r13
call fcn.14000bac0
mov rcx, qword [r13 + 0x2058]
lea r8, str.ExpiredLeaseTimeout
mov r9d, 0x418937
lea rdx, str.Settings
call fcn.140019450
mov ecx, dword [rsp + 0x68]
cmp eax, ecx
jb 0x14000839f
mov dword [rsp + 0x60], ecx
jmp 0x1400083c3
mov rcx, qword [r13 + 0x2058]
lea r8, str.ExpiredLeaseTimeout
mov r9d, 0x418937
lea rdx, str.Settings
call fcn.140019450
mov dword [rsp + 0x60], eax
cmp dword [r13 + 0x2068], 0
jne 0x1400079b4
mov eax, 1
mov r14, qword [rsp + 0x2558]
mov r12, qword [rsp + 0x2550]
mov rbx, qword [rsp + 0x2548]
mov r15, qword [rsp + 0x2510]
mov rcx, qword [rbp + 0x2400]
xor rcx, rsp
call fcn.140020e70
add rsp, 0x2518
pop r13
pop rdi
pop rsi
pop rbp
ret
mov eax, edi
jmp 0x1400083d6
mov eax, 1
jmp 0x1400083f6