Function at 0x7921f150
Capabilities:
Create new key via cryptacquirecontext
Get file size
Initialize hashing via wincrypt
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x214
mov eax, dword [eax + 0x54]
mov dword [ebp - 0x1e8], edx
mov dword [ebp - 0x1d8], 0
mov eax, dword [eax + 0x24]
mov ecx, eax
mov dword [ebp - 0x1e4], eax
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x1dc], eax
mov eax, dword [ecx]
mov esi, eax
shr esi, 0x10
je 0x7921f1a9
mov edi, str.1.3.6.1.4.1.311.2.1.15
mov ecx, 0x17
mov esi, eax
repe cmpsb byte [esi], byte es:[edi]
seta dl
sbb dl, 0
movsx edi, dl
test edi, edi
je 0x7921f1c2
xor esi, esi
test byte [0x7922a48c], 1
jne 0x7921f5f2
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x1e4]
mov esi, 0x80096001
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sym._CertOIDToAlgId_4
sub esp, 4
mov edx, eax
test eax, eax
je 0x7921f1b8
mov eax, dword [ebp - 0x1dc]
test eax, eax
jne 0x7921f250
lea eax, [ebp - 0x184]
lea edi, [ebp - 0x184]
mov esi, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
mov ecx, 0x1b
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 8], eax
lea eax, [ebp - 0x1dc]
mov dword [ebp - 0x1ec], edx
mov dword [esp + 0x10], 0xf0000000
mov dword [esp + 0xc], 0x18
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CryptAcquireContextW]
sub esp, 0x14
test eax, eax
je 0x7921f6a0
mov eax, dword [ebp - 0x1dc]
mov edx, dword [ebp - 0x1ec]
mov edi, 1
lea ecx, [ebp - 0x1d8]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], ecx
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CryptCreateHash]
sub esp, 0x14
test eax, eax
je 0x7921f644
mov eax, dword [ebp - 0x1d8]
mov dword [ebp - 0x1ec], eax
lea eax, [ebp - 0x1d0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1e8]
mov dword [esp], eax
call sym._GetFileSizeEx_8
sub esp, 8
test eax, eax
je 0x7921f680
mov esi, dword [ebp - 0x1e8]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call sym._SetFilePointer_16
lea edx, [ebp - 0x1d4]
sub esp, 0x10
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x1c4]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x40
mov dword [esp + 4], edx
mov dword [esp], esi
call sym._ReadFile_20
sub esp, 0x14
test eax, eax
je 0x7921f680
cmp dword [ebp - 0x1d4], 0x40
jne 0x7921f680
cmp word [ebp - 0x1c4], 0x5a4d
jne 0x7921f680
mov eax, dword [ebp - 0x188]
cmp eax, 0xfffffff
jg 0x7921f680
lea ecx, [eax + 0x1a]
mov edx, ecx
mov dword [ebp - 0x1f8], ecx
sar edx, 0x1f
cmp dword [ebp - 0x1d0], ecx
mov dword [ebp - 0x1f4], edx
mov edx, dword [ebp - 0x1cc]
sbb edx, dword [ebp - 0x1f4]
jl 0x7921f680
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._SetFilePointer_16
lea edx, [ebp - 0x1d4]
sub esp, 0x10
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x118]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x108
mov dword [esp + 4], edx
mov dword [esp], esi
call sym._ReadFile_20
sub esp, 0x14
test eax, eax
je 0x7921f680
mov eax, dword [ebp - 0x1d4]
cmp eax, 0x19
jbe 0x7921f680
cmp dword [ebp - 0x118], 0x4550
jne 0x7921f680
movzx edx, word [ebp - 0x100]
cmp dx, 0x10b
je 0x7921f6d0
cmp dx, 0x20b
jne 0x7921f680
cmp eax, 0x107
jbe 0x7921f680
mov eax, dword [ebp - 0x188]
lea edx, [eax + 0x58]
add eax, 0xa8
mov dword [ebp - 0x1f0], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x1fc], edx
mov dword [ebp - 0x1f8], eax
mov eax, dword [ebp - 0x6c]
mov edx, dword [ebp - 0x1f0]
mov esi, dword [ebp - 0x1f8]
add edx, 8
mov ecx, edx
mov dword [ebp - 0x200], edx
cmp ecx, esi
ja 0x7921f680
mov edx, dword [ebp - 0x1d0]
mov ecx, dword [ebp - 0x1cc]
cmp edx, esi
mov esi, ecx
sbb esi, 0
jl 0x7921f680
add eax, dword [ebp - 0x1f8]
test ecx, ecx
jne 0x7921f680
cmp edx, eax
jne 0x7921f680
mov eax, dword [ebp - 0x1ec]
mov esi, dword [ebp - 0x1e8]
xor edx, edx
mov ecx, dword [ebp - 0x1fc]
mov dword [esp], eax
mov eax, esi
call sym._hash_file_data
test eax, eax
je 0x7921f680
mov eax, dword [ebp - 0x1ec]
mov edx, dword [ebp - 0x1fc]
mov ecx, dword [ebp - 0x1f0]
mov dword [esp], eax
add edx, 4
mov eax, esi
call sym._hash_file_data
test eax, eax
je 0x7921f680
mov eax, dword [ebp - 0x1ec]
mov ecx, dword [ebp - 0x1f8]
mov edx, dword [ebp - 0x200]
mov dword [esp], eax
mov eax, esi
call sym._hash_file_data
test eax, eax
je 0x7921f680
lea eax, [ebp - 0x118]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1c4]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1d8]
mov dword [ebp - 0x118], 4
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_CryptGetHashParam]
mov dword [esp + 4], 4
mov dword [ebp - 0x1e8], eax
call eax
sub esp, 0x14
test eax, eax
je 0x7921f644
mov edx, dword [ebp - 0x1c4]
mov eax, dword [ebx + 0x24]
mov esi, 0xe
mov dword [esp], edx
call dword [eax + 4]
sub esp, 4
mov edx, eax
test eax, eax
je 0x7921f64b
lea eax, [ebp - 0x1c4]
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1d8]
mov dword [ebp - 0x1ec], edx
mov dword [esp], eax
mov eax, dword [ebp - 0x1e8]
mov dword [esp + 0x10], 0
mov dword [esp + 4], 2
call eax
mov edx, dword [ebp - 0x1ec]
sub esp, 0x14
test eax, eax
je 0x7921f6ac
mov ecx, dword [ebp - 0x1e4]
mov eax, dword [ebp - 0x1c4]
mov esi, 0x80096010
cmp dword [ecx + 0x18], eax
jne 0x7921f5e4
mov dword [esp + 8], eax
mov eax, dword [ecx + 0x1c]
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [ebp - 0x1e4], edx
call sym._memcmp
mov edx, dword [ebp - 0x1e4]
cmp eax, 1
sbb esi, esi
not esi
and esi, 0x80096010
mov eax, dword [ebx + 0x24]
mov dword [esp], edx
call dword [eax + 8]
sub esp, 4
jmp 0x7921f64b
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call sym._wine_dbgstr_an
mov dword [esp + 0x14], str.Cannot_verify_hash_for_pszObjId_s_n
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], 0x142
mov dword [esp + 0xc], str.SOFTPUB_VerifyImageHash
mov dword [esp + 8], 0x7922cb49
mov dword [esp + 4], 0x7922a48c
mov dword [esp], 0
call sym._ros_dbg_log
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
call sym._GetLastError_0
mov esi, eax
mov eax, dword [ebp - 0x1d8]
test eax, eax
jne 0x7921f690
test edi, edi
je 0x7921f1b8
mov eax, dword [ebp - 0x1dc]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CryptReleaseContext]
sub esp, 8
jmp 0x7921f1b8
mov esi, 0x800b0100
jmp 0x7921f64b
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CryptDestroyHash]
sub esp, 4
jmp 0x7921f655
call sym._GetLastError_0
mov esi, eax
jmp 0x7921f1b8
mov dword [ebp - 0x1e4], edx
call sym._GetLastError_0
mov edx, dword [ebp - 0x1e4]
mov esi, eax
mov eax, dword [ebx + 0x24]
mov dword [esp], edx
call dword [eax + 8]
sub esp, 4
jmp 0x7921f64b
cmp eax, 0xf7
jbe 0x7921f680
mov eax, dword [ebp - 0x188]
lea edx, [eax + 0x58]
add eax, 0x98
mov dword [ebp - 0x1f0], eax
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x1fc], edx
mov dword [ebp - 0x1f8], eax
mov eax, dword [ebp - 0x7c]
jmp 0x7921f42d