Function at 0x40f410
Capabilities:
Check mutex on windows
Create thread
Enumerate process modules
Inject dll
Inject thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46d960
mov eax, dword fs:[0]
push eax
mov eax, 0x23c4
call fcn.0046c6d0
mov eax, dword [0x48b034]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [0x565f48], 0
je 0x40f8db
push 0
lea eax, [ebp - 0x158]
push eax
push 0x104
push str.SGG.dll
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x40f8f9
lea eax, [ebp - 0x2380]
mov dword [ebp - 0x2380], 0
push eax
push 0x1000
lea eax, [ebp - 0x1368]
push eax
call dword [sym.imp.PSAPI.DLL_EnumProcesses]
test eax, eax
je 0x40f8f9
mov eax, dword [ebp - 0x2380]
xor esi, esi
shr eax, 2
mov dword [ebp - 0x237c], esi
mov dword [ebp - 0x236c], eax
test eax, eax
je 0x40f8db
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp + esi*4 - 0x1368]
test esi, esi
je 0x40f8c6
push 0x4987e4
mov dword [ebp - 0x2374], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x2374]
mov ecx, 0x4987fc
push eax
lea eax, [ebp - 0x23b4]
push eax
call fcn.0040fd70
mov ecx, dword [ebp - 0x23ac]
cmp byte [ecx + 0xd], 0
jne 0x40f52f
cmp esi, dword [ecx + 0x10]
jb 0x40f52f
cmp ecx, dword [0x4987fc]
je 0x40f52f
mov eax, dword [ecx + 0x14]
mov ecx, dword [ecx + 0x18]
push 0x4987e4
mov dword [ebp - 0x2378], eax
mov dword [ebp - 0x2374], ecx
call ebx
jmp 0x40f8c0
push 0x4987e4
call ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
mov dword [ebp - 0x2388], esi
push 0x4987e4
mov dword [ebp - 0x2384], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x2388]
mov ecx, 0x4987fc
push eax
lea eax, [ebp - 0x23c0]
push eax
call fcn.0040fd70
mov eax, dword [ebp - 0x23b8]
mov ebx, dword [0x4987fc]
cmp byte [eax + 0xd], 0
jne 0x40f593
cmp esi, dword [eax + 0x10]
jb 0x40f593
cmp eax, ebx
je 0x40f593
mov dword [eax + 0x14], esi
mov dword [eax + 0x18], edi
jmp 0x40f64b
lea eax, [ebp - 0x239c]
mov dword [ebp - 0x239c], esi
push eax
lea eax, [ebp - 0x23cc]
mov dword [ebp - 0x2398], esi
push eax
mov ecx, 0x4987fc
mov dword [ebp - 0x2394], edi
call fcn.0040fd70
movq xmm0, qword [eax]
mov eax, dword [eax + 8]
movq qword [ebp - 0x23a8], xmm0
cmp byte [eax + 0xd], 0
jne 0x40f5d7
cmp esi, dword [eax + 0x10]
jae 0x40f64b
cmp dword [0x498800], 0x9249249
je 0x40f8fd
mov dword [ebp - 0x2390], 0x4987fc
mov dword [ebp - 4], 0
push 0x1c
mov dword [ebp - 0x238c], 0
call fcn.0046bb69
mov dword [ebp - 4], 0xffffffff
add esp, 4
mov ecx, 0x4987fc
mov dword [ebp - 0x238c], 0
mov dword [eax + 0x10], esi
push eax
push dword [ebp - 0x23a4]
mov dword [eax + 0x14], esi
push dword [ebp - 0x23a8]
mov dword [eax + 0x18], edi
mov dword [eax], ebx
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov word [eax + 0xc], 0
call fcn.00405560
push 0x4987e4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x237c]
push dword [ebp + eax*4 - 0x1368]
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
mov dword [ebp - 0x2370], ebx
test ebx, ebx
je 0x40f8ba
push 0x104
lea eax, [ebp - 0x260]
push eax
push 0
push ebx
call dword [sym.imp.PSAPI.DLL_GetModuleBaseNameA]
test eax, eax
je 0x40f8b3
mov ecx, str.GameServer.exe
lea eax, [ebp - 0x260]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40f6c8
test dl, dl
je 0x40f6c4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40f6c8
add eax, 2
add ecx, 2
test dl, dl
jne 0x40f6a8
xor eax, eax
jmp 0x40f6cd
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40f8b3
mov dword [ebp - 0x2374], eax
lea eax, [ebp - 0x2374]
push eax
push 0x1000
lea eax, [ebp - 0x2368]
push eax
push ebx
call dword [sym.imp.PSAPI.DLL_EnumProcessModules]
test eax, eax
je 0x40f8b3
mov edi, dword [ebp - 0x2374]
xor esi, esi
shr edi, 2
test edi, edi
je 0x40f772
nop dword [eax]
push 0x104
lea eax, [ebp - 0x368]
push eax
push dword [ebp + esi*4 - 0x2368]
push ebx
call dword [sym.imp.PSAPI.DLL_GetModuleFileNameExA]
test eax, eax
je 0x40f76d
lea eax, [ebp - 0x158]
lea ecx, [ebp - 0x368]
nop word [eax + eax]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x40f760
test dl, dl
je 0x40f75c
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x40f760
add ecx, 2
add eax, 2
test dl, dl
jne 0x40f740
xor eax, eax
jmp 0x40f765
sbb eax, eax
or eax, 1
test eax, eax
je 0x40f8b3
inc esi
cmp esi, edi
jl 0x40f710
lea esi, [ebp - 0x158]
lea ecx, [esi + 1]
nop dword [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x40f780
push 4
push 0x1000
sub esi, ecx
push esi
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edi, eax
test edi, edi
je 0x40f8a4
push 0
push esi
lea eax, [ebp - 0x158]
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40f896
push 0x47e9c4
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x2374], eax
test eax, eax
je 0x40f896
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessId]
push eax
lea eax, [ebp - 0x50]
push str.XTMPID_d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x50]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ebx, eax
test ebx, ebx
je 0x40f890
push 0
push 0
push edi
push dword [ebp - 0x2374]
push 0
push 0
push dword [ebp - 0x2370]
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
test eax, eax
je 0x40f86e
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40f86e
push 0x8000
push esi
mov esi, dword [ebp - 0x2370]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push str._Silent_GameGuard_____GameServer__:_Protection_Initialization_successful_
push 8
call fcn.00418b60
add esp, 8
push esi
call ebx
jmp 0x40f8ba
push 0x8000
push esi
push edi
push dword [ebp - 0x2370]
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x2370]
jmp 0x40f8a4
mov ebx, dword [ebp - 0x2370]
push 0x8000
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push str._Silent_GameGuard_____GameServer__:_Could_not_initialize_Protection_Process_
push 1
call fcn.00418b60
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x236c]
mov esi, dword [ebp - 0x237c]
inc esi
mov dword [ebp - 0x237c], esi
cmp esi, eax
jl 0x40f4c0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046bb5b
mov esp, ebp
pop ebp
ret
xor al, al
jmp 0x40f8dd
call fcn.00405940
int3