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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov eax, dword [esi + 0xc]
mov edi, dword [eax]
sub edx, 4
je 0x4aae93
sub edx, 1
je 0x4aae42
sub edx, 1
je 0x4aaf36
sub edx, 1
je 0x4aae17
push str.tftp_tx:_internal_error
push 0x5b7acc
push edi
call fcn.0049dc37
add esp, 0xc
jmp 0x4ab00a
inc dword [esi + 0x14]
push dword [esi + 0x14]
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push edi
call fcn.0049dbc9
mov eax, dword [esi + 0x14]
add esp, 0xc
cdq
cmp edx, dword [esi + 0x24]
jl 0x4aae4d
jg 0x4aae3b
cmp eax, dword [esi + 0x20]
jbe 0x4aae4d
mov dword [esi + 8], 0xffffff9d
mov dword [esi], 3
jmp 0x4ab00a
push dword [esi + 0x140]
lea eax, [esi + 0xc0]
push eax
mov eax, dword [esi + 0x148]
push ebx
add eax, 4
push eax
push dword [esi + 0x158]
push dword [esi + 0x10]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x4aafc8
mov eax, dword [edi + 0x40]
mov dword [edi + 0x378], eax
mov eax, dword [edi + 0x44]
mov dword [edi + 0x37c], eax
jmp 0x4ab00a
mov eax, dword [esi + 0x154]
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
or ecx, eax
movzx eax, word [esi + 0x38]
cmp ecx, eax
je 0x4aaf36
push eax
push ecx
push str.Received_ACK_for_block__d__expecting__d_n
push edi
call fcn.0049dbc9
add esp, 0x10
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
cdq
cmp edx, dword [esi + 0x24]
jl 0x4aaee1
jg 0x4aaed5
cmp eax, dword [esi + 0x20]
jbe 0x4aaee1
movzx eax, word [esi + 0x38]
push eax
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
jmp 0x4aaf23
push dword [esi + 0x140]
lea eax, [esi + 0xc0]
push eax
mov eax, dword [esi + 0x148]
push ebx
add eax, 4
push eax
lea eax, [esi + 0x158]
push eax
push dword [esi + 0x10]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x4aaf2f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0xc]
mov edx, eax
call fcn.004a6e35
push eax
push 0x5b7acc
push edi
call fcn.0049dc37
add esp, 0xc
push 0x37
pop ebx
mov eax, ebx
jmp 0x4ab00c
inc word [esi + 0x38]
mov dword [esi + 0x14], ebx
mov eax, dword [esi + 0x158]
mov byte [eax], bl
mov eax, dword [esi + 0x158]
mov byte [eax + 1], 3
movzx edx, word [esi + 0x38]
mov eax, dword [esi + 0x158]
mov ecx, edx
shr ecx, 8
mov byte [eax + 2], cl
mov eax, dword [esi + 0x158]
mov byte [eax + 3], dl
cmp word [esi + 0x38], 1
jbe 0x4aaf83
mov eax, dword [esi + 0x148]
cmp eax, dword [esi + 0x14c]
jb 0x4aae42
mov edx, dword [esi + 0x14c]
lea eax, [ebp - 4]
mov ecx, dword [esi + 0xc]
push eax
call fcn.004a3d63
pop ecx
mov ecx, dword [ebp - 4]
mov dword [esi + 0x148], ecx
test eax, eax
jne 0x4ab00c
push dword [esi + 0x140]
lea eax, [esi + 0xc0]
push eax
push ebx
lea eax, [ecx + 4]
push eax
push dword [esi + 0x158]
push dword [esi + 0x10]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x4aafec
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0xc]
mov edx, eax
call fcn.004a6e35
push eax
push 0x5b7acc
push edi
call fcn.0049dc37
add esp, 0xc
push 0x37
pop eax
jmp 0x4ab00c
mov eax, dword [esi + 0x148]
add dword [edi + 0x40], eax
mov eax, dword [edi + 0x40]
adc dword [edi + 0x44], ebx
mov ecx, dword [edi + 0x44]
mov dword [edi + 0x378], eax
mov dword [edi + 0x37c], ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret