Function at 0x46bd30
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4c495c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x18d4
call fcn.004a9710
mov eax, dword [0x508e4c]
push ebx
mov ebx, ecx
mov ecx, dword [ebx + 0x88]
push esi
xor eax, ebp
lea esi, [ebx + 0x88]
mov dword [esp + 0x18d8], eax
mov eax, dword [ebp + 8]
push edi
push ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x10], esi
call fcn.004a7d19
mov edx, eax
add esp, 4
test edx, edx
mov dword [esp + 0x20], edx
jne 0x46bd9a
xor al, al
jmp 0x46c1a8
mov ecx, dword [esi]
mov esi, dword [ebx + 0x84]
mov eax, ecx
shr ecx, 2
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0xec]
test eax, eax
jne 0x46bdf7
mov esi, dword [esp + 0xc]
mov eax, dword [esi]
xor ecx, ecx
test eax, eax
jle 0x46bde1
mov al, cl
mov bl, 0x21
imul bl
add al, byte [esi]
mov bl, byte [ecx + edx]
add al, 0x7a
xor bl, al
mov byte [ecx + edx], bl
mov eax, dword [esi]
inc ecx
cmp ecx, eax
jl 0x46bdc8
mov ecx, dword [esp + 0x28]
push esi
push edx
push ecx
call fcn.004487e0
add esp, 0xc
mov bl, al
jmp 0x46c199
mov eax, dword [esp + 0xc]
mov ecx, dword [eax]
mov edi, edx
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebx + 0xf0]
push eax
call fcn.004a7d19
mov ecx, dword [ebx + 0xf0]
mov esi, dword [ebx + 0xec]
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0xf0]
add esp, 4
xor ecx, ecx
test edi, edi
mov dword [esp + 0x24], eax
jle 0x46be77
xor esi, esi
lea esp, [esp]
mov edx, dword [ebx + 0xec]
movzx edx, byte [edx + ecx]
lea edi, [esi + edi + 0x3f]
and edi, 0xff
xor edx, edi
mov byte [ecx + eax], dl
mov edi, dword [ebx + 0xf0]
inc ecx
add esi, 0x21
cmp ecx, edi
jl 0x46be50
mov ecx, dword [ebx + 0xf0]
push ecx
push eax
call fcn.00475050
mov esi, eax
call fcn.00474a40
push 0
push 0
lea edx, [esp + 0x24]
push edx
push esi
mov dword [esp + 0x2c], eax
call fcn.00474fa0
mov edx, eax
mov eax, dword [ebx + 0x84]
mov dword [esp + 0x28], eax
mov byte [esp + 0x10f0], 0
xor eax, eax
mov ecx, 0x1ff
lea edi, [esp + 0x10f1]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push edx
mov dword [esp + 0x30], edx
stosb byte es:[edi], al
call fcn.004747a0
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx]
mov ebx, eax
mov eax, ecx
cdq
idiv ebx
add ecx, ebx
push ecx
mov esi, eax
mov dword [esp + 0x50], esi
call fcn.004a7d19
xor edi, edi
add esp, 0x20
lea ecx, [esp + 0x50]
mov dword [esp + 0x2c], eax
mov dword [esp + 0xc], edi
call fcn.00472240
mov dword [esp + 0x18ec], edi
mov dword [esp + 0x10d4], 0xf
mov dword [esp + 0x10d0], edi
mov byte [esp + 0x10c0], 0
mov edx, dword [esp + 0x24]
push 0x20
add edx, 0x30
push edx
lea ecx, [esp + 0x10c4]
mov byte [esp + 0x18f4], 1
call fcn.004016c0
cmp dword [esp + 0x10d4], 0x10
mov eax, dword [esp + 0x10c0]
jae 0x46bf57
lea eax, [esp + 0x10c0]
push eax
lea ecx, [esp + 0x54]
call fcn.00472530
mov eax, dword [esp + 0x14]
push eax
call fcn.004747a0
add esp, 4
cmp esi, edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edi
jle 0x46c030
mov esi, dword [esp + 0x10]
mov dword [esp + 0x10], esi
jmp 0x46bf90
mov esi, dword [esp + 0x10]
lea esp, [esp]
mov eax, dword [esp + 0x18]
cdq
mov ecx, 0x30
idiv ecx
lea eax, [esp + 0x10d8]
test edx, edx
jne 0x46bfbb
mov edx, dword [esp + 0x14]
push 4
push edx
push eax
push esi
push ebx
call fcn.004747e0
add esp, 0x14
jmp 0x46bfe4
mov ecx, ebx
mov edx, ecx
shr ecx, 2
lea edi, [esp + 0x10d8]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x1c]
push esi
push eax
lea ecx, [esp + 0x58]
call fcn.004722d0
lea eax, [esi - 0x2a]
mov edx, dword [esp + 0xc]
mov edi, dword [esp + 0x2c]
add edi, edx
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea esi, [esp + 0x10d8]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0xc]
mov ecx, dword [esp + 0x30]
add edi, eax
mov eax, dword [esp + 0x18]
inc eax
add edx, ebx
cmp eax, ecx
mov dword [esp + 0xc], edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], edx
jl 0x46bf88
xor edi, edi
mov dword [esp + 0x10b8], 0xf
mov dword [esp + 0x10b4], edi
mov byte [esp + 0x10a4], 0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x2c]
push eax
push ecx
mov bl, 2
lea ecx, [esp + 0x10a8]
mov byte [esp + 0x18f4], bl
call fcn.004016c0
lea edx, [esp + 0x10a0]
push edx
lea eax, [esp + 0x38]
push eax
call fcn.0046ab10
add esp, 8
push 0xffffffffffffffff
push edi
push eax
lea ecx, [esp + 0x10ac]
mov byte [esp + 0x18f8], 3
call fcn.00401250
mov eax, dword [esp + 0x4c]
mov esi, 0x10
cmp eax, esi
mov byte [esp + 0x18ec], bl
jb 0x46c0b7
mov ecx, dword [esp + 0x38]
push ecx
call fcn.004a8222
add esp, 4
cmp dword [esp + 0x10b8], esi
mov esi, dword [esp + 0x10a4]
jae 0x46c0ce
lea esi, [esp + 0x10a4]
mov ecx, dword [esp + 0x10b4]
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov edx, ecx
shr ecx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.004a8eb3
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10b8]
lea edx, [esp + 0x20]
push edx
push ebx
push eax
mov dword [esp + 0x2c], ecx
call fcn.004487e0
mov bl, al
mov eax, dword [esp + 0x10c8]
mov esi, 0x10
add esp, 0x10
cmp eax, esi
jb 0x46c133
mov ecx, dword [esp + 0x10a4]
push ecx
call fcn.004a8222
add esp, 4
cmp dword [esp + 0x10d4], esi
mov edi, 0xf
mov dword [esp + 0x10b8], edi
mov dword [esp + 0x10b4], 0
mov byte [esp + 0x10a4], 0
jb 0x46c16b
mov edx, dword [esp + 0x10c0]
push edx
call fcn.004a8222
add esp, 4
lea ecx, [esp + 0x50]
mov dword [esp + 0x10d4], edi
mov dword [esp + 0x10d0], 0
mov byte [esp + 0x10c0], 0
mov dword [esp + 0x18ec], 0xffffffff
call fcn.0046ee20
mov eax, dword [esp + 0x20]
push eax
call fcn.004a8eb3
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x18e4]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x18dc]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a8ea5
mov esp, ebp
pop ebp
ret 4