Function at 0x644170
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x16c
push ebx
push ebp
mov eax, 0x7f
push esi
mov esi, dword [esp + 0x18c]
push edi
xor ebp, ebp
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], eax
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 0x31]
mov byte [esp + 0x30], 0
cmp esi, ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x24], ebp
rep stosd dword es:[edi], eax
jne 0x6441c8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x16c
ret 0x18
mov eax, dword [esp + 0x18c]
cmp eax, ebp
je 0x6441ea
cmp eax, 1
je 0x6441ea
pop edi
pop esi
pop ebp
mov eax, 6
pop ebx
add esp, 0x16c
ret 0x18
push str.8E1FBD9A_9BE4_4134_A7B0_05D530F835E6
push ebp
push ebp
mov dword [esi + 0x34], ebp
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ebx, eax
push 0xffffffffffffffff
push ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x18]
push eax
push ecx
push ebp
push 0x6bd340
call fcn.00643b60
add esp, 0x10
test eax, eax
je 0x644785
mov edx, dword [esp + 0x194]
mov eax, dword [esp + 0x1c]
mov ebx, dword [edx]
cmp ebx, eax
jae 0x644425
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x18c]
lea eax, [esp + 0x10]
push eax
mov eax, dword [edx + ebx*4]
add eax, 4
push ecx
push eax
call fcn.006447c0
add esp, 0xc
test eax, eax
je 0x644404
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 0x30]
lea edx, [esp + 0x30]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x18]
push edx
stosb byte es:[edi], al
mov esi, dword [ecx + ebx*4]
mov ecx, 0xe
add esi, 8
lea edi, [esp + 0x34]
push 0
push 0
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ebp, eax
mov esi, dword [esp + 0x188]
test esi, esi
je 0x644315
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x7c]
push eax
push ecx
push 8
push 0x6bd434
push edx
mov dword [esp + 0x28], 0xff
call fcn.00644900
add esp, 0x14
test eax, eax
je 0x6443f1
cmp dword [esp + 0x14], 0xa
jne 0x6443f1
mov al, byte [esp + 0x84]
test al, al
jne 0x6443ea
mov al, byte [esp + 0x85]
test al, al
jne 0x6443ea
mov ecx, 2
lea edi, [esp + 0x7c]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
je 0x644315
mov ecx, dword [esp + 0x10]
push ecx
jmp 0x6443f6
mov esi, dword [esp + 0x184]
test esi, esi
je 0x64437e
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x7c]
push ecx
push edx
push 8
push 0x6bd428
push eax
mov dword [esp + 0x28], 0xff
call fcn.00644900
add esp, 0x14
test eax, eax
je 0x6443ea
cmp dword [esp + 0x14], 0xa
jne 0x6443ea
mov al, byte [esp + 0x84]
test al, al
jne 0x6443e3
mov al, byte [esp + 0x85]
test al, al
jne 0x6443e3
mov ecx, 2
lea edi, [esp + 0x7c]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x6443f1
mov esi, dword [esp + 0x180]
test esi, esi
je 0x644413
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x7c]
push eax
push ecx
push 8
push 0x6bd324
push edx
mov dword [esp + 0x28], 0xff
call fcn.00644900
add esp, 0x14
test eax, eax
je 0x6443f1
cmp dword [esp + 0x14], 0x12
jne 0x6443f1
mov al, byte [esp + 0x8c]
test al, al
jne 0x6443ea
mov al, byte [esp + 0x8d]
test al, al
jne 0x6443ea
mov ecx, 2
lea edi, [esp + 0x7c]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
je 0x644413
mov ecx, dword [esp + 0x10]
push ecx
jmp 0x6443f6
mov edx, dword [esp + 0x10]
push edx
jmp 0x6443f6
mov eax, dword [esp + 0x10]
push eax
call fcn.006447f0
push ebp
call fcn.00644810
add esp, 8
mov eax, dword [esp + 0x1c]
inc ebx
cmp ebx, eax
jb 0x64423e
jmp 0x644425
mov ecx, dword [esp + 0x194]
inc ebx
mov dword [esp + 0x24], 1
mov dword [ecx], ebx
mov edx, dword [esp + 0x18]
push edx
call fcn.00643ec0
mov eax, dword [esp + 0x28]
add esp, 4
test eax, eax
je 0x644475
mov esi, dword [esp + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call fcn.00644810
mov eax, dword [esp + 0x194]
mov ecx, dword [esp + 0x14]
add esp, 4
mov dword [eax + 0x34], ebp
mov dword [eax + 0x30], ecx
pop edi
pop esi
mov dword [eax + 0x2c], 0
pop ebp
xor eax, eax
pop ebx
add esp, 0x16c
ret 0x18
mov edx, dword [esp + 0x194]
mov eax, dword [esp + 0x1c]
mov esi, dword [edx]
cmp esi, eax
ja 0x644488
mov esi, eax
sub esi, eax
lea eax, [esp + 0x6c]
push eax
call fcn.006440c0
lea ecx, [esp + 0x30]
lea edx, [esp + 0x1c]
push ecx
push edx
lea eax, [esp + 0x78]
push str.HIDVid_1bc0Pid_8013
push eax
call fcn.00643b60
add esp, 0x14
test eax, eax
je 0x64474a
mov eax, dword [esp + 0x2c]
mov ebx, esi
cmp esi, eax
mov dword [esp + 0x28], ebx
jae 0x6446c4
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x18c]
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [eax + ebx*4]
add ecx, 4
push edx
push ecx
call fcn.006447c0
add esp, 0xc
test eax, eax
je 0x644690
mov edx, dword [esp + 0x18]
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov esi, dword [edx + ebx*4]
lea eax, [esp + 0x30]
add esi, 8
mov ecx, 0xe
lea edi, [esp + 0x30]
push eax
push 0
push 0
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ebp, eax
mov ebx, 0xff
mov esi, dword [esp + 0x188]
test esi, esi
je 0x6445a3
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x7c]
push ecx
push edx
push 8
push 0x6bd434
push ebp
push eax
mov dword [esp + 0x2c], ebx
call fcn.00644830
add esp, 0x18
test eax, eax
je 0x64467d
cmp dword [esp + 0x14], 0xa
jne 0x64467d
mov al, byte [esp + 0x84]
test al, al
jne 0x64460d
mov al, byte [esp + 0x85]
test al, al
jne 0x64460d
mov ecx, 2
lea edi, [esp + 0x7c]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
je 0x6445a3
mov eax, dword [esp + 0x10]
push eax
jmp 0x644682
mov esi, dword [esp + 0x184]
test esi, esi
je 0x644614
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x7c]
push eax
push ecx
push 8
push 0x6bd428
push ebp
push edx
mov dword [esp + 0x2c], ebx
call fcn.00644830
add esp, 0x18
test eax, eax
je 0x644676
cmp dword [esp + 0x14], 0xa
jne 0x644676
mov al, byte [esp + 0x84]
test al, al
jne 0x64467d
mov al, byte [esp + 0x85]
test al, al
jne 0x64467d
mov ecx, 2
lea edi, [esp + 0x7c]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
je 0x644614
mov ecx, dword [esp + 0x10]
push ecx
jmp 0x644682
mov esi, dword [esp + 0x180]
test esi, esi
je 0x6446a7
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x7c]
push ecx
push edx
push 8
push 0x6bd324
push ebp
push eax
mov dword [esp + 0x2c], ebx
call fcn.00644830
add esp, 0x18
test eax, eax
je 0x64467d
cmp dword [esp + 0x14], 0x12
jne 0x64467d
mov al, byte [esp + 0x8c]
test al, al
jne 0x64460d
mov al, byte [esp + 0x8d]
test al, al
jne 0x64460d
mov ecx, 2
lea edi, [esp + 0x7c]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
je 0x6446a7
mov eax, dword [esp + 0x10]
push eax
jmp 0x644682
mov edx, dword [esp + 0x10]
push edx
call fcn.006447f0
push ebp
call fcn.00644810
add esp, 8
mov ebx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
inc ebx
cmp ebx, eax
mov dword [esp + 0x28], ebx
jb 0x6444ca
jmp 0x6446c4
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x24], 1
lea edx, [ecx + eax + 1]
mov eax, dword [esp + 0x194]
mov dword [eax], edx
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00643ec0
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
add esp, 4
test eax, eax
push esi
je 0x644714
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call fcn.00644810
mov eax, dword [esp + 0x194]
mov edx, dword [esp + 0x14]
add esp, 4
mov dword [eax + 0x34], ebp
mov dword [eax + 0x30], edx
pop edi
pop esi
mov dword [eax + 0x2c], 0xaa
pop ebp
xor eax, eax
pop ebx
add esp, 0x16c
ret 0x18
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call fcn.00644810
mov eax, dword [esp + 0x194]
add esp, 4
pop edi
pop esi
mov dword [eax + 0x30], 0xffffffff
mov dword [eax + 0x2c], 0
pop ebp
mov eax, 9
pop ebx
add esp, 0x16c
ret 0x18
mov esi, dword [esp + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call fcn.00644810
mov eax, dword [esp + 0x194]
add esp, 4
pop edi
pop esi
mov dword [eax + 0x30], 0xffffffff
mov dword [eax + 0x2c], 0
pop ebp
mov eax, 8
pop ebx
add esp, 0x16c
ret 0x18
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push ebx
call fcn.00644810
add esp, 4
mov dword [esi + 0x30], 0xffffffff
mov dword [esi + 0x2c], ebp
mov eax, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x16c
ret 0x18