Function at 0x58beb0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
sub esp, 0x11c
push ebx
push esi
mov esi, dword [esp + 0x134]
xor ebx, ebx
cmp esi, ebx
je 0x58bedb
push esi
call fcn.00502a60
add esp, 4
test eax, eax
jne 0x58bef5
pop esi
pop ebx
add esp, 0x11c
ret
mov eax, dword [esp + 0x128]
push eax
call fcn.00502ac0
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x58c201
mov ecx, dword [esp + 0x12c]
shr ecx, 0x10
test ecx, ecx
push ebp
push edi
je 0x58bf34
cmp dword [esi + 0x41c], ebx
jne 0x58c1ff
cmp dword [esi + 0x420], ebx
je 0x58bf23
mov dword [esi + 0x82c], 3
lea edi, [esi + 0x440]
push edi
push 0x1779
jmp 0x58c141
mov dword [esi + 0x18], ebx
xor edx, edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
lea eax, [esi + 0x10c0]
mov dword [esp + 0x20], edx
push eax
mov dword [esp + 0x28], edx
mov word [esp + 0x1c], 2
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], eax
call fcn.005cbe51
add esp, 4
push eax
call dword [sym.imp.WSOCK32.dll_htons]
mov ebp, dword [sym.imp.WSOCK32.dll_inet_ntoa]
mov word [esp + 0x1a], ax
mov eax, dword [esp + 0x138]
cmp eax, 0xffffffff
je 0x58bf8e
mov dword [esp + 0x1c], eax
jmp 0x58c066
mov eax, dword [esi + 0x28]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x10], ebx
mov eax, dword [esi + 0x28]
mov ecx, dword [eax]
xor edi, edi
cmp ecx, ebx
je 0x58c066
lea esp, [esp]
mov eax, dword [eax + edi*4]
mov eax, dword [eax]
push eax
call ebp
cmp eax, ebx
je 0x58c01a
push eax
lea ecx, [esp + 0x2c]
push 0x104
push ecx
call fcn.00423900
lea edx, [esp + 0x34]
push edx
lea eax, [esi + 0x1124]
push eax
call fcn.005e31f5
add esp, 0x14
test eax, eax
je 0x58c01a
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x58c01a
call fcn.005cc2b8
push eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x2c]
push edx
push eax
call fcn.004e2f90
add esp, 0xc
cmp eax, ebx
je 0x58c01a
mov dword [esp + 0x10], eax
mov ecx, dword [eax + 0x44]
mov dword [ecx + 8], edi
mov eax, dword [esi + 0x28]
mov ecx, dword [eax + edi*4 + 4]
inc edi
cmp ecx, ebx
jne 0x58bfb0
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x58c066
push esi
push 0x32
push eax
call fcn.0054bc50
mov dword [esp + 0x1c], eax
mov ecx, dword [esi + 0x28]
mov edx, dword [eax + 8]
mov edx, dword [ecx + edx*4]
mov ecx, dword [edx]
mov dword [esp + 0x28], ecx
mov ecx, dword [esi + 0x10]
add esp, 0xc
cmp ecx, ebx
je 0x58c063
lea edx, [esp + 0x10]
push edx
call fcn.004e33a0
add esp, 4
jmp 0x58c066
mov dword [esi + 0x10], eax
cmp dword [0x617034], ebx
je 0x58c0f8
mov eax, dword [esi + 8]
push eax
call fcn.00493360
mov ecx, dword [esp + 0x20]
add esp, 4
push ecx
mov byte [esp + 0x2c], bl
call ebp
cmp eax, ebx
je 0x58c0a0
push eax
lea edx, [esp + 0x2c]
push 0x104
push edx
call fcn.00423900
add esp, 0xc
cmp byte [esp + 0x28], bl
je 0x58c0f8
lea eax, [esi + 0x1124]
push eax
call fcn.00493220
add esp, 4
test eax, eax
jne 0x58c0f8
lea ecx, [esp + 0x28]
push ecx
call fcn.00493220
add esp, 4
test eax, eax
jne 0x58c0f8
mov edx, dword [esi + 8]
mov eax, dword [esp + 0x14]
push esi
push edx
push ebx
push eax
call fcn.005cbe51
add esp, 4
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.00495580
add esp, 0x14
pop edi
pop ebp
pop esi
xor eax, eax
pop ebx
add esp, 0x11c
ret
mov edx, dword [esp + 0x1c]
mov dword [esi + 0x24ec], edx
mov eax, dword [esp + 0x1c]
push ebx
mov dword [esi + 0x838], eax
xor ecx, ecx
mov cx, word [0x609e28]
push ebx
xor edx, edx
mov dx, word [0x609e24]
push 2
push ebx
push ecx
push edx
call fcn.005285b0
add esp, 0x18
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x58c163
lea edi, [esi + 0x440]
push edi
push 0x177a
call fcn.00421db0
push esi
call fcn.0058b6a0
push esi
push edi
call fcn.0058b480
add esp, 0x14
pop edi
pop ebp
pop esi
xor eax, eax
pop ebx
add esp, 0x11c
ret
push 4
lea ecx, [esp + 0x18]
push ecx
push 8
push 0xffff
push eax
mov dword [esp + 0x28], 1
call dword [sym.imp.WSOCK32.dll_setsockopt]
mov edx, dword [0x645324]
mov eax, dword [esi + 4]
push 0x10
push 0x800d
push edx
push eax
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
mov edx, dword [esi + 4]
push 0x10
lea ecx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
je 0x58c1ff
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
je 0x58c1ff
cmp dword [esi + 0x41c], ebx
jne 0x58c1ff
cmp dword [esi + 0x420], ebx
je 0x58c1d7
mov dword [esi + 0x82c], 4
lea edi, [esi + 0x440]
push 0x3e7
push edi
call fcn.00423a00
push esi
push ebp
call fcn.0058b990
push esi
call fcn.0058b6a0
push esi
push edi
call fcn.0058b480
add esp, 0x1c
pop edi
pop ebp
pop esi
xor eax, eax
pop ebx
add esp, 0x11c
ret