Function at 0x41308d
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x4cf038
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
mov eax, dword [0x504530]
push esi
mov esi, ecx
mov dword [esp + 0x14], eax
cmp dword [esi + 0x24], 0xffffffff
je 0x41309e
xor eax, eax
jmp 0x413111
push ebp
push edi
mov edi, dword [esp + 0x30]
xor ebp, ebp
cmp edi, ebp
je 0x4132a9
cmp word [esp + 0x34], bp
je 0x4132a9
cmp dword [edi], ebp
je 0x4132a9
push ebx
push ebp
push edi
mov ebx, 0x533f44
call fcn.00472370
test eax, eax
je 0x41312c
mov eax, dword [edi]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [esp + 0x3c]
call fcn.00409e90
mov dword [esp + 0x2c], ebp
mov ecx, dword [eax]
push ecx
push 0x3ecc
push 0x534540
mov eax, 2
call fcn.00478c60
add esp, 0xc
lea ecx, [esp + 0x38]
call fcn.00403b90
xor eax, eax
pop ebx
pop edi
pop ebp
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x14]
pop esi
call fcn.004ae38e
add esp, 0x20
ret 8
lea ebx, [esi + 8]
cmp edi, ebx
je 0x413147
xor edx, edx
lea eax, [esi + 4]
mov dword [eax], edx
mov dword [eax + 4], edx
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
mov ecx, dword [edi]
mov dword [ebx], ecx
mov edx, dword [esp + 0x38]
lea edi, [esi + 4]
push edx
mov word [edi], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi + 6], ax
mov eax, dword [ebx]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [esi + 0x14]
call fcn.004039a0
push 6
mov ebx, 1
push ebx
push 2
call dword [sym.imp.WS2_32.dll_socket]
lea ecx, [esp + 0x34]
push ecx
push 0x8004667e
push eax
mov dword [esi + 0x24], eax
mov dword [esp + 0x40], ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [0x53410c]
cmp dword [ecx - 0xc], ebp
je 0x4131c6
push ebx
lea edx, [esp + 0x14]
push edx
push ebp
call fcn.00464f60
cmp dword [esp + 0x14], ebp
je 0x4131c6
mov ecx, dword [esi + 0x24]
push 0x10
lea eax, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_bind]
mov edx, dword [esi + 0x24]
push ebp
push ebp
push ebp
push ebp
push 0x10
push edi
push edx
call dword [sym.imp.WS2_32.dll_WSAConnect]
test eax, eax
je 0x413216
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x413216
push eax
push str.connect___error_0x_x
push 0x534540
mov eax, 3
call fcn.00478d50
mov eax, dword [esi + 0x24]
add esp, 0xc
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x24], 0xffffffff
jmp 0x41310c
mov ecx, dword [esi + 0x28]
cmp ecx, ebp
je 0x413222
mov edx, dword [ecx]
push ebx
call dword [edx]
mov ecx, dword [esi + 0x2c]
cmp ecx, ebp
je 0x41322e
mov eax, dword [ecx]
push ebx
call dword [eax]
push 0x14
call fcn.004be8d8
add esp, 4
cmp eax, ebp
je 0x413250
mov dword [eax], 0x4db048
mov dword [eax + 4], ebp
mov dword [eax + 8], ebp
mov dword [eax + 0x10], ebp
mov dword [eax + 0xc], ebp
jmp 0x413252
xor eax, eax
push 0x14
mov dword [esi + 0x28], eax
call fcn.004be8d8
add esp, 4
cmp eax, ebp
je 0x413277
mov dword [eax], 0x4db048
mov dword [eax + 4], ebp
mov dword [eax + 8], ebp
mov dword [eax + 0x10], ebp
mov dword [eax + 0xc], ebp
jmp 0x413279
xor eax, eax
mov dword [esi + 0x2c], eax
mov dword [esi + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x20], eax
mov ecx, dword [0x5062c0]
mov eax, dword [0x5062c4]
add ecx, ebx
adc eax, ebp
mov dword [0x5062c4], eax
mov dword [0x5062c0], ecx
mov eax, ebx
jmp 0x41310e
xor eax, eax
jmp 0x41310f