Function at 0x406e99
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x412249
call fcn.004114d0
sub esp, 0x5c
mov eax, dword [0x4211a4]
push ebx
xor eax, ebp
push esi
push edi
mov dword [ebp - 0x10], eax
call fcn.00405b40
mov ecx, eax
call fcn.00404599
lea eax, [ebp - 0x30]
push eax
xor edi, edi
lea eax, [ebp - 0x3c]
push eax
push edi
push edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x30], edi
call sub.WS2_32.dll_WSCEnumProtocols
cmp eax, 0xffffffff
jne 0x406f73
cmp dword [ebp - 0x30], 0x2747
jne 0x406f73
cmp dword [ebp - 0x3c], edi
je 0x406f04
push dword [ebp - 0x3c]
call dword [sym.imp.MSVCR71.dll_malloc]
mov ebx, eax
cmp ebx, edi
pop ecx
mov dword [ebp - 0x40], ebx
jne 0x406f2b
mov esi, str.CHookLoadLibrary::GetDllPathOfAllInstalledProviders
push esi
call fcn.004023cd
test eax, eax
pop ecx
jne 0x406f73
push str.lyc:Need_more_memory.
push edi
push esi
call fcn.00405b88
pop ecx
pop ecx
push eax
call fcn.00406610
pop ecx
jmp 0x406f72
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x3c]
push eax
push ebx
push edi
call sub.WS2_32.dll_WSCEnumProtocols
mov esi, eax
cmp esi, 0xffffffff
jne 0x406f8e
mov esi, str.CHookLoadLibrary::GetDllPathOfAllInstalledProviders
push esi
call fcn.004023cd
test eax, eax
pop ecx
jne 0x406f6b
push dword [ebp - 0x30]
push str.lyc:WSCEnumProtocols_failed.Error_code_is__u.
push edi
push esi
call fcn.00405b88
pop ecx
pop ecx
push eax
call fcn.00406610
add esp, 0xc
push ebx
call dword [sym.imp.MSVCR71.dll_free]
pop ecx
xor al, al
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
xor ecx, ebp
pop ebx
call fcn.004113e5
leave
ret
lea ecx, [ebp - 0x4c]
call fcn.00404d73
mov dword [ebp - 4], edi
cmp esi, edi
jle 0x40702a
add ebx, 0x14
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x34]
push eax
push edi
push ebx
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x30], edi
call sub.WS2_32.dll_WSCGetProviderPath
cmp eax, 0xffffffff
jne 0x40701c
mov eax, dword [ebp - 0x34]
cmp eax, edi
je 0x40701c
add eax, eax
push eax
call fcn.0041118c
mov esi, eax
cmp esi, edi
pop ecx
je 0x40701c
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x34]
push eax
push esi
push ebx
call sub.WS2_32.dll_WSCGetProviderPath
test eax, eax
jne 0x407015
push esi
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov byte [ebp - 4], 1
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x4c]
call fcn.0040427b
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
push esi
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
pop ecx
add ebx, 0x274
dec dword [ebp - 0x38]
jne 0x406fa7
mov ebx, dword [ebp - 0x40]
push ebx
call dword [sym.imp.MSVCR71.dll_free]
mov eax, dword [ebp - 0x48]
pop ecx
mov ecx, dword [eax]
cmp ecx, eax
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x40], eax
je 0x40712a
mov ebx, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ecx + 0xc]
push eax
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [ebp - 4], 2
push edi
push edi
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call ebx
mov esi, eax
cmp esi, edi
je 0x407109
lea eax, [esi + esi]
push eax
call fcn.0041118c
cmp eax, edi
pop ecx
mov dword [ebp - 0x38], eax
je 0x407109
push esi
push eax
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call ebx
test eax, eax
je 0x407100
push dword [ebp - 0x38]
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::iterator___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::begin_void_]
mov esi, eax
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::iterator___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::end_void_]
mov edi, eax
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::iterator___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::begin_void_]
push dword [sym.imp.MSVCR71.dll_tolower]
push dword [esi]
push dword [edi]
push dword [eax]
lea eax, [ebp - 0x54]
push eax
call fcn.00402d63
add esp, 0x14
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.00405b40
mov ecx, eax
call fcn.0040427b
xor edi, edi
push dword [ebp - 0x38]
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
pop ecx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [ebp - 0x34]
call fcn.0040217d
mov ecx, dword [ebp - 0x34]
cmp ecx, dword [ebp - 0x40]
jne 0x40704b
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x4c]
call fcn.00404d50
mov al, 1
jmp 0x406f75