Function at 0x4114ec
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x60
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], eax
mov ebp, dword [esp + 0x8c]
movsx eax, byte [0x5957b8]
mov dword [esp + 0x48], eax
test eax, eax
je 0x4115e7
mov eax, 0x3fa00000
mov dword [0x7de320], eax
mov dword [0x7de324], eax
movsx edx, byte [0x7de328]
test edx, edx
jne 0x4115e7
mov byte [0x7de328], 1
xor edx, edx
fld qword [0x570348]
fld qword [0x570340]
mov dword [esp + 0x30], edx
fild dword [esp + 0x30]
fsub st(1)
fld qword [0x570348]
fmul st(1)
fadd st(2)
fnstcw word [esp]
movzx eax, word [esp]
or eax, 0xc00
mov dword [esp + 8], eax
fldcw word [esp + 8]
fistp dword [esp + 0x28]
fldcw word [esp]
mov eax, dword [esp + 0x28]
test eax, eax
jl 0x411591
cmp eax, 0xff
jle 0x411593
mov eax, 0xff
jmp 0x411593
xor eax, eax
mov byte [edx + 0x7d6ee0], al
fmul st(2)
fadd st(1)
fnstcw word [esp]
movzx eax, word [esp]
or eax, 0xc00
mov dword [esp + 8], eax
fldcw word [esp + 8]
fistp dword [esp + 0x28]
fldcw word [esp]
mov eax, dword [esp + 0x28]
test eax, eax
jl 0x4115ce
cmp eax, 0xff
jle 0x4115d0
mov eax, 0xff
jmp 0x4115d0
xor eax, eax
mov byte [edx + 0x7d6fe0], al
inc edx
cmp edx, 0x100
jl 0x41154c
fstp st(0)
fstp st(0)
mov eax, 0x51eb851f
mov ebp, dword [esp + 0x24]
imul ebp
sar edx, 5
mov eax, ebp
sar eax, 0x1f
sub edx, eax
mov dword [esp + 0x3c], edx
lea eax, [edx + edx]
add eax, eax
sub eax, edx
lea ecx, [edx + eax*8]
add ecx, ecx
add ecx, ecx
neg ecx
add ecx, ebp
mov esi, dword [esp + 0x80]
mov eax, 0x51eb851f
imul esi
sar edx, 5
mov eax, esi
sar eax, 0x1f
sub edx, eax
mov dword [esp + 0x38], edx
lea eax, [edx + edx]
add eax, eax
sub eax, edx
lea ebx, [edx + eax*8]
add ebx, ebx
add ebx, ebx
neg ebx
add ebx, esi
mov esi, dword [esp + 0x94]
mov eax, 0x51eb851f
imul esi
sar edx, 5
mov eax, esi
sar eax, 0x1f
sub edx, eax
mov dword [esp + 0x4c], edx
mov edi, dword [esp + 0x98]
mov eax, 0x51eb851f
imul edi
sar edx, 5
sar edi, 0x1f
sub edx, edi
mov dword [esp + 0x54], edx
shl ecx, 8
mov eax, 0x51eb851f
imul ecx
mov edi, edx
sar edi, 5
sar ecx, 0x1f
sub edi, ecx
mov dword [esp + 0x40], edi
shl ebx, 8
mov eax, 0x51eb851f
imul ebx
sar edx, 5
sar ebx, 0x1f
sub edx, ebx
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x84]
sub eax, ebp
mov dword [esp + 0x44], eax
cmp esi, eax
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x4c]
mov ebp, dword [esp + 0x8c]
jge 0x4116d2
xor eax, eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x94]
mov edx, dword [esp + 0x44]
cmp eax, edx
jl 0x4116e7
xor eax, eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x88]
sub eax, dword [esp + 0x80]
mov dword [esp + 0x5c], eax
mov edx, dword [esp + 0x98]
cmp edx, eax
jge 0x41170a
xor eax, eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x98]
mov edx, dword [esp + 0x5c]
cmp eax, edx
jl 0x41171f
xor eax, eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x98]
lea eax, [eax - 0x64]
mov esi, dword [esp + 0x94]
add esi, 0xffffff9c
jne 0x41173a
mov esi, 0x64
test eax, eax
jne 0x411743
mov eax, 0x64
mov edx, dword [esp + 0x54]
test edx, edx
jle 0x4117ae
xor ebx, ebx
mov dword [esp + 0xc], ebx
cdq
mov ebx, edx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], esi
mov dword [esp + 0x58], eax
mov dword [esp + 0x3c], ecx
mov ebp, dword [esp + 0xc]
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x5c]
imul esi
push ebx
mov ecx, dword [esp + 0x5c]
push ecx
push edx
push eax
call fcn.004608f0
add eax, edi
mov dword [ebp*4 + 0x796ae0], eax
add esi, 0x100
inc ebp
mov ecx, dword [esp + 0x54]
cmp ebp, ecx
jl 0x411770
mov edi, dword [esp + 0x4c]
mov esi, dword [esp + 0x50]
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x8c]
mov edx, dword [esp + 0x48]
test edx, edx
je 0x4117ee
mov edx, dword [esp + 0x54]
test edx, edx
jle 0x4117ee
xor eax, eax
mov ebx, edx
mov edx, dword [eax*4 + 0x796ae0]
movzx ebp, dl
and edx, 0xffffff00
movzx ebp, byte [ebp + 0x7d6fe0]
or edx, ebp
mov dword [eax*4 + 0x796ae0], edx
inc eax
cmp eax, ebx
jl 0x4117c2
mov ebp, dword [esp + 0x8c]
test edi, edi
jle 0x41189d
xor ebx, ebx
mov dword [esp + 0xc], ebx
mov eax, esi
cdq
mov dword [esp + 0x4c], edi
mov dword [esp + 0x58], edx
mov dword [esp + 0x50], esi
mov dword [esp + 0x3c], ecx
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x44]
imul ebp
mov ecx, dword [esp + 0x58]
push ecx
mov esi, dword [esp + 0x54]
push esi
push edx
push eax
call fcn.004608f0
mov edx, dword [esp + 0x40]
add eax, edx
mov ecx, dword [esp + 0x48]
test ecx, ecx
je 0x411849
movzx edx, al
and eax, 0xffffff00
movzx ecx, byte [edx + 0x7d6ee0]
or eax, ecx
movzx edx, al
mov edi, edx
shl edi, 0x10
add edi, edx
xor ecx, ecx
shld ecx, edx, 0x10
mov esi, edx
shl esi, 0x10
add esi, edx
adc ecx, 0
add edi, ecx
mov dword [ebx*8 + 0x7b6ce0], esi
mov dword [ebx*8 + 0x7b6ce4], edi
sar eax, 8
add eax, eax
add eax, eax
mov dword [ebx*4 + 0x7a6be0], eax
add ebp, 0x100
inc ebx
mov eax, dword [esp + 0x4c]
cmp ebx, eax
jl 0x411813
mov edi, eax
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x8c]
mov eax, dword [esp + 0x54]
mov dword [esp + 0x14], eax
test eax, eax
jle 0x411b26
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x3c], ecx
mov esi, dword [esp + 0x54]
mov ecx, dword [esp + 0x38]
mov ebp, dword [esp + 0x90]
mov edx, dword [eax*4 + 0x796ae0]
sar edx, 8
add edx, ecx
test edx, edx
jge 0x4118d7
lea ebx, [eax + 1]
cmp edx, ebp
jge 0x411b12
inc eax
cmp eax, esi
jl 0x4118c4
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x8c]
mov dword [esp + 0x5c], edi
test edi, edi
jle 0x411b0b
xor esi, esi
xor eax, eax
mov edx, dword [eax*4 + 0x7a6be0]
sar edx, 2
add edx, ecx
test edx, edx
jge 0x411912
lea esi, [eax + 1]
cmp edx, ebp
jge 0x411b02
inc eax
cmp eax, edi
jl 0x4118ff
mov eax, dword [esp + 0x14]
cmp ebx, eax
jge 0x41192f
mov eax, dword [esp + 0x5c]
cmp esi, eax
jl 0x41194e
add edi, edi
add edi, edi
mov eax, dword [esp + 0x54]
imul eax, edi
push eax
mov edx, dword [esp + 0x20]
push edx
call dword [0x5b2480]
add esp, 0x68
pop ebx
pop ebp
pop esi
pop edi
ret
add edi, edi
add edi, edi
mov eax, ebx
imul eax, edi
push eax
mov edx, dword [esp + 0x20]
push edx
call dword [0x5b2480]
mov ecx, dword [esp + 0x1c]
mov edx, ecx
imul edx, edi
add edx, dword [esp + 0x24]
mov eax, dword [esp + 0x5c]
imul eax, edi
neg ecx
imul ecx, edi
add eax, ecx
push eax
push edx
call dword [0x5b2480]
add esp, 0x10
movsx ecx, byte [0x5956f4]
test ecx, ecx
jle 0x411ad9
mov dword [0x78ece4], 0x15
xor edi, edi
xor eax, eax
mov edx, dword [esp + 0x14]
sub edx, ebx
mov dword [esp + 0x18], esi
mov esi, eax
mov ebp, edx
jmp 0x4119be
mov ebp, dword [esp + 0x40]
mov ebx, dword [esp + 0x44]
mov dword [esi + 0x78ece8], ebx
mov eax, ebp
cdq
idiv ecx
add eax, ebx
mov dword [esi + 0x78ecec], eax
mov dword [esp + 0x40], ebp
mov dword [esp + 0x44], ebx
mov ebx, dword [esp + 0x98]
mov ebp, dword [esp + 0x94]
mov edx, dword [esp + 0x18]
mov dword [esi + 0x78ecf0], edx
mov ecx, dword [esp + 0x5c]
mov dword [esi + 0x78ecf4], ecx
mov edx, dword [esp + 0x24]
mov dword [esi + 0x78ecf8], edx
mov edx, dword [esp + 0x80]
mov dword [esi + 0x78ecfc], edx
mov edx, dword [esp + 0x84]
mov dword [esi + 0x78ed00], edx
mov edx, dword [esp + 0x88]
mov dword [esi + 0x78ed04], edx
mov edx, dword [esp + 0x8c]
mov dword [esi + 0x78ed08], edx
mov edx, dword [esp + 0x90]
mov dword [esi + 0x78ed0c], edx
mov dword [esi + 0x78ed10], ebp
mov dword [esi + 0x78ed14], ebx
mov edx, dword [esp + 0x1c]
mov dword [esi + 0x78ed18], edx
mov edx, dword [esp + 0x20]
mov dword [esi + 0x78ed1c], edx
push dword [edi*4 + 0x7906e0]
call dword [0x56e244]
push 0xffffffffffffffff
push dword [edi*4 + 0x7907e0]
call dword [0x56e240]
inc edi
movsx ecx, byte [0x5956f4]
cmp edi, ecx
jge 0x411ad9
lea eax, [edi + edi]
add eax, eax
sub eax, edi
lea esi, [edi + eax*4]
add esi, esi
add esi, esi
add esi, esi
mov dword [esi + 0x78ece4], 0x15
test edi, edi
je 0x4119b6
cmp edi, 1
jne 0x4119e7
mov eax, dword [esp + 0x40]
cdq
idiv ecx
add eax, dword [esp + 0x44]
mov dword [esi + 0x78ece8], eax
mov ecx, dword [esp + 0x14]
mov dword [esi + 0x78ecec], ecx
jmp 0x4119e7
test ecx, ecx
jle 0x411afa
xor ebx, ebx
push 0xffffffffffffffff
push dword [ebx*4 + 0x7908e0]
call dword [0x56e240]
inc ebx
movsx eax, byte [0x5956f4]
cmp ebx, eax
jl 0x411adf
add esp, 0x60
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp + 0x5c], eax
jmp 0x41191f
xor esi, esi
jmp 0x41191f
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x8c]
mov dword [esp + 0x14], eax
jmp 0x4118ef
xor ebx, ebx
jmp 0x4118ef