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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x10]
mov eax, dword [eax]
mov dword [ebp - 4], eax
and dword [ebp - 8], 0
mov eax, dword [ebp - 4]
add eax, 0x70
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 4
je 0x4709dd
cmp dword [ebp - 0x10], 5
je 0x470da0
cmp dword [ebp - 0x10], 6
je 0x4709dd
cmp dword [ebp - 0x10], 7
je 0x470cc7
jmp 0x470e09
cmp dword [ebp + 0xc], 4
jne 0x470b0f
mov eax, dword [ebp + 8]
add eax, 0x15c
push eax
call fcn.004719d7
pop ecx
movzx eax, ax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0x40]
cmp dword [ebp - 0x18], eax
je 0x470aee
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0x40]
test eax, eax
jne 0x470a24
cmp dword [ebp - 0x18], 0xffff
je 0x470aee
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0x40]
push eax
push dword [ebp - 0x18]
push str.Received_ACK_for_block__d__expecting__d_n
push dword [ebp - 4]
call fcn.004460bd
add esp, 0x10
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
inc eax
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x18], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 0x18]
cmp eax, dword [ecx + 0x20]
jle 0x470a7b
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0x40]
push eax
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
push dword [ebp - 4]
call fcn.004465bf
add esp, 0xc
mov dword [ebp - 8], 0x37
jmp 0x470ae6
mov eax, dword [ebp + 8]
push dword [eax + 0x148]
mov eax, dword [ebp + 8]
add eax, 0xc8
push eax
push 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x150]
add eax, 4
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0x160]
mov eax, dword [ebp + 8]
push dword [eax + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jge 0x470ae6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0x10]
call fcn.004680bc
pop ecx
pop ecx
push eax
push 0x4c6730
push dword [ebp - 4]
call fcn.004465bf
add esp, 0xc
mov dword [ebp - 8], 0x37
mov eax, dword [ebp - 8]
jmp 0x470e1f
mov eax, dword [ebp + 8]
add eax, 0x38
push eax
call fcn.0041aef4
pop ecx
mov eax, dword [ebp + 8]
mov ax, word [eax + 0x40]
add ax, 1
mov ecx, dword [ebp + 8]
mov word [ecx + 0x40], ax
jmp 0x470b19
xor eax, eax
inc eax
mov ecx, dword [ebp + 8]
mov word [ecx + 0x40], ax
mov eax, dword [ebp + 8]
and dword [eax + 0x18], 0
push 3
mov eax, dword [ebp + 8]
add eax, 0x160
push eax
call fcn.00471a56
pop ecx
pop ecx
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0x40]
push eax
mov eax, dword [ebp + 8]
add eax, 0x160
push eax
call fcn.00471a26
pop ecx
pop ecx
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0x40]
cmp eax, 1
jle 0x470b7a
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 0x150]
cmp eax, dword [ecx + 0x154]
jge 0x470b7a
mov eax, dword [ebp + 8]
mov dword [eax], 3
xor eax, eax
jmp 0x470e1f
mov eax, dword [ebp + 8]
and dword [eax + 0x150], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x160]
add eax, 4
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x10]
mov ecx, dword [ecx]
mov dword [ecx + 0x148], eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 0x154]
sub eax, dword [ecx + 0x150]
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0x10]
call fcn.00459d7c
add esp, 0xc
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x470bd4
mov eax, dword [ebp - 8]
jmp 0x470e1f
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x150]
add eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x150], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x10]
mov eax, dword [eax]
mov eax, dword [eax + 0x148]
add eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x10]
mov ecx, dword [ecx]
mov dword [ecx + 0x148], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 0x150]
cmp eax, dword [ecx + 0x154]
jge 0x470c26
cmp dword [ebp - 0x1c], 0
jne 0x470b9e
mov eax, dword [ebp + 8]
push dword [eax + 0x148]
mov eax, dword [ebp + 8]
add eax, 0xc8
push eax
push 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x150]
add eax, 4
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0x160]
mov eax, dword [ebp + 8]
push dword [eax + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jge 0x470c92
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0x10]
call fcn.004680bc
pop ecx
pop ecx
push eax
push 0x4c6734
push dword [ebp - 4]
call fcn.004465bf
add esp, 0xc
push 0x37
pop eax
jmp 0x470e1f
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x150]
cdq
mov ecx, dword [ebp - 0x14]
add eax, dword [ecx + 0x28]
adc edx, dword [ecx + 0x2c]
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 0x28], eax
mov dword [ecx + 0x2c], edx
mov eax, dword [ebp - 0x14]
push dword [eax + 0x2c]
push dword [eax + 0x28]
push dword [ebp - 4]
call fcn.0045e1a3
add esp, 0xc
jmp 0x470e1c
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
inc eax
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x18], eax
mov eax, dword [ebp + 8]
push dword [eax + 0x18]
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0x40]
inc eax
and eax, 0xffff
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push dword [ebp - 4]
call fcn.004460bd
add esp, 0x10
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 0x18]
cmp eax, dword [ecx + 0x20]
jle 0x470d1e
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0xffffff9d
mov eax, dword [ebp + 8]
mov dword [eax], 3
jmp 0x470d9e
mov eax, dword [ebp + 8]
push dword [eax + 0x148]
mov eax, dword [ebp + 8]
add eax, 0xc8
push eax
push 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x150]
add eax, 4
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0x160]
mov eax, dword [ebp + 8]
push dword [eax + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jge 0x470d8a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0x10]
call fcn.004680bc
pop ecx
pop ecx
push eax
push 0x4c676c
push dword [ebp - 4]
call fcn.004465bf
add esp, 0xc
push 0x37
pop eax
jmp 0x470e1f
mov eax, dword [ebp - 0x14]
push dword [eax + 0x2c]
push dword [eax + 0x28]
push dword [ebp - 4]
call fcn.0045e1a3
add esp, 0xc
jmp 0x470e1c
mov eax, dword [ebp + 8]
mov dword [eax], 3
push 5
mov eax, dword [ebp + 8]
add eax, 0x160
push eax
call fcn.00471a56
pop ecx
pop ecx
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0x40]
push eax
mov eax, dword [ebp + 8]
add eax, 0x160
push eax
call fcn.00471a26
pop ecx
pop ecx
mov eax, dword [ebp + 8]
push dword [eax + 0x148]
mov eax, dword [ebp + 8]
add eax, 0xc8
push eax
push 0
push 4
mov eax, dword [ebp + 8]
push dword [eax + 0x160]
mov eax, dword [ebp + 8]
push dword [eax + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
mov eax, dword [ebp + 8]
mov dword [eax], 3
jmp 0x470e1c
push dword [ebp + 0xc]
push str.tftp_tx:_internal_error__event:__i
push dword [ebp - 4]
call fcn.004465bf
add esp, 0xc
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret