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

Disassembly:
sub esp, 0x54
mov eax, dword [0x580ca0]
xor eax, esp
mov dword [esp + 0x50], eax
mov ecx, dword [ebx + 0x10]
mov eax, dword [esp + 0x58]
push ebp
push esi
mov esi, dword [ecx]
cmp dword [esi + 0x2f4], 0
push edi
mov dword [esp + 0x10], str.octet
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], 0
je 0x5057cf
mov dword [esp + 0x10], str.netascii
cmp eax, 7
ja case.0x5057d8.1
jmp dword [eax*4 + 0x505ae4]
inc dword [ebx + 0x18]
mov eax, dword [ebx + 0x18]
cmp eax, dword [ebx + 0x20]
jle 0x50580b
pop edi
pop esi
mov dword [ebx + 8], 0xffffff9e
mov dword [ebx], 3
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.004ba1db
add esp, 0x54
ret
cmp dword [esi + 0x32c], 0
lea ebp, [ebx + 0x160]
mov ecx, ebp
je 0x505859
mov eax, 2
call fcn.00504a70
mov eax, dword [ebx + 0x10]
mov edx, dword [ebp]
mov ecx, dword [eax]
add edx, 4
mov dword [ecx + 0x114], edx
mov eax, dword [esi + 0x8708]
mov ecx, dword [esi + 0x870c]
mov edx, eax
and edx, ecx
cmp edx, 0xffffffff
je 0x505863
push ecx
push eax
push esi
call fcn.00513760
add esp, 0xc
jmp 0x505863
mov eax, 1
call fcn.00504a70
mov eax, dword [ebx + 0x10]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x86d8]
push 0
push 0
inc edx
push edx
push esi
call fcn.00512e90
mov edi, eax
add esp, 0x10
mov dword [esp + 0x18], edi
test edi, edi
jne 0x50589c
lea eax, [edi + 0x1b]
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.004ba1db
add esp, 0x54
ret
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + 0x154]
mov edx, dword [ebp]
push 0
push eax
push 0
push edi
push str._s_c_s_c
push ecx
add edx, 2
push edx
call fcn.004fcc50
mov eax, edi
add esp, 0x1c
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5058c6
sub eax, edx
mov edx, eax
mov eax, dword [esp + 0x10]
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5058d8
sub eax, edi
cmp dword [esi + 0x32c], 0
mov edi, eax
lea edi, [edi + edx + 4]
je 0x50591d
mov eax, dword [esi + 0x8708]
mov esi, dword [esi + 0x870c]
mov ecx, eax
and ecx, esi
cmp ecx, 0xffffffff
je 0x50591d
push esi
push eax
push 0x543654
lea edx, [esp + 0x28]
push 0x40
push edx
call fcn.004fcc50
add esp, 0x14
jmp 0x505927
mov eax, 0x30
mov word [esp + 0x1c], ax
mov ecx, dword [ebp]
add ecx, edi
push ecx
push edi
push ebx
mov esi, str.tsize
call fcn.00504d50
mov edx, dword [ebp]
add edi, eax
add edx, edi
push edx
push edi
push ebx
lea esi, [esp + 0x34]
call fcn.00504d50
add edi, eax
mov eax, dword [ebx + 0x158]
push eax
push 0x5511b0
mov ecx, esi
push 0x40
push ecx
call fcn.004fcc50
mov edx, dword [ebp]
add edx, edi
push edx
push edi
push ebx
mov esi, str.blksize
call fcn.00504d50
add edi, eax
mov eax, dword [ebp]
add eax, edi
push eax
push edi
push ebx
lea esi, [esp + 0x5c]
call fcn.00504d50
mov ecx, dword [ebx + 0x1c]
add esp, 0x40
push ecx
push 0x5511b0
mov edx, esi
push 0x40
push edx
add edi, eax
call fcn.004fcc50
mov eax, dword [ebp]
add eax, edi
push eax
push edi
push ebx
mov esi, str.timeout
call fcn.00504d50
mov ecx, dword [ebp]
add edi, eax
add ecx, edi
push ecx
push edi
push ebx
lea esi, [esp + 0x44]
call fcn.00504d50
mov edx, dword [ebx + 0x10]
add esp, 0x28
add edi, eax
mov eax, dword [edx + 0x4c]
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x18]
mov eax, dword [ebp]
push ecx
mov ecx, dword [ebx + 0x14]
push edx
push 0
push edi
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, edi
je 0x505a11
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [ebx + 0x10]
push eax
push edx
call fcn.004edba0
push eax
mov eax, dword [esp + 0x20]
push 0x551990
push eax
call fcn.004f9190
add esp, 0x14
mov ecx, dword [esp + 0x18]
push ecx
call dword [0x582a8c]
mov eax, dword [esp + 0x10]
add esp, 4
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.004ba1db
add esp, 0x54
ret
cmp dword [esi + 0x32c], 0
push 6
je 0x505a84
mov eax, ebx
call fcn.00505710
add esp, 4
pop edi
pop esi
mov dword [esp + 4], eax
pop ebp
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.004ba1db
add esp, 0x54
ret
push 4
mov eax, ebx
call fcn.00505710
add esp, 4
pop edi
pop esi
mov dword [esp + 4], eax
pop ebp
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.004ba1db
add esp, 0x54
ret
push 3
mov esi, ebx
call fcn.00505750
add esp, 4
pop edi
pop esi
mov dword [esp + 4], eax
pop ebp
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.004ba1db
add esp, 0x54
ret
mov eax, dword [esp + 0xc]
pop edi
pop esi
mov dword [ebx], 3
pop ebp
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.004ba1db
add esp, 0x54
ret
push str.tftp_send_first:_internal_error
push esi
call fcn.004f9190
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x14]
add esp, 8
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004ba1db
add esp, 0x54
ret