Function at 0x40cb00
Capabilities:
Contain obfuscated stackstrings
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
xor ecx, ecx
mov ebp, esp
push edi
push esi
lea edx, [ebp - 0x68]
push ebx
sub esp, 0x94
cmp eax, 0xc0
je 0x40d5c0
cmp eax, 0x100
jne 0x40d5d8
mov eax, 0x6610
mov edi, 2
call fcn.00407220
test eax, eax
jne 0x40cb48
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x64]
mov dword [ebp - 0x64], 0x20
mov dword [ebp - 0x3c], 0x20534541
mov dword [ebp - 0x38], 0x74736554
mov dword [ebp - 0x34], 0x74695720
mov dword [ebp - 0x30], 0x20322068
mov dword [ebp - 0x2c], 0x636f6c42
mov dword [ebp - 0x28], 0x4f20736b
mov dword [ebp - 0x24], 0x61442066
mov dword [ebp - 0x20], 0x2e6174
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 0x18], 0x30
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x68]
mov esi, dword fs:[0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_CryptEncrypt]
mov dword [ebp - 0x84], eax
call eax
sub esp, 0x1c
mov ebx, eax
mov eax, 0x48c
call fcn.00401310
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str.Expected_OK__got_last_error__ld_n
mov dword [esp + 8], eax
call fcn.00401ac0
mov eax, 0x48d
call fcn.00401310
mov eax, dword [ebp - 0x64]
mov dword [esp + 4], str.Expected_dwLen_48__got__ld_n
cmp eax, 0x30
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401ac0
mov eax, 0x48e
call fcn.00401310
mov eax, dword [ebp - 0x64]
mov dword [esp + 8], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 4], eax
lea eax, [edi + edi*2]
shl eax, 4
add eax, 0x418740
mov dword [esp], eax
call sub.msvcrt.dll_memcmp
mov dword [esp + 4], str.Expected_equal_data_sequences_n
test eax, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401ac0
lea eax, [ebp - 0x64]
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 - 0x68]
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_CryptDecrypt]
mov dword [ebp - 0x74], eax
call eax
sub esp, 0x18
mov ebx, eax
mov eax, 0x491
call fcn.00401310
mov edi, dword [ebp - 0x64]
mov esi, dword [esi + 0x34]
cmp edi, 0x20
jne 0x40ccba
test ebx, ebx
jne 0x40d5e9
xor eax, eax
mov dword [esp], eax
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], str._08lx__dwLen:__ld_n
call fcn.00401ac0
xor eax, eax
lea esi, [esi]
lea esi, [esi]
mov byte [eax + ebp - 0x3c], al
add eax, 1
cmp eax, 0x30
jne 0x40cce0
lea eax, [ebp - 0x64]
mov dword [esp + 0x10], 0
mov edi, dword [sym.imp.advapi32.dll_CryptGetKeyParam]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x68]
mov dword [esp], eax
call edi
mov ebx, dword [0x42b050]
sub esp, 0x14
mov esi, eax
call fcn.00412e10
xor ecx, ecx
mov edx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
add edx, edx
test ebx, ebx
setne cl
or edx, ecx
mov dword [eax + 0x10], edx
mov ebx, dword fs:[0x18]
jmp 0x40cda1
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x498
mov eax, 1
mov edx, dword [ebx + 0x34]
test esi, esi
jne 0x40cd85
cmp edx, 0x80090003
sete cl
xor eax, eax
cmp dword [0x42b050], 0
sete al
and eax, ecx
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], str.Expected_OK__got_last_error__ld_n
call fcn.00401ac0
call fcn.00412e10
shr dword [eax + 0x10], 1
call fcn.00412e10
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x40cd50
mov dword [ebp - 0x6c], edx
test esi, esi
jne 0x40d611
lea eax, [ebp - 0x64]
mov dword [ebp - 0x60], 0xdeadbeef
mov dword [ebp - 0x64], 4
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x60]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 4
mov eax, dword [ebp - 0x68]
mov esi, dword fs:[0x18]
mov dword [esp], eax
call edi
sub esp, 0x14
mov ebx, eax
mov eax, 0x4a1
call fcn.00401310
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
call fcn.00401ac0
mov eax, 0x4a2
call fcn.00401310
mov dword [esp + 4], str.Wrong_default_chaining_n
xor eax, eax
cmp dword [ebp - 0x60], 1
sete al
mov dword [esp], eax
call fcn.00401ac0
lea eax, [ebp - 0x64]
mov dword [ebp - 0x64], 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 - 0x68]
mov dword [esp], eax
mov eax, dword [ebp - 0x84]
call eax
sub esp, 0x1c
mov ebx, eax
mov eax, 0x4a6
call fcn.00401310
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
call fcn.00401ac0
lea eax, [ebp - 0x64]
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 - 0x68]
mov dword [esp], eax
mov eax, dword [ebp - 0x74]
call eax
sub esp, 0x18
mov ebx, eax
mov eax, 0x4a9
call fcn.00401310
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
mov esi, 0x4190c0
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
call fcn.00401ac0
mov ecx, dword [esi + 0x20]
lea eax, [esi - 0x20]
mov dword [ebp - 0x78], ecx
mov dword [esp + 4], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 8], ecx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esi + 0x24]
mov ebx, dword [esi + 0x28]
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x64], eax
mov dword [esp + 0x14], ecx
lea ecx, [ebp - 0x3c]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x68]
mov dword [esp], eax
mov ecx, dword [ebp - 0x84]
call ecx
sub esp, 0x1c
mov edi, eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov ecx, dword fs:[0x18]
mov dword [eax + 4], 0x4b1
mov eax, dword [ecx + 0x34]
mov dword [ebp - 0x7c], 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], 0x4b2
mov eax, dword [ebp - 0x64]
mov dword [esp + 0xc], ebx
cmp eax, ebx
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], ebx
mov dword [esp + 4], ecx
lea ecx, [ebp - 0x5c]
mov dword [esp], ecx
call sub.msvcrt.dll_memcpy
lea ecx, [ebp - 0x64]
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 - 0x68]
mov dword [esp], eax
mov ecx, dword [ebp - 0x74]
call ecx
sub esp, 0x18
mov edi, eax
call fcn.00412e10
mov ecx, dword [ebp - 0x7c]
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x4b6
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 - 0x70]
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x4b7
mov eax, dword [ebp - 0x64]
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], 0x4b8
mov eax, dword [esi]
cmp dword [ebp - 0x3c], eax
je 0x40d578
mov eax, 1
mov edx, dword [ebp - 0x6c]
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 - 0x70]
cmp eax, dword [ebp - 0x64]
jne 0x40d0e4
mov dword [esp + 8], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x40d19b
mov dword [esp + 4], str.expected
mov dword [esp], 0x416079
call dword [sym.imp.msvcrt.dll_printf]
mov eax, dword [ebp - 0x78]
lea ecx, [eax + esi]
test eax, eax
je 0x40d12e
mov dword [ebp - 0x7c], ebx
mov edi, ecx
mov ebx, esi
lea esi, [esi]
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 0x40d110
mov ebx, dword [ebp - 0x7c]
mov dword [esp], 0xa
lea edi, [ebp - 0x3c]
call dword [sym.imp.msvcrt.dll_putchar]
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x7c], ecx
mov dword [esp + 4], 0x417722
mov dword [esp], 0x416079
call dword [sym.imp.msvcrt.dll_printf]
mov ecx, dword [ebp - 0x7c]
mov eax, edi
add eax, ecx
test ecx, ecx
je 0x40d18e
mov dword [ebp - 0x7c], 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 0x40d170
mov ebx, dword [ebp - 0x7c]
mov dword [esp], 0xa
call dword [sym.imp.msvcrt.dll_putchar]
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x64], ebx
mov dword [esp + 4], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 8], ebx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
lea eax, [ebp - 0x64]
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 - 0x68]
mov dword [esp], eax
mov edi, dword [ebp - 0x74]
call edi
sub esp, 0x18
mov dword [ebp - 0x80], eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov edx, dword fs:[0x18]
mov dword [eax + 4], 0x4c9
mov eax, dword [edx + 0x34]
mov dword [ebp - 0x7c], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str._08lx_n
mov ecx, dword [ebp - 0x80]
mov dword [esp], ecx
call fcn.00401ac0
lea eax, [ebp - 0x5c]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x7c]
lea eax, [ebp - 0x64]
not byte [ebp + ebx - 0x4d]
mov dword [edx + 0x34], 0xdeadbeef
mov dword [ebp - 0x80], edx
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x4c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x68]
mov dword [esp], eax
call edi
sub esp, 0x18
mov dword [ebp - 0x7c], eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x4d0
xor eax, eax
mov dword [esp + 4], str.CryptDecrypt_should_failed__n
mov ecx, dword [ebp - 0x7c]
test ecx, ecx
sete al
mov dword [esp], eax
call fcn.00401ac0
call fcn.00412e10
mov edx, dword [ebp - 0x80]
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x4d1
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], 0x4d2
mov eax, dword [ebp - 0x64]
mov dword [esp + 0xc], ebx
cmp eax, ebx
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], 0x4d3
mov eax, dword [esi]
cmp dword [ebp - 0x3c], eax
je 0x40d5a8
mov eax, 1
mov edx, dword [ebp - 0x6c]
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 - 0x5c]
mov dword [ebp - 0x64], ebx
mov dword [esp + 4], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 8], ebx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
lea eax, [ebp - 0x64]
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 - 0x68]
mov dword [esp], eax
mov eax, dword [ebp - 0x74]
call eax
sub esp, 0x18
mov ebx, eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x4d9
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 edx, dword [ebp - 0x70]
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x4da
mov eax, dword [ebp - 0x64]
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], 0x4db
mov eax, dword [esi]
cmp dword [ebp - 0x3c], eax
je 0x40d590
mov eax, 1
mov edx, dword [ebp - 0x6c]
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 - 0x70]
cmp eax, dword [ebp - 0x64]
jne 0x40d466
mov dword [esp + 8], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x40d516
mov dword [esp + 4], str.expected
mov ebx, dword [sym.imp.msvcrt.dll_printf]
mov dword [esp], 0x416079
call ebx
mov eax, dword [ebp - 0x78]
lea edx, [eax + esi]
test eax, eax
je 0x40d4aa
mov dword [ebp - 0x70], esi
mov edi, edx
lea esi, [esi]
movzx eax, byte [esi]
add esi, 1
mov dword [esp], str.0x_02x_
mov dword [esp + 4], eax
call ebx
cmp esi, edi
jne 0x40d490
mov esi, dword [ebp - 0x70]
mov eax, dword [sym.imp.msvcrt.dll_putchar]
mov dword [esp], 0xa
lea edi, [ebp - 0x3c]
mov dword [ebp - 0x70], eax
call eax
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x78], ecx
mov dword [esp + 4], 0x417722
mov dword [esp], 0x416079
call ebx
mov ecx, dword [ebp - 0x78]
mov eax, edi
add eax, ecx
test ecx, ecx
je 0x40d50a
mov dword [ebp - 0x78], esi
mov esi, edi
mov edi, ebx
mov ebx, eax
lea esi, [esi]
movzx eax, byte [esi]
add esi, 1
mov dword [esp], str.0x_02x_
mov dword [esp + 4], eax
call edi
cmp esi, ebx
jne 0x40d4f0
mov esi, dword [ebp - 0x78]
mov dword [esp], 0xa
mov eax, dword [ebp - 0x70]
call eax
add dword [ebp - 0x6c], 1
mov eax, dword [ebp - 0x6c]
add esi, 0x4c
cmp eax, 4
jne 0x40cf08
mov eax, dword [ebp - 0x68]
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], 0x4e4
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 [esi + 4]
cmp dword [ebp - 0x38], eax
jne 0x40d0a2
xor eax, eax
jmp 0x40d0a7
mov eax, dword [esi + 4]
cmp dword [ebp - 0x38], eax
jne 0x40d424
xor eax, eax
jmp 0x40d429
mov eax, dword [esi + 4]
cmp dword [ebp - 0x38], eax
jne 0x40d332
xor eax, eax
jmp 0x40d337
mov eax, 0x660f
mov edi, 1
call fcn.00407220
jmp 0x40cb36
mov eax, 0x660e
xor edi, edi
call fcn.00407220
jmp 0x40cb36
lea eax, [ebp - 0x3c]
mov dword [esp + 8], 0x20
mov dword [esp + 4], eax
mov dword [esp], str.AES_Test_With_2_Blocks_Of_Data.
call sub.msvcrt.dll_memcmp
test eax, eax
sete al
movzx eax, al
jmp 0x40ccbc
mov eax, 0x49b
call fcn.00401310
mov eax, dword [ebp - 0x64]
mov dword [esp + 4], str.unexpected_salt_length__ld_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401ac0
jmp 0x40cdbf