Function at 0x1006b140
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 0x1006b2f4
add eax, 4
mov dword [esp + 0x1c], eax
nop dword [eax]
mov edi, dword [ebx + 4]
xor esi, esi
test ebp, ebp
je 0x1006b19f
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 0x1006b180
mov edx, ebp
lea ecx, [esp + 0x28]
call fcn.1006ae40
mov ecx, dword [esp + 0x18]
mov dword [ecx], eax
test eax, eax
jne 0x1006b321
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
mov al, byte [eax + 0x38]
cmp al, 1
je 0x1006b1cd
cmp al, 2
jne 0x1006b2a8
mov esi, ebp
cmp ebp, 0xffffffff
jne 0x1006b1e9
lea esi, [esp + 0x28]
lea ecx, [esi + 1]
nop dword [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x1006b1e0
sub esi, ecx
test esi, esi
je 0x1006b2a8
cmp esi, 0x11
ja 0x1006b2a8
movsx eax, byte [esp + 0x28]
sub eax, 0x61
cmp eax, 0x19
ja 0x1006b2a8
movzx ecx, word [eax*4 + 0x1009a040]
test ecx, ecx
je 0x1006b2a8
movzx ebp, word [eax*4 + 0x1009a042]
lea ecx, [ecx*8 + 0x10095858]
shl ebp, 3
sub ebp, ecx
mov dword [esp + 0x14], ecx
add ebp, 0x10095858
sar ebp, 3
test ebp, ebp
je 0x1006b2a4
mov eax, ebp
shr eax, 1
lea ebx, [ecx + eax*8]
mov ecx, dword [ebx]
and ecx, 0x3fff
call fcn.100715c0
xor ecx, ecx
mov dword [esp + 0x24], eax
test esi, esi
je 0x1006b280
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 0x1006b284
inc ecx
cmp ecx, esi
jb 0x1006b266
mov eax, dword [esp + 0x24]
movzx edx, byte [eax + esi]
test edx, edx
js 0x1006b28a
jle 0x1006b301
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 0x1006b240
mov ebp, dword [esp + 0x10]
xor ebx, ebx
mov eax, dword [esp + 0x18]
mov dword [eax], ebx
test ebx, ebx
jne 0x1006b31d
mov edx, ebp
lea ecx, [esp + 0x28]
call fcn.1006aa00
test eax, eax
je 0x1006b2f4
mov edx, dword [esp + 0x50]
mov ecx, dword [edx]
test eax, ecx
jne 0x1006b310
or ecx, eax
push ebx
mov ebx, dword [esp + 0x58]
mov dword [edx], ecx
mov ecx, dword [esp + 0x20]
push ebx
call fcn.10070f50
cmp al, 2
jne 0x1006b2f4
mov ebp, dword [ebx + 8]
mov dword [esp + 0x10], ebp
cmp ebp, 0x20
jbe 0x1006b170
mov eax, 0x1a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov ebp, dword [esp + 0x10]
sub ebx, 0x10095858
sar ebx, 3
jmp 0x1006b2aa
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.10070f50
cmp al, 2
jne 0x1006b38a
mov edx, dword [ebx + 8]
cmp edx, 0x20
ja 0x1006b38a
mov ebx, dword [ebx + 4]
xor edi, edi
test edx, edx
je 0x1006b367
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 0x1006b348
lea ecx, [esp + 0x28]
call fcn.1006aa00
cmp eax, 0x10
jne 0x1006b386
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