Function at 0x406155
Capabilities:
Check os version

Disassembly:
test esi, esi
jne 0x41167c
lea ecx, [ebx + 0x38]
mov dword [ebp - 0x54], ecx
cmp dword [ebp - 0x3c], 1
je 0x406177
push eax
push esi
call fcn.0040f22e
add esp, 0x10
push eax
cmp dword [ebp - 0x3c], 0xffffffbf
jne 0x406186
je 0x415470
mov esi, dword [ebp - 0x54]
or word [ebp - 0x38], 0x57f
mov dword [esi], 0x30006
mov word [ebp - 0x58], 0x670
mov ebx, dword [ebp - 0x54]
or edx, dword [ebp - 0x6c]
mov dword [ebx + 4], 0x40005
sub esi, dword [ebp - 0x2c]
add ecx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x54]
mov dword [eax + 8], 0
mov ebx, dword [ebp - 0x20]
xor edi, dword [ebp - 0x44]
mov esi, dword [ebp - 0x50]
lea ebx, [esi + 0x648]
mov dword [ebp - 0x20], ebx
or ecx, dword [ebp - 0x48]
and word [ebp - 0x38], 0xc57
mov ebx, dword [ebp - 0x68]
lea ebx, [ebx + 0x60]
push ebx
push dword [ebp - 0x20]
call fcn.0040456b
mov edx, dword [ebp - 0x68]
lea edx, [edx + 0x68]
push edx
push dword [ebp - 0x50]
call fcn.0040456b
push dword [ebp - 0x68]
or esi, dword [ebp - 0x5c]
call fcn.00413507
or dword [ebp - 0x6c], 0x1d
xor edx, eax
xor eax, dword [ebp - 0x64]
mov edx, dword [ebp - 0x20]
test dword [ebp - 0x28], 0
je 0x406228
mov ecx, dword [ebp - 0x212c]
push ecx
mov ecx, ebx
call fcn.00415923
mov edi, dword [ebp - 0x50]
add dword [ebp - 0x6c], 0xbb
lea edx, [edi + 0xc44]
mov dword [ebp - 0x20], edx
or dword [ebp - 0x38], eax
push dword [ebp - 0x20]
and edx, dword [ebp - 0x48]
add edx, esi
push dword [ebp - 0x50]
add eax, dword [ebp - 0x58]
cmp dword [ebp - 0x3c], 1
je 0x406267
mov ecx, dword [eax - 8]
add eax, 0xfffffff8
mov dword [ebp - 4], edi
mov dword [ebp - 0x34], eax
cmp ecx, dword [0x41a0c4]
call fcn.004127ce
or edx, dword [ebp - 0x1c]
add ebx, 0xa5d2
xor word [ebp - 0x64], 0x4f1
sub eax, esi
mov eax, dword [ebp - 0x20]
or dword [ebp - 0x20], eax
jne 0x40628e
jmp 0x406ba6
mov eax, dword [ebp - 0x50]
lea eax, [eax + 0xa0]
push eax
push dword [ebp - 0x20]
call fcn.0040456b
mov ebx, dword [ebp - 0x30]
lea ebx, [ebx - 0x7c]
push ebx
push dword [ebp - 0x68]
call fcn.0040456b
cmp dword [ebp - 0x3c], 0xffffffae
jne 0x4062c4
mov byte [eax + 2], 0x4c
cmp edx, 0x41a258
jne 0x40626c
add edx, edi
and dword [ebp - 0x5c], ecx
mov eax, dword [ebp - 0x68]
add dword [ebp - 0x58], edx
mov ebx, dword [ebp - 0x30]
add dword [ebp - 0x28], 0
je 0x4062de
int3
lea eax, [ebx - 0x74]
mov dword [ebp - 0x68], eax
lea esi, [ebp - 0x20]
push esi
mov esi, dword [ebp - 0x30]
push dword [esi - 0x7c]
call fcn.0040456b
or dword [ebp - 0x5c], 0xc80
mov eax, dword [ebp - 0x20]
or dword [ebp - 0x38], 0xfffffff4
or esi, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
and ecx, eax
and esi, dword [ebp - 0x64]
lea eax, [edi + 0x24]
mov dword [ebp - 0x20], eax
and dword [ebp - 0x2c], ebx
mov ecx, dword [ebp - 0x68]
lea ecx, [ecx + 4]
push ecx
push dword [ebp - 0x20]
call fcn.0040456b
cmp dword [ebp - 0x3c], 1
je 0x406338
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push eax
push ecx
lea ecx, [ebp - 0x20]
push ecx
mov ecx, dword [ebp - 0x50]
push dword [ecx + 0xa0]
call fcn.0040456b
mov esi, dword [ebp - 0x68]
lea esi, [esi + 8]
push esi
push dword [ebp - 0x20]
call fcn.0040456b
mov edi, dword [ebp - 0x68]
or eax, ecx
and eax, dword [ebp - 0x34]
mov dword [edi + 0xc], 2
and edx, ecx
or eax, dword [ebp - 0x48]
cmp dword [ebp - 0x3c], 1
je 0x40638e
idiv edi
add byte [esi + 3], al
mov eax, edx
add byte [esi + 4], al
mov ebx, dword [ebp - 0x30]
lea ebx, [ebx - 0x44]
push ebx
push dword [ebp - 0x20]
call fcn.0040456b
add dword [ebp - 0x6c], edi
sub edi, ecx
mov eax, dword [ebp - 0x30]
and word [ebp - 0x1c], 0x4d4
sub ebx, dword [ebp - 0x5c]
mov dword [eax - 0x40], 0
cmp dword [ebp - 0x28], 0x66
jne 0x4154bb
je 0x40492a
test ebx, ebx
je fcn.00407671
push 0
or esi, dword [ebp - 0x44]
mov ecx, ebx
add dword [ebp - 0x28], 0
je 0x4154da
cmp eax, 0x14000
je 0x415470
cmp eax, 0x20000
push 0x8000000
xor dword [ebp - 0x44], eax
or eax, dword [ebp - 0x1c]
mov ebx, edx
push 0x40
and dword [ebp - 0x64], ecx
cmp dword [ebp - 0x3c], 0x400002
jne 0x415502