Function at 0x401210
Capabilities:
Link many functions at runtime
Log keystrokes via polling
Print debug messages
Resolve function by parsing pe exports
Set current directory

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0xf8c
push ebp
push esi
push edi
push 0x800
push eax
lea ecx, [esp + 0x7a0]
push ecx
call fcn.00401c80
lea edx, [esp + 0x7a4]
push edx
call fcn.00401da0
mov ecx, dword [esp + 0xfac]
add esp, 0x10
push 0x100
lea eax, [esp + 0x59c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x69c]
push eax
push 0x100
lea ecx, [esp + 0x5a4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
push 4
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
xor ebp, ebp
add esp, 4
cmp eax, ebp
je 0x401296
mov ecx, eax
call fcn.00401af0
mov edi, eax
jmp 0x401298
xor edi, edi
mov ecx, edi
call fcn.00401b30
test al, al
je 0x4013d8
push 0xc
mov dword [esp + 0x14], ebp
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x4012dc
lea edx, [esp + 0x598]
push edx
mov dword [esi + 4], ebp
mov dword [esi + 8], 1
call fcn.00401de0
mov dword [esi], eax
mov dword [esp + 0xc], esi
mov esi, eax
jmp 0x4012ec
push 0x8007000e
mov dword [esp + 0x10], ebp
call fcn.00401f70
xor esi, esi
lea eax, [esp + 0x10]
push eax
push esi
mov ecx, edi
call fcn.00401b40
cmp dword [esp + 0x10], ebp
jne 0x4013cf
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
movzx eax, ax
cmp ax, 0x40c
jne 0x401331
lea ecx, [esp + 0x198]
push str.Vous_navez_pas_lautorisation_de_jouer
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 8
push 0x30
push str.Contr
jmp 0x4013a8
cmp ax, 0x410
jne 0x40135e
lea eax, [esp + 0x198]
push str.Non_puoi_avviare_un_gioco_con_questa_classificazione._n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 8
push 0x30
push str.Impostazioni_familiari
lea ecx, [esp + 0x1a0]
push ecx
jmp 0x4013b0
cmp ax, 0x41a
jne 0x40138b
lea edx, [esp + 0x198]
push str.Tienes_es_el_acceso_restringido_a_juegos_con_esta_clasificaci
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 8
push 0x30
push str.Control_parental
lea eax, [esp + 0x1a0]
push eax
jmp 0x4013b0
lea ecx, [esp + 0x198]
push str.You_are_restricted_from_playing_a_game_with_these_ratings._n
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 8
push 0x30
push str.Parental_Controls
lea edx, [esp + 0x1a0]
push edx
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0xc]
call fcn.004011c0
pop edi
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0xf8c
ret 0x10
lea ecx, [esp + 0xc]
call fcn.004011c0
cmp edi, ebp
je 0x4013ec
mov ecx, edi
call fcn.00401b20
push edi
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [esp + 0x14]
mov byte [eax - 1], 0
mov ecx, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x9c]
push edx
call fcn.00401b90
lea eax, [esp + 0xa0]
push 0x2e
push eax
call fcn.00401d10
mov esi, eax
sub esi, 1
push str.engine
push esi
mov byte [esi], 0
call fcn.00401ca0
mov edi, dword [sym.imp.MSVCR80.dll_strstr]
lea ecx, [esp + 0x7b0]
push str.tool
push ecx
call edi
add esp, 0x20
test eax, eax
je 0x401452
push str.Tool
push esi
call fcn.00401ca0
add esp, 8
push str.f.dll
push esi
call fcn.00401ca0
mov edx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x3a4]
push eax
call fcn.00401b90
mov esi, dword [sym.imp.MSVCR80.dll_strchr]
lea ecx, [esp + 0x3a8]
push 0x2e
push ecx
call esi
sub eax, 1
push str.WindowClass
push eax
call fcn.00401b90
mov edx, dword [esp + 0x34]
push edx
lea eax, [esp + 0x4bc]
push eax
call fcn.00401b90
lea ecx, [esp + 0x4c0]
push 0x2e
push ecx
call esi
add esp, 0x30
lea edx, [esp + 0x498]
push edx
mov byte [eax - 1], 0
lea eax, [esp + 0x39c]
push eax
push ebp
push ebp
call dword [sym.imp.USER32.dll_FindWindowExA]
mov esi, eax
cmp esi, ebp
je 0x4014f0
push 5
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0xf8c
ret 0x10
push ebx
lea ecx, [esp + 0x69c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea edx, [esp + 0x79c]
push str.batchmode
push edx
call edi
add esp, 8
test eax, eax
setne bl
test bl, bl
jne 0x40156a
lea eax, [esp + 0x79c]
push str.exporthelpfile
push eax
call edi
add esp, 8
test eax, eax
jne 0x401546
lea ecx, [esp + 0x79c]
push str.exportschema
push ecx
call edi
add esp, 8
test eax, eax
je 0x40156a
push 0x10a
push str.d:worker1_atgenginecodemainmainwin32.cpp
push str._s__d__:_warning_:_ExportHelpFile_or_ExportSchema_command_line_options_also_need_the_BatchMode_option_n__for_unattended_error_output_handling.
call dword [sym.imp.MSVCR80.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR80.dll_fprintf]
add esp, 0x10
mov bl, 1
lea edx, [esp + 0x9c]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebp
jne 0x401654
test bl, bl
je 0x4015c8
lea eax, [esp + 0x79c]
push eax
lea ecx, [esp + 0xa0]
push ecx
push 0x12e
push str.d:worker1_atgenginecodemainmainwin32.cpp
push str._s__d__:_error_:_could_not_load_DLL__s._n__n____Please_re_install_the_game_and_install_the_required_DirectX_9.0c_provided_or_obtain_the_latest_version_from_Microsoft._n_n__n
call dword [sym.imp.MSVCR80.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR80.dll_fprintf]
add esp, 0x18
pop ebx
pop edi
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0xf8c
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
movzx eax, ax
cmp ax, 0x40c
lea edx, [esp + 0x79c]
push edx
jne 0x4015ee
lea eax, [esp + 0xa0]
push eax
push str.ERREUR_:_impossible_de_t
jmp 0x40161d
cmp ax, 0x410
jne 0x401603
lea eax, [esp + 0xa0]
push eax
push str.ERRORE:_impossibile_caricare_la_DLL___s._n____Reinstallare_il_gioco_e_installare_la_versione_di_DirectX_9.0c_fornita_o_lultima_versione_disponibile_da_Microsoft._n
jmp 0x40161d
cmp ax, 0x41a
lea eax, [esp + 0xa0]
push eax
jne 0x401618
push str.ERROR:_no_se_ha_podido_cargar_DLL__s._n____Vuelve_a_instalar_el_juego_e_instala_la_versi
jmp 0x40161d
push str.ERROR:_Could_not_load_DLL__s._n____Please_re_install_the_game_and_install_the_required_DirectX_9.0c_provided_or_obtain_the_latest_version_from_Microsoft._n
lea ecx, [esp + 0x1a8]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x10
push str.MainWin32
lea edx, [esp + 0x1a4]
push edx
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
pop ebx
pop edi
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0xf8c
ret 0x10
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.EngineInitialize
push edi
call esi
push str.EngineTerminate
push edi
mov ebp, eax
call esi
push str.EngineService
push edi
mov dword [esp + 0x24], eax
call esi
push str.EngineKeyboardService
push edi
mov dword [esp + 0x28], eax
call esi
push str.EngineMouseService
push edi
mov dword [esp + 0x2c], eax
call esi
push str.EngineWindowFocus
push edi
mov dword [esp + 0x18], eax
call esi
xor esi, esi
cmp ebp, esi
mov dword [esp + 0x40], eax
je 0x401a71
cmp dword [esp + 0x1c], esi
je 0x401a71
cmp dword [esp + 0x20], esi
je 0x401a71
cmp dword [esp + 0x24], esi
je 0x401a71
cmp dword [esp + 0x10], esi
je 0x401a71
cmp eax, esi
je 0x401a71
mov eax, dword [esp + 0xfa0]
push 0x65
push eax
mov dword [esp + 0x7c], 0x23
mov dword [esp + 0x80], 0x401000
mov dword [esp + 0x84], esi
mov dword [esp + 0x88], esi
mov dword [esp + 0x8c], eax
call dword [sym.imp.USER32.dll_LoadIconA]
push 0x7f00
push esi
mov dword [esp + 0x90], eax
call dword [sym.imp.USER32.dll_LoadCursorA]
push 3
mov dword [esp + 0x90], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [esp + 0x90], eax
lea ecx, [esp + 0x74]
lea eax, [esp + 0x39c]
push ecx
mov dword [esp + 0x98], esi
mov dword [esp + 0x9c], eax
call dword [sym.imp.USER32.dll_RegisterClassA]
lea edx, [esp + 0x79c]
push str._Windowed
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
push edx
mov dword [esp + 0x40], 0x320
mov dword [esp + 0x44], 0x1c2
mov esi, 0x80008
call dword [sym.imp.MSVCR80.dll_strstr]
add esp, 8
test eax, eax
jne 0x4017b1
lea eax, [esp + 0x79c]
push str._windowed
push eax
call dword [sym.imp.MSVCR80.dll_strstr]
add esp, 8
test eax, eax
jne 0x4017b1
mov esi, 0x81080008
push 0
push esi
lea ecx, [esp + 0x38]
push ecx
call dword [sym.imp.USER32.dll_AdjustWindowRect]
mov edx, dword [esp + 0xfa0]
mov eax, dword [esp + 0x3c]
sub eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
sub ecx, dword [esp + 0x30]
push 0
push edx
push 0
push 0
push eax
push ecx
push 0x80000000
push 0x80000000
push esi
lea edx, [esp + 0x4c0]
push edx
lea eax, [esp + 0x3c4]
push eax
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
test bl, bl
mov dword [esp + 0x1c], eax
jne 0x401819
mov ecx, dword [esp + 0xfac]
push ecx
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov esi, dword [sym.imp.USER32.dll_SystemParametersInfoA]
push 0
push 0x405004
push 8
push 0x3a
call esi
push 0
push 0x40500c
push 8
push 0x34
call esi
push 0
push 0x405014
push 0x18
push 0x32
call esi
push 0
call fcn.004010d0
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0xfac]
lea eax, [esp + 0x6c]
push eax
mov dword [esp + 0x78], esi
mov dword [esp + 0x74], esi
mov dword [esp + 0x70], edx
call ebp
add esp, 8
test al, al
je 0x401a1c
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
mov byte [esp + 0x14], 0
cmp byte [esp + 0x14], 0
jne 0x401a14
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
push 0x14
call esi
test ax, ax
setne cl
push 0x90
mov byte [esp + 0x4c], cl
call esi
push 1
push 0
push 0
test ax, ax
push 0
lea eax, [esp + 0x5c]
setne dl
push eax
mov byte [esp + 0x58], dl
call edi
test eax, eax
je 0x4019e7
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x44]
mov eax, dword [esp + 0x50]
cmp eax, 0x12
je 0x4019e2
cmp eax, 0x101
je 0x40199f
cmp eax, 0x100
je 0x40199f
cmp eax, 0x200
je 0x40198b
cmp eax, 0x201
je 0x40198b
cmp eax, 0x202
je 0x40198b
cmp eax, 0x204
je 0x40198b
cmp eax, 0x205
je 0x40198b
cmp eax, 0x207
je 0x40198b
cmp eax, 0x208
je 0x40198b
cmp eax, 0x20a
jne 0x4019b3
mov eax, dword [esp + 0x58]
movzx ecx, ax
shr eax, 0x10
movzx esi, ax
mov dword [esp + 0x28], ecx
lea edx, [esp + 0x28]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x1c]
movzx ecx, cx
push edx
shl esi, 0x10
push eax
or esi, ecx
call dword [sym.imp.USER32.dll_ScreenToClient]
test eax, eax
je 0x401977
movzx esi, word [esp + 0x2c]
movzx ecx, word [esp + 0x28]
shl esi, 0x10
or esi, ecx
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x50]
push esi
push edx
push eax
call dword [esp + 0x1c]
add esp, 0xc
jmp 0x4019b3
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
push ecx
push edx
push eax
call dword [esp + 0x1c]
add esp, 0xc
jmp 0x4019b3
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
push ebp
push ebx
push ecx
push edx
push eax
call dword [esp + 0x38]
add esp, 0x14
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push 0
push 0
push 0
lea edx, [esp + 0x5c]
push edx
call edi
test eax, eax
jne 0x4018d0
jmp 0x4019e7
mov byte [esp + 0x14], 1
cmp byte [section..data], 0
mov ecx, dword [esp + 0x14]
sete al
push eax
push ecx
call dword [esp + 0x28]
movzx edx, byte [section..data]
push edx
mov bl, al
call dword [esp + 0x4c]
add esp, 0xc
test bl, bl
jne 0x401881
push 0
call dword [sym.imp.MSVCR80.dll__exit]
test bl, bl
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jne 0x401a2d
push str.Early_exit_while_running_the_game__errors_have_probably_happened._n
call ebx
push 1
call fcn.004010d0
add esp, 4
push esi
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [esp + 0xfa0]
push eax
lea ecx, [esp + 0x3a0]
push ecx
call dword [sym.imp.USER32.dll_UnregisterClassA]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.Game_has_successfully_terminated._All_is_well._n
call ebx
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0xf8c
ret 0x10
test bl, bl
je 0x401aa1
lea edx, [esp + 0x9c]
push edx
push 0x165
push str.d:worker1_atgenginecodemainmainwin32.cpp
push str._s__d__:_error_:_DLL__s_does_not_contain_required_exports._n
call dword [sym.imp.MSVCR80.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR80.dll_fprintf]
add esp, 0x14
jmp 0x401ad5
lea eax, [esp + 0x9c]
push eax
lea ecx, [esp + 0x1a0]
push str.ERROR:_DLL___s__does_not_contain_required_exports.
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x10
push str.MainWin32
lea edx, [esp + 0x1a4]
push edx
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop ebx
pop edi
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0xf8c
ret 0x10