Function at 0x497b16
Capabilities:
Check if file exists
Create directory
Create process on windows
Create thread

Disassembly:
push ebp
sub esp, 0x650
lea ebp, [esp - 4]
mov eax, dword [0x551bd0]
xor eax, ebp
mov dword [ebp + 0x650], eax
push 0xa4
mov eax, 0x50d434
call fcn.0049dfed
mov eax, dword [ebp + 0x6b8]
xor ebx, ebx
mov edi, ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], ebx
cmp dword [ebp + 0x674], 8
mov eax, dword [ebp + 0x660]
mov dword [ebp - 4], 2
jae 0x497b69
lea eax, [ebp + 0x660]
push eax
push 0x5237b0
push 3
call fcn.00409c47
push eax
call fcn.00474128
lea eax, [edi + 4]
add esp, 0x10
push eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp + 0x674], 8
mov eax, dword [ebp + 0x660]
mov byte [edi], bl
mov byte [ebp - 0xd], bl
jae 0x497ba6
lea eax, [ebp + 0x660]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor esi, esi
inc esi
cmp eax, esi
jne 0x4981b7
lea ecx, [edi + 0x54]
call fcn.00424fcc
lea ecx, [edi + 0x38]
call fcn.00424fcc
lea ecx, [edi + 0x1c]
call fcn.00424fcc
push ebx
lea ecx, [ebp]
mov dword [ebp + 0x18], 7
call fcn.00401afa
xor eax, eax
push 0x40e
mov word [ebp + 0x38], ax
lea eax, [ebp + 0x3a]
push ebx
push eax
mov byte [ebp - 4], 3
call fcn.0049d740
add esp, 0xc
push ebx
push 0x5237a4
lea ecx, [ebp + 0x65c]
call fcn.0040377d
cmp eax, 0xffffffff
je 0x497efc
mov ecx, dword [edi + 0xac]
cmp ecx, ebx
je 0x497c80
mov eax, dword [ecx]
call dword [eax]
test al, al
jne 0x497c80
push ebx
push esi
lea ecx, [ebp]
call fcn.0040184d
push ebx
push esi
lea ecx, [ebp + 0x65c]
call fcn.0040184d
push ebx
push esi
lea ecx, [ebp + 0x678]
call fcn.0040184d
push ebx
push esi
lea ecx, [ebp + 0x694]
call fcn.0040184d
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x650]
xor ecx, ebp
call fcn.0049a49b
add ebp, 0x654
leave
ret 0x60
cmp dword [0x558d80], 0x40
lea eax, [edi + 0x8c]
jne 0x497caa
push str.DrvInst_x64.exe
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00409dbb
add esp, 0xc
mov byte [ebp - 4], 4
mov dword [ebp - 0x14], esi
jmp 0x497cca
push 0x52375c
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00409dbb
add esp, 0xc
mov dword [ebp - 4], 5
mov dword [ebp - 0x14], 2
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp]
call fcn.004019f3
test byte [ebp - 0x14], 2
je 0x497cea
and dword [ebp - 0x14], 0xfffffffd
push ebx
push esi
lea ecx, [ebp - 0x58]
call fcn.0040184d
test byte [ebp - 0x14], 1
mov dword [ebp - 4], 3
je 0x497d01
push ebx
push esi
lea ecx, [ebp - 0x3c]
call fcn.0040184d
lea esi, [edi + 0x70]
cmp dword [esi + 0x18], 8
jb 0x497d0f
mov eax, dword [esi + 4]
jmp 0x497d12
lea eax, [esi + 4]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push esi
lea ecx, [ebp + 0x1c]
call fcn.00403757
xor eax, eax
push 0x206
mov word [ebp + 0x448], ax
lea eax, [ebp + 0x44a]
push ebx
push eax
mov byte [ebp - 4], 6
call fcn.0049d740
movzx esi, word [ebp + 0x6b4]
movzx eax, word [ebp + 0x6b0]
push esi
push eax
push str.0x_04X0x_04X
lea eax, [ebp + 0x448]
push 0x104
push eax
call fcn.0049c53d
push 0x538040
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00409dbb
lea ecx, [ebp + 0x448]
push ecx
push eax
lea eax, [ebp - 0x3c]
push eax
mov byte [ebp - 4], 7
call fcn.00409dbb
add esp, 0x38
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 8
call fcn.004019f3
push ebx
push 1
lea ecx, [ebp - 0x3c]
call fcn.0040184d
push ebx
push 1
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 6
call fcn.0040184d
cmp dword [ebp + 0x34], 8
mov ecx, dword [ebp + 0x20]
jae 0x497dc8
lea ecx, [ebp + 0x20]
cmp dword [ebp + 0x674], 8
mov eax, dword [ebp + 0x660]
jae 0x497ddd
lea eax, [ebp + 0x660]
push ecx
push eax
call fcn.0047ab3d
pop ecx
pop ecx
test eax, eax
jne 0x497ea8
cmp dword [ebp + 0x34], 8
mov eax, dword [ebp + 0x20]
jae 0x497dfa
lea eax, [ebp + 0x20]
push eax
movzx eax, word [ebp + 0x6b0]
push esi
push eax
push str.__h__VID__04XPID__04X____s_
lea eax, [ebp + 0x38]
push 0x208
push eax
call fcn.0049c53d
lea eax, [ebp]
push eax
mov esi, 0x535df8
lea eax, [ebp - 0xb0]
push esi
push eax
call fcn.004120ff
push esi
push eax
lea eax, [ebp - 0x58]
push eax
mov byte [ebp - 4], 9
call fcn.00409dbb
lea ecx, [ebp + 0x38]
push ecx
push eax
lea eax, [ebp - 0x3c]
push eax
mov byte [ebp - 4], 0xa
call fcn.00409dbb
add esp, 0x3c
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [edi + 0x54]
mov byte [ebp - 4], 0xb
call fcn.004019f3
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp - 0x3c]
call fcn.0040184d
push ebx
push esi
lea ecx, [ebp - 0x58]
call fcn.0040184d
push ebx
push esi
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 6
call fcn.0040184d
lea eax, [ebp + 0x38]
push eax
lea ecx, [edi + 0x38]
call fcn.00401829
push ebx
push esi
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 3
call fcn.0040184d
jmp 0x497fc0
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push ebx
push 1
lea ecx, [ebp + 0x1c]
call fcn.0040184d
push ebx
push 1
lea ecx, [ebp]
call fcn.0040184d
xor esi, esi
mov byte [ebp - 0xd], bl
inc esi
push ebx
push esi
lea ecx, [ebp + 0x65c]
call fcn.0040184d
push ebx
push esi
lea ecx, [ebp + 0x678]
call fcn.0040184d
push ebx
push esi
lea ecx, [ebp + 0x694]
call fcn.0040184d
mov al, byte [ebp - 0xd]
jmp 0x497c5b
push 0xffffffffffffffff
push ebx
lea eax, [ebp + 0x65c]
push eax
lea ecx, [ebp]
call fcn.004019f3
cmp dword [ebp + 0x690], 8
mov eax, dword [ebp + 0x67c]
jae 0x497f23
lea eax, [ebp + 0x67c]
push eax
push 0x5236fc
lea eax, [ebp + 0x38]
push 0x208
push eax
call fcn.0049c53d
add esp, 0x10
cmp dword [ebp + 0x68c], ebx
jbe 0x497fc0
lea eax, [ebp]
push eax
mov esi, 0x535df8
lea eax, [ebp - 0x58]
push esi
push eax
call fcn.004120ff
push esi
push eax
lea eax, [ebp - 0x3c]
push eax
mov byte [ebp - 4], 0xc
call fcn.00409dbb
lea ecx, [ebp + 0x38]
push ecx
push eax
lea eax, [ebp - 0xb0]
push eax
mov byte [ebp - 4], 0xd
call fcn.00409dbb
add esp, 0x24
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [edi + 0x54]
mov byte [ebp - 4], 0xe
call fcn.004019f3
push ebx
push 1
lea ecx, [ebp - 0xb0]
call fcn.0040184d
push ebx
push 1
lea ecx, [ebp - 0x3c]
call fcn.0040184d
push ebx
push 1
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 3
call fcn.0040184d
lea eax, [ebp + 0x38]
push eax
lea ecx, [edi + 0x38]
call fcn.00401829
push 0xffffffffffffffff
push ebx
lea eax, [ebp]
lea esi, [edi + 0x1c]
push eax
mov ecx, esi
call fcn.004019f3
push ebx
push str..msi
mov ecx, esi
mov dword [edi + 0xa8], ebx
call fcn.0040377d
cmp eax, 0xffffffff
je 0x497ff3
mov dword [edi + 0xa8], 1
cmp dword [edi + 0xa8], ebx
je 0x49808d
call fcn.0047ace6
test eax, eax
je 0x49808d
lea eax, [ebp - 0x20]
push eax
push ebx
push edi
push 0x4979b3
push ebx
push ebx
mov dword [ebp - 0x20], ebx
call fcn.0049ab60
add esp, 0x18
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
je 0x498069
cmp eax, ebx
je 0x498069
mov esi, 0x1f4
push esi
mov byte [ebp - 0xd], 1
push eax
jmp 0x498057
cmp eax, 0x80
je 0x498061
mov ecx, dword [ebp - 0x1c]
call fcn.00494fb6
test al, al
je 0x498053
mov byte [edi], 1
push esi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, ebx
jne 0x49803d
push dword [ebp - 0x14]
jmp 0x498179
cmp dword [ebp + 0x674], 8
mov eax, dword [ebp + 0x660]
mov byte [ebp - 0xd], 1
jae 0x498082
lea eax, [ebp + 0x660]
push eax
push 0x5236dc
jmp 0x498195
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x38
lea eax, [ebp - 0x90]
push ebx
push eax
call fcn.0049d740
add esp, 0xc
cmp dword [esi + 0x18], 8
mov dword [ebp - 0x94], 0x3c
mov dword [ebp - 0x8c], ebx
mov dword [ebp - 0x88], str.open
jb 0x4980ca
mov eax, dword [esi + 4]
jmp 0x4980cd
lea eax, [esi + 4]
cmp dword [edi + 0x50], 8
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x90], 0x8040
jb 0x4980e8
mov eax, dword [edi + 0x3c]
jmp 0x4980eb
lea eax, [edi + 0x3c]
cmp eax, ebx
ja 0x4980f4
mov dword [ebp - 0x80], ebx
jmp 0x498105
cmp dword [edi + 0x50], 8
jb 0x4980ff
mov eax, dword [edi + 0x3c]
jmp 0x498102
lea eax, [edi + 0x3c]
mov dword [ebp - 0x80], eax
xor eax, eax
cmp dword [edi + 0xa8], ebx
setne al
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov byte [ebp - 0xd], 1
cmp eax, ebx
je 0x498181
cmp dword [esi + 0x18], 8
jb 0x498133
mov esi, dword [esi + 4]
jmp 0x498136
add esi, 4
push esi
push 0x5236c8
push 3
call fcn.00409c47
push eax
call fcn.00474128
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add esp, 0x10
mov esi, 0x1f4
jmp 0x49816c
cmp eax, 0x80
je 0x498176
mov ecx, dword [ebp - 0x1c]
call fcn.00494fb6
test al, al
jne 0x498176
push esi
push dword [ebp - 0x5c]
call edi
cmp eax, ebx
jne 0x498159
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4981a5
cmp dword [esi + 0x18], 8
jb 0x49818c
mov esi, dword [esi + 4]
jmp 0x49818f
add esi, 4
push esi
push 0x5236b4
push 3
call fcn.00409c47
push eax
call fcn.00474128
add esp, 0x10
push ebx
push 1
lea ecx, [ebp]
mov byte [ebp - 4], 2
call fcn.0040184d
xor esi, esi
inc esi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp + 0x674], 8
mov eax, dword [ebp + 0x660]
jae 0x4981d5
lea eax, [ebp + 0x660]
push eax
push 0x5236a4
push 3
call fcn.00409c47
push eax
call fcn.00474128
mov al, byte [ebp - 0xd]
add esp, 0x10
mov byte [ebp - 0xd], al
jmp 0x497ecd