Function at 0x401f92
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8b0
and byte [ebp - 0xc], 0
and byte [ebp - 0xb], 0
and byte [ebp - 0xa], 0
and byte [ebp - 9], 0
and byte [ebp - 8], 0
mov byte [ebp - 7], 1
call section..text
test eax, eax
mov dword [ebp - 0x10], eax
jne 0x401fd1
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x401fc9
and dword [eax], 0
push 6
pop eax
jmp 0x402308
push ebx
push esi
push edi
push dword [ebp + 0x20]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
lea edi, [eax + eax + 0x18]
mov eax, dword [ebp + 0x1c]
mov esi, dword [eax]
add esi, edi
add esi, dword [ebp + 0x14]
push esi
mov dword [ebp - 4], esi
call fcn.00402f2f
mov ebx, eax
test ebx, ebx
jne 0x40200a
and dword [ebp + 0x20], eax
mov dword [ebp + 0x14], 8
jmp 0x4022e4
mov eax, dword [ebp + 0xc]
push dword [ebp + 0x20]
mov dword [ebx], eax
lea eax, [ebx + 0x18]
push eax
mov dword [ebx + 0x14], 0x18
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp dword [ebp + 0x10], 0
mov dword [ebx + 4], edi
je 0x402049
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x402049
mov esi, dword [ebp + 0x10]
mov eax, ecx
add edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 4]
mov eax, dword [ebp + 0x14]
cmp dword [ebp + 0x18], 0
mov dword [ebx + 8], eax
je 0x402067
mov ecx, dword [ebp + 0x1c]
cmp dword [ecx], 0
je 0x402067
mov ecx, dword [ebx + 4]
add ecx, eax
mov dword [ebx + 0xc], ecx
jmp 0x40206d
mov eax, dword [ebx + 4]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp + 0x1c]
mov ecx, 0x82
lea edi, [ebp - 0x4b0]
push 0x104
mov eax, dword [eax]
mov dword [ebx + 0x10], eax
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, str.CNAB4_DeviceRequest_Mapped_File_Mutex
lea eax, [ebp - 0x4b0]
push edi
push eax
call fcn.00401f01
test eax, eax
jne 0x4020ad
lea eax, [ebp - 0x4b0]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x4b0]
push eax
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
test eax, eax
mov dword [ebp + 0x10], eax
jne 0x4020d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
and dword [ebp + 0x20], 0
mov dword [ebp + 0x14], eax
jmp 0x4022e4
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x19
xor eax, eax
pop ecx
lea edi, [ebp - 0xa0]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x3c]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x402181
push 2
lea eax, [ebp - 0x8b0]
push 0x400
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x402181
lea eax, [ebp - 0xc]
push 1
push eax
lea eax, [ebp - 0xa0]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSid]
test eax, eax
je 0x402181
lea eax, [ebp - 0xa0]
push eax
push 0xf001f
lea eax, [ebp - 0x8b0]
push 2
push eax
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x402181
lea eax, [ebp - 0x8b0]
push 0
push eax
lea eax, [ebp - 0x3c]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x402181
and dword [ebp - 0x20], 0
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0xc
mov dword [ebp + 0x14], eax
jmp 0x402185
and dword [ebp + 0x14], 0
mov ecx, 0x82
xor eax, eax
lea edi, [ebp - 0x2a8]
push 0x104
rep stosd dword es:[edi], eax
mov edi, str.CNAB4_DeviceRequest_Mapped_File
lea eax, [ebp - 0x2a8]
push edi
push eax
call fcn.00401f01
test eax, eax
jne 0x4021bd
lea eax, [ebp - 0x2a8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x2a8]
xor edi, edi
push eax
push 0x1018
push edi
push 4
push dword [ebp + 0x14]
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x4021fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp + 0x10]
mov dword [ebp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x402259
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0xb
push eax
push edi
push 0x4a
mov dword [ebp - 0x18], esi
push dword [ebp - 0x10]
mov dword [ebp - 0x14], ebx
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [ebp + 0x20]
call fcn.0040230c
push edi
push edi
push edi
push 0xf001f
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, edi
jne 0x402261
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x14], eax
call esi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp + 0x10]
call esi
mov dword [ebp + 0x20], edi
jmp 0x4022e4
mov ecx, dword [eax + 8]
mov dword [ebp + 0x14], ecx
mov ecx, dword [ebp + 0xc]
cmp dword [eax + 0xc], ecx
jne 0x4022c1
cmp dword [eax + 4], edi
je 0x4022ad
mov edx, dword [ebp + 0x1c]
mov dword [ebp + 0x20], 1
cmp edx, edi
je 0x4022c4
cmp dword [ebp + 0x18], edi
je 0x4022c4
mov esi, dword [eax + 0x1014]
lea ecx, [eax + 0x1014]
mov edi, dword [ebp + 0x18]
mov dword [edx], esi
mov ecx, dword [ecx]
lea esi, [eax + 0x10]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x4022c4
mov edx, dword [ebp + 0x1c]
mov dword [ebp + 0x20], edi
cmp edx, edi
je 0x4022c4
mov ecx, dword [eax + 0x1014]
mov dword [edx], ecx
jmp 0x4022c4
mov dword [ebp + 0x20], edi
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp + 0x10]
call esi
push ebx
call fcn.00402f45
xor eax, eax
pop edi
cmp dword [ebp + 0x20], eax
pop esi
pop ebx
je 0x4022f9
mov dword [ebp + 0x14], eax
jmp 0x402305
cmp dword [ebp + 0x14], eax
jne 0x402305
mov dword [ebp + 0x14], 1
mov eax, dword [ebp + 0x14]
leave
ret 0x20