Function at 0x1801198c0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x80
mov rax, qword [rsp + 0x90]
mov eax, dword [rax + 0x13c]
sar eax, 8
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0xa0]
sar eax, 8
mov dword [rsp + 0x44], eax
mov rax, qword [rsp + 0x90]
mov eax, dword [rax + 0x10c]
cmp dword [rsp + 0x3c], eax
jl 0x180119921
mov rax, qword [rsp + 0x90]
mov eax, dword [rax + 0x10c]
cmp dword [rsp + 0x44], eax
jge 0x180119949
mov rax, qword [rsp + 0x90]
mov eax, dword [rax + 0x108]
cmp dword [rsp + 0x3c], eax
jge 0x18011994e
mov rax, qword [rsp + 0x90]
mov eax, dword [rax + 0x108]
cmp dword [rsp + 0x44], eax
jge 0x18011994e
jmp 0x18011a0ef
mov rax, qword [rsp + 0x90]
mov eax, dword [rax + 0x138]
sar eax, 8
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x98]
sar eax, 8
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x90]
mov eax, dword [rax + 0x138]
and eax, 0xff
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x90]
mov eax, dword [rax + 0x13c]
and eax, 0xff
mov dword [rsp + 0x2c], eax
mov rax, qword [rsp + 0x90]
mov eax, dword [rax + 0x138]
mov ecx, dword [rsp + 0x98]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x90]
mov eax, dword [rax + 0x13c]
mov ecx, dword [rsp + 0xa0]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x38], eax
jne 0x1801199f2
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x3c], eax
jne 0x1801199f2
jmp 0x18011a059
cmp dword [rsp + 0x24], 0
jne 0x180119a19
mov r8d, dword [rsp + 0x44]
mov edx, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x90]
call fcn.180119700
jmp 0x18011a0ef
cmp dword [rsp + 0x20], 0
jne 0x180119b8f
cmp dword [rsp + 0x24], 0
jle 0x180119adf
mov dword [rsp + 0x34], pe_nt_image_headers64
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x118]
mov ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x34]
sub edx, ecx
mov ecx, edx
add ecx, dword [rax + 4]
mov eax, ecx
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + 0x118]
mov dword [rcx + 4], eax
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x118]
mov ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x34]
sub edx, ecx
mov ecx, edx
mov edx, dword [rsp + 0x28]
shl edx, 1
imul ecx, edx
add ecx, dword [rax + 8]
mov eax, ecx
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + 0x118]
mov dword [rcx + 8], eax
mov dword [rsp + 0x2c], 0
mov eax, dword [rsp + 0x3c]
inc eax
mov dword [rsp + 0x3c], eax
mov r8d, dword [rsp + 0x3c]
mov edx, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x90]
call fcn.180119700
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x3c], eax
jne 0x180119a2f
jmp 0x180119b8a
mov dword [rsp + 0x34], 0
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x118]
mov ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x34]
sub edx, ecx
mov ecx, edx
add ecx, dword [rax + 4]
mov eax, ecx
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + 0x118]
mov dword [rcx + 4], eax
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x118]
mov ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x34]
sub edx, ecx
mov ecx, edx
mov edx, dword [rsp + 0x28]
shl edx, 1
imul ecx, edx
add ecx, dword [rax + 8]
mov eax, ecx
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + 0x118]
mov dword [rcx + 8], eax
mov dword [rsp + 0x2c], pe_nt_image_headers64
mov eax, dword [rsp + 0x3c]
dec eax
mov dword [rsp + 0x3c], eax
mov r8d, dword [rsp + 0x3c]
mov edx, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x90]
call fcn.180119700
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x3c], eax
jne 0x180119adf
jmp 0x18011a059
movsxd rax, dword [rsp + 0x20]
movsxd rcx, dword [rsp + 0x2c]
imul rax, rcx
movsxd rcx, dword [rsp + 0x24]
movsxd rdx, dword [rsp + 0x28]
imul rcx, rdx
sub rax, rcx
mov qword [rsp + 0x48], rax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x38], eax
je 0x180119bdf
movsxd rax, dword [rsp + 0x20]
mov qword [rsp + 0x60], rax
mov ecx, 0xffffffff
mov eax, ecx
cqo
mov rcx, qword [rsp + 0x60]
idiv rcx
mov qword [rsp + 0x68], rax
jmp 0x180119be8
mov qword [rsp + 0x68], 0
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x50], rax
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x3c], eax
je 0x180119c1e
movsxd rax, dword [rsp + 0x24]
mov qword [rsp + 0x70], rax
mov ecx, 0xffffffff
mov eax, ecx
cqo
mov rcx, qword [rsp + 0x70]
idiv rcx
mov qword [rsp + 0x78], rax
jmp 0x180119c27
mov qword [rsp + 0x78], 0
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x58], rax
imul eax, dword [rsp + 0x20], 0x100
cdqe
mov rcx, qword [rsp + 0x48]
sub rcx, rax
mov rax, rcx
test rax, rax
jle 0x180119d2e
cmp qword [rsp + 0x48], 0
jg 0x180119d2e
mov dword [rsp + 0x30], 0
mov rax, qword [rsp + 0x48]
neg rax
mov rcx, qword [rsp + 0x50]
neg rcx
imul rax, rcx
shr rax, 0x20
mov dword [rsp + 0x34], eax
imul eax, dword [rsp + 0x24], 0x100
cdqe
mov rcx, qword [rsp + 0x48]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x118]
mov ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x34]
sub edx, ecx
mov ecx, edx
add ecx, dword [rax + 4]
mov eax, ecx
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + 0x118]
mov dword [rcx + 4], eax
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x118]
mov ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x34]
sub edx, ecx
mov ecx, edx
mov edx, dword [rsp + 0x30]
mov r8d, dword [rsp + 0x28]
add r8d, edx
mov edx, r8d
imul ecx, edx
add ecx, dword [rax + 8]
mov eax, ecx
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + 0x118]
mov dword [rcx + 8], eax
mov dword [rsp + 0x28], pe_nt_image_headers64
mov eax, dword [rsp + 0x34]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x38]
dec eax
mov dword [rsp + 0x38], eax
jmp 0x18011a027
imul eax, dword [rsp + 0x20], 0x100
cdqe
mov rcx, qword [rsp + 0x48]
sub rcx, rax
mov rax, rcx
imul ecx, dword [rsp + 0x24], 0x100
movsxd rcx, ecx
add rax, rcx
test rax, rax
jle 0x180119e45
imul eax, dword [rsp + 0x20], 0x100
cdqe
mov rcx, qword [rsp + 0x48]
sub rcx, rax
mov rax, rcx
test rax, rax
jg 0x180119e45
imul eax, dword [rsp + 0x20], 0x100
cdqe
mov rcx, qword [rsp + 0x48]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
neg rax
imul rax, qword [rsp + 0x58]
shr rax, 0x20
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x34], pe_nt_image_headers64
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x118]
mov ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x34]
sub edx, ecx
mov ecx, edx
add ecx, dword [rax + 4]
mov eax, ecx
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + 0x118]
mov dword [rcx + 4], eax
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x118]
mov ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x34]
sub edx, ecx
mov ecx, edx
mov edx, dword [rsp + 0x30]
mov r8d, dword [rsp + 0x28]
add r8d, edx
mov edx, r8d
imul ecx, edx
add ecx, dword [rax + 8]
mov eax, ecx
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + 0x118]
mov dword [rcx + 8], eax
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x2c], 0
mov eax, dword [rsp + 0x3c]
inc eax
mov dword [rsp + 0x3c], eax
jmp 0x18011a027
imul eax, dword [rsp + 0x24], 0x100
cdqe
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
test rax, rax
jl 0x180119f59
imul eax, dword [rsp + 0x20], 0x100
cdqe
mov rcx, qword [rsp + 0x48]
sub rcx, rax
mov rax, rcx
imul ecx, dword [rsp + 0x24], 0x100
movsxd rcx, ecx
add rax, rcx
test rax, rax
jg 0x180119f59
imul eax, dword [rsp + 0x24], 0x100
cdqe
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x30], pe_nt_image_headers64
mov rax, qword [rsp + 0x48]
imul rax, qword [rsp + 0x50]
shr rax, 0x20
mov dword [rsp + 0x34], eax
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x118]
mov ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x34]
sub edx, ecx
mov ecx, edx
add ecx, dword [rax + 4]
mov eax, ecx
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + 0x118]
mov dword [rcx + 4], eax
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x118]
mov ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x34]
sub edx, ecx
mov ecx, edx
mov edx, dword [rsp + 0x30]
mov r8d, dword [rsp + 0x28]
add r8d, edx
mov edx, r8d
imul ecx, edx
add ecx, dword [rax + 8]
mov eax, ecx
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + 0x118]
mov dword [rcx + 8], eax
mov dword [rsp + 0x28], 0
mov eax, dword [rsp + 0x34]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x38]
inc eax
mov dword [rsp + 0x38], eax
jmp 0x18011a027
mov rax, qword [rsp + 0x58]
neg rax
mov rcx, qword [rsp + 0x48]
imul rcx, rax
mov rax, rcx
shr rax, 0x20
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x34], 0
imul eax, dword [rsp + 0x20], 0x100
cdqe
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x118]
mov ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x34]
sub edx, ecx
mov ecx, edx
add ecx, dword [rax + 4]
mov eax, ecx
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + 0x118]
mov dword [rcx + 4], eax
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x118]
mov ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x34]
sub edx, ecx
mov ecx, edx
mov edx, dword [rsp + 0x30]
mov r8d, dword [rsp + 0x28]
add r8d, edx
mov edx, r8d
imul ecx, edx
add ecx, dword [rax + 8]
mov eax, ecx
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + 0x118]
mov dword [rcx + 8], eax
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x2c], pe_nt_image_headers64
mov eax, dword [rsp + 0x3c]
dec eax
mov dword [rsp + 0x3c], eax
mov r8d, dword [rsp + 0x3c]
mov edx, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x90]
call fcn.180119700
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x38], eax
jne 0x180119c31
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x3c], eax
jne 0x180119c31
mov eax, dword [rsp + 0x98]
and eax, 0xff
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0xa0]
and eax, 0xff
mov dword [rsp + 0x34], eax
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x118]
mov ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x34]
sub edx, ecx
mov ecx, edx
add ecx, dword [rax + 4]
mov eax, ecx
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + 0x118]
mov dword [rcx + 4], eax
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x118]
mov ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x34]
sub edx, ecx
mov ecx, edx
mov edx, dword [rsp + 0x30]
mov r8d, dword [rsp + 0x28]
add r8d, edx
mov edx, r8d
imul ecx, edx
add ecx, dword [rax + 8]
mov eax, ecx
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + 0x118]
mov dword [rcx + 8], eax
mov rax, qword [rsp + 0x90]
mov ecx, dword [rsp + 0x98]
mov dword [rax + 0x138], ecx
mov rax, qword [rsp + 0x90]
mov ecx, dword [rsp + 0xa0]
mov dword [rax + 0x13c], ecx
add rsp, 0x80
pop rdi
ret