Function at 0x46943d
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x474
push ebx
push esi
push edi
xor ebx, ebx
push ebx
mov dword [ebp - 0x14], ebx
call dword [0x522798]
push 0x42c
mov dword [ebp - 4], eax
lea eax, [ebp - 0x474]
push ebx
push eax
call fcn.0050d720
mov edi, dword [ebp + 8]
mov esi, dword [0x522180]
add esp, 0xc
push ebx
lea eax, [ebp - 0x474]
push eax
push ebx
push ebx
push ebx
push dword [edi + 4]
mov dword [ebp - 0x474], 0x28
push dword [ebp - 4]
call esi
cmp word [ebp - 0x466], 0x20
je 0x469769
cmp word [ebp - 0x466], 8
jne 0x46960d
mov eax, dword [ebp - 0x460]
cmp eax, 1
mov dword [ebp - 0x10], eax
jb 0x4698ac
push eax
call fcn.005084c0
push dword [ebp - 0x10]
mov dword [ebp + 8], eax
push ebx
push eax
call fcn.0050d720
add esp, 0x10
push ebx
lea eax, [ebp - 0x474]
push eax
push dword [ebp + 8]
push dword [ebp - 0x46c]
push ebx
push dword [edi + 4]
push dword [ebp - 4]
call esi
push 0x2c
pop esi
push esi
lea eax, [ebp - 0x48]
push ebx
push eax
call fcn.0050d720
mov eax, dword [ebp - 0x470]
add esp, 0xc
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x46c]
push ebx
push ebx
mov dword [ebp - 0x40], eax
lea eax, [ebp - 8]
push eax
push ebx
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 4]
mov dword [ebp - 0x48], esi
mov word [ebp - 0x3c], 1
mov word [ebp - 0x3a], 0x20
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 8], ebx
call dword [0x522174]
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x469605
cmp dword [ebp - 8], ebx
je 0x469605
push eax
push dword [ebp - 4]
call dword [0x522104]
movzx ecx, word [ebp - 0x466]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x460]
xor edx, edx
shr ecx, 3
div ecx
xor edx, edx
cmp eax, ebx
mov dword [ebp - 0x10], eax
jbe 0x4695ca
mov eax, dword [ebp + 8]
movzx ecx, byte [edx + eax]
mov eax, dword [ebp - 8]
lea ecx, [ebp + ecx*4 - 0x44c]
cmp byte [ecx], 0xc0
lea esi, [eax + edx*4]
jne 0x4695b0
cmp byte [ecx + 1], 0xc0
jne 0x4695b0
cmp byte [ecx + 2], 0xc0
jne 0x4695b0
mov byte [esi], bl
mov byte [esi + 1], bl
mov byte [esi + 2], bl
mov byte [esi + 3], bl
jmp 0x4695c4
mov byte [esi + 3], 0xff
mov al, byte [ecx + 2]
mov byte [esi + 2], al
mov al, byte [ecx + 1]
mov byte [esi + 1], al
mov al, byte [ecx]
mov byte [esi], al
inc edx
cmp edx, dword [ebp - 0x10]
jb 0x46957e
push dword [ebp - 0xc]
push dword [ebp - 4]
call dword [0x522104]
push dword [ebp + 8]
call fcn.0050853a
pop ecx
push dword [ebp - 4]
push ebx
call dword [0x5225a0]
mov esi, dword [ebp - 0x14]
cmp esi, ebx
je 0x4698ac
push dword [edi + 4]
call dword [0x5220e8]
mov dword [edi + 4], esi
jmp 0x4698ac
push dword [ebp + 8]
jmp 0x46989c
cmp word [ebp - 0x466], 0x18
jne 0x4695df
call fcn.00446685
test al, al
je 0x4695df
mov edi, dword [ebp - 0x460]
cmp edi, 1
jb 0x4698ac
xor ecx, ecx
push 3
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.005084c0
imul edi, edi, 3
push edi
push ebx
push eax
mov dword [ebp - 8], eax
call fcn.0050d720
mov edi, dword [ebp - 4]
add esp, 0x10
push ebx
lea eax, [ebp - 0x474]
push eax
push dword [ebp - 8]
mov eax, dword [ebp + 8]
push dword [ebp - 0x46c]
push ebx
push dword [eax + 4]
push edi
call esi
push 0x2c
pop esi
push esi
lea eax, [ebp - 0x48]
push ebx
push eax
call fcn.0050d720
mov eax, dword [ebp - 0x470]
add esp, 0xc
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x46c]
push ebx
push ebx
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0xc]
push eax
push ebx
lea eax, [ebp - 0x48]
push eax
push edi
mov dword [ebp - 0x48], esi
mov word [ebp - 0x3c], 1
mov word [ebp - 0x3a], 0x20
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0xc], ebx
call dword [0x522174]
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x46975a
cmp dword [ebp - 0xc], ebx
je 0x46975a
push eax
push edi
mov edi, dword [0x522104]
call edi
movzx ecx, word [ebp - 0x466]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x460]
xor edx, edx
shl eax, 3
div ecx
xor edx, edx
cmp eax, ebx
mov dword [ebp - 0x10], eax
jbe 0x469741
mov esi, dword [ebp - 8]
inc esi
cmp byte [esi - 1], bl
mov eax, dword [ebp - 0xc]
lea ecx, [eax + edx*4]
jne 0x469724
cmp byte [esi], bl
jne 0x469724
cmp byte [esi + 1], bl
jne 0x469724
mov byte [ecx + 3], bl
mov byte [ecx + 2], bl
mov byte [ecx + 1], bl
mov byte [ecx], bl
jmp 0x469738
mov byte [ecx + 3], 0xff
mov al, byte [esi + 1]
mov byte [ecx + 2], al
mov al, byte [esi]
mov byte [ecx + 1], al
mov al, byte [esi - 1]
mov byte [ecx], al
inc edx
add esi, 3
cmp edx, dword [ebp - 0x10]
jb 0x469703
push dword [ebp - 0x18]
push dword [ebp - 4]
call edi
push dword [ebp - 8]
call fcn.0050853a
mov edi, dword [ebp + 8]
pop ecx
jmp 0x4695df
push dword [ebp - 8]
call fcn.0050853a
pop ecx
push edi
jmp 0x4698a5
mov eax, dword [ebp - 0x460]
cmp eax, 4
mov dword [ebp - 0x18], eax
jb 0x4698ac
push eax
call fcn.005084c0
push dword [ebp - 0x18]
mov dword [ebp - 8], eax
push ebx
push eax
call fcn.0050d720
add esp, 0x10
push ebx
lea eax, [ebp - 0x474]
push eax
push dword [ebp - 8]
push dword [ebp - 0x46c]
push ebx
push dword [edi + 4]
push dword [ebp - 4]
call esi
push ebx
push ebx
lea eax, [ebp - 0x1c]
push eax
push ebx
lea eax, [ebp - 0x474]
push eax
push dword [ebp - 4]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x464], ebx
call dword [0x522174]
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x469899
cmp dword [ebp - 0x1c], ebx
je 0x469899
push eax
push dword [ebp - 4]
call dword [0x522104]
movzx ecx, word [ebp - 0x466]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x460]
shr ecx, 3
xor edx, edx
div ecx
cmp eax, ebx
jbe 0x469864
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc], 0xfffffffd
sub dword [ebp - 0xc], edx
lea ecx, [edx + 3]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x1c]
lea esi, [ecx + eax]
add esi, dword [ebp - 0xc]
mov al, byte [ecx]
mov byte [esi + 3], al
movzx edx, byte [ecx]
movzx eax, byte [ecx - 1]
imul eax, edx
cdq
mov edi, 0xff
idiv edi
mov byte [esi + 2], al
movzx edx, byte [ecx]
movzx eax, byte [ecx - 2]
imul eax, edx
cdq
idiv edi
mov byte [esi + 1], al
movzx edx, byte [ecx]
movzx eax, byte [ecx - 3]
imul eax, edx
cdq
idiv edi
add ecx, 4
dec dword [ebp - 0x10]
mov byte [esi], al
jne 0x469817
mov edi, dword [ebp + 8]
push dword [ebp - 0x18]
push dword [ebp - 4]
call dword [0x522104]
push dword [ebp - 8]
call fcn.0050853a
pop ecx
push dword [ebp - 4]
push ebx
call dword [0x5225a0]
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x4698ac
push eax
call dword [0x5220e8]
mov eax, dword [ebp - 0x14]
mov dword [edi + 4], eax
jmp 0x4698ac
push dword [ebp - 8]
call fcn.0050853a
pop ecx
push dword [ebp - 4]
push ebx
call dword [0x5225a0]
pop edi
pop esi
pop ebx
leave
ret 4