Function at 0x562140
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push 0xffffffffffffffff
push 0x5d9506
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb8
push ebx
push ebp
mov ebx, ecx
push esi
lea eax, [esp + 0x10]
push edi
lea ecx, [esp + 0x10]
lea esi, [ebx + 0xc]
push eax
push ecx
mov ecx, esi
mov dword [esp + 0x60], ebx
call fcn.00545350
mov eax, dword [esp + 0x10]
test eax, eax
je 0x562189
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x562196
mov eax, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov ecx, dword [ebx + 8]
call fcn.004975d0
mov edx, dword [ebx]
test al, al
jne 0x5621c3
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push 0
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x68]
test eax, eax
je 0x5621d2
mov eax, 1
jmp 0x5627eb
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x38]
mov edx, dword [ebx + 0x24]
mov edi, dword [ebx + 0x28]
push 0xffffffffffffffff
mov ecx, esi
mov dword [esp + 0x34], edx
mov dword [esp + 0x3c], edi
call fcn.00544b40
push 0xffffff
mov ecx, esi
call fcn.00544b30
mov eax, dword [ebx + 0x20]
push 4
mov ecx, esi
mov dword [esp + 0x38], eax
call fcn.00544ac0
mov eax, dword [ebx + 0x30]
mov ebp, dword [ebx + 0x44]
mov dword [esp + 0x18], eax
mov dword [esp + 0x54], ebp
lea ecx, [eax + eax]
push ecx
mov ecx, esi
call fcn.00544b20
lea edx, [ebp + ebp]
mov ecx, esi
push edx
call fcn.00544b60
lea ecx, [esp + 0x3c]
call fcn.00496760
mov ecx, dword [esp + 0x44]
xor ebp, ebp
push 1
mov dword [esp + 0xd4], ebp
call fcn.00496c80
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x28]
push eax
push ecx
mov ecx, esi
call fcn.00545350
mov eax, dword [esp + 0x28]
cmp eax, ebp
je 0x562268
mov ecx, dword [esp + 0x2c]
cmp ecx, ebp
jne 0x562277
mov ecx, 1
mov eax, ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], eax
push ecx
mov ecx, dword [esp + 0x48]
push eax
call fcn.00496a80
test eax, eax
je 0x5622a4
lea ecx, [esp + 0x3c]
mov dword [esp + 0xd0], 0xffffffff
call fcn.004969f0
mov eax, 2
jmp 0x5627eb
mov ecx, dword [esp + 0x44]
call fcn.00496c90
mov edx, dword [ebx + 0x5c]
mov ecx, dword [ebx + 0x58]
shl edx, 1
shl ecx, 1
push edx
push ecx
push eax
mov ecx, esi
call fcn.00545200
mov eax, dword [esi + 0x44]
mov ecx, dword [esi + 0x48]
mov dword [esp + 0x60], eax
mov dword [esp + 0x5c], ecx
neg eax
push eax
push ecx
mov ecx, esi
call fcn.005451e0
lea ecx, [esp + 0x48]
call fcn.00496760
mov ecx, dword [esp + 0x50]
push 1
mov byte [esp + 0xd4], 1
call fcn.00496c80
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x50]
push edx
push eax
call fcn.00496a80
test eax, eax
je 0x56233c
lea ecx, [esp + 0x48]
mov byte [esp + 0xd0], 0
call fcn.004969f0
lea ecx, [esp + 0x3c]
mov dword [esp + 0xd0], 0xffffffff
call fcn.004969f0
mov eax, 2
jmp 0x5627eb
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
sar eax, 1
sar ecx, 1
cmp eax, edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
jge 0x56235c
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
cmp ecx, eax
jge 0x56236a
mov eax, ecx
mov dword [esp + 0x14], eax
mov esi, dword [esp + 0x30]
xor ecx, ecx
mov cl, byte [esp + 0x32]
mov edx, esi
and edx, 0xff
and esi, 0xff00
shl edx, 0x10
add ecx, edx
mov dword [esp + 0x20], ebp
add ecx, esi
test eax, eax
mov dword [esp + 0x24], ecx
jle 0x562455
mov ecx, dword [esp + 0x50]
mov esi, ecx
call fcn.00496c00
mov ecx, esi
mov edi, eax
call fcn.00497810
mov ecx, dword [edi + 8]
imul ecx, ebp
lea edi, [eax + ecx*4]
mov ecx, dword [esp + 0x44]
mov esi, ecx
call fcn.00496c00
mov ecx, esi
mov dword [esp + 0x1c], eax
call fcn.00497810
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx + 8]
imul ecx, ebp
lea esi, [eax + ecx*8]
mov ecx, dword [esp + 0x44]
call fcn.00496c00
mov edx, dword [eax + 8]
mov eax, dword [esp + 0x10]
lea ecx, [esi + edx*4]
xor edx, edx
test eax, eax
jle 0x562440
mov eax, dword [ecx + 4]
mov ebp, dword [esi + 4]
and eax, 0xff
and ebp, 0xff
add eax, ebp
mov ebp, dword [ecx]
and ebp, 0xff
add edi, 4
add eax, ebp
mov ebp, dword [esi]
and ebp, 0xff
add esi, 8
add eax, ebp
mov ebp, dword [esp + 0x24]
and eax, 0x3fc
add ecx, 8
shl eax, 0x16
add eax, ebp
inc edx
mov dword [edi - 4], eax
mov eax, dword [esp + 0x10]
cmp edx, eax
jl 0x5623f2
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
inc ebp
cmp ebp, eax
mov dword [esp + 0x20], ebp
jl 0x562399
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
lea esi, [ebx + 0xc]
push eax
mov ecx, esi
call fcn.00544b20
mov ecx, dword [esp + 0x54]
push ecx
mov ecx, esi
call fcn.00544b60
cmp edi, 0xffffffff
je 0x562705
lea ecx, [esp + 0x64]
call fcn.00560e50
mov edx, dword [0x5da354]
lea eax, [esi + 4]
push edx
push 0
push eax
lea ecx, [esp + 0x80]
mov byte [esp + 0xdc], 2
call fcn.00403f40
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
mov edx, dword [esi + 0x18]
mov dword [esp + 0x84], ecx
mov ecx, dword [esi + 0x20]
mov dword [esp + 0x8c], eax
mov eax, dword [0x5da354]
mov dword [esp + 0x90], ecx
push eax
lea ecx, [esi + 0x28]
mov dword [esp + 0x8c], edx
mov edx, dword [esi + 0x24]
push 0
push ecx
lea ecx, [esp + 0xa4]
mov dword [esp + 0xa0], edx
call fcn.00403f40
mov edx, dword [esi + 0x38]
mov cl, byte [esi + 0x40]
mov eax, dword [esi + 0x3c]
mov dword [esp + 0xa8], edx
mov dl, byte [esi + 0x41]
mov byte [esp + 0xb0], cl
mov ecx, dword [esi + 0x44]
mov dword [esp + 0xac], eax
mov al, byte [esi + 0x42]
mov byte [esp + 0xb1], dl
mov edx, dword [esi + 0x48]
mov dword [esp + 0xb4], ecx
push edi
lea ecx, [esp + 0x74]
mov byte [esp + 0xb6], al
mov dword [esp + 0xbc], edx
call fcn.00544b30
push 0xffffffffffffffff
lea ecx, [esp + 0x74]
call fcn.00544b40
mov ecx, dword [esp + 0xb8]
mov eax, dword [esp + 0xb4]
mov dword [esp + 0xc0], ecx
lea ecx, [esp + 0x64]
mov dword [esp + 0xbc], eax
call fcn.00561250
mov eax, dword [esp + 0x14]
xor esi, esi
test eax, eax
mov dword [esp + 0x1c], esi
jle 0x5626db
mov ecx, dword [esp + 0x50]
mov edi, ecx
call fcn.00496c00
mov ecx, edi
mov ebp, eax
call fcn.00497810
mov edx, dword [ebp + 8]
mov ecx, dword [esp + 0x6c]
imul edx, esi
mov edi, ecx
lea eax, [eax + edx*4]
mov dword [esp + 0x20], eax
call fcn.00496c00
mov ecx, edi
mov ebp, eax
call fcn.00497810
mov ecx, dword [ebp + 8]
mov dword [esp + 0x24], 0
imul ecx, esi
lea edx, [eax + ecx*4]
mov eax, dword [esp + 0x10]
test eax, eax
mov dword [esp + 0x18], edx
jle 0x5626c6
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
mov ecx, dword [eax]
mov ebp, dword [edx]
mov esi, ecx
mov edi, ebp
shr esi, 0x18
mov eax, 0xff
shr edi, 0x18
sub eax, esi
imul edi, eax
mov eax, 0x80808081
imul edi
add edx, edi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov ebx, edx
lea edi, [ebx + esi]
test edi, edi
je 0x562690
test ebx, ebx
jne 0x56261d
mov edx, dword [esp + 0x18]
mov dword [edx], ecx
jmp 0x562690
mov eax, ebp
mov edx, ecx
and eax, 0xff0000
and edx, 0xff0000
imul eax, ebx
imul edx, esi
add eax, edx
xor edx, edx
div edi
mov edx, ecx
and ecx, 0xff
and edx, 0xff00
imul ecx, esi
imul edx, esi
mov ebp, eax
mov eax, dword [esp + 0x18]
and ebp, 0xff0000
mov eax, dword [eax]
and eax, 0xff00
imul eax, ebx
add eax, edx
xor edx, edx
div edi
xor edx, edx
and eax, 0xff00
add ebp, eax
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
and eax, 0xff
imul eax, ebx
add eax, ecx
mov ecx, dword [esp + 0x20]
div edi
shl edi, 0x18
add ebp, eax
add ebp, edi
mov dword [ecx], ebp
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov eax, 4
add edi, eax
add esi, eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x20], edi
inc eax
mov dword [esp + 0x18], esi
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x5625d5
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x58]
mov eax, dword [esp + 0x14]
inc esi
cmp esi, eax
mov dword [esp + 0x1c], esi
jl 0x56257f
mov edi, dword [esp + 0x38]
mov dword [esp + 0x64], 0x5db48c
lea ecx, [esp + 0x70]
mov byte [esp + 0xd0], 3
call fcn.00544a40
lea ecx, [esp + 0x64]
mov byte [esp + 0xd0], 1
call fcn.004969f0
mov edx, dword [esp + 0x34]
lea esi, [ebx + 0xc]
push edx
mov ecx, esi
call fcn.00544ac0
mov eax, dword [esp + 0x30]
mov ecx, esi
push eax
call fcn.00544b30
push edi
mov ecx, esi
call fcn.00544b40
mov edx, dword [ebx]
lea eax, [esp + 0x24]
lea ecx, [esp + 0x1c]
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x38]
mov eax, dword [esp + 0x14]
xor edi, edi
test eax, eax
jle 0x5627a2
mov ecx, dword [ebx + 8]
call fcn.00497810
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x50]
sub edx, edi
mov ebp, ecx
lea esi, [eax + edx*4 - 4]
call fcn.00496c00
mov ecx, ebp
mov dword [esp + 0x34], eax
call fcn.00497810
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 8]
xor ecx, ecx
imul edx, edi
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x10]
test edx, edx
jle 0x562799
mov edx, dword [eax]
add eax, 4
mov dword [esi], edx
mov edx, dword [esp + 0x1c]
inc ecx
lea esi, [esi + edx*4]
mov edx, dword [esp + 0x10]
cmp ecx, edx
jl 0x562782
mov eax, dword [esp + 0x14]
inc edi
cmp edi, eax
jl 0x562743
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x60]
push eax
push ecx
lea ecx, [ebx + 0xc]
call fcn.005451e0
mov ebx, dword [ebx + 8]
mov ecx, ebx
mov edx, dword [ebx]
call dword [edx + 0x90]
lea ecx, [esp + 0x48]
mov byte [eax], 1
mov byte [esp + 0xd0], 0
call fcn.004969f0
lea ecx, [esp + 0x3c]
mov dword [esp + 0xd0], 0xffffffff
call fcn.004969f0
xor eax, eax
mov ecx, dword [esp + 0xc8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xc4
ret