Function at 0x415080
Capabilities:
Encrypt or decrypt via wincrypt
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x44a2c8
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x45e520]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
push esi
push edi
mov eax, dword [0x45e520]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0x12c], ebx
mov dword [esp + 0x28], esi
je 0x4153cb
mov eax, dword [esi + 0x12c]
mov ecx, dword [eax]
lea edx, [esp + 0x30]
push edx
push eax
mov eax, dword [ecx + 0x88]
call eax
mov edi, dword [esp + 0x30]
lea ecx, [esp + 0x20]
push ecx
call fcn.004148a0
mov dword [esp + 0x60], ebx
mov esi, dword [eax]
cmp esi, ebx
je 0x41510e
cmp dword [esi + 4], ebx
jne 0x415109
mov edx, dword [esi]
push edx
call fcn.00448600
mov dword [esi + 4], eax
mov esi, dword [esi + 4]
jmp 0x415110
xor esi, esi
mov eax, esi
mov dword [esp + 0x4c], 0xf
mov dword [esp + 0x48], ebx
mov byte [esp + 0x38], 0
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x415126
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x3c]
call fcn.004024f0
mov byte [esp + 0x60], 2
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x415183
mov esi, eax
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp eax, ebx
jne 0x415183
cmp esi, ebx
je 0x415183
mov eax, dword [esi]
cmp eax, ebx
je 0x41516a
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x41517a
push eax
call fcn.00416c01
add esp, 4
push esi
call fcn.00416c01
add esp, 4
mov ebx, dword [esp + 0x48]
xor edi, edi
cmp ebx, edi
jne 0x4151a2
cmp dword [esp + 0x4c], 0x10
jb 0x4153cb
mov eax, dword [esp + 0x38]
push eax
jmp 0x4153c3
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
mov eax, dword [esp + 0x28]
mov byte [esp + 0x60], 3
mov ecx, dword [eax + 0x10c]
push ecx
add eax, 8
push eax
lea esi, [esp + 0x20]
call fcn.00416b00
test eax, eax
je 0x415396
mov eax, dword [esp + 0x1c]
push edi
lea edx, [esp + 0x18]
push edx
push edi
push edi
push 1
push edi
push eax
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x415396
mov edi, dword [esp + 0x14]
cmp ebx, edi
jbe 0x4151fb
mov edi, ebx
push edi
call fcn.00432880
mov esi, eax
add esp, 4
test esi, esi
je 0x415307
cmp dword [esp + 0x4c], 0x10
mov eax, dword [esp + 0x38]
jae 0x41521d
lea eax, [esp + 0x38]
mov ecx, dword [esp + 0x48]
push ecx
push eax
push edi
push esi
call fcn.00432a79
mov eax, dword [esp + 0x2c]
add esp, 0x10
push edi
lea edx, [esp + 0x18]
push edx
push esi
push 0
push 1
push 0
push eax
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x41538b
mov eax, dword [esp + 0x28]
cmp dword [eax + 4], 0
je 0x4152e4
mov eax, dword [esp + 0x14]
call fcn.00414510
push eax
mov dword [esp + 0x30], eax
call fcn.00416bfc
mov edx, dword [esp + 0x18]
add esp, 4
lea ecx, [esp + 0x2c]
push ecx
mov ebx, eax
push edx
mov ecx, esi
mov dword [esp + 0x28], ebx
call fcn.00414590
add esp, 8
test eax, eax
je 0x4152f5
push edi
push 0
push esi
call fcn.00436440
mov ebx, dword [esp + 0x38]
add esp, 0xc
cmp edi, ebx
ja 0x4152be
push esi
call fcn.00416c01
add esp, 4
lea edi, [ebx + 1]
push edi
call fcn.00416bfc
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x20]
push ebx
push eax
push edi
push esi
call fcn.00432a79
mov ecx, dword [esp + 0x30]
push ecx
call fcn.00416c01
mov eax, dword [esp + 0x3c]
mov byte [ebx + esi], 0
add esp, 0x14
mov dword [esp + 0x14], ebx
cmp dword [eax + 0x128], 0x10
jb 0x41531e
mov eax, dword [eax + 0x114]
jmp 0x415323
push esi
call fcn.00416c01
add esp, 4
push ebx
call fcn.00416c01
add esp, 4
lea esi, [esp + 0x18]
call fcn.00416ad0
lea ecx, [esp + 0x34]
call fcn.00402120
jmp 0x4153cb
add eax, 0x114
push 0x4537b4
push eax
lea edx, [esp + 0x2c]
push edx
call fcn.00433b40
add esp, 0xc
test eax, eax
jne 0x41538b
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
push eax
push ecx
push 1
push esi
call fcn.00433cef
mov edx, dword [esp + 0x34]
push edx
mov edi, eax
call fcn.00432ebb
add esp, 0x14
push esi
mov dword [esp + 0x28], 0
call fcn.004323b2
add esp, 4
cmp edi, dword [esp + 0x14]
lea esi, [esp + 0x18]
jne 0x41530b
call fcn.00416ad0
lea ecx, [esp + 0x34]
call fcn.00402120
mov eax, 1
jmp 0x4153cd
push esi
call fcn.004323b2
add esp, 4
xor edi, edi
cmp dword [esp + 0x18], edi
je 0x4153b7
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov ecx, dword [esp + 0x18]
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov dword [esp + 0x18], edi
cmp dword [esp + 0x4c], 0x10
jb 0x4153cb
mov edx, dword [esp + 0x38]
push edx
call fcn.00416c01
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.004322f2
mov esp, ebp
pop ebp
ret