Function at 0x4025e0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x334
push ebx
push esi
push edi
xor ebx, ebx
xor eax, eax
mov byte [esp + 0x230], bl
mov ecx, 0x43
lea edi, [esp + 0x231]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x14]
stosb byte es:[edi], al
xor eax, eax
cmp ecx, ebx
mov dword [esp + 0x10], ebx
je 0x402ad1
mov esi, dword [ebp + 8]
push 0x25
push esi
call fcn.004590c0
add esp, 8
test eax, eax
je 0x4026c6
cmp esi, ebx
je 0x4026c6
xor eax, eax
mov ecx, 0x43
lea edi, [esp + 0x230]
rep stosd dword es:[edi], eax
push 0x25
push esi
stosw word es:[edi], ax
call fcn.004590c0
add esp, 8
test eax, eax
jne 0x402686
push 0x10d
lea eax, [esp + 0x234]
push esi
push eax
call fcn.00458f80
mov eax, esi
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402674
sub eax, edx
cmp eax, 0x10e
jge 0x4026c6
jmp 0x4026ba
push 0x10e
lea ecx, [esp + 0x234]
push ecx
push esi
call fcn.00449b30
add esp, 0xc
cmp eax, ebx
je 0x4026ba
push 0x10e
lea edx, [esp + 0x234]
push edx
push esi
call fcn.0044a750
add esp, 0xc
cmp eax, ebx
jne 0x4026c6
lea eax, [esp + 0x230]
mov dword [ebp + 8], eax
mov esi, eax
mov edi, dword [ebp + 0xc]
mov eax, edi
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4026d0
sub eax, edx
mov dword [esp + 0x14], eax
je 0x402785
push edi
push 0
lea ecx, [esp + 0x24]
push ecx
mov dword [esp + 0x28], 0xc
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 1
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
mov dword [esp + 0x10], eax
jne 0x402748
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x30]
push str.ERROR:_Failed_to_create_mutex_in_doClearFile___task_due_to_error__d._n
push edx
call fcn.00458ee7
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x38], 1
call fcn.0043e010
add esp, 0x10
mov eax, 0x400b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x402785
lea ecx, [esp + 0x2c]
push str.ERROR:_Failed_to_obtain_mutex_in_doClearFile___task._n
push ecx
call fcn.00458ee7
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0x34], 1
call fcn.0043e010
add esp, 0xc
mov eax, 0x400b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x4698e4
push esi
call fcn.00459902
mov esi, eax
add esp, 8
test esi, esi
jne 0x4027e3
mov esi, dword [esp + 0x10]
test esi, esi
je 0x4027af
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
push eax
lea ecx, [esp + 0x30]
push str.ERROR:_Could_not_open__s_in_doClearFile___task_n
push ecx
call fcn.00458ee7
lea edx, [esp + 0x34]
push edx
mov dword [esp + 0x38], 1
call fcn.0043e010
add esp, 0x10
mov eax, 0x400c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 2
push 0
push esi
call fcn.0045985d
push esi
call fcn.0045978d
push 0
push 0
push esi
mov edi, eax
call fcn.0045985d
add esp, 0x1c
test edi, edi
je 0x402ab0
cmp dword [ebp + 0x14], edi
jae 0x4028e9
push edi
call fcn.00459619
add esp, 4
mov ebx, eax
test ebx, ebx
push esi
jne 0x402876
call fcn.00459521
mov esi, dword [esp + 0x14]
add esp, 4
test esi, esi
je 0x402841
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
push eax
push edi
lea ecx, [esp + 0x34]
push str.ERROR:_doClearFile___failed_to_allocate__d_bytes_to_process_file__s_n
push ecx
call fcn.00458ee7
lea edx, [esp + 0x38]
push edx
mov dword [esp + 0x3c], 1
call fcn.0043e010
add esp, 0x14
mov eax, 0x4099
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push 1
push ebx
call fcn.00459489
add esp, 0x10
cmp eax, edi
mov dword [esp + 0x14], eax
je 0x4028e9
push esi
call fcn.00459521
mov esi, dword [esp + 0x14]
add esp, 4
test esi, esi
je 0x4028a9
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
push eax
push edi
push ecx
lea edx, [esp + 0x38]
push str.ERROR:_doClearFile___read_failed_at__d_out_of__d_bytes_in_file__s_n
push edx
call fcn.00458ee7
lea eax, [esp + 0x3c]
push eax
mov dword [esp + 0x40], 1
call fcn.0043e010
push ebx
call fcn.0045932f
add esp, 0x1c
mov eax, 0x400d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.00459521
mov esi, dword [ebp + 8]
push 0x469850
push esi
call fcn.00459902
add esp, 0xc
test eax, eax
mov dword [esp + 0x18], eax
jne 0x40295c
mov edi, dword [esp + 0x10]
test edi, edi
je 0x40291e
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
lea ecx, [esp + 0x30]
push str.ERROR:_Could_not_re_open__s_in_doClearFile___task_n
push ecx
call fcn.00458ee7
lea edx, [esp + 0x34]
push edx
mov dword [esp + 0x38], 1
call fcn.0043e010
add esp, 0x10
test ebx, ebx
je 0x402950
push ebx
call fcn.0045932f
add esp, 4
mov eax, 0x400c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x402a3f
mov ecx, dword [ebp + 0x14]
cmp ecx, edi
jae 0x402a3f
cmp byte [ebx], 0x27
je 0x402a21
mov edx, dword [ebp + 0x10]
cmp edx, 1
je 0x402998
cmp edx, 2
je 0x402998
cmp edx, 3
je 0x402998
cmp edx, 4
je 0x402998
cmp edx, 5
jne 0x402a21
xor esi, esi
test ecx, ecx
jbe 0x4029b5
mov edi, edi
cmp byte [esi + ebx], 0xa
jne 0x4029ad
cmp byte [esi + ebx + 1], 0x27
je 0x4029b4
inc esi
cmp esi, ecx
jb 0x4029a0
jmp 0x4029b5
inc esi
push eax
push esi
push 1
push ebx
call fcn.004592e3
add esp, 0x10
cmp eax, esi
je 0x4029fc
mov ecx, dword [ebp + 8]
push ecx
push esi
push eax
lea edx, [esp + 0x38]
push str.ERROR:_doClearFile___write_failed_at__d_out_of__d_bytes_in_file__s_retaining_header_line_s_._n
push edx
call fcn.00458ee7
lea eax, [esp + 0x3c]
push eax
mov dword [esp + 0x40], 1
call fcn.0043e010
add esp, 0x18
mov eax, 0x400e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x14]
mov ecx, dword [esp + 0x18]
push ecx
mov esi, edi
sub esi, eax
push esi
lea edx, [ebx + eax]
push 1
push edx
call fcn.004592e3
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x28]
add esp, 0x10
jmp 0x402a45
push eax
mov esi, edi
sub esi, ecx
push esi
lea eax, [ebx + ecx]
push 1
push eax
call fcn.004592e3
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x28]
add esp, 0x10
jmp 0x402a45
xor esi, esi
mov dword [esp + 0x14], esi
push eax
call fcn.00459521
add esp, 4
test ebx, ebx
je 0x402a5b
push ebx
call fcn.0045932f
add esp, 4
mov ebx, dword [esp + 0x10]
test ebx, ebx
je 0x402a71
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
cmp eax, esi
je 0x402acf
mov ecx, dword [ebp + 8]
push edi
push ecx
push esi
push eax
lea edx, [esp + 0x3c]
push str.ERROR:_doClearFile___write_failed_at__d_out_of__d_bytes_in_file__s_with__d_bytes_originally._n
push edx
call fcn.00458ee7
lea eax, [esp + 0x40]
push eax
mov dword [esp + 0x44], 1
call fcn.0043e010
add esp, 0x1c
mov eax, 0x400e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.00459521
mov esi, dword [esp + 0x14]
add esp, 4
test esi, esi
je 0x402acf
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret