Function at 0x587600
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x814bac
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x264
push ebx
push esi
push edi
lea eax, [ebp - 0x270]
mov dword [ebp - 0x10], esp
mov ebx, ecx
push eax
push 0x202
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], 0
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov esi, eax
test esi, esi
mov dword [ebp - 0x1c], esi
je 0x587773
mov byte [ebx + 0x20], 0
mov dword [ebx + 0x24], esi
call dword [sym.imp.KERNEL32.dll_GetACP]
lea ecx, [ebp - 0x44]
mov edi, eax
call fcn.004034c0
mov cl, byte [ebp - 0x11]
push 0
mov byte [ebp - 0x2c], cl
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
mov dword [ebp - 0x30], edi
call fcn.00404c40
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 2
mov dword [ebp - 0x44], vtable.dbcsstring.0
call fcn.00577bc0
mov edi, str.WSAStartup__
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.WSAStartup__
lea ecx, [ebp - 0x40]
call fcn.004030a0
lea edx, [ebp - 0x44]
push esi
push edx
lea ecx, [ebp - 0xe0]
mov byte [ebp - 4], 3
call fcn.005842f0
mov esi, eax
mov al, byte [esi + 0xc]
mov byte [ebp - 4], 4
test al, al
je 0x58770f
mov eax, dword [esi + 0x30]
test eax, eax
jne 0x58770f
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
lea eax, [esi + 0x10]
lea ecx, [ebp - 0x90]
push eax
push ecx
call fcn.0044dbd0
add esp, 0xc
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x24]
push eax
mov byte [ebp - 4], 5
call fcn.00428c90
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], 4
call fcn.00403b50
add esi, 0x24
test esi, esi
je 0x58771b
lea eax, [esi + 4]
jmp 0x58771d
xor eax, eax
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebx + 0x28]
call fcn.00402e90
lea ecx, [ebp - 0xe0]
mov byte [ebp - 4], 3
call fcn.00418210
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 6
call fcn.00404c40
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0
call fcn.00404c40
mov esi, dword [ebp - 0x1c]
test esi, esi
jne 0x587762
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x58777f
mov eax, 0x8522f4
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x5878a1
mov byte [ebx + 0x20], al
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebx + 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetACP]
lea ecx, [ebp - 0x44]
mov esi, eax
call fcn.004034c0
mov dl, byte [ebp - 0x11]
push 0
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 7
mov dword [ebp - 0x30], esi
mov byte [ebp - 0x2c], dl
call fcn.00404c40
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 8
mov dword [ebp - 0x44], vtable.dbcsstring.0
call fcn.00577bc0
mov edi, str.gethostbyname__
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.gethostbyname__
lea ecx, [ebp - 0x40]
call fcn.004030a0
mov eax, dword [ebx + 0x24]
lea ecx, [ebp - 0x44]
push eax
push ecx
lea ecx, [ebp - 0xe0]
mov byte [ebp - 4], 9
call fcn.005842f0
mov esi, eax
mov al, byte [esi + 0xc]
mov byte [ebp - 4], 0xa
test al, al
je 0x587856
mov eax, dword [esi + 0x30]
test eax, eax
jne 0x587856
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
lea edx, [esi + 0x10]
lea eax, [ebp - 0x90]
push edx
push eax
call fcn.0044dbd0
add esp, 0xc
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x24]
push eax
mov byte [ebp - 4], 0xb
call fcn.00428c90
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], 0xa
call fcn.00403b50
add esi, 0x24
test esi, esi
je 0x587862
lea eax, [esi + 4]
jmp 0x587864
xor eax, eax
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebx + 0x28]
call fcn.00402e90
lea ecx, [ebp - 0xe0]
mov byte [ebp - 4], 9
call fcn.00418210
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0xc
call fcn.00404c40
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0
call fcn.00404c40
jmp 0x58775c
cmp word [eax + 0xa], 4
je 0x5878d5
mov edi, str.gethostbyname___returned_invalid_address_length
or ecx, 0xffffffff
xor eax, eax
mov byte [ebx + 0x20], 0
mov dword [ebx + 0x24], 0x80004005
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.gethostbyname___returned_invalid_address_length
lea ecx, [ebx + 0x28]
call fcn.004030a0
jmp 0x58775c
mov byte [ebx + 0x20], 1
mov edi, dword [eax + 0xc]
mov eax, dword [edi]
test eax, eax
je 0x587758
mov edx, dword [ebx + 0x40]
lea ecx, [ebx + 0x38]
push eax
push edx
call fcn.00500400
add edi, 4
jmp 0x5878dc