Function at 0x10065e7
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
and dword [ebp - 0x10], 0
push ebx
mov ebx, dword [sym.imp.msvcrt.dll_malloc]
push esi
push edi
mov esi, 0x1000
push esi
mov dword [ebp - 0xc], ecx
call ebx
mov edi, eax
test edi, edi
pop ecx
mov dword [ebp - 0x18], edi
jne 0x100661b
mov esi, 0x8007000e
jmp 0x100690a
mov ecx, dword [ebp - 0xc]
push edi
call fcn.0100581e
test eax, eax
jge 0x100662f
mov esi, eax
jmp 0x1006900
lea eax, [ebp - 2]
push eax
push edi
call fcn.01005614
test eax, eax
jne 0x1006647
mov esi, 0x80020009
jmp 0x1006900
push esi
call ebx
mov edi, eax
test edi, edi
pop ecx
mov dword [ebp - 8], edi
jne 0x100665e
mov esi, 0x8007000e
jmp 0x1006900
mov ecx, dword [ebp - 0xc]
call fcn.010057f5
mov ecx, dword [ebp - 0xc]
push edi
call fcn.0100581e
test eax, eax
jge 0x100667a
mov esi, eax
jmp 0x10068f6
movzx eax, word [ebp - 2]
sub eax, 8
je 0x10067bb
sub eax, 9
je 0x1006701
dec eax
dec eax
jne 0x10068e1
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea edi, [esi + esi]
cmp edi, 0x400
ja 0x10066c4
push edi
call fcn.01005062
test al, al
je 0x10066c4
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.01008280
mov eax, esp
jmp 0x10066cd
push edi
lea ecx, [ebp - 0x10]
call fcn.010061d3
push esi
push dword [ebp - 8]
push eax
call fcn.0100516f
test eax, eax
je 0x10067ee
lea ecx, [ebp - 0x1c]
push ecx
push 0
push 0
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
push dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push dword [ebp - 0x1c]
call fcn.0100537a
jmp 0x10068e1
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test al, 1
mov dword [ebp + 0x14], eax
jne 0x10067da
cdq
sub eax, edx
mov esi, eax
sar esi, 1
cmp esi, 0x400
mov dword [ebp - 0x14], esi
ja 0x1006740
push esi
call fcn.01005062
test al, al
je 0x1006740
mov eax, esi
add eax, 3
and eax, 0xfffffffc
call fcn.01008280
mov ebx, esp
jmp 0x100674b
push esi
lea ecx, [ebp - 0x10]
call fcn.010061d3
mov ebx, eax
test ebx, ebx
je 0x10067da
mov ecx, esi
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
xor edi, edi
cmp dword [ebp + 0x14], edi
jle 0x10067a1
mov eax, edi
cdq
sub eax, edx
sar eax, 1
lea esi, [eax + ebx]
mov eax, dword [ebp - 8]
movsx eax, byte [edi + eax]
push eax
call fcn.0100569e
mov ecx, edi
and ecx, 1
shl ecx, 2
mov edx, ecx
push 4
pop ecx
sub ecx, edx
shl al, cl
or byte [esi], al
inc edi
cmp edi, dword [ebp + 0x14]
jl 0x100676e
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push esi
push ebx
push 3
push 0
push dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x10068e1
mov dword [ebp - 0x14], edi
xor edi, edi
cmp byte [ebp + 0x14], 0
je 0x10068c7
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0xffe
jle 0x10067e4
mov esi, 0x80004005
jmp 0x10068f6
push esi
call ebx
mov edi, eax
test edi, edi
pop ecx
jne 0x10067f8
mov esi, 0x8007000e
jmp 0x10068f6
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
and dword [ebp + 0x14], 0
push 0x100182c
call fcn.010064ae
mov ebx, eax
test ebx, ebx
je 0x10068bf
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [eax + eax + 2]
cmp esi, 0x400
jg 0x1006844
push esi
call fcn.01005062
test al, al
je 0x1006844
mov eax, esi
add eax, 3
and eax, 0xfffffffc
call fcn.01008280
mov eax, esp
jmp 0x100684d
push esi
lea ecx, [ebp + 0x14]
call fcn.010061d3
push esi
push ebx
push eax
call fcn.0100518d
test eax, eax
mov dword [ebp - 4], eax
je 0x100691e
mov ebx, dword [ebp - 8]
push eax
push ebx
call fcn.01005742
mov esi, eax
test esi, esi
mov dword [ebp - 0x20], esi
je 0x10068bf
cmp esi, dword [ebp + 0x10]
je 0x1006885
push esi
push ebx
call dword [sym.imp.USER32.dll_CharPrevA]
cmp byte [eax], 0x22
je 0x10068bf
sub esi, ebx
push esi
push ebx
push edi
mov byte [edi], 0
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
mov ebx, 0x1001828
push ebx
push edi
call esi
push dword [ebp - 4]
push edi
call esi
push ebx
push edi
call esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, dword [ebp - 0x20]
push eax
push edi
call esi
mov dword [ebp - 0x14], edi
lea ecx, [ebp + 0x14]
call fcn.01005ed3
push dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push dword [ebp - 0x14]
call fcn.0100539d
test edi, edi
je 0x10068e1
push edi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push dword [ebp + 0x10]
mov ecx, dword [ebp - 0xc]
call fcn.0100581e
test eax, eax
jl 0x1006673
xor esi, esi
push dword [ebp - 8]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push dword [ebp - 0x18]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
lea ecx, [ebp - 0x10]
call fcn.01005ed3
mov eax, esi
lea esp, [ebp - 0x2c]
pop edi
pop esi
pop ebx
leave
ret 0x10
mov esi, dword [sym.imp.msvcrt.dll_free]
push edi
call esi
push dword [ebp - 8]
call esi
push dword [ebp - 0x18]
call esi
add esp, 0xc
lea ecx, [ebp + 0x14]
call fcn.01005ed3
jmp 0x1006611