Function at 0x1400596f0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push r12
sub rsp, 0x518
lea rdx, [rsp + 0xa0]
mov dword [rsp + 0xbc], 0xff
mov rbx, rcx
xor r12d, r12d
call fcn.1400591e0
test rax, rax
jne 0x140059737
add rsp, 0x518
pop r12
pop rbx
ret
mov eax, dword [rbx + 4]
mov r8d, eax
mov qword [rsp + 0x530], rbp
neg r8d
movsxd rbp, dword [rsp + 0xa4]
cmovs r8d, eax
mov dword [rsp + 0x8c], eax
mov eax, dword [rsp + 0xac]
mov qword [rsp + 0x510], rsi
mov esi, dword [rsp + 0xa8]
mov dword [rsp + 0x558], eax
mov eax, dword [rsp + 0xb0]
mov qword [rsp + 0x508], rdi
mov edi, dword [rsp + 0xa0]
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0xb4]
mov qword [rsp + 0x4f8], r14
mov r14d, dword [rsp + 0xb8]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0xbc]
mov qword [rsp + 0x4f0], r15
mov r15d, dword [rsp + 0xc0]
mov dword [rsp + 0x548], eax
mov dword [rbx + 4], r8d
mov dword [rsp + 0x48], r14d
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x34], ebp
mov dword [rsp + 0x20], esi
mov dword [rsp + 0x550], edi
cmp esi, 0xc
jne 0x14005980d
cmp edi, 0x18
jge 0x140059824
mov ecx, ebp
mov eax, 0x55555556
sub ecx, r15d
sub ecx, 0x18
imul ecx
mov r12d, edx
shr r12d, 0x1f
add r12d, edx
jmp 0x14005981f
cmp edi, 0x10
jge 0x140059824
mov r12d, ebp
sub r12d, r15d
sub r12d, esi
sar r12d, 2
test r12d, r12d
jne 0x140059854
mov rcx, qword [rbx + 0xb8]
sub rcx, rbx
sub rcx, 0x38
cmp rbp, rcx
je 0x140059854
mov r8d, 0x1511
lea rdx, str.C:UsersOpchiDesktoppecesinclude_stb_image.h
lea rcx, str.info.offset___s__img_buffer___s__buffer_start_
call fcn.1400ddfa8
mov r8d, dword [rbx + 4]
cmp edi, 0x18
jne 0x140059869
cmp r14d, 0xff000000
jne 0x140059869
mov eax, 3
jmp 0x140059874
xor eax, eax
test r14d, r14d
setne al
add eax, 3
mov dword [rbx + 8], eax
mov ecx, dword [rbx]
test ecx, ecx
js 0x14005ab66
jne 0x14005988d
lea r9d, [rcx*4]
jmp 0x1400598af
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x14005ab66
lea r9d, [rcx*4]
test r9d, r9d
js 0x14005ab66
test r8d, r8d
js 0x14005ab66
je 0x1400598cc
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x14005ab66
test ecx, ecx
jne 0x1400598da
lea r9d, [rcx*4]
jmp 0x1400598fd
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x14005ab43
lea edx, [rcx*4]
test edx, edx
js 0x14005ab43
mov r9d, edx
test r8d, r8d
je 0x140059914
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x14005ab43
imul r8d, ecx
lea eax, [r8*4]
movsxd rcx, eax
call fcn.1400de01c
mov qword [rsp + 0x58], rax
mov r9, rax
test rax, rax
je 0x14005ab43
mov qword [rsp + 0x500], r13
cmp edi, 0x10
jge 0x14005a178
xor edi, edi
mov dword [rsp + 0x558], edi
test r12d, r12d
je 0x14005a156
cmp r12d, 0x100
jg 0x14005a156
mov r15, rax
test r12d, r12d
jle 0x140059c2c
mov ebp, dword [rsp + 0x20]
lea rsi, [rbx + 0x30]
movaps xmmword [rsp + 0x4e0], xmm6
xor r14d, r14d
movdqa xmm6, xmmword [0x1401377e0]
movaps xmmword [rsp + 0x4d0], xmm7
movdqa xmm7, xmmword [0x1401377d0]
movsxd rdi, r12d
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400599cf
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140059a46
cmp dword [rbx + 0x30], 0
lea rsi, [rbx + 0x30]
je 0x140059a44
mov r8d, dword [rbx + 0x34]
lea rdx, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
call qword [rbx + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x140059a0f
mov dword [rsi], eax
movq xmm0, rbx
punpcklqdq xmm0, xmm0
paddq xmm0, xmm6
movdqu xmmword [rbx + 0xb8], xmm0
mov rax, qword [rbx + 0xb8]
mov byte [rax], 0
jmp 0x140059a2e
cdqe
movq xmm1, rbx
add rax, rbx
movq xmm0, rax
punpcklqdq xmm1, xmm0
paddq xmm1, xmm7
movdqu xmmword [rbx + 0xb8], xmm1
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140059a46
xor cl, cl
mov r13, rsi
mov byte [rsp + r14*4 + 0xd2], cl
cmp rax, qword [rbx + 0xc0]
jae 0x140059a69
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140059adb
cmp dword [rsi], 0
je 0x140059ad9
mov r8d, dword [rbx + 0x34]
lea rdx, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
call qword [rbx + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x140059aa4
mov dword [rsi], eax
movq xmm0, rbx
punpcklqdq xmm0, xmm0
paddq xmm0, xmm6
movdqu xmmword [rbx + 0xb8], xmm0
mov rax, qword [rbx + 0xb8]
mov byte [rax], 0
jmp 0x140059ac3
cdqe
movq xmm1, rbx
add rax, rbx
movq xmm0, rax
punpcklqdq xmm1, xmm0
paddq xmm1, xmm7
movdqu xmmword [rbx + 0xb8], xmm1
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140059adb
xor cl, cl
mov byte [rsp + r14*4 + 0xd1], cl
cmp rax, qword [rbx + 0xc0]
jae 0x140059aff
movzx ecx, byte [rax]
lea rsi, [rbx + 0x30]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140059b71
cmp dword [rsi], 0
je 0x140059b6f
mov r8d, dword [rbx + 0x34]
lea rdx, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
call qword [rbx + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x140059b3a
mov dword [rsi], eax
movq xmm0, rbx
punpcklqdq xmm0, xmm0
paddq xmm0, xmm6
movdqu xmmword [rbx + 0xb8], xmm0
mov rax, qword [rbx + 0xb8]
mov byte [rax], 0
jmp 0x140059b59
cdqe
movq xmm1, rbx
add rax, rbx
movq xmm0, rax
punpcklqdq xmm1, xmm0
paddq xmm1, xmm7
movdqu xmmword [rbx + 0xb8], xmm1
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140059b71
xor cl, cl
mov byte [rsp + r14*4 + 0xd0], cl
cmp ebp, 0xc
je 0x140059bf8
cmp rax, qword [rbx + 0xc0]
jae 0x140059b93
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140059bf8
cmp dword [r13], 0
je 0x140059bf8
mov r8d, dword [rbx + 0x34]
lea rdx, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
call qword [rbx + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x140059bd2
mov dword [r13], eax
movq xmm0, rbx
punpcklqdq xmm0, xmm0
paddq xmm0, xmm6
movdqu xmmword [rbx + 0xb8], xmm0
mov rax, qword [rbx + 0xb8]
mov byte [rax], 0
jmp 0x140059bf1
cdqe
movq xmm1, rbx
add rax, rbx
movq xmm0, rax
punpcklqdq xmm1, xmm0
paddq xmm1, xmm7
movdqu xmmword [rbx + 0xb8], xmm1
inc qword [rbx + 0xb8]
mov byte [rsp + r14*4 + 0xd3], 0xff
inc r14
cmp r14, rdi
jl 0x1400599b0
movaps xmm7, xmmword [rsp + 0x4d0]
movaps xmm6, xmmword [rsp + 0x4e0]
mov edi, dword [rsp + 0x558]
mov ebp, dword [rsp + 0x34]
mov esi, dword [rsp + 0x20]
xor eax, eax
cmp esi, 0xc
setne al
add eax, 3
imul eax, r12d
sub ebp, eax
sub ebp, dword [rsp + 0x30]
sub ebp, esi
lea rsi, [rbx + 0xb8]
jns 0x140059c58
mov rax, qword [rbx + 0xc0]
mov qword [rsi], rax
jmp 0x140059c88
cmp qword [rbx + 0x10], 0
je 0x140059c82
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rsi]
cmp ecx, ebp
jge 0x140059c82
mov rax, qword [rbx + 0xc0]
sub ebp, ecx
mov rcx, qword [rbx + 0x28]
mov edx, ebp
mov qword [rsi], rax
call qword [rbx + 0x18]
jmp 0x140059c88
movsxd rax, ebp
add qword [rsi], rax
mov r9d, dword [rsp + 0x550]
cmp r9d, 1
jne 0x140059ca3
mov r12d, dword [rbx]
add r12d, 7
shr r12d, 3
jmp 0x140059cc1
cmp r9d, 4
jne 0x140059cb4
mov r12d, dword [rbx]
inc r12d
shr r12d, 1
jmp 0x140059cc1
cmp r9d, 8
jne 0x14005a0f5
mov r12d, dword [rbx]
mov eax, dword [rbx + 4]
neg r12d
and r12d, 3
mov ecx, eax
cmp r9d, 1
jne 0x140059eb0
xor r13d, r13d
test eax, eax
jle 0x14005aa47
xor edi, edi
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [rbx + 0xb8]
mov r14d, 7
cmp rax, qword [rbx + 0xc0]
jae 0x140059d15
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140059d75
cmp dword [rbx + 0x30], 0
je 0x140059d73
mov r8d, dword [rbx + 0x34]
lea rdx, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
call qword [rbx + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x140059d51
mov dword [rbx + 0x30], eax
lea rax, [rbx + 0x39]
mov qword [rbx + 0xc0], rax
lea rax, [rbx + 0x39]
mov byte [rbx + 0x38], 0
movzx ecx, byte [rbx + 0x38]
mov qword [rbx + 0xb8], rax
jmp 0x140059d75
movsxd rcx, eax
lea rax, [rbx + 0x39]
add rcx, 0x38
add rcx, rbx
mov qword [rbx + 0xc0], rcx
movzx ecx, byte [rbx + 0x38]
mov qword [rbx + 0xb8], rax
jmp 0x140059d75
xor cl, cl
xor ebp, ebp
movzx edx, cl
cmp dword [rbx], ebp
jle 0x140059e5c
mov eax, edx
mov ecx, r14d
sar eax, cl
and eax, 1
lea rcx, [rax*4]
movzx eax, byte [rsp + rcx + 0xd0]
mov byte [rdi + r15], al
movzx eax, byte [rsp + rcx + 0xd1]
mov byte [rdi + r15 + 1], al
movzx eax, byte [rsp + rcx + 0xd2]
mov byte [rdi + r15 + 2], al
lea eax, [rbp + 1]
mov byte [rdi + r15 + 3], 0xff
add rdi, 4
mov ecx, dword [rbx]
cmp eax, ecx
je 0x140059e5c
sub r14d, 1
jns 0x140059e52
mov rax, qword [rbx + 0xb8]
mov r14d, 7
cmp rax, qword [rbx + 0xc0]
jae 0x140059dfc
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140059e4f
cmp dword [rbx + 0x30], 0
je 0x140059e4d
mov r8d, dword [rbx + 0x34]
lea rdx, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
call qword [rbx + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x140059e29
mov dword [rbx + 0x30], eax
lea rax, [rbx + 0x39]
mov qword [rbx + 0xc0], rax
mov byte [rbx + 0x38], 0
jmp 0x140059e3a
movsxd rcx, eax
add rcx, 0x38
add rcx, rbx
mov qword [rbx + 0xc0], rcx
movzx edx, byte [rbx + 0x38]
lea rax, [rbx + 0x39]
mov qword [rbx + 0xb8], rax
mov ecx, dword [rbx]
jmp 0x140059e4f
xor dl, dl
movzx edx, dl
inc ebp
cmp ebp, ecx
jl 0x140059d82
cmp qword [rbx + 0x10], 0
je 0x140059e90
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, r12d
jge 0x140059e90
mov rax, qword [rbx + 0xc0]
mov edx, r12d
sub edx, ecx
mov qword [rbx + 0xb8], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x140059e9a
mov eax, r12d
add qword [rbx + 0xb8], rax
mov eax, dword [rbx + 4]
inc r13d
mov ecx, eax
cmp r13d, eax
jl 0x140059cf0
jmp 0x14005aa47
xor ebp, ebp
mov dword [rsp + 0x558], ebp
test eax, eax
jle 0x14005aa47
lea r14, [rbx + 0xc0]
nop dword [rax + rax]
xor r13d, r13d
cmp dword [rbx], r13d
jle 0x14005a0a0
nop dword [rax]
mov rax, qword [rsi]
cmp rax, qword [r14]
jae 0x140059ef3
movzx ecx, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x140059f5b
cmp dword [rbx + 0x30], 0
je 0x140059f59
mov r8d, dword [rbx + 0x34]
lea rbp, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
mov rdx, rbp
call qword [rbx + reloc.WS2_32.dll_recv]
mov qword [rsi], rbp
test eax, eax
jne 0x140059f36
mov r9d, dword [rsp + 0x550]
mov dword [rbx + 0x30], eax
lea rax, [rbx + 0x39]
mov qword [r14], rax
mov byte [rbp], 0
mov rax, qword [rsi]
movzx ecx, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x140059f5b
mov r9d, dword [rsp + 0x550]
movsxd rcx, eax
mov rax, qword [rsi]
add rcx, 0x38
add rcx, rbx
mov qword [r14], rcx
movzx ecx, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x140059f5b
xor cl, cl
xor r8d, r8d
movzx eax, cl
cmp r9d, 4
jne 0x140059f71
mov r8d, eax
and r8d, 0xf
shr eax, 4
movsxd rcx, edi
lea rdx, [rax*4]
movzx eax, byte [rsp + rdx + 0xd0]
inc edi
mov byte [rcx + r15], al
movzx eax, byte [rsp + rdx + 0xd1]
movsxd rcx, edi
inc edi
mov byte [rcx + r15], al
movzx eax, byte [rsp + rdx + 0xd2]
movsxd rcx, edi
inc edi
mov byte [rcx + r15], al
movsxd rax, edi
inc edi
mov byte [rax + r15], 0xff
lea eax, [r13 + 1]
cmp eax, dword [rbx]
je 0x14005a099
cmp r9d, 8
jne 0x14005a047
mov rax, qword [rsi]
cmp rax, qword [r14]
jae 0x140059fdb
movzx ecx, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x14005a043
cmp dword [rbx + 0x30], 0
je 0x14005a041
mov r8d, dword [rbx + 0x34]
lea rbp, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
mov rdx, rbp
call qword [rbx + reloc.WS2_32.dll_recv]
mov qword [rsi], rbp
test eax, eax
jne 0x14005a01e
mov r9d, dword [rsp + 0x550]
mov dword [rbx + 0x30], eax
lea rax, [rbx + 0x39]
mov qword [r14], rax
mov byte [rbp], 0
mov rax, qword [rsi]
movzx ecx, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x14005a043
mov r9d, dword [rsp + 0x550]
movsxd rcx, eax
mov rax, qword [rsi]
add rcx, 0x38
add rcx, rbx
mov qword [r14], rcx
movzx ecx, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x14005a043
xor cl, cl
movzx r8d, cl
movsxd rcx, edi
lea rdx, [r8*4]
movzx eax, byte [rsp + rdx + 0xd0]
inc edi
add r13d, 2
mov byte [rcx + r15], al
movzx eax, byte [rsp + rdx + 0xd1]
movsxd rcx, edi
inc edi
mov byte [rcx + r15], al
movzx eax, byte [rsp + rdx + 0xd2]
movsxd rcx, edi
inc edi
mov byte [rcx + r15], al
movsxd rax, edi
inc edi
mov byte [rax + r15], 0xff
cmp r13d, dword [rbx]
jl 0x140059ee0
mov ebp, dword [rsp + 0x558]
cmp qword [rbx + 0x10], 0
lea r14, [rbx + 0xc0]
je 0x14005a0cc
mov ecx, dword [r14]
sub ecx, dword [rsi]
cmp ecx, r12d
jge 0x14005a0cc
mov rax, qword [r14]
mov edx, r12d
sub edx, ecx
mov qword [rsi], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x14005a0d2
mov eax, r12d
add qword [rsi], rax
mov eax, dword [rbx + 4]
inc ebp
mov r9d, dword [rsp + 0x550]
mov ecx, eax
mov dword [rsp + 0x558], ebp
cmp ebp, eax
jl 0x140059ed0
jmp 0x14005aa47
mov rcx, r15
call fcn.1400d7f68
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.bad_bpp
mov qword [rdx + rcx], rax
xor eax, eax
mov r13, qword [rsp + 0x500]
mov r14, qword [rsp + 0x4f8]
mov rdi, qword [rsp + 0x508]
mov rsi, qword [rsp + 0x510]
mov rbp, qword [rsp + 0x530]
mov r15, qword [rsp + 0x4f0]
add rsp, 0x518
pop r12
pop rbx
ret
mov rcx, r9
call fcn.1400d7f68
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.invalid
jmp 0x14005a115
xor r10d, r10d
xor r11d, r11d
xor r8d, r8d
mov dword [rsp + 0x40], r10d
xor edi, edi
mov dword [rsp + 0x44], r11d
xor r14d, r14d
mov dword [rsp + 0x2c], r10d
xor r12d, r12d
mov dword [rsp + 0x20], r8d
xor r13d, r13d
mov dword [rsp + 0x68], edi
sub ebp, r15d
sub ebp, esi
jns 0x14005a1bb
mov rax, qword [rbx + 0xc0]
mov qword [rbx + 0xb8], rax
jmp 0x14005a204
cmp qword [rbx + 0x10], rdi
je 0x14005a1fa
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, ebp
jge 0x14005a1fa
mov rax, qword [rbx + 0xc0]
sub ebp, ecx
mov rcx, qword [rbx + 0x28]
mov edx, ebp
mov qword [rbx + 0xb8], rax
call qword [rbx + 0x18]
mov r9, qword [rsp + 0x58]
mov r8d, edi
mov r10d, edi
mov r11d, edi
jmp 0x14005a204
movsxd rax, ebp
add qword [rbx + 0xb8], rax
mov ecx, dword [rsp + 0x550]
cmp ecx, 0x18
jne 0x14005a217
mov eax, dword [rbx]
lea edx, [rax + rax*2]
jmp 0x14005a224
cmp ecx, 0x10
jne 0x14005a222
mov edx, dword [rbx]
add edx, edx
jmp 0x14005a224
xor edx, edx
neg edx
mov r15, r9
and edx, 3
mov dword [rsp + 0x30], edx
cmp ecx, 0x18
jne 0x14005a24b
mov ebp, 1
mov qword [rsp + 0x50], r9
mov qword [rsp + 0x38], rbp
mov esi, edi
jmp 0x14005a463
mov esi, dword [rsp + 0x28]
xor ebp, ebp
mov qword [rsp + 0x38], rbp
cmp ecx, 0x20
jne 0x14005a2bc
mov qword [rsp + 0x38], rbp
cmp esi, 0xff
jne 0x14005a2bc
cmp dword [rsp + 0x24], 0xff00
mov qword [rsp + 0x38], rbp
jne 0x14005a2bc
cmp dword [rsp + 0x558], 0xff0000
mov qword [rsp + 0x38], rbp
jne 0x14005a2bc
mov r9d, dword [rsp + 0x48]
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x50], r15
cmp r9d, 0xff000000
jne 0x14005a2f4
mov r15, qword [rsp + 0x58]
mov ebp, 2
mov qword [rsp + 0x38], rbp
mov esi, edi
mov qword [rsp + 0x50], r15
jmp 0x14005a463
mov r11d, dword [rsp + 0x558]
test r11d, r11d
je 0x14005ab1e
mov r14d, dword [rsp + 0x24]
test r14d, r14d
je 0x14005ab1e
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x58], r9
test esi, esi
je 0x14005ab1e
mov r9d, dword [rsp + 0x48]
jmp 0x14005a301
mov r11d, dword [rsp + 0x558]
mov r14d, dword [rsp + 0x24]
mov ecx, r11d
call fcn.140059170
mov edx, r11d
mov ecx, r11d
shr edx, 1
and ecx, 0x55555555
and edx, 0x55555555
add edx, ecx
lea r10d, [rax - 7]
mov ecx, edx
mov dword [rsp + 0x40], r10d
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, r14d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx edi, al
call fcn.140059170
mov edx, r14d
mov ecx, r14d
shr edx, 1
and ecx, 0x55555555
and edx, 0x55555555
add edx, ecx
lea r11d, [rax - 7]
mov ecx, edx
mov dword [rsp + 0x44], r11d
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, esi
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r14d, al
call fcn.140059170
mov edx, dword [rsp + 0x28]
mov ecx, dword [rsp + 0x28]
shr edx, 1
and ecx, 0x55555555
and edx, 0x55555555
lea esi, [rax - 7]
add edx, ecx
mov dword [rsp + 0x2c], esi
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, r9d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r12d, al
call fcn.140059170
lea r8d, [rax - 7]
mov edx, r9d
mov dword [rsp + 0x20], r8d
shr edx, 1
mov ecx, r9d
and edx, 0x55555555
and ecx, 0x55555555
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r13d, al
mov eax, dword [rbx + 4]
mov ecx, eax
mov dword [rsp + 0x34], 0
test eax, eax
jle 0x14005aa47
mov eax, r10d
neg eax
mov dword [rsp + 0x6c], eax
mov eax, 8
mov ecx, eax
sub ecx, edi
mov dword [rsp + 0x70], ecx
mov ecx, r11d
neg ecx
mov dword [rsp + 0x74], ecx
mov ecx, eax
sub ecx, r14d
mov dword [rsp + 0x78], ecx
mov ecx, esi
neg ecx
mov dword [rsp + 0x7c], ecx
mov ecx, eax
sub ecx, r12d
mov dword [rsp + 0x80], ecx
mov ecx, r8d
neg ecx
sub eax, r13d
mov dword [rsp + 0x84], ecx
mov dword [rsp + 0x88], eax
mov eax, edi
lea rdi, [rbx + 0xc0]
mov qword [rsp + 0x90], rax
mov eax, r12d
mov r12d, r13d
mov r13d, dword [rsp + 0x68]
mov ecx, r14d
mov qword [rsp + 0xc8], r12
mov qword [rsp + 0x98], rcx
mov qword [rsp + 0x60], rax
nop
mov eax, dword [rbx]
movsxd rcx, r13d
test rbp, rbp
je 0x14005a751
xor r12d, r12d
test eax, eax
jle 0x14005a744
lea rbp, [r15 + rcx]
mov r15, qword [rsp + 0x38]
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rbx + 0xb8]
lea rsi, [rbx + 0x30]
cmp rax, qword [rdi]
jae 0x14005a54f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14005a5a5
cmp dword [rsi], 0
je 0x14005a5a3
mov r8d, dword [rbx + 0x34]
lea r14, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
mov rdx, r14
call qword [rbx + reloc.WS2_32.dll_recv]
mov qword [rbx + 0xb8], r14
test eax, eax
jne 0x14005a580
mov dword [rsi], eax
lea rax, [rbx + 0x39]
mov qword [rdi], rax
mov byte [r14], 0
jmp 0x14005a58d
movsxd rcx, eax
add rcx, 0x38
add rcx, rbx
mov qword [rdi], rcx
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14005a5a5
xor cl, cl
mov byte [rbp + 2], cl
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rdi]
jae 0x14005a5c3
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14005a61d
cmp dword [rsi], 0
je 0x14005a61b
mov r8d, dword [rbx + 0x34]
lea r14, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
mov rdx, r14
call qword [rbx + reloc.WS2_32.dll_recv]
mov qword [rbx + 0xb8], r14
test eax, eax
jne 0x14005a5f4
mov dword [rsi], eax
lea rax, [rbx + 0x39]
mov qword [rdi], rax
mov byte [r14], 0
jmp 0x14005a601
movsxd rcx, eax
add rcx, 0x38
add rcx, rbx
mov qword [rdi], rcx
mov rax, qword [rbx + 0xb8]
lea r14, [rbx + 0x30]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14005a620
xor cl, cl
mov r14, rsi
mov byte [rbp + 1], cl
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rdi]
jae 0x14005a63e
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14005a698
cmp dword [rsi], 0
je 0x14005a696
mov r8d, dword [rbx + 0x34]
lea rsi, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
mov rdx, rsi
call qword [rbx + reloc.WS2_32.dll_recv]
mov qword [rbx + 0xb8], rsi
test eax, eax
jne 0x14005a66f
mov dword [r14], eax
lea rax, [rbx + 0x39]
mov qword [rdi], rax
mov byte [rsi], 0
jmp 0x14005a67c
movsxd rcx, eax
add rcx, 0x38
add rcx, rbx
mov qword [rdi], rcx
mov rax, qword [rbx + 0xb8]
lea r14, [rbx + 0x30]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14005a698
xor cl, cl
mov byte [rbp], cl
cmp r15, 2
jne 0x14005a715
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rdi]
jae 0x14005a6bc
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14005a717
cmp dword [r14], 0
je 0x14005a711
mov r8d, dword [rbx + 0x34]
lea rsi, [rbx + 0x38]
mov rcx, qword [rbx + 0x28]
mov rdx, rsi
call qword [rbx + reloc.WS2_32.dll_recv]
mov qword [rbx + 0xb8], rsi
test eax, eax
jne 0x14005a6ee
mov dword [r14], eax
lea rax, [rbx + 0x39]
mov qword [rdi], rax
mov byte [rsi], 0
jmp 0x14005a6fb
movsxd rcx, eax
add rcx, 0x38
add rcx, rbx
mov qword [rdi], rcx
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14005a717
xor cl, cl
jmp 0x14005a717
mov cl, 0xff
mov byte [rbp + 3], cl
add r13d, 4
movzx eax, cl
add rbp, 4
or dword [rsp + 0x548], eax
inc r12d
cmp r12d, dword [rbx]
jl 0x14005a530
mov r15, qword [rsp + 0x50]
lea rdi, [rbx + 0xc0]
mov r12, qword [rsp + 0xc8]
jmp 0x14005a9ef
test eax, eax
jle 0x14005a9ef
lea r14, [r15 + rcx]
mov r15d, dword [rsp + 0x550]
mov rcx, rbx
call fcn.14004ed10
cmp r15d, 0x10
jne 0x14005a777
mov esi, eax
jmp 0x14005a788
mov rcx, rbx
mov edi, eax
call fcn.14004ed10
mov esi, eax
shl esi, 0x10
add esi, edi
mov eax, dword [rsp + 0x40]
mov edi, esi
and edi, dword [rsp + 0x558]
test eax, eax
jns 0x14005a7a1
mov ecx, dword [rsp + 0x6c]
shl edi, cl
jmp 0x14005a7a5
mov ecx, eax
shr edi, cl
cmp edi, 0x100
jb 0x14005a7c6
mov r8d, 0x1489
lea rdx, str.C:UsersOpchiDesktoppecesinclude_stb_image.h
lea rcx, str.v___256
call fcn.1400ddfa8
mov ecx, dword [rsp + 0x70]
mov rax, qword [rsp + 0x90]
shr edi, cl
cmp rax, 8
jbe 0x14005a7fb
mov r8d, 0x148b
lea rdx, str.C:UsersOpchiDesktoppecesinclude_stb_image.h
lea rcx, str.bits___0__bits___8
call fcn.1400ddfa8
mov rax, qword [rsp + 0x90]
lea rcx, [0x140000000]
imul edi, dword [rcx + rax*4 + 0x1367c0]
mov ecx, dword [rcx + rax*4 + 0x137460]
mov eax, dword [rsp + 0x44]
sar edi, cl
mov byte [r14], dil
mov edi, esi
and edi, dword [rsp + 0x24]
test eax, eax
jns 0x14005a82c
mov ecx, dword [rsp + 0x74]
shl edi, cl
jmp 0x14005a830
mov ecx, eax
shr edi, cl
cmp edi, 0x100
jb 0x14005a851
mov r8d, 0x1489
lea rdx, str.C:UsersOpchiDesktoppecesinclude_stb_image.h
lea rcx, str.v___256
call fcn.1400ddfa8
mov ecx, dword [rsp + 0x78]
mov rax, qword [rsp + 0x98]
shr edi, cl
cmp rax, 8
jbe 0x14005a886
mov r8d, 0x148b
lea rdx, str.C:UsersOpchiDesktoppecesinclude_stb_image.h
lea rcx, str.bits___0__bits___8
call fcn.1400ddfa8
mov rax, qword [rsp + 0x98]
lea rcx, [0x140000000]
imul edi, dword [rcx + rax*4 + 0x1367c0]
mov ecx, dword [rcx + rax*4 + 0x137460]
mov eax, dword [rsp + 0x2c]
sar edi, cl
mov byte [r14 + 1], dil
mov edi, esi
and edi, dword [rsp + 0x28]
test eax, eax
jns 0x14005a8b8
mov ecx, dword [rsp + 0x7c]
shl edi, cl
jmp 0x14005a8bc
mov ecx, eax
shr edi, cl
cmp edi, 0x100
jb 0x14005a8dd
mov r8d, 0x1489
lea rdx, str.C:UsersOpchiDesktoppecesinclude_stb_image.h
lea rcx, str.v___256
call fcn.1400ddfa8
mov ecx, dword [rsp + 0x80]
mov rdx, qword [rsp + 0x60]
shr edi, cl
cmp rdx, 8
jbe 0x14005a90f
mov r8d, 0x148b
lea rdx, str.C:UsersOpchiDesktoppecesinclude_stb_image.h
lea rcx, str.bits___0__bits___8
call fcn.1400ddfa8
mov rdx, qword [rsp + 0x60]
mov r9d, dword [rsp + 0x48]
lea r8, [0x140000000]
imul edi, dword [r8 + rdx*4 + 0x1367c0]
mov ecx, dword [r8 + rdx*4 + 0x137460]
sar edi, cl
mov byte [r14 + 2], dil
test r9d, r9d
je 0x14005a9c1
mov eax, dword [rsp + 0x20]
and esi, r9d
test eax, eax
jns 0x14005a951
mov ecx, dword [rsp + 0x84]
shl esi, cl
jmp 0x14005a955
mov ecx, eax
shr esi, cl
cmp esi, 0x100
jb 0x14005a97d
mov r8d, 0x1489
lea rdx, str.C:UsersOpchiDesktoppecesinclude_stb_image.h
lea rcx, str.v___256
call fcn.1400ddfa8
lea r8, [0x140000000]
mov ecx, dword [rsp + 0x88]
shr esi, cl
cmp r12, 8
jbe 0x14005a9ac
mov r8d, 0x148b
lea rdx, str.C:UsersOpchiDesktoppecesinclude_stb_image.h
lea rcx, str.bits___0__bits___8
call fcn.1400ddfa8
lea r8, [0x140000000]
imul esi, dword [r8 + r12*4 + 0x1367c0]
mov ecx, dword [r8 + r12*4 + 0x137460]
sar esi, cl
jmp 0x14005a9c6
mov esi, 0xff
or dword [rsp + 0x548], esi
add r13d, 4
mov byte [r14 + 3], sil
inc ebp
add r14, 4
cmp ebp, dword [rbx]
jl 0x14005a765
mov r15, qword [rsp + 0x50]
lea rdi, [rbx + 0xc0]
cmp qword [rbx + 0x10], 0
mov edx, dword [rsp + 0x30]
je 0x14005aa1b
mov ecx, dword [rdi]
sub ecx, dword [rbx + 0xb8]
cmp ecx, edx
jge 0x14005aa22
mov rax, qword [rdi]
sub edx, ecx
mov rcx, qword [rbx + 0x28]
mov qword [rbx + 0xb8], rax
call qword [rbx + 0x18]
jmp 0x14005aa2b
lea rdi, [rbx + 0xc0]
mov eax, edx
add qword [rbx + 0xb8], rax
mov edx, dword [rsp + 0x34]
mov eax, dword [rbx + 4]
inc edx
mov rbp, qword [rsp + 0x38]
mov ecx, eax
mov dword [rsp + 0x34], edx
cmp edx, eax
jl 0x14005a500
cmp dword [rsp + 0x548], 0
jne 0x14005aa7d
imul eax, dword [rbx]
lea eax, [rax*4 - 1]
movsxd rdx, eax
test eax, eax
js 0x14005aa7d
mov rax, qword [rsp + 0x58]
nop word [rax + rax]
mov byte [rdx + rax], 0xff
sub rdx, 4
jns 0x14005aa70
mov ecx, dword [rbx + 4]
cmp dword [rsp + 0x8c], 0
jle 0x14005ab00
xor r10d, r10d
mov edx, ecx
test ecx, 0xfffffffe
jle 0x14005ab00
nop dword [rax]
nop dword [rax + rax]
mov ecx, dword [rbx]
sub edx, r10d
dec edx
mov r9d, ecx
imul edx, ecx
xor r8d, r8d
imul r9d, r10d
lea eax, [rcx*4]
shl edx, 2
shl r9d, 2
add rdx, r15
add r9, r15
test eax, eax
jle 0x14005aaef
sub r9, rdx
nop
movzx eax, byte [rdx]
inc r8d
movzx ecx, byte [r9 + rdx]
mov byte [r9 + rdx], al
mov byte [rdx], cl
lea rdx, [rdx + 1]
mov eax, dword [rbx]
shl eax, 2
cmp r8d, eax
jl 0x14005aad0
mov ecx, dword [rbx + 4]
inc r10d
mov eax, ecx
mov edx, ecx
sar eax, 1
cmp r10d, eax
jl 0x14005aaa0
mov eax, dword [rbx]
mov rdx, qword [rsp + 0x538]
mov dword [rdx], eax
mov rax, qword [rsp + 0x540]
mov dword [rax], ecx
mov rax, r15
jmp 0x14005a11b
mov rcx, r15
call fcn.1400d7f68
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.bad_masks
jmp 0x14005a115
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.outofmem
mov qword [rdx + rcx], rax
xor eax, eax
jmp 0x14005a123
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.too_large
mov qword [rdx + rcx], rax
xor eax, eax
jmp 0x14005a123