Function at 0x401400
Capabilities:
Set registry value

Disassembly:
sub esp, 0x598
mov dl, byte [0x408e20]
push ebx
push ebp
push esi
push edi
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x25]
mov byte [esp + 0x24], dl
mov byte [esp + 0x444], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x445]
lea edx, [esp + 0x444]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [esp + 0x5ac]
or ecx, 0xffffffff
xor eax, eax
push 0x408570
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x448]
push ecx
call fcn.004023d3
mov esi, eax
xor ebx, ebx
add esp, 8
cmp esi, ebx
mov dword [esp + 0x18], esi
je 0x401841
push esi
lea edx, [esp + 0x28]
push 0x100
push edx
call fcn.0040235c
add esp, 0xc
test eax, eax
je 0x40182b
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov al, byte [esp + 0x24]
cmp al, 0x5b
je 0x4014bf
cmp al, 0x22
jne 0x40180c
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x23], 0xa
jne 0x4014e6
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x23], bl
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x23], 0x5d
je 0x40153a
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x23], 0x22
je 0x40153a
lea eax, [esp + 0x24]
push str.dword
push eax
call fcn.00402150
add esp, 8
test eax, eax
jne 0x40154c
push ebx
lea ecx, [esp + 0x28]
push str.line_format_error_
push ecx
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40154c
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x23], bl
mov al, byte [esp + 0x24]
cmp al, 0x5b
jne 0x4016a2
mov dl, byte [0x408e20]
mov ecx, 0x31
xor eax, eax
lea edi, [esp + 0x2b5]
mov byte [esp + 0x2b4], dl
mov byte [esp + 0x37c], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x31
xor eax, eax
lea edi, [esp + 0x37d]
lea edx, [esp + 0x24]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x5c
push edx
stosb byte es:[edi], al
call fcn.004022a0
mov edx, eax
lea edi, [esp + 0x2d]
or ecx, 0xffffffff
xor eax, eax
add esp, 8
lea esi, [esp + 0x2b4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], esi
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [esp + 0x2b4]
sub esi, ecx
lea edi, [esp + 0x2b4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [edx + 1]
lea edx, [esp + 0x37c]
mov byte [esi + ecx], bl
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x2b4]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, str.HKEY_CURRENT_USER
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40164d
cmp cl, bl
je 0x401649
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40164d
add eax, 2
add esi, 2
cmp cl, bl
jne 0x401629
xor eax, eax
jmp 0x401652
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x401668
push ebx
lea eax, [esp + 0x28]
push str.only_can_write_HKEY_CURRENT_USER
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x20]
lea edx, [esp + 0x14]
push ecx
push edx
push ebx
push 0xf003f
lea eax, [esp + 0x554]
push ebx
push eax
lea ecx, [esp + 0x394]
push ebx
push ecx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40184e
jmp 0x40180c
cmp al, 0x22
jne 0x40180c
mov dl, byte [0x408e20]
mov ecx, 0x31
xor eax, eax
lea edi, [esp + 0x1ed]
mov byte [esp + 0x1ec], dl
mov byte [esp + 0x124], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x31
xor eax, eax
lea edi, [esp + 0x125]
lea edx, [esp + 0x24]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x408518
push edx
stosb byte es:[edi], al
mov dword [esp + 0x18], ebx
call fcn.00402150
mov edx, eax
lea edi, [esp + 0x2d]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea esi, [esp + 0x1f4]
mov eax, ecx
mov dword [esp + 0x24], esi
mov esi, edi
mov edi, dword [esp + 0x24]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push 6
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [esp + 0x1f8]
sub esi, ecx
lea edi, [esp + 0x1f8]
or ecx, 0xffffffff
push str.dword:
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [edx + 2]
lea edx, [esp + 0x134]
mov byte [esi + ecx], bl
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x134]
push ecx
call fcn.00406ce0
add esp, 0x14
test eax, eax
jne 0x4017cb
lea edx, [esp + 0x10]
lea eax, [esp + 0x12a]
push edx
push 0x40850c
push eax
call fcn.00402250
add esp, 0xc
lea ecx, [esp + 0x10]
push 4
push ecx
push 4
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x1f8]
push ebx
push edx
push eax
call ebp
test eax, eax
jne 0x401860
jmp 0x40180c
lea edi, [esp + 0x124]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
dec ecx
jne 0x4017ed
lea ecx, [esp + 0x125]
push 0x14
push ecx
push 1
jmp 0x4017b1
mov eax, dword [esp + 0x14]
push ecx
lea ecx, [esp + 0x129]
lea edx, [esp + 0x1f0]
push ecx
push 1
push ebx
push edx
push eax
call ebp
test eax, eax
jne 0x401860
mov esi, dword [esp + 0x18]
lea ecx, [esp + 0x24]
push esi
push 0x100
push ecx
call fcn.0040235c
add esp, 0xc
test eax, eax
jne 0x4014af
push esi
call fcn.004021fa
lea edx, [esp + 0x448]
push edx
call fcn.004021d0
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x598
ret
push ebx
push 0x408050
push str.Write_key_error_
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x598
ret