Function at 0x40aa70
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5477b8
mov eax, dword fs:[0]
push eax
sub esp, 0x160
mov eax, dword [0x5ab720]
xor eax, esp
mov dword [esp + 0x158], eax
push ebx
push esi
push edi
mov eax, dword [0x5ab720]
xor eax, esp
push eax
lea eax, [esp + 0x170]
mov dword fs:[0], eax
mov edi, ecx
mov esi, dword [edi + 0x170]
xor ebx, ebx
cmp esi, ebx
mov dword [esp + 0x18], edi
je 0x40ae59
cmp dword [edi + 0x164], ebx
mov dword [edi + 0x174], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebx
je 0x40ae59
push 0x68
lea eax, [esp + 0x30]
push ebx
push eax
call fcn.00523750
push 0x38
push ebx
push esi
call fcn.00523750
add esp, 0x18
xor eax, eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], eax
jmp 0x40ab10
mov edx, dword [esp + 0x10]
mov ecx, dword [edi + 0x170]
mov edx, dword [edx + 0x5ad5a8]
mov dword [eax + ecx], edx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x14], 0x5adbc8
nop
cmp dword [0x5b6edc], ebx
jne 0x40ab4d
push 0x5b6ed8
mov dword [0x5b6ed8], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [0x5b6edc], 6
jne 0x40ab63
cmp dword [0x5b6ee0], ebx
mov eax, 0x18
je 0x40ab68
mov eax, 0x1b
cmp dword [esp + 0x28], eax
jge 0x40adb9
mov eax, dword [esp + 0x14]
movzx esi, word [eax]
cmp si, 0x20
je 0x40adaa
push 0x68
lea ecx, [esp + 0x30]
push ebx
push ecx
call fcn.00523750
mov edx, dword [0x564e20]
mov eax, dword [0x564e24]
mov ecx, dword [0x564e28]
mov edi, dword [0x564e34]
mov dword [esp + 0x48], edx
mov edx, dword [0x564e2c]
mov dword [esp + 0x4c], eax
mov eax, dword [0x564e3c]
mov dword [esp + 0x54], edx
mov edx, dword [0x564e40]
mov dword [esp + 0x64], eax
mov eax, dword [0x564e44]
mov dword [esp + 0x68], edx
mov edx, dword [0x564e48]
mov dword [esp + 0x6c], eax
mov eax, dword [0x564e4c]
mov dword [esp + 0x70], edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x74], eax
mov ax, word [edx + 0x5ad5ac]
mov edx, dword [esp + 0x20]
mov word [esp + 0x7a], ax
mov eax, dword [edx - 4]
mov dword [esp + 0x7c], eax
mov ax, si
mov word [esp + 0x86], ax
mov edx, dword [esp + 0x86]
mov dword [esp + 0x40], ebx
mov ebx, dword [0x564e38]
mov dword [esp + 0x50], ecx
mov ecx, dword [0x564e30]
add edx, 0xffffffef
add esp, 0xc
cmp dx, 0xf
mov dword [esp + 0x2c], 0x52
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], ebx
mov word [esp + 0x6c], 0xfffe
ja 0x40ac59
mov ax, 0x20
mov word [esp + 0x7a], ax
movzx edx, word [esp + 0x6e]
movzx eax, ax
imul eax, edx
cdq
and edx, 7
add eax, edx
mov edx, dword [esp + 0x10]
sar eax, 3
mov word [esp + 0x78], ax
movzx eax, ax
imul eax, dword [esp + 0x70]
mov dword [esp + 0x84], ecx
mov ecx, dword [0x564e3c]
mov dword [esp + 0x90], ecx
mov dword [esp + 0x74], eax
mov eax, dword [edx + 0x5ad5b0]
mov dword [esp + 0x8c], ebx
mov ebx, dword [esp + 0x18]
lea ecx, [esp + 0x24]
push ecx
mov dword [esp + 0x84], eax
mov eax, dword [ebx + 0x164]
push 0x68
lea ecx, [esp + 0x34]
mov word [esp + 0x84], 0x16
mov word [esp + 0x86], si
mov dword [esp + 0x90], edi
mov dword [esp + 0x2c], 0
mov edx, dword [eax]
mov edx, dword [edx + 0xc]
push ecx
push eax
call edx
mov ax, word [esp + 0x7a]
cmp ax, 0x10
mov ecx, 0x1a
lea esi, [esp + 0x2c]
lea edi, [esp + 0x94]
rep movsd dword es:[edi], dword [esi]
jbe 0x40ad16
cmp ax, 0x20
ja 0x40ad16
mov word [esp + 0xe2], 0x18
movzx ecx, word [esp + 0xe2]
movzx eax, word [esp + 0xd6]
imul eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
movzx edx, ax
imul edx, dword [esp + 0xd8]
mov dword [esp + 0xdc], edx
lea edx, [esp + 0x20]
push edx
mov word [esp + 0xe4], ax
mov eax, dword [ebx + 0x164]
push 0x68
lea edx, [esp + 0x9c]
mov dword [esp + 0x28], 0
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
cmp dword [esp + 0x24], 0
jne 0x40ad7f
cmp dword [esp + 0x20], 0
je 0x40ada6
mov ecx, dword [ebx + 0x170]
mov edx, dword [esp + 0x1c]
lea eax, [edx + ecx + 4]
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx - 8]
or dword [eax], edx
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x5ad5a8]
or dword [ebx + 0x174], ecx
mov edi, ebx
xor ebx, ebx
add dword [esp + 0x28], 1
add dword [esp + 0x14], 0x14
jmp 0x40ab30
mov eax, dword [esp + 0x1c]
add dword [esp + 0x10], 0x14
add eax, 8
cmp eax, 0x38
mov dword [esp + 0x1c], eax
jl 0x40ab10
or esi, 0xffffffff
test byte [edi + 0x174], 0x20
je 0x40ae1a
call fcn.00504604
cmp eax, ebx
je 0x40ae1a
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
call eax
cmp eax, ebx
je 0x40ae1a
mov ecx, dword [eax + 0x60]
cmp ecx, ebx
je 0x40ae1a
add dword [ecx + 0x1a0c], 1
or dword [ecx + 4], 0x200
add dword [ecx + 0x1a0c], esi
jne 0x40ae1a
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 1
call eax
mov ebx, 9
cmp dword [edi + 0x78], ebx
jne 0x40ae9b
lea ecx, [esp + 0xfc]
push ecx
call fcn.00463ed0
push edi
lea ecx, [esp + 0x100]
mov dword [esp + 0x17c], 0
call fcn.00464010
test eax, eax
jne 0x40ae60
lea ecx, [esp + 0xfc]
call fcn.00463fb0
xor eax, eax
jmp 0x40af1a
cmp dword [esp + 0x158], 0
je 0x40ae74
or dword [edi + 0x174], 0x80
cmp dword [esp + 0x15c], 0
je 0x40ae88
or dword [edi + 0x174], 0x100
lea ecx, [esp + 0xfc]
mov dword [esp + 0x178], esi
call fcn.00463fb0
cmp dword [edi + 0x174], 0
mov esi, 1
jne 0x40aedc
cmp dword [edi + 0x34], esi
jne 0x40aedc
call fcn.00504604
test eax, eax
je 0x40aedc
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
call eax
test eax, eax
je 0x40aedc
mov ecx, dword [eax + 0x60]
test ecx, ecx
je 0x40aedc
add dword [ecx + 0x1a0c], esi
test byte [ecx + 0x34], 0x20
jne 0x40ae59
call fcn.00421f60
mov eax, dword [edi + 0x174]
test eax, eax
jne 0x40af18
cmp dword [edi + 0x78], ebx
je 0x40ae59
test eax, eax
jne 0x40af18
cmp dword [edi + 0x78], 4
jne 0x40af18
cmp dword [edi + 0x34], esi
jne 0x40af18
call fcn.00423670
test eax, eax
je 0x40af18
test byte [eax + 0x30], 0x20
jne 0x40ae59
mov ecx, eax
call fcn.00421f60
mov eax, esi
mov ecx, dword [esp + 0x170]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x158]
xor ecx, esp
call fcn.0052151a
mov esp, ebp
pop ebp
ret