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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
sub rsp, 0x180
mov rbx, rcx
xor ebp, ebp
lea rsi, str.netascii
mov rax, qword [rbx + 0x10]
lea rcx, str.octet
mov r12, qword [rax]
cmp dword [r12 + 0xfe4], ebp
cmove rsi, rcx
cmp edx, 7
ja case.0x140030e08.1
movsxd rax, edx
lea rdx, [0x140000000]
mov ecx, dword [rdx + rax*4 + 0x312d8]
add rcx, rdx
jmp rcx
inc dword [rbx + 0x20]
mov eax, dword [rbx + 0x20]
cmp eax, dword [rbx + 0x28]
jle 0x140030e29
mov dword [rbx + 8], 0xffffff9e
mov dword [rbx], 3
xor eax, eax
jmp 0x1400312bf
mov rax, qword [rbx + 0x170]
cmp dword [r12 + 0x102c], ebp
mov byte [rax], bpl
mov rax, qword [rbx + 0x170]
je 0x140030e79
mov byte [rax + 1], 2
mov rax, qword [rbx + 0x10]
mov rdx, qword [rbx + 0x170]
mov rcx, qword [rax]
add rdx, 4
mov qword [rcx + 0x1a8], rdx
mov rdx, qword [r12 + 0x1710]
cmp rdx, 0xffffffffffffffff
je 0x140030e7d
mov rcx, r12
call fcn.140029380
jmp 0x140030e7d
mov byte [rax + 1], 1
mov rax, qword [rbx + 0x10]
lea r9, [rsp + 0x1a0]
xor r8d, r8d
mov rcx, qword [rax]
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rbp
mov rdx, qword [rcx + 0x1778]
mov rcx, r12
inc rdx
call fcn.14002a680
mov ebp, eax
test eax, eax
jne 0x1400312bf
movsxd r10, dword [rbx + 0x15c]
mov r9, qword [rsp + 0x1a0]
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rsi
mov rdx, r10
repne scasb al, byte [rdi]
mov rdi, r9
not rcx
dec rcx
sub rdx, rcx
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
sub rdx, 4
not rcx
dec rcx
cmp rcx, rdx
jbe 0x140030f1d
lea rdx, str.TFTP_file_name_too_long
mov rcx, r12
call fcn.140019080
mov rcx, qword [rsp + 0x1a0]
call qword [sub.MSVCR120.dll_free]
mov eax, 0x47
jmp 0x1400312bf
mov rcx, qword [rbx + 0x170]
mov qword [rsp + 0x30], rax
lea r8, str._s_c_s_c
mov rdx, r10
add rcx, 2
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rax
call fcn.14000c260
mov rdi, qword [rsp + 0x1a0]
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
mov rdi, rsi
not rcx
lea rdx, [rcx - 1]
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
not rcx
lea rsi, [rdx + rcx + 3]
cmp dword [r12 + 0xfc4], eax
jne 0x1400311e6
cmp dword [r12 + 0x102c], eax
je 0x140030faa
mov r9, qword [r12 + 0x1710]
cmp r9, 0xffffffffffffffff
je 0x140030faa
lea r8, str._I64d
lea edx, [rax + 0x40]
lea rcx, [rsp + 0x40]
call fcn.14000c260
jmp 0x140030fb4
mov eax, Ordinal_50
mov word [rsp + 0x40], ax
movsxd rax, dword [rbx + 0x15c]
lea rdi, [rsi + 6]
cmp rdi, rax
jbe 0x140030fce
mov edi, 0x47
jmp 0x140031055
mov rax, qword [rbx + 0x170]
lea rcx, str.tsize
lea rdx, [rsi + rax]
movzx eax, byte [rcx]
inc rdx
inc rcx
mov byte [rdx - 1], al
test al, al
jne 0x140030fe0
mov rsi, rdi
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x40]
repne scasb al, byte [rdi]
movsxd rax, dword [rbx + 0x15c]
not rcx
lea rdx, [rcx + rsi]
cmp rdx, rax
jbe 0x14003101a
mov edi, 0x47
jmp 0x140031055
mov rax, qword [rbx + 0x170]
lea rcx, [rsp + 0x40]
lea rdx, [rsi + rax]
nop word [rax + rax]
movzx eax, byte [rcx]
inc rdx
inc rcx
mov byte [rdx - 1], al
test al, al
jne 0x140031030
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x40]
repne scasb al, byte [rdi]
not rcx
add rsi, rcx
xor edi, edi
mov r9d, dword [rbx + 0x160]
lea r8, [0x140117de8]
lea rcx, [rsp + 0x40]
mov edx, 0x40
call fcn.14000c260
test edi, edi
jne 0x140031125
movsxd rax, dword [rbx + 0x15c]
lea rdi, [rsi + 8]
cmp rdi, rax
jbe 0x140031094
mov edi, 0x47
jmp 0x140031125
mov rax, qword [rbx + 0x170]
lea rcx, str.blksize
lea rdx, [rsi + rax]
nop word [rax + rax]
movzx eax, byte [rcx]
inc rdx
inc rcx
mov byte [rdx - 1], al
test al, al
jne 0x1400310b0
mov rsi, rdi
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x40]
repne scasb al, byte [rdi]
movsxd rax, dword [rbx + 0x15c]
not rcx
lea rdx, [rcx + rsi]
cmp rdx, rax
jbe 0x1400310ea
mov edi, 0x47
jmp 0x140031125
mov rax, qword [rbx + 0x170]
lea rcx, [rsp + 0x40]
lea rdx, [rsi + rax]
nop word [rax + rax]
movzx eax, byte [rcx]
inc rdx
inc rcx
mov byte [rdx - 1], al
test al, al
jne 0x140031100
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x40]
repne scasb al, byte [rdi]
not rcx
add rsi, rcx
xor edi, edi
mov r9d, dword [rbx + 0x24]
lea r8, [0x140117de8]
lea rcx, [rsp + 0x40]
mov edx, 0x40
call fcn.14000c260
test edi, edi
jne 0x14003125d
movsxd rax, dword [rbx + 0x15c]
lea r8, [rsi + 8]
cmp r8, rax
ja 0x14003125d
mov rax, qword [rbx + 0x170]
lea rcx, str.timeout
lea rdx, [rsi + rax]
nop dword [rax]
movzx eax, byte [rcx]
inc rdx
inc rcx
mov byte [rdx - 1], al
test al, al
jne 0x140031170
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x40]
repne scasb al, byte [rdi]
movsxd rax, dword [rbx + 0x15c]
not rcx
lea rdx, [rcx + r8]
cmp rdx, rax
ja 0x14003125d
mov rax, qword [rbx + 0x170]
lea rdx, [rsp + 0x40]
lea rcx, [r8 + rax]
nop word [rax + rax]
movzx eax, byte [rdx]
inc rcx
inc rdx
mov byte [rcx - 1], al
test al, al
jne 0x1400311c0
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x40]
repne scasb al, byte [rdi]
xor ebp, ebp
not rcx
lea rsi, [r8 + rcx]
mov rax, qword [rbx + 0x10]
mov rdx, qword [rbx + 0x170]
xor r9d, r9d
mov rcx, qword [rax + 0x2e0]
mov r8d, esi
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 rcx, eax
cmp rcx, rsi
je 0x14003124d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0x80]
mov r8d, 0x100
mov ecx, eax
call fcn.1400076f0
lea rdx, [0x14011bc54]
mov rcx, r12
mov r8, rax
call fcn.140019080
mov rcx, qword [rsp + 0x1a0]
call qword [sub.MSVCR120.dll_free]
jmp 0x1400312bd
lea rdx, str.TFTP_buffer_too_small_for_options
jmp 0x140030efd
mov edx, 6
mov rcx, rbx
cmp dword [r12 + 0x102c], ebp
je 0x14003129d
call fcn.140030d10
mov ebp, eax
jmp 0x1400312bd
mov edx, 4
mov rcx, rbx
call fcn.140030d10
mov ebp, eax
jmp 0x1400312bd
mov edx, 3
mov rcx, rbx
call fcn.140030d60
mov ebp, eax
jmp 0x1400312bd
mov dword [rbx], 3
jmp 0x1400312bd
lea rdx, str.tftp_send_first:_internal_error
mov rcx, r12
call fcn.140019080
mov eax, ebp
lea r11, [rsp + 0x180]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r12
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 0x14003136e
dec r8d
je 0x140031365
dec r8d
je 0x14003135c
dec r8d
mov rcx, r9
je 0x140031342
lea r8, str.Internal_state_machine_error
lea rdx, [0x14011bc54]
call fcn.140019080
mov eax, 0x47
add rsp, 0x28
ret
lea r8, str.TFTP_finished
lea rdx, [0x140118a54]
call fcn.140018f20
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp fcn.1400304b0
add rsp, 0x28
jmp fcn.1400301a0
add rsp, 0x28
jmp 0x140030db0