Function at 0x1006b090
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 + 0x14], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ebp
cmp ebp, 0x20
ja 0x1006b24d
add eax, 4
mov dword [esp + 0x24], eax
nop dword [eax]
mov edi, dword [ebx + 4]
xor esi, esi
test ebp, ebp
je 0x1006b0ef
lea eax, [esp + 0x28]
sub edi, eax
nop
lea edx, [esp + 0x28]
mov bl, 0x19
add edx, esi
mov al, byte [edi + edx]
sub al, 0x41
cmp bl, 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 0x1006b0d0
mov edx, ebp
lea ecx, [esp + 0x28]
call fcn.1006ad90
mov ebx, eax
mov eax, dword [esp + 0x14]
mov dword [eax], ebx
test ebx, ebx
jne 0x1006b272
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
mov al, byte [eax + 0x38]
cmp al, 1
je 0x1006b11f
cmp al, 2
jne 0x1006b200
mov esi, ebp
cmp ebp, 0xffffffff
jne 0x1006b139
lea esi, [esp + 0x28]
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x1006b130
sub esi, ecx
test esi, esi
je 0x1006b1fa
cmp esi, 0x11
ja 0x1006b1fa
movsx eax, byte [esp + 0x28]
sub eax, 0x61
cmp eax, 0x19
ja 0x1006b1fa
movzx ecx, word [eax*4 + 0x1009a5c0]
test ecx, ecx
je 0x1006b1fa
movzx eax, word [eax*4 + 0x1009a5c2]
lea ebx, [ecx*8 + 0x10095838]
shl eax, 3
sub eax, ebx
add eax, 0x10095838
sar eax, 3
test eax, eax
je 0x1006b1fa
nop dword [eax + eax]
mov dword [esp + 0x1c], eax
shr eax, 1
mov ecx, dword [ebx + eax*8]
mov dword [esp + 0x20], ebx
and ecx, 0x3fff
lea ebx, [ebx + eax*8]
call fcn.100715b0
xor ecx, ecx
mov ebp, eax
test esi, esi
je 0x1006b1d6
mov edi, ebp
lea eax, [esp + 0x28]
sub edi, eax
nop dword [eax + eax]
lea eax, [esp + 0x28]
add eax, ecx
movzx edx, byte [edi + eax]
movzx eax, byte [eax]
sub edx, eax
jne 0x1006b1da
inc ecx
cmp ecx, esi
jb 0x1006b1c0
movzx edx, byte [esi + ebp]
test edx, edx
js 0x1006b1e0
jle 0x1006b25a
mov ecx, dword [esp + 0x1c]
test edx, edx
lea eax, [ecx - 1]
cmovns eax, ecx
add ebx, 8
test edx, edx
cmovns ebx, dword [esp + 0x20]
shr eax, 1
jne 0x1006b190
xor ebx, ebx
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov dword [eax], ebx
test ebx, ebx
jne 0x1006b272
mov edx, ebp
lea ecx, [esp + 0x28]
call fcn.1006a950
test eax, eax
je 0x1006b24d
mov edx, dword [esp + 0x50]
mov ecx, dword [edx]
test eax, ecx
jne 0x1006b265
or ecx, eax
mov dword [edx], ecx
mov ecx, dword [esp + 0x10]
push ebx
mov ebx, dword [esp + 0x58]
push ebx
lea ecx, [ecx + 4]
call fcn.10070f50
cmp al, 2
jne 0x1006b24d
mov ebp, dword [ebx + 8]
mov dword [esp + 0x18], ebp
cmp ebp, 0x20
jbe 0x1006b0c0
mov eax, 0x1a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
sub ebx, 0x10095838
sar ebx, 3
jmp 0x1006b1fc
mov eax, 0x37
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov ebp, dword [esp + 0x54]
mov ecx, dword [esp + 0x24]
push 0
push ebp
call fcn.10070f50
cmp al, 2
jne 0x1006b2de
mov edx, dword [ebp + 8]
cmp edx, 0x20
ja 0x1006b2de
mov ebx, dword [ebp + 4]
xor edi, edi
test edx, edx
je 0x1006b2bf
lea eax, [esp + 0x28]
sub ebx, eax
nop dword [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 0x1006b2a0
lea ecx, [esp + 0x28]
call fcn.1006a950
cmp eax, 0x10
jne 0x1006b2de
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 ecx, dword [esp + 0x10]
mov eax, dword [ebp + 4]
pop edi
pop esi
pop ebp
mov dword [ecx + 0xc], eax
xor eax, eax
pop ebx
add esp, 0x3c
ret