Function at 0x140057f40
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1398]
mov eax, 0x1498
call fcn.1400c7970
sub rsp, rax
mov r15, rcx
movaps xmmword [rsp + 0x1480], xmm6
xor ecx, ecx
movaps xmmword [rsp + 0x1470], xmm7
xor eax, eax
mov dword [rsp + 0x44], ecx
xor r12b, r12b
mov dword [rsp + 0x54], ecx
mov rdi, qword [r15]
mov r14d, ecx
mov r13d, ecx
mov dword [rsp + 0x58], ecx
mov dword [rsp + 0x48], ecx
mov qword [r15 + 0x10], rcx
mov qword [r15 + 8], rcx
mov qword [r15 + 0x18], rcx
mov byte [rbp + 0x13e8], r12b
mov r12d, ecx
mov rcx, rdi
mov byte [rbp + 0x13f0], 0
mov word [rbp + 0x13f8], ax
mov byte [rbp + 0x13fa], al
mov dword [rsp + 0x40], 1
call fcn.140056730
test eax, eax
je 0x140058fc3
movdqa xmm7, xmmword [0x1401377d0]
movdqa xmm6, xmmword [0x1401377e0]
mov rcx, rdi
call fcn.14004ebf0
mov rcx, rdi
mov esi, eax
call fcn.14004ebf0
shl esi, 0x10
mov rcx, rdi
add esi, eax
call fcn.14004ebf0
mov rcx, rdi
mov ebx, eax
call fcn.14004ebf0
shl ebx, 0x10
lea ecx, [rax + rbx]
mov eax, esi
mov ebx, ecx
shl rbx, 0x20
or rbx, rax
mov qword [rsp + 0x60], rbx
cmp ecx, 0x49484452
ja 0x140058508
je 0x140058182
cmp ecx, 0x43674249
je 0x140058126
cmp ecx, 0x49444154
je 0x140058095
cmp ecx, 0x49454e44
jne 0x14005851c
cmp dword [rsp + 0x40], 0
jne 0x140058fa7
mov rbx, qword [r15 + 8]
test rbx, rbx
jne 0x140058969
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.no_IDAT
jmp 0x140058fba
cmp dword [rsp + 0x40], 0
jne 0x140058fa7
cmp byte [rbp + 0x13f0], 0
je 0x1400580b2
test r12d, r12d
je 0x140058e12
mov esi, dword [rsp + 0x44]
lea eax, [rbx + rsi]
cmp eax, esi
jl 0x140058fc3
cmp eax, r14d
jbe 0x140058101
test r14d, r14d
jne 0x1400580d8
mov r14d, 0x1000
cmp ebx, r14d
cmova r14d, ebx
cmp eax, r14d
jbe 0x1400580e8
nop dword [rax]
add r14d, r14d
cmp eax, r14d
ja 0x1400580e0
mov rcx, qword [r15 + 8]
mov edx, r14d
call case.0x14000806e.5
test rax, rax
je 0x140058db4
mov qword [r15 + 8], rax
mov rdx, rsi
mov r8d, ebx
add rdx, qword [r15 + 8]
mov rcx, rdi
call fcn.14004eb20
test eax, eax
je 0x140058e2a
add esi, ebx
mov dword [rsp + 0x44], esi
jmp 0x140058954
mov dword [rsp + 0x48], 1
test esi, esi
jns 0x140058145
mov rax, qword [rdi + 0xc0]
mov qword [rdi + 0xb8], rax
jmp 0x140058954
cmp qword [rdi + 0x10], 0
je 0x140058581
mov ecx, dword [rdi + 0xc0]
sub ecx, dword [rdi + 0xb8]
cmp ecx, esi
jge 0x140058581
mov rax, qword [rdi + 0xc0]
sub ebx, ecx
mov rcx, qword [rdi + 0x28]
mov edx, ebx
mov qword [rdi + 0xb8], rax
call qword [rdi + 0x18]
jmp 0x140058954
cmp dword [rsp + 0x40], 0
je 0x140058eea
xor r13d, r13d
mov dword [rsp + 0x40], r13d
cmp esi, 0xd
jne 0x140058ed2
mov rcx, rdi
call fcn.14004ebf0
mov rcx, rdi
mov ebx, eax
call fcn.14004ebf0
shl ebx, 0x10
add eax, ebx
mov dword [rdi], eax
cmp eax, 0x1000000
ja 0x1400584dc
mov rcx, rdi
call fcn.14004ebf0
mov rcx, rdi
mov ebx, eax
call fcn.14004ebf0
shl ebx, 0x10
add eax, ebx
mov dword [rdi + 4], eax
cmp eax, 0x1000000
ja 0x1400584dc
mov rcx, qword [rdi + 0xb8]
mov rax, qword [rdi + 0xc0]
cmp rcx, rax
jae 0x140058209
movzx edx, byte [rcx]
inc rcx
mov qword [rdi + 0xb8], rcx
jmp 0x140058269
cmp dword [rdi + 0x30], r13d
je 0x140058267
mov r8d, dword [rdi + 0x34]
lea rdx, [rdi + 0x38]
mov rcx, qword [rdi + 0x28]
call qword [rdi + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x140058246
lea rax, [rdi + 0x39]
mov dword [rdi + 0x30], r13d
mov qword [rdi + 0xc0], rax
lea rcx, [rdi + 0x39]
mov byte [rdi + 0x38], r13b
movzx edx, r13b
mov qword [rdi + 0xb8], rcx
jmp 0x140058269
cdqe
lea rcx, [rdi + 0x39]
add rax, 0x38
add rax, rdi
mov qword [rdi + 0xc0], rax
movzx edx, byte [rdi + 0x38]
mov qword [rdi + 0xb8], rcx
jmp 0x140058269
xor dl, dl
movzx edx, dl
mov dword [r15 + 0x20], edx
cmp edx, 0x10
ja 0x140058eba
mov r8d, 0x10116
bt r8d, edx
jae 0x140058eba
cmp rcx, rax
jae 0x14005829d
movzx edx, byte [rcx]
inc rcx
mov qword [rdi + 0xb8], rcx
jmp 0x1400582fd
cmp dword [rdi + 0x30], r13d
je 0x1400582fb
mov r8d, dword [rdi + 0x34]
lea rdx, [rdi + 0x38]
mov rcx, qword [rdi + 0x28]
call qword [rdi + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x1400582da
lea rax, [rdi + 0x39]
mov dword [rdi + 0x30], r13d
mov qword [rdi + 0xc0], rax
lea rcx, [rdi + 0x39]
mov byte [rdi + 0x38], r13b
movzx edx, r13b
mov qword [rdi + 0xb8], rcx
jmp 0x1400582fd
cdqe
lea rcx, [rdi + 0x39]
add rax, 0x38
add rax, rdi
mov qword [rdi + 0xc0], rax
movzx edx, byte [rdi + 0x38]
mov qword [rdi + 0xb8], rcx
jmp 0x1400582fd
xor dl, dl
movzx esi, dl
mov dword [rsp + 0x58], esi
cmp esi, 6
ja 0x140058e42
cmp esi, 3
jne 0x140058326
cmp dword [r15 + 0x20], 0x10
je 0x140058e42
mov byte [rbp + 0x13f0], sil
jmp 0x140058330
test sil, 1
jne 0x140058e42
cmp rcx, rax
jae 0x14005833d
movzx edx, byte [rcx]
inc rcx
jmp 0x140058387
cmp dword [rdi + 0x30], r13d
je 0x140058476
mov r8d, dword [rdi + 0x34]
lea rdx, [rdi + 0x38]
mov rcx, qword [rdi + 0x28]
call qword [rdi + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x14005836f
lea rax, [rdi + 0x39]
mov dword [rdi + 0x30], r13d
mov qword [rdi + 0xc0], rax
mov byte [rdi + 0x38], r13b
jmp 0x14005837f
cdqe
add rax, 0x38
add rax, rdi
mov qword [rdi + 0xc0], rax
movzx edx, byte [rdi + 0x38]
lea rcx, [rdi + 0x39]
mov qword [rdi + 0xb8], rcx
mov r8, rcx
test dl, dl
jne 0x140058e5a
cmp rcx, rax
jae 0x1400583a6
movzx edx, byte [rcx]
inc rcx
jmp 0x1400583f0
cmp dword [rdi + 0x30], r13d
je 0x140058476
mov r8d, dword [rdi + 0x34]
lea rdx, [rdi + 0x38]
mov rcx, qword [rdi + 0x28]
call qword [rdi + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x1400583d8
lea rax, [rdi + 0x39]
mov dword [rdi + 0x30], r13d
mov qword [rdi + 0xc0], rax
mov byte [rdi + 0x38], r13b
jmp 0x1400583e8
cdqe
add rax, 0x38
add rax, rdi
mov qword [rdi + 0xc0], rax
movzx edx, byte [rdi + 0x38]
lea rcx, [rdi + 0x39]
mov qword [rdi + 0xb8], rcx
mov r8, rcx
test dl, dl
jne 0x140058e72
cmp rcx, rax
jae 0x140058417
movzx edx, byte [rcx]
lea rax, [rcx + 1]
mov qword [rdi + 0xb8], rax
jmp 0x140058478
cmp dword [rdi + 0x30], r13d
je 0x140058476
mov r8d, dword [rdi + 0x34]
lea rdx, [rdi + 0x38]
mov rcx, qword [rdi + 0x28]
call qword [rdi + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x140058454
lea rax, [rdi + 0x39]
mov dword [rdi + 0x30], r13d
mov qword [rdi + 0xc0], rax
movzx edx, r13b
lea rax, [rdi + 0x39]
mov byte [rdi + 0x38], r13b
mov qword [rdi + 0xb8], rax
jmp 0x140058478
movsxd rcx, eax
lea rax, [rdi + 0x39]
add rcx, 0x38
add rcx, rdi
mov qword [rdi + 0xc0], rcx
movzx edx, byte [rdi + 0x38]
mov qword [rdi + 0xb8], rax
jmp 0x140058478
xor dl, dl
movzx r13d, dl
mov dword [rsp + 0x54], r13d
cmp r13d, 1
ja 0x140058ea2
mov ecx, dword [rdi]
test ecx, ecx
je 0x140058e8a
mov r9d, dword [rdi + 4]
test r9d, r9d
je 0x140058e8a
xor edx, edx
mov eax, 0x40000000
div ecx
cmp byte [rbp + 0x13f0], 0
jne 0x1400584f4
xor edx, edx
mov r8d, esi
shr r8d, 2
mov ecx, esi
and ecx, 2
and r8d, 1
or ecx, 1
add r8d, ecx
div r8d
mov dword [rdi + 8], r8d
cmp eax, r9d
jae 0x140058954
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.too_large
jmp 0x140058fba
shr eax, 2
mov dword [rdi + 8], 1
cmp eax, r9d
jb 0x1400584dc
jmp 0x140058954
cmp ecx, 0x504c5445
je 0x140058721
cmp ecx, 0x74524e53
je 0x140058590
cmp dword [rsp + 0x40], 0
jne 0x140058fa7
mov ecx, dword [rsp + 0x64]
bt ecx, 0x1d
jae 0x140058f02
test ebx, ebx
jns 0x14005854c
mov rax, qword [rdi + 0xc0]
mov qword [rdi + 0xb8], rax
jmp 0x140058954
cmp qword [rdi + 0x10], 0
je 0x140058581
mov ecx, dword [rdi + 0xc0]
sub ecx, dword [rdi + 0xb8]
cmp ecx, ebx
jge 0x140058581
mov rax, qword [rdi + 0xc0]
sub ebx, ecx
mov rcx, qword [rdi + 0x28]
mov edx, ebx
mov qword [rdi + 0xb8], rax
call qword [rdi + 0x18]
jmp 0x140058954
movsxd rax, ebx
add qword [rdi + 0xb8], rax
jmp 0x140058954
cmp dword [rsp + 0x40], 0
jne 0x140058fa7
cmp qword [r15 + 8], 0
jne 0x140058f7d
cmp byte [rbp + 0x13f0], 0
je 0x14005868d
test r12d, r12d
je 0x140058f53
cmp ebx, r12d
ja 0x140058f3e
xor esi, esi
mov byte [rbp + 0x13f0], 4
test ebx, ebx
je 0x140058954
nop word [rax + rax]
mov rax, qword [rdi + 0xb8]
cmp rax, qword [rdi + 0xc0]
jae 0x1400585ff
movzx edx, byte [rax]
inc rax
mov qword [rdi + 0xb8], rax
jmp 0x140058673
cmp dword [rdi + 0x30], 0
je 0x140058671
mov r8d, dword [rdi + 0x34]
lea rdx, [rdi + 0x38]
mov rcx, qword [rdi + 0x28]
call qword [rdi + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x14005863c
mov dword [rdi + 0x30], eax
movq xmm0, rdi
punpcklqdq xmm0, xmm0
paddq xmm0, xmm6
movdqu xmmword [rdi + 0xb8], xmm0
mov rax, qword [rdi + 0xb8]
mov byte [rax], 0
jmp 0x14005865b
cdqe
movq xmm1, rdi
add rax, rdi
movq xmm0, rax
punpcklqdq xmm1, xmm0
paddq xmm1, xmm7
movdqu xmmword [rdi + 0xb8], xmm1
mov rax, qword [rdi + 0xb8]
movzx edx, byte [rax]
inc rax
mov qword [rdi + 0xb8], rax
jmp 0x140058673
xor dl, dl
lea eax, [rsi*4 + 3]
inc esi
mov byte [rsp + rax + 0x70], dl
cmp esi, ebx
jb 0x1400585e0
jmp 0x140058954
mov ecx, dword [rdi + 8]
test cl, 1
je 0x140058f68
lea eax, [rcx + rcx]
cmp ebx, eax
jne 0x140058f3e
xor esi, esi
mov byte [rbp + 0x13e8], 1
cmp dword [r15 + 0x20], 0x10
jne 0x1400586dc
test ecx, ecx
jle 0x140058954
lea rbx, [rsp + 0x4c]
mov rcx, rdi
call fcn.14004ebf0
inc esi
mov word [rbx], ax
lea rbx, [rbx + 2]
cmp esi, dword [rdi + 8]
jl 0x1400586c1
jmp 0x140058954
test ecx, ecx
jle 0x140058954
lea rbx, [rbp + 0x13f8]
lea r13, [0x14012d448]
mov rcx, rdi
call fcn.14004ebf0
movsxd rcx, dword [r15 + 0x20]
lea rbx, [rbx + 1]
movzx eax, al
inc esi
movzx edx, byte [rcx + r13]
imul eax, edx
mov byte [rbx - 1], al
cmp esi, dword [rdi + 8]
jl 0x1400586f2
mov r13d, dword [rsp + 0x54]
jmp 0x140058954
cmp dword [rsp + 0x40], 0
jne 0x140058fa7
cmp esi, 0x300
ja 0x140058f92
mov eax, 0xaaaaaaab
mul esi
mov r12d, edx
shr r12d, 1
lea eax, [r12 + r12*2]
cmp eax, esi
jne 0x140058f92
xor esi, esi
test r12d, r12d
je 0x140058954
xor r15d, r15d
nop
mov rdx, qword [rdi + 0xb8]
cmp rdx, qword [rdi + 0xc0]
jae 0x14005877f
movzx ecx, byte [rdx]
inc rdx
mov qword [rdi + 0xb8], rdx
jmp 0x1400587f5
cmp dword [rdi + 0x30], r15d
je 0x1400587f3
mov r8d, dword [rdi + 0x34]
lea rdx, [rdi + 0x38]
mov rcx, qword [rdi + 0x28]
call qword [rdi + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x1400587bd
movq xmm0, rdi
mov dword [rdi + 0x30], r15d
punpcklqdq xmm0, xmm0
paddq xmm0, xmm6
movdqu xmmword [rdi + 0xb8], xmm0
mov rax, qword [rdi + 0xb8]
mov byte [rax], r15b
jmp 0x1400587dc
cdqe
movq xmm1, rdi
add rax, rdi
movq xmm0, rax
punpcklqdq xmm1, xmm0
paddq xmm1, xmm7
movdqu xmmword [rdi + 0xb8], xmm1
mov rax, qword [rdi + 0xb8]
movzx ecx, byte [rax]
lea rdx, [rax + 1]
mov qword [rdi + 0xb8], rdx
jmp 0x1400587f5
xor cl, cl
lea ebx, [rsi*4]
mov byte [rsp + rbx + 0x70], cl
cmp rdx, qword [rdi + 0xc0]
jae 0x140058819
movzx r8d, byte [rdx]
inc rdx
mov qword [rdi + 0xb8], rdx
jmp 0x140058891
cmp dword [rdi + 0x30], r15d
je 0x14005888e
mov r8d, dword [rdi + 0x34]
lea rdx, [rdi + 0x38]
mov rcx, qword [rdi + 0x28]
call qword [rdi + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x140058857
movq xmm0, rdi
mov dword [rdi + 0x30], r15d
punpcklqdq xmm0, xmm0
paddq xmm0, xmm6
movdqu xmmword [rdi + 0xb8], xmm0
mov rax, qword [rdi + 0xb8]
mov byte [rax], r15b
jmp 0x140058876
cdqe
movq xmm1, rdi
add rax, rdi
movq xmm0, rax
punpcklqdq xmm1, xmm0
paddq xmm1, xmm7
movdqu xmmword [rdi + 0xb8], xmm1
mov rax, qword [rdi + 0xb8]
movzx r8d, byte [rax]
lea rdx, [rax + 1]
mov qword [rdi + 0xb8], rdx
jmp 0x140058891
xor r8b, r8b
lea eax, [rbx + 1]
mov byte [rsp + rax + 0x70], r8b
cmp rdx, qword [rdi + 0xc0]
jae 0x1400588b3
movzx r8d, byte [rdx]
lea rax, [rdx + 1]
mov qword [rdi + 0xb8], rax
jmp 0x14005892a
cmp dword [rdi + 0x30], r15d
je 0x140058927
mov r8d, dword [rdi + 0x34]
lea rdx, [rdi + 0x38]
mov rcx, qword [rdi + 0x28]
call qword [rdi + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x1400588f1
movq xmm0, rdi
mov dword [rdi + 0x30], r15d
punpcklqdq xmm0, xmm0
paddq xmm0, xmm6
movdqu xmmword [rdi + 0xb8], xmm0
mov rax, qword [rdi + 0xb8]
mov byte [rax], r15b
jmp 0x140058910
cdqe
movq xmm1, rdi
add rax, rdi
movq xmm0, rax
punpcklqdq xmm1, xmm0
paddq xmm1, xmm7
movdqu xmmword [rdi + 0xb8], xmm1
mov rax, qword [rdi + 0xb8]
movzx r8d, byte [rax]
inc rax
mov qword [rdi + 0xb8], rax
jmp 0x14005892a
xor r8b, r8b
lea eax, [rsi*4 + 2]
mov byte [rsp + rax + 0x70], r8b
lea eax, [rsi*4 + 3]
inc esi
mov byte [rsp + rax + 0x70], 0xff
cmp esi, r12d
jb 0x140058760
mov r15, qword [rbp + 0x13e0]
mov rcx, rdi
call fcn.14004ebf0
mov rcx, rdi
call fcn.14004ebf0
jmp 0x140057ff4
mov eax, dword [r15 + 0x20]
imul eax, dword [rdi]
add eax, 7
shr eax, 3
imul eax, dword [rdi + 8]
inc eax
imul eax, dword [rdi + 4]
movsxd rsi, eax
mov rcx, rsi
call fcn.1400de01c
mov rcx, rax
test rax, rax
jne 0x14005899c
mov qword [r15 + 0x10], rax
jmp 0x140058fc3
movsxd rax, dword [rsp + 0x44]
add rax, rbx
mov qword [rbp + 0x390], rcx
mov qword [rbp + 0x378], rax
lea rax, [rsi + rcx]
xor esi, esi
mov qword [rbp + 0x388], rcx
mov edx, esi
mov qword [rbp + 0x370], rbx
cmp dword [rsp + 0x48], edx
lea rcx, [rbp + 0x370]
mov qword [rbp + 0x398], rax
sete dl
mov dword [rbp + 0x3a0], 1
call fcn.140056560
test eax, eax
je 0x140058dfd
mov rax, qword [rbp + 0x390]
mov ebx, dword [rbp + 0x388]
sub ebx, dword [rbp + 0x390]
mov qword [r15 + 0x10], rax
test rax, rax
je 0x140058fc3
mov rcx, qword [r15 + 8]
call fcn.1400d7f68
mov eax, dword [rdi + 8]
movzx r14d, byte [rbp + 0x13f0]
mov qword [r15 + 8], rsi
lea r9d, [rax + 1]
cmp r9d, 4
jne 0x140058a3f
test r14b, r14b
je 0x140058b15
movzx r12d, byte [rbp + 0x13e8]
test r12b, r12b
jne 0x140058a4f
mov r9d, eax
mov eax, dword [rsp + 0x58]
mov r8d, ebx
mov dword [rdi + 0xc], r9d
mov rcx, r15
mov rdx, qword [r15 + 0x10]
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x28], eax
mov eax, dword [r15 + 0x20]
mov dword [rsp + 0x20], eax
call fcn.140057af0
test eax, eax
je 0x140058fc3
test r12b, r12b
je 0x140058be7
mov rcx, qword [r15]
mov eax, dword [rdi + 0xc]
mov rbx, qword [r15 + 0x18]
mov esi, dword [rcx + 4]
imul esi, dword [rcx]
cmp dword [r15 + 0x20], 0x10
jne 0x140058b5f
cmp eax, 2
je 0x140058b22
cmp eax, 4
je 0x140058ac6
mov r8d, 0x12d1
lea rdx, str.C:UsersOpchiDesktoppecesinclude_stb_image.h
lea rcx, str.out_n__2__out_n__4
call fcn.1400ddfa8
test esi, esi
je 0x140058be7
movzx ecx, word [rsp + 0x50]
add rbx, 4
movzx edx, word [rsp + 0x4e]
xor r14d, r14d
movzx r8d, word [rsp + 0x4c]
mov eax, esi
cmp word [rbx - 4], r8w
jne 0x140058afe
cmp word [rbx - 2], dx
jne 0x140058afe
cmp word [rbx], cx
jne 0x140058afe
mov word [rbx + 2], r14w
add rbx, 8
sub rax, 1
jne 0x140058ae7
movzx r14d, byte [rbp + 0x13f0]
jmp 0x140058be7
movzx r12d, byte [rbp + 0x13e8]
jmp 0x140058a4f
test esi, esi
je 0x140058be7
movzx edx, word [rsp + 0x4c]
mov ecx, esi
xor esi, esi
nop dword [rax]
nop word [rax + rax]
cmp word [rbx], dx
lea rbx, [rbx + 4]
mov eax, 0xffff
cmove ax, si
mov word [rbx - 2], ax
sub rcx, 1
jne 0x140058b40
jmp 0x140058be7
cmp eax, 2
je 0x140058bc1
cmp eax, 4
je 0x140058b82
mov r8d, 0x12b7
lea rdx, str.C:UsersOpchiDesktoppecesinclude_stb_image.h
lea rcx, str.out_n__2__out_n__4
call fcn.1400ddfa8
test esi, esi
je 0x140058be7
movzx ecx, byte [rbp + 0x13fa]
add rbx, 2
movzx edx, byte [rbp + 0x13f9]
movzx r8d, byte [rbp + 0x13f8]
mov eax, esi
cmp byte [rbx - 2], r8b
jne 0x140058bb5
cmp byte [rbx - 1], dl
jne 0x140058bb5
cmp byte [rbx], cl
jne 0x140058bb5
mov byte [rbx + 1], 0
add rbx, 4
sub rax, 1
jne 0x140058ba2
jmp 0x140058be7
test esi, esi
je 0x140058be7
movzx edx, byte [rbp + 0x13f8]
mov ecx, esi
xor esi, esi
cmp byte [rbx], dl
lea rbx, [rbx + 2]
mov eax, 0xff
cmove eax, esi
mov byte [rbx - 1], al
sub rcx, 1
jne 0x140058bd0
cmp dword [rsp + 0x48], 0
je 0x140058d16
cmp dword [0x140271244], 0
je 0x140058d16
cmp dword [rdi + 0xc], 2
jle 0x140058d16
mov rax, qword [r15]
mov rbx, qword [r15 + 0x18]
mov esi, dword [rax + 4]
imul esi, dword [rax]
mov ecx, dword [rax + 0xc]
cmp ecx, 3
jne 0x140058c4b
test esi, esi
je 0x140058d16
mov edx, esi
nop dword [rax + rax]
movzx ecx, byte [rbx]
movzx eax, byte [rbx + 2]
mov byte [rbx], al
mov byte [rbx + 2], cl
lea rbx, [rbx + 3]
sub rdx, 1
jne 0x140058c30
jmp 0x140058d16
cmp ecx, 4
je 0x140058c69
mov r8d, 0x1325
lea rdx, str.C:UsersOpchiDesktoppecesinclude_stb_image.h
lea rcx, str.s__img_out_n__4
call fcn.1400ddfa8
test esi, esi
je 0x140058d16
cmp dword [0x14027140c], 0
je 0x140058cf5
add rbx, 2
mov r11d, esi
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rbx + 1]
movzx r10d, byte [rbx - 2]
movzx ecx, byte [rbx]
test al, al
je 0x140058ce0
mov r8d, eax
mov r9d, eax
movzx eax, byte [rbx - 1]
xor edx, edx
imul eax, eax, 0xff
shr r8d, 1
add eax, r8d
div r9d
xor edx, edx
mov byte [rbx - 1], al
imul eax, r10d, 0xff
add eax, r8d
div r9d
xor edx, edx
mov r10d, eax
imul eax, ecx, 0xff
add eax, r8d
div r9d
jmp 0x140058ce3
movzx eax, cl
mov byte [rbx - 2], al
mov byte [rbx], r10b
add rbx, 4
sub r11, 1
jne 0x140058c90
jmp 0x140058d16
mov edx, esi
nop word [rax + rax]
movzx ecx, byte [rbx]
movzx eax, byte [rbx + 2]
mov byte [rbx], al
mov byte [rbx + 2], cl
lea rbx, [rbx + 4]
sub rdx, 1
jne 0x140058d00
test r14b, r14b
je 0x140058dcc
mov rbx, qword [r15 + 0x18]
movzx eax, r14b
mov dword [rdi + 8], eax
mov rax, qword [r15]
mov dword [rdi + 0xc], 4
mov esi, dword [rax + 4]
imul esi, dword [rax]
test esi, esi
js 0x140058db4
cmp esi, 0x1fffffff
jg 0x140058db4
lea eax, [rsi*4]
movsxd rcx, eax
call fcn.1400de01c
mov r14, rax
test rax, rax
je 0x140058db4
test esi, esi
je 0x140058da5
lea r8, [rax + 2]
mov r9d, esi
nop dword [rax + rax]
movzx edx, byte [rbx]
lea r8, [r8 + 4]
lea rbx, [rbx + 1]
movzx eax, byte [rsp + rdx*4 + 0x70]
movzx ecx, byte [rsp + rdx*4 + 0x73]
mov byte [r8 - 6], al
movzx eax, byte [rsp + rdx*4 + 0x71]
mov byte [r8 - 5], al
movzx eax, byte [rsp + rdx*4 + 0x72]
mov byte [r8 - 4], al
mov byte [r8 - 3], cl
sub r9, 1
jne 0x140058d70
mov rcx, qword [r15 + 0x18]
call fcn.1400d7f68
mov qword [r15 + 0x18], r14
jmp 0x140058dd4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.outofmem
jmp 0x140058fba
test r12b, r12b
je 0x140058dd4
inc dword [rdi + 8]
mov rcx, qword [r15 + 0x10]
call fcn.1400d7f68
xor eax, eax
mov rcx, rdi
mov qword [r15 + 0x10], rax
call fcn.14004ebf0
mov rcx, rdi
call fcn.14004ebf0
mov eax, 1
jmp 0x140058fc5
mov rcx, qword [rbp + 0x390]
call fcn.1400d7f68
mov qword [r15 + 0x10], rsi
jmp 0x140058fc3
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.no_PLTE
jmp 0x140058fba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.outofdata
jmp 0x140058fba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_ctype
jmp 0x140058fba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_comp_method
jmp 0x140058fba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_filter_method
jmp 0x140058fba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.0_pixel_image
jmp 0x140058fba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_interlace_method
jmp 0x140058fba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.1_2_4_8_16_bit_only
jmp 0x140058fba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_IHDR_len
jmp 0x140058fba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.multiple_IHDR
jmp 0x140058fba
mov eax, ecx
mov byte [0x14026ec83], cl
shr eax, 0x18
mov byte [str.XXXX_PNG_chunk_not_known], al
mov eax, ecx
shr eax, 0x10
mov byte [0x14026ec81], al
mov eax, ecx
shr eax, 8
mov byte [0x14026ec82], al
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.XXXX_PNG_chunk_not_known
jmp 0x140058fba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_tRNS_len
jmp 0x140058fba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.tRNS_before_PLTE
jmp 0x140058fba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.tRNS_with_alpha
jmp 0x140058fba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.tRNS_after_IDAT
jmp 0x140058fba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.invalid_PLTE
jmp 0x140058fba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.first_not_IHDR
mov edx, 0x18
mov qword [rdx + rcx], rax
xor eax, eax
movaps xmm6, xmmword [rsp + 0x1480]
movaps xmm7, xmmword [rsp + 0x1470]
add rsp, 0x1498
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret