Function at 0x10001040
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Extract resource via kernel32 functions
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x1001e004]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 1
push esi
push edi
mov edi, dword [ebp + 8]
jne 0x100012a1
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x100012b8
cmp dword [eax + 0x10000], 0x1b786814
jne 0x100012b8
cmp dword [eax + 0x10004], 0x4c8d0050
jne 0x100012b8
cmp word [eax + 0x10008], 0x1b24
jne 0x100012b8
mov ecx, str.DDRAW.dll
mov eax, 0x4ff618
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x100010d0
test dl, dl
je 0x100010cc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x100010d0
add eax, 2
add ecx, 2
test dl, dl
jne 0x100010b0
xor eax, eax
jmp 0x100010d5
sbb eax, eax
or eax, 1
test eax, eax
je 0x100010f3
cmp byte [0x49e9c0], 3
jne 0x100012d3
cmp byte [0x49e9c9], 1
jne 0x100012d3
push ebx
push 0xa
push 0x3e8
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x10001324
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test ebx, ebx
je 0x10001324
test esi, esi
je 0x10001324
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x10001324
xor edx, edx
mov ecx, esi
add ecx, 0xa
setb dl
neg edx
or edx, ecx
push edx
push 1
call fcn.100057eb
mov edi, eax
add esp, 8
test edi, edi
je 0x10001324
push esi
push ebx
push edi
call fcn.10003730
mov ecx, edi
mov dword [ebp - 0x20c], edi
add esp, 0xc
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10001180
sub ecx, edx
sub esp, 8
lea edx, [ebp - 0x20c]
mov dword [ebp - 0x208], ecx
call fcn.100013a0
push edi
mov esi, eax
call fcn.10005e1d
add esp, 0xc
test esi, esi
jne 0x1000133e
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 0x208]
pop ebx
push eax
push 0x40
push 1
push 0x401064
mov dword [ebp - 0x208], 0x20
call esi
lea eax, [ebp - 0x208]
mov byte [0x401064], 1
push eax
push dword [ebp - 0x208]
push 1
push 0x401064
call esi
push str.tdraw.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x100012ee
push str.DirectDrawCreate
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x10001309
lea eax, [ebp - 0x208]
mov dword [ebp - 0x208], 0x20
push eax
push 0x40
push 5
push 0x47bfa2
call esi
mov byte [0x47bfa2], 0xe8
lea eax, [edi - 0x47bfa7]
mov dword [0x47bfa3], eax
lea eax, [ebp - 0x208]
push eax
push dword [ebp - 0x208]
push 5
push 0x47bfa2
call esi
lea eax, [ebp - 0x208]
mov dword [ebp - 0x208], 0x20
push eax
push 0x40
push 5
push 0x4b55fb
call esi
mov byte [0x4b55fb], 0xe8
lea eax, [edi - 0x4b5600]
mov dword [0x4b55fc], eax
lea eax, [ebp - 0x208]
push eax
push dword [ebp - 0x208]
push 5
push 0x4b55fb
call esi
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
xor ecx, ebp
pop esi
call fcn.10002223
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.10004181
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.10004181
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.10004181
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.10004181
push str.Patch_settings_file_not_found._nPlease_check_the_resources_with_Resource_Hacker.
push 0x200
push 0x1001f2a0
call fcn.10001010
add esp, 0xc
or esi, 0xffffffff
push 0x200
lea eax, [ebp - 0x204]
push 0
push eax
call fcn.10003260
push 0x1001f2a0
push esi
lea eax, [esi - 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.10004181
int3