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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x432dfb
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 0x413c4e
jmp 0x413750
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.00404d00
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.0040c770
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.0040b7e0
push eax
mov dword [ebp - 4], 4
call fcn.0040de90
mov edi, eax
mov eax, dword [ebp - 0x260]
add esp, 4
mov byte [ebp - 4], 3
cmp eax, esi
je 0x41385d
push esi
lea ecx, [ebp - 0x25c]
mov dword [ebp - 0x244], eax
call fcn.00419ddf
mov ecx, dword [ebp - 0x244]
mov eax, dword [ecx + 4]
cmp eax, esi
jbe 0x413835
cmp eax, 0xffffffff
jae 0x413835
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.00419e07
and esi, dword [ebp - 0x244]
je 0x41385b
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 0x413880
mov eax, dword [ebp - 0x4c]
or eax, 4
push esi
push eax
lea ecx, [ebp - 0x58]
call fcn.0040c640
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.0040d1a0
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.00410260
lea ecx, [ebp - 0x130]
push ecx
lea ecx, [ebp - 0xb8]
call fcn.00412b60
cmp dword [eax + 0x14], 0x10
jb 0x413908
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 0x413938
mov edx, dword [ebp - 0x130]
push edx
call fcn.0041b244
add esp, 4
mov eax, dword [ebp - 0x23c]
cmp edi, esi
je 0x413a8a
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 0x413997
mov edx, dword [ebp - 0x90]
mov eax, dword [edx]
push eax
call fcn.0041b244
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 0x413a32
mov edi, dword [eax]
cmp edi, esi
je 0x413a23
push esi
lea ecx, [ebp - 0x258]
call fcn.00419ddf
mov eax, dword [edi + 4]
cmp eax, esi
jbe 0x4139ff
cmp eax, 0xffffffff
jae 0x4139ff
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.00419e07
and esi, edi
je 0x413a21
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.0041b244
add esp, 4
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 0xa
call fcn.0041a49c
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 0x413c28
mov ecx, dword [ebp - 0x254]
lea edx, [ebp - 0x24c]
push edx
push eax
call fcn.0040bab0
mov edi, eax
mov dword [ebp - 0x240], edi
cmp edi, 0xffffffff
jne 0x413b7c
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 0x413afd
mov edx, dword [ebp - 0x90]
mov eax, dword [edx]
push eax
call fcn.0041b244
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.0040c8a0
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 0x413c28
cmp dword [ebp + 0x14], esi
je 0x413b9e
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 0x413bf0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x413bf0
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 0x413c18
cmp dword [ebp + 0x14], esi
je 0x413d79
lea eax, [ebp - 0x240]
push eax
lea ecx, [ebp - 0x270]
call fcn.00410640
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.0040d7b0
lea edx, [ebp - 0x58]
push edx
mov dword [ebp - 0x58], vtable.std::ios_base.0
call fcn.0041a332
mov ebx, dword [ebx + 0x1c]
add esp, 4
cmp ebx, esi
jne 0x413750
mov eax, dword [ebp - 0x26c]
mov edi, dword [ebp - 0x270]
mov ecx, dword [ebp + 0x14]
xor esi, esi
cmp ecx, esi
je 0x413df6
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 0x413d17
mov ecx, dword [edi + ebx*4]
xor eax, eax
test edx, edx
je 0x413cae
lea esp, [esp]
cmp dword [ebp + eax*4 - 0x110], ecx
je 0x413cae
inc eax
cmp eax, edx
jb 0x413ca0
cmp eax, edx
jne 0x413ccb
cmp edx, 0x40
jae 0x413ccb
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 0x413cdf
cmp dword [ebp + eax*4 - 0x234], ecx
je 0x413cdf
inc eax
cmp eax, esi
jb 0x413cd1
cmp eax, esi
jne 0x413cfc
cmp esi, 0x40
jae 0x413cfc
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 0x413d0a
mov dword [ebp - 0x23c], ecx
inc ebx
cmp ebx, dword [ebp - 0x248]
jb 0x413c90
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 0x413df6
cmp dword [ebp - 0x240], 0xffffffff
mov esi, dword [edi + ebx*4]
jne 0x413dad
lea eax, [ebp - 0x114]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x413dad
mov dword [ebp - 0x240], esi
jmp 0x413de9
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.0040d7b0
lea ecx, [ebp - 0x58]
push ecx
mov dword [ebp - 0x58], vtable.std::ios_base.0
call fcn.0041a332
mov edi, dword [ebp - 0x270]
add esp, 4
jmp 0x413df6
lea ecx, [ebp - 0x238]
push ecx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x413dcc
push esi
push str.connection_attempt_was_failed_on_socket:_d
call fcn.0041c026
add esp, 8
cmp esi, 0xffffffff
je 0x413de9
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 0x413d54
test edi, edi
je 0x413e03
push edi
call fcn.0041b244
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.0041bdb5
mov esp, ebp
pop ebp
ret 0x10