Function at 0x100b2140
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
mov dword [ebp - 8], ebx
cmp dword [eax + 0xa4], ebx
je 0x100b2161
mov eax, 0xffffbf80
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x14]
push esi
push edi
mov edi, dword [eax + 4]
lea esi, [edi - 3]
cmp edx, ebx
je 0x100b21f0
lea eax, [edx - 3]
cmp eax, 6
ja case.default.0x100b217c
jmp dword [eax*4 + 0x100b2360]
mov ecx, 0x102994b0
jmp 0x100b21b2
mov ecx, 0x102994e0
jmp 0x100b21b2
mov ecx, 0x10299510
jmp 0x100b21b2
mov ecx, 0x10299540
jmp 0x100b21b2
mov ecx, 0x10299570
jmp 0x100b21b2
mov ecx, 0x102995a0
jmp 0x100b21b2
mov ecx, 0x102995d0
mov eax, 0x1029aa88
cmp dword [0x1029aa88], ebx
je case.default.0x100b217c
nop
cmp dword [eax + 0x10], edx
je 0x100b21d8
add eax, 0x14
cmp dword [eax], ebx
jne 0x100b21c0
pop edi
pop esi
mov eax, 0xffffbf80
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [eax]
mov ebx, dword [eax + 4]
movzx ecx, byte [ecx + 8]
mov eax, 0xfffffff6
sub eax, ebx
mov dword [ebp - 8], edx
add esi, eax
mov dword [ebp + 0x18], ecx
sub esi, dword [ebp + 0x18]
cmp esi, 8
jb case.default.0x100b217c
cmp esi, edi
ja case.default.0x100b217c
mov edi, dword [ebp + 0x20]
mov byte [edi], 0
push esi
mov byte [edi + 1], 1
add edi, 2
push 0xff
push edi
call sub.MSVCR100.dll_memset
add edi, esi
mov byte [edi], 0
add esp, 0xc
inc edi
cmp dword [ebp + 0x14], 0
jne 0x100b2237
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x1c]
push edx
push eax
push edi
call sub.MSVCR100.dll_memcpy
add esp, 0xc
jmp 0x100b2286
mov eax, dword [ebp - 8]
mov cl, bl
add cl, byte [ebp + 0x18]
mov byte [edi], 0x30
add cl, 8
mov byte [edi + 1], cl
mov byte [edi + 2], 0x30
lea edx, [ebx + 4]
mov byte [edi + 3], dl
mov byte [edi + 4], 6
push ebx
mov byte [edi + 5], bl
push eax
add edi, 6
push edi
call sub.MSVCR100.dll_memcpy
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x1c]
add edi, ebx
mov word [edi], 5
mov byte [edi + 2], 4
push eax
mov byte [edi + 3], al
push ecx
add edi, 4
push edi
call sub.MSVCR100.dll_memcpy
add esp, 0x18
mov edx, dword [ebp + 8]
mov edi, dword [edx + 4]
mov esi, dword [sym.imp.MSVCR100.dll_calloc]
push edi
push 1
call esi
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x100b22bb
push edi
push 1
call esi
mov edi, eax
add esp, 8
mov dword [ebp - 0xc], edi
push ebx
test edi, edi
jne 0x100b22c7
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
pop edi
pop esi
mov eax, 0xfffffff0
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push eax
push ecx
mov ecx, dword [ebp + 0x20]
push edx
call fcn.100b1430
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x100b2345
mov esi, dword [ebp + 8]
push edi
mov ecx, ebx
call fcn.100b1240
mov esi, eax
add esp, 4
test esi, esi
jne 0x100b2345
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
xor dl, dl
test ecx, ecx
je 0x100b2320
mov eax, dword [ebp + 0x20]
sub edi, eax
mov dword [ebp - 8], ecx
lea esp, [esp]
mov cl, byte [edi + eax]
xor cl, byte [eax]
inc eax
or dl, cl
dec dword [ebp - 8]
jne 0x100b2310
mov edi, dword [ebp - 0xc]
mov byte [ebp - 1], dl
mov dl, byte [ebp - 1]
test dl, dl
je 0x100b2331
mov esi, 0xffffbd00
jmp 0x100b2345
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov edx, dword [ebp + 0x20]
push ecx
push ebx
push edx
call sub.MSVCR100.dll_memcpy
add esp, 0xc
push ebx
mov ebx, dword [sym.imp.MSVCR100.dll_free]
call ebx
push edi
call ebx
add esp, 8
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret