Function at 0x4aac70
Capabilities:
Access peb ldr_data
Check for peb ntglobalflag flag
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x731058
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
mov ebx, ecx
xor eax, eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], 0
push esi
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0
push edi
mov dword [ebx + 0x20], 0
mov dword [ebx + 0x24], 7
mov word [ebx + 0x10], ax
mov dword [ebx + 0x28], eax
mov dword [ebp - 4], eax
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x3c], 7
mov word [ebx + 0x28], ax
lea eax, [ebx + 0x40]
push 2
push eax
call fcn.006de93d
add esp, 8
lea esi, [ebx + 0x70]
mov dword [esi], 0x74e968
mov dword [ebp - 0x1c], esi
mov dword [esi + 0x70], 0
mov dword [esi + 0x90], 0
mov dword [esi + 0x94], 0
mov dword [esi + 0x98], 0
mov dword [esi + 0x68], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
mov eax, dword [esi]
lea ebx, [esi + 4]
push 0
push ebx
mov byte [ebp - 4], 3
mov eax, dword [eax + 4]
mov dword [ebp - 0x18], 1
mov dword [ebp - 0x10], ebx
mov dword [esi + eax], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [esi]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ecx + esi - 4], eax
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
call fcn.00497790
mov eax, dword [esi]
mov dword [ebp - 4], 5
mov dword [ebp - 0x20], ebx
mov eax, dword [eax + 4]
mov dword [esi + eax], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [esi]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ecx + esi - 4], eax
mov ecx, ebx
call fcn.00494000
lea eax, [esi + 4]
lea ebx, [eax + 4]
mov dword [eax], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
lea esi, [eax + 8]
mov dword [eax + 0xc], ebx
lea edi, [eax + 0x14]
mov byte [eax + 0x48], 0
lea ecx, [eax + 0x18]
mov byte [eax + 0x3d], 0
lea edx, [eax + 0x24]
mov dword [ebp - 0x18], ebx
mov ebx, dword [ebp - 0x10]
mov dword [eax + 0x10], esi
mov dword [eax + 0x1c], edi
mov dword [eax + 0x20], ecx
mov dword [eax + 0x2c], edx
add eax, 0x28
mov dword [ebx + 0x30], eax
mov ebx, dword [ebp - 0x18]
mov dword [esi], 0
mov dword [ecx], 0
mov dword [eax], 0
mov dword [ebx], 0
mov dword [edi], 0
mov dword [edx], 0
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x4c], 0
mov eax, dword [0x8f2ea8]
mov ecx, dword [0x8f2eac]
mov dword [edx + 0x40], eax
mov dword [edx + 0x44], ecx
mov dword [edx + 0x38], 0
mov eax, dword fs:[0x2c]
mov ecx, dword [0x1551db0]
pop edi
pop esi
mov byte [ebp - 4], 6
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x8f2ef4]
pop ebx
cmp eax, dword [ecx + 0x78c]
jg 0x4aae5a
mov ecx, dword [0x8f2ef0]
push 0
mov eax, dword [ecx]
mov eax, dword [eax]
cmp eax, fcn.004ad350
jne 0x4aae3f
call fcn.004ad350
jmp 0x4aae41
call eax
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 0x120], eax
mov eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push 0x8f2ef4
call fcn.006f2701
add esp, 4
cmp dword [0x8f2ef4], 0xffffffff
jne 0x4aae25
push 0x102
push 0x8f2eb8
mov dword [0x8f2eb4], 0x74e7cc
call fcn.006de93d
push 0x8f2ef4
mov dword [0x8f2ee8], 0
mov dword [0x8f2eec], 0
mov dword [0x8f2eb4], 0x74ee94
mov dword [0x8f2d70], 0x8f2eb4
mov dword [0x8f2ef0], 0x8f2eb4
call fcn.006f26b7
add esp, 0xc
jmp 0x4aae25