Function at 0x4f178d
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.00526a16
add esp, 4
mov dword [ebp - 0x2c], eax
mov edi, eax
mov esi, 0x54d221
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 0x4f182e
mov dword [ebp + 0x10], 0x660e
cmp dword [ebp + 0x10], 0x6611
je 0x4f1866
cmp dword [ebp + 0x10], 0x660e
je 0x4f1866
cmp dword [ebp + 0x10], 0x660f
je 0x4f1866
cmp dword [ebp + 0x10], 0x6610
je 0x4f1866
xor eax, eax
jmp 0x4f186b
mov eax, 1
test eax, eax
je 0x4f187f
mov dword [ebp - 4], 0x18
jmp 0x4f1886
mov dword [ebp - 4], 1
cmp dword [ebp + 0x1c], 0
jne 0x4f1897
mov dword [ebp + 0x1c], 1
cmp dword [ebp + 0x24], 0
jne 0x4f18a8
mov dword [ebp + 0x24], 1
mov dword [ebp - 0x44], esp
push 0xf0000000
push dword [ebp - 4]
push 0x54d2f5
push 0x54d2f5
lea eax, [ebp - 8]
push eax
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4f18e7
push 0x254
push 0x40182cf
push 6
call fcn.00526a28
add esp, 0xc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4f194a
mov dword [ebp - 0x44], esp
push 0
push dword [ebp - 4]
push 0x54d2f5
push 0x54d2f5
lea eax, [ebp - 8]
push eax
xor eax, eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
nop
nop
cmp dword [ebp - 0x44], esp
je 0x4f1933
push 0x2af
push 0x40182cf
push 6
call fcn.00526a28
add esp, 0xc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4f194a
mov eax, 0x54d221
jmp 0x4f2215
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
test eax, eax
je 0x4f1966
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.00526a16
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 0x4f1977
push ebx
call fcn.00526a1c
add esp, 4
pop eax
mov dword [ebp - 0xc], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
je 0x4f1997
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.00526a16
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 0x4f19a8
push ebx
call fcn.00526a1c
add esp, 4
pop eax
mov dword [ebp - 0x10], eax
push dword [ebp + 0x10]
push 0
push 2
push 8
call fcn.004e8aea
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x4f19da
push ebx
call fcn.00526a1c
add esp, 4
pop eax
mov dword [ebp - 0x14], eax
push VariantClear
push 0
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x4f19f1
mov eax, 0x54d221
push eax
push 1
mov ebx, 0x194
call fcn.005288c0
add esp, 0x10
push 0x80000301
push 0
push eax
push 1
mov ebx, 0x198
call fcn.005285f0
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.0040379e
add esp, 0xc
mov dword [ebp - 0x4c], eax
mov ebx, dword [ebp - 0x48]
test ebx, ebx
je 0x4f1a4a
push ebx
call fcn.00526a1c
add esp, 4
mov eax, dword [ebp - 0x4c]
push eax
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x4f1a5e
push ebx
call fcn.00526a1c
add esp, 4
pop eax
mov dword [ebp - 0x18], eax
push VariantClear
push 0
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x4f1a75
mov eax, 0x54d221
push eax
push 1
mov ebx, 0x194
call fcn.005288c0
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 0x4f1aa9
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 0x4f1ad3
push 0x45a
push 0x40182cf
push 6
call fcn.00526a28
add esp, 0xc
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x4f1b1b
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 0x4f1b11
push 0x48f
push 0x40182cf
push 6
call fcn.00526a28
add esp, 0xc
mov eax, 0x54d221
jmp 0x4f2215
push 0x80000301
push 0
push dword [ebp + 0x24]
push 1
mov ebx, 0x198
call fcn.005285f0
add esp, 0x10
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x4f1b4e
push ebx
call fcn.00526a1c
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 0x4f1b6b
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 0x4f1b9a
push 0x557
push 0x40182cf
push 6
call fcn.00526a28
add esp, 0xc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4f1c0e
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 0x4f1bd3
push 0x58b
push 0x40182cf
push 6
call fcn.00526a28
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 0x4f1c04
push 0x5a5
push 0x40182cf
push 6
call fcn.00526a28
add esp, 0xc
mov eax, 0x54d221
jmp 0x4f2215
push 0x80000301
push 0
push 4
push 1
mov ebx, 0x1bc
call fcn.00527ce0
add esp, 0x10
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x4f1c43
push ebx
call fcn.00526a1c
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 0x4f1c64
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 0x4f1c93
push 0x671
push 0x40182cf
push 6
call fcn.00526a28
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 0x4f1cb8
mov eax, 0x54d221
push eax
push 3
mov ebx, 0x19c
call fcn.00527d10
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 0x4f1cec
and eax, 0xff
jmp 0x4f1d41
cmp ecx, 0x80000201
jne 0x4f1cf7
cwde
jmp 0x4f1d41
cmp ecx, 0x80000301
je 0x4f1d41
cmp ecx, 0x80000401
je 0x4f1d41
mov dword [ebp - 0x54], eax
cmp ecx, 0x80000501
je 0x4f1d31
cmp ecx, 0x80000601
je 0x4f1d36
push 0x6c0
push 0x40182cf
push 2
call fcn.00526a28
add esp, 0xc
fld dword [ebp - 0x54]
jmp 0x4f1d3c
mov dword [ebp - 0x50], edx
fld qword [ebp - 0x54]
call fcn.0040105b
mov dword [ebp - 0x28], eax
fild dword [ebp - 0x28]
fstp qword [ebp - 0x48]
fld qword [ebp - 0x48]
fdiv qword [0x55e114]
fstp qword [ebp - 0x50]
fld qword [ebp - 0x50]
call fcn.0040105b
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x4f1dd2
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 0x4f1d97
push 0x754
push 0x40182cf
push 6
call fcn.00526a28
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 0x4f1dc8
push 0x76e
push 0x40182cf
push 6
call fcn.00526a28
add esp, 0xc
mov eax, 0x54d221
jmp 0x4f2215
mov eax, 0x54d221
xor ecx, ecx
test eax, eax
je 0x4f1de0
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 0x4f1df3
mov ebx, dword [eax + 4]
add eax, 8
push eax
cmp ebx, ecx
mov eax, 1
jne 0x4f1e0a
dec eax
test ecx, ecx
je 0x4f1e0a
call fcn.0040dda1
add esp, 0xc
test eax, eax
jne 0x4f1e50
push 0x80000301
push 0
push dword [ebp - 0x28]
push 1
mov ebx, 0x1bc
call fcn.00527ce0
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 0x4f1e4a
push ebx
call fcn.00526a1c
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 0x4f1e64
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 0x4f1e93
push 0x86a
push 0x40182cf
push 6
call fcn.00526a28
add esp, 0xc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4f1f07
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 0x4f1ecc
push 0x89e
push 0x40182cf
push 6
call fcn.00526a28
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 0x4f1efd
push 0x8b8
push 0x40182cf
push 6
call fcn.00526a28
add esp, 0xc
mov eax, 0x54d221
jmp 0x4f2215
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x28]
lea eax, [ebp - 0x10]
push eax
call fcn.004e92d9
mov ebx, dword [ebp - 0x2c]
call fcn.004039ec
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 0x4f216f
mov ebx, dword [ebp - 0x2c]
call fcn.00402aee
push ebx
push ecx
mov eax, dword [ebp - 0x34]
dec eax
jns 0x4f1f63
push 0x995
push 0x40182cf
push 4
call fcn.00526a28
add esp, 0xc
pop ecx
pop ebx
cmp eax, ecx
jl 0x4f1f80
push 0x995
push 0x40182cf
push 1
call fcn.00526a28
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 0x4f1fa4
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.00526a16
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 0x4f1fb5
push ebx
call fcn.00526a1c
add esp, 4
pop eax
mov dword [ebp - 0x38], eax
mov ebx, dword [ebp - 0x2c]
call fcn.00402aee
push ebx
push ecx
mov eax, dword [ebp - 0x34]
dec eax
jns 0x4f1fe0
push 0x9d6
push 0x40182cf
push 4
call fcn.00526a28
add esp, 0xc
pop ecx
pop ebx
cmp eax, ecx
jl 0x4f1ffd
push 0x9d6
push 0x40182cf
push 1
call fcn.00526a28
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 0x4f201a
mov eax, 0x54d221
push eax
push 1
mov ebx, 0x194
call fcn.005288c0
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 0x4f2041
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 0x4f207a
push 0xa2f
push 0x40182cf
push 6
call fcn.00526a28
add esp, 0xc
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4f20ee
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 0x4f20b3
push 0xa71
push 0x40182cf
push 6
call fcn.00526a28
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 0x4f20e4
push 0xa8b
push 0x40182cf
push 6
call fcn.00526a28
add esp, 0xc
mov eax, 0x54d221
jmp 0x4f2215
push 0x80000301
push 0
push dword [ebp - 0x3c]
push VariantClear
push 0
mov eax, dword [ebp - 0x38]
test eax, eax
jne 0x4f210b
mov eax, 0x54d221
push eax
push 2
mov ebx, 0x1a0
call fcn.0052bda0
add esp, 0x1c
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x38]
test ebx, ebx
je 0x4f2135
push ebx
call fcn.00526a1c
add esp, 4
pop eax
mov dword [ebp - 0x38], eax
push dword [ebp - 0x38]
push dword [ebp - 0x40]
mov ecx, 2
call fcn.0040379e
add esp, 8
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x4f2163
push ebx
call fcn.00526a1c
add esp, 4
pop eax
mov dword [ebp - 0x40], eax
pop eax
pop ebx
pop ecx
jmp 0x4f1f2e
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 0x4f219e
push 0xb62
push 0x40182cf
push 6
call fcn.00526a28
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 0x4f21cf
push 0xb7c
push 0x40182cf
push 6
call fcn.00526a28
add esp, 0xc
push dword [ebp + 0x1c]
lea eax, [ebp - 0x40]
push eax
call fcn.004f22d2
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
push eax
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x4f21f2
push ebx
call fcn.00526a1c
add esp, 4
pop eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x4f2210
push eax
mov eax, dword [eax + 4]
add eax, 8
push eax
call fcn.00526a16
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
jmp 0x4f2215
push eax
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x4f2226
push ebx
call fcn.00526a1c
add esp, 4
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x4f2236
push ebx
call fcn.00526a1c
add esp, 4
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x4f2246
push ebx
call fcn.00526a1c
add esp, 4
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x4f2256
push ebx
call fcn.00526a1c
add esp, 4
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x4f2266
push ebx
call fcn.00526a1c
add esp, 4
mov ebx, dword [ebp - 0x2c]
push ebx
mov ecx, dword [ebx]
add ebx, 4
test ecx, ecx
je 0x4f2284
mov eax, dword [ebx]
add ebx, 4
dec ecx
je 0x4f2280
imul eax, dword [ebx]
jmp 0x4f2275
mov ecx, eax
test ecx, ecx
je 0x4f22a3
push ecx
mov eax, dword [ebx]
test eax, eax
je 0x4f229c
push ebx
push eax
call fcn.00526a1c
add esp, 4
pop ebx
add ebx, 4
pop ecx
dec ecx
jne 0x4f228a
call fcn.00526a1c
add esp, 4
mov ebx, dword [ebp - 0x38]
test ebx, ebx
je 0x4f22bb
push ebx
call fcn.00526a1c
add esp, 4
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x4f22cb
push ebx
call fcn.00526a1c
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 0x24