Function at 0x41004c
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], esi
mov edi, ecx
cmp dword [0x4de7e0], 0
mov dword [ebp - 0x10], edx
mov esi, eax
mov eax, 0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
je 0x410b51
cmp esi, 0xfffffffb
jl 0x4103b2
cmp dword [0x4db0a0], 2
jge 0x410099
cmp dword [ebp + 0x14], 6
je 0x4103c1
cmp esi, 0xfffffffb
je 0x4109be
mov eax, 0x3ee4f99d
mov dword [ebp - 0x34], edi
lea ebx, [esi + 5]
imul ebx
mov dword [ebp - 4], ebx
mov ecx, ebx
mov dword [ebp - 0x30], ebx
sar edx, 7
sar ecx, 0x1f
sub edx, ecx
imul edx, edx, 0x209
neg edx
add edx, ebx
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x28], edx
lea eax, [edx + 0x69]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 4]
cmp ecx, 0x69
jge 0x410271
lea eax, [ecx*4]
mov edx, ecx
shl edx, 5
sub edx, eax
cmp dword [edx + 0x4df6ec], 0
je 0x410129
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [ebp - 4]
lea edi, [ecx*4]
mov edx, ecx
shl edx, 5
sub edx, edi
cmp eax, dword [edx + 0x4df6e8]
jne 0x410129
mov eax, 0x28
mov ebx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
mov esp, ebp
pop ebp
ret
cmp dword [0x4db0a0], 2
jge 0x410160
lea eax, [ecx*4]
shl ecx, 5
sub ecx, eax
mov edx, dword [ecx + 0x4df6e4]
test edx, edx
je 0x410152
mov eax, 0x98
jmp 0x4101d7
mov dword [ecx + 0x4df6e4], 1
xor eax, eax
jmp 0x4101d7
lea eax, [edx + 0x4df6e4]
push eax
call fcn.00401dd0
pop ecx
test eax, eax
je 0x410178
mov eax, 0x98
jmp 0x4101d7
mov edx, dword [ebp - 4]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
cmp dword [edx + 0x4df6e0], 0
je 0x4105a6
mov dword [edx + 0x4df6e4], 0
mov edx, dword [ebp - 4]
push 0xffffffffffffffff
lea eax, [edx*4]
shl edx, 5
sub edx, eax
push dword [edx + 0x4df6e0]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp - 4]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
lea ecx, [edx + 0x4df6e4]
push ecx
call fcn.00401dd0
pop ecx
test eax, eax
je 0x4101e2
mov eax, 0x98
jmp 0x410209
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [ebp - 4]
lea edx, [ecx*4]
shl ecx, 5
sub ecx, edx
mov dword [ecx + 0x4df6e8], eax
mov dword [ecx + 0x4df6ec], 1
xor eax, eax
test eax, eax
jne 0x41011c
mov eax, dword [ebp - 4]
lea edx, [eax*4]
shl eax, 5
sub eax, edx
mov edx, dword [eax + 0x4df6f8]
test edx, edx
je 0x41024a
movzx ecx, byte [edx + 0x161]
test cl, 0x20
jne 0x410240
test cl, 0x18
je 0x410240
cmp ebx, 6
je 0x41024a
cmp dword [edx + 0x18], 0
je 0x410591
lea ecx, [ebp - 0x20]
lea edx, [ebp - 8]
lea eax, [eax + 0x4df6e0]
push eax
push edx
push ebx
push ecx
push esi
call fcn.00417b20
add esp, 0x14
cmp eax, 0xfffffffd
je 0x4100d5
jmp 0x4103d7
mov eax, dword [ebp - 0x24]
mov ecx, dword [0x4db0a0]
mov dword [ebp - 4], eax
cmp ecx, 2
jge 0x4102b5
mov edx, dword [ebp - 0x28]
lea edi, [edx*4 + 0x1a4]
lea edx, [edi*8]
sub edx, edi
mov edi, dword [edx + 0x4df6e4]
test edi, edi
jne 0x41034f
mov dword [edx + 0x4df6e4], 1
mov eax, dword [ebp - 4]
jmp 0x41034f
mov eax, dword [ebp - 0x28]
lea edx, [eax*4 + 0x1a4]
lea ecx, [edx*8]
sub ecx, edx
lea edi, [ecx + 0x4df6e4]
push edi
call fcn.00401dd0
pop ecx
test eax, eax
jne 0x410346
mov ecx, dword [ebp - 4]
lea eax, [ecx*4]
mov edx, ecx
shl edx, 5
sub edx, eax
cmp dword [edx + 0x4df6e0], 0
je 0x41098f
lea eax, [ecx*4]
shl ecx, 5
sub ecx, eax
mov dword [ecx + 0x4df6e4], 0
mov edx, dword [ebp - 4]
push 0xffffffffffffffff
lea eax, [edx*4]
shl edx, 5
sub edx, eax
push dword [edx + 0x4df6e0]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp - 4]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
lea ecx, [edx + 0x4df6e4]
push ecx
call fcn.00401dd0
pop ecx
mov ecx, dword [0x4db0a0]
mov eax, dword [ebp - 4]
cmp ecx, 1
je 0x41096e
lea edx, [eax*4]
shl eax, 5
sub eax, edx
mov edx, dword [eax + 0x4df6f8]
mov dword [ebp - 0x20], edx
xor edi, edi
test edx, edx
je 0x41038b
cmp esi, dword [edx + 0xf8]
jle 0x410959
mov edi, edx
mov edx, dword [edx + 0x28]
mov dword [ebp - 0x20], edx
test edx, edx
jne 0x410373
lea edx, [ebp - 0xc]
lea ecx, [ebp - 8]
lea eax, [eax + 0x4df6e0]
push eax
push ecx
push ebx
push edx
push esi
call fcn.00417b20
add esp, 0x14
cmp eax, 0xfffffffd
je 0x4100d5
jmp 0x4105d5
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
mov eax, 0x20
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x2c], 2
lea eax, [ebp - 0x2c]
push eax
call fcn.00401550
pop ecx
jmp 0x410099
mov ebx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x34]
test eax, eax
jne 0x41011c
cmp dword [ebp - 0x20], 0
je 0x41049e
mov eax, dword [ebp - 0x20]
mov dword [0x4dec20], 1
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x10]
cmp edx, 6
mov dword [ecx], eax
jne 0x41040e
mov edx, 8
test edi, edi
je 0x410415
mov dword [edi + 4], eax
mov dword [eax + 0x64], edi
cmp edx, 0xd
je 0x41043d
cmp edx, 0x10
je 0x41043d
cmp edx, 0xa
jne 0x410433
mov eax, dword [ebp - 0x20]
or byte [eax + 0x16a], 2
jmp 0x41043d
mov eax, dword [ebp - 0x20]
and byte [eax + 0x16a], 0xfd
mov eax, dword [ebp - 0x20]
mov byte [eax + 0x154], dl
mov ecx, dword [ebp - 0x20]
and byte [ecx + 0x16a], 0xf7
mov ebx, dword [ebp - 0x20]
and byte [ebx + 0x16a], 0xef
cmp dword [ebp - 8], 0
je 0x41048f
mov eax, dword [ebp - 0x20]
call fcn.00411420
mov ebx, eax
test ebx, ebx
je 0x41048f
mov eax, esi
xor edx, edx
call fcn.0040f890
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
mov eax, ebx
mov ebx, dword [ebp - 0x1c]
mov dword [edx], 0
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
xor eax, eax
mov esp, ebp
pop ebp
ret
mov dword [ebp - 8], 0
lea eax, [ebp - 0x20]
push eax
push 1
push 0x178
call fcn.00412140
mov dword [ebp - 0x34], eax
add esp, 0xc
cmp dword [ebp - 0x34], 0
je 0x410537
mov edx, dword [ebp - 4]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
cmp dword [0x4db0a0], 2
mov dword [edx + 0x4df6ec], 0
mov dword [edx + 0x4df6e8], 0xffffffff
jge 0x4104f9
mov dword [edx + 0x4df6e4], 0
jmp 0x41051e
mov dword [edx + 0x4df6e4], 0
mov edx, dword [ebp - 4]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
push dword [edx + 0x4df6e0]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
mov dword [edx], 0
mov esp, ebp
pop ebp
ret
push 0x178
push 0
push dword [ebp - 0x20]
call fcn.004a1df0
add esp, 0xc
mov eax, dword [ebp - 0x20]
mov dword [eax + 0xf8], esi
cmp ebx, 0x69
jl 0x410574
mov edx, dword [ebp - 0x20]
xor eax, eax
mov dword [edx], eax
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 4], eax
mov ebx, dword [ebp - 0x20]
mov dword [ebx + 8], 0xffffffff
mov edx, dword [ebp - 0x20]
mov dword [edx + 0xc], eax
mov edx, dword [ebp - 4]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
mov eax, dword [ebp - 0x20]
mov dword [edx + 0x4df6f8], eax
jmp 0x4103f2
mov edi, dword [ebp - 0x34]
mov dword [ebp - 8], 1
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
jmp 0x4103f2
xor eax, eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ecx, dword [ebp - 4]
lea edx, [ecx*4]
shl ecx, 5
sub ecx, edx
mov dword [ecx + 0x4df6e0], eax
mov dword [ecx + 0x4df6e4], 0
jmp 0x41019e
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 0x28], edi
mov edi, dword [ebp - 0x34]
test eax, eax
jne 0x41011c
mov edx, dword [ebp - 0xc]
test edx, edx
je 0x410806
mov dword [ebp - 0x20], edx
cmp dword [edx + 0x18], 0
je 0x410697
mov eax, dword [0x4db0a0]
cmp eax, 1
je 0x41066a
cmp eax, 2
jge 0x41062e
mov edx, dword [ebp - 4]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
mov dword [edx + 0x4df6e4], 0
mov eax, dword [ebp - 0x20]
jmp 0x4103fc
mov edx, dword [ebp - 4]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
mov dword [edx + 0x4df6e4], 0
mov ebx, dword [ebp - 4]
lea ecx, [ebx*4]
shl ebx, 5
sub ebx, ecx
push dword [ebx + 0x4df6e0]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [ebp - 0x20]
jmp 0x4103fc
mov edx, dword [ebp - 4]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
push dword [edx + 0x4df6f4]
push dword [edx + 0x4df6f0]
call fcn.00401db0
add esp, 8
mov eax, dword [0x4db0a0]
jmp 0x410608
cmp dword [edx + 0xc], 0
je 0x4106b5
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [ebp - 0x20]
cmp eax, dword [edx + 8]
jne 0x4106b5
mov ebx, 0x28
jmp 0x410744
cmp dword [0x4db0a0], 2
jge 0x4106d7
mov eax, dword [edx + 4]
test eax, eax
je 0x4106cc
mov eax, 0x98
jmp 0x410719
mov dword [edx + 4], 1
xor eax, eax
jmp 0x410719
add edx, 4
push edx
call fcn.00401dd0
pop ecx
test eax, eax
je 0x4106ec
mov eax, 0x98
jmp 0x410719
mov eax, dword [ebp - 0x20]
cmp dword [eax], 0
je 0x4107e7
mov dword [eax + 4], 0
mov eax, dword [ebp - 0x20]
push 0xffffffffffffffff
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x20]
add eax, 4
push eax
call fcn.00401dd0
pop ecx
test eax, eax
je 0x410724
mov ebx, 0x98
jmp 0x41073c
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [ebp - 0x20]
mov dword [edx + 8], eax
mov eax, dword [ebp - 0x20]
xor ebx, ebx
mov dword [eax + 0xc], 1
test ebx, ebx
je 0x4105fe
mov eax, dword [0x4db0a0]
cmp eax, 1
je 0x4107ba
cmp eax, 2
jge 0x41076e
mov edx, dword [ebp - 4]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
mov dword [edx + 0x4df6e4], 0
jmp 0x4107a2
mov edx, dword [ebp - 4]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
mov dword [edx + 0x4df6e4], 0
mov esi, dword [ebp - 4]
lea ecx, [esi*4]
shl esi, 5
sub esi, ecx
push dword [esi + 0x4df6e0]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
mov eax, ebx
mov ebx, dword [ebp - 0x1c]
mov dword [edx], 0
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
push dword [edx + 0x4df6f4]
push dword [edx + 0x4df6f0]
call fcn.00401db0
add esp, 8
mov eax, dword [0x4db0a0]
jmp 0x41074e
xor eax, eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, dword [ebp - 0x20]
mov dword [edx], eax
mov eax, dword [ebp - 0x20]
mov dword [eax + 4], 0
jmp 0x4106ff
mov dword [ebp - 8], 0
lea eax, [ebp - 0x30]
push eax
push 1
push 0x178
call fcn.00412140
mov dword [ebp - 0x34], eax
add esp, 0xc
cmp dword [ebp - 0x34], 0
je 0x4108a4
mov eax, dword [0x4db0a0]
cmp eax, 1
je 0x410912
cmp eax, 2
jge 0x410857
mov edx, dword [ebp - 4]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
mov dword [edx + 0x4df6e4], 0
jmp 0x41088b
mov edx, dword [ebp - 4]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
mov dword [edx + 0x4df6e4], 0
mov ebx, dword [ebp - 4]
lea ecx, [ebx*4]
shl ebx, 5
sub ebx, ecx
push dword [ebx + 0x4df6e0]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
mov dword [edx], 0
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x34], eax
push 0x178
push 0
push eax
call fcn.004a1df0
add esp, 0xc
mov eax, dword [ebp - 0x34]
mov dword [eax + 0xf8], esi
cmp ebx, 0x69
jl 0x4108e5
mov edx, dword [ebp - 0x30]
xor eax, eax
mov dword [edx], eax
mov ecx, dword [ebp - 0x30]
mov dword [ecx + 4], eax
mov ebx, dword [ebp - 0x30]
mov dword [ebx + 8], 0xffffffff
mov edx, dword [ebp - 0x30]
mov dword [edx + 0xc], eax
cmp dword [ebp - 0x28], 0
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x20]
mov dword [edx + 0x28], eax
je 0x41093f
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x28]
mov dword [edx + 0x28], eax
mov edx, dword [ebp - 0x30]
mov dword [0x4dec20], 1
mov dword [ebp - 0x20], edx
jmp 0x4105f4
mov edx, dword [ebp - 4]
lea eax, [edx*4]
shl edx, 5
sub edx, eax
push dword [edx + 0x4df6f4]
push dword [edx + 0x4df6f0]
call fcn.00401db0
add esp, 8
mov eax, dword [0x4db0a0]
jmp 0x410837
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 4]
lea eax, [ecx*4]
shl ecx, 5
sub ecx, eax
mov dword [ecx + 0x4df6f8], edx
jmp 0x410900
jne 0x41038b
mov edi, dword [ebp - 0x34]
mov dword [ebp - 8], 1
jmp 0x4105f4
lea edx, [eax*4]
shl eax, 5
sub eax, edx
lea eax, [eax + 0x4df6f0]
push eax
call fcn.00401d80
pop ecx
mov eax, dword [ebp - 4]
jmp 0x410358
xor eax, eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ecx, dword [ebp - 4]
lea edx, [ecx*4]
shl ecx, 5
sub ecx, edx
mov dword [ecx + 0x4df6e0], eax
mov dword [ecx + 0x4df6e4], 0
jmp 0x41030d
lea eax, [ebp - 0x20]
push eax
push 1
push 0x178
call fcn.00412140
add esp, 0xc
mov ebx, eax
test ebx, ebx
jne 0x410a15
push 0x178
push 0
push dword [ebp - 0x20]
call fcn.004a1df0
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x34]
push edx
mov dword [eax + 0xf8], esi
push 0
push 0x54
call fcn.00412140
add esp, 0x18
mov ebx, eax
test ebx, ebx
je 0x410a31
push dword [ebp - 0x20]
call fcn.00412200
pop ecx
mov dword [ebp - 0x20], 0
test ebx, ebx
je 0x410a73
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
mov eax, ebx
mov ebx, dword [ebp - 0x1c]
mov dword [edx], 0
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x34]
mov dword [edx + 0x58], eax
mov ebx, dword [ebp - 0x20]
mov edx, 0x54
mov ecx, dword [ebp - 0x34]
mov dword [ebx + 0x5c], ecx
mov ecx, dword [ebp - 0x34]
xor eax, eax
mov dword [ecx + edx - 4], eax
mov dword [ecx + edx - 8], eax
mov dword [ecx + edx - 0xc], eax
mov dword [ecx + edx - 0x10], eax
mov dword [ecx + edx - 0x14], eax
mov dword [ecx + edx - 0x18], eax
mov dword [ecx + edx - 0x1c], eax
sub edx, 0x1c
jne 0x410a4b
mov eax, dword [ebp - 0x20]
mov dword [ecx], eax
mov eax, dword [0x4db0a0]
cmp eax, 2
jge 0x410a94
cmp eax, 1
je 0x410b23
mov dword [ebp - 0x30], section..data
mov edx, section..data
jmp 0x410aac
lea eax, [ebp - 0x30]
push eax
call fcn.00401b40
pop ecx
mov ebx, eax
test ebx, ebx
jne 0x410b02
mov eax, dword [0x4db0a0]
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x20]
mov edx, dword [edx]
mov dword [ecx + 0x28], edx
mov edx, dword [ebp - 0x20]
cmp eax, 1
mov ebx, dword [ebp - 0x30]
mov dword [ebx], edx
je 0x410b38
mov eax, dword [ebp + 0x14]
mov byte [edx + 0x154], al
mov eax, dword [ebp - 0x20]
test edi, edi
je 0x410ad4
mov dword [edi + 4], eax
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
mov dword [eax + 0x64], edi
mov edx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x18]
and byte [edx + 0x16a], 0xf7
mov ecx, dword [ebp - 0x20]
and byte [ecx + 0x16a], 0xef
mov eax, dword [ebp - 0x20]
mov dword [ebx], eax
xor eax, eax
mov ebx, dword [ebp - 0x1c]
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x20]
call fcn.00412200
pop ecx
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
mov eax, ebx
mov ebx, dword [ebp - 0x1c]
mov dword [edx], 0
mov esp, ebp
pop ebp
ret
push 0x4db064
call fcn.00401d80
pop ecx
mov eax, dword [0x4db0a0]
jmp 0x410a86
mov eax, dword [ebp - 0x30]
push dword [eax + 0x68]
push dword [eax + 0x64]
call fcn.00401db0
add esp, 8
mov edx, dword [ebp - 0x20]
jmp 0x410ac1
call fcn.00402010
jmp 0x41007d