Function at 0x615ca4b0
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 0x615ca4fd
ja 0x615ca4e1
cmp r9d, 3
je 0x615ca505
test r9d, r9d
je 0x615ca4e7
jmp 0x615ca4fd
cmp r9d, 5
je 0x615ca505
mov r8d, 0x179
lea rdx, str.src_Cairo.cpp
lea rcx, str.cairoformat___CAIRO_FORMAT_INVALID
jmp 0x615ca566
mov r14d, 1
jmp 0x615ca508
xor r14d, r14d
mov rcx, rdi
call fcn.615eb650
mov rcx, rdi
mov eax, dword [rax]
mov dword [rsp + 0x38], eax
call fcn.615eb660
mov edx, dword [rsp + 0x38]
mov ecx, r14d
mov eax, dword [rax]
mov dword [rsp + 0x3c], eax
call fcn.61657450
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 0x615ca57b
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.615c7800
mov dword [rsp + 0x20], r15d
mov r8d, dword [rsp + 0x38]
mov edx, r14d
mov rcx, rax
mov r9d, dword [rsp + 0x3c]
call fcn.61658040
mov r8d, 0x183
lea rdx, str.src_Cairo.cpp
lea rcx, str.newsurface___nullptr
mov r14, rax
test rax, rax
je 0x615ca566
mov rcx, rdi
call fcn.615eb650
mov rcx, r14
mov r15d, dword [rax]
call fcn.61658270
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 0x615ca566
mov rcx, rdi
call fcn.615eb660
mov rcx, r14
mov r15d, dword [rax]
call fcn.616581f0
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 0x615ca566
mov rcx, qword [r13 + 0x20]
call fcn.6165d700
mov rdx, qword [r13 + 0x30]
test rdx, rdx
je 0x615ca62e
dec dword [rdx]
jne 0x615ca62e
mov rcx, qword [r13 + 0x28]
call sub.msvcrt.dll_free
jmp 0x615ca63c
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.0x615ca668
lea rdx, [0x617592d0]
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.0x615ca668
lea eax, [rcx*4]
movsxd r11, ecx
xor edx, edx
cdqe
add r11, r12
add rax, rbp
cmp dword [rsp + 0x38], edx
jle 0x615ca6b1
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 0x615ca68e
inc r8d
add ecx, dword [rsp + 0x38]
jmp 0x615ca66f
xor r8d, r8d
xor r9d, r9d
cmp r9d, dword [rsp + 0x3c]
jge case.default.0x615ca668
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 0x615ca711
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 0x615ca6e4
inc r9d
add r8d, dword [rsp + 0x38]
jmp 0x615ca6c0
xor edx, edx
xor ecx, ecx
cmp ecx, dword [rsp + 0x3c]
jge case.default.0x615ca668
lea eax, [rdx*4]
xor r8d, r8d
cdqe
cmp r8d, dword [rsp + 0x38]
jge 0x615ca782
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 0x615ca735
inc ecx
add edx, dword [rsp + 0x38]
jmp 0x615ca71f
xor r8d, r8d
xor r9d, r9d
cmp r9d, dword [rsp + 0x3c]
jge case.default.0x615ca668
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 0x615ca7e2
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 0x615ca7b4
inc r9d
add r8d, dword [rsp + 0x38]
jmp 0x615ca790
xor edx, edx
xor ecx, ecx
cmp ecx, dword [rsp + 0x3c]
jge case.default.0x615ca668
lea eax, [rdx*4]
xor r8d, r8d
cdqe
cmp r8d, dword [rsp + 0x38]
jge 0x615ca84f
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 0x615ca802
inc ecx
add edx, dword [rsp + 0x38]
jmp 0x615ca7f0
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.615de7e0