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

Disassembly:
push 0xe0
mov eax, 0x5c6653
call fcn.00542a0f
mov dword [ebp - 0x70], edx
mov ebx, ecx
test ebx, ebx
je 0x4cb4df
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4cb4df
mov ecx, ebx
call fcn.004cac9e
test eax, eax
je 0x4cb4df
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.00446376
pop ecx
push 8
pop esi
test al, al
je 0x4cb49c
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.00409240
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x30]
test edx, edx
jne 0x4cb200
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.00407f20
jmp 0x4cb27b
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x4cb27b
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 0x4cb239
cmp di, ax
je 0x4cb239
push 0x5fb124
lea ecx, [ebp - 0x40]
call fcn.00409b6d
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 0x4cb253
cmp di, ax
jne 0x4cb256
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.00409b94
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
cmp eax, esi
jb 0x4cb2bb
mov ecx, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], ecx
cmp eax, 0x1000
jb 0x4cb2b2
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00403fef
mov eax, dword [ebp - 0x48]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x44]
push eax
push ecx
call fcn.00541bf5
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 0x4cb49c
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.00548bf0
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 0x4cb46f
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 0x4cb46f
push dword [ebp - 0x54]
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x40
call edi
mov esi, eax
test esi, esi
je 0x4cb46c
lea eax, [ebp - 0x54]
push eax
push esi
push 0
push 6
push dword [ebp - 0x50]
call ebx
test eax, eax
je 0x4cb465
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 0x4cb465
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 0x4cb461
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 0x4cb456
mov ecx, dword [ebp - 0x70]
push edi
call fcn.00409240
mov dword [ebp - 0x48], 1
test edi, edi
je 0x4cb461
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 0x4cb481
push 0
push dword [ebp - 0x58]
call dword [ebp - 0x78]
and dword [ebp - 0x58], 0
cmp dword [ebp - 0x50], 0
je 0x4cb491
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 0x4cb49e
xor esi, esi
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x4cb4db
mov ecx, dword [ebp - 0x40]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], ecx
cmp eax, 0x1000
jb 0x4cb4d2
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00403fef
mov eax, dword [ebp - 0x4c]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x48]
push eax
push ecx
call fcn.00541bf5
pop ecx
pop ecx
mov eax, esi
jmp 0x4cb4e1
xor eax, eax
call fcn.005429be
ret