Function at 0x516c90
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58eaf5
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x5ed80c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x5c], eax
xor eax, eax
lea ecx, [ebp - 0x48]
push ecx
mov dword [ebp - 0x4c], eax
mov ecx, esi
mov dword [ebp - 0x50], eax
call fcn.0050c6b0
mov ebx, eax
lea edx, [ebp - 0x2c]
push edx
mov ecx, esi
mov dword [ebp - 4], 1
call fcn.0050c680
mov edx, 0x10
mov byte [ebp - 4], 2
cmp dword [ebx + 0x14], edx
jb 0x516d00
mov ecx, dword [ebx]
jmp 0x516d02
mov ecx, ebx
cmp dword [eax + 0x14], edx
jb 0x516d0b
mov ebx, dword [eax]
jmp 0x516d0d
mov ebx, eax
mov dword [ebp - 0x54], ecx
test ebx, ebx
je 0x516d19
cmp byte [ebx], 0
jne 0x516d1b
xor ebx, ebx
test ecx, ecx
je 0x516d24
cmp byte [ecx], 0
jne 0x516d2b
mov dword [ebp - 0x54], 0
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ecx, dword [ebp - 0x54]
lea eax, [ebp - 0x50]
push eax
push esi
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
push eax
lea edx, [ebp - 0x58]
push edx
call fcn.00509990
mov ecx, dword [eax]
mov dword [edi], ecx
mov edx, dword [eax + 4]
add esp, 8
cmp dword [ebp - 0x18], 0x10
mov dword [edi + 4], edx
jb 0x516d6c
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0055ae44
add esp, 4
xor ebx, ebx
cmp dword [ebp - 0x34], 0x10
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
jb 0x516d8d
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.0055ae44
add esp, 4
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x54], edx
mov dword [ebp - 4], 3
cmp dword [edi], ebx
je 0x516db5
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x60], ebx
lea esi, [ebp - 0x68]
mov byte [ebp - 4], 4
mov ebx, 1
jmp 0x516e06
lea eax, [ebp - 0x48]
push eax
mov ecx, esi
call fcn.0050c6b0
mov ebx, eax
lea ecx, [ebp - 0x2c]
push ecx
mov ecx, esi
mov dword [ebp - 4], 5
mov dword [ebp - 0x4c], 2
call fcn.0050c680
mov edx, dword [ebp - 0x50]
push ebx
push eax
mov ecx, 6
push edx
lea eax, [ebp - 0x74]
push eax
mov dword [ebp - 4], ecx
mov dword [ebp - 0x4c], ecx
call fcn.00516120
add esp, 0x10
mov esi, eax
mov dword [ebp - 4], 7
mov ebx, 0xe
mov edi, dword [ebp - 0x5c]
push esi
mov ecx, edi
mov dword [ebp - 0x4c], ebx
mov dword [edi], 0
mov dword [edi + 4], 0
call fcn.0050b960
mov ecx, dword [esi + 8]
mov dword [edi + 8], ecx
or ebx, 0x10
mov dword [ebp - 4], 6
test bl, 8
je 0x516e6c
mov esi, dword [ebp - 0x70]
and ebx, 0xfffffff7
mov dword [ebp - 0x4c], ebx
test esi, esi
je 0x516e6c
lea edx, [esi + 4]
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x516e6c
mov edx, dword [esi]
mov eax, dword [edx]
mov ecx, esi
call eax
lea ecx, [esi + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x516e6c
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
test bl, 4
je 0x516e98
and ebx, 0xfffffffb
cmp dword [ebp - 0x18], 0x10
jb 0x516e86
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0055ae44
add esp, 4
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
test bl, 2
je 0x516ec4
and ebx, 0xfffffffd
cmp dword [ebp - 0x34], 0x10
jb 0x516eb2
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.0055ae44
add esp, 4
mov dword [ebp - 0x34], 0xf
mov dword [ebp - 0x38], 0
mov byte [ebp - 0x48], 0
mov dword [ebp - 4], 3
test bl, 1
je 0x516f06
mov esi, dword [ebp - 0x64]
and ebx, 0xfffffffe
mov dword [ebp - 0x4c], ebx
test esi, esi
je 0x516f06
lea edx, [esi + 4]
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x516f06
mov edx, dword [esi]
mov eax, dword [edx]
mov ecx, esi
call eax
lea ecx, [esi + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x516f06
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x516f14
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0055bc32
mov esp, ebp
pop ebp
ret 0x10