Function at 0x457140
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
mov eax, dword [0x4cfb90]
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 0x457197
push 0x10
push 0x4c4858
push str._ERR:I001_Direct3DCreate_FAILED_
push 0
mov ecx, dword [ebp - 0x148]
call fcn.00457ec0
or eax, 0xffffffff
jmp 0x4576b2
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.0049e340
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 0x457212
push 0x30
push 0x4c4888
push 0x4c4890
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 0x457244
mov eax, dword [ebp - 0x108]
and eax, 0x100
jne 0x457244
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 0x457289
push 0x10
push 0x4c4964
push str._ERR:I002_GetAdapterDisplayMode_FAILED_
push 0
mov ecx, dword [ebp - 0x148]
call fcn.00457ec0
or eax, 0xffffffff
jmp 0x4576b2
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.0x4572bb.11
mov edx, dword [ebp - 0x14c]
movzx eax, byte [edx + 0x4576dc]
jmp dword [eax*4 + 0x4576c4]
push str.DISPLAYMODE:____R8G8B8
mov ecx, dword [ebp - 0x148]
add ecx, 0x41
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp case.0x4572bb.11
push str.DISPLAYMODE:__A8R8G8B8
mov edx, dword [ebp - 0x148]
add edx, 0x41
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp case.0x4572bb.11
push str.DISPLAYMODE:__X8R8G8B8
mov eax, dword [ebp - 0x148]
add eax, 0x41
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp case.0x4572bb.11
push str.DISPLAYMODE:____R5G6B5
mov ecx, dword [ebp - 0x148]
add ecx, 0x41
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp case.0x4572bb.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.0049e340
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 0x45746b
push 0x10
push str.MESSAGE
push str._ERR:I003_CheckDeviceFormat_:_D3DFMT_X8R8G8B8_FAILED
push 0
mov ecx, dword [ebp - 0x148]
call fcn.00457ec0
push 0
call fcn.004a0b3c
jmp 0x457507
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 0x4574a9
mov ecx, dword [ebp - 0x148]
mov dword [ecx + 0x198], 0x4b
jmp 0x457507
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 0x4574e7
mov ecx, dword [ebp - 0x148]
mov dword [ecx + 0x198], 0x4b
jmp 0x457507
push 0x10
push 0x4c4a50
push str._ERR:I005_CheckDepthStencilMatch_:_HALREF_D24S8_FAILED_
push 0
mov ecx, dword [ebp - 0x148]
call fcn.00457ec0
push 0
call fcn.004a0b3c
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 0x457652
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 0x457638
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 0x45761e
push 0x10
push str.SDX_MESSAGE
push str._ERR:I004_CreateDevice_FAILED_
push 0
mov ecx, dword [ebp - 0x148]
call fcn.00457ec0
mov edx, dword [ebp - 0x148]
cmp dword [edx + 4], 0
je 0x457615
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 0x4576b2
push str.DEVICE_MODE:__REF
mov ecx, dword [ebp - 0x148]
add ecx, 0x109
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x457650
push str.DEVICE_MODE:__SOFTWARE_HAL
mov edx, dword [ebp - 0x148]
add edx, 0x109
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x457669
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.00457720
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049ca98
mov esp, ebp
pop ebp
ret 0x10