Function at 0x6f8d7cf0
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xbc
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x88], 0xffffffff
mov ebx, dword [eax + 8]
test ebx, ebx
je 0x6f8d8173
cmp byte [ebx], 0
mov eax, 0x6f91cd8b
cmove ebx, eax
mov eax, dword [ebp + 0x14]
mov edx, dword [eax + 0xc]
test edx, edx
jne 0x6f8d7d51
mov esi, dword [eax + 4]
mov edi, 0x6f91cd95
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
seta al
sbb al, 0
movsx eax, al
cmp eax, 1
sbb edx, edx
and edx, 0xf7
add edx, 0x185
cmp dword [ebp + 0x10], 1
je 0x6f8d8164
cmp dword [ebp + 0x10], 2
mov esi, 0xffffffff
jne 0x6f8d7f9c
mov dword [ebp - 0x98], 2
lea esi, [ebp - 0x38]
xor eax, eax
mov ecx, 8
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, dword [0x6f9166ec]
lea edi, [ebp - 0x7f]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x6f91cd88
mov dword [esp + 4], 7
mov dword [esp], edi
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x30], eax
call sym._snprintf.constprop.0
mov dword [esp], 0x6f9166f0
call sym._ldap_pvt_thread_mutex_lock
lea eax, [ebp - 0x84]
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], edi
call sym._getaddrinfo_16
sub esp, 0x10
mov ebx, eax
mov dword [esp], 0x6f9166f0
call sym._ldap_pvt_thread_mutex_unlock
test ebx, ebx
jne 0x6f8d8194
mov edi, dword [ebp - 0x84]
mov esi, 0xffffffff
test edi, edi
je 0x6f8d7f91
mov dword [ebp - 0x8c], esi
mov esi, dword [ebp + 8]
lea esi, [esi]
mov ecx, dword [edi + 0x18]
test ecx, ecx
je 0x6f8d7f7a
mov eax, dword [edi + 4]
cmp eax, 0x17
je 0x6f8d7f7a
mov ecx, dword [ebp - 0x98]
mov dword [esp + 8], 0
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [sym.imp.ws2_32.dll_socket]
mov dword [ebp - 0x88], eax
sub esp, 0xc
mov ebx, eax
cmp eax, 0xffffffff
je 0x6f8d7f7a
cmp dword [ebp + 0x10], 1
je 0x6f8d80f8
cmp dword [edi + 4], 2
je 0x6f8d7fb0
mov eax, dword [esi]
mov edx, dword [edi + 0x10]
mov ebx, dword [ebp - 0x88]
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], edx
mov edx, dword [edi + 0x18]
mov dword [ebp - 0x9c], edx
mov edx, dword [eax + 0x50]
test edx, edx
jns 0x6f8d80c0
mov dword [ebp - 0x94], edi
mov edi, dword [ebp - 0x9c]
jmp 0x6f8d7ece
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp eax, 4
jne 0x6f8d8068
mov eax, dword [esi]
test byte [eax + 0xa0], 2
je 0x6f8d8050
mov eax, dword [ebp - 0x8c]
mov dword [esp + 4], edi
mov dword [esp], ebx
mov dword [esp + 8], eax
call dword [sym.imp.ws2_32.dll_connect]
sub esp, 0xc
cmp eax, 0xffffffff
je 0x6f8d7eb0
mov ecx, dword [ebp + 0x18]
mov edi, dword [ebp - 0x94]
test ecx, ecx
jne 0x6f8d7f1d
mov edx, dword [ebp - 0x90]
test edx, edx
je 0x6f8d7f1d
mov dword [esp + 4], 0
mov dword [esp], ebx
call sym._ber_pvt_socket_set_nonblock
cmp eax, 0xffffffff
je 0x6f8d8056
xor ebx, ebx
mov eax, dword [edi + 0x18]
mov dword [esp], esi
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x88]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
call sym._ldap_int_connect_cbs
mov dword [ebp - 0x8c], eax
test eax, eax
je 0x6f8d8187
mov ebx, dword [ebp - 0x88]
mov dword [esp + 4], 2
mov dword [esp], ebx
call dword [sym.imp.ws2_32.dll_shutdown]
sub esp, 8
mov dword [esp], ebx
call dword [sym.imp.ws2_32.dll_closesocket]
sub esp, 4
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x6f8d7e10
mov esi, dword [ebp - 0x8c]
mov edi, dword [ebp - 0x84]
mov dword [esp], edi
call sym._freeaddrinfo_4
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x66]
mov dword [esp + 0xc], 0x16
mov dword [esp + 8], eax
mov eax, dword [edi + 0x18]
mov dword [esp], 2
add eax, 4
mov dword [esp + 4], eax
call sym._inet_ntop_16
mov eax, dword [esi]
sub esp, 0x10
cmp word [eax + 0xac], 0
je 0x6f8d7e6c
mov eax, dword [eax + 0xa8]
mov dword [esp], 2
lea ebx, [ebp - 0x78]
mov dword [esp + 0xc], 0x16
mov dword [ebp - 0x74], eax
lea eax, [ebp - 0x50]
mov dword [esp + 8], eax
lea eax, [ebp - 0x74]
mov dword [esp + 4], eax
mov dword [ebp - 0x78], 2
call sym._inet_ntop_16
mov eax, dword [ebp - 0x88]
sub esp, 0x10
mov dword [esp + 8], 0x10
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_bind]
sub esp, 0xc
test eax, eax
jne 0x6f8d7f54
jmp 0x6f8d7e6a
mov edi, dword [ebp - 0x94]
mov dword [ebp - 0x8c], 0xffffffff
jmp 0x6f8d7f54
sub eax, 0x2733
mov edi, dword [ebp - 0x94]
cmp eax, 1
ja 0x6f8d8056
mov eax, dword [ebp + 0x18]
test eax, eax
jne 0x6f8d817d
mov eax, dword [ebp - 0x90]
mov dword [esp + 0xc], 1
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp], esi
call sym._ldap_int_poll
mov dword [ebp - 0x8c], eax
add eax, 2
and eax, 0xfffffffd
jne 0x6f8d7f54
mov ebx, dword [ebp - 0x8c]
jmp 0x6f8d7f1f
mov edx, dword [eax + 0x54]
mov eax, dword [eax + 0x50]
mov dword [esp + 4], 1
mov dword [esp], ebx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], edx
call sym._ber_pvt_socket_set_nonblock
cmp eax, 0xffffffff
je 0x6f8d8056
lea eax, [ebp - 0x50]
mov dword [ebp - 0x90], eax
jmp 0x6f8d7e99
mov edx, dword [sym.imp.ws2_32.dll_setsockopt]
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x50], 1
mov dword [esp + 0xc], ecx
mov dword [ebp - 0x90], edx
mov dword [esp + 0x10], 4
mov dword [esp + 8], 8
mov dword [esp + 4], 0xffff
mov dword [esp], eax
call edx
lea ecx, [ebp - 0x50]
mov edx, dword [ebp - 0x90]
sub esp, 0x14
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 1
mov dword [esp + 4], 6
mov dword [esp], ebx
call edx
sub esp, 0x14
jmp 0x6f8d7e60
mov dword [ebp - 0x98], 1
jmp 0x6f8d7d74
mov ebx, 0x6f91cd8b
jmp 0x6f8d7d1f
mov ebx, 0xfffffffe
jmp 0x6f8d7f1f
mov edi, dword [ebp - 0x84]
mov esi, ebx
jmp 0x6f8d7f91
mov esi, 0xffffffff
jmp 0x6f8d7f9c