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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
lea rdi, [0x004c9f47]
mov rbp, rcx
mov ecx, 2
mov rsi, rbp
repe cmpsb byte [rsi], byte [rdi]
jne 0x407910
xor ecx, ecx
mov rdi, qword [fcn.004c1900]
call rdi
xor ecx, ecx
mov rbx, rax
call rdi
mov rcx, rax
call qword [sym.imp.msvcrt.dll__fileno]
mov edx, 0x8000
mov ecx, eax
call qword [sym.imp.msvcrt.dll__setmode]
lea r12, [rsp + 0x60]
mov r9, rbx
mov r8d, 1
mov edx, 0x14
mov rcx, r12
call sub.msvcrt.dll_fread
cmp rax, 1
jne 0x407d16
mov r14, qword [0x00506070]
mov esi, dword [r14]
cmp esi, 1
je 0x407c40
test esi, esi
je 0x407940
lea eax, [rsi - 2]
cmp eax, 1
ja 0x407dbf
xor r8d, r8d
xor edx, edx
mov rcx, rbx
mov dword [0x00513cc4], 3
call sub.msvcrt.dll_fseek
test eax, eax
js 0x40792b
lea rsi, [rsp + 0x80]
mov rcx, rbx
mov rdx, rsi
call fcn.004073c0
test eax, eax
jne 0x407d16
lea rdx, [rsi + 8]
mov rcx, rbx
call fcn.004073c0
test eax, eax
jne 0x407d16
lea rdx, [rsi + 0x10]
mov rcx, rbx
call fcn.00407370
test eax, eax
jne 0x407d16
lea rdx, [rsp + 0x44]
mov rcx, rbx
call fcn.00407370
test eax, eax
mov r13d, eax
jne 0x407d16
cmp dword [rsp + 0x44], 0x51879
je 0x407b20
cmp dword [r14], 3
je 0x407c57
call fcn.00407290
mov esi, 0xc
test eax, eax
je 0x4076fd
cmp eax, 1
mov esi, 0x14
cmovne esi, r13d
xor r8d, r8d
mov edx, esi
mov rcx, rbx
call sub.msvcrt.dll_fseek
test eax, eax
js 0x40792b
mov eax, dword [rsp + 0x90]
mov rdi, qword [0x005060f0]
sub eax, esi
cdqe
mov rsi, rax
shr rax, 1
mov rcx, rax
mov qword [rsp + 0x38], rax
mov rax, qword [rdi]
test rax, rax
je 0x407b80
mov rdx, qword [rax]
cmp qword [rsp + 0x80], rdx
jne 0x407d3d
mov rdx, qword [rax + 8]
cmp qword [rsp + 0x88], rdx
jne 0x407d3d
cmp dword [rax + 0x10], ecx
jne 0x407d3d
mov rax, qword [0x00506000]
test byte [rax], 0x40
jne 0x407ab3
test esi, esi
js 0x407d64
mov rax, qword [rdi]
mov rsi, qword [rax + 8]
cmp qword [rax], rsi
ja 0x407d64
mov rax, qword [rsp + 0x38]
xor esi, esi
test eax, eax
setne sil
mov dword [rsp + 0x34], esi
je 0x407818
mov r14, qword [0x00505fb0]
lea r12d, [rax - 1]
mov qword [rsp + 0xf0], rbp
lea r15, [r12 + 1]
xor r12d, r12d
lea rsi, [rsp + 0x42]
mov rbp, r12
nop dword [rax + rax]
mov r9, rbx
mov r8d, 1
mov edx, 2
mov rcx, rsi
call sub.msvcrt.dll_fread
cmp rax, 1
jne 0x407cd9
mov rax, qword [r14]
mov rcx, rsi
mov rax, qword [rax + 8]
call qword [rax + 0x50]
mov rdx, qword [rdi]
mov rdx, qword [rdx + 0x18]
add dword [rdx + rbp*4], eax
add rbp, 1
cmp rbp, r15
jne 0x4077d0
mov rbp, qword [rsp + 0xf0]
lea rax, [rsp + 0x58]
xor esi, esi
lea rdi, [rsp + 0x48]
mov qword [rsp + 0x38], rax
lea r12, [rsp + 0x50]
lea r14, str._gmon_out_read__frompc_0x_lx_selfpc_0x_lx_count__lu_n
mov rdx, rdi
mov rcx, rbx
call fcn.004073c0
test eax, eax
je 0x407a30
mov rdi, qword [0x00506100]
mov eax, dword [rdi]
test eax, eax
je 0x407af0
mov rdi, qword [fcn.004c1900]
xor ecx, ecx
call rdi
cmp rax, rbx
je 0x407871
mov rcx, rbx
call sub.msvcrt.dll_fclose
mov rax, qword [0x00506220]
test byte [rax], 0x20
je 0x4078f8
mov r8d, dword [0x00513cc0]
mov rdx, rbp
lea rcx, str.File___s__version__d__contains:_n
call sub.msvcrt.dll_printf
mov edx, dword [rsp + 0x34]
lea rax, str._t_d_histogram_record_n
lea rcx, str._t_d_histogram_records_n
cmp edx, 1
cmove rcx, rax
call sub.msvcrt.dll_printf
cmp esi, 1
mov edx, esi
lea rax, str._t_d_call_graph_record_n
lea rcx, str._t_d_call_graph_records_n
cmove rcx, rax
call sub.msvcrt.dll_printf
cmp r13d, 1
mov edx, r13d
lea rax, str._t_d_basic_block_count_record_n
lea rcx, str._t_d_basic_block_count_records_n
cmove rcx, rax
call sub.msvcrt.dll_printf
mov rax, qword [0x00506080]
mov dword [rax], 0
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, [0x004c9f49]
mov rcx, rbp
call sub.msvcrt.dll_fopen
test rax, rax
mov rbx, rax
jne 0x407605
mov rcx, rbp
call sub.msvcrt.dll_perror
mov ecx, 1
call fcn.00408200
nop dword [rax]
lea rdi, str.gmon
mov ecx, 4
mov rsi, r12
repe cmpsb byte [rsi], byte [rdi]
jne 0x407651
mov rax, qword [0x00505fb0]
lea rcx, [r12 + 4]
mov rax, qword [rax]
mov rax, qword [rax + 8]
call qword [rax + 0x38]
cmp eax, 1
mov rsi, rax
mov dword [0x00513cc0], eax
ja 0x407df3
xor r13d, r13d
xor esi, esi
mov dword [rsp + 0x34], 0
lea r12, [rsp + 0x80]
mov r9, rbx
mov r8d, 1
mov edx, 1
mov rcx, r12
call sub.msvcrt.dll_fread
cmp rax, 1
jne 0x407859
movzx edi, byte [rsp + 0x80]
cmp dil, 1
je 0x4079f0
jb 0x407a10
cmp dil, 2
jne 0x407ca1
mov rdx, rbp
mov rcx, rbx
add r13d, 1
or dword [0x00513cc4], 4
call fcn.00401970
jmp 0x407994
or dword [0x00513cc4], 2
mov rdx, rbp
mov rcx, rbx
add esi, 1
call fcn.004024a0
jmp 0x407994
add dword [rsp + 0x34], 1
mov rdx, rbp
mov rcx, rbx
or dword [0x00513cc4], 1
call fcn.00409190
jmp 0x407994
mov rdx, r12
mov rcx, rbx
call fcn.004073c0
test eax, eax
jne 0x407848
call fcn.00407290
test eax, eax
je 0x407b04
cmp eax, 1
jne 0x407848
mov rdx, qword [rsp + 0x38]
mov rcx, rbx
call fcn.00407230
test eax, eax
jne 0x407848
mov rax, qword [0x00506000]
add esi, 1
mov r15d, dword [rsp + 0x58]
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
test byte [rax], 0x40
je 0x407aa6
mov r8d, edx
mov r9d, r15d
mov edx, ecx
mov rcx, r14
call sub.msvcrt.dll_printf
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
mov r8d, r15d
call fcn.004023b0
jmp 0x407835
mov r8d, dword [rsp + 0x88]
lea rcx, str._gmon_out_read__lowpc_0x_lx_highpc_0x_lx_ncnt__d_n
mov edx, dword [rsp + 0x80]
mov r9d, dword [rsp + 0x90]
call sub.msvcrt.dll_printf
mov r8d, dword [rsp + 0x38]
mov edx, esi
lea rcx, str._gmon_out_read__samp_bytes__d_hist_num_bins__d_n
call sub.msvcrt.dll_printf
jmp 0x40777a
call fcn.00408210
test eax, eax
je 0x407c0d
mov dword [rdi], eax
jmp 0x407859
mov rdx, qword [rsp + 0x38]
mov rcx, rbx
call fcn.00407370
test eax, eax
jne 0x407848
jmp 0x407a6e
lea rdx, [rsp + 0x58]
mov rcx, rbx
call fcn.00407370
test eax, eax
mov esi, eax
jne 0x407d16
mov rdx, qword [0x005060f0]
mov eax, dword [rsp + 0x58]
cmp qword [rdx], 0
mov rdx, qword [0x00506100]
je 0x407c9a
cmp dword [rdx], eax
jne 0x407d98
call fcn.00407290
test eax, eax
je 0x407c90
cmp eax, 1
mov eax, 0x28
cmove esi, eax
jmp 0x4076fd
mov rax, qword [0x005061d0]
mov ecx, 0x20
mov dword [rax], 1
call fcn.004be5f0
mov rcx, qword [rsp + 0x38]
pxor xmm0, xmm0
pxor xmm1, xmm1
mov rdx, qword [rsp + 0x80]
mov r14, rax
mov qword [rdi], rax
mov r12d, ecx
cvtsi2sd xmm1, r12
mov qword [rax], rdx
mov rax, qword [rsp + 0x88]
shl r12, 2
mov dword [r14 + 0x10], ecx
mov rcx, r12
mov qword [r14 + 8], rax
sub rax, rdx
shr rax, 1
cvtsi2sd xmm0, rax
mov rax, qword [0x005060e0]
divsd xmm0, xmm1
movsd qword [rax], xmm0
call fcn.004be5f0
mov r8, r12
xor edx, edx
mov qword [r14 + 0x18], rax
mov rax, qword [rdi]
mov rcx, qword [rax + 0x18]
call sub.msvcrt.dll_memset
jmp 0x40776a
mov dword [rdi], 1
mov ecx, 2
mov rdi, qword [fcn.004c1900]
call rdi
mov r8d, 0x1e
mov edx, 1
lea rcx, str.time_is_in_ticks__not_seconds_n
mov r9, rax
call sub.msvcrt.dll_fwrite
jmp 0x407860
lea rdi, str.gmon
mov ecx, 4
mov rsi, r12
repe cmpsb byte [rsi], byte [rdi]
je 0x407957
mov rax, qword [0x005062d0]
mov ecx, 2
mov rbx, qword [rax]
call qword [fcn.004c1900]
lea rdx, str._s:_file___s_has_bad_magic_cookie_n
mov r9, rbp
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.00408200
nop dword [rax + rax]
mov esi, 0x20
jmp 0x4076fd
mov dword [rdx], eax
jmp 0x407b5b
mov rax, qword [0x005062d0]
mov ecx, 2
mov rbx, qword [rax]
call qword [fcn.004c1900]
mov dword [rsp + 0x20], edi
mov r9, rbp
lea rdx, str._s:__s:_found_bad_tag__d__file_corrupted___n
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.00408200
mov rax, qword [0x005062d0]
mov ecx, 2
mov rbx, qword [rax]
call qword [fcn.004c1900]
mov edi, dword [rsp + 0x38]
lea r9d, [rbp - 1]
lea rdx, str._s:_unexpected_EOF_after_reading__d__d_bins_n
mov rcx, rax
mov r8, rbx
mov dword [rsp + 0x20], edi
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.00408200
mov ecx, 2
call qword [fcn.004c1900]
lea rdx, str._s:_file_too_short_to_be_a_gmon_file_n
mov r8, rbp
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.00408200
mov ecx, 2
call qword [fcn.004c1900]
lea rdx, str._s:_incompatible_with_first_gmon_file_n
mov r8, rbp
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.00408200
mov rax, qword [0x005062d0]
mov ecx, 2
mov rbx, qword [rax]
call qword [fcn.004c1900]
lea rdx, str._s:_file__s_does_not_appear_to_be_in_gmon.out_format_n
mov r9, rbp
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.00408200
mov ecx, 2
call qword [fcn.004c1900]
lea rdx, str._s:_profiling_rate_incompatible_with_first_gmon_file_n
mov r8, rbp
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.00408200
mov rax, qword [0x005062d0]
mov ecx, 2
mov rbx, qword [rax]
call qword [fcn.004c1900]
lea rdx, str._s:_dont_know_how_to_deal_with_file_format__d_n
mov r9d, esi
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.00408200
mov rax, qword [0x005062d0]
mov ecx, 2
mov rbx, qword [rax]
call qword [fcn.004c1900]
mov dword [rsp + 0x20], esi
mov r9, rbp
lea rdx, str._s:_file___s_has_unsupported_version__d_n
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.00408200
nop
nop dword [rax]