Function at 0x4018b0
Capabilities:
Accept command line arguments
Check if file exists
Delete file
Delete registry key
Get common file path
Get file attributes
Get file size
Move file
Query or enumerate registry key
Query or enumerate registry value
Read file on windows
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, 0x20
sub esp, 0xec
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
movzx edx, byte [eax]
cmp dl, 0x22
jne 0x4018d9
movzx edx, byte [eax + 1]
mov ebx, 0x22
add eax, 1
mov esi, dword [sym.imp.USER32.dll_CharNextA]
cmp dl, bl
jne 0x4018f7
jmp 0x4018fb
mov dword [esp], eax
call esi
movzx edx, byte [eax]
sub esp, 4
cmp dl, bl
je 0x4018fb
test dl, dl
jne 0x4018e8
mov dword [esp], eax
call esi
mov ebx, eax
movzx eax, byte [eax]
sub esp, 4
cmp al, 0x20
jne 0x40191b
lea esi, [esi]
movzx eax, byte [ebx + 1]
add ebx, 1
cmp al, 0x20
je 0x401910
mov edx, 1
cmp al, 0x2f
jne 0x401972
cmp byte [ebx + 1], 0x53
je 0x401980
mov dword [esp], 0x8001
mov edi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
call edi
sub esp, 4
mov esi, eax
mov dword [esp], 0
call dword [sym.imp.ole32.dll_OleInitialize]
movzx eax, byte [ebx + 1]
sub esp, 4
cmp al, 0x44
je 0x401b5d
cmp al, 0x54
je 0x401d90
call dword [sym.imp.ole32.dll_OleUninitialize]
mov dword [esp], esi
call edi
xor edx, edx
sub esp, 4
add esp, 0xec
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esp + 4], 0x400
mov dword [esp], 0x40
call ebx
sub esp, 8
mov ebp, eax
mov dword [esp + 4], 0x400
mov dword [esp], 0x40
call ebx
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
sub esp, 8
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x4c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x20019
mov dword [esp + 8], 0
mov dword [esp + 4], str.SoftwareNSIS.Library.RegTool.v3
mov dword [esp], 0x80000002
call esi
sub esp, 0x14
test eax, eax
js 0x401b04
mov dword [esp + 0x30], ebx
xor edi, edi
mov dword [esp + 0x28], esi
jmp 0x401a03
add edi, 1
mov eax, dword [esp + 0x4c]
mov dword [esp + 0xc], 0x400
mov dword [esp + 8], ebp
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
sub esp, 0x10
test eax, eax
jne 0x401ad8
lea eax, [esp + 0x50]
mov dword [esp + 0xc], 0x20019
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 8], 0
mov dword [esp], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 4], ebp
call eax
sub esp, 0x14
test eax, eax
js 0x401a00
lea eax, [esp + 0x58]
lea esi, [esp + 0x5c]
mov dword [esp + 0x5c], 4
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x50]
lea ebx, [esp + 0x54]
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], str.count
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
sub esp, 0x18
test eax, eax
js 0x401aaa
cmp dword [esp + 0x54], 4
je 0x401da0
mov eax, dword [esp + 0x50]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
sub esp, 4
mov eax, dword [esp + 0x4c]
mov dword [esp + 4], ebp
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
sub esp, 8
jmp 0x401a00
mov eax, dword [esp + 0x4c]
mov ebx, dword [esp + 0x30]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
sub esp, 4
mov dword [esp + 4], str.SoftwareNSIS.Library.RegTool.v3
mov dword [esp], 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
sub esp, 8
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
sub esp, 4
mov ecx, dword [esp + 0x2c]
mov dword [esp + 8], 0x400
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edx, dword [sym.imp.KERNEL32.dll_GlobalFree]
sub esp, 0xc
test eax, eax
jne 0x401bb1
mov dword [esp + 0x28], edx
mov dword [esp], ebp
call edx
sub esp, 4
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
mov dword [esp], eax
call edx
xor edx, edx
sub esp, 4
jmp 0x401972
add ebx, 2
mov dword [esp + 8], 8
mov dword [esp], ebx
mov dword [esp + 4], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x401962
mov dword [esp + 4], str.DllRegisterServer
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
sub esp, 8
test eax, eax
je 0x401ba0
call eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
sub esp, 4
jmp 0x401962
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], 4
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov edx, dword [sym.imp.KERNEL32.dll_GlobalFree]
sub esp, 0xc
mov esi, eax
test eax, eax
jne 0x401b3a
mov eax, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [esp + 0x28], edx
mov dword [esp + 4], 0x40413f
mov dword [esp], 0x403400
mov dword [esp + 0x34], eax
call eax
sub esp, 8
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0x403800
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
sub esp, 0xc
test eax, eax
mov edx, dword [esp + 0x28]
je 0x401b3a
cmp eax, 0x400
jg 0x401b3a
mov dword [esp + 0x30], edx
mov dword [esp + 0xc], 0x403800
mov dword [esp + 8], 0x403400
mov dword [esp + 4], str._S_S_r_n
mov dword [esp], section..data
call dword [sym.imp.USER32.dll_wsprintfA]
mov dword [esp + 4], 0x3f0
mov dword [esp + 0x28], eax
mov dword [esp], 0x403800
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
sub esp, 8
mov dword [esp + 4], str.wininit.ini
mov dword [esp], 0x403800
call dword [sym.imp.KERNEL32.dll_lstrcatA]
sub esp, 8
mov dword [esp], 0x403800
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
sub esp, 4
cmp eax, 0xffffffff
cmove eax, esi
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], 4
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0xc0000000
mov dword [esp], 0x403800
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
cmp eax, 0xffffffff
mov esi, eax
mov edx, dword [esp + 0x30]
je 0x401b3a
mov dword [esp + 0x38], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
sub esp, 8
mov edi, eax
mov eax, dword [esp + 0x28]
mov dword [esp], 0x40
add eax, edi
mov dword [esp + 0x30], eax
add eax, 0xa
mov dword [esp + 4], eax
call ebx
sub esp, 8
test eax, eax
mov ebx, eax
mov edx, dword [esp + 0x38]
je 0x401d76
lea eax, [esp + 0x60]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x10], 0
mov dword [esp + 0x38], eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
mov edx, dword [esp + 0x3c]
je 0x401d76
cmp edi, dword [esp + 0x60]
je 0x401eba
mov dword [esp + 0x28], edx
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov edx, dword [esp + 0x28]
jmp 0x401b3a
add ebx, 2
mov dword [esp], ebx
call fcn.00401130
jmp 0x401962
mov eax, dword [esp + 0x58]
test eax, eax
je 0x401aaa
mov edx, 1
lea eax, [esp + 0x60]
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], ebp
mov edi, eax
mov ebp, edx
jmp 0x401dd5
add ebp, 1
cmp dword [esp + 0x58], ebp
jb 0x401ead
mov dword [esp + 8], ebp
mov dword [esp + 4], str._u.mode
mov dword [esp], edi
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x49]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x5c], 3
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
sub esp, 0x18
test eax, eax
js 0x401dc8
cmp dword [esp + 0x54], 1
jne 0x401dc8
mov dword [esp + 8], ebp
mov dword [esp + 4], str._u.file
mov dword [esp], edi
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x14], esi
mov dword [esp + 0x5c], 0x400
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
sub esp, 0x18
test eax, eax
js 0x401dc8
cmp dword [esp + 0x54], 1
jne 0x401dc8
xor eax, eax
cmp byte [esp + 0x4a], 0x58
sete al
mov dword [esp + 8], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], eax
movsx eax, byte [esp + 0x49]
mov dword [esp], eax
call fcn.004011d0
jmp 0x401dc8
mov edi, dword [esp + 0x34]
mov ebp, dword [esp + 0x38]
jmp 0x401aaa
mov dword [esp + 4], str._Rename__r_n
mov dword [esp], ebx
call fcn.00401040
lea edx, [ebx + edi]
test eax, eax
je 0x401f17
add eax, 0xa
mov dword [esp + 4], 0x404163
mov dword [esp], eax
mov dword [esp + 0x34], edx
call fcn.00401040
test eax, eax
je 0x401f37
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov edi, ebx
add ecx, ebx
cmp eax, edx
jae 0x401f0e
movzx ebx, byte [edx]
sub edx, 1
sub ecx, 1
mov byte [ecx + 1], bl
cmp eax, edx
jne 0x401efc
mov ebx, edi
sub eax, ebx
mov edi, eax
add edi, 1
jmp 0x401f37
mov dword [esp + 4], str._Rename__r_n
mov eax, dword [esp + 0x34]
add edi, 0xa
mov dword [esp], edx
call eax
push eax
push eax
mov eax, dword [esp + 0x28]
add eax, edi
mov dword [esp + 0x30], eax
add edi, ebx
xor eax, eax
cmp dword [esp + 0x28], 0
jle 0x401f57
movzx edx, byte [eax + section..data]
mov ecx, dword [esp + 0x28]
mov byte [edi + eax], dl
add eax, 1
cmp eax, ecx
jne 0x401f42
xor eax, eax
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor edx, edx
sub esp, 0x10
mov eax, dword [esp + 0x38]
mov dword [esp + 0x10], edx
mov dword [esp + 4], ebx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x30]
mov dword [esp], esi
mov dword [esp + 8], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [sym.imp.KERNEL32.dll_GlobalFree]
sub esp, 0x14
mov dword [esp + 0x28], edx
mov dword [esp], ebx
call edx
push ecx
mov edx, dword [esp + 0x28]
jmp 0x401d76