Function at 0x6ec60070
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [esp + 0x50]
cmp dword [ebx + 0x240], 0x10
ja 0x6ec600e4
mov eax, dword [ebx + 0x234]
mov dword [esp], eax
call fcn.6ebddfd0
test eax, eax
mov ebp, eax
jne 0x6ec600e9
mov edi, dword [ebx + 0x254]
mov esi, dword [ebx + 0x250]
mov eax, dword [ebx + 0x240]
shrd esi, edi, 3
cdq
shr edi, 3
add eax, esi
mov esi, dword [esp + 0x58]
adc edx, edi
xor edi, edi
add eax, esi
adc edx, edi
cmp edx, 0xf
ja 0x6ec600e4
jb 0x6ec600cc
cmp eax, 0xffffffdf
ja 0x6ec600e4
mov eax, dword [ebx + 0x23c]
test eax, eax
je 0x6ec600f3
cmp eax, 1
je 0x6ec60120
cmp eax, 2
je 0x6ec601a0
mov ebp, 0x10
add esp, 0x3c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.6ec5fd30
test eax, eax
jne 0x6ec60199
mov eax, dword [ebx + 0x23c]
jmp 0x6ec600d6
mov eax, dword [ebx + 0x240]
test eax, eax
je 0x6ec60156
mov edi, eax
sar edi, 0x1f
mov edx, edi
shld edx, eax, 3
shl eax, 3
add dword [ebx + 0x248], eax
lea eax, [ebx + 0x1f4]
adc dword [ebx + 0x24c], edx
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.6ebd7be0
lea eax, [ebx + 0x213]
lea ecx, [ebx + 0x20f]
movzx edi, byte [eax]
lea edx, [edi + 1]
test dl, dl
mov byte [eax], dl
jne 0x6ec60175
sub eax, 1
cmp eax, ecx
jne 0x6ec60162
lea eax, [ebx + 0x224]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
lea eax, [ebx + 0x204]
mov dword [esp], eax
call fcn.6ebd5c90
test eax, eax
je 0x6ec60250
mov ebp, eax
jmp 0x6ec600e9
mov edi, dword [ebx + 0x240]
mov dword [esp + 0x14], 0
test edi, edi
je 0x6ec60264
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x58], eax
jbe 0x6ec600e9
lea edx, [ebx + 0x1f4]
mov ecx, dword [esp + 0x54]
add ecx, dword [esp + 0x58]
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x54]
mov dword [esp + 0x14], edx
lea edx, [ebx + 0x20f]
mov dword [esp + 0x1c], ebp
mov eax, dword [ebx + 0x240]
add edi, esi
mov dword [esp + 0x18], edx
add esi, dword [esp + 0x5c]
mov ebp, ecx
jmp 0x6ec6022a
xor al, byte [edi]
mov ecx, eax
mov byte [esi], al
mov edx, dword [ebx + 0x240]
add edi, 1
add esi, 1
lea eax, [edx + 1]
mov dword [ebx + 0x240], eax
xor byte [ebx + edx + 0x1f4], cl
cmp ebp, edi
je 0x6ec603e0
cmp eax, 0x10
je 0x6ec60370
mov edx, dword [esp + 0x60]
movzx eax, byte [ebx + eax + 0x224]
test edx, edx
je 0x6ec60200
movzx ecx, byte [esi]
xor eax, ecx
mov byte [edi], al
jmp 0x6ec60206
mov dword [ebx + 0x240], 0
mov dword [ebx + 0x23c], 2
mov eax, dword [esp + 0x58]
mov esi, dword [esp + 0x60]
and eax, 0xfffffff0
test esi, esi
mov dword [esp + 0x1c], eax
je 0x6ec603f0
test eax, eax
je 0x6ec604d2
lea eax, [ebx + 0x1f4]
mov esi, dword [esp + 0x5c]
mov edi, dword [esp + 0x54]
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], eax
lea eax, [ebx + 0x224]
mov dword [esp + 0x24], eax
lea eax, [ebx + 0x204]
mov dword [esp + 0x28], eax
lea eax, [ebx + 0x213]
mov dword [esp + 0x20], eax
lea eax, [ebx + 0x20f]
mov ebp, eax
mov esi, esi
lea edi, [edi]
mov edx, dword [esp + 0x18]
xor eax, eax
mov ecx, dword [esi + eax]
xor dword [edx], ecx
add edx, 4
mov ecx, dword [esi + eax]
xor ecx, dword [edx + 0x2c]
mov dword [edi + eax], ecx
add eax, 4
cmp eax, 0x10
jne 0x6ec602d6
add dword [ebx + 0x250], 0x80
mov eax, dword [esp + 0x18]
adc dword [ebx + 0x254], 0
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.6ebd7be0
mov eax, dword [esp + 0x20]
movzx ecx, byte [eax]
lea edx, [ecx + 1]
test dl, dl
mov byte [eax], dl
jne 0x6ec60327
sub eax, 1
cmp eax, ebp
jne 0x6ec60314
mov eax, dword [esp + 0x24]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call fcn.6ebd5c90
test eax, eax
jne 0x6ec60199
add dword [esp + 0x14], 0x10
add esi, 0x10
add edi, 0x10
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x1c]
jb 0x6ec602d0
mov ebp, dword [esp + 0x2c]
jmp 0x6ec601b6
add dword [ebx + 0x250], 0x80
mov eax, dword [esp + 0x14]
adc dword [ebx + 0x254], 0
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.6ebd7be0
mov ecx, dword [esp + 0x18]
lea eax, [ebx + 0x213]
add byte [eax], 1
jne 0x6ec603a7
sub eax, 1
cmp ecx, eax
jne 0x6ec6039b
lea eax, [ebx + 0x224]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
lea eax, [ebx + 0x204]
mov dword [esp], eax
call fcn.6ebd5c90
test eax, eax
jne 0x6ec60199
mov dword [ebx + 0x240], 0
jmp 0x6ec60233
mov ebp, dword [esp + 0x1c]
jmp 0x6ec600e9
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x6ec604d2
lea eax, [ebx + 0x1f4]
mov edi, dword [esp + 0x54]
mov esi, dword [esp + 0x5c]
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], eax
lea eax, [ebx + 0x224]
mov dword [esp + 0x24], eax
lea eax, [ebx + 0x204]
mov dword [esp + 0x28], eax
lea eax, [ebx + 0x213]
mov dword [esp + 0x20], eax
lea eax, [ebx + 0x20f]
mov ebp, eax
mov edx, dword [esp + 0x18]
xor eax, eax
mov ecx, dword [edi + eax]
xor ecx, dword [edx + 0x30]
mov dword [esi + eax], ecx
add eax, 4
xor dword [edx], ecx
add edx, 4
cmp eax, 0x10
jne 0x6ec60446
add dword [ebx + 0x250], 0x80
adc dword [ebx + 0x254], 0
mov eax, dword [esp + 0x18]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.6ebd7be0
mov eax, dword [esp + 0x20]
movzx ecx, byte [eax]
lea edx, [ecx + 1]
test dl, dl
mov byte [eax], dl
jne 0x6ec60494
sub eax, 1
cmp ebp, eax
jne 0x6ec60481
mov eax, dword [esp + 0x24]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call fcn.6ebd5c90
test eax, eax
jne 0x6ec60199
add dword [esp + 0x14], 0x10
add edi, 0x10
add esi, 0x10
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x1c]
jb 0x6ec60440
jmp 0x6ec60360
mov dword [esp + 0x14], 0
jmp 0x6ec601b6