Function at 0x401960
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov ebx, ecx
push 4
mov dword [ebp - 0xc], ebx
call fcn.00cfa594
mov esi, eax
push 4
mov dword [ebp - 8], esi
call fcn.00cfa594
mov ecx, dword [ebx + 4]
add esp, 8
shl ecx, 2
mov edx, eax
xor edi, edi
mov dword [ebp - 4], edx
test ecx, ecx
jle 0x4019b7
mov esi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
sub esi, ecx
nop dword [eax]
mov al, byte [esi + ecx]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
inc edi
mov eax, dword [ebx + 4]
shl eax, 2
cmp edi, eax
jl 0x4019a0
mov esi, dword [ebp - 8]
mov eax, dword [ebx + 8]
mov edi, dword [ebx + 4]
inc eax
imul eax, dword [ebx]
shl edi, 2
shl eax, 2
cmp edi, eax
jge 0x401bc4
mov ecx, dword [ebp + 0xc]
movzx eax, byte [ecx + edi - 4]
mov byte [esi], al
movzx eax, byte [ecx + edi - 3]
mov byte [esi + 1], al
movzx eax, byte [ecx + edi - 2]
mov byte [esi + 2], al
movzx eax, byte [ecx + edi - 1]
mov byte [esi + 3], al
mov eax, edi
mov ecx, dword [ebx + 4]
cdq
and edx, 3
add eax, edx
sar eax, 2
cdq
idiv ecx
test edx, edx
jne 0x401ae2
movzx eax, byte [esi + 1]
mov bl, 1
mov cl, byte [esi]
mov byte [esi], al
movzx eax, byte [esi + 2]
mov byte [esi + 1], al
movzx eax, byte [esi + 3]
mov byte [esi + 2], al
mov byte [esi + 3], cl
movzx ecx, byte [esi]
mov eax, ecx
and ecx, 0xf
and eax, 0xfffffff0
movzx eax, byte [eax + ecx + str.cw]
movzx ecx, byte [esi + 1]
mov byte [esi], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0xf
movzx eax, byte [eax + ecx + str.cw]
movzx ecx, byte [esi + 2]
mov byte [esi + 1], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0xf
movzx eax, byte [eax + ecx + str.cw]
movzx ecx, byte [esi + 3]
mov byte [esi + 2], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0xf
movzx eax, byte [eax + ecx + str.cw]
mov ecx, dword [ebp - 0xc]
mov byte [esi + 3], al
mov eax, edi
cdq
mov ecx, dword [ecx + 4]
shl ecx, 2
idiv ecx
dec eax
mov dword [ebp + 8], eax
test eax, eax
jle 0x401ab4
mov esi, eax
mov dl, bl
add dl, dl
mov al, dl
xor al, 0x1b
test bl, bl
movzx ecx, al
movzx eax, dl
cmovns ecx, eax
mov bl, cl
sub esi, 1
jne 0x401a97
mov esi, dword [ebp - 8]
mov edx, dword [ebp - 4]
movzx eax, bl
mov byte [edx], bl
mov ebx, dword [ebp - 0xc]
mov word [edx + 2], 0
mov byte [edx + 1], 0
xor byte [esi], al
movzx eax, byte [edx + 1]
xor byte [esi + 1], al
movzx eax, byte [edx + 2]
xor byte [esi + 2], al
movzx eax, byte [edx + 3]
xor byte [esi + 3], al
jmp 0x401b4e
cmp ecx, 6
jle 0x401b4b
cmp edx, 4
mov edx, dword [ebp - 4]
jne 0x401b4e
movzx ecx, byte [esi]
mov eax, ecx
and ecx, 0xf
and eax, 0xfffffff0
movzx eax, byte [eax + ecx + str.cw]
movzx ecx, byte [esi + 1]
mov byte [esi], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0xf
movzx eax, byte [eax + ecx + str.cw]
movzx ecx, byte [esi + 2]
mov byte [esi + 1], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0xf
movzx eax, byte [eax + ecx + str.cw]
movzx ecx, byte [esi + 3]
mov byte [esi + 2], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0xf
movzx eax, byte [eax + ecx + str.cw]
mov byte [esi + 3], al
jmp 0x401b4e
mov edx, dword [ebp - 4]
mov ecx, dword [ebx + 4]
mov eax, edi
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
movzx eax, byte [eax + ecx]
xor al, byte [esi]
mov byte [ecx + edi], al
mov eax, edi
mov ecx, dword [ebx + 4]
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
movzx eax, byte [eax + ecx + 1]
xor al, byte [esi + 1]
mov byte [ecx + edi + 1], al
mov eax, edi
mov ecx, dword [ebx + 4]
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
movzx eax, byte [eax + ecx + 2]
xor al, byte [esi + 2]
mov byte [ecx + edi + 2], al
mov eax, edi
mov ecx, dword [ebx + 4]
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
movzx eax, byte [eax + ecx + 3]
xor al, byte [esi + 3]
mov byte [ecx + edi + 3], al
add edi, 4
mov eax, dword [ebx + 8]
inc eax
imul eax, dword [ebx]
shl eax, 2
cmp edi, eax
jl 0x4019d2
push edx
call fcn.00cfa59d
push esi
call fcn.00cfa59d
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8