Function at 0x14020c500
Capabilities:
Receive data
Receive data on socket

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x158
mov rbx, rdx
mov rsi, rcx
mov rax, qword [rcx + 0x18]
mov rdi, qword [rax + 0x5b8]
mov rcx, qword [rdi + 0x10]
cmp dword [rdi], 0
sete r8b
xor edx, edx
call fcn.1401a7d30
test rax, rax
js 0x14020c56f
lea rcx, [rsp + 0x50]
call qword [sym.imp.msvcrt.dll__time64]
movsxd rax, dword [rdi + 0x24]
add rax, qword [rdi + 0x30]
cmp qword [rsp + 0x50], rax
jle 0x14020c57c
lea rcx, [rdi + 0x30]
call qword [sym.imp.msvcrt.dll__time64]
mov byte [rbx], 0
mov rcx, rdi
mov edx, 7
jmp 0x14020c7b0
mov dword [rdi + 8], 0xffffff9d
mov dword [rdi], 3
mov byte [rbx], 0
mov rcx, qword [rdi + 0x18]
mov rdx, 0xffffffffffffffff
mov r8, 0xffffffffffffffff
xor r9d, r9d
call fcn.140213420
mov ebp, eax
test eax, eax
je 0x14020c7e6
cmp ebp, 0xffffffff
jne 0x14020c5e0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0x50]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8a10
lea rdx, [0x14027dcaa]
mov rcx, rsi
mov r8, rax
call fcn.140195520
mov dword [rdi + 0xc], 5
xor ebp, ebp
jmp 0x14020c7e6
mov rax, qword [rsi + 0x18]
mov r14, qword [rax + 0x5b8]
mov dword [rsp + 0x34], 0x80
mov rcx, qword [r14 + 0x18]
mov rdx, qword [r14 + 0x150]
mov r8d, dword [r14 + 0x144]
add r8d, 4
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_recvfrom]
mov r13d, eax
mov dword [r14 + 0x13c], eax
cmp dword [r14 + 0x138], 0
je 0x14020c65c
cmp r13d, 3
jg 0x14020c689
lea rdx, str.Received_too_short_packet
mov rcx, rsi
call fcn.140195520
mov dword [r14 + 0xc], 7
jmp 0x14020c7aa
lea rcx, [r14 + 0xb8]
movsxd r15, dword [rsp + 0x34]
lea rdx, [rsp + 0x50]
mov r8, r15
call sub.msvcrt.dll_memcpy
mov dword [r14 + 0x138], r15d
mov r13d, dword [r14 + 0x13c]
cmp r13d, 3
jle 0x14020c640
mov qword [rsp + 0x48], rbx
mov r15, qword [r14 + 0x150]
movzx eax, word [r15]
rol ax, 8
movzx eax, ax
mov dword [r14 + 0xc], eax
add eax, 0xfffffffd
cmp eax, 3
mov qword [rsp + 0x38], rsi
ja case.default.0x14020c6bf
lea rcx, [0x14020ca68]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
cmp r13d, 5
jb case.0x14020c6bf.4
mov eax, dword [r14 + 0x14c]
inc eax
movzx ecx, word [r15 + 2]
rol cx, 8
cmp ax, cx
jne case.0x14020c6bf.4
add r15, 4
add r13d, 0xfffffffc
mov rsi, qword [rsp + 0x38]
mov rcx, rsi
mov edx, 1
mov r8, r15
mov r9, r13
call fcn.1401a7960
test eax, eax
je 0x14020ca1f
mov ebp, eax
mov rcx, r14
mov edx, 5
call fcn.14020ce30
jmp 0x14020c7e6
lea rdx, [0x14027dcaa]
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rsi
call fcn.140195520
jmp case.0x14020c6bf.4
movzx eax, word [r15 + 2]
rol ax, 8
movzx eax, ax
add r15, 4
add r13d, 0xfffffffc
mov dword [r14 + 8], eax
mov rcx, r15
xor edx, edx
mov r8, r13
call sub.msvcrt.dll_memchr
test rax, rax
je case.0x14020c6bf.4
sub rax, r15
cmp rax, r13
jae case.0x14020c6bf.4
lea rdx, str.TFTP_error:__s
mov rcx, qword [rsp + 0x38]
mov r8, r15
call fcn.1401955d0
mov rsi, qword [rsp + 0x38]
mov rcx, rsi
call fcn.1401f45a0
test eax, eax
mov rbx, qword [rsp + 0x48]
je 0x14020c7aa
mov rcx, r14
mov edx, 5
call fcn.14020ce30
mov ebp, 0x2a
jmp 0x14020c7e6
mov edx, dword [rdi + 0xc]
mov rcx, rdi
call fcn.14020ce30
mov ebp, eax
test eax, eax
jne 0x14020c7e6
xor ebp, ebp
cmp dword [rdi], 3
sete byte [rbx]
jne 0x14020c7e6
mov dword [rsp + 0x20], 0xffffffff
xor ebp, ebp
mov rcx, rsi
mov edx, 0xffffffff
mov r8, 0xffffffffffffffff
xor r9d, r9d
call fcn.1401f7ff0
mov eax, ebp
add rsp, 0x158
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
add r13d, 0xfffffffe
mov rsi, qword [r14 + 0x10]
mov dword [r14 + 0x144], 0x200
lea rbp, [r15 + r13]
add rbp, 2
add r15, 2
mov qword [rsp + 0x40], rbp
jmp 0x14020c833
add r15, r12
mov rbp, qword [rsp + 0x40]
cmp r15, rbp
jae case.0x14020c6bf.4
sub rbp, r15
mov rcx, r15
xor edx, edx
mov r8, rbp
call sub.msvcrt.dll_memchr
mov rbx, rax
sub rbx, r15
test rax, rax
cmove rbx, rbp
lea r12, [rbx + 1]
mov r13, rbp
sub r13, r12
jbe 0x14020c9a8
add r12, r15
mov rcx, r12
xor edx, edx
mov r8, r13
call sub.msvcrt.dll_memchr
mov rcx, rax
sub rcx, r12
test rax, rax
cmove rcx, r13
lea r12, [rbx + rcx]
add r12, 2
cmp r12, rbp
ja 0x14020c9a8
mov rcx, r15
call sub.msvcrt.dll_strlen
lea r13, [rax + r15]
inc r13
mov rcx, rsi
lea rdx, str.got_option__s__value__s_
mov r8, r15
mov r9, r13
call fcn.1401955d0
mov r8d, 7
mov rcx, r15
lea rdx, str.blksize
call fcn.1401aa790
test eax, eax
je 0x14020c93b
mov rcx, r13
xor edx, edx
mov r8d, 0xa
call sub.msvcrt.dll_strtol
test eax, eax
je 0x14020c9b1
cmp eax, 0xffb9
jge 0x14020c9ca
cmp eax, 7
jle 0x14020c9e3
mov ecx, dword [r14 + 0x148]
cmp eax, ecx
jg 0x14020c9fc
mov dword [r14 + 0x144], eax
mov dword [rsp + 0x28], ecx
lea rcx, str.requested
mov qword [rsp + 0x20], rcx
mov rcx, rsi
lea rdx, str._s___d___s___d_
lea r8, str.blksize_parsed_from_OACK
mov r9d, eax
call fcn.1401955d0
jmp 0x14020c822
mov r8d, 5
mov rcx, r15
lea rdx, str.tsize
call fcn.1401aa790
test eax, eax
je 0x14020c822
mov rcx, r13
xor edx, edx
mov r8d, 0xa
call sub.msvcrt.dll_strtol
mov ebp, eax
mov rcx, rsi
lea rdx, str._s___ld_
lea r8, str.tsize_parsed_from_OACK
mov r9d, eax
call fcn.1401955d0
test byte [rsi + 0xa8b], 0x10
jne 0x14020c822
test ebp, ebp
je 0x14020ca49
movsxd rdx, ebp
mov rcx, rsi
call fcn.1401f50a0
jmp 0x14020c822
lea rdx, str.Malformed_ACK_packet__rejecting
jmp 0x14020c9b8
lea rdx, str.invalid_blocksize_value_in_OACK_packet
mov rcx, rsi
call fcn.140195520
mov ebp, 0x47
jmp 0x14020c7e6
lea rdx, str._s___d_
lea r8, str.blksize_is_larger_than_max_supported
mov rcx, rsi
mov r9d, 0xffb8
jmp 0x14020ca10
lea rdx, str._s___d_
lea r8, str.blksize_is_smaller_than_min_supported
mov rcx, rsi
mov r9d, 8
jmp 0x14020ca10
lea rdx, str._s___ld_
lea r8, str.server_requested_blksize_larger_than_allocated
mov rcx, rsi
mov r9d, eax
call fcn.140195520
mov ebp, 0x47
jmp 0x14020c7e6
movsxd rax, dword [r14 + 0x13c]
mov rcx, qword [rsi + 0xf8]
lea rdx, [rax + rcx]
add rdx, 0xfffffffffffffffc
mov qword [rsi + 0xf8], rdx
mov rcx, rsi
call fcn.1401f5540
jmp case.0x14020c6bf.4
lea rdx, str.invalid_tsize__:_s:__value_in_OACK_packet
mov rcx, rsi
mov r8, r13
call fcn.140195520
mov ebp, 0x47
jmp 0x14020c7e6