Function at 0x6810f9c0
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov r13, rcx
mov r12, rdx
mov rdi, r8
mov esi, r9d
cmp r9d, 4
je 0x6810fa0d
ja 0x6810f9f1
cmp r9d, 3
je 0x6810fa15
test r9d, r9d
je 0x6810f9f7
jmp 0x6810fa0d
cmp r9d, 5
je 0x6810fa15
mov r8d, 0x179
lea rdx, str.src_Cairo.cpp
lea rcx, str.cairoformat___CAIRO_FORMAT_INVALID
jmp 0x6810fa76
mov r14d, 1
jmp 0x6810fa18
xor r14d, r14d
mov rcx, rdi
call fcn.68132670
mov rcx, rdi
mov eax, dword [rax]
mov dword [rsp + 0x38], eax
call fcn.68132680
mov edx, dword [rsp + 0x38]
mov ecx, r14d
mov eax, dword [rax]
mov dword [rsp + 0x3c], eax
call fcn.682284d0
mov ecx, dword [rsp + 0x3c]
imul ecx, dword [rsp + 0x38]
mov r15d, eax
imul ecx, eax
shl ecx, 2
movsxd rcx, ecx
call sub.msvcrt.dll_malloc
mov rbp, rax
test rax, rax
jne 0x6810fa8b
mov r8d, 0x180
lea rdx, str.src_Cairo.cpp
lea rcx, str.newdata___nullptr
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.68109a70
mov dword [rsp + 0x20], r15d
mov r8d, dword [rsp + 0x38]
mov edx, r14d
mov rcx, rax
mov r9d, dword [rsp + 0x3c]
call fcn.682290c0
mov r8d, 0x183
lea rdx, str.src_Cairo.cpp
lea rcx, str.newsurface___nullptr
mov r14, rax
test rax, rax
je 0x6810fa76
mov rcx, rdi
call fcn.68132670
mov rcx, r14
mov r15d, dword [rax]
call fcn.682292f0
mov r8d, 0x184
lea rdx, str.src_Cairo.cpp
lea rcx, str.static_cast_int__s.getWidth_____cairo_image_surface_get_width_newsurface_
cmp r15d, eax
jne 0x6810fa76
mov rcx, rdi
call fcn.68132680
mov rcx, r14
mov r15d, dword [rax]
call fcn.68229270
mov r8d, 0x185
lea rdx, str.src_Cairo.cpp
lea rcx, str.static_cast_int__s.getHeight_____cairo_image_surface_get_height_newsurface_
cmp r15d, eax
jne 0x6810fa76
mov rcx, qword [r13 + 0x20]
call fcn.6822e780
mov rdx, qword [r13 + 0x30]
test rdx, rdx
je 0x6810fb3e
dec dword [rdx]
jne 0x6810fb3e
mov rcx, qword [r13 + 0x28]
call sub.msvcrt.dll_free
jmp 0x6810fb4c
mov ecx, 4
call sub.msvcrt.dll_malloc
mov qword [r13 + 0x30], rax
mov rax, qword [r13 + 0x30]
mov qword [r13 + 0x20], r14
mov qword [r13 + 0x28], rbp
mov dword [rax], 1
lea eax, [rsi - 1]
cmp eax, 4
ja case.default.0x6810fb78
lea rdx, [0x683230e0]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
xor ecx, ecx
xor r8d, r8d
cmp r8d, dword [rsp + 0x3c]
jge case.default.0x6810fb78
lea eax, [rcx*4]
movsxd r11, ecx
xor edx, edx
cdqe
add r11, r12
add rax, rbp
cmp dword [rsp + 0x38], edx
jle 0x6810fbc1
mov r9b, byte [r11 + rdx]
mov byte [rax + 3], 0
inc rdx
add rax, 4
mov byte [rax - 4], r9b
mov byte [rax - 3], r9b
mov byte [rax - 2], r9b
jmp 0x6810fb9e
inc r8d
add ecx, dword [rsp + 0x38]
jmp 0x6810fb7f
xor r8d, r8d
xor r9d, r9d
cmp r9d, dword [rsp + 0x3c]
jge case.default.0x6810fb78
lea edx, [r8 + r8*2]
lea eax, [r8*4]
xor ecx, ecx
movsxd rdx, edx
cdqe
add rdx, r12
add rax, rbp
cmp ecx, dword [rsp + 0x38]
jge 0x6810fc21
mov r11b, byte [rdx]
mov byte [rax + 3], 0
inc ecx
add rdx, 3
add rax, 4
mov byte [rax - 4], r11b
mov r11b, byte [rdx - 2]
mov byte [rax - 3], r11b
mov r11b, byte [rdx - 1]
mov byte [rax - 2], r11b
jmp 0x6810fbf4
inc r9d
add r8d, dword [rsp + 0x38]
jmp 0x6810fbd0
xor edx, edx
xor ecx, ecx
cmp ecx, dword [rsp + 0x3c]
jge case.default.0x6810fb78
lea eax, [rdx*4]
xor r8d, r8d
cdqe
cmp r8d, dword [rsp + 0x38]
jge 0x6810fc92
movzx r11d, byte [r12 + rax + 3]
movzx r9d, byte [r12 + rax]
inc r8d
imul r9d, r11d
mov byte [rbp + rax + 3], r11b
mov ebx, r9d
movzx r9d, byte [r12 + rax + 1]
mov byte [rbp + rax], bh
imul r9d, r11d
mov ebx, r9d
movzx r9d, byte [r12 + rax + 2]
mov byte [rbp + rax + 1], bh
imul r9d, r11d
mov ebx, r9d
mov byte [rbp + rax + 2], bh
add rax, 4
jmp 0x6810fc45
inc ecx
add edx, dword [rsp + 0x38]
jmp 0x6810fc2f
xor r8d, r8d
xor r9d, r9d
cmp r9d, dword [rsp + 0x3c]
jge case.default.0x6810fb78
lea edx, [r8 + r8*2]
lea eax, [r8*4]
xor ecx, ecx
movsxd rdx, edx
cdqe
add rdx, r12
add rax, rbp
cmp ecx, dword [rsp + 0x38]
jge 0x6810fcf2
mov r11b, byte [rdx + 2]
mov byte [rax + 3], 0
inc ecx
add rdx, 3
add rax, 4
mov byte [rax - 4], r11b
mov r11b, byte [rdx - 2]
mov byte [rax - 3], r11b
mov r11b, byte [rdx - 3]
mov byte [rax - 2], r11b
jmp 0x6810fcc4
inc r9d
add r8d, dword [rsp + 0x38]
jmp 0x6810fca0
xor edx, edx
xor ecx, ecx
cmp ecx, dword [rsp + 0x3c]
jge case.default.0x6810fb78
lea eax, [rdx*4]
xor r8d, r8d
cdqe
cmp r8d, dword [rsp + 0x38]
jge 0x6810fd5f
movzx r11d, byte [r12 + rax + 3]
movzx r9d, byte [r12 + rax + 2]
inc r8d
imul r9d, r11d
mov byte [rbp + rax + 3], r11b
mov ebx, r9d
movzx r9d, byte [r12 + rax + 1]
mov byte [rbp + rax], bh
imul r9d, r11d
mov ebx, r9d
movzx r9d, byte [r12 + rax]
mov byte [rbp + rax + 1], bh
imul r9d, r11d
mov ebx, r9d
mov byte [rbp + rax + 2], bh
add rax, 4
jmp 0x6810fd12
inc ecx
add edx, dword [rsp + 0x38]
jmp 0x6810fd00
mov r9d, esi
mov r8, rdi
mov rdx, r12
mov rcx, r13
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.681232f0