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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov ecx, str.octet
push edi
mov edi, str.netascii
mov eax, dword [esi + 0x10]
mov ebx, dword [eax]
cmp byte [ebx + 0x2bb], 0
cmove edi, ecx
cmp edx, 7
ja case.0x10021b77.1
jmp dword [edx*4 + 0x10021ef4]
inc dword [esi + 0x18]
mov eax, dword [esi + 0x18]
cmp eax, dword [esi + 0x20]
jle 0x10021ba9
mov dword [esi + 8], 0xffffff9e
mov dword [esi], 3
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x160]
cmp byte [ebx + 0x2c9], 0
mov byte [eax], 0
mov eax, dword [esi + 0x160]
je 0x10021bfc
mov byte [eax + 1], 2
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x160]
add ecx, 4
mov eax, dword [eax]
mov dword [eax + 0x10c], ecx
mov edx, dword [ebx + 0x8648]
mov eax, edx
mov ecx, dword [ebx + 0x864c]
and eax, ecx
cmp eax, 0xffffffff
je 0x10021c00
push ecx
push edx
mov ecx, ebx
call fcn.1001b040
add esp, 8
jmp 0x10021c00
mov byte [eax + 1], 1
mov eax, dword [esi + 0x10]
push 0
mov dword [ebp - 0x50], 0
mov eax, dword [eax]
mov edx, dword [eax + 0x8624]
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x50]
inc edx
push eax
push 0
call fcn.100278d0
add esp, 0x10
test eax, eax
jne 0x10021e5c
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x10021e5c
push 0
push edi
push 0
push eax
mov eax, dword [esi + 0x160]
push str._s_c_s_c
push dword [esi + 0x154]
add eax, 2
push eax
call fcn.1001e160
mov ecx, dword [ebp - 0x50]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10021c63
sub ecx, edx
lea edx, [edi + 1]
nop
mov al, byte [edi]
inc edi
test al, al
jne 0x10021c70
sub edi, edx
add edi, 4
add edi, ecx
cmp byte [ebx + 0x2c9], al
je 0x10021cb2
mov edx, dword [ebx + 0x8648]
mov eax, edx
mov ecx, dword [ebx + 0x864c]
and eax, ecx
cmp eax, 0xffffffff
je 0x10021cb2
push ecx
push edx
push str._I64d
lea eax, [ebp - 0x48]
push 0x40
push eax
call fcn.1001e160
add esp, 0x14
jmp 0x10021cbb
mov eax, 0x30
mov word [ebp - 0x48], ax
mov ecx, dword [esi + 0x160]
lea eax, [edi + 6]
add ecx, edi
cmp eax, dword [esi + 0x154]
jbe 0x10021cd2
xor eax, eax
jmp 0x10021cdc
mov edx, str.tsize
call fcn.10021a90
add edi, eax
lea ecx, [ebp - 0x48]
mov eax, dword [esi + 0x160]
lea edx, [ecx + 1]
add eax, edi
mov dword [ebp - 0x4c], eax
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10021cf0
sub ecx, edx
lea eax, [edi + 1]
add eax, ecx
cmp eax, dword [esi + 0x154]
jbe 0x10021d0a
xor eax, eax
jmp 0x10021d15
mov ecx, dword [ebp - 0x4c]
lea edx, [ebp - 0x48]
call fcn.10021a90
push dword [esi + 0x158]
add edi, eax
lea eax, [ebp - 0x48]
push 0x10056858
push 0x40
push eax
call fcn.1001e160
mov ecx, dword [esi + 0x160]
lea eax, [edi + 8]
add esp, 0x10
add ecx, edi
cmp eax, dword [esi + 0x154]
jbe 0x10021d47
xor eax, eax
jmp 0x10021d51
mov edx, str.blksize
call fcn.10021a90
add edi, eax
lea ecx, [ebp - 0x48]
mov eax, dword [esi + 0x160]
lea edx, [ecx + 1]
add eax, edi
mov dword [ebp - 0x4c], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10021d64
sub ecx, edx
lea eax, [edi + 1]
add eax, ecx
cmp eax, dword [esi + 0x154]
jbe 0x10021d7e
xor eax, eax
jmp 0x10021d89
mov ecx, dword [ebp - 0x4c]
lea edx, [ebp - 0x48]
call fcn.10021a90
push dword [esi + 0x1c]
add edi, eax
lea eax, [ebp - 0x48]
push 0x10056858
push 0x40
push eax
call fcn.1001e160
mov ecx, dword [esi + 0x160]
lea eax, [edi + 8]
add esp, 0x10
add ecx, edi
cmp eax, dword [esi + 0x154]
jbe 0x10021db8
xor eax, eax
jmp 0x10021dc2
mov edx, str.timeout
call fcn.10021a90
add edi, eax
lea ecx, [ebp - 0x48]
mov eax, dword [esi + 0x160]
lea edx, [ecx + 1]
add eax, edi
mov dword [ebp - 0x4c], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10021dd5
sub ecx, edx
lea eax, [edi + 1]
add eax, ecx
cmp eax, dword [esi + 0x154]
jbe 0x10021def
xor eax, eax
jmp 0x10021dfa
mov ecx, dword [ebp - 0x4c]
lea edx, [ebp - 0x48]
call fcn.10021a90
add edi, eax
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 0x4c]
push dword [eax + 0x10]
push dword [eax + 0x18]
push 0
push edi
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, edi
je 0x10021e3d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0x10]
mov edx, eax
call fcn.100320c0
push eax
push 0x100568d8
push ebx
call fcn.10010d80
add esp, 0xc
push dword [ebp - 0x50]
call dword [0x1005f678]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
cmp byte [ebx + 0x2c9], 0
mov edx, 6
mov ecx, esi
je 0x10021ebc
call fcn.10021ac0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
mov edx, 4
mov ecx, esi
call fcn.10021ac0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
mov edx, 3
mov ecx, esi
call fcn.10021b00
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100370be
mov esp, ebp
pop ebp
ret
push str.tftp_send_first:_internal_error
push ebx
call fcn.10010d80
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.100370be
mov esp, ebp
pop ebp
ret