Function at 0x4017a6
Capabilities:
Check if file exists
Get file attributes
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x94
push ebx
push esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], ebx
xor esi, esi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], ebx
call edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4017e8
test al, 0x50
je 0x4017f1
push 0x7e
call edi
jmp 0x401a46
cmp dword [0x63ac64], ebx
jne 0x4018a8
push ebx
push str.crypt32.dll
call fcn.004010a5
pop ecx
pop ecx
mov dword [0x63ac64], eax
cmp eax, ebx
je 0x4018a8
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CryptMsgClose
push eax
call edi
push str.CertCloseStore
push dword [0x63ac64]
mov dword [0x63ac68], eax
call edi
push str.CertFreeCertificateContext
push dword [0x63ac64]
mov dword [0x63ac6c], eax
call edi
push str.CertFindCertificateInStore
push dword [0x63ac64]
mov dword [0x63ac70], eax
call edi
push str.CryptMsgGetParam
push dword [0x63ac64]
mov dword [0x63ac74], eax
call edi
push str.CryptQueryObject
push dword [0x63ac64]
mov dword [0x63ac78], eax
call edi
push str.CertGetNameStringA
push dword [0x63ac64]
mov dword [0x63ac7c], eax
call edi
push str.CryptDecodeObject
push dword [0x63ac64]
mov dword [0x63ac80], eax
call edi
mov dword [0x63ac84], eax
cmp dword [0x63ac68], ebx
je 0x401a8c
cmp dword [0x63ac6c], ebx
je 0x401a8c
cmp dword [0x63ac70], ebx
je 0x401a8c
cmp dword [0x63ac74], ebx
je 0x401a8c
cmp dword [0x63ac78], ebx
je 0x401a8c
mov eax, dword [0x63ac7c]
cmp eax, ebx
je 0x401a8c
cmp dword [0x63ac80], ebx
je 0x401a8c
cmp dword [0x63ac84], ebx
je 0x401a8c
push ebx
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x3c]
push ecx
push ebx
push 2
push 0x400
push dword [ebp + 8]
push 1
call eax
mov dword [esp + 0x10], eax
cmp eax, ebx
jne 0x401945
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x401a46
lea eax, [esp + 0x20]
push eax
push ebx
push ebx
push 6
push dword [esp + 0x1c]
call dword [0x63ac78]
mov dword [esp + 0x10], eax
cmp eax, ebx
je 0x40193a
push dword [esp + 0x20]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, ebx
je 0x40193a
lea eax, [esp + 0x20]
push eax
push esi
push ebx
push 6
push dword [esp + 0x1c]
call dword [0x63ac78]
mov dword [esp + 0x10], eax
cmp eax, ebx
je 0x40193a
mov eax, dword [esi + 4]
mov dword [esp + 0x48], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x4c], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0x10]
push ebx
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x34]
push eax
push 0xb0000
push ebx
mov edi, 0x10001
push edi
push dword [esp + 0x28]
call dword [0x63ac74]
mov dword [esp + 0x18], eax
cmp eax, ebx
je 0x40193a
cmp dword [ebp + 0xc], ebx
je 0x4019ec
push eax
call fcn.00401a95
pop ecx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x401a46
lea eax, [esp + 0x1c]
push eax
call fcn.00401ba6
pop ecx
test eax, eax
je 0x401a46
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 4]
mov dword [esp + 0x48], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x4c], ecx
mov ecx, dword [eax + 0xc]
mov dword [esp + 0x34], ecx
mov eax, dword [eax + 0x10]
push ebx
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x34]
push eax
push 0xb0000
push ebx
push edi
push dword [esp + 0x28]
call dword [0x63ac74]
mov dword [esp + 0x18], eax
cmp eax, ebx
je 0x40193a
mov dword [esp + 0x10], 1
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call esi
push dword [esp + 0x1c]
call esi
cmp dword [esp + 0x18], ebx
je 0x401a65
push dword [esp + 0x18]
call dword [0x63ac70]
cmp dword [esp + 0x14], ebx
je 0x401a76
push ebx
push dword [esp + 0x18]
call dword [0x63ac6c]
cmp dword [esp + 0xc], ebx
je 0x401a86
push dword [esp + 0xc]
call dword [0x63ac68]
mov eax, dword [esp + 0x10]
jmp 0x401a8e
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret