Function at 0x58f050
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5add45
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x6340c4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0x250], eax
mov dword [ebp - 0x260], ecx
mov esi, dword [ebp + 8]
mov dword [eax], 0
mov dword [eax + 4], 0
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x58f0a6
mov eax, dword [esi]
xor ecx, ecx
mov dword [esi + 0x10], 0
push 0x20a
mov word [eax], cx
lea eax, [ebp - 0x21c]
push ecx
push eax
call fcn.004c76f0
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0x105
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x58f0e7
mov eax, 0x8000ffff
jmp 0x58f543
xor eax, eax
mov dword [ebp - 0x224], 0
lea ecx, [ebp - 0x21c]
mov dword [ebp - 0x220], 7
mov word [ebp - 0x234], ax
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x58f110
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x234]
call fcn.004459d0
push 0xd
push str.wintrust.dll
lea ecx, [ebp - 0x234]
mov dword [ebp - 4], 0
call fcn.00447e80
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
cmovae eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
mov dword [ebp - 0x25c], ebx
test ebx, ebx
je 0x58f4bf
push str.WTHelperProvDataFromStateData
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x258], eax
test eax, eax
jne 0x58f1fe
sub esp, 0x18
mov edi, esp
push 0x30
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
call fcn.00446660
push 0x27
mov esi, eax
mov dword [edi + 0x10], 0x27
push str.Failed_to_entry_point_from_wintrust.dll
push esi
mov dword [ebp - 0x258], esi
mov dword [edi + 0x14], 0x2f
call fcn.004c7170
lea eax, [ebp - 0x258]
mov byte [esi + 0x27], 0
push eax
push edi
call fcn.00446600
add esp, 0x18
call fcn.0058ee70
add esp, 0x18
mov ebx, 0x8000ffff
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x58f520
push str.WTHelperGetProvSignerFromChain
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x58f18c
push str.WTHelperGetProvCertFromChain
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 8
mov dword [ebp - 0x254], eax
lea eax, [ebp - 0x268]
push 0
push eax
call fcn.004c76f0
mov eax, dword [ebp - 0x260]
add esp, 0xc
mov ecx, dword [ebp - 0x258]
mov ebx, 0x80004005
push dword [eax + 0x20]
call dword [0x5c3794]
call dword [ebp - 0x258]
test eax, eax
je 0x58f455
push 0
push 0
push 0
push eax
mov ecx, edi
call dword [0x5c3794]
call edi
mov dword [ebp - 0x260], eax
test eax, eax
je 0x58f40f
mov edi, dword [ebp - 0x254]
mov ecx, edi
push 0
push eax
call dword [0x5c3794]
call edi
test eax, eax
je 0x58f326
mov edx, dword [eax + 4]
lea ecx, [ebp - 0x24c]
call fcn.0058eef0
push eax
mov ecx, esi
call fcn.0044a540
lea ecx, [ebp - 0x24c]
call fcn.00444ea0
cmp dword [esi + 0x10], 0
jne 0x58f382
sub esp, 0x18
mov edi, esp
push 0x30
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
call fcn.00446660
push 0x2d
mov esi, eax
mov dword [edi + 0x10], 0x2d
push str.Subject_name_was_not_found_in_the_certificate
push esi
mov dword [ebp - 0x254], esi
mov dword [edi + 0x14], 0x2f
call fcn.004c7170
lea eax, [ebp - 0x254]
mov byte [esi + 0x2d], 0
push eax
push edi
call fcn.00446600
add esp, 0x18
call fcn.0058ee70
add esp, 0x18
xor ebx, ebx
jmp 0x58f382
sub esp, 0x18
mov edi, esp
push 0x30
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
call fcn.00446660
push 0x28
mov esi, eax
mov dword [edi + 0x10], 0x28
push str.Trust_provider_certificate_was_not_found
push esi
mov dword [ebp - 0x254], esi
mov dword [edi + 0x14], 0x2f
call fcn.004c7170
lea eax, [ebp - 0x254]
mov byte [esi + 0x28], 0
push eax
push edi
call fcn.00446600
add esp, 0x18
call fcn.0058ee70
add esp, 0x18
mov eax, dword [ebp - 0x260]
cmp dword [eax + 0x20], 0
je 0x58f3c6
mov eax, dword [eax + 0x24]
lea ecx, [ebp - 0x268]
push ecx
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
mov edx, dword [ebp - 0x250]
lea ecx, [ebp - 0x268]
call fcn.0058efc0
push dword [ebp - 0x25c]
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x58f520
sub esp, 0x18
mov edi, esp
push 0x40
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
call fcn.00446660
push 0x31
mov esi, eax
mov dword [edi + 0x10], 0x31
push str.Countersignature_was_not_found_in_the_certificate
push esi
mov dword [ebp - 0x250], esi
mov dword [edi + 0x14], 0x3f
call fcn.004c7170
mov byte [esi + 0x31], 0
jmp 0x58f499
sub esp, 0x18
mov edi, esp
push 0x30
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
call fcn.00446660
push 0x20
mov esi, eax
mov dword [edi + 0x10], 0x20
push str.Signer_information_was_not_found
push esi
mov dword [ebp - 0x250], esi
mov dword [edi + 0x14], 0x2f
call fcn.004c7170
mov byte [esi + 0x20], 0
jmp 0x58f499
sub esp, 0x18
mov edi, esp
push 0x30
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
call fcn.00446660
push 0x24
mov esi, eax
mov dword [edi + 0x10], 0x24
push str.Certificate_trust_data_was_not_found
push esi
mov dword [ebp - 0x250], esi
mov dword [edi + 0x14], 0x2f
call fcn.004c7170
mov byte [esi + 0x24], 0
lea eax, [ebp - 0x250]
push eax
push edi
call fcn.00446600
add esp, 0x18
call fcn.0058ee70
add esp, 0x18
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x58f520
sub esp, 0x18
mov edi, esp
push 0x20
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
call fcn.00446660
push 0x1b
mov esi, eax
mov dword [edi + 0x10], 0x1b
push str.Failed_to_load_wintrust.dll
push esi
mov dword [ebp - 0x25c], esi
mov dword [edi + 0x14], 0x1f
call fcn.004c7170
lea eax, [ebp - 0x25c]
mov byte [esi + 0x1b], 0
push eax
push edi
call fcn.00446600
add esp, 0x18
call fcn.0058ee70
add esp, 0x18
mov ebx, 0x8000ffff
mov ecx, dword [ebp - 0x220]
cmp ecx, 8
jb 0x58f541
lea ecx, [ecx*2 + 2]
push ecx
push dword [ebp - 0x234]
call fcn.00446620
add esp, 8
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004c59c5
mov esp, ebp
pop ebp
ret