Function at 0x4bfe60
Capabilities:
Check for peb ntglobalflag flag

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x533348
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x56d940]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push esi
push edi
mov eax, dword [0x56d940]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x20]
mov dword [esp + 0x3c], ecx
mov ecx, dword [ebp + 0x18]
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x30], ecx
call fcn.00406170
xor edi, edi
push eax
mov dword [esp + 0x8c], edi
call fcn.004c0c20
mov ebx, eax
add esp, 4
lea ecx, [esp + 0x30]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x88], 0xffffffff
call fcn.00405a80
lea eax, [esp + 0x5c]
push eax
mov ecx, ebx
call fcn.004c0af0
mov dword [esp + 0x88], 1
mov edx, dword [ebx]
mov eax, dword [edx + 8]
mov ecx, ebx
call eax
lea ecx, [esp + 0x40]
mov byte [esp + 0x38], al
call fcn.00406370
mov byte [esp + 0x88], 2
mov al, byte [esi]
cmp al, 0x2b
je 0x4bff2b
mov dword [esp + 0x24], edi
cmp al, 0x2d
jne 0x4bff33
mov dword [esp + 0x24], 1
call fcn.005036bd
mov ecx, dword [eax]
mov ebx, dword [ebp + 0x30]
mov dl, byte [ecx]
push ebx
push 0x65
push esi
mov byte [esp + 0x2c], dl
mov byte [esp + 0x2d], 0x65
mov byte [esp + 0x2e], 0
call fcn.00503610
add esp, 0xc
mov edi, eax
movsx eax, byte [esp + 0x20]
push ebx
push eax
push esi
call fcn.00503610
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4bff76
mov dword [ebp + 0x2c], eax
lea ecx, [esp + 0x5c]
call fcn.004014b0
cmp byte [eax], 0x7f
je 0x4c0121
lea ecx, [esp + 0x5c]
call fcn.004014b0
cmp byte [eax], 0
jle 0x4c0121
push ebx
push esi
lea ecx, [esp + 0x48]
call fcn.0042b3c0
test edi, edi
jne 0x4bffbe
mov ecx, dword [ebp + 0x2c]
push 0x30
push ecx
lea ecx, [esp + 0x48]
call fcn.00406640
mov ebx, dword [esp + 0x18]
jmp 0x4bffea
mov ebx, dword [esp + 0x18]
test ebx, ebx
jne 0x4bffd8
mov edx, dword [ebp + 0x24]
push 0x30
push edx
lea ecx, [esp + 0x48]
call fcn.00406640
mov dword [ebp + 0x24], ebx
mov eax, dword [ebp + 0x2c]
push 0x30
push eax
sub edi, esi
push edi
lea ecx, [esp + 0x4c]
call fcn.004c08e0
push 0x30
test ebx, ebx
jne 0x4bffff
mov ecx, dword [ebp + 0x24]
push ecx
lea ecx, [esp + 0x48]
call fcn.00406640
jmp 0x4c0029
mov edx, dword [ebp + 0x28]
sub ebx, esi
push edx
lea eax, [ebx + 1]
push eax
lea ecx, [esp + 0x4c]
call fcn.004c08e0
mov ecx, dword [ebp + 0x24]
push 0x30
push ecx
push ebx
lea ecx, [esp + 0x4c]
call fcn.004c08e0
mov dword [ebp + 0x28], 0
lea ecx, [esp + 0x5c]
mov dword [ebp + 0x24], 0
call fcn.004014b0
lea ecx, [esp + 0x40]
mov edi, eax
call fcn.004016f0
lea edx, [esp + 0x20]
push edx
push eax
call fcn.005036f0
mov esi, eax
mov al, byte [edi]
add esp, 8
cmp al, 0x7f
je 0x4c0104
test al, al
jle 0x4c0104
mov ecx, esi
sub ecx, dword [esp + 0x24]
movsx eax, al
cmp eax, ecx
jae 0x4c0104
sub esi, eax
cmp dword [esp + 0x54], esi
jae 0x4c0084
call fcn.0051e8a0
or edx, 0xffffffff
sub edx, dword [esp + 0x54]
cmp edx, 1
ja 0x4c0095
call fcn.0051e868
mov ebx, dword [esp + 0x54]
push 0
inc ebx
push ebx
lea ecx, [esp + 0x48]
call fcn.00401990
test al, al
je 0x4c00f3
mov eax, dword [esp + 0x54]
sub eax, esi
push eax
lea ecx, [esp + 0x44]
call fcn.004016f0
mov ecx, dword [esp + 0x5c]
sub ecx, esi
add eax, esi
dec ecx
push eax
push ecx
lea ecx, [esp + 0x4c]
call fcn.004016f0
lea edx, [eax + esi + 1]
push edx
call fcn.004022b0
add esp, 0x10
push 0
push 1
push esi
lea ecx, [esp + 0x4c]
call fcn.00406c80
push ebx
lea ecx, [esp + 0x44]
call fcn.00401950
cmp byte [edi + 1], 0
jle 0x4c00fa
inc edi
mov al, byte [edi]
cmp al, 0x7f
jne 0x4c005e
lea ecx, [esp + 0x40]
call fcn.004016f0
lea ecx, [esp + 0x40]
mov esi, eax
mov dword [ebp + 0x2c], 0
call fcn.00402000
mov ebx, eax
mov ecx, dword [ebp + 0x28]
mov eax, dword [ebp + 0x24]
mov edx, dword [esp + 0x2c]
add eax, ecx
add eax, dword [ebp + 0x2c]
mov ecx, dword [edx + 0x18]
xor edi, edi
add eax, ebx
cmp ecx, edi
jle 0x4c0147
cmp ecx, eax
jbe 0x4c0147
sub ecx, eax
mov dword [esp + 0x18], ecx
jmp 0x4c014b
mov dword [esp + 0x18], edi
mov ecx, edx
call fcn.00406150
and eax, 0x1c0
cmp eax, 0x40
je 0x4c01f7
cmp eax, 0x100
je 0x4c0194
mov edx, dword [esp + 0x18]
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x14]
push edx
mov edx, dword [ebp + 0x10]
push eax
push ecx
mov ecx, dword [esp + 0x28]
push edx
lea eax, [esp + 0x34]
push eax
push ecx
call fcn.004c0790
mov edx, dword [eax]
mov dword [ebp + 0x10], edx
mov eax, dword [eax + 4]
mov dword [ebp + 0x14], eax
jmp 0x4c01f0
cmp dword [esp + 0x24], edi
jbe 0x4c01c5
mov ecx, dword [ebp + 0x10]
movzx eax, byte [esi]
mov edx, dword [ebp + 0x14]
mov dword [esp + 0x24], ecx
push eax
lea ecx, [esp + 0x28]
mov dword [esp + 0x2c], edx
call fcn.004c0a60
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
inc esi
mov dword [ebp + 0x10], ecx
mov dword [ebp + 0x14], edx
dec ebx
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push ecx
push edx
mov edx, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x34]
push ecx
push edx
call fcn.004c0790
mov ecx, dword [eax]
mov dword [ebp + 0x10], ecx
mov edx, dword [eax + 4]
mov dword [ebp + 0x14], edx
mov dword [esp + 0x30], edi
add esp, 0x18
movsx eax, byte [esp + 0x20]
push ebx
push eax
push esi
call fcn.00503610
add esp, 0xc
cmp eax, edi
je 0x4c02d1
mov ecx, dword [esp + 0x38]
sub eax, esi
inc eax
push ecx
mov ecx, dword [ebp + 0x10]
mov edi, eax
mov eax, dword [ebp + 0x14]
lea edx, [edi - 1]
push edx
push esi
push eax
mov eax, dword [esp + 0x2c]
push ecx
lea edx, [esp + 0x38]
push edx
push eax
call fcn.004c09b0
mov ecx, dword [eax]
mov dword [ebp + 0x10], ecx
mov edx, dword [eax + 4]
mov ecx, dword [ebp + 0x24]
add esp, 0x1c
push ecx
mov dword [ebp + 0x14], edx
mov edx, dword [eax + 4]
mov eax, dword [eax]
push 0x30
push edx
mov edx, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x34]
push ecx
push edx
call fcn.004c0790
mov ecx, dword [eax]
mov dword [ebp + 0x10], ecx
mov edx, dword [eax + 4]
mov ecx, dword [esp + 0x28]
mov dword [ebp + 0x14], edx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
add esp, 0x18
call edx
mov ecx, dword [ebp + 0x14]
mov byte [esp + 0x10], al
mov edx, dword [esp + 0x10]
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x34], ecx
push edx
lea ecx, [esp + 0x34]
mov dword [esp + 0x34], eax
call fcn.004c0a60
mov edx, dword [ebp + 0x28]
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
push edx
push 0x30
push ecx
push eax
mov dword [ebp + 0x10], eax
lea eax, [esp + 0x20]
mov dword [ebp + 0x14], ecx
mov ecx, dword [esp + 0x2c]
push eax
push ecx
call fcn.004c0790
mov edx, dword [eax]
mov dword [ebp + 0x10], edx
mov eax, dword [eax + 4]
add esp, 0x18
add esi, edi
sub ebx, edi
mov dword [ebp + 0x14], eax
xor edi, edi
push ebx
push 0x65
push esi
call fcn.00503610
add esp, 0xc
cmp eax, edi
je 0x4c0390
mov ecx, dword [esp + 0x38]
sub eax, esi
inc eax
push ecx
mov ecx, dword [ebp + 0x10]
mov edi, eax
mov eax, dword [ebp + 0x14]
lea edx, [edi - 1]
push edx
push esi
push eax
mov eax, dword [esp + 0x2c]
push ecx
lea edx, [esp + 0x24]
push edx
push eax
call fcn.004c09b0
mov ecx, dword [eax]
mov dword [ebp + 0x10], ecx
mov edx, dword [eax + 4]
mov ecx, dword [ebp + 0x2c]
add esp, 0x1c
push ecx
mov dword [ebp + 0x14], edx
mov edx, dword [eax + 4]
mov eax, dword [eax]
push 0x30
push edx
mov edx, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x20]
push ecx
push edx
call fcn.004c0790
mov ecx, dword [eax]
mov dword [ebp + 0x10], ecx
mov edx, dword [eax + 4]
mov ecx, dword [esp + 0x44]
add esp, 0x18
mov dword [ebp + 0x14], edx
mov dword [ebp + 0x2c], 0
call fcn.00406150
test al, 4
mov eax, 0x557990
jne 0x4c0361
mov eax, 0x557994
mov ecx, dword [ebp + 0x10]
movzx eax, byte [eax]
mov edx, dword [ebp + 0x14]
mov dword [esp + 0x10], ecx
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], edx
call fcn.004c0a60
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
add esi, edi
sub ebx, edi
mov dword [ebp + 0x10], ecx
mov dword [ebp + 0x14], edx
xor edi, edi
mov eax, dword [esp + 0x38]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
push eax
push ebx
push esi
push ecx
mov ecx, dword [esp + 0x2c]
push edx
lea eax, [esp + 0x44]
push eax
push ecx
call fcn.004c09b0
mov edx, dword [eax]
mov esi, dword [ebp + 0x2c]
mov dword [ebp + 0x10], edx
mov ecx, dword [eax + 4]
mov dword [ebp + 0x14], ecx
mov ecx, dword [eax]
mov eax, dword [eax + 4]
add esp, 0x1c
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
cmp esi, edi
jbe 0x4c03e8
push 0x30
lea ecx, [esp + 0x14]
call fcn.004c0a60
sub esi, 1
jne 0x4c03d0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x2c]
mov dword [ebp + 0x10], ecx
mov dword [ebp + 0x14], eax
mov dword [edx + 0x18], edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
cmp esi, edi
jbe 0x4c0417
mov eax, dword [ebp + 0x1c]
push eax
lea ecx, [esp + 0x14]
call fcn.004c0a60
sub esi, 1
jne 0x4c0405
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov dword [esi], ecx
lea ecx, [esp + 0x40]
mov dword [esi + 4], edx
call fcn.00401490
lea ecx, [esp + 0x5c]
call fcn.00401490
mov eax, esi
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.005007b7
mov esp, ebp
pop ebp
ret