Function at 0x140003b80
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x10]
sub rsp, 0x110
mov rax, qword [0x140050010]
xor rax, rsp
mov qword [rbp], rax
xor r12d, r12d
lea r14, [rcx + 0x38]
cmp dword [rcx + 0x1568], 1
mov r15d, r8d
mov rdi, rdx
mov rbx, rcx
mov esi, r12d
jne 0x140003c13
mov r8, r14
lea edx, [r12 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x140003c13
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rcx, qword [rbp]
xor rcx, rsp
call fcn.14001d8d0
add rsp, 0x110
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
movzx edx, word [rbx + 0x140]
lea rax, [0x14001ba20]
mov rcx, rdi
mov qword [rsp + 0x68], rax
mov qword [rbx], rdi
mov dword [rsp + 0x60], 0x50
mov dword [rsp + 0x64], 3
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], rdi
call qword [sym.imp.USER32.dll_LoadIconA]
movzx edx, word [rbx + 0x140]
mov rcx, rdi
mov qword [rbp - 0x80], rax
call qword [sym.imp.USER32.dll_LoadIconA]
mov edx, 0x7f00
xor ecx, ecx
mov qword [rbp - 0x58], rax
call qword [sym.imp.USER32.dll_LoadCursorA]
xor ecx, ecx
mov qword [rbp - 0x78], rax
call qword [sym.imp.GDI32.dll_GetStockObject]
lea rcx, [rsp + 0x60]
mov qword [rbp - 0x60], r14
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], r12
call qword [sym.imp.USER32.dll_RegisterClassExA]
test ax, ax
je 0x140003bf3
mov ecx, dword [rbx + 0x138]
mov r9d, 0x10cf0000
mov eax, dword [rbx + 0x13c]
mov r8, r14
mov qword [rsp + 0x58], r12
mov rdx, r14
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], ecx
mov dword [rbx + 0x1558], ecx
xor ecx, ecx
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 0x80000000
mov dword [rbx + 0x155c], eax
call qword [sym.imp.USER32.dll_CreateWindowExA]
mov r14, rax
test rax, rax
je 0x140003bf3
mov edx, r15d
mov rcx, rax
call qword [sym.imp.USER32.dll_ShowWindow]
mov rcx, r14
call qword [sym.imp.USER32.dll_UpdateWindow]
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov rcx, rax
lea rdx, [rbp - 0x40]
call qword [sym.imp.USER32.dll_GetWindowRect]
lea rdx, [rbp - 0x50]
mov rcx, r14
call qword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [rbp - 0x4c]
mov rcx, r14
mov r10d, dword [rbp - 0x50]
mov edi, dword [rbp - 0x44]
mov r11d, dword [rbp - 0x48]
sub edi, eax
sub eax, dword [rbp - 0x44]
sub r11d, r10d
add eax, dword [rbp - 0x34]
sub r10d, dword [rbp - 0x48]
cdq
add r10d, dword [rbp - 0x38]
sub eax, edx
sar eax, 1
mov r9d, eax
mov dword [rsp + 0x30], 0x40
mov eax, r10d
mov dword [rsp + 0x28], edi
cdq
mov dword [rsp + 0x20], r11d
sub eax, edx
xor edx, edx
sar eax, 1
mov r8d, eax
call qword [sym.imp.USER32.dll_SetWindowPos]
xor r9d, r9d
mov edx, 0x2327
mov rcx, r14
lea r8d, [r9 + 1]
call qword [sym.imp.USER32.dll_SetTimer]
nop dword [rax + rax]
mov rcx, qword [rbx + 8]
lea rdx, [rbp - 0x30]
call qword [sym.imp.USER32.dll_IsDialogMessageA]
test eax, eax
jne 0x140003dc6
lea rcx, [rbp - 0x30]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rbp - 0x30]
call qword [sym.imp.USER32.dll_DispatchMessageA]
xor r9d, r9d
lea rcx, [rbp - 0x30]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
jne 0x140003da0
cmp dword [rbx + 0x1568], 1
jne 0x140003df7
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rbp - 0x20]
jmp 0x140003bf5
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
cmp dword [0x140108af8], 0
mov ebx, r9d
mov rdi, rcx
jne 0x14001d844
nop dword [rax]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x140108af8], 0
je 0x14001d830
mov rax, qword [0x140108af0]
lea r9, str.2024_1212_1029
mov dword [0x140050df8], 0x400
lea r8, str.mr12e_USB_RS485_UART
mov dword [0x140050dfc], 0x300
lea rdx, str._s__s
mov dword [0x140050e00], 0x3ea
mov ecx, dword [rax + 0x41747e0]
mov dword [0x140052228], ecx
lea rcx, [0x140050cf8]
call fcn.140001190
mov r8d, ebx
lea rcx, [0x140050cc0]
mov rdx, rdi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp 0x140003b80