Function at 0x6b5366c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x40
mov esi, ecx
mov ebx, dword [esp + 0x5c]
mov edi, 1
mov ecx, ebx
shl edi, cl
mov dword [esp], edx
push edx
mov dword [esp + 0x18], esi
push esi
call fcn.6b537550
add esp, 8
test eax, eax
je 0x6b536780
mov esi, dword [esp + 0x58]
mov eax, dword [esp + 0x54]
cmp ebx, 3
mov dword [esp + 4], edi
jg 0x6b536787
cmp dword [esp], 0
jle 0x6b5368ea
mov ecx, esi
xor ecx, 0x80000000
mov edx, dword [esp + 0x14]
mov edx, dword [edx]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 4]
lea edx, [edx*4]
mov dword [esp + 8], edx
xor edx, edx
mov ebx, dword [esp + 4]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + 0x10], edx
xor edi, edi
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, edi
xor edx, esi
dec edx
and edx, ecx
sar edx, 0x1f
and edx, dword [eax + edi*4]
or ebp, edx
inc edi
cmp edi, ebx
jl 0x6b536750
mov edx, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
mov dword [edx + edi*4], ebp
mov edx, edi
inc edx
add eax, dword [esp + 8]
cmp edx, dword [esp]
jne 0x6b536740
jmp 0x6b5368ea
xor eax, eax
jmp 0x6b5368f9
add ebx, 0xfffffffe
mov edx, 1
mov ecx, ebx
shl edx, cl
mov dword [esp + 0x18], edx
mov edx, esi
sar edx, cl
cmp dword [esp], 0
jle 0x6b5368ea
mov ebp, edx
mov edx, 3
mov ecx, ebx
shl edx, cl
cmp ebx, 0x1f
mov ecx, dword [esp + 0x14]
mov ebx, dword [ecx]
jne 0x6b5367d6
mov eax, dword [esp]
lea eax, [eax*4]
push eax
push 0
push ebx
call sub.msvcrt.dll_memset
add esp, 0xc
jmp 0x6b5368ea
mov ecx, dword [esp + 0x18]
lea edi, [ecx - 1]
and edi, esi
mov esi, ebp
mov ecx, ebp
xor ecx, 0x80000000
dec ebp
and ebp, ecx
sar ebp, 0x1f
mov dword [esp + 0x34], ebp
mov ebp, esi
xor ebp, 1
dec ebp
and ebp, ecx
sar ebp, 0x1f
mov dword [esp + 0x30], ebp
mov ebp, esi
xor ebp, 2
dec ebp
and ebp, ecx
sar ebp, 0x1f
mov dword [esp + 0x24], ebp
xor esi, 3
dec esi
and esi, ecx
sar esi, 0x1f
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], edi
xor edi, 0x80000000
mov dword [esp + 0x20], edi
lea ecx, [eax + edx*4]
shl dword [esp + 4], 2
mov esi, dword [esp + 0x18]
lea edx, [eax + esi*8]
lea esi, [eax + esi*4]
xor edi, edi
mov dword [esp + 0x28], ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + 0x1c], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x2c], edi
xor esi, esi
xor ebp, ebp
mov eax, dword [esp + 0x24]
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0xc]
mov ebx, dword [ecx + ebp*4]
and ebx, dword [esp + 0x34]
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + ebp*4]
mov ecx, dword [esp + 8]
mov ecx, dword [ecx + ebp*4]
and ecx, eax
or ecx, ebx
mov ebx, dword [esp + 0x1c]
mov ebx, dword [ebx + ebp*4]
and ebx, dword [esp + 0x3c]
or ebx, ecx
and edx, dword [esp + 0x30]
or ebx, edx
mov ecx, ebp
xor ecx, dword [esp + 0x38]
dec ecx
and ecx, edi
sar ecx, 0x1f
and ecx, ebx
or esi, ecx
inc ebp
cmp ebp, dword [esp + 0x18]
jl 0x6b536870
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
mov dword [ebx + edi*4], esi
inc edi
mov ecx, dword [esp + 4]
mov ebp, dword [esp + 0x1c]
add ebp, ecx
mov edx, dword [esp + 8]
add edx, ecx
mov esi, dword [esp + 0x10]
add esi, ecx
mov eax, dword [esp + 0xc]
add eax, ecx
cmp edi, dword [esp]
mov ecx, ebp
jne 0x6b536850
mov eax, dword [esp]
mov ecx, dword [esp + 0x14]
mov dword [ecx + 4], eax
mov eax, 1
add esp, 0x40
pop esi
pop edi
pop ebx
pop ebp
ret