Function at 0x479460
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
push 0xffffffffffffffff
call fcn.00476c20
push 1
push 0xffffffffffffffff
mov ebx, eax
call fcn.004948a0
mov ebp, dword [0xb813e8]
mov edi, eax
mov eax, dword [0xb813ec]
add esp, 0xc
mov dword [esp + 0x18], eax
mov eax, dword [0xb813d8]
xor esi, esi
mov dword [esp + 0x14], 0x100
test eax, eax
je 0x479c52
mov ecx, dword [0xb813dc]
lea eax, [ecx - 1]
cmp eax, 5
ja case.0x4794b6.5
jmp dword [eax*4 + 0x479c5c]
mov eax, dword [0xb813e0]
inc eax
cmp eax, ebx
mov dword [0xb813e0], eax
jl 0x4794e3
mov dword [0xb813dc], 3
mov dword [esp + 0x14], 0x100
jmp case.0x4794b6.5
shl eax, 8
cdq
idiv ebx
mov dword [esp + 0x14], eax
jmp case.0x4794b6.5
mov eax, dword [0xb813e0]
inc eax
cmp eax, ebx
mov dword [0xb813e0], eax
jl 0x479548
xor eax, eax
mov dword [0xb813dc], eax
mov dword [esp + 0x14], eax
cmp dword [0xc1d848], 1
jne 0x47951f
push 1
call fcn.00490b80
add esp, 4
call fcn.004790f0
call fcn.00487730
push 1
push 1
call fcn.00485230
mov edx, dword [0xc1d848]
push edx
push 0
call fcn.00476be0
add esp, 0x10
jmp case.0x4794b6.5
shl eax, 8
cdq
idiv ebx
mov ecx, 0x100
sub ecx, eax
mov dword [esp + 0x14], ecx
jmp case.0x4794b6.5
mov eax, dword [0xb81400]
test eax, eax
je 0x479583
test edi, edi
jg 0x47956f
xor eax, eax
jmp 0x479572
lea eax, [edi - 1]
push eax
mov eax, dword [0xc93c70]
push 1
push eax
call fcn.00494b50
add esp, 0xc
mov eax, dword [0xb81404]
test eax, eax
je 0x4795a9
test edi, edi
jge 0x479594
xor eax, eax
jmp 0x479597
lea eax, [edi + 1]
mov ecx, dword [0xc93c70]
push eax
push 1
push ecx
call fcn.00494b50
add esp, 0xc
xor eax, eax
mov esi, 5
mov dword [esp + 0x10], eax
mov edx, eax
add eax, 0x4c
shl edx, 6
push edx
push 0x100
push eax
call fcn.0040bae0
mov eax, dword [esp + 0x1c]
add esp, 0xc
inc eax
cmp eax, esi
mov dword [esp + 0x10], eax
jl 0x4795b4
cmp edi, 0xffffffff
je 0x479716
mov eax, edi
lea ecx, [edi + 0x4c]
shl eax, 6
push eax
push 0
push ecx
call fcn.0040bae0
push 0
lea edx, [esp + 0x20]
push 0
push edx
push 0
push edi
push 1
call fcn.00494bf0
mov eax, dword [esp + 0x34]
push eax
push 0x229
push 0x51
call fcn.0040b9c0
push 1
push 0x51
call fcn.0040b680
push 0x60
push 0x51
call fcn.0040b7d0
add esp, 0x40
test ebp, ebp
je case.default.0x47963c
cmp edi, 4
ja case.default.0x47963c
jmp dword [edi*4 + 0x479c74]
push 0xff
push 0x3e7
call fcn.004787b0
push 3
push 0
call fcn.00476be0
push 1
push 2
push 0xe
push 0x49
push 0x22
push 0x71
push 0x22
push 0
call fcn.0048e200
add esp, 0x30
mov dword [0xb813dc], esi
jmp case.default.0x47963c
push 0xff
push 0x3e7
call fcn.004787b0
push 4
push 0
call fcn.00476be0
push 1
push 2
push 0xe
push 0x49
push 0x22
push 0x71
push 0x22
push 1
call fcn.0048e200
add esp, 0x30
mov dword [0xb813dc], esi
jmp case.default.0x47963c
push 0xff
push 0x3e7
call fcn.004787b0
add esp, 8
call fcn.00483bd0
mov dword [0xb813dc], 4
jmp case.default.0x47963c
push 0xff
push 0x3e7
call fcn.004787b0
add esp, 8
call fcn.00479200
mov dword [0xb813dc], 6
jmp case.default.0x47963c
push 0xff
push 0x3e6
call fcn.004787b0
push ebx
call fcn.004791b0
add esp, 0xc
jmp case.default.0x47963c
push 0
push 0x51
call fcn.0040b680
add esp, 8
mov eax, dword [esp + 0x18]
test eax, eax
je case.0x4794b6.5
push 0xff
push 0x3e6
call fcn.004787b0
push ebx
call fcn.004791b0
add esp, 0xc
jmp case.0x4794b6.5
xor eax, eax
mov dword [esp + 0x10], eax
add eax, 0x49
push 0
push eax
call fcn.0040b680
mov eax, dword [esp + 0x18]
add esp, 8
inc eax
cmp eax, 9
mov dword [esp + 0x10], eax
jl 0x479751
test ebp, ebp
jne 0x47977d
mov eax, dword [esp + 0x18]
test eax, eax
je case.0x4794b6.5
xor eax, eax
mov dword [esp + 0x10], eax
add eax, 0x49
push 1
push eax
call fcn.0040b680
mov eax, dword [esp + 0x18]
add esp, 8
inc eax
cmp eax, 9
mov dword [esp + 0x10], eax
jl 0x479783
call fcn.00483ae0
mov dword [0xb813dc], 3
jmp case.0x4794b6.5
push 3
push 0xffffffffffffffff
call fcn.004948a0
mov edi, eax
mov eax, dword [0xb81408]
add esp, 8
test eax, eax
je 0x4797dd
mov ecx, dword [0xc93c70]
push 0
push 3
push ecx
call fcn.00494b50
add esp, 0xc
mov eax, dword [0xb8140c]
test eax, eax
je 0x4797f9
mov edx, dword [0xc93c70]
push 1
push 3
push edx
call fcn.00494b50
add esp, 0xc
mov eax, dword [0xc1e480]
sub eax, 0
je 0x479981
dec eax
je 0x479944
dec eax
jne 0x4799b3
xor ebx, ebx
mov esi, 0x100
push ebx
push ebx
push 0x74
call fcn.0040bae0
push ebx
push 0xa0
push 0x75
call fcn.0040bae0
mov eax, edi
add esp, 0x18
sub eax, ebx
je 0x4798d4
dec eax
je 0x479878
push ebx
push 0x76
call fcn.0040b680
add esp, 8
cmp dword [esp + 0x18], ebx
je 0x4799b3
push 0xff
push 0x3e6
call fcn.004787b0
add esp, 8
mov dword [0xc1e480], 1
jmp 0x4799b3
push 0x38
push 0xa0
push 0x75
call fcn.0040bae0
push 1
push 0x76
call fcn.0040b680
push 0x13f
push 0x196
push 0x76
call fcn.0040b9c0
push 0x80
push 0x76
call fcn.0040b7d0
add esp, 0x28
cmp ebp, ebx
je 0x47984d
push 0xff
push 0x3e6
call fcn.004787b0
add esp, 8
mov dword [0xc1e480], 1
jmp 0x47984d
push 0x38
push ebx
push 0x74
call fcn.0040bae0
push 1
push 0x76
call fcn.0040b680
push 0x13f
push 0xfa
push 0x76
call fcn.0040b9c0
push 0x80
push 0x76
call fcn.0040b7d0
add esp, 0x28
cmp ebp, ebx
je 0x47984d
push 0xff
push 0x3e7
call fcn.004787b0
add esp, 8
call fcn.0047a770
pop edi
pop esi
mov dword [0xc1e480], ebx
mov dword [0xc1e484], ebx
pop ebp
mov dword [0xb813dc], 5
pop ebx
add esp, 0xc
ret
mov eax, dword [0xc1e484]
inc eax
cmp eax, ebx
mov dword [0xc1e484], eax
jl 0x479972
xor esi, esi
mov dword [0xb813dc], 3
mov dword [0xc1e484], esi
mov dword [0xc1e480], esi
call fcn.00479420
jmp 0x4799b3
shl eax, 8
cdq
idiv ebx
mov esi, 0x100
sub esi, eax
jmp 0x4799b3
mov eax, dword [0xc1e484]
inc eax
cmp eax, ebx
mov dword [0xc1e484], eax
jl 0x4799ab
mov esi, 0x100
mov dword [0xc1e484], 0
mov dword [0xc1e480], 2
jmp 0x4799b3
shl eax, 8
cdq
idiv ebx
mov esi, eax
push 1
push 0x71
call fcn.0040b680
push 1
push 0x72
call fcn.0040b680
push 1
push 0x73
call fcn.0040b680
push 1
push 0x74
call fcn.0040b680
push 1
push 0x75
call fcn.0040b680
push 1
push 0x22
call fcn.0040c5a0
add esp, 0x30
cmp esi, 0x100
jne 0x479a4a
push 0
push 0x74
call fcn.0040b710
push 0
push 0x75
call fcn.0040b710
push esi
push 0x22
call fcn.0040c620
push 0x99000b
push 0x72
call fcn.0040b710
push 0x34
push 0x34
push 0x34
push 0xde
push 1
push 0x71
call fcn.0040b8f0
push 0x34
push 0x34
push 0x34
push 0x17a
push 0
push 0x73
call fcn.0040b8f0
add esp, 0x50
jmp case.0x4794b6.5
mov eax, esi
cdq
and edx, 3
add eax, edx
sar eax, 2
push eax
push 0x76
call fcn.0040b7d0
add esp, 8
xor eax, eax
test esi, esi
setle al
dec eax
and eax, esi
mov edi, eax
cmp edi, 0x100
jl 0x479a79
mov eax, 0x100
shl eax, 0x10
or al, 0xb
push eax
push 0x74
call fcn.0040b710
add esp, 8
cmp edi, 0x100
mov eax, edi
jl 0x479a98
mov eax, 0x100
shl eax, 0x10
or al, 0xb
push eax
push 0x75
call fcn.0040b710
push esi
push 0x22
call fcn.0040c620
mov eax, esi
add esp, 0x10
shl eax, 4
add eax, esi
lea eax, [eax + eax*8]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
test eax, eax
jle 0x479ad1
cmp eax, 0x100
jge 0x479add
xor ecx, ecx
test eax, eax
setle cl
dec ecx
and eax, ecx
jmp 0x479ae2
mov eax, 0x100
shl eax, 0x10
or al, 0xb
push eax
push 0x72
call fcn.0040b710
lea edx, [esi + esi*8]
lea eax, [esi + edx*2]
mov esi, 0x80
shl eax, 2
cdq
and edx, 0xff
add eax, edx
sar eax, 8
sub esi, eax
push esi
push esi
push esi
push 0xde
push 1
push 0x71
call fcn.0040b8f0
push esi
push esi
push esi
push 0x17a
push 0
push 0x73
call fcn.0040b8f0
add esp, 0x38
mov edi, dword [esp + 0x14]
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x10], ecx
test edi, edi
setle al
dec eax
and eax, edi
mov esi, eax
cmp esi, 0x100
mov eax, esi
jl 0x479b55
mov eax, 0x100
shl eax, 0x10
or al, 0xb
add ecx, 0x49
push eax
push ecx
call fcn.0040b710
mov ecx, dword [esp + 0x18]
add esp, 8
inc ecx
cmp ecx, 3
mov dword [esp + 0x10], ecx
jl 0x479b46
cmp dword [0xb813dc], 5
je 0x479c34
xor ecx, ecx
mov dword [esp + 0x10], ecx
lea edx, [ecx + ecx*4]
shl edx, 2
mov eax, edx
mov edx, edi
sub edx, eax
mov eax, 0x2e8ba2e9
shl edx, 8
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
test edx, edx
jle 0x479bb4
cmp edx, 0x100
jge 0x479bc2
xor eax, eax
test edx, edx
setle al
dec eax
and eax, edx
mov esi, eax
jmp 0x479bc7
mov esi, 0x100
xor eax, eax
test esi, esi
setle al
dec eax
and eax, esi
cmp eax, 0x100
jl 0x479bdd
mov eax, 0x100
shl eax, 0x10
or al, 0xb
add ecx, 0x4c
push eax
push ecx
call fcn.0040b710
mov eax, esi
cdq
and edx, 3
add eax, edx
mov ecx, eax
mov eax, 0x40
sar ecx, 2
sub eax, ecx
imul eax, eax
cdq
and edx, 0x3f
add eax, edx
mov edx, dword [esp + 0x18]
sar eax, 6
add eax, 0x220
add edx, 0x4c
push eax
push edx
call fcn.0040b980
mov ecx, dword [esp + 0x20]
add esp, 0x10
inc ecx
cmp ecx, 5
mov dword [esp + 0x10], ecx
jl 0x479b88
mov eax, dword [0x4c383c]
test eax, eax
je 0x479c52
push 0x40
push 0x4c
call fcn.0040b7d0
push 0x40
push 0x4d
call fcn.0040b7d0
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret