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

Disassembly:
push ecx
test edi, edi
jne 0x1001779c
mov eax, 3
pop ecx
ret
cmp dword [edi], 0xffffffff
jne 0x100177a8
mov eax, 4
pop ecx
ret
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [edi + 0xf4]
push esi
push eax
mov dword [esp + 0xc], eax
call ebx
lea esi, [edi + 0xdc]
push esi
call ebx
mov eax, dword [edi + 0x6c]
test eax, eax
je 0x100177ed
cmp dword [edi + 0x68], 0
jne 0x100177ed
mov dword [edi + 0x68], eax
mov eax, dword [eax + 4]
test eax, eax
mov dword [edi + 0x6c], eax
jne 0x100177e6
mov dword [edi + 0x200], eax
add dword [edi + 0x80], 0xffffffff
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
call ebp
lea esi, [edi + 0x10c]
push esi
call ebx
mov ebx, dword [edi + 0x28]
push esi
call ebp
cmp ebx, 4
jne 0x10017819
mov ecx, dword [esp + 0xc]
push ecx
call ebp
pop ebp
pop esi
xor eax, eax
pop ebx
pop ecx
ret
cmp dword [edi + 0x68], 0
je 0x10017992
mov esi, dword [edi + 0x68]
cmp dword [esi + 0x14], 0
jbe 0x1001786a
lea esp, [esp]
mov ebp, dword [esi + 0x18]
mov ebx, dword [esi + 0x14]
add ebp, dword [esi]
call fcn.1001e4a1
push 0
push ebx
mov dword [eax], 0
mov edx, dword [edi]
push ebp
push edx
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x100179a0
sub dword [esi + 0x14], eax
add dword [esi + 0x18], eax
cmp dword [esi + 0x14], 0
ja 0x10017830
mov ebp, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, byte [esi + 0x1e]
mov cl, al
and cl, 0xf6
cmp cl, 0x30
jne 0x100178e1
lea ebx, [edi + 0x94]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x1c0]
test eax, eax
je 0x100178ae
mov ecx, dword [edi + 0x154]
mov byte [edi + 0x158], 1
movzx edx, word [esi + 0x1c]
push edx
push ecx
push edi
call eax
add esp, 0xc
mov byte [edi + 0x158], 0
mov eax, dword [edi + 0x1c4]
test eax, eax
je 0x100178dc
mov ecx, dword [edi + 0x154]
push 0
mov byte [edi + 0x158], 1
movzx edx, word [esi + 0x1c]
push 0
push edx
push ecx
push edi
call eax
add esp, 0x14
mov byte [edi + 0x158], 0
push ebx
call ebp
jmp 0x100178eb
and al, 0xf0
cmp al, 0xe0
je 0x10017a26
lea ebx, [edi + 0xdc]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [edi + 0x6c]
mov eax, edx
test eax, eax
mov dword [edi + 0x68], edx
je 0x1001791b
mov eax, dword [eax + 4]
test eax, eax
mov dword [edi + 0x6c], eax
jne 0x10017914
mov dword [edi + 0x200], eax
add dword [edi + 0x80], 0xffffffff
push ebx
call ebp
mov eax, dword [esi]
xor ebx, ebx
push eax
mov byte [esi + 0x1e], 0
mov byte [esi + 0x1f], 0
mov dword [esi + 8], 1
mov dword [esi + 0xc], ebx
call fcn.1001d378
push esi
mov dword [esi], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
call fcn.1001d378
add esp, 8
lea esi, [edi + 0xc4]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
mov ecx, eax
movzx eax, word [edi + 0x24]
mov ebx, edx
cdq
add eax, ecx
adc edx, ebx
push esi
mov dword [edi + 0x38], eax
mov dword [edi + 0x3c], edx
call ebp
cmp dword [edi + 0x68], 0
jne 0x10017823
mov eax, dword [esp + 0xc]
push eax
call ebp
pop ebp
pop esi
xor eax, eax
pop ebx
pop ecx
ret
call fcn.1001e4a1
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi], eax
call fcn.1001e4a1
cmp dword [eax], 0xb
je 0x10017a14
call fcn.1001e4a1
cmp dword [eax], 0x2733
je 0x10017a14
call fcn.1001e4a1
cmp dword [eax], 0x2749
je 0x10017a14
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.1001e4a1
mov eax, dword [eax]
sub eax, 0x2714
je 0x10017999
sub eax, 0x31
je 0x10017a0a
sub eax, 1
je 0x10017a00
pop ebp
pop esi
mov eax, 0xe
pop ebx
pop ecx
ret
pop ebp
pop esi
mov eax, 7
pop ebx
pop ecx
ret
pop ebp
pop esi
mov eax, 8
pop ebx
pop ecx
ret
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebp
pop esi
xor eax, eax
pop ebx
pop ecx
ret
push 0
push 0
mov eax, edi
call fcn.10014dc0
call fcn.10017580
push esi
call fcn.1001d378
add esp, 0xc
pop ebp
pop esi
xor eax, eax
pop ebx
pop ecx
ret