Function at 0x4ca100
Capabilities:
Check for peb ntglobalflag flag

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x52b510
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x70
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ebp, ebp
mov dword [esp + 0x18], edi
mov dword [esp + 0x58], 0x53b108
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x64], ebp
mov dword [esp + 0x60], ebp
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x60]
mov dword [esp + 0x90], ebp
call fcn.004ecdd0
mov eax, dword [edi + 0x30]
mov edx, dword [edi + 0x2c]
mov ecx, dword [esp + 0x5c]
mov esi, eax
dec eax
test esi, esi
je 0x4ca177
inc eax
mov esi, dword [edx]
add edx, 4
mov dword [ecx], esi
add ecx, 4
dec eax
jne 0x4ca16a
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x5c]
push 0x4c85d0
push 4
push ecx
push edx
nop
call fcn.0061f4c6
mov eax, dword [edi + 0x44]
add esp, 0x10
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x60]
mov ebx, eax
xor ecx, ecx
cmp eax, ebp
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], ecx
jle 0x4ca484
mov edx, dword [esp + 0x5c]
mov esi, dword [edx + ecx*4]
cmp dword [esi + 0xc0], 7
je 0x4ca473
mov eax, dword [esi + 0xf0]
mov ecx, dword [esi + 0xe8]
add eax, ecx
jne 0x4ca473
mov ecx, dword [esi + 0x80]
mov edx, dword [esi + 0x84]
mov dword [esp + 0x34], ecx
lea ecx, [esi + 8]
mov dword [esp + 0x38], edx
call fcn.0049c1a0
fdiv qword [esp + 0x34]
fcomp qword [0x5340c0]
fnstsw ax
test ah, 0x41
je 0x4ca473
mov dword [esp + 0x1c], ebx
mov eax, dword [esp + 0x5c]
mov edi, dword [eax + ebp*4]
mov eax, dword [esi + 0xd8]
mov ecx, dword [edi + 0xd8]
cmp ecx, eax
je 0x4ca457
fld qword [esi + 0x70]
fcomp qword [edi + 0x70]
fnstsw ax
test ah, 1
je 0x4ca246
fld qword [esi + 0x78]
fcomp qword [edi + 0x78]
fnstsw ax
test ah, 1
jne 0x4ca457
lea ecx, [esi + 8]
call fcn.0049c1a0
mov edx, dword [esi + 0x80]
mov eax, dword [esi + 0x84]
fstp qword [esp + 0x24]
lea ecx, [edi + 8]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
call fcn.0049c1a0
fadd qword [esp + 0x24]
fcomp qword [esp + 0x3c]
fnstsw ax
test ah, 1
je 0x4ca457
mov eax, dword [esp + 0x14]
xor bl, bl
cmp ebp, eax
mov edi, ebp
jge 0x4ca2ba
mov eax, dword [esp + 0x5c]
mov ecx, dword [eax + edi*4]
mov edx, dword [eax + ebp*4]
push ecx
mov ecx, dword [esp + 0x1c]
push edx
push esi
call fcn.004c9cb0
test al, al
je 0x4ca2a9
mov bl, 1
mov eax, dword [esp + 0x14]
inc edi
cmp edi, eax
jl 0x4ca28d
test bl, bl
jne 0x4ca457
mov eax, dword [esp + 0x5c]
push 1
mov ecx, dword [eax + ebp*4]
push ecx
mov ecx, dword [esp + 0x20]
push esi
call fcn.004c8910
test al, al
je 0x4ca457
xor ebx, ebx
mov dword [esp + 0x6c], 0x53b108
mov dword [esp + 0x70], ebx
mov dword [esp + 0x7c], ebx
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x88], 1
cmp eax, 0xffffffff
je 0x4ca2fd
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x5c]
cmp ebp, eax
mov dword [esp + 0x78], ebx
mov dword [esp + 0x74], ebx
mov edi, ebp
jge 0x4ca40c
mov eax, dword [ecx + edi*4]
mov ebx, dword [esi + 0xd8]
mov edx, dword [eax + 0xd8]
cmp edx, ebx
je 0x4ca3fd
push eax
mov eax, dword [ecx + ebp*4]
mov ecx, dword [esp + 0x1c]
push eax
call fcn.004cac80
test al, al
jne 0x4ca3f9
mov ecx, dword [esp + 0x5c]
fld qword [esi + 0x70]
mov edx, dword [ecx + edi*4]
add edx, 0x50
fcomp qword [edx + 0x20]
fnstsw ax
test ah, 1
je 0x4ca36c
fld qword [esi + 0x78]
fcomp qword [edx + 0x28]
fnstsw ax
test ah, 1
jne 0x4ca3fd
mov ebx, dword [ecx + ebp*4]
mov ecx, dword [ecx + edi*4]
add ecx, 8
call fcn.0049c1a0
fstp qword [esp + 0x24]
lea ecx, [esi + 8]
call fcn.0049c1a0
mov ecx, dword [esi + 0x80]
mov edx, dword [esi + 0x84]
fstp qword [esp + 0x4c]
mov dword [esp + 0x44], ecx
lea ecx, [ebx + 8]
mov dword [esp + 0x48], edx
call fcn.0049c1a0
fadd qword [esp + 0x24]
fadd qword [esp + 0x4c]
fcomp qword [esp + 0x44]
fnstsw ax
test ah, 1
je 0x4ca3f9
mov eax, dword [esp + 0x5c]
mov ecx, dword [eax + edi*4]
mov edx, dword [eax + ebp*4]
push ecx
push edx
push esi
call fcn.004d42b0
add esp, 0xc
test al, al
je 0x4ca3f9
mov eax, dword [esp + 0x5c]
push 0xffffffffffffffff
lea ecx, [esp + 0x70]
mov ebx, dword [eax + edi*4]
mov eax, dword [esp + 0x78]
mov dword [esp + 0x28], eax
inc eax
push eax
call fcn.004ecdd0
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x24]
mov dword [ecx + edx*4], ebx
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x14]
inc edi
cmp edi, eax
jl 0x4ca317
xor ebx, ebx
mov eax, dword [esp + 0x74]
mov edx, dword [esp + 0x70]
push 1
push eax
mov eax, dword [ecx + ebp*4]
mov ecx, dword [esp + 0x20]
push edx
push eax
push esi
call fcn.004c9fb0
mov dword [esp + 0x6c], 0x53b108
mov eax, dword [esp + 0x70]
mov byte [esp + 0x88], 2
cmp eax, ebx
je 0x4ca447
push eax
call fcn.0051aee4
add esp, 4
mov byte [esp + 0x88], 0
mov dword [esp + 0x6c], 0x53138c
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x14]
inc ebp
dec ecx
cmp ebp, ebx
mov dword [esp + 0x1c], ecx
jl 0x4ca20d
mov edi, dword [esp + 0x18]
xor ebp, ebp
mov ecx, dword [esp + 0x20]
inc ecx
cmp ecx, ebx
mov dword [esp + 0x20], ecx
jl 0x4ca1b0
mov ecx, dword [esp + 0x30]
mov edx, dword [edi + 0x44]
cmp edx, ecx
mov dword [esp + 0x58], 0x53b108
setg bl
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x88], 3
cmp eax, ebp
je 0x4ca4b4
push eax
call fcn.0051aee4
add esp, 4
mov ecx, dword [esp + 0x80]
pop edi
mov al, bl
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret