Function at 0x14006ba84
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xa0
mov rdi, rdx
mov edx, 0x3a
mov ebp, r8d
mov r12, rcx
cmp dx, word [rdi]
jne 0x14006bada
add rdi, 2
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_StrChrW]
xor ebx, ebx
cmp rax, rbx
je 0x14006bbdc
mov rsi, rdi
mov word [rdi], bx
add rdi, 2
jmp 0x14006bbad
xor edx, edx
mov rcx, rdi
lea r8d, [rdx + 0x5c]
call qword [sym.imp.SHLWAPI.dll_StrRChrW]
xor edx, edx
mov rcx, rdi
lea r8d, [rdx + 0x2e]
call qword [sym.imp.SHLWAPI.dll_StrRChrW]
xor ebx, ebx
lea rsi, [rax + 2]
cmp rax, rbx
je 0x14006bbdc
lea rdx, [0x1400f7c50]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp eax, ebx
jne 0x14006bb27
lea rsi, str.image_png
jmp 0x14006bbb2
lea rdx, [0x1400f7c30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp eax, ebx
je 0x14006bba6
lea rdx, str.jpeg
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp eax, ebx
je 0x14006bba6
lea rdx, [0x1400f7c18]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp eax, ebx
jne 0x14006bb6c
lea rsi, str.image_gif
jmp 0x14006bbb2
lea rdx, str.tiff
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp eax, ebx
jne 0x14006bb89
lea rsi, str.image_tiff
jmp 0x14006bbb2
lea rdx, [0x1400f7bd0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp eax, ebx
jne 0x14006bbdc
lea rsi, str.image_bmp
jmp 0x14006bbb2
lea rsi, str.image_jpeg
cmp rsi, rbx
je 0x14006bbdc
lea rdx, [0x1400f7bd0]
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_StrCmpIW]
cmp eax, ebx
je 0x14006bbdc
mov r9d, ebp
mov r8, rsi
mov rdx, rdi
mov rcx, r12
call fcn.14006b978
jmp 0x14006bee9
cmp ebp, ebx
je 0x14006bbea
mov eax, 1
jmp 0x14006bee9
lea rcx, str.DISPLAY
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov r13d, ebx
mov r15, rbx
call qword [sym.imp.GDI32.dll_CreateDCA]
mov edx, 0xe
mov rcx, rax
mov rsi, rax
call qword [sym.imp.GDI32.dll_GetDeviceCaps]
mov edx, 0xc
mov rcx, rsi
mov r14d, eax
call qword [sym.imp.GDI32.dll_GetDeviceCaps]
mov rcx, rsi
imul r14d, eax
call qword [sym.imp.GDI32.dll_DeleteDC]
mov edx, 0x20
lea ebp, [rdx - 0x1f]
cmp r14d, ebp
jg 0x14006bc47
mov r12w, bp
jmp 0x14006bc5d
mov r12d, 4
cmp r14d, r12d
jle 0x14006bc5d
mov r12d, 8
cmp r14d, r12d
jg 0x14006bc6c
mov cl, r12b
mov r13, rbp
shl r13, cl
shl r13d, 2
jmp 0x14006bc7b
mov r12d, 0x18
cmp r14d, r12d
jle 0x14006bc7b
mov r12w, dx
mov rcx, qword [rsp + 0xe0]
lea r8, [rsp + 0x58]
call qword [sym.imp.GDI32.dll_GetObjectW]
mov ecx, dword [rsp + 0x5c]
mov r8d, dword [rsp + 0x60]
movzx eax, r12w
mov dword [rsp + 0x7c], ecx
mov dword [rsp + 0x78], 0x28
mov dword [rsp + 0x80], r8d
mov word [rsp + 0x84], bp
mov word [rsp + 0x86], r12w
imul eax, ecx
add eax, 0x1f
mov ecx, 0x42
mov dword [rsp + 0x88], ebx
cdq
mov dword [rsp + 0x8c], ebx
mov dword [rsp + 0x90], ebx
and edx, 0x1f
mov dword [rsp + 0x94], ebx
mov dword [rsp + 0x98], ebx
add eax, edx
mov dword [rsp + 0x9c], ebx
sar eax, 5
imul eax, r8d
shl eax, 2
add eax, r13d
mov edx, eax
mov dword [rsp + 0xe8], eax
add rdx, 0x28
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, rax
mov r14, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
lea rdx, [rsp + 0x78]
mov r8d, 0x28
mov rcx, rax
mov r12, rax
call fcn.1400d2bf0
mov ecx, 0xf
call qword [sym.imp.GDI32.dll_GetStockObject]
mov qword [rsp + 0x40], rax
cmp rax, rbx
je 0x14006bd7a
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetDC]
mov rdx, qword [rsp + 0x40]
xor r8d, r8d
mov rcx, rax
mov rsi, rax
call qword [sym.imp.GDI32.dll_SelectPalette]
mov rcx, rsi
mov r15, rax
call qword [sym.imp.GDI32.dll_RealizePalette]
mov r9d, dword [rsp + 0x60]
mov ecx, r13d
mov dword [rsp + 0x30], ebx
lea rdx, [rcx + r12 + 0x28]
mov qword [rsp + 0x28], r12
xor r8d, r8d
mov qword [rsp + 0x20], rdx
mov rdx, qword [rsp + 0xe0]
mov rcx, rsi
call qword [sym.imp.GDI32.dll_GetDIBits]
cmp r15, rbx
je 0x14006bdd1
mov r8d, ebp
mov rdx, r15
mov rcx, rsi
call qword [sym.imp.GDI32.dll_SelectPalette]
mov rcx, rsi
call qword [sym.imp.GDI32.dll_RealizePalette]
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.USER32.dll_ReleaseDC]
mov esi, dword [rsp + 0xe8]
mov eax, 0x4d42
mov word [rsp + 0x4e], bx
mov word [rsp + 0x48], ax
lea eax, [rsi + 0x36]
add esi, 0x28
mov dword [rsp + 0x4a], eax
lea eax, [r13 + 0x36]
mov word [rsp + 0x50], bx
mov dword [rsp + 0x52], eax
cmp rdi, rbx
je 0x14006be91
mov qword [rsp + 0x30], rbx
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, rdi
mov dword [rsp + 0x28], 0x8000080
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14006be49
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
cmove eax, ebp
jmp 0x14006bee9
lea r9, [rsp + 0xf8]
lea rdx, [rsp + 0x48]
mov r8d, 0xe
mov rcx, rax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea r9, [rsp + 0xf8]
mov r8d, esi
mov rdx, r12
mov rcx, rdi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14006bed5
lea eax, [rsi + 0xe]
lea rcx, [0x14010cda8]
mov dword [0x14010c570], eax
add eax, 8
movsxd rdx, eax
call fcn.140056fe0
mov rbx, qword [0x14010cda8]
lea rdx, [rsp + 0x48]
mov rcx, rbx
mov r8d, 0xe
call fcn.14001a9b0
lea rcx, [rbx + 0xe]
movsxd r8, esi
mov rdx, r12
call fcn.14001a9b0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
mov rbx, qword [rsp + 0xf0]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret