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

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
mov rax, qword [rcx + 0x10]
cmp edx, 5
mov rbx, rcx
mov rdi, qword [rax]
je 0x46cae0
jle 0x46cab0
cmp edx, 6
je 0x46cb60
cmp edx, 7
jne 0x46cab9
mov eax, dword [rcx + 0x20]
movzx r8d, word [rcx + 0x48]
lea rdx, str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
lea r9d, [rax + 1]
add r8d, 1
mov dword [rcx + 0x20], r9d
movzx r8d, r8w
mov rcx, rdi
call fcn.0044e9e0
mov eax, dword [rbx + 0x28]
cmp dword [rbx + 0x20], eax
jle 0x46ccb0
xor esi, esi
mov dword [rbx + 8], 0xffffff9d
mov dword [rbx], 3
mov eax, esi
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
cmp edx, 4
je 0x46cc30
mov r8d, edx
lea rdx, str.tftp_tx:_internal_error__event:__i
mov rcx, rdi
xor esi, esi
call fcn.0044ea90
mov eax, esi
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
mov rax, qword [rcx + 0x170]
mov dword [rcx], 3
xor r9d, r9d
mov r8d, 4
mov byte [rax], 0
mov rax, qword [rcx + 0x170]
mov byte [rax + 1], 5
movzx eax, word [rcx + 0x48]
mov rdx, qword [rcx + 0x170]
mov ecx, eax
shr cx, 8
mov byte [rdx + 2], cl
mov rdx, qword [rbx + 0x170]
mov byte [rdx + 3], al
mov eax, dword [rbx + 0x150]
mov rdx, qword [rbx + 0x170]
mov rcx, qword [rbx + 0x18]
mov dword [rsp + 0x28], eax
lea rax, [rbx + 0xd0]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_sendto]
xor esi, esi
mov dword [rbx], 3
mov eax, esi
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
mov ecx, 1
mov word [rbx + 0x48], cx
mov rax, qword [rbx + 0x170]
mov dword [rbx + 0x20], 0
mov byte [rax], 0
mov rax, qword [rbx + 0x170]
mov byte [rax + 1], 3
movzx eax, word [rbx + 0x48]
mov rdx, qword [rbx + 0x170]
mov ecx, eax
shr cx, 8
mov byte [rdx + 2], cl
mov rdx, qword [rbx + 0x170]
mov byte [rdx + 3], al
cmp word [rbx + 0x48], 1
mov edx, dword [rbx + 0x15c]
jbe 0x46cbb8
cmp dword [rbx + 0x158], edx
jl 0x46cb49
mov rcx, qword [rbx + 0x10]
lea r8, [rbx + 0x158]
call fcn.0047aa80
test eax, eax
mov esi, eax
jne 0x46cacd
mov r8d, dword [rbx + 0x150]
mov eax, dword [rbx + 0x158]
xor r9d, r9d
mov rdx, qword [rbx + 0x170]
mov rcx, qword [rbx + 0x18]
mov dword [rsp + 0x28], r8d
lea r8, [rbx + 0xd0]
mov qword [rsp + 0x20], r8
lea r8d, [rax + 4]
call qword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x46cd70
movsxd rdx, dword [rbx + 0x158]
mov rcx, rdi
add rdx, qword [rdi + 0x58]
mov qword [rdi + 0x58], rdx
call fcn.0045c420
jmp 0x46cacd
mov rdx, qword [rcx + 0x168]
movzx eax, byte [rdx + 2]
movzx r8d, byte [rdx + 3]
shl eax, 8
or r8d, eax
movzx eax, word [rcx + 0x48]
movzx r8d, r8w
movzx r9d, ax
cmp r9d, r8d
je 0x46cda0
test ax, ax
jne 0x46cc6d
cmp r8d, 0xffff
je 0x46cda0
lea rdx, str.Received_ACK_for_block__d__expecting__d_n
mov rcx, rdi
call fcn.0044e9e0
mov eax, dword [rbx + 0x20]
add eax, 1
cmp eax, dword [rbx + 0x28]
mov dword [rbx + 0x20], eax
jle 0x46cd30
movzx r8d, word [rbx + 0x48]
lea rdx, str.tftp_tx:_giving_up_waiting_for_block__d_ack
mov rcx, rdi
mov esi, 0x37
call fcn.0044ea90
jmp 0x46cacd
mov r8d, dword [rbx + 0x150]
mov eax, dword [rbx + 0x158]
xor r9d, r9d
mov rdx, qword [rbx + 0x170]
mov rcx, qword [rbx + 0x18]
mov dword [rsp + 0x28], r8d
lea r8, [rbx + 0xd0]
mov qword [rsp + 0x20], r8
lea r8d, [rax + 4]
call qword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x46cd00
mov rdx, qword [rdi + 0x58]
mov rcx, rdi
xor esi, esi
call fcn.0045c420
jmp 0x46cacd
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rbx + 0x10]
mov edx, eax
mov esi, 0x37
call fcn.0045d930
lea rdx, [0x00663f0e]
mov r8, rax
mov rcx, rdi
call fcn.0044ea90
jmp 0x46cacd
mov r8d, dword [rbx + 0x150]
mov eax, dword [rbx + 0x158]
xor r9d, r9d
mov rdx, qword [rbx + 0x170]
mov rcx, qword [rbx + 0x18]
xor esi, esi
mov dword [rsp + 0x28], r8d
lea r8, [rbx + 0xd0]
mov qword [rsp + 0x20], r8
lea r8d, [rax + 4]
call qword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x46cacd
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rbx + 0x10]
mov edx, eax
mov sil, 0x37
call fcn.0045d930
lea rdx, [0x00663f0e]
mov r8, rax
mov rcx, rdi
call fcn.0044ea90
jmp 0x46cacd
lea rcx, [rbx + 0x40]
call qword [sym.imp.msvcrt.dll__time64]
add word [rbx + 0x48], 1
jmp 0x46cb69