Function at 0x1400186cc
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x2a0
mov r9, qword [0x1400f1bb0]
xor edi, edi
mov rsi, rcx
cmp r9, rdi
jne 0x140018971
lea rcx, str.GdiPlus.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rbx, rax
cmp rax, rdi
jne 0x14001883f
lea r8, [rsp + 0x2c0]
lea rdx, str._SystemRoot_WinSxS
lea rcx, [0x1400f1e30]
xor r9d, r9d
mov qword [rsp + 0x2c8], rdi
mov qword [rsp + 0x2c0], rdi
mov byte [rsp + 0x20], 1
call fcn.140056690
mov rdx, qword [rsp + 0x2c0]
lea r8, [rsp + 0x50]
lea rcx, [rsp + 0x2c8]
call fcn.1400b8aa4
cmp rax, rdi
je 0x140018811
mov rcx, qword [rsp + 0x2c0]
lea r8d, [rdi + 0x5c]
xor edx, edx
call qword [sym.imp.SHLWAPI.dll_StrRChrW]
cmp rax, rdi
je 0x140018777
mov word [rax], di
cmp word [rsp + 0x7c], 0x2e
je 0x1400187f6
test byte [rsp + 0x50], 0x10
je 0x1400187f6
mov rcx, qword [rsp + 0x2c0]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea rcx, [rsp + 0x7c]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea rcx, [rsp + 0x2d0]
lea edx, [rax + rbx + 0x1e]
call fcn.14004bedc
mov r8, qword [rsp + 0x2c0]
mov rcx, qword [rsp + 0x2d0]
lea r9, [rsp + 0x7c]
lea rdx, str._s_sGdiPlus.dll
call fcn.1400118ec
mov rcx, qword [rsp + 0x2d0]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea rcx, [rsp + 0x2d0]
mov rbx, rax
call fcn.140044f24
cmp rbx, rdi
jne 0x140018811
mov rcx, qword [rsp + 0x2c8]
lea rdx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
cmp eax, edi
jne 0x140018777
lea rcx, [rsp + 0x2c0]
call fcn.140044f24
mov rcx, qword [rsp + 0x2c8]
cmp rcx, rdi
je 0x140018837
cmp rcx, 0xffffffffffffffff
je 0x140018837
call qword [sym.imp.KERNEL32.dll_FindClose]
mov qword [rsp + 0x2c8], rdi
lea rdx, str.GdiplusStartup
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdiplusShutdown
mov rcx, rbx
mov qword [0x1400f1bb0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipLoadImageFromFile
mov rcx, rbx
mov qword [0x1400f1bb8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipDisposeImage
mov rcx, rbx
mov qword [0x1400f1bd8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipCreateFromHDC
mov rcx, rbx
mov qword [0x1400f1bc0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipDrawImageRectI
mov rcx, rbx
mov qword [0x1400f1bc8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipCreateBitmapFromHBITMAP
mov rcx, rbx
mov qword [0x1400f1bd0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipSaveImageToFile
mov rcx, rbx
mov qword [0x1400f1bf0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipGetImageEncodersSize
mov rcx, rbx
mov qword [0x1400f1bf8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipGetImageEncoders
mov rcx, rbx
mov qword [0x1400f1be0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipDrawImageI
mov rcx, rbx
mov qword [0x1400f1be8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipGetImageWidth
mov rcx, rbx
mov qword [0x1400f1c00], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GdipGetImageHeight
mov rcx, rbx
mov qword [0x1400f1c08], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r9, qword [0x1400f1bb0]
mov qword [0x1400f1c10], rax
mov rcx, qword [0x1400f1cf8]
mov rax, qword [0x1400f1bd8]
cmp rcx, rdi
jne 0x1400189bd
cmp rax, rdi
je 0x1400189bd
xor eax, eax
lea rdx, [rsp + 0x30]
lea rcx, [0x1400f1cf8]
xor r8d, r8d
mov dword [rsp + 0x30], 1
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], rax
call r9
mov rax, qword [0x1400f1bd8]
mov rcx, qword [0x1400f1cf8]
cmp rsi, 0xffffffffffffffff
jne 0x1400189c8
mov rax, rcx
jmp 0x1400189f2
mov qword [rsp + 0x2d8], rdi
cmp rsi, rdi
je 0x1400189ef
cmp rax, rdi
je 0x1400189ef
lea rdx, [rsp + 0x2d8]
mov rcx, rsi
call rax
mov rdi, qword [rsp + 0x2d8]
mov rax, rdi
add rsp, 0x2a0
pop rdi
pop rsi
pop rbx
ret