Function at 0x4c9ae0
Capabilities:
Check for peb ntglobalflag flag
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x5fb421
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x667050]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x667050]
xor eax, esp
push eax
lea eax, [esp + 0x84]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x94]
mov esi, ecx
mov ecx, ebx
mov dword [esp + 0x38], ebx
call dword [0x61056c]
xor ebp, ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
push esi
lea ecx, [esp + 0x2c]
mov dword [esp + 0x90], ebp
call fcn.004c99b0
mov ecx, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
add esp, 4
cmp ecx, ebp
jne 0x4c9b5e
mov dword [esp + 0x20], ebp
jmp 0x4c9b79
mov edi, esi
sub edi, ecx
mov eax, 0x92492493
imul edi
add edx, edi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x20], eax
cmp dword [esp + 0x20], ebp
mov dword [esp + 0x18], ebp
jbe 0x4c9d54
mov ebx, dword [0x610650]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x24], ebp
jmp 0x4c9ba0
test ecx, ecx
mov eax, dword [esp + 0x24]
mov ebp, dword [eax + 0x669100]
mov dword [esp + 0x40], ebp
je 0x4c9bcd
sub esi, ecx
mov eax, 0x92492493
imul esi
add edx, esi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x18], eax
jb 0x4c9bd7
call dword [0x6105e8]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x1c]
lea eax, [edx + ecx]
push eax
lea ecx, [esp + 0x64]
call dword [0x610494]
push 0x611348
lea edi, [esp + 0x64]
mov byte [esp + 0x90], 1
call fcn.004ce4c0
add esp, 4
push 0x611348
call fcn.004ce520
add esp, 4
push ebp
lea ecx, [esp + 0x48]
call dword [0x610498]
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x14], eax
cmp ecx, eax
mov dword [esp + 0x3c], ecx
lea eax, [esp + 0x14]
jb 0x4c9c36
lea eax, [esp + 0x3c]
mov esi, dword [esp + 0x48]
mov ecx, 8
cmp dword [esp + 0x5c], ecx
jae 0x4c9c49
lea esi, [esp + 0x48]
cmp dword [esp + 0x78], ecx
mov edi, dword [esp + 0x64]
jae 0x4c9c57
lea edi, [esp + 0x64]
mov ebp, dword [eax]
test ebp, ebp
je 0x4c9cc8
lea ecx, [ecx]
movzx eax, word [esi]
push eax
call ebx
movzx ecx, word [edi]
add esp, 4
push ecx
mov word [esp + 0x18], ax
call ebx
movzx ecx, word [esp + 0x18]
add esp, 4
add esi, 2
cmp ax, cx
jne 0x4c9c9c
mov dx, word [edi]
add edi, 2
test dx, dx
je 0x4c9cc2
sub ebp, 1
je 0x4c9cc2
mov ebx, dword [0x610650]
jmp 0x4c9c60
movzx eax, word [esi - 2]
mov ebx, dword [0x610650]
sub esi, 2
push eax
call ebx
movzx ecx, word [edi]
add esp, 4
push ecx
movzx esi, ax
call ebx
movzx eax, ax
add esp, 4
sub eax, esi
jmp 0x4c9cca
mov ebx, dword [0x610650]
xor eax, eax
test eax, eax
lea ecx, [esp + 0x44]
sete byte [esp + 0x14]
call dword [0x6105a0]
cmp byte [esp + 0x14], 0
je 0x4c9d06
mov esi, dword [esp + 0x38]
cmp dword [esi + 0x14], 0
je 0x4c9cf9
push 0x61228c
mov ecx, esi
call dword [0x610590]
mov edx, dword [esp + 0x40]
push edx
mov ecx, esi
call dword [0x610590]
lea ecx, [esp + 0x60]
mov byte [esp + 0x8c], 0
call dword [0x6105a0]
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
add eax, 4
cmp eax, 0x10
mov dword [esp + 0x24], eax
jb 0x4c9ba0
mov eax, dword [esp + 0x18]
add dword [esp + 0x1c], 0x1c
add eax, 1
xor ebp, ebp
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x18], eax
jb 0x4c9b91
mov ebx, dword [esp + 0x38]
cmp dword [ebx + 0x14], ebp
mov dword [esp + 0x8c], 0xffffffff
sete bl
cmp ecx, ebp
je 0x4c9d8c
cmp ecx, esi
mov edi, ecx
je 0x4c9d83
nop
mov ecx, edi
call dword [0x6105a0]
add edi, 0x1c
cmp edi, esi
jne 0x4c9d70
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.005e6954
add esp, 4
mov al, bl
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.005e693f
add esp, 0x7c
ret