Function at 0x4d2e21
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.005080aa
add esp, 4
mov dword [ebp - 0x2c], eax
mov edi, eax
mov esi, 0x52b2d1
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 0x4d2ec2
mov dword [ebp + 0x10], 0x660e
cmp dword [ebp + 0x10], 0x6611
je 0x4d2efa
cmp dword [ebp + 0x10], 0x660e
je 0x4d2efa
cmp dword [ebp + 0x10], 0x660f
je 0x4d2efa
cmp dword [ebp + 0x10], 0x6610
je 0x4d2efa
xor eax, eax
jmp 0x4d2eff
mov eax, 1
test eax, eax
je 0x4d2f13
mov dword [ebp - 4], 0x18
jmp 0x4d2f1a
mov dword [ebp - 4], 1
cmp dword [ebp + 0x1c], 0
jne 0x4d2f2b
mov dword [ebp + 0x1c], 1
cmp dword [ebp + 0x24], 0
jne 0x4d2f3c
mov dword [ebp + 0x24], 1
mov dword [ebp - 0x44], esp
push 0xf0000000
push dword [ebp - 4]
push 0x52b36d
push 0x52b36d
lea eax, [ebp - 8]
push eax
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4d2f7b
push 0x254
push 0x401695a
push 6
call fcn.005080bc
add esp, 0xc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4d2fde
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 4]
push 0x52b36d
push 0x52b36d
lea eax, [ebp - 8]
push eax
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4d2fc7
push 0x2af
push 0x401695a
push 6
call fcn.005080bc
add esp, 0xc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4d2fde
mov eax, 0x52b2d1
jmp 0x4d38a9
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
test eax, eax
je 0x4d2ffa
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.005080aa
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 0x4d300b
push ebx
call fcn.005080b0
add esp, 4
pop eax
mov dword [ebp - 0xc], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
je 0x4d302b
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.005080aa
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 0x4d303c
push ebx
call fcn.005080b0
add esp, 4
pop eax
mov dword [ebp - 0x10], eax
push dword [ebp + 0x10]
push 0
push 2
push 8
call fcn.004ca17e
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x4d306e
push ebx
call fcn.005080b0
add esp, 4
pop eax
mov dword [ebp - 0x14], eax
push VariantCopy
push 0
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x4d3085
mov eax, 0x52b2d1
push eax
push 1
mov ebx, 0x194
call fcn.00509eb0
add esp, 0x10
push 0x80000301
push 0
push eax
push 1
mov ebx, 0x198
call fcn.00509de0
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.0040358f
add esp, 0xc
mov dword [ebp - 0x4c], eax
mov ebx, dword [ebp - 0x48]
test ebx, ebx
je 0x4d30de
push ebx
call fcn.005080b0
add esp, 4
mov eax, dword [ebp - 0x4c]
push eax
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x4d30f2
push ebx
call fcn.005080b0
add esp, 4
pop eax
mov dword [ebp - 0x18], eax
push VariantCopy
push 0
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x4d3109
mov eax, 0x52b2d1
push eax
push 1
mov ebx, 0x194
call fcn.00509eb0
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 0x4d313d
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 0x4d3167
push 0x45a
push 0x401695a
push 6
call fcn.005080bc
add esp, 0xc
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x4d31af
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 0x4d31a5
push 0x48f
push 0x401695a
push 6
call fcn.005080bc
add esp, 0xc
mov eax, 0x52b2d1
jmp 0x4d38a9
push 0x80000301
push 0
push dword [ebp + 0x24]
push 1
mov ebx, 0x198
call fcn.00509de0
add esp, 0x10
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x4d31e2
push ebx
call fcn.005080b0
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 0x4d31ff
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 0x4d322e
push 0x557
push 0x401695a
push 6
call fcn.005080bc
add esp, 0xc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4d32a2
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 0x4d3267
push 0x58b
push 0x401695a
push 6
call fcn.005080bc
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 0x4d3298
push 0x5a5
push 0x401695a
push 6
call fcn.005080bc
add esp, 0xc
mov eax, 0x52b2d1
jmp 0x4d38a9
push 0x80000301
push 0
push 4
push 1
mov ebx, 0x1bc
call fcn.00509420
add esp, 0x10
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x4d32d7
push ebx
call fcn.005080b0
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 0x4d32f8
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 0x4d3327
push 0x671
push 0x401695a
push 6
call fcn.005080bc
add esp, 0xc
push 0
push 0
push 0
push 0x80000301
push 0
push 3
push VariantCopy
push 0
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x4d334c
mov eax, 0x52b2d1
push eax
push 3
mov ebx, 0x19c
call fcn.00509550
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 0x4d3380
and eax, 0xff
jmp 0x4d33d5
cmp ecx, 0x80000201
jne 0x4d338b
cwde
jmp 0x4d33d5
cmp ecx, 0x80000301
je 0x4d33d5
cmp ecx, 0x80000401
je 0x4d33d5
mov dword [ebp - 0x54], eax
cmp ecx, 0x80000501
je 0x4d33c5
cmp ecx, 0x80000601
je 0x4d33ca
push 0x6c0
push 0x401695a
push 2
call fcn.005080bc
add esp, 0xc
fld dword [ebp - 0x54]
jmp 0x4d33d0
mov dword [ebp - 0x50], edx
fld qword [ebp - 0x54]
call fcn.0040101b
mov dword [ebp - 0x28], eax
fild dword [ebp - 0x28]
fstp qword [ebp - 0x48]
fld qword [ebp - 0x48]
fdiv qword [0x5f87b1]
fstp qword [ebp - 0x50]
fld qword [ebp - 0x50]
call fcn.0040101b
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x4d3466
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 0x4d342b
push 0x754
push 0x401695a
push 6
call fcn.005080bc
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 0x4d345c
push 0x76e
push 0x401695a
push 6
call fcn.005080bc
add esp, 0xc
mov eax, 0x52b2d1
jmp 0x4d38a9
mov eax, 0x52b2d1
xor ecx, ecx
test eax, eax
je 0x4d3474
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 0x4d3487
mov ebx, dword [eax + 4]
add eax, 8
push eax
cmp ebx, ecx
mov eax, 1
jne 0x4d349e
dec eax
test ecx, ecx
je 0x4d349e
call fcn.0040e8ed
add esp, 0xc
test eax, eax
jne 0x4d34e4
push 0x80000301
push 0
push dword [ebp - 0x28]
push 1
mov ebx, 0x1bc
call fcn.00509420
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 0x4d34de
push ebx
call fcn.005080b0
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 0x4d34f8
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 0x4d3527
push 0x86a
push 0x401695a
push 6
call fcn.005080bc
add esp, 0xc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4d359b
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 0x4d3560
push 0x89e
push 0x401695a
push 6
call fcn.005080bc
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 0x4d3591
push 0x8b8
push 0x401695a
push 6
call fcn.005080bc
add esp, 0xc
mov eax, 0x52b2d1
jmp 0x4d38a9
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x28]
lea eax, [ebp - 0x10]
push eax
call fcn.004ca96d
mov ebx, dword [ebp - 0x2c]
call fcn.004037dd
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 0x4d3803
mov ebx, dword [ebp - 0x2c]
call fcn.004028df
push ebx
push ecx
mov eax, dword [ebp - 0x34]
dec eax
jns 0x4d35f7
push 0x995
push 0x401695a
push 4
call fcn.005080bc
add esp, 0xc
pop ecx
pop ebx
cmp eax, ecx
jl 0x4d3614
push 0x995
push 0x401695a
push 1
call fcn.005080bc
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 0x4d3638
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.005080aa
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 0x4d3649
push ebx
call fcn.005080b0
add esp, 4
pop eax
mov dword [ebp - 0x38], eax
mov ebx, dword [ebp - 0x2c]
call fcn.004028df
push ebx
push ecx
mov eax, dword [ebp - 0x34]
dec eax
jns 0x4d3674
push 0x9d6
push 0x401695a
push 4
call fcn.005080bc
add esp, 0xc
pop ecx
pop ebx
cmp eax, ecx
jl 0x4d3691
push 0x9d6
push 0x401695a
push 1
call fcn.005080bc
add esp, 0xc
shl eax, 2
add ebx, eax
mov dword [ebp - 0x44], ebx
push VariantCopy
push 0
mov ebx, dword [ebp - 0x44]
mov eax, dword [ebx]
test eax, eax
jne 0x4d36ae
mov eax, 0x52b2d1
push eax
push 1
mov ebx, 0x194
call fcn.00509eb0
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 0x4d36d5
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 0x4d370e
push 0xa2f
push 0x401695a
push 6
call fcn.005080bc
add esp, 0xc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4d3782
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 0x4d3747
push 0xa71
push 0x401695a
push 6
call fcn.005080bc
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 0x4d3778
push 0xa8b
push 0x401695a
push 6
call fcn.005080bc
add esp, 0xc
mov eax, 0x52b2d1
jmp 0x4d38a9
push 0x80000301
push 0
push dword [ebp - 0x3c]
push VariantCopy
push 0
mov eax, dword [ebp - 0x38]
test eax, eax
jne 0x4d379f
mov eax, 0x52b2d1
push eax
push 2
mov ebx, 0x1a0
call fcn.0050a0c0
add esp, 0x1c
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x38]
test ebx, ebx
je 0x4d37c9
push ebx
call fcn.005080b0
add esp, 4
pop eax
mov dword [ebp - 0x38], eax
push dword [ebp - 0x38]
push dword [ebp - 0x40]
mov ecx, 2
call fcn.0040358f
add esp, 8
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x4d37f7
push ebx
call fcn.005080b0
add esp, 4
pop eax
mov dword [ebp - 0x40], eax
pop eax
pop ebx
pop ecx
jmp 0x4d35c2
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 0x4d3832
push 0xb62
push 0x401695a
push 6
call fcn.005080bc
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 0x4d3863
push 0xb7c
push 0x401695a
push 6
call fcn.005080bc
add esp, 0xc
push dword [ebp + 0x1c]
lea eax, [ebp - 0x40]
push eax
call fcn.004d3966
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x4d3886
push ebx
call fcn.005080b0
add esp, 4
pop eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x4d38a4
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.005080aa
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
jmp 0x4d38a9
push eax
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x4d38ba
push ebx
call fcn.005080b0
add esp, 4
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x4d38ca
push ebx
call fcn.005080b0
add esp, 4
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x4d38da
push ebx
call fcn.005080b0
add esp, 4
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x4d38ea
push ebx
call fcn.005080b0
add esp, 4
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x4d38fa
push ebx
call fcn.005080b0
add esp, 4
mov ebx, dword [ebp - 0x2c]
push ebx
mov ecx, dword [ebx]
add ebx, 4
test ecx, ecx
je 0x4d3918
mov eax, dword [ebx]
add ebx, 4
dec ecx
je 0x4d3914
imul eax, dword [ebx]
jmp 0x4d3909
mov ecx, eax
test ecx, ecx
je 0x4d3937
push ecx
mov eax, dword [ebx]
test eax, eax
je 0x4d3930
push ebx
push eax
call fcn.005080b0
add esp, 4
pop ebx
add ebx, 4
pop ecx
dec ecx
jne 0x4d391e
call fcn.005080b0
add esp, 4
mov ebx, dword [ebp - 0x38]
test ebx, ebx
je 0x4d394f
push ebx
call fcn.005080b0
add esp, 4
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x4d395f
push ebx
call fcn.005080b0
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 0x24