Function at 0x408b80
Capabilities:
Set registry value

Disassembly:
sub esp, 0xd14
mov eax, dword [esp + 0xd20]
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov esi, ecx
xor ebp, ebp
xor edi, edi
cmp eax, ebx
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], ebx
jle 0x408edc
jmp 0x408bbb
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0xd28]
lea ecx, [esp + 0x524]
push eax
push 0x400
push ecx
mov byte [esp + 0x530], bl
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
lea edx, [esp + 0x524]
mov ecx, esi
push edx
call fcn.00408f50
cmp byte [esp + 0x524], 0x5b
jne 0x408e30
lea eax, [esp + 0x525]
lea ecx, [esp + 0x24]
push eax
push 0x4125fc
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 0x5c
push edx
mov byte [esp + ecx + 0x37], bl
call dword [sym.imp.MSVCRT.dll_strchr]
mov ebp, eax
add esp, 0x14
cmp ebp, ebx
je 0x408ec4
lea eax, [esp + 0x24]
lea ecx, [esi + 0x4dc]
push eax
push 3
call fcn.0040c180
mov byte [ebp], bl
inc ebp
mov esi, str.HKEY_CLASSES_ROOT
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x408c84
cmp cl, bl
je 0x408c80
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x408c84
add eax, 2
add esi, 2
cmp cl, bl
jne 0x408c60
xor eax, eax
jmp 0x408c89
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x408c9a
mov dword [esp + 0x10], 0x80000000
jmp 0x408ec4
mov esi, str.HKEY_CURRENT_USER
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x408cc7
cmp cl, bl
je 0x408cc3
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x408cc7
add eax, 2
add esi, 2
cmp cl, bl
jne 0x408ca3
xor eax, eax
jmp 0x408ccc
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x408cdd
mov dword [esp + 0x10], 0x80000001
jmp 0x408ec4
mov esi, str.HKEY_LOCAL_MACHINE
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x408d0a
cmp cl, bl
je 0x408d06
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x408d0a
add eax, 2
add esi, 2
cmp cl, bl
jne 0x408ce6
xor eax, eax
jmp 0x408d0f
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x408d20
mov dword [esp + 0x10], 0x80000002
jmp 0x408ec4
mov esi, str.HKEY_USERS
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x408d4d
cmp cl, bl
je 0x408d49
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x408d4d
add eax, 2
add esi, 2
cmp cl, bl
jne 0x408d29
xor eax, eax
jmp 0x408d52
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x408d63
mov dword [esp + 0x10], 0x80000003
jmp 0x408ec4
mov esi, str.HKEY_PERFORMANCE_DATA
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x408d90
cmp cl, bl
je 0x408d8c
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x408d90
add eax, 2
add esi, 2
cmp cl, bl
jne 0x408d6c
xor eax, eax
jmp 0x408d95
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x408da6
mov dword [esp + 0x10], 0x80000004
jmp 0x408ec4
mov esi, str.HKEY_CURRENT_CONFIG
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x408dd3
cmp cl, bl
je 0x408dcf
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x408dd3
add eax, 2
add esi, 2
cmp cl, bl
jne 0x408daf
xor eax, eax
jmp 0x408dd8
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x408de9
mov dword [esp + 0x10], 0x80000005
jmp 0x408ec4
mov esi, str.HKEY_DYN_DATA
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x408e16
cmp cl, bl
je 0x408e12
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x408e16
add eax, 2
add esi, 2
cmp cl, bl
jne 0x408df2
xor eax, eax
jmp 0x408e1b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x408ec4
mov dword [esp + 0x10], 0x80000006
jmp 0x408ec4
lea eax, [esp + 0x18]
lea ecx, [esp + 0x924]
push eax
lea edx, [esp + 0x428]
push ecx
lea eax, [esp + 0x52c]
push edx
push eax
mov ecx, esi
call fcn.00408fa0
cmp edi, ebx
je 0x408ec4
lea ecx, [esp + 0x14]
push ecx
push ebp
push edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x408eee
cmp dword [esp + 0x18], 1
jne 0x408eb9
lea edx, [esp + 0x924]
push edx
call dword [sym.imp.MSVCRT.dll_atoi]
lea edi, [esp + 0x928]
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x924]
not ecx
dec ecx
push ecx
push eax
push 1
lea ecx, [esp + 0x430]
push ebx
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x408f2e
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0xd30]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jl 0x408bb3
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xd14
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x408f1a
push ebx
push 0x4125d4
push 0x4131f8
mov ecx, esi
call sub.MFC42.DLL_CWnd::MessageBoxA
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd14
ret 0xc
call fcn.00403c20
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd14
ret 0xc
call fcn.00403c20
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd14
ret 0xc