Function at 0x409f08
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rbp
push rsi
push rbx
mov rbp, rsp
sub rsp, 0xc0
mov qword [rbp + 0x20], rcx
mov dword [rbp - 0xc], 0
mov dword [rbp - 0x10], 0
mov dword [rbp - 0x14], 0
lea rdx, [0x004f8e8d]
mov rcx, qword [rbp + 0x20]
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x409f76
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
mov qword [rbp - 8], rax
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__fileno]
call rax
mov edx, 0x8000
mov ecx, eax
mov rax, qword [sym.imp.msvcrt.dll__setmode]
call rax
jmp 0x409fa4
lea rdx, [0x004f8e8f]
mov rcx, qword [rbp + 0x20]
call sub.msvcrt.dll_fopen
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x409fa4
mov rcx, qword [rbp + 0x20]
call sub.msvcrt.dll_perror
mov ecx, 1
call fcn.0040bb92
mov rdx, qword [rbp - 8]
lea rax, [rbp - 0x40]
mov r9, rdx
mov r8d, 1
mov edx, 0x14
mov rcx, rax
call sub.msvcrt.dll_fread
cmp rax, 1
je 0x409ff2
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov r8, qword [rbp + 0x20]
lea rdx, str._s:_file_too_short_to_be_a_gmon_file_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.0040bb92
mov rax, qword [0x00527c60]
mov eax, dword [rax]
cmp eax, 1
je 0x40a032
mov rax, qword [0x00527c60]
mov eax, dword [rax]
test eax, eax
jne 0x40a20d
lea rax, [rbp - 0x40]
mov r8d, 4
lea rdx, str.gmon
mov rcx, rax
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x40a20d
mov rax, qword [0x00527c60]
mov eax, dword [rax]
cmp eax, 1
jne 0x40a094
lea rax, [rbp - 0x40]
mov r8d, 4
lea rdx, str.gmon
mov rcx, rax
call sub.msvcrt.dll_strncmp
test eax, eax
je 0x40a094
mov rax, qword [0x00527ec0]
mov rbx, qword [rax]
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov r9, qword [rbp + 0x20]
mov r8, rbx
lea rdx, str._s:_file___s_has_bad_magic_cookie_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.0040bb92
mov rax, qword [0x00527be0]
mov rax, qword [rax]
mov rax, qword [rax + 8]
mov rax, qword [rax + 0x38]
lea rdx, [rbp - 0x40]
add rdx, 4
mov rcx, rdx
call rax
mov dword [0x0053ccc4], eax
mov eax, dword [0x0053ccc4]
cmp eax, 1
je 0x40a1e0
mov eax, dword [0x0053ccc4]
test eax, eax
je 0x40a1e0
mov ebx, dword [0x0053ccc4]
mov rax, qword [0x00527ec0]
mov rsi, qword [rax]
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov dword [rsp + 0x20], ebx
mov r9, qword [rbp + 0x20]
mov r8, rsi
lea rdx, str._s:_file___s_has_unsupported_version__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.0040bb92
movzx eax, byte [rbp - 0x41]
movzx eax, al
cmp eax, 1
je 0x40a154
cmp eax, 2
je 0x40a179
test eax, eax
jne 0x40a19e
add dword [rbp - 0xc], 1
mov eax, dword [0x0053ccc0]
or eax, 1
mov dword [0x0053ccc0], eax
mov rax, qword [rbp - 8]
mov rdx, qword [rbp + 0x20]
mov rcx, rax
call fcn.0040bed0
jmp 0x40a1e0
add dword [rbp - 0x10], 1
mov eax, dword [0x0053ccc0]
or eax, 2
mov dword [0x0053ccc0], eax
mov rax, qword [rbp - 8]
mov rdx, qword [rbp + 0x20]
mov rcx, rax
call fcn.00402a37
jmp 0x40a1e0
add dword [rbp - 0x14], 1
mov eax, dword [0x0053ccc0]
or eax, 4
mov dword [0x0053ccc0], eax
mov rax, qword [rbp - 8]
mov rdx, qword [rbp + 0x20]
mov rcx, rax
call fcn.004016ef
jmp 0x40a1e0
movzx eax, byte [rbp - 0x41]
movzx ebx, al
mov rax, qword [0x00527ec0]
mov rsi, qword [rax]
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov dword [rsp + 0x20], ebx
mov r9, qword [rbp + 0x20]
mov r8, rsi
lea rdx, str._s:__s:_found_bad_tag__d__file_corrupted___n
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.0040bb92
mov rdx, qword [rbp - 8]
lea rax, [rbp - 0x41]
mov r9, rdx
mov r8d, 1
mov edx, 1
mov rcx, rax
call sub.msvcrt.dll_fread
cmp rax, 1
je 0x40a117
jmp 0x40a884
mov rax, qword [0x00527c60]
mov eax, dword [rax]
test eax, eax
je 0x40a23a
mov rax, qword [0x00527c60]
mov eax, dword [rax]
cmp eax, 2
je 0x40a23a
mov rax, qword [0x00527c60]
mov eax, dword [rax]
cmp eax, 3
jne 0x40a844
mov dword [rbp - 0x1c], 0
mov dword [0x0053ccc0], 3
mov rax, qword [rbp - 8]
mov r8d, 0
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_fseek
test eax, eax
jns 0x40a279
mov rcx, qword [rbp + 0x20]
call sub.msvcrt.dll_perror
mov ecx, 1
call fcn.0040bb92
lea rdx, [rbp - 0x80]
mov rax, qword [rbp - 8]
mov rcx, rax
call fcn.00409b13
test eax, eax
jne 0x40a2bd
lea rax, [rbp - 0x80]
lea rdx, [rax + 8]
mov rax, qword [rbp - 8]
mov rcx, rax
call fcn.00409b13
test eax, eax
jne 0x40a2bd
lea rax, [rbp - 0x80]
lea rdx, [rax + 0x10]
mov rax, qword [rbp - 8]
mov rcx, rax
call fcn.00409a45
test eax, eax
je 0x40a2ee
nop
jmp 0x40a2c4
nop
jmp 0x40a2c4
nop
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov r8, qword [rbp + 0x20]
lea rdx, str._s:_file_too_short_to_be_a_gmon_file_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.0040bb92
lea rdx, [rbp - 0x84]
mov rax, qword [rbp - 8]
mov rcx, rax
call fcn.00409a45
test eax, eax
jne 0x40a2c0
mov eax, dword [rbp - 0x84]
cmp eax, 0x51879
jne 0x40a3af
lea rdx, [rbp - 0x88]
mov rax, qword [rbp - 8]
mov rcx, rax
call fcn.00409a45
test eax, eax
jne 0x40a2c3
mov rax, qword [0x00527ce0]
mov rax, qword [rax]
test rax, rax
jne 0x40a34f
mov eax, dword [rbp - 0x88]
mov edx, eax
mov rax, qword [0x00527cf0]
mov dword [rax], edx
jmp 0x40a38c
mov rax, qword [0x00527cf0]
mov eax, dword [rax]
mov edx, dword [rbp - 0x88]
cmp eax, edx
je 0x40a38c
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov r8, qword [rbp + 0x20]
lea rdx, str._s:_profiling_rate_incompatible_with_first_gmon_file_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.0040bb92
call fcn.00409970
test eax, eax
je 0x40a39c
cmp eax, 1
je 0x40a3a5
jmp 0x40a415
mov dword [rbp - 0x1c], 0x20
jmp 0x40a415
mov dword [rbp - 0x1c], 0x28
nop
jmp 0x40a415
mov rax, qword [0x00527c60]
mov eax, dword [rax]
cmp eax, 3
jne 0x40a3f4
mov rax, qword [0x00527ec0]
mov rbx, qword [rax]
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov r9, qword [rbp + 0x20]
mov r8, rbx
lea rdx, str._s:_file___s_has_bad_magic_cookie_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.0040bb92
call fcn.00409970
test eax, eax
je 0x40a404
cmp eax, 1
je 0x40a40d
jmp 0x40a415
mov dword [rbp - 0x1c], 0xc
jmp 0x40a415
mov dword [rbp - 0x1c], 0x14
nop
mov edx, dword [rbp - 0x1c]
mov rax, qword [rbp - 8]
mov r8d, 0
mov rcx, rax
call sub.msvcrt.dll_fseek
test eax, eax
jns 0x40a441
mov rcx, qword [rbp + 0x20]
call sub.msvcrt.dll_perror
mov ecx, 1
call fcn.0040bb92
mov edx, dword [rbp - 0x70]
mov eax, dword [rbp - 0x1c]
sub edx, eax
mov eax, edx
mov dword [rbp - 0x20], eax
mov eax, dword [rbp - 0x20]
cdqe
shr rax, 1
mov dword [rbp - 0x24], eax
mov rax, qword [0x00527ce0]
mov rax, qword [rax]
test rax, rax
je 0x40a4d1
mov rdx, qword [rbp - 0x80]
mov rax, qword [0x00527ce0]
mov rax, qword [rax]
mov rax, qword [rax]
cmp rdx, rax
jne 0x40a4a7
mov rdx, qword [rbp - 0x78]
mov rax, qword [0x00527ce0]
mov rax, qword [rax]
mov rax, qword [rax + 8]
cmp rdx, rax
jne 0x40a4a7
mov rax, qword [0x00527ce0]
mov rax, qword [rax]
mov eax, dword [rax + 0x10]
cmp dword [rbp - 0x24], eax
je 0x40a4d1
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov r8, qword [rbp + 0x20]
lea rdx, str._s:_incompatible_with_first_gmon_file_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.0040bb92
mov rax, qword [0x00527ce0]
mov rax, qword [rax]
test rax, rax
jne 0x40a5ea
mov rax, qword [0x00527dc0]
mov dword [rax], 1
mov ecx, 0x20
call fcn.004d75e6
mov rdx, rax
mov rax, qword [0x00527ce0]
mov qword [rax], rdx
mov rax, qword [0x00527ce0]
mov rax, qword [rax]
mov rdx, qword [rbp - 0x80]
mov qword [rax], rdx
mov rax, qword [0x00527ce0]
mov rax, qword [rax]
mov rdx, qword [rbp - 0x78]
mov qword [rax + 8], rdx
mov rax, qword [0x00527ce0]
mov rax, qword [rax]
mov edx, dword [rbp - 0x24]
mov dword [rax + 0x10], edx
mov rdx, qword [rbp - 0x78]
mov rax, qword [rbp - 0x80]
sub rdx, rax
mov rax, rdx
shr rax, 1
test rax, rax
js 0x40a558
cvtsi2sd xmm0, rax
jmp 0x40a56d
mov rdx, rax
shr rdx, 1
and eax, 1
or rdx, rax
cvtsi2sd xmm0, rdx
addsd xmm0, xmm0
mov eax, dword [rbp - 0x24]
test rax, rax
js 0x40a57c
cvtsi2sd xmm1, rax
jmp 0x40a591
mov rdx, rax
shr rdx, 1
and eax, 1
or rdx, rax
cvtsi2sd xmm1, rdx
addsd xmm1, xmm1
divsd xmm0, xmm1
mov rax, qword [0x00527cd0]
movsd qword [rax], xmm0
mov eax, dword [rbp - 0x24]
lea rdx, [rax*4]
mov rax, qword [0x00527ce0]
mov rbx, qword [rax]
mov rcx, rdx
call fcn.004d75e6
mov qword [rbx + 0x18], rax
mov eax, dword [rbp - 0x24]
lea rdx, [rax*4]
mov rax, qword [0x00527ce0]
mov rax, qword [rax]
mov rax, qword [rax + 0x18]
mov r8, rdx
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_memset
mov rax, qword [0x00527c30]
mov eax, dword [rax]
and eax, 0x40
test eax, eax
je 0x40a630
mov eax, dword [rbp - 0x70]
mov rdx, qword [rbp - 0x78]
mov ecx, edx
mov rdx, qword [rbp - 0x80]
mov r9d, eax
mov r8d, ecx
lea rcx, str._gmon_out_read__lowpc_0x_lx_highpc_0x_lx_ncnt__d_n
call sub.msvcrt.dll_printf
mov edx, dword [rbp - 0x24]
mov eax, dword [rbp - 0x20]
mov r8d, edx
mov edx, eax
lea rcx, str._gmon_out_read__samp_bytes__d_hist_num_bins__d_n
call sub.msvcrt.dll_printf
cmp dword [rbp - 0x20], 0
js 0x40a656
mov rax, qword [0x00527ce0]
mov rax, qword [rax]
mov rdx, qword [rax]
mov rax, qword [0x00527ce0]
mov rax, qword [rax]
mov rax, qword [rax + 8]
cmp rdx, rax
jbe 0x40a68d
mov rax, qword [0x00527ec0]
mov rbx, qword [rax]
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov r9, qword [rbp + 0x20]
mov r8, rbx
lea rdx, str._s:_file__s_does_not_appear_to_be_in_gmon.out_format_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.0040bb92
cmp dword [rbp - 0x24], 0
je 0x40a697
add dword [rbp - 0xc], 1
mov dword [rbp - 0x18], 0
jmp 0x40a767
mov rdx, qword [rbp - 8]
lea rax, [rbp - 0x5a]
mov r9, rdx
mov r8d, 1
mov edx, 2
mov rcx, rax
call sub.msvcrt.dll_fread
cmp rax, 1
je 0x40a708
sub dword [rbp - 0x18], 1
mov rax, qword [0x00527ec0]
mov rbx, qword [rax]
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
lea rcx, [rax + 0x60]
mov edx, dword [rbp - 0x18]
mov eax, dword [rbp - 0x24]
mov dword [rsp + 0x20], eax
mov r9d, edx
mov r8, rbx
lea rdx, str._s:_unexpected_EOF_after_reading__d__d_bins_n
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.0040bb92
mov rax, qword [0x00527be0]
mov rax, qword [rax]
mov rax, qword [rax + 8]
mov rax, qword [rax + 0x50]
lea rdx, [rbp - 0x5a]
mov rcx, rdx
call rax
mov rcx, rax
mov rax, qword [0x00527ce0]
mov rax, qword [rax]
mov rax, qword [rax + 0x18]
mov edx, dword [rbp - 0x18]
shl rdx, 2
add rax, rdx
mov eax, dword [rax]
mov edx, eax
mov eax, ecx
lea ecx, [rdx + rax]
mov rax, qword [0x00527ce0]
mov rax, qword [rax]
mov rax, qword [rax + 0x18]
mov edx, dword [rbp - 0x18]
shl rdx, 2
add rax, rdx
mov edx, ecx
mov dword [rax], edx
add dword [rbp - 0x18], 1
mov eax, dword [rbp - 0x18]
cmp eax, dword [rbp - 0x24]
jb 0x40a6a3
jmp 0x40a7be
add dword [rbp - 0x10], 1
mov rax, qword [0x00527c30]
mov eax, dword [rax]
and eax, 0x40
test eax, eax
je 0x40a7a8
mov eax, dword [rbp - 0x48]
mov rdx, qword [rbp - 0x58]
mov ecx, edx
mov rdx, qword [rbp - 0x50]
mov r9d, eax
mov r8d, ecx
lea rcx, str._gmon_out_read__frompc_0x_lx_selfpc_0x_lx_count__lu_n
call sub.msvcrt.dll_printf
mov ecx, dword [rbp - 0x48]
mov rdx, qword [rbp - 0x58]
mov rax, qword [rbp - 0x50]
mov r8d, ecx
mov rcx, rax
call fcn.004028e0
lea r8, [rbp - 0x48]
lea rcx, [rbp - 0x58]
lea rdx, [rbp - 0x50]
mov rax, qword [rbp - 8]
mov r9, r8
mov r8, rcx
mov rcx, rax
call fcn.00409db7
test eax, eax
je 0x40a775
mov rax, qword [0x00527cf0]
mov eax, dword [rax]
test eax, eax
jne 0x40a883
call fcn.0040bbb0
mov edx, eax
mov rax, qword [0x00527cf0]
mov dword [rax], edx
mov rax, qword [0x00527cf0]
mov eax, dword [rax]
test eax, eax
jne 0x40a883
mov rax, qword [0x00527cf0]
mov dword [rax], 1
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov r9, rax
mov r8d, 0x1e
mov edx, 1
lea rcx, str.time_is_in_ticks__not_seconds_n
call sub.msvcrt.dll_fwrite
jmp 0x40a883
mov rax, qword [0x00527c60]
mov esi, dword [rax]
mov rax, qword [0x00527ec0]
mov rbx, qword [rax]
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov r9d, esi
mov r8, rbx
lea rdx, str._s:_dont_know_how_to_deal_with_file_format__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.0040bb92
nop
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
cmp qword [rbp - 8], rax
je 0x40a89f
mov rax, qword [rbp - 8]
mov rcx, rax
call sub.msvcrt.dll_fclose
mov rax, qword [0x00527e10]
mov eax, dword [rax]
and eax, 0x20
test eax, eax
je 0x40a93c
mov eax, dword [0x0053ccc4]
mov r8d, eax
mov rdx, qword [rbp + 0x20]
lea rcx, str.File___s__version__d__contains:_n
call sub.msvcrt.dll_printf
cmp dword [rbp - 0xc], 1
jne 0x40a8db
lea rax, str._t_d_histogram_record_n
jmp 0x40a8e2
lea rax, str._t_d_histogram_records_n
mov edx, dword [rbp - 0xc]
mov rcx, rax
call sub.msvcrt.dll_printf
cmp dword [rbp - 0x10], 1
jne 0x40a8fc
lea rax, str._t_d_call_graph_record_n
jmp 0x40a903
lea rax, str._t_d_call_graph_records_n
mov edx, dword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_printf
cmp dword [rbp - 0x14], 1
jne 0x40a91d
lea rax, str._t_d_basic_block_count_record_n
jmp 0x40a924
lea rax, str._t_d_basic_block_count_records_n
mov edx, dword [rbp - 0x14]
mov rcx, rax
call sub.msvcrt.dll_printf
mov rax, qword [0x00527c70]
mov dword [rax], 0
nop
add rsp, 0xc0
pop rbx
pop rsi
pop rbp
ret