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

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
push 4
mov eax, dword [edi + 0x10]
pop ebp
mov esi, dword [eax]
mov eax, dword [esp + 0x18]
xor ebx, ebx
sub eax, ebp
je 0x10042242
dec eax
je 0x100421ff
dec eax
je 0x10042242
dec eax
je 0x10042193
push dword [esp + 0x18]
push str.tftp_tx:_internal_error__event:__i
push esi
call fcn.1003054c
jmp 0x10042430
movzx eax, word [edi + 0x40]
inc dword [edi + 0x18]
push dword [edi + 0x18]
inc eax
and eax, 0xffff
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push esi
call fcn.10030603
mov eax, dword [edi + 0x18]
add esp, 0x10
cmp eax, dword [edi + 0x20]
jle 0x100421cc
mov dword [edi + 8], 0xffffff9d
mov dword [edi], 3
jmp 0x10042433
push dword [edi + 0x148]
lea eax, [edi + 0xc8]
push eax
mov eax, dword [edi + 0x150]
push ebx
add eax, ebp
push eax
push dword [edi + 0x160]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x1004241e
jmp 0x100423e8
push 3
pop ebp
lea esi, [edi + 0x160]
push 5
push esi
mov dword [edi], ebp
call fcn.100414bd
movzx eax, word [edi + 0x40]
push eax
push esi
call fcn.100414a3
add esp, 0x10
push dword [edi + 0x148]
lea eax, [edi + 0xc8]
push eax
push ebx
push 4
push dword [esi]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [edi], ebp
jmp 0x10042433
xor eax, eax
inc eax
cmp dword [esp + 0x18], ebp
jne 0x1004230f
lea eax, [edi + 0x15c]
push eax
call fcn.1004147c
pop ecx
movzx ecx, word [edi + 0x40]
movzx eax, ax
mov edx, ecx
cmp eax, edx
je 0x100422ff
test cx, cx
jne 0x1004227d
cmp eax, 0xffff
je 0x100422ff
push edx
push eax
push str.Received_ACK_for_block__d__expecting__d_n
push esi
call fcn.10030603
add esp, 0x10
inc dword [edi + 0x18]
mov eax, dword [edi + 0x18]
cmp eax, dword [edi + 0x20]
jle 0x100422ad
movzx eax, word [edi + 0x40]
push eax
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
push esi
call fcn.1003054c
add esp, 0xc
jmp 0x100422f5
push dword [edi + 0x148]
lea eax, [edi + 0xc8]
push eax
mov eax, dword [edi + 0x150]
push ebx
add eax, ebp
push eax
push dword [edi + 0x160]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x100422f8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [edi + 0x10]
call fcn.1003cb1a
push eax
push 0x1009e300
push esi
call fcn.1003054c
add esp, 0x14
push 0x37
pop ebx
mov eax, ebx
jmp 0x10042435
lea eax, [edi + 0x38]
push eax
call fcn.1005a43d
inc word [edi + 0x40]
pop ecx
jmp 0x10042313
mov word [edi + 0x40], ax
push 3
pop ebp
lea eax, [edi + 0x160]
push ebp
push eax
mov dword [edi + 0x18], ebx
call fcn.100414bd
movzx eax, word [edi + 0x40]
push eax
lea eax, [edi + 0x160]
push eax
call fcn.100414a3
xor eax, eax
inc eax
add esp, 0x10
cmp word [edi + 0x40], ax
jbe 0x10042355
mov eax, dword [edi + 0x150]
cmp eax, dword [edi + 0x154]
jl 0x1004223b
mov eax, dword [edi + 0x10]
lea ebp, [edi + 0x160]
mov dword [edi + 0x150], ebx
mov ecx, dword [ebp]
mov eax, dword [eax]
add ecx, 4
mov dword [eax + 0x150], ecx
lea eax, [esp + 0x18]
push eax
mov eax, dword [edi + 0x154]
sub eax, dword [edi + 0x150]
push eax
push dword [edi + 0x10]
call fcn.10032cef
add esp, 0xc
test eax, eax
jne 0x10042435
mov ecx, dword [esp + 0x18]
add dword [edi + 0x150], ecx
mov eax, dword [edi + 0x10]
mov eax, dword [eax]
add dword [eax + 0x150], ecx
mov eax, dword [edi + 0x150]
cmp eax, dword [edi + 0x154]
jge 0x100423c0
cmp dword [esp + 0x18], ebx
jne 0x10042372
push dword [edi + 0x148]
lea eax, [edi + 0xc8]
push eax
mov eax, dword [edi + 0x150]
push ebx
add eax, 4
push eax
push dword [ebp]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x1004240b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [edi + 0x10]
call fcn.1003cb1a
push eax
push 0x1009e300
push esi
call fcn.1003054c
add esp, 0x14
push 0x37
pop eax
jmp 0x10042435
mov eax, dword [edi + 0x150]
cdq
add dword [esi + 0x98], eax
adc dword [esi + 0x9c], edx
push dword [esi + 0x9c]
push dword [esi + 0x98]
push esi
call fcn.1003923a
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret