Function at 0x459d50
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bd7ab
mov eax, dword fs:[0]
push eax
sub esp, 0xa30
mov eax, dword [0x4e9688]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
cmp dword [ebx], 0
je 0x459d93
xor eax, eax
cmp dword [ebx + 0x1c], eax
setne al
jmp 0x45a02c
call fcn.00459cc0
test eax, eax
jne 0x459da6
mov eax, 1
jmp 0x45a02c
lea edi, [ebx + 4]
push edi
mov dword [ebp - 0xa38], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
cmp dword [ebx], 0
je 0x459dcd
xor eax, eax
cmp dword [ebx + 0x1c], eax
push edi
jmp 0x45a01f
cmp dword [ebx + 0x34], 0
jne 0x459de1
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x45a02c
push 0x810
lea ecx, [ebp - 0xa30]
push 0
push ecx
call fcn.00497780
lea eax, [ebp - 0xa30]
mov esi, str.360TS
mov ecx, eax
add esp, 0xc
mov dword [ebp - 0xa34], 0x814
mov edx, 0x100
sub esi, ecx
lea ecx, [edx + 0x7ffffefe]
test ecx, ecx
je 0x459e35
movzx ecx, word [esi + eax]
test cx, cx
je 0x459e35
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x459e15
jmp 0x459e39
test edx, edx
jne 0x459e3c
sub eax, 2
xor edx, edx
cmp dword [ebx + 0x38], 8
mov word [eax], dx
jb 0x459e4c
mov esi, dword [ebx + 0x24]
jmp 0x459e4f
lea esi, [ebx + 0x24]
lea eax, [ebp - 0x830]
mov ecx, eax
mov edx, 0x100
sub esi, ecx
mov edi, edi
lea ecx, [edx + 0x7ffffefe]
test ecx, ecx
je 0x459e80
movzx ecx, word [esi + eax]
test cx, cx
je 0x459e80
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x459e60
jmp 0x459e84
test edx, edx
jne 0x459e87
sub eax, 2
xor edx, edx
mov word [eax], dx
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x21a]
push ecx
mov word [ebp - 0x21c], ax
call fcn.00497780
add esp, 0xc
lea edx, [ebp - 0x21c]
push edx
push 0
push 0
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x459f99
mov ecx, 0x104
lea eax, [ebp - 0x21c]
cmp word [eax], 0
je 0x459ee2
add eax, 2
sub ecx, 1
jne 0x459ed2
jmp 0x459f0a
test ecx, ecx
je 0x459f0a
mov eax, 0x104
sub eax, ecx
push SysReAllocString
mov ecx, 0x104
push str.360safe
sub ecx, eax
lea edx, [ebp + eax*2 - 0x21c]
call fcn.00424a70
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x21c]
push eax
call esi
test eax, eax
jne 0x459f2c
lea ecx, [ebp - 0x21c]
push ecx
call fcn.0049752d
add esp, 4
mov ecx, 0x104
lea eax, [ebp - 0x21c]
cmp word [eax], 0
je 0x459f47
add eax, 2
sub ecx, 1
jne 0x459f37
jmp 0x459f6f
test ecx, ecx
je 0x459f6f
mov eax, 0x104
sub eax, ecx
push SysReAllocString
mov ecx, 0x104
push str.LogInfo
sub ecx, eax
lea edx, [ebp + eax*2 - 0x21c]
call fcn.00424a70
lea edx, [ebp - 0x21c]
push edx
call esi
test eax, eax
jne 0x459f8b
lea eax, [ebp - 0x21c]
push eax
call fcn.0049752d
add esp, 4
push SysReAllocString
lea ecx, [ebp - 0x21c]
push ecx
jmp 0x459fbf
lea edx, [ebp - 0x21c]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x459dd3
push SysReAllocString
lea eax, [ebp - 0x21c]
push eax
mov ecx, 0x104
lea edx, [ebp - 0x630]
call fcn.00424a70
push 0x4d0dcc
lea edi, [ebx + 0x1c]
call fcn.0045d890
call fcn.004597e0
test eax, eax
jne 0x45a008
mov eax, dword [edi]
test eax, eax
je 0x45a008
mov ecx, dword [eax]
lea edx, [ebp - 0xa34]
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
test eax, eax
je 0x45a00e
mov eax, dword [edi]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [edi], 0
mov ecx, dword [ebp - 0xa38]
xor eax, eax
cmp dword [edi], eax
mov dword [ebx], 1
push ecx
setne al
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00491281
mov esp, ebp
pop ebp
ret 4