Function at 0x1400246c0
Capabilities:
Acquire debug privileges
Check if file exists
Create directory
Terminate process

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x80
mov rax, qword [0x140317e98]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x30]
mov edx, 0x20
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
xor r15d, r15d
test eax, eax
je 0x1400247a4
mov dword [rsp + 0x60], 1
lea r8, [rsp + 0x64]
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x14002474b
lea r8, str.test
lea rdx, str.Cant_lookup_privilege_value._n
lea rcx, [0x140245c38]
call fcn.14002c680
mov dword [rsp + 0x6c], 2
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
mov r9d, 0x10
lea r8, [rsp + 0x60]
xor edx, edx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x140024793
lea r8, str.test
lea rdx, str.Cant_adjust_privilege_value._n
lea rcx, [0x140245c38]
call fcn.14002c680
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r14, 0xffffffffffffffff
cmp byte [rdi + 0x48], r15b
jne 0x1400248da
call fcn.14001c7b0
lea rcx, [rsp + 0x40]
call fcn.1400276f0
nop
mov rdx, qword [rax]
lea rcx, [rsp + 0x48]
call fcn.140023ff0
mov rsi, r15
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
sub rax, rcx
sar rax, 2
test rax, rax
je 0x140024877
nop
mov ebp, dword [rcx + rsi*4]
mov r8d, ebp
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
test rax, rax
je 0x140024822
mov edx, 0xfa0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, ebp
xor edx, edx
lea ecx, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
test rax, rax
je 0x14002485a
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov edx, 0x3e8
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc rsi
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
sub rax, rcx
sar rax, 2
cmp rsi, rax
jb 0x1400247f0
test rcx, rcx
je 0x1400248bb
mov rax, qword [rsp + 0x58]
sub rax, rcx
sar rax, 2
lea rdx, [rax*4]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400248b5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140024abe
call fcn.1400d7558
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400248da
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, qword [rdi]
test rcx, rcx
je 0x140024906
lea r8, [0x1403173c8]
cmp qword [0x1403173e0], 8
cmovae r8, qword [0x1403173c8]
xor r9d, r9d
mov edx, 0x603
call fcn.14003a280
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x140024920
xor edx, edx
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov rcx, qword [rdi + 0x50]
call fcn.140026510
test eax, eax
jne 0x140024965
lea r8, [0x140241920]
mov rdx, qword [rdi + 0x50]
lea rcx, str.directory_has_no_privileges
call fcn.14002c680
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400249b9
lea r8, [0x140317488]
cmp qword [0x1403174a0], 8
cmovae r8, qword [0x140317488]
jmp 0x1400249a9
mov rcx, qword [rdi + 0x58]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov rdx, qword [rdi + 0x60]
test eax, eax
jne 0x1400249c0
mov r8, rdx
mov rdx, qword [rdi + 0x58]
lea rcx, str.non_from_dir
call fcn.14002c680
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400249b9
lea r8, [0x1403174a8]
cmp qword [0x1403174c0], 8
cmovae r8, qword [0x1403174a8]
mov r9d, 1
mov edx, 0x603
call fcn.14003a280
xor eax, eax
jmp 0x140024a94
mov rcx, rdi
call fcn.140016750
mov rdx, qword [rdi + 0x60]
lea r8, [0x140241920]
test eax, eax
jne 0x1400249ea
lea rcx, str.clean_Directory_error
call fcn.14002c680
xor eax, eax
jmp 0x140024a94
lea rcx, str.clean_Directory_succeed
call fcn.14002c680
mov rcx, qword [rdi]
test rcx, rcx
je 0x140024a0f
xor r9d, r9d
mov edx, 0x601
lea r8d, [r9 + 3]
call fcn.14003a280
mov rcx, qword [rdi + 0x68]
sub rcx, 0x18
call fcn.14000c360
add rax, 0x18
mov qword [rsp + 0x38], rax
lea rdx, str.courgette.dll
mov rax, r14
nop
inc rax
cmp word [rdx + rax*2], 0
jne 0x140024a30
mov r8d, eax
lea rcx, [rsp + 0x38]
call fcn.14000c240
mov rbx, qword [rsp + 0x38]
mov rcx, rbx
call fcn.14002d1f0
test al, al
jne 0x140024a71
lea r8, [0x140241920]
mov rdx, qword [rdi + 0x68]
lea rcx, str.init_courgette_fail.
call fcn.14002c680
jmp 0x140024a77
mov r15d, 1
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], r14d
sub r14d, 1
jg 0x140024a91
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [r8 + 8]
mov eax, r15d
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1400d7670
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
call fcn.1400de97c
nop
int3