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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, eax
mov eax, dword [edi + 0x10]
mov esi, dword [eax]
lea eax, [ecx - 4]
xor ebx, ebx
cmp eax, 3
ja case.default.0x1002a48c
jmp dword [eax*4 + 0x1002a78c]
cmp ecx, 4
jne 0x1002a561
lea eax, [edi + 0x15c]
call fcn.10029b20
movzx edx, word [edi + 0x40]
movzx eax, ax
mov ecx, edx
cmp eax, ecx
je 0x1002a54f
test dx, dx
jne 0x1002a4c8
cmp eax, 0xffff
je 0x1002a54f
push ecx
push eax
push str.Received_ACK_for_block__d__expecting__d_n
push esi
call fcn.10022c60
inc dword [edi + 0x18]
mov eax, dword [edi + 0x18]
add esp, 0x10
cmp eax, dword [edi + 0x20]
jle 0x1002a4ef
movzx ecx, word [edi + 0x40]
push ecx
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
jmp 0x1002a538
mov edx, dword [edi + 0x148]
mov ecx, dword [edi + 0x150]
push edx
mov edx, dword [edi + 0x160]
lea eax, [edi + 0xc8]
push eax
mov eax, dword [edi + 0x14]
push 0
add ecx, 4
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x1002a546
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [edi + 0x10]
push ecx
mov edi, eax
call fcn.10027b30
add esp, 4
push eax
push 0x1004c980
push esi
call fcn.10022ce0
mov ebx, 0x37
add esp, 0xc
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [edi + 0x38]
push edx
call fcn.1003712a
add esp, 4
inc word [edi + 0x40]
jmp 0x1002a56a
mov eax, 1
mov word [edi + 0x40], ax
mov eax, 3
lea ecx, [edi + 0x160]
mov dword [edi + 0x18], ebx
call fcn.10029ad0
mov ax, word [edi + 0x40]
lea ecx, [edi + 0x160]
call fcn.10029af0
cmp word [edi + 0x40], 1
jbe 0x1002a5a5
mov ecx, dword [edi + 0x150]
cmp ecx, dword [edi + 0x154]
jl 0x1002a765
mov edx, dword [edi + 0x160]
mov eax, dword [edi + 0x10]
mov dword [edi + 0x150], ebx
mov ecx, dword [eax]
add edx, 4
mov dword [ecx + 0x114], edx
nop
mov edx, dword [edi + 0x154]
mov eax, dword [edi + 0x10]
sub edx, dword [edi + 0x150]
push eax
lea ecx, [ebp - 4]
call fcn.1002b110
add esp, 4
test eax, eax
jne 0x1002a785
mov ecx, dword [ebp - 4]
add dword [edi + 0x150], ecx
mov edx, dword [edi + 0x10]
mov eax, dword [edx]
add dword [eax + 0x114], ecx
mov eax, dword [edi + 0x150]
cmp eax, dword [edi + 0x154]
jge 0x1002a609
test ecx, ecx
jne 0x1002a5c0
mov ecx, dword [edi + 0x148]
push ecx
mov ecx, dword [edi + 0x160]
lea edx, [edi + 0xc8]
push edx
mov edx, dword [edi + 0x14]
push 0
add eax, 4
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x1002a661
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [edi + 0x10]
push ecx
mov edi, eax
call fcn.10027b30
add esp, 4
push eax
push 0x1004c980
push esi
call fcn.10022ce0
add esp, 0xc
mov eax, 0x37
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x150]
cdq
add dword [esi + 0x78], eax
mov eax, dword [esi + 0x78]
adc dword [esi + 0x7c], edx
mov edx, dword [esi + 0x7c]
push edx
push eax
call fcn.10020c10
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx ecx, word [edi + 0x40]
inc dword [edi + 0x18]
mov eax, dword [edi + 0x18]
push eax
inc ecx
and ecx, 0xffff
push ecx
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push esi
call fcn.10022c60
mov edx, dword [edi + 0x18]
add esp, 0x10
cmp edx, dword [edi + 0x20]
jle 0x1002a6c6
mov dword [edi + 8], 0xffffff9d
mov dword [edi], 3
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x148]
mov edx, dword [edi + 0x150]
push eax
mov eax, dword [edi + 0x160]
lea ecx, [edi + 0xc8]
push ecx
mov ecx, dword [edi + 0x14]
push 0
add edx, 4
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x1002a704
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [edi + 0x10]
push edx
jmp 0x1002a63c
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x78]
push eax
push ecx
call fcn.10020c10
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 5
lea ecx, [edi + 0x160]
mov dword [edi], 3
call fcn.10029ad0
mov ax, word [edi + 0x40]
lea ecx, [edi + 0x160]
call fcn.10029af0
mov edx, dword [edi + 0x148]
mov ecx, dword [edi + 0x160]
push edx
mov edx, dword [edi + 0x14]
lea eax, [edi + 0xc8]
push eax
push 0
push 4
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [edi], 3
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ecx
push str.tftp_tx:_internal_error__event:__i
push esi
call fcn.10022ce0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret