Function at 0x412000
Capabilities:
Check os version
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x70
mov dword [esp + 0x1c], edx
mov eax, dword [0x450010]
xor eax, ebp
mov dword [esp + 0x68], eax
mov dword [esp + 0xc], ecx
movzx ecx, word [ecx]
cmp ecx, 0x20
jae 0x412097
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x28], esi
xor edi, edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov byte [esp + 0x34], 0
test esi, esi
je 0x4120fd
movzx eax, word [esi]
cmp eax, 0x5a4d
jne 0x41207c
mov eax, dword [esi + 0x3c]
lea edi, [esi + eax]
mov dword [esp + 0x2c], edi
cmp dword [esi + eax], 0x4550
jne 0x41207c
movzx eax, word [edi + 0x18]
cmp eax, 0x10b
jne 0x41207c
mov eax, dword [edi + 0x50]
cmp eax, 0x138
jae 0x41246c
mov dword [esp + 0x10], edi
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x20], eax
jmp 0x412117
mov dword [esp + 8], ecx
shr ecx, 1
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 4]
movzx edx, word [eax]
xor esi, esi
mov word [esp + 0x18], dx
cmp dx, 0x2e
jne 0x412248
lea edi, [esi + 1]
cmp cx, di
jbe 0x4123e9
movzx edx, di
cmp word [eax + edx*2], 0x2e
mov ebx, edi
je 0x41239d
movzx esi, si
add esi, 2
cmp cx, si
je 0x412399
lea ebx, [esi + 1]
cmp word [eax + esi*2], 0x2e
mov esi, ebx
jne 0x4120da
dec ebx
cmp ebx, ecx
jb 0x41239d
jmp 0x4123e9
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], 0
mov edi, 0xa3
xor esi, esi
mov ebx, edi
sub ebx, esi
shr ebx, 1
lea eax, [ebx + esi]
mov dword [esp + 8], eax
lea eax, [eax + eax*2]
lea eax, [eax*8 + 0x445770]
push 1
push eax
push dword [esp + 0x14]
call sub.ntdll.dll_RtlCompareUnicodeString
test eax, eax
cmovle edi, dword [esp + 8]
lea eax, [ebx + esi + 1]
cmovg esi, eax
cmp edi, esi
jne 0x41211e
cmp edi, 0xa2
ja 0x41219c
lea eax, [edi + edi*2]
add edi, 0xffffff5d
lea ebx, [eax*8 + 0x445770]
push 1
push ebx
push dword [esp + 0x14]
call sub.ntdll.dll_RtlCompareUnicodeString
test eax, eax
jne 0x41219c
mov ecx, ebx
lea edx, [esp + 0x28]
lea eax, [esp + 0x20]
push eax
call fcn.00413ae0
add esp, 4
test eax, eax
jne 0x41226f
add ebx, 0x18
inc edi
jne 0x41216b
xor esi, esi
push esi
push esi
push 0x4136d0
push 0x4508e8
call sub.ntdll.dll_RtlRunOnceExecuteOnce
mov eax, dword [0x4508e4]
test eax, eax
je 0x4121c9
cmp dword [eax], 2
jl 0x4121c9
xor edi, edi
cmp dword [eax + 0x14], 0
jne 0x412384
push esi
push esi
push 0x4136d0
push 0x4508e8
call sub.ntdll.dll_RtlRunOnceExecuteOnce
mov ecx, dword [0x4508e4]
test ecx, ecx
je 0x412382
cmp dword [ecx], 2
jl 0x412382
mov ebx, dword [ecx + 0x1c]
mov edi, 0
test ebx, ebx
je 0x412384
xor esi, esi
mov dword [esp + 0x18], ecx
mov edi, ebx
sub edi, esi
shr edi, 1
add edi, esi
lea eax, [edi + edi*2]
lea eax, [ecx + eax*8]
add eax, 0x20
push 1
mov dword [esp + 0xc], eax
push eax
push dword [esp + 0x14]
call sub.ntdll.dll_RtlCompareUnicodeString
test eax, eax
je 0x412361
test eax, eax
cmovs ebx, edi
lea eax, [edi + 1]
cmovns esi, eax
cmp ebx, esi
mov ecx, dword [esp + 0x18]
jne 0x412207
jmp 0x412382
lea edi, [ecx - 1]
cmp edi, esi
je 0x4123e9
lea ebx, [esi + 1]
cmp word [eax + esi*2 + 2], 0x2e
mov esi, ebx
jne 0x41224b
cmp ebx, ecx
jae 0x4123e9
mov esi, ebx
jmp 0x4120b8
mov esi, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], eax
push 0x4508cc
call sub.ntdll.dll_RtlAcquireSRWLockExclusive
mov edi, dword [0x4508c8]
test edi, edi
je 0x4122c3
push 1
push ebx
push edi
call sub.ntdll.dll_RtlEqualUnicodeString
test al, al
je 0x4122b4
mov eax, dword [edi + 8]
xor eax, dword [esp + 8]
mov ecx, dword [edi + 0xc]
xor ecx, dword [esp + 0xc]
or ecx, eax
je 0x412303
mov edi, dword [edi + 0x10]
test edi, edi
jne 0x412295
mov edi, dword [0x4508c8]
jmp 0x4122c5
xor edi, edi
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x412303
push 0x18
push 0
push eax
call sub.ntdll.dll_RtlAllocateHeap
test eax, eax
je 0x412303
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [eax + 4], edx
mov dword [eax], ecx
mov ecx, dword [esp + 0xc]
mov dword [eax + 0xc], ecx
mov ecx, dword [esp + 8]
mov dword [eax + 8], ecx
mov dword [eax + 0x10], edi
mov dword [0x4508c8], eax
push 0x4508cc
call sub.ntdll.dll_RtlReleaseSRWLockExclusive
cmp dword [ebp + 8], 0
je 0x41235d
mov eax, dword [ebx + 0x10]
and eax, 8
je 0x41235d
mov eax, dword [ebp + 8]
mov dword [esp + 0x38], eax
mov ecx, dword [eax + 8]
call dword [section..00cfg]
lea edi, [esp + 0x40]
push edi
call ecx
mov eax, dword [edi + 4]
mov dword [esp + 0x3c], eax
cmp dword [esp + 0x14], 0
je 0x41235d
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
add edx, dword [eax + 0x28]
lea ecx, [esp + 0x38]
call fcn.00413c70
mov edi, 4
test al, al
jne 0x412384
mov edi, esi
jmp 0x412384
lea eax, [esp + 0x20]
lea edx, [esp + 0x28]
mov ebx, dword [esp + 8]
mov ecx, ebx
push eax
call fcn.00413ae0
add esp, 4
mov esi, eax
test eax, eax
jne 0x412271
xor edi, edi
mov ecx, dword [esp + 0x68]
xor ecx, ebp
call fcn.004230e0
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp esi, ecx
jae 0x4123e9
movzx esi, bx
sub esi, edx
cmp esi, 0xc
jne 0x4123e9
sub ebx, edi
mov edi, 3
and ebx, 0x7fff
je 0x412384
lea esi, [eax + edx*2]
lea edi, [esi + ebx*2]
movzx ebx, word [esi]
lea edx, [ebx - 0x30]
cmp dx, 0xa
jb 0x4123db
movzx ebx, bx
lea edx, [ebx - 0x41]
cmp edx, 6
jb 0x4123db
add ebx, 0xffffff9f
cmp ebx, 6
jae 0x4123e9
add esi, 2
cmp esi, edi
jb 0x4123bc
mov edi, 3
jmp 0x412384
cmp word [esp + 8], 0x28
jb 0x412027
cmp word [esp + 0x18], 0x2e
je 0x412027
lea edi, [ecx - 1]
xor esi, esi
mov ebx, eax
cmp edi, esi
je 0x412027
lea edx, [ebx + 2]
inc esi
cmp word [ebx + 2], 0x2e
mov ebx, edx
jne 0x412408
cmp esi, ecx
jae 0x412027
cmp si, 0x10
jb 0x412027
mov edi, 3
test si, si
je 0x412384
movzx ecx, word [eax]
lea esi, [ecx - 0x30]
cmp si, 0xa
jb 0x412460
movzx ecx, cx
lea esi, [ecx - 0x41]
cmp esi, 6
jb 0x412460
add ecx, 0xffffff9f
cmp ecx, 6
jae 0x412027
add eax, 2
cmp eax, edx
jb 0x41243d
jmp 0x412384
lea ecx, [esi + eax]
dec ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x30], ecx
mov edx, dword [edi + 0x74]
cmp edx, 0x10
mov ecx, 0x10
cmovb ecx, edx
cmp ecx, 1
jbe 0x412496
cmp dword [edi + 0x80], eax
setae byte [esp + 0x34]
xor edx, edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], edx
cmp dword [edi + 0x58], edx
mov dword [esp + 0x10], edi
jne 0x412117
cmp ecx, 7
jb 0x4124dc
mov edx, dword [edi + 0xa8]
test edx, edx
js 0x4124dc
lea ecx, [eax - 1]
cmp edx, ecx
jg 0x4124dc
mov edx, dword [esi + edx + 0x14]
test edx, edx
js 0x4124dc
cmp edx, ecx
jg 0x4124dc
cmp dword [esi + edx], 0x53445352
je 0x412117
mov ecx, dword [edi + 8]
cmp ecx, 0x57a725ab
jle 0x41250a
cmp ecx, 0x57a725ac
je 0x412525
cmp ecx, 0x5a115d81
je 0x41252c
cmp ecx, 0x5cff88b8
jne 0x412117
mov edi, 4
jmp 0x412531
xor edi, edi
cmp ecx, 0x570b8a90
je 0x412531
cmp ecx, 0x572b4ce4
jne 0x412117
xor edi, edi
inc edi
jmp 0x412531
mov edi, 2
jmp 0x412531
mov edi, 3
shl edi, 4
cmp dword [edi + 0x44572c], eax
jne 0x412117
lea ecx, [esp + 0x28]
call fcn.0040fb50
test eax, eax
je 0x412117
mov esi, eax
movzx ebx, word [eax]
cmp ebx, 0x26
jb 0x412117
movups xmm0, xmmword [0x4466e0]
lea eax, [esp + 0x40]
movaps xmmword [eax + 0x10], xmm0
movups xmm0, xmmword [0x4466d0]
movaps xmmword [eax], xmm0
lea ecx, [esi + 6]
push 0x10
push eax
push ecx
call dword [sym.imp.ntdll.dll_RtlCompareMemory]
cmp eax, 0x10
jne 0x412117
cmp word [esi + 2], 0x34
jne 0x412117
mov eax, 2
sub eax, esi
and eax, 3
add eax, 0x26
cmp eax, ebx
jae 0x412117
cmp dword [eax + esi], 0xfeef04bd
jne 0x412117
lea ecx, [edi + 0x445720]
mov edx, dword [esi + eax + 8]
mov eax, dword [esi + eax + 0xc]
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], eax
xor edx, dword [ecx + 4]
xor eax, dword [ecx]
mov edi, 3
or eax, edx
jne 0x412117
jmp 0x412384