Function at 0x40be61
Capabilities:
Set registry value

Disassembly:
mov eax, 0x41b5e8
call fcn.0040f840
sub esp, 0x130
push ebx
lea eax, [ebp - 0x38]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [ebp - 0x38]
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp + 0xc], ebx
push 1
pop esi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], esi
je 0x40beb3
push dword [ebp + 0xc]
mov dword [ebp - 0x20], ebx
push str.Block
call fcn.00410320
pop ecx
test eax, eax
pop ecx
jne 0x40beb3
mov dword [ebp - 0x1c], esi
push str.Software
lea ecx, [ebp - 0x14]
call fcn.0040a6d6
push 0x4206bc
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.0040a6d6
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x14]
push eax
mov byte [ebp - 4], 2
call fcn.00409039
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 4], 1
cmp ecx, ebx
je 0x40bef1
call fcn.0040917b
push 0x4206b4
lea ecx, [ebp - 0x18]
call fcn.0040a6d6
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x14]
push eax
mov byte [ebp - 4], 3
call fcn.00409039
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 4], 1
cmp ecx, ebx
je 0x40bf1e
call fcn.0040917b
mov al, byte [0x421aac]
push edi
push 0x40
mov byte [ebp - 0x13c], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x13b]
cmp dword [ebp - 0x20], ebx
rep stosd dword es:[edi], eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
stosw word es:[edi], ax
stosb byte es:[edi], al
jne 0x40bf4e
cmp dword [ebp - 0x1c], ebx
jne 0x40c1e8
mov ecx, dword [ebp - 0x14]
cmp ecx, ebx
je 0x40bf5c
call fcn.004091a8
jmp 0x40bf5e
xor eax, eax
lea ecx, [ebp - 0x10]
push ecx
push 2
push ebx
push eax
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x40c1da
cmp dword [ebp + 0xc], ebx
lea eax, [ebp - 0x13c]
push 0xa
push eax
je 0x40bfb1
push dword [ebp + 8]
call fcn.004107c2
lea eax, [ebp - 0x13c]
push eax
call fcn.0040f8c0
add esp, 0x10
push eax
lea eax, [ebp - 0x13c]
push eax
push 1
push ebx
push dword [ebp + 0xc]
jmp 0x40c1cc
push dword [0x421b80]
call fcn.004107c2
lea eax, [ebp - 0x13c]
push eax
call fcn.0040f8c0
add esp, 0x10
push eax
lea eax, [ebp - 0x13c]
push eax
push 1
pop edi
push edi
push ebx
push 0x420650
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x13c]
push 0xa
push eax
push dword [0x421ba0]
call fcn.004107c2
lea eax, [ebp - 0x13c]
push eax
call fcn.0040f8c0
add esp, 0x10
push eax
lea eax, [ebp - 0x13c]
push eax
push edi
push ebx
push 0x42064c
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x13c]
push 0xa
push eax
push dword [0x420914]
call fcn.004107c2
lea eax, [ebp - 0x13c]
push eax
call fcn.0040f8c0
add esp, 0x10
push eax
lea eax, [ebp - 0x13c]
push eax
push edi
push ebx
push 0x42065c
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x13c]
push 0xa
push eax
push dword [0x421b8c]
call fcn.004107c2
lea eax, [ebp - 0x13c]
push eax
call fcn.0040f8c0
add esp, 0x10
push eax
lea eax, [ebp - 0x13c]
push eax
push edi
push ebx
push 0x420998
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x13c]
push 0xa
push eax
push dword [0x421b90]
call fcn.004107c2
lea eax, [ebp - 0x13c]
push eax
call fcn.0040f8c0
add esp, 0x10
push eax
lea eax, [ebp - 0x13c]
push eax
push edi
push ebx
push 0x420994
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x13c]
push 0xa
push eax
push dword [0x421b94]
call fcn.004107c2
lea eax, [ebp - 0x13c]
push eax
call fcn.0040f8c0
add esp, 0x10
push eax
lea eax, [ebp - 0x13c]
push eax
push edi
push ebx
push 0x420990
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x13c]
push 0xa
push eax
push dword [0x421b98]
call fcn.004107c2
lea eax, [ebp - 0x13c]
push eax
call fcn.0040f8c0
add esp, 0x10
push eax
lea eax, [ebp - 0x13c]
push eax
push edi
push ebx
push 0x42098c
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x13c]
push 0xa
push eax
push dword [0x421b9c]
call fcn.004107c2
lea eax, [ebp - 0x13c]
push eax
call fcn.0040f8c0
add esp, 0x10
push eax
lea eax, [ebp - 0x13c]
push eax
push edi
push ebx
push 0x420988
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x13c]
push 0xa
push eax
push dword [0x421b84]
call fcn.004107c2
lea eax, [ebp - 0x13c]
push eax
call fcn.0040f8c0
add esp, 0x10
push eax
lea eax, [ebp - 0x13c]
push eax
push edi
push ebx
push 0x420984
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x13c]
push 0xa
push eax
push dword [0x421b88]
call fcn.004107c2
lea eax, [ebp - 0x13c]
push eax
call fcn.0040f8c0
add esp, 0x10
push eax
lea eax, [ebp - 0x13c]
push eax
push edi
push ebx
push 0x420980
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x20], ebx
jne 0x40c1e8
cmp dword [ebp - 0x1c], ebx
je 0x40c27d
push str.Setup
lea ecx, [ebp + 0xc]
call fcn.0040a6d6
lea eax, [ebp + 0xc]
lea ecx, [ebp - 0x14]
push eax
mov byte [ebp - 4], 4
call fcn.00409039
mov ecx, dword [ebp + 0xc]
mov byte [ebp - 4], 1
cmp ecx, ebx
je 0x40c215
call fcn.0040917b
mov ecx, dword [ebp - 0x14]
cmp ecx, ebx
je 0x40c223
call fcn.004091a8
jmp 0x40c225
xor eax, eax
lea ecx, [ebp - 0x10]
push ecx
push 2
push ebx
push eax
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40c27d
lea eax, [ebp - 0x13c]
push 0xa
push eax
push dword [0x420910]
call fcn.004107c2
lea eax, [ebp - 0x13c]
push eax
call fcn.0040f8c0
add esp, 0x10
push eax
lea eax, [ebp - 0x13c]
push eax
push 1
push ebx
push str.Block
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x14]
pop edi
cmp ecx, ebx
je 0x40c297
call fcn.0040917b
mov dword [ebp - 0x14], ebx
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret