Function at 0x40327f
Capabilities:
Create directory
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
push ebx
xor ebx, ebx
test byte [0x409854], 1
push esi
push edi
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ebx
je 0x4032a3
mov dword [ebp - 0x10], 0x100
mov eax, dword [ebp + 0x14]
cmp eax, 8
jbe 0x40360d
add eax, 0x41
cmp eax, 0x104
jae 0x40360d
push 0x5f
push dword [ebp + 0xc]
call dword [sym.imp.SHLWAPI.dll_StrChrA]
test eax, eax
jne 0x40360d
push dword [ebp + 0xc]
lea eax, [ebp - 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x40a06c
lea eax, [ebp - 0x148]
push eax
call edi
push 0x40a097
lea eax, [ebp - 0x148]
push eax
call edi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x148]
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40360d
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0xc]
push eax
push ebx
lea eax, [ebp - 0x18]
push eax
push ebx
mov esi, 0x40a0b4
push esi
push dword [ebp - 0x14]
call edi
cmp dword [ebp - 0xc], ebx
je 0x4035fd
push dword [0x409db4]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0xc]
lea eax, [ecx + eax*2 + 0x24]
push eax
push ebx
push dword [0x409808]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp + 0xc], eax
cmp eax, ebx
je 0x4035fd
lea ecx, [ebp - 0xc]
push ecx
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push esi
push dword [ebp - 0x14]
call edi
test eax, eax
jne 0x4035eb
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp + 0xc]
mov esi, dword [sym.imp.SHLWAPI.dll_PathCombineW]
shr eax, 1
xor ecx, ecx
mov word [edi + eax*2], cx
push dword [0x409db8]
push edi
push edi
call esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push dword [0x409db4]
push edi
push edi
call esi
push dword [0x409860]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4035e4
mov edi, dword [ebp + 0x1c]
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x4033e0
push eax
push dword [ebp + 0xc]
call fcn.00402f43
jmp 0x4033ea
push dword [ebp + 0xc]
xor eax, eax
call fcn.004029a6
mov dword [ebp + 0x1c], eax
cmp eax, ebx
je 0x4035db
mov eax, dword [ebp + 0x14]
push 0x40a0af
lea eax, [ebp + eax - 0x11e]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp - 0x10]
or eax, 0xf003f
lea ecx, [ebp - 4]
push ecx
push eax
mov dword [ebp - 0x10], eax
push ebx
lea eax, [ebp - 0x148]
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403468
push dword [ebp + 0x1c]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 0x1c]
push 1
push ebx
push dword [0x409db0]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 4]
mov dword [ebp - 8], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], ebx
jne 0x4035c9
lea esi, [edi + 0x18]
cmp dword [esi], ebx
jne 0x403484
lea eax, [edi + 0x1c]
push eax
push esi
call fcn.00402dfa
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x4035c9
push dword [edi + 0x1c]
push dword [esi]
push dword [ebp + 0xc]
call fcn.00402e45
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x40356c
cmp dword [edi], ebx
jne 0x4034ac
push dword [ebp + 0x1c]
xor eax, eax
call fcn.004029a6
mov dword [edi], eax
push dword [0x409da8]
mov eax, dword [ebp + 0x14]
lea eax, [ebp + eax - 0x147]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x148]
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x4035c9
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push 0x40a21a
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x403520
cmp dword [ebp - 0xc], 0x28
jne 0x403520
push 0x28
lea eax, [ebp - 0x40]
push eax
push 3
push ebx
push 0x40a21a
push dword [ebp - 4]
mov dword [ebp - 0x40], ebx
call esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [ebp + 0xc]
push ebx
push dword [0x409868]
lea eax, [eax + eax + 2]
mov dword [ebp - 0xc], eax
call fcn.00404cb2
push dword [ebp - 0xc]
push dword [ebp + 0xc]
push 3
push ebx
push 0x40a212
push dword [ebp - 4]
call esi
mov eax, dword [edi + 0x10]
cmp eax, ebx
je 0x4035bb
push eax
push dword [edi + 8]
push 3
push ebx
push 0x40a2a3
push dword [ebp - 4]
call esi
jmp 0x4035bb
cmp eax, 0x20
je 0x4035c6
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x10]
lea eax, [ebp - 0x148]
push ebx
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4035c9
mov esi, dword [0x409db0]
lea eax, [ebp + 8]
push eax
push ebx
push dword [ebp - 4]
mov dword [ebp + 8], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x4035bb
push esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4035c9
mov dword [ebp - 8], ebx
push dword [ebp + 0x1c]
push ebx
push dword [0x409808]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4035eb
mov dword [ebp - 8], 8
jmp 0x4035eb
mov dword [ebp - 8], 0xb7
push dword [ebp + 0xc]
push ebx
push dword [0x409808]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x403604
mov dword [ebp - 8], 8
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 0x18]
inc dword [eax]
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0x18