Function at 0x408e70
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4d2aa5
mov eax, dword fs:[0]
push eax
sub esp, 0x580
mov eax, dword [0x50b618]
xor eax, esp
mov dword [esp + 0x578], eax
push ebx
push esi
push edi
mov eax, dword [0x50b618]
xor eax, esp
push eax
lea eax, [esp + 0x590]
mov dword fs:[0], eax
lea eax, [esp + 0x44]
mov esi, ecx
push eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x48], 8
mov dword [esp + 0x4c], 0xff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov ecx, esi
call fcn.004516ae
push 8
call fcn.004403a2
xor ebx, ebx
add esp, 4
cmp eax, ebx
je 0x408ef3
mov dword [eax], vtable.CImpIDispatch.0
mov dword [eax + 4], ebx
jmp 0x408ef5
xor eax, eax
push 4
mov dword [esi + 0xa4], eax
call fcn.00451d8c
cmp eax, ebx
je 0x408f0e
mov dword [eax], vtable.CCustomOccManager.0
jmp 0x408f10
xor eax, eax
push eax
call fcn.00447f40
add esp, 4
push 0x206
lea edx, [esp + 0x382]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x388], cx
call fcn.004634b0
add esp, 0xc
push 0x104
lea eax, [esp + 0x380]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x37c]
push 0x5c
push ecx
call fcn.0045e038
add eax, 2
xor edx, edx
mov word [eax], dx
mov ecx, 0x4c
mov word [esp + 0x352], cx
mov ecx, 0x6e
mov word [esp + 0x358], cx
mov edx, 0x61
mov word [esp + 0x354], dx
mov eax, 0x50
mov word [esp + 0x350], ax
mov ecx, 0x65
mov word [esp + 0x35e], cx
mov edx, 0x63
mov word [esp + 0x35a], dx
mov eax, 0x75
mov word [esp + 0x356], ax
mov ecx, 0x75
mov edx, 0x72
mov word [esp + 0x360], dx
mov word [esp + 0x364], cx
mov eax, 0x68
mov word [esp + 0x35c], ax
mov ecx, 0x78
mov edx, 0x74
mov eax, 0x4d
mov word [esp + 0x366], dx
mov word [esp + 0x36a], cx
mov word [esp + 0x362], ax
lea ecx, [esp + 0x350]
mov edx, 0x2b
push ecx
mov eax, 0x65
mov word [esp + 0x370], dx
mov word [esp + 0x36c], ax
lea edx, [esp + 0x388]
xor eax, eax
push 0x104
push edx
mov word [esp + 0x37a], ax
call fcn.0045e445
add esp, 0x14
call fcn.00450320
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x409068
push 0x80004005
call fcn.00405ef0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x4c]
push ecx
mov dword [esp + 0x59c], ebx
call fcn.0047fba0
add esp, 4
push 0x208
lea edx, [esp + 0x380]
push edx
lea eax, [esp + 0x54]
push eax
call fcn.0047f970
add esp, 0xc
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x36c]
push edx
call fcn.0047fa50
add esp, 8
push 1
push 0x4fe374
lea ecx, [esp + 0x1c]
call fcn.00405250
xor esi, esi
lea ecx, [ecx]
movzx eax, byte [esp + esi + 0x368]
push eax
push 0x4fe378
lea edi, [esp + 0x1c]
call fcn.00405ad0
inc esi
add esp, 8
cmp esi, 0x14
jl 0x4090d0
push 1
push 0x4fe384
mov ecx, edi
call fcn.00405250
mov esi, dword [esp + 0x14]
cmp dword [esi - 4], 1
jle 0x409117
mov ecx, dword [esi - 0xc]
push ecx
mov ecx, edi
call fcn.00405b90
mov esi, dword [esp + 0x14]
push esi
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, dword [esi - 0x10]
cmp dword [esi - 0xc], ebx
mov dword [0x512ea0], eax
lea eax, [esi - 0x10]
je 0x409179
cmp dword [eax + 0xc], ebx
lea ecx, [eax + 0xc]
jge 0x409151
cmp dword [esi - 8], ebx
jge 0x409147
push 0x80070057
call fcn.00405ef0
xor edx, edx
mov dword [esi - 0xc], ebx
mov word [esi], dx
jmp 0x409179
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409167
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
mov ecx, edi
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4091c6
push 0x30
push 0x4fe388
push 0x4fe398
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [0x512ea0]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [0x512ea0]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x598], 0xffffffff
lea eax, [esi - 0x10]
jmp 0x4096be
mov ecx, 0x4c
mov word [esp + 0x334], cx
mov edx, 0x48
mov eax, 0x56
mov ecx, 0x4d
mov word [esp + 0x336], dx
mov word [esp + 0x338], ax
mov word [esp + 0x33a], cx
mov edx, 0x5f
mov eax, 0x25
mov ecx, 0x30
mov word [esp + 0x33c], dx
mov word [esp + 0x33e], ax
mov word [esp + 0x340], cx
mov edx, 0x38
mov eax, 0x58
xor ecx, ecx
mov word [esp + 0x342], dx
mov word [esp + 0x344], ax
mov word [esp + 0x346], cx
call fcn.00450320
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40925f
push 0x80004005
call fcn.00405ef0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x598], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor eax, 0x1ed8e4e
push eax
lea ecx, [esp + 0x338]
push ecx
lea edi, [esp + 0x20]
call fcn.00405ad0
mov eax, dword [esp + 0x20]
add esp, 8
cmp dword [eax - 4], 1
jle 0x4092b0
mov edx, dword [eax - 0xc]
push edx
mov ecx, edi
call fcn.00405b90
mov eax, dword [esp + 0x18]
push eax
push 0x80
push ebx
push 4
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
lea eax, [esp + 0xac]
push eax
call fcn.0040aa30
mov byte [esp + 0x598], 2
mov esi, dword [esp + 0x3c]
lea ecx, [esp + 0xac]
mov dword [esi + 0x20], ecx
call fcn.00452c36
mov eax, dword [esi + 0xa4]
cmp eax, ebx
je 0x409303
push eax
mov dword [eax], vtable.CImpIDispatch.0
call fcn.004403d1
add esp, 4
mov ecx, dword [0x5132bc]
cmp ecx, ebx
je 0x409345
mov esi, ecx
call fcn.0043ac90
push eax
call fcn.004403d1
mov eax, dword [esi + 4]
add esp, 4
cmp eax, ebx
je 0x409330
push eax
call fcn.004403d1
add esp, 4
mov dword [esi + 4], ebx
mov edx, dword [0x5132bc]
push edx
call fcn.004403d1
add esp, 4
mov dword [0x5132bc], ebx
mov ecx, dword [0x5132c0]
cmp ecx, ebx
je 0x409386
mov esi, ecx
call fcn.0043ac90
push eax
call fcn.004403d1
mov eax, dword [esi + 4]
add esp, 4
cmp eax, ebx
je 0x409372
push eax
call fcn.004403d1
add esp, 4
mov dword [esi + 4], ebx
mov eax, dword [0x5132c0]
push eax
call fcn.004403d1
add esp, 4
mov dword [0x5132c0], ebx
mov eax, dword [0x5148d4]
mov ecx, dword [0x5148d0]
mov edi, eax
sub edi, ecx
sar edi, 2
xor esi, esi
cmp edi, ebx
jle 0x4093d0
mov edi, edi
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x4093b4
call fcn.0045ddc6
mov ecx, dword [0x5148d0]
mov ecx, dword [ecx + esi*4]
push ecx
call fcn.004403d1
mov eax, dword [0x5148d4]
mov ecx, dword [0x5148d0]
inc esi
add esp, 4
cmp esi, edi
jl 0x4093a0
mov ebx, eax
cmp ecx, eax
jbe 0x4093e6
call fcn.0045ddc6
mov eax, dword [0x5148d4]
mov ecx, dword [0x5148d0]
mov esi, dword [0x5148c4]
mov edi, ecx
cmp ecx, eax
jbe 0x4093f7
call fcn.0045ddc6
mov ecx, dword [0x5148c4]
push ebx
push esi
push edi
push ecx
lea edx, [esp + 0x4c]
push edx
mov esi, 0x5148c4
call fcn.004099d0
mov eax, dword [0x5148ec]
mov ecx, dword [0x5148e8]
mov ebx, eax
cmp ecx, eax
jbe 0x409431
call fcn.0045ddc6
mov eax, dword [0x5148ec]
mov ecx, dword [0x5148e8]
mov esi, dword [0x5148dc]
mov edi, ecx
cmp ecx, eax
jbe 0x409442
call fcn.0045ddc6
mov eax, dword [0x5148dc]
push ebx
push esi
push edi
push eax
lea edi, [esp + 0x4c]
mov esi, 0x5148dc
call fcn.00409a70
push 4
call fcn.004403a2
xor edi, edi
add esp, 4
cmp eax, edi
je 0x409471
lea ecx, [esp + 0x1c]
mov dword [eax], ecx
jmp 0x409473
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x598], 4
call fcn.00409800
mov byte [esp + 0x598], 2
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0x4094ad
push eax
call fcn.004403d1
add esp, 4
mov edx, dword [esp + 0x1c]
push edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
call fcn.004403d1
add esp, 4
push 4
call fcn.004403a2
add esp, 4
cmp eax, edi
je 0x4094dc
lea ecx, [esp + 0x1c]
mov dword [eax], ecx
jmp 0x4094de
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x598], 6
call fcn.004098b0
mov byte [esp + 0x598], 2
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0x409518
push eax
call fcn.004403d1
add esp, 4
mov edx, dword [esp + 0x1c]
push edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
call fcn.004403d1
add esp, 4
lea eax, [esp + 0x1c]
push eax
call fcn.00409b00
mov eax, dword [esp + 0x1c]
mov ecx, dword [0x51490c]
mov dword [esp + 0x1c], ecx
mov dword [0x51490c], eax
cmp ecx, eax
je 0x40955a
mov esi, dword [eax]
mov edx, dword [ecx]
mov dword [ecx], esi
mov dword [eax], edx
mov eax, dword [esp + 0x34]
mov ecx, dword [0x514924]
mov edx, dword [0x514928]
mov dword [0x514924], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edx
mov dword [0x514928], eax
lea esi, [esp + 0x1c]
mov byte [esp + 0x598], 0xa
call fcn.00409b80
mov byte [esp + 0x598], 2
mov eax, dword [esp + 0x1c]
push eax
call fcn.004403d1
mov eax, dword [0x5132d4]
add esp, 4
cmp eax, edi
je 0x4095be
push eax
call fcn.004403d1
add esp, 4
mov dword [0x5132d4], edi
mov eax, dword [0x5134e0]
cmp eax, edi
je 0x4095d6
push eax
call fcn.004403d1
add esp, 4
mov dword [0x5134e0], edi
mov eax, dword [0x5134f8]
cmp eax, edi
je 0x4095ee
push eax
call fcn.004403d1
add esp, 4
mov dword [0x5134f8], edi
mov edx, dword [0x514934]
mov esi, dword [edx - 0x10]
cmp dword [edx - 0xc], edi
lea eax, [edx - 0x10]
je 0x40964d
cmp dword [eax + 0xc], edi
lea ecx, [eax + 0xc]
jge 0x409626
cmp dword [edx - 8], edi
jge 0x409616
push 0x80070057
call fcn.00405ef0
mov dword [edx - 0xc], edi
mov edx, dword [0x514934]
xor ecx, ecx
mov word [edx], cx
jmp 0x40964d
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40963c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
add eax, 0x10
mov dword [0x514934], eax
mov eax, dword [0x512ea0]
cmp eax, edi
je 0x409670
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [0x512ea0]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x512ea0], edi
lea ecx, [esp + 0xac]
mov byte [esp + 0x598], 1
call fcn.0040ac30
mov byte [esp + 0x598], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4096ac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x598], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4096d7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x590]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x578]
xor ecx, esp
call fcn.0045d99c
mov esp, ebp
pop ebp
ret