Function at 0x101bbce0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
push esi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push edi
xor edi, edi
mov esi, ecx
mov dword [ebp - 8], eax
test eax, eax
jle 0x101bbfb9
push ebx
jmp 0x101bbd06
mov eax, dword [ebp - 8]
cmp dword [esi + 0x18], 0
je 0x101bbe9c
mov ecx, dword [esi + 0x20]
mov dword [ebp + 8], ecx
cmp ecx, eax
jl 0x101bbd1d
mov dword [ebp + 8], eax
mov edx, dword [esi + 0x1c]
mov ebx, dword [ebp + 8]
sub edx, dword [esi + 0x20]
mov ecx, dword [ebp - 4]
push ebx
push ecx
lea eax, [edx + esi + 4]
push eax
call sub.MSVCR100.dll_memcpy
add esp, 0xc
sub dword [esi + 0x20], ebx
jne 0x101bbf82
mov edx, dword [esi + 4]
mov eax, edx
shr eax, 8
and eax, 0x7f
cmp eax, 0x7e
jge 0x101bbd5a
mov dword [ebp + 0xc], 0
jmp 0x101bbd6a
lea ecx, [eax - 0x7e]
neg ecx
sbb ecx, ecx
and ecx, 6
add ecx, 2
mov dword [ebp + 0xc], ecx
mov ecx, dword [ebp + 0xc]
mov ebx, edx
shr ebx, 0xf
and ebx, 1
add ebx, ebx
add ebx, ebx
lea ecx, [ebx + ecx + 2]
mov dword [ebp - 0xc], ecx
mov ecx, dword [esi + 0x1c]
cmp ecx, dword [ebp - 0xc]
jge 0x101bbd9a
mov eax, dword [ebp - 0xc]
mov edx, eax
sub edx, ecx
mov dword [esi + 0x20], edx
mov dword [esi + 0x1c], eax
jmp 0x101bbf82
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x101bbdaf
test ebx, ebx
je 0x101bbfa3
test ecx, ecx
jne 0x101bbdb7
test ebx, ebx
jg 0x101bbfa3
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x101bbdc1
cdq
jmp 0x101bbde6
cmp ecx, 2
jne 0x101bbdd6
shr edx, 0x10
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
cdq
jmp 0x101bbde6
mov edx, dword [esi + 0xa]
mov eax, dword [esi + 6]
push edx
push eax
call fcn.101bfe60
add esp, 8
mov edi, eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], edx
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edx
test ebx, ebx
jle 0x101bbe01
mov ecx, dword [ebp + 0xc]
lea ebx, [ecx + esi + 6]
jmp 0x101bbe03
xor ebx, ebx
mov dword [esi + 0x14], ebx
mov al, byte [esi + 4]
and al, 0xf
mov byte [ebp - 0x10], al
mov eax, dword [esi + 4]
mov ecx, eax
shr eax, 7
and eax, 1
shr ecx, 4
mov dword [ebp + 0xc], eax
push edx
and cl, 7
mov byte [ebp - 0x14], cl
mov ecx, dword [esi]
mov dword [ebp - 0x1c], edi
mov eax, dword [ebp - 0x1c]
mov edi, dword [ecx + 0x10]
mov ecx, dword [ecx + 0xc]
mov ecx, dword [ecx + 0x198]
push eax
mov eax, dword [ebp - 0x10]
push ebx
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ecx]
push eax
mov eax, dword [edi + 4]
mov edx, dword [eax + 0x34]
mov dword [ebp + 0xc], ecx
lea ecx, [edi + 4]
call edx
mov ecx, dword [ebp - 0xc]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x2c]
push edi
call eax
mov edi, eax
cmp edi, 2
je 0x101bbf98
cmp dword [esi + 0x2c], 0
ja 0x101bbe7f
cmp dword [esi + 0x28], 0
jbe 0x101bbe8b
mov dword [esi + 0x18], 0
jmp 0x101bbf82
mov ecx, esi
call fcn.101bbc70
mov edi, eax
cmp edi, 2
jmp 0x101bbf80
mov ebx, dword [esi + 0x30]
cdq
cmp dword [esi + 0x34], edx
ja 0x101bbeb0
jb 0x101bbeab
cmp ebx, eax
jae 0x101bbeb0
mov dword [ebp + 8], ebx
jmp 0x101bbeb8
mov ecx, dword [ebp - 8]
mov dword [ebp + 8], ecx
mov ebx, ecx
cmp dword [esi + 0x14], 0
je 0x101bbee7
mov ecx, dword [esi + 0x28]
sub ecx, dword [esi + 0x30]
and ecx, 3
test ebx, ebx
jle 0x101bbee7
mov eax, dword [ebp - 4]
sub ecx, eax
mov dword [ebp + 0xc], ebx
mov edi, dword [esi + 0x14]
lea edx, [ecx + eax]
and edx, 3
mov dl, byte [edx + edi]
xor byte [eax], dl
inc eax
dec dword [ebp + 0xc]
jne 0x101bbed3
mov eax, ebx
cdq
sub dword [esi + 0x30], eax
mov eax, dword [esi]
push ebx
sbb dword [esi + 0x34], edx
mov edi, dword [eax + 0x10]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x198]
mov edx, dword [ebp - 4]
lea ecx, [edi + 4]
push edx
mov edx, dword [ecx]
mov edx, dword [edx + 0x34]
mov dword [ebp + 0xc], eax
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
call edx
mov ecx, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x30]
push edi
call eax
mov edi, eax
cmp edi, 2
je 0x101bbf98
mov ecx, dword [esi + 0x30]
or ecx, dword [esi + 0x34]
jne 0x101bbf82
mov eax, dword [esi]
mov edi, dword [eax + 0x10]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x198]
mov edx, dword [edi + 4]
mov ebx, dword [eax]
lea ecx, [edi + 4]
mov dword [ebp + 0xc], eax
mov eax, dword [edx + 0x34]
call eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebx + 0x34]
push eax
push edi
call edx
xor edx, edx
mov ecx, 2
mov dword [esi + 0x18], 1
mov dword [esi + 0x14], edx
mov dword [esi + 0x1c], ecx
mov dword [esi + 0x20], ecx
mov dword [esi + 0x28], edx
mov dword [esi + 0x2c], edx
mov dword [esi + 0x30], edx
mov dword [esi + 0x34], edx
mov edi, eax
cmp eax, ecx
je 0x101bbf98
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 8]
add dword [ebp - 4], ecx
sub eax, ecx
mov dword [ebp - 8], eax
test eax, eax
jg 0x101bbd03
pop ebx
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop ebx
pop edi
mov eax, 2
pop esi
mov esp, ebp
pop ebp
ret 8
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8