Function at 0x100217d9
Capabilities:
Encode data using xor
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x403c
call fcn.10035110
push ebx
push esi
mov esi, dword [ebp + 0x10]
cmp dword [esi], 3
push edi
jne 0x10021808
push dword [ebp + 0x14]
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.100216d1
add esp, 0x10
jmp 0x10021dd2
lea eax, [ebp - 0x34]
push eax
push 0x4004667f
push dword [ebp + 8]
mov byte [ebp - 0x1c], 0x2b
mov byte [ebp - 0x1b], 0xfe
mov byte [ebp - 0x1a], 0xb8
mov byte [ebp - 0x19], 2
call sub.WS2_32.dll_ioctlsocket
test eax, eax
jne 0x10021dd0
xor ebx, ebx
jmp 0x10021838
mov esi, dword [ebp + 0x10]
cmp dword [ebp - 0x34], ebx
je 0x10021dd7
lea eax, [ebp - 0x4038]
push eax
push dword [ebp + 8]
push 4
pop edi
mov eax, edi
call fcn.10021623
test eax, eax
pop ecx
pop ecx
je 0x10021dd0
cmp dword [esi + 4], 1
jne 0x10021883
movzx esi, byte [ebp - 0x4037]
movzx eax, byte [ebp - 0x4038]
xor esi, 0xfe
shl esi, 8
xor eax, 0x2b
add esi, eax
jmp 0x100218cd
mov al, byte [ebp - 0x4037]
mov cl, al
and cl, 0x30
cmp cl, 0x10
jne 0x100218bc
lea eax, [ebp - 0x4034]
push eax
push dword [ebp + 8]
push 0x12
pop eax
call fcn.10021623
test eax, eax
pop ecx
pop ecx
je 0x10021dd0
mov esi, dword [ebp - 0x4026]
push 0x16
pop edi
add esi, edi
jmp 0x100218cd
movzx ecx, byte [ebp - 0x4038]
and eax, 0xf
shl ecx, 4
add eax, ecx
mov esi, eax
cmp esi, edi
jl 0x10021dd0
lea ecx, [ebp + edi - 0x4038]
push ecx
push dword [ebp + 8]
mov eax, esi
sub eax, edi
call fcn.10021623
test eax, eax
pop ecx
pop ecx
je 0x10021dd0
mov edi, 0x1003f100
cmp dword [ebp + 0x10], edi
mov byte [ebp - 0x14], 1
mov byte [ebp - 0x13], 0x82
mov byte [ebp - 0x12], 0xfc
mov byte [ebp - 0x11], 0x82
mov byte [ebp - 0x10], bl
mov byte [ebp - 0xf], bl
mov byte [ebp - 0xe], bl
mov byte [ebp - 0xd], bl
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], bl
mov byte [ebp - 0xa], bl
mov byte [ebp - 9], bl
mov byte [ebp - 8], 0x79
mov byte [ebp - 7], 0x7d
mov byte [ebp - 6], 0x3e
mov byte [ebp - 5], 0x49
mov byte [ebp - 4], bl
mov byte [ebp - 3], bl
jne 0x100219b0
cmp dword [ebp + 0x14], ebx
je 0x100219b0
cmp esi, 0x12
jne 0x100219b0
push 4
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x4038]
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x100219b0
push 4
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x402c]
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x100219b0
mov ax, word [ebp - 0x4028]
push 4
mov word [0x1003f132], ax
lea eax, [ebp - 0x402c]
push 0x1003f0dc
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push 2
lea eax, [ebp - 0x4028]
push 0x1003f130
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
cmp dword [ebp + 0x10], edi
mov byte [ebp - 0x14], 1
mov byte [ebp - 0x13], 0xc3
mov byte [ebp - 0x12], bl
mov byte [ebp - 0x11], bl
mov byte [ebp - 0x10], bl
mov byte [ebp - 0xf], bl
mov byte [ebp - 0xe], bl
mov byte [ebp - 0xd], bl
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], bl
mov byte [ebp - 0xa], bl
mov byte [ebp - 9], bl
mov byte [ebp - 8], 0x79
mov byte [ebp - 7], 0x7d
mov byte [ebp - 6], 0x3e
mov byte [ebp - 5], 0x49
mov byte [ebp - 4], bl
mov byte [ebp - 3], bl
mov byte [ebp - 2], bl
jne 0x10021a69
cmp dword [ebp + 0x14], ebx
je 0x10021a69
cmp esi, 0x13
jne 0x10021a69
push 2
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x4038]
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x10021a69
push 4
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x402c]
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x10021a69
mov ax, word [ebp - 0x4028]
push 4
mov word [0x1003f15a], ax
lea eax, [ebp - 0x402c]
push 0x1003f0dc
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push 2
lea eax, [ebp - 0x4028]
push 0x1003f158
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
cmp dword [ebp + 0x10], edi
mov byte [ebp - 0x30], bl
mov byte [ebp - 0x2f], 0x8e
mov byte [ebp - 0x2e], 0x87
mov byte [ebp - 0x2d], 0x8f
mov byte [ebp - 0x2c], bl
mov byte [ebp - 0x2b], bl
mov byte [ebp - 0x2a], bl
mov byte [ebp - 0x29], bl
mov byte [ebp - 0x28], 0x79
mov byte [ebp - 0x27], 0x7d
mov byte [ebp - 0x26], 0x3e
mov byte [ebp - 0x25], 0x49
mov byte [ebp - 0x24], 0x68
mov byte [ebp - 0x23], 0x42
jne 0x10021b16
cmp dword [ebp + 0x14], ebx
je 0x10021b16
cmp esi, 0xe
jne 0x10021b16
push 4
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x4038]
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x10021b16
push 6
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x4030]
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x10021b16
mov ax, word [ebp - 0x402c]
push 4
mov word [0x1003f1aa], ax
lea eax, [ebp - 0x4030]
push 0x1003f0dc
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push 2
lea eax, [ebp - 0x402c]
push 0x1003f1a8
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
cmp dword [ebp + 0x10], 0x1003f1a0
mov byte [ebp - 0x18], 0x33
mov byte [ebp - 0x17], 0xfe
mov byte [ebp - 0x16], 0x81
mov byte [ebp - 0x15], 2
mov byte [ebp - 0x14], 0x1a
mov byte [ebp - 0x13], 0xcc
mov byte [ebp - 0x12], 0x89
mov byte [ebp - 0x11], 0x2c
mov byte [ebp - 0x10], 0x1a
mov byte [ebp - 0xf], 0xcc
mov byte [ebp - 0xe], 0x8d
mov byte [ebp - 0xd], 0x2c
mov byte [ebp - 0xc], 0x1d
mov byte [ebp - 0xb], 0xcc
mov byte [ebp - 0xa], 0x96
mov byte [ebp - 9], 0x35
mov byte [ebp - 8], 0x18
mov byte [ebp - 7], 0xfe
mov byte [ebp - 6], 0x38
mov byte [ebp - 5], 0x3c
mov byte [ebp - 4], 0x2b
mov byte [ebp - 3], 0xfe
mov byte [ebp - 2], 0xb8
mov byte [ebp - 1], 2
jne 0x10021c1c
cmp dword [ebp + 0x14], ebx
je 0x10021c1c
cmp esi, 0x18
jne 0x10021c1c
push esi
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x4038]
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x10021c1c
mov eax, dword [ebp - 0x4026]
xor eax, 0x2b8
mov edi, str.127.0.0.1
push edi
mov word [0x1003f1d2], ax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
add esi, 0xb
mov eax, esi
xor eax, 0xfe2b
mov word [ebp - 0x4038], ax
push edi
lea eax, [ebp - 0x4034]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ax, word [0x1003f1d0]
mov word [ebp + esi - 0x403e], ax
push 4
pop eax
cmp esi, eax
mov dword [ebp + esi - 0x403c], ebx
jle 0x10021c1c
mov ecx, eax
and ecx, 3
mov cl, byte [ebp + ecx - 0x1c]
xor byte [ebp + eax - 0x4038], cl
inc eax
cmp eax, esi
jl 0x10021c07
cmp dword [ebp + 0x10], 0x1003f1a0
mov byte [ebp - 0x18], 0x33
mov byte [ebp - 0x17], 0xfe
mov byte [ebp - 0x16], 0xfe
mov byte [ebp - 0x15], 2
mov byte [ebp - 0x14], 0x1a
mov byte [ebp - 0x13], 0xcc
mov byte [ebp - 0x12], 0x89
mov byte [ebp - 0x11], 0x2c
mov byte [ebp - 0x10], 0x1a
mov byte [ebp - 0xf], 0xcc
mov byte [ebp - 0xe], 0x8d
mov byte [ebp - 0xd], 0x2c
mov byte [ebp - 0xc], 0x1d
mov byte [ebp - 0xb], 0xcc
mov byte [ebp - 0xa], 0x96
mov byte [ebp - 9], 0x35
mov byte [ebp - 8], 0x18
mov byte [ebp - 7], 0xfe
mov byte [ebp - 6], 0x38
mov byte [ebp - 5], 0x3c
mov byte [ebp - 4], 0x2b
mov byte [ebp - 3], 0xfe
mov byte [ebp - 2], 0xb8
mov byte [ebp - 1], 2
jne 0x10021d2f
cmp dword [ebp + 0x14], ebx
je 0x10021d2f
cmp esi, 0x18
jne 0x10021d2f
push 0x14
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x4038]
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x10021d2f
mov eax, dword [ebp - 0x4026]
mov edi, dword [ebp - 0x4024]
xor edi, dword [ebp - 0x1c]
xor eax, 0x2b8
push str.127.0.0.1
mov word [0x1003f1fa], ax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
add esi, 0xb
mov eax, esi
xor eax, 0xfe2b
mov word [ebp - 0x4038], ax
push str.127.0.0.1
lea eax, [ebp - 0x4034]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ax, word [0x1003f1f8]
mov word [ebp + esi - 0x403e], ax
push 4
pop eax
cmp esi, eax
mov dword [ebp + esi - 0x403c], edi
jle 0x10021d2f
mov ecx, eax
and ecx, 3
mov cl, byte [ebp + ecx - 0x1c]
xor byte [ebp + eax - 0x4038], cl
inc eax
cmp eax, esi
jl 0x10021d1a
mov eax, dword [ebp + 0x10]
cmp dword [eax], 2
jne 0x10021da0
mov eax, dword [ebp - 0x4036]
xor eax, dword [ebp - 0x4038]
cmp ax, 0x5b
jne 0x10021da0
movzx eax, byte [ebp - 0x402a]
cmp eax, ebx
lea edi, [ebp - 0x4029]
jle 0x10021d6f
mov dword [ebp - 0x20], eax
inc edi
inc edi
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
dec dword [ebp - 0x20]
lea edi, [edi + eax + 0xf]
jne 0x10021d5d
lea eax, [edi + 4]
push 4
mov dword [ebp - 0x20], eax
mov ax, word [eax]
push 0x1003f0dc
push edi
mov word [0x1003f182], ax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push 2
push 0x1003f180
push dword [ebp - 0x20]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x4038]
push eax
push dword [ebp + 0xc]
mov eax, esi
call fcn.100215e3
test eax, eax
pop ecx
pop ecx
je 0x10021dd0
lea eax, [ebp - 0x34]
push eax
push 0x4004667f
push dword [ebp + 8]
call sub.WS2_32.dll_ioctlsocket
test eax, eax
je 0x10021835
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
lea eax, [ebp + 0x10]
push eax
mov esi, 0x8004667e
push esi
push dword [ebp + 8]
xor edi, edi
inc edi
mov dword [ebp + 0x10], edi
call sub.WS2_32.dll_ioctlsocket
test eax, eax
jne 0x10021dd0
push 2
push edi
lea eax, [ebp - 0x4038]
push eax
push dword [ebp + 8]
call sub.WS2_32.dll_recv
mov edi, eax
cmp edi, 0xffffffff
jne 0x10021e1a
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x10021e1a
xor edi, edi
lea eax, [ebp + 0x10]
push eax
push esi
push dword [ebp + 8]
mov dword [ebp + 0x10], ebx
call sub.WS2_32.dll_ioctlsocket
test eax, eax
jne 0x10021dd0
cmp edi, ebx
setne al
jmp 0x10021dd2