Function at 0x40c1b0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x5cc8c
call fcn.00413510
mov ecx, dword [ebp + 0x20]
cmp ecx, 0xffffffff
jne 0x40c1d5
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x18]
mov eax, dword [eax + 0xc]
sub eax, ecx
mov dword [ebp + 0x20], eax
mov ecx, eax
mov eax, dword [ebp + 0x24]
cmp eax, 0xffffffff
jne 0x40c1eb
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
mov edx, dword [ebp + 0x1c]
sub eax, edx
mov dword [ebp + 0x24], eax
push ebx
push esi
mov ebx, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
mov edx, dword [edi + 8]
test edx, edx
je 0x40c20c
mov edx, dword [edi + 0xc]
mov esi, dword [ebp + 0x14]
cmp edx, ebx
jne 0x40c20f
cmp dword [edi + 0x10], esi
je 0x40c22b
jmp 0x40c20f
mov esi, dword [ebp + 0x14]
push esi
push ebx
mov ecx, edi
call sym.Screen2Exe.exe_public:_long_int___thiscall_CTPImage::Create_unsigned_int__unsigned_int_
test eax, eax
je 0x40c225
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x20]
mov eax, dword [ebp + 0x24]
test ebx, ebx
je 0x40c963
test esi, esi
je 0x40c963
cmp ebx, 1
je 0x40c791
cmp esi, 1
je 0x40c791
cmp ecx, 1
je 0x40c791
cmp eax, 1
je 0x40c791
cmp eax, esi
jg 0x40c267
cmp ecx, ebx
jle 0x40c288
mov edx, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0x1c]
push ecx
mov ecx, dword [ebp + 0x18]
push eax
push ecx
push esi
push ebx
push edi
push edx
call fcn.0040c990
add esp, 0x20
test eax, eax
je 0x40c984
mov eax, dword [ebp + 8]
mov edi, dword [edi + 8]
lea edx, [ebp - 0x30d6c]
mov dword [ebp - 0x10], edi
mov ecx, dword [eax + 8]
xor eax, eax
cmp ebx, eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0xc], edx
mov byte [ebp - 0x28], 2
mov byte [ebp - 0x27], 2
mov byte [ebp - 0x26], 2
mov byte [ebp - 0x25], 0
mov dword [ebp + 0xc], eax
jle 0x40c329
lea ecx, [ebp - 0x755c]
mov dword [ebp - 4], eax
mov dword [ebp - 8], ecx
cdq
lea ecx, [ebx - 1]
idiv ecx
mov edx, dword [ebp - 8]
mov word [edx], ax
mov edx, dword [ebp + 0x20]
and eax, 0xffff
dec edx
cmp eax, edx
jne 0x40c2f7
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
add eax, 0xfffffffe
mov word [ecx], ax
mov byte [ebp + edx - 0x9c6c], 0
jmp 0x40c30a
mov eax, dword [ebp - 4]
shl eax, 8
cdq
idiv ecx
mov edx, dword [ebp + 0xc]
mov byte [ebp + edx - 0x9c6c], al
mov eax, dword [ebp - 8]
inc edx
add eax, 2
mov dword [ebp + 0xc], edx
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x20]
lea ecx, [eax - 1]
mov eax, dword [ebp - 4]
add eax, ecx
cmp edx, ebx
mov dword [ebp - 4], eax
jl 0x40c2c5
xor eax, eax
cmp esi, eax
mov dword [ebp + 0xc], eax
jle 0x40c37e
mov edx, dword [ebp + 0x24]
lea ecx, [esi - 1]
dec edx
mov dword [ebp - 4], eax
mov dword [ebp + 0x24], edx
lea edx, [ebp - 0x35b8c]
mov dword [ebp + 0x20], edx
cdq
idiv ecx
mov edx, dword [ebp + 0x20]
mov word [edx], ax
mov eax, dword [ebp - 4]
shl eax, 8
cdq
idiv ecx
mov edx, dword [ebp + 0xc]
inc edx
mov dword [ebp + 0xc], edx
mov byte [ebp + edx - 0x273d], al
mov eax, dword [ebp + 0x20]
add eax, 2
mov dword [ebp + 0x20], eax
mov eax, dword [ebp - 4]
add eax, dword [ebp + 0x24]
cmp edx, esi
mov dword [ebp - 4], eax
jl 0x40c348
test ebx, ebx
mov dword [ebp + 0xc], 0
jle 0x40c3d2
lea eax, [ebp - 0x5cc8a]
mov ecx, dword [ebp + 0xc]
xor dx, dx
add eax, 0x10
mov cl, byte [ebp + ecx - 0x9c6c]
mov dl, cl
not cl
mov word [eax - 0x12], dx
mov word [eax - 0x10], dx
movzx cx, cl
mov word [eax - 0xe], dx
mov word [eax - 0xc], dx
mov word [eax - 0xa], cx
mov word [eax - 8], cx
mov word [eax - 6], cx
mov word [eax - 4], cx
mov ecx, dword [ebp + 0xc]
inc ecx
cmp ecx, ebx
mov dword [ebp + 0xc], ecx
jl 0x40c38f
test esi, esi
mov dword [ebp + 0xc], 0
jle 0x40c426
lea eax, [ebp - 0x30d6a]
mov edx, dword [ebp + 0xc]
add eax, 0x10
mov cl, byte [ebp + edx - 0x273c]
xor dx, dx
mov dl, cl
not cl
mov word [eax - 0x12], dx
mov word [eax - 0x10], dx
movzx cx, cl
mov word [eax - 0xe], dx
mov word [eax - 0xc], dx
mov word [eax - 0xa], cx
mov word [eax - 8], cx
mov word [eax - 6], cx
mov word [eax - 4], cx
mov ecx, dword [ebp + 0xc]
inc ecx
cmp ecx, esi
mov dword [ebp + 0xc], ecx
jl 0x40c3e3
test esi, esi
mov dword [ebp + 0xc], 0
jle 0x40c984
lea eax, [ebp - 0x35b8c]
mov dword [ebp + 0x24], eax
mov eax, dword [ebp + 0x24]
lea ecx, [ebp - 0x5cc8c]
xor edx, edx
mov dword [ebp + 0x20], ecx
mov dx, word [eax]
mov ecx, dword [ebp + 0x1c]
lea eax, [edx + ecx]
mov ecx, dword [ebp + 8]
lea edx, [eax + 1]
cmp edx, dword [ecx + 0x10]
je 0x40c56c
imul eax, dword [ecx + 0xc]
mov edx, dword [ebp + 0x18]
add eax, edx
mov edx, dword [ebp - 0x1c]
test ebx, ebx
lea eax, [edx + eax*4]
mov dword [ebp - 0x18], eax
jle 0x40c53f
lea edx, [ebp - 0x755c]
mov esi, ebx
jmp 0x40c48b
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp - 0x18]
mov ecx, dword [ecx + 0xc]
xor eax, eax
mov ax, word [edx]
lea eax, [ebx + eax*4]
mov dword [ebp - 4], eax
lea eax, [eax + ecx*4]
mov dword [ebp - 0x14], eax
pxor mm0, mm0
mov eax, dword [ebp - 4]
movq mm1, qword [eax]
movq mm2, mm1
punpcklbw mm1, mm0
punpckhbw mm2, mm0
mov eax, dword [ebp - 0x14]
movq mm3, qword [eax]
movq mm4, mm3
punpcklbw mm3, mm0
punpckhbw mm4, mm0
mov ecx, dword [ebp + 0x20]
movq mm5, qword [ecx]
movq mm6, qword [ecx + 8]
psllw mm5, 7
psllw mm6, 7
pmulhw mm1, mm6
pmulhw mm2, mm5
pmulhw mm3, mm6
pmulhw mm4, mm5
paddusw mm1, mm2
paddusw mm3, mm4
psllw mm1, 1
psllw mm3, 1
mov ebx, dword [ebp - 0xc]
movq mm5, qword [ebx]
movq mm6, qword [ebx + 8]
psllw mm5, 7
psllw mm6, 7
pmulhw mm1, mm6
pmulhw mm3, mm5
paddusw mm1, mm3
pxor mm0, mm0
psllw mm1, 1
packuswb mm1, mm0
paddusb mm1, qword [ebp - 0x28]
mov eax, dword [ebp - 0x10]
movd dword [eax], mm1
emms
mov eax, dword [ebp + 0x20]
add edi, 4
add eax, 0x10
add edx, 2
dec esi
mov dword [ebp + 0x20], eax
mov dword [ebp - 0x10], edi
jne 0x40c488
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebp + 0x14]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + 0xc]
add edx, 0x10
inc eax
mov dword [ebp - 0xc], edx
mov edx, dword [ebp + 0x24]
add edx, 2
cmp eax, esi
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x24], edx
jl 0x40c43e
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
xor ecx, ecx
dec ebx
test ebx, ebx
mov dword [ebp + 0x14], ecx
mov dword [ebp - 0x20], ebx
jle 0x40c786
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 0x1c]
xor edx, edx
mov dx, word [ebp + eax*2 - 0x35b8c]
mov al, byte [ebp + eax - 0x273c]
add edx, esi
not al
mov dword [ebp - 0x18], edx
mov esi, eax
lea edx, [ebp - 0x755c]
and esi, 0xff
mov dword [ebp + 0x20], edx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x18]
mov ebx, dword [ebp + 0x20]
mov cl, byte [ebp + ecx - 0x9c6c]
imul eax, dword [edx + 0xc]
xor edx, edx
add edi, 4
mov dx, word [ebx]
mov ebx, dword [ebp + 0x18]
add ebx, eax
mov eax, dword [ebp - 0x1c]
add edx, ebx
lea eax, [eax + edx*4]
mov dl, byte [eax]
add eax, 4
mov byte [ebp + 0x24], dl
mov dl, byte [eax - 2]
mov byte [ebp - 0xc], dl
mov dl, byte [eax - 3]
mov byte [ebp - 8], dl
mov dl, byte [eax - 1]
mov byte [ebp + 0x1c], dl
mov dl, byte [eax]
mov byte [ebp + 0x10], dl
mov dl, byte [eax + 2]
mov byte [ebp - 0x10], dl
mov dl, byte [eax + 1]
mov al, byte [eax + 3]
mov ebx, dword [ebp + 0x24]
mov byte [ebp - 4], dl
mov dl, cl
not dl
mov byte [ebp - 0x14], al
mov eax, edx
mov edx, dword [ebp + 0x10]
and eax, 0xff
and ecx, 0xff
and edx, 0xff
and ebx, 0xff
imul edx, ecx
imul ebx, eax
add edx, ebx
mov ebx, dword [ebp - 0xc]
imul edx, esi
sar edx, 0x10
mov byte [edi - 4], dl
mov edx, dword [ebp - 0x10]
and edx, 0xff
and ebx, 0xff
imul edx, ecx
imul ebx, eax
add edx, ebx
mov ebx, dword [ebp - 8]
imul edx, esi
sar edx, 0x10
mov byte [edi - 2], dl
mov edx, dword [ebp - 4]
and edx, 0xff
and ebx, 0xff
imul edx, ecx
imul ebx, eax
add edx, ebx
mov ebx, dword [ebp - 0x14]
imul edx, esi
sar edx, 0x10
mov byte [edi - 3], dl
mov edx, dword [ebp + 0x1c]
and ebx, 0xff
imul ebx, ecx
mov ecx, edx
and ecx, 0xff
imul ecx, eax
add ebx, ecx
mov ecx, dword [ebp + 0x14]
imul ebx, esi
sar ebx, 0x10
mov byte [edi - 1], bl
mov ebx, dword [ebp + 0x20]
inc ecx
add ebx, 2
mov dword [ebp + 0x14], ecx
mov eax, dword [ebp - 0x20]
mov dword [ebp + 0x20], ebx
cmp ecx, eax
jl 0x40c5ac
mov ebx, dword [ebp + 0x24]
mov cl, byte [ebp + ecx - 0x9c6c]
and ebx, 0xff
mov al, cl
mov esi, ecx
mov ecx, dword [ebp + 0xc]
and esi, 0xff
not al
mov cl, byte [ebp + ecx - 0x273c]
and eax, 0xff
not cl
imul ebx, eax
and ecx, 0xff
and edx, 0xff
mov dword [ebp + 0x20], ecx
mov ecx, dword [ebp + 0x10]
and ecx, 0xff
imul edx, eax
imul ecx, esi
add ecx, ebx
mov ebx, dword [ebp - 0x10]
imul ecx, dword [ebp + 0x20]
sar ecx, 0x10
mov byte [edi], cl
mov ecx, dword [ebp - 0xc]
and ebx, 0xff
and ecx, 0xff
imul ebx, esi
imul ecx, eax
add ebx, ecx
mov ecx, dword [ebp - 8]
imul ebx, dword [ebp + 0x20]
sar ebx, 0x10
mov byte [edi + 2], bl
mov ebx, dword [ebp - 4]
and ebx, 0xff
and ecx, 0xff
imul ebx, esi
imul ecx, eax
add ebx, ecx
mov ecx, dword [ebp + 0x20]
imul ebx, ecx
sar ebx, 0x10
mov byte [edi + 1], bl
mov ebx, dword [ebp - 0x14]
and ebx, 0xff
mov eax, 1
imul ebx, esi
add ebx, edx
imul ebx, ecx
sar ebx, 0x10
mov byte [edi + 3], bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0x24]
mov edx, dword [ebp + 0x1c]
jmp 0x40c6c3
mov eax, ebx
imul eax, esi
lea edi, [eax + eax*4]
shl edi, 2
push edi
call sub.MFC42.DLL_operatornew
mov edx, eax
mov ecx, edi
mov dword [ebp - 4], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebp + 0x24]
xor eax, eax
cmp ecx, eax
mov dword [ebp - 0x18], eax
jle 0x40c8d9
mov dword [ebp + 0x10], eax
mov edx, dword [ebp + 0x1c]
lea edi, [eax + edx]
mov edx, dword [ebp + 8]
imul edi, dword [edx + 0xc]
add edi, dword [ebp + 0x18]
mov edx, dword [edx + 8]
lea edi, [edx + edi*4]
mov edx, dword [ebp + 0x20]
test edx, edx
jle 0x40c8c5
mov eax, dword [ebp + 0x10]
cdq
idiv ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x10]
add eax, esi
cdq
idiv ecx
mov edx, dword [ebp + 0x20]
xor ecx, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 0x20], eax
mov eax, ecx
cdq
idiv dword [ebp + 0x20]
mov esi, eax
lea eax, [ecx + ebx]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x14]
cdq
idiv dword [ebp + 0x20]
mov edx, dword [ebp - 0x20]
cmp ecx, edx
mov dword [ebp - 0xc], eax
jne 0x40c82e
inc edx
cmp esi, eax
jne 0x40c836
inc eax
mov dword [ebp - 0xc], eax
cmp ecx, edx
jge 0x40c8a9
imul ecx, ebx
lea eax, [ebx + ebx*4]
add ecx, esi
shl eax, 2
mov dword [ebp - 0x2c], eax
lea eax, [ecx + ecx*4]
mov ecx, dword [ebp - 4]
lea ecx, [ecx + eax*4 + 8]
mov eax, dword [ebp - 0x14]
sub edx, eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x10], edx
mov edx, dword [ebp - 0xc]
cmp esi, edx
jge 0x40c895
sub edx, esi
xor eax, eax
add ecx, 0x14
mov al, byte [edi + 3]
add dword [ecx - 0x1c], eax
xor eax, eax
mov al, byte [edi + 2]
add dword [ecx - 0x18], eax
xor eax, eax
mov al, byte [edi + 1]
add dword [ecx - 0x14], eax
xor eax, eax
mov al, byte [edi]
add dword [ecx - 0x10], eax
mov eax, dword [ecx - 0xc]
inc eax
dec edx
mov dword [ecx - 0xc], eax
jne 0x40c866
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x2c]
add ecx, eax
mov eax, dword [ebp - 0x10]
dec eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x10], eax
jne 0x40c860
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x24]
add edi, 4
dec eax
mov dword [ebp - 8], eax
jne 0x40c80e
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x24]
mov edi, dword [ebp + 0x10]
inc eax
add edi, esi
cmp eax, ecx
mov dword [ebp - 0x18], eax
mov dword [ebp + 0x10], edi
jl 0x40c7d1
mov ecx, dword [ebp + 0xc]
test esi, esi
mov edi, dword [ecx + 8]
jle 0x40c94b
mov edx, dword [ebp - 4]
lea eax, [ebx + ebx*4]
shl eax, 2
lea ecx, [edx + 0x10]
mov dword [ebp + 0x1c], eax
mov dword [ebp + 8], ecx
mov dword [ebp + 0x24], esi
test ebx, ebx
jle 0x40c93a
mov dword [ebp + 0x20], ebx
mov esi, dword [ecx]
test esi, esi
je 0x40c928
mov eax, dword [ecx - 0x10]
cdq
idiv esi
mov byte [edi + 3], al
mov eax, dword [ecx - 0xc]
cdq
idiv dword [ecx]
mov byte [edi + 2], al
mov eax, dword [ecx - 8]
cdq
idiv dword [ecx]
mov byte [edi + 1], al
mov eax, dword [ecx - 4]
cdq
idiv dword [ecx]
mov byte [edi], al
mov eax, dword [ebp + 0x20]
add edi, 4
add ecx, 0x14
dec eax
mov dword [ebp + 0x20], eax
jne 0x40c8ff
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x24]
add ecx, eax
dec edx
mov dword [ebp + 8], ecx
mov dword [ebp + 0x24], edx
jne 0x40c8f8
mov eax, dword [ebp - 4]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 1
push 1
mov ecx, edi
call sym.Screen2Exe.exe_public:_long_int___thiscall_CTPImage::Create_unsigned_int__unsigned_int_
test eax, eax
je 0x40c97b
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi + 8]
mov dword [ecx], 0xffffffff
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret