Function at 0x4784a0
Capabilities:
Connect socket
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x541a34]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x210], ecx
cmp dword [ebp + 0xc], 0
jge 0x4784fa
push 0x10
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x210]
mov edx, dword [ecx + 0x30]
push edx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x4784e5
mov dword [ebp - 0x21c], 1
jmp 0x4784ef
mov dword [ebp - 0x21c], 0
mov eax, dword [ebp - 0x21c]
jmp 0x478761
push 1
mov ecx, dword [ebp - 0x210]
call fcn.0047de00
test eax, eax
jne 0x478512
xor eax, eax
jmp 0x478761
push 0x10
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x210]
mov edx, dword [ecx + 0x30]
push edx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x220], eax
cmp dword [ebp - 0x220], 0
jne 0x47854e
push 0
mov ecx, dword [ebp - 0x210]
call fcn.0047de00
mov eax, 1
jmp 0x478761
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x220], 0xffffffff
jne 0x478583
cmp dword [ebp - 0x224], 0x2733
je 0x478583
push 0
mov ecx, dword [ebp - 0x210]
call fcn.0047de00
xor eax, eax
jmp 0x478761
mov dword [ebp - 0x20c], 0
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x214], 0
jmp 0x4785b2
mov eax, dword [ebp - 0x214]
add eax, 1
mov dword [ebp - 0x214], eax
mov ecx, dword [ebp - 0x214]
cmp ecx, dword [ebp - 0x20c]
jae 0x4785dc
mov edx, dword [ebp - 0x214]
mov eax, dword [ebp - 0x210]
mov ecx, dword [ebp + edx*4 - 0x208]
cmp ecx, dword [eax + 0x30]
jne 0x4785da
jmp 0x4785dc
jmp 0x4785a3
mov edx, dword [ebp - 0x214]
cmp edx, dword [ebp - 0x20c]
jne 0x478618
cmp dword [ebp - 0x20c], 0x40
jae 0x478618
mov eax, dword [ebp - 0x214]
mov ecx, dword [ebp - 0x210]
mov edx, dword [ecx + 0x30]
mov dword [ebp + eax*4 - 0x208], edx
mov eax, dword [ebp - 0x20c]
add eax, 1
mov dword [ebp - 0x20c], eax
xor ecx, ecx
jne 0x478597
mov dword [ebp - 0x218], 0
jmp 0x47863b
mov edx, dword [ebp - 0x218]
add edx, 1
mov dword [ebp - 0x218], edx
mov eax, dword [ebp - 0x218]
cmp eax, dword [ebp - 0x108]
jae 0x478665
mov ecx, dword [ebp - 0x218]
mov edx, dword [ebp - 0x210]
mov eax, dword [ebp + ecx*4 - 0x104]
cmp eax, dword [edx + 0x30]
jne 0x478663
jmp 0x478665
jmp 0x47862c
mov ecx, dword [ebp - 0x218]
cmp ecx, dword [ebp - 0x108]
jne 0x4786a1
cmp dword [ebp - 0x108], 0x40
jae 0x4786a1
mov edx, dword [ebp - 0x218]
mov eax, dword [ebp - 0x210]
mov ecx, dword [eax + 0x30]
mov dword [ebp + edx*4 - 0x104], ecx
mov edx, dword [ebp - 0x108]
add edx, 1
mov dword [ebp - 0x108], edx
xor eax, eax
jne 0x478620
mov eax, dword [ebp + 0xc]
cdq
mov ecx, 0x3e8
idiv ecx
mov dword [ebp - 0x230], eax
mov eax, dword [ebp + 0xc]
cdq
mov ecx, 0x3e8
idiv ecx
mov dword [ebp - 0x22c], edx
lea edx, [ebp - 0x230]
push edx
lea eax, [ebp - 0x108]
push eax
lea ecx, [ebp - 0x20c]
push ecx
push 0
mov edx, dword [ebp - 0x210]
mov eax, dword [edx + 0x30]
add eax, 1
push eax
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x228], 0
jg 0x478713
mov ecx, dword [ebp - 0x210]
call fcn.00477d40
xor eax, eax
jmp 0x478761
lea ecx, [ebp - 0x108]
push ecx
mov edx, dword [ebp - 0x210]
mov eax, dword [edx + 0x30]
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47873c
mov ecx, dword [ebp - 0x210]
call fcn.00477d40
xor eax, eax
jmp 0x478761
push 0
mov ecx, dword [ebp - 0x210]
call fcn.0047de00
test eax, eax
jne 0x47875c
mov ecx, dword [ebp - 0x210]
call fcn.00477d40
xor eax, eax
jmp 0x478761
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d219c
mov esp, ebp
pop ebp
ret 8