Function at 0x1400023b0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x40
xor esi, esi
mov r14, r8
mov ebp, edx
mov rdi, rcx
test r8, r8
je 0x1400023f6
movzx eax, byte [r8]
cmp al, byte [0x1400053ac]
jne 0x1400023f6
movzx eax, byte [r8 + 1]
cmp al, byte [0x1400053ad]
jne 0x1400023f6
lea r15d, [rsi + 1]
jmp 0x1400023f9
xor r15d, r15d
mov ebx, 1
test rdi, rdi
je 0x14000245a
test r14, r14
je 0x14000245a
test ebp, ebp
je 0x1400026dc
test r15d, r15d
je 0x140002427
mov ecx, ebx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call fcn.1400038a0
jmp 0x140002437
lea rdx, [0x140006578]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rsi, rax
test rax, rax
jne 0x140002475
lea ecx, [rax + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, r14
lea rdx, str.Error_opening_output_file__s_n
mov rcx, rax
call fcn.1400011b0
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
cmp ebp, 0x11
ja 0x140002488
mov eax, 0x39a00
bt eax, ebp
jb 0x1400026dc
cmp ebp, ebx
jne 0x1400024fc
mov rbx, qword [rdi + 0x10]
movsxd r14, dword [rdi + 0x18]
test rbx, rbx
jne 0x1400024a0
xor ebx, ebx
jmp 0x14000272d
mov r15d, dword [rdi + 4]
lea rdx, str.P7_nWIDTH__u_nHEIGHT__u_nDEPTH_4_nMAXVAL_255_nTUPLTYPE_RGB_ALPHA_nENDHDR_n
mov ebp, dword [rdi + 8]
mov r8d, r15d
mov r9d, ebp
mov rcx, rsi
call fcn.1400011b0
xor edi, edi
test ebp, ebp
je 0x140002568
nop word [rax + rax]
mov r9, rsi
mov r8d, 4
mov rdx, r15
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rax, 4
jne 0x140002499
add rbx, r14
inc edi
cmp edi, ebp
jb 0x1400024d0
lea ebx, [rax - 3]
jmp 0x14000272d
cmp ebp, 0xa
ja 0x140002572
mov eax, 0x504
bt eax, ebp
jae 0x140002572
mov rbx, qword [rdi + 0x10]
movsxd r14, dword [rdi + 0x18]
test rbx, rbx
je 0x14000272d
mov r15d, dword [rdi + 4]
lea rdx, str.P6_n_u__u_n255_n
mov ebp, dword [rdi + 8]
mov r8d, r15d
mov r9d, ebp
mov rcx, rsi
call fcn.1400011b0
xor edi, edi
test ebp, ebp
je 0x140002568
nop
mov r9, rsi
mov r8d, 3
mov rdx, r15
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rax, 3
jne 0x140002499
add rbx, r14
inc edi
cmp edi, ebp
jb 0x140002540
mov ebx, 1
jmp 0x14000272d
lea eax, [rbp - 0xd]
test eax, 0xfffffffa
jne 0x1400025f0
cmp ebp, 0x11
je 0x1400025f0
mov rbx, qword [rdi + 0x10]
movsxd r14, dword [rdi + 0x18]
test rbx, rbx
je 0x140002499
mov r15d, dword [rdi + 4]
lea rdx, str.P5_n_u__u_n255_n
mov ebp, dword [rdi + 8]
mov rcx, rsi
mov r9d, ebp
lea r8d, [r15 + r15]
call fcn.1400011b0
xor edi, edi
test ebp, ebp
je 0x140002568
nop word [rax + rax]
mov r9, rsi
mov r8d, 2
mov rdx, r15
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rax, 2
jne 0x140002499
add rbx, r14
inc edi
cmp edi, ebp
jb 0x1400025c0
lea ebx, [rax - 1]
jmp 0x14000272d
cmp ebp, 4
jne 0x14000260a
mov rdx, rdi
mov rcx, rsi
call fcn.140002760
mov ebx, eax
and ebx, 1
jmp 0x14000272d
cmp ebp, 5
jne 0x140002624
mov rdx, rdi
mov rcx, rsi
call fcn.140002be0
mov ebx, eax
and ebx, 1
jmp 0x14000272d
cmp ebp, 6
jne 0x14000263e
mov rdx, rdi
mov rcx, rsi
call fcn.140002ef0
mov ebx, eax
and ebx, 1
jmp 0x14000272d
lea eax, [rbp - 3]
test eax, 0xffffffee
jne 0x140002662
cmp ebp, 4
je 0x140002662
mov rdx, rdi
mov rcx, rsi
call fcn.1400029c0
mov ebx, eax
and ebx, 1
jmp 0x14000272d
cmp ebp, 7
jne 0x14000272d
mov rbx, qword [rdi + 0x28]
movsxd r14, dword [rdi + 0x3c]
test rbx, rbx
je 0x14000272d
mov r15d, dword [rdi + 4]
lea rdx, str.P5_n_u__u_n255_n
mov ebp, dword [rdi + 8]
mov r8d, r15d
mov r9d, ebp
mov rcx, rsi
call fcn.1400011b0
xor edi, edi
test ebp, ebp
je 0x140002568
nop dword [rax]
nop word [rax + rax]
mov r9, rsi
mov r8d, 1
mov rdx, r15
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rax, 1
jne 0x140002499
add rbx, r14
inc edi
cmp edi, ebp
jb 0x1400026b0
mov ebx, eax
jmp 0x14000272d
mov eax, dword [rdi]
mov ecx, dword [rdi + 4]
mov edx, dword [rdi + 8]
mov r8d, dword [rdi + 0x18]
cmp eax, 0xc
ja 0x1400026fd
mov r9d, 0x17ba
bt r9d, eax
jae 0x1400026fd
mov eax, ebx
jmp 0x1400026ff
xor eax, eax
mov r9, qword [rdi + 0x10]
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], edx
mov edx, r15d
mov dword [rsp + 0x28], ecx
mov rcx, r14
mov dword [rsp + 0x20], r8d
lea r8, [0x1400066c0]
call fcn.1400030e0
xor ebx, ebx
test eax, eax
setns bl
test rsi, rsi
je 0x14000274b
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rsi, rax
je 0x14000274b
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, ebx
jmp 0x14000245c