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

Disassembly:
push edi
push esi
push ebx
sub esp, 0x20
mov ebx, eax
mov eax, dword [eax + 0x10]
mov esi, dword [eax]
cmp edx, 5
je 0x427be4
jg 0x427af0
cmp edx, 3
je 0x427c60
mov dword [esp + 8], str.tftp_rx:_internal_error
mov dword [esp + 4], 0x5a858a
mov dword [esp], esi
call fcn.0040c7a8
mov eax, 0x47
add esp, 0x20
pop ebx
pop esi
pop edi
ret
cmp edx, 6
je 0x427b48
cmp edx, 7
jne 0x427ac9
mov eax, dword [ebx + 0x18]
inc eax
mov dword [ebx + 0x18], eax
mov dword [esp + 0xc], eax
movzx eax, word [ebx + 0x30]
inc eax
and eax, 0xffff
mov dword [esp + 8], eax
mov dword [esp + 4], str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
mov dword [esp], esi
call fcn.0040ccd4
mov eax, dword [ebx + 0x20]
cmp dword [ebx + 0x18], eax
jle 0x427ce8
mov dword [ebx + 8], 0xffffff9d
mov dword [ebx], 3
xor eax, eax
add esp, 0x20
pop ebx
pop esi
pop edi
ret
mov word [ebx + 0x30], 0
mov dword [ebx + 0x18], 0
mov eax, dword [ebx + 0x150]
mov byte [eax], 0
mov eax, dword [ebx + 0x150]
mov byte [eax + 1], 4
mov eax, dword [ebx + 0x30]
mov edx, dword [ebx + 0x150]
mov ecx, eax
shr cx, 8
mov byte [edx + 2], cl
mov edx, dword [ebx + 0x150]
mov byte [edx + 3], al
mov eax, dword [ebx + 0x138]
mov dword [esp + 0x14], eax
lea eax, [ebx + 0xb8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov eax, dword [ebx + 0x150]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call sub.WS2_32.dll_sendto
sub esp, 0x18
test eax, eax
js 0x427cb4
mov dword [ebx], 1
add ebx, 0x2c
mov dword [esp], ebx
call sub.msvcrt.dll_time
xor eax, eax
add esp, 0x20
pop ebx
pop esi
pop edi
ret
mov eax, dword [ebx + 0x150]
mov byte [eax], 0
mov eax, dword [ebx + 0x150]
mov byte [eax + 1], 5
mov eax, dword [ebx + 0x30]
mov edx, dword [ebx + 0x150]
mov ecx, eax
shr cx, 8
mov byte [edx + 2], cl
mov edx, dword [ebx + 0x150]
mov byte [edx + 3], al
mov eax, dword [ebx + 0x138]
mov dword [esp + 0x14], eax
lea eax, [ebx + 0xb8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov eax, dword [ebx + 0x150]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call sub.WS2_32.dll_sendto
sub esp, 0x18
mov dword [ebx], 3
xor eax, eax
add esp, 0x20
pop ebx
pop esi
pop edi
ret
mov edx, dword [ebx + 0x14c]
movzx eax, byte [edx + 2]
shl eax, 8
movzx edi, byte [edx + 3]
or edi, eax
movzx eax, di
movzx edx, word [ebx + 0x30]
lea ecx, [edx + 1]
and ecx, 0xffff
cmp ecx, eax
je 0x427d30
cmp eax, edx
je 0x427ddc
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], str.Received_unexpected_DATA_packet_block__d__expecting_block__d_n
mov dword [esp], esi
call fcn.0040ccd4
xor eax, eax
jmp 0x427ae6
call sub.WS2_32.dll_WSAGetLastError
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x10]
mov dword [esp], eax
call fcn.004379c0
mov dword [esp + 8], eax
mov dword [esp + 4], 0x5a858a
mov dword [esp], esi
call fcn.0040c7a8
mov eax, 0x37
add esp, 0x20
pop ebx
pop esi
pop edi
ret
mov eax, dword [ebx + 0x138]
mov dword [esp + 0x14], eax
lea eax, [ebx + 0xb8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov eax, dword [ebx + 0x150]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call sub.WS2_32.dll_sendto
sub esp, 0x18
test eax, eax
js 0x427cb4
xor eax, eax
jmp 0x427ae6
mov dword [ebx + 0x18], 0
mov word [ebx + 0x30], di
mov eax, dword [ebx + 0x150]
mov byte [eax], 0
mov eax, dword [ebx + 0x150]
mov byte [eax + 1], 4
mov eax, dword [ebx + 0x30]
mov edx, dword [ebx + 0x150]
mov ecx, eax
shr cx, 8
mov byte [edx + 2], cl
mov edx, dword [ebx + 0x150]
mov byte [edx + 3], al
mov eax, dword [ebx + 0x138]
mov dword [esp + 0x14], eax
lea eax, [ebx + 0xb8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov eax, dword [ebx + 0x150]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call sub.WS2_32.dll_sendto
sub esp, 0x18
test eax, eax
js 0x427cb4
mov eax, dword [ebx + 0x144]
add eax, 3
cmp eax, dword [ebx + 0x13c]
setge al
movzx eax, al
lea eax, [eax + eax + 1]
mov dword [ebx], eax
add ebx, 0x2c
mov dword [esp], ebx
call sub.msvcrt.dll_time
xor eax, eax
jmp 0x427ae6
mov dword [esp + 8], eax
mov dword [esp + 4], str.Received_last_DATA_packet_block__d_again._n
mov dword [esp], esi
call fcn.0040ccd4
jmp 0x427d37