Function at 0x10020bd8
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
mov eax, 0x100d7352
call fcn.100ac440
sub esp, 0x24
mov eax, dword [0x1011c710]
xor eax, ebp
push ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov ebx, ecx
cmp dword [ebx + 4], 0xffffffff
push esi
mov dword [ebp - 0x2c], eax
jne 0x10020de1
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [ebx + 4], eax
jne 0x10020c25
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebx + 0x1c], eax
jmp 0x10020ddd
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
push edi
push 4
lea ecx, [ebp - 0x30]
push ecx
push 0x1006
mov edi, 0xffff
push edi
push eax
mov dword [ebp - 0x30], 0x3a98
call esi
push 4
lea eax, [ebp - 0x30]
push eax
push 0x1005
push edi
push dword [ebx + 4]
call esi
push dword [ebp - 0x2c]
lea ecx, [ebp - 0x28]
call fcn.1000223a
and dword [ebp - 4], 0
call fcn.100c6d12
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
mov edi, dword [ebp + 0xc]
test di, di
mov byte [ebp - 4], 1
jne 0x10020cf8
push 0
push 0x3a
lea ecx, [ebp - 0x28]
call fcn.1000852c
mov esi, eax
test esi, esi
jle 0x10020cf8
push esi
push 0
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x28]
call fcn.10003ff3
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call fcn.10001eb6
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
mov byte [ebp - 4], 1
call fcn.10001199
inc esi
push esi
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x28]
call fcn.100042ea
push 0
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.1000192d
push eax
call fcn.100ad185
pop ecx
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
mov edi, eax
mov byte [ebp - 4], 1
call fcn.10001199
jmp 0x10020d04
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x24]
push eax
call fcn.10001eb6
xor esi, esi
cmp di, si
jne 0x10020d0e
push 0x50
pop edi
push edi
mov word [ebp - 0x20], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1e], ax
mov eax, dword [ebp - 0x24]
cmp dword [eax - 0xc], esi
pop edi
jge 0x10020d32
push 0x80070057
call fcn.10001091
movsx eax, byte [eax]
cmp eax, 0x2f
jle 0x10020d54
cmp eax, 0x3a
jge 0x10020d54
push esi
lea ecx, [ebp - 0x24]
call fcn.1000192d
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x1c], eax
jmp 0x10020d85
push esi
lea ecx, [ebp - 0x24]
call fcn.1000192d
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, esi
je 0x10020dbe
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
push eax
mov dword [ebp - 0x1c], eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea eax, [ebx + 0x20]
push eax
call fcn.100ac900
pop ecx
pop ecx
push 0x10
lea eax, [ebp - 0x20]
push eax
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x10020d9d
xor esi, esi
inc esi
jmp 0x10020da6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebx + 0x1c], eax
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
call fcn.10001199
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.10001199
jmp 0x10020de4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
mov dword [ebx + 0x1c], eax
call fcn.10001199
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.10001199
xor eax, eax
jmp 0x10020de6
xor esi, esi
inc esi
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
xor ecx, ebp
pop ebx
call fcn.100ac33f
leave
ret 8