Function at 0x41971e
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1a4
push ebx
push esi
mov esi, edx
mov ebx, ecx
push edi
mov dword [esp + 0x30], esi
mov dword [esp + 0x20], ebx
call fcn.0043c5cd
push eax
lea ecx, [esp + 0x30]
call fcn.0043ac50
lea eax, [esp + 0x2c]
mov ecx, ebx
push eax
lea edx, [esp + 0x94]
call fcn.0041954a
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x4199bc
lea edx, [esp + 0x34]
lea ecx, [esp + 0x2c]
call fcn.004195e2
test eax, eax
je 0x41977d
inc ebx
jmp 0x4199bc
lea eax, [esp + 0x34]
mov dword [esp + 0x60], 0x4915ec
mov dword [esp + 0x64], eax
lea ecx, [esp + 0x188]
lea eax, [esp + 0x60]
push eax
mov dword [esp + 0x88], eax
call fcn.0043aa99
lea ecx, [esp + 0x60]
call fcn.0043aa7b
mov ecx, dword [esp + 0x34]
mov edx, str.ENCRYPTED_RANGE
call fcn.0043a873
xor ebx, ebx
mov dword [esp + 0x28], eax
test eax, eax
jne 0x4197cc
inc ebx
jmp 0x4199b0
test esi, esi
je 0x4199b0
cmp word [esi], bx
je 0x4199b0
mov ecx, dword [esp + 0x34]
push 1
push 3
push 0x4935c4
call fcn.0043a80d
mov esi, eax
test esi, esi
jne 0x4197fd
push 0xb
pop ebx
jmp 0x4199b0
call fcn.0043c5cd
push eax
lea ecx, [esp + 0x14]
call fcn.0043ac50
mov edx, dword [esi + 4]
test edx, edx
je 0x419818
mov eax, dword [esi + 0xc]
jmp 0x41981a
mov eax, ebx
test edx, edx
jne 0x419823
mov edx, 0x491414
push eax
lea ecx, [esp + 0x14]
call fcn.0044b0c8
mov esi, dword [esp + 0x14]
pop ecx
test eax, eax
je 0x41983e
push 0xb
pop ebx
jmp 0x4199a8
mov edi, dword [esi - 0xc]
call fcn.0043c5cd
push eax
lea ecx, [esp + 0x50]
call fcn.0043ac50
lea eax, [edi + 0xc]
push eax
lea ecx, [esp + 0x50]
mov dword [esp + 0x44], eax
call fcn.0043aa22
mov ecx, eax
mov dword [esp + 0x44], ecx
mov dword [ecx], 0x201
mov dword [ecx + 4], 0x6610
mov dword [ecx + 8], 0xa400
test edi, edi
je 0x4198a8
lea eax, [edi + 0xb]
mov esi, ebx
add eax, ecx
mov dword [esp + 0x14], eax
push esi
lea ecx, [esp + 0x14]
call fcn.004316b4
mov ecx, dword [esp + 0x14]
inc esi
mov byte [ecx], al
dec ecx
mov dword [esp + 0x14], ecx
cmp esi, edi
jne 0x41988a
mov esi, dword [esp + 0x10]
push 0xf0000000
push 0x18
push ebx
push ebx
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], ebx
push eax
mov dword [esp + 0x38], ebx
mov dword [esp + 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x4198d8
call fcn.0044bc4b
mov ebx, eax
jmp 0x41999c
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x10]
push 0xffffffffffffffff
call fcn.0044b0c8
lea eax, [esp + 0x1c]
mov dword [esp + 0x64], 0x4915d4
mov dword [esp + 0x58], eax
lea esi, [esp + 0x58]
lea eax, [esp + 0x28]
mov dword [esp + 0x5c], eax
lea edi, [esp + 0x68]
lea eax, [esp + 0x20]
mov dword [esp + 0x60], eax
lea eax, [esp + 0x64]
movsd dword es:[edi], dword [esi]
pop ecx
push eax
lea ecx, [esp + 0x164]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [esp + 0x88], eax
call fcn.0043aa99
lea ecx, [esp + 0x60]
call fcn.0043aa7b
mov esi, dword [esp + 0x10]
cmp dword [esi - 4], 1
mov edi, dword [esi - 0xc]
jle 0x41994f
push edi
lea ecx, [esp + 0x14]
call fcn.0043abd1
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x24]
push eax
push 0x41
push ebx
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CryptImportKey]
push esi
push dword [esp + 0x30]
call edi
test eax, eax
je 0x41998b
cmp byte [ebp + 8], bl
je 0x4199d3
lea eax, [esp + 0x18]
push eax
push 0x41
push dword [esp + 0x2c]
push dword [esp + 0x4c]
push dword [esp + 0x54]
push dword [esp + 0x30]
call edi
test eax, eax
jne 0x419990
mov ebx, 0x4c0
lea ecx, [esp + 0x160]
call fcn.0043aa5e
mov ecx, dword [esp + 0x4c]
lea ecx, [ecx - 0x10]
call fcn.0043c924
lea ecx, [esi - 0x10]
call fcn.0043c924
lea ecx, [esp + 0x188]
call fcn.0043aa5e
mov ecx, dword [esp + 0x2c]
lea ecx, [ecx - 0x10]
call fcn.0043c924
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edi, dword [esp + 0x2c]
push 0x18
push ebx
mov eax, dword [edi - 0xc]
add eax, eax
cdq
mov dword [esp + 0xf0], eax
mov dword [esp + 0xe0], eax
lea eax, [esp + 0x114]
push eax
mov dword [esp + 0xf8], edx
call dword [sym.imp.msvcrt.dll_memset]
add esp, 0xc
call fcn.0043c5cd
push eax
lea ecx, [esp + 0x34]
call fcn.0043ac50
mov eax, dword [esp + 0x28]
push ecx
push 6
push str.Offset
mov ecx, eax
call fcn.0043a719
mov eax, dword [eax + 4]
test eax, eax
jne 0x419a34
mov eax, 0x491414
push 0xa
push ebx
push eax
call dword [sym.imp.msvcrt.dll__wcstoui64]
mov ecx, dword [esp + 0x34]
add esp, 8
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], edx
push 5
push str.Bytes
call fcn.0043a719
mov eax, dword [eax + 4]
test eax, eax
jne 0x419a65
mov eax, 0x491414
push 0xa
push ebx
push eax
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
lea ecx, [esp + 0x30]
and eax, 0xfffffff0
mov dword [esp + 0x14], eax
push eax
call fcn.0043aa22
lea esi, [esp + 0x38]
mov edx, eax
mov eax, dword [esp + 0x20]
push esi
lea esi, [esp + 0x90]
mov dword [esp + 0x4c], edx
push esi
push dword [esp + 0x1c]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0xc]
mov esi, dword [esp + 0x10]
test eax, eax
jne 0x419bc5
lea eax, [esp + 0x18]
push eax
push 0x41
push dword [esp + 0x2c]
push dword [esp + 0x4c]
push dword [esp + 0x54]
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x419bd8
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x4c]
push ebx
push ebx
push ebx
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x419bc0
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x38]
push edx
lea edx, [esp + 0x18]
push edx
push dword [esp + 0x1c]
mov eax, dword [ecx]
push dword [esp + 0x54]
push ecx
call dword [eax + 0x18]
test eax, eax
jne 0x419bc5
push ecx
mov ecx, dword [esp + 0x2c]
push 5
push str.RANGE
call fcn.0043a77e
mov dword [esp + 0x28], eax
test eax, eax
jne 0x419a19
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x38]
push edx
lea edx, [esp + 0x54]
mov dword [esp + 0x3c], ebx
push edx
mov eax, dword [ecx]
lea edx, [esp + 0x98]
push 0xd0
push edx
push ecx
mov dword [esp + 0x50], ebx
call dword [eax + 0x18]
test eax, eax
jne 0x419bc5
mov eax, dword [edi - 0xc]
lea edx, [esp + 0xe0]
mov ecx, dword [esp + 0x20]
add eax, eax
push edx
lea edx, [esp + 0x54]
push edx
mov ecx, dword [ecx]
push eax
push edi
mov edi, dword [esp + 0x30]
push edi
call dword [ecx + 0x18]
test eax, eax
jne 0x419bc5
mov ecx, dword [esp + 0xe0]
add ecx, dword [esp + 0xe8]
mov eax, dword [esp + 0xe4]
adc eax, dword [esp + 0xec]
mov edx, dword [edi]
push eax
push ecx
push edi
call dword [edx + 0x1c]
test eax, eax
jne 0x419bc5
mov dword [esp + 0x18], ebx
jmp 0x419bc7
call fcn.0044bc4b
mov ebx, eax
mov ecx, dword [esp + 0x30]
lea ecx, [ecx - 0x10]
call fcn.0043c924
jmp 0x419990
mov ebx, 0x4c0
jmp 0x419bc7