Function at 0x40f018
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41b0f2
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2128
call fcn.00419f40
mov eax, dword [0x429014]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x2130], ecx
mov eax, dword [ebp + 0x10]
xor ebx, ebx
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x2138], eax
lea eax, [ebp - 0x2014]
push eax
mov dword [ebp - 0x2120], ecx
mov dword [ebp - 0x212c], esi
mov dword [ebp - 0x2128], edi
mov dword [ebp - 0x211c], ebx
call fcn.0040f5b0
test eax, eax
js 0x40f477
lea edx, [ebp - 0x211c]
lea ecx, [ebp - 0x2014]
call fcn.0040efb8
test eax, eax
jne 0x40f0b0
mov eax, 0x80020009
jmp 0x40f477
mov ecx, dword [ebp - 0x2130]
call fcn.0040fd2e
mov ecx, dword [ebp - 0x2130]
lea eax, [ebp - 0x2014]
push eax
call fcn.0040f5b0
test eax, eax
js 0x40f477
movzx eax, word [ebp - 0x211c]
sub eax, 8
je 0x40f43e
sub eax, 9
je 0x40f2b0
push 2
pop edi
sub eax, edi
je 0x40f23e
sub eax, 0x3ff5
jne 0x40f45d
lea eax, [ebp - 0x2014]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
pop ecx
add eax, edi
mov dword [ebp - 0x2118], ebx
mul edi
mov dword [ebp - 4], ebx
mov byte [ebp - 4], 1
cmp edx, ebx
ja 0x40f493
jb 0x40f136
cmp eax, 0xffffffff
ja 0x40f493
cmp eax, 0x100
jbe 0x40f14b
push eax
lea ecx, [ebp - 0x2118]
call fcn.0040eac7
jmp 0x40f16d
lea esi, [ebp - 0x2114]
mov dword [ebp - 0x2118], esi
jmp 0x40f173
mov esi, dword [ebp - 0x2118]
test esi, esi
je 0x40f21d
cmp word [ebp - 0x2014], 0
lea edi, [ebp - 0x2014]
je 0x40f1c0
push edi
call dword [sym.imp.USER32.dll_CharNextW]
movzx ecx, word [edi]
cmp ecx, 0x5c
jne 0x40f1b2
push 0x30
pop edx
cmp word [eax], dx
jne 0x40f1b2
xor ecx, ecx
push eax
mov word [esi], cx
call dword [sym.imp.USER32.dll_CharNextW]
mov edi, eax
jmp 0x40f1b8
mov word [esi], cx
add edi, 2
add esi, 2
cmp word [edi], bx
jne 0x40f18b
xor eax, eax
mov dword [esi], eax
mov esi, dword [ebp - 0x2118]
mov dword [ebp - 0x2124], esi
test esi, esi
jne 0x40f1d8
push 0xd
jmp 0x40f21f
mov edi, ebx
mov ebx, esi
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
push ebx
call esi
inc eax
pop ecx
lea ebx, [ebx + eax*2]
lea edi, [edi + eax*2]
cmp eax, 1
jne 0x40f1e2
mov esi, dword [ebp - 0x2124]
xor ebx, ebx
mov eax, dword [ebp - 0x212c]
push edi
push esi
push 7
push ebx
push dword [ebp - 0x2128]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, dword [ebp - 0x2118]
mov edi, eax
jmp 0x40f220
push 0xe
pop edi
lea eax, [ebp - 0x2114]
cmp esi, eax
je 0x40f450
lea ecx, [ebp - 0x2118]
call fcn.0040eab1
jmp 0x40f450
lea eax, [ebp - 0x2124]
mov dword [ebp - 0x211c], ebx
push eax
push ebx
push ebx
lea eax, [ebp - 0x2014]
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov esi, eax
test esi, esi
jns 0x40f272
lea ecx, [ebp - 0x211c]
call fcn.00407994
mov eax, esi
jmp 0x40f477
mov eax, dword [ebp - 0x2124]
push 4
mov dword [ebp - 0x2134], eax
lea eax, [ebp - 0x2134]
push eax
mov eax, dword [ebp - 0x212c]
push 4
push ebx
push dword [ebp - 0x2128]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea ecx, [ebp - 0x211c]
mov edi, eax
call fcn.00407994
jmp 0x40f450
lea eax, [ebp - 0x2014]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
mov dword [ebp - 0x2134], eax
pop ecx
test al, 1
je 0x40f2d2
mov eax, 0x80004005
jmp 0x40f477
cdq
sub eax, edx
mov dword [ebp - 0x2118], ebx
mov edi, eax
sar edi, 1
mov dword [ebp - 0x2124], edi
mov dword [ebp - 4], 3
mov byte [ebp - 4], 4
cmp edi, 0x100
jbe 0x40f32e
push edi
lea ecx, [ebp - 0x2118]
call fcn.0040eac7
mov eax, dword [ebp - 0x2118]
jmp 0x40f33a
lea eax, [ebp - 0x2114]
mov dword [ebp - 0x2118], eax
test eax, eax
jne 0x40f34e
lea ecx, [ebp - 0x2118]
call fcn.0040eab1
jmp 0x40f2c8
push edi
push ebx
push eax
call dword [sym.imp.VCRUNTIME140.dll_memset]
add esp, 0xc
mov dword [ebp - 0x211c], ebx
cmp dword [ebp - 0x2134], 0
mov edx, ebx
jle 0x40f403
mov edi, dword [ebp - 0x2134]
push 0x30
pop esi
movzx eax, word [ebp + edx*2 - 0x2014]
mov ecx, eax
cmp cx, si
jb 0x40f3b2
cmp ecx, 0x39
jbe 0x40f3a8
cmp ecx, 0x40
jbe 0x40f3b2
cmp ecx, 0x46
jbe 0x40f3a4
cmp ecx, 0x60
jbe 0x40f3b2
cmp eax, 0x66
ja 0x40f3b2
sub al, 0x57
jmp 0x40f3aa
sub al, 0x37
jmp 0x40f3aa
sub al, 0x30
mov dword [ebp - 0x2120], eax
jmp 0x40f3b8
mov byte [ebp - 0x2120], bl
mov esi, edx
test esi, esi
jns 0x40f3c1
add esi, 1
sar esi, 1
mov eax, dword [ebp - 0x211c]
mov edx, dword [ebp - 0x2118]
and eax, 1
shl eax, 2
push 4
pop ecx
sub ecx, eax
mov eax, dword [ebp - 0x2120]
shl al, cl
or byte [esi + edx], al
mov edx, dword [ebp - 0x211c]
inc edx
mov dword [ebp - 0x211c], edx
push 0x30
pop esi
cmp edx, edi
jl 0x40f378
mov edi, dword [ebp - 0x2124]
mov eax, dword [ebp - 0x212c]
push edi
push dword [ebp - 0x2118]
push 3
push ebx
push dword [ebp - 0x2128]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
lea eax, [ebp - 0x2114]
cmp dword [ebp - 0x2118], eax
je 0x40f450
lea ecx, [ebp - 0x2118]
call fcn.0040eab1
jmp 0x40f450
push ecx
lea eax, [ebp - 0x2014]
mov ecx, esi
push eax
push edi
call fcn.00408c15
mov edi, eax
test edi, edi
je 0x40f45d
mov ecx, edi
call fcn.0040f5a2
jmp 0x40f477
push dword [ebp - 0x2138]
mov ecx, dword [ebp - 0x2130]
call fcn.0040f5b0
xor ecx, ecx
test eax, eax
cmovs ecx, eax
mov eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004188ed
leave
ret 0xc
push 0x80070216
call fcn.004081d5
int3