Function at 0x10002760
Capabilities:
Check mutex on windows
Create thread
Get common file path
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
mov eax, dword [0x100e5dd4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x314], ecx
push ebx
push esi
push edi
cmp eax, 1
jne 0x10002ba9
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x100eac40], ecx
call ebx
mov esi, eax
lea eax, [ebp - 0x104]
push esi
push str.graphics_hook_dup_mutex_m
push 0x100a851c
push 0x40
push eax
call fcn.10002c10
add esp, 0x14
lea eax, [ebp - 0x104]
push eax
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
test eax, eax
je 0x100027f6
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str._OBS__Duplicate_hook_library
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10077d23
mov esp, ebp
pop ebp
ret 0xc
push esi
push str.graphics_hook_dup_mutex_m
push 0x100a851c
lea eax, [ebp - 0x84]
push 0x40
push eax
call fcn.10002c10
add esp, 0x14
lea eax, [ebp - 0x84]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [0x100eac48], eax
test eax, eax
jne 0x1000284c
push str._OBS__Duplicate_hook_library
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10077d23
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea eax, [ebp - 0x310]
push 0
push 0
push 0x100000
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x10002884
push str._OBS__Failed_to_get_current_thread_handle
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call ebx
mov esi, eax
lea eax, [ebp - 0x84]
push esi
push str.MedalCaptureHook_Restart
push 0x100a851c
push 0x40
push eax
call fcn.10002c10
add esp, 0x14
lea eax, [ebp - 0x84]
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov edi, eax
test edi, edi
jne 0x100028e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.MedalCaptureHook_Restart
push str.Failed_to_get_event__s:__lu
call fcn.10003740
add esp, 0xc
mov dword [0x100ea988], edi
jmp 0x10002837
push esi
push str.MedalCaptureHook_Stop
push 0x100a851c
lea eax, [ebp - 0x104]
mov dword [0x100ea988], edi
push 0x40
push eax
call fcn.10002c10
add esp, 0x14
lea eax, [ebp - 0x104]
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov edi, eax
test edi, edi
jne 0x10002940
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.MedalCaptureHook_Stop
push str.Failed_to_get_event__s:__lu
call fcn.10003740
add esp, 0xc
mov dword [0x100ea98c], edi
jmp 0x10002837
push esi
push str.MedalCaptureHook_HookReady
mov dword [0x100ea98c], edi
call fcn.10003860
add esp, 8
mov dword [0x100ea990], eax
test eax, eax
je 0x10002837
push esi
push str.MedalCaptureHook_FrameReady
call fcn.10003860
add esp, 8
mov dword [0x100ea994], eax
test eax, eax
je 0x10002837
push esi
push str.MedalCaptureHook_Exit
call fcn.10003860
add esp, 8
mov dword [0x100ea998], eax
test eax, eax
je 0x10002837
push esi
push str.MedalCaptureHook_Initialize
call fcn.10003860
add esp, 8
mov dword [0x100eac38], eax
test eax, eax
je 0x10002837
push 0x104
push 0x100ea9a8
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x100029df
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_get_windows_system_path:__lu
call fcn.10003740
add esp, 8
jmp 0x10002837
call ebx
push eax
push str.MedalCaptureHook_HookInfo_lu
lea eax, [ebp - 0x84]
xor esi, esi
push 0x40
push eax
call fcn.10003ce0
add esp, 0x10
test eax, eax
jle 0x10002a18
lea eax, [ebp - 0x84]
push eax
push 0x298
push esi
push 4
push esi
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov esi, eax
mov dword [0x100eac3c], esi
test esi, esi
jne 0x10002a29
mov esi, str.Failed_to_create_hook_info_file_mapping:__lu
jmp 0x10002a4c
push 0x298
push 0
push 0
push 0xf001f
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [0x100ea980], eax
test eax, eax
jne 0x10002a71
mov esi, str.Failed_to_map_the_hook_info_file_mapping:__lu
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
call fcn.10003740
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10077d23
mov esp, ebp
pop ebp
ret 0xc
call ebx
mov edi, eax
lea eax, [ebp - 0x84]
push edi
push str.MedalCaptureHook_TextureMutex1
push 0x100a851c
push 0x40
push eax
call fcn.10002c10
mov ebx, dword [sym.imp.KERNEL32.dll_CreateMutexW]
lea eax, [ebp - 0x84]
add esp, 0x14
push eax
push 0
push 0
call ebx
mov esi, eax
test esi, esi
jne 0x10002ace
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.MedalCaptureHook_TextureMutex1
push str.Failed_to_open_mutex__s:__lu
call fcn.10003740
add esp, 0xc
mov dword [0x100ea99c], esi
jmp 0x10002837
push edi
push str.MedalCaptureHook_TextureMutex2
push 0x100a851c
lea eax, [ebp - 0x104]
mov dword [0x100ea99c], esi
push 0x40
push eax
call fcn.10002c10
add esp, 0x14
lea eax, [ebp - 0x104]
push eax
push 0
push 0
call ebx
mov esi, eax
test esi, esi
jne 0x10002b27
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.MedalCaptureHook_TextureMutex2
push str.Failed_to_open_mutex__s:__lu
call fcn.10003740
add esp, 0xc
mov dword [0x100ea9a0], esi
jmp 0x10002837
push 0x104
lea eax, [ebp - 0x30c]
mov dword [0x100ea9a0], esi
push eax
push dword [ebp - 0x314]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x30c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x10002b66
push 2
push eax
lea eax, [ebp - 0x30c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
push 0
push 0
push dword [ebp - 0x310]
push 0x10003a20
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x100eac4c], eax
test eax, eax
jne 0x10002be2
push dword [ebp - 0x310]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10077d23
mov esp, ebp
pop ebp
ret 0xc
test eax, eax
jne 0x10002be2
cmp dword [0x100eac48], eax
je 0x10002be2
mov eax, dword [0x100eac4c]
test eax, eax
je 0x10002bdd
push 0x12c
push eax
mov byte [0x100eac44], 1
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [0x100eac4c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.10003640
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10077d23
mov esp, ebp
pop ebp
ret 0xc