Function at 0x100215b3
Capabilities:
Check if file exists
Copy file
Get common file path

Disassembly:
push ebp
sub esp, 0x42c
lea ebp, [esp - 4]
mov eax, dword [0x1005ce10]
xor eax, ebp
mov dword [ebp + 0x42c], eax
push 0x3c
mov eax, 0x1004ccd1
call fcn.10035b2c
mov edi, ecx
xor ebx, ebx
xor eax, eax
mov esi, 0x206
mov dword [ebp - 0x18], ebx
push esi
mov word [ebp + 0x224], ax
lea eax, [ebp + 0x226]
push ebx
push eax
mov dword [ebp - 0x14], ebx
call fcn.10035680
xor eax, eax
push esi
mov word [ebp + 0x1c], ax
lea eax, [ebp + 0x1e]
push ebx
push eax
call fcn.10035680
add esp, 0x18
lea eax, [ebp]
push eax
mov ecx, edi
call fcn.10021508
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
call fcn.1001fbb2
pop ecx
mov eax, dword [0x1005f270]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov byte [ebp - 4], 1
cmp eax, ebx
je 0x10021657
push 0x104
lea ecx, [ebp + 0x224]
push ecx
push eax
call esi
lea eax, [ebp + 0x224]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x10021660
sub eax, edx
sar eax, 1
jne 0x10021692
push 0x104
lea eax, [ebp + 0x224]
push eax
push ebx
call esi
test eax, eax
jne 0x10021692
xor esi, esi
mov dword [ebp - 0x14], 0x80004005
inc esi
jmp 0x100217b8
lea eax, [ebp + 0x224]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
cmp dword [ebp + 0x18], 8
mov eax, dword [ebp + 4]
jae 0x100216ab
lea eax, [ebp + 4]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push eax
lea eax, [ebp + 0x224]
push eax
call esi
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp + 0x224]
push eax
call edi
mov dword [ebp - 0x18], eax
push 0x104
lea eax, [ebp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x10021683
lea eax, [ebp]
push eax
lea eax, [ebp - 0x48]
push str.drivers_
push eax
call fcn.1001317c
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x10021700
mov eax, dword [eax + 4]
jmp 0x10021703
add eax, 4
push eax
lea eax, [ebp + 0x1c]
push eax
call esi
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp - 0x48]
call fcn.100029d6
lea eax, [ebp + 0x1c]
push eax
call edi
cmp dword [ebp - 0x18], ebx
je 0x100217ad
cmp eax, ebx
je 0x1002180a
lea eax, [ebp + 0x224]
push eax
lea ecx, [ebp - 0x48]
call fcn.10002648
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x48]
push eax
mov byte [ebp - 4], 2
call fcn.1002886f
add esp, 0xc
push ebx
push esi
lea ecx, [ebp - 0x48]
mov byte [ebp - 0xd], al
mov byte [ebp - 4], 1
call fcn.100029d6
cmp byte [ebp - 0xd], bl
je 0x100217b8
lea eax, [ebp + 0x1c]
push eax
lea ecx, [ebp - 0x48]
call fcn.10002648
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x48]
push eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x18], esi
call fcn.1002886f
add esp, 0xc
test al, al
je 0x100217f4
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x1c]
ja 0x100217f4
jne 0x100217a8
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x20]
ja 0x100217f4
mov byte [ebp - 0xd], bl
jmp 0x100217f8
cmp eax, ebx
jne 0x100217b8
mov dword [ebp - 0x14], 0x80004002
push dword [ebp - 0x2c]
mov byte [ebp - 4], bl
call fcn.1001fbd7
pop ecx
push ebx
push esi
lea ecx, [ebp]
call fcn.100029d6
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x42c]
xor ecx, ebp
call fcn.10032a69
add ebp, 0x430
leave
ret
mov byte [ebp - 0xd], 1
push ebx
push esi
lea ecx, [ebp - 0x48]
mov dword [ebp - 4], esi
call fcn.100029d6
cmp byte [ebp - 0xd], bl
je 0x100217b8
push ebx
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp + 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
jmp 0x100217b8