Function at 0x407dd0
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 8
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x14]
push ebp
push esi
mov esi, ecx
test ebx, ebx
push edi
mov byte [esp + 0x13], 1
mov dword [esp + 0x14], 0
mov dword [esi + 0x18], eax
je 0x40800e
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
call edi
test eax, eax
je 0x40800e
mov ebp, dword [esp + 0x24]
test ebp, ebp
je 0x40800e
push ebx
call edi
mov edx, eax
push ebp
mov dword [esp + 0x20], edx
call edi
mov ecx, dword [esp + 0x1c]
lea edx, [ecx + eax + 1]
push edx
call fcn.0040a590
add esp, 4
mov dword [esi + 0x1c], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push eax
call ebx
mov ecx, dword [esi + 0x1c]
mov eax, ebp
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edx, dword [esi + 0x1c]
push edx
call edi
add eax, 5
push eax
call fcn.0040a590
add esp, 4
mov ebp, eax
mov eax, dword [esi + 0x1c]
push eax
push ebp
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push str.__AM
push ebp
call edi
push ebp
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
push 0xffffffffffffffff
push eax
mov dword [esi + 8], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x1c]
push ecx
push ebp
call ebx
push str.__FM
push ebp
call edi
mov edx, dword [esi + 0x18]
push ebp
push edx
push 0
push 0x4000004
or edi, 0xffffffff
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [esi + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x407ed0
xor bl, bl
mov dword [esp + 0x14], 1
jmp 0x407ed4
mov bl, byte [esp + 0x13]
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x407ee4
mov dword [esp + 0x14], edi
jmp 0x407fcc
mov ecx, dword [esi + 0x18]
push ecx
push 0
push 0
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
mov dword [esi + 0x30], eax
jne 0x407f05
mov dword [esp + 0x14], edi
jmp 0x407fcc
mov edx, dword [esi + 0x38]
mov ecx, dword [esi + 0x3c]
add edx, eax
add ecx, eax
mov dword [esi + 0x50], edx
mov edx, dword [esi + 0x40]
mov dword [esi + 0x4c], ecx
mov ecx, dword [esi + 0x44]
add edx, eax
add ecx, eax
mov dword [esi + 0x54], edx
mov edx, dword [esi + 0x48]
mov dword [esi + 0x58], ecx
mov ecx, dword [esi + 0x34]
push 4
push 0x1000
add edx, eax
push ecx
push eax
mov dword [esi + 0x5c], edx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x407f4c
mov dword [esp + 0x14], edi
jmp 0x407fcc
test bl, bl
je 0x40801b
mov ecx, dword [esi + 0x34]
mov edi, dword [esi + 0x30]
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esi + 0x14], 1
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x14]
mov dword [eax], ecx
mov edx, dword [esi + 0x50]
mov dword [edx], 1
mov eax, dword [esi + 0x54]
mov dword [eax], 0x100
mov ecx, dword [esi + 0x58]
mov edx, dword [esi + 0x18]
xor eax, eax
mov dword [ecx], edx
mov ecx, dword [esi + 0x5c]
add eax, 4
cmp eax, 0x80
mov dword [eax + ecx - 4], 0xffffffff
jl 0x407f95
mov ecx, dword [esi + 0x1c]
push str.__SS
push ecx
lea ecx, [esi + 0x20]
call fcn.004079f0
mov ecx, dword [esi + 0x34]
mov edx, dword [esi + 0x18]
lea eax, [ecx + edx - 1]
xor edx, edx
div ecx
mov dword [esi + 0x10], eax
mov eax, dword [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test ebp, ebp
je 0x407fe3
push ebp
call fcn.0040a130
add esp, 4
mov edi, dword [esp + 0x14]
test edi, edi
jge 0x407ffe
mov ecx, esi
call fcn.00408040
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 0xc
mov byte [esi + 4], 1
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 0xc
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 8
ret 0xc
mov edx, dword [esi + 0x4c]
mov ecx, esi
mov eax, dword [edx]
mov dword [esi + 0x14], eax
call fcn.00408180
test al, al
jne 0x407faa
mov dword [esp + 0x14], edi
jmp 0x407fcc