Function at 0x51b5f8
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
shr eax, 0x10
test ax, 0xffff
je 0x51b650
cmp dword [0x54e374], 0
je 0x51b61d
xor eax, eax
jmp 0x51b89c
cmp dword [0x54e370], 0
je 0x51b630
mov dword [0x55bb6c], 3
push 0
call fcn.0051ac4a
push 0
push 0x177b
call fcn.0041c35b
push eax
call fcn.0051a858
xor eax, eax
jmp 0x51b89c
xor edx, edx
mov dword [0x55bb44], edx
push 0x10
push 0
lea ecx, [ebp - 0x10]
push ecx
call fcn.00539438
add esp, 0xc
mov word [ebp - 0x10], 2
xor eax, eax
mov dword [ebp - 0xc], eax
mov dx, word [0x5577b4]
push edx
call sub.WSOCK32.dll_htons
mov word [ebp - 0xe], ax
mov eax, dword [0x58d640]
cmp eax, 0xffffffff
je 0x51b696
mov dword [ebp - 0xc], eax
jmp 0x51b722
mov ebx, 0x58cd3c
mov eax, dword [ebx + 0xc]
mov edx, dword [eax]
mov ecx, dword [edx]
mov dword [ebp - 0xc], ecx
cmp dword [0x55bb48], 0
jne 0x51b722
mov eax, dword [ebx + 0xc]
cmp dword [eax + 4], 0
je 0x51b722
mov esi, 1
jmp 0x51b718
mov edx, dword [ebx + 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
call sub.WSOCK32.dll_inet_ntoa
mov edi, eax
test edi, edi
je 0x51b717
push esi
push edi
mov esi, 0x57a469
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
push 0
push 0
push 0x57a469
push dword [0x55bb48]
call fcn.004b0c4c
test eax, eax
je 0x51b717
mov dword [0x55bb48], eax
inc esi
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + esi*4]
test eax, eax
jne 0x51b6be
cmp dword [0x5515fc], 0
je 0x51b780
push 0
call fcn.00475983
push dword [ebp - 0xc]
call sub.WSOCK32.dll_inet_ntoa
mov edi, eax
test edi, edi
je 0x51b779
push edi
mov esi, 0x57a469
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
push 0
push 0
mov ax, word [0x5577b4]
push eax
push 0x57a469
call fcn.00475cf6
xor eax, eax
jmp 0x51b89c
push 0
push 2
push 0
mov dx, word [0x54f356]
push edx
mov cx, word [0x54f354]
push ecx
call fcn.004e3612
mov ebx, eax
mov dword [0x55bb40], ebx
cmp ebx, 0xffffffff
jne 0x51b7ef
xor eax, eax
mov dword [0x558950], eax
mov dword [0x558960], 1
push dword [0x54d29c]
push 0
push 0x177c
call fcn.0041c35b
push eax
push dword [0x55b3d8]
call fcn.004e0c3e
push 0
call fcn.0051ac4a
push 0x55bba0
call fcn.0051a858
xor eax, eax
jmp 0x51b89c
push dword [0x55bb40]
call fcn.0051b512
push 0x10
push 0x40d
push dword [0x55b3c8]
push dword [0x55bb40]
call sub.WSOCK32.dll_WSAAsyncSelect
push 0x10
lea edx, [ebp - 0x10]
push edx
push dword [0x55bb40]
call sub.WSOCK32.dll_connect
test eax, eax
jne 0x51b82b
xor eax, eax
jmp 0x51b89c
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x51b83b
xor eax, eax
jmp 0x51b89c
cmp dword [0x54e374], 0
je 0x51b848
xor eax, eax
jmp 0x51b89c
push eax
call fcn.0051b53b
xor edx, edx
mov dword [0x558950], edx
mov dword [0x558960], 1
push dword [0x54d2a0]
push 0x57a469
push dword [0x55b3d8]
call fcn.004e0c3e
cmp dword [0x54e370], 0
je 0x51b889
mov dword [0x55bb6c], 4
push 0
call fcn.0051ac4a
push 0x55bba4
call fcn.0051a858
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4