Function at 0x5987f0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x72bb49
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x188
mov dword [ebp - 0xdc], 0
push 0x7fff
lea ecx, [ebp - 0x20]
call fcn.005a0430
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0xe4], eax
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0xe8], ecx
mov edx, dword [ebp - 0xe4]
push edx
mov eax, dword [ebp - 0xe8]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jbe 0x598ab9
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xec], ecx
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0xf0], edx
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0xf4], eax
mov ecx, dword [ebp - 0xec]
push ecx
mov edx, dword [ebp - 0xf0]
push edx
mov eax, dword [ebp - 0xf4]
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
ja 0x598953
lea ecx, [ebp - 0xfd]
mov dword [ebp - 0xfc], ecx
push 0
push 0
lea ecx, [ebp - 0x88]
call fcn.0040b0a0
mov dword [ebp - 0x164], str.Cannot_get_system_directory_long_path_name
mov edx, dword [ebp - 0x164]
add edx, 1
mov dword [ebp - 0x168], edx
mov eax, dword [ebp - 0x164]
mov cl, byte [eax]
mov byte [ebp - 0x169], cl
add dword [ebp - 0x164], 1
cmp byte [ebp - 0x169], 0
jne 0x5988d6
mov edx, dword [ebp - 0x164]
sub edx, dword [ebp - 0x168]
mov dword [ebp - 0x170], edx
mov eax, dword [ebp - 0x170]
push eax
push str.Cannot_get_system_directory_long_path_name
lea ecx, [ebp - 0x88]
call fcn.0040a9d0
mov byte [ebp - 4], 2
push 0
lea ecx, [ebp - 0x88]
push ecx
lea ecx, [ebp - 0x6c]
call fcn.00593a10
push 0x7dab3c
lea edx, [ebp - 0x6c]
push edx
call fcn.00563aac
mov byte [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0x88]
call fcn.0040b0a0
lea eax, [ebp - 0x109]
mov dword [ebp - 0x108], eax
push 0
push 0
lea ecx, [ebp - 0x3c]
call fcn.0040b0a0
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x110], ecx
mov edx, dword [ebp - 0x110]
mov dword [ebp - 0x8c], edx
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x8c]
push ecx
call fcn.005a6110
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x114], edx
mov eax, dword [ebp - 0x114]
sub eax, 1
mov dword [ebp - 0x118], eax
mov ecx, dword [ebp - 0x118]
cmp ecx, dword [ebp - 0x28]
jbe 0x5989bf
call fcn.00563a37
xor edx, edx
jne 0x5989bf
cmp dword [ebp - 0x24], 0x10
jb 0x5989d4
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x174], eax
jmp 0x5989dd
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x174], ecx
mov edx, dword [ebp - 0x174]
add edx, dword [ebp - 0x118]
movsx eax, byte [edx]
cmp eax, 0x5c
je 0x598a4e
mov dword [ebp - 0x178], 0x7529d0
mov ecx, dword [ebp - 0x178]
add ecx, 1
mov dword [ebp - 0x17c], ecx
mov edx, dword [ebp - 0x178]
mov al, byte [edx]
mov byte [ebp - 0x17d], al
add dword [ebp - 0x178], 1
cmp byte [ebp - 0x17d], 0
jne 0x598a0a
mov ecx, dword [ebp - 0x178]
sub ecx, dword [ebp - 0x17c]
mov dword [ebp - 0x184], ecx
mov edx, dword [ebp - 0x184]
push edx
push 0x7529d0
lea ecx, [ebp - 0x3c]
call fcn.004472f0
push 0
push 0
mov ecx, dword [ebp + 8]
call fcn.0040b0a0
mov eax, dword [0x7c2410]
push eax
push 0
lea ecx, [ebp - 0x3c]
push ecx
mov ecx, dword [ebp + 8]
call fcn.0040aed0
mov edx, dword [ebp - 0xdc]
or edx, 1
mov dword [ebp - 0xdc], edx
mov byte [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.0040b0a0
mov byte [ebp - 4], 0
movzx eax, byte [ebp - 0x14]
test eax, eax
je 0x598ab1
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x12c], ecx
mov edx, dword [ebp - 0x12c]
push edx
call fcn.00563af8
add esp, 4
mov eax, dword [ebp + 8]
jmp 0x598b94
lea eax, [ebp - 0x135]
mov dword [ebp - 0x134], eax
push 0
push 0
lea ecx, [ebp - 0xd8]
call fcn.0040b0a0
mov dword [ebp - 0x188], str.Cannot_get_temporary_directory_path
mov ecx, dword [ebp - 0x188]
add ecx, 1
mov dword [ebp - 0x18c], ecx
mov edx, dword [ebp - 0x188]
mov al, byte [edx]
mov byte [ebp - 0x18d], al
add dword [ebp - 0x188], 1
cmp byte [ebp - 0x18d], 0
jne 0x598aed
mov ecx, dword [ebp - 0x188]
sub ecx, dword [ebp - 0x18c]
mov dword [ebp - 0x194], ecx
mov edx, dword [ebp - 0x194]
push edx
push str.Cannot_get_temporary_directory_path
lea ecx, [ebp - 0xd8]
call fcn.0040a9d0
mov byte [ebp - 4], 4
push 0
lea eax, [ebp - 0xd8]
push eax
lea ecx, [ebp - 0xbc]
call fcn.00593a10
push 0x7dab3c
lea ecx, [ebp - 0xbc]
push ecx
call fcn.00563aac
mov byte [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0xd8]
call fcn.0040b0a0
mov byte [ebp - 4], 0
movzx edx, byte [ebp - 0x14]
test edx, edx
je 0x598b94
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x160], eax
mov ecx, dword [ebp - 0x160]
push ecx
call fcn.00563af8
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret