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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x629960]
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.0x50950b.1
jmp dword [eax*4 + 0x509858]
inc dword [edi + 0x18]
mov eax, dword [edi + 0x18]
cmp eax, dword [edi + 0x20]
jle 0x50953d
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.004a16e5
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 0x50958f
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 0x509593
push ecx
push edx
push ebx
call fcn.004f4980
add esp, 0xc
jmp 0x509593
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.0050a050
add esp, 0x10
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x5095ca
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a16e5
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.004f63d0
mov ecx, dword [ebp - 0x4c]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5095f3
sub ecx, edx
lea edx, [esi + 1]
nop
mov al, byte [esi]
inc esi
test al, al
jne 0x509600
sub esi, edx
add esi, 4
add esi, ecx
cmp dword [ebx + 0x31c], 0
mov dword [ebp - 0x48], esi
je 0x509646
mov edx, dword [ebx + 0x1e8]
mov eax, edx
mov ecx, dword [ebx + 0x1ec]
and eax, ecx
cmp eax, 0xffffffff
je 0x509646
push ecx
push edx
push str._lld
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.004f63d0
add esp, 0x14
jmp 0x50964f
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.00508d20
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x50968d
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.00508d20
add esp, 0x10
mov esi, eax
push dword [edi + 0x158]
lea eax, [ebp - 0x44]
push 0x60f2ec
push 0x40
push eax
call fcn.004f63d0
add esp, 0x10
test esi, esi
jne 0x5096e9
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.00508d20
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x5096e9
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.00508d20
add esp, 0x10
mov esi, eax
push dword [edi + 0x1c]
lea eax, [ebp - 0x44]
push 0x60f2ec
push 0x40
push eax
call fcn.004f63d0
add esp, 0x10
test esi, esi
jne 0x5097ab
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.00508d20
add esp, 0x10
test eax, eax
jne 0x5097ab
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.00508d20
add esp, 0x10
test eax, eax
jne 0x5097ab
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 0x50978c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [edi + 0x10]
call fcn.004f82a0
push eax
push 0x60f31c
push ebx
call fcn.004ec7d0
add esp, 0x14
push dword [ebp - 0x4c]
call dword [0x62ab38]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a16e5
mov esp, ebp
pop ebp
ret
push str.TFTP_buffer_too_small_for_options
push ebx
call fcn.004ec7d0
push dword [ebp - 0x4c]
call dword [0x62ab38]
add esp, 0xc
mov eax, 0x47
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a16e5
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0x31c], 0
push 6
push edi
je 0x50981c
call fcn.00508ce0
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a16e5
mov esp, ebp
pop ebp
ret
push 4
push edi
call fcn.00508ce0
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a16e5
mov esp, ebp
pop ebp
ret
push 3
push edi
call fcn.00508ca0
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a16e5
mov esp, ebp
pop ebp
ret
push str.tftp_send_first:_internal_error
push ebx
call fcn.004ec7d0
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.004a16e5
mov esp, ebp
pop ebp
ret