Function at 0x41a5e0
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 0x538320
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x593e04]
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 0x41aa42
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x41aa42
mov eax, dword [ebp + 0x10]
cmp dword [eax - 0xc], 0
jne 0x41a738
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x41a656
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
jmp 0x41aa45
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.00419f80
add esp, 4
push ecx
test al, al
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24], esp
mov edi, esp
je 0x41a6c0
add eax, 0xfffffff0
push eax
call fcn.00401350
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.0041a060
jmp 0x41a6d6
add eax, 0xfffffff0
push eax
call fcn.00401350
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.00419f30
add esp, 4
test eax, eax
jne 0x41a6f9
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 0x41aa84
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 0x41a6dd
lea ecx, [ebp + 8]
call fcn.00401270
lea ecx, [ebp + 0x10]
call fcn.00401270
mov eax, esi
jmp 0x41aa87
call fcn.0041eb0e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x41a752
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 0x41a80b
push 0x40
push ecx
call fcn.0051e80d
add esp, 8
test eax, eax
je 0x41a80b
sub eax, dword [ebp + 0x10]
mov esi, eax
cmp esi, 0xffffffff
je 0x41a80b
push esi
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp + 0x10]
call fcn.00402200
push eax
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
call fcn.004023f0
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 0x41a7cd
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.004025e0
push eax
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 4
call fcn.004023f0
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 0x41a80b
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 0x41a8b6
push 0x546f00
push eax
call fcn.0051dac5
add esp, 8
test eax, eax
je 0x41a8b6
sub eax, dword [ebp + 0x10]
mov esi, eax
cmp esi, 0xffffffff
je 0x41a8b6
lea ecx, [esi + 1]
push ecx
lea edx, [ebp - 0x24]
push edx
lea ecx, [ebp + 0x10]
call fcn.004025e0
mov eax, dword [eax]
push eax
call fcn.0051e024
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 0x41a879
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.00402200
push eax
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 5
call fcn.004023f0
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 0x41a8b6
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 0x547140
call fcn.00401680
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.0041a5e0
mov edi, eax
add esp, 0x10
cmp edi, 0xffffffff
jne 0x41a96e
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 0x41a91e
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 0x41a941
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 0x41a967
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x41aa87
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.0041a0a0
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x41a9d8
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 0x41a9f5
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 0x41aa18
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 0x41aa3e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
jmp 0x41aa87
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 0x41aa62
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 0x41aa84
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.0051d4a4
mov esp, ebp
pop ebp
ret