Function at 0x410f20
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 0x52d000
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x586dc4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx - 0xc]
mov dword [ebp - 4], 1
test eax, eax
je 0x411382
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x411382
mov eax, dword [ebp + 0x10]
cmp dword [eax - 0xc], 0
jne 0x411078
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x410f96
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
jmp 0x411385
mov ecx, dword [ebp + 0x14]
push 4
imul ecx, ecx, 0x3e8
lea edx, [ebp - 0x28]
push edx
push 0x1006
push 0xffff
push esi
mov dword [ebp - 0x28], ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x24], esp
mov edi, esp
push eax
call fcn.00401350
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.004108c0
add esp, 4
push ecx
test al, al
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24], esp
mov edi, esp
je 0x411000
add eax, 0xfffffff0
push eax
call fcn.00401350
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.004109a0
jmp 0x411016
add eax, 0xfffffff0
push eax
call fcn.00401350
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.00410870
add esp, 4
test eax, eax
jne 0x411039
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [ebp + 8]
call fcn.00401270
lea ecx, [ebp + 0x10]
call fcn.00401270
jmp 0x4113c4
mov ecx, 2
push ebx
mov word [ebp - 0x20], cx
mov dword [ebp - 0x1c], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
lea edx, [ebp - 0x20]
push edx
push esi
mov word [ebp - 0x1e], ax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x41101d
lea ecx, [ebp + 8]
call fcn.00401270
lea ecx, [ebp + 0x10]
call fcn.00401270
mov eax, esi
jmp 0x4113c7
call fcn.0041460c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x411092
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx - 0xc]
mov byte [ebp - 4], 2
test eax, eax
jle 0x41114b
push 0x40
push ecx
call fcn.0051451d
add esp, 8
test eax, eax
je 0x41114b
sub eax, dword [ebp + 0x10]
mov esi, eax
cmp esi, 0xffffffff
je 0x41114b
push esi
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp + 0x10]
call fcn.00401d90
push eax
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
call fcn.00401f80
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41110d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc esi
push esi
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp + 0x10]
call fcn.00402170
push eax
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 4
call fcn.00401f80
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41114b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0x10]
cmp dword [eax - 0xc], 0
mov edi, 0x438
jl 0x4111f6
push 0x53bec8
push eax
call fcn.00513429
add esp, 8
test eax, eax
je 0x4111f6
sub eax, dword [ebp + 0x10]
mov esi, eax
cmp esi, 0xffffffff
je 0x4111f6
lea ecx, [esi + 1]
push ecx
lea edx, [ebp - 0x24]
push edx
lea ecx, [ebp + 0x10]
call fcn.00402170
mov eax, dword [eax]
push eax
call fcn.00513988
mov edi, eax
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4111b9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp + 0x10]
call fcn.00401d90
push eax
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 5
call fcn.00401f80
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4111f6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp + 0x14]
push ecx
push ecx
mov ecx, esp
mov dword [ebp - 0x2c], esp
push 0x53c108
call fcn.00401650
mov eax, dword [ebp + 0x10]
push edi
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x30], esp
mov esi, esp
push eax
mov byte [ebp - 4], 6
call fcn.00401350
add eax, 0x10
mov dword [esi], eax
add esp, 4
mov byte [ebp - 4], 2
call fcn.00410f20
mov edi, eax
add esp, 0x10
cmp edi, 0xffffffff
jne 0x4112ae
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea edx, [eax + 0xc]
or ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41125e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411281
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4112a7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x4113c7
mov esi, dword [ebp - 0x28]
push ecx
add esi, 0xfffffff0
mov dword [ebp - 0x30], esp
mov ebx, esp
push esi
call fcn.00401350
add eax, 0x10
add esp, 4
mov dword [ebx], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push ecx
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x2c], esp
mov ebx, esp
push eax
mov byte [ebp - 4], 7
call fcn.00401350
add eax, 0x10
add esp, 4
mov dword [ebx], eax
push edi
mov byte [ebp - 4], 2
call fcn.004109e0
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x411318
push 2
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
xor edx, edx
cmp ebx, 2
setne dl
lea edi, [edx - 1]
mov byte [ebp - 4], 1
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x411335
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411358
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41137e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
jmp 0x4113c7
lea eax, [ecx - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [ebp - 4], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4113a2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [ebp - 4], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4113c4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00512fd6
mov esp, ebp
pop ebp
ret