Function at 0x1400028c0
Capabilities:
Check mutex on windows
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x550
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x5a0], rbx
mov rax, qword [0x140009020]
xor rax, rsp
mov qword [rsp + 0x540], rax
mov r13d, r8d
mov r14, rdx
mov rbx, rcx
xor r15d, r15d
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], 0x100
lea rax, [rsp + 0x330]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
xor r9d, r9d
xor r8d, r8d
xor edx, edx
add rcx, 8
call qword [sym.imp.MSVCR90.dll__splitpath_s]
lea r9, [rsp + 0x330]
lea r8, str.Access_File__s
mov edx, 0x104
lea rcx, [rsp + 0x430]
call qword [sym.imp.MSVCR90.dll_sprintf_s]
lea r8, [rsp + 0x430]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov rsi, rax
or edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea r8d, [r15 + 0x21]
lea rdx, [rsp + 0x80]
lea rcx, [rbx + 8]
call qword [sym.imp.KERNEL32.dll_OpenFile]
mov r12d, eax
cmp eax, 0xffffffff
jne 0x1400029d1
mov r8d, 0x1021
lea rdx, [rsp + 0x80]
lea rcx, [rbx + 8]
call qword [sym.imp.KERNEL32.dll_OpenFile]
mov r12d, eax
cmp eax, 0xffffffff
jne 0x1400029d1
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140002cde
movsxd rbp, r12d
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
mov byte [rsp + 0x110], r15b
xor edx, edx
mov r8d, 0x103
lea rcx, [rsp + 0x111]
call sub.MSVCR90.dll_memset
mov byte [rsp + 0x220], r15b
xor edx, edx
mov r8d, 0x103
lea rcx, [rsp + 0x221]
call sub.MSVCR90.dll_memset
test byte [rbx + 0x10c], 1
je 0x140002aa0
movzx eax, word [rsp + 0x6c]
movzx ecx, word [rsp + 0x6a]
movzx edx, word [rsp + 0x68]
movzx edi, word [rsp + 0x60]
movzx r8d, word [rsp + 0x62]
movzx r9d, word [rsp + 0x66]
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], r8d
lea r8, str._.2d__.2d__.2d___.2d:_.2d:_.2d
mov edx, 0x104
lea rcx, [rsp + 0x220]
call qword [sym.imp.MSVCR90.dll_sprintf_s]
lea r8, [rsp + 0x220]
mov edx, 0x104
lea rcx, [rsp + 0x110]
call qword [sym.imp.MSVCR90.dll_strcat_s]
test byte [rbx + 0x10c], 2
je 0x140002b4b
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r9d, eax
mov dword [rsp + 0x20], edi
lea r8, str._08X__08X
mov edx, 0x104
lea rcx, [rsp + 0x220]
call qword [sym.imp.MSVCR90.dll_sprintf_s]
lea rcx, [rsp + 0x58]
call qword [sym.imp.mfc90.dll_Ordinal_316]
nop
lea rcx, [rbx + 0x128]
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x220]
call sub.mfc90.dll_Ordinal_4165
test eax, eax
je 0x140002b24
mov r9, qword [rsp + 0x58]
lea r8, str.__17s
mov edx, 0x104
lea rcx, [rsp + 0x220]
call qword [sym.imp.MSVCR90.dll_sprintf_s]
lea r8, [rsp + 0x220]
mov edx, 0x104
lea rcx, [rsp + 0x110]
call qword [sym.imp.MSVCR90.dll_strcat_s]
nop
lea rcx, [rsp + 0x58]
call qword [sym.imp.mfc90.dll_Ordinal_589]
mov edi, r15d
cmp dword [rbx + 0x110], r15d
jbe 0x140002b84
nop word [rax + rax]
lea r8, [0x140006584]
mov edx, 0x104
lea rcx, [rsp + 0x110]
call qword [sym.imp.MSVCR90.dll_strcat_s]
inc edi
cmp edi, dword [rbx + 0x110]
jb 0x140002b60
mov r8, r14
mov edx, 0x104
lea rcx, [rsp + 0x110]
call qword [sym.imp.MSVCR90.dll_strcat_s]
lea r8, [0x140006588]
mov edx, 0x104
lea rcx, [rsp + 0x110]
call qword [sym.imp.MSVCR90.dll_strcat_s]
test r13d, r13d
je 0x140002c00
mov rdx, qword [rbx + 0x118]
test rdx, rdx
je 0x140002cc3
cmp dword [rbx + 0x120], 0
je 0x140002cc3
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x50]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x140002cc3
mov r10, qword [rbx + 0x118]
test r10, r10
je 0x140002c91
mov edx, dword [rbx + 0x120]
test edx, edx
je 0x140002c91
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r10
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x110]
repne scasb al, byte [rdi]
not rcx
dec rcx
add rcx, r8
lea eax, [rdx - 1]
cmp rcx, rax
jbe 0x140002c7e
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x50]
mov rdx, r10
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [rbx + 0x120]
lea r8, [rsp + 0x110]
mov rcx, qword [rbx + 0x118]
call qword [sym.imp.MSVCR90.dll_strcpy_s]
jmp 0x140002cc3
lea r8, [rsp + 0x110]
mov rcx, r10
call qword [sym.imp.MSVCR90.dll_strcat_s]
jmp 0x140002cc3
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x110]
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x50]
lea rdx, [rsp + 0x110]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll__lclose]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x540]
xor rcx, rsp
call fcn.1400032b0
mov rbx, qword [rsp + 0x5a0]
add rsp, 0x550
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret