Function at 0x4579b0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
mov eax, dword [0x4deb90]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x148], ecx
push 0x20
call dword [sym.imp.d3d9.dll_Direct3DCreate9]
mov ecx, dword [ebp - 0x148]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x148]
cmp dword [edx + 4], 0
jne 0x457a07
push 0x10
push 0x4d1d4c
push str._ERR:I001_Direct3DCreate_FAILED_
push 0
mov ecx, dword [ebp - 0x148]
call fcn.00458730
or eax, 0xffffffff
jmp 0x457f22
mov eax, dword [ebp - 0x148]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x374], ecx
mov edx, dword [ebp - 0x148]
mov eax, dword [ebp + 0x14]
mov dword [edx + 0x378], eax
push 0x130
push 0
lea ecx, [ebp - 0x144]
push ecx
call fcn.004a20f0
add esp, 0xc
lea edx, [ebp - 0x144]
push edx
push 1
push 0
mov eax, dword [ebp - 0x148]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x148]
mov eax, dword [edx + 4]
mov ecx, dword [ecx]
push eax
mov edx, dword [ecx + 0x38]
call edx
cmp dword [ebp - 0xec], 0x800
ja 0x457a82
push 0x30
push 0x4d1d7c
push 0x4d1d90
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [ebp - 0x148]
mov byte [ecx + 0x3c8], 0
mov edx, dword [ebp - 0x108]
and edx, 2
jne 0x457ab4
mov eax, dword [ebp - 0x108]
and eax, 0x100
jne 0x457ab4
mov ecx, dword [ebp - 0x148]
mov byte [ecx + 0x3c8], 1
lea edx, [ebp - 0x14]
push edx
push 0
mov eax, dword [ebp - 0x148]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x148]
mov eax, dword [edx + 4]
mov ecx, dword [ecx]
push eax
mov edx, dword [ecx + 0x20]
call edx
test eax, eax
jge 0x457af9
push 0x10
push 0x4d1d84
push str._ERR:I002_GetAdapterDisplayMode_FAILED_
push 0
mov ecx, dword [ebp - 0x148]
call fcn.00458730
or eax, 0xffffffff
jmp 0x457f22
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14c], eax
mov ecx, dword [ebp - 0x14c]
sub ecx, 0x14
mov dword [ebp - 0x14c], ecx
cmp dword [ebp - 0x14c], 0x3c
ja case.0x457b2b.11
mov edx, dword [ebp - 0x14c]
movzx eax, byte [edx + 0x457f4c]
jmp dword [eax*4 + 0x457f34]
push str.DISPLAYMODE:____R8G8B8
mov ecx, dword [ebp - 0x148]
add ecx, 0x41
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp case.0x457b2b.11
push str.DISPLAYMODE:__A8R8G8B8
mov edx, dword [ebp - 0x148]
add edx, 0x41
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp case.0x457b2b.11
push str.DISPLAYMODE:__X8R8G8B8
mov eax, dword [ebp - 0x148]
add eax, 0x41
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp case.0x457b2b.11
push str.DISPLAYMODE:____R5G6B5
mov ecx, dword [ebp - 0x148]
add ecx, 0x41
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp case.0x457b2b.11
push str.DisplayMode:____UNKNOWN
mov edx, dword [ebp - 0x148]
add edx, 0x41
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x38
push 0
mov eax, dword [ebp - 0x148]
add eax, 0x170
push eax
call fcn.004a20f0
add esp, 0xc
mov ecx, dword [ebp - 0x148]
mov dword [ecx + 0x188], 1
mov edx, dword [ebp - 0x148]
mov dword [edx + 0x1a4], 0
mov dword [ebp - 8], 0x16
mov eax, dword [ebp - 0x148]
mov cl, byte [ebp + 0xc]
mov byte [eax + 0x19], cl
mov edx, dword [ebp - 0x148]
mov dword [edx + 0x190], 1
mov eax, dword [ebp - 0x148]
mov ecx, dword [ebp - 8]
mov dword [eax + 0x178], ecx
mov edx, dword [ebp - 0x148]
mov dword [edx + 0x17c], 1
mov eax, dword [ebp - 0x148]
mov dword [eax + 0x194], 1
mov ecx, dword [ebp - 0x148]
mov dword [ecx + 0x198], 0x4b
mov edx, dword [ebp - 0x148]
mov dword [edx + 0x1a0], 0
mov eax, dword [ebp - 0x148]
mov dword [eax + 0x19c], 1
mov ecx, dword [ebp - 0x148]
mov edx, dword [ebp + 0x10]
mov dword [ecx + 0x170], edx
mov eax, dword [ebp - 0x148]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0x174], ecx
mov edx, dword [ebp - 0x148]
mov eax, dword [ebp + 8]
mov dword [edx + 0x18c], eax
push 0x4b
push 1
push 2
mov ecx, dword [ebp - 8]
push ecx
push 1
push 0
mov edx, dword [ebp - 0x148]
mov eax, dword [edx + 4]
mov ecx, dword [ebp - 0x148]
mov edx, dword [ecx + 4]
mov eax, dword [eax]
push edx
mov ecx, dword [eax + 0x28]
call ecx
test eax, eax
jge 0x457cdb
push 0x10
push str.MESSAGE
push str._ERR:I003_CheckDeviceFormat_:_D3DFMT_X8R8G8B8_FAILED
push 0
mov ecx, dword [ebp - 0x148]
call fcn.00458730
push 0
call fcn.004a49d4
jmp 0x457d77
push 0x4b
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 8]
push eax
push 1
push 0
mov ecx, dword [ebp - 0x148]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0x148]
mov ecx, dword [eax + 4]
mov edx, dword [edx]
push ecx
mov eax, dword [edx + 0x30]
call eax
test eax, eax
jl 0x457d19
mov ecx, dword [ebp - 0x148]
mov dword [ecx + 0x198], 0x4b
jmp 0x457d77
push 0x4b
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 8]
push eax
push 2
push 0
mov ecx, dword [ebp - 0x148]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0x148]
mov ecx, dword [eax + 4]
mov edx, dword [edx]
push ecx
mov eax, dword [edx + 0x30]
call eax
test eax, eax
jl 0x457d57
mov ecx, dword [ebp - 0x148]
mov dword [ecx + 0x198], 0x4b
jmp 0x457d77
push 0x10
push 0x4d1f44
push str._ERR:I005_CheckDepthStencilMatch_:_HALREF_D24S8_FAILED_
push 0
mov ecx, dword [ebp - 0x148]
call fcn.00458730
push 0
call fcn.004a49d4
mov edx, dword [ebp - 0x148]
add edx, 8
push edx
mov eax, dword [ebp - 0x148]
add eax, 0x170
push eax
push 0x44
mov ecx, dword [ebp + 8]
push ecx
push 1
push 0
mov edx, dword [ebp - 0x148]
mov eax, dword [edx + 4]
mov ecx, dword [ebp - 0x148]
mov edx, dword [ecx + 4]
mov eax, dword [eax]
push edx
mov ecx, dword [eax + 0x40]
call ecx
test eax, eax
jge 0x457ec2
mov edx, dword [ebp - 0x148]
add edx, 8
push edx
mov eax, dword [ebp - 0x148]
add eax, 0x170
push eax
push 0x24
mov ecx, dword [ebp + 8]
push ecx
push 1
push 0
mov edx, dword [ebp - 0x148]
mov eax, dword [edx + 4]
mov ecx, dword [ebp - 0x148]
mov edx, dword [ecx + 4]
mov eax, dword [eax]
push edx
mov ecx, dword [eax + 0x40]
call ecx
test eax, eax
jge 0x457ea8
mov edx, dword [ebp - 0x148]
add edx, 8
push edx
mov eax, dword [ebp - 0x148]
add eax, 0x170
push eax
push 0x24
mov ecx, dword [ebp + 8]
push ecx
push 2
push 0
mov edx, dword [ebp - 0x148]
mov eax, dword [edx + 4]
mov ecx, dword [ebp - 0x148]
mov edx, dword [ecx + 4]
mov eax, dword [eax]
push edx
mov ecx, dword [eax + 0x40]
call ecx
test eax, eax
jge 0x457e8e
push 0x10
push str.SDX_MESSAGE
push str._ERR:I004_CreateDevice_FAILED_
push 0
mov ecx, dword [ebp - 0x148]
call fcn.00458730
mov edx, dword [ebp - 0x148]
cmp dword [edx + 4], 0
je 0x457e85
mov eax, dword [ebp - 0x148]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x148]
mov eax, dword [edx + 4]
mov ecx, dword [ecx]
push eax
mov edx, dword [ecx + 8]
call edx
mov eax, dword [ebp - 0x148]
mov dword [eax + 4], 0
xor eax, eax
jmp 0x457f22
push str.DEVICE_MODE:__REF
mov ecx, dword [ebp - 0x148]
add ecx, 0x109
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x457ec0
push str.DEVICE_MODE:__SOFTWARE_HAL
mov edx, dword [ebp - 0x148]
add edx, 0x109
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x457ed9
push str.DEVICE_MODE:__HAL
mov eax, dword [ebp - 0x148]
add eax, 0x109
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor ecx, ecx
mov dword [ebp - 0x158], ecx
mov dword [ebp - 0x154], ecx
mov dword [ebp - 0x150], ecx
mov edx, dword [ebp - 0x148]
mov eax, dword [edx + 8]
mov dword [ebp - 0x158], eax
lea ecx, [ebp - 0x158]
push ecx
call dword [sym.imp.emotedriver.dll_class_IEmoteDevice____cdecl_EmoteCreate_struct_IEmoteDevice::InitParam_const__]
add esp, 4
mov edx, dword [ebp - 0x148]
mov dword [edx + 0xc], eax
mov ecx, dword [ebp - 0x148]
call fcn.00457f90
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a0848
mov esp, ebp
pop ebp
ret 0x10