Function at 0x496db0
Capabilities:
Link many functions at runtime
Terminate thread

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x554ba1
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
push edi
push str.d3dim9.dll
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x497127
push esi
push str.CreateD3DIM9Test
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.LaunchD3DIM9Test
mov esi, eax
push ebx
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.DeleteD3DIM9Test
push ebx
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GetPublicStatus
push ebx
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SetTestMode
push ebx
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SetGraphicsPortTest
push ebx
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x496e55
push 1
mov ecx, eax
call dword [0x55f634]
call dword [ebp - 0x1c]
add esp, 4
test esi, esi
mov esi, dword [ebp + 8]
je 0x4970d6
mov ecx, dword [ebp - 0x14]
call dword [0x55f634]
call dword [ebp - 0x14]
movzx eax, al
mov dword [esi], eax
test eax, eax
je 0x4970dc
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4970d6
push 1
mov ecx, eax
call dword [0x55f634]
mov eax, dword [ebp - 0x18]
call eax
add esp, 4
cmp dword [esi], 1
jne 0x4970dc
cmp dword [ebp - 0x10], 0
je 0x4970a0
mov ecx, edi
mov byte [edi + 0x15a], 0
call fcn.0049a0d0
test al, al
je 0x497152
mov ecx, dword [ebp - 0x10]
call dword [0x55f634]
call dword [ebp - 0x10]
mov dword [esi], eax
lea eax, [ebp - 0x18]
push eax
push dword [edi + 0x164]
mov dword [ebp - 0x18], 0
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [ebp - 0x18], 0x103
jne 0x496f5f
push 0
push dword [edi + 0x164]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
test eax, eax
jne 0x496f5f
mov ecx, dword [edi + 0x2b8]
push 0xf1e59
call fcn.00441690
push 0x14
mov dword [esi], 0xf1e59
call fcn.004c821c
add esp, 4
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x496f3d
push 0xf1e59
mov ecx, eax
call fcn.00417f90
mov esi, eax
jmp 0x496f3f
xor esi, esi
push 0x56079c
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], 0xffffffff
call fcn.00408370
mov dword [ebp - 4], 3
jmp 0x4971ad
mov eax, dword [esi]
cmp eax, 0xffffffff
jne 0x496ffa
mov ecx, dword [edi + 0x2b8]
push 0xf1dcd
call fcn.00441690
push 0x56079c
lea ecx, [ebp - 0x3c]
mov dword [esi], 0xf1dcd
call fcn.00408370
lea eax, [ebp - 0x3c]
mov dword [ebp - 4], 4
push eax
push 0xda
push 8
call fcn.004204a0
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.00403550
push 0x14
call fcn.004c821c
add esp, 4
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], 5
test eax, eax
je 0x496fe9
push 0xf1dcd
mov ecx, eax
call fcn.00417f90
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x1c], eax
jmp 0x4971ce
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x1c], eax
jmp 0x4971ce
cmp eax, 0xfffffffe
jne 0x49708e
mov ecx, dword [edi + 0x2b8]
push 0xf1dce
call fcn.00441690
push 0x56079c
lea ecx, [ebp - 0x3c]
mov dword [esi], 0xf1dce
call fcn.00408370
lea eax, [ebp - 0x3c]
mov dword [ebp - 4], 6
push eax
push 0xdb
push 8
call fcn.004204a0
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.00403550
push 0x14
call fcn.004c821c
add esp, 4
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], 7
test eax, eax
je 0x497075
push 0xf1dce
mov ecx, eax
call fcn.00417f90
jmp 0x497077
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
push 0x582dc0
jmp 0x4971d6
cmp eax, 0xfffffffd
jne 0x4970a8
mov dword [esi], 0xfffffffe
mov eax, 0xfffffffe
jmp 0x4970a8
mov dword [esi], 0
xor eax, eax
cmp byte [edi + 0x15a], 0
je 0x4970b9
mov dword [esi], 0xfffffffd
jmp 0x4970dc
cmp eax, 1
jne 0x4970dc
mov edi, dword [ebp - 0x20]
test edi, edi
je 0x4970d6
mov ecx, edi
call dword [0x55f634]
call edi
movzx eax, al
mov dword [esi], eax
jmp 0x4970dc
mov dword [esi], 0
mov edi, dword [ebp - 0x24]
test edi, edi
je 0x497107
mov ecx, edi
call dword [0x55f634]
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
push ebx
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
push 0
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.Load_Library_of_d3dim9.dll_failed
push 0x31
push 8
call fcn.004204c0
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov dword fs:[0], ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [edi + 0x2b8]
push 0xf1df2
call fcn.00441690
push 0x14
mov dword [esi], 0xf1df2
call fcn.004c821c
add esp, 4
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x497190
push 0xf1df2
mov ecx, eax
call fcn.00417f90
mov esi, eax
jmp 0x497192
xor esi, esi
push 0x56079c
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], 0xffffffff
call fcn.00408370
mov dword [ebp - 4], 1
lea eax, [ebp - 0x3c]
mov ecx, esi
push eax
push 4
push 7
call fcn.00418280
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], 0xffffffff
call fcn.00403550
mov dword [ebp - 0x1c], esi
push 0x582dc0
lea eax, [ebp - 0x1c]
push eax
call fcn.004e4900
int3