Function at 0x401612
Capabilities:
Accept command line arguments
Delete registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x120
push ebx
push ebp
push esi
push edi
push 0x20
pop ebp
mov edi, ebp
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edx, eax
push 0x22
pop eax
movzx ecx, word [edx]
mov ebx, ecx
mov esi, ecx
cmp cx, ax
jne 0x40163e
movzx esi, word [edx + 2]
mov edi, eax
push 0x22
pop ecx
cmp bx, cx
lea eax, [edx + 2]
mov ebx, dword [sym.imp.USER32.dll_CharNextW]
cmovne eax, edx
test si, si
je 0x40166a
movzx edx, si
cmp dx, di
je 0x40166a
push eax
call ebx
movzx ecx, word [eax]
mov edx, ecx
test cx, cx
jne 0x401658
push eax
call ebx
mov esi, eax
movzx ecx, word [esi]
mov eax, ecx
cmp cx, bp
jne 0x401684
add esi, 2
movzx eax, word [esi]
cmp ax, bp
je 0x401679
cmp ax, 0x2f
je 0x401692
xor eax, eax
inc eax
jmp 0x4018cb
cmp word [esi + 2], 0x53
jne 0x401886
mov esi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, 0x800
push ebp
push 0x40
call esi
push ebp
push 0x40
mov ebx, eax
call esi
mov edi, eax
lea eax, [esp + 0x18]
push eax
push 0x20019
push 0
push str.SoftwareNSIS.Library.RegTool.v3
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
js 0x40185c
push 0x400
xor esi, esi
push ebx
push esi
push dword [esp + 0x24]
mov dword [esp + 0x30], esi
call fcn.004010c6
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40183b
lea eax, [esp + 0x1c]
push eax
push 0x20019
push 0
push ebx
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
js 0x401826
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 4
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x1c]
push eax
push 0
push 0x4020e0
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
js 0x401814
cmp dword [esp + 0x14], 4
jne 0x401814
xor esi, esi
inc esi
cmp dword [esp + 0x24], esi
jb 0x401810
push esi
lea eax, [esp + 0x34]
push 0x402144
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
mov dword [esp + 0x10], 6
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x1c]
push eax
push 0
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
js 0x401805
cmp dword [esp + 0x14], 1
jne 0x401805
push esi
lea eax, [esp + 0x34]
push 0x40215c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
mov dword [esp + 0x10], 0x800
lea eax, [esp + 0x10]
push eax
push edi
lea eax, [esp + 0x1c]
push eax
push 0
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
js 0x401805
cmp dword [esp + 0x14], 1
jne 0x401805
xor eax, eax
cmp word [esp + 0x2a], 0x58
sete al
push eax
push edi
push dword [esp + 0x30]
call fcn.00401230
add esp, 0xc
inc esi
cmp esi, dword [esp + 0x24]
jbe 0x401762
mov esi, dword [esp + 0x20]
push dword [esp + 0x1c]
call ebp
push ebx
push dword [esp + 0x1c]
call fcn.00401040
pop ecx
pop ecx
push 0x400
inc esi
push ebx
push esi
push dword [esp + 0x24]
mov dword [esp + 0x30], esi
call fcn.004010c6
add esp, 0x10
test eax, eax
je 0x4016fb
push dword [esp + 0x18]
call ebp
push str.SoftwareNSIS.Library.RegTool.v3
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push 0x400
push edi
push 0x400000
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x401878
push edi
call fcn.00401022
pop ecx
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call esi
push edi
call esi
jmp 0x4018c9
mov edi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x8001
call edi
push 0
mov ebx, eax
call dword [sym.imp.ole32.dll_OleInitialize]
movzx ecx, word [esi + 2]
cmp ecx, 0x44
jne 0x4018b1
lea ecx, [esi + 4]
push ecx
call fcn.0040107f
jmp 0x4018bf
cmp ecx, 0x54
jne 0x4018c0
lea eax, [esi + 4]
push eax
call fcn.00401930
pop ecx
call dword [sym.imp.ole32.dll_OleUninitialize]
push ebx
call edi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret