Function at 0x1006a6a0
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 0x1006a854
add eax, 4
mov dword [esp + 0x1c], eax
nop dword [eax]
mov edi, dword [ebx + 4]
xor esi, esi
test ebp, ebp
je 0x1006a6ff
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 0x1006a6e0
mov edx, ebp
lea ecx, [esp + 0x28]
call fcn.1006a3a0
mov ecx, dword [esp + 0x18]
mov dword [ecx], eax
test eax, eax
jne 0x1006a881
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
mov al, byte [eax + 0x38]
cmp al, 1
je 0x1006a72d
cmp al, 2
jne 0x1006a808
mov esi, ebp
cmp ebp, 0xffffffff
jne 0x1006a749
lea esi, [esp + 0x28]
lea ecx, [esi + 1]
nop dword [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x1006a740
sub esi, ecx
test esi, esi
je 0x1006a808
cmp esi, 0x11
ja 0x1006a808
movsx eax, byte [esp + 0x28]
sub eax, 0x61
cmp eax, 0x19
ja 0x1006a808
movzx ecx, word [eax*4 + 0x10099548]
test ecx, ecx
je 0x1006a808
movzx ebp, word [eax*4 + 0x1009954a]
lea ecx, [ecx*8 + 0x100947c0]
shl ebp, 3
sub ebp, ecx
mov dword [esp + 0x14], ecx
add ebp, 0x100947c0
sar ebp, 3
test ebp, ebp
je 0x1006a804
mov eax, ebp
shr eax, 1
lea ebx, [ecx + eax*8]
mov ecx, dword [ebx]
and ecx, 0x3fff
call fcn.10070b20
xor ecx, ecx
mov dword [esp + 0x24], eax
test esi, esi
je 0x1006a7e0
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 0x1006a7e4
inc ecx
cmp ecx, esi
jb 0x1006a7c6
mov eax, dword [esp + 0x24]
movzx edx, byte [eax + esi]
test edx, edx
js 0x1006a7ea
jle 0x1006a861
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 0x1006a7a0
mov ebp, dword [esp + 0x10]
xor ebx, ebx
mov eax, dword [esp + 0x18]
mov dword [eax], ebx
test ebx, ebx
jne 0x1006a87d
mov edx, ebp
lea ecx, [esp + 0x28]
call fcn.10069f60
test eax, eax
je 0x1006a854
mov edx, dword [esp + 0x50]
mov ecx, dword [edx]
test eax, ecx
jne 0x1006a870
or ecx, eax
push ebx
mov ebx, dword [esp + 0x58]
mov dword [edx], ecx
mov ecx, dword [esp + 0x20]
push ebx
call fcn.100704b0
cmp al, 2
jne 0x1006a854
mov ebp, dword [ebx + 8]
mov dword [esp + 0x10], ebp
cmp ebp, 0x20
jbe 0x1006a6d0
mov eax, 0x1a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov ebp, dword [esp + 0x10]
sub ebx, 0x100947c0
sar ebx, 3
jmp 0x1006a80a
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.100704b0
cmp al, 2
jne 0x1006a8ea
mov edx, dword [ebx + 8]
cmp edx, 0x20
ja 0x1006a8ea
mov ebx, dword [ebx + 4]
xor edi, edi
test edx, edx
je 0x1006a8c7
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 0x1006a8a8
lea ecx, [esp + 0x28]
call fcn.10069f60
cmp eax, 0x10
jne 0x1006a8e6
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