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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x5c31c8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov edi, str.netascii
push 3
mov eax, dword [esi + 0x10]
mov ecx, dword [eax]
mov eax, str.octet
mov dword [ebp - 0x50], ecx
cmp dword [ecx + 0x2a4], ebx
cmove edi, eax
pop eax
sub edx, ebx
je 0x520599
sub edx, eax
je 0x520593
dec edx
je 0x520587
dec edx
je 0x520580
dec edx
je 0x520567
dec edx
je 0x520599
push str.tftp_send_first:_internal_error
push ecx
call fcn.00510cc2
pop ecx
jmp 0x520840
cmp dword [ecx + 0x2dc], ebx
mov ecx, esi
push 6
pop edx
jne 0x52058c
call fcn.005204d1
mov ebx, eax
jmp 0x520841
mov dword [esi], eax
jmp 0x520841
push 4
pop edx
mov ecx, esi
call fcn.00520495
jmp 0x520579
mov edx, eax
mov ecx, esi
jmp 0x520574
inc dword [esi + 0x18]
mov eax, dword [esi + 0x18]
cmp eax, dword [esi + 0x20]
jle 0x5205b8
mov dword [esi + 8], 0xffffff9e
xor eax, eax
mov dword [esi], 3
jmp 0x520843
mov eax, dword [esi + 0x160]
cmp dword [ecx + 0x2dc], ebx
mov byte [eax], bl
mov eax, dword [esi + 0x160]
je 0x52060d
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 + 0xdc], ecx
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx + 0x1b0]
mov eax, edx
and eax, dword [ecx + 0x1b4]
cmp eax, 0xffffffff
je 0x520611
push dword [ecx + 0x1b4]
push edx
call fcn.00518c1d
add esp, 8
jmp 0x520611
mov byte [eax + 1], 1
mov eax, dword [esi + 0x10]
push ebx
push ebx
mov eax, dword [eax]
mov edx, dword [eax + 0x8658]
inc edx
call fcn.005224ca
mov dword [ebp - 0x54], eax
pop ecx
pop ecx
test eax, eax
jne 0x520635
push 0x1b
pop eax
jmp 0x520843
push ebx
push edi
push ebx
push eax
mov eax, dword [esi + 0x160]
push str._s_c_s_c
push dword [esi + 0x154]
add eax, 2
push eax
call fcn.0051b484
mov ecx, dword [ebp - 0x54]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x52065c
sub ecx, edx
lea edx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x520668
mov eax, dword [ebp - 0x50]
sub edi, edx
add edi, 4
add edi, ecx
cmp dword [eax + 0x2dc], ebx
je 0x5206ad
mov ecx, dword [eax + 0x1b0]
mov edx, dword [eax + 0x1b4]
mov eax, ecx
and eax, edx
cmp eax, 0xffffffff
je 0x5206ad
push edx
push ecx
push str._lld
lea eax, [ebp - 0x48]
push 0x40
push eax
call fcn.0051b484
add esp, 0x14
jmp 0x5206b4
push 0x30
pop eax
mov word [ebp - 0x48], ax
mov ecx, dword [esi + 0x160]
lea eax, [edi + 6]
add ecx, edi
cmp eax, dword [esi + 0x154]
jbe 0x5206cb
mov eax, ebx
jmp 0x5206d5
mov edx, str.tsize
call fcn.00520475
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 0x5206e8
sub ecx, edx
lea eax, [edi + 1]
add eax, ecx
cmp eax, dword [esi + 0x154]
jbe 0x520702
mov eax, ebx
jmp 0x52070d
mov ecx, dword [ebp - 0x4c]
lea edx, [ebp - 0x48]
call fcn.00520475
push dword [esi + 0x158]
add edi, eax
lea eax, [ebp - 0x48]
push 0x590014
push 0x40
push eax
call fcn.0051b484
mov ecx, dword [esi + 0x160]
lea eax, [edi + 8]
add esp, 0x10
add ecx, edi
cmp eax, dword [esi + 0x154]
jbe 0x52073f
mov eax, ebx
jmp 0x520749
mov edx, str.blksize
call fcn.00520475
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 0x52075c
sub ecx, edx
lea eax, [edi + 1]
add eax, ecx
cmp eax, dword [esi + 0x154]
jbe 0x520776
mov eax, ebx
jmp 0x520781
mov ecx, dword [ebp - 0x4c]
lea edx, [ebp - 0x48]
call fcn.00520475
push dword [esi + 0x1c]
add edi, eax
lea eax, [ebp - 0x48]
push 0x590014
push 0x40
push eax
call fcn.0051b484
mov ecx, dword [esi + 0x160]
lea eax, [edi + 8]
add esp, 0x10
add ecx, edi
cmp eax, dword [esi + 0x154]
jbe 0x5207b0
mov eax, ebx
jmp 0x5207ba
mov edx, str.timeout
call fcn.00520475
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 0x5207cd
sub ecx, edx
lea eax, [edi + 1]
add eax, ecx
cmp eax, dword [esi + 0x154]
jbe 0x5207e7
mov eax, ebx
jmp 0x5207f2
mov ecx, dword [ebp - 0x4c]
lea edx, [ebp - 0x48]
call fcn.00520475
add edi, eax
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 0x3c]
push dword [eax + 0x10]
push dword [eax + 0x18]
push ebx
push edi
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, edi
je 0x520837
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0x10]
mov edx, eax
call fcn.0052922c
mov ecx, dword [ebp - 0x50]
push eax
push 0x5949b0
push ecx
call fcn.00510cc2
add esp, 0xc
push dword [ebp - 0x54]
call dword [0x5c6c40]
pop ecx
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0055daac
mov esp, ebp
pop ebp
ret