Function at 0x402bf0
Capabilities:
Check os version
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58f787
mov eax, dword fs:[0]
push eax
sub esp, 0x220
mov eax, dword [0x5f88c0]
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 esi, dword [ebp + 8]
xor eax, eax
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x22c], esi
mov dword [ebp - 0x224], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
push 0x110
mov dword [ebp - 4], eax
push eax
lea eax, [ebp - 0x120]
mov dword [ebp - 0x224], 1
push eax
call fcn.0054d9f0
add esp, 0xc
mov dword [ebp - 0x124], 0x114
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x120], 6
jb 0x402d1d
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
je 0x402d5f
push str.SHGetKnownFolderPath
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x402d14
lea ecx, [ebp - 0x21c]
mov dword [ebp - 0x21c], 0
push ecx
push ebx
push 0x8000
push 0x5a9980
call eax
test eax, eax
jne 0x402d14
mov edx, dword [ebp - 0x21c]
mov ecx, edx
lea ebx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402cf0
sub ecx, ebx
sar ecx, 1
push ecx
push edx
mov ecx, esi
call fcn.00403260
push dword [ebp - 0x21c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x402d5f
lea eax, [ebp - 0x218]
push eax
push 0
push ebx
push 0x801c
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x402d5f
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402d41
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00403260
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x402e79
mov ebx, dword [esi + 0x14]
mov eax, esi
cmp ebx, 8
jb 0x402d76
mov eax, dword [esi]
lea edx, [ecx + ecx]
cmp word [edx + eax - 2], 0x5c
mov dword [ebp - 0x220], edx
je 0x402e79
cmp ecx, ebx
jae 0x402daa
lea eax, [ecx + 1]
mov dword [esi + 0x10], eax
mov eax, esi
cmp ebx, 8
jb 0x402d9e
mov eax, dword [esi]
mov dword [edx + eax], 0x5c
jmp 0x402e79
mov edx, SysReAllocString
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x402e97
lea eax, [ecx + 1]
mov edi, eax
mov dword [ebp - 0x228], eax
or edi, 7
cmp edi, edx
jbe 0x402dd2
mov edi, edx
jmp 0x402dea
mov eax, ebx
shr eax, 1
sub edx, eax
cmp ebx, edx
jbe 0x402de3
mov edi, SysReAllocString
jmp 0x402dea
add eax, ebx
cmp edi, eax
cmovb edi, eax
lea eax, [edi + 1]
mov ecx, esi
push eax
call fcn.004036e0
mov ecx, dword [ebp - 0x228]
mov dword [esi + 0x10], ecx
mov ecx, dword [ebp - 0x220]
mov dword [esi + 0x14], edi
mov dword [ebp - 0x21c], eax
push ecx
lea edi, [ecx + eax]
mov dword [ebp - 0x220], edi
cmp ebx, 8
jb 0x402e61
mov edi, dword [esi]
push edi
push eax
call fcn.0054d470
mov eax, dword [ebp - 0x220]
lea ebx, [ebx*2 + 2]
add esp, 0xc
mov dword [eax], 0x5c
cmp ebx, 0x1000
jb 0x402e55
mov ecx, dword [edi - 4]
add ebx, 0x23
sub edi, ecx
lea eax, [edi - 4]
cmp eax, 0x1f
ja 0x402e9c
mov edi, ecx
push ebx
push edi
call fcn.0054b2c7
add esp, 8
jmp 0x402e71
push esi
push eax
call fcn.0054d470
add esp, 0xc
mov dword [edi], 0x5c
mov eax, dword [ebp - 0x21c]
mov dword [esi], eax
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 - 0x10]
xor ecx, ebp
call fcn.0054b289
mov esp, ebp
pop ebp
ret
call fcn.004036c0
call fcn.0055fb01
int3