Function at 0x455d20
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
mov eax, dword [0x4ca010]
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 0x455d77
push 0x10
push 0x4c1960
push str._ERR:I001_Direct3DCreate_FAILED_
push 0
mov ecx, dword [ebp - 0x148]
call fcn.00456a90
or eax, 0xffffffff
jmp 0x456292
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.0049a590
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 0x455df2
push 0x30
push 0x4c1990
push 0x4c1998
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 0x455e24
mov eax, dword [ebp - 0x108]
and eax, 0x100
jne 0x455e24
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 0x455e69
push 0x10
push 0x4c1a6c
push str._ERR:I002_GetAdapterDisplayMode_FAILED_
push 0
mov ecx, dword [ebp - 0x148]
call fcn.00456a90
or eax, 0xffffffff
jmp 0x456292
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.0x455e9b.11
mov edx, dword [ebp - 0x14c]
movzx eax, byte [edx + 0x4562bc]
jmp dword [eax*4 + 0x4562a4]
push str.DISPLAYMODE:____R8G8B8
mov ecx, dword [ebp - 0x148]
add ecx, 0x41
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp case.0x455e9b.11
push str.DISPLAYMODE:__A8R8G8B8
mov edx, dword [ebp - 0x148]
add edx, 0x41
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp case.0x455e9b.11
push str.DISPLAYMODE:__X8R8G8B8
mov eax, dword [ebp - 0x148]
add eax, 0x41
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp case.0x455e9b.11
push str.DISPLAYMODE:____R5G6B5
mov ecx, dword [ebp - 0x148]
add ecx, 0x41
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp case.0x455e9b.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.0049a590
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 0x45604b
push 0x10
push str.MESSAGE
push str._ERR:I003_CheckDeviceFormat_:_D3DFMT_X8R8G8B8_FAILED
push 0
mov ecx, dword [ebp - 0x148]
call fcn.00456a90
push 0
call fcn.0049cd11
jmp 0x4560e7
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 0x456089
mov ecx, dword [ebp - 0x148]
mov dword [ecx + 0x198], 0x4b
jmp 0x4560e7
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 0x4560c7
mov ecx, dword [ebp - 0x148]
mov dword [ecx + 0x198], 0x4b
jmp 0x4560e7
push 0x10
push 0x4c1b58
push str._ERR:I005_CheckDepthStencilMatch_:_HALREF_D24S8_FAILED_
push 0
mov ecx, dword [ebp - 0x148]
call fcn.00456a90
push 0
call fcn.0049cd11
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 0x456232
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 0x456218
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 0x4561fe
push 0x10
push str.SDX_MESSAGE
push str._ERR:I004_CreateDevice_FAILED_
push 0
mov ecx, dword [ebp - 0x148]
call fcn.00456a90
mov edx, dword [ebp - 0x148]
cmp dword [edx + 4], 0
je 0x4561f5
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 0x456292
push str.DEVICE_MODE:__REF
mov ecx, dword [ebp - 0x148]
add ecx, 0x109
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x456230
push str.DEVICE_MODE:__SOFTWARE_HAL
mov edx, dword [ebp - 0x148]
add edx, 0x109
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x456249
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.00456300
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00498d32
mov esp, ebp
pop ebp
ret 0x10