Function at 0x1005b270
Capabilities:
Send data
Send data on socket

Disassembly:
sub rsp, 0x38
sub edx, 3
mov rax, qword [rcx + 0x10]
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], rdi
mov rdi, qword [rax]
mov rbx, rcx
je 0x1005b463
sub edx, 2
je 0x1005b407
sub edx, 1
je 0x1005b38f
cmp edx, 1
je 0x1005b2dc
lea r8, str.tftp_rx:_internal_error
lea rdx, [0x1008d828]
mov rcx, rdi
call fcn.1004b840
mov eax, 0x47
mov rdi, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x48]
add rsp, 0x38
ret
mov ax, word [rcx + 0x48]
add dword [rcx + 0x20], 1
mov r9d, dword [rcx + 0x20]
add eax, 1
lea rdx, str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
mov rcx, rdi
movzx r8d, ax
call fcn.1004b790
mov r11d, dword [rbx + 0x28]
cmp dword [rbx + 0x20], r11d
jle 0x1005b31d
mov r8d, 3
mov dword [rbx + 8], 0xffffff9d
mov dword [rbx], r8d
jmp 0x1005b542
mov eax, dword [rbx + 0x150]
mov rdx, qword [rbx + 0x170]
lea rcx, [rbx + 0xd0]
xor r9d, r9d
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov rcx, qword [rbx + 0x18]
lea r8d, [r9 + 4]
call qword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x1005b542
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rbx + 0x10]
mov edx, eax
call fcn.10076e10
lea rdx, [0x1008d828]
mov rcx, rdi
mov r8, rax
call fcn.1004b840
mov eax, reloc.WS2_32.dll_getservbyname
mov rdi, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x48]
add rsp, 0x38
ret
mov word [rcx + 0x48], 0
mov dword [rcx + 0x20], 0
add rcx, 0x170
mov dx, 4
call fcn.1005ae00
movzx edx, word [rbx + 0x48]
lea rcx, [rbx + 0x170]
call fcn.1005ae20
mov eax, dword [rbx + 0x150]
mov rdx, qword [rbx + 0x170]
lea rcx, [rbx + 0xd0]
xor r9d, r9d
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov rcx, qword [rbx + 0x18]
lea r8d, [r9 + 4]
call qword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x1005b353
mov edx, 1
lea rcx, [rbx + 0x40]
mov dword [rbx], edx
call fcn.10082520
jmp 0x1005b542
mov dx, 5
add rcx, 0x170
call fcn.1005ae00
movzx edx, word [rbx + 0x48]
lea rcx, [rbx + 0x170]
call fcn.1005ae20
mov eax, dword [rbx + 0x150]
mov rdx, qword [rbx + 0x170]
lea rcx, [rbx + 0xd0]
xor r9d, r9d
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov rcx, qword [rbx + 0x18]
lea r8d, [r9 + 4]
call qword [sym.imp.WS2_32.dll_sendto]
mov r8d, 3
mov dword [rbx], r8d
jmp 0x1005b542
add rcx, 0x168
call fcn.1005ae50
movzx ecx, word [rbx + 0x48]
movzx esi, ax
lea eax, [rcx + 1]
movzx r9d, ax
cmp r9d, esi
jne 0x1005b48b
mov dword [rbx + 0x20], 0
jmp 0x1005b4a5
cmp ecx, esi
jne 0x1005b530
lea rdx, str.Received_last_DATA_packet_block__d_again._n
mov r8d, esi
mov rcx, rdi
call fcn.1004b790
lea rcx, [rbx + 0x170]
mov dx, 4
mov word [rbx + 0x48], si
call fcn.1005ae00
movzx edx, word [rbx + 0x48]
lea rcx, [rbx + 0x170]
call fcn.1005ae20
mov eax, dword [rbx + 0x150]
mov rdx, qword [rbx + 0x170]
lea rcx, [rbx + 0xd0]
xor r9d, r9d
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov rcx, qword [rbx + 0x18]
lea r8d, [r9 + 4]
call qword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x1005b353
movsxd rcx, dword [rbx + 0x15c]
movsxd rax, dword [rbx + 0x154]
mov edx, 1
add rcx, 4
mov r8d, 3
cmp rax, rcx
lea rcx, [rbx + 0x40]
cmovl edx, r8d
mov dword [rbx], edx
call fcn.10082520
jmp 0x1005b542
lea rdx, str.Received_unexpected_DATA_packet_block__d__expecting_block__d_n
mov r8d, esi
mov rcx, rdi
call fcn.1004b790
mov rdi, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x48]
xor eax, eax
add rsp, 0x38
ret