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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x96c
mov eax, dword [0x4140f8]
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
lea eax, [ebp - 0x938]
push eax
mov dword [0x414c00], ebx
mov dword [0x414bf8], ebx
mov dword [0x414bf4], ebx
mov dword [0x414bec], ebx
mov dword [0x414bf0], ebx
mov word [ebp - 0x24], bx
mov dword [ebp - 0x938], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x404b20
cmp dword [ebp - 0x928], 2
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
jne 0x404838
push 0x401654
lea eax, [ebp - 0x24]
push eax
call edi
push esi
push 0x200
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x401650
lea eax, [ebp - 0x824]
push eax
call esi
call fcn.00408a5f
push eax
lea eax, [ebp - 0x824]
push eax
call esi
lea eax, [ebp - 0x824]
push 0x40164c
push eax
call fcn.0040a8b9
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0x940], eax
je 0x404b1e
jmp 0x404af0
cmp word [ebp - 0x424], 0x3b
je 0x404af0
cmp word [ebp - 0x424], 0x23
je 0x404af0
xor esi, esi
cmp word [ebp - 0x424], bx
lea eax, [ebp - 0x424]
mov ecx, eax
je 0x404af0
mov dx, word [eax]
cmp dx, 0x2c
je 0x4048da
cmp dx, 0xa
je 0x4048da
inc eax
inc eax
jmp 0x4048ee
mov dword [ebp + esi*4 - 0x96c], ecx
inc esi
cmp esi, 9
mov word [eax], bx
je 0x4048fc
inc eax
inc eax
mov ecx, eax
cmp word [eax], bx
jne 0x4048c7
cmp esi, 9
jl 0x404af0
push dword [ebp - 0x94c]
call fcn.004044d1
cmp dword [ebp + 8], ebx
mov dword [ebp - 0x948], eax
je 0x404916
test al, 8
jmp 0x404918
test al, 4
je 0x404af0
mov ebx, 0x401648
push ebx
push dword [ebp - 0x96c]
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
je 0x40497b
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x96c]
call esi
test eax, eax
jne 0x404aee
push ebx
push dword [ebp - 0x968]
call esi
test eax, eax
je 0x40497b
push dword [ebp - 0x968]
call fcn.004044d1
cmp dword [ebp - 0x928], 2
jne 0x40497b
cmp dword [ebp - 0x934], eax
jne 0x404aee
mov ebx, dword [ebp - 0x954]
push 0x401634
push ebx
call esi
test eax, eax
jne 0x404995
and dword [ebp - 0x93c], eax
jmp 0x404a0f
push 0x401620
push ebx
call esi
test eax, eax
jne 0x4049ad
mov dword [ebp - 0x93c], 1
jmp 0x404a0f
push 0x40160c
push ebx
call esi
test eax, eax
jne 0x4049c5
mov dword [ebp - 0x93c], 2
jmp 0x404a0f
push 0x4015f4
push ebx
call esi
test eax, eax
jne 0x4049dd
mov dword [ebp - 0x93c], 3
jmp 0x404a0f
push 0x4015e4
push ebx
call esi
test eax, eax
jne 0x4049f5
mov dword [ebp - 0x93c], 5
jmp 0x404a0f
push 0x4015d8
push ebx
call esi
test eax, eax
jne 0x404aee
mov dword [ebp - 0x93c], 6
push dword [ebp - 0x950]
call fcn.004044d1
test eax, eax
mov dword [ebp - 0x944], eax
jl 0x404aee
cmp eax, 2
jge 0x404aee
lea eax, [eax*4 + 0x414bec]
inc dword [eax]
push 0x40c
call fcn.0040a86a
mov esi, eax
test esi, esi
pop ecx
je 0x404b1e
push dword [ebp - 0x964]
lea ebx, [esi + 0x304]
push ebx
call edi
push dword [ebp - 0x960]
lea eax, [esi + 4]
push eax
call edi
push dword [ebp - 0x95c]
lea eax, [esi + 0x104]
push eax
call edi
push dword [ebp - 0x958]
lea eax, [esi + 0x204]
push eax
call edi
mov ax, word [ebp - 0x93c]
mov word [esi + 0x404], ax
mov eax, dword [ebp - 0x944]
mov dword [esi], eax
mov eax, dword [ebp - 0x948]
push 0x401648
push ebx
mov dword [esi + 0x408], eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x404ac4
mov dword [0x414bf4], 1
push 8
call fcn.0040a86a
test eax, eax
pop ecx
je 0x404b2d
and dword [eax], 0
mov dword [eax + 4], esi
mov ecx, dword [0x414bf8]
test ecx, ecx
je 0x404ae4
mov dword [ecx], eax
jmp 0x404ae9
mov dword [0x414c00], eax
mov dword [0x414bf8], eax
xor ebx, ebx
push dword [ebp - 0x940]
lea eax, [ebp - 0x424]
push 0x200
push eax
call fcn.0040a797
add esp, 0xc
test eax, eax
jne 0x404894
push dword [ebp - 0x940]
call fcn.0040a737
pop ecx
pop esi
pop edi
mov ecx, dword [ebp - 4]
pop ebx
call fcn.004077b8
leave
ret 4
push esi
call fcn.0040a6f5
jmp 0x404b1d