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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x628960]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ecx, str.octet
mov esi, str.netascii
mov eax, dword [edi + 0x10]
mov ebx, dword [eax]
mov eax, dword [ebp + 0xc]
cmp dword [ebx + 0x2e4], 0
cmove esi, ecx
cmp eax, 7
ja case.0x50848b.1
jmp dword [eax*4 + 0x5087d8]
inc dword [edi + 0x18]
mov eax, dword [edi + 0x18]
cmp eax, dword [edi + 0x20]
jle 0x5084bd
mov dword [edi + 8], 0xffffff9e
mov dword [edi], 3
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a0676
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x160]
cmp dword [ebx + 0x31c], 0
mov byte [eax], 0
mov eax, dword [edi + 0x160]
je 0x50850f
mov byte [eax + 1], 2
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x160]
add ecx, 4
mov eax, dword [eax]
mov dword [eax + 0x114], ecx
mov edx, dword [ebx + 0x1e8]
mov eax, edx
mov ecx, dword [ebx + 0x1ec]
and eax, ecx
cmp eax, 0xffffffff
je 0x508513
push ecx
push edx
push ebx
call fcn.004f3910
add esp, 0xc
jmp 0x508513
mov byte [eax + 1], 1
mov eax, dword [edi + 0x10]
push 0
push 0
mov eax, dword [eax]
mov eax, dword [eax + 0x46a0]
inc eax
push eax
push ebx
call fcn.00508fd0
add esp, 0x10
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x50854a
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a0676
mov esp, ebp
pop ebp
ret
push 0
push esi
push 0
push eax
mov eax, dword [edi + 0x160]
push str._s_c_s_c
push dword [edi + 0x154]
add eax, 2
push eax
call fcn.004f5370
mov ecx, dword [ebp - 0x4c]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x508573
sub ecx, edx
lea edx, [esi + 1]
nop
mov al, byte [esi]
inc esi
test al, al
jne 0x508580
sub esi, edx
add esi, 4
add esi, ecx
cmp dword [ebx + 0x31c], 0
mov dword [ebp - 0x48], esi
je 0x5085c6
mov edx, dword [ebx + 0x1e8]
mov eax, edx
mov ecx, dword [ebx + 0x1ec]
and eax, ecx
cmp eax, 0xffffffff
je 0x5085c6
push ecx
push edx
push str._lld
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.004f5370
add esp, 0x14
jmp 0x5085cf
mov eax, 0x30
mov word [ebp - 0x44], ax
mov eax, dword [edi + 0x160]
push str.tsize
add eax, esi
push eax
lea eax, [ebp - 0x48]
push eax
push edi
call fcn.00507ca0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x50860d
lea eax, [ebp - 0x44]
push eax
mov eax, dword [edi + 0x160]
add eax, dword [ebp - 0x48]
push eax
lea eax, [ebp - 0x48]
push eax
push edi
call fcn.00507ca0
add esp, 0x10
mov esi, eax
push dword [edi + 0x158]
lea eax, [ebp - 0x44]
push 0x60e3c4
push 0x40
push eax
call fcn.004f5370
add esp, 0x10
test esi, esi
jne 0x508669
mov eax, dword [edi + 0x160]
add eax, dword [ebp - 0x48]
push str.blksize
push eax
lea eax, [ebp - 0x48]
push eax
push edi
call fcn.00507ca0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x508669
lea eax, [ebp - 0x44]
push eax
mov eax, dword [edi + 0x160]
add eax, dword [ebp - 0x48]
push eax
lea eax, [ebp - 0x48]
push eax
push edi
call fcn.00507ca0
add esp, 0x10
mov esi, eax
push dword [edi + 0x1c]
lea eax, [ebp - 0x44]
push 0x60e3c4
push 0x40
push eax
call fcn.004f5370
add esp, 0x10
test esi, esi
jne 0x50872b
mov eax, dword [edi + 0x160]
add eax, dword [ebp - 0x48]
push str.timeout
push eax
lea eax, [ebp - 0x48]
push eax
push edi
call fcn.00507ca0
add esp, 0x10
test eax, eax
jne 0x50872b
lea eax, [ebp - 0x44]
push eax
mov eax, dword [edi + 0x160]
add eax, dword [ebp - 0x48]
push eax
lea eax, [ebp - 0x48]
push eax
push edi
call fcn.00507ca0
add esp, 0x10
test eax, eax
jne 0x50872b
mov eax, dword [edi + 0x10]
mov eax, dword [eax + 0x3c]
push dword [eax + 0x10]
push dword [eax + 0x18]
push esi
mov esi, dword [ebp - 0x48]
push esi
push dword [edi + 0x160]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, esi
je 0x50870c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [edi + 0x10]
call fcn.004f7240
push eax
push 0x60e3d4
push ebx
call fcn.004eb740
add esp, 0x14
push dword [ebp - 0x4c]
call dword [0x629b48]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a0676
mov esp, ebp
pop ebp
ret
push str.TFTP_buffer_too_small_for_options
push ebx
call fcn.004eb740
push dword [ebp - 0x4c]
call dword [0x629b48]
add esp, 0xc
mov eax, 0x47
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a0676
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0x31c], 0
push 6
push edi
je 0x50879c
call fcn.00507c60
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a0676
mov esp, ebp
pop ebp
ret
push 4
push edi
call fcn.00507c60
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a0676
mov esp, ebp
pop ebp
ret
push 3
push edi
call fcn.00507c20
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a0676
mov esp, ebp
pop ebp
ret
push str.tftp_send_first:_internal_error
push ebx
call fcn.004eb740
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.004a0676
mov esp, ebp
pop ebp
ret