Function at 0x58c100
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe90
mov eax, dword [0x6db340]
test eax, eax
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
jne 0x58c11f
mov al, 9
jmp 0x58c624
mov edx, dword [ebx + 0x128]
test edx, edx
je 0x58c130
mov al, 0x11
jmp 0x58c624
mov edx, dword [ebx + 0x150]
test edx, edx
je 0x58c141
mov al, 0x11
jmp 0x58c624
mov edx, dword [ebx + 0xe0]
test edx, edx
je 0x58c152
mov al, 0x11
jmp 0x58c624
mov dl, byte [ebx + 0x90]
test dl, dl
je 0x58c163
mov al, 0x11
jmp 0x58c624
mov edx, dword [ebx + 0xdc]
test edx, edx
je 0x58c174
mov al, 0x11
jmp 0x58c624
mov byte [ebx + 0x91], 0
mov edx, dword [ebx + 0x50]
test edx, edx
je 0x58c21a
xor ecx, ecx
mov dword [ebx + 0x54], ecx
jmp 0x58c21a
lea eax, [ebx + 0x94]
mov edx, eax
mov ecx, dword [edx + 8]
mov dword [ebp - 0x58], ecx
mov ecx, dword [edx + 0xc]
mov dword [ebp - 0x54], ecx
mov ecx, dword [edx + 0x10]
mov dword [ebp - 0x50], ecx
mov edx, dword [edx + 0x14]
mov dword [ebp - 0x4c], edx
add dword [eax + 8], 0xc
dec dword [eax + 0x30]
mov edx, dword [eax + 0x30]
test edx, edx
sete cl
and ecx, 1
test cl, cl
jne 0x58c213
mov edx, eax
mov ecx, eax
mov esi, dword [edx + 8]
mov dword [ebp - 0x70], esi
mov esi, dword [edx + 0xc]
mov dword [ebp - 0x6c], esi
mov esi, dword [edx + 0x10]
mov dword [ebp - 0x68], esi
mov edx, dword [edx + 0x14]
mov dword [ebp - 0x64], edx
lea edx, [ebp - 0x78]
mov esi, dword [ecx + 8]
mov edx, dword [edx + 8]
mov dword [ebp - 0x88], esi
mov esi, dword [ecx + 0xc]
mov dword [ebp - 0x84], esi
mov esi, dword [ecx + 0x10]
mov dword [ebp - 0x80], esi
mov ecx, dword [ecx + 0x14]
mov dword [ebp - 0x7c], ecx
lea ecx, [ebp - 0x90]
mov ecx, dword [ecx + 0x10]
cmp edx, ecx
jne 0x58c21a
push eax
call fcn.0042c06c
pop ecx
mov eax, dword [ebx + 0xc4]
test eax, eax
sete dl
and edx, 1
test dl, dl
je 0x58c190
push ebx
call fcn.0058e2e8
pop ecx
mov eax, dword [ebx + 0x14]
cmp eax, 7
jne 0x58c2a1
mov edi, ebx
mov dl, byte [edi + 0xc]
test dl, dl
jne 0x58c257
push 0
push 1
push 2
call sub.WSOCK32.DLL_socket
mov esi, eax
jmp 0x58c265
push 0
push 1
push 2
push edi
call fcn.00592a38
mov esi, eax
cmp esi, 0xffffffff
je 0x58c29e
xor ecx, ecx
lea edx, [ebp - 0xc]
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], esi
mov eax, dword [ebp - 4]
lea ecx, [ebp - 0xa8]
mov dword [ebp - 8], eax
push edx
push 0x6db34c
push ecx
call fcn.0058c62c
add esp, 0xc
mov eax, dword [ebp - 0xa0]
add eax, 0x10
add eax, 4
mov dword [eax], edi
mov dword [ebx + 0x10], esi
mov edx, dword [ebx + 0x14]
cmp edx, 6
jne 0x58c30b
mov edi, ebx
mov cl, byte [edi + 0xc]
test cl, cl
jne 0x58c2c1
push 0
push 2
push 2
call sub.WSOCK32.DLL_socket
mov esi, eax
jmp 0x58c2cf
push 0
push 2
push 2
push edi
call fcn.00592a38
mov esi, eax
cmp esi, 0xffffffff
je 0x58c308
xor eax, eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x18], esi
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 0xc0]
mov dword [ebp - 0x14], edx
push ecx
push 0x6db34c
push eax
call fcn.0058c62c
add esp, 0xc
mov edx, dword [ebp - 0xb8]
add edx, 0x10
add edx, 4
mov dword [edx], edi
mov dword [ebx + 0x10], esi
mov ecx, dword [ebx + 0x10]
cmp ecx, 0xffffffff
jne 0x58c33f
mov dword [ebp - 0x48], ebx
mov eax, dword [ebp - 0x48]
mov dl, byte [eax + 0xc]
test dl, dl
jne 0x58c327
call sub.WSOCK32.DLL_WSAGetLastError
jmp 0x58c330
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.00592df0
push eax
push ebx
call fcn.0058f584
add esp, 8
jmp 0x58c624
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x58c392
mov dword [ebp - 0x1c], 1
mov edx, dword [ebx + 0x10]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x24], ebx
mov ecx, dword [ebp - 0x24]
mov al, byte [ecx + 0xc]
test al, al
jne 0x58c378
push 4
lea edx, [ebp - 0x1c]
push edx
push 4
push 0xffff
mov ecx, dword [ebp - 0x20]
push ecx
call sub.WSOCK32.DLL_setsockopt
jmp 0x58c392
push 4
lea eax, [ebp - 0x1c]
push eax
push 4
push 0xffff
mov edx, dword [ebp - 0x20]
push edx
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.00592624
mov word [ebp - 0xd0], 2
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x58c3c5
mov esi, dword [ebp + 0x14]
mov edi, ebx
mov dl, byte [edi + 0xc]
test dl, dl
jne 0x58c3b6
push esi
call sub.WSOCK32.DLL_inet_addr
jmp 0x58c3bd
push esi
push edi
call fcn.00592170
mov dword [ebp - 0xcc], eax
jmp 0x58c3e5
mov esi, ebx
mov cl, byte [esi + 0xc]
test cl, cl
jne 0x58c3d7
push 0
call sub.WSOCK32.DLL_htonl
jmp 0x58c3df
push 0
push esi
call fcn.00592090
mov dword [ebp - 0xcc], eax
mov si, word [ebp + 0xc]
mov edi, ebx
mov al, byte [edi + 0xc]
test al, al
jne 0x58c3fa
push esi
call sub.WSOCK32.DLL_htons
jmp 0x58c401
push esi
push edi
call fcn.005920fc
mov word [ebp - 0xce], ax
mov edi, ebx
mov esi, dword [ebx + 0x10]
mov dl, byte [edi + 0xc]
test dl, dl
jne 0x58c425
push 0x10
lea ecx, [ebp - 0xd0]
push ecx
push esi
call sub.WSOCK32.DLL_bind
jmp 0x58c435
push 0x10
lea eax, [ebp - 0xd0]
push eax
push esi
push edi
call fcn.00591930
inc eax
jne 0x58c464
mov dword [ebp - 0x44], ebx
mov edx, dword [ebp - 0x44]
mov cl, byte [edx + 0xc]
test cl, cl
jne 0x58c44c
call sub.WSOCK32.DLL_WSAGetLastError
jmp 0x58c455
mov eax, dword [ebp - 0x44]
push eax
call fcn.00592df0
push eax
push ebx
call fcn.0058f584
add esp, 8
jmp 0x58c624
mov edx, dword [ebx + 0x14]
cmp edx, 6
jne 0x58c53e
mov dword [ebp - 0x2c], 1
mov ecx, dword [ebx + 0x14]
cmp ecx, 7
jne 0x58c488
mov dword [ebp - 0x28], 0x28
jmp 0x58c48f
mov dword [ebp - 0x28], 3
mov edx, dword [ebx + 0x10]
mov eax, ebx
mov cl, byte [eax + 0xc]
test cl, cl
jne 0x58c4ac
lea eax, [ebp - 0x2c]
push eax
push 0x8004667e
push edx
call sub.WSOCK32.DLL_ioctlsocket
jmp 0x58c4bc
lea ecx, [ebp - 0x2c]
push ecx
push 0x8004667e
push edx
push eax
call fcn.00591b0c
mov edx, dword [ebx + 0x10]
mov esi, dword [ebp - 0x28]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x34], ebx
mov eax, dword [ebp - 0x34]
mov edi, dword [0x6db3d4]
mov dl, byte [eax + 0xc]
test dl, dl
jne 0x58c4ea
push esi
push 0x400
push edi
mov ecx, dword [ebp - 0x30]
push ecx
call sub.WSOCK32.DLL_WSAAsyncSelect
jmp 0x58c4fe
push esi
push 0x400
push edi
mov eax, dword [ebp - 0x30]
push eax
mov edx, dword [ebp - 0x34]
push edx
call fcn.0059370c
test eax, eax
je 0x58c52d
mov dword [ebp - 0x38], ebx
mov ecx, dword [ebp - 0x38]
mov al, byte [ecx + 0xc]
test al, al
jne 0x58c516
call sub.WSOCK32.DLL_WSAGetLastError
jmp 0x58c51f
mov edx, dword [ebp - 0x38]
push edx
call fcn.00592df0
mov byte [ebx + 0x90], 0
mov al, 0x15
jmp 0x58c624
mov dword [ebx + 0xdc], 1
xor eax, eax
jmp 0x58c624
mov byte [ebx + 0x90], 1
mov byte [ebx + 0x92], 0
mov edx, dword [ebx + 0x50]
test edx, edx
je 0x58c558
xor ecx, ecx
mov dword [ebx + 0x38], ecx
mov esi, dword [ebx + 0x10]
mov edi, ebx
mov al, byte [edi + 0xc]
test al, al
jne 0x58c56e
push 5
push esi
call sub.WSOCK32.DLL_listen
jmp 0x58c577
push 5
push esi
push edi
call fcn.00592244
inc eax
jne 0x58c5bc
mov dword [ebp - 0x40], ebx
mov edx, dword [ebp - 0x40]
mov cl, byte [edx + 0xc]
test cl, cl
jne 0x58c58e
call sub.WSOCK32.DLL_WSAGetLastError
jmp 0x58c597
mov eax, dword [ebp - 0x40]
push eax
call fcn.00592df0
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x3c]
push edx
push ebx
call fcn.0058f584
add esp, 8
mov byte [ebx + 0x92], al
mov byte [ebx + 0x90], 0
mov al, byte [ebx + 0x92]
jmp 0x58c624
mov edx, dword [ebx + 0x10]
mov ecx, dword [0x6db528]
push edx
push 0x58ccc4
push ecx
call fcn.00672530
add esp, 0xc
mov dl, byte [ebx + 0xc]
test dl, dl
je 0x58c622
test eax, eax
jne 0x58c5e6
mov edx, 0x6da789
jmp 0x58c5eb
mov edx, 0x6da78c
push edx
push eax
mov eax, dword [ebx + 4]
lea ecx, [ebp - 0x170]
push eax
push str.Sock_ID_lu_DispatchThread________d___s_
push ecx
call fcn.006a0ad0
add esp, 0x14
lea eax, [ebp - 0x170]
mov ecx, dword [0x6db428]
push eax
mov edx, dword [ebx + 8]
mov eax, dword [0x6db424]
push edx
push ecx
push eax
call sub.USER32.DLL_SendMessageA
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret