Function at 0x421570
Capabilities:
Check mutex on windows
Get system information on windows
Read file via mapping

Disassembly:
sub esp, 0x50
push ebp
push esi
mov ebp, ecx
push edi
mov dword [esp + 0x14], ebp
call fcn.0040fb0d
call fcn.00421430
mov dword [ebp], 0
mov dword [ebp + 0x44], 0
call dword [sym.imp.kernel32.dll_GetCurrentProcessId]
mov esi, eax
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
lea eax, [esp + 0x24]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
push 1
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
push esi
push 0
push 2
push 0x427e58
push 0x427e58
lea eax, [esp + 0x38]
mov dword [esp + 0x2c], 0xc
lea edi, [ebp + 4]
mov dword [esp + 0x34], 0
push str.s.dscrt.mks._s_s._d._d._X
push edi
mov dword [esp + 0x38], eax
call fcn.004214a0
add esp, 0x1c
lea eax, [esp + 0x18]
push edi
push 0
push eax
call dword [sym.imp.kernel32.dll_CreateMutexA]
mov dword [ebp + 0x44], eax
test eax, eax
je 0x4218a4
push ebx
push 0xffffffffffffffff
push eax
mov byte [edi], 0x6d
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
push edi
push 0xca4
push 0
push 4
lea eax, [esp + 0x2c]
push eax
push 0xffffffffffffffff
call dword [sym.imp.kernel32.dll_CreateFileMappingA]
mov ebx, dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
call ebx
test esi, esi
je 0x42189a
push 0xca4
push 0
push 0
push 6
push esi
call dword [sym.imp.kernel32.dll_MapViewOfFile]
mov edi, eax
call ebx
test edi, edi
je 0x42189a
mov eax, dword [edi]
test eax, eax
je 0x421694
add eax, 8
push edi
mov dword [ebp], eax
call dword [sym.imp.kernel32.dll_UnmapViewOfFile]
push esi
call dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x421891
mov dword [edi + 4], esi
mov dword [edi], edi
add edi, 8
mov dword [esp + 0x14], edi
lea eax, [edi + 0x89c]
mov dword [edi], 0
mov dword [edi + 0x498], eax
lea eax, [esp + 0x3c]
push eax
mov dword [edi + 0x484], 0
mov dword [edi + 0x488], 0
mov dword [edi + 0x48c], 0
mov dword [edi + 0x494], 0
mov dword [edi + 0x490], 0x100
call dword [sym.imp.kernel32.dll_GetSystemInfo]
mov dword [edi + 0x64], 0
mov edx, 4
jmp 0x421700
lea eax, [edx + 3]
cmp edx, 0x44
ja 0x42170d
shr eax, 3
jmp 0x421723
cmp edx, 0x10c
ja 0x42171d
shr eax, 4
add eax, 5
jmp 0x421723
shr eax, 5
add eax, 0xe
mov ecx, edx
shr ecx, 2
mov dword [edi + ecx*4 + 0x64], eax
mov word [edi + eax*2 + 4], dx
add edx, 4
cmp edx, 0x41c
jbe 0x421700
push pe_nt_image_headers32
push 8
call dword [sym.imp.kernel32.dll_GetProcessHeap]
push eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
test eax, eax
je 0x42176c
push 0
mov ecx, eax
call fcn.004214d0
mov ecx, edi
test eax, eax
je 0x421770
lock inc dword [eax + 0x11c]
jmp 0x421770
xor eax, eax
mov ecx, edi
mov ebx, dword [ecx]
mov dword [ecx], eax
test ebx, ebx
je 0x42188e
mov eax, dword [0x432c18]
xor esi, esi
test eax, eax
je 0x42179a
mov esi, dword [eax]
test esi, esi
je 0x42179a
lea eax, [esi + 0x100]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
or eax, 0xffffffff
lock xadd dword [ebx + 0x11c], eax
dec eax
jne 0x42187d
mov ecx, dword [0x432c18]
test ecx, ecx
je 0x4217bc
push ebx
call fcn.004228b0
lea eax, [ebx + 0x100]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
cmp dword [ebx + 0x118], 0
jne 0x42180a
mov dword [esp + 0x10], ebx
mov ebp, ebx
mov edi, 0x2f
lea ecx, [ecx]
push ebp
lea ecx, [esp + 0x14]
call fcn.004219c0
add ebp, 4
sub edi, 1
jne 0x4217e0
lea eax, [ebx + 0xbc]
push eax
lea ecx, [esp + 0x14]
call fcn.004219c0
mov edi, dword [esp + 0x14]
mov ebp, dword [esp + 0x18]
mov ecx, dword [ebx + 0xc0]
test ecx, ecx
je 0x421853
jmp 0x421820
mov eax, dword [ecx]
mov dword [ebx + 0xc0], eax
mov eax, dword [0x432c18]
test eax, eax
je 0x421849
lock dec dword [eax + 0x488]
push 0x8000
push 0
lea eax, [ecx - 0x1e]
push eax
call dword [sym.imp.kernel32.dll_VirtualFree]
mov ecx, dword [ebx + 0xc0]
test ecx, ecx
jne 0x421820
lea eax, [ebx + 0x100]
push eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
lea eax, [ebx + 0x100]
push eax
call dword [sym.imp.kernel32.dll_DeleteCriticalSection]
push ebx
push 0
call dword [sym.imp.kernel32.dll_GetProcessHeap]
push eax
call dword [sym.imp.kernel32.dll_HeapFree]
test esi, esi
je 0x42188e
add esi, 0x100
push esi
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov dword [ebp], edi
mov eax, dword [ebp]
inc dword [eax + 0x484]
push dword [ebp + 0x44]
call dword [sym.imp.kernel32.dll_ReleaseMutex]
pop ebx
pop edi
pop esi
mov eax, ebp
pop ebp
add esp, 0x50
ret