Function at 0x420412
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 0x420522
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 0x420461
push 0x5c
push ebx
push edi
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
test eax, eax
je 0x42044e
lea edi, [eax + 2]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 4
jge 0x42045d
push 4
pop eax
lea ebx, [edi + eax*2 - 8]
cmp dword [esi + 8], 0
jne 0x4204b7
push 0x4aaaf8
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
neg eax
sbb eax, eax
inc eax
mov dword [ebp + 8], eax
je 0x420497
cmp word [esi + 0x2e], 0
jle 0x420490
mov ebx, dword [esi + 0xc]
mov dword [ebp + 8], 2
jmp 0x4204b7
mov ebx, str._SystemRoot_INF_
jmp 0x4204b7
cmp dword [esi + 0x28], 0
je 0x42051a
push str..SYS
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
mov ebx, str._SystemRoot_SYSTEM32DRIVERS_
je 0x4204b7
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 0x4204f0
push 0x5c
lea eax, [esi + ebx*2]
push 0x23
push eax
call fcn.0040e8f8
add esp, 0xc
push esi
call fcn.00412d86
cmp dword [ebp + 8], 0
pop ecx
je 0x420504
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
call fcn.00492742
pop ecx
xor ecx, ecx
test eax, eax
setne cl
inc ecx
mov eax, ecx
jmp 0x420710
push 2
pop eax
jmp 0x420710
cmp dword [ebp + 8], 0x13
jne 0x42070e
cmp byte [esi + 0x30], 0
jne 0x42070e
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 0x4206ea
push 0x4aaaf8
lea eax, [edi + eax*2 - 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x4206ea
mov eax, dword [esi + 0x14]
test eax, eax
je 0x420584
push edi
push eax
mov ecx, esi
call fcn.00410048
test al, al
je 0x4206d1
push 0
push edi
push esi
call fcn.0041fd20
add esp, 0xc
test eax, eax
mov dword [ebp - 4], eax
je 0x4206d1
cmp word [esi + 0x2e], 0
jle 0x420618
push 0x514
lea ecx, [ebp + 8]
call fcn.0043ddc3
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.0040e8f8
push dword [ebp + 8]
call fcn.00412d86
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.0040ea3f
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 0x42065e
mov eax, dword [ebp - 4]
cmp dword [edi], eax
ja 0x4206b7
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 0x420646
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 0x42067a
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 0x420698
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp + 0xc]
add eax, eax
add dword [esi + 0x18], eax
jmp 0x4206ed
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.0041286c
add esp, 0xc
jmp 0x420666
cmp dword [esi + 0x28], 1
je 0x420706
cmp dword [esi + 8], 0
jne 0x420706
and dword [esi + 0x28], 0
push edi
call fcn.0040ea3f
pop ecx
jmp 0x420706
inc dword [esi + 0x28]
cmp dword [esi + 8], 0
jne 0x420706
push edi
push 0x4aac30
push 0x4c0fb8
call fcn.0040f70e
add esp, 0xc
lea ecx, [ebp + 8]
call fcn.00437e1a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8