Function at 0x10040ad0
Capabilities:
Check os version
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1ac
mov eax, dword [0x100f51d4]
xor eax, esp
mov dword [esp + 0x1a8], eax
mov eax, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 0x20]
mov esi, ecx
mov dword [esp + 0x54], eax
mov eax, dword [ebp + 0x1c]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], edi
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0xaac56b
mov dword [esp + 0x84], 0x11d0cd44
mov dword [esp + 0x88], 0xc000c28c
mov dword [esp + 0x8c], 0xee95c24f
call fcn.100417b0
test eax, eax
jne 0x10040b63
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1a8]
xor ecx, esp
call fcn.10071699
mov esp, ebp
pop ebp
ret 0x1c
cmp dword [ebp + 0x14], 0
mov eax, dword [esi + 0x11c]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x120]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x5c], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x60], eax
lea eax, [esp + 0x58]
mov dword [esp + 0x38], eax
mov eax, dword [esi + 0x58]
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x68]
mov dword [esp + 0x64], 0
mov dword [esp + 0x58], 0x10
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x20], 0x34
mov dword [esp + 0x2c], 2
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 1
mov dword [esp + 0x68], 0x18
mov dword [esp + 0x70], 3
mov dword [esp + 0x74], 0
mov dword [esp + 0x50], eax
jne 0x10040c23
test edi, edi
jne 0x10040c23
call fcn.10040a60
mov dword [esp + 0x3c], edi
test eax, eax
je 0x10040c2b
mov dword [esp + 0x3c], 1
cmp dword [esi + 0x130], 0
je 0x10040c3e
mov dword [esp + 0x48], 0x40
jmp 0x10040c99
cmp dword [0x100f9eec], 0
jne 0x10040c82
lea eax, [esp + 0x90]
mov dword [esp + 0x90], 0x11c
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x10040c78
cmp dword [esp + 0x94], 5
jne 0x10040c78
mov dword [0x100f9ee8], 1
mov dword [0x100f9eec], 1
mov eax, dword [0x100f9ee8]
neg eax
sbb eax, eax
and eax, 0xfffff010
add eax, 0x1000
mov dword [esp + 0x48], eax
lea eax, [esp + 0x20]
mov ecx, esi
push eax
lea eax, [esp + 0x84]
push eax
call fcn.10043330
test eax, eax
je 0x10040d31
mov ecx, dword [esp + 0x50]
cmp dword [ecx + 0xc], 0
jbe 0x10040d31
mov edi, dword [esi + 0x58]
cmp eax, 0x800b0100
je 0x10040d2d
lea esp, [esp]
lea eax, [esp + 0x20]
mov dword [esp + 0x3c], 2
push eax
lea eax, [esp + 0x84]
mov ecx, esi
push eax
call fcn.10043330
test eax, eax
jne 0x10040d2d
mov dword [esp + 0x40], eax
inc edi
mov eax, dword [esp + 0x50]
mov ecx, esi
mov dword [esp + 0x3c], 1
mov dword [eax + 4], edi
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x84]
push eax
call fcn.10043330
test eax, eax
je 0x10040d2a
cmp edi, 0xa
jae 0x10040d2d
cmp eax, 0x800b0100
jne 0x10040cd0
jmp 0x10040d2d
mov dword [esi + 0x58], edi
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x10040d3b
mov dword [ecx], eax
cmp eax, 0x800b0101
jg 0x10040d62
je 0x10040d54
cmp eax, 0x8009200d
je 0x10040d78
cmp eax, 0x800b0100
jne 0x10040d66
jmp 0x10040d78
mov eax, dword [ebx + 4]
and eax, 0xfffffffe
or eax, 2
mov dword [ebx + 4], eax
jmp 0x10040d78
test eax, eax
je 0x10040d74
mov eax, dword [ebx + 4]
and eax, 0xfffffffd
or eax, 1
mov dword [ebx + 4], eax
jmp 0x10040d78
or dword [ebx + 4], 3
test edi, edi
jne 0x10040d8e
cmp dword [ebp + 0x14], edi
jne 0x10040d8e
call fcn.10040a60
test eax, eax
je 0x10040f7c
test byte [ebx + 4], 3
je 0x10040f7c
push dword [esp + 0x40]
call dword [esp + 0x1c]
test eax, eax
je 0x10040f7c
push 0
push 0
push 0
push eax
call dword [esp + 0x24]
mov edi, eax
mov dword [esp + 0x18], edi
test edi, edi
je 0x10040f7c
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x1c], 0
test ecx, ecx
je 0x10040e3d
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
mov eax, dword [esi + 0x58]
mov dword [ecx], eax
mov eax, dword [ebx + 4]
and al, 3
cmp al, 2
jb 0x10040f55
push dword [edi + 0x18]
call fcn.10041020
mov ecx, dword [esp + 0x10]
mov dword [ecx + 4], eax
mov eax, dword [esi + 0x124]
test eax, eax
je 0x10040f55
push 0
push edi
call eax
test eax, eax
je 0x10040f55
mov ecx, dword [esi + 0x128]
test ecx, ecx
je 0x10040f55
push dword [eax + 4]
call ecx
mov edi, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], edi
mov dword [eax + 8], edi
jmp 0x10040e93
call fcn.10040a60
test eax, eax
je 0x10040f55
mov eax, dword [ebx + 4]
and al, 3
cmp al, 2
jb 0x10040f55
mov eax, dword [esi + 0x124]
test eax, eax
je 0x10040f55
push 0
push edi
call eax
test eax, eax
je 0x10040f55
mov ecx, dword [esi + 0x128]
test ecx, ecx
je 0x10040f55
push dword [eax + 4]
call ecx
mov edi, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], 1
test edi, edi
je 0x10040f51
call fcn.10040a60
test eax, eax
je 0x10040f41
mov edi, dword [edi + 0xc]
xor eax, eax
test edi, edi
je 0x10040f3d
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x10040f27
push 0x100e61a8
push ecx
call fcn.100a5d5d
add esp, 8
test eax, eax
je 0x10040f1e
push str.1.2.840.10045.4.1
push dword [edi + 0xc]
call fcn.100a5d5d
add esp, 8
test eax, eax
je 0x10040f1e
push str.1.2.840.10045.4.3.1
push dword [edi + 0xc]
call fcn.100a5d5d
add esp, 8
test eax, eax
je 0x10040f1e
push str.1.2.840.10045.4.3.3
push dword [edi + 0xc]
call fcn.100a5d5d
add esp, 8
test eax, eax
je 0x10040f1e
push str.1.2.840.10045.4.3.4
push dword [edi + 0xc]
call fcn.100a5d5d
add esp, 8
test eax, eax
jne 0x10040f25
mov eax, 1
jmp 0x10040f27
xor eax, eax
mov edi, dword [esp + 0x14]
test eax, eax
je 0x10040f41
mov eax, dword [ebx + 4]
and eax, 0xfffffffd
or eax, 1
mov dword [ebx + 4], eax
jmp 0x10040f41
mov edi, dword [esp + 0x14]
cmp dword [esp + 0x1c], 0
je 0x10040f51
mov eax, dword [esi + 0x108]
push edi
call eax
mov edi, dword [esp + 0x18]
mov eax, dword [ebx + 4]
and al, 3
cmp al, 2
jb 0x10040f7c
cmp dword [ebp + 0x14], 0
je 0x10040f7c
mov ecx, dword [edi + 0x28]
test ecx, ecx
je 0x10040f7c
push dword [esp + 0x54]
mov edx, 1
call fcn.10044df0
add esp, 4
lea ecx, [esp + 0x20]
mov dword [esp + 0x24], 0
push ecx
lea ecx, [esp + 0x84]
mov dword [esp + 0x2c], 0
push ecx
mov ecx, esi
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x28], 0x34
mov dword [esp + 0x44], 2
call fcn.10043330
mov ecx, dword [esp + 0x1b4]
mov eax, 1
pop edi
pop esi
mov dword [ebx], 3
pop ebx
xor ecx, esp
call fcn.10071699
mov esp, ebp
pop ebp
ret 0x1c