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

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
push 3
pop ebx
mov eax, dword [esi + 0x10]
mov edi, dword [eax]
sub edx, ebx
je 0x5226af
dec edx
dec edx
je 0x522657
dec edx
je 0x5225ed
dec edx
je 0x52258b
push str.tftp_rx:_internal_error
push 0x59813c
push edi
call fcn.005129bc
add esp, 0xc
push 0x47
jmp 0x522763
inc dword [esi + 0x18]
movzx eax, word [esi + 0x40]
push dword [esi + 0x18]
inc eax
and eax, 0xffff
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push edi
call fcn.00512948
mov eax, dword [esi + 0x18]
add esp, 0x10
cmp eax, dword [esi + 0x20]
jle 0x5225c0
mov dword [esi + 8], 0xffffff9d
mov dword [esi], ebx
jmp 0x52278b
push dword [esi + 0x148]
lea eax, [esi + 0xc8]
push eax
push 0
push 4
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x52278b
jmp 0x522742
xor eax, eax
xor ebx, ebx
mov word [esi + 0x40], ax
mov dword [esi + 0x18], ebx
mov eax, dword [esi + 0x160]
mov byte [eax], bl
mov eax, dword [esi + 0x160]
mov byte [eax + 1], 4
movzx edx, word [esi + 0x40]
mov eax, dword [esi + 0x160]
mov ecx, edx
shr ecx, 8
mov byte [eax + 2], cl
mov eax, dword [esi + 0x160]
mov byte [eax + 3], dl
lea eax, [esi + 0xc8]
push dword [esi + 0x148]
push eax
push ebx
push 4
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x522742
mov dword [esi], 1
jmp 0x522780
mov eax, dword [esi + 0x160]
xor ebx, ebx
mov byte [eax], bl
mov eax, dword [esi + 0x160]
mov byte [eax + 1], 5
movzx edx, word [esi + 0x40]
mov eax, dword [esi + 0x160]
mov ecx, edx
shr ecx, 8
mov byte [eax + 2], cl
mov eax, dword [esi + 0x160]
mov byte [eax + 3], dl
lea eax, [esi + 0xc8]
push dword [esi + 0x148]
push eax
push ebx
push 4
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
push 3
pop eax
mov dword [esi], eax
jmp 0x52278b
mov ecx, dword [esi + 0x15c]
movzx eax, byte [ecx + 2]
shl ax, 8
movzx edx, ax
movzx eax, byte [ecx + 3]
or edx, eax
movzx eax, word [esi + 0x40]
inc eax
and eax, 0xffff
cmp eax, edx
je 0x5226e9
push eax
push edx
push str.Received_unexpected_DATA_packet_block__d__expecting_block__d_n
push edi
call fcn.00512948
add esp, 0x10
jmp 0x52278b
mov word [esi + 0x40], dx
xor ebx, ebx
mov dword [esi + 0x18], ebx
mov eax, dword [esi + 0x160]
mov byte [eax], bl
mov eax, dword [esi + 0x160]
mov byte [eax + 1], 4
movzx edx, word [esi + 0x40]
mov eax, dword [esi + 0x160]
mov ecx, edx
shr ecx, 8
mov byte [eax + 2], cl
mov eax, dword [esi + 0x160]
mov byte [eax + 3], dl
lea eax, [esi + 0xc8]
push dword [esi + 0x148]
push eax
push ebx
push 4
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x522766
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0x10]
mov edx, eax
call fcn.0052af26
push eax
push 0x59813c
push edi
call fcn.005129bc
add esp, 0xc
push 0x37
pop eax
jmp 0x52278d
mov eax, dword [esi + 0x154]
xor ecx, ecx
add eax, 4
inc ecx
cmp dword [esi + 0x14c], eax
push 3
pop eax
cmovl ecx, eax
mov dword [esi], ecx
lea eax, [esi + 0x38]
push eax
call dword [sym.imp.MSVCR120.dll__time64]
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
ret