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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 0x10]
xor ecx, ecx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [ebx + 0x8c]
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], eax
test edi, edi
jne 0x5afd20
mov edi, dword [ebx + 0x14]
test edi, edi
je 0x5afcf2
mov eax, dword [edi + 0x14]
test eax, eax
je 0x5afc07
lea edx, [eax + 2]
nop dword [eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x5afbf0
mov ecx, dword [ebp - 4]
sub eax, edx
sar eax, 1
lea ebx, [eax + 1]
jmp 0x5afc09
xor ebx, ebx
mov eax, dword [edi + 4]
cmp eax, 2
jne 0x5afc18
mov eax, 0x10
jmp 0x5afc26
cmp eax, 0x17
jne 0x5afce0
mov eax, 0x1c
cmp dword [edi + 0x18], 0
mov dword [ebp - 8], eax
je 0x5afce0
mov edx, dword [edi + 0x10]
test edx, edx
je 0x5afce0
cmp edx, eax
jb 0x5afce0
add eax, 0x20
add eax, ebx
push eax
call dword [0x8f7f4c]
mov esi, eax
add esp, 4
test esi, esi
je 0x5afd03
mov ecx, dword [edi]
mov dword [esi], ecx
mov ecx, dword [edi + 4]
mov dword [esi + 4], ecx
mov ecx, dword [edi + 8]
mov dword [esi + 8], ecx
mov eax, dword [edi + 0xc]
mov ecx, dword [ebp - 8]
mov dword [esi + 0xc], eax
lea eax, [esi + 0x20]
push ecx
mov dword [esi + 0x10], ecx
mov dword [esi + 0x14], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x18], eax
push dword [edi + 0x18]
push eax
call fcn.00704c30
add esp, 0xc
test ebx, ebx
je 0x5afcc8
mov eax, dword [esi + 0x18]
xor edx, edx
add eax, dword [ebp - 8]
mov dword [esi + 0x14], eax
test ebx, ebx
je 0x5afcc4
nop
mov eax, dword [edi + 0x14]
mov ecx, dword [esi + 0x14]
mov al, byte [eax + edx*2]
mov byte [edx + ecx], al
inc edx
cmp edx, ebx
jb 0x5afcb0
mov eax, dword [esi + 0x14]
mov byte [eax + ebx], 0
mov ecx, dword [ebp - 4]
test ecx, ecx
mov eax, dword [ebp - 0xc]
cmove ecx, esi
mov dword [ebp - 4], ecx
test eax, eax
je 0x5afcdd
mov dword [eax + 0x1c], esi
mov dword [ebp - 0xc], esi
mov edi, dword [edi + 0x28]
test edi, edi
jne 0x5afbe3
test ecx, ecx
jne 0x5afd17
mov ebx, dword [ebp + 0x10]
mov edi, 0x2af9
push edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ecx, dword [ebp - 4]
jmp 0x5afd1d
push dword [ebp - 4]
mov edi, 8
call fcn.005cc8b0
add esp, 4
xor ecx, ecx
jmp 0x5afd1a
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov dword [ebx + 0x68], ecx
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x5afd35
push eax
call dword [0x1030c00]
mov dword [ebx + 0x14], 0
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
je 0x5afd5a
call esi
test eax, eax
je 0x5afd57
call esi
mov dword [ebx + 0x64], eax
test eax, eax
jne 0x5afd5a
mov dword [ebx + 0x64], 8
jmp 0x5afd5a
mov dword [ebx + 0x64], edi
push dword [ebx + 0x48]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebx + 0x4c], 0
je 0x5afdda
push dword [ebx + 0x48]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x5afd8c
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push dword [ebx + 0x48]
call dword [0x8f7f50]
add esp, 4
push dword [ebx + 0x54]
call dword [0x8f7f50]
mov eax, dword [ebx + 0x68]
add esp, 4
test eax, eax
je 0x5afda8
push eax
call fcn.005cc8b0
add esp, 4
mov eax, dword [ebx + 0x60]
cmp eax, 0xffffffff
je 0x5afdb7
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x90
push 0
push ebx
call fcn.007051b0
mov ecx, dword [ebp - 0x10]
push ecx
call dword [0x8f7f50]
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x60]
cmp eax, 0xffffffff
je 0x5afdfe
push 0
push 1
lea ecx, [ebp + 0x13]
mov byte [ebp + 0x13], 1
push ecx
push eax
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x5afdfe
call esi
mov dword [ebx + 0x64], eax
push dword [ebx + 0x48]
mov dword [ebx + 0x4c], 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx]
test eax, eax
je 0x5afe1e
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc