Function at 0x401000
Capabilities:
Create process on windows
Terminate process

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x20808
call fcn.004012c0
mov ebp, esp
push 0x400
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, 0x400
jne 0x401041
push 0x10
push str.TMLoader
push str.Failed_to_launch_a_game_with_modifications__because_the_path_is_too_long.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov esi, dword [esp + 0x20828]
mov edx, 1
nop dword [eax]
mov ebx, ebp
xor eax, eax
add ebp, 2
mov ecx, ebx
jmp 0x401073
cmp ebx, ecx
movzx eax, al
cmovne eax, edx
cmove ecx, ebp
nop word cs:[eax + eax]
add ebp, 2
movzx edi, word [ebp - 2]
cmp edi, 0x2e
jle 0x401090
cmp edi, 0x5c
je 0x401050
cmp edi, 0x2f
jne 0x401070
jmp 0x401050
je 0x40105b
test edi, edi
jne 0x401070
test al, 1
cmove ecx, ebx
movzx edx, word [ebx]
cmp edx, 0x53
je 0x4010b0
test edx, edx
je 0x40113e
jmp 0x40115a
movzx edx, word [ebx + 2]
test edx, edx
je 0x40113e
cmp edx, 0x68
jne 0x40115a
movzx edx, word [ebx + 4]
test edx, edx
je 0x40113e
cmp edx, 0x69
jne 0x40115a
movzx edx, word [ebx + 6]
test edx, edx
je 0x40113e
cmp edx, 0x6d
jne 0x40115a
movzx edx, word [ebx + 8]
test edx, edx
je 0x40113e
cmp edx, 0x52
jne 0x40115a
movzx edx, word [ebx + 0xa]
test edx, edx
je 0x40113e
cmp edx, 0x75
jne 0x40115a
movzx edx, word [ebx + 0xc]
test edx, edx
je 0x40113e
cmp edx, 0x6e
jne 0x40115a
movzx edx, word [ebx + 0xe]
test edx, edx
je 0x40113e
cmp edx, 0x2e
jne 0x40115a
movzx edx, word [ebx + 0x10]
test edx, edx
je 0x40113e
cmp edx, 0x65
jne 0x40115a
movzx edx, word [ebx + 0x12]
test edx, edx
je 0x40113e
cmp edx, 0x78
jne 0x40115a
movzx edx, word [ebx + 0x14]
test edx, edx
je 0x40113e
cmp edx, 0x65
jne 0x40115a
push 0x10
push str.TMLoader
push str.This_program_is_not_yet_integrated_to_any_game.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
movaps xmm0, xmmword [str.tmml:rundefa]
movups xmmword [esp + 0x808], xmm0
mov word [esp + 0x818], 0x3b
lea edx, [esp + 0x82a]
nop word [eax + eax]
movzx edi, word [ecx]
test edi, edi
je 0x401198
cmp edi, 0x2e
je 0x401198
add ecx, 2
mov word [edx - 0x10], di
add edx, 2
jmp 0x401180
mov word [edx - 0x10], 0x3b
test al, 1
jne 0x401292
movsd xmm0, qword [0x44b010]
movsd qword [edx - 0xe], xmm0
mov dword [edx - 6], 0x6c0075
mov word [edx - 2], 0x74
mov edi, dword [esp + 0x20824]
movzx eax, word [edi]
test ax, ax
je 0x4011f1
lea ecx, [edi + 2]
nop word cs:[eax + eax]
mov word [edx], ax
add edx, 2
movzx eax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4011e0
mov word [edx], 0
lea eax, [esp + 0x808]
push esi
push 0
push 0
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp eax, 0x21
jae 0x40128a
push 0x30
push str.TMLoader
push str.Failed_to_launch_a_game_with_modifications._nTo_fix_this_issue__run_TMLoader_and_install_the_protocol._nTrying_to_launch_the_backup_game_instead.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
nop word cs:[eax + eax]
cmp word [ebx], 0x2e
lea ebx, [ebx + 2]
jne 0x401230
mov eax, dword [ebx]
mov dword [ebx + 8], eax
movzx eax, word [ebx + 4]
mov word [ebx + 0xc], ax
movsd xmm0, qword [str.bak.]
movsd qword [ebx], xmm0
mov word [ebx + 0xe], 0
mov eax, esp
push esi
push 0
push edi
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp eax, 0x20
ja 0x40128a
push 0x10
push str.TMLoader
push str.Failed_to_launch_the_backup_game.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 3
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
add edx, 0xfffffff2
mov eax, ebx
mov edi, dword [esp + 0x20824]
nop
movzx ecx, word [eax]
test ecx, ecx
je 0x4011c7
cmp ecx, 0x2e
je 0x4011c7
add eax, 2
mov word [edx], cx
add edx, 2
jmp 0x4012a0