Function at 0x140057099
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x558
mov r15, rcx
mov dword [rsp + 0x5a8], edx
mov edi, r8d
mov word [rsp + 0x14d], 0
mov byte [rsp + 0x14f], 0
mov rax, qword [rcx]
mov qword [rsp + 0x58], rax
mov qword [rcx + 0x10], 0
mov qword [rcx + 8], 0
mov qword [rcx + 0x18], 0
mov rcx, rax
call sym.stbi__check_png_header
mov r14d, eax
test eax, eax
je 0x140057108
mov r14d, dword [rsp + 0x5a8]
cmp r14d, 1
jne 0x14005711f
mov eax, r14d
add rsp, 0x558
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rsp + 0x70], 0
mov dword [rsp + 0x64], 0
mov dword [rsp + 0x50], 0
mov r14d, 1
mov esi, 0
mov r12d, 0
mov ebp, 0
mov byte [rsp + 0x77], 0
mov byte [rsp + 0x76], 0
mov dword [rsp + 0x48], ebp
mov rbx, qword [rsp + 0x58]
mov dword [rsp + 0x5b0], edi
jmp 0x14005722b
cmp eax, 0x504c5445
je 0x140057545
cmp eax, 0x74524e53
jne 0x140057267
test r14d, r14d
jne 0x1400575f5
cmp qword [r15 + 8], 0
jne 0x14005760e
cmp byte [rsp + 0x76], 0
jne 0x140057621
mov edx, dword [rbx + 8]
mov r8d, edx
and r8d, 1
je 0x1400576ac
lea eax, [rdx + rdx]
cmp eax, edi
jne 0x1400576c2
cmp dword [rsp + 0x5a8], 2
je 0x1400576d5
cmp dword [r15 + 0x20], 0x10
je 0x1400576f2
mov edi, 0
lea r13, [0x1400b6420]
test edx, edx
jle 0x1400576e8
mov rcx, rbx
call sym.stbi__get16be
movsxd rcx, dword [r15 + 0x20]
mul byte [r13 + rcx]
mov byte [rsp + rdi + 0x14d], al
add rdi, 1
cmp dword [rbx + 8], edi
jg 0x1400571e9
mov byte [rsp + 0x77], 1
jmp 0x140057223
mov edx, edi
mov rcx, rbx
call sym.stbi__skip
mov dword [rsp + 0x70], 1
mov rcx, rbx
call sym.stbi__get32be
mov rcx, rbx
call sym.stbi__get32be
mov edi, eax
mov rcx, rbx
call sym.stbi__get32be
cmp eax, 0x49484452
je 0x140057287
ja 0x14005716c
cmp eax, 0x49444154
je 0x140057727
cmp eax, 0x49454e44
je 0x1400578e7
cmp eax, 0x43674249
je 0x140057211
test r14d, r14d
jne 0x140058260
test eax, 0x20000000
je 0x140058279
mov edx, edi
mov rcx, rbx
call sym.stbi__skip
jmp 0x140057223
test r14d, r14d
je 0x1400573b9
cmp edi, 0xd
jne 0x1400573cc
mov rcx, rbx
call sym.stbi__get32be
mov dword [rbx], eax
mov rcx, rbx
call sym.stbi__get32be
mov dword [rbx + 4], eax
cmp eax, 0x1000000
ja 0x1400573e5
cmp dword [rbx], 0x1000000
ja 0x1400573fe
mov rcx, rbx
call sym.stbi__get8
movzx edx, al
mov dword [r15 + 0x20], edx
cmp al, 0x10
ja 0x140057417
mov edx, 0x10116
bt rdx, rax
jae 0x140057417
mov rcx, rbx
call sym.stbi__get8
mov edi, eax
movzx eax, al
mov dword [rsp + 0x64], eax
cmp eax, 6
jg 0x140057430
cmp dword [rsp + 0x64], 3
je 0x140057449
test dil, 1
jne 0x140057473
mov rcx, rbx
call sym.stbi__get8
test al, al
jne 0x14005748c
mov rcx, rbx
call sym.stbi__get8
test al, al
jne 0x1400574a5
mov rcx, rbx
call sym.stbi__get8
movzx eax, al
mov dword [rsp + 0x50], eax
cmp eax, 1
jg 0x1400574be
mov ecx, dword [rbx]
test ecx, ecx
je 0x1400574d7
mov r8d, dword [rbx + 4]
test r8d, r8d
je 0x1400574d7
cmp byte [rsp + 0x76], 0
jne 0x140057509
test dil, 2
mov eax, 3
cmovne r14d, eax
mov r9d, dword [rsp + 0x64]
sar r9d, 2
add r9d, r14d
mov dword [rbx + 8], r9d
mov eax, 0x40000000
mov edx, 0
div ecx
mov edx, 0
div r9d
cmp eax, r8d
jb 0x1400574f0
mov r14d, 0
jmp 0x140057223
lea rax, str.multiple_IHDR
mov qword [0x1400f3af0], rax
jmp 0x140057108
lea rax, str.bad_IHDR_len
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
lea rax, str.too_large
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
lea rax, str.too_large
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
lea rax, str.1_2_4_8_16_bit_only
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
lea rax, str.bad_ctype
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
cmp dword [r15 + 0x20], 0x10
je 0x14005745a
mov byte [rsp + 0x76], 3
jmp 0x14005731a
lea rax, str.bad_ctype
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
lea rax, str.bad_ctype
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
lea rax, str.bad_comp_method
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
lea rax, str.bad_filter_method
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
lea rax, str.bad_interlace_method
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
lea rax, str.0_pixel_image
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
lea rax, str.too_large
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
mov dword [rbx + 8], 1
mov eax, 0x10000000
mov edx, 0
div ecx
cmp eax, r8d
jb 0x14005752c
mov r14d, 0
jmp 0x140057223
lea rax, str.too_large
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
test r14d, r14d
jne 0x1400575b6
cmp edi, 0x300
ja 0x1400575cf
mov esi, edi
mov eax, 0xaaaaaaab
imul rsi, rax
shr rsi, 0x21
lea eax, [rsi + rsi*2]
cmp eax, edi
jne 0x1400575e2
lea rbp, [rsp + 0x150]
mov r13d, 0
cmp edi, 2
jbe 0x140057223
mov rcx, rbx
call sym.stbi__get8
mov byte [rbp], al
mov rcx, rbx
call sym.stbi__get8
mov byte [rbp + 1], al
mov rcx, rbx
call sym.stbi__get8
mov byte [rbp + 2], al
mov byte [rbp + 3], 0xff
add r13d, 1
add rbp, 4
cmp r13d, esi
jb 0x14005757f
jmp 0x140057223
lea rax, str.first_not_IHDR
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
lea rax, str.invalid_PLTE
mov qword [0x1400f3af0], rax
jmp 0x140057108
lea rax, str.invalid_PLTE
mov qword [0x1400f3af0], rax
jmp 0x140057108
lea rax, str.first_not_IHDR
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
lea rax, str.tRNS_after_IDAT
mov qword [0x1400f3af0], rax
jmp 0x140057108
cmp dword [rsp + 0x5a8], 2
je 0x140057665
test esi, esi
je 0x14005767c
cmp esi, edi
jb 0x140057699
test edi, edi
je 0x14005768f
lea r13, [rsp + 0x150]
mov edi, edi
lea rdi, [r13 + rdi*4]
mov rcx, rbx
call sym.stbi__get8
mov byte [r13 + 3], al
add r13, 4
cmp r13, rdi
jne 0x140057646
mov byte [rsp + 0x76], 4
jmp 0x140057223
mov rax, qword [rsp + 0x58]
mov dword [rax + 8], 4
mov r14d, 1
jmp 0x140057108
lea rax, str.tRNS_before_PLTE
mov qword [0x1400f3af0], rax
jmp 0x140057108
mov byte [rsp + 0x76], 4
jmp 0x140057223
lea rax, str.bad_tRNS_len
mov qword [0x1400f3af0], rax
jmp 0x140057108
lea rax, str.tRNS_with_alpha
mov qword [0x1400f3af0], rax
mov r14d, r8d
jmp 0x140057108
lea rax, str.bad_tRNS_len
mov qword [0x1400f3af0], rax
jmp 0x140057108
add edx, 1
mov rax, qword [rsp + 0x58]
mov dword [rax + 8], edx
mov r14d, r8d
jmp 0x140057108
mov byte [rsp + 0x77], 1
jmp 0x140057223
mov byte [rsp + 0x77], 1
test edx, edx
jle 0x140057223
mov edi, 0
mov rcx, rbx
call sym.stbi__get16be
mov word [rsp + rdi*2 + 0x146], ax
add rdi, 1
cmp dword [rbx + 8], edi
jg 0x140057704
mov byte [rsp + 0x77], 1
jmp 0x140057223
test r14d, r14d
jne 0x1400577ce
cmp byte [rsp + 0x76], 0
je 0x14005773f
test esi, esi
je 0x1400577e7
cmp dword [rsp + 0x5a8], 2
je 0x1400577fa
cmp edi, 0x40000000
ja 0x14005781d
mov eax, dword [rsp + 0x48]
lea r13d, [rax + rdi]
cmp r13d, eax
jl 0x140057108
cmp r12d, r13d
jb 0x140057830
mov ebp, dword [rsp + 0x48]
add rbp, qword [r15 + 8]
cmp qword [rbx + 0x10], 0
je 0x1400577a0
mov rdx, qword [rbx + 0xc0]
mov rax, qword [rbx + 0xc8]
sub rax, rdx
mov qword [rsp + 0x48], rax
cmp edi, eax
jg 0x14005787c
mov rdx, qword [rbx + 0xc0]
movsxd rdi, edi
lea rax, [rdx + rdi]
cmp qword [rbx + 0xc8], rax
jae 0x1400578cb
lea rax, str.outofdata
mov qword [0x1400f3af0], rax
jmp 0x140057108
lea rax, str.first_not_IHDR
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
lea rax, str.no_PLTE
mov qword [0x1400f3af0], rax
jmp 0x140057108
mov r14d, 1
movzx eax, byte [rsp + 0x76]
test al, al
je 0x140057108
movzx eax, al
mov rsi, qword [rsp + 0x58]
mov dword [rsi + 8], eax
jmp 0x140057108
lea rax, str.IDAT_size_limit
mov qword [0x1400f3af0], rax
jmp 0x140057108
test r12d, r12d
jne 0x140057847
mov r12d, 0x1000
cmp edi, r12d
cmovae r12d, edi
cmp r12d, r13d
jae 0x14005784f
add r12d, r12d
cmp r12d, r13d
jb 0x140057847
mov edx, r12d
mov rcx, qword [r15 + 8]
call sym.realloc
test rax, rax
je 0x140057869
mov qword [r15 + 8], rax
jmp 0x140057773
lea rax, str.outofmem
mov qword [0x1400f3af0], rax
jmp 0x140057108
movsxd rax, dword [rsp + 0x48]
mov qword [rsp + 0x68], rax
mov r8, rax
mov rcx, rbp
call sym.memcpy
mov edx, dword [rsp + 0x48]
sub edi, edx
mov rax, qword [rsp + 0x68]
lea rdx, [rbp + rax]
mov rcx, qword [rbx + 0x28]
mov r8d, edi
call qword [rbx + 0x10]
mov rdx, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rdx
cmp edi, eax
jne 0x1400577bb
mov dword [rsp + 0x48], r13d
jmp 0x140057223
mov r8, rdi
mov rcx, rbp
call sym.memcpy
add qword [rbx + 0xc0], rdi
mov dword [rsp + 0x48], r13d
jmp 0x140057223
mov ebp, dword [rsp + 0x48]
mov edi, dword [rsp + 0x5b0]
test r14d, r14d
jne 0x140057a31
cmp dword [rsp + 0x5a8], 0
jne 0x140058248
mov rcx, qword [r15 + 8]
test rcx, rcx
je 0x140057a4a
mov rsi, qword [rsp + 0x58]
mov eax, dword [rsi + 4]
mov r8d, dword [rsi]
imul r8d, dword [r15 + 0x20]
add r8d, 7
shr r8d, 3
mov edx, eax
imul edx, dword [rsi + 8]
imul r8d, edx
add r8d, eax
mov dword [rsp + 0xbc], r8d
mov eax, dword [rsp + 0x70]
xor eax, 1
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0xbc]
mov edx, ebp
call sym.stbi_zlib_decode_malloc_guesssize_headerflag
mov qword [r15 + 0x10], rax
test rax, rax
je 0x140058253
mov rcx, qword [r15 + 8]
call sym.free
mov qword [r15 + 8], 0
mov eax, dword [rsi + 8]
mov dword [rsp + 0x98], eax
add eax, 1
cmp eax, edi
je 0x140057a65
cmp byte [rsp + 0x77], 0
cmove eax, dword [rsp + 0x98]
mov dword [rsp + 0x98], eax
mov rax, qword [rsp + 0x58]
mov esi, dword [rsp + 0x98]
mov dword [rax + 0xc], esi
mov eax, dword [r15 + 0x20]
mov dword [rsp + 0xa0], eax
mov esi, dword [rsp + 0xbc]
mov dword [rsp + 0x9c], esi
mov rsi, qword [r15 + 0x10]
mov qword [rsp + 0x90], rsi
cmp eax, 0x10
sete al
movzx eax, al
add eax, 1
cmp dword [rsp + 0x50], 0
je 0x140057a85
mov esi, dword [rsp + 0x98]
imul esi, eax
mov rax, qword [r15]
mov edx, dword [rax + 4]
mov ecx, dword [rax]
mov r9d, 0
mov r8d, esi
call sym.stbi__malloc_mad3
mov qword [rsp + 0x50], rax
test rax, rax
je 0x140057ad8
mov eax, 0
mov dword [rsp + 0x5b0], edi
mov rdi, rax
jmp 0x140057bb3
lea rax, str.first_not_IHDR
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
lea rax, str.no_IDAT
mov qword [0x1400f3af0], rax
mov r14d, dword [rsp + 0x5a8]
jmp 0x140057108
cmp edi, 3
je 0x140057990
cmp byte [rsp + 0x76], 0
jne 0x140057990
mov dword [rsp + 0x98], edi
jmp 0x1400579a4
mov rax, qword [r15]
mov esi, dword [rsp + 0x64]
mov dword [rsp + 0x38], esi
mov esi, dword [rsp + 0xa0]
mov dword [rsp + 0x30], esi
mov edx, dword [rax + 4]
mov dword [rsp + 0x28], edx
mov eax, dword [rax]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x98]
mov r8d, dword [rsp + 0x9c]
mov rdx, qword [rsp + 0x90]
mov rcx, r15
call sym.stbi__create_png_image_raw
mov r14d, eax
test eax, eax
je 0x140057108
jmp 0x140057e0e
lea rax, str.outofmem
mov qword [0x1400f3af0], rax
jmp 0x140057af2
mov rcx, qword [rsp + 0x50]
call sym.free
mov r14d, dword [rsp + 0x5a8]
jmp 0x140057108
mov dword [rsp + 0x7c], eax
mov dword [rsp + 0x88], edx
mov rax, qword [r15]
mov ecx, esi
imul ecx, dword [rax]
imul ecx, ebp
add rcx, rdi
mov rax, qword [rsp + 0x50]
add rcx, rax
mov rdx, r13
add rdx, qword [r15 + 0x18]
mov r8, r12
call sym.memcpy
add ebx, 1
add r13, r12
add rdi, r14
cmp dword [rsp + 0x48], ebx
jne 0x140057b0a
mov eax, dword [rsp + 0x7c]
mov edx, dword [rsp + 0x88]
add edx, 1
mov edi, dword [rsp + 0x78]
add ebp, edi
mov edi, dword [rsp + 0x8c]
add eax, edi
cmp dword [rsp + 0x68], edx
je 0x140057b7c
movsxd r13, eax
mov rdi, qword [rsp + 0x80]
mov ebx, dword [rsp + 0x5a8]
cmp dword [rsp + 0x48], 0
jg 0x140057aff
jmp 0x140057b49
mov rdi, qword [rsp + 0xa8]
mov rcx, qword [r15 + 0x18]
call sym.free
mov ebx, dword [rsp + 0xa4]
mov eax, ebx
add qword [rsp + 0x90], rax
sub dword [rsp + 0x9c], ebx
add rdi, 4
cmp rdi, 0x1c
je 0x140057dfe
mov dword [rsp + 0xc0], 0
mov dword [rsp + 0xc4], 4
mov dword [rsp + 0xc8], 0
mov dword [rsp + 0xcc], 2
mov dword [rsp + 0xd0], 0
mov dword [rsp + 0xd4], 1
mov dword [rsp + 0xd8], 0
mov dword [rsp + 0xe0], 0
mov dword [rsp + 0xe4], 0
mov dword [rsp + 0xe8], 4
mov dword [rsp + 0xec], 0
mov dword [rsp + 0xf0], 2
mov dword [rsp + 0xf4], 0
mov dword [rsp + 0xf8], 1
mov dword [rsp + 0x100], 8
mov dword [rsp + 0x104], 8
mov dword [rsp + 0x108], 4
mov dword [rsp + 0x10c], 4
mov dword [rsp + 0x110], 2
mov dword [rsp + 0x114], 2
mov dword [rsp + 0x118], 1
mov dword [rsp + 0x120], 8
mov dword [rsp + 0x124], 8
mov dword [rsp + 0x128], 8
mov dword [rsp + 0x12c], 4
mov dword [rsp + 0x130], 4
mov dword [rsp + 0x134], 2
mov dword [rsp + 0x138], 2
mov rcx, qword [r15]
mov ebx, dword [rsp + rdi + 0xc0]
mov r13d, dword [rsp + rdi + 0x100]
mov eax, dword [rcx]
lea eax, [r13 + rax - 1]
sub eax, ebx
mov edx, 0
div r13d
mov ebp, eax
mov r14d, dword [rsp + rdi + 0xe0]
mov edx, dword [rsp + rdi + 0x120]
mov dword [rsp + 0x78], edx
mov eax, dword [rcx + 4]
lea eax, [rdx + rax - 1]
sub eax, r14d
mov r11d, edx
mov edx, 0
div r11d
mov dword [rsp + 0x68], eax
test ebp, ebp
je 0x140057ba5
test eax, eax
je 0x140057ba5
mov eax, ebp
imul eax, dword [rcx + 8]
mov ecx, dword [rsp + 0xa0]
imul eax, ecx
add eax, 7
sar eax, 3
add eax, 1
mov r12d, dword [rsp + 0x68]
imul eax, r12d
mov dword [rsp + 0xa4], eax
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], ecx
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], ebp
mov r9d, dword [rsp + 0x98]
mov r8d, dword [rsp + 0x9c]
mov rdx, qword [rsp + 0x90]
mov rcx, r15
call sym.stbi__create_png_image_raw
test eax, eax
je 0x140057ae8
test r12d, r12d
jle 0x140057b84
mov eax, esi
imul eax, ebp
mov dword [rsp + 0x8c], eax
imul r13d, esi
movsxd rcx, r13d
imul ebx, esi
movsxd rax, ebx
mov qword [rsp + 0x80], rax
mov edx, dword [rsp + 0x5a8]
mov eax, 0
movsxd r12, esi
mov qword [rsp + 0xa8], rdi
mov dword [rsp + 0x48], ebp
mov ebp, r14d
mov r14, rcx
jmp 0x140057b61
mov edi, dword [rsp + 0x5b0]
mov rax, qword [rsp + 0x50]
mov qword [r15 + 0x18], rax
cmp byte [rsp + 0x77], 0
je 0x140057f7e
cmp dword [r15 + 0x20], 0x10
je 0x140057e7c
mov rax, qword [rsp + 0x58]
mov ecx, dword [rax + 0xc]
mov rax, qword [r15]
mov edx, dword [rax]
imul edx, dword [rax + 4]
mov rax, qword [r15 + 0x18]
lea r8d, [rcx - 2]
test r8d, 0xfffffffd
jne 0x140057f3d
cmp ecx, 2
je 0x140057f57
test edx, edx
je 0x140057f7e
movzx ecx, byte [rsp + 0x14d]
movzx r8d, byte [rsp + 0x14e]
movzx r9d, byte [rsp + 0x14f]
mov edx, edx
lea rdx, [rax + rdx*4]
jmp 0x140058094
mov rax, qword [rsp + 0x58]
mov ecx, dword [rax + 0xc]
mov rax, qword [r15]
mov edx, dword [rax]
imul edx, dword [rax + 4]
mov rax, qword [r15 + 0x18]
lea r8d, [rcx - 2]
test r8d, 0xfffffffd
jne 0x140057ecd
cmp ecx, 2
je 0x140057ee7
test edx, edx
je 0x140057f7e
movzx ecx, word [rsp + 0x146]
movzx r8d, word [rsp + 0x148]
movzx r9d, word [rsp + 0x14a]
mov edx, edx
lea rdx, [rax + rdx*8]
jmp 0x140057f22
mov r8d, 0x134c
lea rdx, str.external_stb_image.h
lea rcx, str.out_n__2__out_n__4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__assert]
test edx, edx
je 0x140057f7e
movzx r8d, word [rsp + 0x146]
mov edx, edx
lea rcx, [rax + rdx*4]
cmp word [rax], r8w
setne dl
movzx edx, dl
neg edx
mov word [rax + 2], dx
add rax, 4
cmp rcx, rax
jne 0x140057efe
jmp 0x140057f7e
add rax, 8
cmp rdx, rax
je 0x140057f7e
cmp word [rax], cx
jne 0x140057f19
cmp word [rax + 2], r8w
jne 0x140057f19
cmp word [rax + 4], r9w
jne 0x140057f19
mov word [rax + 6], 0
jmp 0x140057f19
mov r8d, 0x1333
lea rdx, str.external_stb_image.h
lea rcx, str.out_n__2__out_n__4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__assert]
test edx, edx
je 0x140057f7e
movzx r8d, byte [rsp + 0x14d]
mov edx, edx
lea rcx, [rax + rdx*2]
cmp byte [rax], r8b
setne dl
neg edx
mov byte [rax + 1], dl
add rax, 2
cmp rcx, rax
jne 0x140057f6a
cmp dword [rsp + 0x70], 0
je 0x140057f9d
cmp dword [0x1400f3ae4], 0
je 0x140057f9d
mov rax, qword [rsp + 0x58]
cmp dword [rax + 0xc], 2
jg 0x1400580aa
movzx eax, byte [rsp + 0x76]
test al, al
je 0x14005822f
movzx ebp, al
mov rsi, qword [rsp + 0x58]
mov dword [rsi + 8], ebp
cmp edi, 3
cmovl edi, ebp
mov dword [rsi + 0xc], edi
mov rax, qword [r15]
mov r12d, dword [rax]
imul r12d, dword [rax + 4]
mov rsi, qword [r15 + 0x18]
mov edx, edi
mov ecx, r12d
call sym.stbi__mul2sizes_valid
test eax, eax
je 0x1400581c1
mov ecx, edi
imul ecx, r12d
movsxd rcx, ecx
call sym.malloc
mov rbx, rax
test rax, rax
je 0x1400581c1
cmp edi, 3
je 0x1400581dc
test r12d, r12d
je 0x140058055
mov r8, rsi
mov r12d, r12d
lea r9, [rax + r12*4]
mov rdx, rax
movzx eax, byte [r8]
shl eax, 2
cdqe
movzx ecx, byte [rsp + rax + 0x150]
mov byte [rdx], cl
movzx ecx, byte [rsp + rax + 0x151]
mov byte [rdx + 1], cl
movzx ecx, byte [rsp + rax + 0x152]
mov byte [rdx + 2], cl
movzx eax, byte [rsp + rax + 0x153]
mov byte [rdx + 3], al
add rdx, 4
add r8, 1
cmp r9, rdx
jne 0x140058014
mov rcx, rsi
call sym.free
mov qword [r15 + 0x18], rbx
mov rcx, qword [r15 + 0x10]
call sym.free
mov qword [r15 + 0x10], 0
mov rcx, qword [rsp + 0x58]
call sym.stbi__get32be
mov r14d, 1
jmp 0x140057108
add rax, 4
cmp rdx, rax
je 0x140057f7e
cmp byte [rax], cl
jne 0x140058087
cmp byte [rax + 1], r8b
jne 0x140058087
cmp byte [rax + 2], r9b
jne 0x140058087
mov byte [rax + 3], 0
jmp 0x140058087
mov rdx, qword [r15]
mov eax, dword [rdx]
imul eax, dword [rdx + 4]
mov rcx, qword [r15 + 0x18]
mov edx, dword [rdx + 0xc]
cmp edx, 3
je 0x1400580f5
cmp edx, 4
jne 0x140058122
cmp dword [0x1400f3ae8], 0
jne 0x14005813c
test eax, eax
je 0x140057f9d
mov eax, eax
lea r8, [rcx + rax*4]
movzx eax, byte [rcx]
movzx edx, byte [rcx + 2]
mov byte [rcx], dl
mov byte [rcx + 2], al
add rcx, 4
cmp rcx, r8
jne 0x1400580db
jmp 0x140057f9d
test eax, eax
je 0x140057f9d
mov eax, eax
imul rax, rax, 3
add rax, rcx
movzx edx, byte [rcx]
movzx r8d, byte [rcx + 2]
mov byte [rcx], r8b
mov byte [rcx + 2], dl
add rcx, 3
cmp rcx, rax
jne 0x140058106
jmp 0x140057f9d
mov r8d, 0x13b8
lea rdx, str.external_stb_image.h
lea rcx, str.s__img_out_n__4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__assert]
test eax, eax
je 0x140057f9d
mov eax, eax
lea r11, [rcx + rax*4]
jmp 0x140058163
movzx eax, byte [rcx + 2]
mov byte [rcx], al
mov byte [rcx + 2], r9b
add rcx, 4
cmp r11, rcx
je 0x140057f9d
movzx r8d, byte [rcx + 3]
movzx r9d, byte [rcx]
test r8b, r8b
je 0x14005814c
mov r10d, r8d
shr r10b, 1
movzx r10d, r10b
movzx r8d, r8b
movzx edx, byte [rcx + 2]
mov eax, edx
shl eax, 8
sub eax, edx
add eax, r10d
cdq
idiv r8d
mov byte [rcx], al
movzx edx, byte [rcx + 1]
mov eax, edx
shl eax, 8
sub eax, edx
add eax, r10d
cdq
idiv r8d
mov byte [rcx + 1], al
movzx r9d, r9b
mov eax, r9d
shl eax, 8
sub eax, r9d
add eax, r10d
cdq
idiv r8d
mov r9d, eax
jmp 0x140058152
lea rax, str.outofmem
mov qword [0x1400f3af0], rax
mov r14d, dword [rsp + 0x5a8]
jmp 0x140057108
test r12d, r12d
je 0x140058055
mov rcx, rsi
mov r9d, r12d
add r9, rsi
mov rdx, rax
movzx eax, byte [rcx]
shl eax, 2
cdqe
movzx r8d, byte [rsp + rax + 0x150]
mov byte [rdx], r8b
movzx r8d, byte [rsp + rax + 0x151]
mov byte [rdx + 1], r8b
movzx eax, byte [rsp + rax + 0x152]
mov byte [rdx + 2], al
add rdx, 3
add rcx, 1
cmp r9, rcx
jne 0x1400581f1
jmp 0x140058055
cmp byte [rsp + 0x77], 0
je 0x140058061
mov rax, qword [rsp + 0x58]
add dword [rax + 8], 1
jmp 0x140058061
mov r14d, 1
jmp 0x140057108
mov r14d, dword [rsp + 0x5a8]
jmp 0x140057108
lea rax, str.first_not_IHDR
mov qword [0x1400f3af0], rax
mov r14d, 0
jmp 0x140057108
mov ecx, eax
shr ecx, 0x18
mov byte [str.XXXX_PNG_chunk_not_known], cl
mov ecx, eax
shr ecx, 0x10
mov byte [0x1400a1541], cl
mov byte [0x1400a1542], ah
mov byte [0x1400a1543], al
lea rax, str.XXXX_PNG_chunk_not_known
mov qword [0x1400f3af0], rax
jmp 0x140057108