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

Disassembly:
push 0xffffffffffffffff
push 0x650d38
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x7c
push ebx
push ebp
push esi
mov esi, dword [esp + 0xa4]
push edi
mov edi, dword [esp + 0xa0]
mov eax, dword [edi + 0x14]
lea ecx, [esp + 0x70]
mov dword [esp + 0x28], eax
call fcn.0056a330
mov edx, dword [esp + 0xb8]
mov eax, dword [esp + 0xbc]
lea ecx, [esp + 0xa8]
mov dword [esp + 0x6c], ecx
mov ecx, dword [esp + 0xc0]
mov dword [esp + 0x70], edx
mov edx, dword [esp + 0xc4]
xor ebx, ebx
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], edx
mov dword [esp + 0x68], 0x660424
mov dword [esp + 0x74], eax
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebx
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov ecx, esi
call edx
mov ebp, eax
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
sub eax, ebp
mov dword [esp + 0x14], eax
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
mov ecx, esi
call edx
add eax, dword [esp + 0x80]
mov dword [esp + 0x64], 7
mov dword [esp + 0x20], eax
mov dword [esp + 0x60], ebx
mov word [esp + 0x50], bx
mov dword [esp + 0x94], ebx
mov eax, dword [edi + 0x14]
xor ebp, ebp
cmp eax, ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x30], ebx
jbe 0x51e242
jmp 0x51df07
mov edi, dword [esp + 0xa0]
cmp ebp, eax
jbe 0x51df10
call fcn.0062472f
cmp dword [edi + 0x18], 8
jb 0x51df1b
mov eax, dword [edi + 4]
jmp 0x51df1e
lea eax, [edi + 4]
movzx ecx, word [eax + ebp*2]
cmp cx, 0x7b
mov dword [esp + 0x18], ecx
jne 0x51e008
mov ecx, edi
call fcn.00405370
mov edi, eax
lea eax, [ebp + ebp]
add edi, eax
lea eax, [edi + 2]
push 0x7d
push eax
mov dword [esp + 0x3c], eax
call fcn.00624778
add esp, 8
test eax, eax
je 0x51e02e
sub eax, edi
sar eax, 1
lea ebp, [eax + ebp + 1]
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov ecx, esi
call edx
mov edi, eax
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
mov ecx, dword [esp + 0x7c]
mov esi, dword [esp + 0x70]
sub eax, edi
mov edi, dword [esp + 0x74]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x78]
lea edx, [esp + 0x68]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x34]
push edx
push eax
mov dword [esp + 0x50], ecx
call fcn.0051da50
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x74]
mov dword [esp + 0x80], ecx
mov dword [esp + 0x78], esi
mov dword [esp + 0x7c], edi
mov dword [esp + 0x84], edx
mov esi, dword [eax]
mov edx, dword [esi]
mov eax, dword [edx + 8]
add esp, 8
mov ecx, esi
call eax
mov edx, dword [esi]
mov edx, dword [edx + 4]
mov ecx, esi
mov dword [esp + 0x34], eax
call edx
mov edi, eax
mov eax, dword [esp + 0x34]
sub edi, eax
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
mov ecx, esi
call edx
add eax, dword [esp + 0x80]
sub edi, dword [esp + 0x38]
mov dword [esp + 0x20], eax
add dword [esp + 0x14], edi
jmp 0x51e230
cmp cx, 0x20
je 0x51e022
test byte [esp + 0x84], 1
je 0x51e13e
cmp cx, 0xa
jne 0x51e032
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], 0x20
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0xa4]
mov edx, dword [esp + 0x2c]
mov eax, dword [esi]
mov eax, dword [eax + 0x24]
push edx
push ecx
mov ecx, esi
call eax
mov ecx, dword [esp + 0x24]
movzx edx, word [esp + 0x18]
add ecx, eax
cmp ecx, dword [edi + 8]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], edx
jle 0x51e22d
cmp dword [esp + 0x1c], 0xffffffff
je 0x51e18f
mov eax, dword [esp + 0x9c]
fld dword [eax + 0xc]
mov ebp, dword [edi + 4]
call fcn.00643d70
mov edx, dword [esp + 0x9c]
mov ecx, dword [edx + 0x24]
add eax, ebp
add eax, dword [esp + 0x14]
cmp eax, ecx
jl 0x51e0a2
mov edx, dword [edx + 0x2c]
add edx, ecx
add edx, dword [esp + 0x20]
cmp eax, edx
jl 0x51e0ac
cmp byte [esp + 0xb4], 0
je 0x51e102
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
sub eax, ebx
add ebp, ecx
mov ecx, dword [edi]
lea edx, [eax + ebx]
cmp edx, dword [esp + 0x28]
jle 0x51e0cd
mov eax, dword [esp + 0x28]
sub eax, ebx
test eax, eax
jle 0x51e102
mov edx, dword [esp + 0xac]
push eax
mov eax, dword [esp + 0xb4]
push ebx
push eax
mov eax, dword [edi + 8]
push edx
mov edx, dword [esp + 0xac]
push eax
lea eax, [esp + 0x7c]
push eax
push ebp
push ecx
mov ecx, dword [esp + 0xc0]
push ecx
push edx
call fcn.0051db10
add esp, 0x28
mov eax, dword [esp + 0x24]
test eax, eax
jl 0x51e249
mov ebp, dword [esp + 0x1c]
mov edi, dword [esp + 0xa0]
add ebp, 1
cmp word [esp + 0x18], 0xa
je 0x51e205
mov edx, dword [edi + 0x14]
cmp ebp, edx
jae 0x51e205
cmp dword [edi + 0x18], 8
jb 0x51e165
mov ecx, dword [edi + 4]
jmp 0x51e168
cmp cx, 0xa
mov edi, dword [esp + 0xa4]
jne 0x51e039
mov eax, dword [edi + 8]
add eax, 1
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x24], eax
add ebp, 1
jmp 0x51e039
lea ecx, [edi + 4]
movzx ecx, word [ecx + ebp*2]
cmp cx, 0x20
je 0x51e186
test byte [esp + 0x84], 1
je 0x51e205
cmp cx, 0xa
jne 0x51e205
add ebp, 1
cmp ebp, edx
jb 0x51e133
jmp 0x51e205
lea eax, [ebx + 1]
cmp ebp, eax
jge 0x51e199
add ebp, 1
mov ecx, dword [edi + 4]
add ecx, dword [esp + 0x14]
mov eax, ebp
sub eax, ebx
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x28]
lea edx, [eax + ebx]
cmp edx, ecx
jle 0x51e1bf
mov eax, ecx
sub eax, ebx
test eax, eax
jle 0x51e249
mov ecx, dword [esp + 0xac]
push eax
mov eax, dword [esp + 0xb4]
push ebx
push eax
mov eax, dword [edi + 8]
push ecx
mov ecx, dword [esp + 0xb0]
push eax
mov eax, dword [esp + 0x4c]
lea edx, [esp + 0x7c]
push edx
mov edx, dword [esp + 0xb4]
push eax
mov eax, dword [edi]
push eax
push ecx
push edx
call fcn.0051db10
add esp, 0x28
test eax, eax
jl 0x51e249
mov edi, dword [esp + 0xa0]
cmp eax, dword [esp + 0x30]
jle 0x51e20f
mov dword [esp + 0x30], eax
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x20]
add dword [esp + 0x14], eax
mov ebx, ebp
mov dword [esp + 0x1c], 0xffffffff
jmp 0x51e237
add ebp, 1
mov edi, dword [esp + 0xa0]
mov eax, dword [edi + 0x14]
cmp ebp, eax
jb 0x51df00
mov edi, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa0]
mov eax, dword [ecx + 0x14]
cmp ebx, eax
jge 0x51e2b8
mov ecx, dword [edi + 4]
add ecx, dword [esp + 0x14]
mov edx, dword [edi + 8]
mov edi, dword [edi]
sub eax, ebx
lea ebp, [eax + ebx]
cmp ebp, dword [esp + 0x28]
jle 0x51e278
mov eax, dword [esp + 0x28]
sub eax, ebx
test eax, eax
jle 0x51e2c8
push eax
mov eax, dword [esp + 0xb4]
push ebx
push eax
mov eax, dword [esp + 0xb8]
push eax
mov eax, dword [esp + 0xb0]
push edx
lea edx, [esp + 0x7c]
push edx
push ecx
mov ecx, dword [esp + 0xb8]
push edi
push eax
push ecx
call fcn.0051db10
add esp, 0x28
test eax, eax
jl 0x51e2c8
mov edx, dword [esp + 0x20]
add dword [esp + 0x14], edx
jmp 0x51e2c8
cmp word [esp + 0x18], 0xa
jne 0x51e2c8
mov eax, dword [esp + 0x20]
add dword [esp + 0x14], eax
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
mov esi, eax
mov eax, dword [esp + 0x14]
sub eax, dword [esp + 0x20]
add esi, eax
cmp dword [esp + 0x64], 8
jb 0x51e2f1
mov ecx, dword [esp + 0x50]
push ecx
call fcn.0062414c
add esp, 4
mov ecx, dword [esp + 0x8c]
pop edi
mov eax, esi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x88
ret