Function at 0x401c10
Capabilities:
Check os version
Create process on windows
Delete file
Get common file path
Query or enumerate registry value
Read .ini file
Set registry value

Disassembly:
sub esp, 0xd94
push ebx
push ebp
push esi
lea eax, [esp + 0x388]
push edi
push eax
push 0x104
mov byte [esp + 0x59c], 0
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [esp + 0x38c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [esp + eax + 0x38b], 0x5c
jne 0x401c6f
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [esp + 0x38c]
push edx
lea eax, [esp + 0x1f8]
push 0x40708c
push eax
call ebx
add esp, 0xc
jmp 0x401c93
lea ecx, [esp + 0x38c]
lea edx, [esp + 0x1f4]
push ecx
push 0x40707c
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
xor esi, esi
mov dword [esp + 0x10], esi
push esi
lea eax, [esp + 0x34]
push 0x4070b4
push eax
call ebx
add esp, 0xc
lea ecx, [esp + 0x1f4]
lea edx, [esp + 0xa0]
lea eax, [esp + 0x30]
push ecx
push 0x104
push edx
push 0x409680
push eax
push 0x4070ac
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov al, byte [esp + 0xa0]
test al, al
je 0x401ce1
inc esi
jmp 0x401c99
test esi, esi
mov dword [esp + 0x10], esi
je 0x402228
xor esi, esi
mov dword [esp + 0x18], esi
jmp 0x401cfb
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x24]
push ecx
push edx
push 0
push 0
push 2
push 0
push 2
call sub.WINSPOOL.DRV_EnumPrintersA
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
cmp eax, 0x7a
jne 0x401e8e
mov eax, dword [esp + 0x24]
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
lea ecx, [esp + 0x2c]
mov ebx, eax
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x24]
push ecx
push edx
push eax
push ebx
push 2
push 0
push 2
call sub.WINSPOOL.DRV_EnumPrintersA
test eax, eax
je 0x402228
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
cmp eax, ecx
jne 0x401d98
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 5
jbe 0x401cf5
jmp 0x402228
xor ecx, ecx
cmp eax, ecx
mov dword [esp + 0x10], ecx
jbe 0x401e7a
mov dword [esp + 0x18], ecx
lea ecx, [ebx + 4]
mov dword [esp + 0x1c], ecx
xor esi, esi
push esi
lea edx, [esp + 0x34]
push 0x4070b4
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x1f4]
lea ecx, [esp + 0xa0]
lea edx, [esp + 0x30]
push eax
push 0x104
push ecx
push 0x409680
push edx
push 0x4070ac
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esp + 0x1f4]
lea ecx, [esp + 0x30]
push eax
push 0
push ecx
push 0x4070ac
call ebp
mov al, byte [esp + 0xa0]
test al, al
je 0x401e4f
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0xa0]
mov eax, dword [edx]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x401e2e
inc esi
jmp 0x401db3
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
inc eax
add edx, 0x54
cmp eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], edx
jae 0x401e7a
jmp 0x401db1
mov ecx, dword [esp + 0x10]
lea eax, [ecx*8]
sub eax, ecx
lea ecx, [esp + 0xa0]
lea edx, [eax + eax*2]
mov eax, dword [ebx + edx*4 + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [esp + 0x18], 1
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [esp + 0x2f8]
mov dword [esp + 0x2f8], 0x94
push edx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x308], 2
jne 0x401ec6
mov esi, dword [esp + 0x2fc]
mov eax, 4
cmp eax, esi
sbb eax, eax
neg eax
inc eax
jmp 0x401ec8
xor eax, eax
cmp dword [esp + 0x18], 1
jne 0x402228
test eax, eax
jne 0x402144
lea ecx, [esp + 0x50]
mov dword [esp + 0x54], eax
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0xa4]
push edx
push eax
mov dword [esp + 0x5c], 0x4070b8
mov dword [esp + 0x64], 0xf000c
call sub.WINSPOOL.DRV_OpenPrinterA
test eax, eax
je 0x402004
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x9a8]
push 0
push edx
push 2
push eax
call sub.WINSPOOL.DRV_GetPrinterA
mov ecx, dword [esp + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ecx
push 8
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [esp + 0x14]
mov esi, eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x20]
push edx
push eax
push esi
push 2
push ecx
call sub.WINSPOOL.DRV_GetPrinterA
test eax, eax
jne 0x401f6c
push esi
push eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x401fee
mov edx, dword [esi + 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
push 0x407140
push edx
call ebx
test eax, eax
je 0x401f90
mov eax, dword [esi + 0xc]
push 0x40709c
push eax
call ebx
test eax, eax
jne 0x401fd0
lea ecx, [esp + 0x1f4]
lea edx, [esp + 0x594]
push ecx
push 0x104
push edx
push 0x409680
push 0x407138
push 0x407130
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esp + 0x1f4]
push eax
push 0
push 0x407138
push 0x407130
call ebp
mov ebp, dword [esi + 0x34]
push 0
or ebp, 4
push esi
mov dword [esi + 0x34], ebp
mov ecx, dword [esp + 0x1c]
push 2
push ecx
call sub.WINSPOOL.DRV_SetPrinterA
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [esp + 0x14]
push edx
call sub.WINSPOOL.DRV_ClosePrinter
mov al, byte [esp + 0x594]
test al, al
je 0x402228
lea eax, [esp + 0x28]
push eax
push 0xf003f
push 0
push 0x407030
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402228
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
xor esi, esi
push esi
lea ecx, [esp + 0x1a8]
push 0x407120
push ecx
call ebx
add esp, 0xc
lea edx, [esp + 0x4c]
lea eax, [esp + 0x698]
lea ecx, [esp + 0x48]
push edx
push eax
mov eax, dword [esp + 0x30]
push ecx
lea edx, [esp + 0x1b0]
push 0
push edx
push eax
inc esi
mov dword [esp + 0x64], 0x104
mov dword [esp + 0x60], 1
call edi
test eax, eax
je 0x40203f
lea ecx, [esp + 0x1f4]
lea edx, [esp + 0x490]
push ecx
push 0x104
push edx
push 0x409680
push 0x40711c
push 0x407130
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [esp + 0x490]
push eax
call esi
cmp eax, 1
jle 0x402134
mov cl, byte [esp + eax + 0x48f]
lea eax, [esp + eax + 0x48f]
cmp cl, 0x5c
jne 0x4020df
mov byte [eax], 0
lea ecx, [esp + 0x594]
lea edx, [esp + 0xa0]
push ecx
lea eax, [esp + 0x494]
push edx
push eax
lea ecx, [esp + 0x7a8]
push 0x407100
push ecx
call ebx
add esp, 0x14
lea edx, [esp + 0x79c]
push edx
call esi
mov edx, dword [esp + 0x28]
inc eax
push eax
lea eax, [esp + 0x7a0]
push eax
push 1
lea ecx, [esp + 0x1b0]
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x402228
cmp eax, 1
jne 0x402180
lea ecx, [esp + 0xa0]
push ecx
push 0x4070f8
push 0x4070f0
call dword [sym.imp.KERNEL32.dll_WriteProfileStringA]
push 0
push 0x3e8
push 0
push 0
push 0
push 0x1a
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageTimeoutA]
jmp 0x402228
xor edx, edx
mov ecx, 0x11
mov dword [esp + 0x38], edx
xor eax, eax
lea edi, [esp + 0x5c]
mov dword [esp + 0x3c], edx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x5c]
mov dword [esp + 0x40], edx
push eax
mov dword [esp + 0x48], edx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
lea ecx, [esp + 0x8a0]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edx, [esp + 0xa0]
lea eax, [esp + 0x698]
push edx
push 0x4070bc
push eax
call ebx
add esp, 0xc
lea ecx, [esp + 0x38]
lea edx, [esp + 0x5c]
lea eax, [esp + 0x8a0]
push ecx
push edx
push eax
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x6b4]
push 0
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x402228
mov edx, dword [esp + 0x3c]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x38]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x3c]
push ecx
call esi
lea edx, [esp + 0x1f4]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
call fcn.00402600
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd94
ret