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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [esi + 0x10]
sub esp, 8
push ebx
mov ebx, dword [eax]
push edi
lea eax, [ecx - 4]
xor edi, edi
cmp eax, 3
ja case.default.0x4d1dab
jmp dword [eax*4 + 0x4d2060]
cmp ecx, 4
jne 0x4d1e7f
lea eax, [esi + 0x15c]
call fcn.004d1440
movzx edx, word [esi + 0x40]
movzx eax, ax
mov ecx, edx
cmp eax, ecx
je 0x4d1e6d
test dx, dx
jne 0x4d1de7
cmp eax, 0xffff
je 0x4d1e6d
push ecx
push eax
push str.Received_ACK_for_block__d__expecting__d_n
push ebx
call fcn.004c1df0
inc dword [esi + 0x18]
mov eax, dword [esi + 0x18]
add esp, 0x10
cmp eax, dword [esi + 0x20]
jle 0x4d1e0e
movzx ecx, word [esi + 0x40]
push ecx
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
jmp 0x4d1e57
mov edx, dword [esi + 0x148]
mov ecx, dword [esi + 0x150]
push edx
mov edx, dword [esi + 0x160]
lea eax, [esi + 0xc8]
push eax
mov eax, dword [esi + 0x14]
push 0
add ecx, 4
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x4d1e65
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0x10]
push ecx
mov edi, eax
call fcn.004e1010
add esp, 4
push eax
push 0x54b538
push ebx
call fcn.004c1e70
mov edi, 0x37
add esp, 0xc
mov eax, edi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esi + 0x38]
push edx
call fcn.004fa8a7
add esp, 4
inc word [esi + 0x40]
jmp 0x4d1e88
mov eax, 1
mov word [esi + 0x40], ax
mov eax, 3
lea ecx, [esi + 0x160]
mov dword [esi + 0x18], edi
call fcn.004d13f0
mov ax, word [esi + 0x40]
lea ecx, [esi + 0x160]
call fcn.004d1410
cmp word [esi + 0x40], 1
jbe 0x4d1ec3
mov ecx, dword [esi + 0x150]
cmp ecx, dword [esi + 0x154]
jl 0x4d203b
mov edx, dword [esi + 0x10]
lea ecx, [esi + 0x150]
push edx
mov edx, dword [esi + 0x154]
mov dword [ebp - 4], ecx
call fcn.004c66a0
add esp, 4
test eax, eax
jne 0x4d205a
mov eax, dword [esi + 0x148]
mov edx, dword [ebp - 4]
push eax
mov eax, dword [edx]
mov edx, dword [esi + 0x14]
lea ecx, [esi + 0xc8]
push ecx
mov ecx, dword [esi + 0x160]
push 0
add eax, 4
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x4d1f42
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0x10]
push ecx
mov edi, eax
call fcn.004e1010
add esp, 4
push eax
push 0x54b538
push ebx
call fcn.004c1e70
add esp, 0xc
mov eax, 0x37
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
mov eax, dword [edx]
cdq
add dword [ebx + 0x78], eax
mov ecx, dword [ebx + 0x78]
adc dword [ebx + 0x7c], edx
mov eax, dword [ebx + 0x7c]
push eax
push ecx
mov eax, ebx
call fcn.004cc7b0
add esp, 8
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
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.004c1df0
mov eax, dword [esi + 0x18]
add esp, 0x10
cmp eax, dword [esi + 0x20]
jle 0x4d1fa6
mov dword [esi + 8], 0xffffff9d
mov dword [esi], 3
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x148]
mov eax, dword [esi + 0x150]
push ecx
mov ecx, dword [esi + 0x160]
lea edx, [esi + 0xc8]
push edx
mov edx, dword [esi + 0x14]
push 0
add eax, 4
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x4d1f14
mov edx, dword [ebx + 0x7c]
mov eax, dword [ebx + 0x78]
push edx
push eax
mov eax, ebx
call fcn.004cc7b0
add esp, 8
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 5
lea ecx, [esi + 0x160]
mov dword [esi], 3
call fcn.004d13f0
mov ax, word [esi + 0x40]
lea ecx, [esi + 0x160]
call fcn.004d1410
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]
mov dword [esi], 3
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push ecx
push str.tftp_tx:_internal_error__event:__i
push ebx
call fcn.004c1e70
add esp, 0xc
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret