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

Disassembly:
sub esp, 0x4c
mov eax, dword [0x5176f0]
xor eax, esp
mov dword [esp + 0x48], eax
mov ecx, dword [edi + 0x10]
mov eax, dword [esp + 0x50]
push ebx
push ebp
mov ebp, dword [ecx]
cmp dword [ebp + 0x374], 0
push esi
mov esi, str.octet
mov dword [esp + 0xc], 0
je 0x496fa5
mov esi, str.netascii
cmp eax, 7
ja case.0x496fae.1
jmp dword [eax*4 + 0x4972e0]
mov ebx, 1
add dword [edi + 0x18], ebx
mov eax, dword [edi + 0x18]
cmp eax, dword [edi + 0x20]
jle 0x496fe6
pop esi
pop ebp
mov dword [edi + 8], 0xffffff9e
mov dword [edi], 3
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.004ae123
add esp, 0x4c
ret
cmp dword [ebp + 0x3ac], 0
je 0x497038
mov edx, dword [edi + 0x160]
mov byte [edx], 0
mov eax, dword [edi + 0x160]
mov byte [eax + 1], 2
mov edx, dword [edi + 0x10]
mov ecx, dword [edi + 0x160]
mov eax, dword [edx]
add ecx, 4
mov dword [eax + 0x114], ecx
mov eax, dword [ebp + 0x47f8]
mov ecx, dword [ebp + 0x47fc]
mov edx, eax
and edx, ecx
cmp edx, 0xffffffff
je 0x49704a
push ecx
push eax
push ebp
call fcn.004a4950
add esp, 0xc
jmp 0x49704a
mov eax, dword [edi + 0x160]
mov byte [eax], 0
mov ecx, dword [edi + 0x160]
mov byte [ecx + 1], bl
mov eax, dword [edi + 0x10]
mov ecx, dword [eax]
push 0
push 0
lea edx, [esp + 0x18]
push edx
mov edx, dword [ecx + 0x47cc]
push 0
add edx, ebx
push edx
push ebp
call fcn.004a4150
add esp, 0x18
mov dword [esp + 0xc], eax
test eax, eax
jne 0x4972cb
mov ecx, dword [edi + 0x154]
mov edx, dword [edi + 0x160]
push eax
push esi
push eax
mov eax, dword [esp + 0x1c]
push eax
push str._s_c_s_c
push ecx
add edx, 2
push edx
call fcn.0048e260
mov eax, dword [esp + 0x2c]
add esp, 0x1c
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4970a5
sub eax, edx
mov edx, eax
mov eax, esi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4970b5
sub eax, esi
cmp dword [ebp + 0x1f4], 0
lea ebx, [eax + edx + 4]
jne 0x4971c5
cmp dword [ebp + 0x3ac], 0
je 0x497105
mov eax, dword [ebp + 0x47f8]
mov ecx, dword [ebp + 0x47fc]
mov edx, eax
and edx, ecx
cmp edx, 0xffffffff
je 0x497105
push ecx
push eax
push 0x4e6e6c
lea eax, [esp + 0x20]
push 0x40
push eax
call fcn.0048e260
add esp, 0x14
jmp 0x49710f
mov ecx, 0x30
mov word [esp + 0x14], cx
mov edx, dword [edi + 0x160]
add edx, ebx
push edx
push ebx
push edi
mov esi, str.tsize
call fcn.00496470
add ebx, eax
mov eax, dword [edi + 0x160]
add eax, ebx
push eax
push ebx
push edi
lea esi, [esp + 0x2c]
call fcn.00496470
mov ecx, dword [edi + 0x158]
push ecx
push 0x502104
mov edx, esi
push 0x40
push edx
add ebx, eax
call fcn.0048e260
mov eax, dword [edi + 0x160]
add eax, ebx
push eax
push ebx
push edi
mov esi, str.blksize
call fcn.00496470
mov ecx, dword [edi + 0x160]
add ebx, eax
add ecx, ebx
push ecx
push ebx
push edi
lea esi, [esp + 0x54]
call fcn.00496470
mov edx, dword [edi + 0x1c]
add esp, 0x40
push edx
push 0x502104
add ebx, eax
mov eax, esi
push 0x40
push eax
call fcn.0048e260
mov ecx, dword [edi + 0x160]
add ecx, ebx
push ecx
push ebx
push edi
mov esi, str.timeout
call fcn.00496470
mov edx, dword [edi + 0x160]
add ebx, eax
add edx, ebx
push edx
push ebx
push edi
lea esi, [esp + 0x3c]
call fcn.00496470
add esp, 0x28
add ebx, eax
mov eax, dword [edi + 0x10]
mov eax, dword [eax + 0x4c]
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x18]
mov eax, dword [edi + 0x160]
push ecx
mov ecx, dword [edi + 0x14]
push edx
push 0
push ebx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, ebx
je 0x49720a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [edi + 0x10]
push eax
push edx
call fcn.0048f860
push eax
push 0x502128
push ebp
call fcn.0048af30
add esp, 0x14
mov eax, dword [esp + 0x10]
push eax
call dword [0x517174]
mov eax, dword [esp + 0x10]
add esp, 4
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.004ae123
add esp, 0x4c
ret
cmp dword [ebp + 0x3ac], 0
push 6
je 0x49727d
mov eax, edi
call fcn.00496ef0
add esp, 4
pop esi
pop ebp
mov dword [esp + 4], eax
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.004ae123
add esp, 0x4c
ret
push 4
mov eax, edi
call fcn.00496ef0
add esp, 4
pop esi
pop ebp
mov dword [esp + 4], eax
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.004ae123
add esp, 0x4c
ret
push 3
mov esi, edi
call fcn.00496f30
add esp, 4
pop esi
pop ebp
mov dword [esp + 4], eax
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.004ae123
add esp, 0x4c
ret
mov eax, dword [esp + 0xc]
pop esi
pop ebp
mov dword [edi], 3
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.004ae123
add esp, 0x4c
ret
push str.tftp_send_first:_internal_error
push ebp
call fcn.0048af30
mov eax, dword [esp + 0x14]
add esp, 8
mov ecx, dword [esp + 0x54]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ae123
add esp, 0x4c
ret