Function at 0x4085f0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4cf4a2
mov eax, dword fs:[0]
push eax
sub esp, 0x560
mov eax, dword [0x507628]
xor eax, esp
mov dword [esp + 0x558], eax
push ebx
push esi
push edi
mov eax, dword [0x507628]
xor eax, esp
push eax
lea eax, [esp + 0x570]
mov dword fs:[0], eax
lea eax, [esp + 0x34]
push eax
mov esi, ecx
mov dword [esp + 0x38], 8
mov dword [esp + 0x3c], 0xff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov ecx, esi
call fcn.0044f4e4
push 8
call fcn.0043e252
xor ebx, ebx
add esp, 4
cmp eax, ebx
je 0x40866f
mov dword [eax], vtable.CImpIDispatch.0
mov dword [eax + 4], ebx
jmp 0x408671
xor eax, eax
push 4
mov dword [esi + 0xa4], eax
call fcn.0044fbc2
cmp eax, ebx
je 0x40868a
mov dword [eax], vtable.CCustomOccManager.0
jmp 0x40868c
xor eax, eax
push eax
call fcn.00445db8
add esp, 4
push 0x206
lea edx, [esp + 0x362]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x368], cx
call fcn.00460c60
add esp, 0xc
push 0x104
lea eax, [esp + 0x360]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x35c]
push 0x5c
push ecx
call fcn.0045bbdf
add eax, 2
xor edx, edx
mov word [eax], dx
mov ecx, 0x4c
mov word [esp + 0x332], cx
mov ecx, 0x6e
mov word [esp + 0x338], cx
mov edx, 0x61
mov word [esp + 0x334], dx
mov eax, 0x50
mov word [esp + 0x330], ax
mov ecx, 0x65
mov word [esp + 0x33e], cx
mov edx, 0x63
mov word [esp + 0x33a], dx
mov eax, 0x75
mov word [esp + 0x336], ax
mov ecx, 0x75
mov edx, 0x72
mov word [esp + 0x340], dx
mov word [esp + 0x344], cx
mov eax, 0x68
mov word [esp + 0x33c], ax
mov ecx, 0x78
mov edx, 0x74
mov eax, 0x4d
mov word [esp + 0x346], dx
mov word [esp + 0x34a], cx
mov word [esp + 0x342], ax
lea ecx, [esp + 0x330]
mov edx, 0x2b
push ecx
mov eax, 0x65
mov word [esp + 0x350], dx
mov word [esp + 0x34c], ax
lea edx, [esp + 0x368]
xor eax, eax
push 0x104
push edx
mov word [esp + 0x35a], ax
call fcn.0045c105
add esp, 0x14
call fcn.0044e17a
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4087e4
push 0x80004005
call fcn.00405740
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x44]
push ecx
mov dword [esp + 0x57c], ebx
call fcn.0047b5a0
add esp, 4
push 0x208
lea edx, [esp + 0x360]
push edx
lea eax, [esp + 0x4c]
push eax
call fcn.0047b370
add esp, 0xc
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x34c]
push edx
call fcn.0047b450
add esp, 8
push 1
push 0x4f9750
lea ecx, [esp + 0x18]
call fcn.00404e30
jmp 0x408850
movzx eax, byte [esp + ebx + 0x348]
push eax
push 0x4f9754
lea edi, [esp + 0x18]
call fcn.00405310
inc ebx
add esp, 8
cmp ebx, 0x14
jl 0x408850
push 1
push 0x4f9760
mov ecx, edi
call fcn.00404e30
mov edi, dword [esp + 0x10]
cmp dword [edi - 4], 1
jle 0x408899
mov ecx, dword [edi - 0xc]
push ecx
lea ecx, [esp + 0x14]
call fcn.004053d0
mov edi, dword [esp + 0x10]
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp dword [edi - 0xc], 0
mov ebx, dword [edi - 0x10]
mov dword [0x511460], eax
lea eax, [edi - 0x10]
je 0x408904
cmp dword [eax + 0xc], 0
lea ecx, [eax + 0xc]
jge 0x4088dc
cmp dword [edi - 8], 0
jge 0x4088ce
push 0x80070057
call fcn.00405740
xor edx, edx
mov dword [edi - 0xc], 0
mov word [edi], dx
jmp 0x408904
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4088f2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [ebx]
mov eax, dword [edx + 0xc]
mov ecx, ebx
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40895f
push 0x30
push 0x4f9764
push 0x4f9774
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [0x511460]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [0x511460]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [edi - 0x10]
mov dword [esp + 0x578], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x408d46
lea ebx, [esp + 0xa4]
call fcn.0040ac10
mov ecx, ebx
mov byte [esp + 0x578], 1
mov dword [esi + 0x20], ecx
call fcn.00450a69
mov eax, dword [esi + 0xa4]
xor ebx, ebx
cmp eax, ebx
je 0x408998
push eax
mov dword [eax], vtable.CImpIDispatch.0
call fcn.0043e28c
add esp, 4
mov ecx, dword [0x511854]
cmp ecx, ebx
je 0x4089da
mov esi, ecx
call fcn.00439050
push eax
call fcn.0043e28c
mov eax, dword [esi + 4]
add esp, 4
cmp eax, ebx
je 0x4089c5
push eax
call fcn.0043e28c
add esp, 4
mov dword [esi + 4], ebx
mov edx, dword [0x511854]
push edx
call fcn.0043e28c
add esp, 4
mov dword [0x511854], ebx
mov ecx, dword [0x511858]
cmp ecx, ebx
je 0x408a1b
mov esi, ecx
call fcn.00439050
push eax
call fcn.0043e28c
mov eax, dword [esi + 4]
add esp, 4
cmp eax, ebx
je 0x408a07
push eax
call fcn.0043e28c
add esp, 4
mov dword [esi + 4], ebx
mov eax, dword [0x511858]
push eax
call fcn.0043e28c
add esp, 4
mov dword [0x511858], ebx
mov eax, dword [0x512e5c]
mov ecx, dword [0x512e58]
mov edi, eax
sub edi, ecx
sar edi, 2
xor esi, esi
cmp edi, ebx
jle 0x408a63
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x408a47
call fcn.0045d970
mov ecx, dword [0x512e58]
mov ecx, dword [ecx + esi*4]
push ecx
call fcn.0043e28c
mov eax, dword [0x512e5c]
mov ecx, dword [0x512e58]
inc esi
add esp, 4
cmp esi, edi
jl 0x408a33
mov ebx, eax
cmp ecx, eax
jbe 0x408a79
call fcn.0045d970
mov eax, dword [0x512e5c]
mov ecx, dword [0x512e58]
mov esi, dword [0x512e4c]
mov edi, ecx
cmp ecx, eax
jbe 0x408a8a
call fcn.0045d970
mov ecx, dword [0x512e4c]
push ebx
push esi
push edi
push ecx
lea edx, [esp + 0x4c]
push edx
mov esi, 0x512e4c
call fcn.00409070
mov eax, dword [0x512e74]
mov ecx, dword [0x512e70]
mov ebx, eax
cmp ecx, eax
jbe 0x408ac4
call fcn.0045d970
mov eax, dword [0x512e74]
mov ecx, dword [0x512e70]
mov esi, dword [0x512e64]
mov edi, ecx
cmp ecx, eax
jbe 0x408ad5
call fcn.0045d970
mov eax, dword [0x512e64]
push ebx
push esi
push edi
push eax
lea edi, [esp + 0x4c]
mov esi, 0x512e64
call fcn.00409110
push 4
call fcn.0043e252
xor edi, edi
add esp, 4
cmp eax, edi
je 0x408b04
lea ecx, [esp + 0x14]
mov dword [eax], ecx
jmp 0x408b06
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
lea ecx, [esp + 0x14]
mov byte [esp + 0x578], 3
call fcn.00408e60
mov byte [esp + 0x578], 4
mov eax, dword [esp + 0x20]
cmp eax, edi
je 0x408b40
push eax
call fcn.0043e28c
add esp, 4
mov byte [esp + 0x578], 1
mov edx, dword [esp + 0x14]
push edx
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
call fcn.0043e28c
add esp, 4
push 4
call fcn.0043e252
add esp, 4
cmp eax, edi
je 0x408b77
lea ecx, [esp + 0x14]
mov dword [eax], ecx
jmp 0x408b79
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
lea ecx, [esp + 0x14]
mov byte [esp + 0x578], 6
call fcn.00408f30
mov byte [esp + 0x578], 7
mov eax, dword [esp + 0x20]
cmp eax, edi
je 0x408bb3
push eax
call fcn.0043e28c
add esp, 4
mov byte [esp + 0x578], 1
mov edx, dword [esp + 0x14]
push edx
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
call fcn.0043e28c
add esp, 4
lea eax, [esp + 0x14]
push eax
call fcn.004091a0
mov eax, dword [esp + 0x14]
mov ecx, dword [0x512e94]
mov dword [esp + 0x14], ecx
mov dword [0x512e94], eax
cmp ecx, eax
je 0x408bfd
mov esi, dword [eax]
mov edx, dword [ecx]
mov dword [ecx], esi
mov dword [eax], edx
mov eax, dword [esp + 0x2c]
mov ecx, dword [0x512eac]
mov edx, dword [0x512eb0]
mov dword [0x512eac], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
mov dword [0x512eb0], eax
lea esi, [esp + 0x14]
mov byte [esp + 0x578], 0xb
call fcn.00409220
mov byte [esp + 0x578], 1
mov eax, dword [esp + 0x14]
push eax
call fcn.0043e28c
mov eax, dword [0x51186c]
add esp, 4
cmp eax, edi
je 0x408c61
push eax
call fcn.0043e28c
add esp, 4
mov dword [0x51186c], edi
mov eax, dword [0x511a78]
cmp eax, edi
je 0x408c79
push eax
call fcn.0043e28c
add esp, 4
mov dword [0x511a78], edi
mov eax, dword [0x511a88]
cmp eax, edi
je 0x408c91
push eax
call fcn.0043e28c
add esp, 4
mov dword [0x511a88], edi
mov edx, dword [0x512ebc]
mov esi, dword [edx - 0x10]
cmp dword [edx - 0xc], edi
lea eax, [edx - 0x10]
je 0x408cf0
cmp dword [eax + 0xc], edi
lea ecx, [eax + 0xc]
jge 0x408cc9
cmp dword [edx - 8], edi
jge 0x408cb9
push 0x80070057
call fcn.00405740
mov dword [edx - 0xc], edi
mov edx, dword [0x512ebc]
xor ecx, ecx
mov word [edx], cx
jmp 0x408cf0
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408cdf
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 [0x512ebc], eax
mov eax, dword [0x511460]
cmp eax, edi
je 0x408d13
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [0x511460]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x511460], edi
lea ecx, [esp + 0xa4]
mov byte [esp + 0x578], 0
call fcn.0040c100
mov dword [esp + 0x578], 0xffffffff
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x408d52
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x570]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x558]
xor ecx, esp
call fcn.0045ba17
mov esp, ebp
pop ebp
ret