Function at 0x401850
Capabilities:
Set registry value

Disassembly:
sub esp, 0x4a0
push ebx
push ebp
push esi
push edi
push 4
push 0x1000
xor ebx, ebx
push 0x2808
mov dword [esp + 0x2c], ecx
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
xor eax, eax
mov ecx, 0xa00
push 0x85
rep stosd dword es:[edi], eax
call fcn.00401800
mov edx, eax
mov al, byte [0x40494c]
mov byte [esp + 0x30], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x31]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, byte [edx]
add esp, 4
cmp al, bl
mov dword [esp + 0x14], ebx
je 0x401c41
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [esp + 0x1c], edx
mov ecx, dword [esp + 0x14]
lea eax, [esp + ecx + 0x2c]
mov cl, byte [edx]
cmp cl, 0xa
mov byte [eax], cl
je 0x4018d8
inc dword [esp + 0x14]
jmp 0x401c30
mov byte [eax], bl
mov dl, byte [esp + 0x2c]
cmp dl, 0x5b
mov dword [esp + 0x14], ebx
je 0x4018f0
cmp dl, 0x22
jne 0x401c30
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x2b], 0xa
je 0x40191a
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x2b], 0xd
jne 0x401930
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x2b], bl
mov dl, byte [esp + 0x2c]
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x2b], 0x5d
je 0x40195a
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x2b], 0x22
jne 0x401970
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x2b], bl
mov dl, byte [esp + 0x2c]
cmp dl, 0x5b
jne 0x401ac6
mov dl, byte [0x40494c]
mov ecx, 0x31
xor eax, eax
lea edi, [esp + 0x2bd]
mov byte [esp + 0x2bc], dl
mov byte [esp + 0x384], 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 + 0x385]
lea edx, [esp + 0x2c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x5c
push edx
stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll_strchr]
mov edx, eax
lea edi, [esp + 0x35]
or ecx, 0xffffffff
xor eax, eax
add esp, 8
lea esi, [esp + 0x2bc]
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 + 0x2bc]
sub esi, ecx
lea edi, [esp + 0x2bc]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [edx + 1]
lea edx, [esp + 0x384]
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 + 0x2bc]
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 0x401a6f
cmp cl, bl
je 0x401a6b
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x401a6f
add eax, 2
add esi, 2
cmp cl, bl
jne 0x401a4b
xor eax, eax
jmp 0x401a74
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x401a8c
mov ecx, dword [esp + 0x20]
push ebx
lea eax, [esp + 0x30]
push str.only_can_write_HKEY_CURRENT_USER
push eax
call sub.MFC42.DLL_CWnd::MessageBoxA
lea ecx, [esp + 0x28]
lea edx, [esp + 0x18]
push ecx
push edx
push ebx
push 0xf003f
lea eax, [esp + 0x45c]
push ebx
push eax
lea ecx, [esp + 0x39c]
push ebx
push ecx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x401c4e
jmp 0x401c30
cmp dl, 0x22
jne 0x401c30
mov dl, byte [0x40494c]
mov ecx, 0x31
xor eax, eax
lea edi, [esp + 0x12d]
mov byte [esp + 0x12c], dl
mov byte [esp + 0x1f4], 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 + 0x1f5]
lea edx, [esp + 0x2c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x404838
push edx
stosb byte es:[edi], al
mov dword [esp + 0x18], ebx
call dword [sym.imp.MSVCRT.dll_strstr]
mov edx, eax
lea edi, [esp + 0x35]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea esi, [esp + 0x134]
mov eax, ecx
mov dword [esp + 0x2c], esi
mov esi, edi
mov edi, dword [esp + 0x2c]
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 + 0x138]
sub esi, ecx
lea edi, [esp + 0x138]
or ecx, 0xffffffff
push str.dword:
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [edx + 2]
lea edx, [esp + 0x204]
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 + 0x204]
push ecx
call dword [sym.imp.MSVCRT.dll__strnicmp]
add esp, 0x14
test eax, eax
jne 0x401bef
lea edx, [esp + 0x10]
lea eax, [esp + 0x1fa]
push edx
push 0x40482c
push eax
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0xc
lea ecx, [esp + 0x10]
push 4
push ecx
push 4
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x138]
push ebx
push edx
push eax
call ebp
test eax, eax
jne 0x401c62
jmp 0x401c30
lea edi, [esp + 0x1f4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
dec ecx
jne 0x401c11
lea ecx, [esp + 0x1f5]
push 0x14
push ecx
push 1
jmp 0x401bd9
mov eax, dword [esp + 0x18]
push ecx
lea ecx, [esp + 0x1f9]
lea edx, [esp + 0x130]
push ecx
push 1
push ebx
push edx
push eax
call ebp
test eax, eax
jne 0x401c62
mov edx, dword [esp + 0x1c]
inc edx
mov dword [esp + 0x1c], edx
cmp byte [edx], bl
jne 0x4018be
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4a0
ret
mov ecx, dword [esp + 0x20]
push ebx
push 0x404828
push str.Write_key_error_
call sub.MFC42.DLL_CWnd::MessageBoxA
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x4a0
ret