Function at 0x1400030e0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0xf]
sub rsp, 0x88
mov rax, qword [0x140008038]
xor rax, rsp
mov qword [rbp - 1], rax
xor r12d, r12d
lea rax, [0x1400066f0]
cmp dword [rbp + 0x7f], r12d
mov rdi, rcx
lea rcx, [0x1400066e0]
mov qword [rbp - 0x19], r12
cmove rax, rcx
mov qword [rbp - 0x49], r12
mov qword [rbp - 0x39], r12
mov r14, r9
mov qword [rbp - 0x31], r12
mov r15, r8
mov esi, edx
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x11], xmm0
test rdi, rdi
je 0x1400035ae
test r9, r9
je 0x1400035ae
xor ecx, ecx
mov qword [rsp + 0x80], rbx
call qword [sym.imp.ole32.dll_CoInitialize]
mov ebx, eax
test eax, eax
jns 0x14000317b
lea ecx, [r12 + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.CoInitialize_NULL__failed__08lx_n
jmp 0x1400031b6
xor edx, edx
lea rax, [rbp - 0x19]
lea r9, [0x140006700]
mov qword [rsp + 0x20], rax
lea rcx, [0x1400066a0]
lea r8d, [rdx + 1]
call qword [sym.imp.ole32.dll_CoCreateInstance]
mov ebx, eax
test eax, eax
jns 0x1400031c1
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.CoCreateInstance_MAKE_REFGUID_CLSID_WICImagingFactory___NULL__CLSCTX_INPROC_SERVER__MAKE_REFGUID_IID_IWICImagingFactory____LPVOID_factory__failed__08lx_n
mov r8d, ebx
mov rcx, rax
call fcn.1400011b0
cmp ebx, 0x80040154
jne 0x1400031e8
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Couldnt_access_Windows_Imaging_Component__are_you_running_Windows_XP_SP3_or_newer__._PNG_support_not_available._Use__ppm_or__pgm_for_available_PPM_and_PGM_formats._n
call fcn.1400011b0
jmp 0x140003566
test ebx, ebx
js 0x140003566
lea r8, [rbp - 0x31]
test esi, esi
je 0x14000321f
mov edx, 1
xor ecx, ecx
call qword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov ebx, eax
test eax, eax
jns 0x140003270
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.CreateStreamOnHGlobal_NULL__TRUE__stream__failed__08lx_n
jmp 0x140003245
mov edx, 0x1001
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_SHCreateStreamOnFileA]
mov ebx, eax
test eax, eax
jns 0x140003270
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.SHCreateStreamOnFile__const_LPTSTR_out_file_name__STGM_WRITE__STGM_CREATE__stream__failed__08lx_n
mov r8d, ebx
mov rcx, rax
call fcn.1400011b0
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, ebx
lea rdx, str.Error_opening_output_file__s___08lx__n
mov rcx, rax
mov r8, rdi
call fcn.1400011b0
test ebx, ebx
jns 0x140003296
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.CreateOutputStream_out_file_name__use_stdout__stream__failed__08lx_n
mov rcx, rax
call fcn.1400011b0
jmp 0x140003566
mov rcx, qword [rbp - 0x19]
lea r9, [rbp - 0x39]
xor r8d, r8d
mov rdx, r15
mov rax, qword [rcx]
call qword [rax + 0x40]
mov ebx, eax
test eax, eax
jns 0x1400032d2
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.IWICImagingFactory_CreateEncoder_factory__container_guid__NULL__encoder__failed__08lx_n
mov rcx, rax
call fcn.1400011b0
jmp 0x140003566
mov rcx, qword [rbp - 0x39]
mov r8d, 2
mov rdx, qword [rbp - 0x31]
mov rax, qword [rcx]
call qword [rax + 0x18]
mov ebx, eax
test eax, eax
jns 0x14000330e
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.IWICBitmapEncoder_Initialize_encoder__stream__WICBitmapEncoderNoCache__failed__08lx_n
mov rcx, rax
call fcn.1400011b0
jmp 0x140003566
mov rcx, qword [rbp - 0x39]
lea rdx, [rbp - 0x49]
xor r8d, r8d
mov rax, qword [rcx]
call qword [rax + 0x50]
mov ebx, eax
test eax, eax
jns 0x140003347
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.IWICBitmapEncoder_CreateNewFrame_encoder__frame__NULL__failed__08lx_n
mov rcx, rax
call fcn.1400011b0
jmp 0x140003566
mov rcx, qword [rbp - 0x49]
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x18]
mov ebx, eax
test eax, eax
jns 0x14000337b
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.IWICBitmapFrameEncode_Initialize_frame__NULL__failed__08lx_n
mov rcx, rax
call fcn.1400011b0
jmp 0x140003566
mov rcx, qword [rbp - 0x49]
mov edi, dword [rbp + 0x77]
mov r8d, edi
mov edx, dword [rbp + 0x6f]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov ebx, eax
test eax, eax
jns 0x1400033b6
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.IWICBitmapFrameEncode_SetSize_frame__width__height__failed__08lx_n
mov rcx, rax
call fcn.1400011b0
jmp 0x140003566
mov rcx, qword [rbp - 0x49]
lea rdx, [rbp - 0x11]
mov rax, qword [rcx]
call qword [rax + 0x30]
mov ebx, eax
test eax, eax
jns 0x1400033ec
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.IWICBitmapFrameEncode_SetPixelFormat_frame__pixel_format__failed__08lx_n
mov rcx, rax
call fcn.1400011b0
jmp 0x140003566
mov rcx, qword [rbp - 0x49]
mov edx, edi
mov r8d, dword [rbp + 0x67]
mov r9d, r8d
imul r9d, edi
mov qword [rsp + 0x20], r14
mov rax, qword [rcx]
call qword [rax + 0x50]
mov ebx, eax
test eax, eax
jns 0x140003430
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.IWICBitmapFrameEncode_WritePixels_frame__height__stride__height__stride__rgb__failed__08lx_n
mov rcx, rax
call fcn.1400011b0
jmp 0x140003566
mov rcx, qword [rbp - 0x49]
mov rax, qword [rcx]
call qword [rax + 0x60]
mov ebx, eax
test eax, eax
jns 0x140003462
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.IWICBitmapFrameEncode_Commit_frame__failed__08lx_n
mov rcx, rax
call fcn.1400011b0
jmp 0x140003566
mov rcx, qword [rbp - 0x39]
mov rax, qword [rcx]
call qword [rax + 0x58]
mov ebx, eax
test eax, eax
jns 0x140003494
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.IWICBitmapEncoder_Commit_encoder__failed__08lx_n
mov rcx, rax
call fcn.1400011b0
jmp 0x140003566
test esi, esi
je 0x140003566
mov rcx, qword [rbp - 0x31]
lea rdx, [rbp - 0x29]
call qword [sym.imp.ole32.dll_GetHGlobalFromStream]
mov ebx, eax
test eax, eax
jns 0x1400034d2
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.GetHGlobalFromStream_stream__image__failed__08lx_n
mov rcx, rax
call fcn.1400011b0
jmp 0x140003566
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
lea rdx, [rbp - 0x21]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
mov rcx, qword [rbp - 0x29]
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [rbp - 0x41], r12d
mov r14, rax
test esi, esi
je 0x14000350f
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_GlobalSize]
lea r9, [rbp - 0x41]
mov qword [rsp + 0x20], r12
mov r8, rax
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140003547
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_GlobalSize]
mov ecx, dword [rbp - 0x41]
cmp rcx, rax
je 0x14000354c
mov ebx, 0x80004005
test esi, esi
je 0x14000355c
mov edx, dword [rbp - 0x21]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, qword [rbp - 0x49]
test rcx, rcx
je 0x140003575
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rbp - 0x39]
test rcx, rcx
je 0x140003584
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rbp - 0x19]
test rcx, rcx
je 0x140003593
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rbp - 0x31]
test rcx, rcx
je 0x1400035a2
mov rax, qword [rcx]
call qword [rax + 0x10]
mov eax, ebx
mov rbx, qword [rsp + 0x80]
jmp 0x1400035b3
mov eax, 0x80070057
mov rcx, qword [rbp - 1]
xor rcx, rsp
call fcn.140003a60
add rsp, 0x88
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
ret