Function at 0x40d9e0
Capabilities:
Check for peb ntglobalflag flag

Disassembly:
push 0xffffffffffffffff
push 0x49e708
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x4c2c40]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4c2c40]
xor eax, esp
push eax
lea eax, [esp + 0x84]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x8c], ebx
push 1
mov edi, 7
push 0x4a9464
lea esi, [esp + 0x1c]
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], ebx
mov word [esp + 0x20], bx
call fcn.00401c20
mov eax, esi
push eax
lea esi, [esp + 0x34]
mov byte [esp + 0x90], 1
call fcn.00401650
mov ebp, 8
mov byte [esp + 0x8c], bl
cmp dword [esp + 0x2c], ebp
jb 0x40da7f
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0045a870
add esp, 4
push 2
push 0x4a9eec
lea esi, [esp + 0x1c]
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], ebx
mov word [esp + 0x20], bx
call fcn.00401c20
mov edx, esi
push edx
lea esi, [esp + 0x34]
mov byte [esp + 0x90], 2
call fcn.00401650
mov byte [esp + 0x8c], bl
cmp dword [esp + 0x2c], ebp
jb 0x40daca
mov eax, dword [esp + 0x18]
push eax
call fcn.0045a870
add esp, 4
push 5
push str.ERROR
lea esi, [esp + 0x1c]
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], ebx
mov word [esp + 0x20], bx
call fcn.00401c20
mov ecx, esi
push ecx
lea esi, [esp + 0x34]
mov byte [esp + 0x90], 3
call fcn.00401650
mov byte [esp + 0x8c], bl
cmp dword [esp + 0x2c], ebp
jb 0x40db15
mov edx, dword [esp + 0x18]
push edx
call fcn.0045a870
add esp, 4
mov ecx, dword [esp + 0x94]
lea edx, [esp + 0x40]
call fcn.00440350
push eax
lea esi, [esp + 0x34]
mov byte [esp + 0x90], 4
call fcn.00401650
cmp dword [esp + 0x58], ebp
jb 0x40db4a
mov eax, dword [esp + 0x44]
push eax
call fcn.0045a870
add esp, 4
mov dword [esp + 0x78], edi
mov dword [esp + 0x74], ebx
mov word [esp + 0x64], bx
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x44]
mov byte [esp + 0x90], 5
call fcn.00431350
add esp, 4
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x68]
mov byte [esp + 0x94], 6
call fcn.00401b70
mov byte [esp + 0x8c], 5
cmp dword [esp + 0x58], ebp
jb 0x40db9f
mov edx, dword [esp + 0x44]
push edx
call fcn.0045a870
add esp, 4
push 9
push str.THROW_MSG
lea esi, [esp + 0x48]
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], ebx
mov word [esp + 0x4c], bx
call fcn.00401c20
mov byte [esp + 0x8c], 7
push 2
push 0x4a947c
lea esi, [esp + 0x1c]
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], ebx
mov word [esp + 0x20], bx
call fcn.00401c20
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x64]
mov edx, esi
mov byte [esp + 0x90], 8
call fcn.004323e0
add esp, 4
cmp dword [esp + 0x2c], ebp
jb 0x40dc0f
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0045a870
add esp, 4
cmp dword [esp + 0x58], ebp
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], ebx
mov word [esp + 0x18], bx
jb 0x40dc2f
mov edx, dword [esp + 0x44]
push edx
call fcn.0045a870
add esp, 4
cmp dword [esp + 0x78], ebp
jb 0x40dc42
mov eax, dword [esp + 0x64]
push eax
call fcn.0045a870
add esp, 4
mov eax, dword [esp + 0x34]
cmp eax, ebx
mov dword [esp + 0x78], edi
mov dword [esp + 0x74], ebx
mov word [esp + 0x64], bx
je 0x40dc75
mov ecx, dword [esp + 0x5c]
mov edi, dword [esp + 0x38]
push ecx
call fcn.00402640
mov edx, dword [esp + 0x38]
add esp, 4
push edx
call fcn.0045a870
add esp, 4
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.00478599
add esp, 0x7c
ret 4