Function at 0x405731
Capabilities:
Check os version
Get common file path
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0
push ebx
push esi
lea eax, [ebp - 0xc0]
push edi
push eax
mov dword [ebp - 0xc0], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
push 0x11
xor ebx, ebx
cmp dword [ebp - 0xb0], 2
pop esi
jne 0x40577d
cmp dword [ebp - 0xbc], 3
mov dword [0x40e690], 0x10
jbe 0x40578d
mov dword [0x40e690], esi
jmp 0x40578d
xor eax, eax
cmp dword [ebp - 0xb0], ebx
setne al
mov dword [0x40e690], eax
call fcn.00401484
push 1
pop edi
cmp eax, edi
jne 0x4057f6
mov eax, dword [ebp + 8]
push 0x19954
push 0x40
mov dword [0x40e67c], eax
mov dword [0x40e6d8], ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [0x40e678], eax
jne 0x4057e2
push 0x2010
push str.WinSFX32
push str.Not_enough_memory
push ebx
call dword [0x40e680]
call fcn.0040140b
mov eax, 0x801e
jmp 0x405a5c
mov dword [0x40e5fc], ebx
call fcn.00405703
test eax, eax
jne 0x405800
call fcn.0040140b
mov eax, 0x8023
jmp 0x405a5c
mov eax, dword [0x40e678]
mov dword [eax + 0x44], ebx
mov dword [eax + 0x37c6], ebx
mov byte [eax + 0x35c1], bl
mov byte [eax + 0x18374], bl
mov byte [eax + 0x17f74], bl
add eax, 0x13e74
push eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov ecx, dword [0x40e678]
and eax, 0x3ff
cmp eax, esi
mov dword [ecx + 0x30], eax
jne 0x405851
mov dword [ecx + 0x3c], edi
mov dword [ecx + 0x40], edi
jmp 0x405857
mov dword [ecx + 0x3c], ebx
mov dword [ecx + 0x40], ebx
mov ecx, dword [ecx + 0x3c]
call fcn.00403ce1
mov ecx, dword [ebp + 0x10]
lea edx, [ebp - 4]
call fcn.00405623
mov dword [ebp + 0x10], eax
mov dword [0x40e6b0], ebx
mov dword [0x40e6a0], ebx
mov dword [0x40e6d0], ebx
mov dword [0x40e600], ebx
xor edi, edi
cmp edi, dword [ebp + 0x10]
jge 0x4058f7
mov eax, dword [ebp - 4]
mov esi, dword [eax + edi*4]
inc edi
cmp byte [esi], 0x2d
jne 0x4058d1
movzx eax, byte [esi + 1]
push eax
call dword [0x40e6a8]
cmp al, 0x6e
jne 0x4058ba
xor eax, eax
cmp byte [esi + 2], 0x2d
sete al
add eax, 0xb
mov dword [0x40e600], eax
jmp 0x405887
cmp al, 0x63
jne 0x405887
xor eax, eax
cmp byte [esi + 2], 0x2d
setne al
add eax, 0xa
mov dword [0x40e6b0], eax
jmp 0x405887
cmp edi, 1
jle 0x405887
mov eax, dword [0x40e678]
push 0x400
mov edx, esi
mov dword [0x40e6d0], 1
lea ecx, [eax + 0x17f74]
call fcn.00401f89
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp - 4]
call fcn.004056db
call fcn.00402096
cmp dword [0x40e690], ebx
mov dword [0x40e640], ebx
je 0x40594b
lea eax, [ebp - 0x2c]
push eax
push 0x8002
push ebx
call dword [0x40e708]
test eax, eax
je 0x40594b
mov eax, dword [ebp - 0x28]
mov dword [0x40e614], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push ebx
push 0x402459
push 5
call dword [0x40e660]
mov dword [0x40e640], eax
mov eax, dword [0x40e678]
push 0x104
add eax, 0x13b6c
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call fcn.0040555f
mov eax, dword [0x40e678]
push 1
mov dword [0x40e5e8], ebx
pop esi
mov cl, byte [eax + 0x37c4]
test cl, 2
je 0x405988
mov dword [0x40e5e8], esi
mov eax, dword [0x40e600]
cmp eax, ebx
jne 0x40599d
test cl, 1
je 0x40599d
mov eax, esi
mov dword [0x40e600], eax
cmp eax, 0xb
jne 0x4059aa
mov dword [0x40e600], esi
jmp 0x4059b5
cmp eax, 0xc
jne 0x4059b5
mov dword [0x40e600], ebx
cmp dword [0x40e6b0], 0xa
je 0x4059c3
test cl, 8
jne 0x4059c9
mov dword [0x40e6b0], esi
cmp dword [0x40e6b0], 0xb
jne 0x4059d8
mov dword [0x40e6b0], ebx
mov edx, esi
xor ecx, ecx
call fcn.0040449f
test eax, eax
je 0x405a31
mov eax, dword [0x40e678]
push esi
mov esi, 0x100
push 0x40e1f0
mov edx, esi
lea ecx, [eax + 0x35c1]
call fcn.004027de
mov eax, dword [0x40e678]
add eax, 0x35c1
cmp byte [eax], bl
jne 0x405a18
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, dword [0x40e678]
mov ecx, dword [ebp + 8]
push 0x40515f
push ebx
mov edx, dword [eax + 0x128]
call fcn.004023cf
mov eax, dword [0x40e640]
cmp eax, ebx
je 0x405a41
push eax
call dword [0x40e6ec]
mov eax, dword [0x40e678]
push eax
mov esi, dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
call fcn.00402553
call fcn.0040140b
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x10