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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d93ef
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x51093c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 0
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov dword [edi + 8], eax
cmp eax, 0xffffffff
jne 0x41398a
mov eax, 0xfffffffe
jmp 0x413b67
cmp dword [edi + 0x24], 0x10
xorps xmm0, xmm0
mov eax, 2
movups xmmword [ebp - 0x20], xmm0
mov word [ebp - 0x20], ax
lea eax, [edi + 0x10]
jb 0x4139a5
mov eax, dword [eax]
push eax
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [ebp - 0x1c], eax
movzx eax, word [edi + 0xc]
push eax
call dword [sym.imp.WSOCK32.dll_htons]
mov word [ebp - 0x1e], ax
lea eax, [ebp - 0x20]
push 0x10
push eax
push dword [edi + 8]
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
je 0x4139db
mov eax, 0xfffffffd
jmp 0x413b67
push 4
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], 1
push eax
push 1
push 6
push dword [edi + 8]
call dword [sym.imp.WSOCK32.dll_setsockopt]
push 8
mov dword [edi + 0x44], 0
mov byte [edi + 0x34], 1
call fcn.004a20f7
add esp, 4
mov dword [ebp - 0x40], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x413b60
push 8
call fcn.004a20f7
mov esi, eax
add esp, 4
test esi, esi
je 0x413a37
mov dword [esi], edi
mov dword [esi + 4], 0x413dd0
jmp 0x413a39
xor esi, esi
mov dword [ebp - 0x3c], esi
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 1
push eax
call fcn.0049f709
add esp, 4
test eax, eax
je 0x413a59
push eax
call fcn.0049ecab
add esp, 4
mov eax, dword [ebp - 0x30]
mov byte [ebp - 0x50], 1
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 2
push 1
push eax
call fcn.0049eb5f
add esp, 8
test eax, eax
je 0x413a82
push eax
call fcn.0049ecab
add esp, 4
mov eax, dword [ebp - 0x2c]
mov byte [ebp - 0x48], 1
mov dword [ebp - 0x44], eax
push eax
mov byte [ebp - 4], 3
mov byte [ebp - 0x28], 0
call fcn.0049ebb2
add esp, 4
test eax, eax
je 0x413aaa
push eax
call fcn.0049ecab
add esp, 4
mov dword [ebp - 0x34], 0x4e4c00
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x24], esi
mov esi, dword [ebp - 0x40]
lea eax, [ebp - 0x34]
push eax
push 0x404f90
push esi
mov byte [ebp - 4], 4
call fcn.0049eef1
add esp, 0xc
mov ecx, 1
cmp eax, 4
cmovne ecx, eax
test ecx, ecx
je 0x413aec
push ecx
call fcn.0049ecab
add esp, 4
cmp byte [ebp - 0x28], 0
jne 0x413b13
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
call fcn.0049f75b
add esp, 8
test eax, eax
je 0x413b0d
push eax
call fcn.0049ecab
add esp, 4
cmp byte [ebp - 0x28], 0
je 0x413af2
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x413b25
push 8
push eax
call fcn.004a2127
add esp, 8
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x2c]
push eax
mov byte [ebp - 4], 5
mov dword [ebp - 0x44], eax
call fcn.0049ebd7
add esp, 4
test eax, eax
je 0x413b4b
push eax
call fcn.0049ecab
add esp, 4
push dword [ebp - 0x44]
call fcn.0049eb1b
push dword [ebp - 0x4c]
call fcn.0049f6d2
add esp, 8
jmp 0x413b62
xor esi, esi
mov dword [edi + 0x30], esi
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a2135
mov esp, ebp
pop ebp
ret