Function at 0x411de7
Capabilities:
Check mutex on windows
Get file size

Disassembly:
push 0x58
mov eax, 0x427f1d
call fcn.00423fef
mov edi, dword [ebp + 8]
xor ebx, ebx
mov byte [ebp - 0x15], bl
mov dword [ebp - 4], ebx
lea eax, [ebp + 0xb]
push eax
call fcn.00406358
mov byte [ebp - 4], 1
push str.IPC_CSM_SHARED_MUTEX
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [edi + 0xc], eax
cmp eax, ebx
jne 0x411e35
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [ebp - 4], bl
call fcn.00406335
call fcn.00424094
ret 4
push 0x7d0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x411e25
cmp eax, 0x102
je 0x411e25
cmp word [0x439268], bx
jne 0x411f04
lea ecx, [ebp - 0x64]
call fcn.0040b727
mov byte [ebp - 4], 2
push dword [ebp - 0x44]
lea esi, [ebp - 0x24]
call fcn.00407a7c
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x20], 0x105
mov esi, 0x439268
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x28], ebx
cmp dword [ebp - 0x20], ebx
je 0x411eae
movzx ecx, word [eax]
cmp cx, bx
je 0x411eb9
mov edx, dword [ebp - 0x1c]
mov word [edx], cx
add dword [ebp - 0x1c], 2
inc eax
inc eax
mov dword [ebp - 0x2c], eax
dec dword [ebp - 0x20]
jmp 0x411e8d
sub dword [ebp - 0x1c], 2
mov dword [ebp - 0x28], 0x8007007a
mov eax, dword [ebp - 0x1c]
mov word [eax], bx
cmp dword [ebp - 0x28], ebx
jge 0x411ee9
mov word [0x439268], bx
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x24]
call fcn.00406432
mov byte [ebp - 4], 1
lea eax, [ebp - 0x64]
push eax
call fcn.0040bcbf
jmp 0x411e25
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x24]
call fcn.00406432
mov byte [ebp - 4], 1
lea eax, [ebp - 0x64]
push eax
call fcn.0040bcbf
jmp 0x411f09
mov esi, 0x439268
lea eax, [edi + 0x14]
push esi
push eax
call fcn.00406418
push str.CSMIPC.dat
lea eax, [edi + 0x14]
push eax
call fcn.00406418
lea eax, [edi + 0x18]
push esi
push eax
call fcn.00406418
push str.CSMIPC.tmp
lea eax, [edi + 0x18]
push eax
call fcn.00406418
or dword [edi + 4], 0xffffffff
mov dword [edi + 8], ebx
mov dword [edi + 0x20], ebx
mov dword [edi + 0x24], ebx
mov eax, dword [edi + 0x14]
push ebx
push 0x80
push 4
push ebx
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [edi + 4], eax
cmp eax, 0xffffffff
je 0x411e25
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x411f86
mov byte [ebp - 0x15], 1
mov dword [edi + 0x24], 0x186a0
jmp 0x411f93
push ebx
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [edi + 0x24], eax
mov eax, 0x186a0
cmp dword [edi + 0x24], eax
jae 0x411fa0
mov dword [edi + 0x24], eax
push ebx
push dword [edi + 0x24]
push ebx
push 4
push ebx
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [edi + 8], eax
cmp eax, ebx
jne 0x411fca
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [edi + 4], 0xffffffff
jmp 0x411e25
push ebx
push ebx
push ebx
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [edi + 0x20], eax
cmp eax, ebx
jne 0x411ff2
push dword [edi + 8]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov dword [edi + 8], ebx
push dword [edi + 4]
call esi
jmp 0x411fc1
mov dword [edi + 0x1c], eax
mov ecx, dword [eax + 8]
mov esi, dword [edi + 0x24]
cmp ecx, esi
ja 0x412008
cmp ecx, ebx
sete cl
cmp cl, bl
je 0x41200c
mov byte [ebp - 0x15], 1
cmp byte [ebp - 0x15], bl
je 0x412035
push esi
push ebx
push eax
call fcn.00414b10
add esp, 0xc
mov eax, dword [edi + 0x1c]
mov dword [eax], ebx
mov eax, dword [edi + 0x1c]
add eax, 4
mov dword [eax], ebx
mov eax, dword [edi + 0x1c]
add eax, 8
mov dword [eax], 0xc
mov eax, dword [edi + 0x1c]
cmp dword [eax], 0x3e8
setb al
cmp al, bl
je 0x41204b
mov byte [edi + 0x10], 1
jmp 0x41206b
push dword [edi + 0x20]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [edi + 8]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov dword [edi + 8], ebx
push dword [edi + 4]
call esi
or dword [edi + 4], 0xffffffff
mov byte [ebp - 4], bl
call fcn.00406335
or dword [ebp - 4], 0xffffffff
jmp 0x411e2d