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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43fca8
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x45200c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x10]
mov dword [ebp + 8], eax
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x14], eax
movzx eax, word [edi + 0x28]
add eax, 0xffffffef
cmp eax, 0xf2
ja case.0x40b202.18
movzx eax, byte [eax + 0x40bab4]
jmp dword [eax*4 + 0x40ba84]
push edi
lea eax, [ebp + 8]
push eax
call fcn.0040c7f0
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x14]
cmp dword [eax + 0x48], 0
jne 0x40b225
cmp byte [eax + 0x22], 0
je 0x40b240
push esi
lea eax, [ebp + 8]
push eax
lea ecx, [ebx + 0x50]
call fcn.00407500
push edi
lea eax, [ebp + 8]
mov ecx, ebx
push eax
call fcn.0040c7f0
mov esi, dword [eax]
mov eax, dword [esi + 0x14]
cmp dword [eax + 0x1c], 0
jne case.0x40b202.18
mov dword [eax + 0x1c], 1
mov eax, 0xa8
cmp word [edi + 0x28], ax
mov eax, dword [esi + 0x14]
jne 0x40b2a4
cmp dword [eax + 0x24], 0
je 0x40b27b
add eax, 0x10
mov edx, str.FlipInterval
push eax
mov ecx, edi
call fcn.0040d0f0
add esp, 4
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
mov edx, str.MMIOFlip
mov ecx, edi
call fcn.0040d0f0
mov eax, dword [esi + 0x14]
add esp, 4
cmp dword [ebp + 8], 0
setne cl
mov byte [eax + 0x21], cl
jmp 0x40b2a8
mov byte [eax + 0x21], 1
mov eax, dword [edi + 8]
cmp eax, dword [ebx + 0x8c]
jne case.0x40b202.18
mov ecx, dword [esi + 0x14]
lea edx, [ebx + 0x78]
add ecx, 0x58
call fcn.0040d1a0
mov dword [ebx + 0x8c], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
mov ecx, edi
call fcn.0040d5b0
add esp, 4
mov dword [ebp + 8], 0
lea eax, [ebp + 8]
mov edx, str.SubmitSequence
mov ecx, edi
push eax
call fcn.0040d0f0
mov eax, dword [ebp + 8]
add esp, 4
mov dword [ebp - 0x20], eax
mov edx, str.bPresent
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
mov ecx, edi
push eax
call fcn.0040d0f0
mov eax, dword [ebp - 0x14]
add esp, 4
cmp eax, 3
je 0x40b349
cmp eax, 7
je 0x40b349
cmp dword [ebp - 0x18], 0
je case.0x40b202.18
mov eax, dword [edi + 8]
lea ecx, [ebx + 0x50]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0040cd30
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebx + 0x50]
je case.0x40b202.18
mov ecx, dword [eax + 0x14]
add eax, 0x14
cmp dword [ecx + 0x48], 0
jne case.0x40b202.18
mov edx, dword [ebp + 8]
push eax
lea eax, [ebp - 0x20]
mov dword [ecx + 0x48], edx
push eax
lea ecx, [ebx + 0x58]
call fcn.0040d650
push eax
add eax, 0x10
push eax
push ecx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebx + 0x58]
call fcn.0040d680
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
mov edx, str.SubmitSequence
mov ecx, edi
call fcn.0040d0f0
mov eax, dword [ebp - 0x18]
lea ecx, [ebx + 0x58]
add esp, 4
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.0040cd30
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebx + 0x58]
je case.0x40b202.18
add eax, 0x14
lea ecx, [ebp - 0x34]
push eax
call fcn.0040a7e0
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + 0x1c]
cmp eax, 2
je 0x40b419
cmp eax, 1
jne 0x40b44d
cmp byte [edx + 0x21], 0
jne 0x40b44d
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
mov dword [edx + 0x30], eax
mov dword [edx + 0x34], ecx
mov dword [edx + 0x38], eax
mov dword [edx + 0x3c], ecx
mov dword [edx + 0x40], 1
cmp byte [edx + 0x22], 0
je 0x40b44d
sub esp, 8
lea eax, [ebp - 0x34]
mov ecx, esp
push eax
call fcn.0040a7e0
mov ecx, ebx
call fcn.0040c2f0
lea ecx, [ebp - 0x34]
call fcn.00408e60
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
mov edx, str.FlipSubmitSequence
mov ecx, edi
call fcn.0040d0f0
mov eax, dword [ebp - 0x18]
add esp, 4
mov dword [ebp - 0x20], eax
mov ecx, edi
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
call fcn.0040d780
add esp, 4
lea eax, [ebp - 0x20]
lea ecx, [ebx + 0x58]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040cd30
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebx + 0x58]
je case.0x40b202.18
mov ecx, dword [ebp + 8]
lea edx, [eax + 0x14]
mov eax, dword [edx]
mov dword [eax + 0x30], ecx
mov ecx, dword [ebp - 0x14]
mov dword [eax + 0x34], ecx
mov eax, dword [edx]
cmp dword [eax + 0x1c], 5
jne 0x40b4da
mov dword [eax + 0x1c], 4
test byte [ebp - 0x18], 2
je case.0x40b202.18
mov eax, dword [edx]
mov dword [eax + 0x40], 1
mov ecx, dword [edx]
mov eax, dword [edi + 0x10]
mov dword [ecx + 0x38], eax
mov eax, dword [edi + 0x14]
mov dword [ecx + 0x3c], eax
mov eax, dword [edx]
mov byte [eax + 0x20], 1
mov eax, dword [edx]
cmp dword [eax + 0x1c], 1
jne case.0x40b202.18
sub esp, 8
mov ecx, esp
push edx
call fcn.0040a7e0
mov ecx, ebx
call fcn.0040c2f0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
xorps xmm0, xmm0
push eax
mov edx, str.FlipSubmitSequence
movlpd qword [ebp - 0x2c], xmm0
mov ecx, edi
call fcn.0040d060
mov eax, dword [ebp - 0x28]
lea ecx, [ebx + 0x58]
add esp, 4
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.0040cd30
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebx + 0x58]
je case.0x40b202.18
mov edx, dword [eax + 0x14]
lea esi, [eax + 0x14]
mov dword [ebp - 0x28], esi
mov eax, dword [edx + 0x30]
or eax, dword [edx + 0x34]
jne 0x40b5a1
mov ecx, dword [ebp + 8]
mov dword [edx + 0x30], ecx
mov ecx, dword [ebp - 0x14]
mov dword [edx + 0x34], ecx
mov edx, str.LayerIndex
mov esi, dword [esi]
mov ecx, edi
call fcn.0040d180
mov dword [esi + 0x44], eax
mov esi, dword [ebp - 0x28]
mov eax, dword [esi]
mov ecx, dword [eax + 0x1c]
cmp ecx, 4
je 0x40b5b0
cmp ecx, 5
jne 0x40b5b7
mov dword [eax + 0x1c], 9
cmp byte [edi + 0x2a], 2
jb case.0x40b202.18
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
mov ecx, edi
call fcn.0040d820
mov ecx, dword [ebp + 8]
add esp, 4
cmp ecx, 5
je case.0x40b202.18
mov eax, dword [esi]
mov dword [eax + 0x40], 1
mov eax, dword [esi]
mov byte [eax + 0x20], 1
cmp ecx, 0xb
jne 0x40b604
mov ecx, dword [esi]
mov eax, dword [edi + 0x10]
mov dword [ecx + 0x38], eax
mov eax, dword [edi + 0x14]
mov dword [ecx + 0x3c], eax
mov eax, dword [esi]
cmp dword [eax + 0x1c], 1
jne case.0x40b202.18
sub esp, 8
mov ecx, esp
push esi
call fcn.0040a7e0
mov ecx, ebx
call fcn.0040c2f0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
xorps xmm0, xmm0
push eax
mov edx, str.FlipFenceId
movlpd qword [ebp - 0x2c], xmm0
mov ecx, edi
call fcn.0040d060
mov eax, dword [ebp - 0x28]
lea ecx, [ebx + 0x58]
add esp, 4
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.0040cd30
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebx + 0x58]
je case.0x40b202.18
mov ecx, dword [ebp + 8]
lea edx, [eax + 0x14]
mov eax, dword [edx]
mov dword [eax + 0x38], ecx
mov ecx, dword [ebp - 0x14]
mov dword [eax + 0x3c], ecx
mov eax, dword [edx]
mov dword [eax + 0x40], 1
jmp 0x40b501
mov eax, dword [edi + 8]
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x28], eax
push ecx
lea ecx, [ebx + 0x50]
call fcn.0040cd30
mov esi, dword [ebp - 0x20]
cmp esi, dword [ebx + 0x50]
je case.0x40b202.18
mov edx, str.hWindow
mov ecx, edi
call fcn.0040d200
mov dword [ebp - 0x20], edx
mov ecx, edi
mov edx, str.Flags
mov dword [ebp - 0x28], eax
call fcn.0040d180
test eax, 0x10000
je 0x40b707
mov ecx, dword [esi + 0x14]
lea edx, [esi + 0x14]
cmp dword [ecx + 0x1c], 2
jne 0x40b707
mov dword [ecx + 0x1c], 0
sub esp, 8
mov eax, dword [edx]
mov ecx, esp
push edx
mov dword [eax + 0x40], 2
call fcn.0040a7e0
mov ecx, ebx
call fcn.0040c2f0
mov eax, dword [esi + 0x14]
lea edx, [esi + 0x14]
mov ecx, dword [ebp - 0x28]
mov dword [eax + 0x50], ecx
mov ecx, dword [ebp - 0x20]
mov dword [eax + 0x54], ecx
mov eax, dword [edx]
mov byte [eax + 0x22], 1
mov ecx, dword [edx]
mov eax, dword [ecx + 0x1c]
cmp eax, 2
je 0x40b734
cmp eax, 1
jne 0x40b751
cmp byte [ecx + 0x21], 0
jne 0x40b751
mov eax, dword [ecx + 0x38]
or eax, dword [ecx + 0x3c]
je 0x40b751
sub esp, 8
mov ecx, esp
push edx
call fcn.0040a7e0
mov ecx, ebx
call fcn.0040c2f0
lea edx, [esi + 0x14]
mov edx, dword [edx]
mov eax, dword [edx + 0x4c]
cmp eax, dword [edi + 8]
je case.0x40b202.18
mov eax, dword [edx + 0x28]
or eax, dword [edx + 0x2c]
jne 0x40b778
mov eax, dword [ebp + 8]
sub eax, dword [edx]
mov ecx, dword [ebp - 0x14]
sbb ecx, dword [edx + 4]
mov dword [edx + 0x28], eax
mov dword [edx + 0x2c], ecx
push esi
lea eax, [ebp + 8]
push eax
lea ecx, [ebx + 0x50]
call fcn.00407500
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edi + 8]
lea ecx, [ebx + 0x50]
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040cd30
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebx + 0x50]
je case.0x40b202.18
lea esi, [eax + 0x14]
mov eax, dword [esi]
cmp dword [eax + 0x1c], 2
jne 0x40b7fc
mov dword [eax + 0x1c], 6
mov eax, dword [esi]
mov byte [eax + 0x20], 0
mov eax, dword [esi]
mov dword [eax + 0x38], 0
mov dword [eax + 0x3c], 0
mov eax, dword [esi]
mov dword [eax + 0x30], 0
mov dword [eax + 0x34], 0
mov eax, dword [esi]
mov dword [eax + 0x40], 0
mov edx, str.Token
mov ecx, edi
call fcn.0040d200
mov dword [ebp - 0x24], eax
lea ecx, [ebx + 0x68]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x20], edx
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0040df30
mov ecx, dword [ebp - 0x2c]
push esi
lea ecx, [ecx + 0x18]
call fcn.0040ce90
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push edi
lea eax, [ebp - 0x28]
push eax
call fcn.0040c7f0
mov esi, dword [ebp - 0x28]
mov eax, dword [esi + 0x14]
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x40b875
cmp eax, 2
je 0x40b875
push esi
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebx + 0x50]
call fcn.00407500
push edi
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
call fcn.0040c7f0
mov esi, dword [eax]
mov eax, dword [esi + 0x14]
mov eax, dword [eax + 0x1c]
cmp eax, 2
jne 0x40b8d3
mov edx, str.TokenData
mov ecx, edi
call fcn.0040d200
mov dword [ebp - 0x2c], eax
lea ecx, [ebx + 0x98]
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x28], edx
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.0040df30
mov ecx, dword [ebp - 0x24]
lea edi, [esi + 0x14]
push edi
lea ecx, [ecx + 0x18]
call fcn.0040ce90
mov eax, dword [edi]
mov ecx, dword [ebp + 8]
mov dword [eax + 0x30], ecx
mov ecx, dword [ebp - 0x14]
mov dword [eax + 0x34], ecx
mov eax, dword [edi]
mov dword [eax + 0x1c], 7
mov eax, dword [edi]
mov byte [eax + 0x20], 0
jmp 0x40b92e
test eax, eax
jne 0x40b92b
mov dword [ebp + 8], eax
mov ecx, edi
lea eax, [ebp + 8]
push eax
call fcn.0040d8c0
add esp, 4
cmp dword [ebp + 8], 7
jne 0x40b92b
mov eax, dword [esi + 0x14]
mov edx, str.Token
mov ecx, edi
mov dword [eax + 0x1c], 8
call fcn.0040d200
mov dword [ebp - 0x2c], eax
lea ecx, [ebx + 0x68]
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x28], edx
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.0040df30
mov ecx, dword [ebp - 0x24]
lea edi, [esi + 0x14]
push edi
lea ecx, [ecx + 0x18]
call fcn.0040ce90
jmp 0x40b92e
lea edi, [esi + 0x14]
mov eax, dword [edi]
cmp dword [eax + 0x24], 2
je 0x40b940
cmp dword [eax + 0x1c], 8
jne case.0x40b202.18
push esi
lea eax, [ebp + 8]
push eax
lea ecx, [ebx + 0x50]
call fcn.00407500
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
xorps xmm0, xmm0
push eax
mov edx, str.Token
movlpd qword [ebp - 0x2c], xmm0
mov ecx, edi
call fcn.0040d060
mov eax, dword [ebp - 0x2c]
lea ecx, [ebx + 0x68]
mov dword [ebp - 0x34], eax
add esp, 4
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040cbe0
mov esi, dword [ebp - 0x28]
cmp esi, dword [ebx + 0x68]
je case.0x40b202.18
mov edx, dword [esi + 0x18]
lea edi, [esi + 0x18]
mov ecx, dword [ebp - 0x14]
mov eax, dword [edx + 0x30]
or eax, dword [edx + 0x34]
je 0x40b9cc
cmp dword [edx + 0x34], ecx
ja 0x40b9cc
jb 0x40b9c4
mov eax, dword [ebp + 8]
cmp dword [edx + 0x30], eax
jae 0x40b9cf
mov eax, dword [edx + 0x30]
mov ecx, dword [edx + 0x34]
jmp 0x40b9cf
mov eax, dword [ebp + 8]
mov dword [edx + 0x30], eax
mov dword [edx + 0x34], ecx
mov eax, dword [edi]
cmp dword [eax + 0x1c], 8
jne 0x40b9e6
push edi
lea ecx, [ebx + 0x78]
call fcn.0040d230
mov eax, dword [edi]
cmp dword [eax + 0x1c], 6
jne 0x40ba0a
add eax, 0x50
lea ecx, [ebx + 0x70]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0040df30
mov ecx, dword [ebp - 0x2c]
push edi
lea ecx, [ecx + 0x18]
call fcn.0040ce90
push esi
lea eax, [ebp + 8]
push eax
lea ecx, [ebx + 0x68]
call fcn.00406f20
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push edi
lea eax, [ebp + 8]
push eax
call fcn.0040c7f0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
cmp dword [ecx + 0x1c], 0
je 0x40ba5c
push eax
lea eax, [ebp + 8]
push eax
lea ecx, [ebx + 0x50]
call fcn.00407500
push edi
lea eax, [ebp - 0x30]
mov ecx, ebx
push eax
call fcn.0040c7f0
mov eax, dword [eax]
mov ecx, dword [eax + 0x14]
mov dword [ecx + 0x1c], 2
mov eax, dword [eax + 0x14]
mov byte [eax + 0x20], 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4