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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push esi
push edi
push str.Cug::DX8Graphics::Init
push 2
pop edi
lea esi, [ebp - 0x20]
call fcn.0041beea
mov dword [esp], str.d3d8.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
xor edi, edi
cmp eax, edi
mov dword [0x577ad8], eax
jne 0x402cef
push 4
push str.DirectX_Required
push str.This_game_requires_Microsoft_DirectX_8_to_run._DirectX_is_a_free_download_from_Microsoft_which_will_enhance_nthe_multimedia_capabilities_of_this_computer._n_nWould_you_like_to_download_and_install_the_latest_version_of_DierctX_now_
push edi
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
jne 0x402ce9
push 7
push edi
push edi
push str.http:__www.microsoft.com_directx
push 0x537b7c
push dword [ebp + 8]
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
push edi
call fcn.004e0dd9
push str.Direct3DCreate8
push eax
call dword [0x5764a0]
cmp eax, edi
mov dword [0x577acc], eax
jne 0x402d1e
push 4
push str.DirectX_Required
push str.This_game_requires_Microsoft_DirectX_8_to_run._DirectX_is_a_free_download_from_Microsoft_which_will_enhance_nthe_multimedia_capabilities_of_this_computer._n_nWould_you_like_to_download_and_install_the_latest_version_of_DierctX_now_
push edi
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
jne 0x402ce9
jmp 0x402cd2
push 0x78
call eax
cmp eax, edi
mov dword [0x577ad0], eax
jne 0x402d32
xor al, al
jmp 0x403086
push 0x10
push edi
push 0x5777ac
call fcn.004e03d0
add esp, 0xc
push 0x34
push edi
push 0x5777bc
call fcn.004e03d0
mov eax, dword [ebx]
mov dword [0x5777ac], eax
mov esi, dword [ebx + 4]
mov dword [0x5777b0], esi
mov dword [0x5777b4], edi
mov dword [0x5777b8], edi
mov cl, byte [ebx + 0x18]
add esp, 0xc
test cl, cl
sete dl
test cl, cl
mov byte [0x577795], dl
mov dword [0x5777bc], eax
mov dword [0x5777c0], esi
je 0x402df1
mov al, byte [ebx + 0x19]
neg al
mov dword [0x5777cc], edi
lea edx, [ebp - 0x28]
push edx
push edi
sbb eax, eax
and eax, 3
inc eax
mov dword [0x5777d0], eax
xor esi, esi
xor eax, eax
inc esi
mov dword [0x5777e4], esi
cmp byte [ebx + 0x19], al
sete al
inc eax
mov dword [0x5777c8], eax
mov eax, dword [ebp + 8]
mov dword [0x5777d4], eax
movzx eax, byte [ebx + 0x1a]
mov dword [0x5777dc], eax
mov eax, dword [0x577ad0]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
mov eax, dword [ebp - 0x1c]
mov dword [0x5777b8], eax
mov dword [0x5777c4], eax
mov dword [0x5777d8], esi
jmp 0x402fed
xor eax, eax
inc eax
mov dword [0x5777e4], eax
mov dword [0x5777c8], eax
mov eax, dword [ebp + 8]
mov dword [0x5777d4], eax
mov dword [0x5777d0], 3
mov dword [0x5777cc], edi
movzx eax, byte [ebx + 0x1a]
mov dword [0x5777dc], eax
mov al, byte [ebx + 0x19]
neg al
lea edx, [ebp - 0x38]
push edx
push edi
mov dword [0x5777e8], edi
sbb eax, eax
and eax, 0x80000001
add eax, 0x80000000
mov dword [0x5777ec], eax
mov eax, dword [0x577ad0]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
mov eax, dword [ebp - 0x2c]
mov dword [0x5777b8], eax
mov dword [0x5777c4], eax
mov dword [0x5777d8], edi
cmp byte [ebx + 0x1b], 0
mov byte [0x577ac7], 0
je 0x402fea
mov eax, dword [0x577ad0]
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0x18]
cmp eax, edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], 0x17d7840
mov byte [ebp - 5], 0
mov dword [ebp - 0xc], edi
jbe 0x402fea
mov esi, dword [ebp - 0x18]
mov eax, dword [0x577ad0]
mov ecx, dword [eax]
lea edx, [ebp - 0x38]
push edx
push dword [ebp - 0xc]
push edi
push eax
call dword [ecx + 0x1c]
mov edx, dword [ebp - 0x38]
mov eax, edx
test eax, eax
mov dword [ebp - 0x1c], eax
fild dword [ebp - 0x1c]
jge 0x402ebf
fadd dword [0x5439c0]
mov eax, dword [ebp - 0x34]
fild dword [ebp - 0x34]
test eax, eax
jge 0x402ecf
fadd dword [0x5439c0]
fdivp st(1)
mov ecx, dword [0x5777b0]
fld qword [0x543a60]
fcomp st(1)
fnstsw ax
test ah, 0x41
jp 0x402f1b
fcomp qword [0x544480]
fnstsw ax
test ah, 0x41
jp 0x402f1d
cmp edx, dword [0x5777ac]
jb 0x402f1d
mov eax, dword [ebp - 0x34]
cmp eax, ecx
jb 0x402f1d
imul eax, edx
cmp eax, dword [ebp - 0x10]
jae 0x402f1d
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x34]
mov byte [ebp - 5], 1
mov esi, edx
mov dword [ebp - 0x18], eax
jmp 0x402f1d
fstp st(0)
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
jb 0x402e97
cmp byte [ebp - 5], 0
je 0x402fea
mov eax, dword [0x5777ac]
test eax, eax
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
fild dword [ebp - 0x1c]
mov byte [0x577ac7], 1
mov dword [0x5777a8], eax
mov dword [0x5777a4], ecx
mov dword [0x5777bc], esi
mov dword [0x5777c0], edi
mov dword [0x5777ac], esi
mov dword [0x5777b0], edi
jge 0x402f78
fadd dword [0x5439c0]
test ecx, ecx
mov dword [ebp - 0x1c], ecx
fild dword [ebp - 0x1c]
jge 0x402f88
fadd dword [0x5439c0]
fdivp st(1)
mov eax, edi
test eax, eax
mov dword [ebp - 0x1c], eax
fstp dword [ebp - 0x18]
fld dword [ebp - 0x18]
fild dword [ebp - 0x1c]
jge 0x402fa2
fadd dword [0x5439c0]
fmulp st(1)
call fcn.005209e6
mov ecx, esi
sub ecx, eax
shr ecx, 1
cmp esi, 0x500
mov dword [0x57779c], eax
mov dword [0x5777a0], ecx
jne 0x402fea
mov eax, 0x300
cmp edi, eax
jne 0x402fea
mov ecx, 0x400
cmp dword [ebx + 8], ecx
jne 0x402fea
cmp dword [ebx + 0xc], eax
jne 0x402fea
mov dword [0x57779c], ecx
mov dword [0x5777a0], 0x80
xor esi, esi
inc esi
cmp byte [ebx + 0x1a], 0
je 0x402ffd
mov dword [0x5777e0], 0x50
mov eax, dword [0x577ad0]
mov ecx, dword [eax]
mov edi, 0x577ad4
push edi
push 0x5777bc
push 0x24
push dword [ebp + 8]
push esi
push 0
push eax
call dword [ecx + 0x3c]
test eax, eax
je 0x403078
mov eax, dword [0x577ad0]
mov ecx, dword [eax]
push edi
push 0x5777bc
push 0x24
push dword [ebp + 8]
push esi
push 0
push eax
call dword [ecx + 0x3c]
test eax, eax
je 0x403078
mov eax, dword [0x577ad0]
push edi
push 0x5777bc
push 0x24
push dword [ebp + 8]
mov dword [0x5777c8], esi
mov ecx, dword [eax]
push esi
xor esi, esi
push esi
push eax
call dword [ecx + 0x3c]
test eax, eax
je 0x403078
push esi
push str.CUG_DX8_Error
push str.Could_not_initialize_the_game_beacuse_of_problems_with_graphic_drivers._nPlease_make_sure_you_are_using_the_latest_DirectX_and_graphic_card_drivers.
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
jmp 0x402cea
mov esi, ebx
call fcn.00402c04
call fcn.00402823
mov al, 1
pop edi
pop esi
leave
ret