Function at 0x6f8e4fc0
Capabilities:
Initialize winsock library
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1dc
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [esp], 0x6f916594
call sym._ldap_int_mutex_firstcreate
mov dword [esp], 0x6f916594
call sym._ldap_pvt_thread_mutex_lock
cmp word [ebx], 1
je 0x6f8e502f
call sym._ldap_int_error_init
lea esi, [ebp - 0x1a8]
call sym._ldap_int_utils_init
mov dword [esp + 4], esi
mov dword [esp], 2
call dword [sym.imp.ws2_32.dll_WSAStartup]
sub esp, 8
test eax, eax
jne 0x6f8e502f
movzx eax, word [ebp - 0x1a8]
cmp al, 2
jne 0x6f8e5029
shr ax, 8
je 0x6f8e5048
call dword [sym.imp.ws2_32.dll_WSACleanup]
mov dword [ebp + 8], 0x6f916594
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp sym._ldap_pvt_thread_mutex_unlock
mov dword [esp], 0x6f9166e8
call sym._ldap_pvt_thread_mutex_lock
mov edx, dword [0x6f9166e4]
mov dword [esp], edx
mov dword [ebp - 0x1bc], edx
call sym._ldap_pvt_get_fqdn
mov edx, dword [ebp - 0x1bc]
mov dword [0x6f9166e4], eax
test edx, edx
je 0x6f8e508b
cmp eax, edx
je 0x6f8e508b
mov dword [esp + 4], 0
mov dword [esp], edx
call sym._ber_memfree_x
mov dword [esp], 0x6f9166e8
call sym._ldap_pvt_thread_mutex_unlock
mov eax, dword [0x6f9166f8]
test eax, eax
je 0x6f8e5440
call sym._ldap_int_sasl_init
test eax, eax
jne 0x6f8e502f
mov dword [esp + 4], edi
mov dword [esp], ebx
call sym._ldap_int_initialize_global_options
mov eax, dword [sym.imp.ucrtbase.dll_getenv]
mov dword [esp], str.LDAPNOINIT
mov dword [ebp - 0x1c0], eax
call eax
test eax, eax
jne 0x6f8e502f
mov dword [esp], str.LDAPSTACKGUARD
mov eax, dword [ebp - 0x1c0]
call eax
test eax, eax
je 0x6f8e50f2
mov dword [0x6f9166f4], 1
mov dword [esp], str.USER
mov eax, dword [ebp - 0x1c0]
call eax
test eax, eax
je 0x6f8e54c5
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._ber_strdup_x
mov dword [ebx + 0xf8], eax
xor edx, edx
mov eax, str.ldap.conf
call sym._openldap_ldap_init_w_conf
mov eax, str.ldaprc
call sym._openldap_ldap_init_w_userconf.part.0
mov dword [esp], str.LDAPCONF
mov eax, dword [ebp - 0x1c0]
call eax
test eax, eax
je 0x6f8e514f
xor edx, edx
call sym._openldap_ldap_init_w_conf
mov dword [esp], str.LDAPRC
mov eax, dword [ebp - 0x1c0]
call eax
test eax, eax
je 0x6f8e5167
call sym._openldap_ldap_init_w_userconf.part.0
mov dword [ebp - 0x1a8], 0x5041444c
mov edi, 0x6f91f02c
mov dword [ebp - 0x1a4], 0
mov byte [ebp - 0x1a0], 0
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
mov ecx, 8
mov dword [ebp - 0x1cc], ebx
mov dword [ebp - 0x1bc], 8
mov edx, eax
mov ebx, ecx
mov eax, str.TIMEOUT
add edx, esi
mov dword [ebp - 0x1c4], edx
lea esi, [esi]
lea esi, [esi]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strcpy]
mov dword [esp], esi
mov eax, dword [ebp - 0x1c0]
call eax
mov edx, eax
test eax, eax
je case.0x6f8e51e9.0
cmp ebx, 9
ja case.0x6f8e51e9.0
jmp dword [ebx*4 + 0x6f91de04]
lea eax, [ebp - 0x1b4]
mov dword [esp], edx
mov dword [ebp - 0x1c8], edx
mov dword [esp + 8], 0xa
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll_strtol]
mov ecx, dword [ebp - 0x1b4]
mov edx, dword [ebp - 0x1c8]
cmp edx, ecx
je case.0x6f8e51e9.0
cmp byte [ecx], 0
jne case.0x6f8e51e9.0
test eax, eax
jg 0x6f8e54f8
nop
mov ebx, dword [ebp - 0x1bc]
add edi, 0x14
test ebx, ebx
je 0x6f8e502f
mov ecx, dword [edi + 0xc]
mov eax, dword [edi - 4]
mov dword [ebp - 0x1bc], ecx
jmp 0x6f8e51c0
lea eax, [ebp - 0x1b4]
mov dword [esp], edx
mov dword [ebp - 0x1c8], edx
mov dword [ebp - 0x1ac], 0
mov dword [esp + 8], 0xa
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll_strtol]
mov ecx, dword [ebp - 0x1b4]
mov edx, dword [ebp - 0x1c8]
mov dword [ebp - 0x1b0], eax
cmp edx, ecx
je case.0x6f8e51e9.0
cmp byte [ecx], 0
jne case.0x6f8e51e9.0
test eax, eax
jle case.0x6f8e51e9.0
lea eax, [ebp - 0x1b0]
mov dword [esp + 8], eax
mov eax, dword [edi + 4]
mov dword [esp], 0
mov dword [esp + 4], eax
call sym._ldap_set_option
jmp case.0x6f8e51e9.0
mov dword [esp + 8], eax
mov eax, dword [edi + 4]
mov dword [esp], 0
mov dword [esp + 4], eax
call sym._ldap_pvt_tls_config
jmp case.0x6f8e51e9.0
mov dword [esp + 8], eax
mov eax, dword [edi + 4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1cc]
mov dword [esp], eax
call sym._ldap_int_sasl_config
jmp case.0x6f8e51e9.0
mov dword [esp + 8], eax
mov eax, dword [edi + 4]
mov dword [esp], 0
mov dword [esp + 4], eax
call sym._ldap_set_option
jmp case.0x6f8e51e9.0
mov ebx, dword [ebp - 0x1cc]
add ebx, dword [edi + 4]
mov eax, dword [ebx]
test eax, eax
je 0x6f8e535b
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [ebp - 0x1c8], edx
call sym._ber_memfree_x
mov edx, dword [ebp - 0x1c8]
cmp byte [edx], 0
jne 0x6f8e54ae
mov dword [ebx], 0
jmp case.0x6f8e51e9.0
mov dword [esp], eax
mov dword [ebp - 0x1d0], eax
mov eax, dword [sym.imp.ucrtbase.dll__stricmp]
mov dword [esp + 4], 0x6f91dd50
mov dword [ebp - 0x1c8], eax
call eax
mov ebx, dword [edi + 4]
mov edx, dword [ebp - 0x1d0]
test eax, eax
jne 0x6f8e5455
mov ecx, ebx
mov eax, 1
shl eax, cl
mov ecx, dword [ebp - 0x1cc]
or dword [ecx + 0x70], eax
jmp case.0x6f8e51e9.0
mov ebx, dword [edi]
mov eax, dword [ebx]
test eax, eax
je case.0x6f8e51e9.0
mov ecx, dword [sym.imp.ucrtbase.dll__stricmp]
mov dword [ebp - 0x1d0], edi
mov edi, edx
mov dword [ebp - 0x1c8], ecx
jmp 0x6f8e53f2
mov eax, dword [ebx + 8]
add ebx, 8
test eax, eax
je 0x6f8e544a
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c8]
mov dword [esp], edi
call eax
test eax, eax
jne 0x6f8e53e8
mov edi, dword [ebp - 0x1d0]
mov edx, dword [ebx + 4]
mov ecx, dword [ebp - 0x1cc]
mov eax, dword [edi + 4]
mov dword [ecx + eax], edx
jmp case.0x6f8e51e9.0
mov ebx, dword [ebp - 0x1cc]
add ebx, dword [edi + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_atoi]
mov dword [ebx], eax
jmp case.0x6f8e51e9.0
call sym._ldap_int_ip_init
jmp 0x6f8e50a4
mov edi, dword [ebp - 0x1d0]
jmp case.0x6f8e51e9.0
mov dword [esp], edx
mov eax, dword [ebp - 0x1c8]
mov dword [ebp - 0x1d0], edx
mov dword [esp + 4], 0x6f91dd53
call eax
mov edx, dword [ebp - 0x1d0]
test eax, eax
je 0x6f8e539f
mov dword [esp + 4], str.true
mov eax, dword [ebp - 0x1c8]
mov dword [esp], edx
call eax
test eax, eax
je 0x6f8e539f
mov ecx, ebx
mov eax, 0xfffffffe
rol eax, cl
mov ecx, dword [ebp - 0x1cc]
and dword [ecx + 0x70], eax
jmp case.0x6f8e51e9.0
mov dword [esp + 4], 0
mov dword [esp], edx
call sym._ber_strdup_x
mov dword [ebx], eax
jmp case.0x6f8e51e9.0
mov dword [esp], str.USERNAME
mov edi, dword [ebp - 0x1c0]
call edi
test eax, eax
jne 0x6f8e5109
mov dword [esp], str.LOGNAME
call edi
test eax, eax
je 0x6f8e511f
jmp 0x6f8e5109
mov dword [ebp - 0x1b0], eax
jmp 0x6f8e52a2