Function at 0x40768a
Capabilities:
Set registry value

Disassembly:
mov eax, 0x41d137
call fcn.00412998
push ecx
mov eax, 0x1118
call fcn.00412040
push ebx
push esi
push edi
lea eax, [ebp - 0x1128]
mov dword [ebp - 0x10], esp
mov esi, ecx
xor ebx, ebx
push eax
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], ebx
call fcn.00406c9a
cmp eax, ebx
jl 0x407a14
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1128]
push eax
call fcn.00407a62
test eax, eax
pop ecx
pop ecx
jne 0x4076e3
mov eax, 0x80020009
jmp 0x407a14
mov ecx, esi
call fcn.00406c72
lea eax, [ebp - 0x1128]
push eax
mov ecx, esi
call fcn.00406c9a
cmp eax, ebx
jl 0x407a14
movzx eax, word [ebp - 0x20]
sub eax, 8
je 0x4079cd
sub eax, 9
je 0x4078b8
dec eax
dec eax
je 0x407809
sub eax, 0x3ff5
jne 0x407a03
lea eax, [ebp - 0x1128]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
mov dword [ebp - 0x128], ebx
cmp eax, 0x100
mov dword [ebp - 4], ebx
mov byte [ebp - 4], 1
jbe 0x40775f
push eax
lea ecx, [ebp - 0x128]
call fcn.00406b29
jmp 0x40776f
lea eax, [ebp - 0x124]
mov dword [ebp - 0x128], eax
jmp 0x40776f
mov edi, dword [ebp - 0x128]
cmp edi, ebx
je 0x4077e0
cmp byte [ebp - 0x1128], 0
lea esi, [ebp - 0x1128]
je 0x4077c6
mov ebx, dword [sym.imp.USER32.dll_CharNextA]
push esi
call ebx
mov cl, byte [esi]
cmp cl, 0x5c
jne 0x4077a8
cmp byte [eax], 0x30
jne 0x4077a8
mov byte [edi], 0
push eax
inc edi
call ebx
mov esi, eax
jmp 0x4077c1
xor eax, eax
mov byte [edi], cl
mov al, byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
test eax, eax
je 0x4077bf
inc edi
inc esi
mov al, byte [esi]
mov byte [edi], al
inc edi
inc esi
cmp byte [esi], 0
jne 0x40778e
mov ecx, dword [ebp + 8]
mov byte [edi], 0
push dword [ebp - 0x128]
push dword [ebp + 0xc]
call fcn.00407a2b
mov esi, eax
xor ebx, ebx
jmp 0x4077e3
push 0xe
pop esi
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x124]
cmp dword [ebp - 0x128], eax
je 0x4079f6
lea ecx, [ebp - 0x128]
call fcn.00407b1f
jmp 0x4079f6
call dword [0x425064]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1128]
push eax
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea edi, [esi + esi]
cmp edi, 0x400
ja 0x40784f
push edi
call fcn.00401000
test al, al
pop ecx
je 0x40784f
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.00412040
mov dword [ebp - 0x10], esp
mov eax, esp
jmp 0x407858
push edi
lea ecx, [ebp - 0x14]
call fcn.004024b5
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x1128]
push esi
push ecx
push eax
call fcn.004010fd
cmp eax, ebx
jne 0x40787f
lea ecx, [ebp - 0x14]
call fcn.00401dca
mov eax, 0x8007000e
jmp 0x407a14
lea ecx, [ebp - 0x18]
push ecx
push ebx
push ebx
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov eax, dword [ebp - 0x18]
push 4
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp + 8]
push 4
push ebx
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [ebp - 0x14]
mov esi, eax
call fcn.00401dca
jmp 0x4079f6
lea eax, [ebp - 0x1128]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test al, 1
mov dword [ebp - 0x14], eax
jne 0x40793a
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x128], ebx
cmp edi, 0x100
mov dword [ebp - 4], 3
mov byte [ebp - 4], 4
jbe 0x407903
push edi
lea ecx, [ebp - 0x128]
call fcn.00406b29
jmp 0x407916
lea eax, [ebp - 0x124]
mov dword [ebp - 0x128], eax
jmp 0x407916
cmp dword [ebp - 0x128], ebx
mov dword [ebp - 4], 3
jne 0x407944
lea eax, [ebp - 0x124]
test eax, eax
je 0x40793a
lea ecx, [ebp - 0x128]
call fcn.00407b1f
mov eax, 0x80004005
jmp 0x407a14
push edi
push ebx
push dword [ebp - 0x128]
call fcn.00412120
add esp, 0xc
cmp dword [ebp - 0x14], ebx
jle 0x407993
mov eax, ebx
cdq
sub eax, edx
mov esi, eax
xor eax, eax
mov al, byte [ebp + ebx - 0x1128]
sar esi, 1
add esi, dword [ebp - 0x128]
push eax
call fcn.00407af4
pop ecx
mov ecx, ebx
and ecx, 1
shl ecx, 2
mov edx, ecx
push 4
pop ecx
sub ecx, edx
shl al, cl
or byte [esi], al
inc ebx
cmp ebx, dword [ebp - 0x14]
jl 0x407959
xor ebx, ebx
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push edi
push dword [ebp - 0x128]
push 3
push ebx
push dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
or dword [ebp - 4], 0xffffffff
mov esi, eax
lea eax, [ebp - 0x124]
cmp dword [ebp - 0x128], eax
je 0x4079f6
lea ecx, [ebp - 0x128]
call fcn.00407b1f
jmp 0x4079f6
lea eax, [ebp - 0x1128]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
lea eax, [ebp - 0x1128]
push eax
mov eax, dword [ebp + 8]
push 1
push ebx
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
cmp esi, ebx
je 0x407a03
push esi
call fcn.00407568
pop ecx
jmp 0x407a14
push dword [ebp + 0x10]
mov ecx, dword [ebp - 0x24]
call fcn.00406c9a
cmp eax, ebx
jl 0x407a14
xor eax, eax
lea esp, [ebp - 0x1134]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 0xc