Function at 0x402500
Capabilities:
Create new key via cryptacquirecontext
Encrypt or decrypt via wincrypt
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push 0xffffffffffffffff
push 0x40f990
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x74]
push edi
xor edi, edi
lea ebx, [esi + 8]
mov dword [esp + 0x20], edi
push ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], edi
call sub.MFC42.DLL_operatornew
mov ebp, eax
add esp, 4
cmp ebp, edi
je 0x4029f0
mov ecx, ebx
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0xf0000000
and ecx, 3
push 1
rep stosb byte es:[edi], al
mov ecx, esi
mov esi, dword [esp + 0x7c]
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
lea ecx, [esp + 0x20]
push ecx
call esi
test eax, eax
jne 0x402620
push 0xf0000000
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
lea edx, [esp + 0x1c]
push eax
push edx
call esi
test eax, eax
jne 0x402620
push eax
push 1
push eax
push eax
lea eax, [esp + 0x20]
push eax
call esi
test eax, eax
jne 0x402620
push 8
push 1
push eax
lea ecx, [esp + 0x1c]
push eax
push ecx
call esi
test eax, eax
jne 0x402620
push ebp
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x4025e7
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4025f6
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4029f0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
add esp, 0x58
ret
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
push 0
push 0
push 0x8003
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x40268e
push ebp
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x402655
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x402664
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4029f0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
add esp, 0x58
ret
mov edx, dword [esp + 0x70]
or esi, 0xffffffff
mov edi, edx
mov ecx, esi
xor eax, eax
push 0
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0x20]
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x402704
push ebp
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x4026cb
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4026da
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4029f0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
add esp, 0x58
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push 1
push eax
push 0x6602
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
jne 0x402775
push ebp
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x40273c
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40274b
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4029f0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
add esp, 0x58
ret
lea ecx, [esp + 0x40]
call fcn.00401b40
lea ecx, [esp + 0x24]
mov dword [esp + 0x64], 0
call fcn.00401b40
mov al, byte [esp + 0x6c]
mov byte [esp + 0x64], 1
test al, al
je 0x402836
mov edi, ebp
mov ecx, esi
xor eax, eax
lea edx, [esp + 0x1c]
repne scasb al, byte es:[edi]
push ebx
push edx
push ebp
push eax
push 1
push eax
mov eax, dword [esp + 0x2c]
not ecx
dec ecx
push eax
mov dword [esp + 0x38], ecx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x402801
push ebp
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x4027e1
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4027f0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4028db
jmp 0x4028d2
mov ecx, dword [esp + 0x1c]
push ecx
push ebp
lea ecx, [esp + 0x48]
call fcn.00401c10
lea ecx, [esp + 0x40]
call fcn.00401bd0
mov esi, eax
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
mov dword [esp + 0x20], esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, ecx
mov dword [esp + 0x1c], eax
jmp 0x4028fa
push ebp
lea ecx, [esp + 0x28]
call fcn.00401cf0
lea edx, [esp + 0x20]
lea ecx, [esp + 0x24]
push edx
call fcn.00401bc0
mov dword [esp + 0x1c], eax
mov edi, ebp
mov ecx, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
xor edx, edx
lea eax, [ecx + ebp - 1]
mov ecx, 3
cmp byte [eax], 0x3d
jne 0x40286e
inc edx
dec eax
dec ecx
jne 0x402868
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
lea eax, [esp + 0x1c]
sub edi, edx
mov edx, dword [esp + 0x14]
push eax
push ecx
push 0
push 1
push 0
push edx
mov dword [esp + 0x34], edi
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
jne 0x4028f2
push ebp
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x4028bb
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4028ca
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4028db
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea ecx, [esp + 0x24]
mov byte [esp + 0x64], 0
call fcn.00401b80
mov dword [esp + 0x64], esi
jmp 0x4029e7
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x80]
jae 0x402990
mov edi, dword [esp + 0x7c]
mov ecx, eax
mov edx, ecx
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x88]
mov dword [ecx], eax
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x40293c
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40294b
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40295c
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea ecx, [esp + 0x24]
mov byte [esp + 0x64], 0
call fcn.00401b80
lea ecx, [esp + 0x40]
mov dword [esp + 0x64], 0xffffffff
call fcn.00401b80
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
add esp, 0x58
ret
mov edx, dword [esp + 0x84]
push ebp
mov dword [edx], eax
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x4029b1
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4029c0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4029d1
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea ecx, [esp + 0x24]
mov byte [esp + 0x64], 0
call fcn.00401b80
mov dword [esp + 0x64], 0xffffffff
lea ecx, [esp + 0x40]
call fcn.00401b80
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov dword fs:[0], ecx
add esp, 0x58
ret