Function at 0x180004895
Capabilities:
Encrypt data using rc4 prga
Query environment variable

Disassembly:
jmp 0x18013cda0
push rbp
push r12
push r13
push r14
push r15
mov eax, 0x50
call fcn.180001055
sub rsp, rax
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x40], rbx
mov qword [rbp + 0x48], rsi
mov qword [rbp + 0x50], rdi
mov rax, qword [0x1802946b8]
xor rax, rbp
mov qword [rbp], rax
mov r15, rdx
lea rdi, str.RANDFILE
mov rsi, rcx
xor r8d, r8d
mov rcx, rdi
xor edx, edx
mov r12d, 1
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
xor r13d, r13d
mov ebx, eax
test eax, eax
jne 0x18013ce58
lea rdi, str.HOME
xor r8d, r8d
mov rcx, rdi
xor edx, edx
mov r12d, r13d
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebx, eax
test eax, eax
jne 0x18013ce58
lea rdi, str.USERPROFILE
xor r8d, r8d
mov rcx, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebx, eax
test eax, eax
jne 0x18013ce58
lea rdi, str.SYSTEMROOT
xor r8d, r8d
mov rcx, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebx, eax
test eax, eax
je 0x18013cfe1
mov eax, ebx
movabs rdx, 0xffffffffffffff0
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x18013ce73
mov rcx, rdx
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.180001055
sub rsp, rcx
mov r8d, ebx
mov rcx, rdi
lea r14, [rsp + 0x40]
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, ebx
jae 0x18013cfe1
mov qword [rsp + 0x38], r13
mov rdi, 0xffffffffffffffff
mov qword [rsp + 0x30], r13
mov r9d, edi
mov dword [rsp + 0x28], r13d
mov r8, r14
xor edx, edx
mov qword [rsp + 0x20], r13
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd rdx, eax
test eax, eax
je 0x18013cfe1
lea rax, [rdx + 0xf]
cmp rax, rdx
ja 0x18013ceea
movabs rax, 0xffffffffffffff0
and rax, 0xfffffffffffffff0
call fcn.180001055
sub rsp, rax
mov r9d, edi
mov r8, r14
mov ecx, 0xfde9
mov qword [rsp + 0x38], r13
lea rbx, [rsp + 0x40]
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], edx
xor edx, edx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x18013cfe1
test rbx, rbx
je 0x18013cfe1
cmp byte [rbx], r13b
je 0x18013cfe1
nop dword [rax + rax]
cmp byte [rbx + rdi + 1], r13b
lea rdi, [rdi + 1]
jne 0x18013cf40
test r12d, r12d
je 0x18013cf83
lea rax, [rdi + 1]
cmp rax, r15
jae 0x18013cfe1
mov rcx, rsi
sub rcx, rbx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rbx]
mov byte [rcx + rbx], al
lea rbx, [rbx + 1]
test al, al
jne 0x18013cf70
mov rax, rsi
jmp 0x18013cfe3
lea rax, [rdi + 6]
cmp rax, r15
jae 0x18013cfe1
mov rcx, rsi
sub rcx, rbx
movzx eax, byte [rbx]
mov byte [rcx + rbx], al
lea rbx, [rbx + 1]
test al, al
jne 0x18013cf92
lea rcx, [rsi - 1]
cmp byte [rcx + 1], r13b
lea rcx, [rcx + 1]
jne 0x18013cfa4
movzx eax, word [0x1801def8c]
mov word [rcx], ax
lea rcx, [rsi - 1]
nop dword [rax]
cmp byte [rcx + 1], r13b
lea rcx, [rcx + 1]
jne 0x18013cfc0
mov eax, dword [str..rnd]
mov dword [rcx], eax
movzx eax, byte [0x18022fb28]
mov byte [rcx + 4], al
mov rax, rsi
jmp 0x18013cfe3
xor eax, eax
mov rcx, qword [rbp]
xor rcx, rbp
call fcn.1800028c4
mov rbx, qword [rbp + 0x40]
mov rsi, qword [rbp + 0x48]
mov rdi, qword [rbp + 0x50]
lea rsp, [rbp + 0x10]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret