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

Disassembly:
sub esp, 0x80
push ebx
push ebp
push esi
mov esi, dword [esp + 0x90]
push edi
mov eax, dword [esi + 0x10]
push 3
mov edi, dword [eax]
mov eax, dword [esp + 0x9c]
pop ebp
sub eax, ebp
je 0x1004170b
dec eax
dec eax
je 0x100416b6
dec eax
je 0x1004162f
dec eax
je 0x100415b3
push str.tftp_rx:_internal_error
push 0x10092638
push edi
call fcn.100293e3
add esp, 0xc
push 0x47
jmp 0x100417cb
movzx eax, word [esi + 0x40]
inc dword [esi + 0x18]
push dword [esi + 0x18]
inc eax
and eax, 0xffff
push eax
push 0x100925e8
push edi
call fcn.10029490
mov eax, dword [esi + 0x18]
add esp, 0x10
cmp eax, dword [esi + 0x20]
jle 0x100415e6
mov dword [esi + 8], 0xffffff9d
jmp 0x10041704
push dword [esi + 0x148]
lea eax, [esi + 0xc8]
push eax
push 0
push 4
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x10041804
push 0x80
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.1004de15
push eax
push 0x1009261c
jmp 0x100417c0
xor eax, eax
mov word [esi + 0x40], ax
xor ebx, ebx
mov dword [esi + 0x18], ebx
mov eax, dword [esi + 0x160]
mov byte [eax], bl
mov eax, dword [esi + 0x160]
mov byte [eax + 1], 4
movzx edx, word [esi + 0x40]
mov eax, dword [esi + 0x160]
mov ecx, edx
shr ecx, 8
mov byte [eax + 2], cl
mov eax, dword [esi + 0x160]
mov byte [eax + 3], dl
push dword [esi + 0x148]
lea eax, [esi + 0xc8]
push eax
push ebx
push 4
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x100416ab
push 0x80
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.1004de15
push eax
push 0x100925e4
jmp 0x100417c0
mov dword [esi], 1
jmp 0x100417e8
mov eax, dword [esi + 0x160]
xor ebx, ebx
mov byte [eax], bl
mov eax, dword [esi + 0x160]
mov byte [eax + 1], 5
movzx edx, word [esi + 0x40]
mov eax, dword [esi + 0x160]
mov ecx, edx
shr ecx, 8
mov byte [eax + 2], cl
mov eax, dword [esi + 0x160]
mov byte [eax + 3], dl
push dword [esi + 0x148]
lea eax, [esi + 0xc8]
push eax
push ebx
push 4
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [esi], ebp
jmp 0x10041804
mov ecx, dword [esi + 0x15c]
xor ebx, ebx
movzx eax, byte [ecx + 2]
shl ax, 8
movzx ebp, ax
movzx eax, byte [ecx + 3]
movzx ecx, word [esi + 0x40]
or ebp, eax
lea eax, [ecx + 1]
and eax, 0xffff
cmp eax, ebp
jne 0x10041739
mov dword [esi + 0x18], ebx
jmp 0x10041750
cmp ecx, ebp
jne 0x100417f4
push ebp
push str.Received_last_DATA_packet_block__d_again._n
push edi
call fcn.10029490
add esp, 0xc
mov word [esi + 0x40], bp
mov eax, dword [esi + 0x160]
mov byte [eax], bl
mov eax, dword [esi + 0x160]
mov byte [eax + 1], 4
movzx edx, word [esi + 0x40]
mov eax, dword [esi + 0x160]
mov ecx, edx
shr ecx, 8
mov byte [eax + 2], cl
mov eax, dword [esi + 0x160]
mov byte [eax + 3], dl
push dword [esi + 0x148]
lea eax, [esi + 0xc8]
push eax
push ebx
push 4
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x100417ce
push 0x80
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.1004de15
push eax
push 0x100925e0
push edi
call fcn.100293e3
add esp, 0x18
push 0x37
pop eax
jmp 0x10041806
mov eax, dword [esi + 0x154]
xor ecx, ecx
add eax, 4
inc ecx
cmp dword [esi + 0x14c], eax
push 3
pop eax
cmovl ecx, eax
mov dword [esi], ecx
lea eax, [esi + 0x38]
push eax
call fcn.1005a18a
pop ecx
jmp 0x10041804
push eax
push ebp
push str.Received_unexpected_DATA_packet_block__d__expecting_block__d_n
push edi
call fcn.10029490
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret