Function at 0x475380
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
sub esp, 0x9c
push ebx
mov ebx, dword [esp + 0xa8]
lea eax, [esp + 0x3c]
push eax
push ecx
push ebx
push edx
call fcn.0048a000
add esp, 0x10
test eax, eax
je 0x4753b7
mov eax, 1
pop ebx
add esp, 0x9c
ret
mov ecx, dword [esp + 0x5c]
push ebp
mov ebp, dword [esp + 0x44]
push esi
mov esi, dword [esp + 0x4c]
mov eax, dword [esp + 0x54]
push edi
mov edi, dword [esp + 0x60]
mov edx, dword [esp + 0x5c]
sub ecx, edi
mov dword [esp + 0x10], ecx
mov ecx, dword [ebx + 0xc]
mov ebx, dword [esp + 0xbc]
imul esi, ecx
mov ebx, dword [ebx + 0xc]
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0xb4]
lea esi, [esi + ebp*4]
add esi, dword [ebx + 8]
mov ebx, dword [esp + 0x14]
imul ebx, edi
mov dword [esp + 0xa8], eax
mov eax, dword [esp + 0x64]
sub eax, edx
lea edi, [ebx + edx*4]
mov edx, dword [esp + 0xbc]
mov ebx, dword [edx + 8]
mov dl, byte [esp + 0x48]
add edi, ebx
test dl, dl
mov dword [esp + 0x2c], eax
mov dword [esp + 0x44], ecx
je 0x47563a
mov edx, eax
sar edx, 3
mov ebx, eax
mov dword [esp + 0x18], edx
and ebx, 7
mov edx, ebx
sub edx, dword [esp + 0x54]
mov dword [esp + 0x20], ebx
add edx, ebp
lea ecx, [ecx + edx*4]
mov edx, ebx
sub edx, eax
test ebx, ebx
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], ecx
lea ecx, [eax + edx*4]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], ecx
jne 0x475509
test eax, eax
jle 0x47572a
mov ebx, dword [esp + 0x18]
mov ebp, eax
lea ebx, [ebx]
test ebx, ebx
jle 0x4754ed
push esi
mov ecx, edi
call fcn.00462760
lea edx, [esi + 4]
push edx
lea ecx, [edi + 4]
call fcn.00462760
lea eax, [esi + 8]
push eax
lea ecx, [edi + 8]
call fcn.00462760
lea ecx, [esi + 0xc]
push ecx
lea ecx, [edi + 0xc]
call fcn.00462760
lea edx, [esi + 0x10]
push edx
lea ecx, [edi + 0x10]
call fcn.00462760
lea eax, [esi + 0x14]
push eax
lea ecx, [edi + 0x14]
call fcn.00462760
lea ecx, [esi + 0x18]
push ecx
lea ecx, [edi + 0x18]
call fcn.00462760
lea edx, [esi + 0x1c]
push edx
lea ecx, [edi + 0x1c]
call fcn.00462760
add edi, 0x20
add esi, 0x20
dec ebx
jne 0x475484
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
add edi, edx
add esi, ecx
dec ebp
jne 0x475480
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x9c
ret
test eax, eax
jle 0x47572a
mov dword [esp + 0x10], eax
mov ebp, dword [esp + 0x18]
test ebp, ebp
jle 0x475585
lea ecx, [ecx]
push esi
mov ecx, edi
call fcn.00462760
lea eax, [esi + 4]
push eax
lea ecx, [edi + 4]
call fcn.00462760
lea ecx, [esi + 8]
push ecx
lea ecx, [edi + 8]
call fcn.00462760
lea edx, [esi + 0xc]
push edx
lea ecx, [edi + 0xc]
call fcn.00462760
lea eax, [esi + 0x10]
push eax
lea ecx, [edi + 0x10]
call fcn.00462760
lea ecx, [esi + 0x14]
push ecx
lea ecx, [edi + 0x14]
call fcn.00462760
lea edx, [esi + 0x18]
push edx
lea ecx, [edi + 0x18]
call fcn.00462760
lea eax, [esi + 0x1c]
push eax
lea ecx, [edi + 0x1c]
call fcn.00462760
add edi, 0x20
add esi, 0x20
dec ebp
jne 0x475520
xor ebp, ebp
test ebx, ebx
jle 0x475612
mov edx, esi
sub edx, edi
lea eax, [edi + 2]
mov dword [esp + 0x24], edx
lea ebx, [ebx]
mov ecx, dword [eax - 2]
xor ecx, dword [esi + ebp*4]
test ecx, 0xffffff
je 0x47560a
movzx ebx, byte [eax]
xor ecx, ecx
mov ch, byte [edx + eax + 1]
movzx edx, byte [edx + eax]
mov dl, byte [edx + ecx + 0x53a3e8]
add dl, byte [ebx + ecx + 0x52a3e8]
movzx ebx, byte [eax - 1]
mov byte [eax], dl
movzx edx, byte [esi + ebp*4 + 1]
mov dl, byte [edx + ecx + 0x53a3e8]
add dl, byte [ebx + ecx + 0x52a3e8]
mov byte [eax - 1], dl
movzx edx, byte [eax - 2]
movzx ebx, byte [esi + ebp*4]
mov dl, byte [edx + ecx + 0x52a3e8]
add dl, byte [ebx + ecx + 0x53a3e8]
mov ebx, dword [esp + 0x20]
mov byte [eax - 2], dl
mov edx, dword [esp + 0x24]
mov byte [eax + 1], 0
inc ebp
add eax, 4
cmp ebp, ebx
jl 0x4755a0
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
add edi, edx
add esi, ecx
dec eax
mov dword [esp + 0x10], eax
jne 0x475515
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x9c
ret
mov ebx, dword [esp + 0x7c]
mov edx, dword [esp + 0x88]
mov ebp, dword [esp + 0x8c]
mov dword [esp + 0x30], ebx
mov ebx, dword [esp + 0x80]
shl edx, 2
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x90]
mov dword [esp + 0x38], edx
mov edx, ecx
imul edx, dword [esp + 0x98]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x84]
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x94]
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x10]
test ebx, ebx
mov dword [esp + 0x34], edx
jle 0x47572a
mov dword [esp + 0x18], ebx
jmp 0x4756b0
mov ebp, dword [esp + 0x1c]
jmp 0x4756b0
add ebp, dword [esp + 0x24]
mov dword [esp + 0x1c], ebp
js 0x4756c6
mov ebx, dword [esp + 0x20]
add esi, ecx
sub ebp, ebx
mov dword [esp + 0x1c], ebp
test eax, eax
mov ebp, dword [esp + 0x30]
mov dword [esp + 0x3c], esi
jle 0x47570f
mov ebx, edi
mov dword [esp + 0x10], eax
add ebp, dword [esp + 0x28]
js 0x4756e7
mov eax, dword [esp + 0x40]
add esi, 4
sub ebp, eax
push esi
mov ecx, ebx
call fcn.00462760
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x10]
add esi, edx
add ebx, 4
dec eax
mov dword [esp + 0x10], eax
jne 0x4756d8
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x34]
mov esi, dword [esp + 0x3c]
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
add esi, edx
add edi, ebp
dec ebx
mov dword [esp + 0x18], ebx
jne 0x4756a3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x9c
ret