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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
sub rsp, 0xa0
mov rax, qword [0x1401140c0]
xor rax, rsp
mov qword [rsp + 0x90], rax
mov rax, qword [rcx + 0x10]
lea rsi, str.netascii
xor edi, edi
mov rbx, rcx
mov r14d, edi
mov rbp, qword [rax]
lea rax, str.octet
cmp byte [rbp + 0x51b], dil
cmove rsi, rax
cmp edx, 7
ja case.0x1400589ac.1
movsxd rax, edx
lea rdx, [0x140000000]
mov ecx, dword [rdx + rax*4 + 0x58dd8]
add rcx, rdx
jmp rcx
inc dword [rbx + 0x20]
mov eax, dword [rbx + 0x20]
cmp eax, dword [rbx + 0x28]
jle 0x1400589cd
mov dword [rbx + 8], 0xffffff9e
xor eax, eax
mov dword [rbx], 3
jmp 0x140058daf
cmp byte [rbp + 0x529], dil
je 0x140058a1b
mov rax, qword [rbx + 0x170]
mov byte [rax], dil
mov rax, qword [rbx + 0x170]
mov byte [rax + 1], 2
mov rax, qword [rbx + 0x10]
mov rdx, qword [rbx + 0x170]
add rdx, 4
mov rcx, qword [rax]
mov qword [rcx + 0x188], rdx
mov rdx, qword [rbp + 0x4be0]
cmp rdx, 0xffffffffffffffff
je 0x140058a36
mov rcx, rbp
call fcn.140043f00
jmp 0x140058a36
mov ecx, edi
mov rdx, rdi
mov rax, qword [rbx + 0x170]
lea rdx, [rdx + 1]
mov byte [rdx + rax - 1], cl
inc ecx
cmp ecx, 2
jl 0x140058a20
mov rax, qword [rbx + 0x10]
lea r9, [rsp + 0x40]
mov byte [rsp + 0x28], dil
xor r8d, r8d
mov qword [rsp + 0x20], rdi
mov rcx, qword [rax]
mov rdx, qword [rcx + 0x4bb0]
mov rcx, rbp
inc rdx
call fcn.14005d140
mov r14d, eax
test eax, eax
jne 0x140058daf
mov rcx, qword [rbx + 0x170]
lea r8, str._s_c_s_c
movsxd rdx, dword [rbx + 0x15c]
add rcx, 2
mov r9, qword [rsp + 0x40]
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rdi
call fcn.140046010
or rcx, 0xffffffffffffffff
inc rcx
cmp byte [rsi + rcx], dil
jne 0x140058aa2
mov rdx, qword [rsp + 0x40]
or rax, 0xffffffffffffffff
cmp byte [rdx + rax + 1], dil
lea rax, [rax + 1]
jne 0x140058ab4
lea rsi, [rax + 4]
add rsi, rcx
cmp byte [rbp + 0x2dc], dil
jne 0x140058cef
cmp byte [rbp + 0x529], dil
je 0x140058b01
mov r9, qword [rbp + 0x4be0]
cmp r9, 0xffffffffffffffff
je 0x140058b01
lea r8, [0x1400dc76c]
mov edx, 0x40
lea rcx, [rsp + 0x50]
call fcn.140046010
jmp 0x140058b0b
mov eax, Ordinal_50
mov word [rsp + 0x50], ax
mov r8, qword [rbx + 0x170]
lea r9, str.tsize
add r8, rsi
mov rdx, rsi
mov rcx, rbx
call fcn.140058090
add rsi, rax
lea rcx, [rsp + 0x50]
or rax, 0xffffffffffffffff
cmp byte [rcx + rax + 1], dil
lea rax, [rax + 1]
jne 0x140058b33
lea rcx, [rax + 1]
movsxd rax, dword [rbx + 0x15c]
add rcx, rsi
cmp rcx, rax
jbe 0x140058b56
mov rax, rdi
jmp 0x140058b9c
mov rdx, qword [rbx + 0x170]
lea rcx, [rsp + 0x50]
add rdx, rsi
nop word [rax + rax]
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
mov byte [rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140058b70
lea rcx, [rsp + 0x50]
or rax, 0xffffffffffffffff
nop word [rax + rax]
inc rax
cmp byte [rcx + rax], dil
jne 0x140058b90
inc rax
mov r9d, dword [rbx + 0x160]
lea r8, [0x1400d6058]
mov edx, 0x40
lea rcx, [rsp + 0x50]
add rsi, rax
call fcn.140046010
mov r8, qword [rbx + 0x170]
lea r9, str.blksize
add r8, rsi
mov rdx, rsi
mov rcx, rbx
call fcn.140058090
add rsi, rax
lea rcx, [rsp + 0x50]
or rax, 0xffffffffffffffff
cmp byte [rcx + rax + 1], dil
lea rax, [rax + 1]
jne 0x140058be4
lea rcx, [rax + 1]
movsxd rax, dword [rbx + 0x15c]
add rcx, rsi
cmp rcx, rax
jbe 0x140058c07
mov rax, rdi
jmp 0x140058c4c
mov rdx, qword [rbx + 0x170]
lea rcx, [rsp + 0x50]
add rdx, rsi
nop word [rax + rax]
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
mov byte [rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140058c20
lea rcx, [rsp + 0x50]
or rax, 0xffffffffffffffff
nop word [rax + rax]
inc rax
cmp byte [rcx + rax], dil
jne 0x140058c40
inc rax
mov r9d, dword [rbx + 0x24]
lea r8, [0x1400d6058]
mov edx, 0x40
lea rcx, [rsp + 0x50]
add rsi, rax
call fcn.140046010
mov r8, qword [rbx + 0x170]
lea r9, str.timeout
add r8, rsi
mov rdx, rsi
mov rcx, rbx
call fcn.140058090
add rsi, rax
lea rcx, [rsp + 0x50]
or rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], dil
jne 0x140058c91
lea rcx, [rsi + 1]
add rcx, rax
movsxd rax, dword [rbx + 0x15c]
cmp rcx, rax
ja 0x140058cec
mov rdx, qword [rbx + 0x170]
lea rcx, [rsp + 0x50]
add rdx, rsi
nop dword [rax]
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
mov byte [rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140058cc0
lea rax, [rsp + 0x50]
or rdi, 0xffffffffffffffff
nop word [rax + rax]
inc rdi
cmp byte [rax + rdi], 0
jne 0x140058ce0
inc rdi
add rsi, rdi
mov rax, qword [rbx + 0x10]
xor r9d, r9d
mov rdx, qword [rbx + 0x170]
mov r8d, esi
mov rcx, qword [rax + 0x58]
mov eax, dword [rcx + 0x10]
mov dword [rsp + 0x28], eax
mov rax, qword [rcx + 0x20]
mov rcx, qword [rbx + 0x18]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_sendto]
movsxd rdx, eax
cmp rdx, rsi
je 0x140058d49
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rbx + 0x10]
mov edx, eax
call fcn.140048530
mov r8, rax
lea rdx, [0x1400d6e58]
mov rcx, rbp
call fcn.14003a500
mov rcx, qword [rsp + 0x40]
call qword [str.LH_r_]
jmp 0x140058dac
mov edx, 6
mov rcx, rbx
cmp byte [rbp + 0x529], dil
je 0x140058d8b
call fcn.140058040
mov r14d, eax
jmp 0x140058dac
mov edx, 4
mov rcx, rbx
call fcn.140058040
mov r14d, eax
jmp 0x140058dac
mov edx, 3
mov rcx, rbx
call fcn.140057ff0
mov r14d, eax
jmp 0x140058dac
mov dword [rbx], 3
jmp 0x140058dac
lea rdx, str.tftp_send_first:_internal_error
mov rcx, rbp
call fcn.14003a500
mov eax, r14d
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.140069ab0
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
sub rsp, 0x28
mov rax, qword [rcx + 0x10]
mov r8d, dword [rcx]
mov r9, qword [rax]
test r8d, r8d
je 0x140059011
sub r8d, 1
je 0x140059008
sub r8d, 1
je 0x140058fff
mov rcx, r9
cmp r8d, 1
je 0x140058fe5
lea r8, str.Internal_state_machine_error
lea rdx, [0x1400d6e58]
call fcn.14003a500
mov eax, 0x47
add rsp, 0x28
ret
lea r8, str.TFTP_finished
lea rdx, [0x1400d5fec]
call fcn.14003a5d0
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp fcn.140059120
add rsp, 0x28
jmp fcn.140058600
add rsp, 0x28
jmp 0x140058940