Function at 0x140010110
Capabilities:
Check mutex on windows
Create thread
Get system information on windows
Resume thread
Write file on windows

Disassembly:
push rbp
push rbx
push rdi
push r12
lea rbp, [rsp - 0x408]
sub rsp, 0x508
mov rax, qword [0x1400790f0]
xor rax, rsp
mov qword [rbp + 0x3e0], rax
mov rdi, r8
lea rbx, [0x14007e050]
mov rdx, rbx
mov r8d, 0xff
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
xor r12d, r12d
mov r8d, 0x3fe
test eax, eax
mov rdx, rdi
cmove rbx, r12
mov qword [0x14007db40], rbx
lea rbx, [0x14007dc40]
mov rcx, rbx
call fcn.14003ce68
movzx edx, byte [0x14007dc40]
lea rdi, [0x140000000]
mov ecx, 1
mov dword [0x14007e048], ecx
test dl, dl
je 0x140010235
nop dword [rax + rax]
mov rax, rbx
inc rbx
cmp dl, 0x22
cmovne rbx, rax
movsxd rax, ecx
inc ecx
cmp dl, 0x22
mov dword [0x14007e048], ecx
mov qword [rdi + rax*8 + 0x7db40], rbx
mov eax, r12d
sete al
nop dword [rax]
test eax, eax
jne 0x1400101d9
cmp byte [rbx], 0x20
je 0x1400101ff
cmp byte [rbx], r12b
jge 0x1400101e1
inc rbx
inc rbx
test eax, eax
je 0x1400101f6
cmp byte [rbx], 0x22
jne 0x1400101f6
mov byte [rbx], r12b
mov eax, r12d
inc rbx
movzx ecx, byte [rbx]
test cl, cl
jne 0x1400101d0
jmp 0x140010208
mov byte [rbx], r12b
inc rbx
movzx ecx, byte [rbx]
movsx ecx, cl
call fcn.14003f2a0
test eax, eax
je 0x140010224
movsx ecx, byte [rbx + 1]
inc rbx
call fcn.14003f2a0
test eax, eax
jne 0x140010214
movzx edx, byte [rbx]
mov ecx, dword [0x14007e048]
test dl, dl
jne 0x1400101a0
movsxd rax, ecx
mov qword [rsp + 0x538], rsi
mov qword [rsp + 0x4f8], r14
mov qword [rdi + rax*8 + 0x7db40], r12
cmp ecx, 7
jl 0x140010c3c
mov ecx, 0x140
call fcn.140013c10
xor edx, edx
mov r8d, 0x140
mov rcx, rax
mov rbx, rax
call fcn.140032280
cmp dword [0x14007e048], 7
mov r14d, 0xf
mov byte [rbx], 0x2e
mov qword [0x14007db20], rbx
jle 0x1400102a6
mov rdx, qword [0x14007db78]
test rdx, rdx
je 0x1400102a6
mov r8d, r14d
mov rcx, rbx
call fcn.14003ce68
mov rcx, qword [0x14007db40]
lea rdx, [rbp - 0x80]
sub rdx, rcx
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x1400102c0
mov edx, 0x5c
lea rcx, [rbp - 0x80]
call fcn.140036f8c
mov rcx, qword [0x14007db48]
mov rbx, rax
call fcn.14003ef64
mov rdi, qword [0x14007db20]
lea rdx, [rbp + 0xe0]
sub rdx, rbx
mov esi, eax
nop
movzx ecx, byte [rbx]
mov byte [rdx + rbx], cl
lea rbx, [rbx + 1]
test cl, cl
jne 0x140010300
mov edx, 0x2e
lea rcx, [rbp + 0xe0]
call fcn.140036f8c
test rax, rax
je 0x140010327
mov byte [rax], r12b
cmp byte [rbp + 0xe0], 0x5c
lea r9, [rbp + 0xe0]
jne 0x140010340
inc r9
cmp byte [r9], 0x5c
je 0x140010337
mov r8, rdi
mov dword [rsp + 0x20], esi
lea rdx, str._spipe_s__d
lea rcx, [rdi + 0x10]
call fcn.14000d3f0
xor r9d, r9d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
lea rcx, [rdi + 0x10]
mov edx, 0x40000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rdi + 0x110], rax
cmp rax, 0xffffffffffffffff
jne 0x140010399
mov qword [rdi + 0x110], r12
mov rax, r12
mov rcx, qword [0x14007db58]
mov qword [0x14007e150], rax
call fcn.14003ef64
mov rcx, qword [0x14007db70]
mov esi, eax
test rcx, rcx
je 0x140010c3c
cmp byte [rcx], r12b
je 0x140010c3c
lea rdx, [0x14007dbc0]
mov qword [rsp + 0x4f0], r15
sub rdx, rcx
nop dword [rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x1400103e0
movsd xmm0, qword [str.DfmCmd_01]
lea r9, [rbp + 0xe0]
movzx eax, word [0x14006c3d8]
mov edx, 8
xor ecx, ecx
mov qword [0x14007db28], r12
movsd qword [rbp + 0xe0], xmm0
mov word [rbp + 0xe8], ax
lea r8d, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov qword [0x14007db28], rax
test rax, rax
je 0x14001045e
nop word [rax + rax]
mov edx, 0xd
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x14001045e
mov rax, qword [0x14007db28]
jmp 0x140010440
cmp qword [0x14007e150], r12
mov r15, 0xffffffffffffffff
je 0x1400104d8
lea rdx, [0x14006c520]
lea rcx, [rbp + 0xc0]
call fcn.14000d3f0
mov rbx, qword [0x14007db20]
mov rcx, qword [rbx + 0x110]
test rcx, rcx
je 0x1400104d8
lea rdx, [rbp + 0xc0]
mov rax, r15
nop
cmp byte [rdx + rax + 1], r12b
lea rax, [rax + 1]
jne 0x1400104a0
lea r8d, [rax + 1]
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x40]
lea rdx, [rbp + 0xc0]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rbx + 0x118]
test rcx, rcx
je 0x1400104d8
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea r8, [0x14007dbc0]
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenMutexA]
mov rbx, rax
test rax, rax
je 0x140010724
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, qword [0x14007db60]
lea rcx, [rbp + 0x1e0]
mov r8d, 0xff
call fcn.14003ce68
mov edx, 0x2e
lea rcx, [rbp + 0x1e0]
call fcn.14003cfd4
test rax, rax
jne 0x1400105f9
mov rcx, r12
movzx eax, byte [rbp + rcx + 0x1e0]
mov byte [rbp + rcx + 0xe0], al
lea rcx, [rcx + 1]
test al, al
jne 0x140010540
lea rcx, [rbp + 0xe0]
dec rcx
cmp byte [rcx + 1], r12b
lea rcx, [rcx + 1]
jne 0x140010561
movsd xmm0, qword [str.Dfm.A2m]
lea rdx, [rbp - 0x80]
movzx eax, word [0x14006c4e0]
movsd qword [rcx], xmm0
mov word [rcx + 8], ax
lea rcx, [rbp + 0xe0]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov r8, rax
cmp rax, r15
je 0x1400105f9
lea rcx, [rbp + 0x1e0]
dec rcx
cmp byte [rcx + 1], r12b
lea rcx, [rcx + 1]
jne 0x1400105a5
movzx eax, word [0x14006bf98]
mov word [rcx], ax
lea rcx, [rbp + 0x1e0]
dec rcx
cmp byte [rcx + 1], r12b
lea rcx, [rcx + 1]
jne 0x1400105c3
lea r9, [rbp - 0x54]
xor edx, edx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r9 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x1400105e0
mov rcx, r8
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rdx, qword [0x14007db68]
lea r9, [rbp + 0x2e0]
lea r8, [rbp + 0x1e0]
mov ecx, esi
call fcn.14000fe70
mov edi, eax
test eax, eax
jns 0x140010697
cmp qword [0x14007e150], r12
je 0x14001065c
mov rcx, qword [0x14007db20]
call fcn.14000e580
mov rbx, qword [0x14007db20]
cmp qword [rbx + 0x110], r12
je 0x140010655
mov rcx, rbx
call fcn.14000e580
mov rcx, qword [rbx + 0x110]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x110], r12
call fcn.14000e650
mov eax, edi
mov r15, qword [rsp + 0x4f0]
mov r14, qword [rsp + 0x4f8]
mov rsi, qword [rsp + 0x538]
mov rcx, qword [rbp + 0x3e0]
xor rcx, rsp
call fcn.140013940
add rsp, 0x508
pop r12
pop rdi
pop rbx
pop rbp
ret
cmp qword [0x14007e150], r12
je 0x140010708
lea rdx, [0x14006c524]
lea rcx, [rbp + 0xc0]
call fcn.14000d3f0
mov rbx, qword [0x14007db20]
mov rcx, qword [rbx + 0x110]
test rcx, rcx
je 0x140010708
lea rdx, [rbp + 0xc0]
mov rax, r15
cmp byte [rdx + rax + 1], r12b
lea rax, [rax + 1]
jne 0x1400106d0
lea r8d, [rax + 1]
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x40]
lea rdx, [rbp + 0xc0]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rbx + 0x118]
test rcx, rcx
je 0x140010708
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea r8, [0x14007dbc0]
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenMutexA]
mov rbx, rax
test rax, rax
jne 0x140010774
cmp qword [0x14007e150], r12
je 0x140010765
mov rcx, qword [0x14007db20]
call fcn.14000e580
mov rbx, qword [0x14007db20]
cmp qword [rbx + 0x110], r12
je 0x14001075e
mov rcx, rbx
call fcn.14000e580
mov rcx, qword [rbx + 0x110]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x110], r12
call fcn.14000e650
mov eax, 0xfffffffd
jmp 0x140010663
mov rcx, rbx
mov qword [rsp + 0x500], r13
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r13, qword [0x14007e818]
mov ecx, 1
test r13, r13
je 0x1400107b4
nop
mov eax, ecx
inc ecx
cmp eax, esi
je 0x1400107b4
mov r13, qword [r13 + 0x80]
test r13, r13
jne 0x1400107a0
mov r8, qword [0x14007db60]
lea rdx, [rbp + 0x2e0]
mov r9d, edi
call fcn.140010c50
cmp qword [0x14007e150], r12
mov rdi, rax
je 0x140010848
lea rdx, [0x14006c524]
lea rcx, [rbp + 0xc0]
call fcn.14000d3f0
mov rbx, qword [0x14007db20]
mov rcx, qword [rbx + 0x110]
test rcx, rcx
je 0x140010848
lea rdx, [rbp + 0xc0]
mov rax, r15
nop word [rax + rax]
cmp byte [rdx + rax + 1], r12b
lea rax, [rax + 1]
jne 0x140010810
lea r8d, [rax + 1]
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x40]
lea rdx, [rbp + 0xc0]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rbx + 0x118]
test rcx, rcx
je 0x140010848
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea rcx, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [rsp + 0x68]
cmp ecx, 4
jl 0x140010868
jle 0x140010862
dec ecx
jmp 0x140010868
mov ecx, dword [0x14007a1b4]
cmp ecx, r14d
mov esi, r12d
mov rax, rdi
cmovg ecx, r14d
mov dword [0x14007a1b4], ecx
test rdi, rdi
je 0x14001088e
inc esi
mov dword [rax + 4], esi
mov rax, qword [rax + 0x30]
test rax, rax
jne 0x140010880
test ecx, ecx
jle 0x1400108a7
mov r8d, ecx
xor edx, edx
shl r8, 2
lea rcx, [0x14007e1b0]
call fcn.140032280
lea rcx, [0x14007e180]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov ecx, dword [0x14007a1b4]
mov r14d, r12d
test ecx, ecx
jle 0x14001097c
lea r15, [0x140000000]
nop dword [rax]
lea eax, [r14 + 1]
movsxd rbx, r14d
lea r9, [r15 + 0x7f830]
lea r8, [0x140010ee0]
lea rcx, [rbx + rbx*2]
shl rcx, 4
add r9, rcx
mov dword [rcx + r15 + 0x7f834], esi
mov word [r9], ax
mov eax, 0x66666667
imul dword [r13 + 0x28]
mov qword [rcx + r15 + 0x7f848], rdi
sar edx, 2
mov eax, edx
mov qword [rcx + r15 + 0x7f850], r12
shr eax, 0x1f
add edx, eax
lea rax, [rsp + 0x40]
mov dword [rcx + r15 + 0x7f838], edx
xor edx, edx
mov qword [rsp + 0x28], rax
xor ecx, ecx
mov dword [rsp + 0x20], 4
call fcn.140036dfc
xor edx, edx
mov qword [rbp + rbx*8 + 0xe0], rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov rcx, qword [rbp + rbx*8 + 0xe0]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov ecx, dword [0x14007a1b4]
inc r14d
cmp r14d, ecx
jl 0x1400108d0
mov r15, 0xffffffffffffffff
mov r9d, 0xffffffff
lea rdx, [rbp + 0xe0]
mov r8d, 1
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
lea rcx, [0x14007e180]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
cmp dword [0x14007a1b4], r12d
mov r14, r12
mov esi, r12d
jle 0x140010a0c
lea r12, [0x140000000]
nop dword [rax + rax]
movsxd rbx, esi
mov rcx, qword [rbp + rbx*8 + 0xe0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [rbx + rbx*2]
add rax, rax
mov rcx, qword [r12 + rax*8 + 0x7f850]
test rcx, rcx
je 0x1400109ff
test r14, r14
je 0x1400109f4
mov rax, qword [r14 + 0x48]
mov qword [rax + 0x40], rcx
jmp 0x1400109f7
mov r14, rcx
mov rax, qword [rcx + 0x48]
mov qword [r14 + 0x48], rax
inc esi
cmp esi, dword [0x14007a1b4]
jl 0x1400109c0
xor r12d, r12d
cmp qword [0x14007e150], 0
je 0x140010a88
lea rdx, [0x14006c528]
lea rcx, [rbp + 0xc0]
call fcn.14000d3f0
mov rbx, qword [0x14007db20]
mov rcx, qword [rbx + 0x110]
test rcx, rcx
je 0x140010a88
lea rdx, [rbp + 0xc0]
mov rax, r15
nop word [rax + rax]
cmp byte [rdx + rax + 1], 0
lea rax, [rax + 1]
jne 0x140010a50
lea r8d, [rax + 1]
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x44]
lea rdx, [rbp + 0xc0]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rbx + 0x118]
test rcx, rcx
je 0x140010a88
call qword [sym.imp.KERNEL32.dll_SetEvent]
test rdi, rdi
je 0x140010ac1
nop dword [rax]
mov rcx, qword [rdi + 0x20]
mov rsi, qword [rdi + 0x30]
test rcx, rcx
je 0x140010ab1
nop dword [rax]
mov rbx, qword [rcx + 0x10]
call fcn.14003a984
mov rcx, rbx
test rbx, rbx
jne 0x140010aa0
mov rcx, rdi
call fcn.14003a984
mov rdi, rsi
test rsi, rsi
jne 0x140010a90
mov eax, dword [0x14006c538]
lea r8, [rbp + 0xc0]
movsd xmm0, qword [str.DFM_ERR_RW_MTX]
xor edx, edx
mov dword [rbp + 0xc8], eax
xor ecx, ecx
movzx eax, word [0x14006c53c]
mov word [rbp + 0xcc], ax
movzx eax, byte [0x14006c53e]
mov byte [rbp + 0xce], al
movsd qword [rbp + 0xc0], xmm0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov rcx, rax
mov edx, 0x14
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x140010b41
mov ecx, 0x14
call qword [sym.imp.KERNEL32.dll_Sleep]
mov edx, 0x14
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x140010b21
mov rdx, qword [0x14007db40]
lea r8, [rbp + 0x2e0]
mov r9, r13
mov qword [rsp + 0x20], r14
call fcn.140010f40
mov rcx, rbx
mov edi, eax
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [0x14007e150], 0
mov r13, qword [rsp + 0x500]
je 0x140010be9
lea rdx, [0x14006c540]
lea rcx, [rbp + 0xc0]
call fcn.14000d3f0
mov rbx, qword [0x14007db20]
mov rcx, qword [rbx + 0x110]
test rcx, rcx
je 0x140010be9
lea rax, [rbp + 0xc0]
nop
cmp byte [rax + r15 + 1], 0
lea r15, [r15 + 1]
jne 0x140010bb0
lea r8d, [r15 + 1]
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x44]
lea rdx, [rbp + 0xc0]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rbx + 0x118]
test rcx, rcx
je 0x140010be9
call qword [sym.imp.KERNEL32.dll_SetEvent]
call fcn.14000e650
cmp qword [0x14007e150], 0
je 0x140010c31
mov rcx, qword [0x14007db20]
call fcn.14000e580
mov rbx, qword [0x14007db20]
cmp qword [rbx + 0x110], 0
je 0x140010c2a
mov rcx, rbx
call fcn.14000e580
mov rcx, qword [rbx + 0x110]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x110], r12
lea eax, [rdi + 0x3e8]
jmp 0x140010663
mov eax, 0xffffffeb
jmp 0x14001066b