Function at 0x536700
Capabilities:
Connect socket
Get socket status
Initialize winsock library
Set socket configuration
Terminate process

Disassembly:
mov eax, 0x603748
call fcn.0059d590
sub esp, 0x3b8
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [ebp - 4], ebx
cmp dword [esi + 0x2008], ebx
mov dword [ebp - 0x10], esp
je 0x53672a
call fcn.005370f1
cmp dword [ebp + 8], ebx
mov byte [ebp - 4], 1
je 0x53698a
push dword [ebp + 8]
call sub.MSVCRT.dll_strlen
cmp eax, 0xf
pop ecx
ja 0x53698a
lea eax, [ebp - 0x3c4]
mov edi, 0x101
push eax
push edi
mov dword [ebp - 4], ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x53693a
cmp word [ebp - 0x3c4], di
jne 0x536934
push ebx
push 1
pop edi
push edi
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x2004], eax
jne 0x536797
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x536934
cmp dword [ebp + 0x14], ebx
je 0x5367c2
lea ecx, [ebp + 0x14]
push 4
push ecx
push 8
push 0xffff
push eax
mov dword [ebp + 0x14], edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x5367c2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x536928
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], edi
push eax
push 0x8004667e
push dword [esi + 0x2004]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x5367b7
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edi, eax
cmp edi, 0xffffffff
je 0x536928
lea ecx, [esi + 0x12430]
call fcn.0058840f
cmp al, bl
jne 0x53681d
push 0xd7
push str...3DRole_Network_socket.h
push str.ERROR:_CGameSocket::ReceiveMsg___ClientSecurity_Init_failed_at__s___d
call fcn.005950cb
add esp, 0xc
jmp 0x53693a
push ebx
lea eax, [ebp - 0x2c]
push 0x10
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov word [ebp - 0x2c], 2
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x2a], ax
lea eax, [ebp - 0x2c]
push 0x10
push eax
push dword [esi + 0x2004]
mov dword [ebp - 0x28], edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x53694d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x536928
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x234], ecx
mov dword [ebp - 0x130], ebx
xor eax, eax
cmp eax, ecx
jae 0x53689f
mov edx, dword [ebp + eax*4 - 0x230]
cmp edx, dword [esi + 0x2004]
je 0x53689d
inc eax
jmp 0x536887
cmp eax, ecx
jne 0x5368b9
cmp ecx, 0x40
jae 0x5368b9
mov ecx, dword [esi + 0x2004]
mov dword [ebp + eax*4 - 0x230], ecx
inc dword [ebp - 0x234]
xor eax, eax
cmp eax, ebx
jae 0x5368d3
mov ecx, dword [ebp + eax*4 - 0x12c]
cmp ecx, dword [esi + 0x2004]
je 0x5368d1
inc eax
jmp 0x5368bb
cmp eax, ebx
jne 0x5368ed
cmp ebx, 0x40
jae 0x5368ed
mov ecx, dword [esi + 0x2004]
mov dword [ebp + eax*4 - 0x12c], ecx
inc dword [ebp - 0x130]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x130]
push eax
lea eax, [ebp - 0x234]
push eax
push ebx
push 0x40
call dword [sym.imp.WS2_32.dll_select]
cmp eax, ebx
je 0x536928
jl 0x5367b7
lea eax, [ebp - 0x130]
push eax
push dword [esi + 0x2004]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x53694d
push dword [esi + 0x2004]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x10
push 1
lea eax, [esi + 0x12014]
pop ecx
mov dword [esi + 0x1200c], ebx
mov dword [esi + 0x12010], ebx
mov dword [esi + 0x2000], ebx
mov dword [esi + 0x2008], ecx
mov dword [eax + 4], ebx
mov dword [eax], ebx
lea eax, [esi + 0x1221c]
mov dword [eax + 4], ebx
mov dword [eax], ebx
mov eax, ecx
jmp 0x53693c
push 5
call dword [sym.imp.MSVCRT.dll_exit]