Function at 0x40c440
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x54b0d8
mov eax, dword fs:[0]
push eax
sub esp, 0x160
mov eax, dword [0x5b3720]
xor eax, esp
mov dword [esp + 0x158], eax
push ebx
push esi
push edi
mov eax, dword [0x5b3720]
xor eax, esp
push eax
lea eax, [esp + 0x170]
mov dword fs:[0], eax
mov ebx, ecx
mov esi, dword [ebx + 0x1b8]
xor edi, edi
cmp esi, edi
mov dword [esp + 0x18], ebx
je 0x40c881
cmp dword [ebx + 0x1ac], edi
mov dword [ebx + 0x1bc], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], edi
je 0x40c881
push 0x68
lea eax, [esp + 0x30]
push edi
push eax
call fcn.00526c60
push 0x38
push edi
push esi
call fcn.00526c60
add esp, 0x18
xor eax, eax
mov dword [esp + 0x10], edi
mov dword [esp + 0x20], eax
jmp 0x40c4e0
mov edx, dword [esp + 0x10]
mov ecx, dword [ebx + 0x1b8]
mov edx, dword [edx + 0x5b5698]
mov dword [eax + ecx], edx
mov dword [esp + 0x28], edi
mov dword [esp + 0x14], 0x5b5cc8
nop
cmp dword [0x5bef2c], edi
jne 0x40c51d
push 0x5bef28
mov dword [0x5bef28], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [0x5bef2c], 6
jne 0x40c533
cmp dword [0x5bef30], edi
mov eax, 0x18
je 0x40c538
mov eax, 0x1b
cmp dword [esp + 0x28], eax
jge 0x40c7d6
mov eax, dword [esp + 0x14]
cmp word [eax], 0x20
jne 0x40c59e
call fcn.005089e3
cmp eax, edi
je 0x40c7c7
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
call eax
cmp eax, edi
je 0x40c7c7
mov ecx, dword [eax + 0x60]
cmp ecx, edi
je 0x40c7c7
add dword [ecx + 0x1ab8], 1
test dword [ecx + 0x1d0], 0x8000000
je 0x40c7c7
add dword [ecx + 0x1ab8], 0xffffffff
jne 0x40c59e
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 1
call eax
push 0x68
lea ecx, [esp + 0x30]
push edi
push ecx
call fcn.00526c60
mov edx, dword [0x56a79c]
mov eax, dword [0x56a7a0]
mov ecx, dword [0x56a7a4]
mov esi, dword [0x56a7ac]
mov ebx, dword [0x56a7b4]
mov dword [esp + 0x48], edx
mov edx, dword [0x56a7a8]
mov dword [esp + 0x4c], eax
mov eax, dword [0x56a7b8]
mov dword [esp + 0x54], edx
mov edx, dword [0x56a7c0]
mov dword [esp + 0x64], eax
mov eax, dword [0x56a7c4]
mov dword [esp + 0x50], ecx
mov ecx, dword [0x56a7bc]
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x70], eax
mov ax, word [edx + 0x5b569c]
mov dword [esp + 0x68], ecx
mov ecx, dword [0x56a7c8]
mov word [esp + 0x7a], ax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x74], ecx
mov ecx, dword [eax - 4]
mov dword [esp + 0x7c], ecx
movzx ecx, word [eax]
mov ax, cx
mov word [esp + 0x86], ax
mov edx, dword [esp + 0x86]
mov dword [esp + 0x40], edi
mov edi, dword [0x56a7b0]
add edx, 0xffffffef
add esp, 0xc
cmp dx, 0xf
mov dword [esp + 0x2c], 0x52
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], ebx
mov word [esp + 0x6c], 0xfffe
ja 0x40c678
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
sar eax, 3
mov word [esp + 0x78], ax
movzx eax, ax
imul eax, dword [esp + 0x70]
mov word [esp + 0x7e], cx
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x5b56a0]
mov dword [esp + 0x80], edx
mov dword [esp + 0x74], eax
mov eax, dword [0x56a7b8]
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x90], ebx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x94], eax
mov eax, dword [ebx + 0x1ac]
push 0x68
lea edx, [esp + 0x34]
mov word [esp + 0x84], 0x16
mov dword [esp + 0x8c], esi
mov dword [esp + 0x90], edi
mov dword [esp + 0x2c], 0
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
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 0x40c731
cmp ax, 0x20
ja 0x40c731
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 + 0x1c]
push edx
mov word [esp + 0xe4], ax
mov eax, dword [ebx + 0x1ac]
push 0x68
lea edx, [esp + 0x9c]
mov dword [esp + 0x24], 0
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
cmp dword [esp + 0x24], 0
jne 0x40c79a
cmp dword [esp + 0x1c], 0
je 0x40c7c5
mov ecx, dword [ebx + 0x1b8]
mov edx, dword [esp + 0x20]
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 + 0x5b5698]
or dword [ebx + 0x1bc], ecx
mov ebx, dword [esp + 0x18]
xor edi, edi
add dword [esp + 0x28], 1
add dword [esp + 0x14], 0x14
jmp 0x40c500
mov eax, dword [esp + 0x20]
add dword [esp + 0x10], 0x14
add eax, 8
cmp eax, 0x38
mov dword [esp + 0x20], eax
jl 0x40c4e0
test byte [ebx + 0x1bc], 0x20
je 0x40c83a
call fcn.005089e3
cmp eax, edi
je 0x40c83a
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
call eax
cmp eax, edi
je 0x40c83a
mov ecx, dword [eax + 0x60]
cmp ecx, edi
je 0x40c83a
mov edi, 1
add dword [ecx + 0x1ab8], edi
or dword [ecx + 4], 0x200
add dword [ecx + 0x1ab8], 0xffffffff
jne 0x40c83f
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
jmp 0x40c83f
mov edi, 1
mov esi, 9
cmp dword [ebx + 0x80], esi
jne 0x40c8c7
lea ecx, [esp + 0xfc]
push ecx
call fcn.004591b0
push ebx
lea ecx, [esp + 0x100]
mov dword [esp + 0x17c], 0
call fcn.00459310
test eax, eax
jne 0x40c888
lea ecx, [esp + 0xfc]
call fcn.00459290
xor eax, eax
jmp 0x40c947
cmp dword [esp + 0x158], 0
je 0x40c89c
or dword [ebx + 0x1bc], 0x80
cmp dword [esp + 0x15c], 0
je 0x40c8b0
or dword [ebx + 0x1bc], 0x100
lea ecx, [esp + 0xfc]
mov dword [esp + 0x178], 0xffffffff
call fcn.00459290
cmp dword [ebx + 0x1bc], 0
jne 0x40c903
cmp dword [ebx + 0x38], edi
jne 0x40c903
call fcn.005089e3
test eax, eax
je 0x40c903
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
call eax
test eax, eax
je 0x40c903
mov ecx, dword [eax + 0x60]
test ecx, ecx
je 0x40c903
add dword [ecx + 0x1ab8], edi
test byte [ecx + 0x34], 0x20
jne 0x40c881
call fcn.00422340
mov eax, dword [ebx + 0x1bc]
test eax, eax
jne 0x40c945
cmp dword [ebx + 0x80], esi
je 0x40c881
test eax, eax
jne 0x40c945
cmp dword [ebx + 0x80], 4
jne 0x40c945
cmp dword [ebx + 0x38], edi
jne 0x40c945
call fcn.004238d0
test eax, eax
je 0x40c945
test byte [eax + 0x30], 0x20
jne 0x40c881
mov ecx, eax
call fcn.00422340
mov eax, edi
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.00524c67
mov esp, ebp
pop ebp
ret