Function at 0x10021150
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10095ef5
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x100b00f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x34], 0
xor eax, eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x64], 1
mov dword [ebp - 0x60], 0
mov ecx, dword [ebp + 0xc]
call fcn.10015c90
movzx ecx, al
test ecx, ecx
jne 0x100211d8
mov ecx, dword [ebp + 0xc]
call fcn.10015dc0
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x6c], 4
jmp 0x100211fe
mov ecx, dword [ebp + 8]
call fcn.10015c90
movzx edx, al
test edx, edx
jne 0x100211f2
mov ecx, dword [ebp + 8]
call fcn.10015dc0
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x68], eax
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x6c], ecx
mov edx, dword [ebp + 0x10]
push edx
lea eax, [ebp - 0x28]
push eax
call fcn.100037a0
add esp, 8
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x38]
push ecx
lea edx, [ebp - 0x6c]
push edx
lea ecx, [ebp - 0x28]
call fcn.10015dc0
push eax
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x1002125b
mov dword [ebp - 0x3c], 0xffffffff
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.100163f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x20]
call fcn.10004190
mov eax, dword [ebp - 0x3c]
jmp 0x100213b2
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x2c], ecx
jmp 0x1002126c
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x1c]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x10021383
push 0x81
push 0
push 0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0xc]
push edx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 8]
push ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x100212c1
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0xc]
push edx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 8]
push ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x100212c9
jmp 0x10021263
movzx ecx, byte [ebp + 0x1c]
test ecx, ecx
je 0x100212ec
mov dword [ebp - 0x40], 1
push 4
lea edx, [ebp - 0x40]
push edx
push 1
push 6
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
lea ecx, [ebp + 0x20]
call fcn.10012af0
movzx ecx, al
test ecx, ecx
je 0x10021307
mov edx, dword [ebp - 0x30]
push edx
lea ecx, [ebp + 0x20]
call fcn.100145d0
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 4], 0x17
jne 0x1002132b
mov dword [ebp - 0x44], 0
push 4
lea ecx, [ebp - 0x44]
push ecx
push 0x1b
push 0x29
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
lea ecx, [ebp + 0x48]
call fcn.1000e4f0
movzx edx, al
test edx, edx
je 0x10021372
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x48], ecx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.100163f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x20]
call fcn.10004190
mov eax, dword [ebp - 0x48]
jmp 0x100213b2
mov edx, dword [ebp - 0x30]
push edx
call fcn.100060b0
add esp, 4
jmp 0x10021263
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov dword [ebp - 0x4c], 0xffffffff
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.100163f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x20]
call fcn.10004190
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1006ddbb
mov esp, ebp
pop ebp
ret