Function at 0x517df0
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Read file via mapping
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e6fe6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x38
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, ecx
push eax
mov dword [ebp - 0x10], esi
call fcn.004d1970
xor ebx, ebx
lea ecx, [esi + 0xf0]
mov dword [ebp - 4], ebx
mov dword [esi], vtable.CMainFrame.2.0
mov dword [esi + 0xc0], vtable.CMainFrame.1.0
mov dword [esi + 0xc8], vtable.CMainFrame.0
call fcn.00517ca0
xor eax, eax
push 1
lea ecx, [ebp - 0x30]
push ecx
mov byte [ebp - 4], 1
mov byte [ebp - 0x30], bl
mov dword [ebp - 0x2f], eax
mov dword [ebp - 0x2b], eax
mov dword [ebp - 0x27], eax
mov dword [ebp - 0x23], eax
mov word [ebp - 0x1f], ax
mov byte [ebp - 0x1d], al
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [esi + 0x138], ebx
mov byte [esi + 0x13c], bl
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push ebx
push ebx
push 1
lea edx, [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
push str.GlobalGameRanger_Launch
push 1
lea ecx, [ebp - 0x1c]
lea eax, [ebp - 0x30]
push ecx
mov dword [ebp - 0x1c], 0xc
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [esi + 0xe4], eax
cmp eax, ebx
je 0x517ecc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x517ee8
push str.GameRanger_is_already_running.
push str.GameRanger_Running
call fcn.00458400
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call edi
push str.GameRanger_Client
push 0x18
push ebx
push 4
lea edx, [ebp - 0x1c]
push edx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [esi + 0xe8], eax
cmp eax, ebx
jne 0x517f24
push str.GameRanger_could_not_open_a_file_mapping.
push str.Unable_to_Launch
call fcn.00458400
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call edi
mov eax, dword [esi + 0xe8]
push ebx
push ebx
push ebx
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 0xec], eax
cmp eax, ebx
jne 0x517f5c
push str.GameRanger_could_not_open_a_file_mapping.__2_
push str.Unable_to_Launch
call fcn.00458400
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x517fd0
mov edx, dword [esi + 0xec]
lea ecx, [ebp - 0x44]
push ecx
push 4
push edx
call fcn.005d79b0
mov edx, dword [esi + 0xec]
lea eax, [ebp - 0x44]
add edx, 4
mov edi, eax
add esp, 0xc
mov ecx, 0x14
sub edx, edi
mov edi, dword [edx + eax]
cmp edi, dword [eax]
jne 0x517fd0
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x517f93
mov eax, dword [esi + 0xec]
mov edi, dword [eax]
push edi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push ebx
push ebx
push 0x9002
push edi
call dword [sym.imp.USER32.dll_PostMessageA]
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x717ef8], esi
mov byte [esi + 0xde], 1
cmp byte [0x717e1c], bl
je 0x518006
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x517ff0
call fcn.00457eb0
test al, al
jne 0x518006
push 0x3e8
call edi
inc ebx
cmp ebx, 0xa
jb 0x517ff0
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4