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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
cmp dword [ebp + 8], 0x11
push ebx
push esi
push edi
mov ebx, ecx
jne 0x41f9e5
mov eax, dword [ebp + 0xc]
mov esi, dword [eax]
and dword [ebp + 0xc], 0
lea ecx, [eax + 0x12]
mov eax, dword [ebx + 0xa0]
test eax, eax
mov dword [ebp - 8], ecx
mov dword [ebp - 4], esi
mov dword [ebp + 8], eax
jne 0x41f8d9
push 0x5c
push eax
push esi
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
test eax, eax
je 0x41f8c3
add eax, 2
mov dword [ebp - 4], eax
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
cmp eax, 4
jge 0x41f8d2
push 4
pop eax
lea eax, [esi + eax*2 - 8]
mov dword [ebp + 8], eax
cmp dword [ebx + 0xa0], 0
push 9
pop ecx
push 0xf
mov esi, str._SystemRoot_INF_
lea edi, [ebp - 0x34]
rep movsd dword es:[edi], dword [esi]
pop ecx
mov esi, str._SystemRoot_SYSTEM32DRIVERS_
lea edi, [ebp - 0xa4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0xb
pop ecx
mov esi, str._SystemRoot_SYSTEM32_
lea edi, [ebp - 0x64]
rep movsd dword es:[edi], dword [esi]
push 2
movsw word es:[edi], word [esi]
pop esi
jne 0x41f944
push 0x4c4c2c
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
mov edi, eax
neg edi
sbb edi, edi
inc edi
je 0x41f9b1
cmp word [ebx + 0xce], 0
jle 0x41f9ac
mov eax, dword [ebx + 0xa4]
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], esi
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp - 8]
push 0x104
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
push ebx
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
push dword [ebp - 4]
mov dword [ebp + 8], eax
push ebx
call dword [sym.imp.KERNEL32.DLL_lstrcatW]
cmp edi, esi
je 0x41f984
mov eax, dword [ebp + 8]
push 0x5c
lea eax, [ebx + eax*2]
push 0x23
push eax
call fcn.0040ffc0
add esp, 0xc
push ebx
call fcn.00414cb6
test edi, edi
pop ecx
je 0x41f996
push ebx
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
push ebx
call fcn.004ad289
pop ecx
xor ecx, ecx
test eax, eax
setne cl
inc ecx
mov eax, ecx
jmp 0x41fc10
lea eax, [ebp - 0x34]
jmp 0x41f9d5
cmp dword [ebx + 0xc8], 0
je 0x41f9dd
push str..SYS
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
test eax, eax
lea eax, [ebp - 0xa4]
je 0x41f9d5
lea eax, [ebp - 0x64]
mov dword [ebp + 8], eax
jmp 0x41f947
push 2
pop eax
jmp 0x41fc10
cmp dword [ebp + 8], 0x13
jne 0x41fc0e
cmp byte [ebx + 0xd0], 0
jne 0x41fc0e
mov eax, dword [ebp + 0xc]
mov esi, dword [eax]
xor edi, edi
push esi
mov dword [ebp + 8], edi
mov dword [ebp + 0xc], esi
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
cmp eax, 4
jle 0x41fbe5
push 0x4c4c2c
lea eax, [esi + eax*2 - 8]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
test eax, eax
jne 0x41fbe5
mov eax, dword [ebx + 0xb0]
cmp eax, edi
je 0x41fa4c
push esi
push eax
mov ecx, ebx
call fcn.00411b09
test al, al
je 0x41fbc7
push edi
push esi
push ebx
call fcn.0041ef5f
add esp, 0xc
cmp eax, edi
mov dword [ebp - 4], eax
je 0x41fbc7
cmp word [ebx + 0xce], di
jle 0x41faf4
push 0x514
lea ecx, [ebp + 8]
call fcn.00444e77
push 9
pop ecx
push 0x104
push dword [ebp + 8]
lea eax, [ebp - 0x34]
mov esi, str._SystemRoot_INF_
lea edi, [ebp - 0x34]
push eax
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov edi, dword [ebp + 0xc]
lea esi, [eax + eax]
movsx eax, word [ebx + 0xce]
lea eax, [edi + eax*2]
push eax
mov eax, dword [ebp + 8]
add eax, esi
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatW]
mov eax, dword [ebp + 8]
push 0x5c
add esi, eax
push 0x23
push esi
call fcn.0040ffc0
push dword [ebp + 8]
call fcn.00414cb6
add esp, 0x10
push 0
push dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
push edi
call fcn.00410107
mov eax, dword [ebp + 8]
pop ecx
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 4]
push dword [ebp + 0xc]
mov esi, dword [ebx + 0xbc]
mov edi, dword [ebx + 0xb8]
mov dword [ebx + 0xc8], 1
movzx eax, word [eax - 4]
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
lea eax, [eax + ecx + 6]
mov dword [ebp - 8], eax
jmp 0x41fb4c
mov eax, dword [ebp - 4]
cmp dword [esi], eax
ja 0x41fb56
add esi, 4
push esi
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
lea esi, [esi + eax*2 + 2]
push esi
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp esi, dword [ebx + 0xb8]
jb 0x41fb2c
jmp 0x41fb71
mov eax, dword [ebx + 0xb8]
sub eax, esi
push eax
mov eax, dword [ebp - 8]
lea eax, [esi + eax*2]
push esi
push eax
mov edi, esi
call fcn.004143bf
add esp, 0xc
mov eax, dword [ebp - 4]
mov cx, word [ebp - 0xc]
mov dword [edi], eax
add edi, 4
push 2
pop esi
mov word [edi], cx
add edi, esi
mov cx, word [eax]
mov word [edi], cx
mov cx, word [eax]
add edi, esi
add eax, esi
test cx, cx
jne 0x41fb85
mov cx, word [ebp - 0x10]
mov eax, dword [ebp + 0xc]
mov word [edi], cx
add edi, esi
mov cx, word [eax]
mov word [edi], cx
mov cx, word [eax]
add edi, esi
add eax, esi
test cx, cx
jne 0x41fba3
mov eax, dword [ebp - 8]
mov esi, dword [ebp + 0xc]
add eax, eax
add dword [ebx + 0xb8], eax
xor edi, edi
jmp 0x41fbeb
lea eax, [ebx + 0xc8]
cmp dword [eax], 1
je 0x41fc06
cmp dword [ebx + 0xa0], edi
jne 0x41fc06
push esi
mov dword [eax], edi
call fcn.00410107
pop ecx
jmp 0x41fc06
inc dword [ebx + 0xc8]
cmp dword [ebx + 0xa0], edi
jne 0x41fc06
push esi
push 0x4c4d64
push 0x4dc0f8
call fcn.00411099
add esp, 0xc
lea ecx, [ebp + 8]
call fcn.0043e679
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8