Function at 0x6b58fe40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x38
mov esi, dword [ebp + 8]
mov al, byte [esi]
mov ecx, dword [esi + 0x28]
mov dword [esp + 0xc], ecx
mov ecx, dword [esi + 0x2c]
mov dword [esp + 8], ecx
mov byte [esp + 7], al
movzx ebx, al
test bl, 0x40
jne 0x6b58fe83
lea eax, [esi + 0x10]
push dword [esp + 8]
push eax
push esi
call dword [esp + 0x18]
add esp, 0xc
add dword [esi + 0x20], 1
adc dword [esi + 0x24], 0
mov edi, dword [ebp + 0x14]
and ebx, 7
mov byte [esi], bl
mov eax, ebx
xor eax, 0xf
test ebx, ebx
mov dword [esp + 0x2c], eax
je 0x6b58feb7
xor edx, edx
mov ecx, eax
movzx eax, byte [esi + ecx]
or eax, edx
mov byte [esi + ecx], 0
shl eax, 8
inc ecx
cmp ecx, 0xf
mov edx, eax
jne 0x6b58fea0
jmp 0x6b58feb9
xor eax, eax
movzx ecx, byte [esi + 0xf]
or ecx, eax
mov byte [esi + 0xf], 1
mov eax, 0xffffffff
cmp ecx, edi
jne 0x6b59007f
mov ebx, edi
lea ecx, [edi + 0xf]
shr ecx, 3
or ecx, 1
mov edx, dword [esi + 0x24]
add ecx, dword [esi + 0x20]
adc edx, 0
mov dword [esi + 0x20], ecx
mov dword [esi + 0x24], edx
mov eax, 0xfffffffe
neg ecx
mov ecx, 0x20000000
sbb ecx, edx
jb 0x6b59007f
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
cmp ebx, 0x10
mov dword [esp + 0x14], eax
jb 0x6b58ffcd
lea eax, [esi + 0x10]
mov dword [esp + 0x30], eax
jmp 0x6b58ff60
mov eax, dword [edi]
mov ecx, dword [edi + 4]
xor eax, dword [esp + 0x18]
xor ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov dword [edx + 4], ecx
mov dword [edx], eax
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0xc]
xor eax, dword [esp + 0x20]
xor ecx, dword [esp + 0x24]
mov dword [edx + 0xc], ecx
mov dword [edx + 8], eax
add edi, 0x10
add edx, 0x10
mov dword [esp + 0x14], edx
mov ebx, dword [esp + 0x10]
add ebx, 0xfffffff0
cmp ebx, 0xf
jbe 0x6b58ffcd
mov dword [esp + 0x10], ebx
mov eax, dword [edi]
mov ecx, dword [edi + 4]
xor dword [esi + 0x10], eax
xor dword [esi + 0x14], ecx
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0xc]
xor dword [esi + 0x18], eax
xor dword [esi + 0x1c], ecx
push dword [esp + 8]
mov eax, dword [esp + 0x34]
push eax
push eax
mov ebx, dword [esp + 0x18]
call ebx
add esp, 0xc
push dword [esp + 8]
lea eax, [esp + 0x1c]
push eax
push esi
call ebx
add esp, 0xc
mov eax, 7
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esi + eax + 8]
inc cl
mov byte [esi + eax + 8], cl
sub eax, 1
jb 0x6b58ff20
test cl, cl
je 0x6b58ffb0
jmp 0x6b58ff20
test ebx, ebx
je 0x6b590030
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [edi + eax]
xor byte [esi + eax + 0x10], cl
inc eax
cmp ebx, eax
jne 0x6b58ffe0
lea eax, [esi + 0x10]
push dword [esp + 8]
push eax
push eax
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x18]
call ebx
add esp, 0xc
lea eax, [esp + 0x18]
push dword [esp + 8]
push eax
push esi
call ebx
mov edx, dword [esp + 0x1c]
add esp, 0xc
xor eax, eax
mov ebx, dword [esp + 0x14]
movzx ecx, byte [edi + eax]
xor cl, byte [esp + eax + 0x18]
mov byte [ebx + eax], cl
inc eax
cmp eax, edx
jb 0x6b590020
mov edx, dword [esp + 0x2c]
lea eax, [esi + edx]
mov ecx, 0x10
sub ecx, edx
push ecx
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [esp + 0x18]
push dword [esp + 8]
push eax
push esi
call dword [esp + 0x18]
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
xor dword [esi + 0x14], ecx
xor dword [esi + 0x10], eax
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
xor dword [esi + 0x18], ecx
xor dword [esi + 0x1c], eax
mov al, byte [esp + 7]
mov byte [esi], al
xor eax, eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret