Function at 0x40162e
Capabilities:
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 fcn.00401425
pop ecx
test eax, eax
jne 0x401674
push 0x7e
call edi
jmp 0x4018c9
cmp dword [0x602608], ebx
jne 0x40172b
push ebx
push str.crypt32.dll
call fcn.004010a5
pop ecx
pop ecx
mov dword [0x602608], eax
cmp eax, ebx
je 0x40172b
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CryptMsgClose
push eax
call edi
push str.CertCloseStore
push dword [0x602608]
mov dword [0x60260c], eax
call edi
push str.CertFreeCertificateContext
push dword [0x602608]
mov dword [0x602610], eax
call edi
push str.CertFindCertificateInStore
push dword [0x602608]
mov dword [0x602614], eax
call edi
push str.CryptMsgGetParam
push dword [0x602608]
mov dword [0x602618], eax
call edi
push str.CryptQueryObject
push dword [0x602608]
mov dword [0x60261c], eax
call edi
push str.CertGetNameStringA
push dword [0x602608]
mov dword [0x602620], eax
call edi
push str.CryptDecodeObject
push dword [0x602608]
mov dword [0x602624], eax
call edi
mov dword [0x602628], eax
cmp dword [0x60260c], ebx
je 0x40190f
cmp dword [0x602610], ebx
je 0x40190f
cmp dword [0x602614], ebx
je 0x40190f
cmp dword [0x602618], ebx
je 0x40190f
cmp dword [0x60261c], ebx
je 0x40190f
mov eax, dword [0x602620]
cmp eax, ebx
je 0x40190f
cmp dword [0x602624], ebx
je 0x40190f
cmp dword [0x602628], ebx
je 0x40190f
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 0x4017c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4018c9
lea eax, [esp + 0x20]
push eax
push ebx
push ebx
push 6
push dword [esp + 0x1c]
call dword [0x60261c]
mov dword [esp + 0x10], eax
cmp eax, ebx
je 0x4017bd
push dword [esp + 0x20]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, ebx
je 0x4017bd
lea eax, [esp + 0x20]
push eax
push esi
push ebx
push 6
push dword [esp + 0x1c]
call dword [0x60261c]
mov dword [esp + 0x10], eax
cmp eax, ebx
je 0x4017bd
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 [0x602618]
mov dword [esp + 0x18], eax
cmp eax, ebx
je 0x4017bd
cmp dword [ebp + 0xc], ebx
je 0x40186f
push eax
call fcn.00401918
pop ecx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4018c9
lea eax, [esp + 0x1c]
push eax
call fcn.00401a29
pop ecx
test eax, eax
je 0x4018c9
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 [0x602618]
mov dword [esp + 0x18], eax
cmp eax, ebx
je 0x4017bd
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 0x4018e8
push dword [esp + 0x18]
call dword [0x602614]
cmp dword [esp + 0x14], ebx
je 0x4018f9
push ebx
push dword [esp + 0x18]
call dword [0x602610]
cmp dword [esp + 0xc], ebx
je 0x401909
push dword [esp + 0xc]
call dword [0x60260c]
mov eax, dword [esp + 0x10]
jmp 0x401911
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret