Function at 0x1006b1f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x3c
push ebx
mov ebx, dword [esp + 0x48]
mov eax, ecx
push ebp
push esi
push edi
mov ebp, dword [ebx + 8]
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], ebp
cmp ebp, 0x20
ja 0x1006b3a4
add eax, 4
mov dword [esp + 0x1c], eax
nop dword [eax]
mov edi, dword [ebx + 4]
xor esi, esi
test ebp, ebp
je 0x1006b24f
lea eax, [esp + 0x28]
sub edi, eax
nop
lea edx, [esp + 0x28]
mov ah, 0x19
add edx, esi
mov al, byte [edi + edx]
sub al, 0x41
cmp ah, al
sbb al, al
inc esi
and al, 0xe0
add al, 0x20
xor al, byte [edi + edx]
mov byte [edx], al
cmp esi, ebp
jb 0x1006b230
mov edx, ebp
lea ecx, [esp + 0x28]
call fcn.1006aef0
mov ecx, dword [esp + 0x18]
mov dword [ecx], eax
test eax, eax
jne 0x1006b3d1
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
mov al, byte [eax + 0x38]
cmp al, 1
je 0x1006b27d
cmp al, 2
jne 0x1006b358
mov esi, ebp
cmp ebp, 0xffffffff
jne 0x1006b299
lea esi, [esp + 0x28]
lea ecx, [esi + 1]
nop dword [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x1006b290
sub esi, ecx
test esi, esi
je 0x1006b358
cmp esi, 0x11
ja 0x1006b358
movsx eax, byte [esp + 0x28]
sub eax, 0x61
cmp eax, 0x19
ja 0x1006b358
movzx ecx, word [eax*4 + 0x10099018]
test ecx, ecx
je 0x1006b358
movzx ebp, word [eax*4 + 0x1009901a]
lea ecx, [ecx*8 + 0x10095630]
shl ebp, 3
sub ebp, ecx
mov dword [esp + 0x14], ecx
add ebp, 0x10095630
sar ebp, 3
test ebp, ebp
je 0x1006b354
mov eax, ebp
shr eax, 1
lea ebx, [ecx + eax*8]
mov ecx, dword [ebx]
and ecx, 0x3fff
call fcn.10071680
xor ecx, ecx
mov dword [esp + 0x24], eax
test esi, esi
je 0x1006b330
mov edi, eax
lea eax, [esp + 0x28]
sub edi, eax
lea eax, [esp + 0x28]
add eax, ecx
movzx edx, byte [edi + eax]
movzx eax, byte [eax]
sub edx, eax
jne 0x1006b334
inc ecx
cmp ecx, esi
jb 0x1006b316
mov eax, dword [esp + 0x24]
movzx edx, byte [eax + esi]
test edx, edx
js 0x1006b33a
jle 0x1006b3b1
test edx, edx
lea eax, [ebp - 1]
lea ecx, [ebx + 8]
cmovns ecx, dword [esp + 0x14]
cmovns eax, ebp
mov ebp, eax
mov dword [esp + 0x14], ecx
shr ebp, 1
jne 0x1006b2f0
mov ebp, dword [esp + 0x10]
xor ebx, ebx
mov eax, dword [esp + 0x18]
mov dword [eax], ebx
test ebx, ebx
jne 0x1006b3cd
mov edx, ebp
lea ecx, [esp + 0x28]
call fcn.1006aab0
test eax, eax
je 0x1006b3a4
mov edx, dword [esp + 0x50]
mov ecx, dword [edx]
test eax, ecx
jne 0x1006b3c0
or ecx, eax
push ebx
mov ebx, dword [esp + 0x58]
mov dword [edx], ecx
mov ecx, dword [esp + 0x20]
push ebx
call fcn.10071010
cmp al, 2
jne 0x1006b3a4
mov ebp, dword [ebx + 8]
mov dword [esp + 0x10], ebp
cmp ebp, 0x20
jbe 0x1006b220
mov eax, 0x1a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov ebp, dword [esp + 0x10]
sub ebx, 0x10095630
sar ebx, 3
jmp 0x1006b35a
mov eax, 0x37
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov ebx, dword [esp + 0x54]
mov ecx, dword [esp + 0x1c]
push 0
push ebx
call fcn.10071010
cmp al, 2
jne 0x1006b43a
mov edx, dword [ebx + 8]
cmp edx, 0x20
ja 0x1006b43a
mov ebx, dword [ebx + 4]
xor edi, edi
test edx, edx
je 0x1006b417
lea eax, [esp + 0x28]
sub ebx, eax
lea esi, [esp + 0x28]
mov ah, 0x19
add esi, edi
mov al, byte [ebx + esi]
sub al, 0x41
cmp ah, al
sbb al, al
inc edi
and al, 0xe0
add al, 0x20
xor al, byte [ebx + esi]
mov byte [esi], al
cmp edi, edx
jb 0x1006b3f8
lea ecx, [esp + 0x28]
call fcn.1006aab0
cmp eax, 0x10
jne 0x1006b436
mov eax, dword [esp + 0x50]
or dword [eax], 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov ebx, dword [esp + 0x54]
mov ecx, dword [esp + 0x20]
mov eax, dword [ebx + 4]
pop edi
pop esi
pop ebp
mov dword [ecx + 0xc], eax
xor eax, eax
pop ebx
add esp, 0x3c
ret