Function at 0x40f490
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4421b6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x111c
call fcn.00427d50
mov eax, dword [0x455e64]
push ebx
push esi
push edi
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1118]
mov dword [ebp - 0x10], esp
mov esi, ecx
xor edi, edi
push eax
mov dword [ebp - 0x112c], esi
mov dword [ebp - 0x1128], edi
call fcn.0040e620
cmp eax, edi
jl 0x40f8cf
lea ecx, [ebp - 0x1128]
push ecx
lea edx, [ebp - 0x1118]
push edx
call fcn.0040f980
add esp, 8
test eax, eax
jne 0x40f509
mov eax, 0x80020009
jmp 0x40f8cf
mov ecx, esi
call fcn.0040e5c0
lea eax, [ebp - 0x1118]
push eax
mov ecx, esi
call fcn.0040e620
cmp eax, edi
jl 0x40f8cf
movzx eax, word [ebp - 0x1128]
cmp eax, 0x13
jg 0x40f7b4
je 0x40f6e9
cmp eax, 8
je 0x40f6b9
cmp eax, 0x11
jne 0x40f8ba
lea ecx, [ebp - 0x1118]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
test bl, 1
mov dword [ebp - 0x1124], ebx
jne 0x40f637
cdq
sub eax, edx
mov esi, eax
sar esi, 1
mov dword [ebp - 0x111c], esi
mov dword [ebp - 0x118], edi
cmp esi, 0x100
mov dword [ebp - 4], 3
mov byte [ebp - 4], 4
jbe 0x40f5b1
push esi
lea ecx, [ebp - 0x118]
call fcn.0040fa30
jmp 0x40f618
lea edi, [ebp - 0x114]
mov dword [ebp - 0x118], edi
mov ecx, esi
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
xor esi, esi
test ebx, ebx
rep stosb byte es:[edi], al
jle 0x40f671
lea esp, [esp]
mov eax, dword [ebp - 0x118]
mov edx, esi
shr edx, 1
add edx, eax
mov al, byte [ebp + esi - 0x1118]
movsx ecx, al
add ecx, 0xffffffd0
cmp ecx, 0x36
ja case.0x40f605.58
movzx ecx, byte [ecx + 0x40f900]
jmp dword [ecx*4 + 0x40f8f0]
mov edi, dword [ebp - 0x118]
test edi, edi
jne 0x40f5bd
lea edx, [ebp - 0x114]
test edx, edx
je 0x40f637
lea ecx, [ebp - 0x118]
call fcn.0040e430
mov eax, 0x80004005
jmp 0x40f8cf
sub al, 0x30
jmp 0x40f64f
sub al, 0x37
jmp 0x40f64f
sub al, 0x57
jmp 0x40f64f
xor al, al
mov ecx, esi
and ecx, 1
shl ecx, 2
mov edi, ecx
mov ecx, 4
sub ecx, edi
shl al, cl
mov cl, byte [edx]
or cl, al
inc esi
cmp esi, ebx
mov byte [edx], cl
jl 0x40f5e0
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x111c]
mov edx, dword [ebp - 0x118]
push ecx
mov ecx, dword [ebp + 0xc]
push edx
push 3
push 0
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
mov eax, dword [ebp - 0x118]
lea edx, [ebp - 0x114]
cmp eax, edx
je 0x40f8a3
lea ecx, [ebp - 0x118]
call fcn.0040e430
jmp 0x40f8a3
lea eax, [ebp - 0x1118]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [ebp + 0xc]
inc eax
push eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x1118]
push ecx
mov ecx, dword [eax]
push 1
push edi
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
jmp 0x40f8a3
call dword [0x4510e0]
lea edx, [ebp - 0x1118]
push edx
mov ebx, eax
mov dword [ebp - 0x111c], edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea edi, [esi + esi]
cmp edi, 0x400
ja 0x40f733
push edi
call fcn.00403960
add esp, 4
test al, al
je 0x40f733
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.00427d50
mov dword [ebp - 0x10], esp
mov eax, esp
jmp 0x40f73f
push edi
lea ecx, [ebp - 0x111c]
call fcn.00403a90
push ebx
push esi
lea ecx, [ebp - 0x1118]
push ecx
push eax
call fcn.004039f0
test eax, eax
jne 0x40f767
lea ecx, [ebp - 0x111c]
call fcn.00403a70
mov eax, 0x8007000e
jmp 0x40f8cf
lea edx, [ebp - 0x1124]
push edx
push 0
push 0
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov eax, dword [ebp - 0x1124]
mov edx, dword [ebp + 0xc]
push 4
lea ecx, [ebp - 0x1120]
push ecx
push 4
mov dword [ebp - 0x1120], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push 0
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [ebp - 0x111c]
mov esi, eax
call fcn.00403a70
jmp 0x40f8a3
cmp eax, 0x4008
jne 0x40f8ba
lea edx, [ebp - 0x1118]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
mov dword [ebp - 0x118], edi
cmp eax, 0x100
mov dword [ebp - 4], edi
mov byte [ebp - 4], 1
jbe 0x40f83c
push eax
lea ecx, [ebp - 0x118]
call fcn.0040fa30
mov edi, dword [ebp - 0x118]
test edi, edi
je 0x40f889
mov al, byte [ebp - 0x1118]
test al, al
lea esi, [ebp - 0x1118]
je 0x40f869
mov ebx, dword [sym.imp.USER32.dll_CharNextA]
push esi
call ebx
mov cl, byte [esi]
cmp cl, 0x5c
jne 0x40f84a
cmp byte [eax], 0x30
jne 0x40f84a
mov byte [edi], 0
push eax
inc edi
call ebx
mov esi, eax
jmp 0x40f864
lea edi, [ebp - 0x114]
mov dword [ebp - 0x118], edi
jmp 0x40f7fb
xor eax, eax
mov byte [edi], cl
mov al, byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
test eax, eax
je 0x40f862
mov cl, byte [esi + 1]
inc edi
inc esi
mov byte [edi], cl
inc edi
inc esi
cmp byte [esi], 0
jne 0x40f811
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov byte [edi], 0
mov edx, dword [ebp - 0x118]
push edx
push eax
call fcn.0040f940
mov edi, dword [ebp - 0x118]
mov esi, eax
jmp 0x40f88e
mov esi, 0xe
lea ecx, [ebp - 0x114]
cmp edi, ecx
je 0x40f8a3
lea ecx, [ebp - 0x118]
call fcn.0040e430
xor edi, edi
cmp esi, edi
je 0x40f8b4
push esi
call fcn.0040f2d0
add esp, 4
jmp 0x40f8cf
mov esi, dword [ebp - 0x112c]
mov edx, dword [ebp + 0x10]
push edx
mov ecx, esi
call fcn.0040e620
xor ecx, ecx
cmp eax, edi
setge cl
dec ecx
and eax, ecx
lea esp, [ebp - 0x1138]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
call fcn.00427501
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc