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

Disassembly:
push rbp
mov eax, 0xea690
call fcn.00402fa0
sub rsp, rax
lea rbp, [rsp + 0x80]
call dbg.__main
mov ecx, 0
call dbg.time
mov ecx, eax
call sym.srand
mov qword [rbp + 0xea5b0], 0
mov qword [rbp + 0xea5b8], 0
mov qword [rbp + 0xea5c0], 0
mov qword [rbp + 0xea5c8], 0
mov qword [rbp + 0xea5d0], 0
mov qword [rbp + 0xea5d8], 0
mov qword [rbp + 0xea5e0], 0
mov dword [rbp + 0xea5e8], 0
mov word [rbp + 0xea5ec], 0
lea rdx, [0x00405020]
lea rcx, str.t.bmp
call sym.fopen
mov qword [rbp + 0xea600], rax
lea rdx, [0x00405029]
lea rcx, str.tt.bmp
call sym.fopen
mov qword [rbp + 0xea5f8], rax
mov rdx, qword [rbp + 0xea600]
lea rax, [rbp + 0xea5b0]
mov r9, rdx
mov r8d, 1
mov edx, 0x3e
mov rcx, rax
call sym.fread
mov rdx, qword [rbp + 0xea5f8]
lea rax, [rbp + 0xea5b0]
mov r9, rdx
mov r8d, 1
mov edx, 0x3e
mov rcx, rax
call sym.fwrite
lea rax, [rbp + 0x752b0]
mov edx, 0x75300
mov r8, rdx
mov edx, 0
mov rcx, rax
call sym.memset
lea rax, [rbp - 0x50]
mov edx, 0x75300
mov r8, rdx
mov edx, 0
mov rcx, rax
call sym.memset
mov rdx, qword [rbp + 0xea600]
lea rax, [rbp + 0x752b0]
mov r9, rdx
mov r8d, 1
mov edx, 0x75300
mov rcx, rax
call sym.fread
mov byte [rbp - 0x54], 0
mov byte [rbp - 0x53], 0
mov byte [rbp - 0x52], 0
mov byte [rbp - 0x51], 0
mov dword [rbp + 0xea60c], 0
cmp dword [rbp + 0xea60c], 0x12a
jg 0x401a19
mov dword [rbp + 0xea608], 0
cmp dword [rbp + 0xea608], 0x18e
jg 0x401a0d
mov eax, 0x18f
sub eax, dword [rbp + 0xea608]
movsxd rcx, eax
mov eax, dword [rbp + 0xea60c]
movsxd rdx, eax
mov rax, rdx
shl rax, 2
add rax, rdx
lea rdx, [rax*4]
add rax, rdx
shl rax, 4
add rax, rcx
movzx eax, byte [rbp + rax*4 + 0x752b0]
movzx ecx, al
mov eax, dword [rbp + 0xea608]
movsxd r8, eax
mov eax, dword [rbp + 0xea60c]
movsxd rdx, eax
mov rax, rdx
shl rax, 2
add rax, rdx
lea rdx, [rax*4]
add rax, rdx
shl rax, 4
add rax, r8
movzx eax, byte [rbp + rax*4 + 0x752b0]
movzx eax, al
mov edx, ecx
mov ecx, eax
call dbg.avg(int, int)
mov byte [rbp - 0x54], al
mov eax, 0x18f
sub eax, dword [rbp + 0xea608]
movsxd rcx, eax
mov eax, dword [rbp + 0xea60c]
movsxd rdx, eax
mov rax, rdx
shl rax, 2
add rax, rdx
lea rdx, [rax*4]
add rax, rdx
shl rax, 4
add rax, rcx
movzx eax, byte [rbp + rax*4 + 0x752b2]
movzx ecx, al
mov eax, dword [rbp + 0xea608]
movsxd r8, eax
mov eax, dword [rbp + 0xea60c]
movsxd rdx, eax
mov rax, rdx
shl rax, 2
add rax, rdx
lea rdx, [rax*4]
add rax, rdx
shl rax, 4
add rax, r8
movzx eax, byte [rbp + rax*4 + 0x752b2]
movzx eax, al
mov edx, ecx
mov ecx, eax
call dbg.avg(int, int)
mov byte [rbp - 0x52], al
mov eax, 0x18f
sub eax, dword [rbp + 0xea608]
movsxd rcx, eax
mov eax, dword [rbp + 0xea60c]
movsxd rdx, eax
mov rax, rdx
shl rax, 2
add rax, rdx
lea rdx, [rax*4]
add rax, rdx
shl rax, 4
add rax, rcx
movzx eax, byte [rbp + rax*4 + 0x752b1]
movzx ecx, al
mov eax, dword [rbp + 0xea608]
movsxd r8, eax
mov eax, dword [rbp + 0xea60c]
movsxd rdx, eax
mov rax, rdx
shl rax, 2
add rax, rdx
lea rdx, [rax*4]
add rax, rdx
shl rax, 4
add rax, r8
movzx eax, byte [rbp + rax*4 + 0x752b1]
movzx eax, al
mov edx, ecx
mov ecx, eax
call dbg.avg(int, int)
mov byte [rbp - 0x53], al
mov eax, dword [rbp + 0xea608]
movsxd rcx, eax
mov eax, dword [rbp + 0xea60c]
movsxd rdx, eax
mov rax, rdx
shl rax, 2
add rax, rdx
lea rdx, [rax*4]
add rax, rdx
shl rax, 4
lea rdx, [rax + rcx]
mov eax, dword [rbp - 0x54]
mov dword [rbp + rdx*4 - 0x50], eax
add dword [rbp + 0xea608], 1
jmp 0x401832
add dword [rbp + 0xea60c], 1
jmp 0x401818
mov rdx, qword [rbp + 0xea5f8]
lea rax, [rbp - 0x50]
mov r9, rdx
mov r8d, 1
mov edx, 0x75300
mov rcx, rax
call sym.fwrite
mov rax, qword [rbp + 0xea600]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0xea5f8]
mov rcx, rax
call sym.fclose
mov eax, 0
add rsp, 0xea690
pop rbp
ret