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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x100b5350]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, dword [esi + 0x10]
xor edx, edx
mov edi, dword [eax]
mov ecx, str.octet
cmp dword [edi + 0x3bc], edx
mov eax, str.netascii
cmove eax, ecx
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0xc]
push 3
mov ebx, edx
pop ecx
sub eax, edx
je 0x100580dc
sub eax, ecx
je 0x100580d3
dec eax
je 0x100580ce
dec eax
je 0x100580c7
dec eax
je 0x100580af
dec eax
je 0x100580dc
push str.tftp_send_first:_internal_error
push edi
call fcn.10046801
pop ecx
jmp 0x10058381
push 6
push esi
cmp dword [edi + 0x3f4], edx
je 0x100580d5
call fcn.1005798b
pop ecx
mov ebx, eax
jmp 0x10058381
mov dword [esi], ecx
jmp 0x10058382
push 4
push esi
jmp 0x100580ba
push ecx
push esi
call fcn.1005794f
jmp 0x100580bf
inc dword [esi + 0x18]
mov eax, dword [esi + 0x18]
cmp eax, dword [esi + 0x20]
jle 0x100580f7
mov dword [esi + 8], 0xffffff9e
mov dword [esi], ecx
xor eax, eax
jmp 0x10058384
cmp dword [edi + 0x3f4], edx
je 0x10058141
lea ebx, [esi + 0x160]
push 2
push ebx
call fcn.10057934
mov eax, dword [esi + 0x10]
pop ecx
mov eax, dword [eax]
pop ecx
mov ecx, dword [ebx]
add ecx, 4
mov dword [eax + 0x150], ecx
mov ecx, dword [edi + 0x4af0]
mov edx, dword [edi + 0x4af4]
mov eax, ecx
and eax, edx
cmp eax, 0xffffffff
je 0x10058151
push edx
push ecx
push edi
call fcn.1004f553
add esp, 0xc
jmp 0x10058151
lea eax, [esi + 0x160]
push 1
push eax
call fcn.10057934
pop ecx
pop ecx
xor ecx, ecx
push ecx
push ecx
lea eax, [ebp - 0x50]
push eax
mov eax, dword [esi + 0x10]
push ecx
mov eax, dword [eax]
mov eax, dword [eax + 0x4ac0]
inc eax
push eax
push edi
call fcn.1006366c
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x10058382
mov edx, dword [ebp - 0x50]
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x10058180
sub edx, ecx
mov ecx, dword [ebp - 0x48]
lea eax, [ecx + 1]
mov dword [ebp - 0x4c], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10058192
sub ecx, dword [ebp - 0x4c]
mov eax, dword [esi + 0x154]
sub eax, ecx
mov ecx, dword [ebp - 0x48]
sub eax, 4
cmp edx, eax
jbe 0x100581c3
push str.TFTP_file_name_too_long_n
push edi
call fcn.10046801
pop ecx
pop ecx
push 0x47
pop eax
jmp 0x10058384
mov eax, dword [esi + 0x160]
push 0
push ecx
push 0
push dword [ebp - 0x50]
add eax, 2
push str._s_c_s_c
push dword [esi + 0x154]
push eax
call fcn.100511fb
mov edx, dword [ebp - 0x50]
add esp, 0x1c
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x100581ee
sub edx, ecx
mov ecx, dword [ebp - 0x48]
lea eax, [ecx + 1]
mov dword [ebp - 0x4c], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10058200
sub ecx, dword [ebp - 0x4c]
add ecx, 4
add ecx, edx
cmp dword [edi + 0x22c], 0
mov dword [ebp - 0x48], ecx
jne 0x10058337
cmp dword [edi + 0x3f4], 0
je 0x1005825a
mov edx, dword [edi + 0x4af0]
mov eax, edx
and eax, dword [edi + 0x4af4]
cmp eax, 0xffffffff
je 0x1005825a
push dword [edi + 0x4af4]
lea eax, [ebp - 0x44]
push edx
push str._I64d
push 0x40
push eax
call fcn.100511fb
mov ecx, dword [ebp - 0x48]
add esp, 0x14
jmp 0x10058261
push 0x30
pop eax
mov word [ebp - 0x44], ax
mov eax, dword [esi + 0x160]
push str.tsize
add eax, ecx
push eax
push ecx
push esi
call fcn.100579c7
mov ecx, dword [ebp - 0x48]
add ecx, eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [esi + 0x160]
add eax, ecx
push eax
push ecx
push esi
mov dword [ebp - 0x48], ecx
call fcn.100579c7
push dword [esi + 0x158]
add dword [ebp - 0x48], eax
push 0x100a7454
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.100511fb
mov ecx, dword [ebp - 0x48]
mov eax, dword [esi + 0x160]
push str.blksize
add eax, ecx
push eax
push ecx
push esi
call fcn.100579c7
mov ecx, dword [ebp - 0x48]
add ecx, eax
add esp, 0x40
lea eax, [ebp - 0x44]
push eax
mov eax, dword [esi + 0x160]
add eax, ecx
push eax
push ecx
push esi
mov dword [ebp - 0x48], ecx
call fcn.100579c7
push dword [esi + 0x1c]
add dword [ebp - 0x48], eax
push 0x100a7454
lea eax, [ebp - 0x44]
push 0x40
push eax
call fcn.100511fb
mov ecx, dword [ebp - 0x48]
mov eax, dword [esi + 0x160]
push str.timeout
add eax, ecx
push eax
push ecx
push esi
call fcn.100579c7
mov ecx, dword [ebp - 0x48]
add ecx, eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [esi + 0x160]
add eax, ecx
push eax
push ecx
push esi
mov dword [ebp - 0x48], ecx
call fcn.100579c7
mov ecx, dword [ebp - 0x48]
add esp, 0x40
add ecx, eax
mov dword [ebp - 0x48], ecx
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 0x54]
push dword [eax + 0x10]
push dword [eax + 0x18]
push 0
push ecx
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, dword [ebp - 0x48]
je 0x10058378
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [esi + 0x10]
call fcn.10052f6d
push eax
push 0x100a752c
push edi
call fcn.10046801
add esp, 0x14
push dword [ebp - 0x50]
call dword [0x100b5004]
pop ecx
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100704e7
leave
ret