Function at 0x40e561
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa4
mov eax, dword [0x45c070]
xor eax, esp
mov dword [esp + 0xa0], eax
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x10], edx
xor ecx, ecx
mov dword [esp + 0x1c], esi
push edi
push ecx
mov dword [esp + 0x14], ecx
mov edi, ecx
mov dword [esp + 0x1c], ecx
mov ebx, ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, esi
call fcn.0040e20e
test eax, eax
jne 0x40e5b7
push 2
jmp 0x40e936
cmp dword [0x45e75c], ebx
jne 0x40e69d
mov ecx, str.crypt32.dll
call fcn.0040e01a
mov dword [0x45e75c], eax
test eax, eax
je 0x40e69d
push str.CryptMsgClose
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CertCloseStore
push dword [0x45e75c]
mov dword [0x45e8f0], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CertFreeCertificateContext
push dword [0x45e75c]
mov dword [0x45e8ec], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CertFindCertificateInStore
push dword [0x45e75c]
mov dword [0x45e780], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CryptMsgGetParam
push dword [0x45e75c]
mov dword [0x45e758], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CryptQueryObject
push dword [0x45e75c]
mov dword [0x45e7ac], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CertGetNameStringA
push dword [0x45e75c]
mov dword [0x45e7c4], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CryptDecodeObjectEx
push dword [0x45e75c]
mov dword [0x45e794], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CertGetIssuerCertificateFromStore
push dword [0x45e75c]
mov dword [0x45e7bc], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x45e790], eax
jmp 0x40e6a2
mov eax, dword [0x45e790]
cmp dword [0x45e8f0], ebx
je 0x40e934
cmp dword [0x45e8ec], ebx
je 0x40e934
cmp dword [0x45e780], ebx
je 0x40e934
cmp dword [0x45e758], ebx
je 0x40e934
cmp dword [0x45e7ac], ebx
je 0x40e934
mov esi, dword [0x45e7c4]
test esi, esi
je 0x40e934
cmp dword [0x45e794], ebx
je 0x40e934
cmp dword [0x45e7bc], ebx
je 0x40e934
test eax, eax
je 0x40e934
push 0
lea eax, [esp + 0x1c]
mov ecx, esi
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x48]
push eax
push 0
push 2
push 0x400
push dword [esp + 0x44]
xor eax, eax
inc eax
push eax
call dword [0x446208]
call esi
mov edi, eax
test edi, edi
jne 0x40e755
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x40e937
mov esi, dword [0x45e7ac]
lea eax, [esp + 0x28]
push eax
push 0
push 0
push 6
push dword [esp + 0x28]
mov ecx, esi
call dword [0x446208]
call esi
mov edi, eax
test edi, edi
je 0x40e748
push dword [esp + 0x28]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x40e79d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
xor edi, edi
jmp 0x40e937
mov esi, dword [0x45e7ac]
lea ecx, [esp + 0x28]
push ecx
push eax
push 0
push 6
push dword [esp + 0x28]
mov ecx, esi
call dword [0x446208]
call esi
mov edi, eax
test edi, edi
je 0x40e748
mov ecx, dword [esp + 0x1c]
mov esi, dword [0x45e758]
push 0
mov eax, dword [ecx + 4]
mov dword [esp + 0x54], eax
mov eax, dword [ecx + 8]
mov dword [esp + 0x58], eax
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x40], eax
mov eax, dword [ecx + 0x10]
mov ecx, esi
mov dword [esp + 0x44], eax
lea eax, [esp + 0x3c]
push eax
push 0xb0000
push 0
push 0x10001
push dword [esp + 0x24]
call dword [0x446208]
call esi
mov dword [esp + 0x24], eax
test eax, eax
je 0x40e78e
mov esi, dword [esp + 0x14]
test esi, esi
je 0x40e835
mov ecx, eax
call fcn.0040e9b0
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jne 0x40e937
mov edi, dword [esp + 0x1c]
mov ecx, edi
mov edx, dword [esp + 0x10]
call fcn.0040eb40
test eax, eax
jne 0x40e85a
mov ecx, edi
call fcn.0040ec61
test eax, eax
jne 0x40e85a
xor edi, edi
jmp 0x40e748
cmp dword [0x45e770], 0
jne 0x40e889
mov ecx, str.wintrust.dll
call fcn.0040e01a
mov dword [0x45e770], eax
test eax, eax
je 0x40e889
push str.WinVerifyTrust
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x45e760], eax
jmp 0x40e88e
mov eax, dword [0x45e760]
xor edi, edi
test eax, eax
je 0x40e934
mov dword [esp + 0x14], edi
xor esi, esi
mov ecx, dword [esp + 0x20]
call fcn.0040e225
test eax, eax
je 0x40e8b7
mov ebx, eax
inc esi
xor eax, eax
inc eax
cmp esi, eax
jb 0x40e89e
jmp 0x40e8c0
xor eax, eax
inc eax
mov edi, eax
mov dword [esp + 0x14], eax
mov eax, 0x800b010a
cmp ebx, eax
jne 0x40e937
mov esi, dword [0x45e790]
lea eax, [esp + 0x20]
and dword [esp + 0x20], 0
mov ecx, esi
push eax
mov eax, dword [esp + 0x28]
push 0
push eax
push dword [esp + 0x1c]
call dword [0x446208]
call esi
mov esi, eax
test esi, esi
je 0x40e937
mov ecx, dword [esi + 0xc]
add ecx, 0x44
call fcn.0040e2c6
mov edi, eax
mov eax, dword [esp + 0x14]
push 1
pop ecx
test edi, edi
push esi
mov esi, dword [0x45e780]
cmovne eax, ecx
mov ecx, esi
mov dword [esp + 0x18], eax
call dword [0x446208]
call esi
xor ebx, ebx
mov eax, 0x800b010a
test edi, edi
mov edi, dword [esp + 0x14]
cmove ebx, eax
jmp 0x40e937
push 0x7e
pop ebx
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40e95a
mov esi, dword [0x45e780]
mov ecx, esi
push eax
call dword [0x446208]
call esi
cmp dword [esp + 0x10], 0
je 0x40e977
mov esi, dword [0x45e8ec]
mov ecx, esi
push 0
push dword [esp + 0x14]
call dword [0x446208]
call esi
cmp dword [esp + 0x18], 0
je 0x40e992
push dword [esp + 0x18]
mov esi, dword [0x45e8f0]
mov ecx, esi
call dword [0x446208]
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0xac]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004241c7
mov esp, ebp
pop ebp
ret