Function at 0x4f4140
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
mov ebx, dword [ebp + 8]
xorps xmm0, xmm0
push esi
mov esi, dword [ebp + 0xc]
mov eax, 1
xor cl, cl
mov dword [ebp - 8], 0
push edi
movups xmmword [ebp - 0x3c], xmm0
lea edx, [esi - 1]
movups xmmword [ebp - 0x2c], xmm0
cmp esi, eax
jbe 0x4f41dd
cmp edx, 0x20
jb 0x4f41d1
and edx, 0x1f
mov ecx, esi
sub ecx, edx
xorps xmm1, xmm1
xorps xmm2, xmm2
movups xmm0, xmmword [ebx + eax]
pxor xmm1, xmm0
movups xmm0, xmmword [ebx + eax + 0x10]
add eax, 0x20
pxor xmm2, xmm0
cmp eax, ecx
jb 0x4f4181
pxor xmm1, xmm2
movaps xmm0, xmm1
psrldq xmm0, 8
pxor xmm1, xmm0
movups xmm0, xmm1
psrldq xmm0, 4
pxor xmm1, xmm0
movups xmm0, xmm1
psrldq xmm0, 2
pxor xmm1, xmm0
movups xmm0, xmm1
psrldq xmm0, 1
pxor xmm1, xmm0
movd ecx, xmm1
cmp eax, esi
jae 0x4f41dd
xor cl, byte [eax + ebx]
inc eax
cmp eax, esi
jb 0x4f41d5
test esi, esi
je 0x4f44ca
cmp cl, byte [ebx]
jne 0x4f44ca
push 0x30
push 1
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], 1
call fcn.0051f908
mov edi, eax
add esp, 8
test edi, edi
je 0x4f44ca
call fcn.004fc1a0
mov dword [edi], eax
test eax, eax
je 0x4f44c1
push esi
push ebx
push 0
call fcn.004e9bb0
xor ecx, ecx
mov dword [edi + 0x18], eax
lea eax, [ebp - 0x3c]
or ecx, esi
push 1
push eax
mov dword [edi + 0x1c], ecx
call fcn.004f3f90
add esp, 0x14
test eax, eax
je 0x4f42b5
lea eax, [ebp - 0x3c]
push eax
call fcn.004f4060
inc eax
push eax
mov dword [edi + 8], eax
call fcn.0051d100
add esp, 8
mov dword [edi + 4], eax
test eax, eax
je 0x4f44c1
xor ebx, ebx
cmp dword [edi + 8], ebx
jbe 0x4f42b5
mov esi, dword [ebp - 0x24]
nop
cmp esi, 8
jge 0x4f4294
cmp byte [ebp - 0x20], 0
jne 0x4f4290
lea eax, [ebp - 0x3c]
push 8
push eax
call fcn.004f3ff0
mov esi, dword [ebp - 0x24]
add esp, 8
test al, al
jne 0x4f4294
xor al, al
jmp 0x4f42a7
mov eax, dword [ebp - 0x2c]
sub esi, 8
mov edx, dword [ebp - 0x28]
mov ecx, esi
mov dword [ebp - 0x24], esi
call fcn.005532e0
mov ecx, dword [edi + 4]
mov byte [ebx + ecx], al
inc ebx
cmp ebx, dword [edi + 8]
jb 0x4f4270
jmp 0x4f42c0
mov esi, dword [ebp - 0x24]
nop dword [eax + eax]
cmp byte [ebp - 0x20], 0
jne 0x4f4498
cmp esi, 8
jge 0x4f42e8
lea eax, [ebp - 0x3c]
push 8
push eax
call fcn.004f3ff0
add esp, 8
test al, al
je 0x4f4498
mov esi, dword [ebp - 0x24]
cmp esi, 4
jge 0x4f430c
cmp byte [ebp - 0x20], 0
jne 0x4f4308
lea eax, [ebp - 0x3c]
push 4
push eax
call fcn.004f3ff0
mov esi, dword [ebp - 0x24]
add esp, 8
test al, al
jne 0x4f430c
xor bl, bl
jmp 0x4f4324
mov eax, dword [ebp - 0x2c]
sub esi, 4
mov edx, dword [ebp - 0x28]
mov ecx, esi
mov dword [ebp - 0x24], esi
call fcn.005532e0
mov bl, al
and bl, 0xf
mov byte [ebp + 0xc], bl
mov byte [ebp - 4], 0
mov byte [ebp - 0x18], 0
mov byte [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], 0
test bl, 8
je 0x4f438a
cmp esi, 2
jge 0x4f436a
cmp byte [ebp - 0x20], 0
jne 0x4f4366
lea eax, [ebp - 0x3c]
push 2
push eax
call fcn.004f3ff0
mov esi, dword [ebp - 0x24]
add esp, 8
test al, al
jne 0x4f436a
xor al, al
jmp 0x4f437f
mov eax, dword [ebp - 0x2c]
sub esi, 2
mov edx, dword [ebp - 0x28]
mov ecx, esi
mov dword [ebp - 0x24], esi
call fcn.005532e0
and al, 3
shl bl, 2
or bl, al
sub bl, 0x18
mov byte [ebp + 0xc], bl
mov ebx, dword [ebp + 0xc]
push ebx
call fcn.004fd450
add esp, 4
test al, al
je 0x4f43d4
cmp esi, 1
jge 0x4f43be
cmp byte [ebp - 0x20], 0
jne 0x4f43ba
lea eax, [ebp - 0x3c]
push 1
push eax
call fcn.004f3ff0
mov esi, dword [ebp - 0x24]
add esp, 8
test al, al
jne 0x4f43be
xor al, al
jmp 0x4f43d1
mov eax, dword [ebp - 0x2c]
dec esi
mov edx, dword [ebp - 0x28]
mov ecx, esi
mov dword [ebp - 0x24], esi
call fcn.005532e0
and al, 1
mov byte [ebp - 4], al
push dword [ebp - 4]
push ebx
push dword [edi]
call fcn.004fc1e0
push dword [ebp + 0xc]
mov bl, al
call fcn.004fd430
add esp, 0x10
mov dword [ebp - 0x1c], eax
test bl, bl
je 0x4f446d
cmp eax, 1
jl 0x4f441d
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 8]
lea eax, [ebp - 0x3c]
push dword [ebp - 4]
push dword [ebp + 0xc]
push eax
call fcn.004f4c60
mov esi, dword [ebp - 0x24]
mov bl, al
mov eax, dword [ebp - 0x1c]
add esp, 0x18
test bl, bl
je 0x4f446d
cmp eax, 2
jne 0x4f4447
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push 0xffffffffffffffff
push dword [ebp - 4]
lea eax, [ebp - 0x3c]
push dword [ebp + 0xc]
push eax
call fcn.004f4c60
mov esi, dword [ebp - 0x24]
add esp, 0x18
mov bl, al
test bl, bl
je 0x4f446d
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push dword [edi]
call fcn.004fc2e0
add esp, 0x14
test al, al
je 0x4f446d
inc dword [ebp - 8]
jmp 0x4f42c0
push str.Invalid_RAR_program_instruction
push 0xd0
push 0x5b4274
push 0x5b42b0
call fcn.004e8370
push edi
call fcn.004f4510
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [edi]
call fcn.004fc390
add esp, 4
test al, al
jne 0x4f44b8
push 0
push 0x16
push dword [edi]
call fcn.004fc1e0
add esp, 0xc
test al, al
je 0x4f44c1
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call fcn.004f4510
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret