Function at 0x408328
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.00407dd6
test eax, eax
je 0x408348
xor eax, eax
inc eax
jmp 0x40877b
push esi
push edi
call fcn.00406ec3
mov esi, 0x4122f8
test eax, eax
jne 0x40846b
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x180]
push eax
push ebx
push ebx
push 0x410264
call fcn.004073ff
add esp, 0x14
test eax, eax
jle 0x408464
cmp byte [ebp - 0x180], bl
je 0x408464
cmp byte [ebp - 0x38], bl
je 0x408464
lea eax, [ebp - 0x180]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40839c
sub eax, edx
lea eax, [ebp + eax - 0x181]
cmp byte [eax], 0x5c
jne 0x4083b3
mov byte [eax], bl
cmp byte [0x412159], 0x60
jb 0x408450
push 4
pop edi
lea eax, [ebp - 8]
push eax
push 0x103
push ebx
push 0xc8
push 0xe4
push 0x35
push 0x410710
push esi
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], edi
call fcn.00402544
add esp, 0x14
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x408450
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 0x40842d
cmp dword [ebp - 0x18], edi
jne 0x40842d
cmp dword [ebp - 0xc], edi
jne 0x40842d
cmp dword [ebp - 4], ebx
je 0x408447
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.0040ee2a
add esp, 0xc
jmp 0x4085c2
xor eax, eax
jmp 0x408779
mov dword [ebp - 4], ebx
cmp dword [0x412c3c], ebx
je 0x4085c2
cmp dword [0x412c38], ebx
je 0x4085c2
lea eax, [ebp - 8]
push eax
push 0x101
push ebx
push 0xc8
push 0xe4
push 0x2e
push 0x4106ac
push esi
call fcn.00402544
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
add esp, 0x14
push eax
push reloc.WS2_32.dll_accept
call edi
test eax, eax
jne 0x408543
lea eax, [ebp - 0xc]
push eax
push ebx
lea eax, [ebp - 0x18]
push eax
push ebx
push dword [0x412c38]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x408521
cmp dword [ebp - 0x18], 1
jne 0x408521
cmp dword [ebp - 0xc], ebx
jbe 0x408521
push dword [ebp - 0xc]
call fcn.0040ebcc
pop ecx
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x408521
lea ecx, [ebp - 0xc]
push ecx
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push dword [0x412c38]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x408521
push dword [ebp - 4]
call fcn.0040ec2e
pop ecx
mov dword [ebp - 4], ebx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 4], ebx
je 0x408543
push dword [0x412c3c]
push dword [ebp - 4]
call fcn.0040eed1
pop ecx
pop ecx
test eax, eax
je 0x4085a5
lea eax, [ebp - 8]
push eax
push 0x103
push ebx
push 0xc8
push 0xe4
push 0x2e
push 0x4106ac
push esi
call fcn.00402544
add esp, 0x14
push eax
push reloc.WS2_32.dll_accept
call edi
test eax, eax
jne 0x4085a5
mov edi, dword [0x412c3c]
mov eax, edi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x40857e
sub eax, ecx
inc eax
push eax
push edi
push 1
push ebx
push dword [0x412c38]
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.0040ee2a
add esp, 0xc
cmp dword [ebp - 4], ebx
je 0x4085c2
push dword [ebp - 4]
call fcn.0040ec2e
pop ecx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
cmp byte [0x4121a8], bl
je 0x408615
push ebx
lea eax, [ebp - 0x10]
push eax
push 0x4121a8
call fcn.0040675c
add esp, 0xc
mov dword [ebp - 4], eax
cmp byte [0x4121a8], bl
je 0x408615
cmp eax, ebx
je 0x408615
mov eax, dword [ebp - 0x10]
cmp eax, dword [0x4121a4]
jne 0x408615
push ebx
push eax
push dword [ebp - 4]
call fcn.004024c2
add esp, 0xc
cmp dword [0x4122d4], eax
je 0x408768
mov edi, 0x412cd8
cmp byte [0x412cd8], bl
jne 0x4086a7
push edi
push 0x12c
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push edi
call fcn.00408274
pop ecx
mov dword [ebp - 0x14], eax
call fcn.0040eca5
and eax, 3
add eax, 5
mov dword [ebp - 0x10], eax
cmp eax, ebx
jle 0x408671
call fcn.0040eca5
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 + 0x412cd8], dl
cmp dword [ebp - 0x10], ebx
jg 0x40864e
push 0xc8
push 0xe4
push 5
push 0x410694
push esi
call fcn.00402544
push eax
mov eax, dword [ebp - 0x14]
lea eax, [eax + 0x412cd8]
push eax
call fcn.0040ef00
push 0x100
push ebx
push esi
call fcn.0040ee2a
add esp, 0x28
push edi
call fcn.00406ba7
pop ecx
test eax, eax
je 0x408762
call fcn.00407e2f
test eax, eax
jne 0x40875b
push 0x44
pop esi
push esi
lea eax, [ebp - 0x7c]
push ebx
push eax
call fcn.0040ee2a
push 0x10
lea eax, [ebp - 0x28]
push ebx
push eax
mov dword [ebp - 0x7c], esi
call fcn.0040ee2a
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.00407fcf
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 0x40874f
push dword [ebp - 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x28]
call esi
jmp 0x408768
call fcn.00407ee6
push ebx
call fcn.00407ead
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov byte [0x412cd8], bl
cmp dword [ebp - 4], ebx
je 0x408776
push dword [ebp - 4]
call fcn.0040ec2e
pop ecx
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret