Function at 0x128b1b0
Capabilities:
Get common file path
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x12fceb0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
push 0x50
push 0
push esi
call sym.VBoxTray.exe_nocrt_memset
add esp, 0xc
lea eax, [ebp - 0x108]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push str.gdi32.dll
mov edi, eax
call sym.VBoxTray.exe_nocrt_strlen
inc eax
lea ecx, [edi + 1]
add ecx, eax
add esp, 4
cmp ecx, 0x104
jbe 0x128b23f
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x128b221
movzx edi, di
or edi, 0x80070000
test edi, edi
je 0x128b228
cmp edi, 1
jne 0x128b22d
mov edi, 0x80004005
mov eax, edi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.01271180
mov esp, ebp
pop ebp
ret
push eax
lea eax, [ebp - 0x107]
mov byte [ebp + edi - 0x108], 0x5c
add eax, edi
push str.gdi32.dll
push eax
call sym.VBoxTray.exe_nocrt_memcpy
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi], eax
test eax, eax
je 0x128b20a
push str.D3DKMTOpenAdapterFromHdc
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 8], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b2ad
push dword [esi + 8]
push str.pfnD3DKMTOpenAdapterFromHdc___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
cmp dword [esi + 8], 0
push ebx
push str.D3DKMTOpenAdapterFromGdiDisplayName
push dword [esi]
setne bl
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0xc], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b2f2
push dword [esi + 0xc]
push str.pfnD3DKMTOpenAdapterFromGdiDisplayName___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
cmp dword [esi + 0xc], 0
push str.D3DKMTCloseAdapter
push dword [esi]
setne al
and al, bl
mov byte [ebp - 0x109], al
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x10], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b33e
push dword [esi + 0x10]
push str.pfnD3DKMTCloseAdapter___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
mov ebx, dword [esi + 0x10]
neg ebx
push str.D3DKMTEscape
push dword [esi]
sbb bl, bl
and bl, byte [ebp - 0x109]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x14], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b388
push dword [esi + 0x14]
push str.pfnD3DKMTEscape___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
cmp dword [esi + 0x14], 0
push str.D3DKMTQueryAdapterInfo
push dword [esi]
setne al
and al, bl
mov byte [ebp - 0x109], al
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x18], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b3d4
push dword [esi + 0x18]
push str.pfnD3DKMTQueryAdapterInfo___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
mov ebx, dword [esi + 0x18]
neg ebx
push str.D3DKMTCreateDevice
push dword [esi]
sbb bl, bl
and bl, byte [ebp - 0x109]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x1c], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b41e
push dword [esi + 0x1c]
push str.pfnD3DKMTCreateDevice___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
cmp dword [esi + 0x1c], 0
push str.D3DKMTDestroyDevice
push dword [esi]
setne al
and al, bl
mov byte [ebp - 0x109], al
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x20], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b46a
push dword [esi + 0x20]
push str.pfnD3DKMTDestroyDevice___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
mov ebx, dword [esi + 0x20]
neg ebx
push str.D3DKMTCreateContext
push dword [esi]
sbb bl, bl
and bl, byte [ebp - 0x109]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x24], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b4b4
push dword [esi + 0x24]
push str.pfnD3DKMTCreateContext___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
cmp dword [esi + 0x24], 0
push str.D3DKMTDestroyContext
push dword [esi]
setne al
and al, bl
mov byte [ebp - 0x109], al
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x28], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b500
push dword [esi + 0x28]
push str.pfnD3DKMTDestroyContext___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
mov ebx, dword [esi + 0x28]
neg ebx
push str.D3DKMTRender
push dword [esi]
sbb bl, bl
and bl, byte [ebp - 0x109]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x2c], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b54a
push dword [esi + 0x2c]
push str.pfnD3DKMTRender___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
cmp dword [esi + 0x2c], 0
push str.D3DKMTCreateAllocation
push dword [esi]
setne al
and al, bl
mov byte [ebp - 0x109], al
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x30], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b596
push dword [esi + 0x30]
push str.pfnD3DKMTCreateAllocation___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
mov ebx, dword [esi + 0x30]
neg ebx
push str.D3DKMTDestroyAllocation
push dword [esi]
sbb bl, bl
and bl, byte [ebp - 0x109]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x34], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b5e0
push dword [esi + 0x34]
push str.pfnD3DKMTDestroyAllocation___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
cmp dword [esi + 0x34], 0
push str.D3DKMTLock
push dword [esi]
setne al
and al, bl
mov byte [ebp - 0x109], al
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x38], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b62c
push dword [esi + 0x38]
push str.pfnD3DKMTLock___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
mov ebx, dword [esi + 0x38]
neg ebx
push str.D3DKMTUnlock
push dword [esi]
sbb bl, bl
and bl, byte [ebp - 0x109]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x3c], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b676
push dword [esi + 0x3c]
push str.pfnD3DKMTUnlock___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
cmp dword [esi + 0x3c], 0
push str.D3DKMTInvalidateActiveVidPn
push dword [esi]
setne al
and al, bl
mov byte [ebp - 0x109], al
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x40], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b6c2
push dword [esi + 0x40]
push str.pfnD3DKMTInvalidateActiveVidPn___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
mov ebx, dword [esi + 0x40]
neg ebx
push str.D3DKMTPollDisplayChildren
push dword [esi]
sbb bl, bl
and bl, byte [ebp - 0x109]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x44], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b70c
push dword [esi + 0x44]
push str.pfnD3DKMTPollDisplayChildren___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
cmp dword [esi + 0x44], 0
push str.D3DKMTEnumAdapters
push dword [esi]
setne al
and bl, al
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x48], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b752
push dword [esi + 0x48]
push str.pfnD3DKMTEnumAdapters___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
mov edi, dword [esi + 0x48]
push str.D3DKMTOpenAdapterFromLuid
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
mov dword [esi + 0x4c], eax
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b792
push dword [esi + 0x4c]
push str.pfnD3DKMTOpenAdapterFromLuid___p_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x1c
test bl, bl
pop ebx
je 0x128b7be
xor ecx, ecx
cmp dword [esi + 0x4c], ecx
setne cl
xor eax, eax
test edi, edi
pop edi
setne al
and ecx, eax
inc ecx
xor eax, eax
mov dword [esi + 4], ecx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.01271180
mov esp, ebp
pop ebp
ret
push 0x10
call fcn.01294390
add esp, 4
test eax, eax
je 0x128b7e8
push str.one_of_pfnD3DKMT_function_pointers_failed_to_initialize_n
push str.long___cdecl_vboxDispKmtCallbacksInit_struct_VBOXDISPKMT_CALLBACKS__
push str._Rfn:__M
push 0
push 0x10
push eax
call fcn.012952b0
add esp, 0x18
push dword [esi]
mov edi, 0x80004002
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.01271180
mov esp, ebp
pop ebp
ret