Function at 0x40d02f
Capabilities:
Accept command line arguments
Check if file exists
Create thread
Get common file path
Resume thread

Disassembly:
push ebp
lea ebp, [esp - 0x17ec]
mov eax, 0x186c
call fcn.0042d800
mov eax, dword [0x43e030]
xor eax, ebp
mov dword [ebp + 0x17e8], eax
and dword [ebp - 0x80], 0
push edi
call fcn.0040de57
mov dword [ebx + 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edi, eax
test edi, edi
je 0x40d45a
push esi
xor eax, eax
mov esi, 0x206
push esi
push eax
mov word [ebp + reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp + 0x15e2]
push eax
call fcn.00421bc0
lea eax, [ebp + 0x15e0]
push eax
push 0x435df0
push edi
mov edi, 0x103
call fcn.0040fa78
add esp, 0x18
test eax, eax
je 0x40d459
lea eax, [ebp + 0x15e0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d459
lea ecx, [ebx + 0x58]
lea eax, [ebp + 0x15e0]
call fcn.00405e78
lea eax, [ebp + 0x15e0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edi, [ebx + 0x3c]
lea eax, [ebp + 0x15e0]
mov ecx, edi
call fcn.00405e78
xor eax, eax
push esi
push eax
mov word [ebp + reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp + 0xdc2]
push eax
call fcn.00421bc0
add esp, 0xc
push 0x4370f0
lea eax, [ebp + 0x15e0]
push eax
lea eax, [ebp + 0xdc0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea ecx, [ebx + 0x74]
lea eax, [ebp + 0xdc0]
call fcn.00405e78
cmp dword [edi + 0x18], 8
jb 0x40d136
mov esi, dword [edi + 4]
jmp 0x40d139
lea esi, [edi + 4]
push ebx
call fcn.0040db3b
mov dword [ebp - 0x7c], eax
mov dword [ebx + 0x1c], eax
xor eax, eax
mov esi, 0x206
push esi
mov word [ebp + reloc.ADVAPI32.dll_RegCloseKey], ax
xor edi, edi
lea eax, [ebp + 0xfca]
push edi
push eax
call fcn.00421bc0
mov eax, dword [ebp - 0x7c]
add esp, 0xc
neg eax
sbb eax, eax
and eax, 0xffffffeb
push edi
add eax, 0x17
push eax
lea eax, [ebp + 0xfc8]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x40d459
lea ecx, [ebx + 0x90]
lea eax, [ebp + 0xfc8]
call fcn.00405e78
xor eax, eax
push esi
mov word [ebp + reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp + 0x5a2]
push edi
push eax
call fcn.00421bc0
add esp, 0xc
push 0x436f58
lea eax, [ebp + 0xfc8]
push eax
lea eax, [ebp + 0x5a0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea ecx, [ebx + 0xac]
lea eax, [ebp + 0x5a0]
call fcn.00405e78
xor eax, eax
push esi
mov word [ebp + reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp + 0x9b2]
push edi
push eax
call fcn.00421bc0
mov eax, dword [ebx + 0x1c]
add esp, 0xc
neg eax
sbb eax, eax
and eax, 0xfffffff5
push edi
add eax, 0x16
push eax
lea eax, [ebp + 0x9b0]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x40d459
lea ecx, [ebx + 0xc8]
lea eax, [ebp + 0x9b0]
call fcn.00405e78
xor eax, eax
push esi
mov word [ebp + reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp + 0xbba]
push edi
push eax
call fcn.00421bc0
mov eax, dword [ebx + 0x1c]
add esp, 0xc
neg eax
sbb eax, eax
and eax, 0xfffffff7
push edi
add eax, 0x19
push eax
lea eax, [ebp + 0xbb8]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x40d459
lea ecx, [ebx + 0xe4]
lea eax, [ebp + 0xbb8]
call fcn.00405e78
xor eax, eax
push esi
mov word [ebp + reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp + 0x13da]
push edi
push eax
call fcn.00421bc0
add esp, 0xc
push edi
push 0x1a
lea eax, [ebp + 0x13d8]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x40d459
xor eax, eax
push esi
mov word [ebp + reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp + 0x39a]
push edi
push eax
call fcn.00421bc0
add esp, 0xc
push 0x436f68
lea eax, [ebp + 0x13d8]
push eax
lea eax, [ebp + 0x398]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea ecx, [ebx + 0x100]
lea eax, [ebp + 0x398]
call fcn.00405e78
xor eax, eax
push esi
mov word [ebp - 0x78], ax
lea eax, [ebp - 0x76]
push edi
push eax
call fcn.00421bc0
add esp, 0xc
push 0x437748
lea eax, [ebp + 0x13d8]
push eax
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea ecx, [ebx + 0x11c]
lea eax, [ebp - 0x78]
call fcn.00405e78
xor eax, eax
push esi
mov word [ebp + reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp + 0x192]
push edi
push eax
call fcn.00421bc0
add esp, 0xc
push 0x4377c8
lea eax, [ebp + 0x13d8]
push eax
lea eax, [ebp + 0x190]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea ecx, [ebx + 0x138]
lea eax, [ebp + 0x190]
call fcn.00405e78
xor eax, eax
push esi
mov word [ebp + reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp + 0x11d2]
push edi
push eax
call fcn.00421bc0
add esp, 0xc
lea eax, [ebp + 0x11d0]
push eax
push 0x103
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x40d459
lea eax, [ebp + 0x11d0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
xor eax, eax
push esi
mov word [ebp + reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp + 0x7aa]
push edi
push eax
call fcn.00421bc0
push edi
call fcn.004203d7
push eax
lea eax, [ebp + 0x11d0]
push eax
push 0x437848
lea eax, [ebp + 0x7a8]
push 0x103
push eax
call fcn.0041fb89
add esp, 0x24
lea ecx, [ebx + 0x20]
lea eax, [ebp + 0x7a8]
call fcn.00405e78
lea eax, [ebx + 4]
push eax
push 4
push ebx
push 0x40d473
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x7c], eax
cmp eax, edi
je 0x40d459
push edi
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push dword [ebp - 0x7c]
mov dword [ebx + 0xc], eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0x3e8
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebx + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x7c]
mov dword [ebx + 0xc], edi
call esi
mov dword [ebp - 0x80], 1
pop esi
mov ecx, dword [ebp + 0x17e8]
mov eax, dword [ebp - 0x80]
xor ecx, ebp
pop edi
call fcn.0041f23c
add ebp, 0x17ec
leave
ret