Function at 0x40e530
Capabilities:
Check if file exists
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xe4
mov eax, dword [0x451270]
xor eax, esp
mov dword [esp + 0xe0], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
test ebx, ebx
je 0x40e85e
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40e85e
cmp dword [ebp + 0xc], 0
je 0x40e57c
mov ecx, ebx
call fcn.0040e370
test eax, eax
je 0x40e85e
xor eax, eax
mov dword [esp + 0x74], 7
push ecx
lea ecx, [esp + 0x64]
mov dword [esp + 0x74], 0
mov word [esp + 0x64], ax
call fcn.00405410
add esp, 4
test al, al
je 0x40e832
push str.Crypt32.dll
lea ecx, [esp + 0x34]
call fcn.004055b0
lea edx, [esp + 0x30]
lea ecx, [esp + 0x60]
call fcn.00404eb0
cmp dword [esp + 0x44], 8
jb 0x40e5d6
push dword [esp + 0x30]
call fcn.00420949
add esp, 4
cmp dword [esp + 0x74], 8
lea eax, [esp + 0x60]
cmovae eax, dword [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esp + 0x10], eax
test eax, eax
je 0x40e832
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CryptQueryObject
push eax
call esi
push str.CryptMsgGetParam
push dword [esp + 0x14]
mov edi, eax
call esi
push str.CryptMsgClose
push dword [esp + 0x14]
mov dword [esp + 0x24], eax
call esi
push str.CertFindCertificateInStore
push dword [esp + 0x14]
mov dword [esp + 0x2c], eax
call esi
push str.CertFreeCertificateContext
push dword [esp + 0x14]
mov dword [esp + 0x28], eax
call esi
push str.CertCloseStore
push dword [esp + 0x14]
mov dword [esp + 0x34], eax
call esi
push str.CertGetNameStringW
push dword [esp + 0x14]
mov dword [esp + 0x30], eax
call esi
xor esi, esi
mov dword [esp + 0x18], eax
push 0x6c
lea eax, [esp + 0x80]
mov dword [esp + 0x18], esi
push esi
push eax
mov dword [esp + 0x5c], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x60], esi
mov dword [esp + 0x68], esi
mov dword [esp + 0x64], esi
mov dword [esp + 0x84], esi
call fcn.00421940
add esp, 0xc
mov dword [esp + 0x48], esi
lea eax, [esp + 0x4c]
push esi
push eax
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x64]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x68]
push eax
push esi
push 2
push 0x400
push ebx
push 1
call edi
test eax, eax
je 0x40e7fa
mov ebx, dword [esp + 0x1c]
lea eax, [esp + 0x48]
push eax
push esi
push esi
push 6
push dword [esp + 0x5c]
call ebx
test eax, eax
je 0x40e7fa
push dword [esp + 0x48]
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x40
call edi
mov esi, eax
test esi, esi
je 0x40e7f8
lea eax, [esp + 0x48]
push eax
push esi
push 0
push 6
push dword [esp + 0x5c]
call ebx
test eax, eax
je 0x40e7eb
mov eax, dword [esi + 4]
mov dword [esp + 0x90], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x94], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x7c], eax
mov eax, dword [esi + 0x10]
push 0
mov dword [esp + 0x84], eax
lea eax, [esp + 0x7c]
push eax
push 0xb0000
push 0
push 0x10001
push dword [esp + 0x64]
call dword [esp + 0x38]
mov ebx, eax
test ebx, ebx
je 0x40e7eb
push 0
push 0
push 0
push 0
push 4
push ebx
call dword [esp + 0x30]
mov dword [esp + 0x48], eax
cmp eax, 1
je 0x40e7e6
add eax, eax
push eax
push 0x40
call edi
push dword [esp + 0x48]
mov edi, eax
push edi
push 0
push 0
push 4
push ebx
call dword [esp + 0x30]
cmp eax, 1
je 0x40e7db
mov ecx, str.Tencent_Technology_Shenzhen__Company_Limited
mov eax, edi
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40e7c6
test dx, dx
je 0x40e7c2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40e7c6
add eax, 4
add ecx, 4
test dx, dx
jne 0x40e7a0
xor eax, eax
jmp 0x40e7cb
sbb eax, eax
or eax, 1
xor ecx, ecx
mov edx, 1
test eax, eax
cmove ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
je 0x40e7e6
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call dword [esp + 0x30]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [esp + 0x14]
jmp 0x40e7fa
xor esi, esi
mov eax, dword [esp + 0x50]
test eax, eax
je 0x40e811
push 0
push eax
call dword [esp + 0x30]
mov dword [esp + 0x50], 0
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x40e826
push eax
call dword [esp + 0x28]
mov dword [esp + 0x4c], 0
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40e834
xor esi, esi
cmp dword [esp + 0x74], 8
jb 0x40e847
push dword [esp + 0x60]
call fcn.00420949
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xe0]
xor ecx, esp
call fcn.00421184
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xec]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00421184
mov esp, ebp
pop ebp
ret