Function at 0x1401ba060
Capabilities:
Get local ipv4 addresses
Get socket information
Get socket status
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x1688
call fcn.1401d4c90
sub rsp, rax
mov qword [rsp + 0x1670], 0xfffffffffffffffe
mov rax, qword [0x1402a15c0]
xor rax, rsp
mov qword [rsp + 0x1678], rax
mov rax, qword [rsp + 0x16a8]
cmp dword [rax + 0x28], 0x68
jne 0x1401ba0b9
mov rcx, qword [rsp + 0x16a0]
call fcn.1401b8a90
xor eax, eax
jmp 0x1401ba9a0
mov edx, 0x68
mov rcx, qword [rsp + 0x16a0]
call fcn.1400e35f0
mov rax, qword [rsp + 0x16a0]
add rax, 0x314
mov ecx, 1
xchg dword [rax], ecx
lea rcx, [rsp + 0x38]
call fcn.140021960
nop
mov rax, qword [rsp + 0x16a8]
cmp dword [rax], 2
jne 0x1401ba86f
mov rax, qword [rsp + 0x16a0]
cmp dword [rax + 0x220], 0
je 0x1401ba86f
mov r8d, 0x45
lea rdx, [rsp + 0x38]
mov rcx, qword [rsp + 0x16a0]
call fcn.1401b81e0
mov dword [rsp + 0x280], eax
cmp dword [rsp + 0x280], 0
jne 0x1401ba147
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1401ba0eb
cmp dword [rsp + 0x280], 0xffffffff
jne 0x1401ba189
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, eax
lea rdx, str.TFTP_service_startup_error__d
mov ecx, 1
call fcn.1400dc610
mov r8d, 0x45
lea rdx, [0x140219160]
lea rcx, [0x1403ac8a0]
call fcn.1401bb910
jmp 0x1401ba86f
mov dword [rsp + 0x288], 1
mov dword [rsp + 0x28c], 0
mov dword [rsp + 0x70], 0
mov dword [rsp + 0x290], 0
mov dword [rsp + 0x4a0], 0
jmp 0x1401ba1d0
mov eax, dword [rsp + 0x4a0]
add eax, 1
mov dword [rsp + 0x4a0], eax
movsxd rdi, dword [rsp + 0x4a0]
lea rcx, [rsp + 0x38]
call fcn.14001db40
cmp rdi, rax
jae 0x1401ba33d
mov dword [rsp + 0x4a4], 0
jmp 0x1401ba209
mov eax, dword [rsp + 0x4a4]
add eax, 1
mov dword [rsp + 0x4a4], eax
mov eax, dword [rsp + 0x70]
cmp dword [rsp + 0x4a4], eax
jae 0x1401ba23d
mov edi, dword [rsp + 0x4a4]
movsxd rdx, dword [rsp + 0x4a0]
lea rcx, [rsp + 0x38]
call fcn.140007d10
mov rax, qword [rax]
cmp qword [rsp + rdi*8 + 0x78], rax
jne 0x1401ba23b
jmp 0x1401ba23d
jmp 0x1401ba1f8
mov eax, dword [rsp + 0x70]
cmp dword [rsp + 0x4a4], eax
jne 0x1401ba27d
cmp dword [rsp + 0x70], 0x40
jae 0x1401ba27d
movsxd rdx, dword [rsp + 0x4a0]
lea rcx, [rsp + 0x38]
call fcn.140007d10
mov ecx, dword [rsp + 0x4a4]
mov rax, qword [rax]
mov qword [rsp + rcx*8 + 0x78], rax
mov eax, dword [rsp + 0x70]
add eax, 1
mov dword [rsp + 0x70], eax
xor eax, eax
test eax, eax
jne 0x1401ba1eb
mov dword [rsp + 0x4a8], 0
jmp 0x1401ba2a5
mov eax, dword [rsp + 0x4a8]
add eax, 1
mov dword [rsp + 0x4a8], eax
mov eax, dword [rsp + 0x290]
cmp dword [rsp + 0x4a8], eax
jae 0x1401ba2df
mov edi, dword [rsp + 0x4a8]
movsxd rdx, dword [rsp + 0x4a0]
lea rcx, [rsp + 0x38]
call fcn.140007d10
mov rax, qword [rax]
cmp qword [rsp + rdi*8 + 0x298], rax
jne 0x1401ba2dd
jmp 0x1401ba2df
jmp 0x1401ba294
mov eax, dword [rsp + 0x290]
cmp dword [rsp + 0x4a8], eax
jne 0x1401ba32e
cmp dword [rsp + 0x290], 0x40
jae 0x1401ba32e
movsxd rdx, dword [rsp + 0x4a0]
lea rcx, [rsp + 0x38]
call fcn.140007d10
mov ecx, dword [rsp + 0x4a8]
mov rax, qword [rax]
mov qword [rsp + rcx*8 + 0x298], rax
mov eax, dword [rsp + 0x290]
add eax, 1
mov dword [rsp + 0x290], eax
xor eax, eax
test eax, eax
jne 0x1401ba287
jmp 0x1401ba1bf
lea rax, [rsp + 0x288]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x290]
xor r8d, r8d
lea rdx, [rsp + 0x70]
mov ecx, 0x40
call qword [sym.imp.WS2_32.dll_select]
mov dword [rsp + 0x280], eax
cmp dword [rsp + 0x280], 0
jne 0x1401ba37b
jmp 0x1401ba0eb
cmp dword [rsp + 0x280], 0
jge 0x1401ba38a
jmp 0x1401ba86f
mov rax, qword [rsp + 0x16a0]
cmp dword [rax + 0x220], 0
jne 0x1401ba3a0
jmp 0x1401ba86f
mov dword [rsp + 0x4ac], 0
jmp 0x1401ba3be
mov eax, dword [rsp + 0x4ac]
add eax, 1
mov dword [rsp + 0x4ac], eax
movsxd rdi, dword [rsp + 0x4ac]
lea rcx, [rsp + 0x38]
call fcn.14001db40
cmp rdi, rax
jae 0x1401ba86a
movsxd rdx, dword [rsp + 0x4ac]
lea rcx, [rsp + 0x38]
call fcn.140007d10
lea rdx, [rsp + 0x70]
mov rcx, qword [rax]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1401ba74e
mov dword [rsp + 0x14f0], 0x10
movsxd rdx, dword [rsp + 0x4ac]
lea rcx, [rsp + 0x38]
call fcn.140007d10
mov rcx, rax
lea rax, [rsp + 0x14f0]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x14f8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 0x1000
lea rdx, [rsp + 0x4d0]
mov rcx, qword [rcx]
call qword [sym.imp.WS2_32.dll_recvfrom]
mov dword [rsp + 0x4b0], eax
cmp dword [rsp + 0x4b0], 0
jge 0x1401ba55b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, eax
lea rdx, str._ERROR__TFTP_socket_error_in_recvfrom:__d
mov ecx, 1
call fcn.1400dc610
movsxd rdx, dword [rsp + 0x4ac]
lea rcx, [rsp + 0x38]
call fcn.140007d10
mov edx, 2
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_shutdown]
movsxd rdx, dword [rsp + 0x4ac]
lea rcx, [rsp + 0x38]
call fcn.140007d10
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_closesocket]
movsxd rdi, dword [rsp + 0x4ac]
lea rdx, [rsp + 0x1538]
lea rcx, [rsp + 0x38]
call fcn.14001e460
mov r8, rdi
lea rdx, [rsp + 0x1548]
mov rcx, rax
call fcn.14001e570
lea rdi, [rsp + 0x1660]
mov rsi, rax
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rdi, [rsp + 0x1528]
lea rsi, [rsp + 0x1660]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rdi, [rsp + 0x1600]
lea rsi, [rsp + 0x1528]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea r8, [rsp + 0x1600]
lea rdx, [rsp + 0x1558]
lea rcx, [rsp + 0x38]
call fcn.140021a90
mov eax, dword [rsp + 0x4ac]
sub eax, 1
mov dword [rsp + 0x4ac], eax
jmp 0x1401ba86a
cmp dword [rsp + 0x4b0], 0
jne 0x1401ba575
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1401ba3ad
mov ecx, dword [rsp + 0x14fc]
call fcn.1400d73c0
test eax, eax
je 0x1401ba5a3
movzx edi, word [rsp + 0x14fa]
mov cx, 0x45
call qword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
cmp edi, eax
jne 0x1401ba5a3
jmp 0x1401ba3ad
mov dword [rsp + 0x14f0], 0x10
movsxd rdx, dword [rsp + 0x4ac]
lea rcx, [rsp + 0x38]
call fcn.140007d10
lea r8, [rsp + 0x14f0]
lea rdx, [rsp + 0x4c0]
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1401ba6d3
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, eax
lea rdx, str._ERROR__TFTP_socket_error_in_getsockname:__d
mov ecx, 1
call fcn.1400dc610
movsxd rdx, dword [rsp + 0x4ac]
lea rcx, [rsp + 0x38]
call fcn.140007d10
mov edx, 2
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_shutdown]
movsxd rdx, dword [rsp + 0x4ac]
lea rcx, [rsp + 0x38]
call fcn.140007d10
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_closesocket]
movsxd rdi, dword [rsp + 0x4ac]
lea rdx, [rsp + 0x1578]
lea rcx, [rsp + 0x38]
call fcn.14001e460
mov r8, rdi
lea rdx, [rsp + 0x1588]
mov rcx, rax
call fcn.14001e570
lea rdi, [rsp + 0x1650]
mov rsi, rax
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rdi, [rsp + 0x1568]
lea rsi, [rsp + 0x1650]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rdi, [rsp + 0x1610]
lea rsi, [rsp + 0x1568]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea r8, [rsp + 0x1610]
lea rdx, [rsp + 0x1598]
lea rcx, [rsp + 0x38]
call fcn.140021a90
mov eax, dword [rsp + 0x4ac]
sub eax, 1
mov dword [rsp + 0x4ac], eax
jmp 0x1401ba86a
mov eax, dword [rsp + 0x4b0]
mov dword [rsp + 0x14d0], eax
lea rdi, [rsp + 0x14d4]
lea rsi, [rsp + 0x14f8]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rdi, [rsp + 0x1620]
lea rsi, [rsp + 0x14f8]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
movsxd rdx, dword [rsp + 0x4ac]
lea rcx, [rsp + 0x38]
call fcn.140007d10
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x1620]
mov r8d, dword [rsp + 0x4b0]
lea rdx, [rsp + 0x4d0]
mov rcx, qword [rsp + 0x16a0]
call fcn.1401b9bc0
movsxd rdx, dword [rsp + 0x4ac]
lea rcx, [rsp + 0x38]
call fcn.140007d10
lea rdx, [rsp + 0x290]
mov rcx, qword [rax]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1401ba865
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, eax
lea rdx, str._ERROR__TFTP_socket_error_in_erfdset:__d
mov ecx, 1
call fcn.1400dc610
movsxd rdx, dword [rsp + 0x4ac]
lea rcx, [rsp + 0x38]
call fcn.140007d10
mov edx, 2
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_shutdown]
movsxd rdx, dword [rsp + 0x4ac]
lea rcx, [rsp + 0x38]
call fcn.140007d10
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_closesocket]
movsxd rdi, dword [rsp + 0x4ac]
lea rdx, [rsp + 0x15b8]
lea rcx, [rsp + 0x38]
call fcn.14001e460
mov r8, rdi
lea rdx, [rsp + 0x15c8]
mov rcx, rax
call fcn.14001e570
lea rdi, [rsp + 0x1640]
mov rsi, rax
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rdi, [rsp + 0x15a8]
lea rsi, [rsp + 0x1640]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rdi, [rsp + 0x1630]
lea rsi, [rsp + 0x15a8]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea r8, [rsp + 0x1630]
lea rdx, [rsp + 0x15d8]
lea rcx, [rsp + 0x38]
call fcn.140021a90
mov eax, dword [rsp + 0x4ac]
sub eax, 1
mov dword [rsp + 0x4ac], eax
jmp 0x1401ba3ad
jmp 0x1401ba0eb
mov dword [rsp + 0x1508], 0
jmp 0x1401ba88d
mov eax, dword [rsp + 0x1508]
add eax, 1
mov dword [rsp + 0x1508], eax
movsxd rdi, dword [rsp + 0x1508]
lea rcx, [rsp + 0x38]
call fcn.14001db40
cmp rdi, rax
jae 0x1401ba8e1
movsxd rdx, dword [rsp + 0x1508]
lea rcx, [rsp + 0x38]
call fcn.140007d10
mov edx, 2
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_shutdown]
movsxd rdx, dword [rsp + 0x1508]
lea rcx, [rsp + 0x38]
call fcn.140007d10
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x1401ba87c
lea rcx, [rsp + 0x38]
call fcn.14001de20
mov rcx, qword [rsp + 0x16a0]
add rcx, 0x268
call fcn.14001e850
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x1401ba970
lea rcx, [rsp + 0x1520]
call fcn.140002db0
nop
mov rcx, qword [rsp + 0x16a0]
add rcx, 0x268
lea r9, [rsp + 0x1510]
lea r8, [rsp + 0x1520]
lea rdx, [rsp + 0x30]
call fcn.140026740
mov rax, qword [rsp + 0x1518]
mov qword [rsp + 0x15e8], rax
mov rcx, qword [rsp + 0x15e8]
call fcn.140071aa8
nop
lea rcx, [rsp + 0x1520]
call fcn.140001490
jmp 0x1401ba904
mov rcx, qword [rsp + 0x16a0]
add rcx, 0x268
call fcn.140026660
mov dword [rsp + 0x15f0], 0
lea rcx, [rsp + 0x38]
call fcn.140007ce0
mov eax, dword [rsp + 0x15f0]
mov rcx, qword [rsp + 0x1678]
xor rcx, rsp
call fcn.1400a8050
add rsp, 0x1688
pop rdi
pop rsi
ret