Function at 0x431670
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x5188cb
mov eax, dword fs:[0]
push eax
sub esp, 0x144
push ebx
push ebp
push esi
push edi
mov eax, dword [0x56a260]
xor eax, esp
push eax
lea eax, [esp + 0x158]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov ebp, dword [esp + 0x16c]
xor eax, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
push ebp
mov dword [esp + 0x30], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x1c]
push 0x525c8c
push eax
mov dword [esp + 0x16c], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], 2
mov dword [esp + 0x44], 0x11
mov dword [esp + 0x34], ebx
call fcn.0040f860
mov edi, dword [eax]
mov eax, dword [0x56c3bc]
add esp, 0xc
cmp eax, ebx
jne 0x43171a
push ebx
call fcn.00430c30
mov dword [0x56c3bc], eax
mov ebx, dword [esp + 0x168]
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x30]
push edx
push edi
push ebx
call eax
mov edi, eax
push edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x431750
sub eax, 8
push eax
mov dword [esp + 0x1c], eax
call fcn.004d37ab
add esp, 4
test edi, edi
je 0x43177e
call fcn.0042fd50
cmp dword [eax], 1
jl 0x431777
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push ebp
push ebx
push str.CNsSocket::Connect_____pHostAddr__s___nHostPort__d___err__d___WSAGetLastError__d__n
push 0
call fcn.0042ff90
add esp, 0x18
xor eax, eax
jmp 0x431a58
mov eax, dword [esp + 0x28]
test eax, eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], eax
je 0x431a54
mov eax, dword [esp + 0x1c]
mov edi, dword [eax + 4]
mov eax, edi
sub eax, 2
je 0x4317b4
sub eax, 0x15
jne 0x4317be
mov ebx, 0x1c
mov dword [esp + 0x20], ebx
jmp 0x4317c9
mov dword [esp + 0x20], 0x10
jmp 0x4317c5
cmp dword [esp + 0x20], 0
jle 0x4317f8
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4317da
push eax
call fcn.004d37ab
add esp, 4
push ebx
call fcn.004d37a6
push ebx
mov ebp, eax
push 0
push ebp
mov dword [esp + 0x34], ebp
call fcn.004f5b00
add esp, 0x10
mov word [ebp], di
jmp 0x431800
mov ebp, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0x18]
push ebx
push edx
push ebp
call fcn.004f5c90
mov eax, dword [esi + 0x14]
xor edi, edi
add esp, 0xc
cmp eax, edi
je 0x431834
push edi
push eax
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov ecx, dword [esi + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x14], edi
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x43184a
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 4], 0xffffffff
mov edx, dword [esp + 0x1c]
mov dword [esi + 8], edi
mov eax, dword [edx + 4]
sub eax, 2
je 0x431870
sub eax, 0x15
jne 0x431a2a
push edi
push 1
mov dword [esi + 0x10], 0x17
push 0x17
jmp 0x43187c
push edi
push 1
mov dword [esi + 0x10], 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x431893
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi + 8], eax
mov eax, dword [esp + 0x170]
cmp eax, edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
jne 0x4318ce
mov eax, dword [esi + 4]
push ebx
push ebp
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x431a3f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, esi
mov dword [esi + 8], eax
call fcn.00431510
jmp 0x431a24
jge 0x431905
mov ecx, dword [esi + 4]
push ebx
push ebp
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x431a3f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
mov dword [esi + 8], eax
je 0x431a24
mov ecx, esi
call fcn.00431510
jmp 0x431a24
mov eax, dword [esi + 4]
lea edx, [esp + 0x18]
push edx
push 0x8004667e
push eax
mov dword [esp + 0x24], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [esi + 4]
push ebx
push ebp
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp dword [esp + 0x170], edi
mov ebx, 1
jg 0x431942
mov dword [esp + 0x170], ebx
cmp dword [esp + 0x170], edi
mov dword [esp + 0x14], edi
je 0x4319ca
nop
mov eax, dword [esi + 4]
lea edx, [esp + 0x4c]
push edx
push edi
lea ecx, [esp + 0x5c]
push ecx
mov dword [esp + 0x64], eax
push edi
add eax, 1
push eax
mov dword [esp + 0x68], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], edi
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x431995
mov eax, dword [esi + 4]
lea edx, [esp + 0x54]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4319af
mov dword [esp + 0x14], ebx
jmp 0x431a0c
mov eax, dword [esp + 0x174]
cmp eax, edi
je 0x4319af
mov ecx, dword [eax + 4]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4319bf
cmp dword [esi + 0xc], edi
jne 0x4319bf
sub dword [esp + 0x170], ebx
jne 0x431950
jmp 0x4319ca
push 0x2754
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi + 8], eax
mov eax, dword [esi + 0x14]
cmp eax, edi
je 0x4319f3
mov edx, dword [esi + 4]
push edi
push eax
push edx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov eax, dword [esi + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x14], edi
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x431a09
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 4], 0xffffffff
mov dword [esi + 8], edi
mov edx, dword [esi + 4]
lea ecx, [esp + 0x18]
push ecx
push 0x8004667e
push edx
mov dword [esp + 0x24], edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [esp + 0x14], edi
jne 0x431a47
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x1c]
cmp eax, edi
mov dword [esp + 0x1c], eax
jne 0x431796
jmp 0x431a47
mov dword [esp + 0x14], 1
cmp ebp, edi
je 0x431a54
push ebp
call fcn.004d37ab
add esp, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x158]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x150
ret 0x10