Function at 0x562810
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push 0xffffffffffffffff
push 0x5d9536
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb8
push ebx
push ebp
push esi
mov esi, ecx
lea eax, [esp + 0x10]
push edi
lea ecx, [esp + 0x10]
lea edi, [esi + 0xc]
push eax
push ecx
mov ecx, edi
mov dword [esp + 0x4c], esi
call fcn.00545350
mov eax, dword [esp + 0x10]
test eax, eax
je 0x562859
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x562866
mov eax, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov ecx, dword [esi + 8]
call fcn.004975d0
mov edx, dword [esi]
test al, al
jne 0x562893
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push 0
push eax
push ecx
mov ecx, esi
call dword [edx + 0x68]
test eax, eax
je 0x5628a2
mov eax, 1
jmp 0x562f98
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
push ecx
mov ecx, esi
call dword [edx + 0x38]
mov edx, dword [esi + 0x24]
mov ebx, dword [esi + 0x28]
push 0xffffffffffffffff
mov ecx, edi
mov dword [esp + 0x34], edx
mov dword [esp + 0x4c], ebx
call fcn.00544b40
push 0xffffff
mov ecx, edi
call fcn.00544b30
mov eax, dword [esi + 0x20]
push 4
mov ecx, edi
mov dword [esp + 0x38], eax
call fcn.00544ac0
mov ebp, dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
mov dword [esp + 0x24], ecx
mov ecx, edi
lea edx, [ebp*4]
mov dword [esp + 0x60], ebp
push edx
call fcn.00544b20
mov eax, dword [esp + 0x24]
lea ecx, [eax*4]
push ecx
mov ecx, edi
call fcn.00544b60
lea ecx, [esp + 0x38]
call fcn.00496760
mov ecx, dword [esp + 0x40]
push 1
mov dword [esp + 0xd4], 0
call fcn.00496c80
lea edx, [esp + 0x2c]
lea eax, [esp + 0x28]
push edx
push eax
mov ecx, edi
call fcn.00545350
mov eax, dword [esp + 0x28]
test eax, eax
je 0x562945
mov ecx, dword [esp + 0x2c]
test ecx, ecx
jne 0x562954
mov ecx, 1
mov eax, ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], eax
push ecx
mov ecx, dword [esp + 0x44]
push eax
call fcn.00496a80
test eax, eax
je 0x562981
lea ecx, [esp + 0x38]
mov dword [esp + 0xd0], 0xffffffff
call fcn.004969f0
mov eax, 2
jmp 0x562f98
mov ecx, dword [esp + 0x40]
call fcn.00496c90
mov ecx, dword [esi + 0x5c]
mov edx, dword [esi + 0x58]
shl ecx, 2
shl edx, 2
push ecx
push edx
push eax
mov ecx, edi
call fcn.00545200
mov eax, dword [edi + 0x44]
mov ecx, dword [edi + 0x48]
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], ecx
neg eax
push eax
push ecx
mov ecx, edi
call fcn.005451e0
lea ecx, [esp + 0x4c]
call fcn.00496760
mov ecx, dword [esp + 0x54]
push 1
mov byte [esp + 0xd4], 1
call fcn.00496c80
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push eax
push ecx
mov ecx, dword [esp + 0x5c]
call fcn.00496a80
test eax, eax
je 0x562a1b
lea ecx, [esp + 0x4c]
mov byte [esp + 0xd0], 0
call fcn.004969f0
lea ecx, [esp + 0x38]
mov dword [esp + 0xd0], 0xffffffff
call fcn.004969f0
mov eax, 2
jmp 0x562f98
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
sar eax, 2
sar ecx, 2
cmp eax, edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
jge 0x562a3d
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
cmp ecx, eax
jge 0x562a4b
mov eax, ecx
mov dword [esp + 0x14], eax
mov edi, dword [esp + 0x30]
xor edx, edx
mov dl, byte [esp + 0x32]
mov ecx, edi
and ecx, 0xff
and edi, 0xff00
shl ecx, 0x10
add edx, ecx
add edx, edi
xor edi, edi
test eax, eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x18], edi
jle 0x562c05
jmp 0x562a82
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x54]
mov esi, ecx
call fcn.00496c00
mov ecx, esi
mov ebx, eax
call fcn.00497810
mov edx, dword [ebx + 8]
mov ecx, dword [esp + 0x40]
imul edx, edi
mov esi, ecx
lea ebx, [eax + edx*4]
call fcn.00496c00
mov ecx, esi
mov ebp, eax
call fcn.00497810
mov esi, eax
mov eax, dword [ebp + 8]
imul eax, edi
mov ecx, dword [esp + 0x40]
shl eax, 4
add esi, eax
call fcn.00496c00
mov ecx, dword [eax + 8]
lea edi, [esi + ecx*4]
mov ecx, dword [esp + 0x40]
call fcn.00496c00
mov edx, dword [eax + 8]
mov ecx, dword [esp + 0x40]
lea ebp, [edi + edx*4]
call fcn.00496c00
mov eax, dword [eax + 8]
mov dword [esp + 0x1c], 0
lea ecx, [ebp + eax*4]
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x562be4
mov eax, dword [ecx + 0xc]
mov edx, dword [ecx + 8]
and edx, 0xff
and eax, 0xff
add eax, edx
mov edx, dword [ecx + 4]
and edx, 0xff
add ebx, 4
add eax, edx
mov edx, dword [ebp + 0xc]
and edx, 0xff
add esi, 0x10
add eax, edx
mov edx, dword [ebp + 8]
and edx, 0xff
add edi, 0x10
add eax, edx
mov edx, dword [ebp + 4]
and edx, 0xff
add ebp, 0x10
add eax, edx
mov edx, dword [edi - 4]
and edx, 0xff
add ecx, 0x10
add eax, edx
mov edx, dword [edi - 8]
and edx, 0xff
add eax, edx
mov edx, dword [edi - 0xc]
and edx, 0xff
add eax, edx
mov edx, dword [esi - 4]
and edx, 0xff
add eax, edx
mov edx, dword [esi - 8]
and edx, 0xff
add eax, edx
mov edx, dword [esi - 0xc]
and edx, 0xff
add eax, edx
mov edx, dword [edi - 0x10]
and edx, 0xff
add eax, edx
mov edx, dword [esi - 0x10]
and edx, 0xff
add eax, edx
mov edx, dword [ecx - 0x10]
and edx, 0xff
add eax, edx
mov edx, dword [ebp - 0x10]
and edx, 0xff
add eax, edx
mov edx, dword [esp + 0x20]
and eax, 0xff0
shl eax, 0x14
add eax, edx
mov dword [ebx - 4], eax
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
inc eax
cmp eax, edx
mov dword [esp + 0x1c], eax
jl 0x562b02
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x562a7e
mov esi, dword [esp + 0x44]
mov ebp, dword [esp + 0x60]
mov ebx, dword [esp + 0x48]
lea edi, [esi + 0xc]
push ebp
mov ecx, edi
call fcn.00544b20
mov eax, dword [esp + 0x24]
mov ecx, edi
push eax
call fcn.00544b60
cmp ebx, 0xffffffff
je 0x562eb2
lea ecx, [esp + 0x64]
call fcn.00560e50
mov ecx, dword [0x5da354]
lea edx, [edi + 4]
push ecx
push 0
push edx
lea ecx, [esp + 0x80]
mov byte [esp + 0xdc], 2
call fcn.00403f40
mov eax, dword [edi + 0x14]
mov edx, dword [edi + 0x1c]
mov ecx, dword [edi + 0x18]
mov dword [esp + 0x84], eax
mov eax, dword [edi + 0x20]
mov dword [esp + 0x8c], edx
mov edx, dword [0x5da354]
mov dword [esp + 0x88], ecx
mov ecx, dword [edi + 0x24]
mov dword [esp + 0x90], eax
push edx
lea eax, [edi + 0x28]
mov dword [esp + 0x98], ecx
push 0
push eax
lea ecx, [esp + 0xa4]
call fcn.00403f40
mov ecx, dword [edi + 0x38]
mov edx, dword [edi + 0x3c]
mov al, byte [edi + 0x40]
mov dword [esp + 0xa8], ecx
mov cl, byte [edi + 0x41]
mov dword [esp + 0xac], edx
mov dl, byte [edi + 0x42]
mov byte [esp + 0xb1], cl
mov ecx, dword [edi + 0x48]
mov byte [esp + 0xb0], al
mov eax, dword [edi + 0x44]
mov dword [esp + 0xb8], ecx
push ebx
lea ecx, [esp + 0x74]
mov byte [esp + 0xb6], dl
mov dword [esp + 0xb8], eax
call fcn.00544b30
push 0xffffffffffffffff
lea ecx, [esp + 0x74]
call fcn.00544b40
mov edx, dword [esp + 0xb4]
mov eax, dword [esp + 0xb8]
lea ecx, [esp + 0x64]
mov dword [esp + 0xbc], edx
mov dword [esp + 0xc0], eax
call fcn.005613c0
mov eax, dword [esp + 0x14]
xor edi, edi
test eax, eax
mov dword [esp + 0x20], edi
jle 0x562e88
mov ecx, dword [esp + 0x54]
mov ebx, ecx
call fcn.00496c00
mov ecx, ebx
mov ebp, eax
call fcn.00497810
mov ecx, dword [ebp + 8]
imul ecx, edi
lea edx, [eax + ecx*4]
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x18], edx
mov ebx, ecx
call fcn.00496c00
mov ecx, ebx
mov ebp, eax
call fcn.00497810
mov ecx, dword [ebp + 8]
mov dword [esp + 0x24], 0
imul ecx, edi
lea edx, [eax + ecx*4]
mov eax, dword [esp + 0x10]
test eax, eax
mov dword [esp + 0x1c], edx
jle 0x562e73
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
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 0x562e3d
test ebx, ebx
jne 0x562dca
mov edx, dword [esp + 0x1c]
mov dword [edx], ecx
jmp 0x562e3d
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 + 0x1c]
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 + 0x1c]
mov eax, dword [eax]
and eax, 0xff
imul eax, ebx
add eax, ecx
mov ecx, dword [esp + 0x18]
div edi
shl edi, 0x18
add ebp, eax
add ebp, edi
mov dword [ecx], ebp
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov eax, 4
add edi, eax
add esi, eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x18], edi
inc eax
mov dword [esp + 0x1c], esi
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x562d82
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x44]
mov eax, dword [esp + 0x14]
inc edi
cmp edi, eax
mov dword [esp + 0x20], edi
jl 0x562d2c
mov ebx, dword [esp + 0x48]
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 edi, [esi + 0xc]
push edx
mov ecx, edi
call fcn.00544ac0
mov eax, dword [esp + 0x30]
mov ecx, edi
push eax
call fcn.00544b30
push ebx
mov ecx, edi
call fcn.00544b40
mov edx, dword [esi]
lea eax, [esp + 0x18]
lea ecx, [esp + 0x20]
push eax
push ecx
mov ecx, esi
call dword [edx + 0x38]
mov eax, dword [esp + 0x14]
xor ebx, ebx
test eax, eax
jle 0x562f4f
mov ecx, dword [esi + 8]
call fcn.00497810
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x54]
sub edx, ebx
mov ebp, ecx
lea edi, [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, ebx
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x10]
test edx, edx
jle 0x562f46
mov edx, dword [eax]
add eax, 4
mov dword [edi], edx
mov edx, dword [esp + 0x20]
inc ecx
lea edi, [edi + edx*4]
mov edx, dword [esp + 0x10]
cmp ecx, edx
jl 0x562f2f
mov eax, dword [esp + 0x14]
inc ebx
cmp ebx, eax
jl 0x562ef0
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
push eax
push ecx
lea ecx, [esi + 0xc]
call fcn.005451e0
mov esi, dword [esi + 8]
mov ecx, esi
mov edx, dword [esi]
call dword [edx + 0x90]
lea ecx, [esp + 0x4c]
mov byte [eax], 1
mov byte [esp + 0xd0], 0
call fcn.004969f0
lea ecx, [esp + 0x38]
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