Function at 0x10021703
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, 0x1004ce61
call fcn.10035ccc
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.10035820
xor eax, eax
push esi
mov word [ebp + 0x1c], ax
lea eax, [ebp + 0x1e]
push ebx
push eax
call fcn.10035820
add esp, 0x18
lea eax, [ebp]
push eax
mov ecx, edi
call fcn.10021658
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.1001fd02
pop ecx
mov eax, dword [0x1005f270]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov byte [ebp - 4], 1
cmp eax, ebx
je 0x100217a7
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 0x100217b0
sub eax, edx
sar eax, 1
jne 0x100217e2
push 0x104
lea eax, [ebp + 0x224]
push eax
push ebx
call esi
test eax, eax
jne 0x100217e2
xor esi, esi
mov dword [ebp - 0x14], 0x80004005
inc esi
jmp 0x10021908
lea eax, [ebp + 0x224]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
cmp dword [ebp + 0x18], 8
mov eax, dword [ebp + 4]
jae 0x100217fb
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 0x100217d3
lea eax, [ebp]
push eax
lea eax, [ebp - 0x48]
push str.drivers_
push eax
call fcn.10013312
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x10021850
mov eax, dword [eax + 4]
jmp 0x10021853
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.10002a1b
lea eax, [ebp + 0x1c]
push eax
call edi
cmp dword [ebp - 0x18], ebx
je 0x100218fd
cmp eax, ebx
je 0x1002195a
lea eax, [ebp + 0x224]
push eax
lea ecx, [ebp - 0x48]
call fcn.10002683
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.100289db
add esp, 0xc
push ebx
push esi
lea ecx, [ebp - 0x48]
mov byte [ebp - 0xd], al
mov byte [ebp - 4], 1
call fcn.10002a1b
cmp byte [ebp - 0xd], bl
je 0x10021908
lea eax, [ebp + 0x1c]
push eax
lea ecx, [ebp - 0x48]
call fcn.10002683
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.100289db
add esp, 0xc
test al, al
je 0x10021944
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x1c]
ja 0x10021944
jne 0x100218f8
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x20]
ja 0x10021944
mov byte [ebp - 0xd], bl
jmp 0x10021948
cmp eax, ebx
jne 0x10021908
mov dword [ebp - 0x14], 0x80004002
push dword [ebp - 0x2c]
mov byte [ebp - 4], bl
call fcn.1001fd27
pop ecx
push ebx
push esi
lea ecx, [ebp]
call fcn.10002a1b
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.10032bd7
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.10002a1b
cmp byte [ebp - 0xd], bl
je 0x10021908
push ebx
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp + 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
jmp 0x10021908