Function at 0x4136f0
Capabilities:
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x432e5b
mov eax, dword fs:[0]
push eax
sub esp, 0x28c
mov eax, dword [0x43e460]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x248], eax
xor edi, edi
mov dword [ebp - 0x254], ecx
mov dword [ebp - 0x240], 0xffffffff
mov dword [ebp - 0x270], edi
mov dword [ebp - 0x26c], eax
mov dword [ebp - 0x268], eax
mov dword [ebp - 4], eax
cmp ebx, eax
je 0x413c5e
jmp 0x413760
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebx + 0x18]
mov word [ecx + 2], ax
mov edx, dword [ebx + 0xc]
mov eax, dword [ebp + 0x10]
push 4
push edx
push eax
mov dword [ebx + 8], eax
mov eax, dword [ebx + 4]
push eax
lea ecx, [ebp - 0x134]
push ecx
call fcn.00404ae0
mov ecx, 8
mov esi, eax
lea edi, [ebp - 0x294]
rep movsd dword es:[edi], dword [esi]
xor esi, esi
add esp, 0x14
mov dword [ebp - 0x23c], esi
mov dword [ebp - 0xb8], 0x435bbc
mov dword [ebp - 0xa8], 0x435bb4
or dword [ebp - 0x248], 1
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 1
mov dword [ebp - 0x58], 0x43580c
mov dword [ebp - 0xb0], esi
mov dword [ebp - 0xac], esi
call fcn.0040c7b0
lea eax, [ebp - 0x260]
lea edx, [ebp - 0xa0]
push eax
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], esi
call fcn.0040b830
push eax
mov dword [ebp - 4], 4
call fcn.0040df20
mov edi, eax
mov eax, dword [ebp - 0x260]
add esp, 4
mov byte [ebp - 4], 3
cmp eax, esi
je 0x41386d
push esi
lea ecx, [ebp - 0x25c]
mov dword [ebp - 0x244], eax
call fcn.00419e25
mov ecx, dword [ebp - 0x244]
mov eax, dword [ecx + 4]
cmp eax, esi
jbe 0x413845
cmp eax, 0xffffffff
jae 0x413845
dec eax
mov dword [ecx + 4], eax
mov esi, dword [ecx + 4]
neg esi
sbb esi, esi
lea ecx, [ebp - 0x25c]
not esi
call fcn.00419e4d
and esi, dword [ebp - 0x244]
je 0x41386b
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
xor esi, esi
mov edx, dword [edi]
mov eax, dword [edx + 0x18]
push 0x20
mov ecx, edi
call eax
mov byte [ebp - 0x18], al
cmp dword [ebp - 0x20], esi
jne 0x413890
mov eax, dword [ebp - 0x4c]
or eax, 4
push esi
push eax
lea ecx, [ebp - 0x58]
call fcn.0040c680
mov ecx, dword [ebp - 0xa8]
mov edx, dword [ecx + 4]
mov dword [ebp + edx - 0xa8], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xb8]
mov ecx, dword [eax + 4]
mov dword [ebp + ecx - 0xb8], 0x435810
mov edx, dword [ebp - 0xb8]
mov eax, dword [edx + 4]
lea ecx, [ebp - 0xa0]
mov dword [ebp - 4], 7
mov dword [ebp + eax - 0xb8], 0x4358e4
call fcn.0040d170
mov dword [ebp - 0xa0], 0x435864
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x60], esi
push esi
lea ecx, [ebp - 0xa8]
mov byte [ebp - 4], 9
call fcn.00410200
lea ecx, [ebp - 0x130]
push ecx
lea ecx, [ebp - 0xb8]
call fcn.00412b70
cmp dword [eax + 0x14], 0x10
jb 0x413918
mov eax, dword [eax]
lea edx, [ebp - 0x23c]
push edx
lea ecx, [ebp - 0x294]
push ecx
push eax
push esi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
cmp dword [ebp - 0x11c], 0x10
mov edi, eax
jb 0x413948
mov edx, dword [ebp - 0x130]
push edx
call fcn.0041b28a
add esp, 4
mov eax, dword [ebp - 0x23c]
cmp edi, esi
je 0x413a9a
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov edx, dword [ebp - 0xb8]
mov eax, dword [edx + 4]
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x274], ecx
mov dword [ebp + eax - 0xb8], 0x4358e4
test byte [ebp - 0x60], 1
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0x24c], ecx
mov dword [ebp - 0xa0], 0x435864
je 0x4139a7
mov edx, dword [ebp - 0x90]
mov eax, dword [edx]
push eax
call fcn.0041b28a
add esp, 4
mov eax, dword [ebp - 0x90]
mov dword [eax], esi
mov ecx, dword [ebp - 0x80]
mov dword [ecx], esi
mov edx, dword [ebp - 0x70]
mov dword [edx], esi
mov eax, dword [ebp - 0x8c]
mov dword [eax], esi
mov ecx, dword [ebp - 0x7c]
mov dword [ecx], esi
mov edx, dword [ebp - 0x6c]
mov dword [edx], esi
and dword [ebp - 0x60], 0xfffffffe
mov dword [ebp - 0x64], esi
mov dword [ebp - 0xa0], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x68]
mov byte [ebp - 4], 0xb
mov dword [ebp - 0x244], eax
cmp eax, esi
je 0x413a42
mov edi, dword [eax]
cmp edi, esi
je 0x413a33
push esi
lea ecx, [ebp - 0x258]
call fcn.00419e25
mov eax, dword [edi + 4]
cmp eax, esi
jbe 0x413a0f
cmp eax, 0xffffffff
jae 0x413a0f
dec eax
mov dword [edi + 4], eax
mov esi, dword [edi + 4]
neg esi
sbb esi, esi
lea ecx, [ebp - 0x258]
not esi
call fcn.00419e4d
and esi, edi
je 0x413a31
mov eax, dword [esi]
mov edx, dword [eax]
push 1
mov ecx, esi
call edx
xor esi, esi
mov eax, dword [ebp - 0x244]
push eax
call fcn.0041b28a
add esp, 4
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 0xa
call fcn.0041a4e2
mov ecx, dword [ebp - 0xb8]
mov edx, dword [ecx + 4]
mov dword [ebp + edx - 0xb8], 0x435810
mov eax, dword [ebp - 0xa8]
mov ecx, dword [eax + 4]
mov dword [ebp + ecx - 0xa8], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov edx, dword [ebp - 0xb8]
mov eax, dword [edx + 4]
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0
mov dword [ebp + eax - 0xb8], 0x43580c
push ecx
jmp 0x413c38
mov ecx, dword [ebp - 0x254]
lea edx, [ebp - 0x24c]
push edx
push eax
call fcn.0040bb30
mov edi, eax
mov dword [ebp - 0x240], edi
cmp edi, 0xffffffff
jne 0x413b8c
mov ecx, dword [ebp - 0x23c]
push ecx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov eax, dword [ebp - 0xb8]
mov ecx, dword [eax + 4]
lea edx, [ebp - 0x58]
mov dword [ebp - 0x24c], edx
mov dword [ebp + ecx - 0xb8], 0x4358e4
test byte [ebp - 0x60], 1
mov byte [ebp - 4], 0xc
mov dword [ebp - 0xa0], 0x435864
je 0x413b0d
mov edx, dword [ebp - 0x90]
mov eax, dword [edx]
push eax
call fcn.0041b28a
add esp, 4
mov eax, dword [ebp - 0x90]
mov dword [eax], esi
mov ecx, dword [ebp - 0x80]
mov dword [ecx], esi
mov edx, dword [ebp - 0x70]
mov dword [edx], esi
mov eax, dword [ebp - 0x8c]
mov dword [eax], esi
mov ecx, dword [ebp - 0x7c]
mov dword [ecx], esi
mov edx, dword [ebp - 0x6c]
mov dword [edx], esi
and dword [ebp - 0x60], 0xfffffffe
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0x64], esi
call fcn.0040c8e0
mov eax, dword [ebp - 0xb8]
mov ecx, dword [eax + 4]
mov dword [ebp + ecx - 0xb8], 0x435810
mov edx, dword [ebp - 0xa8]
mov eax, dword [edx + 4]
mov dword [ebp + eax - 0xa8], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov ecx, dword [ebp - 0xb8]
mov edx, dword [ecx + 4]
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 0
mov dword [ebp + edx - 0xb8], 0x43580c
push eax
jmp 0x413c38
cmp dword [ebp + 0x14], esi
je 0x413bae
lea ecx, [ebp - 0x244]
push ecx
push 0x8004667e
push edi
mov dword [ebp - 0x244], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edx, dword [ebx + 0x10]
mov eax, dword [ebx + 0x18]
push edx
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x413c00
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x413c00
push 2
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0x23c]
push ecx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov dword [ebp - 0x240], 0xffffffff
jmp 0x413c28
cmp dword [ebp + 0x14], esi
je 0x413d89
lea eax, [ebp - 0x240]
push eax
lea ecx, [ebp - 0x270]
call fcn.00410710
mov ecx, dword [ebp - 0x23c]
push ecx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0
call fcn.0040d840
lea edx, [ebp - 0x58]
push edx
mov dword [ebp - 0x58], vtable.std::ios_base.0
call fcn.0041a378
mov ebx, dword [ebx + 0x1c]
add esp, 4
cmp ebx, esi
jne 0x413760
mov eax, dword [ebp - 0x26c]
mov edi, dword [ebp - 0x270]
mov ecx, dword [ebp + 0x14]
xor esi, esi
cmp ecx, esi
je 0x413e06
sub eax, edi
xor ebx, ebx
sar eax, 2
xor edx, edx
mov dword [ebp - 0x24c], esi
mov dword [ebp - 0x250], ecx
mov dword [ebp - 0x114], edx
mov dword [ebp - 0x238], esi
mov dword [ebp - 0x23c], ebx
mov dword [ebp - 0x248], eax
cmp eax, ebx
jbe 0x413d27
mov ecx, dword [edi + ebx*4]
xor eax, eax
test edx, edx
je 0x413cbe
lea esp, [esp]
cmp dword [ebp + eax*4 - 0x110], ecx
je 0x413cbe
inc eax
cmp eax, edx
jb 0x413cb0
cmp eax, edx
jne 0x413cdb
cmp edx, 0x40
jae 0x413cdb
mov dword [ebp + eax*4 - 0x110], ecx
mov edx, dword [ebp - 0x114]
inc edx
mov dword [ebp - 0x114], edx
xor eax, eax
test esi, esi
je 0x413cef
cmp dword [ebp + eax*4 - 0x234], ecx
je 0x413cef
inc eax
cmp eax, esi
jb 0x413ce1
cmp eax, esi
jne 0x413d0c
cmp esi, 0x40
jae 0x413d0c
mov dword [ebp + eax*4 - 0x234], ecx
mov esi, dword [ebp - 0x238]
inc esi
mov dword [ebp - 0x238], esi
cmp ecx, dword [ebp - 0x23c]
jle 0x413d1a
mov dword [ebp - 0x23c], ecx
inc ebx
cmp ebx, dword [ebp - 0x248]
jb 0x413ca0
lea edx, [ebp - 0x250]
push edx
mov edx, dword [ebp - 0x23c]
lea eax, [ebp - 0x238]
push eax
lea ecx, [ebp - 0x114]
push ecx
push 0
inc edx
push edx
call dword [sym.imp.WS2_32.dll_select]
xor ebx, ebx
mov dword [ebp - 0x240], 0xffffffff
cmp dword [ebp - 0x248], ebx
jbe 0x413e06
cmp dword [ebp - 0x240], 0xffffffff
mov esi, dword [edi + ebx*4]
jne 0x413dbd
lea eax, [ebp - 0x114]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x413dbd
mov dword [ebp - 0x240], esi
jmp 0x413df9
mov eax, dword [ebp - 0x23c]
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0
call fcn.0040d840
lea ecx, [ebp - 0x58]
push ecx
mov dword [ebp - 0x58], vtable.std::ios_base.0
call fcn.0041a378
mov edi, dword [ebp - 0x270]
add esp, 4
jmp 0x413e06
lea ecx, [ebp - 0x238]
push ecx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x413ddc
push esi
push str.connection_attempt_was_failed_on_socket:_d
call fcn.0041c077
add esp, 8
cmp esi, 0xffffffff
je 0x413df9
push 2
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
inc ebx
cmp ebx, dword [ebp - 0x248]
jb 0x413d64
test edi, edi
je 0x413e13
push edi
call fcn.0041b28a
add esp, 4
mov eax, dword [ebp - 0x240]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041be05
mov esp, ebp
pop ebp
ret 0x10