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

Disassembly:
push 0xffffffffffffffff
push 0x612bcb
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x6ac9e8]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6ac9e8]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x70]
mov edi, ecx
mov dword [esp + 0x14], 1
call fcn.00514780
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x78]
push ebp
mov dword [0x6bb420], eax
mov dword [0x6bb41c], ecx
mov dword [0x6bb474], ebp
call dword [sym.imp.user32.dll_GetDC]
push 0xdc
mov dword [0x6bb470], eax
call sub.d3d8.dll_Direct3DCreate8
xor esi, esi
mov dword [0x6bb48c], eax
cmp eax, esi
jne 0x515197
lea eax, [esi + 2]
jmp 0x515a46
push 0x514210
push eax
mov ecx, 0x6bb4c8
call fcn.00535910
test eax, eax
jne 0x5151b5
mov eax, 0x40
jmp 0x515a46
push 0x6bb480
push 0x6bb484
push 0x6bb488
push 1
push 0x20
push 0x258
push 0x320
mov ecx, 0x6bb4c8
call fcn.00535680
test eax, eax
je 0x51523b
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], esi
mov byte [esp + 0x28], 0
lea edx, [esp + 0x24]
push edx
mov ecx, 0x6bb4c8
mov dword [esp + 0x6c], esi
call fcn.00535bd0
mov eax, dword [0x6bb480]
push eax
mov ecx, 0x6bb4c8
call fcn.00535660
mov ebx, eax
mov dword [esp + 0x18], ebx
cmp ebx, esi
jne 0x515245
mov ecx, dword [0x6bb480]
push ecx
push str.adapter__d_is_EMPTY
call fcn.0053cc80
add esp, 8
lea ecx, [esp + 0x24]
call fcn.0046da60
mov eax, 0x80
jmp 0x515a46
push ebx
mov ecx, edi
call fcn.00514290
test al, al
je 0x515266
push 0x200
push ebp
mov ecx, edi
mov dword [esp + 0x1c], 0x201
call fcn.005150a0
mov edx, dword [0x6bb488]
mov eax, dword [0x6bb484]
push edx
push eax
mov ecx, ebx
call fcn.00535570
mov esi, eax
test esi, esi
jne 0x5152ae
mov ecx, dword [0x6bb488]
mov edx, dword [0x6bb484]
push ecx
push edx
push str.device__d__mode__d_is_EMPTY
call fcn.0053cc80
add esp, 0xc
lea ecx, [esp + 0x24]
call fcn.0046da60
mov eax, 0x80
jmp 0x515a46
cmp byte [esp + 0x7c], 0
je 0x5152e9
push 4
push str.3dfx
push ebx
call fcn.005c9287
add esp, 0xc
test eax, eax
jne 0x5152e9
mov ecx, ebx
call fcn.00535530
cmp dword [eax + 0xc], 0x16
jne 0x5152e9
lea ecx, [esp + 0x24]
call fcn.0046da60
mov eax, 0x400
jmp 0x515a46
cmp dword [esi + 0xc], 0x20
jne 0x5152f7
or dword [esp + 0x14], 0x100
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], 0
mov byte [esp + 0x44], 0
lea eax, [esp + 0x40]
push eax
mov ecx, esi
mov byte [esp + 0x6c], 1
call fcn.00535980
movzx ecx, byte [esp + 0x7c]
mov ebx, dword [esp + 0x84]
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], ecx
push 0x34
push 0
push 0x6bb43c
call fcn.005c5560
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x84]
mov eax, dword [esp + 0x80]
mov dword [0x6bb440], ecx
mov dword [0x6bb458], edx
mov dword [0x6bb43c], eax
mov dword [0x6bb454], ebp
mov edx, dword [edi + 4]
add esp, 0xc
cmp byte [esp + 0x7c], 0
mov ecx, 1
mov dword [0x6bb448], edx
mov dword [0x6bb450], ecx
je 0x5153a2
mov ecx, dword [esp + 0x18]
call fcn.00535530
mov eax, dword [eax + 0xc]
mov dword [0x6bb444], eax
mov ecx, 1
jmp 0x5153b1
mov edx, dword [esi + 0x10]
mov dword [0x6bb444], edx
mov dword [0x6bb468], ebx
mov dword [0x6bb464], ecx
mov dword [0x6bb45c], ecx
mov eax, dword [esi + 0x14]
mov dword [0x6bb460], eax
mov edx, dword [esi + 0xc]
mov eax, dword [0x6bb48c]
push 0x6bb490
push 0x6bb43c
mov dword [0x6bb4a0], edx
mov ebx, dword [esi + 0xc]
mov edx, dword [eax]
mov edx, dword [edx + 0x3c]
push ebx
push ebp
push ecx
mov ecx, dword [0x6bb480]
push ecx
push eax
call edx
mov dword [0x6bb498], eax
test eax, eax
jge 0x515475
cmp eax, 0x8876017c
je 0x51542e
cmp eax, 0x8876086a
je 0x515427
cmp eax, 0x8876086c
je 0x515420
push eax
push str.IDirect3DDevice.CreateDevice___ERROR__d
call fcn.0053cc80
add esp, 8
jmp 0x51543b
push str.IDirect3DDevice.CreateDevice___ERROR_D3DERR_INVALIDCALL_nThe_method_call_is_invalid._For_example__a_methods_parameter_may_have_an_invalid_value.
jmp 0x515433
push str.IDirect3DDevice.CreateDevice___ERROR_D3DERR_NOTAVAILABLE_nThis_device_does_not_support_the_queried_technique.
jmp 0x515433
push str.IDirect3DDevice.CreateDevice___ERROR_D3DERR_OUTOFVIDEOMEMORY_nDirect3D_does_not_have_enough_display_memory_to_perform_the_operation
call fcn.0053cc50
add esp, 4
cmp dword [esp + 0x20], 0
jne 0x515459
xor ebx, ebx
mov dword [esp + 0x20], 1
mov dword [esp + 0x14], 0x20
jmp 0x515335
lea ecx, [esp + 0x40]
call fcn.0046da60
lea ecx, [esp + 0x24]
call fcn.0046da60
mov eax, 0x10
jmp 0x515a46
mov edx, dword [0x6bb444]
mov eax, dword [0x6bb48c]
mov ecx, dword [eax]
push 0x31545844
push 3
push 0
push edx
mov edx, dword [0x6bb480]
push 1
push edx
push eax
mov eax, dword [ecx + 0x28]
call eax
cmp eax, 0x8876086a
jne 0x5154a9
mov byte [0x68b439], 0
mov edx, dword [0x6bb444]
mov eax, dword [0x6bb48c]
mov ecx, dword [eax]
push 0x33545844
push 3
push 0
push edx
mov edx, dword [0x6bb480]
push 1
push edx
push eax
mov eax, dword [ecx + 0x28]
call eax
cmp eax, 0x8876086a
jne 0x5154dd
mov byte [0x68b439], 0
mov edx, dword [0x6bb444]
mov eax, dword [0x6bb48c]
mov ecx, dword [eax]
push 0x35545844
push 3
push 0
push edx
mov edx, dword [0x6bb480]
push 1
push edx
push eax
mov eax, dword [ecx + 0x28]
call eax
cmp eax, 0x8876086a
jne 0x515511
mov byte [0x68b439], 0
mov eax, dword [0x6bb490]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x1c]
push 0x6bb348
push eax
call edx
mov dword [0x6bb498], eax
test eax, eax
jge 0x515556
push eax
push str.IDirect3DDevice.GetDeviceCaps___ERROR__d
call fcn.0053cc80
add esp, 8
lea ecx, [esp + 0x40]
call fcn.0046da60
lea ecx, [esp + 0x24]
call fcn.0046da60
mov eax, 8
jmp 0x515a46
cmp byte [esp + 0x7c], 0
jne 0x515576
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
push 0x40
push eax
push ecx
push 0
push 0
push 0xffffffffffffffff
push ebp
call dword [sym.imp.user32.dll_SetWindowPos]
mov eax, dword [0x6bb490]
mov edx, dword [eax]
push 0x6bb424
push eax
mov eax, dword [edx + 0xa4]
call eax
push 0x13388
call fcn.005c58a1
add esp, 4
mov dword [esp + 0x1c], eax
mov byte [esp + 0x68], 2
test eax, eax
je 0x5155b5
mov ecx, dword [0x6bb490]
push ecx
mov ecx, eax
call fcn.0050fdc0
jmp 0x5155b7
xor eax, eax
push 0x6bb494
push 0
mov byte [esp + 0x70], 1
mov dword [edi + 0x28], eax
call fcn.00592665
mov eax, dword [0x6bb494]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 0x14]
call eax
mov ecx, edi
call fcn.005141b0
mov ecx, edi
mov dword [0x6bb4a4], eax
call fcn.005140e0
mov ecx, edi
mov dword [0x6bb4a8], eax
call fcn.00514140
fldz
fst dword [0x6ece80]
mov dword [0x6bb4ac], eax
fst dword [0x6ece7c]
fst dword [0x6ece78]
fst dword [0x6ece74]
fst dword [0x6ece6c]
fst dword [0x6ece68]
fst dword [0x6ece64]
fst dword [0x6ece60]
fst dword [0x6ece58]
fst dword [0x6ece54]
fst dword [0x6ece50]
fst dword [0x6ece4c]
fld1
fst dword [0x6ece84]
fst dword [0x6ece70]
fst dword [0x6ece5c]
fst dword [0x6ece48]
fst dword [0x6ecec4]
fst dword [0x6eceb0]
fst dword [0x6ece9c]
fst dword [0x6ece88]
fst dword [0x6ecf04]
fst dword [0x6ecef0]
fst dword [0x6ecedc]
fst dword [0x6ecec8]
fst dword [0x6ecf44]
fst dword [0x6ecf30]
fst dword [0x6ecf1c]
fst dword [0x6ecf08]
fst dword [0x6ecf84]
fst dword [0x6ecf70]
fst dword [0x6ecf5c]
fst dword [0x6ecf48]
fst dword [0x6ed044]
fst dword [0x6ed030]
fst dword [0x6ed084]
fst dword [0x6ed070]
fst dword [0x6ed05c]
fst dword [0x6ed048]
fst dword [0x6ed0c4]
fst dword [0x6ed0b0]
fst dword [0x6ed008]
fxch st(1)
fst dword [0x6ecec0]
fst dword [0x6ecebc]
fst dword [0x6eceb8]
fst dword [0x6eceb4]
fst dword [0x6eceac]
fst dword [0x6ecea8]
fst dword [0x6ecea4]
fst dword [0x6ecea0]
fst dword [0x6ece98]
fst dword [0x6ece94]
fst dword [0x6ece90]
fst dword [0x6ece8c]
fst dword [0x6ecf00]
fst dword [0x6ecefc]
fst dword [0x6ecef8]
fst dword [0x6ecef4]
fst dword [0x6eceec]
fst dword [0x6ecee8]
fst dword [0x6ecee4]
push 0
fst dword [0x6ecee0]
push 0x6bb4b4
fst dword [0x6eced8]
push 0x20
fst dword [0x6eced4]
push 0x20
fst dword [0x6eced0]
push ecx
fst dword [0x6ececc]
fst dword [0x6ecf40]
fst dword [0x6ecf3c]
fst dword [0x6ecf38]
fst dword [0x6ecf34]
fst dword [0x6ecf2c]
fst dword [0x6ecf28]
fst dword [0x6ecf24]
fst dword [0x6ecf20]
fst dword [0x6ecf18]
fst dword [0x6ecf14]
fst dword [0x6ecf10]
fst dword [0x6ecf0c]
fst dword [0x6ecf80]
fst dword [0x6ecf7c]
fst dword [0x6ecf78]
fst dword [0x6ecf74]
fst dword [0x6ecf6c]
fst dword [0x6ecf68]
fst dword [0x6ecf64]
fst dword [0x6ecf60]
fst dword [0x6ecf58]
fst dword [0x6ecf54]
fst dword [0x6ecf50]
fst dword [0x6ecf4c]
fst dword [0x6ed040]
fst dword [0x6ed03c]
fst dword [0x6ed038]
fst dword [0x6ed034]
fst dword [0x6ed02c]
fst dword [0x6ed028]
fst dword [0x6ed024]
fst dword [0x6ed020]
fst dword [0x6ed018]
fst dword [0x6ed014]
fst dword [0x6ed010]
fst dword [0x6ed00c]
fst dword [0x6ed080]
fst dword [0x6ed074]
fst dword [0x6ed06c]
fst dword [0x6ed068]
fst dword [0x6ed064]
fst dword [0x6ed060]
fst dword [0x6ed058]
fst dword [0x6ed054]
fst dword [0x6ed050]
fst dword [0x6ed04c]
fst dword [0x6ed0c0]
fst dword [0x6ed0bc]
fst dword [0x6ed0b8]
fst dword [0x6ed0b4]
fst dword [0x6ed0ac]
fst dword [0x6ed0a8]
fst dword [0x6ed0a4]
fst dword [0x6ed0a0]
fst dword [0x6ed098]
fst dword [0x6ed094]
fst dword [0x6ed090]
fstp dword [0x6ed08c]
fld dword [0x622478]
fstp dword [0x6ed01c]
fst dword [0x6ed078]
fst dword [0x6ed07c]
fild dword [esp + 0x88]
fld qword [0x6221e0]
fmul st(1), st(0)
fxch st(1)
fstp dword [0x6ed088]
fimul dword [esp + 0x8c]
fstp dword [0x6ed09c]
fstp dword [esp]
mov ecx, dword [0x6bb490]
push ecx
call fcn.00591dff
fld1
mov edx, dword [0x6bb490]
push 0
push 0x6bb4b8
push 8
push 8
sub esp, 0xc
fst dword [esp + 8]
fst dword [esp + 4]
fstp dword [esp]
push edx
call fcn.00591982
fld1
mov eax, dword [0x6bb490]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x90]
push 0
push ecx
fstp dword [esp]
push 0xff000000
push 3
push 0
push 0
push eax
call edx
mov ecx, edi
call fcn.00514540
test al, al
jne 0x5159a9
lea ecx, [esp + 0x40]
call fcn.0046da60
lea ecx, [esp + 0x24]
call fcn.0046da60
xor eax, eax
jmp 0x515a46
mov ecx, edi
call fcn.00514420
test al, al
je 0x515990
call fcn.005138c0
mov esi, dword [esp + 0x18]
cmp eax, 0x4000000
setb cl
cmp eax, 0x6400000
mov al, byte [0x6bb394]
seta dl
shr al, 3
push 3
not al
and al, 1
push 0x635368
push esi
mov byte [0x6bb4b0], cl
mov byte [0x6bb4b1], dl
mov byte [0x6ed15b], al
call fcn.005c9287
add esp, 0xc
test eax, eax
jne 0x515a07
mov byte [0x6ed158], 1
jmp 0x515a1b
push 4
push str.3dfx
push esi
call fcn.005c9287
add esp, 0xc
test eax, eax
jne 0x515a30
mov byte [0x6bb4b0], 1
mov byte [0x6ed15a], 1
mov byte [0x6ed159], 1
lea ecx, [esp + 0x40]
call fcn.0046da60
lea ecx, [esp + 0x24]
call fcn.0046da60
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.005c5ea5
add esp, 0x58
ret 0x18