Function at 0x4017f0
Capabilities:
Copy file
Create process on windows
Delete file
Persist via path registry key
Query or enumerate registry value
Read .ini file
Self delete
Set registry value

Disassembly:
mov eax, 0x10684
call fcn.00402eb0
push ebx
push ebp
mov ebp, dword [esp + 0x10690]
cmp ebp, 0xff
push esi
push edi
jne 0x40181a
mov ebp, dword [0x40a034]
mov dword [esp + 0x10698], ebp
push ebp
push 0x40a884
push 0x40a5f8
call fcn.00401370
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esp, 0xc
push str.Files
lea ecx, [esp + 0x60]
lea eax, [esp + 0x8698]
push ecx
mov dword [esp + 0x18], eax
call ebx
mov edx, dword [ebp*4 + 0x40a038]
push edx
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x40a2e0
push 0x7fff
lea ecx, [esp + 0x69c]
push ecx
lea edx, [esp + 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionA]
mov dword [esp + 0x18], eax
push 0x40a4f0
lea eax, [esp + 0x288]
lea edi, [esp + 0x698]
push eax
mov esi, edi
mov dword [esp + 0x24], 0
call ebx
mov al, byte [esp + 0x694]
test al, al
je 0x401a3e
lea ecx, [ecx]
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x694]
sub edi, ecx
cmp edi, eax
jge 0x401a3e
mov al, byte [esi]
cmp al, 0x3b
mov dword [esp + 0x14], 0
jne 0x4018e0
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x4018d3
jmp 0x401a11
test al, al
je 0x401a11
cmp al, 0x3d
je 0x4018f9
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x4018e8
jmp 0x401a11
cmp byte [esi], 0
je 0x401a11
mov al, byte [esi + 1]
inc esi
cmp al, 0x20
jne 0x401918
lea ebx, [ebx]
mov al, byte [esi + 1]
inc esi
cmp al, 0x20
je 0x401910
mov edx, dword [0x40a6fc]
push esi
lea eax, [esp + edx + 0x288]
push eax
call ebx
lea ecx, [esp + 0x284]
push ecx
push 0x40a4f0
call dword [sym.imp.SHLWAPI.dll_PathCanonicalizeA]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + esi - 1]
cmp edi, esi
jbe 0x401961
jmp 0x401950
cmp byte [edi], 0x5c
je 0x40195c
dec edi
cmp edi, esi
ja 0x401950
jmp 0x401961
cmp edi, esi
jbe 0x401961
inc edi
mov edx, dword [0x40a884]
push edi
lea eax, [edx + 0x40a5f8]
push eax
mov esi, edi
call ebx
mov eax, dword [esp + 0x10]
lea ebp, [esp + 0x8694]
mov ecx, ebp
cmp ecx, eax
jae 0x4019a5
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x401a6b
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebp, [eax + ebp + 1]
cmp ebp, dword [esp + 0x10]
jb 0x401984
mov edx, dword [esp + 0x10]
push edi
push edx
call ebx
push 0
push 0x40a5f8
push 0x40a4f0
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov ebp, eax
test ebp, ebp
mov eax, 0x40756c
jne 0x4019cf
mov eax, str.Failed
push eax
push 0x40a5f8
push 0x40a4f0
push str.Copying:_s____s____s_r_n
call fcn.004010a0
add esp, 0x10
test ebp, ebp
jne 0x4019f5
or dword [0x40a88c], 0x10000010
cmp byte [edi], 0
je 0x401a11
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
inc esi
test ecx, ecx
jne 0x401a08
inc eax
cmp byte [esi], 0
jne 0x401a02
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
inc esi
test eax, eax
jne 0x401a2c
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
inc ecx
inc eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], eax
cmp byte [esi], 0
mov ebp, dword [esp + 0x10698]
mov edi, esi
jne 0x4018b0
test ebp, ebp
mov eax, dword [0x40a884]
mov ecx, dword [0x40a6fc]
mov edx, dword [esp + 0x10]
mov byte [eax + 0x40a5f8], 0
mov byte [ecx + 0x40a4f0], 0
mov byte [edx], 0
je 0x401a75
lea eax, [ebp + 1]
mov dword [esp + 0x20], eax
jmp 0x401a7d
mov dword [esp + 0x14], 1
jmp 0x4019f5
mov dword [esp + 0x20], 0
test ebp, ebp
mov dword [esp + 0x24], 0x40a3e8
mov dword [esp + 0x28], str.Windows_NT_x86
jne 0x401a99
mov dword [esp + 0x28], str.Windows_4.0
push 0x40a5f8
lea ecx, [esp + 0x594]
push ecx
call ebx
mov ebp, dword [0x40a884]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0x40a2e0
mov edx, 0x104
sub edx, ebp
push edx
lea eax, [esp + 0x84]
push eax
push 0x407a9f
push str.DriverFile
lea ecx, [esp + 0x70]
push ecx
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x7c]
push edx
mov edi, eax
call ebp
lea eax, [esp + eax + 0x7b]
lea ecx, [esp + 0x7c]
cmp eax, ecx
jbe 0x401b0e
cmp byte [eax], 0x5c
je 0x401b05
dec eax
lea edx, [esp + 0x7c]
cmp eax, edx
ja 0x401af5
jmp 0x401b0e
lea ecx, [esp + 0x7c]
cmp eax, ecx
jbe 0x401b0e
inc eax
mov edx, dword [0x40a884]
push eax
lea eax, [esp + edx + 0x594]
push eax
call ebx
test edi, edi
je 0x401b30
lea ecx, [esp + 0x590]
mov dword [esp + 0x2c], ecx
jmp 0x401b38
mov dword [esp + 0x2c], 0x407a9f
push 0x40a5f8
lea edx, [esp + 0x490]
push edx
call ebx
mov ecx, dword [0x40a884]
push 0x40a2e0
mov eax, 0x104
sub eax, ecx
push eax
lea ecx, [esp + 0x84]
push ecx
push 0x407a9f
push str.DataFile
lea edx, [esp + 0x70]
push edx
call esi
mov edi, eax
lea eax, [esp + 0x7c]
push eax
call ebp
lea eax, [esp + eax + 0x7b]
lea ecx, [esp + 0x7c]
cmp eax, ecx
jbe 0x401ba1
cmp byte [eax], 0x5c
je 0x401b98
dec eax
lea edx, [esp + 0x7c]
cmp eax, edx
ja 0x401b88
jmp 0x401ba1
lea ecx, [esp + 0x7c]
cmp eax, ecx
jbe 0x401ba1
inc eax
mov edx, dword [0x40a884]
push eax
lea eax, [esp + edx + 0x490]
push eax
call ebx
test edi, edi
je 0x401bc3
lea ecx, [esp + 0x48c]
mov dword [esp + 0x30], ecx
jmp 0x401bcb
mov dword [esp + 0x30], 0x407a9f
push 0x40a5f8
lea edx, [esp + 0x184]
push edx
call ebx
mov ecx, dword [0x40a884]
push 0x40a2e0
mov eax, 0x104
sub eax, ecx
push eax
lea ecx, [esp + 0x84]
push ecx
push 0x407a9f
push str.ConfigFile
lea edx, [esp + 0x70]
push edx
call esi
mov edi, eax
lea eax, [esp + 0x7c]
push eax
call ebp
lea eax, [esp + eax + 0x7b]
lea ecx, [esp + 0x7c]
cmp eax, ecx
jbe 0x401c39
jmp 0x401c20
cmp byte [eax], 0x5c
je 0x401c30
dec eax
lea edx, [esp + 0x7c]
cmp eax, edx
ja 0x401c20
jmp 0x401c39
lea ecx, [esp + 0x7c]
cmp eax, ecx
jbe 0x401c39
inc eax
mov edx, dword [0x40a884]
push eax
lea eax, [esp + edx + 0x184]
push eax
call ebx
test edi, edi
je 0x401c5b
lea ecx, [esp + 0x180]
mov dword [esp + 0x34], ecx
jmp 0x401c63
mov dword [esp + 0x34], 0x407a9f
push 0x40a5f8
lea edx, [esp + 0x38c]
push edx
call ebx
mov edx, dword [0x40a884]
push 0x40a2e0
mov eax, 0x104
sub eax, edx
push eax
lea ecx, [esp + 0x84]
push ecx
push 0x407a9f
push str.HelpFile
lea edx, [esp + 0x70]
push edx
call esi
mov esi, eax
lea eax, [esp + 0x7c]
push eax
call ebp
lea eax, [esp + eax + 0x7b]
lea ecx, [esp + 0x7c]
cmp eax, ecx
jbe 0x401ccc
cmp byte [eax], 0x5c
je 0x401cc3
dec eax
lea edx, [esp + 0x7c]
cmp eax, edx
ja 0x401cb3
jmp 0x401ccc
lea ecx, [esp + 0x7c]
cmp eax, ecx
jbe 0x401ccc
inc eax
mov edx, dword [0x40a884]
push eax
lea eax, [esp + edx + 0x38c]
push eax
call ebx
test esi, esi
je 0x401cee
lea ecx, [esp + 0x388]
mov dword [esp + 0x38], ecx
jmp 0x401cf6
mov dword [esp + 0x38], 0x407a9f
mov eax, dword [0x40a034]
xor ebp, ebp
mov esi, 2
cmp eax, esi
lea edx, [esp + 0x8694]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], ebp
mov dword [esp + 0x44], 0x40a2c0
jne 0x401fd0
mov ecx, dword [0x40a894]
cmp ecx, ebp
jne 0x401d52
push str.Procedure_AddPrinterDriverEx_not_loaded_r_n
call fcn.004010a0
mov eax, dword [0x40a88c]
add esp, 4
pop edi
pop esi
or eax, 0xe
pop ebp
mov dword [0x40a88c], eax
xor eax, eax
pop ebx
add esp, 0x10684
ret
mov eax, dword [0x40a898]
test ah, 0x10
mov eax, dword [0x40a044]
jne 0x401d66
mov eax, 8
push eax
lea eax, [esp + 0x24]
push eax
push 3
push 0
call ecx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call ebx
mov ebp, eax
cmp ebp, 0x7e
jne 0x401f07
push str.Error_ERROR_MOD_NOT_FOUND_was_encountered._It_was_described_as_KB319114_http:__support.microsoft.com_default.aspx_scidkb_en_us_319114__r_n
call fcn.004010a0
add esp, 4
push 0x11
push str.Error_during_installation_of_printer_
push str.This_Error_looks_like_KB319114__n_http:__support.microsoft.com_default.aspx_scidkb_en_us_319114__nTry_to_reboot_your_computer_and_reinstall_this_printer_once_more._nClick_Ok_to_open_specified_URL._n
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 1
jne 0x401dc5
push 0xa
push 0
push 0
push str.http:__support.microsoft.com_default.aspx_scidkb_en_us_319114
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
push 0
lea ecx, [esp + 0x18]
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SYSTEMCurrentControlSetControlSession_ManagerEnvironment
push 0x80000002
mov dword [esp + 0x38], 0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov edi, eax
test edi, edi
jne 0x401ef2
lea edx, [esp + 0x10]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x698]
push eax
lea ecx, [esp + 0x20]
push ecx
push edi
push str.Path
push edx
mov dword [esp + 0x28], 0x1000
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x10]
test eax, eax
mov dword [esp + 0x18], esi
je 0x401e37
dec eax
mov dword [esp + 0x10], eax
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
push str.__SystemRoot_System32Wbem
call ebp
mov edi, dword [sym.imp.SHLWAPI.dll_StrStrIA]
mov esi, eax
lea eax, [esp + 0x694]
dec esi
dec eax
push 0x40781d
inc eax
push eax
call edi
test eax, eax
je 0x401e79
mov cl, byte [eax + esi]
test cl, cl
je 0x401e6e
cmp cl, 0x3b
jne 0x401e55
mov al, byte [eax + esi]
test al, al
je 0x401ebb
cmp al, 0x3b
je 0x401ebb
mov eax, dword [esp + 0x10]
push str.__SystemRoot_System32Wbem
lea ecx, [esp + eax + 0x698]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x694]
push edx
call ebp
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
inc eax
push eax
lea eax, [esp + 0x698]
push eax
push ecx
push 0
push str.Path
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x40a898]
test ah, 0x10
mov eax, dword [0x40a044]
jne 0x401eda
mov eax, 8
push eax
lea ecx, [esp + 0x24]
push ecx
push 3
push 0
call dword [0x40a894]
mov edi, eax
call ebx
mov ebp, eax
jmp 0x401f07
push 0
call section..text
push eax
push str.Cant_open_Registry._Error:_s_r_n
call fcn.004010a0
add esp, 0xc
mov eax, dword [0x40a898]
test ah, 0x10
je 0x401f25
mov edx, dword [0x40a044]
push edx
push str.Flag_APD__used_in_AddPrinterDriverEx_function_call__0x_.4X__r_n
call fcn.004010a0
add esp, 8
test edi, edi
jne 0x401fdf
mov dword [esp + 0x48], str.APD_STRICT_UPGRADE
mov dword [esp + 0x4c], str.APD_STRICT_DOWNGRADE
mov dword [esp + 0x50], str.APD_COPY_ALL_FILES
mov dword [esp + 0x54], str.APD_COPY_NEW_FILES
mov dword [esp + 0x58], str.APD_COPY_FROM_DIRECTORY
mov esi, 3
lea ebx, [ebx]
push ebp
call section..text
push eax
mov eax, dword [esp + esi*4 + 0x50]
push eax
push str.AddPrinterDriverEx_with_flag__s_Error:_s_r_n
call fcn.004010a0
lea eax, [esi + 1]
xor edx, edx
mov ecx, 5
div ecx
add esp, 0x10
mov esi, edx
cmp esi, 3
je 0x401fb1
mov ecx, esi
mov edx, 1
shl edx, cl
lea eax, [esp + 0x20]
push edx
push eax
push 3
push 0
call dword [0x40a894]
mov edi, eax
call ebx
test edi, edi
mov ebp, eax
je 0x401f60
jmp 0x401fb5
test edi, edi
je 0x401fdf
push ebp
call section..text
mov ecx, dword [esp + esi*4 + 0x4c]
push eax
push ecx
push str.AddPrinterDriverEx_was_successfully_installed_with_flag__s_r_n
call fcn.004010a0
add esp, 0x10
jmp 0x401fdf
lea edx, [esp + 0x20]
push edx
push 3
push ebp
call sub.WINSPOOL.DRV_AddPrinterDriverA
mov edi, eax
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
push edi
push eax
mov eax, dword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x3c]
push edx
mov edx, dword [esp + 0x3c]
push eax
mov eax, dword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x3c]
push edx
mov edx, dword [esp + 0x3c]
push eax
push ecx
push edx
push str.drv.cVersion___d_r_ndrv.pName___s_r_ndrv.pEnvironment___s_r_ndrv.pDriverPath___s_r_ndrv.pDataFile___s_r_ndrv.pConfigFile___s_r_ndrv.pHelpFile___s_r_ndrv.pDependentFiles___s_r_ndrv.pDefaultDataType___s_r_nrezult____d___r_n
call fcn.004010a0
add esp, 0x2c
test edi, edi
jne 0x40203b
push ebp
call section..text
push eax
push str.Printer_Driver_not_installed_Error:_s_r_n
call fcn.004010a0
mov dword [0x40a888], 0xe
jmp 0x40205a
mov eax, dword [esp + 0x10698]
mov ecx, dword [eax*4 + 0x40a038]
inc ecx
push ecx
push 0x40a3e8
push str.Driver_for_Printer__s_for_Win_s_was_succefully_added_r_n
call fcn.004010a0
mov eax, dword [esp + 0x106a4]
add esp, 0xc
test eax, eax
lea esi, [esp + 0x8694]
je 0x4020f1
mov al, byte [esp + 0x8694]
test al, al
je 0x4020f1
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [esp + 0x1c]
mov edi, edi
test edi, edi
jle 0x4020f1
mov edx, dword [0x40a884]
push esi
lea eax, [edx + 0x40a5f8]
push eax
call ebx
push 0x40a5f8
call ebp
test eax, eax
jne 0x4020b9
or dword [0x40a88c], 0x10000020
cmp byte [esi], 0
je 0x4020c8
mov edi, edi
mov cl, byte [esi + 1]
inc esi
test cl, cl
jne 0x4020c0
inc esi
dec edi
test eax, eax
mov eax, 0x40756c
jne 0x4020d8
mov eax, str.Failed
push eax
push 0x40a5f8
push str.Deleting_file:_s____s_r_n
call fcn.004010a0
mov al, byte [esi]
add esp, 0xc
test al, al
jne 0x402090
mov eax, dword [0x40a888]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10684
ret