Function at 0x587150
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x717f80]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x715908], 0
push edi
mov edi, dword [ebp + 8]
jne 0x587181
mov al, 1
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00622073
mov esp, ebp
pop ebp
ret
push ebx
push esi
push 0x190
lea eax, [ebp - 0x224]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov ebx, dword [sym.imp.WS2_32.dll_WSAStartup]
lea eax, [ebp - 0x224]
add esp, 0xc
push eax
push 0x909
call ebx
mov dword [ebp - 0x8c], eax
cmp eax, 0x276c
jne 0x587286
mov eax, 5
mov ecx, 2
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], ecx
cmp eax, 1
jl 0x587246
add ecx, 0xffffffff
mov dword [ebp - 0x90], ecx
jns 0x5871f7
dec eax
mov dword [ebp - 0x90], 9
mov dword [ebp - 0x94], eax
mov cl, 9
test eax, eax
je 0x587246
movzx ecx, cl
movzx eax, al
shl cx, 8
or cx, ax
lea eax, [ebp - 0x224]
push 0x190
push 0
push eax
movzx esi, cx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x224]
push eax
push esi
call ebx
mov dword [ebp - 0x8c], eax
cmp eax, 0x276c
jne 0x587246
mov eax, dword [ebp - 0x94]
mov ecx, dword [ebp - 0x90]
jmp 0x5871d4
cmp dword [ebp - 0x8c], 0
jne 0x587293
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x94]
push eax
push str.Using_ws2_32.dll_version__d__d
lea eax, [ebp - 0x88]
push 0x50
push eax
call fcn.004b10e0
mov eax, dword [edi]
lea ecx, [ebp - 0x88]
add esp, 0x14
push ecx
push str.ws2_32_DLL_Version
mov ecx, edi
call dword [eax + 0x2c]
cmp dword [ebp - 0x8c], 0
je 0x587317
cmp dword [ebp - 0x8c], 0x276b
jne 0x5872a6
push str.The_underlying_network_subsystem_is_not_ready_for_network_communication.
jmp 0x587310
cmp dword [ebp - 0x8c], 0x276c
jne 0x5872b9
push str.The_version_of_Windows_Sockets_support_requested_is_not_provided_by_this_particular_Windows_Sockets_implementation.
jmp 0x587310
cmp dword [ebp - 0x8c], 0x2734
jne 0x5872cc
push str.A_blocking_Windows_Sockets_1.1_operation_is_in_progress.
jmp 0x587310
cmp dword [ebp - 0x8c], 0x2753
jne 0x5872df
push str.Limit_on_the_number_of_tasks_supported_by_the_Windows_Sockets_implementation_has_been_reached.
jmp 0x587310
cmp dword [ebp - 0x8c], 0x271e
jne 0x5872f2
push str.The_lpWSAData_is_not_a_valid_pointer.
jmp 0x587310
lea eax, [ebp - 0x8c]
push eax
push str.WSAStartup_error:_0x_x
lea eax, [ebp - 0x38]
push 0x32
push eax
call fcn.004b1040
add esp, 0x10
lea ecx, [ebp - 0x38]
push ecx
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x14]
cmp byte [0x7dc609], 0
mov byte [0x715908], 0
jne 0x587407
cmp dword [0x7dc60c], 0
jne 0x587407
push str.ws2_32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x7dc60c], eax
test eax, eax
jne 0x58736b
mov ecx, edi
mov byte [0x7dc609], 1
call fcn.004b3640
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_load_ws2_32.dll
call dword [eax + 0x14]
jmp 0x587407
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.getaddrinfo
push eax
call esi
mov dword [0x7dc610], eax
test eax, eax
jne 0x587395
mov ecx, edi
call fcn.004b3640
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_find_getaddrinfo_function_in_ws2_32.dll
call dword [eax + 0x14]
push str.freeaddrinfo
push dword [0x7dc60c]
call esi
mov dword [0x7dc614], eax
test eax, eax
jne 0x5873be
mov ecx, edi
call fcn.004b3640
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_find_freeaddrinfo_function_in_ws2_32.dll
call dword [eax + 0x14]
push str.gethostbyname
push dword [0x7dc60c]
call esi
mov dword [0x7dc618], eax
test eax, eax
jne 0x5873e7
mov ecx, edi
call fcn.004b3640
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_find_gethostbyname_function_in_ws2_32.dll
call dword [eax + 0x14]
cmp dword [0x7dc610], 0
je 0x587400
cmp dword [0x7dc614], 0
mov byte [0x7dc608], 1
jne 0x587407
mov byte [0x7dc608], 0
cmp dword [ebp - 0x8c], 0
mov ecx, dword [ebp - 4]
pop esi
sete al
xor ecx, ebp
pop ebx
pop edi
call fcn.00622073
mov esp, ebp
pop ebp
ret