Function at 0x401060
Capabilities:
Execute command

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x40355a
mov eax, dword fs:[0]
push eax
sub esp, 0x46c
mov eax, dword [0x406018]
xor eax, esp
mov dword [esp + 0x434], eax
push esi
push edi
mov eax, dword [0x406018]
xor eax, esp
push eax
lea eax, [esp + 0x478]
mov dword fs:[0], eax
lea eax, [esp + 0x44]
push eax
call fcn.00401380
mov dword [esp + 0x480], 0
fldz
lea esi, [esp + 0x54]
fstp qword [esp + 0x3c]
or edi, 0xffffffff
call fcn.00402000
push 0
test eax, eax
jne 0x4010e1
mov ecx, dword [esp + 0x48]
mov ecx, dword [ecx + 4]
push 2
lea ecx, [esp + ecx + 0x4c]
call dword [sym.imp.MSVCP100.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
jmp 0x4010f4
mov edx, dword [esp + 0x48]
mov ecx, dword [edx + 4]
push 0
lea ecx, [esp + ecx + 0x4c]
call dword [sym.imp.MSVCP100.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool_]
mov eax, dword [esp + 0x44]
mov ecx, dword [eax + 4]
mov eax, dword [esp + ecx + 0x50]
test al, 6
je 0x401224
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x48]
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::operator___int__]
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov edx, dword [ecx + eax + 0xc]
add ecx, eax
and dl, 6
movsx eax, dl
neg eax
sbb eax, eax
not eax
test ecx, eax
je 0x401170
cmp edi, 0xd2
jge 0x401170
fild dword [esp + 0x34]
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x48]
fadd qword [esp + 0x40]
inc edi
fstp qword [esp + 0x40]
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::operator___int__]
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov edx, dword [ecx + eax + 0xc]
add ecx, eax
and dl, 6
movsx eax, dl
neg eax
sbb eax, eax
not eax
test ecx, eax
jne 0x401131
lea ecx, [esp + 0x44]
push ecx
call fcn.00401440
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push edx
push ecx
lea eax, [edi + 1]
push str.__numbers
push eax
mov dword [esp + 0x48], eax
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push str.The_file_contains:__
push eax
call fcn.00402580
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push eax
call fcn.00402580
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
fld qword [esp + 0x3c]
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push ecx
sub esp, 0xc
fstp qword [esp + 4]
push str.The_sum_of_all_numbers_is:
push edx
call fcn.00402580
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___double_]
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
fild dword [esp + 0x38]
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
fdivr qword [esp + 0x3c]
push eax
sub esp, 0xc
fstp qword [esp + 4]
push str.The_average_is:
push ecx
call fcn.00402580
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___double_]
jmp 0x40123f
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push edx
push ecx
push str.Couldnt_open_random.txt
push eax
call fcn.00402580
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push str.pause
call dword [sym.imp.MSVCR100.dll_system]
mov edx, dword [esp + 0x48]
mov eax, dword [edx + 4]
lea ecx, [esp + 0xb0]
add esp, 4
mov dword [esp + 0x38], ecx
mov dword [esp + eax + 0x44], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
lea ecx, [esp + 0x54]
mov dword [esp + 0x480], 1
call fcn.004014c0
mov dword [esp + 0x480], 0xffffffff
mov ecx, dword [esp + 0x44]
mov edx, dword [ecx + 4]
mov eax, dword [sym.imp.MSVCP100.dll_const_std::basic_istream_char__struct_std::char_traits_char__::vftable]
lea ecx, [esp + 0xac]
mov dword [esp + edx + 0x44], eax
call dword [sym.imp.MSVCP100.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
xor eax, eax
mov ecx, dword [esp + 0x478]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x434]
xor ecx, esp
call fcn.00402990
mov esp, ebp
pop ebp
ret