Function at 0x4c4d70
Capabilities:
Check mutex on windows
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
cmp dword [ebp + 0x24], 0
mov dword [ebp - 4], 2
je 0x4c4f82
cmp dword [ebp + 0x20], 8
mov eax, dword [ebp + 0xc]
jae 0x4c4d96
lea eax, [ebp + 0xc]
push ebx
push esi
mov esi, dword [sym.imp.MSVCR80.dll_swprintf_s]
push edi
push eax
push str.GlobalA5F92A4A_C9AA_46ac_B9EE_F823C74B1788
mov ebx, str._s__s
push ebx
mov edi, 0x104
lea eax, [ebp - 0x21c]
push edi
push eax
call esi
add esp, 0x14
lea eax, [ebp - 0x21c]
push eax
push 0
push 0x1f0001
mov dword [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
test eax, eax
mov dword [ebp - 0x10], eax
je 0x4c4f7f
push 0x1388
push eax
mov dword [ebp - 4], 5
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x4c4f6d
cmp dword [ebp + 0x20], 8
mov eax, dword [ebp + 0xc]
jae 0x4c4e0d
lea eax, [ebp + 0xc]
push eax
push str.Global9D3AEB9C_776B_4c34_8E12_86CFB88DCD94
push ebx
lea eax, [ebp - 0x21c]
push edi
push eax
call esi
add esp, 0x14
lea eax, [ebp - 0x21c]
push eax
push 0
push 0x1f0003
mov dword [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_OpenEventW]
test eax, eax
mov dword [ebp - 0xc], eax
je 0x4c4f6d
cmp dword [ebp + 0x20], 8
mov eax, dword [ebp + 0xc]
jae 0x4c4e53
lea eax, [ebp + 0xc]
push eax
push str.Global233D2E1E_1ABB_4e0e_BD10_38D01DE26B9C
push ebx
lea eax, [ebp - 0x21c]
push edi
push eax
call esi
add esp, 0x14
lea eax, [ebp - 0x21c]
push eax
push 0
push 0x1f0003
call dword [sym.imp.KERNEL32.dll_OpenEventW]
test eax, eax
mov dword [ebp - 8], eax
je 0x4c4f64
cmp dword [ebp + 0x20], 8
mov eax, dword [ebp + 0xc]
jae 0x4c4e92
lea eax, [ebp + 0xc]
push eax
push str.Global34031B5D_FE74_481b_9F31_38A760DB4C00
push ebx
lea eax, [ebp - 0x21c]
push edi
push eax
call esi
add esp, 0x14
lea eax, [ebp - 0x21c]
push eax
xor edi, edi
push edi
push 0xf001f
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
cmp eax, edi
mov dword [ebp - 0x14], eax
je 0x4c4f5b
mov ebx, 0x1000
push ebx
push edi
push edi
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
cmp esi, edi
je 0x4c4f52
mov eax, dword [ebp + 0x28]
mov edi, dword [eax]
push edi
push dword [ebp + 0x24]
lea eax, [esi + 4]
push eax
mov dword [ebp - 4], 3
mov dword [esi], edi
call sub.MSVCR80.dll_memcpy
add esp, 0xc
cmp edi, ebx
ja 0x4c4f4b
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xffffffffffffffff
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esi]
test eax, eax
mov dword [ebp - 4], 1
jns 0x4c4f42
mov ecx, dword [ebp + 0x28]
and eax, 0x7fffffff
cmp dword [ecx], eax
jb 0x4c4f42
push eax
mov dword [ecx], eax
lea eax, [esi + 4]
push eax
push dword [ebp + 0x24]
call sub.MSVCR80.dll_memcpy
add esp, 0xc
and dword [ebp - 4], 0
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
lea ecx, [ebp + 8]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov eax, dword [ebp - 4]
leave
ret 0x24