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

Disassembly:
push 0xe0
mov eax, 0x5dcce8
call fcn.0056d43d
mov dword [ebp - 0x70], edx
mov ebx, ecx
test ebx, ebx
je 0x4f541c
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4f541c
mov ecx, ebx
call fcn.004f4c0a
test eax, eax
je 0x4f541c
xor ecx, ecx
xor eax, eax
push 7
pop edi
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], edi
mov word [ebp - 0x40], ax
mov dword [ebp - 4], ecx
push ecx
lea ecx, [ebp - 0x40]
call fcn.0044610e
pop ecx
push 8
pop esi
test al, al
je 0x4f53d9
and dword [ebp - 0x28], 0
lea ecx, [ebp - 0x28]
and dword [ebp - 0x18], 0
xor eax, eax
push str.Crypt32.dll
mov dword [ebp - 0x14], edi
mov word [ebp - 0x28], ax
call fcn.00408fe7
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x30]
test edx, edx
jne 0x4f513d
cmp dword [ebp - 0x14], esi
lea eax, [ebp - 0x28]
push dword [ebp - 0x18]
cmovae eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x40]
push eax
call fcn.00407cc7
jmp 0x4f51b8
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x4f51b8
cmp dword [ebp - 0x2c], esi
lea eax, [ebp - 0x40]
push 0x2f
cmovae eax, dword [ebp - 0x40]
movzx eax, word [eax + edx*2 - 2]
pop edx
mov dword [ebp - 0x4c], edx
push 0x5c
pop edi
cmp dx, ax
je 0x4f5176
cmp di, ax
je 0x4f5176
push 0x60db0c
lea ecx, [ebp - 0x40]
call fcn.00409914
mov ecx, dword [ebp - 0x18]
xor edx, edx
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], esi
cmovae eax, dword [ebp - 0x28]
movzx eax, word [eax]
cmp word [ebp - 0x4c], ax
je 0x4f5190
cmp di, ax
jne 0x4f5193
xor edx, edx
inc edx
cmp dword [ebp - 0x14], esi
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
lea ecx, [eax + ecx*2]
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
lea eax, [eax + edx*2]
sub ecx, eax
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x40]
call fcn.0040993b
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
cmp eax, esi
jb 0x4f51f8
mov ecx, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], ecx
cmp eax, 0x1000
jb 0x4f51ef
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00403daf
mov eax, dword [ebp - 0x48]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x44]
push eax
push ecx
call fcn.0056c61e
pop ecx
pop ecx
cmp dword [ebp - 0x2c], esi
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x44], eax
test eax, eax
je 0x4f53d9
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CryptQueryObject
push eax
call esi
push str.CryptMsgGetParam
push dword [ebp - 0x44]
mov edi, eax
call esi
push str.CryptMsgClose
push dword [ebp - 0x44]
mov dword [ebp - 0x68], eax
call esi
push str.CertFindCertificateInStore
push dword [ebp - 0x44]
mov dword [ebp - 0x7c], eax
call esi
push str.CertFreeCertificateContext
push dword [ebp - 0x44]
mov dword [ebp - 0x6c], eax
call esi
push str.CertCloseStore
push dword [ebp - 0x44]
mov dword [ebp - 0x74], eax
call esi
push str.CertGetNameStringW
push dword [ebp - 0x44]
mov dword [ebp - 0x78], eax
call esi
mov dword [ebp - 0x4c], eax
xor eax, eax
push 0x70
mov esi, eax
mov dword [ebp - 0x58], eax
push eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0xec]
push eax
mov dword [ebp - 0x48], esi
call fcn.00573610
add esp, 0xc
lea eax, [ebp - 0x50]
xor ecx, ecx
mov dword [ebp - 0x54], ecx
push ecx
push eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x64]
push eax
push ecx
push 2
push 0x400
push ebx
push 1
call edi
test eax, eax
je 0x4f53ac
mov ebx, dword [ebp - 0x68]
lea eax, [ebp - 0x54]
push eax
push esi
push esi
push 6
push dword [ebp - 0x50]
call ebx
test eax, eax
je 0x4f53ac
push dword [ebp - 0x54]
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x40
call edi
mov esi, eax
test esi, esi
je 0x4f53a9
lea eax, [ebp - 0x54]
push eax
push esi
push 0
push 6
push dword [ebp - 0x50]
call ebx
test eax, eax
je 0x4f53a2
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
mov dword [ebp - 0xd4], eax
mov dword [ebp - 0xd0], ecx
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
push 0
mov dword [ebp - 0xe8], eax
lea eax, [ebp - 0xec]
push eax
push 0xb0000
push 0
push 0x10001
push dword [ebp - 0x58]
mov dword [ebp - 0xe4], ecx
call dword [ebp - 0x6c]
mov ebx, eax
test ebx, ebx
je 0x4f53a2
xor eax, eax
push eax
push eax
push eax
push eax
push 4
push ebx
call dword [ebp - 0x4c]
mov dword [ebp - 0x54], eax
cmp eax, 1
je 0x4f539e
add eax, eax
push eax
push 0x40
call edi
push dword [ebp - 0x54]
mov edi, eax
push edi
push 0
push 0
push 4
push ebx
call dword [ebp - 0x4c]
cmp eax, 1
je 0x4f5393
mov ecx, dword [ebp - 0x70]
push edi
call fcn.00408fe7
mov dword [ebp - 0x48], 1
test edi, edi
je 0x4f539e
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call dword [ebp - 0x74]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [ebp - 0x48]
cmp dword [ebp - 0x58], 0
je 0x4f53be
push 0
push dword [ebp - 0x58]
call dword [ebp - 0x78]
and dword [ebp - 0x58], 0
cmp dword [ebp - 0x50], 0
je 0x4f53ce
push dword [ebp - 0x50]
call dword [ebp - 0x7c]
and dword [ebp - 0x50], 0
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x4f53db
xor esi, esi
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x4f5418
mov ecx, dword [ebp - 0x40]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], ecx
cmp eax, 0x1000
jb 0x4f540f
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00403daf
mov eax, dword [ebp - 0x4c]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x48]
push eax
push ecx
call fcn.0056c61e
pop ecx
pop ecx
mov eax, esi
jmp 0x4f541e
xor eax, eax
call fcn.0056d3ec
ret