Function at 0x40b430
Capabilities:
Access peb ldr_data
Get ntdll base address
Get number of processors
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48af2c
mov eax, dword fs:[0]
push eax
mov eax, 0x10308
call fcn.0045d8d0
mov eax, dword [0x4b37a0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [esi + 0x30]
lea edi, [esi + 0x18]
xorps xmm0, xmm0
mov edx, esi
movq qword [ebp - 0x10228], xmm0
lea eax, [ecx + 0xc]
push eax
push ecx
push edi
lea ecx, [ebp - 0x10228]
call fcn.0040da20
add esp, 0xc
xorps xmm0, xmm0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x10230]
movq qword [ebp - 0x10230], xmm0
call fcn.0040dab0
lea eax, [ebp - 0x10230]
mov byte [ebp - 4], 1
xorps xmm0, xmm0
lea edx, [ebp - 0x10228]
push eax
lea ecx, [ebp - 0x10220]
movq qword [ebp - 0x10220], xmm0
call fcn.0040db40
add esp, 4
mov byte [ebp - 4], 2
mov edx, 9
mov al, byte [0x4ba894]
movzx ecx, al
test al, al
mov al, byte [0x4ba893]
mov byte [ebp - 0x102f2], al
cmove ecx, edx
mov al, byte [0x4ba892]
mov byte [ebp - 0x102f3], al
mov al, byte [0x4ba891]
mov byte [ebp - 0x102f4], al
mov al, byte [0x4ba890]
mov byte [ebp - 0x102f1], al
mov eax, dword [ebp - 0x10220]
mov dword [ebp - 0x10314], ecx
mov dword [ebp - 0x102f8], eax
mov ecx, dword [eax]
call fcn.00415050
test eax, eax
je 0x40b5a6
mov ecx, dword [ebp - 0x102f8]
xorps xmm0, xmm0
movdqu xmmword [ebp - 0x102e8], xmm0
push 0
push 0
mov eax, dword [ecx + 8]
mov byte [ebp - 0x102e7], 0x81
mov al, byte [eax]
and al, 0xf
or al, 0xc0
mov byte [ebp - 0x102e8], al
mov eax, dword [ebp - 0x10314]
mov byte [ebp - 0x102e6], al
mov al, byte [ebp - 0x102f2]
mov byte [ebp - 0x102e5], al
mov al, byte [ebp - 0x102f3]
mov byte [ebp - 0x102e4], al
mov al, byte [ebp - 0x102f4]
mov byte [ebp - 0x102e3], al
mov al, byte [ebp - 0x102f1]
mov byte [ebp - 0x102e2], al
lea eax, [ebp - 0x102e8]
push eax
push ecx
mov ecx, dword [ecx]
call fcn.004154a0
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x218]
push 0x5c
push eax
call fcn.0045910f
xor ecx, ecx
add esp, 8
mov word [eax], cx
lea ecx, [ebp - 0x218]
add ecx, 0xfffffffe
lea esp, [esp]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40b5e0
mov eax, dword [str._read.bin]
mov dword [ecx], eax
mov eax, dword [0x4a57fc]
mov dword [ecx + 4], eax
mov eax, dword [0x4a5800]
mov dword [ecx + 8], eax
mov eax, dword [0x4a5804]
mov dword [ecx + 0xc], eax
mov eax, dword [0x4a5808]
push 0xa8
mov dword [ecx + 0x10], eax
lea eax, [ebp - 0x102d8]
push 0
push eax
call fcn.0045a730
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x102d8]
call fcn.0040d030
mov byte [ebp - 4], 3
cmp dword [ebp - 0x10284], 0
je 0x40ba45
xor eax, eax
mov dword [ebp - 0x102dc], 7
push 0xffffffffffffffff
push eax
push edi
lea ecx, [ebp - 0x102f0]
mov dword [ebp - 0x102e0], 0
mov word [ebp - 0x102f0], ax
call fcn.00406490
cmp dword [ebp - 0x102e0], 0
mov eax, dword [esi + 0x30]
mov ecx, dword [eax + 0x34]
je 0x40b6ad
cmp dword [ebp - 0x102dc], 8
lea eax, [ebp - 0x102f0]
push 0
cmovae eax, dword [ebp - 0x102f0]
movzx eax, word [eax]
push eax
push dword [ecx + 0x5d0]
push dword [ecx + 4]
call dword [sym.imp.USER32.dll_PostMessageW]
cmp dword [ebp - 0x102dc], 8
jb 0x40b6c4
push dword [ebp - 0x102f0]
call fcn.00455fa6
add esp, 4
xor edx, edx
mov dword [ebp - 0x102f8], edx
lea esp, [esp]
mov ecx, dword [ebp - 0x10220]
xorps xmm0, xmm0
movdqu xmmword [ebp - 0x102e8], xmm0
mov dword [ebp - 0x102e7], 0x1000007
mov byte [ebp - 0x102e3], 0
mov eax, dword [ecx + 8]
mov byte [ebp - 0x102e2], dl
mov al, byte [eax]
and al, 0xf
or al, 0xc0
mov byte [ebp - 0x102e8], al
mov eax, edx
shr eax, 8
mov byte [ebp - 0x102e1], al
mov eax, edx
shr eax, 0x10
mov byte [ebp - 0x102e0], al
mov eax, edx
shr eax, 0x18
mov byte [ebp - 0x102df], al
lea eax, [ebp - 0x10218]
push eax
push 0x10000
lea eax, [ebp - 0x102e8]
push eax
push ecx
mov ecx, dword [ecx]
call fcn.004153d0
push 0xffffffffffffffff
push 0
push edi
test al, al
je 0x40b912
xor eax, eax
mov dword [ebp - 0x102dc], 7
lea ecx, [ebp - 0x102f0]
mov dword [ebp - 0x102e0], 0
mov word [ebp - 0x102f0], ax
call fcn.00406490
cmp dword [ebp - 0x102e0], 0
mov eax, dword [esi + 0x30]
mov ecx, dword [eax + 0x34]
je 0x40b7b0
cmp dword [ebp - 0x102dc], 8
lea eax, [ebp - 0x102f0]
push 0
cmovae eax, dword [ebp - 0x102f0]
movzx eax, word [eax]
push eax
push dword [ecx + 0x5cc]
push dword [ecx + 4]
call dword [sym.imp.USER32.dll_PostMessageW]
cmp dword [ebp - 0x102dc], 8
jb 0x40b7c7
push dword [ebp - 0x102f0]
call fcn.00455fa6
add esp, 4
push 0
push 0x10000
lea eax, [ebp - 0x10218]
push eax
lea ecx, [ebp - 0x102d8]
call fcn.0040cc60
mov edx, dword [ebp - 0x102f8]
add edx, 0x10000
mov dword [ebp - 0x102f8], edx
cmp edx, 0x100000
jl 0x40b6d0
xor eax, eax
mov dword [ebp - 0x102dc], 7
push 0xffffffffffffffff
push eax
push edi
lea ecx, [ebp - 0x102f0]
mov dword [ebp - 0x102e0], 0
mov word [ebp - 0x102f0], ax
call fcn.00406490
cmp dword [ebp - 0x102e0], 0
mov eax, dword [esi + 0x30]
mov ecx, dword [eax + 0x34]
je 0x40b862
cmp dword [ebp - 0x102dc], 8
lea eax, [ebp - 0x102f0]
push 0x64
cmovae eax, dword [ebp - 0x102f0]
movzx eax, word [eax]
push eax
push dword [ecx + 0x5cc]
push dword [ecx + 4]
call dword [sym.imp.USER32.dll_PostMessageW]
cmp dword [ebp - 0x102dc], 8
jb 0x40b879
push dword [ebp - 0x102f0]
call fcn.00455fa6
add esp, 4
xor eax, eax
mov dword [ebp - 0x102dc], 7
push 0xffffffffffffffff
push eax
push edi
lea ecx, [ebp - 0x102f0]
mov dword [ebp - 0x102e0], 0
mov word [ebp - 0x102f0], ax
call fcn.00406490
cmp dword [ebp - 0x102e0], 0
mov eax, dword [esi + 0x30]
mov ecx, dword [eax + 0x34]
je 0x40b8dd
cmp dword [ebp - 0x102dc], 8
lea eax, [ebp - 0x102f0]
push 1
cmovae eax, dword [ebp - 0x102f0]
movzx eax, word [eax]
push eax
push dword [ecx + 0x5d0]
push dword [ecx + 4]
call dword [sym.imp.USER32.dll_PostMessageW]
cmp dword [ebp - 0x102dc], 8
jb 0x40b8f4
push dword [ebp - 0x102f0]
call fcn.00455fa6
add esp, 4
xor eax, eax
mov dword [ebp - 0x102dc], 7
mov word [ebp - 0x102f0], ax
mov dword [ebp - 0x102e0], eax
jmp 0x40ba04
xor eax, eax
mov dword [ebp - 0x102fc], 7
lea ecx, [ebp - 0x10310]
mov dword [ebp - 0x10300], 0
mov word [ebp - 0x10310], ax
call fcn.00406490
cmp dword [ebp - 0x10300], 0
mov eax, dword [esi + 0x30]
mov ecx, dword [eax + 0x34]
je 0x40b972
cmp dword [ebp - 0x102fc], 8
lea eax, [ebp - 0x10310]
push 0x64
cmovae eax, dword [ebp - 0x10310]
movzx eax, word [eax]
push eax
push dword [ecx + 0x5cc]
push dword [ecx + 4]
call dword [sym.imp.USER32.dll_PostMessageW]
cmp dword [ebp - 0x102fc], 8
jb 0x40b989
push dword [ebp - 0x10310]
call fcn.00455fa6
add esp, 4
xor eax, eax
mov dword [ebp - 0x102fc], 7
push 0xffffffffffffffff
push eax
push edi
lea ecx, [ebp - 0x10310]
mov dword [ebp - 0x10300], 0
mov word [ebp - 0x10310], ax
call fcn.00406490
cmp dword [ebp - 0x10300], 0
mov eax, dword [esi + 0x30]
mov ecx, dword [eax + 0x34]
je 0x40b9ed
cmp dword [ebp - 0x102fc], 8
lea eax, [ebp - 0x10310]
push 2
cmovae eax, dword [ebp - 0x10310]
movzx eax, word [eax]
push eax
push dword [ecx + 0x5d0]
push dword [ecx + 4]
call dword [sym.imp.USER32.dll_PostMessageW]
cmp dword [ebp - 0x102fc], 8
jb 0x40ba04
push dword [ebp - 0x10310]
call fcn.00455fa6
add esp, 4
lea ecx, [ebp - 0x102d4]
call fcn.00403d20
test eax, eax
jne 0x40ba45
mov eax, dword [ebp - 0x102d8]
lea ecx, [ebp - 0x102d8]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x40ba33
or eax, 4
and eax, 0x17
test dword [ecx + 0x10], eax
mov dword [ecx + 0xc], eax
je 0x40ba45
push 0
call fcn.00406020
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x102d8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x102d8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x60]
mov dword [ebp + ecx - 0x102dc], eax
cmp dword [ebp - 0x10284], 0
mov dword [ebp - method.std::basic_filebuf_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
je 0x40bab3
mov eax, dword [ebp - 0x102c8]
lea ecx, [ebp - 0x10290]
cmp dword [eax], ecx
jne 0x40bab3
mov edx, dword [ebp - 0x10298]
mov ecx, dword [ebp - 0x1029c]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebp - 0x102b8]
mov dword [eax], ecx
mov eax, dword [ebp - 0x102a8]
mov dword [eax], edx
cmp byte [ebp - 0x10288], 0
je 0x40bac7
lea ecx, [ebp - 0x102d4]
call fcn.00403d20
mov esi, dword [ebp - 0x102a0]
mov dword [ebp - method.std::basic_streambuf_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
test esi, esi
je 0x40bafd
mov ecx, dword [esi]
test ecx, ecx
je 0x40baf4
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
test eax, eax
je 0x40baf4
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
push esi
call fcn.00455fa6
add esp, 4
mov eax, dword [ebp - 0x102d8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x102d8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x102dc], eax
lea eax, [ebp - 0x10278]
push eax
mov dword [ebp - method.std::basic_ios_char__struct_std::char_traits_char__.virtual_0], vtable.std::ios_base.0
call fcn.00456219
mov byte [ebp - 4], 1
add esp, 4
mov edi, dword [ebp - 0x1021c]
or esi, 0xffffffff
test edi, edi
je 0x40bb71
lea eax, [edi + 4]
mov ecx, esi
lock xadd dword [eax], ecx
jne 0x40bb71
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lea eax, [edi + 8]
mov edx, esi
lock xadd dword [eax], edx
jne 0x40bb71
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov byte [ebp - 4], 0
mov edi, dword [ebp - 0x1022c]
test edi, edi
je 0x40bba2
lea eax, [edi + 4]
mov ecx, esi
lock xadd dword [eax], ecx
jne 0x40bba2
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lea eax, [edi + 8]
mov edx, esi
lock xadd dword [eax], edx
jne 0x40bba2
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp - 0x10224]
test edi, edi
je 0x40bbd5
lea eax, [edi + 4]
mov ecx, esi
lock xadd dword [eax], ecx
jne 0x40bbd5
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lea eax, [edi + 8]
lock xadd dword [eax], esi
dec esi
jne 0x40bbd5
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045755a
mov esp, ebp
pop ebp
ret