Function at 0x54ddcf
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd4c
mov eax, dword [0x6c0bc0]
xor eax, dword [ebp + 4]
mov dword [ebp - 4], eax
push esi
push edi
mov dword [ebp - 0xd0c], 0x10000
jmp 0x54ddfe
mov eax, dword [ebp - 0xd0c]
dec eax
mov dword [ebp - 0xd0c], eax
cmp dword [ebp - 0xd0c], 0
jl 0x54de16
mov eax, dword [ebp - 0xd0c]
mov ecx, dword [ebp + 0x14]
and dword [ecx + eax*4], 0
jmp 0x54ddf1
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax]
shl eax, 8
mov dword [ebp - 0xd28], eax
mov eax, dword [ebp + 0x18]
dec eax
mov dword [ebp - 0xd0c], eax
jmp 0x54de40
mov eax, dword [ebp - 0xd0c]
sub eax, 4
mov dword [ebp - 0xd0c], eax
cmp dword [ebp - 0xd0c], 3
jl 0x54df74
mov eax, dword [ebp - 0xd0c]
mov ecx, dword [ebp + 0x10]
and word [ecx + eax*2], 0
mov eax, dword [ebp - 0xd28]
sar eax, 8
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0xd0c]
movzx ecx, byte [ecx]
shl ecx, 8
or eax, ecx
mov dword [ebp - 0xd28], eax
mov eax, dword [ebp - 0xd28]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
inc eax
mov ecx, dword [ebp - 0xd28]
mov edx, dword [ebp + 0x14]
mov dword [edx + ecx*4], eax
mov eax, dword [ebp - 0xd0c]
mov ecx, dword [ebp + 0x10]
and word [ecx + eax*2 - 2], 0
mov eax, dword [ebp - 0xd28]
sar eax, 8
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0xd0c]
movzx ecx, byte [ecx - 1]
shl ecx, 8
or eax, ecx
mov dword [ebp - 0xd28], eax
mov eax, dword [ebp - 0xd28]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
inc eax
mov ecx, dword [ebp - 0xd28]
mov edx, dword [ebp + 0x14]
mov dword [edx + ecx*4], eax
mov eax, dword [ebp - 0xd0c]
mov ecx, dword [ebp + 0x10]
and word [ecx + eax*2 - 4], 0
mov eax, dword [ebp - 0xd28]
sar eax, 8
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0xd0c]
movzx ecx, byte [ecx - 2]
shl ecx, 8
or eax, ecx
mov dword [ebp - 0xd28], eax
mov eax, dword [ebp - 0xd28]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
inc eax
mov ecx, dword [ebp - 0xd28]
mov edx, dword [ebp + 0x14]
mov dword [edx + ecx*4], eax
mov eax, dword [ebp - 0xd0c]
mov ecx, dword [ebp + 0x10]
and word [ecx + eax*2 - 6], 0
mov eax, dword [ebp - 0xd28]
sar eax, 8
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0xd0c]
movzx ecx, byte [ecx - 3]
shl ecx, 8
or eax, ecx
mov dword [ebp - 0xd28], eax
mov eax, dword [ebp - 0xd28]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
inc eax
mov ecx, dword [ebp - 0xd28]
mov edx, dword [ebp + 0x14]
mov dword [edx + ecx*4], eax
jmp 0x54de31
jmp 0x54df83
mov eax, dword [ebp - 0xd0c]
dec eax
mov dword [ebp - 0xd0c], eax
cmp dword [ebp - 0xd0c], 0
jl 0x54dfd5
mov eax, dword [ebp - 0xd0c]
mov ecx, dword [ebp + 0x10]
and word [ecx + eax*2], 0
mov eax, dword [ebp - 0xd28]
sar eax, 8
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0xd0c]
movzx ecx, byte [ecx]
shl ecx, 8
or eax, ecx
mov dword [ebp - 0xd28], eax
mov eax, dword [ebp - 0xd28]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
inc eax
mov ecx, dword [ebp - 0xd28]
mov edx, dword [ebp + 0x14]
mov dword [edx + ecx*4], eax
jmp 0x54df76
and dword [ebp - 0xd0c], 0
jmp 0x54dfeb
mov eax, dword [ebp - 0xd0c]
inc eax
mov dword [ebp - 0xd0c], eax
cmp dword [ebp - 0xd0c], 0x22
jge 0x54e021
mov eax, dword [ebp + 0x18]
add eax, dword [ebp - 0xd0c]
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0xd0c]
mov edx, dword [ebp + 0xc]
mov cl, byte [ecx]
mov byte [edx + eax], cl
mov eax, dword [ebp + 0x18]
add eax, dword [ebp - 0xd0c]
mov ecx, dword [ebp + 0x10]
and word [ecx + eax*2], 0
jmp 0x54dfde
mov dword [ebp - 0xd0c], 1
jmp 0x54e03a
mov eax, dword [ebp - 0xd0c]
inc eax
mov dword [ebp - 0xd0c], eax
cmp dword [ebp - 0xd0c], 0x10000
jg 0x54e06d
mov eax, dword [ebp - 0xd0c]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
mov ecx, dword [ebp - 0xd0c]
mov edx, dword [ebp + 0x14]
add eax, dword [edx + ecx*4 - 4]
mov ecx, dword [ebp - 0xd0c]
mov edx, dword [ebp + 0x14]
mov dword [edx + ecx*4], eax
jmp 0x54e02d
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax]
shl eax, 8
mov word [ebp - 0xd10], ax
mov eax, dword [ebp + 0x18]
dec eax
mov dword [ebp - 0xd0c], eax
jmp 0x54e098
mov eax, dword [ebp - 0xd0c]
sub eax, 4
mov dword [ebp - 0xd0c], eax
cmp dword [ebp - 0xd0c], 3
jl 0x54e21f
movzx eax, word [ebp - 0xd10]
sar eax, 8
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0xd0c]
movzx ecx, byte [ecx]
shl ecx, 8
or eax, ecx
mov word [ebp - 0xd10], ax
movzx eax, word [ebp - 0xd10]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
dec eax
mov dword [ebp - 0xd28], eax
movzx eax, word [ebp - 0xd10]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0xd28]
mov dword [ecx + eax*4], edx
mov eax, dword [ebp - 0xd28]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0xd0c]
mov dword [ecx + eax*4], edx
movzx eax, word [ebp - 0xd10]
sar eax, 8
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0xd0c]
movzx ecx, byte [ecx - 1]
shl ecx, 8
or eax, ecx
mov word [ebp - 0xd10], ax
movzx eax, word [ebp - 0xd10]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
dec eax
mov dword [ebp - 0xd28], eax
movzx eax, word [ebp - 0xd10]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0xd28]
mov dword [ecx + eax*4], edx
mov eax, dword [ebp - 0xd0c]
dec eax
mov ecx, dword [ebp - 0xd28]
mov edx, dword [ebp + 8]
mov dword [edx + ecx*4], eax
movzx eax, word [ebp - 0xd10]
sar eax, 8
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0xd0c]
movzx ecx, byte [ecx - 2]
shl ecx, 8
or eax, ecx
mov word [ebp - 0xd10], ax
movzx eax, word [ebp - 0xd10]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
dec eax
mov dword [ebp - 0xd28], eax
movzx eax, word [ebp - 0xd10]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0xd28]
mov dword [ecx + eax*4], edx
mov eax, dword [ebp - 0xd0c]
dec eax
dec eax
mov ecx, dword [ebp - 0xd28]
mov edx, dword [ebp + 8]
mov dword [edx + ecx*4], eax
movzx eax, word [ebp - 0xd10]
sar eax, 8
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0xd0c]
movzx ecx, byte [ecx - 3]
shl ecx, 8
or eax, ecx
mov word [ebp - 0xd10], ax
movzx eax, word [ebp - 0xd10]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
dec eax
mov dword [ebp - 0xd28], eax
movzx eax, word [ebp - 0xd10]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0xd28]
mov dword [ecx + eax*4], edx
mov eax, dword [ebp - 0xd0c]
sub eax, 3
mov ecx, dword [ebp - 0xd28]
mov edx, dword [ebp + 8]
mov dword [edx + ecx*4], eax
jmp 0x54e089
jmp 0x54e22e
mov eax, dword [ebp - 0xd0c]
dec eax
mov dword [ebp - 0xd0c], eax
cmp dword [ebp - 0xd0c], 0
jl 0x54e294
movzx eax, word [ebp - 0xd10]
sar eax, 8
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0xd0c]
movzx ecx, byte [ecx]
shl ecx, 8
or eax, ecx
mov word [ebp - 0xd10], ax
movzx eax, word [ebp - 0xd10]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
dec eax
mov dword [ebp - 0xd28], eax
movzx eax, word [ebp - 0xd10]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0xd28]
mov dword [ecx + eax*4], edx
mov eax, dword [ebp - 0xd28]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0xd0c]
mov dword [ecx + eax*4], edx
jmp 0x54e221
and dword [ebp - 0xd0c], 0
jmp 0x54e2aa
mov eax, dword [ebp - 0xd0c]
inc eax
mov dword [ebp - 0xd0c], eax
cmp dword [ebp - 0xd0c], 0xff
jg 0x54e2d9
mov eax, dword [ebp - 0xd0c]
and byte [ebp + eax - 0x108], 0
mov eax, dword [ebp - 0xd0c]
mov ecx, dword [ebp - 0xd0c]
mov dword [ebp + eax*4 - 0x508], ecx
jmp 0x54e29d
mov dword [ebp - 0xd2c], 1
mov eax, dword [ebp - 0xd2c]
imul eax, eax, 3
inc eax
mov dword [ebp - 0xd2c], eax
cmp dword [ebp - 0xd2c], 0x100
jle 0x54e2e3
mov eax, dword [ebp - 0xd2c]
cdq
push 3
pop ecx
idiv ecx
mov dword [ebp - 0xd2c], eax
mov eax, dword [ebp - 0xd2c]
mov dword [ebp - 0xd0c], eax
jmp 0x54e32c
mov eax, dword [ebp - 0xd0c]
inc eax
mov dword [ebp - 0xd0c], eax
cmp dword [ebp - 0xd0c], 0xff
jg 0x54e417
mov eax, dword [ebp - 0xd0c]
mov eax, dword [ebp + eax*4 - 0x508]
mov dword [ebp - 0xd30], eax
mov eax, dword [ebp - 0xd0c]
mov dword [ebp - 0xd28], eax
mov eax, dword [ebp - 0xd28]
sub eax, dword [ebp - 0xd2c]
mov eax, dword [ebp + eax*4 - 0x508]
inc eax
shl eax, 8
mov ecx, dword [ebp - 0xd28]
sub ecx, dword [ebp - 0xd2c]
mov ecx, dword [ebp + ecx*4 - 0x508]
shl ecx, 8
mov edx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x14]
mov eax, dword [edx + eax*4]
sub eax, dword [esi + ecx*4]
mov ecx, dword [ebp - 0xd30]
inc ecx
shl ecx, 8
mov edx, dword [ebp - 0xd30]
shl edx, 8
mov esi, dword [ebp + 0x14]
mov edi, dword [ebp + 0x14]
mov ecx, dword [esi + ecx*4]
sub ecx, dword [edi + edx*4]
cmp eax, ecx
jbe 0x54e3ff
mov eax, dword [ebp - 0xd28]
sub eax, dword [ebp - 0xd2c]
mov ecx, dword [ebp - 0xd28]
mov eax, dword [ebp + eax*4 - 0x508]
mov dword [ebp + ecx*4 - 0x508], eax
mov eax, dword [ebp - 0xd28]
sub eax, dword [ebp - 0xd2c]
mov dword [ebp - 0xd28], eax
mov eax, dword [ebp - 0xd2c]
dec eax
cmp dword [ebp - 0xd28], eax
jg 0x54e3fa
jmp 0x54e3ff
jmp 0x54e35b
mov eax, dword [ebp - 0xd28]
mov ecx, dword [ebp - 0xd30]
mov dword [ebp + eax*4 - 0x508], ecx
jmp 0x54e31f
cmp dword [ebp - 0xd2c], 1
jne 0x54e2ff
and dword [ebp - 0xd14], 0
and dword [ebp - 0xd0c], 0
jmp 0x54e441
mov eax, dword [ebp - 0xd0c]
inc eax
mov dword [ebp - 0xd0c], eax
cmp dword [ebp - 0xd0c], 0xff
jg 0x54e8ec
mov eax, dword [ebp - 0xd0c]
mov eax, dword [ebp + eax*4 - 0x508]
mov dword [ebp - 0xd24], eax
and dword [ebp - 0xd28], 0
jmp 0x54e47a
mov eax, dword [ebp - 0xd28]
inc eax
mov dword [ebp - 0xd28], eax
cmp dword [ebp - 0xd28], 0xff
jg 0x54e578
mov eax, dword [ebp - 0xd28]
cmp eax, dword [ebp - 0xd24]
je 0x54e573
mov eax, dword [ebp - 0xd24]
shl eax, 8
add eax, dword [ebp - 0xd28]
mov dword [ebp - 0xd18], eax
mov eax, dword [ebp - 0xd18]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
and eax, 0x200000
test eax, eax
jne 0x54e556
mov eax, dword [ebp - 0xd18]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
and eax, 0xffdfffff
mov dword [ebp - 0xd34], eax
mov eax, dword [ebp - 0xd18]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4 + 4]
and eax, 0xffdfffff
dec eax
mov dword [ebp - 0xd38], eax
mov eax, dword [ebp - 0xd38]
cmp eax, dword [ebp - 0xd34]
jle 0x54e556
push dword [ebp + 0x20]
push 2
push dword [ebp - 0xd38]
push dword [ebp - 0xd34]
push dword [ebp + 0x18]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0054e8fb
add esp, 0x20
mov eax, dword [ebp - 0xd38]
sub eax, dword [ebp - 0xd34]
mov ecx, dword [ebp - 0xd14]
lea eax, [ecx + eax + 1]
mov dword [ebp - 0xd14], eax
mov eax, dword [ebp + 0x20]
cmp dword [eax], 0
jge 0x54e556
jmp 0x54e8ec
mov eax, dword [ebp - 0xd18]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
or eax, 0x200000
mov ecx, dword [ebp - 0xd18]
mov edx, dword [ebp + 0x14]
mov dword [edx + ecx*4], eax
jmp 0x54e46d
and dword [ebp - 0xd28], 0
jmp 0x54e58e
mov eax, dword [ebp - 0xd28]
inc eax
mov dword [ebp - 0xd28], eax
cmp dword [ebp - 0xd28], 0xff
jg 0x54e5ec
mov eax, dword [ebp - 0xd28]
shl eax, 8
add eax, dword [ebp - 0xd24]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
and eax, 0xffdfffff
mov ecx, dword [ebp - 0xd28]
mov dword [ebp + ecx*4 - 0xd08], eax
mov eax, dword [ebp - 0xd28]
shl eax, 8
add eax, dword [ebp - 0xd24]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4 + 4]
and eax, 0xffdfffff
dec eax
mov ecx, dword [ebp - 0xd28]
mov dword [ebp + ecx*4 - 0x908], eax
jmp 0x54e581
mov eax, dword [ebp - 0xd24]
shl eax, 8
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
and eax, 0xffdfffff
mov dword [ebp - 0xd28], eax
jmp 0x54e615
mov eax, dword [ebp - 0xd28]
inc eax
mov dword [ebp - 0xd28], eax
mov eax, dword [ebp - 0xd24]
mov ecx, dword [ebp - 0xd28]
cmp ecx, dword [ebp + eax*4 - 0xd08]
jge 0x54e6b9
mov eax, dword [ebp - 0xd28]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + eax*4]
dec eax
mov dword [ebp - 0xd20], eax
cmp dword [ebp - 0xd20], 0
jge 0x54e659
mov eax, dword [ebp - 0xd20]
add eax, dword [ebp + 0x18]
mov dword [ebp - 0xd20], eax
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0xd20]
mov al, byte [eax]
mov byte [ebp - 0xd19], al
movzx eax, byte [ebp - 0xd19]
movzx eax, byte [ebp + eax - 0x108]
test eax, eax
jne 0x54e6b4
movzx eax, byte [ebp - 0xd19]
mov eax, dword [ebp + eax*4 - 0xd08]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0xd20]
mov dword [ecx + eax*4], edx
movzx eax, byte [ebp - 0xd19]
mov eax, dword [ebp + eax*4 - 0xd08]
inc eax
movzx ecx, byte [ebp - 0xd19]
mov dword [ebp + ecx*4 - 0xd08], eax
jmp 0x54e608
mov eax, dword [ebp - 0xd24]
inc eax
shl eax, 8
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
and eax, 0xffdfffff
dec eax
mov dword [ebp - 0xd28], eax
jmp 0x54e6e4
mov eax, dword [ebp - 0xd28]
dec eax
mov dword [ebp - 0xd28], eax
mov eax, dword [ebp - 0xd24]
mov ecx, dword [ebp - 0xd28]
cmp ecx, dword [ebp + eax*4 - 0x908]
jle 0x54e788
mov eax, dword [ebp - 0xd28]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + eax*4]
dec eax
mov dword [ebp - 0xd20], eax
cmp dword [ebp - 0xd20], 0
jge 0x54e728
mov eax, dword [ebp - 0xd20]
add eax, dword [ebp + 0x18]
mov dword [ebp - 0xd20], eax
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0xd20]
mov al, byte [eax]
mov byte [ebp - 0xd19], al
movzx eax, byte [ebp - 0xd19]
movzx eax, byte [ebp + eax - 0x108]
test eax, eax
jne 0x54e783
movzx eax, byte [ebp - 0xd19]
mov eax, dword [ebp + eax*4 - 0x908]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0xd20]
mov dword [ecx + eax*4], edx
movzx eax, byte [ebp - 0xd19]
mov eax, dword [ebp + eax*4 - 0x908]
dec eax
movzx ecx, byte [ebp - 0xd19]
mov dword [ebp + ecx*4 - 0x908], eax
jmp 0x54e6d7
and dword [ebp - 0xd28], 0
jmp 0x54e79e
mov eax, dword [ebp - 0xd28]
inc eax
mov dword [ebp - 0xd28], eax
cmp dword [ebp - 0xd28], 0xff
jg 0x54e7db
mov eax, dword [ebp - 0xd28]
shl eax, 8
add eax, dword [ebp - 0xd24]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
or eax, 0x200000
mov ecx, dword [ebp - 0xd28]
shl ecx, 8
add ecx, dword [ebp - 0xd24]
mov edx, dword [ebp + 0x14]
mov dword [edx + ecx*4], eax
jmp 0x54e791
mov eax, dword [ebp - 0xd24]
mov byte [ebp + eax - 0x108], 1
cmp dword [ebp - 0xd0c], 0xff
jge 0x54e8e7
mov eax, dword [ebp - 0xd24]
shl eax, 8
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
and eax, 0xffdfffff
mov dword [ebp - 0xd40], eax
mov eax, dword [ebp - 0xd24]
inc eax
shl eax, 8
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax*4]
and eax, 0xffdfffff
sub eax, dword [ebp - 0xd40]
mov dword [ebp - 0xd44], eax
and dword [ebp - 0xd3c], 0
mov eax, dword [ebp - 0xd44]
mov ecx, dword [ebp - 0xd3c]
sar eax, cl
cmp eax, 0xfffe
jle 0x54e85f
mov eax, dword [ebp - 0xd3c]
inc eax
mov dword [ebp - 0xd3c], eax
jmp 0x54e83b
mov eax, dword [ebp - 0xd44]
dec eax
mov dword [ebp - 0xd28], eax
jmp 0x54e87b
mov eax, dword [ebp - 0xd28]
dec eax
mov dword [ebp - 0xd28], eax
cmp dword [ebp - 0xd28], 0
jl 0x54e8e7
mov eax, dword [ebp - 0xd40]
add eax, dword [ebp - 0xd28]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + eax*4]
mov dword [ebp - 0xd4c], eax
mov eax, dword [ebp - 0xd28]
mov ecx, dword [ebp - 0xd3c]
sar eax, cl
mov word [ebp - 0xd48], ax
mov eax, dword [ebp - 0xd4c]
mov ecx, dword [ebp + 0x10]
mov dx, word [ebp - 0xd48]
mov word [ecx + eax*2], dx
cmp dword [ebp - 0xd4c], 0x22
jge 0x54e8e5
mov eax, dword [ebp - 0xd4c]
add eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x10]
mov dx, word [ebp - 0xd48]
mov word [ecx + eax*2], dx
jmp 0x54e86e
jmp 0x54e434
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.0058cc82
pop edi
pop esi
leave
ret