Function at 0x4a0300
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
mov r11, rsp
sub rsp, 0xd8
mov rax, qword [0x005c3458]
mov qword [rsp + 0xc0], rax
mov qword [r11 + 0x10], rbx
mov rbx, qword [rcx + 0x3d0]
mov dword [rsp + 0x30], 0x80
mov r8d, dword [rbx + 0x15c]
mov rdx, qword [rbx + 0x168]
mov qword [r11 + 0x18], rbp
lea rax, [rsp + 0x30]
mov qword [r11 - 8], rdi
mov rdi, qword [rcx]
mov qword [rsp + 0x28], rax
mov rbp, rcx
mov rcx, qword [rbx + 0x18]
lea rax, [rsp + 0x40]
add r8d, 4
xor r9d, r9d
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [rbx + 0x150], 0
mov dword [rbx + 0x154], eax
jne 0x4a039e
movsxd r8, dword [rsp + 0x30]
lea rcx, [rbx + 0xd0]
lea rdx, [rsp + 0x40]
call sub.msvcrt.dll_memcpy
mov r11d, dword [rsp + 0x30]
mov dword [rbx + 0x150], r11d
mov r8d, dword [rbx + 0x154]
mov qword [rsp + 0xf8], rsi
cmp r8d, 4
jge 0x4a0400
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.00496db0
mov dword [rbx + 0xc], 7
xor eax, eax
mov rdi, qword [rsp + 0xd0]
mov rsi, qword [rsp + 0xf8]
mov rbp, qword [rsp + 0xf0]
mov rbx, qword [rsp + 0xe8]
mov rcx, qword [rsp + 0xc0]
call fcn.005555b0
add rsp, 0xd8
ret
mov rcx, qword [rbx + 0x168]
movzx eax, byte [rcx]
shl ax, 8
movzx edx, ax
movzx eax, byte [rcx + 1]
or edx, eax
mov dword [rbx + 0xc], edx
sub edx, 3
je 0x4a04a9
dec edx
je 0x4a051e
dec edx
je 0x4a0472
dec edx
je 0x4a044e
lea r8, str.Internal_error:_Unexpected_packet
lea rdx, [0x005754ec]
mov rcx, rdi
call fcn.00496db0
jmp 0x4a051e
mov rdx, qword [rbx + 0x168]
add r8d, 0xfffffffe
mov rcx, rbx
add rdx, 2
call fcn.0049ee10
test eax, eax
je 0x4a051e
jmp 0x4a03cb
mov rdx, qword [rbx + 0x168]
mov r8, qword [rbx + 0x168]
movzx eax, byte [rdx + 2]
add r8, 4
shl ax, 8
movzx ecx, ax
movzx eax, byte [rdx + 3]
lea rdx, [0x00575694]
or ecx, eax
mov dword [rbx + 8], ecx
mov rcx, rdi
call fcn.00496cb0
jmp 0x4a051e
cmp r8d, 4
jle 0x4a051e
mov rcx, qword [rbx + 0x168]
movzx eax, byte [rcx + 2]
shl ax, 8
movzx edx, ax
movzx eax, byte [rcx + 3]
or edx, eax
movzx eax, word [rbx + 0x48]
inc eax
cmp eax, edx
jne 0x4a051e
lea eax, [r8 - 4]
lea r8, [rcx + 4]
mov edx, 1
movsxd r9, eax
mov rcx, rbp
call fcn.004970a0
test eax, eax
mov esi, eax
je 0x4a0503
mov edx, 5
mov rcx, rbx
call fcn.004a0280
mov eax, esi
jmp 0x4a03cb
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0x48], rax
mov rdx, qword [rdi + 0x48]
call fcn.004b2aa0
mov rcx, rbp
call fcn.004b2b00
test eax, eax
je 0x4a03c9
mov rax, qword [rbx + 0x10]
mov r8d, dword [rbx]
test r8d, r8d
mov rcx, qword [rax]
je 0x4a0678
dec r8d
je 0x4a0606
dec r8d
je 0x4a058e
dec r8d
je 0x4a0571
lea r8, str.Internal_state_machine_error
lea rdx, [0x005754ec]
call fcn.00496db0
mov eax, 0x2a
jmp 0x4a03cb
lea r8, str.TFTP_finished
lea rdx, [0x00575694]
call fcn.00496cb0
mov eax, 0x2a
jmp 0x4a03cb
mov dword [rbx], 3
mov rax, qword [rbx + 0x170]
xor r9d, r9d
mov byte [rax], 0
mov rax, qword [rbx + 0x170]
lea r8d, [r9 + 4]
mov byte [rax + 1], 5
movzx edx, word [rbx + 0x48]
mov rax, qword [rbx + 0x170]
movzx ecx, dx
shr cx, 8
mov byte [rax + 2], cl
mov rax, qword [rbx + 0x170]
lea rcx, [rbx + 0xd0]
mov byte [rax + 3], dl
mov eax, dword [rbx + 0x150]
mov rdx, qword [rbx + 0x170]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.WS2_32.dll_sendto]
mov dword [rbx], 3
mov eax, 0x2a
jmp 0x4a03cb
mov rax, qword [rbx + 0x170]
xor r9d, r9d
mov byte [rax], 0
mov rax, qword [rbx + 0x170]
lea r8d, [r9 + 4]
mov byte [rax + 1], 5
movzx edx, word [rbx + 0x48]
mov rax, qword [rbx + 0x170]
movzx ecx, dx
shr cx, 8
mov byte [rax + 2], cl
mov rax, qword [rbx + 0x170]
lea rcx, [rbx + 0xd0]
mov byte [rax + 3], dl
mov eax, dword [rbx + 0x150]
mov rdx, qword [rbx + 0x170]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.WS2_32.dll_sendto]
mov dword [rbx], 3
mov eax, 0x2a
jmp 0x4a03cb
mov dword [rbx], 3
mov eax, 0x2a
jmp 0x4a03cb