Function at 0x41ff27
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 0x420037
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 0x41ff76
push 0x5c
push ebx
push edi
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
test eax, eax
je 0x41ff63
lea edi, [eax + 2]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 4
jge 0x41ff72
push 4
pop eax
lea ebx, [edi + eax*2 - 8]
cmp dword [esi + 8], 0
jne 0x41ffcc
push 0x4a7bd8
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
neg eax
sbb eax, eax
inc eax
mov dword [ebp + 8], eax
je 0x41ffac
cmp word [esi + 0x2e], 0
jle 0x41ffa5
mov ebx, dword [esi + 0xc]
mov dword [ebp + 8], 2
jmp 0x41ffcc
mov ebx, str._SystemRoot_INF_
jmp 0x41ffcc
cmp dword [esi + 0x28], 0
je 0x42002f
push str..SYS
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
mov ebx, str._SystemRoot_SYSTEM32DRIVERS_
je 0x41ffcc
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 0x420005
push 0x5c
lea eax, [esi + ebx*2]
push 0x23
push eax
call fcn.0040e404
add esp, 0xc
push esi
call fcn.00412a30
cmp dword [ebp + 8], 0
pop ecx
je 0x420019
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
call fcn.0048f058
pop ecx
xor ecx, ecx
test eax, eax
setne cl
inc ecx
mov eax, ecx
jmp 0x420225
push 2
pop eax
jmp 0x420225
cmp dword [ebp + 8], 0x13
jne 0x420223
cmp byte [esi + 0x30], 0
jne 0x420223
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 0x4201ff
push 0x4a7bd8
lea eax, [edi + eax*2 - 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x4201ff
mov eax, dword [esi + 0x14]
test eax, eax
je 0x420099
push edi
push eax
mov ecx, esi
call fcn.0040fb43
test al, al
je 0x4201e6
push 0
push edi
push esi
call fcn.0041f83c
add esp, 0xc
test eax, eax
mov dword [ebp - 4], eax
je 0x4201e6
cmp word [esi + 0x2e], 0
jle 0x42012d
push 0x514
lea ecx, [ebp + 8]
call fcn.0043d3ea
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.0040e404
push dword [ebp + 8]
call fcn.00412a30
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.0040e54b
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 0x420173
mov eax, dword [ebp - 4]
cmp dword [edi], eax
ja 0x4201cc
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 0x42015b
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 0x42018f
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 0x4201ad
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp + 0xc]
add eax, eax
add dword [esi + 0x18], eax
jmp 0x420202
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.00412515
add esp, 0xc
jmp 0x42017b
cmp dword [esi + 0x28], 1
je 0x42021b
cmp dword [esi + 8], 0
jne 0x42021b
and dword [esi + 0x28], 0
push edi
call fcn.0040e54b
pop ecx
jmp 0x42021b
inc dword [esi + 0x28]
cmp dword [esi + 8], 0
jne 0x42021b
push edi
push 0x4a7d10
push 0x4bdfa0
call fcn.0040f209
add esp, 0xc
lea ecx, [ebp + 8]
call fcn.00437884
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8