Function at 0x40cc20
Capabilities:
Check for peb ntglobalflag flag

Disassembly:
push 0xffffffffffffffff
push 0x43d948
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x44ede8]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44ede8]
xor eax, esp
push eax
lea eax, [esp + 0x84]
mov dword fs:[0], eax
mov eax, dword [esp + 0x94]
mov ebx, dword [eax + 0x14]
mov dword [esp + 0x38], ecx
mov ecx, dword [edx + 0x14]
xor edi, edi
cmp ecx, edi
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ecx
je 0x40ccb7
cmp ebx, edi
je 0x40ccb7
xor ebp, ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x8c], edi
cmp dword [eax + 0x18], 8
jb 0x40cca2
add eax, 4
mov eax, dword [eax]
jmp 0x40cca5
add eax, 4
push eax
xor eax, eax
call fcn.0040e1d0
mov esi, eax
test esi, esi
mov dword [esp + 0x24], esi
jge 0x40cce8
xor eax, eax
mov ecx, dword [esp + 0x84]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.00420baf
add esp, 0x7c
ret
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
test ebp, ebp
mov ecx, dword [esp + 0x1c]
je 0x40cd0d
mov eax, ecx
sub eax, ebp
sub edi, ebp
sar eax, 2
sar edi, 2
cmp eax, edi
jae 0x40cd0d
mov eax, ecx
add eax, 4
mov dword [ecx], esi
mov dword [esp + 0x1c], eax
jmp 0x40cd31
cmp ebp, ecx
mov edi, ecx
jbe 0x40cd18
call fcn.00422e1b
push edi
lea eax, [esp + 0x18]
push eax
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x64]
push eax
lea eax, [esp + 0x24]
call fcn.0040e470
mov eax, dword [esp + 0x28]
cmp dword [eax + 0x18], 8
mov ebx, dword [eax + 0x14]
mov edi, esi
jb 0x40cd48
mov ecx, dword [eax + 4]
add eax, 4
jmp 0x40cd4b
lea ecx, [eax + 4]
mov edx, dword [esp + 0x30]
lea eax, [esi + edx]
mov edx, dword [esp + 0x2c]
push ecx
call fcn.0040e1d0
mov esi, eax
cmp esi, edi
mov dword [esp + 0x24], esi
jge 0x40cce0
mov edx, dword [esp + 0x18]
xor edi, edi
cmp edx, edi
je 0x40ccb7
mov ecx, dword [esp + 0x1c]
mov eax, ecx
sub eax, edx
sar eax, 2
jne 0x40cd93
push edx
call fcn.00412b03
add esp, 4
jmp 0x40ccb7
xor ebx, ebx
cmp edx, edi
mov dword [esp + 0x24], ebx
jne 0x40cda1
xor eax, eax
jmp 0x40cda8
mov eax, ecx
sub eax, edx
sar eax, 2
cmp ebx, eax
jg 0x40cf81
push edi
push 0x4463fc
lea esi, [esp + 0x68]
mov dword [esp + 0x80], 7
mov dword [esp + 0x7c], edi
mov word [esp + 0x6c], di
call fcn.00403a40
cmp ebx, edi
mov byte [esp + 0x8c], 1
jne 0x40ce47
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x40cdf2
mov ecx, dword [esp + 0x1c]
sub ecx, eax
sar ecx, 2
jne 0x40cdfb
call fcn.00422e1b
mov eax, dword [esp + 0x18]
mov edx, dword [eax]
mov eax, dword [esp + 0x2c]
push edx
push eax
xor ecx, ecx
lea esi, [esp + 0x44]
call fcn.0040d5f0
push 0xffffffffffffffff
push edi
lea ecx, [esp + 0x68]
mov byte [esp + 0x94], 2
call fcn.00403ae0
mov byte [esp + 0x8c], 1
cmp dword [esp + 0x54], 8
jb 0x40cf39
mov ecx, dword [esp + 0x40]
push ecx
call fcn.00412b03
add esp, 4
jmp 0x40cf39
mov edx, dword [esp + 0x18]
xor ecx, ecx
cmp ebx, edi
jle 0x40ce75
cmp edx, edi
lea esi, [ebx - 1]
je 0x40ce65
mov eax, dword [esp + 0x1c]
sub eax, edx
sar eax, 2
cmp esi, eax
jb 0x40ce6e
call fcn.00422e1b
mov edx, dword [esp + 0x18]
mov ecx, dword [edx + esi*4]
add ecx, dword [esp + 0x30]
cmp ecx, dword [esp + 0x34]
jae 0x40cf3d
cmp edx, edi
jne 0x40ce87
xor eax, eax
jmp 0x40ce90
mov eax, dword [esp + 0x1c]
sub eax, edx
sar eax, 2
cmp ebx, eax
jne 0x40cec7
mov edx, dword [esp + 0x2c]
push 0xffffffffffffffff
push edx
lea esi, [esp + 0x44]
call fcn.0040d5f0
push 0xffffffffffffffff
push edi
lea ecx, [esp + 0x68]
mov byte [esp + 0x94], 3
call fcn.00403ae0
mov byte [esp + 0x8c], 1
call fcn.004128c0
jmp 0x40cf39
cmp ebx, edi
jle 0x40cf3d
add ebx, 0xffffffff
mov edi, ebx
lea esi, [esp + 0x14]
call fcn.0040de20
mov edi, dword [esp + 0x24]
mov ebp, eax
call fcn.0040de20
mov edi, ebx
mov dword [esp + 0x28], eax
call fcn.0040de20
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx]
sub ecx, dword [ebp]
mov edx, dword [esp + 0x30]
sub ecx, edx
push ecx
mov ecx, dword [eax]
add ecx, edx
mov edx, dword [esp + 0x30]
push edx
lea esi, [esp + 0x44]
call fcn.0040d5f0
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x68]
mov byte [esp + 0x94], 4
call fcn.00403ae0
mov byte [esp + 0x8c], 1
call fcn.004128c0
mov ebx, dword [esp + 0x24]
xor edi, edi
mov edx, dword [esp + 0x18]
cmp dword [esp + 0x74], edi
jbe 0x40cf55
mov esi, dword [esp + 0x38]
lea eax, [esp + 0x60]
push eax
call fcn.0040d690
mov edx, dword [esp + 0x18]
mov byte [esp + 0x8c], 0
cmp dword [esp + 0x78], 8
jb 0x40cf75
mov ecx, dword [esp + 0x64]
push ecx
call fcn.00412b03
mov edx, dword [esp + 0x1c]
add esp, 4
mov ecx, dword [esp + 0x1c]
add ebx, 1
jmp 0x40cd95
cmp edx, edi
jne 0x40cf8e
xor esi, esi
mov eax, esi
jmp 0x40ccb9
sub ecx, edx
sar ecx, 2
push edx
mov esi, ecx
call fcn.00412b03
add esp, 4
mov eax, esi
jmp 0x40ccb9