Function at 0x140047d50
Capabilities:
Write file on windows

Disassembly:
mov r11, rsp
push rbx
push rbp
sub rsp, 0x58
mov rax, qword [0x140092040]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rbp, rdx
mov rbx, rcx
test rcx, rcx
je 0x14004803f
test rdx, rdx
je 0x14004803f
cmp dword [rcx + 0x10], 1
jl 0x14004803f
cmp dword [rcx + 0x14], 1
jl 0x14004803f
mov qword [r11 - 0x18], r14
mov r14, qword [rcx + 0x20]
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], rdi
test r8d, r8d
jne 0x140047fde
lea edx, [r8 + 0x2e]
mov rcx, rbp
call qword [sym.imp.VCRUNTIME140.dll_strrchr]
test rax, rax
je 0x140047dc8
lea r10, [rax + 1]
cmp rax, rbp
jne 0x140047dcf
lea r10, [0x14007bf69]
lea r8, [0x140083588]
mov r11, r10
sub r11, r8
lea rdi, [0x140080ab0]
movzx edx, byte [r11 + r8]
movzx ecx, byte [r8]
lea r8, [r8 + 1]
movzx r9d, byte [rdx + rdi]
movzx ecx, byte [rcx + rdi]
cmp r9b, cl
jne 0x140047e63
test dl, dl
jne 0x140047de3
mov rax, qword [rbx + 8]
mov rcx, r14
mov r9d, dword [rbx + 0x14]
mov r8d, dword [rbx + 0x10]
movzx edx, byte [rax + 0x11]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], edx
xor edx, edx
call fcn.14005cb60
mov rsi, rax
test rax, rax
je 0x140047e57
lea rdx, [0x140083d70]
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rdi, rax
mov rcx, rsi
test rax, rax
jne 0x14004800e
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor ebx, ebx
test ebx, ebx
setne al
jmp 0x140047fb5
cmp r9d, ecx
je 0x140047e02
lea r8, [0x14008358c]
mov r11, r10
sub r11, r8
nop word [rax + rax]
movzx edx, byte [r11 + r8]
movzx ecx, byte [r8]
lea r8, [r8 + 1]
movzx r9d, byte [rdx + rdi]
movzx ecx, byte [rcx + rdi]
cmp r9b, cl
jne 0x140047f05
test dl, dl
jne 0x140047e80
mov rax, qword [rbx + 8]
lea rdx, [0x140083d70]
mov esi, dword [rbx + 0x14]
mov rcx, rbp
mov ebx, dword [rbx + 0x10]
movzx edi, byte [rax + 0x11]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov qword [rsp + 0x38], rax
lea rcx, [0x14005afb0]
mov qword [rsp + 0x30], rcx
test rax, rax
je 0x140048005
mov r9d, edi
mov qword [rsp + 0x20], r14
mov r8d, esi
lea rcx, [rsp + 0x30]
mov edx, ebx
call fcn.14005b440
mov rcx, qword [rsp + 0x38]
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test ebx, ebx
setg al
jmp 0x140047fb5
cmp r9d, ecx
je 0x140047e9f
lea rdx, [0x140083590]
sub r10, rdx
movzx r8d, byte [r10 + rdx]
movzx ecx, byte [rdx]
lea rdx, [rdx + 1]
movzx r9d, byte [r8 + rdi]
movzx ecx, byte [rcx + rdi]
cmp r9b, cl
jne 0x140047f96
test r8b, r8b
jne 0x140047f14
mov rax, qword [rbx + 8]
lea rdx, [0x140083d70]
mov esi, dword [rbx + 0x14]
mov rcx, rbp
mov ebx, dword [rbx + 0x10]
movzx edi, byte [rax + 0x11]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov qword [rsp + 0x38], rax
lea rcx, [0x14005afb0]
mov qword [rsp + 0x30], rcx
test rax, rax
je 0x140048005
mov r9d, edi
mov qword [rsp + 0x20], r14
mov r8d, esi
lea rcx, [rsp + 0x30]
mov edx, ebx
call fcn.14005b510
mov rcx, qword [rsp + 0x38]
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test ebx, ebx
setg al
jmp 0x140047fb5
cmp r9d, ecx
je 0x140047f33
lea r8, str.Could_not_detect_output_file_format_from_file_name
mov edx, 2
lea rcx, str.GPU_SaveSurface
call fcn.1400475a0
xor al, al
mov rdi, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x80]
mov r14, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140077230
add rsp, 0x58
pop rbp
pop rbx
ret
sub r8d, 1
je 0x140047e02
sub r8d, 1
je 0x140047e9f
cmp r8d, 1
je 0x140047f33
lea r8, str.Unsupported_output_file_format
jmp 0x140047fa2
xor ebx, ebx
test ebx, ebx
setg al
jmp 0x140047fb5
movsxd r8, dword [rsp + 0x40]
mov ebx, 1
mov edx, ebx
mov r9, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test ebx, ebx
setne al
jmp 0x140047fb5
xor al, al
jmp 0x140047fca