Function at 0x498df0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x24
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [sym.imp.libssp_0.dll___stack_chk_guard]
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 0x18], 0
jmp 0x498e4a
mov eax, dword [ebp - 0x18]
sar eax, 3
mov edx, eax
mov eax, dword [ebp - 0x20]
add eax, edx
movzx eax, byte [eax]
movzx edx, al
mov eax, dword [ebp - 0x18]
and eax, 7
mov ecx, eax
sar edx, cl
mov eax, edx
mov ecx, eax
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, edx
and ecx, 1
mov edx, ecx
mov byte [eax], dl
add dword [ebp - 0x18], 1
cmp dword [ebp - 0x18], 0xff
jle 0x498e16
mov dword [ebp - 0x18], 0
jmp 0x498fee
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx eax, byte [eax]
test al, al
je 0x498fea
mov dword [ebp - 0x14], 1
jmp 0x498fce
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, edx
mov edx, eax
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx eax, byte [eax]
test al, al
je 0x498fca
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx eax, byte [eax]
movsx edx, al
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, ecx
mov ecx, eax
mov eax, dword [ebp - 0x1c]
add eax, ecx
movzx eax, byte [eax]
movsx ebx, al
mov eax, dword [ebp - 0x14]
mov ecx, eax
shl ebx, cl
mov eax, ebx
add eax, edx
cmp eax, 0xf
jg 0x498f19
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx edx, byte [eax]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, ecx
mov ecx, eax
mov eax, dword [ebp - 0x1c]
add eax, ecx
movzx eax, byte [eax]
movsx ebx, al
mov eax, dword [ebp - 0x14]
mov ecx, eax
shl ebx, cl
mov eax, ebx
mov ebx, eax
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, ecx
add edx, ebx
mov byte [eax], dl
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, edx
mov edx, eax
mov eax, dword [ebp - 0x1c]
add eax, edx
mov byte [eax], 0
jmp 0x498fca
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx eax, byte [eax]
movsx edx, al
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, ecx
mov ecx, eax
mov eax, dword [ebp - 0x1c]
add eax, ecx
movzx eax, byte [eax]
movsx ebx, al
mov eax, dword [ebp - 0x14]
mov ecx, eax
shl ebx, cl
mov eax, ebx
sub edx, eax
mov eax, edx
cmp eax, 0xfffffff1
jl 0x498fe9
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx edx, byte [eax]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, ecx
mov ecx, eax
mov eax, dword [ebp - 0x1c]
add eax, ecx
movzx eax, byte [eax]
movsx ebx, al
mov eax, dword [ebp - 0x14]
mov ecx, eax
shl ebx, cl
mov eax, ebx
mov ebx, eax
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, ecx
sub edx, ebx
mov byte [eax], dl
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, edx
mov dword [ebp - 0x10], eax
jmp 0x498fc1
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx eax, byte [eax]
test al, al
jne 0x498fb2
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
add eax, edx
mov byte [eax], 1
jmp 0x498fca
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
add eax, edx
mov byte [eax], 0
add dword [ebp - 0x10], 1
cmp dword [ebp - 0x10], 0xff
jle 0x498f96
add dword [ebp - 0x14], 1
cmp dword [ebp - 0x14], 6
jg 0x498fea
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, edx
cmp eax, 0xff
jle 0x498e7e
jmp 0x498fea
nop
add dword [ebp - 0x18], 1
cmp dword [ebp - 0x18], 0xff
jle 0x498e5f
nop
mov eax, dword [ebp - 0xc]
xor eax, dword [sym.imp.libssp_0.dll___stack_chk_guard]
je 0x49900c
call sub.libssp_0.dll___stack_chk_fail
add esp, 0x24
pop ebx
pop ebp
ret