Function at 0x402ffa
Capabilities:
Create directory
Create process on windows
Delete file
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6d0
push ebx
push esi
push edi
mov esi, ecx
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x2af]
mov byte [ebp - 0x2b0], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x10
xor eax, eax
pop ecx
lea edi, [ebp - 0xa4]
mov dword [ebp - 0xa8], ebx
push 0x40
rep stosd dword es:[edi], eax
lea edi, [esi + 4]
lea eax, [ebp - 0x64]
push edi
push eax
mov dword [ebp - 8], esi
mov dword [ebp - 4], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x24], esi
call fcn.00404f80
add esp, 0xc
add esi, 0x4c
push 0x4071d8
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push ebx
push edi
call fcn.004052f0
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
jne 0x40332b
mov esi, dword [ebp - 8]
cmp byte [esi + 0x22d], bl
jne 0x4032f9
lea eax, [ebp - 4]
push 0x1be
push eax
push 0x407164
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0xa8], 0x44
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
push eax
mov ecx, esi
call fcn.0040443f
lea eax, [ebp - 0xc]
push 0x1bf
push eax
lea eax, [ebp - 0x1ac]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push eax
push ebx
mov esi, 0x407154
push ebx
push esi
push dword [ebp - 4]
mov dword [ebp - 0xc], 0x104
call edi
mov ecx, dword [ebp - 8]
push eax
call fcn.0040443f
cmp byte [ebp - 0x1ac], bl
jne 0x403155
lea eax, [ebp - 0xc]
push 0x1c3
push eax
lea eax, [ebp - 0x1ac]
push eax
push ebx
push ebx
push 0x407310
push dword [ebp - 4]
mov dword [ebp - 0xc], 0x104
call edi
mov ecx, dword [ebp - 8]
push eax
call fcn.0040443f
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x1ac]
push 0x407300
push eax
call edi
mov eax, dword [ebp - 4]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x1ac]
push eax
push 1
push ebx
push esi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x40315b
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x1ac]
push 0x4072dc
push eax
call edi
cmp byte [ebp - 0x1ac], bl
lea esi, [ebp - 0x1ac]
je 0x4031d4
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x3b3]
mov byte [ebp - 0x3b4], bl
cmp byte [esi], 0x5c
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
jne 0x4031c1
mov eax, esi
lea ecx, [ebp - 0x1ac]
sub eax, ecx
inc eax
inc eax
push eax
lea eax, [ebp - 0x1ac]
push eax
lea eax, [ebp - 0x3b4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x3b4]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
cmp byte [esi], bl
jne 0x403177
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [ebp - 8]
mov esi, 0x104
push esi
lea ecx, [eax + 0x24c]
lea eax, [ebp - 0x5cc]
push eax
call fcn.00404a3b
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
jne 0x403216
mov eax, dword [ebp - 8]
lea ecx, [eax + 0x24c]
call fcn.00404a3b
push eax
lea eax, [ebp - 0x5cc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], esi
push eax
lea eax, [ebp - 0x2b0]
push eax
lea eax, [ebp - 0x1ac]
push eax
lea eax, [ebp - 0x1ac]
push eax
lea eax, [ebp - 0x5cc]
push eax
push 0x4072d0
push 0x4072c4
push ebx
call sub.VERSION.dll_VerInstallFileA
test al, 1
mov dword [ebp - 0x10], eax
je 0x403281
lea eax, [ebp - 0x1ac]
push eax
lea eax, [ebp - 0x6d0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x2b0]
push eax
lea eax, [ebp - 0x6d0]
push eax
call edi
lea eax, [ebp - 0x6d0]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 0x10], ebx
je 0x40329c
test byte [ebp - 0x10], 0x84
jne 0x40329c
mov ecx, dword [ebp - 8]
push 0x1ea
push dword [ebp - 0x10]
call fcn.0040443f
lea eax, [ebp - 0x4c8]
push 0x4072c0
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x1ac]
push eax
lea eax, [ebp - 0x4c8]
push eax
call edi
lea eax, [ebp - 0x4c8]
push 0x4072a8
push eax
call edi
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0xa8]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x4c8]
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push 0x2710
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x64]
push 0x40
push eax
mov eax, dword [ebp - 0x24]
add eax, 4
push eax
call fcn.00404f80
add esp, 0xc
lea ecx, [ebp - 0x20]
call fcn.00402fd3
cmp dword [ebp - 4], ebx
je 0x403324
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov ecx, dword [ebp - 8]
lea eax, [ecx + 0x574]
push eax
push 0x9009
call fcn.00404466
lea eax, [ebp - 0x64]
push 0x40
push eax
mov eax, dword [ebp - 0x24]
add eax, 4
push eax
call fcn.00404f80
add esp, 0xc
lea ecx, [ebp - 0x20]
call fcn.00402fd3
cmp dword [ebp - 4], ebx
je 0x40336a
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x403326