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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
push ebx
push esi
lea eax, [ebp - 0x98]
push edi
push eax
mov dword [ebp - 0x98], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
push 2
xor ebx, ebx
pop eax
cmp dword [ebp - 0x88], eax
jne 0x4045d5
push 3
mov dword [0x406550], eax
pop eax
cmp dword [ebp - 0x94], eax
jbe 0x4045e5
jmp 0x4045e0
xor eax, eax
cmp dword [ebp - 0x88], ebx
setne al
mov dword [0x406550], eax
mov eax, dword [ebp + 8]
push 0x198a8
push 0x40
mov dword [0x406558], eax
mov dword [0x40656c], ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [0x406554], eax
jne 0x404624
push 0x2010
push str.WinSFX32
push str.Not_enough_memory
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x4047da
mov dword [eax + 0x34], ebx
mov eax, dword [0x406554]
mov dword [eax + 0x372e], ebx
mov eax, dword [0x406554]
mov byte [eax + 0x3529], bl
mov eax, dword [0x406554]
mov byte [eax + 0x182c8], bl
mov eax, dword [0x406554]
mov byte [eax + 0x17ec8], bl
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov ecx, dword [0x406554]
and eax, 0x3ff
mov dword [ecx + 0x20], eax
mov eax, dword [0x406554]
cmp dword [eax + 0x20], 0x11
jne 0x404682
push 1
pop ecx
mov dword [eax + 0x2c], ecx
mov eax, dword [0x406554]
mov dword [eax + 0x30], ecx
jmp 0x40468d
mov dword [eax + 0x2c], ebx
mov eax, dword [0x406554]
mov dword [eax + 0x30], ebx
mov eax, dword [0x406554]
mov ecx, dword [eax + 0x2c]
call fcn.004042ac
mov ecx, dword [ebp + 0x10]
lea edx, [ebp - 4]
call fcn.004041d3
mov dword [ebp + 0x10], eax
mov dword [0x406560], ebx
mov dword [0x40655c], ebx
mov dword [0x406568], ebx
mov dword [0x40654c], ebx
xor edi, edi
cmp edi, dword [ebp + 0x10]
jge 0x40472d
mov eax, dword [ebp - 4]
mov esi, dword [eax + edi*4]
inc edi
cmp byte [esi], 0x2d
jne 0x40470c
movzx eax, byte [esi + 1]
push eax
call dword [sym.imp.USER32.dll_CharLowerA]
cmp al, 0x6e
jne 0x4046f5
xor eax, eax
cmp byte [esi + 2], 0x2d
sete al
add eax, 0xb
mov dword [0x40654c], eax
jmp 0x4046c2
cmp al, 0x63
jne 0x4046c2
xor eax, eax
cmp byte [esi + 2], 0x2d
setne al
add eax, 0xa
mov dword [0x406560], eax
jmp 0x4046c2
cmp edi, 1
jle 0x4046c2
mov eax, dword [0x406554]
push esi
add eax, 0x17ec8
mov dword [0x406568], 1
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp - 4]
call fcn.00404284
mov eax, dword [0x406554]
push 0x104
add eax, 0x13ac0
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call fcn.00404120
mov eax, dword [0x406554]
mov dword [0x406548], ebx
push 1
test byte [eax + 0x372c], 2
pop esi
je 0x404773
mov dword [0x406548], esi
mov ecx, dword [0x40654c]
cmp ecx, ebx
jne 0x40478e
test byte [eax + 0x372c], 1
je 0x40478e
mov ecx, esi
mov dword [0x40654c], ecx
cmp ecx, 0xb
jne 0x40479b
mov dword [0x40654c], esi
jmp 0x4047a6
cmp ecx, 0xc
jne 0x4047a6
mov dword [0x40654c], ebx
cmp dword [0x406560], 0xa
je 0x4047b8
test byte [eax + 0x372c], 8
jne 0x4047be
mov dword [0x406560], esi
cmp dword [0x406560], 0xb
jne 0x4047cd
mov dword [0x406560], ebx
mov edx, esi
xor ecx, ecx
call fcn.004031a7
test eax, eax
jne 0x4047de
xor eax, eax
jmp 0x404839
mov eax, dword [0x406554]
push esi
mov edx, 0x406518
lea ecx, [eax + 0x3529]
call fcn.004013f3
mov eax, dword [0x406554]
add eax, 0x3529
cmp byte [eax], bl
jne 0x40480e
push eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, dword [0x406554]
push ebx
push 0x403d97
push ebx
push dword [eax + 0x90]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push dword [0x406554]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x10