Function at 0x6ec45190
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov eax, dword [esp + 0x50]
mov ebx, dword [esp + 0x58]
mov edi, dword [eax + 0x1c]
mov ecx, dword [eax + 0x10]
mov eax, dword [edi + 0x40]
add eax, 7
and eax, 0xfffffff8
add eax, ebx
cmp eax, ecx
jle 0x6ec451e9
mov edx, dword [edi + 0x30]
lea esi, [ecx + ebx + 0x1000]
and esi, 0xfffff001
test edx, edx
je 0x6ec4540b
lea edx, [edi + 0x30]
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
mov dword [esp], edx
call fcn.6ec5f150
mov edx, dword [esp + 0x50]
mov edi, dword [edx + 0x1c]
mov dword [edx + 0x10], esi
mov edx, dword [edi + 0x34]
test edx, edx
je 0x6ec45426
test ebx, ebx
jle 0x6ec4541f
mov esi, dword [esp + 0x54]
xor eax, eax
mov ebp, esi
add ebp, ebx
mov ecx, eax
and ecx, 1
shl eax, cl
mov ecx, eax
movzx eax, byte [esi]
add esi, 1
xor eax, ecx
cmp esi, ebp
jne 0x6ec45206
mov ebp, dword [edi + 0x38]
sub ebp, 1
and ebp, eax
shl ebp, 2
mov esi, dword [edx + ebp]
test esi, esi
je 0x6ec45276
mov dword [esp + 0x14], ebp
mov ebp, ebx
mov ebx, dword [esp + 0x54]
jmp 0x6ec45246
mov esi, dword [esi]
test esi, esi
je 0x6ec45270
cmp dword [esi + 0x18], ebp
jne 0x6ec45240
mov dword [esp + 8], ebp
mov dword [esp + 4], ebx
mov eax, dword [edi + 0x30]
add eax, dword [esi + 0x10]
mov dword [esp], eax
call fcn.6ec668e8
test eax, eax
jne 0x6ec45240
add esp, 0x3c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, ebp
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x50]
xor edx, edx
call fcn.6ec43bb0
mov ecx, dword [esp + 0x5c]
mov esi, eax
mov eax, dword [esp + 0x5c]
test eax, eax
cmove ecx, ebx
cmp ecx, 4
mov dword [esp + 0x5c], ecx
jbe 0x6ec45400
mov ecx, dword [esp + 0x50]
mov eax, dword [ecx + 0x1c]
mov edx, dword [eax + 0x40]
add edx, 7
and edx, 0xfffffff8
mov dword [eax + 0x40], edx
mov edx, dword [eax + 0x40]
mov ecx, dword [esp + 0x54]
mov dword [esi + 0x18], ebx
mov dword [esi + 0x10], edx
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
add edx, dword [eax + 0x30]
mov dword [esp], edx
call fcn.6ec5f070
mov edx, dword [esp + 0x50]
mov eax, dword [edx + 0x1c]
add ebp, dword [eax + 0x34]
add dword [eax + 0x40], ebx
mov eax, dword [ebp]
mov dword [esi], eax
mov dword [ebp], esi
mov eax, dword [edx + 0x1c]
mov edx, dword [eax + 0x3c]
add edx, 1
mov dword [eax + 0x3c], edx
mov eax, dword [eax + 0x38]
mov ebx, eax
mov ecx, eax
sar ebx, 1
sar ecx, 2
add ecx, ebx
cmp edx, ecx
jle 0x6ec45265
lea edx, [eax + eax]
cmp eax, edx
jge 0x6ec45265
shl eax, 3
mov dword [esp + 4], eax
lea eax, [esp + 0x2c]
mov dword [esp], eax
call fcn.6ec5f120
mov ecx, dword [esp + 0x50]
mov edx, dword [ecx + 0x1c]
mov eax, dword [edx + 0x38]
test eax, eax
jle 0x6ec453da
mov dword [esp + 0x18], 0
mov ebp, eax
mov dword [esp + 0x1c], esi
mov eax, dword [edx + 0x34]
mov ecx, dword [esp + 0x18]
mov esi, dword [eax + ecx*4]
test esi, esi
je 0x6ec453c7
mov ebx, dword [esi + 0x18]
mov edx, dword [edx + 0x30]
add edx, dword [esi + 0x10]
mov edi, dword [esi]
test ebx, ebx
jle 0x6ec453ad
add ebx, edx
xor eax, eax
mov ecx, eax
and ecx, 1
shl eax, cl
mov ecx, eax
movzx eax, byte [edx]
add edx, 1
xor eax, ecx
cmp edx, ebx
jne 0x6ec45366
lea edx, [ebp + ebp - 1]
and edx, eax
shl edx, 2
add edx, dword [esp + 0x2c]
test edi, edi
mov eax, dword [edx]
mov dword [esi], eax
mov dword [edx], esi
je 0x6ec453bd
mov eax, dword [esp + 0x50]
mov esi, edi
mov ebx, dword [esi + 0x18]
mov edi, dword [esi]
mov edx, dword [eax + 0x1c]
mov ebp, dword [edx + 0x38]
mov edx, dword [edx + 0x30]
add edx, dword [esi + 0x10]
test ebx, ebx
jg 0x6ec45362
xor edx, edx
add edx, dword [esp + 0x2c]
test edi, edi
mov eax, dword [edx]
mov dword [esi], eax
mov dword [edx], esi
jne 0x6ec45392
mov ecx, dword [esp + 0x50]
mov edx, dword [ecx + 0x1c]
mov ebp, dword [edx + 0x38]
add dword [esp + 0x18], 1
cmp dword [esp + 0x18], ebp
jl 0x6ec45345
mov esi, dword [esp + 0x1c]
add edx, 0x34
mov dword [esp], edx
call fcn.6ec5f1c0
mov edx, dword [esp + 0x50]
mov eax, dword [edx + 0x1c]
mov edx, dword [esp + 0x2c]
shl dword [eax + 0x38], 1
mov dword [eax + 0x34], edx
jmp 0x6ec45265
mov eax, dword [esp + 0x5c]
jmp dword [eax*4 + 0x6ec74d28]
lea edx, [edi + 0x30]
mov dword [esp + 4], esi
mov dword [esp], edx
call fcn.6ec5f120
jmp 0x6ec451df
xor ebp, ebp
jmp 0x6ec45226
lea edx, [edi + 0x34]
mov dword [edi + 0x38], 0x10
mov dword [esp], edx
mov dword [esp + 4], 0x40
call fcn.6ec5f120
mov ecx, dword [esp + 0x50]
mov edi, dword [ecx + 0x1c]
mov edx, dword [edi + 0x34]
jmp 0x6ec451f4
mov ecx, dword [esp + 0x50]
mov eax, dword [ecx + 0x1c]
mov edx, dword [eax + 0x40]
add edx, 1
and edx, 0xfffffffe
mov dword [eax + 0x40], edx
jmp 0x6ec452b0
mov edx, dword [esp + 0x50]
mov eax, dword [edx + 0x1c]
mov edx, dword [eax + 0x40]
add edx, 3
and edx, 0xfffffffc
mov dword [eax + 0x40], edx
jmp 0x6ec452b0
mov edx, dword [esp + 0x50]
mov eax, dword [edx + 0x1c]
jmp 0x6ec452b0