Function at 0x40882c
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push rsi
push rdi
push r12
push r13
push r14
mov eax, 0x2ae0
call fcn.0042aad0
sub rsp, rax
mov qword [rsp + 0x80], 0xfffffffffffffffe
mov qword [rsp + 0x2b18], rbx
mov qword [rsp + 0x2b20], rbp
mov rax, qword [0x004402a0]
xor rax, rsp
mov qword [rsp + 0x2ad0], rax
mov rbx, rcx
lea rdx, str.Game_Optimizer
lea rcx, [rsp + 0x50]
call fcn.00406688
nop
mov rcx, rbx
call fcn.004084c8
xor r13d, r13d
mov word [rbx + 0x494], r13w
mov rcx, qword [rbx + 0x38]
call qword [sym.imp.USER32.dll_SetForegroundWindow]
lea r8, [rbx + 0x44a0]
mov esi, 0x1000
mov rdx, rsi
lea rcx, [rbx + 0x494]
call fcn.0041b9c8
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbx + 0x494]
repne scasw ax, word [rdi]
not rcx
lea r14d, [r13 + 1]
cmp rcx, r14
je 0x408c58
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
mov r8d, esi
lea rdx, [rsp + 0xad0]
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, r13d
je 0x408bec
lea rdx, [rbx + 0x494]
lea rcx, [rsp + 0xad0]
call fcn.0041b170
cmp eax, r13d
je 0x408bec
lea rcx, [rbx + 0x420]
call fcn.00409c24
cmp eax, r13d
je 0x4089ff
mov edi, r13d
mov rsi, r13
lea rax, [rsp + 0xb0]
cmp rax, r13
je 0x4089ff
cmp edi, dword [rbx + 0x440]
jae 0x4089ff
mov rdx, qword [rbx + 0x448]
lea rcx, [rsp + 0xb0]
add rdx, rsi
mov r8d, 0x220
call fcn.0041d080
lea rdx, [rbx + 0x494]
lea rcx, [rsp + 0xc8]
call fcn.0041b170
cmp eax, r13d
je 0x408999
add edi, r14d
add rsi, 0x220
jmp 0x40893a
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov rcx, rax
mov r9d, 0x40024
lea r8, [0x00435f90]
lea rdx, str.This_game_is_already_running__Any_unsaved_data_will_be_lost_in_case_of_Terminating_it._nDo_you_want_to_terminate_this_instance_and_run_new_instance_in_virtual_desktop_
call qword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
jne 0x4089e4
lea rdx, [rbx + 0x494]
mov rcx, rbx
call fcn.00408268
mov rcx, rbx
call fcn.00409448
mov dword [rbx + 0x480], r13d
jmp 0x408c58
xor r9d, r9d
mov edx, 0x111
lea r8d, [rdx - 0x49]
mov rcx, qword [rbx + 0x38]
call qword [sym.imp.USER32.dll_PostMessageW]
jmp 0x408c58
mov esi, r13d
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
mov r8d, 3
mov dword [rsp + 0x20], r8d
xor r9d, r9d
mov edx, 0x80000000
lea rcx, [rbx + 0x494]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x408c58
mov dword [rsp + 0x44], r13d
mov word [rsp + 0x40], r13w
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x44]
mov r8d, 0x20
lea rdx, [rsp + 0x88]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, r13d
je 0x408b40
cmp dword [rsp + 0x44], 0x20
jne 0x408b40
mov eax, 0x5a4d
cmp ax, word [rsp + 0x88]
jne 0x408b40
mov r9d, r14d
xor r8d, r8d
lea edx, [r8 + 0x1c]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
or ebp, 0xffffffff
cmp eax, ebp
je 0x408b40
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x44]
mov r8d, 2
lea rdx, [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, r13d
je 0x408b40
cmp dword [rsp + 0x44], 2
jne 0x408b40
cmp word [rsp + 0x40], 0x40
jb 0x408b40
movzx edx, word [rsp + 0x40]
sub edx, 0x3e
mov r9d, r14d
xor r8d, r8d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, ebp
je 0x408b40
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x44]
mov r8d, 0x18
lea rdx, [rsp + 0x68]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, r13d
je 0x408b40
cmp dword [rsp + 0x44], 0x18
jne 0x408b40
movzx eax, word [rsp + 0x7e]
mov ecx, 0x2000
and ax, cx
cmp r13w, ax
jne 0x408b40
cmp dword [rsp + 0x68], 0x4550
cmove esi, r14d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, r13d
je 0x408c58
cmp dword [rbx + 0x410], r13d
je 0x408be3
mov edi, dword [rsp + 0x48]
mov r8d, dword [rsp + 0x64]
mov r9d, dword [rsp + 0x60]
cmp r8d, r9d
jne 0x408b77
cmp edi, r13d
je 0x408be3
add edi, 0x32
mov dword [rsp + 0x48], edi
mov eax, 0x10624dd3
mul edi
mov ecx, edx
shr ecx, 6
mov eax, ecx
imul eax, eax, 0x3e8
sub edi, eax
mov eax, 0x51eb851f
mul edi
shr edx, 5
mov dword [rsp + 0x28], edx
mov dword [rsp + 0x20], ecx
lea rdx, str.Memory_load_before___d_____after___d_____time_taken___d._d_s
lea rcx, [rsp + 0x2d0]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rbx + 0x80]
mov r8d, 0x80
lea rdx, [rsp + 0x2d0]
call qword [sym.imp.KERNEL32.dll_lstrcpynW]
lea rdx, [rbx + 0x58]
mov ecx, r14d
call qword [sym.imp.SHELL32.dll_Shell_NotifyIconW]
mov dword [rbx + 0x480], r14d
jmp 0x408c58
call fcn.0040b98c
mov rdx, rax
mov ecx, r13d
cmp rax, r13
setne cl
cmp ecx, r13d
jne 0x408c0d
mov ecx, 0x80004005
call fcn.0040659c
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x58], rax
mov r8, qword [rsp + 0x50]
lea rdx, str.Running__s_on_other_desktop_is_forbidden_
lea rcx, [rsp + 0x58]
call fcn.00409bd8
nop
mov rdx, qword [rsp + 0x58]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
cmp eax, r13d
jg 0x408c58
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
cmp eax, r13d
jg 0x408c79
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rsp + 0x2ad0]
xor rcx, rsp
call fcn.0041af90
lea r11, [rsp + 0x2ae0]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret