Function at 0x407460
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
xor ecx, ecx
mov eax, 0x6609
mov ebp, esp
push edi
push esi
lea edx, [ebp - 0x44]
push ebx
sub esp, 0x70
call fcn.00407220
mov edx, eax
xor eax, eax
test edx, edx
je 0x407ca0
lea esi, [esi]
mov byte [eax + ebp - 0x3c], al
add eax, 1
cmp eax, 0x10
jne 0x407488
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0xd
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 0x18], 0x10
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_CryptEncrypt]
mov dword [ebp - 0x60], eax
call eax
sub esp, 0x1c
mov ebx, eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x34b
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp], ebx
mov dword [esp + 8], eax
call fcn.00401ac0
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x34d
cmp dword [ebp - 0x3c], 0xa33c0c8e
je 0x407c70
mov eax, 1
xor eax, 1
mov dword [esp + 4], 0x4176b8
mov dword [esp], eax
call fcn.00401ac0
lea eax, [ebp - 0x40]
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 0x10], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_CryptDecrypt]
mov dword [ebp - 0x50], eax
call eax
sub esp, 0x18
mov ebx, eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x350
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp], ebx
mov ebx, 0x4190c0
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
call fcn.00401ac0
mov dword [ebp - 0x48], 0
mov edx, dword [ebx + 0x20]
lea eax, [ebx - 0x20]
mov dword [ebp - 0x54], edx
mov dword [esp + 4], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 8], edx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebx + 0x24]
mov esi, dword [ebx + 0x28]
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x40], eax
mov dword [esp + 0x14], ecx
lea ecx, [ebp - 0x3c]
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
mov ecx, dword [ebp - 0x60]
call ecx
sub esp, 0x1c
mov edi, eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov ecx, dword fs:[0x18]
mov dword [eax + 4], 0x358
mov eax, dword [ecx + 0x34]
mov dword [ebp - 0x58], ecx
mov dword [esp + 8], eax
mov dword [esp], edi
mov dword [esp + 4], str._08lx_n
call fcn.00401ac0
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x359
mov eax, dword [ebp - 0x40]
mov dword [esp + 0xc], esi
cmp eax, esi
mov dword [esp + 8], eax
sete al
mov dword [esp + 4], str.length_incorrect__got__ld__expected__d_n
movzx eax, al
mov dword [esp], eax
call fcn.00401ac0
lea ecx, [ebp - 0x3c]
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
lea ecx, [ebp - 0x2c]
mov dword [esp], ecx
call sub.msvcrt.dll_memcpy
lea ecx, [ebp - 0x40]
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], ecx
lea ecx, [ebp - 0x3c]
mov dword [esp + 0x10], ecx
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
mov ecx, dword [ebp - 0x50]
call ecx
sub esp, 0x18
mov edi, eax
call fcn.00412e10
mov ecx, dword [ebp - 0x58]
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x35d
mov eax, dword [ecx + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.00401ac0
call fcn.00412e10
mov edx, dword [ebp - 0x4c]
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x35e
mov eax, dword [ebp - 0x40]
mov dword [esp + 0xc], edx
cmp eax, edx
mov dword [esp + 8], eax
sete al
mov dword [esp + 4], str.length_incorrect__got__ld__expected__d_n
movzx eax, al
mov dword [esp], eax
call fcn.00401ac0
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x35f
mov eax, dword [ebx]
cmp dword [ebp - 0x3c], eax
je 0x407c28
mov eax, 1
mov edx, dword [ebp - 0x48]
xor eax, 1
mov dword [esp + 4], str.decryption_incorrect__d_n
mov dword [esp], eax
mov dword [esp + 8], edx
call fcn.00401ac0
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0x40]
jne 0x407793
mov dword [esp + 8], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x40784b
mov dword [esp + 4], str.expected
mov dword [esp], 0x416079
call dword [sym.imp.msvcrt.dll_printf]
mov eax, dword [ebp - 0x54]
lea ecx, [eax + ebx]
test eax, eax
je 0x4077de
mov dword [ebp - 0x58], ebx
mov edi, ecx
lea esi, [esi]
nop
movzx eax, byte [ebx]
add ebx, 1
mov dword [esp], str.0x_02x_
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll_printf]
cmp ebx, edi
jne 0x4077c0
mov ebx, dword [ebp - 0x58]
mov dword [esp], 0xa
lea edi, [ebp - 0x3c]
call dword [sym.imp.msvcrt.dll_putchar]
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x58], ecx
mov dword [esp + 4], 0x417722
mov dword [esp], 0x416079
call dword [sym.imp.msvcrt.dll_printf]
mov ecx, dword [ebp - 0x58]
mov eax, edi
add eax, ecx
test ecx, ecx
je 0x40783e
mov dword [ebp - 0x58], ebx
mov ebx, edi
mov edi, eax
lea esi, [esi]
nop
movzx eax, byte [ebx]
add ebx, 1
mov dword [esp], str.0x_02x_
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll_printf]
cmp edi, ebx
jne 0x407820
mov ebx, dword [ebp - 0x58]
mov dword [esp], 0xa
call dword [sym.imp.msvcrt.dll_putchar]
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x40], esi
mov dword [esp + 4], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 8], esi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
lea eax, [ebp - 0x40]
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
mov edi, dword [ebp - 0x50]
call edi
sub esp, 0x18
mov dword [ebp - 0x5c], eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov edx, dword fs:[0x18]
mov dword [eax + 4], 0x370
mov eax, dword [edx + 0x34]
mov dword [ebp - 0x58], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str._08lx_n
mov ecx, dword [ebp - 0x5c]
mov dword [esp], ecx
call fcn.00401ac0
lea eax, [ebp - 0x2c]
mov dword [esp + 8], esi
mov dword [esp + 4], eax
lea eax, [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x58]
lea eax, [ebp - 0x40]
not byte [ebp + esi - 0x1d]
mov dword [edx + 0x34], 0xdeadbeef
mov dword [ebp - 0x5c], edx
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call edi
sub esp, 0x18
mov dword [ebp - 0x58], eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x377
xor eax, eax
mov dword [esp + 4], str.CryptDecrypt_should_failed__n
mov ecx, dword [ebp - 0x58]
test ecx, ecx
sete al
mov dword [esp], eax
call fcn.00401ac0
call fcn.00412e10
mov edx, dword [ebp - 0x5c]
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x378
mov eax, dword [edx + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edx + 0x34], 0x80090005
sete al
mov dword [esp], eax
call fcn.00401ac0
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x379
mov eax, dword [ebp - 0x40]
mov dword [esp + 0xc], esi
cmp eax, esi
mov dword [esp + 8], eax
sete al
mov dword [esp + 4], str.length_incorrect__got__ld__expected__d_n
movzx eax, al
mov dword [esp], eax
call fcn.00401ac0
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x37a
mov eax, dword [ebx]
cmp dword [ebp - 0x3c], eax
je 0x407c58
mov eax, 1
mov edx, dword [ebp - 0x48]
xor eax, 1
mov dword [esp + 4], str.decryption_incorrect__d_n
mov dword [esp], eax
mov dword [esp + 8], edx
call fcn.00401ac0
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x40], esi
mov dword [esp + 4], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 8], esi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
lea eax, [ebp - 0x40]
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 0x10], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
mov eax, dword [ebp - 0x50]
call eax
sub esp, 0x18
mov esi, eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x380
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp], esi
mov dword [esp + 8], eax
call fcn.00401ac0
call fcn.00412e10
mov ecx, dword [ebp - 0x4c]
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x381
mov eax, dword [ebp - 0x40]
mov dword [esp + 0xc], ecx
cmp eax, ecx
mov dword [esp + 8], eax
sete al
mov dword [esp + 4], str.length_incorrect__got__ld__expected__d_n
movzx eax, al
mov dword [esp], eax
call fcn.00401ac0
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x382
mov eax, dword [ebx]
cmp dword [ebp - 0x3c], eax
je 0x407c40
mov eax, 1
mov edx, dword [ebp - 0x48]
xor eax, 1
mov dword [esp + 4], str.decryption_incorrect__d_n
mov dword [esp], eax
mov dword [esp + 8], edx
call fcn.00401ac0
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0x40]
jne 0x407b16
mov dword [esp + 8], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x407bc6
mov dword [esp + 4], str.expected
mov esi, dword [sym.imp.msvcrt.dll_printf]
mov dword [esp], 0x416079
call esi
mov eax, dword [ebp - 0x54]
lea edx, [eax + ebx]
test eax, eax
je 0x407b5a
mov dword [ebp - 0x4c], ebx
mov edi, edx
lea esi, [esi]
movzx eax, byte [ebx]
add ebx, 1
mov dword [esp], str.0x_02x_
mov dword [esp + 4], eax
call esi
cmp edi, ebx
jne 0x407b40
mov ebx, dword [ebp - 0x4c]
mov eax, dword [sym.imp.msvcrt.dll_putchar]
mov dword [esp], 0xa
lea edi, [ebp - 0x3c]
mov dword [ebp - 0x4c], eax
call eax
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x54], ecx
mov dword [esp + 4], 0x417722
mov dword [esp], 0x416079
call esi
mov ecx, dword [ebp - 0x54]
mov eax, edi
add eax, ecx
test ecx, ecx
je 0x407bba
mov dword [ebp - 0x54], ebx
mov ebx, edi
mov edi, esi
mov esi, eax
lea esi, [esi]
movzx eax, byte [ebx]
add ebx, 1
mov dword [esp], str.0x_02x_
mov dword [esp + 4], eax
call edi
cmp ebx, esi
jne 0x407ba0
mov ebx, dword [ebp - 0x54]
mov dword [esp], 0xa
mov eax, dword [ebp - 0x4c]
call eax
add dword [ebp - 0x48], 1
mov eax, dword [ebp - 0x48]
add ebx, 0x4c
cmp eax, 4
jne 0x4075ba
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CryptDestroyKey]
sub esp, 4
mov ebx, eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x38b
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
call fcn.00401ac0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 4]
cmp dword [ebp - 0x38], eax
jne 0x407751
xor eax, eax
jmp 0x407756
mov eax, dword [ebx + 4]
cmp dword [ebp - 0x38], eax
jne 0x407ad4
xor eax, eax
jmp 0x407ad9
mov eax, dword [ebx + 4]
cmp dword [ebp - 0x38], eax
jne 0x4079e2
xor eax, eax
jmp 0x4079e7
cmp dword [ebp - 0x38], 0x7a5f8805
jne 0x40752c
cmp dword [ebp - 0x34], 0x5206a132
jne 0x40752c
xor eax, eax
cmp dword [ebp - 0x30], 0x1c44d264
jne 0x40752c
jmp 0x407531
mov eax, 0x343
call fcn.00401310
mov eax, dword fs:[0x18]
mov edx, dword [eax + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], edx
cmp dword [eax + 0x34], 0x80090008
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401ac0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret