Function at 0x5e20f0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x792ef3
mov eax, dword fs:[0]
push eax
sub esp, 0x6e8
mov eax, dword [0x867e6c]
xor eax, esp
mov dword [esp + 0x6b0], eax
push ebx
push esi
push edi
mov eax, dword [0x867e6c]
xor eax, esp
push eax
lea eax, [esp + 0x6f8]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, ecx
mov ecx, dword [ebp + 0x10]
xor esi, esi
mov dword [esp + 0x90], ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x64], ecx
cmp eax, esi
je 0x5e214f
mov dword [eax], esi
cmp ecx, esi
je 0x5e2156
mov byte [ecx], 1
cmp dword [0x8c0bc0], esi
jne 0x5e2176
push str.d3d9.dll
call dword [sym.imp.kernel32.dll_LoadLibraryA]
mov dword [0x8c0bc0], eax
cmp eax, esi
je 0x5e2298
push 8
mov edi, 0xf
push str.d3d9.dll
lea ecx, [esp + 0x74]
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], esi
mov byte [esp + 0x78], 0
call fcn.004016e0
mov dword [esp + 0x700], esi
mov eax, dword [0x88b148]
mov ecx, dword [eax + 8]
mov edx, dword [ecx]
mov edx, dword [edx + 0x108]
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x44]
push eax
call edx
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebx + 0x104]
mov byte [esp + 0x70c], 1
call fcn.00401530
cmp dword [esp + 0x58], 0x10
jb 0x5e21ec
mov eax, dword [esp + 0x44]
push eax
call fcn.006441c7
add esp, 4
mov dword [esp + 0x700], 0xffffffff
cmp dword [esp + 0x84], 0x10
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], esi
mov byte [esp + 0x44], 0
jb 0x5e221b
mov ecx, dword [esp + 0x70]
push ecx
call fcn.006441c7
add esp, 4
mov edx, dword [0x8c0bc0]
push str.Direct3DCreate9
push edx
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], esi
mov byte [esp + 0x78], 0
call dword [sym.imp.kernel32.dll_GetProcAddress]
cmp eax, esi
je 0x5e2298
push 0x20
call eax
mov dword [ebx + 0x148], eax
cmp eax, esi
je 0x5e2298
mov eax, dword [ebx]
mov edx, dword [eax + 0x1c8]
mov ecx, ebx
call edx
mov eax, dword [0x886c5c]
cmp eax, esi
jne 0x5e229f
mov eax, dword [ebx + 0x148]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
push str.SetupSupportRenderTargetFormats
mov ecx, 0x87c4d0
mov dword [ebx + 0x148], esi
call fcn.00404a10
mov eax, dword [esp + 0x3c]
cmp eax, esi
je 0x5e2298
mov dword [eax], 8
xor al, al
jmp 0x5e3175
cmp byte [ebx + 0x99], 0
je 0x5e233b
push esi
call dword [sym.imp.user32.dll_GetDC]
mov edi, eax
cmp edi, esi
je 0x5e2325
push 0xc
push edi
call dword [sym.imp.gdi32.dll_GetDeviceCaps]
push edi
push 0
mov esi, eax
call dword [sym.imp.user32.dll_ReleaseDC]
cmp esi, 0x10
jne 0x5e22e7
test byte [0x886c5c], 4
je 0x5e22e7
mov dword [esp + 0x38], 0x17
xor esi, esi
jmp 0x5e22f1
xor esi, esi
mov dword [esp + 0x38], 0x16
mov ecx, dword [esp + 0x38]
mov eax, dword [ebx]
mov edx, dword [eax + 0x1cc]
push ecx
mov ecx, ebx
call edx
cmp dword [0x88b120], esi
jne 0x5e2356
mov eax, dword [ebx + 0x148]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [ebx + 0x148], esi
xor al, al
jmp 0x5e3175
movzx eax, byte [0x886c5c]
and eax, 4
or eax, 0x58
shr eax, 2
mov dword [esp + 0x38], eax
jmp 0x5e22f1
cmp dword [ebx + 0x84], 0x10
jne 0x5e2348
test al, 4
jne 0x5e234c
test al, 1
jne 0x5e22e9
mov dword [esp + 0x38], 0x17
jmp 0x5e22f1
push 0x130
lea eax, [esp + 0xf0]
push esi
push eax
call fcn.0064edd0
mov eax, dword [ebx + 0x148]
mov ecx, dword [eax]
add esp, 0xc
lea edx, [esp + 0xec]
push edx
push 1
push esi
push eax
mov eax, dword [ecx + 0x38]
call eax
push eax
mov edi, str.GetDeviceCaps_failed
call fcn.005fb350
add esp, 4
test al, al
je 0x5e23aa
mov edx, dword [ebx]
mov eax, dword [edx + 0x128]
mov ecx, ebx
call eax
xor al, al
jmp 0x5e3175
lea eax, [esp + 0xec]
call fcn.005e2020
test al, al
je 0x5e2397
mov edi, dword [0x88b148]
mov byte [esp + 0x37], 0
cmp dword [edi + 0x834], esi
je 0x5e2ba8
push 0x44c
lea ecx, [esp + 0x270]
push esi
push ecx
call fcn.0064edd0
mov eax, dword [ebx + 0x148]
mov edx, dword [eax]
mov edx, dword [edx + 0x14]
add esp, 0xc
lea ecx, [esp + 0x26c]
push ecx
push esi
push esi
push eax
call edx
push str.compat_D3DVendorID
test eax, eax
jl 0x5e273d
lea ecx, [esp + 0x44]
call fcn.00401280
mov dword [esp + 0x700], 2
mov ecx, dword [0x88b148]
mov edi, dword [esp + 0x694]
lea eax, [esp + 0x40]
push eax
push ecx
call fcn.0046a510
or esi, 0xffffffff
lea ecx, [esp + 0x40]
mov dword [esp + 0x700], esi
call fcn.004012f0
push str.compat_D3DDeviceID
lea ecx, [esp + 0x44]
call fcn.00401280
mov dword [esp + 0x700], 3
mov eax, dword [0x88b148]
mov edi, dword [esp + 0x698]
lea edx, [esp + 0x40]
push edx
push eax
call fcn.0046a510
lea ecx, [esp + 0x40]
mov dword [esp + 0x700], esi
call fcn.004012f0
lea ecx, [esp + 0x46c]
push ecx
lea ecx, [esp + 0x70]
call fcn.00401280
push str.compat_D3DDeviceDescription
lea ecx, [esp + 0x44]
mov dword [esp + 0x704], 4
call fcn.00401280
lea ebx, [esp + 0x6c]
lea esi, [esp + 0xd0]
mov byte [esp + 0x700], 5
call fcn.004389b0
lea edx, [esp + 0x40]
mov byte [esp + 0x700], 6
mov ecx, dword [0x88b148]
push edx
push ecx
mov edi, eax
call fcn.0046a300
mov ecx, esi
call fcn.00406fb0
lea ecx, [esp + 0x40]
call fcn.004012f0
or esi, 0xffffffff
mov ecx, ebx
mov dword [esp + 0x700], esi
call fcn.004012f0
push str.compat_D3DDriverVersionA
lea ecx, [esp + 0x44]
call fcn.00401280
mov dword [esp + 0x700], 7
mov edi, dword [esp + 0x690]
mov eax, dword [0x88b148]
lea edx, [esp + 0x40]
push edx
shr edi, 0x10
push eax
call fcn.0046a510
lea ecx, [esp + 0x40]
mov dword [esp + 0x700], esi
call fcn.004012f0
push str.compat_D3DDriverVersionB
lea ecx, [esp + 0x44]
call fcn.00401280
lea ecx, [esp + 0x40]
mov dword [esp + 0x700], 8
movzx edi, word [esp + 0x690]
push ecx
mov edx, dword [0x88b148]
push edx
call fcn.0046a510
lea ecx, [esp + 0x40]
mov dword [esp + 0x700], esi
call fcn.004012f0
push str.compat_D3DDriverVersionC
lea ecx, [esp + 0x44]
call fcn.00401280
mov dword [esp + 0x700], 9
mov edi, dword [esp + 0x68c]
mov ecx, dword [0x88b148]
lea eax, [esp + 0x40]
push eax
shr edi, 0x10
push ecx
call fcn.0046a510
lea ecx, [esp + 0x40]
mov dword [esp + 0x700], esi
call fcn.004012f0
push str.compat_D3DDriverVersionD
lea ecx, [esp + 0x44]
call fcn.00401280
mov dword [esp + 0x700], 0xa
mov eax, dword [0x88b148]
movzx edi, word [esp + 0x68c]
lea edx, [esp + 0x40]
push edx
push eax
call fcn.0046a510
lea ecx, [esp + 0x40]
mov dword [esp + 0x700], esi
call fcn.004012f0
mov eax, dword [esp + 0x68c]
movzx ecx, ax
push ecx
shr eax, 0x10
push eax
mov eax, dword [esp + 0x698]
movzx edx, ax
push edx
shr eax, 0x10
push eax
push str._d._d._d._d
lea esi, [esp + 0x234]
call fcn.00439900
add esp, 0x14
push str.compat_D3DDriverVersion
lea ecx, [esp + 0x44]
mov dword [esp + 0x704], 0xb
call fcn.00401280
mov ebx, esi
lea esi, [esp + 0xd0]
mov byte [esp + 0x700], 0xc
call fcn.004389b0
lea ecx, [esp + 0x40]
mov byte [esp + 0x700], 0xd
mov edx, dword [0x88b148]
push ecx
push edx
mov edi, eax
call fcn.0046a300
mov ecx, esi
call fcn.00406fb0
lea ecx, [esp + 0x40]
mov byte [esp + 0x700], 0xb
call fcn.004012f0
lea eax, [esp + 0x26c]
push eax
lea ecx, [esp + 0x70]
call fcn.00401280
push str.compat_D3DDriverName
lea ecx, [esp + 0x44]
mov byte [esp + 0x704], 0xe
call fcn.00401280
lea ebx, [esp + 0x6c]
lea esi, [esp + 0xd0]
mov byte [esp + 0x700], 0xf
call fcn.004389b0
lea ecx, [esp + 0x40]
mov byte [esp + 0x700], 0x10
mov edx, dword [0x88b148]
push ecx
push edx
mov edi, eax
call fcn.0046a300
mov ecx, esi
call fcn.00406fb0
lea ecx, [esp + 0x40]
call fcn.004012f0
mov ecx, ebx
call fcn.004012f0
lea ecx, [esp + 0x220]
mov dword [esp + 0x700], 0xffffffff
call fcn.004012f0
mov ebx, dword [esp + 0x90]
xor esi, esi
jmp 0x5e28fe
lea ecx, [esp + 0x224]
call fcn.00401280
lea eax, [esp + 0x220]
mov dword [esp + 0x700], 0x11
mov ecx, dword [0x88b148]
push eax
push ecx
xor edi, edi
call fcn.0046a510
lea ecx, [esp + 0x220]
mov dword [esp + 0x700], 0xffffffff
call fcn.004012f0
push str.compat_D3DDeviceID
lea ecx, [esp + 0x224]
call fcn.00401280
lea edx, [esp + 0x220]
mov dword [esp + 0x700], 0x12
mov eax, dword [0x88b148]
push edx
push eax
call fcn.0046a510
lea ecx, [esp + 0x220]
mov dword [esp + 0x700], 0xffffffff
call fcn.004012f0
push 0x81d238
lea ecx, [esp + 0x44]
call fcn.00403550
push str.compat_D3DDeviceDescription
lea ecx, [esp + 0x224]
mov dword [esp + 0x704], 0x13
call fcn.00401280
lea ecx, [esp + 0x220]
mov byte [esp + 0x700], 0x14
mov edx, dword [0x88b148]
push ecx
push edx
lea edi, [esp + 0x48]
call fcn.0046a300
lea ecx, [esp + 0x220]
call fcn.004012f0
mov ecx, edi
mov dword [esp + 0x700], 0xffffffff
call fcn.00406fb0
push 0x81d238
lea ecx, [esp + 0x44]
call fcn.00403550
push str.compat_D3DDriverVersion
lea ecx, [esp + 0x224]
mov dword [esp + 0x704], 0x15
call fcn.00401280
lea eax, [esp + 0x220]
mov byte [esp + 0x700], 0x16
mov ecx, dword [0x88b148]
push eax
push ecx
lea edi, [esp + 0x48]
call fcn.0046a300
lea ecx, [esp + 0x220]
call fcn.004012f0
mov ecx, edi
mov dword [esp + 0x700], 0xffffffff
call fcn.00406fb0
push 0x81d238
lea ecx, [esp + 0x44]
call fcn.00403550
push str.compat_D3DDriverName
lea ecx, [esp + 0x224]
mov dword [esp + 0x704], 0x17
call fcn.00401280
lea edx, [esp + 0x220]
mov byte [esp + 0x700], 0x18
mov eax, dword [0x88b148]
push edx
push eax
lea edi, [esp + 0x48]
call fcn.0046a300
lea ecx, [esp + 0x220]
call fcn.004012f0
mov ecx, edi
mov dword [esp + 0x700], 0xffffffff
call fcn.00406fb0
movzx ecx, word [esp + 0x1b8]
movzx edx, word [esp + 0x1b0]
mov dword [esp + 0x5c], ecx
push str.compat_D3DVSVersion
lea ecx, [esp + 0x224]
fild dword [esp + 0x60]
mov dword [esp + 0x60], edx
fld qword [0x82dc18]
fmul st(1), st(0)
fxch st(1)
fstp qword [esp + 0x70]
fild dword [esp + 0x60]
fmulp st(1)
fstp qword [esp + 0x60]
call fcn.00401280
fld qword [esp + 0x5c]
sub esp, 8
mov dword [esp + 0x708], 0x19
fstp qword [esp]
mov ecx, dword [0x88b148]
lea eax, [esp + 0x228]
push eax
push ecx
call fcn.0046a5e0
or edi, 0xffffffff
lea ecx, [esp + 0x220]
mov dword [esp + 0x700], edi
call fcn.004012f0
push str.compat_D3DPSVersion
lea ecx, [esp + 0x224]
call fcn.00401280
mov dword [esp + 0x700], 0x1a
fld qword [esp + 0x6c]
mov eax, dword [0x88b148]
sub esp, 8
fstp qword [esp]
lea edx, [esp + 0x228]
push edx
push eax
call fcn.0046a5e0
lea ecx, [esp + 0x220]
mov dword [esp + 0x700], edi
call fcn.004012f0
push str.compat_D3DInterface
lea ecx, [esp + 0x224]
call fcn.00401280
lea ecx, [esp + 0x220]
mov dword [esp + 0x700], 0x1b
mov edx, dword [0x88b148]
push ecx
push edx
mov edi, 9
call fcn.0046a510
or edi, 0xffffffff
lea ecx, [esp + 0x220]
mov dword [esp + 0x700], edi
call fcn.004012f0
push str.compat_IsVista
lea ecx, [esp + 0x224]
call fcn.00401280
mov dword [esp + 0x700], 0x1c
call fcn.00437cf0
mov edx, dword [0x88b148]
movzx eax, al
push eax
lea ecx, [esp + 0x224]
push ecx
push edx
call fcn.0046a440
lea ecx, [esp + 0x220]
mov dword [esp + 0x700], edi
call fcn.004012f0
push str.compat_IsWin7
lea ecx, [esp + 0x224]
call fcn.00401280
mov dword [esp + 0x700], 0x1d
call fcn.00437da0
mov edx, dword [0x88b148]
movzx eax, al
push eax
lea ecx, [esp + 0x224]
push ecx
push edx
call fcn.0046a440
lea ecx, [esp + 0x220]
mov dword [esp + 0x700], edi
call fcn.004012f0
push esi
lea eax, [esp + 0x240]
push eax
call fcn.00404480
mov dword [esp + 0x700], 0x1e
mov ecx, dword [0x88b148]
mov ecx, dword [ecx + 0x834]
mov edx, dword [ecx]
mov edx, dword [edx + 4]
lea eax, [esp + 0x23c]
push eax
push str.Is3DSupported
call edx
test al, al
je 0x5e2b1d
lea eax, [esp + 0x23c]
call fcn.0049ddb0
test al, al
jne 0x5e2b1d
mov eax, dword [ebx]
mov edx, dword [eax + 0x128]
mov ecx, ebx
call edx
lea esi, [esp + 0x23c]
call fcn.00404890
xor al, al
jmp 0x5e3175
mov eax, dword [0x88b148]
mov ecx, dword [eax + 0x834]
mov edx, dword [ecx]
mov edx, dword [edx + 4]
lea eax, [esp + 0x23c]
push eax
push str.NeedMatchDepthBufferBits
call edx
test al, al
je 0x5e2b50
lea eax, [esp + 0x23c]
call fcn.0049ddb0
mov byte [esp + 0x37], al
mov edi, dword [esp + 0x64]
cmp edi, esi
je 0x5e2b89
mov eax, dword [0x88b148]
mov ecx, dword [eax + 0x834]
mov edx, dword [ecx]
mov edx, dword [edx + 4]
lea eax, [esp + 0x23c]
push eax
push str.Is3DRecommended
call edx
test al, al
je 0x5e2b89
lea eax, [esp + 0x23c]
call fcn.0049ddb0
mov byte [edi], al
lea esi, [esp + 0x23c]
mov dword [esp + 0x700], 0xffffffff
call fcn.00404890
mov edi, dword [0x88b148]
xor esi, esi
cmp byte [ebp + 0xc], 0
je 0x5e2bbf
mov eax, dword [ebx]
mov edx, dword [eax + 0x128]
mov ecx, ebx
call edx
jmp 0x5e3173
push 0x38
lea eax, [esp + 0x9c]
push esi
push eax
call fcn.0064edd0
mov al, byte [ebx + 0x99]
mov edx, dword [ebx + 0x78]
xor ecx, ecx
add esp, 0xc
test al, al
setne cl
mov dword [esp + 0xa4], 1
mov dword [esp + 0xa8], esi
mov dword [esp + 0xac], esi
mov dword [esp + 0xb4], edx
lea ecx, [ecx + ecx + 1]
mov dword [esp + 0xb0], ecx
cmp byte [edi + 0x3ae], 0
je 0x5e2c25
mov dword [esp + 0xc4], 1
test al, al
je 0x5e2c2c
mov dword [esp + 0xc4], esi
test dword [esp + 0x100], 0x80000000
mov dword [esp + 0xc8], esi
je 0x5e2c5a
movzx ecx, byte [edi + 0x6e1]
neg ecx
sbb ecx, ecx
and ecx, 0x80000000
mov dword [esp + 0xcc], ecx
jmp 0x5e2c61
mov dword [esp + 0xcc], esi
cmp byte [esp + 0x37], 0
mov edx, dword [esp + 0x38]
mov dword [esp + 0xa0], edx
mov dword [esp + 0xbc], 1
je 0x5e2c93
mov dword [esp + 0x38], 0x16
mov dword [esp + 0xc0], 0x4d
jmp 0x5e2c9e
mov dword [esp + 0xc0], 0x50
xor ecx, ecx
test al, al
setne cl
mov dword [esp + 0xb8], ecx
test al, al
je 0x5e2ccc
mov edx, dword [ebx + 0x7c]
mov eax, dword [ebx + 0x80]
mov dword [esp + 0x98], edx
mov dword [esp + 0x9c], eax
jmp 0x5e2d8e
call fcn.00437da0
test al, al
jne 0x5e2d5e
mov edx, dword [esp + 0x38]
mov eax, dword [ebx + 0x148]
mov ecx, dword [eax]
push edx
push 0
push eax
mov eax, dword [ecx + 0x18]
call eax
mov esi, eax
xor edi, edi
test esi, esi
jbe 0x5e2d5e
xor eax, eax
lea edx, [esp + 0x6c]
push edx
mov edx, dword [esp + 0x3c]
push edi
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov eax, dword [ebx + 0x148]
mov ecx, dword [eax]
push edx
push 0
push eax
mov eax, dword [ecx + 0x1c]
call eax
test eax, eax
jl 0x5e2d59
mov eax, dword [ebx + 0x13c]
mov ecx, dword [esp + 0x6c]
cmp ecx, dword [eax + 0xca0]
ja 0x5e2d59
mov edx, dword [esp + 0x70]
cmp edx, dword [eax + 0xca4]
ja 0x5e2d59
cmp ecx, dword [ebx + 0x7c]
jne 0x5e2d59
cmp edx, dword [ebx + 0x80]
je 0x5e2e2b
inc edi
cmp edi, esi
jb 0x5e2cf6
mov ecx, dword [ebx + 0x78]
lea eax, [esp + 0x6c]
push eax
push ecx
call dword [sym.imp.user32.dll_GetClientRect]
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x78]
mov dword [esp + 0x98], edx
mov dword [esp + 0x9c], eax
mov dword [esp + 0xbc], 0
mov eax, dword [ebx + 0x148]
mov ecx, dword [eax]
lea esi, [ebx + 0x14c]
push esi
lea edx, [esp + 0x9c]
push edx
mov edx, dword [ebx + 0x78]
push 0x140
push edx
push 1
push 0
push eax
mov eax, dword [ecx + 0x40]
mov dword [esp + 0x78], esi
call eax
test eax, eax
jge 0x5e2e6c
mov eax, dword [ebx + 0x148]
mov ecx, dword [eax]
push esi
lea edx, [esp + 0x9c]
push edx
mov edx, dword [ebx + 0x78]
push 0x120
push edx
push 1
push 0
push eax
mov eax, dword [ecx + 0x40]
call eax
cmp eax, 0x88760868
jne 0x5e2e47
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x5e2dfd
mov dword [eax], 8
mov eax, dword [ebx + 0x148]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
push str.Create_Device___Device_Lost
mov ecx, 0x87c4d0
mov dword [ebx + 0x148], 0
call fcn.00404a10
xor al, al
jmp 0x5e3175
mov ecx, dword [ebx + 0x7c]
mov edx, dword [ebx + 0x80]
mov dword [esp + 0x98], ecx
mov dword [esp + 0x9c], edx
jmp 0x5e2d83
push eax
mov edi, str.Create_Device
call fcn.005fb350
add esp, 4
test al, al
je 0x5e2e6c
mov eax, dword [ebx]
mov edx, dword [eax + 0x128]
mov ecx, ebx
call edx
xor al, al
jmp 0x5e3175
cmp dword [esi], 0
jne 0x5e2e9f
mov eax, dword [ebx + 0x148]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
push str.Create_Device
mov ecx, 0x87c4d0
mov dword [ebx + 0x148], 0
call fcn.00404a10
xor al, al
jmp 0x5e3175
push 0x260
call fcn.006442a0
mov edi, eax
add esp, 4
mov dword [esp + 0x3c], edi
mov dword [esp + 0x700], 0x1f
test edi, edi
je 0x5e2ee5
mov eax, dword [esi]
push edi
mov dword [esp + 0x68], eax
call fcn.005dc610
mov ecx, dword [esp + 0x64]
mov dword [edi], vtable.Sexy::D3DStateManager9.0
mov dword [edi + 0x258], ebx
mov dword [edi + 0x25c], ecx
jmp 0x5e2ee7
xor edi, edi
mov dword [esp + 0x700], 0xffffffff
mov dword [ebx + 0x74], edi
mov edx, dword [edi]
mov eax, dword [edx + 8]
mov ecx, edi
call eax
mov ecx, dword [0x88b148]
cmp byte [ecx + 0x3ae], 0
je 0x5e2f22
cmp byte [ebx + 0x99], 0
jne 0x5e2f22
mov eax, dword [esi]
mov edx, dword [eax]
push 1
push eax
mov eax, dword [edx + 0x50]
call eax
cmp dword [esp + 0xbc], 0
jne 0x5e2fc0
mov eax, dword [ebx + 0x7c]
mov ecx, dword [esp + 0x98]
cmp eax, ecx
mov dword [esp + 0x3c], eax
jg 0x5e2f46
mov dword [esp + 0x3c], ecx
mov eax, dword [ebx + 0x80]
mov edx, dword [esp + 0x9c]
cmp eax, edx
jle 0x5e2f59
mov edx, eax
mov eax, dword [esi]
mov edi, dword [eax]
push 0
lea ecx, [ebx + 0x188]
push ecx
mov ecx, dword [esp + 0xc8]
push 0
push 0
push 0
push ecx
push edx
mov edx, dword [esp + 0x58]
push edx
push eax
mov eax, dword [edi + 0x74]
call eax
push eax
mov edi, str.CreateDepthStencilSurface__InitD3D_D3D9_
call fcn.005fb350
add esp, 4
test al, al
jne 0x5e2397
mov eax, dword [esi]
mov edx, dword [ebx + 0x188]
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x9c]
call eax
push eax
mov edi, str.SetDepthStencilSurface__InitD3D_D3D9_
call fcn.005fb350
add esp, 4
test al, al
jne 0x5e2397
push 0x130
lea ecx, [esp + 0xf0]
push 0
push ecx
call fcn.0064edd0
mov esi, dword [esi]
mov edx, dword [esi]
mov ecx, dword [edx + 0x1c]
add esp, 0xc
lea eax, [esp + 0xec]
push eax
push esi
call ecx
push eax
mov edi, str.GetDeviceCaps_failed
call fcn.005fb350
add esp, 4
test al, al
jne 0x5e2397
lea edi, [ebx + 0x18c]
mov ecx, 0x4c
lea esi, [esp + 0xec]
lea eax, [esp + 0xec]
rep movsd dword es:[edi], dword [esi]
call fcn.005e2020
test al, al
je 0x5e2397
push 0
xor eax, eax
mov edi, ebx
call fcn.005fa2a0
mov ebx, dword [ebx + 0x74]
call fcn.0060ebe0
test al, al
je 0x5e2298
mov ebx, dword [esp + 0x90]
mov edx, dword [esp + 0x5c]
mov eax, dword [edx]
mov ecx, dword [esp + 0x38]
lea esi, [ebx + 0xa0]
push esi
push 0
push 0
mov dword [ebx + 0x94], ecx
mov ecx, dword [eax]
mov edx, dword [ecx + 0x48]
push 0
push eax
call edx
push eax
mov edi, str.GetBackBuffer
call fcn.005fb350
add esp, 4
test al, al
jne 0x5e2e59
mov eax, dword [esi]
mov ecx, dword [0x88b148]
mov dword [ebx + 0xac], 0
mov dword [ebx + 0xa8], eax
cmp byte [ecx + 0x3ae], 0
je 0x5e30be
cmp byte [ebx + 0x99], 0
jne 0x5e30be
mov edx, dword [esp + 0x5c]
mov eax, dword [edx]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x50]
push 1
push eax
call edx
mov eax, dword [esp + 0x5c]
fld1
mov eax, dword [eax]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xac]
push 0
push ecx
fstp dword [esp]
push 0xff000000
push 1
push 0
push 0
push eax
call edx
mov eax, dword [ebx + 0x13c]
lea edi, [ebx + 0x150]
mov ecx, 0xe
lea esi, [esp + 0x98]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [eax + 0xd90]
mov edx, dword [ecx]
add eax, 0xd78
mov eax, dword [eax]
mov dword [esp + 0x68], edx
mov dword [esp + 0x64], eax
mov eax, dword [ebx + 0x13c]
mov ecx, dword [eax + 0xd90]
mov edx, dword [eax + 0xd78]
add eax, 0xd78
lea esi, [esp + 0x90]
lea edi, [esp + 0x64]
mov dword [esp + 0x94], ecx
mov dword [esp + 0x90], edx
call fcn.005c1ac0
test al, al
je 0x5e3169
mov esi, edi
call fcn.005dba60
mov eax, dword [eax]
mov edx, dword [ebx]
push eax
mov eax, dword [edx + 0x118]
mov ecx, ebx
call eax
call fcn.0046f660
jmp 0x5e3113
mov dword [ebx + 0x2bc], 0
mov al, 1
mov ecx, dword [esp + 0x6f8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6b0]
xor ecx, esp
call fcn.00643db8
mov esp, ebp
pop ebp
ret 0xc