Function at 0x40216a
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1120
call fcn.0040af15
mov eax, dword [0x40d380]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
and dword [ebp - 0x110c], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, ecx
mov dword [ebp - 0x1120], eax
lea eax, [ebp - 0x1004]
push eax
mov dword [ebp - 0x1114], esi
mov dword [ebp - 0x1118], ebx
mov dword [ebp - 0x1110], edi
call fcn.004051bb
test eax, eax
js 0x402528
lea eax, [ebp - 0x110c]
push eax
lea eax, [ebp - 0x1004]
push eax
call fcn.00406d90
test eax, eax
jne 0x4021e3
mov eax, 0x80020009
jmp 0x402528
mov ecx, esi
call fcn.00406909
lea eax, [ebp - 0x1004]
mov ecx, esi
push eax
call fcn.004051bb
test eax, eax
js 0x402528
movzx eax, word [ebp - 0x110c]
sub eax, 8
je 0x4024fa
sub eax, 9
je 0x4023ea
dec eax
sub eax, 1
je 0x402309
sub eax, 0x3ff5
jne 0x402512
lea ecx, [ebp - 0x1004]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402237
and dword [ebp - 0x1108], 0
sub ecx, edx
lea eax, [ecx + 2]
push eax
lea ecx, [ebp - 0x1108]
call fcn.00402618
mov esi, dword [ebp - 0x1108]
test esi, esi
je 0x4022d8
cmp byte [ebp - 0x1004], 0
lea edi, [ebp - 0x1004]
je 0x4022b6
mov ebx, dword [sym.imp.USER32.dll_CharNextA]
push edi
call ebx
mov cl, byte [edi]
cmp cl, 0x5c
jne 0x40228f
cmp byte [eax], 0x30
jne 0x40228f
mov byte [esi], 0
inc esi
push eax
call ebx
mov edi, eax
jmp 0x4022ab
mov byte [esi], cl
movzx eax, byte [edi]
push eax
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
test eax, eax
je 0x4022a9
inc esi
inc edi
mov al, byte [edi]
test al, al
je 0x4022b0
mov byte [esi], al
inc esi
inc edi
cmp byte [edi], 0
jne 0x402275
mov ebx, dword [ebp - 0x1118]
mov word [esi], 0
mov ecx, ebx
push dword [ebp - 0x1108]
push dword [ebp - 0x1110]
call fcn.004067bf
mov esi, dword [ebp - 0x1108]
mov edi, eax
jmp 0x4022db
push 0xe
pop edi
lea eax, [ebp - 0x1104]
cmp esi, eax
je 0x4022f0
lea ecx, [ebp - 0x1108]
call fcn.004042f0
mov esi, dword [ebp - 0x1114]
test edi, edi
je 0x402512
push edi
call fcn.00402a71
jmp 0x402528
and dword [ebp - 0x110c], 0
lea ecx, [ebp - 0x1004]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402319
sub ecx, edx
push 2
lea eax, [ecx + 1]
push eax
mov dword [ebp - 0x1110], eax
lea eax, [ebp - 0x1110]
push eax
call fcn.004012f1
test eax, eax
js 0x4023d3
mov esi, dword [ebp - 0x1110]
cmp esi, 0x400
jg 0x402365
push esi
call fcn.00406f75
test al, al
je 0x402365
mov eax, esi
call fcn.0040af02
mov eax, esp
jmp 0x402371
push esi
lea ecx, [ebp - 0x110c]
call fcn.004025ec
push 3
shr esi, 1
lea ecx, [ebp - 0x1004]
push esi
push ecx
push eax
call fcn.00402718
test eax, eax
je 0x4023d3
lea ecx, [ebp - 0x1118]
push ecx
push 0
push 0
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov esi, eax
test esi, esi
js 0x4023d8
mov eax, dword [ebp - 0x1118]
push 4
mov dword [ebp - 0x1110], eax
lea eax, [ebp - 0x1110]
push eax
push 4
push 0
push edi
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [ebp - 0x110c]
mov edi, eax
call fcn.00401660
jmp 0x4022f0
mov esi, 0x8007000e
lea ecx, [ebp - 0x110c]
call fcn.00401660
mov eax, esi
jmp 0x402528
lea ebx, [ebp - 0x1004]
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4023f3
sub ebx, ecx
test bl, 1
je 0x40240b
mov eax, 0x80004005
jmp 0x402528
and dword [ebp - 0x1108], 0
lea ecx, [ebp - 0x1108]
mov eax, ebx
cdq
sub eax, edx
mov esi, eax
sar esi, 1
push esi
mov dword [ebp - 0x111c], esi
call fcn.00402618
cmp dword [ebp - 0x1108], 0
jne 0x40244d
lea eax, [ebp - 0x1104]
test eax, eax
je 0x402401
lea ecx, [ebp - 0x1108]
call fcn.004042f0
jmp 0x402401
push esi
push 0
push dword [ebp - 0x1108]
call sub.VCRUNTIME140.dll_memset
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x110c], eax
test ebx, ebx
jle 0x4024bc
mov edi, eax
test edi, edi
jns 0x402473
add edi, 1
sar edi, 1
movzx eax, byte [ebp + eax - 0x1004]
mov esi, dword [ebp - 0x1108]
push eax
call fcn.00403602
mov edx, dword [ebp - 0x110c]
and edx, 1
shl edx, 2
push 4
pop ecx
sub ecx, edx
shl al, cl
or byte [edi + esi], al
mov eax, dword [ebp - 0x110c]
inc eax
mov dword [ebp - 0x110c], eax
cmp eax, ebx
jl 0x40246a
mov esi, dword [ebp - 0x111c]
mov edi, dword [ebp - 0x1110]
mov eax, dword [ebp - 0x1118]
push esi
push dword [ebp - 0x1108]
push 3
push 0
push edi
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, eax
lea eax, [ebp - 0x1104]
cmp dword [ebp - 0x1108], eax
je 0x4022f0
lea ecx, [ebp - 0x1108]
call fcn.004042f0
jmp 0x4022f0
push 1
lea eax, [ebp - 0x1004]
mov ecx, ebx
push eax
push edi
call fcn.0040680d
mov edi, eax
jmp 0x4022f6
push dword [ebp - 0x1120]
mov ecx, esi
call fcn.004051bb
xor ecx, ecx
test eax, eax
cmovs ecx, eax
mov eax, ecx
lea esp, [ebp - 0x112c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a2a7
mov esp, ebp
pop ebp
ret 0xc