Function at 0x1000e420
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x65c
mov eax, dword [0x101279d8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x634], ecx
mov dword [ebp - 0x61c], ebx
mov dword [ebp - 0x654], eax
cmp esi, 8
je 0x1000e46f
push 0x100eed9c
push eax
call fcn.10004f00
add esp, 8
test eax, eax
je 0x1000eec1
mov eax, dword [edi]
mov edi, dword [edi + 4]
mov dword [ebp - 0x610], eax
mov eax, esi
cdq
and edx, 7
push 0x400
add eax, edx
lea ecx, [ebp - 0x604]
sar eax, 3
push 0
push ecx
mov dword [ebp - 0x638], edi
mov dword [ebp - 0x608], eax
call fcn.100a7150
lea ecx, [edi*4]
mov eax, 0x66666667
imul ecx
sar edx, 1
mov esi, edx
shr esi, 0x1f
add esi, edx
add esp, 0xc
mov dword [ebp - 0x620], esi
mov ecx, ebx
test esi, esi
jle 0x1000e4fd
mov ebx, esi
lea esp, [esp]
cmp dword [ebp - 0x610], 0
jle 0x1000e4fa
mov edx, dword [ebp - 0x610]
nop
movzx eax, byte [ecx]
inc dword [ebp + eax*4 - 0x604]
add ecx, dword [ebp - 0x608]
dec edx
lea eax, [ebp + eax*4 - 0x604]
jne 0x1000e4e0
dec ebx
jne 0x1000e4d0
mov ecx, edi
imul ecx, dword [ebp - 0x610]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov dword [ebp - 0x650], ecx
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
xor eax, eax
mov edx, 2
lea edi, [ebp - 0x600]
lea ebx, [ebx]
add eax, dword [edi - 4]
lea ebx, [edx - 2]
mov dword [ebp - 0x628], ebx
cmp eax, ecx
jg 0x1000e59d
add eax, dword [edi]
lea ebx, [edx - 1]
mov dword [ebp - 0x628], ebx
cmp eax, ecx
jg 0x1000e59d
add eax, dword [edi + 4]
mov dword [ebp - 0x628], edx
cmp eax, ecx
jg 0x1000e59d
add eax, dword [edi + 8]
lea ebx, [edx + 1]
mov dword [ebp - 0x628], ebx
cmp eax, ecx
jg 0x1000e59d
add eax, dword [edi + 0xc]
lea ebx, [edx + 2]
mov dword [ebp - 0x628], ebx
cmp eax, ecx
jg 0x1000e59d
add eax, dword [edi + 0x10]
lea ebx, [edx + 3]
mov dword [ebp - 0x628], ebx
cmp eax, ecx
jg 0x1000e59d
add edx, 6
lea ebx, [edx - 2]
add edi, 0x18
cmp ebx, 0x96
jl 0x1000e530
xor eax, eax
mov edx, 0xfd
lea edi, [ebp - 0x210]
lea ebx, [ebx]
add eax, dword [edi + 8]
lea ebx, [edx + 2]
cmp eax, ecx
jg 0x1000e5fe
add eax, dword [edi + 4]
lea ebx, [edx + 1]
cmp eax, ecx
jg 0x1000e5fe
add eax, dword [edi]
mov ebx, edx
cmp eax, ecx
jg 0x1000e5fe
add eax, dword [edi - 4]
lea ebx, [edx - 1]
cmp eax, ecx
jg 0x1000e5fe
add eax, dword [edi - 8]
lea ebx, [edx - 2]
cmp eax, ecx
jg 0x1000e5fe
add eax, dword [edi - 0xc]
lea ebx, [edx - 3]
cmp eax, ecx
jg 0x1000e5fe
sub edx, 6
lea esi, [edx + 2]
sub edi, 0x18
cmp esi, 0x69
mov esi, dword [ebp - 0x620]
jg 0x1000e5b0
sub dword [ebp - 0x628], 0x12
jns 0x1000e611
mov dword [ebp - 0x628], 0
add ebx, 0x1c
mov dword [ebp - 0x624], ebx
cmp ebx, 0xff
jle 0x1000e62d
mov ebx, 0xff
mov dword [ebp - 0x624], ebx
mov edi, dword [ebp - 0x610]
mov eax, edi
cdq
sub eax, edx
mov ecx, eax
mov eax, esi
mov esi, dword [ebp - 0x634]
cdq
sub eax, edx
mov edx, dword [ebp - 0x608]
sar eax, 1
imul edx, edi
sar ecx, 1
mov edi, eax
imul edi, ecx
mov dword [ebp - 0x614], ecx
mov dword [ebp - 0x60c], eax
mov dword [ebp - 0x620], edx
mov dword [ebp - 0x644], edi
cmp dword [esi + 0x4f4], edi
jge 0x1000e6b9
mov eax, dword [esi + 0x4f8]
test eax, eax
je 0x1000e694
push eax
call fcn.1008e660
add esp, 4
mov dword [esi + 0x4f8], 0
push edi
call fcn.1008e66b
add esp, 4
mov dword [esi + 0x4f8], eax
test eax, eax
je 0x1000e6b9
push edi
push 0
push eax
mov dword [esi + 0x4f4], edi
call fcn.100a7150
add esp, 0xc
mov esi, dword [esi + 0x4f8]
xor eax, eax
mov dword [ebp - 0x640], eax
mov dword [ebp - 0x63c], eax
cmp esi, eax
je 0x1000e840
mov eax, dword [ebp - 0x60c]
mov ecx, esi
mov esi, dword [ebp - 0x61c]
test eax, eax
jle 0x1000e7fe
mov dword [ebp - 0x630], eax
xor eax, eax
xor ebx, ebx
xor edi, edi
cmp dword [ebp - 0x614], 2
mov dword [ebp - 0x64c], eax
mov dword [ebp - 0x648], eax
mov dword [ebp - 0x658], ebx
mov dword [ebp - 0x60c], esi
jl 0x1000e798
mov eax, dword [ebp - 0x614]
add eax, 0xfffffffe
shr eax, 1
inc eax
lea edx, [eax + eax]
mov dword [ebp - 0x618], eax
mov dword [ebp - 0x62c], edx
mov dl, byte [esi]
movzx eax, byte [ecx]
movzx ebx, dl
sub eax, ebx
imul eax, eax
mov byte [ecx], dl
mov edx, dword [ebp - 0x608]
lea esi, [esi + edx*2]
cdq
add dword [ebp - 0x64c], eax
movzx eax, byte [ecx + 1]
adc dword [ebp - 0x648], edx
mov dl, byte [esi]
movzx ebx, dl
sub eax, ebx
mov ebx, dword [ebp - 0x658]
imul eax, eax
mov byte [ecx + 1], dl
mov edx, dword [ebp - 0x608]
lea esi, [esi + edx*2]
cdq
add edi, eax
adc ebx, edx
add ecx, 2
dec dword [ebp - 0x618]
mov dword [ebp - 0x658], ebx
jne 0x1000e737
mov eax, dword [ebp - 0x62c]
cmp eax, dword [ebp - 0x614]
jge 0x1000e7bf
mov al, byte [esi]
movzx esi, byte [ecx]
movzx edx, al
sub esi, edx
mov byte [ecx], al
mov eax, esi
imul eax, esi
cdq
add dword [ebp - 0x640], eax
adc dword [ebp - 0x63c], edx
inc ecx
add edi, dword [ebp - 0x64c]
mov eax, dword [ebp - 0x60c]
adc ebx, dword [ebp - 0x648]
add dword [ebp - 0x640], edi
mov edx, dword [ebp - 0x620]
lea esi, [eax + edx*2]
adc dword [ebp - 0x63c], ebx
dec dword [ebp - 0x630]
jne 0x1000e6f1
mov edi, dword [ebp - 0x644]
mov ebx, dword [ebp - 0x624]
mov ecx, dword [ebp - 0x640]
mov esi, dword [ebp - 0x634]
mov eax, edi
cdq
push edx
push eax
mov eax, dword [ebp - 0x63c]
push eax
push ecx
call fcn.100a7f60
test edx, edx
jl 0x1000e846
jg 0x1000e829
cmp eax, 0x320
jbe 0x1000e846
mov edx, dword [ebp - 0x628]
mov dword [esi + 0x4e8], edx
mov dword [esi + 0x4ec], ebx
jmp 0x1000e8f0
mov esi, dword [ebp - 0x634]
mov eax, dword [esi + 0x4e8]
sub eax, dword [ebp - 0x628]
cdq
mov ecx, eax
mov eax, dword [esi + 0x4ec]
xor ecx, edx
sub ecx, edx
sub eax, ebx
cdq
mov edi, eax
xor edi, edx
sub edi, edx
cmp dword [esi + 0x4f0], 0
je 0x1000e8dc
mov eax, ecx
cdq
and edx, 7
lea ecx, [edx + eax]
mov eax, edi
cdq
and edx, 7
add eax, edx
sar ecx, 3
sar eax, 3
test ecx, ecx
jle 0x1000e8ae
mov eax, dword [esi + 0x4e8]
cmp eax, dword [ebp - 0x628]
jle 0x1000e8a4
sub eax, ecx
mov dword [esi + 0x4e8], eax
jmp 0x1000e8f0
add ecx, eax
mov dword [esi + 0x4e8], ecx
jmp 0x1000e8f0
test eax, eax
jle 0x1000e8d0
mov ecx, dword [esi + 0x4ec]
cmp ecx, ebx
jle 0x1000e8c6
sub ecx, eax
mov dword [esi + 0x4ec], ecx
jmp 0x1000e8f0
add eax, ecx
mov dword [esi + 0x4ec], eax
jmp 0x1000e8f0
mov dword [esi + 0x4f0], 0
jmp 0x1000e8f0
cmp ecx, 0x14
jg 0x1000e8e6
cmp edi, 0x14
jle 0x1000e8f0
mov dword [esi + 0x4f0], 1
mov eax, dword [esi + 0x4e0]
mov dword [ebp - 0x618], eax
test eax, eax
je 0x1000eb3a
mov eax, dword [ebp - 0x610]
mov ecx, dword [ebp - 0x614]
mov dword [esi + 0x4e4], eax
mov dword [ebp - 0x614], ecx
xor eax, eax
xor ecx, ecx
mov edx, dword [ebp + ecx*4 - 0x604]
cmp edx, eax
cmovg eax, edx
mov edx, dword [ebp + ecx*4 - 0x600]
cmp edx, eax
cmovg eax, edx
mov edx, dword [ebp + ecx*4 - 0x5fc]
cmp edx, eax
cmovg eax, edx
mov edx, dword [ebp + ecx*4 - 0x5f8]
cmp edx, eax
cmovg eax, edx
add ecx, 4
cmp ecx, 0x100
jl 0x1000e920
mov dword [ebp - 0x60c], eax
test eax, eax
jle 0x1000eb7f
mov ecx, dword [ebp - 0x638]
mov ebx, dword [ebp - 0x610]
mov eax, 0x66666667
imul ecx
sar edx, 1
mov esi, edx
shr esi, 0x1f
add esi, edx
mov edx, dword [ebp - 0x608]
mov eax, ecx
sub eax, esi
sub eax, 5
imul eax, ebx
add ecx, 0xfffffffb
imul ecx, ebx
lea edi, [ebx - 0x104]
add eax, edi
lea ebx, [ecx + edi]
imul eax, edx
add eax, dword [ebp - 0x61c]
mov dword [ebp - 0x648], ebx
imul ebx, edx
mov edx, dword [ebp - 0x61c]
add edx, ebx
mov dword [ebp - 0x624], esi
mov dword [ebp - 0x644], edx
mov dword [ebp - 0x630], 0x101
jmp 0x1000e9e0
mov ebx, dword [ebp - 0x608]
mov byte [edx], 0xff
mov byte [eax], 0xff
add edx, ebx
add eax, ebx
dec dword [ebp - 0x630]
jne 0x1000e9e0
test esi, esi
jle 0x1000eaa3
mov eax, dword [ebp - 0x610]
mov edx, dword [ebp - 0x620]
neg eax
mov dword [ebp - 0x63c], eax
mov eax, dword [ebp - 0x644]
mov dword [ebp - 0x62c], eax
mov eax, dword [ebp - 0x648]
add eax, 0x100
imul eax, ebx
neg edx
add eax, dword [ebp - 0x61c]
mov dword [ebp - 0x630], esi
lea esp, [esp]
mov esi, dword [ebp - 0x62c]
mov ebx, dword [ebp - 0x634]
mov byte [esi], 0xff
mov byte [eax], 0xff
lea esi, [ecx + edi]
add esi, dword [ebx + 0x4e8]
mov ebx, dword [ebp - 0x61c]
imul esi, dword [ebp - 0x608]
add dword [ebp - 0x62c], edx
mov byte [esi + ebx], 0xff
mov esi, dword [ebp - 0x634]
mov esi, dword [esi + 0x4ec]
add esi, ecx
add ecx, dword [ebp - 0x63c]
add esi, edi
imul esi, dword [ebp - 0x608]
add eax, edx
dec dword [ebp - 0x630]
mov byte [esi + ebx], 0xff
jne 0x1000ea40
mov esi, dword [ebp - 0x624]
mov ebx, dword [ebp - 0x608]
xor ecx, ecx
mov dword [ebp - 0x62c], ecx
mov eax, dword [ebp + ecx*4 - 0x604]
imul eax, esi
cdq
idiv dword [ebp - 0x60c]
cmp eax, esi
cmovg eax, esi
cmp eax, 1
jle 0x1000eb25
mov ecx, dword [ebp - 0x638]
mov edx, dword [ebp - 0x620]
add ecx, 0xfffffffa
imul ecx, dword [ebp - 0x610]
add ecx, edi
add ecx, dword [ebp - 0x62c]
neg edx
imul ecx, dword [ebp - 0x608]
add ecx, dword [ebp - 0x61c]
lea ebx, [eax - 1]
lea esp, [esp]
movzx eax, byte [ecx]
add eax, 0x3c
cmp eax, 0xff
jle 0x1000eb12
mov eax, 0xff
mov byte [ecx], al
add ecx, edx
dec ebx
jne 0x1000eb00
mov ebx, dword [ebp - 0x608]
mov ecx, dword [ebp - 0x62c]
inc ecx
mov dword [ebp - 0x62c], ecx
cmp ecx, 0x100
jl 0x1000eab1
jmp 0x1000eb85
cmp dword [esi + 0x4dc], 0
je 0x1000eb60
mov eax, dword [ebp - 0x610]
add dword [esi + 0x4e4], 0x14
cmp dword [esi + 0x4e4], eax
jle 0x1000eb73
mov dword [esi + 0x4e4], eax
jmp 0x1000eb73
add dword [esi + 0x4e4], 0xffffffec
jns 0x1000eb73
mov dword [esi + 0x4e4], 0
mov ecx, dword [esi + 0x4e4]
mov dword [ebp - 0x614], ecx
mov ebx, dword [ebp - 0x608]
mov ecx, dword [ebp - 0x634]
mov eax, dword [ecx + 0x4e8]
mov ecx, dword [ecx + 0x4ec]
sub ecx, eax
mov dword [ebp - 0x624], ecx
test ecx, ecx
jle 0x1000eec1
fild dword [ebp - 0x624]
xor edi, edi
mov esi, 0xffffff81
neg eax
fdivr qword [0x100e8318]
mov dword [ebp - 0x60c], esi
mov dword [ebp - 0x620], eax
fstp dword [ebp - 0x624]
fld qword [0x100e7dc8]
fld dword [ebp - 0x624]
fild dword [ebp - 0x620]
fmul st(1)
call fcn.100a7850
cmp eax, 0xff
jle 0x1000ebf5
mov eax, 0xff
jmp 0x1000ebfb
test eax, eax
jns 0x1000ebfb
xor eax, eax
fild dword [ebp - 0x60c]
mov byte [ebp + esi - 0x185], al
fmul st(1)
fadd st(2)
call fcn.100a7850
cmp eax, 0xff
jle 0x1000ec1f
mov eax, 0xff
jmp 0x1000ec25
test eax, eax
jns 0x1000ec25
xor eax, eax
inc dword [ebp - 0x620]
inc esi
mov byte [ebp + edi - 0x104], al
inc edi
mov dword [ebp - 0x60c], esi
cmp esi, 0x81
jl 0x1000ebda
cmp dword [ebp - 0x638], 0
fstp st(0)
mov eax, dword [ebp - 0x61c]
fstp st(0)
jle 0x1000ecbe
mov esi, dword [ebp - 0x638]
jmp 0x1000ec60
cmp dword [ebp - 0x618], 0
je 0x1000ec7a
mov edx, dword [ebp - 0x610]
sub edx, dword [ebp - 0x614]
imul edx, ebx
add eax, edx
cmp dword [ebp - 0x614], 0
jle 0x1000eca1
mov ecx, dword [ebp - 0x614]
lea esp, [esp]
movzx edx, byte [eax]
mov dl, byte [ebp + edx - 0x204]
mov byte [eax], dl
add eax, ebx
dec ecx
jne 0x1000ec90
cmp dword [ebp - 0x618], 0
jne 0x1000ecbb
mov ecx, dword [ebp - 0x610]
sub ecx, dword [ebp - 0x614]
imul ecx, ebx
add eax, ecx
dec esi
jne 0x1000ec60
mov esi, dword [ebp - 0x654]
mov eax, 0x10
mov ecx, 0x100eee0c
mov edx, esi
mov edi, dword [edx]
cmp edi, dword [ecx]
jne 0x1000ece6
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x1000ecd0
jmp 0x1000ed1e
movzx eax, byte [edx]
movzx edi, byte [ecx]
sub eax, edi
jne 0x1000ed12
movzx eax, byte [edx + 1]
movzx edi, byte [ecx + 1]
sub eax, edi
jne 0x1000ed12
movzx eax, byte [edx + 2]
movzx edi, byte [ecx + 2]
sub eax, edi
jne 0x1000ed12
movzx eax, byte [edx + 3]
movzx edx, byte [ecx + 3]
sub eax, edx
sar eax, 0x1f
or eax, 1
jne 0x1000ee02
mov eax, dword [ebp - 0x638]
mov esi, dword [ebp - 0x614]
cdq
sub eax, edx
mov ecx, eax
mov eax, esi
cdq
sub eax, edx
mov edi, eax
mov eax, dword [ebp - 0x610]
sub eax, esi
cdq
sub eax, edx
mov ebx, eax
mov eax, dword [ebp - 0x650]
add eax, dword [ebp - 0x61c]
sar ecx, 1
sar edi, 1
sar ebx, 1
test ecx, ecx
jle 0x1000ed94
mov dword [ebp - 0x60c], ecx
nop
cmp dword [ebp - 0x618], 0
je 0x1000ed6b
add eax, ebx
test edi, edi
jle 0x1000ed81
mov esi, edi
movzx edx, byte [eax]
mov dl, byte [ebp + edx - 0x104]
mov byte [eax], dl
inc eax
dec esi
jne 0x1000ed71
cmp dword [ebp - 0x618], 0
jne 0x1000ed8c
add eax, ebx
dec dword [ebp - 0x60c]
jne 0x1000ed60
mov eax, dword [ebp - 0x650]
lea eax, [eax + eax*4]
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, dword [ebp - 0x61c]
test ecx, ecx
jle 0x1000eec1
mov esi, ecx
mov ecx, dword [ebp - 0x618]
lea esp, [esp]
test ecx, ecx
je 0x1000edc6
add eax, ebx
test edi, edi
jle 0x1000ede6
mov edx, edi
lea esp, [esp]
movzx ecx, byte [eax]
mov cl, byte [ebp + ecx - 0x104]
mov byte [eax], cl
inc eax
dec edx
jne 0x1000edd0
mov ecx, dword [ebp - 0x618]
test ecx, ecx
jne 0x1000edec
add eax, ebx
dec esi
jne 0x1000edc0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100a6f5d
mov esp, ebp
pop ebp
ret 0x10
mov eax, 0x10
mov ecx, 0x100eed9c
mov edx, esi
mov edi, edi
mov esi, dword [edx]
cmp esi, dword [ecx]
jne 0x1000ee26
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x1000ee10
jmp 0x1000ee5a
movzx eax, byte [edx]
movzx esi, byte [ecx]
sub eax, esi
jne 0x1000ee52
movzx eax, byte [edx + 1]
movzx esi, byte [ecx + 1]
sub eax, esi
jne 0x1000ee52
movzx eax, byte [edx + 2]
movzx esi, byte [ecx + 2]
sub eax, esi
jne 0x1000ee52
movzx eax, byte [edx + 3]
movzx edx, byte [ecx + 3]
sub eax, edx
sar eax, 0x1f
or eax, 1
jne 0x1000eec1
mov esi, dword [ebp - 0x610]
sub esi, dword [ebp - 0x614]
mov eax, dword [ebp - 0x61c]
add esi, esi
inc eax
cmp dword [ebp - 0x638], 0
jle 0x1000eec1
mov edi, dword [ebp - 0x638]
mov ecx, dword [ebp - 0x618]
mov edx, dword [ebp - 0x614]
lea ebx, [ebx]
test ecx, ecx
je 0x1000ee96
add eax, esi
test edx, edx
jle 0x1000eeb8
mov ecx, edx
lea esp, [esp]
movzx ebx, byte [eax]
mov bl, byte [ebp + ebx - 0x104]
mov byte [eax], bl
add eax, 2
dec ecx
jne 0x1000eea0
mov ecx, dword [ebp - 0x618]
test ecx, ecx
jne 0x1000eebe
add eax, esi
dec edi
jne 0x1000ee90
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100a6f5d
mov esp, ebp
pop ebp
ret 0x10