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

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x148
mov r13, qword [rcx + 0x10]
mov rbx, rcx
cmp edx, 6
je 0x140077870
jg 0x140077780
cmp edx, 4
je 0x1400779b0
cmp edx, 5
jne 0x1400777f0
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 ecx, eax
shr cx, 8
mov byte [rdx + 2], cl
mov rdx, qword [rbx + 0x158]
mov byte [rdx + 3], al
mov eax, dword [rbx + 0x138]
mov rdx, qword [rbx + 0x158]
mov rcx, qword [rbx + 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 r12d, r12d
mov eax, r12d
add rsp, 0x148
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
cmp edx, 7
jne 0x1400777f0
mov eax, dword [rcx + 0x20]
lea r9d, [rax + 1]
mov dword [rcx + 0x20], r9d
test r13, r13
je 0x1400777d5
test byte [r13 + 0xa47], 0x10
je 0x1400777d5
mov rax, qword [r13 + 0x1270]
test rax, rax
je 0x1400777b2
mov eax, dword [rax + 8]
test eax, eax
jle 0x1400777d5
movzx r8d, word [rbx + 0x14c]
lea rdx, str.Timeout_waiting_for_block__d_ACK.__Retries___d
mov rcx, r13
add r8d, 1
movzx r8d, r8w
call sym.Curl_infof
mov r9d, dword [rbx + 0x20]
cmp dword [rbx + 0x28], r9d
jge 0x140077810
mov dword [rbx + 8], 0xffffff9d
xor r12d, r12d
mov dword [rbx], 3
jmp 0x14007776c
mov r8d, edx
mov rcx, r13
lea rdx, str.tftp_tx:_internal_error__event:__i
xor r12d, r12d
call sym.Curl_failf
jmp 0x14007776c
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 0x140077ab0
mov rdx, qword [r13 + 0x118]
mov rcx, r13
xor r12d, r12d
call sym.Curl_pgrsSetUploadCounter
jmp 0x14007776c
mov edx, 1
mov word [rcx + 0x14c], dx
mov rax, qword [rbx + 0x158]
mov dword [rbx + 0x20], 0
mov byte [rax], 0
mov rax, qword [rbx + 0x158]
mov byte [rax + 1], 3
movzx eax, word [rbx + 0x14c]
mov rdx, qword [rbx + 0x158]
mov ecx, eax
shr cx, 8
mov byte [rdx + 2], cl
mov rdx, qword [rbx + 0x158]
mov byte [rdx + 3], al
cmp word [rbx + 0x14c], 1
mov r8d, dword [rbx + 0x144]
jbe 0x1400778d7
cmp dword [rbx + 0x140], r8d
jl 0x140077763
mov rax, qword [rbx + 0x158]
lea rdi, [rsp + 0x38]
lea rsi, [rsp + 0x37]
mov dword [rbx + 0x140], 0
lea rbp, [rax + 4]
xor eax, eax
jmp 0x140077927
mov rdx, qword [rsp + 0x38]
mov eax, dword [rbx + 0x140]
mov r8d, dword [rbx + 0x144]
add eax, edx
add rbp, rdx
mov dword [rbx + 0x140], eax
cmp eax, r8d
jge 0x140077950
test rdx, rdx
je 0x140077950
mov qword [rsp + 0x20], rsi
sub r8d, eax
mov r9, rdi
mov rdx, rbp
movsxd r8, r8d
mov rcx, r13
call sym.Curl_client_read
mov r12d, eax
test eax, eax
je 0x140077900
jmp 0x14007776c
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 0x140077ab0
movsxd rdx, dword [rbx + 0x140]
add rdx, qword [r13 + 0x118]
mov rcx, r13
mov qword [r13 + 0x118], rdx
call sym.Curl_pgrsSetUploadCounter
jmp 0x14007776c
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 0x1400779e0
cmp r8d, 0xffff
jne 0x140077a00
test r9w, r9w
jne 0x140077a00
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__time64]
add word [rbx + 0x14c], 1
mov qword [rbx + 0x30], rax
jmp 0x14007787c
test r13, r13
je 0x140077a31
test byte [r13 + 0xa47], 0x10
je 0x140077a31
mov rax, qword [r13 + 0x1270]
test rax, rax
je 0x140077a22
mov ecx, dword [rax + 8]
test ecx, ecx
jle 0x140077a31
lea rdx, str.Received_ACK_for_block__d__expecting__d
mov rcx, r13
call sym.Curl_infof
mov eax, dword [rbx + 0x20]
add eax, 1
mov dword [rbx + 0x20], eax
cmp eax, dword [rbx + 0x28]
jle 0x140077a68
lea rdx, str.tftp_tx:_giving_up_waiting_for_block__d_ack
mov rcx, r13
movzx r8d, word [rbx + 0x14c]
mov r12d, 0x37
call sym.Curl_failf
jmp 0x14007776c
mov eax, dword [rbx + 0x140]
mov rcx, qword [rbx + 0x18]
xor r9d, r9d
xor r12d, r12d
mov r8d, dword [rbx + 0x138]
mov rdx, qword [rbx + 0x158]
add rbx, 0xb8
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 0x14007776c
nop dword [rax]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0x40]
mov r8d, 0x100
mov r12d, 0x37
mov ecx, eax
call sym.Curl_strerror
lea rdx, [0x140168b05]
mov rcx, r13
mov r8, rax
call sym.Curl_failf
jmp 0x14007776c