Function at 0x513530
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5d38e0
push eax
mov dword fs:[0], esp
sub esp, 8
push ebp
push esi
push edi
mov edi, dword [esp + 0x24]
mov ebp, ecx
push edi
call sub.WSOCK32.dll_gethostbyname
mov esi, eax
test esi, esi
jne 0x51373c
mov eax, dword [ebp + 0xa4]
test eax, eax
jne 0x513683
mov eax, dword [ebp + 0xd4]
mov cl, byte [eax + 0x144]
test cl, cl
jne 0x513683
mov ecx, dword [ebp + 0xa0]
push 0x3f
mov edx, dword [ecx]
push edx
call fcn.00591740
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
je 0x513683
mov ecx, dword [0x68d01c]
push ebx
mov dword [esp + 0x10], ecx
mov edx, dword [ebp + 0xa0]
mov dword [esp + 0x20], esi
mov ecx, dword [edx + 4]
lea edx, [esp + 0x10]
push ecx
push eax
push str.__s_s
push edx
call fcn.005a6a18
mov esi, dword [ebp + 0xa0]
mov ebx, dword [esp + 0x20]
add esp, 0x10
mov eax, dword [esi + 4]
test eax, eax
je 0x5135e8
push eax
call fcn.005aa012
add esp, 4
test ebx, ebx
jne 0x5135f1
mov dword [esi + 4], ebx
jmp 0x51364e
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x513604
mov dword [esi + 4], eax
jmp 0x51364e
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.005a9fe9
mov edx, eax
add esp, 4
test edx, edx
mov dword [esi + 4], edx
jne 0x51362f
push str.URL::set_serverPath__:_Not_enough_memory__n
mov ecx, esi
call fcn.0056b3b0
jmp 0x51364e
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov byte [ecx], 0
mov edx, dword [ebp + 0xa0]
mov eax, dword [edx]
push eax
call sub.WSOCK32.dll_gethostbyname
lea ecx, [esp + 0x10]
mov esi, eax
mov dword [esp + 0x20], 0xffffffff
call fcn.005adc4d
test esi, esi
pop ebx
jne 0x51373c
mov edi, dword [esp + 0x24]
call sub.WSOCK32.dll_WSAGetLastError
push edi
mov esi, eax
call sub.WSOCK32.dll_inet_addr
mov ecx, dword [esp + 0x28]
cmp eax, 0xffffffff
mov dword [ecx], eax
jne 0x513749
mov al, byte [esp + 0x2c]
test al, al
je 0x513726
mov edx, dword [0x68d01c]
mov dword [esp + 0x2c], edx
mov eax, dword [0x692c80]
push edi
lea ecx, [esp + 0x30]
push eax
push ecx
mov dword [esp + 0x28], 1
call fcn.005a6a18
mov edx, dword [esp + 0x38]
add esp, 0xc
mov ecx, ebp
push 1
push edx
call fcn.005132d0
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebp + 0x8c]
push eax
call fcn.00518410
push esi
lea ecx, [esp + 0x30]
push str.Error_code___ld_n
push ecx
call fcn.005a6a18
mov edx, dword [esp + 0x38]
add esp, 0xc
mov ecx, ebp
push edx
call fcn.005133a0
push 0x12c
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x2c]
mov dword [esp + 0x1c], 0xffffffff
call fcn.005adc4d
mov eax, esi
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret 0xc
mov eax, dword [esi + 0xc]
mov edx, dword [esp + 0x28]
mov ecx, dword [eax]
mov eax, dword [ecx]
mov dword [edx], eax
mov ecx, dword [esp + 0x14]
pop edi
pop esi
xor eax, eax
pop ebp
mov dword fs:[0], ecx
add esp, 0x14
ret 0xc