Function at 0x5219a0
Capabilities:
Create thread
Get local ipv4 addresses
Get socket information
Initialize winsock library
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57613b
mov eax, dword fs:[0]
push eax
sub esp, 0x1d8
mov eax, dword [0x5d6b80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x1bc], edi
cmp dword [0x5dea30], 0
jne 0x521c57
mov eax, dword [ebp + 8]
mov dword [edi + 4], eax
lea eax, [ebp - 0x1b0]
push eax
push 0x202
mov dword [ebp - 0x1c0], 0
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x521c0d
xorps xmm0, xmm0
mov dword [ebp - 0x1b4], eax
movdqu xmmword [ebp - 0x1e4], xmm0
mov dword [ebp - 0x1e0], 2
movdqu xmmword [ebp - 0x1d4], xmm0
mov dword [ebp - 0x1dc], 1
mov dword [ebp - 0x1d8], 6
mov dword [ebp - 0x1e4], 1
call fcn.0045adc0
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x521a69
push 0x80004005
call fcn.0045a8f0
mov eax, dword [edx]
mov ecx, edx
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1b8], eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x1b8]
mov dword [ebp - 4], 0
push 0x5a33b4
push eax
call fcn.0049c260
mov esi, dword [ebp - 0x1b8]
lea eax, [ebp - 0x1b4]
add esp, 0xc
push eax
lea eax, [ebp - 0x1e4]
push eax
push esi
push 0
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x521c30
mov eax, dword [ebp - 0x1b4]
test eax, eax
je 0x521c30
push dword [eax + 0xc]
push dword [eax + 8]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi + 0xc], eax
cmp eax, 0xffffffff
je 0x521be0
push 4
lea ecx, [ebp - 0x1c4]
mov dword [ebp - 0x1c4], 1
push ecx
push 8
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x521bec
mov eax, dword [ebp - 0x1b4]
push dword [eax + 0x10]
push dword [eax + 0x18]
push dword [edi + 0xc]
call dword [sym.imp.WS2_32.dll_bind]
push dword [ebp - 0x1b4]
mov edi, eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp edi, 0xffffffff
je 0x521bec
mov edi, dword [ebp - 0x1bc]
push SysReAllocString
push dword [edi + 0xc]
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x521c36
lea eax, [ebp - 0x1b8]
mov dword [ebp - 0x1b8], 0x10
push eax
lea eax, [ebp - 0x20]
push eax
push dword [edi + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x521c36
cmp word [ebp - 0x20], 2
jne 0x521b9c
cmp dword [ebp - 0x1b8], 0x10
jne 0x521b9c
push dword [ebp - 0x1e]
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [edi + 0x10], ax
push 0
push 0
push edi
push 0x5221b0
push 0
push 0
mov dword [edi + 0x18], 0
call fcn.0052762d
add esp, 0x18
mov dword [ebp - 0x1bc], eax
lea ecx, [ebp - 0x1bc]
mov dword [0x5dea30], 1
mov dword [ebp - 0x1c0], 1
call fcn.004b8360
jmp 0x521bec
push dword [ebp - 0x1b4]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x521c0d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x1c0]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00525878
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.WS2_32.dll_WSACleanup]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x521c57
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, 1
jmp 0x521c13