Function at 0x14002a3e0
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 [0x14036a3c8]
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 0x14002a4c4
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 0x14002a46b
lea r8, str.test
lea rdx, str.Cant_lookup_privilege_value._n
lea rcx, [0x1402860a8]
call fcn.140036e10
mov dword [rsp + 0x6c], 2
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
mov r9d, reloc.WS2_32.dll_recv
lea r8, [rsp + 0x60]
xor edx, edx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x14002a4b3
lea r8, str.test
lea rdx, str.Cant_adjust_privilege_value._n
lea rcx, [0x1402860a8]
call fcn.140036e10
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 + 0x68], r15b
jne 0x14002a5fa
call fcn.1400209d0
lea rcx, [rsp + 0x40]
call fcn.1400318e0
nop
mov rdx, qword [rax]
lea rcx, [rsp + 0x48]
call fcn.140029c40
mov rsi, r15
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
sub rax, rcx
sar rax, 2
test rax, rax
je 0x14002a597
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 0x14002a542
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 0x14002a57a
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 0x14002a510
test rcx, rcx
je 0x14002a5db
mov rax, qword [rsp + 0x58]
sub rax, rcx
sar rax, 2
lea rdx, [rax*4]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14002a5d5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14002a7f1
call fcn.140240d18
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14002a5fa
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
mov rcx, qword [rdi]
test rcx, rcx
je 0x14002a626
lea r8, [0x140364408]
cmp qword [reloc.WS2_32.dll_getsockopt], 8
cmovae r8, qword [0x140364408]
xor r9d, r9d
mov edx, 0x603
call fcn.140074720
mov rcx, qword [rdi + 0x70]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x14002a640
xor edx, edx
mov rcx, qword [rdi + 0x70]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov rcx, qword [rdi + 0x70]
call fcn.14002e5d0
test eax, eax
jne 0x14002a685
lea r8, [0x140281a50]
mov rdx, qword [rdi + 0x70]
lea rcx, str.directory_has_no_privileges
call fcn.140036e10
mov rcx, qword [rdi]
test rcx, rcx
je 0x14002a6dc
lea r8, [0x1403644c8]
cmp qword [reloc.WS2_32.dll_getsockopt], 8
cmovae r8, qword [0x1403644c8]
jmp 0x14002a6cc
mov rcx, qword [rdi + 0x78]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov rdx, qword [rdi + 0x80]
test eax, eax
jne 0x14002a6e3
mov r8, rdx
mov rdx, qword [rdi + 0x78]
lea rcx, str.non_from_dir
call fcn.140036e10
mov rcx, qword [rdi]
test rcx, rcx
je 0x14002a6dc
lea r8, [0x1403644e8]
cmp qword [reloc.WS2_32.dll_getsockopt], 8
cmovae r8, qword [0x1403644e8]
mov r9d, 1
mov edx, 0x603
call fcn.140074720
xor eax, eax
jmp 0x14002a7c7
mov rcx, rdi
call fcn.140019320
mov rdx, qword [rdi + 0x80]
lea r8, [0x140281a50]
test eax, eax
jne 0x14002a710
lea rcx, str.clean_Directory_error
call fcn.140036e10
xor eax, eax
jmp 0x14002a7c7
lea rcx, str.clean_Directory_succeed
call fcn.140036e10
mov rcx, qword [rdi]
test rcx, rcx
je 0x14002a735
xor r9d, r9d
mov edx, 0x601
lea r8d, [r9 + 3]
call fcn.140074720
mov rcx, qword [rdi + 0x88]
sub rcx, 0x18
call fcn.14000ce00
add rax, 0x18
mov qword [rsp + 0x38], rax
lea rdx, str.courgette.dll
mov rax, r14
nop dword [rax + rax]
inc rax
cmp word [rdx + rax*2], 0
jne 0x14002a760
mov r8d, eax
lea rcx, [rsp + 0x38]
call fcn.14000cce0
mov rbx, qword [rsp + 0x38]
mov rcx, rbx
call fcn.140037f10
test al, al
jne 0x14002a7a4
lea r8, [0x140281a50]
mov rdx, qword [rdi + 0x88]
lea rcx, str.init_courgette_fail.
call fcn.140036e10
jmp 0x14002a7aa
mov r15d, 1
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], r14d
sub r14d, 1
jg 0x14002a7c4
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rioctlsocket + 8]
mov eax, r15d
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.140240e30
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.1402480bc
nop
int3