Function at 0x58d428
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
add esp, 0xffffffa4
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0xe0]
test eax, eax
jne 0x58d445
mov al, 0x15
jmp 0x58d7f9
mov edi, dword [ebx + 0x118]
xor eax, eax
mov dword [ebx + 0x118], eax
test edi, edi
je 0x58d496
mov dl, byte [ebx + 0x108]
test dl, dl
jne 0x58d496
mov esi, dword [ebx + 0x100]
mov dword [ebp - 4], ebx
mov ecx, dword [ebp - 4]
mov al, byte [ecx + 0xc]
test al, al
jne 0x58d47c
push esi
call sub.WSOCK32.DLL_inet_addr
jmp 0x58d486
push esi
mov edx, dword [ebp - 4]
push edx
call fcn.00592170
mov dword [ebx + 0xec], eax
mov dword [ebx + 0xe4], 1
mov ecx, dword [ebx + 0xe4]
test ecx, ecx
jne 0x58d4c0
xor eax, eax
test edi, edi
mov dword [ebx + 0xe0], eax
je 0x58d4b9
push 0x10
push 4
push ebx
call fcn.0058f630
add esp, 0xc
mov al, 0x10
jmp 0x58d7f9
mov dword [ebp - 8], ebx
mov edx, dword [ebp - 8]
mov cl, byte [edx + 0xc]
test cl, cl
jne 0x58d4dc
push 0
push 1
push 2
call sub.WSOCK32.DLL_socket
mov esi, eax
jmp 0x58d4ed
push 0
push 1
push 2
mov eax, dword [ebp - 8]
push eax
call fcn.00592a38
mov esi, eax
cmp esi, 0xffffffff
je 0x58d523
xor edx, edx
lea eax, [ebp - 0x14]
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x14], esi
mov ecx, dword [ebp - 0xc]
lea edx, [ebp - 0x4c]
mov dword [ebp - 0x10], ecx
push eax
push 0x6db34c
push edx
call fcn.0058c62c
add esp, 0xc
mov ecx, dword [ebp - 0x44]
add ecx, 0x10
add ecx, 4
mov eax, dword [ebp - 8]
mov dword [ecx], eax
mov dword [ebx + 0x10], esi
mov edx, dword [ebx + 0x10]
cmp edx, 0xffffffff
jne 0x58d57d
mov esi, ebx
xor ecx, ecx
mov dword [ebx + 0xe0], ecx
mov al, byte [esi + 0xc]
test al, al
jne 0x58d546
call sub.WSOCK32.DLL_WSAGetLastError
jmp 0x58d54c
push esi
call fcn.00592df0
push eax
push ebx
call fcn.0058f584
add esp, 8
mov byte [ebx + 0xf8], al
test edi, edi
je 0x58d572
mov dl, byte [ebx + 0xf8]
push edx
push 4
push ebx
call fcn.0058f630
add esp, 0xc
mov al, byte [ebx + 0xf8]
jmp 0x58d7f9
cmp word [ebx + 0xfa], 0
jne 0x58d5af
mov esi, ebx
mov dl, byte [esi + 0xc]
test dl, dl
jne 0x58d599
push 0
call sub.WSOCK32.DLL_htonl
jmp 0x58d5a1
push 0
push esi
call fcn.00592090
mov ecx, dword [ebx + 0xfc]
cmp eax, ecx
je 0x58d6a4
mov word [ebp - 0x5c], 2
mov eax, dword [ebx + 0xfc]
mov dword [ebp - 0x58], eax
mov si, word [ebx + 0xfa]
mov dword [ebp - 0x18], ebx
mov edx, dword [ebp - 0x18]
mov cl, byte [edx + 0xc]
test cl, cl
jne 0x58d5da
push esi
call sub.WSOCK32.DLL_htons
jmp 0x58d5e4
push esi
mov eax, dword [ebp - 0x18]
push eax
call fcn.005920fc
mov word [ebp - 0x5a], ax
mov eax, ebx
mov dword [ebp - 0x1c], 1
mov cl, byte [eax + 0xc]
mov edx, dword [ebx + 0x10]
test cl, cl
jne 0x58d610
push 4
lea eax, [ebp - 0x1c]
push eax
push 4
push 0xffff
push edx
call sub.WSOCK32.DLL_setsockopt
jmp 0x58d624
push 4
lea ecx, [ebp - 0x1c]
push ecx
push 4
push 0xffff
push edx
push eax
call fcn.00592624
mov esi, dword [ebx + 0x10]
mov dword [ebp - 0x20], ebx
mov edx, dword [ebp - 0x20]
mov al, byte [edx + 0xc]
test al, al
jne 0x58d642
push 0x10
lea edx, [ebp - 0x5c]
push edx
push esi
call sub.WSOCK32.DLL_bind
jmp 0x58d652
push 0x10
lea ecx, [ebp - 0x5c]
push ecx
push esi
mov eax, dword [ebp - 0x20]
push eax
call fcn.00591930
inc eax
jne 0x58d6a4
mov esi, ebx
xor edx, edx
mov dword [ebx + 0xe0], edx
mov cl, byte [esi + 0xc]
test cl, cl
jne 0x58d66d
call sub.WSOCK32.DLL_WSAGetLastError
jmp 0x58d673
push esi
call fcn.00592df0
push eax
push ebx
call fcn.0058f584
add esp, 8
mov byte [ebx + 0xf8], al
test edi, edi
je 0x58d699
mov al, byte [ebx + 0xf8]
push eax
push 4
push ebx
call fcn.0058f630
add esp, 0xc
mov al, byte [ebx + 0xf8]
jmp 0x58d7f9
mov eax, ebx
mov dword [ebp - 0x24], 1
mov cl, byte [eax + 0xc]
mov edx, dword [ebx + 0x10]
test cl, cl
jne 0x58d6c8
lea eax, [ebp - 0x24]
push eax
push 0x8004667e
push edx
call sub.WSOCK32.DLL_ioctlsocket
jmp 0x58d6d8
lea ecx, [ebp - 0x24]
push ecx
push 0x8004667e
push edx
push eax
call fcn.00591b0c
mov esi, dword [0x6db3d4]
mov edx, dword [ebx + 0x10]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x2c], ebx
mov eax, dword [ebp - 0x2c]
mov dl, byte [eax + 0xc]
test dl, dl
jne 0x58d704
push 0x30
push 0x400
push esi
mov ecx, dword [ebp - 0x28]
push ecx
call sub.WSOCK32.DLL_WSAAsyncSelect
jmp 0x58d719
push 0x30
push 0x400
push esi
mov eax, dword [ebp - 0x28]
push eax
mov edx, dword [ebp - 0x2c]
push edx
call fcn.0059370c
test eax, eax
je 0x58d748
xor ecx, ecx
mov al, 0x15
mov dword [ebx + 0xe0], ecx
mov byte [ebx + 0xf8], al
test edi, edi
je 0x58d73d
push eax
push 4
push ebx
call fcn.0058f630
add esp, 0xc
mov al, byte [ebx + 0xf8]
jmp 0x58d7f9
mov edx, dword [ebx + 0x50]
test edx, edx
je 0x58d754
xor ecx, ecx
mov dword [ebx + 0x3c], ecx
lea esi, [ebx + 0xe8]
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], ebx
mov edx, dword [ebp - 0x34]
mov cl, byte [edx + 0xc]
test cl, cl
jne 0x58d77b
push 0x10
push esi
mov eax, dword [ebp - 0x30]
push eax
call sub.WSOCK32.DLL_connect
jmp 0x58d78b
push 0x10
push esi
mov edx, dword [ebp - 0x30]
push edx
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.00591a68
inc eax
jne 0x58d7f7
mov esi, ebx
mov al, byte [esi + 0xc]
test al, al
jne 0x58d79e
call sub.WSOCK32.DLL_WSAGetLastError
jmp 0x58d7a4
push esi
call fcn.00592df0
cmp eax, 0x2733
je 0x58d7f7
mov esi, ebx
xor edx, edx
mov dword [ebx + 0xe0], edx
mov cl, byte [esi + 0xc]
test cl, cl
jne 0x58d7c3
call sub.WSOCK32.DLL_WSAGetLastError
jmp 0x58d7c9
push esi
call fcn.00592df0
push eax
push ebx
call fcn.0058f584
add esp, 8
mov byte [ebx + 0xf8], al
test edi, edi
je 0x58d7ef
mov al, byte [ebx + 0xf8]
push eax
push 4
push ebx
call fcn.0058f630
add esp, 0xc
mov al, byte [ebx + 0xf8]
jmp 0x58d7f9
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret