Function at 0x4da965
Capabilities:
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
push 8
call fcn.0050fbee
add esp, 4
mov dword [ebp - 0x2c], eax
mov edi, eax
mov esi, 0x537293
lodsd eax, dword [esi]
stosd dword es:[edi], eax
lodsd eax, dword [esi]
stosd dword es:[edi], eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x40], 0
cmp dword [ebp + 0x10], 0x6611
jne 0x4daa06
mov dword [ebp + 0x10], 0x660e
cmp dword [ebp + 0x10], 0x6611
je 0x4daa3e
cmp dword [ebp + 0x10], 0x660e
je 0x4daa3e
cmp dword [ebp + 0x10], 0x660f
je 0x4daa3e
cmp dword [ebp + 0x10], 0x6610
je 0x4daa3e
xor eax, eax
jmp 0x4daa43
mov eax, 1
test eax, eax
je 0x4daa57
mov dword [ebp - 4], 0x18
jmp 0x4daa5e
mov dword [ebp - 4], 1
cmp dword [ebp + 0x1c], 0
jne 0x4daa6f
mov dword [ebp + 0x1c], 1
cmp dword [ebp + 0x24], 0
jne 0x4daa80
mov dword [ebp + 0x24], 1
mov dword [ebp - 0x44], esp
push 0xf0000000
push dword [ebp - 4]
push 0x537282
push 0x537282
lea eax, [ebp - 8]
push eax
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4daabf
push 0x254
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4dab22
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 4]
push 0x537282
push 0x537282
lea eax, [ebp - 8]
push eax
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4dab0b
push 0x2af
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4dab22
mov eax, 0x537293
jmp 0x4db3ed
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
test eax, eax
je 0x4dab3e
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.0050fbee
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
push eax
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x4dab4f
push ebx
call fcn.0050fbf4
add esp, 4
pop eax
mov dword [ebp - 0xc], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
je 0x4dab6f
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.0050fbee
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
push eax
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x4dab80
push ebx
call fcn.0050fbf4
add esp, 4
pop eax
mov dword [ebp - 0x10], eax
push dword [ebp + 0x10]
push 0
push 2
push 8
call fcn.004d1cc2
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x4dabb2
push ebx
call fcn.0050fbf4
add esp, 4
pop eax
mov dword [ebp - 0x14], eax
push VariantClear
push 0
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x4dabc9
mov eax, 0x537293
push eax
push 1
mov ebx, 0x194
call fcn.00511700
add esp, 0x10
push 0x80000301
push 0
push eax
push 1
mov ebx, 0x198
call fcn.00511430
add esp, 0x10
mov dword [ebp - 0x48], eax
push dword [ebp - 0xc]
push dword [ebp - 0x48]
push dword [ebp - 0x14]
mov ecx, 3
call fcn.00402d3a
add esp, 0xc
mov dword [ebp - 0x4c], eax
mov ebx, dword [ebp - 0x48]
test ebx, ebx
je 0x4dac22
push ebx
call fcn.0050fbf4
add esp, 4
mov eax, dword [ebp - 0x4c]
push eax
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x4dac36
push ebx
call fcn.0050fbf4
add esp, 4
pop eax
mov dword [ebp - 0x18], eax
push VariantClear
push 0
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x4dac4d
mov eax, 0x537293
push eax
push 1
mov ebx, 0x194
call fcn.00511700
add esp, 0x10
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x48], esp
lea eax, [ebp - 0x1c]
push eax
push 1
push 0
push dword [ebp - 0x44]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4dac81
add eax, 8
push eax
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
nop
nop
cmp dword [ebp - 0x48], esp
je 0x4dacab
push 0x45a
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x4dacf3
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4dace9
push 0x48f
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov eax, 0x537293
jmp 0x4db3ed
push 0x80000301
push 0
push dword [ebp + 0x24]
push 1
mov ebx, 0x198
call fcn.00511430
add esp, 0x10
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x4dad26
push ebx
call fcn.0050fbf4
add esp, 4
pop eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], 4
mov dword [ebp - 0x44], esp
push 0
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4dad43
add eax, 8
push eax
push 4
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4dad72
push 0x557
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4dade6
mov dword [ebp - 0x44], esp
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4dadab
push 0x58b
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4daddc
push 0x5a5
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov eax, 0x537293
jmp 0x4db3ed
push 0x80000301
push 0
push 4
push 1
mov ebx, 0x1bc
call fcn.00511940
add esp, 0x10
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x4dae1b
push ebx
call fcn.0050fbf4
add esp, 4
pop eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], 4
mov dword [ebp - 0x44], esp
push 0
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4dae3c
add eax, 8
push eax
push 8
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4dae6b
push 0x671
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
push 0
push 0
push 0
push 0x80000301
push 0
push 3
push VariantClear
push 0
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x4dae90
mov eax, 0x537293
push eax
push 3
mov ebx, 0x19c
call fcn.00512530
add esp, 0x28
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x4c]
cmp ecx, 0x80000101
jne 0x4daec4
and eax, 0xff
jmp 0x4daf19
cmp ecx, 0x80000201
jne 0x4daecf
cwde
jmp 0x4daf19
cmp ecx, 0x80000301
je 0x4daf19
cmp ecx, 0x80000401
je 0x4daf19
mov dword [ebp - 0x54], eax
cmp ecx, 0x80000501
je 0x4daf09
cmp ecx, 0x80000601
je 0x4daf0e
push 0x6c0
push 0x4016991
push 2
call fcn.0050fc00
add esp, 0xc
fld dword [ebp - 0x54]
jmp 0x4daf14
mov dword [ebp - 0x50], edx
fld qword [ebp - 0x54]
call fcn.0040148c
mov dword [ebp - 0x28], eax
fild dword [ebp - 0x28]
fstp qword [ebp - 0x48]
fld qword [ebp - 0x48]
fdiv qword [0x5480e9]
fstp qword [ebp - 0x50]
fld qword [ebp - 0x50]
call fcn.0040148c
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x4dafaa
mov dword [ebp - 0x44], esp
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4daf6f
push 0x754
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4dafa0
push 0x76e
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov eax, 0x537293
jmp 0x4db3ed
mov eax, 0x537293
xor ecx, ecx
test eax, eax
je 0x4dafb8
mov ecx, dword [eax + 4]
push ecx
add eax, 8
push eax
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebx]
xor ebx, ebx
test eax, eax
je 0x4dafcb
mov ebx, dword [eax + 4]
add eax, 8
push eax
cmp ebx, ecx
mov eax, 1
jne 0x4dafe2
dec eax
test ecx, ecx
je 0x4dafe2
call fcn.0040e0ca
add esp, 0xc
test eax, eax
jne 0x4db028
push 0x80000301
push 0
push dword [ebp - 0x28]
push 1
mov ebx, 0x1bc
call fcn.00511940
add esp, 0x10
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp + 0x14]
mov ebx, dword [ebx]
test ebx, ebx
je 0x4db022
push ebx
call fcn.0050fbf4
add esp, 4
pop eax
mov ebx, dword [ebp + 0x14]
mov dword [ebx], eax
mov dword [ebp - 0x44], esp
push 0
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebx]
test eax, eax
je 0x4db03c
add eax, 8
push eax
push 1
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4db06b
push 0x86a
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4db0df
mov dword [ebp - 0x44], esp
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4db0a4
push 0x89e
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4db0d5
push 0x8b8
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov eax, 0x537293
jmp 0x4db3ed
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x28]
lea eax, [ebp - 0x10]
push eax
call fcn.004d24b1
mov ebx, dword [ebp - 0x2c]
call fcn.00402f88
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
xor ecx, ecx
push eax
lea eax, [ebp - 0x34]
mov ebx, eax
pop eax
inc ecx
push ecx
push ebx
mov dword [ebx], ecx
push eax
cmp ecx, eax
jg 0x4db347
mov ebx, dword [ebp - 0x2c]
call fcn.0040208a
push ebx
push ecx
mov eax, dword [ebp - 0x34]
dec eax
jns 0x4db13b
push 0x995
push 0x4016991
push 4
call fcn.0050fc00
add esp, 0xc
pop ecx
pop ebx
cmp eax, ecx
jl 0x4db158
push 0x995
push 0x4016991
push 1
call fcn.0050fc00
add esp, 0xc
shl eax, 2
add ebx, eax
mov dword [ebp - 0x44], ebx
mov ebx, dword [ebp - 0x44]
mov eax, dword [ebx]
test eax, eax
je 0x4db17c
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.0050fbee
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
push eax
mov ebx, dword [ebp - 0x38]
test ebx, ebx
je 0x4db18d
push ebx
call fcn.0050fbf4
add esp, 4
pop eax
mov dword [ebp - 0x38], eax
mov ebx, dword [ebp - 0x2c]
call fcn.0040208a
push ebx
push ecx
mov eax, dword [ebp - 0x34]
dec eax
jns 0x4db1b8
push 0x9d6
push 0x4016991
push 4
call fcn.0050fc00
add esp, 0xc
pop ecx
pop ebx
cmp eax, ecx
jl 0x4db1d5
push 0x9d6
push 0x4016991
push 1
call fcn.0050fc00
add esp, 0xc
shl eax, 2
add ebx, eax
mov dword [ebp - 0x44], ebx
push VariantClear
push 0
mov ebx, dword [ebp - 0x44]
mov eax, dword [ebx]
test eax, eax
jne 0x4db1f2
mov eax, 0x537293
push eax
push 1
mov ebx, 0x194
call fcn.00511700
add esp, 0x10
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x44], esp
lea eax, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x4db219
add eax, 8
push eax
push 0
push 0
push 0
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4db252
push 0xa2f
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4db2c6
mov dword [ebp - 0x44], esp
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4db28b
push 0xa71
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4db2bc
push 0xa8b
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov eax, 0x537293
jmp 0x4db3ed
push 0x80000301
push 0
push dword [ebp - 0x3c]
push VariantClear
push 0
mov eax, dword [ebp - 0x38]
test eax, eax
jne 0x4db2e3
mov eax, 0x537293
push eax
push 2
mov ebx, 0x1a0
call fcn.00511970
add esp, 0x1c
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x38]
test ebx, ebx
je 0x4db30d
push ebx
call fcn.0050fbf4
add esp, 4
pop eax
mov dword [ebp - 0x38], eax
push dword [ebp - 0x38]
push dword [ebp - 0x40]
mov ecx, 2
call fcn.00402d3a
add esp, 8
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x4db33b
push ebx
call fcn.0050fbf4
add esp, 4
pop eax
mov dword [ebp - 0x40], eax
pop eax
pop ebx
pop ecx
jmp 0x4db106
add esp, 0xc
mov dword [ebp - 0x44], esp
push dword [ebp - 0x1c]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4db376
push 0xb62
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4db3a7
push 0xb7c
push 0x4016991
push 6
call fcn.0050fc00
add esp, 0xc
push dword [ebp + 0x1c]
lea eax, [ebp - 0x40]
push eax
call fcn.004db4aa
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x4db3ca
push ebx
call fcn.0050fbf4
add esp, 4
pop eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x4db3e8
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.0050fbee
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
jmp 0x4db3ed
push eax
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x4db3fe
push ebx
call fcn.0050fbf4
add esp, 4
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x4db40e
push ebx
call fcn.0050fbf4
add esp, 4
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x4db41e
push ebx
call fcn.0050fbf4
add esp, 4
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x4db42e
push ebx
call fcn.0050fbf4
add esp, 4
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x4db43e
push ebx
call fcn.0050fbf4
add esp, 4
mov ebx, dword [ebp - 0x2c]
push ebx
mov ecx, dword [ebx]
add ebx, 4
test ecx, ecx
je 0x4db45c
mov eax, dword [ebx]
add ebx, 4
dec ecx
je 0x4db458
imul eax, dword [ebx]
jmp 0x4db44d
mov ecx, eax
test ecx, ecx
je 0x4db47b
push ecx
mov eax, dword [ebx]
test eax, eax
je 0x4db474
push ebx
push eax
call fcn.0050fbf4
add esp, 4
pop ebx
add ebx, 4
pop ecx
dec ecx
jne 0x4db462
call fcn.0050fbf4
add esp, 4
mov ebx, dword [ebp - 0x38]
test ebx, ebx
je 0x4db493
push ebx
call fcn.0050fbf4
add esp, 4
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x4db4a3
push ebx
call fcn.0050fbf4
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 0x24