Function at 0x4217c2
Capabilities:
Copy file
Delete file
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
cmp dword [ebp + 8], 0x11
push ebx
push esi
push edi
mov esi, ecx
jne 0x4218d2
mov eax, dword [ebp + 0xc]
mov ebx, dword [esi + 8]
and dword [ebp + 8], 0
test ebx, ebx
mov edi, dword [eax]
lea ecx, [eax + 0x12]
mov dword [ebp + 0xc], ecx
jne 0x421811
push 0x5c
push ebx
push edi
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
test eax, eax
je 0x4217fe
lea edi, [eax + 2]
push edi
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
cmp eax, 4
jge 0x42180d
push 4
pop eax
lea ebx, [edi + eax*2 - 8]
cmp dword [esi + 8], 0
jne 0x421867
push 0x4b2de8
push ebx
call dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
neg eax
sbb eax, eax
inc eax
mov dword [ebp + 8], eax
je 0x421847
cmp word [esi + 0x2e], 0
jle 0x421840
mov ebx, dword [esi + 0xc]
mov dword [ebp + 8], 2
jmp 0x421867
mov ebx, str._SystemRoot_INF_
jmp 0x421867
cmp dword [esi + 0x28], 0
je 0x4218ca
push str..SYS
push ebx
call dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
test eax, eax
mov ebx, str._SystemRoot_SYSTEM32DRIVERS_
je 0x421867
mov ebx, str._SystemRoot_SYSTEM32_
push 0x104
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
mov esi, dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
push edi
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.DLL_lstrcatW]
cmp dword [ebp + 8], 2
je 0x4218a0
push 0x5c
lea eax, [esi + ebx*2]
push 0x23
push eax
call fcn.0040f079
add esp, 0xc
push esi
call fcn.00413a9b
cmp dword [ebp + 8], 0
pop ecx
je 0x4218b4
push esi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
push esi
call fcn.0049a075
pop ecx
xor ecx, ecx
test eax, eax
setne cl
inc ecx
mov eax, ecx
jmp 0x421ac0
push 2
pop eax
jmp 0x421ac0
cmp dword [ebp + 8], 0x13
jne 0x421abe
cmp byte [esi + 0x30], 0
jne 0x421abe
mov eax, dword [ebp + 0xc]
mov edi, dword [eax]
mov ebx, dword [sym.imp.KERNEL32.DLL_lstrlenW]
and dword [ebp + 8], 0
push edi
mov dword [ebp + 0xc], edi
call ebx
cmp eax, 4
jle 0x421a9a
push 0x4b2de8
lea eax, [edi + eax*2 - 8]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
test eax, eax
jne 0x421a9a
mov eax, dword [esi + 0x14]
test eax, eax
je 0x421934
push edi
push eax
mov ecx, esi
call fcn.00410903
test al, al
je 0x421a81
push 0
push edi
push esi
call fcn.004210b9
add esp, 0xc
test eax, eax
mov dword [ebp - 4], eax
je 0x421a81
cmp word [esi + 0x2e], 0
jle 0x4219c8
push 0x514
lea ecx, [ebp + 8]
call fcn.0043fddf
push 0x104
push dword [ebp + 8]
push str._SystemRoot_INF_
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
push dword [ebp + 8]
call ebx
mov ecx, dword [ebp + 0xc]
lea edi, [eax + eax]
movsx eax, word [esi + 0x2e]
lea eax, [ecx + eax*2]
push eax
mov eax, dword [ebp + 8]
add eax, edi
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatW]
mov eax, dword [ebp + 8]
push 0x5c
add edi, eax
push 0x23
push edi
call fcn.0040f079
push dword [ebp + 8]
call fcn.00413a9b
add esp, 0x10
push 0
push dword [ebp + 8]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
push dword [ebp + 0xc]
call fcn.0040f1c0
mov eax, dword [ebp + 8]
pop ecx
mov dword [ebp + 0xc], eax
mov eax, dword [esi + 0x18]
push dword [ebp + 0xc]
mov edi, dword [esi + 0x1c]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov dword [esi + 0x28], 1
movzx eax, word [eax - 4]
mov dword [ebp - 0xc], eax
call ebx
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
lea eax, [eax + ecx + 6]
mov dword [ebp - 0x10], eax
jmp 0x421a0e
mov eax, dword [ebp - 4]
cmp dword [edi], eax
ja 0x421a67
add edi, 4
push edi
call ebx
lea edi, [edi + eax*2 + 2]
push edi
call ebx
lea edi, [edi + eax*2 + 2]
cmp edi, dword [esi + 0x18]
jb 0x4219f6
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov cx, word [ebp - 0xc]
mov dword [ebx], eax
add ebx, 4
mov word [ebx], cx
push 2
pop ecx
add ebx, ecx
mov dx, word [eax]
mov word [ebx], dx
mov dx, word [eax]
add ebx, ecx
add eax, ecx
test dx, dx
jne 0x421a2a
mov dx, word [ebp - 0x14]
mov eax, dword [ebp + 0xc]
mov word [ebx], dx
add ebx, ecx
mov dx, word [eax]
mov word [ebx], dx
mov dx, word [eax]
add ebx, ecx
add eax, ecx
test dx, dx
jne 0x421a48
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp + 0xc]
add eax, eax
add dword [esi + 0x18], eax
jmp 0x421a9d
mov eax, dword [esi + 0x18]
sub eax, edi
push eax
mov eax, dword [ebp - 0x10]
lea eax, [edi + eax*2]
push edi
push eax
mov ebx, edi
call fcn.004131b9
add esp, 0xc
jmp 0x421a16
cmp dword [esi + 0x28], 1
je 0x421ab6
cmp dword [esi + 8], 0
jne 0x421ab6
and dword [esi + 0x28], 0
push edi
call fcn.0040f1c0
pop ecx
jmp 0x421ab6
inc dword [esi + 0x28]
cmp dword [esi + 8], 0
jne 0x421ab6
push edi
push 0x4b2f20
push 0x4c9048
call fcn.0041009a
add esp, 0xc
lea ecx, [ebp + 8]
call fcn.00439cfd
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8