Function at 0x541ac2
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
push 0x5d8
mov eax, 0x567dae
call fcn.004cd176
mov ebx, ecx
mov dword [ebp - 0x564], ebx
lea eax, [ebp - 0x540]
push eax
push 0x203
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov esi, eax
test esi, esi
je 0x541b0f
push str._Winsock_initialization_failed
push 1
call fcn.005415f4
movzx eax, si
or eax, 0x80070000
test esi, esi
cmovle eax, esi
jmp 0x541dc8
lea eax, [ebx + 0x18]
mov ecx, ebx
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0054192d
xor ebx, ebx
lea ecx, [ebp - 0x550]
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push ecx
cmovae eax, dword [ebp - 0x28]
push ebx
push ebx
push eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0x550], ebx
call dword [sym.imp.WS2_32.dll_GetAddrInfoW]
mov dword [ebp - 0x544], eax
test eax, eax
je 0x541b88
lea eax, [ebp - 0x544]
push eax
lea eax, [ebp - 0x28]
push eax
push str.GetAddrInfoW_failed_on_server__s_with_error__d
push 1
call fcn.0051d3ec
push ebx
push 1
lea ecx, [ebp - 0x28]
call fcn.0040779d
mov ecx, dword [ebp - 0x544]
movzx eax, cx
or eax, 0x80070000
test ecx, ecx
cmovle eax, ecx
jmp 0x541dc8
mov eax, dword [ebp - 0x550]
mov edi, ebx
mov dword [ebp - 0x554], ebx
test eax, eax
je 0x541ba8
mov eax, dword [eax + 0x1c]
inc edi
test eax, eax
jne 0x541b9a
mov dword [ebp - 0x554], edi
xor ecx, ecx
mov eax, edi
push 0x1c
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00409735
mov esi, eax
pop ecx
mov dword [ebp - 0x55c], esi
mov byte [ebp - 4], 1
test esi, esi
jne 0x541bf9
push str.Memory_allocation_for_socket_list_failed
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x58
lea ecx, [ebp - 0x3b0]
call fcn.00494629
push 0x5d6094
lea eax, [ebp - 0x3b0]
push eax
call fcn.004cea74
mov eax, dword [ebp - 0x550]
mov ecx, ebx
mov dword [ebp - 0x548], ecx
mov dword [ebp - 0x558], eax
test eax, eax
je 0x541c8b
mov edx, esi
mov dword [ebp - 0x544], edx
cmp ecx, edi
jge 0x541cf9
cmp dword [eax + 4], 2
jne 0x541c48
mov ecx, dword [eax + 0x18]
movzx eax, word [ecx + 2]
push eax
push ebx
lea eax, [ecx + 4]
push eax
push edx
call fcn.00542087
mov edx, dword [ebp - 0x544]
mov eax, dword [ebp - 0x558]
jmp 0x541c62
cmp dword [eax + 4], 0x17
jne 0x541cdb
mov esi, dword [eax + 0x18]
mov edi, edx
push 7
pop ecx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x554]
mov ecx, dword [ebp - 0x548]
add edx, 0x1c
mov eax, dword [eax + 0x1c]
inc ecx
mov dword [ebp - 0x544], edx
mov dword [ebp - 0x548], ecx
mov dword [ebp - 0x558], eax
test eax, eax
jne 0x541c19
mov esi, dword [ebp - 0x55c]
lea eax, [ebp - 0x560]
mov dword [ebp - 0x54c], ebx
push eax
lea eax, [ebp - 0x54c]
mov dword [ebp - 0x560], ebx
push eax
push ebx
push edi
push esi
push ebx
push ebx
call sub.IPHLPAPI.DLL_CreateSortedAddressPairs
test eax, eax
je 0x541d10
push str.CreateSortedAddressPairs_failed
push 1
call fcn.0054163e
push esi
call fcn.004f6c27
pop ecx
push ebx
push 1
lea ecx, [ebp - 0x28]
call fcn.0040779d
mov eax, 0x80004005
jmp 0x541dc8
push str.Unsupported_IP_Family
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x58
lea ecx, [ebp - 0x3b0]
call fcn.005369fa
jmp 0x541be8
push str.Different_sizes_walking_address_list
push 0x58
lea ecx, [ebp - 0x3b0]
call fcn.00503dc9
jmp 0x541be8
mov esi, dword [ebp - 0x54c]
lea eax, [ebp - 0x5e2]
push 0x7e
push ebx
push eax
mov esi, dword [esi + 4]
call fcn.004d19ad
add esp, 0xc
lea edi, [esi + 8]
push edi
call fcn.005420c2
test al, al
je 0x541d51
push 2
pop eax
mov word [ebp - 0x5e4], ax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x5e0], eax
mov ax, word [esi + 2]
jmp 0x541d7d
mov esi, edi
lea edi, [ebp - 0x5dc]
push 0x17
pop eax
mov word [ebp - 0x5e4], ax
mov eax, dword [ebp - 0x54c]
movsd dword es:[edi], dword [esi]
mov ecx, dword [eax + 4]
movsd dword es:[edi], dword [esi]
mov eax, dword [ecx + 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x5cc], eax
mov ax, word [ecx + 2]
mov edi, dword [ebp - 0x564]
lea esi, [ebp - 0x5e4]
push 0x20
pop ecx
push dword [ebp - 0x54c]
mov word [ebp - 0x5e2], ax
add edi, 0x30
rep movsd dword es:[edi], dword [esi]
call sub.IPHLPAPI.DLL_FreeMibTable
push dword [ebp - 0x550]
call dword [sym.imp.WS2_32.dll_FreeAddrInfoW]
push dword [ebp - 0x55c]
call fcn.004f6c27
pop ecx
push ebx
push 1
lea ecx, [ebp - 0x28]
call fcn.0040779d
xor eax, eax
call fcn.004cd128
ret