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

Disassembly:
push 0xffffffffffffffff
push 0x42c808
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x84
push ebx
mov ebx, dword [esp + 0xa0]
push ebp
mov ebp, dword [esp + 0x9c]
push esi
push edi
push 0
push 0xb
push ebp
call fcn.004061d0
mov esi, dword [ebp + 0x38]
mov edi, dword [esi + 8]
mov ecx, dword [esi]
lea eax, [esp + 0x30]
push eax
mov eax, dword [esi + 4]
sub eax, edi
add ecx, edi
call fcn.00405700
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x30]
xor ecx, ecx
cmp eax, ecx
jne 0x406663
call fcn.00405500
add eax, edi
mov dword [esi + 8], eax
cmp edx, ecx
ja 0x406676
cmp dword [esp + 0x64], 0x7fffffff
jbe 0x40667b
call fcn.00405520
mov dword [esp + 0x1c], ecx
mov word [esp + 0x74], cx
mov dword [esp + 0x9c], ecx
mov ecx, dword [esp + 0xa8]
push ecx
push ebp
lea edx, [esp + 0x78]
push edx
call fcn.00405620
mov eax, dword [ebp + 0x38]
mov edi, dword [eax + 8]
add edi, dword [eax]
mov esi, dword [esp + 0x64]
mov dword [ebx + 4], esi
mov eax, dword [ebx + 0x30]
push eax
mov dword [esp + 0x24], edi
call fcn.004259b6
inc esi
xor ecx, ecx
add esp, 4
mov eax, esi
mov edx, 4
mul edx
seto cl
mov dword [ebx + 0x30], 0
neg ecx
or eax, ecx
push eax
call fcn.004259f0
xor ebp, ebp
add esp, 4
cmp eax, ebp
jne 0x4066fb
xor al, al
mov byte [esp + 0x13], al
push 0x433900
lea eax, [esp + 0x17]
push eax
call fcn.0042a55f
mov dword [ebx + 0x30], eax
mov eax, dword [ebx + 0x34]
push eax
call fcn.004259b6
mov ecx, dword [esp + 0x68]
add esp, 4
push ecx
mov dword [ebx + 0x34], ebp
call fcn.004259f0
add esp, 4
cmp eax, ebp
jne 0x406733
push 0x433900
lea edx, [esp + 0x17]
xor al, al
push edx
mov byte [esp + 0x1b], al
call fcn.0042a55f
mov dword [ebx + 0x34], eax
mov eax, dword [ebx + 0x38]
push eax
call fcn.004259b6
xor ecx, ecx
add esp, 4
mov eax, esi
mov edx, 4
mul edx
seto cl
mov dword [ebx + 0x38], ebp
neg ecx
or eax, ecx
push eax
call fcn.004259f0
add esp, 4
test eax, eax
jne 0x406779
xor al, al
mov byte [esp + 0x13], al
push 0x433900
lea eax, [esp + 0x17]
push eax
call fcn.0042a55f
mov dword [ebx + 0x38], eax
mov eax, dword [ebx + 0x2c]
push eax
call fcn.004259b6
xor ecx, ecx
add esp, 4
mov eax, esi
mov edx, 4
mul edx
seto cl
mov dword [ebx + 0x2c], ebp
neg ecx
or eax, ecx
push eax
call fcn.004259f0
xor edx, edx
add esp, 4
cmp eax, edx
jne 0x4067c1
xor al, al
mov byte [esp + 0x13], al
push 0x433900
lea eax, [esp + 0x17]
push eax
call fcn.0042a55f
mov dword [ebx + 0x2c], eax
mov dword [esp + 0x78], edx
mov dword [esp + 0x7c], edx
mov dword [esp + 0x80], edx
mov dword [esp + 0x84], edx
mov dword [esp + 0x88], edx
mov dword [esp + 0x8c], edx
mov ebp, dword [esp + 0xa4]
mov byte [esp + 0x9c], 2
mov esi, dword [ebp + 0x38]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x18], edx
cmp dword [esp + 0x64], edx
jbe 0x406dbf
lea esp, [esp]
mov ecx, dword [esp + 0xa4]
mov eax, dword [ecx + 0x38]
mov edx, dword [esp + 0xac]
mov ecx, dword [edx + 0x38]
mov edx, dword [eax + 8]
sub edx, dword [esp + 0x20]
xor ebx, ebx
add edx, dword [eax]
mov eax, dword [esp + 0x18]
mov dword [ecx + eax*4], edx
mov edi, dword [esi + 8]
mov eax, dword [esi + 4]
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esi]
sub eax, edi
add ecx, edi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x18], ebx
call fcn.00405700
mov ecx, eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x5c], ecx
cmp eax, ebx
je 0x40665e
add eax, edi
mov dword [esi + 8], eax
cmp edx, ebx
ja 0x406676
jb 0x406881
cmp ecx, 0x7fffffff
ja 0x406676
cmp ecx, ebx
je 0x406676
cmp ecx, 0x40
ja 0x406676
mov dword [esp + 0x24], ebx
cmp ecx, ebx
jbe 0x406ada
mov eax, dword [esi + 8]
mov edi, dword [esi + 4]
cmp eax, edi
jae 0x40665e
mov edx, dword [esi]
mov bl, byte [edx + eax]
inc eax
mov byte [esp + 0x13], bl
mov dword [esp + 0x38], eax
mov dword [esi + 8], eax
test bl, 0xc0
jne 0x406676
movzx ecx, bl
and ecx, 0xf
cmp ecx, 8
ja 0x406676
sub edi, eax
cmp ecx, edi
ja 0x40665e
xor ebp, ebp
add edx, eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x54], ebp
mov dword [esp + 0x58], ebp
cmp ecx, ebp
jbe 0x406920
mov edi, ebp
mov ebx, ebp
mov eax, dword [esp + 0x30]
movzx eax, byte [eax + ebp]
shld ebx, edi, 8
cdq
shl edi, 8
inc ebp
or edi, eax
or ebx, edx
cmp ebp, ecx
jb 0x4068f7
mov eax, dword [esp + 0x38]
mov dword [esp + 0x58], ebx
mov bl, byte [esp + 0x13]
mov dword [esp + 0x54], edi
add eax, ecx
mov dword [esi + 8], eax
mov eax, dword [esp + 0xac]
cmp dword [eax + 0x50], 0x80
jae 0x406947
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
push ecx
push edx
add eax, 0x4c
call fcn.004095e0
mov eax, 1
test bl, 0x10
je 0x4069e9
mov ebp, dword [esi + 4]
mov ecx, dword [esi + 8]
mov ebx, dword [esi]
lea eax, [esp + 0x3c]
push eax
mov eax, ebp
sub eax, ecx
add ecx, ebx
call fcn.00405700
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x40665e
add dword [esi + 8], ecx
mov edi, dword [esi + 8]
test edx, edx
ja 0x406676
jb 0x406994
cmp eax, 0x7fffffff
ja 0x406676
mov dword [esp + 0x38], eax
cmp eax, 0x40
ja 0x406676
lea ecx, [esp + 0x40]
push ecx
mov eax, ebp
sub eax, edi
lea ecx, [edi + ebx]
call fcn.00405700
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x40665e
add ecx, edi
mov dword [esi + 8], ecx
test edx, edx
ja 0x406676
jb 0x4069d8
cmp eax, 0x7fffffff
ja 0x406676
cmp eax, 1
jne 0x406676
mov eax, dword [esp + 0x38]
mov bl, byte [esp + 0x13]
mov ecx, dword [esp + 0x14]
add ecx, eax
mov dword [esp + 0x14], ecx
cmp ecx, 0x40
ja 0x406676
test bl, 0x20
je 0x406abf
mov edx, dword [esi + 8]
mov edi, dword [esi + 4]
mov ecx, dword [esi]
lea eax, [esp + 0x44]
push eax
mov eax, edi
sub eax, edx
add ecx, edx
call fcn.00405700
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x40665e
add dword [esi + 8], ecx
mov ecx, dword [esi + 8]
test edx, edx
ja 0x406676
jb 0x406a44
cmp eax, 0x7fffffff
ja 0x406676
sub edi, ecx
cmp eax, edi
ja 0x40665e
mov ecx, dword [esp + 0x54]
cmp ecx, 0x21
jne 0x406a86
cmp dword [esp + 0x58], 0
jne 0x406a86
cmp eax, 1
jne 0x406abc
mov ecx, dword [esp + 0xa4]
mov ecx, dword [ecx + 0x38]
mov edx, dword [ecx + 8]
mov ecx, dword [ecx]
mov cl, byte [edx + ecx]
mov edx, dword [esp + 0xac]
cmp byte [edx + 0x44], cl
jae 0x406abc
mov byte [edx + 0x44], cl
jmp 0x406abc
cmp ecx, 0x30101
jne 0x406abc
cmp dword [esp + 0x58], 0
jne 0x406abc
cmp eax, 5
jne 0x406abc
mov edx, dword [esp + 0xa4]
mov ecx, dword [edx + 0x38]
mov edx, dword [ecx + 8]
mov ecx, dword [ecx]
mov ecx, dword [edx + ecx + 1]
mov edx, dword [esp + 0xac]
cmp dword [edx + 0x48], ecx
jae 0x406abc
mov dword [edx + 0x48], ecx
add dword [esi + 8], eax
mov eax, dword [esp + 0x24]
inc eax
mov dword [esp + 0x24], eax
cmp eax, dword [esp + 0x5c]
jb 0x40689e
mov ebp, dword [esp + 0x14]
xor ebx, ebx
jmp 0x406ade
xor ebx, ebx
mov ebp, ebx
mov edi, dword [esp + 0x5c]
mov edx, dword [esp + 0xac]
mov ecx, dword [esp + 0x18]
cmp edi, 1
jne 0x406b01
cmp ebp, edi
jne 0x406b01
mov dword [esp + 0x28], ebx
mov ebp, edi
jmp 0x406d64
lea eax, [edi - 1]
mov dword [esp + 0x24], eax
cmp ebp, eax
jb 0x406676
mov dword [esp + 0x7c], ebx
cmp ebp, dword [esp + 0x80]
jbe 0x406b51
mov edx, dword [esp + 0x78]
push edx
call fcn.004259b6
add esp, 4
push ebp
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x84], ebx
call fcn.004259f0
add esp, 4
cmp eax, ebx
je 0x406e32
mov dword [esp + 0x78], eax
mov dword [esp + 0x80], ebp
mov dword [esp + 0x7c], ebp
cmp ebp, ebx
jbe 0x406b68
mov eax, dword [esp + 0x78]
push ebp
push ebx
push eax
call fcn.004291f0
add esp, 0xc
mov dword [esp + 0x88], ebx
cmp edi, dword [esp + 0x8c]
jbe 0x406bb5
mov ecx, dword [esp + 0x84]
push ecx
call fcn.004259b6
add esp, 4
push edi
mov dword [esp + 0x88], ebx
mov dword [esp + 0x90], ebx
call fcn.004259f0
add esp, 4
cmp eax, ebx
je 0x406e47
mov dword [esp + 0x84], eax
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], edi
cmp edi, ebx
jbe 0x406bd2
mov edx, dword [esp + 0x84]
push edi
push ebx
push edx
call fcn.004291f0
add esp, 0xc
mov dword [esp + 0x30], ebx
cmp dword [esp + 0x24], ebx
jbe 0x406cc1
mov eax, dword [esp + 0xa4]
mov edi, dword [eax + 0x38]
mov ebp, dword [edi + 8]
mov eax, dword [edi + 4]
lea ecx, [esp + 0x48]
push ecx
mov ecx, dword [edi]
sub eax, ebp
add ecx, ebp
call fcn.00405700
mov ecx, dword [esp + 0x48]
cmp ecx, ebx
je 0x40665e
add ecx, ebp
mov dword [edi + 8], ecx
cmp edx, ebx
ja 0x406676
jb 0x406c26
cmp eax, 0x7fffffff
ja 0x406676
cmp eax, dword [esp + 0x14]
jae 0x406676
mov edx, dword [esp + 0x78]
cmp byte [eax + edx], 0
jne 0x406676
mov ecx, edx
mov edx, dword [esp + 0xa4]
mov byte [eax + ecx], 1
mov ebp, dword [edx + 0x38]
mov edi, dword [ebp + 8]
mov ecx, dword [ebp]
lea eax, [esp + 0x4c]
push eax
mov eax, dword [ebp + 4]
sub eax, edi
add ecx, edi
call fcn.00405700
mov ecx, dword [esp + 0x4c]
cmp ecx, ebx
je 0x40665e
add ecx, edi
mov dword [ebp + 8], ecx
cmp edx, ebx
ja 0x406676
jb 0x406c8b
cmp eax, 0x7fffffff
ja 0x406676
cmp eax, dword [esp + 0x5c]
jae 0x406676
mov ecx, dword [esp + 0x84]
cmp byte [eax + ecx], 0
jne 0x406676
mov byte [eax + ecx], 1
mov eax, dword [esp + 0x30]
inc eax
mov dword [esp + 0x30], eax
cmp eax, dword [esp + 0x24]
jb 0x406be0
mov ebp, dword [esp + 0x14]
sub ebp, dword [esp + 0x24]
cmp ebp, 1
je 0x406d2d
xor ebx, ebx
test ebp, ebp
je 0x406d2d
mov edi, dword [esi + 8]
mov eax, dword [esi + 4]
lea ecx, [esp + 0x50]
push ecx
mov ecx, dword [esi]
sub eax, edi
add ecx, edi
call fcn.00405700
mov ecx, dword [esp + 0x50]
test ecx, ecx
je 0x40665e
add ecx, edi
mov dword [esi + 8], ecx
test edx, edx
ja 0x406676
jb 0x406d0c
cmp eax, 0x7fffffff
ja 0x406676
cmp eax, dword [esp + 0x14]
jae 0x406676
mov ecx, dword [esp + 0x78]
cmp byte [eax + ecx], 0
jne 0x406676
inc ebx
mov byte [eax + ecx], 1
cmp ebx, ebp
jb 0x406cd0
mov ecx, dword [esp + 0x5c]
xor eax, eax
test ecx, ecx
je 0x406d51
mov edx, dword [esp + 0x84]
mov edi, edi
cmp byte [edx + eax], 0
je 0x406d4d
inc eax
cmp eax, ecx
jb 0x406d40
jmp 0x406d51
mov dword [esp + 0x28], eax
cmp eax, ecx
je 0x406676
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0xac]
mov eax, dword [edx + 0x2c]
mov edi, dword [esp + 0x1c]
mov dword [eax + ecx*4], edi
add edi, dword [esp + 0x5c]
mov eax, dword [edx + 0x30]
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x2c]
mov dword [eax + ecx*4], edi
mov eax, dword [edx]
sub eax, edi
cmp ebp, eax
ja 0x40665e
mov eax, dword [edx + 0x34]
mov dl, byte [esp + 0x28]
mov byte [eax + ecx], dl
inc ecx
add edi, ebp
mov dword [esp + 0x2c], edi
mov dword [esp + 0x18], ecx
cmp ecx, dword [esp + 0x64]
jb 0x406810
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0xac]
mov ebp, dword [esp + 0xa4]
mov edx, ecx
mov eax, dword [ebp + 0x38]
mov esi, dword [eax + 8]
mov ecx, dword [esp + 0x1c]
sub esi, edi
add esi, dword [eax]
mov eax, dword [ebx + 0x2c]
mov dword [eax + edx*4], ecx
mov eax, dword [ebx + 0x30]
mov ecx, dword [esp + 0x2c]
mov dword [eax + edx*4], ecx
mov eax, dword [ebp + 0x38]
mov edi, dword [eax + 8]
sub edi, dword [esp + 0x20]
mov ecx, dword [ebx + 0x38]
add edi, dword [eax]
mov dword [ecx + edx*4], edi
xor edi, edi
cmp esi, dword [ebx + 0x40]
je 0x406e62
mov eax, dword [ebx + 0x3c]
cmp eax, edi
je 0x406e09
push eax
call fcn.004259b6
add esp, 4
mov dword [ebx + 0x3c], edi
mov dword [ebx + 0x40], edi
cmp esi, edi
je 0x406e78
push esi
call fcn.004259f0
add esp, 4
cmp eax, edi
jne 0x406e5c
push 0x433900
lea edx, [esp + 0x17]
xor al, al
push edx
mov byte [esp + 0x1b], al
call fcn.0042a55f
xor al, al
mov byte [esp + 0x13], al
push 0x433900
lea eax, [esp + 0x17]
push eax
call fcn.0042a55f
push 0x433900
lea ecx, [esp + 0x17]
xor al, al
push ecx
mov byte [esp + 0x1b], al
call fcn.0042a55f
mov dword [ebx + 0x3c], eax
mov dword [ebx + 0x40], esi
cmp esi, edi
je 0x406e78
mov eax, dword [esp + 0x20]
mov ecx, dword [ebx + 0x3c]
push esi
push eax
push ecx
call fcn.00429520
add esp, 0xc
mov edx, dword [esp + 0x84]
push edx
call fcn.004259b6
mov eax, dword [esp + 0x7c]
add esp, 4
push eax
call fcn.004259b6
or edx, 0xffffffff
add esp, 4
mov dword [esp + 0x9c], edx
cmp byte [esp + 0x74], 0
je 0x406eda
mov eax, dword [esp + 0x70]
mov ecx, dword [eax + 0x38]
mov esi, dword [ecx + 4]
sub esi, dword [ecx + 8]
je 0x406eb9
mov byte [eax + 0x3c], 1
add dword [eax + 4], edx
mov ecx, dword [eax + 4]
je 0x406eda
cmp byte [esp + 0x75], 0
lea ecx, [ecx + ecx*2]
lea edx, [eax + ecx*4]
lea ecx, [edx - 4]
mov dword [eax + 0x38], ecx
je 0x406eda
mov edx, dword [edx + 0x10]
add dword [ecx + 8], edx
push edi
push 0xc
push ebp
call fcn.004061d0
mov eax, dword [ebx + 0x28]
push eax
call fcn.004259b6
mov eax, dword [esp + 0x20]
xor ecx, ecx
add esp, 4
mov edx, 8
mul edx
seto cl
mov dword [ebx + 0x28], edi
neg ecx
or ecx, eax
push ecx
call fcn.004259f0
add esp, 4
test eax, eax
jne 0x406f28
xor al, al
mov byte [esp + 0x13], al
push 0x433900
lea eax, [esp + 0x17]
push eax
call fcn.0042a55f
xor esi, esi
mov dword [ebx + 0x28], eax
cmp dword [esp + 0x1c], esi
jbe 0x406f75
mov ecx, dword [esp + 0xa4]
mov edi, dword [ecx + 0x38]
mov ebp, dword [edi + 8]
mov eax, dword [edi + 4]
mov ecx, dword [edi]
lea edx, [esp + 0x50]
push edx
sub eax, ebp
add ecx, ebp
call fcn.00405700
mov ecx, dword [esp + 0x50]
test ecx, ecx
je 0x40665e
add ecx, ebp
mov dword [edi + 8], ecx
mov ecx, dword [ebx + 0x28]
mov dword [ecx + esi*8], eax
mov dword [ecx + esi*8 + 4], edx
inc esi
cmp esi, dword [esp + 0x1c]
jb 0x406f33
mov edi, dword [esp + 0xa4]
mov ecx, dword [edi + 0x38]
mov edx, dword [ecx + 8]
lea esi, [ecx + 8]
lea eax, [esp + 0x2c]
push eax
mov eax, dword [ecx + 4]
mov ecx, dword [ecx]
sub eax, edx
add ecx, edx
call fcn.00405700
mov ecx, dword [esp + 0x2c]
xor ebp, ebp
cmp ecx, ebp
je 0x4070e8
add dword [esi], ecx
mov ecx, eax
or ecx, edx
je 0x407102
cmp eax, 0xa
jne 0x40706f
cmp edx, ebp
jne 0x40706f
push edi
mov edi, dword [esp + 0x68]
lea eax, [ebx + 0xc]
call fcn.00407d50
mov edi, dword [ebx + 0x10]
mov dword [ebx + 0x1c], ebp
cmp edi, dword [ebx + 0x20]
jbe 0x407018
mov edx, dword [ebx + 0x18]
push edx
call fcn.004259b6
xor ecx, ecx
add esp, 4
mov eax, edi
mov edx, 4
mul edx
seto cl
mov dword [ebx + 0x18], ebp
mov dword [ebx + 0x20], ebp
neg ecx
or ecx, eax
push ecx
call fcn.004259f0
xor ebp, ebp
add esp, 4
cmp eax, ebp
je 0x4070ed
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x20], edi
mov dword [ebx + 0x1c], edi
mov ecx, dword [ebx + 0xc]
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x50], ecx
xor ecx, ecx
mov dword [esp + 0x4c], eax
cmp edi, ebp
jbe 0x4070b7
mov edx, dword [esp + 0x50]
xor eax, eax
cmp byte [ecx + edx], al
je 0x407061
mov eax, dword [esp + 0xa4]
mov eax, dword [eax + 0x38]
mov edx, dword [eax + 8]
lea ebp, [edx + 4]
cmp ebp, dword [eax + 4]
ja 0x40665e
mov esi, dword [eax]
mov edx, dword [edx + esi]
mov dword [eax + 8], ebp
mov eax, edx
mov edx, dword [esp + 0x4c]
mov dword [edx + ecx*4], eax
inc ecx
cmp ecx, edi
jb 0x407033
jmp 0x4070b7
mov esi, dword [edi + 0x38]
mov edx, dword [esi + 8]
mov edi, dword [esi + 4]
mov ecx, dword [esi]
lea eax, [esp + 0x48]
push eax
mov eax, edi
sub eax, edx
add ecx, edx
call fcn.00405700
mov ecx, dword [esp + 0x48]
cmp ecx, ebp
je 0x40665e
add dword [esi + 8], ecx
mov ecx, dword [esi + 8]
xor ebp, ebp
sub edi, ecx
cmp edx, ebp
ja 0x40665e
jb 0x4070b2
cmp eax, edi
ja 0x40665e
add eax, ecx
mov dword [esi + 8], eax
mov edi, dword [esp + 0xa4]
mov ecx, dword [edi + 0x38]
mov edx, dword [ecx + 8]
lea esi, [ecx + 8]
lea eax, [esp + 0x2c]
push eax
mov eax, dword [ecx + 4]
mov ecx, dword [ecx]
sub eax, edx
add ecx, edx
call fcn.00405700
mov ecx, dword [esp + 0x2c]
xor ebp, ebp
cmp ecx, ebp
jne 0x406fa6
call fcn.00405500
push 0x433900
lea ecx, [esp + 0x17]
xor al, al
push ecx
mov byte [esp + 0x1b], al
call fcn.0042a55f
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x90
ret 0xc