Function at 0x10020aa0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1009c402
mov eax, dword fs:[0]
push eax
sub esp, 0x508
mov eax, dword [0x100cb080]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x514], ecx
mov esi, dword [ebp + 8]
test esi, esi
jne 0x10020afb
cmp dword [0x100c8418], 7
mov dword [0x100c82e8], 7
jg 0x10021227
push str.CEncodeVideo::Setup_:Invalid_Setup_params
jmp 0x1002121a
mov esi, dword [esi + 8]
lea edx, [ecx + 0x1790]
mov ecx, 0x60
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x514]
mov ecx, dword [ebp + 0xc]
cmp dword [edi + 0x1910], 0
mov eax, dword [ecx]
mov dword [edi + 0x3ac4], eax
mov eax, dword [ecx + 4]
mov dword [edi + 0x3ac8], eax
mov al, byte [ecx + 0x14]
mov byte [edi + 0x3f40], al
mov eax, dword [edi + 0x3f80]
mov dword [edi + 0x3acc], eax
mov dword [edi + 0x3ad0], 0x400000
jne 0x10020cbd
push 0x104
push 0x100cf588
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push str.nvEncodeAPI.dll
push 0x100cf588
push str._s_s
push 0xffffffffffffffff
push 0x104
push 0x100cf588
call fcn.1000453e
push 0
push 0x100cf588
call fcn.10001604
add esp, 0x20
mov dword [edi + 0x1910], eax
test eax, eax
jne 0x10020bca
cmp dword [0x100c8418], 7
mov dword [0x100c82e8], 7
jg 0x10020c96
push str.CEncodeVideo::InitEncodeAPI_:Could_not_Load_NvEncodeAPI.dll
push 0x100c82e0
call fcn.10001a0f
add esp, 8
jmp 0x10020c96
push str.NvEncodeAPICreateInstance
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
jne 0x10020c0a
cmp dword [0x100c8418], 7
mov dword [0x100c82e8], 7
jg 0x10020c96
push str.CEncodeVideo::InitEncodeAPI_:Cant_Initialize_EncodeAPI_function_list
push 0x100c82e0
call fcn.10001a0f
add esp, 8
jmp 0x10020c96
push 0x500
call fcn.10003f03
add esp, 4
mov dword [edi + 0x2b48], eax
test eax, eax
jne 0x10020c48
cmp dword [0x100c8418], 7
mov dword [0x100c82e8], 7
jg 0x10020c96
push str.CEncodeVideo::InitEncodeAPI_:Could_not_get_NV_ENCODE_API_FUNCTION_LIST
push 0x100c82e0
call fcn.10001a0f
add esp, 8
jmp 0x10020c96
push 0x500
push 0
push eax
call fcn.100022b1
mov eax, dword [edi + 0x2b48]
add esp, 0xc
mov dword [eax], 0x70020008
push dword [edi + 0x2b48]
call esi
test eax, eax
je 0x10020cb7
cmp dword [0x100c8418], 7
mov dword [0x100c82e8], 7
jg 0x10020c96
push eax
push str.CEncodeVideo::InitEncodeAPI_:Failed_to_create_EncodeAPI_Instance_with_code:_d
push 0x100c82e0
call fcn.10001a0f
add esp, 0xc
cmp dword [0x100c8418], 7
mov dword [0x100c82e8], 7
jg 0x10021227
push str.CEncodeVideo::Setup_:Loading_nvEncodeAPI_dll_Failed
jmp 0x1002121a
lea edx, [edi + 0x1790]
cmp byte [edi + 0xec], 0
jne 0x10020f03
push 0x600
lea esi, [edi + 0x2548]
push 0
push esi
call fcn.100022b1
push 0xc00
mov dword [esi], 0xf0050008
lea esi, [edi + 0x1948]
push 0
push esi
call fcn.100022b1
mov dword [esi], 0xf0060008
add esp, 0x18
mov eax, dword [edi + 0x17b4]
sub eax, 0
je 0x10020d26
sub eax, 2
je 0x10020d1d
sub eax, 2
je 0x10020d1d
movups xmm0, xmmword [0x100ab744]
jmp 0x10020d2d
movups xmm0, xmmword [0x100ab754]
jmp 0x10020d2d
movups xmm0, xmmword [str.D_bg]
movups xmmword [edi + 0x1928], xmm0
mov eax, dword [edi + 0x1798]
mov ecx, 0x1e
mov dword [edi + 0x257c], eax
mov eax, dword [edi + 0x179c]
mov dword [edi + 0x2580], eax
mov eax, dword [edi + 0x17a8]
test eax, eax
mov dword [edi + 0x1970], 0x70010008
cmovne ecx, eax
mov dword [edi + 0x195c], ecx
mov eax, dword [edi + 0x17a0]
mov dword [edi + 0x1984], eax
mov eax, dword [edi + 0x17a4]
mov dword [edi + 0x1988], eax
mov eax, dword [edi + 0x17ac]
mov dword [edi + 0x1980], eax
mov eax, dword [edi + 0x17ac]
mov dword [edi + 0x1978], eax
mov eax, dword [edi + 0x17ac]
mov dword [edi + 0x197c], eax
mov eax, dword [edi + 0x17b0]
mov dword [edi + 0x1974], eax
mov eax, dword [edi + 0x17c4]
mov dword [edi + 0x198c], eax
mov eax, dword [edi + 0x17c8]
mov dword [edi + 0x1990], eax
mov eax, dword [edi + 0x17b8]
shr eax, 2
xor eax, dword [edi + 0x1994]
and eax, 2
xor dword [edi + 0x1994], eax
mov eax, dword [edi + 0x17cc]
mov dword [edi + 0x19a4], eax
mov eax, dword [edi + 0x17d0]
mov dword [edi + 0x19a8], eax
mov eax, dword [edi + 0x17d4]
mov dword [edi + 0x19ac], eax
xor eax, eax
cmp dword [edi + 0x1794], 0x64
sete al
inc eax
mov dword [edi + 0x1a10], eax
mov eax, dword [edi + 0x17a8]
mov dword [edi + 0x19f8], eax
mov eax, dword [edi + 0x17d8]
mov dword [edi + 0x1a2c], eax
mov ecx, dword [edi + 0x17b8]
mov eax, dword [edi + 0x19f0]
shr ecx, 5
and eax, 0xfffffbff
and ecx, 1
mov dword [edi + 0x1ab0], 1
mov dword [edi + 0x3ad4], ecx
shl ecx, 0xa
or ecx, eax
mov eax, 0x42
mov dword [edi + 0x19f0], ecx
cmp eax, dword [edi + 0x1794]
sbb eax, eax
add eax, 2
mov dword [edi + 0x1a1c], eax
mov eax, dword [edi + 0x17c0]
mov dword [edi + 0x1a34], eax
mov eax, dword [edi + 0x17bc]
cmp eax, 3
ja case.default.0x10020e92
jmp dword [eax*4 + 0x10021248]
mov dword [edi + 0x1a30], 1
jmp 0x10020ed1
mov dword [edi + 0x1a30], 2
jmp 0x10020ed1
mov dword [edi + 0x1a30], 3
jmp 0x10020ed1
mov dword [edi + 0x1a34], 0
mov dword [edi + 0x1a30], 0
mov eax, dword [edi + 0x17a0]
mov dword [edi + 0x365c], eax
mov ecx, dword [edi + 0x179c]
mov eax, dword [edi + 0x1798]
test ecx, ecx
je 0x10020ef1
xor edx, edx
div ecx
mov dword [edi + 0x3658], eax
mov dword [edi + 0x3660], 0
jmp 0x10020f0b
push edx
mov ecx, edi
call fcn.1000337d
mov ecx, edi
call fcn.100021c1
test al, al
jne 0x10020f37
cmp dword [0x100c8418], 7
mov dword [0x100c82e8], 7
jg 0x10021227
push str.CEncodeVideo::Setup_:OpenAndValidateHWEncoder_Failed
jmp 0x1002121a
mov ecx, edi
call fcn.10003c1a
test al, al
jne 0x10020f63
cmp dword [0x100c8418], 7
mov dword [0x100c82e8], 7
jg 0x10021227
push str.CEncodeVideo::Setup_:InitializeHWEncoder_Failed
jmp 0x1002121a
push 0x500
lea eax, [ebp - 0x510]
push 0
push eax
call fcn.100022b1
add esp, 0xc
mov dword [ebp - 0x510], 0x70010008
lea eax, [edi + 0x36b4]
mov dword [ebp - 0x50c], 0x400
mov dword [ebp - 0x4fc], eax
lea ecx, [ebp - 0x510]
mov eax, dword [edi + 0x2b48]
lea esi, [edi + 0x36b8]
push ecx
push dword [edi + 0x1914]
mov dword [ebp - 0x500], esi
mov eax, dword [eax + 0x60]
call eax
mov ecx, eax
test ecx, ecx
jne 0x100211da
test esi, esi
je 0x10021007
cmp dword [edi + 0xbc], 0xf00
jae 0x10020fe3
cmp dword [edi + 0xc0], 0x870
jb 0x10021007
movss xmm0, dword [edi + 0xcc]
comiss xmm0, dword [0x100ad1fc]
jb 0x10021007
cmp byte [edi + 0xdc], 0
jne 0x10021010
cmp byte [esi + 7], 0x34
jne 0x10021007
mov byte [esi + 7], 0x33
cmp byte [edi + 0xdc], 0
je 0x1002103c
mov ecx, edi
call fcn.10004a8e
test al, al
jne 0x1002103c
cmp dword [0x100c8418], 7
mov dword [0x100c82e8], 7
jg 0x10021227
push str.CEncodeVideo::Setup_:PrepareDXVAProc_Failed
jmp 0x1002121a
cmp byte [edi + 0xec], 0
je 0x100211d6
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0
call esi
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi + 0x3f84], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [edi + 0x3f84], 0
je 0x100211a8
cmp eax, 0xb7
je 0x100211a8
push 0x30
call fcn.10003f03
add esp, 4
mov dword [ebp - 0x514], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x100210ad
push 0x18
push 0x14
mov ecx, eax
call fcn.1000171c
jmp 0x100210af
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [edi + 0x4098], eax
test eax, eax
jne 0x100210e1
cmp dword [0x100c8418], 7
mov dword [0x100c82e8], 7
jg 0x10021227
push str.CEncodeVideo::Setup:_Queue_creation_failed
jmp 0x1002121a
push 0
call esi
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi + 0x3f88], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [edi + 0x3f88], 0
je 0x10021176
cmp eax, 0xb7
je 0x10021176
push 0
call esi
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi + 0x3f8c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [edi + 0x3f8c], 0
je 0x10021141
cmp eax, 0xb7
jne 0x100211d6
cmp dword [0x100c8418], 7
mov dword [0x100c82e8], 7
jg 0x10021227
push eax
push dword [edi + 0x3f8c]
push str.CEncodeVideo::Setup:_framesDone_createevent___X_._failed_with_gle__X_
push 0x100c82e0
call fcn.10001a0f
add esp, 0x10
jmp 0x10021227
cmp dword [0x100c8418], 7
mov dword [0x100c82e8], 7
jg 0x10021227
push eax
push dword [edi + 0x3f88]
push str.CEncodeVideo::Setup:_encFlush_createevent___X_._failed_with_gle__X_
push 0x100c82e0
call fcn.10001a0f
add esp, 0x10
jmp 0x10021227
cmp dword [0x100c8418], 7
mov dword [0x100c82e8], 7
jg 0x10021227
push eax
push dword [edi + 0x3f84]
push str.CEncodeVideo::Setup:_Stop_createevent___X_._failed_with_gle__X_
push 0x100c82e0
call fcn.10001a0f
add esp, 0x10
jmp 0x10021227
mov al, 1
jmp 0x10021229
mov eax, dword [0x100c8418]
mov dword [0x100c82e8], 7
cmp eax, 7
jg 0x10021206
push ecx
push str.CEncodeVideo::FetchSPSPPSHeader_:FetchSPSPPSHeader_Failure_with_code:_d
push 0x100c82e0
call fcn.10001a0f
mov eax, dword [0x100c8418]
add esp, 0xc
mov dword [0x100c82e8], 7
cmp eax, 7
jg 0x10021227
push str.CEncodeVideo::Setup_:Fetch_header_failed
push 0x100c82e0
call fcn.10001a0f
add esp, 8
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100041bf
mov esp, ebp
pop ebp
ret 8