Function at 0x462990
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
sub esp, 0x9c
push esi
mov esi, dword [esp + 0xa8]
lea eax, [esp + 0x3c]
push eax
push ecx
push esi
push edx
call fcn.0048a000
add esp, 0x10
test eax, eax
je 0x4629c7
mov eax, 1
pop esi
add esp, 0x9c
ret
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x44]
push ebx
mov ebx, dword [esp + 0x58]
mov ecx, dword [esp + 0x50]
sub edx, ebx
mov dword [esp + 8], edx
mov edx, dword [esi + 0xc]
mov esi, dword [esp + 0xb4]
imul eax, edx
mov esi, dword [esi + 0xc]
push ebp
mov ebp, dword [esp + 0x48]
mov dword [esp + 0x10], esi
lea esi, [eax + ebp*4]
mov eax, dword [esp + 0xb0]
add esi, dword [eax + 8]
mov eax, dword [esp + 0x10]
imul eax, ebx
push edi
mov edi, dword [esp + 0x5c]
mov dword [esp + 0xa8], ecx
mov ecx, dword [esp + 0x64]
sub ecx, edi
lea edi, [eax + edi*4]
mov eax, dword [esp + 0xbc]
mov ebx, dword [eax + 8]
mov al, byte [esp + 0x48]
add edi, ebx
test al, al
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], edx
je 0x462c8a
mov eax, ecx
sar eax, 3
mov dword [esp + 0x24], eax
mov eax, ecx
and eax, 7
mov ebx, eax
sub ebx, dword [esp + 0x54]
mov dword [esp + 0x18], eax
add ebx, ebp
lea edx, [edx + ebx*4]
mov dword [esp + 0x1c], edx
mov edx, eax
sub edx, ecx
test eax, eax
mov ecx, dword [esp + 0x14]
lea edx, [ecx + edx*4]
mov dword [esp + 0x20], edx
jne 0x462b2d
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x462d8c
mov ebx, dword [esp + 0xc0]
mov dword [esp + 0x14], eax
nop
mov ebp, dword [esp + 0x24]
test ebp, ebp
jle 0x462b05
push ebx
push esi
mov ecx, edi
call fcn.00461e70
push ebx
lea eax, [esi + 4]
push eax
lea ecx, [edi + 4]
call fcn.00461e70
push ebx
lea ecx, [esi + 8]
push ecx
lea ecx, [edi + 8]
call fcn.00461e70
push ebx
lea edx, [esi + 0xc]
push edx
lea ecx, [edi + 0xc]
call fcn.00461e70
push ebx
lea eax, [esi + 0x10]
push eax
lea ecx, [edi + 0x10]
call fcn.00461e70
push ebx
lea ecx, [esi + 0x14]
push ecx
lea ecx, [edi + 0x14]
call fcn.00461e70
push ebx
lea edx, [esi + 0x18]
push edx
lea ecx, [edi + 0x18]
call fcn.00461e70
push ebx
lea eax, [esi + 0x1c]
push eax
lea ecx, [edi + 0x1c]
call fcn.00461e70
add edi, 0x20
add esi, 0x20
dec ebp
jne 0x462a98
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
add edi, edx
add esi, ecx
dec eax
mov dword [esp + 0x14], eax
jne 0x462a90
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x9c
ret
mov ecx, dword [esp + 0x10]
test ecx, ecx
jle 0x462d8c
mov ebx, dword [esp + 0xc0]
mov dword [esp + 0x14], ecx
mov ebp, dword [esp + 0x24]
test ebp, ebp
jle 0x462bc1
lea esp, [esp]
push ebx
push esi
mov ecx, edi
call fcn.00461e70
push ebx
lea ecx, [esi + 4]
push ecx
lea ecx, [edi + 4]
call fcn.00461e70
push ebx
lea edx, [esi + 8]
push edx
lea ecx, [edi + 8]
call fcn.00461e70
push ebx
lea eax, [esi + 0xc]
push eax
lea ecx, [edi + 0xc]
call fcn.00461e70
push ebx
lea ecx, [esi + 0x10]
push ecx
lea ecx, [edi + 0x10]
call fcn.00461e70
push ebx
lea edx, [esi + 0x14]
push edx
lea ecx, [edi + 0x14]
call fcn.00461e70
push ebx
lea eax, [esi + 0x18]
push eax
lea ecx, [edi + 0x18]
call fcn.00461e70
push ebx
lea ecx, [esi + 0x1c]
push ecx
lea ecx, [edi + 0x1c]
call fcn.00461e70
add edi, 0x20
add esi, 0x20
dec ebp
jne 0x462b50
mov eax, dword [esp + 0x18]
xor ecx, ecx
test eax, eax
mov dword [esp + 0x10], ecx
jle 0x462c62
mov ebp, esi
sub ebp, edi
lea eax, [edi + 2]
mov dword [esp + 0x28], ebp
lea ebx, [ebx]
mov edx, dword [eax - 2]
xor edx, dword [esi + ecx*4]
test edx, 0xffffff
je 0x462c50
movzx edx, byte [eax + ebp]
movzx ebp, byte [eax]
xor ecx, ecx
mov ch, bl
mov dl, byte [edx + ecx + 0x53a3e8]
add dl, byte [ecx + ebp + 0x52a3e8]
movzx ebp, byte [eax - 1]
mov byte [eax], dl
mov edx, dword [esp + 0x10]
movzx edx, byte [esi + edx*4 + 1]
mov dl, byte [edx + ecx + 0x53a3e8]
add dl, byte [ecx + ebp + 0x52a3e8]
movzx ebp, byte [eax - 2]
mov byte [eax - 1], dl
mov edx, dword [esp + 0x10]
movzx edx, byte [esi + edx*4]
mov dl, byte [edx + ecx + 0x53a3e8]
add dl, byte [ecx + ebp + 0x52a3e8]
mov ecx, dword [esp + 0x10]
mov ebp, dword [esp + 0x28]
mov byte [eax - 2], dl
mov byte [eax + 1], 0
mov edx, dword [esp + 0x18]
inc ecx
add eax, 4
cmp ecx, edx
mov dword [esp + 0x10], ecx
jl 0x462be0
mov eax, edx
mov ebp, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
add edi, ebp
add esi, edx
dec ecx
mov dword [esp + 0x14], ecx
jne 0x462b44
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x9c
ret
mov ebx, dword [esp + 0x7c]
mov eax, dword [esp + 0x88]
mov ebp, dword [esp + 0x8c]
mov dword [esp + 0x2c], ebx
mov ebx, dword [esp + 0x80]
shl eax, 2
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x90]
mov dword [esp + 0x44], eax
mov eax, edx
imul eax, dword [esp + 0x98]
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x84]
mov dword [esp + 0x38], ebx
mov ebx, dword [esp + 0x94]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x10]
test ebx, ebx
mov dword [esp + 0x3c], eax
jle 0x462d8c
mov dword [esp + 0x20], ebx
jmp 0x462d00
mov ebp, dword [esp + 0x1c]
jmp 0x462d00
add ebp, dword [esp + 0x28]
mov dword [esp + 0x1c], ebp
js 0x462d16
mov ebx, dword [esp + 0x24]
add esi, edx
sub ebp, ebx
mov dword [esp + 0x1c], ebp
test ecx, ecx
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], ebx
jle 0x462d71
mov ebx, edi
mov ebp, ecx
lea ebx, [ebx]
mov eax, dword [esp + 0x18]
add eax, dword [esp + 0x40]
mov dword [esp + 0x18], eax
js 0x462d4b
mov ecx, dword [esp + 0x38]
add esi, 4
sub eax, ecx
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0xc0]
push ecx
push esi
mov ecx, ebx
call fcn.00461e70
add esi, dword [esp + 0x44]
add ebx, 4
dec ebp
jne 0x462d30
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x3c]
mov esi, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x20]
add esi, eax
add edi, ebp
dec ebx
mov dword [esp + 0x20], ebx
jne 0x462cf3
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x9c
ret