Function at 0x40a055
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x41405b
call fcn.00413240
sub esp, 0x5c
mov eax, dword [0x4241a4]
push ebx
xor eax, ebp
push esi
push edi
mov dword [ebp - 0x10], eax
call fcn.00408c89
mov ecx, eax
call fcn.00406daf
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 0x40a12f
cmp dword [ebp - 0x30], 0x2747
jne 0x40a12f
cmp dword [ebp - 0x3c], edi
je 0x40a0c0
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 0x40a0e7
mov esi, str.CHookLoadLibrary::GetDllPathOfAllInstalledProviders
push esi
call fcn.00403aec
test eax, eax
pop ecx
jne 0x40a12f
push str.lyc:Need_more_memory.
push edi
push esi
call fcn.00408cd1
pop ecx
pop ecx
push eax
call fcn.0040973c
pop ecx
jmp 0x40a12e
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 0x40a14a
mov esi, str.CHookLoadLibrary::GetDllPathOfAllInstalledProviders
push esi
call fcn.00403aec
test eax, eax
pop ecx
jne 0x40a127
push dword [ebp - 0x30]
push str.lyc:WSCEnumProtocols_failed.Error_code_is__u.
push edi
push esi
call fcn.00408cd1
pop ecx
pop ecx
push eax
call fcn.0040973c
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.00413159
leave
ret
lea ecx, [ebp - 0x4c]
call fcn.00407ebc
mov dword [ebp - 4], edi
cmp esi, edi
jle 0x40a1e6
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 0x40a1d8
mov eax, dword [ebp - 0x34]
cmp eax, edi
je 0x40a1d8
add eax, eax
push eax
call fcn.00412eee
mov esi, eax
cmp esi, edi
pop ecx
je 0x40a1d8
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 0x40a1d1
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.00406885
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 0x40a163
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 0x40a2e6
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 0x40a2c5
lea eax, [esi + esi]
push eax
call fcn.00412eee
cmp eax, edi
pop ecx
mov dword [ebp - 0x38], eax
je 0x40a2c5
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 0x40a2bc
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.004051eb
add esp, 0x14
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.00408c89
mov ecx, eax
call fcn.00406885
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.00403882
mov ecx, dword [ebp - 0x34]
cmp ecx, dword [ebp - 0x40]
jne 0x40a207
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x4c]
call fcn.00407e99
mov al, 1
jmp 0x40a131