Function at 0x1002ff8
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x1006060]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x1c], 0
push ebx
push esi
mov esi, dword [sym.imp.msvcrt.dll_malloc]
push edi
mov edi, 0x2000
push edi
mov dword [ebp - 0x14], ecx
call esi
mov ebx, eax
test ebx, ebx
pop ecx
mov dword [ebp - 0x10], ebx
jne 0x100304f
mov esi, 0x8007000e
lea ecx, [ebp - 0x1c]
call fcn.0100270c
mov eax, esi
lea esp, [ebp - 0x34]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.01004723
leave
ret 0x10
mov ecx, dword [ebp - 0x14]
push ebx
call fcn.01002024
test eax, eax
mov dword [ebp - 0xc], eax
jge 0x100306c
push ebx
call dword [sym.imp.msvcrt.dll_free]
mov esi, dword [ebp - 0xc]
pop ecx
jmp 0x1003031
lea eax, [ebp - 8]
push eax
push ebx
call fcn.01001dff
test eax, eax
jne 0x1003089
push ebx
call dword [sym.imp.msvcrt.dll_free]
pop ecx
mov esi, 0x80020009
jmp 0x1003031
push edi
call esi
mov ebx, eax
xor edi, edi
cmp ebx, edi
pop ecx
mov dword [ebp - 0x20], ebx
jne 0x10030a4
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
jmp 0x100302c
mov ecx, dword [ebp - 0x14]
call fcn.01001ffb
mov ecx, dword [ebp - 0x14]
push ebx
call fcn.01002024
cmp eax, edi
mov dword [ebp - 0xc], eax
jge 0x10030cd
mov edi, dword [sym.imp.msvcrt.dll_free]
push ebx
call edi
push dword [ebp - 0x10]
call edi
pop ecx
jmp 0x1003066
movzx eax, word [ebp - 8]
sub eax, 8
je 0x10031b1
sub eax, 9
je 0x1003107
dec eax
dec eax
jne 0x10032ab
lea eax, [ebp - 0x24]
push eax
push edi
push edi
push ebx
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
push dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push dword [ebp - 0x24]
call fcn.01001ba3
jmp 0x10032ab
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test al, 1
mov dword [ebp - 0xc], eax
jne 0x10031cc
cdq
sub eax, edx
mov esi, eax
sar esi, 1
cmp esi, 0x400
mov dword [ebp - 0x18], esi
ja 0x1003141
push esi
call fcn.01001930
test al, al
je 0x1003141
mov eax, esi
call fcn.01004810
mov dword [ebp - 8], esp
jmp 0x100314d
push esi
lea ecx, [ebp - 0x1c]
call fcn.01002faa
mov dword [ebp - 8], eax
cmp dword [ebp - 8], edi
je 0x10031cc
push esi
push edi
push dword [ebp - 8]
call sub.msvcrt.dll_memset
add esp, 0xc
cmp dword [ebp - 0xc], edi
jle 0x1003195
mov ecx, dword [ebp - 8]
mov eax, edi
cdq
sub eax, edx
sar eax, 1
lea esi, [eax + ecx]
movzx eax, word [ebx + edi*2]
push eax
call fcn.01001e89
mov edx, edi
and edx, 1
shl edx, 2
push 4
pop ecx
sub ecx, edx
shl al, cl
or byte [esi], al
inc edi
cmp edi, dword [ebp - 0xc]
jl 0x1003164
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push esi
push dword [ebp - 8]
push 3
push 0
push dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x10032ab
cmp byte [ebp + 0x14], 0
mov dword [ebp - 8], ebx
je 0x1003291
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 0xffe
jle 0x10031e6
mov esi, dword [sym.imp.msvcrt.dll_free]
push ebx
call esi
push dword [ebp - 0x10]
call esi
pop ecx
pop ecx
mov esi, 0x80004005
jmp 0x1003031
push 0x2000
call esi
mov edi, eax
test edi, edi
pop ecx
jne 0x1003208
mov esi, dword [sym.imp.msvcrt.dll_free]
push ebx
call esi
push dword [ebp - 0x10]
call esi
pop ecx
jmp 0x10030a1
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 4]
and dword [ebp - 0x28], 0
push 0x10014a8
call fcn.0100289a
test eax, eax
mov dword [ebp - 0xc], eax
je 0x1003289
push eax
push ebx
call fcn.01001f35
mov esi, eax
test esi, esi
mov dword [ebp - 0x18], esi
je 0x1003289
cmp esi, dword [ebp + 0x10]
je 0x1003246
push esi
push ebx
call dword [sym.imp.USER32.dll_CharPrevW]
cmp word [eax], 0x22
je 0x1003289
and word [edi], 0
sub esi, ebx
sar esi, 1
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
mov ebx, 0x10014a4
push ebx
push edi
call esi
push dword [ebp - 0xc]
push edi
call esi
push ebx
push edi
call esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x18]
lea eax, [ecx + eax*2]
push eax
push edi
call esi
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 8], edi
lea ecx, [ebp - 0x28]
call fcn.0100270c
push dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push dword [ebp - 8]
call fcn.01001bc6
test edi, edi
je 0x10032ab
push edi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push dword [ebp + 0x10]
mov ecx, dword [ebp - 0x14]
call fcn.01002024
mov esi, eax
test esi, esi
push ebx
jge 0x10032d1
mov edi, dword [sym.imp.msvcrt.dll_free]
call edi
push dword [ebp - 0x10]
call edi
pop ecx
pop ecx
jmp 0x1003031
mov esi, dword [sym.imp.msvcrt.dll_free]
call esi
push dword [ebp - 0x10]
call esi
pop ecx
pop ecx
xor esi, esi
jmp 0x1003031