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

Disassembly:
mov r11, rsp
sub rsp, 0xd8
mov rax, qword [0x0072f1d0]
mov qword [rsp + 0xc0], rax
mov qword [r11 + 0x10], rbx
mov rbx, qword [rcx + 0x568]
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 0x5542be
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 0x554320
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.0052eee0
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.00693b90
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 0x5543c9
dec edx
je 0x554447
dec edx
je 0x554392
dec edx
je 0x55436e
lea r8, str.Internal_error:_Unexpected_packet
lea rdx, [0x006a0bd4]
mov rcx, rdi
call fcn.0052eee0
jmp 0x554447
mov rdx, qword [rbx + 0x168]
add r8d, 0xfffffffe
mov rcx, rbx
add rdx, 2
call fcn.00552c80
test eax, eax
je 0x554447
jmp 0x5542eb
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, [0x006aecd4]
or ecx, eax
mov dword [rbx + 8], ecx
mov rcx, rdi
call fcn.0052ede0
jmp 0x554447
cmp r8d, 4
jle 0x554447
mov rcx, qword [rbx + 0x168]
movzx eax, byte [rcx + 2]
shl ax, 8
movzx edx, ax
movzx eax, byte [rcx + 3]
or edx, eax
mov ax, word [rbx + 0x48]
inc eax
movzx eax, ax
cmp eax, edx
jne 0x554447
lea eax, [r8 - 4]
lea r8, [rcx + 4]
mov edx, 1
movsxd r9, eax
mov rcx, rbp
call fcn.0052f530
test eax, eax
mov esi, eax
je 0x554426
mov edx, 5
mov rcx, rbx
call fcn.005541a0
mov eax, esi
jmp 0x5542eb
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xb0], rax
mov rdx, qword [rdi + 0xb0]
call fcn.00545180
mov rcx, rbp
call fcn.00545200
test eax, eax
je 0x5542e9
mov rax, qword [rbx + 0x10]
mov r8d, dword [rbx]
test r8d, r8d
mov rcx, qword [rax]
je 0x5545a1
dec r8d
je 0x55452f
dec r8d
je 0x5544b7
dec r8d
je 0x55449a
lea r8, str.Internal_state_machine_error
lea rdx, [0x006a0bd4]
call fcn.0052eee0
mov eax, Ordinal_46
jmp 0x5542eb
lea r8, str.TFTP_finished
lea rdx, [0x006aecd4]
call fcn.0052ede0
mov eax, Ordinal_46
jmp 0x5542eb
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, Ordinal_46
jmp 0x5542eb
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, Ordinal_46
jmp 0x5542eb
mov dword [rbx], 3
mov eax, Ordinal_46
jmp 0x5542eb