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

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0xd0
mov rax, qword [0x14007c040]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rax, qword [rcx + 0x20]
mov rsi, rcx
xor r9d, r9d
xor edi, edi
mov rbx, qword [rax + 0x360]
lea rax, [rsp + 0x34]
mov dword [rsp + 0x34], Ordinal_133
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r8d, dword [rbx + 0x144]
mov rdx, qword [rbx + 0x150]
add r8d, 4
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.WS2_32.dll_recvfrom]
mov dword [rbx + 0x13c], eax
cmp dword [rbx + 0x138], edi
jne 0x140058176
movsxd r8, dword [rsp + 0x34]
lea rcx, [rbx + 0xb8]
lea rdx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x34]
mov dword [rbx + 0x138], eax
mov r8d, dword [rbx + 0x13c]
mov qword [rsp + 0xf8], rbp
mov qword [rsp + 0x100], r14
cmp r8d, 4
jge 0x1400581d6
lea rdx, str.Received_too_short_packet
mov rcx, rsi
call fcn.140013150
mov dword [rbx + 0xc], 7
mov eax, edi
mov r14, qword [rsp + 0x100]
mov rbp, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.140065250
add rsp, 0xd0
pop rdi
pop rsi
pop rbx
ret
mov rdx, qword [rbx + 0x150]
movzx eax, byte [rdx]
movzx ecx, byte [rdx + 1]
shl eax, 8
or ecx, eax
mov dword [rbx + 0xc], ecx
dec ecx
cmp ecx, 5
ja case.0x14005820c.1
movsxd rax, ecx
lea r9, [0x140000000]
mov ecx, dword [r9 + rax*4 + 0x58428]
add rcx, r9
jmp rcx
cmp r8d, 4
jle case.0x14005820c.4
movzx eax, byte [rdx + 3]
movzx ecx, byte [rdx + 2]
shl ecx, 8
or ecx, eax
movzx eax, word [rbx + 0x14c]
inc eax
movzx eax, ax
cmp eax, ecx
jne case.0x14005820c.4
lea eax, [r8 - 4]
lea r14, [rdx + 4]
movsxd rbp, eax
cmp qword [rsi + 0x160], rdi
jne 0x14005825b
mov rcx, rsi
call fcn.140048820
mov edi, eax
test eax, eax
jne 0x14005828d
mov rdx, qword [rsi + 0x160]
test rdx, rdx
jne 0x14005826c
lea edi, [rdx + 0x17]
jmp 0x140058285
mov rax, qword [rdx]
mov r9, r14
mov r8d, 1
mov qword [rsp + 0x20], rbp
mov rcx, rsi
call qword [rax + Ordinal_26]
mov edi, eax
test edi, edi
je case.0x14005820c.4
mov r8d, dword [rbx]
mov rcx, qword [rbx + 0x10]
test r8d, r8d
je 0x1400582f8
sub r8d, 1
je 0x1400582e6
sub r8d, 1
je 0x1400582d4
lea rdx, [0x14006a64c]
cmp r8d, 1
je 0x1400582c3
lea r8, str.Internal_state_machine_error
call fcn.140013150
jmp 0x1400581a9
lea r8, str.TFTP_finished
call fcn.140013280
jmp 0x1400581a9
mov edx, 5
mov rcx, rbx
call fcn.140057900
jmp 0x1400581a9
mov edx, 5
mov rcx, rbx
call fcn.1400575d0
jmp 0x1400581a9
mov edx, 5
mov rcx, rbx
call fcn.140056ed0
jmp 0x1400581a9
movzx ecx, byte [rdx + 2]
lea eax, [r8 - 4]
movsxd r14, eax
lea rbp, [rdx + 4]
movzx eax, byte [rdx + 3]
mov r8, r14
shl ecx, 8
xor edx, edx
or ecx, eax
mov dword [rbx + 8], ecx
mov rcx, rbp
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je case.0x14005820c.4
sub rax, rbp
cmp rax, r14
jae case.0x14005820c.4
mov r8, rbp
lea rdx, str.TFTP_error:__s
mov rcx, rsi
call fcn.140013280
jmp case.0x14005820c.4
add r8d, 0xfffffffe
add rdx, 2
mov rcx, rbx
call fcn.140056b50
mov edi, eax
test eax, eax
je case.0x14005820c.4
jmp 0x1400581ab
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rsi
lea rdx, [0x14006a64c]
call fcn.140013150
mov rcx, rsi
call fcn.140045390
test eax, eax
je 0x1400581a9
mov edx, dword [rbx]
mov rcx, qword [rbx + 0x10]
test edx, edx
je 0x14005840e
sub edx, 1
je 0x1400583f7
sub edx, 1
je 0x1400583e0
cmp edx, 1
lea rdx, [0x14006a64c]
je 0x1400583ca
lea r8, str.Internal_state_machine_error
call fcn.140013150
mov eax, Ordinal_46
jmp 0x1400581ab
lea r8, str.TFTP_finished
call fcn.140013280
mov eax, Ordinal_46
jmp 0x1400581ab
mov edx, 5
mov rcx, rbx
call fcn.140057900
mov eax, Ordinal_46
jmp 0x1400581ab
mov edx, 5
mov rcx, rbx
call fcn.1400575d0
mov eax, Ordinal_46
jmp 0x1400581ab
mov edx, 5
mov rcx, rbx
call fcn.140056ed0
mov eax, Ordinal_46
jmp 0x1400581ab