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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x150
mov eax, dword [0x6b9538]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, str.netascii
push edi
mov ebx, str.octet
mov edi, dword [esi + 0x10]
cmp byte [edi + 0xcfc], 0
cmovne ebx, eax
mov eax, dword [ebp + 0xc]
cmp eax, 7
ja case.0x50238c.1
jmp dword [eax*4 + 0x50276c]
inc dword [esi + 0x18]
mov eax, dword [esi + 0x18]
cmp eax, dword [esi + 0x20]
jle 0x5023be
mov dword [esi + 8], 0xffffff9e
pop edi
mov dword [esi], 3
xor eax, eax
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0050ea72
mov esp, ebp
pop ebp
ret
cmp byte [edi + 0x6f1], 0
lea eax, [esi + 0x14c]
je 0x50240c
push 2
push eax
call fcn.00501a70
mov eax, dword [esi + 0x10]
add esp, 8
mov ecx, dword [esi + 0x14c]
add ecx, 4
mov dword [eax + 0x130], ecx
mov edx, dword [edi + 0xc48]
mov eax, edx
mov ecx, dword [edi + 0xc4c]
and eax, ecx
cmp eax, 0xffffffff
je 0x502417
push ecx
push edx
push edi
call fcn.004e8350
add esp, 0xc
jmp 0x502417
push 1
push eax
call fcn.00501a70
add esp, 8
push 4
push 0
lea eax, [ebp - 0x14c]
push eax
mov eax, dword [esi + 0x10]
push 0
mov eax, dword [eax + 0xc80]
inc eax
push eax
push edi
call fcn.004f2670
add esp, 0x18
mov dword [ebp - 0x150], eax
test eax, eax
jne 0x50275b
mov ecx, dword [ebp - 0x14c]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x502450
sub ecx, edx
mov edx, ebx
lea eax, [edx + 1]
mov dword [ebp - 0x148], eax
mov al, byte [edx]
inc edx
test al, al
jne 0x502464
sub edx, dword [ebp - 0x148]
mov eax, dword [esi + 0x13c]
sub eax, edx
sub eax, 4
cmp ecx, eax
jbe 0x5024b0
push str.TFTP_file_name_too_long
push edi
call fcn.004daaf0
push dword [ebp - 0x14c]
call dword [0x6b94f4]
add esp, 0xc
mov eax, 0x47
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0050ea72
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x14c]
push 0
push ebx
push 0
push dword [ebp - 0x14c]
add eax, 2
push str._s_c_s_c
push dword [esi + 0x13c]
push eax
call fcn.004de3d0
mov ecx, dword [ebp - 0x14c]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5024e1
sub ecx, edx
lea edx, [ebx + 1]
nop dword [eax]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x5024f0
sub ebx, edx
add ebx, 4
add ebx, ecx
mov dword [ebp - 0x148], ebx
cmp byte [edi + 0x6d7], al
jne 0x502675
cmp byte [edi + 0x6f1], al
je 0x502544
mov edx, dword [edi + 0xc48]
mov eax, edx
mov ecx, dword [edi + 0xc4c]
and eax, ecx
cmp eax, 0xffffffff
je 0x502544
push ecx
push edx
push str._I64d
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.004de3d0
add esp, 0x14
jmp 0x50254d
mov eax, 0x30
mov word [ebp - 0x44], ax
mov eax, dword [esi + 0x14c]
push str.tsize
add eax, ebx
push eax
lea eax, [ebp - 0x148]
push eax
push esi
call fcn.00501b10
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x502594
lea eax, [ebp - 0x44]
push eax
mov eax, dword [esi + 0x14c]
add eax, dword [ebp - 0x148]
push eax
lea eax, [ebp - 0x148]
push eax
push esi
call fcn.00501b10
add esp, 0x10
mov ebx, eax
push dword [esi + 0x140]
lea eax, [ebp - 0x44]
push 0x62da70
push 0x40
push eax
call fcn.004de3d0
add esp, 0x10
test ebx, ebx
jne 0x5025fc
mov eax, dword [esi + 0x14c]
add eax, dword [ebp - 0x148]
push str.blksize
push eax
lea eax, [ebp - 0x148]
push eax
push esi
call fcn.00501b10
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x5025fc
lea eax, [ebp - 0x44]
push eax
mov eax, dword [esi + 0x14c]
add eax, dword [ebp - 0x148]
push eax
lea eax, [ebp - 0x148]
push eax
push esi
call fcn.00501b10
add esp, 0x10
mov ebx, eax
push dword [esi + 0x1c]
lea eax, [ebp - 0x44]
push 0x62da70
push 0x40
push eax
call fcn.004de3d0
add esp, 0x10
test ebx, ebx
jne 0x5026e4
mov eax, dword [esi + 0x14c]
add eax, dword [ebp - 0x148]
push 0x649638
push eax
lea eax, [ebp - 0x148]
push eax
push esi
call fcn.00501b10
add esp, 0x10
test eax, eax
jne 0x5026e4
lea eax, [ebp - 0x44]
push eax
mov eax, dword [esi + 0x14c]
add eax, dword [ebp - 0x148]
push eax
lea eax, [ebp - 0x148]
push eax
push esi
call fcn.00501b10
add esp, 0x10
mov dword [ebp - 0x150], eax
test eax, eax
jne 0x5026e4
mov ebx, dword [ebp - 0x148]
mov eax, dword [edi + 0xc]
mov eax, dword [eax + 0x48]
push dword [eax + 0x10]
push dword [eax + 0x18]
push 0
push ebx
push dword [esi + 0x14c]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, ebx
je 0x5026be
push 0x100
lea eax, [ebp - 0x144]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004c8730
push eax
push 0x646948
push edi
call fcn.004daaf0
add esp, 0x18
push dword [ebp - 0x14c]
call dword [0x6b94f4]
mov eax, dword [ebp - 0x150]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0050ea72
mov esp, ebp
pop ebp
ret
push str.TFTP_buffer_too_small_for_options
jmp 0x502485
cmp byte [edi + 0x6f1], 0
push 6
push esi
je 0x502732
call fcn.00501ad0
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0050ea72
mov esp, ebp
pop ebp
ret
push 4
push esi
call fcn.00501ad0
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0050ea72
mov esp, ebp
pop ebp
ret
push 3
push esi
call fcn.00501a90
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0050ea72
mov esp, ebp
pop ebp
ret
push str.tftp_send_first:_internal_error
push edi
call fcn.004daaf0
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0050ea72
mov esp, ebp
pop ebp
ret