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

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x20808
call fcn.00401220
mov esi, 0x400
mov ebp, esp
push esi
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, esi
jne 0x40103f
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 + 0x20824]
xor ecx, ecx
inc ecx
mov ebx, ebp
xor eax, eax
mov edx, ebp
add ebp, 2
movzx edi, word [ebp - 2]
cmp edi, 0x2e
jle 0x401067
cmp edi, 0x5c
je 0x401049
cmp edi, 0x2f
jne 0x40104f
jmp 0x401049
je 0x40106f
test edi, edi
jne 0x40104f
jmp 0x40107c
cmp ebx, edx
movzx eax, al
cmovne eax, ecx
cmove edx, ebp
jmp 0x40104f
test al, 1
cmove edx, ebx
movzx ecx, word [ebx]
test cx, cx
je 0x4010ab
mov ebp, 2
movzx edi, word [ebp + 0x410a36]
test di, di
je 0x4010ab
cmp cx, di
jne 0x4010c7
movzx ecx, word [ebx + ebp]
add ebp, 2
test cx, cx
jne 0x40108e
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]
mov bp, 0x74
xor ecx, ecx
mov word [esp + ecx + 0x808], bp
movzx ebp, word [ecx + 0x410a52]
add ecx, 2
test bp, bp
jne 0x4010cd
add ecx, esp
add ecx, 0x80a
movzx edi, word [edx]
test edi, edi
je 0x401104
cmp edi, 0x2e
je 0x401104
add edx, 2
mov word [ecx - 2], di
add ecx, 2
jmp 0x4010ec
mov word [ecx - 2], 0x3b
test al, 1
jne 0x4011f6
mov dx, 0x64
xor eax, eax
mov edi, dword [esp + 0x20828]
mov word [ecx + eax], dx
movzx edx, word [eax + 0x410a18]
add eax, 2
test dx, dx
jne 0x40111f
add ecx, eax
test esi, esi
je 0x401162
cmp word [esi], 0
je 0x401162
mov word [ecx], 0x3b
add ecx, 2
movzx eax, word [esi]
test ax, ax
je 0x401162
lea edx, [esi + 2]
mov word [ecx], ax
add ecx, 2
movzx eax, word [edx]
add edx, 2
test ax, ax
jne 0x401151
mov word [ecx], 0
xor eax, eax
lea ecx, [esp + 0x808]
push edi
push eax
push eax
push ecx
push eax
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp eax, 0x20
ja 0x4011ee
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]
cmp word [ebx], 0x2e
lea ebx, [ebx + 2]
jne 0x401195
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
xor eax, eax
mov ecx, esp
push edi
push eax
push esi
push ecx
push eax
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp eax, 0x20
ja 0x4011ee
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]
xor eax, eax
mov edi, dword [esp + 0x20828]
movzx edx, word [ebx + eax]
test edx, edx
je 0x401132
cmp edx, 0x2e
je 0x401132
mov word [ecx + eax], dx
add eax, 2
jmp 0x4011ff