Function at 0x414a50
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, dword [0x46bfac]
sub esp, 8
cmp eax, 1
push ebx
push ebp
push esi
push edi
mov esi, ecx
jne 0x414a6d
mov dword [esp + 0x10], 0x460c98
jmp 0x414a89
cmp eax, 2
jne 0x414a7c
mov dword [esp + 0x10], 0x460ca4
jmp 0x414a89
cmp eax, 3
jne 0x414a89
mov dword [esp + 0x10], 0x460cb0
push 0
push 0x3eb
mov ecx, esi
call fcn.004474ff
mov ecx, eax
call fcn.004476bf
mov eax, dword [0x45ffa0]
mov ecx, dword [0x45ff9c]
mov edx, dword [0x45ff98]
push 0x65
push 0x6e
inc eax
push 0x71
push eax
mov eax, dword [0x45ff94]
push ecx
push edx
push eax
mov ecx, esi
call fcn.00409a20
mov ecx, esi
call fcn.0042a6e0
mov edi, dword [esp + 0x10]
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push edi
call fcn.00447f87
mov ecx, dword [0x4600bc]
push 0x5a
push 0
add ecx, 0xffffffed
push 0
push ecx
push 0x1ea
push 0xf
mov ecx, esi
call fcn.00409150
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x465f6c
call fcn.00447f87
mov edx, dword [0x4600bc]
push 0x5a
push 0
add edx, 0xffffffed
push 0
push edx
push 0x228
push 0xf
mov ecx, esi
call fcn.00409150
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x465f04
call fcn.00447f87
push 0x5a
push 0
push 0
push 0x1f
push 0xed
push 0xe
mov ecx, esi
call fcn.00409150
mov eax, dword [0x46c0e4]
push 0xbe
push 0
push 0
push 0x1f
push 0x106
push 0xd
push eax
mov ecx, esi
call fcn.0040ae30
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push edi
call fcn.00447f87
push 0
push 0
push 0x78
push 0x1f
push 0x155
push 0xe
mov ecx, esi
call fcn.00409150
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x465f00
call fcn.00447f87
push 0
push 0
push 0
push 0xc
push 0x38d
push 0xc
mov ecx, esi
call fcn.00409150
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x465efc
call fcn.00447f87
push 0
push 0
push 0
push 0xc
push 0x3c2
push 0xc
mov ecx, esi
call fcn.00409150
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x465ef8
call fcn.00447f87
push 0
push 0
push 0
push 0xc
push 0x3d2
push 0xc
mov ecx, esi
call fcn.00409150
mov ecx, dword [0x46bfac]
xor eax, eax
xor edx, edx
mov dword [0x46c0f8], 0x389
mov al, byte [ecx*2 + 0x46c1fb]
mov dl, byte [ecx*2 + 0x46c1fa]
shl eax, 8
add eax, edx
mov ecx, esi
mov dword [0x46c0e0], eax
mov dword [0x46c0f4], 0x1c
mov dword [0x46c0f0], 0x1f0
mov dword [0x46c0ec], 0x1f
mov dword [0x46c0e8], eax
call fcn.00428080
mov eax, dword [0x46bfac]
mov ecx, dword [0x46c0e4]
push eax
push ecx
mov ecx, esi
call fcn.004144b0
mov edx, dword [0x46c0e0]
mov eax, dword [0x46c0e4]
push 0xc2
push 0xc2
push 0xc2
push 0x21
push edx
push eax
push 0x12
push 0x1e
push 0x5a
push 0xd7
mov ecx, esi
call fcn.00417450
cmp dword [0x46c078], 2
jne 0x414cb5
mov eax, dword [0x46bf98]
test eax, eax
jne 0x414cca
mov ecx, dword [0x46bfac]
mov edx, dword [0x46c0e4]
push ecx
push edx
mov ecx, esi
call fcn.00413d10
mov eax, dword [0x46bfac]
cmp eax, 1
jne 0x414cdb
mov ebp, 0x46c7e0
jmp 0x414ce9
cmp eax, 2
mov ebp, 0x46c800
je 0x414ce9
mov ebp, dword [esp + 0x14]
xor edi, edi
mov al, byte [edi + ebp]
push 8
mov byte [esp + 0x18], al
push 8
mov eax, dword [esp + 0x1c]
push 0x78
and eax, 0xff
push 0x5a
lea ecx, [eax + eax*8]
lea ebx, [ecx + ecx + 0xcb]
xor ecx, ecx
mov cx, word [eax*4 + 0x46c612]
lea edx, [ebx + 0xa]
lea eax, [ecx + ecx*2]
push edx
xor edx, edx
mov ecx, 0x5a
lea eax, [eax + eax*4]
shl eax, 1
div dword [0x46bf70]
sub ecx, eax
push ecx
push ebx
mov ecx, esi
call fcn.00408b00
inc edi
cmp edi, 8
jl 0x414ceb
mov eax, dword [0x46bfac]
mov edi, 1
push ecx
cmp eax, edi
mov ecx, esp
jne 0x414d5d
mov dword [esp + 0x18], esp
push 0x465edc
jmp 0x414d66
mov dword [esp + 0x18], esp
push 0x465ec0
call fcn.00447f87
push 0x5a
push 0
push 0
push 0x4a
push 0x347
push 0xc
mov ecx, esi
call fcn.00409150
mov ecx, esi
call fcn.004152c0
mov ecx, esi
call fcn.00416dd0
mov ecx, esi
call fcn.00413cb0
push 0xac
push 0xac
push 0xac
push 0xc3
push 0xc3
push 0xc3
push 0x113
push 0x32c
push 0xfd
push 0xd5
mov ecx, esi
call fcn.00408f00
mov ecx, esi
mov dword [0x46c020], edi
mov dword [0x46c01c], 0x14f
mov dword [0x46c018], 0xff
mov dword [0x46c014], 0x11
mov dword [0x46c010], 0x50
mov dword [0x46c008], 7
mov dword [0x46c00c], 0xe
call fcn.00418500
mov ecx, esi
call fcn.00414010
mov ecx, esi
call fcn.00423ef0
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x464af8
call fcn.00447f87
xor ebx, ebx
mov ecx, esi
push ebx
push ebx
push 0x78
push 0x103
push 0x332
push 0xe
call fcn.00409150
push 0xff
push 0xff
push 0xff
push 0x5a
push ebx
push ebx
push 0x159
push 0x39f
push 0x11c
push 0xb4
mov ecx, esi
call fcn.00408ca0
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x465e28
call fcn.00447f87
push ebx
push ebx
push 0xb4
push 0x124
push 0xbc
push 0xe
mov ecx, esi
call fcn.00409150
cmp dword [0x46bfac], edi
jne 0x414f29
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x460d3c
call fcn.00447f87
push 0x5a
push ebx
push ebx
push 0x124
push 0xfd
push 0xe
mov ecx, esi
call fcn.00409150
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x460da4
call fcn.00447f87
push 0x5a
push ebx
push ebx
push 0x136
push 0xbc
push 0xe
mov ecx, esi
call fcn.00409150
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x460e18
call fcn.00447f87
push 0x5a
push ebx
push ebx
push 0x148
push 0xbc
push 0xe
mov ecx, esi
call fcn.00409150
cmp dword [0x46bfac], 2
jne 0x414faa
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x460e74
call fcn.00447f87
push 0x5a
push ebx
push ebx
push 0x124
push 0xfd
push 0xe
mov ecx, esi
call fcn.00409150
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x460edc
call fcn.00447f87
push 0x5a
push ebx
push ebx
push 0x136
push 0xbc
push 0xe
mov ecx, esi
call fcn.00409150
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x460f50
call fcn.00447f87
push 0x5a
push ebx
push ebx
push 0x148
push 0xbc
push 0xe
mov ecx, esi
call fcn.00409150
cmp dword [0x46be70], edi
jne 0x414fdf
cmp dword [esp + 0x10], 0x460c98
jne 0x414fdf
push edi
mov ecx, esi
call fcn.004258e0
cmp eax, dword [0x46bfac]
je 0x414fdf
mov ecx, esi
mov dword [0x46d3b0], ebx
call fcn.00425800
mov dword [0x46be70], ebx
mov edx, dword [0x46c2e8]
mov eax, dword [0x46c230]
mov ebp, dword [0x46c22c]
mov ecx, dword [0x46c224]
add edx, eax
mov eax, dword [0x46c1f0]
add edx, ebp
add edx, ecx
add edx, eax
jmp 0x41505d
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret