Function at 0x466c23
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x160
mov eax, dword [0x5087d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 0x20]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0xe0], ecx
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xc0], esi
test edi, edi
je 0x4671e4
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x4671e4
cmp dword [ebp + 0xc], 0
je 0x4671e4
cmp dword [ebp + 0x10], 0
je 0x4671e4
push ebx
xor ebx, ebx
lea ecx, [ebp - 0xd8]
mov dword [esi], ebx
mov dword [ebp - 0xc8], ebx
mov dword [ebp - 0xc4], ebx
call fcn.00488ecc
cmp byte [ebp + 0x14], bl
jne 0x466cab
push ebx
lea ecx, [ebp - 0xd8]
call fcn.004890a4
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x466d1e
mov eax, dword [0x50b594]
xor ebx, ebx
inc ebx
cmp eax, 0x50b594
je 0x466cf3
test byte [eax + 0x1c], bl
je 0x466cf3
cmp byte [eax + 0x19], 2
jb 0x466cf3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x50b594]
push edi
push 0x4ca3e4
push 0xc
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0041dfa9
add esp, 0x18
cmp byte [ebp + 0x14], 0
push 2
pop esi
jne 0x466d08
push ebx
lea ecx, [ebp - 0xd8]
call fcn.004890a4
lea ecx, [ebp - 0xd8]
call fcn.00488f06
mov edi, dword [ebp - 0xbc]
jmp 0x4671a5
xor ebx, ebx
inc ebx
cmp byte [ebp + 0x14], 0
jne 0x466d33
push ebx
lea ecx, [ebp - 0xd8]
call fcn.004890a4
xor ecx, ecx
push ecx
mov byte [ebp - 0xb5], cl
mov dword [ebp - 0xc], ecx
xor eax, eax
push 0x4daef0
lea ecx, [ebp - 0x1c]
mov dword [ebp - 8], 7
mov word [ebp - 0x1c], ax
call fcn.00401404
push dword [ebp + 0x24]
mov ecx, dword [ebp - 0xe0]
push dword [ebp + 0x1c]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xb5]
push eax
push dword [ebp + 0x14]
mov dword [ebp - 0xe4], ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call fcn.00467224
mov esi, eax
cmp esi, ebx
je 0x466dd2
cmp byte [ebp + 0x24], 0
jne 0x466dd8
mov eax, dword [0x50b594]
cmp eax, 0x50b594
je 0x466dc2
test byte [eax + 0x1c], bl
je 0x466dc2
cmp byte [eax + 0x19], 2
jb 0x466dc2
push esi
push dword [ebp + 0xc]
push edi
push 0x4ca3e4
push 0xd
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.004664ee
add esp, 0x1c
push 0
push ebx
lea ecx, [ebp - 0x1c]
call fcn.0040174e
jmp 0x466d08
cmp byte [ebp + 0x24], 0
je 0x466dde
mov dword [ebp - 0xe4], esi
cmp byte [ebp - 0xb5], 0
je 0x466df3
cmp dword [ebp - 8], 8
mov edi, dword [ebp - 0x1c]
jae 0x466df3
lea edi, [ebp - 0x1c]
xor ecx, ecx
mov dword [ebp - 0xf0], ecx
mov dword [ebp - 0xec], ecx
mov dword [ebp - 0xe8], ecx
cmp byte [ebp + 0x14], cl
jne 0x466e1a
push ecx
lea ecx, [ebp - 0xd8]
call fcn.004890a4
xor ecx, ecx
push ecx
lea eax, [ebp - 0xc4]
push eax
lea eax, [ebp - 0xc8]
push eax
lea eax, [ebp - 0xe8]
push eax
lea eax, [ebp - 0xec]
push eax
lea eax, [ebp - 0xf0]
push eax
push ecx
push 2
push 0x400
push edi
push ebx
call dword [sym.imp.CRYPT32.dll_CryptQueryObject]
test eax, eax
jne 0x466ea8
cmp byte [ebp + 0x14], al
jne 0x466e63
push ebx
lea ecx, [ebp - 0xd8]
call fcn.004890a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x50b594]
cmp ecx, 0x50b594
je 0x466e98
test byte [ecx + 0x1c], bl
je 0x466e98
cmp byte [ecx + 0x19], 2
jb 0x466e98
push eax
push 0x4ca3e4
push 0xe
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.0041e118
add esp, 0x14
cmp esi, ebx
jne 0x466dc2
push 4
pop esi
jmp 0x466dc2
cmp byte [ebp - 0xb5], 0
mov edi, dword [ebp - 0xc0]
je 0x466ebf
or dword [edi], 0x1001
jmp 0x466ec1
or dword [edi], ebx
cmp byte [ebp + 0x14], 0
jne 0x466ed3
push ebx
lea ecx, [ebp - 0xd8]
call fcn.004890a4
xor ecx, ecx
lea eax, [ebp - 0xdc]
push eax
push ecx
push ecx
push 6
pop esi
push esi
push dword [ebp - 0xc4]
mov dword [ebp - 0xdc], ecx
call dword [sym.imp.CRYPT32.dll_CryptMsgGetParam]
test eax, eax
jne 0x466f35
mov eax, dword [0x50b594]
cmp eax, 0x50b594
je 0x466ea0
test byte [eax + 0x1c], bl
je 0x466ea0
cmp byte [eax + 0x19], 2
jb 0x466ea0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x50b594]
push 0x4ca3e4
push 0xf
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0041e118
add esp, 0x14
jmp 0x466ea0
lea ecx, [ebp - 0xb4]
call fcn.004251e4
push dword [ebp - 0xdc]
lea ecx, [ebp - 0xb4]
call fcn.004253de
mov dword [ebp - 0xc0], eax
test eax, eax
jne 0x466f97
mov eax, dword [0x50b594]
cmp eax, 0x50b594
je 0x466f87
test byte [eax + 0x1c], bl
je 0x466f87
cmp byte [eax + 0x19], 2
jb 0x466f87
push 0x4ca3e4
push 0x10
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0041df22
add esp, 0x10
lea ecx, [ebp - 0xb4]
call fcn.00425236
jmp 0x466dc2
lea ecx, [ebp - 0xdc]
push ecx
push eax
push 0
push esi
push dword [ebp - 0xc4]
call dword [sym.imp.CRYPT32.dll_CryptMsgGetParam]
test eax, eax
jne 0x466fef
mov eax, dword [0x50b594]
cmp eax, 0x50b594
je 0x466fea
test byte [eax + 0x1c], bl
je 0x466fea
cmp byte [eax + 0x19], 2
jb 0x466fea
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4ca3e4
push 0x11
mov eax, dword [0x50b594]
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0041e118
add esp, 0x14
push 4
pop esi
jmp 0x466f87
push 0x70
lea eax, [ebp - 0x160]
push 0
push eax
call fcn.0046bdb0
mov ecx, dword [ebp - 0xc0]
add esp, 0xc
mov eax, dword [ecx + 4]
mov dword [ebp - 0x148], eax
mov eax, dword [ecx + 8]
mov dword [ebp - 0x144], eax
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x15c], eax
mov eax, dword [ecx + 0x10]
push 0
mov dword [ebp - 0x158], eax
lea eax, [ebp - 0x160]
push eax
push 0xb0000
push 0
push 0x10001
push dword [ebp - 0xc8]
call dword [sym.imp.CRYPT32.dll_CertFindCertificateInStore]
mov dword [ebp - 0xc0], eax
test eax, eax
jne 0x467085
mov eax, dword [0x50b594]
cmp eax, 0x50b594
je 0x466fea
test byte [eax + 0x1c], bl
je 0x466fea
cmp byte [eax + 0x19], 2
jb 0x466fea
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4ca3e4
push 0x12
jmp 0x466fd7
or dword [edi], 0x4000
push edi
mov edi, dword [ebp - 0xbc]
lea ecx, [ebp - 0xb6]
push ecx
mov ecx, dword [ebp - 0xe0]
push edi
push dword [ebp + 0x10]
mov byte [ebp - 0xb6], 0
push dword [ebp + 0xc]
push eax
call fcn.00469213
mov esi, eax
cmp dword [ebp + 0x1c], ebx
jne 0x467100
cmp byte [ebp - 0xb6], 0
jne 0x467100
push 3
pop esi
mov eax, dword [0x50b594]
cmp eax, 0x50b594
je 0x467178
test byte [eax + 0x1c], bl
je 0x467178
cmp byte [eax + 0x19], 4
jb 0x467178
push 0x4ca3e4
push 0x13
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0041df22
add esp, 0x10
jmp 0x467178
cmp esi, ebx
je 0x46716c
cmp esi, 3
je 0x46713d
cmp esi, 0xb
je 0x46713d
cmp esi, 0xd
je 0x46713d
cmp esi, 0xe
je 0x46713d
cmp esi, 0x12
je 0x46713d
mov eax, dword [0x50b594]
cmp eax, 0x50b594
je 0x467178
test byte [eax + 0x1c], bl
je 0x467178
cmp byte [eax + 0x19], 2
jb 0x467178
push 0x4ca3e4
push 0x15
jmp 0x4670f0
mov eax, dword [0x50b594]
cmp eax, 0x50b594
je 0x467178
test byte [eax + 0x1c], bl
je 0x467178
cmp byte [eax + 0x19], 4
jb 0x467178
push esi
push 0x4ca3e4
push 0x14
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00467f98
add esp, 0x14
jmp 0x467178
cmp byte [ebp + 0x24], 0
je 0x467178
mov esi, dword [ebp - 0xe4]
lea ecx, [ebp - 0xb4]
call fcn.00425236
push 0
push ebx
lea ecx, [ebp - 0x1c]
call fcn.0040174e
lea ecx, [ebp - 0xd8]
call fcn.00488f06
push dword [ebp - 0xc0]
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
cmp dword [ebp - 0xc8], 0
je 0x4671c3
push 0
push dword [ebp - 0xc8]
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
and dword [ebp - 0xc8], 0
cmp dword [ebp - 0xc4], 0
je 0x4671d8
push dword [ebp - 0xc4]
call dword [sym.imp.CRYPT32.dll_CryptMsgClose]
cmp esi, ebx
pop ebx
je 0x4671e0
mov byte [edi], 0
mov eax, esi
jmp 0x467214
mov eax, dword [0x50b594]
cmp eax, 0x50b594
je 0x467211
test byte [eax + 0x1c], 1
je 0x467211
cmp byte [eax + 0x19], 2
jb 0x467211
push 0x4ca3e4
push 0xb
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0041df22
add esp, 0x10
push 5
pop eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0046aec6
leave
ret 0x20