Function at 0x54fb6a
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, 0x5e964c
call 0x60799c
sub esp, 0xb4
mov eax, dword [ebp + 0x18]
push ebx
and eax, 2
push esi
cmp al, 2
push edi
sete byte [ebp - 0x38]
xor ebx, ebx
mov edi, ecx
cmp byte [ebp - 0x38], bl
mov dword [ebp - 0x20], edi
jne 0x54fba5
cmp dword [ebp + 0x14], ebx
jne 0x54fba5
mov dword [edi], 5
jmp 0x5501b0
mov eax, dword [ebp + 0x10]
mov dword [edi], ebx
mov esi, dword [ebp + 8]
mov dword [ebp - 0x84], ebx
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x80], ebx
mov dword [eax], ebx
mov al, byte [ebp + 0x18]
and al, 1
mov dword [ebp - 0x8e], ebx
mov byte [ebp - 0x11], al
lea eax, [ebp - 0x74]
push eax
push 0x102
push esi
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x64], ebx
call fcn.00568193
add esp, 0xc
cmp word [ebp - 0x74], 1
je 0x54fbfe
mov dword [edi], 0x1c
jmp 0x5501b0
lea eax, [ebp - 0x78]
push eax
push 0x115
push esi
call fcn.00568193
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x7c]
push eax
push 0x152
push esi
call fcn.00568193
movzx eax, word [ebp - 0x78]
movzx ecx, word [ebp - 0x7c]
sub eax, ecx
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x8e]
push eax
push 0x103
push esi
call fcn.00568193
lea eax, [ebp - 0x80]
push eax
push 0x11c
push esi
call fcn.00568193
lea eax, [ebp - 0x64]
push eax
push 0x106
push esi
call fcn.00565305
add esp, 0x40
test eax, eax
jne 0x54fc90
mov eax, dword [ebp - 0x40]
dec eax
je 0x54fc80
push 0x649bb4
push 3
call fcn.005c32e1
pop ecx
pop ecx
jmp 0x54fbf3
push esi
mov ecx, edi
call fcn.0055032b
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x64], eax
lea eax, [ebp - 0x1c]
push eax
push 0x100
push esi
call fcn.00565305
lea eax, [ebp - 0x10]
push eax
push 0x101
push esi
call fcn.00565305
lea eax, [ebp - 0x4c]
push eax
push 0x112
push esi
call fcn.00568193
add esp, 0x24
cmp byte [ebp - 0x11], bl
je 0x54fccc
mov dword [ebp - 0x4c], 1
lea eax, [ebp - 0x70]
mov ecx, edi
push eax
lea eax, [ebp - 0x66]
push eax
lea eax, [ebp - 0x65]
push eax
movzx eax, word [ebp - 0x4c]
push eax
call fcn.0054ef8d
lea eax, [ebp - 0x8a]
push eax
push 0x128
push esi
call fcn.00565305
lea eax, [ebp - 0xa4]
push eax
push 0x11a
push esi
call fcn.00565305
lea eax, [ebp - 0xa0]
push eax
push 0x11b
push esi
call fcn.00565305
add esp, 0x24
cmp word [ebp - 0x80], 2
jne 0x54fd2e
cmp dword [ebp - 0x40], 1
jg 0x54fbf3
push esi
mov byte [ebp - 0x11], bl
call fcn.0056f053
test eax, eax
pop ecx
je 0x54fd40
mov byte [ebp - 0x11], 1
lea ecx, [ebp - 0x88]
call fcn.00552e75
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x44], ebx
lea esi, [eax + 7]
shr esi, 3
cmp byte [ebp - 0x38], bl
je 0x54fd6c
lea esi, [eax + 0x1f]
mov dword [ebp - 0x44], 0x30
shr esi, 5
shl esi, 2
mov eax, esi
mov dword [ebp - 0x54], esi
imul eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x44]
cmp dword [ebp - 0x70], 0xffffffff
mov ecx, eax
je 0x54fdab
mov edx, dword [ebp - 0x10]
lea ecx, [edx + 7]
shr ecx, 3
cmp byte [ebp - 0x38], bl
mov dword [ebp - 0x54], ecx
je 0x54fd9d
lea ecx, [edx + 0x1f]
shr ecx, 5
shl ecx, 2
mov dword [ebp - 0x54], ecx
imul ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x44]
mov dword [ebp - 0x40], eax
cmp eax, ecx
ja 0x54fdae
mov dword [ebp - 0x40], ecx
lea ecx, [ebp - 0x60]
call fcn.00550461
push dword [ebp - 0x40]
lea ecx, [ebp - 0x60]
call fcn.0055046d
mov eax, dword [ebp - 0x58]
cmp eax, ebx
jne 0x54fdd3
mov dword [edi], 1
jmp 0x5501b0
cmp byte [ebp - 0x38], bl
mov dword [ebp - 0x24], eax
je 0x54fde3
mov ecx, dword [ebp - 0x44]
add eax, ecx
mov dword [ebp - 0x24], eax
push dword [ebp - 0x10]
mov ecx, edi
push 1
call fcn.00550307
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x18]
shr eax, 3
and al, 1
cmp byte [ebp - 0x11], bl
mov byte [ebp + 0x1b], al
jne 0x54ff7c
mov eax, dword [ebp - 0x1c]
push dword [ebp + 8]
mov dword [ebp - 0x28], eax
mov eax, esi
neg eax
add eax, eax
mov dword [ebp - 0x6c], eax
call fcn.0056eb31
push eax
call fcn.0056dcb6
pop ecx
cmp eax, ebx
pop ecx
mov dword [ebp - 0x3c], eax
jne 0x54fe4d
push 0x649b98
push dword [ebp + 8]
call fcn.0056f04c
pop ecx
push eax
call fcn.0056ebce
pop ecx
mov dword [edi], 1
pop ecx
jmp 0x5500f3
lea eax, [ebp - 0x50]
push eax
push 0x116
push dword [ebp + 8]
call fcn.00568193
push dword [ebp + 8]
call fcn.0056eb78
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x28]
mov ecx, eax
add esp, 0x10
sub ecx, dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], eax
sbb eax, eax
and eax, ecx
cmp byte [ebp + 0x1b], bl
mov dword [ebp - 0x30], eax
je 0x54fe86
mov dword [ebp - 0x6c], ebx
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], ebx
cmp eax, ebx
jbe 0x5500df
mov ecx, dword [ebp - 0x50]
mov edi, 0x66bdb8
mov edx, dword [ebp - 0x18]
add edx, ecx
cmp edx, eax
jbe 0x54fead
sub eax, dword [ebp - 0x18]
mov dword [ebp - 0x28], eax
jmp 0x54feb0
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x28]
imul eax, dword [ebp - 0x48]
push eax
push dword [ebp - 0x3c]
push ebx
push dword [ebp - 0x18]
push dword [ebp + 8]
call fcn.0056e955
add esp, 0xc
push eax
push dword [ebp + 8]
call fcn.0056dd15
add esp, 0x10
test eax, eax
jge 0x54fee3
mov eax, dword [ebp - 0x20]
mov dword [eax], 0x14
mov eax, dword [ebp - 0x2c]
imul eax, esi
add eax, dword [ebp - 0x24]
cmp byte [ebp + 0x1b], bl
je 0x54fefe
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x2c]
dec eax
imul eax, esi
add eax, dword [ebp - 0x24]
push dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x20]
push dword [ebp - 0x6c]
push dword [ebp - 0x30]
push dword [ebp - 0x28]
push esi
push dword [ebp - 0x48]
push eax
call fcn.005502b1
mov eax, dword [ebp - 0x28]
mov ecx, edi
sub dword [ebp - 0x2c], eax
call fcn.0053c623
cmp dword [eax + 4], 1
jne 0x54ff5b
mov ecx, edi
call fcn.0053c623
cmp dword [eax], ebx
je 0x54ff5b
mov ecx, edi
call fcn.0053c623
mov ecx, edi
mov dword [ebp - 0x28], eax
call fcn.0053c623
push dword [eax + 8]
mov eax, dword [ebp - 0x28]
push dword [ebp - 0x10]
push dword [ebp - 0x18]
call dword [eax]
neg eax
sbb eax, eax
inc eax
jmp 0x54ff5d
xor eax, eax
cmp eax, ebx
jne 0x5500d3
mov ecx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x10]
add dword [ebp - 0x18], ecx
cmp dword [ebp - 0x18], eax
jb 0x54fe9c
jmp 0x5500dc
lea ecx, [ebp - 0xc0]
call fcn.005531a3
lea eax, [ebp - 0x50]
push eax
push 0x142
push dword [ebp + 8]
call fcn.00565305
lea eax, [ebp - 0x2c]
push eax
push 0x143
push dword [ebp + 8]
call fcn.00565305
push dword [ebp + 8]
call fcn.0056e906
push eax
call fcn.0056dcb6
add esp, 0x20
cmp eax, ebx
mov dword [ebp - 0x3c], eax
jne 0x54ffcb
push 0x649b7c
jmp 0x54fe31
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x18], ebx
cmp ecx, ebx
jbe 0x5500df
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0x2c]
xor edx, edx
div edi
mov eax, dword [ebp - 0x18]
sub edi, edx
lea edx, [edi + eax]
cmp edx, ecx
jbe 0x54fff6
sub ecx, eax
mov dword [ebp - 0x48], ecx
jmp 0x54fff9
mov dword [ebp - 0x48], edi
xor edi, edi
cmp dword [ebp - 0x1c], ebx
jbe 0x550074
mov al, byte [ebp + 0x1b]
neg al
sbb eax, eax
and al, 0xf8
add eax, 8
mov dword [ebp - 0x30], eax
push ebx
push ebx
push dword [ebp - 0x18]
push edi
push dword [ebp - 0x3c]
push dword [ebp + 8]
call fcn.0056e03b
add esp, 0x18
test eax, eax
jge 0x550030
mov eax, dword [ebp - 0x20]
mov dword [eax], 0x14
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x2c]
cmp byte [ebp + 0x1b], bl
je 0x550041
mov eax, dword [ebp - 0x18]
push dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x50]
push edi
lea ecx, [eax + 7]
shr ecx, 3
push ecx
lea ecx, [ebp - 0xc0]
push dword [ebp - 0x2c]
push eax
push dword [ebp - 0x3c]
push esi
push dword [ebp - 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x24]
call fcn.005534f2
add edi, dword [ebp - 0x50]
cmp edi, dword [ebp - 0x1c]
jb 0x55000f
mov edi, 0x66bdb8
mov ecx, edi
call fcn.0053c623
cmp dword [eax + 4], 1
jne 0x5500b7
mov ecx, edi
call fcn.0053c623
cmp dword [eax], ebx
je 0x5500b7
mov ecx, edi
call fcn.0053c623
mov ecx, edi
mov dword [ebp - 0x30], eax
call fcn.0053c623
push dword [eax + 8]
mov eax, dword [ebp - 0x30]
push dword [ebp - 0x10]
push dword [ebp - 0x18]
call dword [eax]
neg eax
sbb eax, eax
inc eax
jmp 0x5500b9
xor eax, eax
cmp eax, ebx
jne 0x5500d3
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
add eax, dword [ebp - 0x48]
cmp eax, ecx
mov dword [ebp - 0x18], eax
jb 0x54ffd9
jmp 0x5500dc
mov eax, dword [ebp - 0x20]
mov dword [eax], 0xe
mov edi, dword [ebp - 0x20]
push dword [ebp - 0x3c]
call fcn.0056dcbb
mov eax, dword [edi]
pop ecx
cmp eax, ebx
je 0x550100
cmp eax, 0x14
je 0x550100
lea ecx, [ebp - 0x60]
call fcn.0055056a
jmp 0x550298
cmp dword [ebp - 0x70], 0xffffffff
jne 0x550125
push dword [ebp - 0x38]
lea eax, [ebp - 0x10]
mov ecx, edi
push esi
push 1
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x4c]
call fcn.0054f026
mov dword [edi], eax
jmp 0x5501a4
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], ebx
mov eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x34]
sub eax, dword [ebp - 0x44]
mov dword [ebp - 4], ebx
push eax
mov dword [ebp + 0x18], eax
call fcn.0055d1fd
xor eax, eax
cmp dword [ebp - 0x34], ebx
jle 0x550153
mov ecx, dword [ebp - 0x30]
mov byte [ecx + eax], bl
inc eax
cmp eax, dword [ebp - 0x34]
jl 0x550147
cmp dword [ebp - 0x30], ebx
jne 0x550160
mov dword [edi], 1
jmp 0x550198
push dword [ebp - 0x38]
lea eax, [ebp - 0x10]
mov ecx, edi
push dword [ebp - 0x54]
push esi
push 1
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x30]
push dword [ebp - 0x24]
push dword [ebp - 0x4c]
call fcn.0054f1b1
push dword [ebp + 0x18]
mov dword [edi], eax
push dword [ebp - 0x30]
push dword [ebp - 0x24]
call dword [0x66bd5c]
mov esi, dword [ebp - 0x54]
add esp, 0xc
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.005414f2
cmp dword [edi], ebx
je 0x5501b7
lea ecx, [ebp - 0x60]
call fcn.0055056a
xor eax, eax
jmp 0x5502a0
cmp word [ebp - 0x64], 1
jne 0x5501e0
mov eax, esi
xor ecx, ecx
imul eax, dword [ebp - 0x10]
test eax, eax
jbe 0x5501e0
mov eax, dword [ebp - 0x24]
or dl, 0xff
sub dl, byte [eax]
mov byte [eax], dl
mov edx, esi
imul edx, dword [ebp - 0x10]
inc eax
inc ecx
cmp ecx, edx
jb 0x5501cd
cmp byte [ebp - 0x38], bl
je 0x550271
lea eax, [ebp - 0x9c]
mov ecx, edi
push eax
push dword [ebp + 8]
call fcn.0054f383
push 4
lea eax, [ebp - 0x9c]
push 1
push eax
lea ecx, [ebp - 0x88]
call fcn.00540f5d
mov eax, dword [ebp - 0x58]
mov dword [eax], 0x28
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0x10]
mov dword [eax + 8], ecx
mov word [eax + 0xc], 1
mov word [eax + 0xe], 1
mov dword [eax + 0x10], ebx
imul esi, dword [ebp - 0x10]
mov dword [eax + 0x14], esi
mov ecx, dword [ebp - 0x9c]
mov dword [eax + 0x18], ecx
mov ecx, dword [ebp - 0x98]
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], 2
mov dword [eax + 0x24], ebx
mov eax, dword [ebp - 0x58]
or byte [eax + 0x28], 0xff
or byte [eax + 0x29], 0xff
or byte [eax + 0x2a], 0xff
mov byte [eax + 0x2c], bl
mov byte [eax + 0x2d], bl
mov byte [eax + 0x2e], bl
jmp 0x550288
mov eax, dword [ebp + 0x14]
or byte [eax], 0xff
or byte [eax + 1], 0xff
or byte [eax + 2], 0xff
mov byte [eax + 4], bl
mov byte [eax + 5], bl
mov byte [eax + 6], bl
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x1c]
mov dword [ecx], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
lea ecx, [ebp - 0x60]
call fcn.005505ce
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x14