Function at 0x40cb3d
Capabilities:
Check os version

Disassembly:
sub esp, 0x340
mov eax, dword [esp + 0x348]
push ebx
mov ebx, dword [esp + 0x348]
add eax, 0x528
push ebp
push esi
xor esi, esi
mov dword [esp + 0x30], eax
mov ebp, dword [eax + 0x3c]
add ebp, eax
mov dword [esp + 0x14], esi
push esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], ebp
call dword [ebx + 0x38]
mov edx, eax
mov ax, word [ebp + 4]
mov ecx, dword [edx + 0x3c]
cmp ax, word [ecx + edx + 4]
jne 0x40d3a1
mov eax, dword [ebp + 0x50]
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], esi
mov eax, dword [ebp + 0xa4]
mov dword [esp + 0x20], eax
test eax, eax
jne 0x40cbac
mov eax, dword [ebp + 0x34]
mov dword [esp + 0xc], eax
push edi
push 3
sub ecx, ecx
lea edi, [ebx + 0x625]
pop edx
inc ecx
cmp byte [edi], 0
push esi
jne 0x40cbe6
push 0x8000000
push 0x40
lea eax, [esp + 0x58]
push eax
push esi
push 0xf001f
lea eax, [esp + 0x5c]
push eax
call dword [ebx + 0x120]
or eax, eax
jne 0x40d3a0
jmp 0x40cc60
push esi
push edx
push esi
push ecx
push 0x80000000
push edi
call dword [ebx + 0x60]
mov edi, eax
cmp edi, 0xffffffff
je 0x40d3a0
or edi, edi
je 0x40d3a0
lea eax, [esp + 0x3c]
xorps xmm0, xmm0
push eax
push edi
movlpd qword [esp + 0x44], xmm0
call dword [ebx + 0x64]
test eax, eax
je 0x40d3a0
mov eax, dword [ebp + 0x50]
cmp eax, dword [esp + 0x3c]
ja 0x40d3a0
push edi
push 0x1000000
push 2
pop eax
push eax
push esi
push esi
push 0xf001f
lea eax, [esp + 0x5c]
push eax
call dword [ebx + 0x120]
push edi
push eax
pop esi
call dword [ebx + 0x90]
test esi, esi
jne 0x40d3a0
lea edi, [ebx + 0x625]
push 4
pop eax
push eax
push esi
push 2
pop eax
push eax
lea eax, [esp + 0x34]
push eax
push esi
push esi
push esi
lea eax, [esp + 0x2c]
push eax
call dword [ebx + 0x70]
push eax
push dword [esp + 0x68]
call dword [ebx + 0x124]
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x10]
mov esi, dword [esi + 0x3c]
add esi, ecx
mov dword [esp + 0x1c], esi
test eax, eax
je 0x40cca4
cmp eax, 0x40000003
jne 0x40d3a0
or ecx, ecx
je 0x40d3a0
cmp byte [edi], 0
je 0x40ccfb
lea eax, [esp + 0x30]
push eax
push 4
pop edi
push edi
push dword [esp + 0x30]
push ecx
call dword [ebx + 0x48]
push edi
push 0x3000
push dword [ebp + 0x54]
push 0
call dword [ebx + 0x3c]
push dword [ebp + 0x54]
push eax
pop edi
push dword [esp + 0x14]
mov dword [esp + 0x50], edi
push edi
call fcn.0040de29
push dword [esp + 0x34]
push 0
push dword [esp + 0x24]
call fcn.0040de4d
mov ecx, dword [esp + 0x28]
add esp, 0x18
jmp 0x40cd03
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x48], eax
push dword [ebp + 0x54]
push dword [esp + 0x38]
push ecx
call fcn.0040de29
mov eax, dword [esp + 0x1c]
sub ecx, ecx
and dword [esp + 0x20], 0
add esp, 0xc
mov dword [esi + 0x34], eax
movzx eax, word [esi + 0x14]
add eax, 0x18
add eax, esi
mov dword [esp + 0x3c], eax
cmp cx, word [esi + 6]
jae 0x40cd78
mov ebx, dword [esp + 0x14]
lea edi, [eax + 0x10]
mov ebp, esi
push dword [edi]
mov eax, dword [edi + 4]
mov esi, dword [edi - 4]
add eax, dword [esp + 0x38]
add esi, dword [esp + 0x14]
push eax
push esi
call fcn.0040de29
movzx eax, byte [esi]
lea edi, [edi + 0x28]
add esp, 0xc
mov dword [edi - 0x30], eax
movzx eax, word [ebp + 6]
inc ebx
cmp ebx, eax
jb 0x40cd3d
mov ebx, dword [esp + 0x354]
mov ebp, dword [esp + 0x2c]
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
push edx
pop edi
sub edi, dword [ebp + 0x34]
cmp dword [esp + 0x24], 0
je 0x40ce4e
or edi, edi
je 0x40ce4e
mov eax, dword [esi + 0xa0]
lea ecx, [eax + edx]
add eax, dword [esp + 0x24]
mov dword [esp + 0x38], eax
add eax, edx
mov dword [esp + 0x20], ecx
cmp ecx, eax
jae 0x40ce4e
mov eax, dword [ecx + 4]
or eax, eax
je 0x40ce4e
lea esi, [ecx + 8]
jmp 0x40ce30
movzx esi, word [esi]
mov eax, dword [esp + 0x20]
mov ecx, esi
and ecx, 0xfff
add ecx, dword [eax]
mov eax, dword [esp + 0x1c]
cmp ecx, dword [eax + 0x50]
jae 0x40ce20
shr si, 0xc
cmp si, 0xa
je 0x40cdef
push 3
pop eax
cmp si, ax
jne 0x40cdf4
add dword [ecx + edx], edi
jmp 0x40ce11
xor eax, eax
inc eax
cmp si, ax
jne 0x40ce03
mov eax, edi
shr eax, 0x10
jmp 0x40ce0e
push 2
pop eax
cmp si, ax
jne 0x40ce17
movzx eax, di
add dword [ecx + edx], eax
mov edx, dword [esp + 0x10]
jmp 0x40ce20
test si, si
jne 0x40d33f
mov esi, dword [esp + 0x14]
push 2
pop ecx
add esi, ecx
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 4]
add eax, ecx
mov dword [esp + 0x14], esi
cmp esi, eax
jne 0x40cdc3
mov eax, dword [esp + 0x38]
push esi
pop ecx
add eax, edx
mov dword [esp + 0x20], esi
cmp esi, eax
jb 0x40cdb3
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x80]
test eax, eax
je 0x40cf24
lea esi, [eax + edx]
cmp dword [esi + 0xc], 0
mov dword [esp + 0x18], esi
je 0x40cf24
mov eax, dword [esi + 0xc]
add eax, edx
push eax
push ebx
call fcn.0040d7bb
mov edx, dword [esp + 0x18]
mov edi, dword [esi + 0x10]
mov dword [esp + 0x40], eax
add edi, edx
mov eax, dword [esi]
add eax, edx
mov dword [esp + 0x28], edi
pop ecx
pop ecx
mov dword [esp + 0x14], eax
mov ecx, dword [eax]
or ecx, ecx
je 0x40cf0f
mov ebp, dword [esp + 0x38]
mov esi, dword [esp + 0x358]
jns 0x40ceb7
push ecx
push 0
push ebp
push ebx
call fcn.0040d859
jmp 0x40cee9
lea edi, [edx + 2]
add edi, ecx
cmp dword [esi + 4], 0
je 0x40cedb
push edi
push ebx
call fcn.0040c15c
pop ecx
pop ecx
test eax, eax
je 0x40cedb
mov eax, dword [ebx + 0x108]
mov edi, dword [esp + 0x20]
jmp 0x40ceec
push 0
push edi
push ebp
push ebx
call fcn.0040d859
mov edi, dword [esp + 0x30]
add esp, 0x10
mov dword [edi], eax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push 4
pop ecx
add eax, ecx
add edi, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], edi
mov ecx, dword [eax]
or ecx, ecx
jne 0x40cea9
mov esi, dword [esp + 0x18]
add esi, 0x14
mov dword [esp + 0x18], esi
cmp dword [esi + 0xc], 0
jne 0x40ce71
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0xe0]
or eax, eax
je 0x40cfc2
lea esi, [eax + 4]
add esi, edx
mov dword [esp + 0x18], esi
mov eax, dword [esi]
or eax, eax
je 0x40cfc2
add eax, edx
push eax
push ebx
call fcn.0040d7bb
mov edx, dword [esp + 0x18]
mov dword [esp + 0x40], eax
pop ecx
pop ecx
or eax, eax
je 0x40cfb1
mov edi, dword [esi + 0xc]
mov ecx, dword [esi + 8]
add edi, edx
add ecx, edx
mov dword [esp + 0x14], ecx
mov eax, dword [edi]
or eax, eax
je 0x40cfb1
mov ebp, dword [esp + 0x38]
push 4
pop esi
jns 0x40cf7d
sub ecx, ecx
jmp 0x40cf82
lea ecx, [edx + 2]
add ecx, eax
xor edx, edx
or eax, eax
cmovns eax, edx
push eax
push ecx
push ebp
push ebx
call fcn.0040d859
mov ecx, dword [esp + 0x24]
add edi, esi
add esp, 0x10
mov dword [ecx], eax
add ecx, esi
mov eax, dword [edi]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x14], ecx
or eax, eax
jne 0x40cf77
mov esi, dword [esp + 0x18]
add esi, 0x20
mov dword [esp + 0x18], esi
mov eax, dword [esi]
or eax, eax
jne 0x40cf45
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
lea edi, [esp + 0x54]
push 0x3e
pop ecx
push ebp
pop esi
mov eax, dword [eax + 0x28]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x58]
add eax, edx
shr edi, 0x10
push 4
imul esi, edi, 0x28
push 0x3000
mov dword [esp + 0x34], eax
mov dword [esp + 0x1c], edi
push esi
push 0
call dword [ebx + 0x3c]
push esi
push dword [esp + 0x40]
mov dword [esp + 0x20], eax
push eax
call fcn.0040de29
xor eax, eax
add esp, 0xc
inc eax
cmp dword [ebx + 0x574], eax
jne 0x40d054
cmp byte [ebx + 0x625], 0
jne 0x40d03c
push dword [ebp + 0x54]
push 0
push dword [esp + 0x18]
call fcn.0040de4d
push dword [ebp + 0x54]
push 0
push dword [esp + 0x48]
call fcn.0040de4d
add esp, 0x18
jmp 0x40d054
mov eax, dword [esp + 0x48]
test eax, eax
je 0x40d054
push dword [ebp + 0x54]
push eax
push dword [esp + 0x18]
call fcn.0040de29
add esp, 0xc
cmp byte [ebx + 0x625], 0
jne 0x40d0b5
push dword [esp + 0x10]
call dword [ebx + 0x70]
push eax
call dword [ebx + 0x128]
test eax, eax
jne 0x40d3a0
mov eax, dword [esp + 0x10]
sub ecx, ecx
cmp dword [esp + 0x24], ecx
push pe_nt_image_headers32
push ecx
push 2
cmovne eax, ecx
and dword [esp + 0x34], ecx
mov dword [esp + 0x1c], eax
pop eax
push eax
lea eax, [esp + 0x34]
push eax
push ecx
push ecx
push ecx
lea eax, [esp + 0x2c]
push eax
call dword [ebx + 0x70]
push eax
push dword [esp + 0x68]
call dword [ebx + 0x124]
test eax, eax
jne 0x40d3a0
lea eax, [esp + 0x30]
push eax
push 8
push dword [esp + 0x30]
push dword [esp + 0x1c]
call dword [ebx + 0x48]
sub eax, eax
mov dword [esp + 0x24], eax
or edi, edi
je 0x40d180
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x3c]
add edi, 0xc
mov edx, dword [edi + 0x18]
push edx
pop ebp
push edx
pop ecx
shr ebp, 0x1e
shr edx, 0x1d
shr ecx, 0x1f
and edx, 1
test ecx, edx
jne 0x40d16e
test ebp, edx
je 0x40d0ff
push 0x20
jmp 0x40d12e
push edx
pop eax
xor eax, 1
mov dword [esp + 0x3c], eax
and eax, ecx
test ebp, eax
je 0x40d11c
cmp byte [ebx + 0x625], 0
push 8
pop esi
push 4
jmp 0x40d139
sub eax, eax
inc eax
xor ecx, eax
push ebp
pop eax
xor eax, 1
and eax, ecx
test edx, eax
je 0x40d131
push 0x10
pop esi
jmp 0x40d13d
and ecx, dword [esp + 0x3c]
test ebp, ecx
push 2
pop eax
cmovne esi, eax
mov edx, dword [esp + 0x10]
mov ecx, dword [edi]
add edx, ecx
mov eax, dword [esp + 0x14]
dec eax
cmp dword [esp + 0x24], eax
jae 0x40d157
mov eax, dword [edi + 0x28]
sub eax, ecx
jmp 0x40d15a
mov eax, dword [edi + 4]
and dword [esp + 0x30], 0
lea ecx, [esp + 0x30]
push ecx
push esi
push eax
push edx
call dword [ebx + 0x48]
mov eax, dword [esp + 0x24]
inc eax
add edi, 0x28
mov dword [esp + 0x24], eax
cmp eax, dword [esp + 0x14]
jb 0x40d0e0
lea eax, [esp + 0x30]
sub edi, edi
push eax
push 2
pop eax
push eax
push dword [esp + 0x88]
mov dword [esp + 0x3c], edi
push dword [esp + 0x1c]
call dword [ebx + 0x48]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov esi, dword [eax + 0xc0]
test esi, esi
je 0x40d1d9
mov esi, dword [esi + ecx + 0xc]
or esi, esi
je 0x40d1d9
mov eax, dword [esi]
or eax, eax
je 0x40d1d9
push 4
pop ebx
push edi
push 1
push ecx
call eax
mov ecx, dword [esp + 0x10]
add esi, ebx
mov eax, dword [esi]
or eax, eax
jne 0x40d1c0
mov ebx, dword [esp + 0x354]
mov ebp, dword [esp + 0x358]
push 3
pop eax
cmp dword [ebp], eax
jne 0x40d2d2
sub eax, eax
inc eax
push edi
push eax
mov eax, dword [esp + 0x84]
push ecx
add eax, ecx
call eax
cmp byte [ebp + 0x30c], 0
je 0x40d327
mov ecx, dword [esp + 0xcc]
mov edx, dword [esp + 0x10]
or ecx, ecx
je 0x40d32b
mov esi, dword [ecx + edx + 0x18]
or esi, esi
je 0x40d32b
mov eax, dword [ecx + edx + 0x20]
lea edi, [esi - 1]
mov ebp, dword [ecx + edx + 0x1c]
add eax, edx
mov ecx, dword [ecx + edx + 0x24]
add ebp, edx
add ecx, edx
mov dword [esp + 0x3c], ecx
lea edi, [eax + edi*4]
mov ecx, dword [esp + 0x358]
mov eax, dword [edi]
add ecx, 0x30c
add eax, edx
push ecx
push eax
call fcn.0040de62
mov edx, dword [esp + 0x18]
pop ecx
pop ecx
or eax, eax
je 0x40d276
push 4
pop eax
sub edi, eax
sub esi, 1
jne 0x40d245
jmp 0x40d33f
mov eax, dword [esp + 0x3c]
movzx eax, word [eax + esi*2 - 2]
mov esi, dword [ebp + eax*4]
add esi, edx
je 0x40d33f
mov ebp, dword [esp + 0x358]
lea edi, [ebp + 0x40c]
cmp byte [edi], 0
je 0x40d2ce
cmp dword [ebp + 0x50c], 0
je 0x40d2b8
lea eax, [esp + 0x14c]
push eax
push edi
push ebx
call fcn.0040d796
add esp, 0xc
cmp dword [ebp + 0x50c], 0
lea eax, [esp + 0x14c]
cmove eax, edi
push eax
call esi
jmp 0x40d327
call esi
jmp 0x40d327
lea eax, [ebp + 0x40c]
cmp byte [eax], 0
je 0x40d2fd
lea ecx, [esp + 0x14c]
push ecx
push eax
push ebx
call fcn.0040d796
lea eax, [esp + 0x158]
push eax
push ebx
call fcn.0040d56e
add esp, 0x14
cmp dword [ebp + 4], edi
je 0x40d31a
push edi
push edi
push edi
push dword [esp + 0x38]
push edi
push edi
call dword [ebx + 0x5c]
or eax, eax
je 0x40d327
push 0xffffffffffffffff
push eax
call dword [ebx + 0x58]
jmp 0x40d327
mov eax, dword fs:[0x18]
push dword [eax + 0x30]
call dword [esp + 0x30]
mov edx, dword [esp + 0x10]
push 3
pop eax
cmp dword [ebx + 0x230], eax
jne 0x40d33f
push 0xffffffffffffffff
call dword [ebx + 0x4c]
mov edx, dword [esp + 0x10]
or edx, edx
je 0x40d385
movzx eax, word [esp + 0x5a]
mov esi, 0xc000
imul eax, eax, 0x28
push esi
push eax
push dword [esp + 0x20]
call dword [ebx + 0x40]
mov eax, dword [esp + 0x48]
or eax, eax
je 0x40d36d
push esi
push dword [esp + 0xac]
push eax
call dword [ebx + 0x40]
push dword [esp + 0x10]
call dword [ebx + 0x70]
push eax
call dword [ebx + 0x128]
push dword [esp + 0x44]
call dword [ebx + 0x90]
mov eax, dword [esp + 0x358]
push dword [eax + 0x524]
push 0
push dword [esp + 0x3c]
call fcn.0040de4d
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x340
ret