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

Disassembly:
push 0xffffffffffffffff
push 0x455e46
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4a4
mov edx, ecx
push ebx
push ebp
push esi
lea ebp, [edx + 4]
push edi
mov ecx, 0x41
xor eax, eax
mov edi, ebp
lea ebx, [edx + 0x108]
rep stosd dword es:[edi], eax
mov ecx, 0x41
mov edi, ebx
rep stosd dword es:[edi], eax
lea esi, [edx + 0x20c]
mov ecx, 0x41
mov edi, esi
mov dword [esp + 0x20], 0x94
rep stosd dword es:[edi], eax
lea edi, [edx + 0x310]
mov ecx, 0x41
mov dword [esp + 0x18], edi
add edx, 0x414
rep stosd dword es:[edi], eax
mov dword [esp + 0x14], edx
mov word [edx], ax
lea ecx, [esp + 0x20]
push ecx
mov byte [edx + 2], al
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x405a7b
cmp dword [esp + 0x30], 1
je 0x405a7b
push 0
push 0x26
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
jmp 0x405aa5
lea edx, [esp + 0xb4]
push 0x400
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
movsx eax, byte [esp + 0xb4]
push eax
push str._c:Program_Files
push esi
call fcn.004202c2
add esp, 0xc
mov ecx, dword [esp + 0x4c4]
lea esi, [ecx + 0x1c]
mov ecx, esi
call fcn.0043f811
mov eax, dword [esi]
push str.NULL
push eax
call fcn.0041fdfe
add esp, 8
test eax, eax
jne 0x405ad8
push 0x104
push ebp
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x405af7
mov edi, dword [esi]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x4c4]
lea esi, [eax + 0x20]
mov ecx, esi
call fcn.0043f811
mov eax, dword [esi]
push str.NULL
push eax
call fcn.0041fdfe
add esp, 8
test eax, eax
jne 0x405b2a
push 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x405b49
mov edi, dword [esi]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x4c4]
lea esi, [eax + 0x28]
mov ecx, esi
call fcn.0043f811
mov eax, dword [esi]
push str.NULL
push eax
call fcn.0041fdfe
add esp, 8
test eax, eax
jne 0x405c06
mov ecx, dword [0x470a10]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x10]
mov dword [esp + 0x4bc], eax
call fcn.0043f220
push 0x475368
lea ecx, [esp + 0x14]
call fcn.0043f41e
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x10]
mov eax, dword [edx - 8]
dec eax
push eax
lea eax, [esp + 0x20]
push eax
call fcn.00435d97
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x4c0], 1
call fcn.0043f3ce
lea ecx, [esp + 0x1c]
mov byte [esp + 0x4bc], 0
call fcn.0043f295
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
push ecx
push 0x475360
push 0x46e098
push edx
call fcn.004202c2
add esp, 0x10
lea ecx, [esp + 0x10]
mov dword [esp + 0x4bc], 0xffffffff
call fcn.0043f295
jmp 0x405c27
mov edi, dword [esi]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x18]
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 + 0x4c4]
lea esi, [ecx + 0x2c]
mov ecx, esi
call fcn.0043f811
mov eax, dword [esi]
push str.NULL
push eax
call fcn.0041fdfe
add esp, 8
test eax, eax
jne 0x405c68
movsx edx, byte [0x475360]
mov eax, dword [esp + 0x14]
push edx
push 0x46e094
push eax
call fcn.004202c2
add esp, 0xc
jmp 0x405c89
mov edi, dword [esi]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x4b4]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x4b0
ret 4