Function at 0x405220
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41f31f
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x42a080]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ebx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], 0
mov dword [ebx], 0x4271d8
mov dword [ebp - 0x18], eax
mov dword [ebx + 0x70], 0
mov dword [ebx + 0x74], 0
mov dword [ebx + 0x78], 0
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x80], 0
mov dword [ebx + 0x84], 0
mov dword [ebx + 0x88], 0
mov dword [ebx + 0x8c], 0
mov dword [ebx + 0x90], 0
mov dword [ebx + 0x94], 0
mov dword [ebx + 0x98], 0
mov dword [ebx + 0x68], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
mov dword [ebx + 0xa0], 0
mov dword [ebx + 0xa4], 0
mov byte [ebx + 0xa8], 0
mov dword [ebp - 4], 0
lea esi, [ebx + 4]
mov eax, dword [ebx]
mov dword [ebp - 0x2c], 1
mov eax, dword [eax + 4]
mov dword [ebx + eax], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ecx + ebx - 4], eax
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
add ecx, ebx
push ecx
push esi
call fcn.004058f0
mov dword [ebp - 4], 2
lea edi, [esi + 0x28]
mov eax, dword [ebx]
push 8
mov eax, dword [eax + 4]
mov dword [ebx + eax], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x24], esi
lea eax, [ecx - 0x68]
mov dword [ecx + ebx - 4], eax
lea eax, [esi + 4]
mov dword [esi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
mov dword [ebp - 0x14], eax
mov dword [eax], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [edi], 0
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
call fcn.00407831
mov esi, eax
xorps xmm0, xmm0
add esp, 4
movq qword [esi], xmm0
push 1
mov byte [ebp - 4], 3
call fcn.00406ee9
mov ecx, ebx
mov dword [esi + 4], eax
add esp, 4
mov dword [ecx + 0x38], esi
lea ecx, [ecx + 4]
call fcn.004056d0
mov eax, ebx
mov dword [eax + 4], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
lea esi, [eax + 8]
mov byte [eax + 0x4c], 0
mov dword [eax + 0x10], esi
lea ecx, [eax + 0x18]
mov esi, ebx
mov dword [eax + 0x20], ecx
mov byte [eax + 0x41], 0
lea edx, [eax + 0xc]
mov dword [eax + 0x14], edx
lea ebx, [esi + 0x28]
lea eax, [esi + 0x1c]
mov dword [esi + 0x24], eax
mov dword [esi + 0x30], ebx
mov dword [esi + 0x34], edi
mov esi, dword [ebp - 0x14]
mov dword [edx], 0
mov dword [eax], 0
mov eax, dword [0x42bc8c]
mov dword [edi], 0
mov dword [esi], 0
mov dword [ecx], 0
mov ecx, dword [0x42bc90]
mov dword [ebx], 0
mov ebx, dword [ebp - 0x20]
mov dword [ebx + 0x50], 0
mov dword [ebx + 0x44], eax
mov dword [ebx + 0x48], ecx
mov dword [ebx + 0x3c], 0
mov byte [ebp - 4], 4
cmp dword [ebx + 0x50], 0
jne 0x405582
push 0x40
push 0x22
push dword [ebp - 0x18]
call fcn.0040726c
add esp, 0xc
mov dword [ebp - 0x24], eax
test eax, eax
je 0x405582
lea eax, [ebx + 4]
mov dword [ebp - 0x1c], 0
lea ebx, [eax + 4]
mov byte [eax + 0x48], 1
mov dword [eax + 0xc], ebx
lea edi, [eax + 0x14]
mov dword [eax + 0x1c], edi
lea esi, [eax + 8]
mov byte [eax + 0x3d], 0
lea ecx, [eax + 0x18]
mov dword [eax + 0x10], esi
lea edx, [eax + 0x24]
mov dword [eax + 0x20], ecx
mov dword [eax + 0x2c], edx
add eax, 0x28
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x18], 0
mov dword [ebx + 0x34], eax
mov ebx, dword [ebp - 0x14]
mov dword [esi], 0
mov dword [ecx], 0
mov dword [eax], 0
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
mov dword [ebx], 0
push eax
lea eax, [ebp - 0x1c]
mov dword [edi], 0
mov edi, dword [ebp - 0x24]
push eax
push edi
mov dword [edx], 0
mov dword [ebp - 0x14], 0
call fcn.0040cb60
mov esi, dword [ebp - 0x20]
add esp, 0x10
mov eax, dword [ebp - 0x1c]
mov ecx, dword [0x42bc90]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov eax, dword [ebp - 0x18]
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov eax, dword [0x42bc8c]
mov dword [esi + 0x44], eax
mov eax, dword [esi + 0x38]
mov dword [esi + 0x50], edi
mov dword [esi + 0x48], ecx
mov dword [esi + 0x3c], 0
mov ecx, dword [eax + 4]
mov dword [ebp - 0x24], ecx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 5
push eax
call fcn.00405c90
add esp, 4
lea ecx, [esi + 4]
push eax
call fcn.00404fe0
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x40557e
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x40557e
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
mov eax, esi
jmp 0x4055a5
mov eax, dword [ebx]
push 0
mov ecx, dword [eax + 4]
xor eax, eax
add ecx, ebx
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.00401f90
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040781e
mov esp, ebp
pop ebp
ret 0x10