Function at 0x4016f6
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x424
push ebx
push esi
push edi
mov edi, 0x104
lea eax, [ebp - 0x21c]
xor ebx, ebx
push edi
push eax
mov word [ebp - 0x21c], bx
call fcn.00401d7e
test eax, eax
je 0x401772
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, ebx
mov dword [ebp - 8], eax
jbe 0x401772
mov esi, 0x40426c
mov eax, dword [ebp - 8]
push dword [esi]
mov word [ebp + eax*2 - 0x21c], bx
lea eax, [ebp - 0x21c]
push eax
call fcn.004019db
lea eax, [ebp - 0x21c]
push eax
call fcn.00401604
test eax, eax
jne 0x401866
add esi, 4
cmp esi, 0x40427c
jb 0x40173a
mov esi, 0x4010b8
lea eax, [ebp - 0xc]
push eax
push 0x20019
push ebx
push dword [esi - 8]
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4017eb
lea eax, [ebp - 8]
mov dword [ebp - 8], edi
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
push dword [esi - 4]
push dword [ebp - 0xc]
call fcn.00401b5d
push dword [ebp - 0xc]
mov ebx, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x4017e9
cmp dword [ebp - 8], 3
jbe 0x4017e9
mov eax, dword [esi]
test eax, eax
je 0x4017d9
push eax
lea eax, [ebp - 0x21c]
push eax
call fcn.004019db
lea eax, [ebp - 0x21c]
push eax
call fcn.00401604
test eax, eax
jne 0x401864
xor ebx, ebx
add esi, 0xc
cmp esi, 0x401154
jb 0x401777
lea eax, [ebp - 0x21c]
push edi
push eax
call fcn.00401b01
test eax, eax
je 0x401828
lea eax, [ebp - 0x21c]
push 0x404688
push eax
call fcn.004019db
lea eax, [ebp - 0x21c]
push eax
call fcn.00401604
test eax, eax
jne 0x401866
lea eax, [ebp - 0x21c]
push edi
push eax
call fcn.00401b01
test eax, eax
je 0x4019d1
lea eax, [ebp - 0x21c]
push 0x40467c
push eax
call fcn.004019db
lea eax, [ebp - 0x21c]
push eax
call fcn.00401604
test eax, eax
je 0x4019d1
jmp 0x401866
xor ebx, ebx
cmp dword [0x404874], ebx
mov dword [ebp - 4], ebx
jne 0x40189d
lea eax, [ebp - 0x424]
push edi
push eax
lea eax, [ebp - 0x21c]
push eax
call fcn.00401ce9
test eax, eax
je 0x40189d
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov edi, 0x401150
mov esi, edi
push dword [esi]
push 0x80000000
call fcn.0040161a
cmp eax, ebx
jge 0x4018bc
cmp esi, edi
je 0x4019d6
add esi, 0xc
cmp esi, 0x401174
jb 0x4018a4
push 1
mov esi, 0x401180
pop edi
lea eax, [ebp - 0xc]
push eax
push dword [esi - 8]
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x401944
mov eax, dword [esi]
cmp eax, ebx
je 0x40190a
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esi]
inc eax
push eax
push ecx
push edi
push ebx
push dword [esi - 4]
mov dword [ebp - 8], eax
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x401932
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
mov dword [ebp - 8], eax
add eax, eax
push eax
lea eax, [ebp - 0x21c]
push eax
push edi
push ebx
push dword [esi - 4]
push dword [ebp - 0xc]
call fcn.00401c2f
cmp eax, ebx
je 0x401939
mov dword [ebp - 4], edi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x401947
mov dword [ebp - 4], edi
add esi, 0xc
cmp esi, 0x401600
jb 0x4018cf
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.OLEAUT32.dll_LoadRegTypeLib]
test eax, eax
jl 0x40198e
lea eax, [ebp - 0x21c]
push ebx
push eax
push dword [ebp - 0x10]
call dword [sym.imp.OLEAUT32.dll_QueryPathOfRegTypeLib]
test eax, eax
jge 0x401983
mov dword [ebp - 4], edi
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x401991
mov dword [ebp - 4], edi
push 0x404670
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebx
je 0x4019c4
push 0x40465c
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x4019b8
call eax
test eax, eax
je 0x4019bb
mov dword [ebp - 4], edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x4019c7
mov dword [ebp - 4], edi
xor eax, eax
cmp dword [ebp - 4], ebx
setne al
jmp 0x4019d6
mov eax, 0x80030003
pop edi
pop esi
pop ebx
leave
ret