Function at 0x4a7590
Capabilities:
Check if file exists
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54e085
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x424
mov eax, dword [ebp + 0xc]
push ebx
push edi
push dword [ebp + 8]
mov dword [eax], 0
push 0x40
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x58b858
lea eax, [ebp - 0x430]
push 0x104
push eax
call fcn.004519b0
add esp, 0x18
push 0x1f0001
push 0
lea eax, [ebp - 0x430]
mov dword [ebp - 4], 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexExW]
mov ebx, eax
mov dword [ebp - 0x14], ebx
test ebx, ebx
jne 0x4a7610
call fcn.004a7ca0
mov edi, eax
jmp 0x4a77f8
push 0
push 0xffffffffffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
cmp eax, 0x102
je 0x4a7633
test eax, eax
je 0x4a7635
cmp eax, 0x80
jne 0x4a7819
jmp 0x4a7635
xor ebx, ebx
push esi
mov dword [ebp - 0x20], ebx
lea ecx, [ebp - 0x228]
mov byte [ebp - 4], 1
xorps xmm0, xmm0
lea esi, [ebp - 0x430]
mov eax, ecx
movlpd qword [ebp - 0x1c], xmm0
mov edx, 0x104
sub esi, eax
nop word [eax + eax]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x4a767e
movzx eax, word [ecx + esi]
test ax, ax
je 0x4a767e
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x4a7660
lea eax, [ecx - 2]
test edx, edx
push 0x58b84c
cmovne eax, ecx
xor ecx, ecx
push 0x104
mov word [eax], cx
lea eax, [ebp - 0x228]
push eax
call fcn.004a8ae0
lea eax, [ebp - 0x228]
push eax
push 0
push 0x1f0003
call dword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
mov esi, eax
test esi, esi
jne 0x4a771f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4a76e2
mov eax, dword [ebp + 4]
push 0x58b814
push 0xc9
push eax
call fcn.004a8790
mov edi, eax
add esp, 0xc
test edi, edi
js 0x4a7760
mov edi, dword [ebp - 0x1c]
lea eax, [edi*4]
test eax, eax
je 0x4a77b9
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
mov ecx, dword [eax]
mov eax, dword [edx]
inc ecx
mov dword [eax], ecx
xor edi, edi
pop esi
test ebx, ebx
je 0x4a77f5
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
je 0x4a782c
jmp 0x4a77f5
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push esi
call fcn.004a8150
mov edi, eax
add esp, 8
test edi, edi
jns 0x4a779e
mov eax, dword [ebp + 4]
push edi
push 0x58b814
push 0xcf
push eax
call fcn.004a87e0
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0x10
push esi
call eax
test eax, eax
je 0x4a783f
mov eax, dword [ebp + 4]
push edi
push 0x58b814
push 0x62
push eax
call fcn.004a87e0
mov eax, dword [ebp + 4]
push edi
push 0x58b814
push 0x6b
push eax
call fcn.004a87e0
mov eax, dword [ebp + 4]
push edi
push 0x58b814
push pe_nt_image_headers32
push eax
call fcn.004a87e0
add esp, 0x30
jmp 0x4a7702
mov eax, dword [ebp - 0x10]
cdq
mov edi, eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call eax
test eax, eax
je 0x4a7852
jmp 0x4a76e5
push dword [ebp + 0xc]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x430]
push eax
call fcn.004a8300
mov edi, eax
add esp, 0xc
test edi, edi
jns 0x4a7700
mov eax, dword [ebp + 4]
push edi
push 0x58b814
push 0x130
push eax
call fcn.004a87e0
add esp, 0x10
jmp 0x4a7702
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x4a7807
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4a7865
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 4]
push str.C:Contrib2MicrosoftWILincludewil_resource.h
push 0xb74
push eax
call fcn.004a7a90
mov eax, dword [ebp + 4]
push str.C:Contrib2MicrosoftWILincludewil_resource.h
push 0x948
push eax
call fcn.004691b0
mov eax, dword [ebp + 4]
push str.C:Contrib2MicrosoftWILincludewil_resource.h
push 0x93e
push eax
call fcn.004691b0
mov eax, dword [ebp + 4]
push str.C:Contrib2MicrosoftWILincludewil_resource.h
push 0x93e
push eax
call fcn.004691b0
mov eax, dword [ebp + 4]
push str.C:Contrib2MicrosoftWILincludewil_resource.h
push 0x93e
push eax
call fcn.004691b0
int3