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

Disassembly:
sub esp, 0x98
push ebx
push esi
mov bh, 0x20
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edx, eax
mov bl, byte [edx]
mov cl, bl
cmp bl, 0x22
jne 0x4013a9
mov cl, byte [edx + 1]
mov bh, bl
mov esi, dword [sym.imp.USER32.dll_CharNextA]
lea eax, [edx + 1]
cmp bl, 0x22
cmovne eax, edx
jmp 0x4013c3
cmp cl, bh
je 0x4013c7
push eax
call esi
mov cl, byte [eax]
test cl, cl
jne 0x4013ba
push eax
call esi
mov esi, eax
jmp 0x4013cf
inc esi
mov al, byte [esi]
cmp al, 0x20
je 0x4013ce
cmp al, 0x2f
je 0x4013e1
xor eax, eax
inc eax
jmp 0x401609
cmp byte [esi + 1], 0x53
push edi
jne 0x4015c4
mov esi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push ebp
mov ebp, 0x400
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 0x40159d
push 0x400
xor ebp, ebp
push ebx
push ebp
jmp 0x40156a
lea eax, [esp + 0x1c]
push eax
push 0x20019
push 0
push ebx
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
js 0x401562
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 str.count
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
js 0x40154c
cmp dword [esp + 0x14], 4
jne 0x40154c
xor esi, esi
inc esi
cmp dword [esp + 0x24], esi
jb 0x40154c
push esi
lea eax, [esp + 0x2c]
push str._u.mode
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov dword [esp + 0x10], 3
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x1c]
push eax
push 0
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
js 0x401541
cmp dword [esp + 0x14], 1
jne 0x401541
push esi
lea eax, [esp + 0x2c]
push str._u.file
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov dword [esp + 0x10], 0x400
lea eax, [esp + 0x10]
push eax
push edi
lea eax, [esp + 0x1c]
push eax
push 0
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
js 0x401541
cmp dword [esp + 0x14], 1
jne 0x401541
xor eax, eax
cmp byte [esp + 0x21], 0x58
sete al
push eax
push edi
push dword [esp + 0x28]
call fcn.004010dd
add esp, 0xc
inc esi
cmp esi, dword [esp + 0x24]
jbe 0x40149f
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
push dword [esp + 0x1c]
call fcn.00401031
pop ecx
pop ecx
push 0x400
inc ebp
push ebx
push ebp
push dword [esp + 0x24]
call fcn.004010af
add esp, 0x10
test eax, eax
je 0x401438
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.SoftwareNSIS.Library.RegTool.v3
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov ebp, 0x400
push ebp
push edi
push 0x400000
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
pop ebp
test eax, eax
je 0x4015b6
push edi
call fcn.00401000
pop ecx
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call esi
push edi
call esi
jmp 0x401606
mov edi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x8001
call edi
push 0
mov ebx, eax
call dword [sym.imp.ole32.dll_OleInitialize]
mov cl, byte [esi + 1]
cmp cl, 0x44
jne 0x4015ee
lea ecx, [esi + 2]
push ecx
call fcn.0040104f
jmp 0x4015fc
cmp cl, 0x54
jne 0x4015fd
lea eax, [esi + 2]
push eax
call fcn.004018d6
pop ecx
call dword [sym.imp.ole32.dll_OleUninitialize]
push ebx
call edi
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x98
ret