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

Disassembly:
push 0xe4
mov eax, 0x48a5e2
call fcn.004544e0
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x70], eax
test ebx, ebx
je 0x42302b
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x42302b
mov ecx, ebx
call fcn.004229b7
test eax, eax
je 0x42302b
xor ecx, ecx
mov dword [ebp - 0x14], 7
xor eax, eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x18], ecx
mov word [ebp - 0x28], ax
mov dword [ebp - 4], ecx
push ecx
lea ecx, [ebp - 0x28]
call fcn.004246cf
pop ecx
push 8
pop esi
test al, al
je 0x423010
push str.Crypt32.dll
lea ecx, [ebp - 0x40]
call fcn.00404500
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x18]
test edx, edx
jne 0x422da8
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x28]
call fcn.004044d0
jmp 0x422e23
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x422e23
cmp dword [ebp - 0x14], esi
lea eax, [ebp - 0x28]
push 0x2f
cmovae eax, dword [ebp - 0x28]
movzx eax, word [eax + edx*2 - 2]
pop edx
mov dword [ebp - 0x54], edx
push 0x5c
pop edi
cmp dx, ax
je 0x422de1
cmp di, ax
je 0x422de1
push 0x4a5b00
lea ecx, [ebp - 0x28]
call fcn.004044a0
mov ecx, dword [ebp - 0x30]
xor edx, edx
lea eax, [ebp - 0x40]
cmp dword [ebp - 0x2c], esi
cmovae eax, dword [ebp - 0x40]
movzx eax, word [eax]
cmp word [ebp - 0x54], ax
je 0x422dfb
cmp di, ax
jne 0x422dfe
xor edx, edx
inc edx
cmp dword [ebp - 0x2c], esi
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
lea ecx, [eax + ecx*2]
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
lea eax, [eax + edx*2]
sub ecx, eax
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x28]
call fcn.00404760
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0
call fcn.004087f0
cmp dword [ebp - 0x14], esi
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x44], eax
test eax, eax
je 0x423010
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 - 0x54], eax
xor eax, eax
push 0x70
mov esi, eax
mov dword [ebp - 0x50], eax
push eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0xf0]
push eax
mov dword [ebp - 0x58], esi
call fcn.00455ce0
add esp, 0xc
lea eax, [ebp - 0x48]
xor ecx, ecx
mov dword [ebp - 0x4c], ecx
push ecx
push eax
lea eax, [ebp - 0x50]
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 0x422fe3
mov ebx, dword [ebp - 0x68]
lea eax, [ebp - 0x4c]
push eax
push esi
push esi
push 6
push dword [ebp - 0x48]
call ebx
test eax, eax
je 0x422fe3
push dword [ebp - 0x4c]
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x40
call edi
mov esi, eax
test esi, esi
je 0x422fe0
lea eax, [ebp - 0x4c]
push eax
push esi
push 0
push 6
push dword [ebp - 0x48]
call ebx
test eax, eax
je 0x422fd9
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
mov dword [ebp - 0xd8], eax
mov dword [ebp - 0xd4], ecx
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
push 0
mov dword [ebp - 0xec], eax
lea eax, [ebp - 0xf0]
push eax
push 0xb0000
push 0
push 0x10001
push dword [ebp - 0x50]
mov dword [ebp - 0xe8], ecx
call dword [ebp - 0x6c]
mov ebx, eax
test ebx, ebx
je 0x422fd9
xor eax, eax
push eax
push eax
push eax
push eax
push 4
push ebx
call dword [ebp - 0x54]
mov dword [ebp - 0x4c], eax
cmp eax, 1
je 0x422fd5
add eax, eax
push eax
push 0x40
call edi
push dword [ebp - 0x4c]
mov edi, eax
push edi
push 0
push 0
push 4
push ebx
call dword [ebp - 0x54]
cmp eax, 1
je 0x422fca
mov ecx, dword [ebp - 0x70]
push edi
call fcn.00404470
mov dword [ebp - 0x58], 1
test edi, edi
je 0x422fd5
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 - 0x58]
cmp dword [ebp - 0x50], 0
je 0x422ff5
push 0
push dword [ebp - 0x50]
call dword [ebp - 0x78]
and dword [ebp - 0x50], 0
cmp dword [ebp - 0x48], 0
je 0x423005
push dword [ebp - 0x48]
call dword [ebp - 0x7c]
and dword [ebp - 0x48], 0
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x423012
xor esi, esi
mov ecx, dword [ebp - 0x14]
cmp ecx, 8
jb 0x423027
inc ecx
push ecx
push dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
call fcn.004087b0
mov eax, esi
jmp 0x42302d
xor eax, eax
call fcn.0045449e
ret