Function at 0x4036c7
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes
Move file

Disassembly:
push 0x70
mov eax, 0x442ca7
call fcn.00424a85
mov edi, ecx
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x78], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor ebx, ebx
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [ebp - 4], ebx
mov dword [edi + 8], ebx
lea eax, [ebp - 0x74]
mov byte [ebp - 4], 1
push eax
push ebx
push ebx
push 0x4468c0
mov dword [ebp - 0x74], ebx
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
jne 0x4038bd
mov esi, dword [ebp - 0x74]
mov dword [ebp - 0x7c], esi
push esi
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 2
call fcn.004065a8
push 0x4533d8
mov edx, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x40]
call fcn.0040a56e
pop ecx
push ebx
push 1
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 5
call fcn.0040812d
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push ebx
cmovae eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40376c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4038a7
mov ebx, str.NvNode
push ebx
call fcn.004024c8
pop ecx
push eax
push ebx
lea ecx, [ebp - 0x40]
call fcn.00409414
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
xor ebx, ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4037ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4038a7
push str.launcher.log
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x28]
call fcn.0040a4f6
mov byte [ebp - 4], 6
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0x58]
mov dword [esp], str..bak
call fcn.0040a4f6
mov dword [esp], str.67DF32C5_5AAE_4C02_BAA0_9DE41E8E9FE2
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, dword [edi + 4]
mov dword [edi + 4], eax
test ecx, ecx
je 0x4037f4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [edi + 4], ebx
je 0x403891
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40381e
push 0x1388
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x403855
jmp 0x403891
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x403855
cmp dword [ebp - 0x44], 8
lea ecx, [ebp - 0x58]
push 1
cmovae ecx, dword [ebp - 0x58]
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
push ecx
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push ebx
cmovae eax, dword [ebp - 0x28]
push 0x80
push 4
push ebx
push 3
push 0x100004
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [edi + 8]
mov dword [edi + 8], eax
test ecx, ecx
je 0x403891
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 1
lea ecx, [ebp - 0x58]
call fcn.0040812d
push ebx
push 1
lea ecx, [ebp - 0x28]
call fcn.0040812d
push ebx
push 1
lea ecx, [ebp - 0x40]
call fcn.0040812d
test esi, esi
je 0x4038bd
push esi
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, edi
call fcn.00424a2f
ret