Function at 0x10001040
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Link many functions at runtime
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x1001a004]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 1
push ebx
push esi
jne 0x100012c4
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x100012db
cmp dword [eax + 0x10000], 0x1b786814
jne 0x100012db
cmp dword [eax + 0x10004], 0x4c8d0050
jne 0x100012db
cmp word [eax + 0x10008], 0x1b24
jne 0x100012db
mov ecx, str.DDRAW.dll
mov eax, 0x4ff618
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x100010c8
test dl, dl
je 0x100010c4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x100010c8
add eax, 2
add ecx, 2
test dl, dl
jne 0x100010a8
xor eax, eax
jmp 0x100010cd
sbb eax, eax
or eax, 1
test eax, eax
je 0x100010eb
cmp byte [0x49e9c0], 3
jne 0x100012f6
cmp byte [0x49e9c9], 1
jne 0x100012f6
push edi
push 0xa
push 1
call fcn.10005614
mov esi, eax
add esp, 8
test esi, esi
jne 0x1000111d
push str.Patch_settings_file_not_found._nPlease_check_the_resources_with_Resource_Hacker.
push 0x200
push 0x1001b2a0
call fcn.10001010
add esp, 0xc
or edi, 0xffffffff
jmp 0x10001311
mov ecx, esi
mov dword [ebp - 0x20c], esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10001128
sub ecx, edx
sub esp, 8
lea edx, [ebp - 0x20c]
mov dword [ebp - 0x208], ecx
call fcn.100014b0
push esi
mov edi, eax
call fcn.1000561f
add esp, 0xc
test edi, edi
jne 0x10001311
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 0x208]
push eax
push 0x40
push 1
push 0x401064
mov dword [ebp - 0x208], 0x20
call ebx
lea eax, [ebp - 0x208]
mov byte [0x401064], 1
push eax
push dword [ebp - 0x208]
push 1
push 0x401064
call ebx
push str.tplayx.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x10001216
push 0x10017cfc
push edi
call esi
push 0x10017d10
push edi
mov dword [0x1001b4bc], eax
call esi
push 0x10017d28
push edi
mov dword [0x1001b4b0], eax
call esi
push 0x10017d40
push edi
mov dword [0x1001b4c0], eax
call esi
push 0x10017d58
push edi
mov dword [0x1001b4ac], eax
call esi
push 0x10017d70
push edi
mov dword [0x1001b4a4], eax
call esi
push 0x10017d84
push edi
mov dword [0x1001b4b4], eax
call esi
push 0x10017d94
push edi
mov dword [0x1001b4a0], eax
call esi
mov dword [0x1001b4a8], eax
push str.tdraw.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop edi
test eax, eax
je 0x10001364
push str.DirectDrawCreate
push eax
call esi
mov esi, eax
test esi, esi
je 0x1000137f
lea eax, [ebp - 0x208]
mov dword [ebp - 0x208], 0x20
push eax
push 0x40
push 5
push 0x47bfa2
call ebx
mov byte [0x47bfa2], 0xe8
lea eax, [esi - 0x47bfa7]
mov dword [0x47bfa3], eax
lea eax, [ebp - 0x208]
push eax
push dword [ebp - 0x208]
push 5
push 0x47bfa2
call ebx
lea eax, [ebp - 0x208]
mov dword [ebp - 0x208], 0x20
push eax
push 0x40
push 5
push 0x4b55fb
call ebx
mov byte [0x4b55fb], 0xe8
lea eax, [esi - 0x4b5600]
mov dword [0x4b55fc], eax
lea eax, [ebp - 0x208]
push eax
push dword [ebp - 0x208]
push 5
push 0x4b55fb
call ebx
mov ecx, dword [ebp - 4]
mov eax, 1
pop esi
xor ecx, ebp
pop ebx
call fcn.100020de
mov esp, ebp
pop ebp
ret 0xc
push 0
push str.Total_Annihilation_Community_Patch
push str.Game_version_not_supported._Please_install_the_official_3.1_patch_and_then_try_again.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
call fcn.10004041
push 0
push str.Total_Annihilation_Community_Patch
push str.Incompatible_game_files_detected._You_cannot_mix_different_versions_of_the_Community_Patch._nPlease_perform_a_clean_re_install_of_Total_Annihilation_3.1_and_then_apply_the_latest_Community_Patch_again.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
call fcn.10004041
push 0x200
lea eax, [ebp - 0x204]
push 0
push eax
call fcn.10003120
push 0x1001b2a0
push edi
lea eax, [edi - 1]
push eax
push str.Failed_to_apply_game_patches._Error_between_lines__d__d._n_s
lea eax, [ebp - 0x204]
push 0x200
push eax
call fcn.10001010
add esp, 0x24
lea eax, [ebp - 0x204]
push 0
push str.Total_Annihilation_Community_Patch
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
call fcn.10004041
push 0
push str.Total_Annihilation_Community_Patch
push str.tdraw.dll_not_found__please_re_install_the_Total_Annihilation_Community_Patch.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
call fcn.10004041
push 0
push str.Total_Annihilation_Community_Patch
push str.Incompatible_tdraw.dll_found__please_re_install_the_Total_Annihilation_Community_Patch.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
call fcn.10004041
int3