Function at 0x40aaec
Capabilities:
Accept command line arguments
Delete file
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r13
push r14
mov eax, 0xe0d8
call fcn.0040d260
sub rsp, rax
mov rax, qword [0x00413830]
mov qword [rsp + 0xe0c0], rax
mov dil, cl
mov ecx, 0x2000
mov sil, dl
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov qword [0x00419928], rax
call fcn.00404cf4
lea rcx, [rsp + 0x40c0]
mov rdx, rax
xor r8d, r8d
call fcn.00404ff4
mov ecx, 0x9e
call fcn.00403e8c
test eax, eax
je 0x40ab63
mov rcx, qword [0x00419928]
lea rdx, str.Global_
call sub.msvcrt.dll_strcpy
jmp 0x40ab6d
mov rax, qword [0x00419928]
mov byte [rax], 0
mov rcx, qword [0x00419928]
call sub.msvcrt.dll_strlen
lea rcx, [rsp + 0x40c0]
mov rbx, rax
add rbx, qword [0x00419928]
call sub.msvcrt.dll_strlen
mov r14d, 0x5f
test eax, eax
movsxd r8, eax
lea r13d, [r14 - 0x5e]
jle 0x40abc6
lea rdx, [rsp + 0x40c0]
mov rcx, rbx
mov r9, r8
sub rdx, rbx
movzx eax, byte [rdx + rcx]
cmp al, 0x5c
cmove eax, r14d
mov byte [rcx], al
add rcx, r13
sub r9, r13
jne 0x40abb2
test dil, dil
mov byte [r8 + rbx], 0
je 0x40ad09
mov ecx, 0x2715
call fcn.00403e8c
test eax, eax
jne 0x40ad09
lea rdx, [0x004100b8]
lea rcx, [rsp + 0x48]
xor r8d, r8d
xor ebx, ebx
call qword [sym.imp.msvcrt.dll_sprintf]
mov rcx, qword [0x00419928]
lea rdx, [rsp + 0x48]
call sub.msvcrt.dll_strcat
mov r9, qword [0x00419928]
mov r8d, r13d
mov edx, r13d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, 0xb7
jmp 0x40acdd
cmp ebx, 0x186a0
jge 0x40ace5
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdi, qword [0x00419928]
lea rcx, [rsp + 0x40c0]
add ebx, r13d
call sub.msvcrt.dll_strlen
test eax, eax
movsxd r9, eax
jle 0x40ac8e
lea rdx, [rsp + 0x40c0]
mov rcx, rdi
mov r8, r9
sub rdx, rdi
movzx eax, byte [rdx + rcx]
cmp al, 0x5c
cmove eax, r14d
mov byte [rcx], al
add rcx, r13
sub r8, r13
jne 0x40ac7a
lea rdx, [0x004100b8]
lea rcx, [rsp + 0x80]
mov r8d, ebx
mov byte [r9 + rdi], 0
call qword [sym.imp.msvcrt.dll_sprintf]
mov rcx, qword [0x00419928]
lea rdx, [rsp + 0x80]
call sub.msvcrt.dll_strcat
mov r9, qword [0x00419928]
mov r8d, r13d
mov edx, r13d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebp
je 0x40ac36
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, qword [0x00419928]
lea rcx, str.semaphore_name__s__code__d__value__p
mov r8d, eax
mov r9, rdi
call fcn.0040a860
jmp 0x40b062
lea rcx, str.single_instance_mode
call fcn.0040a860
mov r9, qword [0x00419928]
mov r8d, r13d
mov edx, r13d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, qword [0x00419928]
lea rcx, str.semaphore_name__s__code__d__value__p
mov r9, rdi
mov r8d, eax
mov ebx, eax
call fcn.0040a860
mov ebp, 0xb7
cmp ebx, ebp
jne 0x40b05d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0040a9a0
lea rcx, str.other_pid__d
mov edx, eax
mov ebx, eax
call fcn.0040a860
mov dl, r13b
mov ecx, ebx
call fcn.0040bc1c
test sil, sil
je 0x40b048
lea rcx, [rsp + 0xc0]
mov edx, ebx
call fcn.00405388
lea rdx, [rsp + 0xc0]
lea rcx, str.notification_via__s
call fcn.0040a860
mov rdx, qword [0x00419928]
lea rcx, [rsp + 0x20c0]
call sub.msvcrt.dll_strcpy
lea rdx, str._notification
lea rcx, [rsp + 0x20c0]
call sub.msvcrt.dll_strcat
lea r9, [rsp + 0x20c0]
mov r8d, r13d
mov edx, r13d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
test rax, rax
mov rsi, rax
jne 0x40ae09
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.semaphore_creation_failed__d
mov edx, eax
call fcn.0040a860
lea rcx, str.waiting_for_notification_semaphore
call fcn.0040a860
mov edx, 0xffffffff
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rcx, str.wait_returned__d
mov edx, eax
call fcn.0040a860
call fcn.0040aa68
test al, al
je 0x40b021
xor ebx, ebx
mov ebp, 0xc8
xor dil, dil
lea r14d, [rbx + 0x32]
lea rcx, [rsp + 0xc0]
call fcn.00404c8c
test al, al
je 0x40ae92
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, 0x66666667
imul ebx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea ecx, [rdx + rdx*4]
cmp ebx, ecx
jne 0x40ae8b
call fcn.0040aa68
test al, al
jne 0x40ae8b
mov ebx, ebp
mov dil, r13b
add ebx, r13d
cmp ebx, ebp
jl 0x40ae4c
test dil, dil
jne 0x40b021
mov qword [rsp + 0x30], 0
lea rcx, [rsp + 0xc0]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], r13d
call qword [sym.imp.KERNEL32.dll_CreateFileA]
test rax, rax
mov rbx, rax
jne 0x40aefc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.CreateFile_failed__d
mov edx, eax
call fcn.0040a860
lea rdx, [0x0040ffc4]
mov ecx, 0x3f1
call fcn.0040457c
jmp 0x40afba
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov dx, 0x22
cmp word [rax], dx
jne 0x40af1a
lea rcx, [rax + 2]
call qword [sym.imp.msvcrt.dll_wcschr]
test rax, rax
je 0x40af2c
mov dx, 0x20
mov rcx, rax
call qword [sym.imp.msvcrt.dll_wcschr]
test rax, rax
jne 0x40af39
lea rax, [0x0040f044]
jmp 0x40af3f
add rax, 2
cmp word [rax], 0x20
je 0x40af35
lea rdx, [0x0040eca0]
lea rcx, [rsp + 0x60c0]
mov r8, rax
call qword [sym.imp.msvcrt.dll_swprintf]
lea rcx, [rsp + 0x60c0]
call qword [sym.imp.msvcrt.dll_wcslen]
lea r9, [rsp + 0x40]
lea rdx, [rsp + 0x60c0]
lea r8d, [rax + rax]
mov rcx, rbx
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40afb1
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.WriteFile_failed__d
mov edx, eax
call fcn.0040a7dc
lea rdx, [0x0040ffac]
mov ecx, 0x3f1
call fcn.0040457c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, str.waiting_for_file_deletion
call fcn.0040a860
xor ebx, ebx
lea rcx, [rsp + 0xc0]
call fcn.00404c8c
test al, al
je 0x40b00e
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, 0x66666667
imul ebx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea ecx, [rdx + rdx*4]
cmp ebx, ecx
jne 0x40b007
call fcn.0040aa68
test al, al
jne 0x40b007
mov ebx, ebp
mov dil, r13b
add ebx, r13d
cmp ebx, ebp
jl 0x40afc8
test dil, dil
je 0x40b021
lea rcx, [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
xor r8d, r8d
mov edx, r13d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x40b048
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.release_semaphore_failed__d
mov edx, eax
call fcn.0040a860
lea rcx, str.exiting
call fcn.0040a860
xor ecx, ecx
call fcn.00404594
jmp 0x40b062
call fcn.0040a8d0
mov rcx, qword [rsp + 0xe0c0]
call fcn.0040d230
add rsp, 0xe0d8
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret