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

Disassembly:
push ebx
push esi
mov esi, eax
mov eax, dword [esi + 0x10]
mov ebx, dword [eax]
mov eax, dword [esp + 0xc]
add eax, 0xfffffffd
push edi
cmp eax, 4
ja case.0x540aaa.4
jmp dword [eax*4 + 0x540cf0]
lea eax, [esi + 0x15c]
call fcn.005407b0
movzx ecx, word [esi + 0x40]
movzx edi, ax
lea eax, [ecx + 1]
and eax, 0xffff
cmp eax, edi
jne 0x540ad8
mov dword [esi + 0x18], 0
jmp 0x540aef
cmp ecx, edi
jne 0x540b64
push edi
push str.Received_last_DATA_packet_block__d_again._n
push ebx
call fcn.005301c0
add esp, 0xc
mov word [esi + 0x40], di
lea edi, [esi + 0x160]
mov eax, 4
mov ecx, edi
call fcn.00540760
mov ax, word [esi + 0x40]
mov ecx, edi
call fcn.00540780
mov ecx, dword [esi + 0x148]
mov eax, dword [edi]
push ecx
mov ecx, dword [esi + 0x14]
lea edx, [esi + 0xc8]
push edx
push 0
push 4
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jl 0x540c64
mov eax, dword [esi + 0x154]
xor ecx, ecx
add eax, 4
cmp dword [esi + 0x14c], eax
setl cl
add esi, 0x38
push esi
lea ecx, [ecx + ecx + 1]
mov dword [esi - 0x38], ecx
call fcn.0055bc1a
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
ret
push eax
push edi
push str.Received_unexpected_DATA_packet_block__d__expecting_block__d_n
push ebx
call fcn.005301c0
add esp, 0x10
pop edi
pop esi
xor eax, eax
pop ebx
ret
xor edx, edx
lea edi, [esi + 0x160]
lea eax, [edx + 4]
mov ecx, edi
mov word [esi + 0x40], dx
mov dword [esi + 0x18], edx
call fcn.00540760
mov ax, word [esi + 0x40]
mov ecx, edi
call fcn.00540780
mov eax, dword [esi + 0x148]
mov edx, dword [edi]
push eax
mov eax, dword [esi + 0x14]
lea ecx, [esi + 0xc8]
push ecx
push 0
push 4
push edx
push eax
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x540be9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0x10]
push eax
push ecx
call fcn.00536130
push eax
push 0x5709f4
push ebx
call fcn.00530250
add esp, 0x14
pop edi
pop esi
mov eax, 0x37
pop ebx
ret
mov dword [esi], 1
add esi, 0x38
push esi
call fcn.0055bc1a
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
ret
movzx edx, word [esi + 0x40]
inc dword [esi + 0x18]
mov eax, dword [esi + 0x18]
push eax
inc edx
and edx, 0xffff
push edx
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebx
call fcn.005301c0
mov eax, dword [esi + 0x18]
add esp, 0x10
cmp eax, dword [esi + 0x20]
jle 0x540c3d
pop edi
mov dword [esi + 8], 0xffffff9d
mov dword [esi], 3
pop esi
xor eax, eax
pop ebx
ret
mov ecx, dword [esi + 0x148]
mov eax, dword [esi + 0x160]
push ecx
mov ecx, dword [esi + 0x14]
lea edx, [esi + 0xc8]
push edx
push 0
push 4
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x540cce
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esi + 0x10]
push eax
push edx
call fcn.00536130
push eax
push 0x5709f4
push ebx
call fcn.00530250
add esp, 0x14
pop edi
pop esi
mov eax, 0x37
pop ebx
ret
lea edi, [esi + 0x160]
mov eax, 5
mov ecx, edi
call fcn.00540760
mov ax, word [esi + 0x40]
mov ecx, edi
call fcn.00540780
mov eax, dword [esi + 0x148]
mov edx, dword [edi]
push eax
mov eax, dword [esi + 0x14]
lea ecx, [esi + 0xc8]
push ecx
push 0
push 4
push edx
push eax
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [esi], 3
pop edi
pop esi
xor eax, eax
pop ebx
ret
push str.tftp_rx:_internal_error
push 0x5709f4
push ebx
call fcn.00530250
add esp, 0xc
pop edi
pop esi
mov eax, 0x47
pop ebx
ret