Function at 0x4f1170
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
cmp dword [ecx], 0
push edi
mov edi, edx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], edi
je 0x4f118e
mov eax, 0xfffffffb
pop edi
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [ecx + 4]
cmp esi, 2
je 0x4f11a8
cmp dword [ecx + 8], 0
jne 0x4f11a8
pop esi
mov eax, 0xfffffffa
pop edi
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x4f14d6
mov eax, dword [ebp + 8]
test eax, eax
jle 0x4f14d6
cdq
and edx, 0x7f
add edx, eax
sar edx, 7
mov dword [ebp - 0x1c], edx
push ebx
sub esi, 0
je 0x4f14a3
dec esi
je 0x4f1411
dec esi
je 0x4f11e5
pop ebx
pop esi
or eax, 0xffffffff
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x30], eax
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0x2c], eax
mov eax, dword [ecx + 0x14]
mov dword [ebp - 0x28], eax
mov eax, dword [ecx + 0x18]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edx
test edx, edx
jle 0x4f14ca
mov al, byte [ebp - 0x21]
mov byte [ebp - 0x10], al
mov al, byte [ebp - 0x22]
mov byte [ebp - 0xf], al
mov al, byte [ebp - 0x23]
mov byte [ebp - 0xe], al
mov al, byte [ebp - 0x24]
mov byte [ebp - 0xd], al
mov al, byte [ebp - 0x25]
mov byte [ebp - 0xc], al
mov al, byte [ebp - 0x26]
mov byte [ebp - 0xb], al
mov al, byte [ebp - 0x27]
mov byte [ebp - 0xa], al
mov al, byte [ebp - 0x28]
mov byte [ebp - 9], al
mov al, byte [ebp - 0x29]
mov byte [ebp - 8], al
mov al, byte [ebp - 0x2a]
mov byte [ebp - 7], al
mov al, byte [ebp - 0x2b]
mov byte [ebp - 6], al
mov al, byte [ebp - 0x2c]
mov byte [ebp - 5], al
mov al, byte [ebp - 0x2d]
mov byte [ebp - 4], al
mov al, byte [ebp - 0x2e]
mov byte [ebp - 3], al
mov al, byte [ebp - 0x2f]
mov byte [ebp - 2], al
mov al, byte [ebp - 0x30]
mov byte [ebp - 1], al
xor ebx, ebx
mov dword [ebp - 0x18], ebx
lea ecx, [ecx]
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x40]
push eax
mov edx, eax
call fcn.004f17b0
mov dl, byte [ebp - 2]
add esp, 4
mov cl, byte [ebp - 1]
mov al, dl
shr al, 7
add cl, cl
or cl, al
add dl, dl
mov byte [ebp - 1], cl
mov byte [ebp - 0x30], cl
mov cl, byte [ebp - 3]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [ebp - 2], dl
mov byte [ebp - 0x2f], dl
mov dl, byte [ebp - 4]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [ebp - 3], cl
mov byte [ebp - 0x2e], cl
mov cl, byte [ebp - 5]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [ebp - 4], dl
mov byte [ebp - 0x2d], dl
mov dl, byte [ebp - 6]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [ebp - 5], cl
mov byte [ebp - 0x2c], cl
mov cl, byte [ebp - 7]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [ebp - 6], dl
mov byte [ebp - 0x2b], dl
mov dl, byte [ebp - 8]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [ebp - 7], cl
mov byte [ebp - 0x2a], cl
mov cl, byte [ebp - 9]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [ebp - 8], dl
mov byte [ebp - 0x29], dl
mov dl, byte [ebp - 0xa]
mov al, dl
shr al, 7
or cl, al
mov byte [ebp - 9], cl
mov byte [ebp - 0x28], cl
mov cl, byte [ebp - 0xb]
mov al, cl
shr al, 7
add dl, dl
or dl, al
mov ch, byte [ebp - 0x10]
mov byte [ebp - 0xa], dl
add cl, cl
mov byte [ebp - 0x27], dl
and bl, 7
mov dl, byte [ebp - 0xc]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [ebp - 0xb], cl
mov byte [ebp - 0x26], cl
mov cl, byte [ebp - 0xd]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov byte [ebp - 0xc], dl
mov byte [ebp - 0x25], dl
mov dl, byte [ebp - 0xe]
mov al, dl
add dl, dl
shr al, 7
or cl, al
mov byte [ebp - 0xd], cl
mov byte [ebp - 0x24], cl
mov cl, byte [ebp - 0xf]
mov al, cl
add cl, cl
shr al, 7
or dl, al
mov al, ch
shr al, 7
add ch, ch
or cl, al
mov byte [ebp - 0xe], dl
mov eax, dword [ebp - 0x18]
mov byte [ebp - 0x23], dl
cdq
and edx, 7
mov byte [ebp - 0xf], cl
mov byte [ebp - 0x22], cl
mov cl, 7
sub cl, bl
lea esi, [edx + eax]
mov al, byte [ebp - 0x40]
sar esi, 3
and al, 0x80
movzx edx, byte [esi + edi]
shr dl, cl
mov cl, bl
mov ebx, dword [ebp - 0x18]
and dl, 1
or ch, dl
shr al, cl
mov byte [ebp - 0x10], ch
inc ebx
mov byte [ebp - 0x21], ch
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x18], ebx
xor byte [esi + ecx], al
mov ecx, dword [ebp - 0x14]
cmp ebx, 0x80
jl 0x4f1270
mov eax, dword [ebp - 0x20]
dec eax
mov dword [ebp - 0x20], eax
test eax, eax
jg 0x4f1268
mov edx, dword [ebp - 0x1c]
pop ebx
shl edx, 7
pop esi
mov eax, edx
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x30], eax
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0x2c], eax
mov eax, dword [ecx + 0x14]
mov dword [ebp - 0x28], eax
mov eax, dword [ecx + 0x18]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edx
test edx, edx
jle 0x4f14ca
mov ebx, dword [ebp - 0x18]
lea eax, [ebp - 0x30]
mov edi, dword [ebp + 0xc]
mov esi, ebx
sub esi, eax
lea eax, [ebp - 0x40]
mov edx, ebx
push eax
call fcn.004f1b90
movdqu xmm1, xmmword [ebp - 0x40]
add esp, 4
xor eax, eax
movdqu xmm0, xmmword [ebp - 0x30]
pxor xmm1, xmm0
movdqu xmmword [ebp - 0x40], xmm1
lea edx, [ebp - 0x30]
add edx, eax
mov ecx, dword [esi + edx]
mov dword [edx], ecx
mov ecx, dword [ebp + eax - 0x40]
mov dword [edi + eax], ecx
add eax, 4
cmp eax, 0x10
jl 0x4f1464
mov eax, dword [ebp - 0x20]
add ebx, 0x10
mov ecx, dword [ebp - 0x14]
dec eax
add esi, 0x10
mov dword [ebp - 0x20], eax
add edi, 0x10
test eax, eax
jg 0x4f1441
mov edx, dword [ebp - 0x1c]
pop ebx
shl edx, 7
pop esi
mov eax, edx
pop edi
mov esp, ebp
pop ebp
ret
mov ebx, edx
test edx, edx
jle 0x4f14ca
mov esi, dword [ebp + 0xc]
sub edi, esi
mov edi, edi
push esi
lea edx, [edi + esi]
call fcn.004f1b90
mov ecx, dword [ebp - 0x14]
dec ebx
add esp, 4
add esi, 0x10
test ebx, ebx
jg 0x4f14b0
mov edx, dword [ebp - 0x1c]
pop ebx
shl edx, 7
pop esi
mov eax, edx
pop edi
mov esp, ebp
pop ebp
ret
pop esi
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret