Function at 0x405e00
Capabilities:
Get common file path
Get program files directory

Disassembly:
push 0xffffffffffffffff
push 0x4541bc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x428
mov eax, dword [str.lF_F]
push ebx
push ebp
push esi
push edi
mov ebx, ecx
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x448]
xor ebp, ebp
push ecx
mov ecx, ebx
mov dword [esp + 0x444], ebp
call fcn.00406190
push 0x200
lea ecx, [esp + 0x14]
mov edi, eax
mov esi, edx
call fcn.00403f70
test eax, eax
je 0x405e72
mov edx, dword [esp + 0x10]
mov dword [edx - 8], 0x200
mov eax, dword [esp + 0x10]
mov word [eax + 0x400], bp
mov eax, dword [esp + 0x10]
push 0x200
push eax
push esi
push edi
mov ecx, ebx
call fcn.00406200
lea ecx, [esp + 0x10]
call fcn.00407850
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [esp + 0x10]
cmp esi, ebp
mov dword [esp + 0x24], ebp
mov dword [edx - 8], eax
mov ecx, dword [esp + 0x10]
mov word [ecx + eax*2], bp
ja 0x405ebe
jb 0x405eb6
cmp edi, 0xc800000
ja 0x405ebe
mov dword [esp + 0x24], 1
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x232]
mov word [esp + 0x230], bp
rep stosd dword es:[edi], eax
lea edx, [esp + 0x230]
push 0x104
push edx
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov eax, dword [esp + 0x230]
mov cx, ax
cmp cx, 0x61
jb 0x405f04
cmp cx, 0x7a
ja 0x405f04
add eax, 0xffffffe0
mov ebp, dword [esp + 0x450]
cmp bp, 0x61
jb 0x405f1d
cmp bp, 0x7a
ja 0x405f1d
add ebp, 0xffe0
cmp bp, ax
mov dword [esp + 0x20], 0
jne 0x405f32
mov dword [esp + 0x20], 1
mov eax, dword [str.lF_F]
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], eax
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x28]
push eax
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
push 0x26
push eax
push 0
mov byte [esp + 0x450], 2
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x40608a
mov ecx, dword [str.lF_F]
mov edx, str.360360safe
test edx, edx
mov dword [esp + 0x18], ecx
je 0x405fda
mov eax, edx
shr eax, 0x10
jne 0x405f99
xor eax, eax
mov ecx, edx
mov ax, cx
lea ecx, [esp + 0x18]
push eax
call fcn.00403d60
jmp 0x405fda
push str.360360safe
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
test esi, esi
je 0x405fda
push esi
lea ecx, [esp + 0x1c]
call fcn.00404130
test eax, eax
je 0x405fda
lea ecx, [esi + esi]
lea edx, [esi + esi + 2]
cmp edx, ecx
jb 0x405fda
mov edi, dword [esp + 0x18]
mov eax, ecx
mov esi, str.360360safe
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x28]
push ecx
lea eax, [esp + 0x2c]
push edx
push eax
mov byte [esp + 0x44c], 3
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea ecx, [esp + 0x28]
mov word [esp + 0x28], bp
test ecx, ecx
jne 0x406008
xor esi, esi
jmp 0x406015
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
push esi
lea ecx, [esp + 0x18]
call fcn.004079b0
test eax, eax
je 0x40604f
mov edx, dword [esp + 0x14]
lea edi, [esi + esi]
lea eax, [esp + 0x28]
push edi
lea ecx, [esi + esi + 2]
push eax
push ecx
push edx
call fcn.00402fc0
mov eax, dword [esp + 0x24]
add esp, 0x10
mov dword [eax - 8], esi
mov ecx, dword [esp + 0x14]
mov word [edi + ecx], 0
mov eax, dword [esp + 0x18]
mov ecx, dword [0x46005c]
mov byte [esp + 0x440], 2
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4060a5
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x4060ab
mov eax, dword [esp + 0x18]
add eax, 0xfffffff4
push eax
call fcn.00439890
add esp, 4
jmp 0x4060ab
mov ecx, ebp
lea edx, [esp + 0x14]
and ecx, 0xffff
push ecx
push 0x4605e8
push edx
call fcn.00407560
add esp, 0xc
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x14]
push eax
push ecx
mov ecx, ebx
call fcn.00405330
mov edx, dword [esp + 0x20]
mov esi, eax
push edx
push ecx
lea eax, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x28], esp
push eax
call fcn.00407470
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x454]
push ebp
push esi
push ecx
push edx
mov ecx, ebx
call fcn.00405240
mov eax, dword [esp + 0x1c]
mov edx, dword [0x46005c]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x406115
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x406115
mov edx, dword [esp + 0x1c]
add edx, 0xfffffff4
push edx
call fcn.00439890
add esp, 4
mov eax, dword [esp + 0x14]
mov edx, dword [0x46005c]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x406140
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x406140
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.00439890
add esp, 4
mov eax, dword [esp + 0x10]
mov edx, dword [0x46005c]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40616b
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x40616b
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00439890
add esp, 4
mov ecx, dword [esp + 0x438]
pop edi
pop esi
pop ebp
mov eax, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x434
ret 0xc