Function at 0x4fa450
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x4fa6ea
test ebx, ebx
je 0x4fa6ea
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x4fa6ea
lea eax, [esi + 0xc]
mov dword [esi + 4], 0
mov dword [eax], 0x9100
mov dword [ebp - 0xc], eax
lea eax, [esi + 4]
mov dword [ebp - 8], eax
lea eax, [esi + 8]
mov dword [esi], 0
mov dword [eax], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 1
mov dword [esi + 0x18], 0
cmp dword [edi + 0x308], 0
mov dword [ebp - 0x14], eax
jle 0x4fa52b
mov eax, dword [edi + 0x304]
cmp dword [eax + 0xc], 0x1002
jne 0x4fa52b
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x18]
mov dword [edi + 0x8c], eax
cmp eax, 1
je 0x4fa4e8
cmp eax, 2
jne 0x4fa52b
push str.aticfx32.dll
push str.aticfx64.dll
call fcn.004fcc10
add esp, 8
mov dword [edi + 0x90], eax
test eax, eax
je 0x4fa52b
push str.AmdExtRequestMgpuAppControl
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4fa52b
mov ecx, dword [edi + 0x8c]
cmp ecx, 2
jne 0x4fa522
push ecx
jmp 0x4fa529
cmp ecx, 1
jne 0x4fa52b
push 3
call eax
push edi
call fcn.004fa280
add esp, 4
test eax, eax
jne 0x4fa6ef
push str.d3d11.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [edi + 0x94], eax
test eax, eax
jne 0x4fa55d
pop edi
pop esi
mov eax, 4
pop ebx
mov esp, ebp
pop ebp
ret
push str.D3D11CreateDeviceAndSwapChain
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.D3D11CreateDevice
push dword [edi + 0x94]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x4fa6de
cmp dword [ebp - 4], 0
je 0x4fa6de
push str.AmdD3D11CreateDeviceExt
push dword [edi + 0x98]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.AmdD3D11CreateDeviceAndSwapChainExt
push dword [edi + 0x98]
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp dword [ebp + 8], 0
mov dword [ebp - 0x10], eax
je 0x4fa68e
test eax, eax
je 0x4fa68e
mov edx, dword [ebp + 0x10]
xorps xmm0, xmm0
xor ecx, ecx
movq qword [ebp - 0x20], xmm0
movups xmmword [ebp - 0x30], xmm0
test edx, edx
je 0x4fa61b
cmp dword [edx], ecx
jne 0x4fa5ea
cmp dword [edx + 4], ecx
je 0x4fa61b
cmp dword [edx], 0
mov ecx, 0x5be250
mov eax, ecx
mov dword [ebp - 0x30], 2
cmovne eax, dword [edx]
mov dword [ebp - 0x28], eax
mov eax, dword [edx + 8]
mov dword [ebp - 0x24], eax
mov eax, dword [edx + 4]
test eax, eax
cmovne ecx, eax
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x1c], eax
cmp dword [ebx + 0x1c], 0
lea eax, [esi + 4]
mov edx, dword [ebx + 0x18]
push ecx
push eax
lea eax, [esi + 0xc]
push eax
push esi
je 0x4fa652
lea eax, [esi + 8]
push eax
push dword [ebx + 0x1c]
mov eax, dword [ebx + 0x14]
push edx
push eax
mov eax, dword [ebx + 0x10]
push eax
mov eax, dword [ebx + 0xc]
push eax
mov eax, dword [ebx + 8]
push eax
mov eax, dword [ebx + 4]
push eax
mov eax, dword [ebx]
push eax
call dword [ebp - 0x10]
jmp 0x4fa66d
mov eax, dword [ebx + 0x14]
push edx
push eax
mov eax, dword [ebx + 0x10]
push eax
mov eax, dword [ebx + 0xc]
push eax
mov eax, dword [ebx + 8]
push eax
mov eax, dword [ebx + 4]
push eax
mov eax, dword [ebx]
push eax
call dword [ebp + 8]
test eax, eax
jne 0x4fa6d0
or dword [esi + 0x10], 0x800
push esi
push dword [ebp + 0x10]
push edi
call fcn.004f9da0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0x1c], 0
push dword [ebp - 8]
mov eax, dword [ebx + 0x18]
push dword [ebp - 0xc]
mov ecx, dword [ebx + 0x14]
mov edx, dword [ebx + 0x10]
push esi
je 0x4fa6bd
push dword [ebp - 0x14]
push dword [ebx + 0x1c]
push eax
push ecx
push edx
push dword [ebx + 0xc]
push dword [ebx + 8]
push dword [ebx + 4]
push dword [ebx]
call dword [ebp - 4]
jmp 0x4fa6ce
push eax
push ecx
push edx
push dword [ebx + 0xc]
push dword [ebx + 8]
push dword [ebx + 4]
push dword [ebx]
call dword [ebp - 0x18]
test eax, eax
jns 0x4fa678
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 5
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret