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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fa730
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4b8
push ebx
push esi
push edi
lea eax, [ebp - 0x4c4]
mov dword [ebp - 0x10], esp
xor ebx, ebx
push eax
push 0x202
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
cmp eax, ebx
jne 0x40296f
push 0x25c
call fcn.004f266a
mov ecx, dword [ebp + 8]
mov edi, eax
add esp, 4
cmp edi, ebx
mov dword [ecx], eax
mov dword [ebp + 8], edi
je 0x40296f
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x18]
push edx
push eax
push ebx
push ebx
mov dword [edi + 0x248], ebx
call sub.WS2_32.dll_WSCEnumProtocols
cmp eax, 0xffffffff
jne 0x402982
mov eax, dword [ebp - 0x14]
cmp eax, 0x2747
je 0x402982
push eax
push str.First_WSCEnumProtocols_failed__d_n
call fcn.004f172e
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x18]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x28], esi
jne 0x4029a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Cannot_enumerate_Protocols__d_n
jmp 0x402967
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x18]
push edx
push eax
push esi
push ebx
call sub.WS2_32.dll_WSCEnumProtocols
cmp eax, 0xffffffff
mov dword [ebp - 0x1c], eax
jne 0x4029c7
mov ecx, dword [ebp - 0x14]
push ecx
push str.Second_WSCEnumProtocols_failed__d_n
jmp 0x402967
cmp ebx, eax
jge 0x402b2e
lea edx, [ebx + ebx*4]
mov ecx, 0x97
shl edx, 3
xor eax, eax
sub edx, ebx
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
lea eax, [ebx + edx*4]
push 0
push 0
lea esi, [esi + eax*4]
push 0x100
push ecx
push 0xffffffffffffffff
lea edx, [esi + 0x74]
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x24]
push eax
lea edx, [ebp - 0x334]
lea edi, [esi + 0x14]
push ecx
push edx
push edi
mov dword [ebp - 0x24], 0x104
call sub.WS2_32.dll_WSCGetProviderPath
test eax, eax
je 0x402a39
mov eax, dword [ebp - 0x20]
push eax
push str.WSCGetProviderPath___failed_err_d_n
call fcn.004f172e
add esp, 8
jmp 0x402a77
push 0
push 0
lea ecx, [ebp - 0x12c]
push 0x104
push ecx
lea edx, [ebp - 0x334]
push 0xffffffffffffffff
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [ebp + 8]
push 0x100
add eax, 0x104
lea ecx, [ebp - 0x12c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov edx, dword [ebp + 8]
mov eax, edi
add edx, 0x24c
mov ecx, dword [eax]
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
xor ecx, ecx
mov eax, dword [eax + 0xc]
mov dword [edx + 0xc], eax
mov cl, byte [esi + 0x23]
xor edx, edx
push ecx
mov dl, byte [esi + 0x22]
xor eax, eax
mov al, byte [esi + 0x21]
xor ecx, ecx
mov cl, byte [esi + 0x20]
push edx
push eax
xor edx, edx
mov dl, byte [esi + 0x1f]
push ecx
xor eax, eax
xor ecx, ecx
mov al, byte [esi + 0x1e]
mov cl, byte [esi + 0x1d]
push edx
push eax
push ecx
xor edx, edx
mov dl, byte [esi + 0x1c]
xor eax, eax
mov ax, word [esi + 0x1a]
xor ecx, ecx
mov cx, word [esi + 0x18]
mov esi, dword [ebp + 8]
push edx
mov edx, dword [edi]
push eax
push ecx
push edx
lea eax, [esi + 0x208]
push str._.8X__.4X__.4X__.2X_.2X__.2X_.2X_.2X_.2X_.2X_.2X
push eax
call fcn.004f175f
mov eax, dword [ebp - 0x1c]
add esp, 0x34
inc ebx
cmp ebx, eax
jge 0x402b20
push 0x25c
call fcn.004f266a
add esp, 4
mov dword [esi + 0x248], eax
test eax, eax
mov dword [ebp + 8], eax
je 0x40296f
mov dword [eax + 0x248], 0
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x28]
jmp 0x4029c7
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret