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

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x140
mov rbp, qword [rcx + 0x10]
mov rbx, rcx
cmp edx, 6
je 0x140071890
jg 0x140071748
cmp edx, 4
je 0x1400717e0
cmp edx, 5
jne 0x1400717c0
mov rax, qword [rcx + 0x158]
mov dword [rcx], 3
xor r9d, r9d
mov r8d, 4
mov byte [rax], 0
mov rax, qword [rcx + 0x158]
mov byte [rax + 1], 5
movzx eax, word [rcx + 0x14c]
mov rdx, qword [rcx + 0x158]
mov byte [rdx + 2], ah
mov rdx, qword [rcx + 0x158]
mov byte [rdx + 3], al
mov eax, dword [rbx + 0x138]
mov rdx, qword [rcx + 0x158]
mov rcx, qword [rcx + 0x18]
mov dword [rsp + 0x28], eax
lea rax, [rbx + 0xb8]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_sendto]
mov dword [rbx], 3
xor eax, eax
add rsp, 0x140
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp edx, 7
jne 0x1400717c0
mov eax, dword [rcx + 0x20]
lea r9d, [rax + 1]
mov dword [rcx + 0x20], r9d
test rbp, rbp
je 0x14007179c
test byte [rbp + 0xa37], 0x10
je 0x14007179c
mov rax, qword [rbp + 0x11e8]
test rax, rax
je 0x140071779
mov eax, dword [rax + 8]
test eax, eax
jle 0x14007179c
movzx r8d, word [rbx + 0x14c]
lea rdx, str.Timeout_waiting_for_block__d_ACK.__Retries___d
mov rcx, rbp
add r8d, 1
movzx r8d, r8w
call sym.Curl_infof
mov r9d, dword [rbx + 0x20]
cmp dword [rbx + 0x28], r9d
jge 0x140071830
mov dword [rbx + 8], 0xffffff9d
mov dword [rbx], 3
xor eax, eax
jmp 0x140071733
mov r8d, edx
mov rcx, rbp
lea rdx, str.tftp_tx:_internal_error__event:__i
call sym.Curl_failf
xor eax, eax
jmp 0x140071733
mov rax, qword [rcx + 0x150]
movzx r9d, word [rcx + 0x14c]
movzx eax, word [rax + 2]
rol ax, 8
movzx r8d, ax
cmp r9w, ax
je 0x140071818
test r9w, r9w
jne 0x1400719c8
cmp r8d, 0xffff
jne 0x1400719c8
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__time64]
mov qword [rbx + 0x30], rax
movzx eax, word [rbx + 0x14c]
add eax, 1
jmp 0x140071895
mov eax, dword [rbx + 0x140]
mov r8d, dword [rbx + 0x138]
xor r9d, r9d
add rbx, 0xb8
mov rdx, qword [rbx + 0xa0]
mov rcx, qword [rbx - 0xa0]
mov qword [rsp + 0x20], rbx
mov dword [rsp + 0x28], r8d
lea r8d, [rax + 4]
call qword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x140071a78
mov rdx, qword [rbp + 0x108]
mov rcx, rbp
call sym.Curl_pgrsSetUploadCounter
xor eax, eax
jmp 0x140071733
mov eax, 1
mov word [rbx + 0x14c], ax
mov rax, qword [rbx + 0x158]
mov dword [rbx + 0x20], 0
mov byte [rax], 0
mov rax, qword [rbx + 0x158]
mov byte [rax + 1], 3
mov rdx, qword [rbx + 0x158]
movzx eax, word [rbx + 0x14c]
mov byte [rdx + 2], ah
mov rdx, qword [rbx + 0x158]
mov byte [rdx + 3], al
cmp word [rbx + 0x14c], 1
mov r8d, dword [rbx + 0x144]
jbe 0x1400718f1
cmp dword [rbx + 0x140], r8d
jl 0x1400717ad
mov rax, qword [rbx + 0x158]
lea rdi, [rsp + 0x38]
lea rsi, [rsp + 0x37]
mov dword [rbx + 0x140], 0
lea r12, [rax + 4]
xor eax, eax
jmp 0x14007193f
mov rdx, qword [rsp + 0x38]
mov eax, dword [rbx + 0x140]
mov r8d, dword [rbx + 0x144]
add eax, edx
add r12, rdx
mov dword [rbx + 0x140], eax
cmp eax, r8d
jge 0x140071968
test rdx, rdx
je 0x140071968
mov qword [rsp + 0x20], rsi
sub r8d, eax
mov r9, rdi
mov rdx, r12
movsxd r8, r8d
mov rcx, rbp
call sym.Curl_client_read
test eax, eax
je 0x140071918
jmp 0x140071733
mov r8d, dword [rbx + 0x138]
mov rdx, qword [rbx + 0x158]
xor r9d, r9d
mov rcx, qword [rbx + 0x18]
mov dword [rsp + 0x28], r8d
lea r8, [rbx + 0xb8]
mov qword [rsp + 0x20], r8
lea r8d, [rax + 4]
call qword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x140071a78
movsxd rdx, dword [rbx + 0x140]
add rdx, qword [rbp + 0x108]
mov rcx, rbp
mov qword [rbp + 0x108], rdx
call sym.Curl_pgrsSetUploadCounter
xor eax, eax
jmp 0x140071733
test rbp, rbp
je 0x1400719f8
test byte [rbp + 0xa37], 0x10
je 0x1400719f8
mov rax, qword [rbp + 0x11e8]
test rax, rax
je 0x1400719e9
mov edx, dword [rax + 8]
test edx, edx
jle 0x1400719f8
lea rdx, str.Received_ACK_for_block__d__expecting__d
mov rcx, rbp
call sym.Curl_infof
mov eax, dword [rbx + 0x20]
add eax, 1
mov dword [rbx + 0x20], eax
cmp eax, dword [rbx + 0x28]
jle 0x140071a30
movzx r8d, word [rbx + 0x14c]
lea rdx, str.tftp_tx:_giving_up_waiting_for_block__d_ack
mov rcx, rbp
call sym.Curl_failf
mov eax, 0x37
jmp 0x140071733
mov eax, dword [rbx + 0x140]
mov r8d, dword [rbx + 0x138]
xor r9d, r9d
add rbx, 0xb8
mov rdx, qword [rbx + 0xa0]
mov rcx, qword [rbx - 0xa0]
mov qword [rsp + 0x20], rbx
mov dword [rsp + 0x28], r8d
lea r8d, [rax + 4]
call qword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x140071731
nop dword [rax]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0x40]
mov r8d, 0x100
mov ecx, eax
call sym.Curl_strerror
lea rdx, [0x14010c425]
mov rcx, rbp
mov r8, rax
call sym.Curl_failf
jmp 0x140071a1d