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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x5ca1c8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov edi, str.netascii
push 3
mov eax, dword [esi + 0x10]
mov ecx, dword [eax]
mov eax, str.octet
mov dword [ebp - 0x50], ecx
cmp dword [ecx + 0x2a4], ebx
cmove edi, eax
pop eax
sub edx, ebx
je 0x522293
sub edx, eax
je 0x52228d
dec edx
je 0x522281
dec edx
je 0x52227a
dec edx
je 0x522261
dec edx
je 0x522293
push str.tftp_send_first:_internal_error
push ecx
call fcn.005129bc
pop ecx
jmp 0x52253a
cmp dword [ecx + 0x2dc], ebx
mov ecx, esi
push 6
pop edx
jne 0x522286
call fcn.005221cb
mov ebx, eax
jmp 0x52253b
mov dword [esi], eax
jmp 0x52253b
push 4
pop edx
mov ecx, esi
call fcn.0052218f
jmp 0x522273
mov edx, eax
mov ecx, esi
jmp 0x52226e
inc dword [esi + 0x18]
mov eax, dword [esi + 0x18]
cmp eax, dword [esi + 0x20]
jle 0x5222b2
mov dword [esi + 8], 0xffffff9e
xor eax, eax
mov dword [esi], 3
jmp 0x52253d
mov eax, dword [esi + 0x160]
cmp dword [ecx + 0x2dc], ebx
mov byte [eax], bl
mov eax, dword [esi + 0x160]
je 0x522307
mov byte [eax + 1], 2
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x160]
add ecx, 4
mov eax, dword [eax]
mov dword [eax + 0xdc], ecx
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx + 0x1b0]
mov eax, edx
and eax, dword [ecx + 0x1b4]
cmp eax, 0xffffffff
je 0x52230b
push dword [ecx + 0x1b4]
push edx
call fcn.0051a917
add esp, 8
jmp 0x52230b
mov byte [eax + 1], 1
mov eax, dword [esi + 0x10]
push ebx
push ebx
mov eax, dword [eax]
mov edx, dword [eax + 0x8658]
inc edx
call fcn.005241c4
mov dword [ebp - 0x54], eax
pop ecx
pop ecx
test eax, eax
jne 0x52232f
push 0x1b
pop eax
jmp 0x52253d
push ebx
push edi
push ebx
push eax
mov eax, dword [esi + 0x160]
push str._s_c_s_c
push dword [esi + 0x154]
add eax, 2
push eax
call fcn.0051d17e
mov ecx, dword [ebp - 0x54]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x522356
sub ecx, edx
lea edx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x522362
mov eax, dword [ebp - 0x50]
sub edi, edx
add edi, 4
add edi, ecx
cmp dword [eax + 0x2dc], ebx
je 0x5223a7
mov ecx, dword [eax + 0x1b0]
mov edx, dword [eax + 0x1b4]
mov eax, ecx
and eax, edx
cmp eax, 0xffffffff
je 0x5223a7
push edx
push ecx
push str._lld
lea eax, [ebp - 0x48]
push 0x40
push eax
call fcn.0051d17e
add esp, 0x14
jmp 0x5223ae
push 0x30
pop eax
mov word [ebp - 0x48], ax
mov ecx, dword [esi + 0x160]
lea eax, [edi + 6]
add ecx, edi
cmp eax, dword [esi + 0x154]
jbe 0x5223c5
mov eax, ebx
jmp 0x5223cf
mov edx, str.tsize
call fcn.0052216f
add edi, eax
lea ecx, [ebp - 0x48]
mov eax, dword [esi + 0x160]
lea edx, [ecx + 1]
add eax, edi
mov dword [ebp - 0x4c], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5223e2
sub ecx, edx
lea eax, [edi + 1]
add eax, ecx
cmp eax, dword [esi + 0x154]
jbe 0x5223fc
mov eax, ebx
jmp 0x522407
mov ecx, dword [ebp - 0x4c]
lea edx, [ebp - 0x48]
call fcn.0052216f
push dword [esi + 0x158]
add edi, eax
lea eax, [ebp - 0x48]
push 0x5937c4
push 0x40
push eax
call fcn.0051d17e
mov ecx, dword [esi + 0x160]
lea eax, [edi + 8]
add esp, 0x10
add ecx, edi
cmp eax, dword [esi + 0x154]
jbe 0x522439
mov eax, ebx
jmp 0x522443
mov edx, str.blksize
call fcn.0052216f
add edi, eax
lea ecx, [ebp - 0x48]
mov eax, dword [esi + 0x160]
lea edx, [ecx + 1]
add eax, edi
mov dword [ebp - 0x4c], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x522456
sub ecx, edx
lea eax, [edi + 1]
add eax, ecx
cmp eax, dword [esi + 0x154]
jbe 0x522470
mov eax, ebx
jmp 0x52247b
mov ecx, dword [ebp - 0x4c]
lea edx, [ebp - 0x48]
call fcn.0052216f
push dword [esi + 0x1c]
add edi, eax
lea eax, [ebp - 0x48]
push 0x5937c4
push 0x40
push eax
call fcn.0051d17e
mov ecx, dword [esi + 0x160]
lea eax, [edi + 8]
add esp, 0x10
add ecx, edi
cmp eax, dword [esi + 0x154]
jbe 0x5224aa
mov eax, ebx
jmp 0x5224b4
mov edx, str.timeout
call fcn.0052216f
add edi, eax
lea ecx, [ebp - 0x48]
mov eax, dword [esi + 0x160]
lea edx, [ecx + 1]
add eax, edi
mov dword [ebp - 0x4c], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5224c7
sub ecx, edx
lea eax, [edi + 1]
add eax, ecx
cmp eax, dword [esi + 0x154]
jbe 0x5224e1
mov eax, ebx
jmp 0x5224ec
mov ecx, dword [ebp - 0x4c]
lea edx, [ebp - 0x48]
call fcn.0052216f
add edi, eax
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 0x3c]
push dword [eax + 0x10]
push dword [eax + 0x18]
push ebx
push edi
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, edi
je 0x522531
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0x10]
mov edx, eax
call fcn.0052af26
mov ecx, dword [ebp - 0x50]
push eax
push 0x59813c
push ecx
call fcn.005129bc
add esp, 0xc
push dword [ebp - 0x54]
call dword [0x5cdc40]
pop ecx
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0055fedc
mov esp, ebp
pop ebp
ret