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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x47db2f
mov eax, dword fs:[0]
push eax
sub esp, 0x108
mov eax, dword [0x4983f8]
xor eax, esp
mov dword [esp + 0x100], eax
push ebx
push esi
push edi
mov eax, dword [0x4983f8]
xor eax, esp
push eax
lea eax, [esp + 0x118]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
lea edi, [ecx + eax]
mov dword [esp + 0x30], eax
mov dword [esp + 0x14], eax
lea eax, [ebx + 4]
mov dword [esp + 0x34], ecx
push eax
lea edx, [esp + 0x18]
mov ecx, edi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x1c], edi
call fcn.004030d0
test al, al
je 0x401bdb
mov edx, dword [esp + 0x14]
mov ecx, edi
sub ecx, edx
cmp ecx, 0xb
jl 0x401bdb
mov eax, dword [edx]
mov dword [ebx + 0x40], eax
mov ecx, dword [edx + 4]
add edx, 4
mov dword [ebx + 0x3c], ecx
movzx eax, byte [edx + 4]
add edx, 4
mov ecx, eax
sar eax, 2
inc edx
and ecx, 3
and eax, 3
mov dword [ebx + 0x38], ecx
mov dword [ebx + 0x44], eax
movzx esi, byte [edx]
movzx eax, byte [edx + 1]
shl esi, 8
add esi, eax
add edx, 2
xor ecx, ecx
mov dword [esp + 0x14], edx
cmp esi, ecx
je 0x401964
jmp 0x401890
xor edx, edx
dec esi
mov dword [esp + 0x8c], 7
mov dword [esp + 0x88], ecx
mov word [esp + 0x78], dx
lea eax, [esp + 0x74]
mov dword [esp + 0x120], ecx
push eax
lea edx, [esp + 0x18]
mov ecx, edi
call fcn.004030d0
test al, al
je 0x401bc4
lea ecx, [esp + 0x74]
push ecx
call fcn.004285a0
add esp, 4
test al, al
jne 0x4018f8
mov eax, dword [esp + 0x88]
push 0x486fa8
mov edi, 1
lea ecx, [esp + 0x78]
call fcn.00404a20
test eax, eax
jne 0x401930
mov edi, dword [ebx + 0xc4]
lea eax, [ebx + 0xb0]
mov eax, dword [edi + 4]
lea edx, [esp + 0x74]
push edx
push eax
push edi
call fcn.00403de0
mov ecx, dword [esp + 0x24]
add ecx, 0xb0
mov ebx, eax
call fcn.00420060
mov dword [edi + 4], ebx
mov eax, dword [ebx + 4]
mov dword [eax], ebx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x120], 0xffffffff
cmp dword [esp + 0x8c], 8
jb 0x401952
mov ecx, dword [esp + 0x78]
push ecx
call fcn.00462b9f
add esp, 4
mov edi, dword [esp + 0x18]
xor ecx, ecx
test esi, esi
jne 0x401890
mov edx, dword [esp + 0x14]
mov eax, edi
sub eax, edx
cmp eax, 2
jl 0x401bdb
movzx esi, byte [edx]
movzx eax, byte [edx + 1]
shl esi, 8
add esi, eax
add edx, 2
mov dword [esp + 0x14], edx
cmp esi, ecx
je 0x401a62
lea esp, [esp]
mov dword [esp + 0x88], ecx
dec esi
xor ecx, ecx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x8c], 7
mov word [esp + 0x78], cx
lea edx, [esp + 0x74]
push edx
lea edx, [esp + 0x18]
mov ecx, edi
mov dword [esp + 0x124], 1
call fcn.004030d0
test al, al
je 0x401bdf
lea eax, [esp + 0x74]
push eax
call fcn.004285a0
add esp, 4
test al, al
jne 0x401a00
mov eax, dword [esp + 0x88]
push 0x486fa8
mov edi, 1
lea ecx, [esp + 0x78]
call fcn.00404a20
test eax, eax
jne 0x401a2e
mov esi, dword [ebx + 0xa8]
mov edx, dword [esi + 4]
lea ecx, [esp + 0x74]
push ecx
push edx
push esi
call fcn.00403de0
lea ecx, [ebx + 0x94]
mov edi, eax
call fcn.00420060
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
mov esi, dword [esp + 0x1c]
mov dword [eax], edi
mov dword [esp + 0x120], 0xffffffff
cmp dword [esp + 0x8c], 8
jb 0x401a50
mov eax, dword [esp + 0x78]
push eax
call fcn.00462b9f
add esp, 4
mov edi, dword [esp + 0x18]
xor ecx, ecx
test esi, esi
jne 0x401990
mov edx, dword [esp + 0x14]
mov eax, edi
sub eax, edx
cmp eax, 2
jl 0x401bdb
movzx eax, byte [edx]
movzx esi, byte [edx + 1]
shl eax, 8
add eax, esi
add edx, 2
cmp eax, ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x1c], ecx
jg 0x401bf4
mov dword [esp + 0x1c], ecx
lea ecx, [ebx + 0x5c]
mov dword [esp + 0x20], ecx
lea edi, [ebx + 0x54]
mov eax, dword [esp + 0x18]
sub eax, edx
cmp eax, 5
jl 0x401bdb
movzx ecx, byte [edx]
and ecx, 3
mov dword [edi - 8], ecx
movzx eax, byte [edx]
shr eax, 2
and eax, 3
inc edx
mov dword [edi + 0x38], eax
movzx ecx, byte [edx]
shl ecx, 8
inc edx
mov dword [edi], ecx
movzx eax, byte [edx]
or dword [edi], eax
inc edx
cmp dword [edi], 0
jne 0x401ae3
mov dword [edi], 0xa
movzx esi, byte [edx]
movzx ecx, byte [edx + 1]
shl esi, 8
add esi, ecx
add edx, 2
mov dword [esp + 0x14], edx
test esi, esi
je 0x401b5b
lea ebx, [ebx]
lea eax, [esp + 0x38]
dec esi
call fcn.0044f900
mov eax, dword [esp + 0x34]
sub eax, edx
add eax, dword [esp + 0x30]
lea ecx, [esp + 0x38]
push eax
push edx
mov dword [esp + 0x128], 5
call fcn.0044fb20
mov dword [esp + 0x14], eax
test eax, eax
je 0x401bdb
mov ebx, dword [esp + 0x20]
lea ecx, [esp + 0x38]
push ecx
call fcn.00403830
mov dword [esp + 0x120], 0xffffffff
mov edx, dword [esp + 0x14]
test esi, esi
jne 0x401b00
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
add dword [esp + 0x20], 0x18
inc eax
add edi, 4
cmp eax, 2
mov dword [esp + 0x1c], eax
jl 0x401aa4
mov ecx, dword [esp + 0x18]
lea edx, [ebx + 0xcc]
push edx
lea edx, [esp + 0x18]
call fcn.004030d0
test al, al
je 0x401bdb
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jae 0x401bdb
movzx ecx, byte [eax]
mov dword [ebx + 0x48], ecx
inc eax
mov ecx, dword [esp + 0x118]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x100]
xor ecx, esp
call fcn.00462baa
mov esp, ebp
pop ebp
ret 8
cmp dword [esp + 0x8c], 8
jb 0x401bdb
mov edx, dword [esp + 0x78]
push edx
call fcn.00462b9f
add esp, 4
xor eax, eax
jmp 0x401b9e
lea ecx, [esp + 0x74]
call fcn.00405dc0
xor eax, eax
jmp 0x401b9e
mov edi, dword [esp + 0x18]
lea ecx, [esp + 0xac]
push ecx
call fcn.00401000
mov dword [esp + 0x120], 2
xor edx, edx
mov dword [esp + 0x8c], 7
mov dword [esp + 0x88], 0
mov word [esp + 0x78], dx
lea eax, [esp + 0x74]
push eax
lea edx, [esp + 0x18]
mov ecx, edi
mov byte [esp + 0x124], 3
call fcn.004030d0
test al, al
je 0x401e8e
mov edx, 0x486fac
lea eax, [esp + 0x74]
call fcn.00403230
mov esi, 0x487060
lea ecx, [esp + 0x74]
call fcn.00404740
test al, al
jne 0x401e8e
lea edi, [esp + 0x74]
lea eax, [esp + 0xac]
call fcn.004031e0
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
sub edx, ecx
cmp edx, 2
jl 0x401e8e
movzx edi, byte [ecx]
movzx eax, byte [ecx + 1]
shl edi, 8
add edi, eax
add ecx, 2
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], 0
test edi, edi
jle 0x401d62
xor ecx, ecx
mov dword [esp + 0xa8], 7
mov dword [esp + 0xa4], 0
mov word [esp + 0x94], cx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x90]
push edx
lea edx, [esp + 0x18]
mov byte [esp + 0x124], 4
call fcn.004030d0
test al, al
je 0x401e82
mov edx, 0x486fac
lea eax, [esp + 0x90]
call fcn.00403230
mov esi, 0x487060
lea ecx, [esp + 0x90]
call fcn.00404740
test al, al
jne 0x401e82
lea eax, [esp + 0x90]
lea ebx, [esp + 0xc8]
call fcn.00403360
lea ecx, [esp + 0x90]
mov byte [esp + 0x120], 3
call fcn.00405dc0
mov eax, dword [esp + 0x20]
inc eax
cmp eax, edi
mov dword [esp + 0x20], eax
jl 0x401cb3
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
sub eax, ecx
cmp eax, 2
jl 0x401e8e
movzx eax, byte [ecx]
movzx edx, byte [ecx + 1]
add ecx, 2
mov dword [esp + 0x14], ecx
shl eax, 8
add eax, edx
mov ecx, eax
and ecx, 1
mov dword [esp + 0xf4], ecx
mov ecx, eax
shr ecx, 2
and ecx, 1
mov dword [esp + 0xfc], ecx
mov edx, eax
shr edx, 1
and edx, 1
mov dword [esp + 0xf8], edx
mov ecx, eax
shr ecx, 4
and ecx, 1
mov edx, eax
shr edx, 3
and edx, 1
mov dword [esp + 0xf0], ecx
mov dword [esp + 0x100], edx
mov ecx, eax
shr ecx, 6
mov edx, eax
shr edx, 5
and ecx, 1
and edx, 1
mov dword [esp + 0xe4], ecx
mov dword [esp + 0xec], edx
mov ecx, eax
mov edx, eax
shr ecx, 8
shr edx, 7
shr eax, 9
and ecx, 1
and edx, 1
and eax, 1
mov dword [esp + 0xe8], edx
mov dword [esp + 0x104], ecx
mov dword [esp + 0x108], eax
test ecx, ecx
je 0x401e34
cmp dword [esp + 0x28], 0
jne 0x401e29
mov dword [esp + 0x28], 1
jmp 0x401e34
mov dword [esp + 0x104], 0
lea eax, [esp + 0xac]
push eax
lea edi, [ebx + 0x20]
call fcn.00403540
lea ecx, [esp + 0x74]
call fcn.00405dc0
lea esi, [esp + 0xac]
mov dword [esp + 0x120], 0xffffffff
call fcn.00401eb0
mov eax, dword [esp + 0x1c]
inc eax
cmp eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], eax
jl 0x401bf0
mov edx, dword [esp + 0x14]
xor ecx, ecx
jmp 0x401a96
lea ecx, [esp + 0x90]
call fcn.00405dc0
lea ecx, [esp + 0x74]
call fcn.00405dc0
lea esi, [esp + 0xac]
call fcn.00401eb0
xor eax, eax
jmp 0x401b9e