Function at 0x6b54c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov edi, dword [esp + 0x18]
xor ebp, ebp
cmp dword [edi + 0x84], 0xffffffff
je 0x6b578e
push dword [edi]
call fcn.005c2fd0
add esp, 4
test eax, eax
je 0x6b578e
mov ecx, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
test ecx, ecx
je 0x6b54f8
mov dword [ecx], eax
mov ebp, 1
test ebx, ebx
je 0x6b578e
mov edx, dword [edi + 0x84]
mov ecx, eax
sub ecx, edx
jne 0x6b562f
test eax, eax
jle 0x6b576a
xor esi, esi
cmp eax, 8
jb 0x6b55c2
lea ebp, [edi + 4]
lea esi, [edi + eax]
add esi, 0x64
cmp esi, ebx
seta dl
lea esi, [ebx + eax]
cmp ebp, esi
mov esi, 0
setb dh
test dl, dh
jne 0x6b55c2
xor esi, esi
cmp eax, 0x20
jb 0x6b5596
mov esi, eax
and esi, 0x7fffffe0
xor edx, edx
nop dword [eax + eax]
movups xmm0, xmmword [edi + edx + 0x64]
movups xmm1, xmmword [edi + edx + 0x74]
movups xmm2, xmmword [edi + edx + 4]
xorps xmm2, xmm0
movups xmm0, xmmword [edi + edx + 0x14]
xorps xmm0, xmm1
movups xmmword [ebx + edx], xmm2
movups xmmword [ebx + edx + 0x10], xmm0
add edx, 0x20
cmp esi, edx
jne 0x6b5560
cmp eax, esi
je 0x6b576a
test al, 0x18
je 0x6b55c2
mov edx, esi
mov esi, eax
and esi, 0x7ffffff8
movsd xmm0, qword [edi + edx + 4]
movsd xmm1, qword [edi + edx + 0x64]
xorps xmm1, xmm0
movlps qword [ebx + edx], xmm1
add edx, 8
cmp esi, edx
jne 0x6b55a0
cmp eax, esi
je 0x6b576a
mov ebp, eax
mov edx, esi
and ebp, 3
je 0x6b55e0
mov edx, esi
nop dword [eax]
movzx ecx, byte [edi + edx + 4]
xor cl, byte [edi + edx + 0x64]
mov byte [ebx + edx], cl
inc edx
dec ebp
jne 0x6b55d0
sub esi, eax
cmp esi, 0xfffffffc
ja 0x6b576a
nop dword [eax + eax]
movzx ecx, byte [edi + edx + 4]
xor cl, byte [edi + edx + 0x64]
mov byte [ebx + edx], cl
movzx ecx, byte [edi + edx + 5]
xor cl, byte [edi + edx + 0x65]
mov byte [ebx + edx + 1], cl
movzx ecx, byte [edi + edx + 6]
xor cl, byte [edi + edx + 0x66]
mov byte [ebx + edx + 2], cl
movzx ecx, byte [edi + edx + 7]
xor cl, byte [edi + edx + 0x67]
mov byte [ebx + edx + 3], cl
add edx, 4
cmp eax, edx
jne 0x6b55f0
jmp 0x6b576a
mov byte [edi + edx + 0x64], pe_nt_image_headers32
cmp ecx, 2
jl 0x6b5650
add edx, edi
add edx, 0x64
inc edx
dec ecx
push ecx
push 0
push edx
mov esi, eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov eax, esi
add esp, 0xc
test eax, eax
jle 0x6b576a
lea ecx, [edi + 0x64]
xor ebp, ebp
cmp eax, 8
jb 0x6b56fd
lea esi, [edi + 0x24]
lea ebp, [edi + eax]
add ebp, 0x64
cmp ebp, ebx
seta dh
lea ebp, [ebx + eax]
cmp esi, ebp
mov ebp, 0
setb dl
test dh, dl
jne 0x6b56fd
xor ebp, ebp
cmp eax, 0x20
jb 0x6b56d6
mov ebp, eax
and ebp, 0x7fffffe0
xor esi, esi
nop word cs:[eax + eax]
movups xmm0, xmmword [edi + esi + 0x64]
movups xmm1, xmmword [edi + esi + 0x74]
movups xmm2, xmmword [edi + esi + 0x24]
xorps xmm2, xmm0
movups xmm0, xmmword [edi + esi + 0x34]
xorps xmm0, xmm1
movups xmmword [ebx + esi], xmm2
movups xmmword [ebx + esi + 0x10], xmm0
add esi, 0x20
cmp ebp, esi
jne 0x6b56a0
cmp eax, ebp
je 0x6b576a
test al, 0x18
je 0x6b56fd
mov esi, ebp
mov ebp, eax
and ebp, 0x7ffffff8
movsd xmm0, qword [ecx + esi - 0x40]
movsd xmm1, qword [ecx + esi]
xorps xmm1, xmm0
movlps qword [ebx + esi], xmm1
add esi, 8
cmp ebp, esi
jne 0x6b56e0
cmp eax, ebp
je 0x6b576a
mov esi, eax
mov dword [esp], ebp
and esi, 3
je 0x6b571f
mov ebp, dword [esp]
nop word [eax + eax]
movzx edx, byte [ecx + ebp - 0x40]
xor dl, byte [ecx + ebp]
mov byte [ebx + ebp], dl
inc ebp
dec esi
jne 0x6b5710
mov ecx, dword [esp]
sub ecx, eax
cmp ecx, 0xfffffffc
ja 0x6b576a
nop dword [eax]
movzx ecx, byte [edi + ebp + 0x24]
xor cl, byte [edi + ebp + 0x64]
mov byte [ebx + ebp], cl
movzx ecx, byte [edi + ebp + 0x25]
xor cl, byte [edi + ebp + 0x65]
mov byte [ebx + ebp + 1], cl
movzx ecx, byte [edi + ebp + 0x26]
xor cl, byte [edi + ebp + 0x66]
mov byte [ebx + ebp + 2], cl
movzx ecx, byte [edi + ebp + 0x27]
xor cl, byte [edi + ebp + 0x67]
mov byte [ebx + ebp + 3], cl
add ebp, 4
cmp eax, ebp
jne 0x6b5730
mov esi, eax
push eax
push ebx
push ebx
push dword [edi]
call fcn.005c3000
add esp, 0x10
test eax, eax
mov ebp, 1
jg 0x6b578e
push esi
push ebx
call fcn.005e8480
add esp, 8
xor ebp, ebp
mov eax, ebp
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret